vips-7.38.5/0000755000175000017500000000000012303146332007575 500000000000000vips-7.38.5/gtk-doc.make0000644000175000017500000002061312303140253011702 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ tmpl.stamp sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) else all-local: endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### setup-build.stamp: -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ echo ' DOC Preparing build'; \ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ test -f $(abs_srcdir)/$$file && \ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ done; \ fi; \ test -d $(abs_srcdir)/tmpl && \ { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ chmod -R u+w $(abs_builddir)/tmpl; } \ fi @touch setup-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo ' DOC Scanning header files' @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ echo " DOC Introspecting gobjects"; \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo ' DOC Rebuilding template files' @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ if test -w $(abs_srcdir) ; then \ cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ fi \ fi @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true $(srcdir)/tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo ' DOC Building XML' @-chmod -R u+w $(srcdir) @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building HTML' @rm -rf html @mkdir html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/html; \ fi; \ done; @echo ' DOC Fixing cross-references' @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building PDF' @rm -f $(DOC_MODULE).pdf @mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ rm -rf tmpl; \ fi maintainer-clean-local: clean @rm -rf xml html install-data-local: @installfiles=`echo $(builddir)/html/*`; \ if test "$$installfiles" = '$(builddir)/html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local @mkdir $(distdir)/tmpl @mkdir $(distdir)/html @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs vips-7.38.5/m4/0000755000175000017500000000000012303144053010113 500000000000000vips-7.38.5/m4/ltversion.m40000644000175000017500000000126212303144053012323 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) vips-7.38.5/m4/glibc21.m40000644000175000017500000000152612303144046011526 00000000000000# glibc21.m4 serial 4 dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([gl_GLIBC21], [ AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer], [ac_cv_gnu_library_2_1], [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], [ac_cv_gnu_library_2_1=yes], [ac_cv_gnu_library_2_1=no]) ] ) AC_SUBST([GLIBC21]) GLIBC21="$ac_cv_gnu_library_2_1" ] ) vips-7.38.5/m4/ltsugar.m40000644000175000017500000001042412303144053011757 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) vips-7.38.5/m4/lcmessage.m40000644000175000017500000000243312303144046012244 00000000000000# lcmessage.m4 serial 6 (gettext-0.18) dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([gt_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], [AC_TRY_LINK([#include ], [return LC_MESSAGES], [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])]) if test $gt_cv_val_LC_MESSAGES = yes; then AC_DEFINE([HAVE_LC_MESSAGES], [1], [Define if your file defines LC_MESSAGES.]) fi ]) vips-7.38.5/m4/introspection.m40000644000175000017500000000673612303144046013213 00000000000000dnl -*- mode: autoconf -*- dnl Copyright 2009 Johan Dahlin dnl dnl This file is free software; the author(s) gives unlimited dnl permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl # serial 1 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([LT_INIT],[$0])dnl setup libtool first dnl enable/disable introspection m4_if([$2], [require], [dnl enable_introspection=yes ],[dnl AC_ARG_ENABLE(introspection, AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], [Enable introspection for this build]),, [enable_introspection=auto]) ])dnl AC_MSG_CHECKING([for gobject-introspection]) dnl presence/version checking AS_CASE([$enable_introspection], [no], [dnl found_introspection="no (disabled, use --enable-introspection to enable)" ],dnl [yes],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0],, AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) ],dnl [auto],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) dnl Canonicalize enable_introspection enable_introspection=$found_introspection ],dnl [dnl AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) ])dnl AC_MSG_RESULT([$found_introspection]) INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi AC_SUBST(INTROSPECTION_SCANNER) AC_SUBST(INTROSPECTION_COMPILER) AC_SUBST(INTROSPECTION_GENERATE) AC_SUBST(INTROSPECTION_GIRDIR) AC_SUBST(INTROSPECTION_TYPELIBDIR) AC_SUBST(INTROSPECTION_CFLAGS) AC_SUBST(INTROSPECTION_LIBS) AC_SUBST(INTROSPECTION_MAKEFILE) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") ]) dnl Usage: dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) ]) dnl Usage: dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) ]) vips-7.38.5/m4/progtest.m40000644000175000017500000000557312303144046012160 00000000000000# progtest.m4 serial 6 (gettext-0.18) dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. AC_PREREQ([2.50]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) vips-7.38.5/m4/libtool.m40000644000175000017500000106000712303144053011745 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS vips-7.38.5/m4/lt~obsolete.m40000644000175000017500000001375612303144053012663 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) vips-7.38.5/m4/gtk-doc.m40000644000175000017500000000477212303144046011641 00000000000000dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl check for tools we added during development AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) dnl don't check for glib if we build glib if test "x$PACKAGE_NAME" != "xglib"; then dnl don't fail if someone does not have glib PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) fi fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], [build documentation in html format [[default=yes]]]),, [enable_gtk_doc_html=yes]) AC_ARG_ENABLE([gtk-doc-pdf], AS_HELP_STRING([--enable-gtk-doc-pdf], [build documentation in pdf format [[default=no]]]),, [enable_gtk_doc_pdf=no]) if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test -z "$AM_DEFAULT_VERBOSITY"; then AM_DEFAULT_VERBOSITY=1 fi AC_SUBST([AM_DEFAULT_VERBOSITY]) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) ]) vips-7.38.5/m4/ltoptions.m40000644000175000017500000003007312303144053012333 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) vips-7.38.5/m4/codeset.m40000644000175000017500000000141312303144046011724 00000000000000# codeset.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET); return !cs;], [am_cv_langinfo_codeset=yes], [am_cv_langinfo_codeset=no]) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE([HAVE_LANGINFO_CODESET], [1], [Define if you have and nl_langinfo(CODESET).]) fi ]) vips-7.38.5/m4/iconv.m40000644000175000017500000001653712303144046011431 00000000000000# iconv.m4 serial 11 (gettext-0.18.1) dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) fi ]) vips-7.38.5/m4/gettext.m40000644000175000017500000003513212303144046011767 00000000000000# gettext.m4 serial 63 (gettext-0.18) dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) vips-7.38.5/test-driver0000755000175000017500000000761112303144055011720 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2012-06-27.10; # UTC # Copyright (C) 2011-2013 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then estatus=1 fi case $estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: vips-7.38.5/libvipsCC/0000755000175000017500000000000012303146332011453 500000000000000vips-7.38.5/libvipsCC/VError.cc0000644000175000017500000000361612303140253013123 00000000000000// Code for error type /* Copyright (C) 1991-2001 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #ifdef WITH_DMALLOC #include #endif /*WITH_DMALLOC*/ VIPS_NAMESPACE_START void VError::perror() { std::cerr << _what; exit( 1 ); } void VError::perror( const char *name ) { std::cerr << name << ": " << _what; exit( 1 ); } // Add a new bit to the end of the error buffer VError &VError::app( const int i ) { char buf[ 256 ]; sprintf( buf, "%d", i ); _what += buf; return( *this ); } VError &VError::app( std::string txt ) { _what += txt; return( *this ); }; void VError::ostream_print( std::ostream &file ) const { file << _what; } void verror( std::string str ) throw( VError ) { VError err; err.app( "VIPS error: " ); if( str == "" ) { err.app( im_error_buffer() ); im_error_clear(); } else err.app( str ).app( "\n" ); throw( err ); } VIPS_NAMESPACE_END vips-7.38.5/libvipsCC/VImage.cc0000644000175000017500000002575012303140253013057 00000000000000// Object part of VImage class /* Copyright (C) 1991-2001 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #ifdef WITH_DMALLOC #include #endif /*WITH_DMALLOC*/ /* #define DEBUG */ VIPS_NAMESPACE_START /* Useful to have these as C++ functions. */ bool init( const char *argv0 ) { return( vips_init( argv0 ) == 0 ); } void shutdown() { vips_shutdown(); } void VImage::refblock::debug_print() { std::list::iterator i; printf( "refblock %p:\n", this ); printf( " im = %p", im ); if( im && im->filename ) printf( " (im->filename = \"%s\")", im->filename ); printf( "\n" ); printf( " close_on_delete = %d\n", close_on_delete ); printf( " nrefs (refs to us) = %d\n", nrefs ); printf( " orefs (refs we make) = refblocks " ); for( i = orefs.begin(); i != orefs.end(); i++ ) printf( "%p ", *i ); printf( "\n" ); } // dump all refblocks for debugging void VImage::print_all() { #ifdef DEBUG std::list::iterator i; printf( "*** VImage::refblock::print_all() start\n" ); for( i = all_refblock.begin(); i != all_refblock.end(); i++ ) (*i)->debug_print(); printf( "*** VImage::refblock::print_all() end\n" ); #endif /*DEBUG*/ } // easy call from C version void im__ccp_print_all() { VImage::print_all(); } // constructor VImage::refblock::refblock() { im = 0; close_on_delete = 1; nrefs = 1; #ifdef DEBUG all_refblock.push_front( this ); #endif /*DEBUG*/ } // Add a ref - this (output image) depends upon VipsImage in void VImage::refblock::addref( refblock *in ) throw( VError ) { if( this == in ) verror( "sanity failure" ); in->nrefs++; orefs.push_front( in ); } VImage::refblock::~refblock() throw( VError ) { #ifdef DEBUG printf( "VImage::refblock::removeref(): death!\n" ); debug_print(); #endif /*DEBUG*/ std::list::iterator i; if( close_on_delete && im ) { if( im_close( im ) ) verror(); im = 0; } // remove any refs we have ... may trigger other destructs in turn for( i = orefs.begin(); i != orefs.end(); i++ ) (*i)->removeref(); #ifdef DEBUG all_refblock.remove( this ); #endif /*DEBUG*/ } // Remove a ref void VImage::refblock::removeref() throw( VError ) { nrefs--; if( nrefs < 0 ) verror( "too many closes!" ); if( nrefs == 0 ) delete this; } // Init with name ... mode defaults to "rd" VImage::VImage( const char *name, const char *mode ) throw( VError ) { _ref = new refblock; if( !(_ref->im = im_open( name, mode )) ) verror(); _ref->close_on_delete = 1; #ifdef DEBUG printf( "VImage::VImage( \"%s\", \"%s\" )\n", name, mode ); _ref->debug_print(); #endif /*DEBUG*/ } // Build a VImage from an VipsImage structure VImage::VImage( _VipsImage *in ) { _ref = new refblock; _ref->im = in; _ref->close_on_delete = 0; #ifdef DEBUG printf( "VImage::VImage( VipsImage* %p )\n", in ); _ref->debug_print(); #endif /*DEBUG*/ } // Build from memory buffer VImage::VImage( void *buffer, int width, int height, int bands, TBandFmt format ) throw( VError ) { _ref = new refblock; if( !(_ref->im = im_image( buffer, width, height, bands, VipsBandFmt( format ) )) ) verror(); _ref->close_on_delete = 1; #ifdef DEBUG printf( "VImage::VImage( void* %p, %d, %d )\n", buffer, width, height ); _ref->debug_print(); #endif /*DEBUG*/ } // Empty init ... means open intermediate VImage::VImage() throw( VError ) { static int id = 0; char filename[256]; _ref = new refblock; /* This is not 100% safe if VIPS threading is not implemented on this * platform ... but it doesn't really matter. */ g_mutex_lock( im__global_lock ); im_snprintf( filename, 256, "intermediate image #%d", id++ ); g_mutex_unlock( im__global_lock ); if( !(_ref->im = im_open( filename, "p" )) ) verror(); _ref->close_on_delete = 1; #ifdef DEBUG printf( "VImage::VImage()\n" ); _ref->debug_print(); #endif /*DEBUG*/ } // Copy constructor VImage::VImage( const VImage &a ) { _ref = a._ref; _ref->nrefs++; } // Assignment VImage &VImage::operator=( const VImage &a ) throw( VError ) { _ref->removeref(); _ref = a._ref; _ref->nrefs++; return( *this ); } // Extract underlying data pointer void *VImage::data() const throw( VError ) { if( im_incheck( _ref->im ) ) verror(); return( (void *) _ref->im->data ); } void VImage::debug_print() { im_printdesc( image() ); } // Like jpeg2vips, but convert to a disc file rather than to memory // We can handle huge files without running out of RAM VImage VImage::convert2disc( const char* convert, const char* in, const char* disc ) throw( VError ) { VImage out( disc, "w" ); Vargv _vec( convert ); _vec.data(0) = (im_object) in; _vec.data(1) = out.image(); _vec.call(); return( out ); } // Write this to a VImage VImage VImage::write( VImage out ) throw( VError ) { if( im_copy( _ref->im, out._ref->im ) ) verror(); out._ref->addref( _ref ); return( out ); } VImage VImage::write( const char *name ) throw( VError ) { VImage out( name, "w" ); if( im_copy( _ref->im, out._ref->im ) ) verror(); out._ref->addref( _ref ); return( out ); } VImage VImage::write() throw( VError ) { VImage out( "VImage:w1", "t" ); if( im_copy( _ref->im, out._ref->im ) ) verror(); out._ref->addref( _ref ); return( out ); } // Projection functions to get header fields int VImage::Xsize() { return( _ref->im->Xsize ); } int VImage::Ysize() { return( _ref->im->Ysize ); } int VImage::Bands() { return( _ref->im->Bands ); } VImage::TBandFmt VImage::BandFmt() { return( (TBandFmt) _ref->im->BandFmt ); } VImage::TCoding VImage::Coding() { return( (TCoding) _ref->im->Coding ); } VImage::TType VImage::Type() { return( (TType) _ref->im->Type ); } float VImage::Xres() { return( _ref->im->Xres ); } float VImage::Yres() { return( _ref->im->Yres ); } int VImage::Length() { return( _ref->im->Length ); } VImage::TCompression VImage::Compression() { return( (TCompression) _ref->im->Compression ); } short VImage::Level() { return( _ref->im->Level ); } int VImage::Xoffset() { return( _ref->im->Xoffset ); } int VImage::Yoffset() { return( _ref->im->Yoffset ); } // Derived fields const char *VImage::filename() { return( _ref->im->filename ); } const char *VImage::Hist() { return( im_history_get( _ref->im ) ); } // metadata // base functionality void VImage::meta_set( const char *field, GValue *value ) throw( VError ) { if( im_meta_set( _ref->im, field, value ) ) verror(); } gboolean VImage::meta_remove( const char *field ) { return( im_meta_remove( _ref->im, field ) ); } void VImage::meta_get( const char *field, GValue *value_copy ) throw( VError ) { if( im_meta_get( _ref->im, field, value_copy ) ) verror(); } GType VImage::meta_get_typeof( const char *field ) { return( im_meta_get_typeof( _ref->im, field ) ); } // convenience functions int VImage::meta_get_int( const char *field ) throw( VError ) { int result; if( im_meta_get_int( _ref->im, field, &result ) ) verror(); return( result ); } double VImage::meta_get_double( const char *field ) throw( VError ) { double result; if( im_meta_get_double( _ref->im, field, &result ) ) verror(); return( result ); } const char *VImage::meta_get_string( const char *field ) throw( VError ) { const char *result; if( im_meta_get_string( _ref->im, field, &result ) ) verror(); return( result ); } void *VImage::meta_get_area( const char *field ) throw( VError ) { void *result; if( im_meta_get_area( _ref->im, field, &result ) ) verror(); return( result ); } void *VImage::meta_get_blob( const char *field, size_t *length ) throw( VError ) { void *result; if( im_meta_get_blob( _ref->im, field, &result, length ) ) verror(); return( result ); } void VImage::meta_set( const char *field, int value ) throw( VError ) { if( im_meta_set_int( _ref->im, field, value ) ) verror(); } void VImage::meta_set( const char *field, double value ) throw( VError ) { if( im_meta_set_double( _ref->im, field, value ) ) verror(); } void VImage::meta_set( const char *field, const char *value ) throw( VError ) { if( im_meta_set_string( _ref->im, field, value ) ) verror(); } void VImage::meta_set( const char *field, VCallback free_fn, void *value ) throw( VError ) { if( im_meta_set_area( _ref->im, field, free_fn, value ) ) verror(); } void VImage::meta_set( const char *field, VCallback free_fn, void *value, size_t length ) throw( VError ) { if( im_meta_set_blob( _ref->im, field, free_fn, value, length ) ) verror(); } // Set header fields and setbuf() in one go. void VImage::initdesc( int x, int y, int b, TBandFmt f, TCoding c, TType t, float xr, float yr, int xo, int yo ) throw( VError ) { im_initdesc( _ref->im, x, y, b, 0, VipsBandFmt( f ), VipsCoding( c ), VipsType( t ), xr, yr, xo, yo ); if( im_setupout( _ref->im ) ) verror(); } // Create a Vargv from a name Vargv::Vargv( const char *name ) { im_function *f = im_find_function( (char *) name ); if( !f ) verror(); fn = (im__function *) f; base = new im_object[f->argc]; if( im_allocate_vargv( f, base ) ) { delete[] base; verror(); } } // Destroy a Vargv Vargv::~Vargv() { im_function *f = (im_function *) fn; // free any memory allocated for input vectors // this is the stuff allocated in each function during _object* build, // see vipsc++.cc for( int i = 0; i < f->argc; i++ ) { im_type_desc *ty = f->argv[i].desc; if( !(ty->flags & IM_TYPE_OUTPUT) ) { if( strcmp( ty->type, IM_TYPE_IMAGEVEC ) == 0 || strcmp( ty->type, IM_TYPE_DOUBLEVEC ) == 0 || strcmp( ty->type, IM_TYPE_INTVEC ) == 0 ) { // will work for doublevec and intvec too im_imagevec_object *io = (im_imagevec_object *) base[i]; if( io->vec ) { delete[] io->vec; io->vec = NULL; } } else if( strcmp( ty->type, IM_TYPE_INTERPOLATE ) == 0 ) g_object_unref( base[i] ); } } im_free_vargv( f, base ); delete[] base; } // Call the function void Vargv::call() { im_function *f = (im_function *) fn; if( f->disp( base ) ) verror(); } /* Insert automatically generated wrappers for VIPS image processing * functions. */ #include "vipsc++.cc" VIPS_NAMESPACE_END vips-7.38.5/libvipsCC/VDisplay.cc0000644000175000017500000000545112303140253013436 00000000000000// Object part of VDisplay class /* Copyright (C) 1991-2001 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #ifdef WITH_DMALLOC #include #endif /*WITH_DMALLOC*/ VIPS_NAMESPACE_START /* Refcounting stuff first. */ // Free an im_col_display static void free_display( im_col_display *d ) { } // Dupe an im_col_display static im_col_display * dup_display( im_col_display *in ) throw( VError ) { return( in ); } // Remove lut void VDisplay::refblock::cleanlut() { if( luts ) { im_free( luts ); luts = 0; } } // Remove attached things void VDisplay::refblock::cleanref() { if( disp && priv ) { free_display( disp ); disp = 0; priv = 0; } cleanlut(); } // Get ready to write to disp void VDisplay::refblock::wready() throw( VError ) { cleanlut(); if( !priv ) { disp = dup_display( disp ); priv = 1; } } // Check that luts are up-to-date void VDisplay::refblock::cluts() throw( VError ) { } VDisplay::~VDisplay() { ref->nrefs--; if( !ref->nrefs ) delete ref; } VDisplay &VDisplay::operator=( const VDisplay &a ) { ref->nrefs--; if( ref->nrefs > 0 ) // Need fresh ref = new refblock; else // Recycle old ref->cleanref(); ref = a.ref; ref->nrefs++; return( *this ); } VDisplay::VDisplay( const char *name ) throw( VError ) { // Install display ref = new refblock; ref->disp = NULL; } VDisplay::VDisplay() { // Just use sRGB ref = new refblock; ref->disp = im_col_displays( 7 ); } /* Setters and getters. We used to have a lot of code of the form: float &VDisplay::YCW() { ref->wready(); return( ((im_col_display*)ref->disp)->d_YCW ); } This should be split to separate setters/getters so we can exploit const. Too annoying to do this on such a useless class (I'm certain no one used these functions anyway), fix in vips8. */ VIPS_NAMESPACE_END vips-7.38.5/libvipsCC/vipsc++.cc0000644000175000017500000041010212303140253013146 00000000000000 // bodies for package arithmetic // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_abs: absolute value VImage VImage::abs() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_abs" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_acostra: acos of image (result in degrees) VImage VImage::acos() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_acostra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_add: add two images VImage VImage::add( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_add" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_asintra: asin of image (result in degrees) VImage VImage::asin() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_asintra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_atantra: atan of image (result in degrees) VImage VImage::atan() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_atantra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_avg: average value of image double VImage::avg() throw( VError ) { VImage in = *this; double value; Vargv _vec( "im_avg" ); _vec.data(0) = in.image(); _vec.call(); value = *((double*)_vec.data(1)); return( value ); } // im_point: interpolate value at single point double VImage::point( char* interpolate, double x, double y, int band ) throw( VError ) { VImage in = *this; double out; Vargv _vec( "im_point" ); _vec.data(0) = in.image(); if( vips__input_interpolate_init( &_vec.data(1), interpolate ) ) verror(); *((double*) _vec.data(2)) = x; *((double*) _vec.data(3)) = y; *((int*) _vec.data(4)) = band; _vec.call(); out = *((double*)_vec.data(5)); return( out ); } // im_point_bilinear: interpolate value at single point, linearly double VImage::point_bilinear( double x, double y, int band ) throw( VError ) { VImage in = *this; double val; Vargv _vec( "im_point_bilinear" ); _vec.data(0) = in.image(); *((double*) _vec.data(1)) = x; *((double*) _vec.data(2)) = y; *((int*) _vec.data(3)) = band; _vec.call(); val = *((double*)_vec.data(4)); return( val ); } // im_bandmean: average image bands VImage VImage::bandmean() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_bandmean" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_ceil: round to smallest integer value not less than VImage VImage::ceil() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_ceil" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_costra: cos of image (angles in degrees) VImage VImage::cos() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_costra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_cross_phase: phase of cross power spectrum of two complex images VImage VImage::cross_phase( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_cross_phase" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_deviate: standard deviation of image double VImage::deviate() throw( VError ) { VImage in = *this; double value; Vargv _vec( "im_deviate" ); _vec.data(0) = in.image(); _vec.call(); value = *((double*)_vec.data(1)); return( value ); } // im_divide: divide two images VImage VImage::divide( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_divide" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_exp10tra: 10^pel of image VImage VImage::exp10() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_exp10tra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_expntra: x^pel of image VImage VImage::expn( double x ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_expntra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = x; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_expntra_vec: [x,y,z]^pel of image VImage VImage::expn( std::vector v ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_expntra_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = v.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[v.size()]; for( unsigned int i = 0; i < v.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = v[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_exptra: e^pel of image VImage VImage::exp() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_exptra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_floor: round to largest integer value not greater than VImage VImage::floor() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_floor" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_invert: photographic negative VImage VImage::invert() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_invert" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_lintra: calculate a*in + b = outfile VImage VImage::lin( double a, double b ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_lintra" ); *((double*) _vec.data(0)) = a; _vec.data(1) = in.image(); *((double*) _vec.data(2)) = b; _vec.data(3) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_linreg: pixelwise linear regression VImage VImage::linreg( std::vector ins, std::vector xs ) throw( VError ) { VImage out; Vargv _vec( "im_linreg" ); ((im_imagevec_object*) _vec.data(0))->n = ins.size(); ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[ins.size()]; for( unsigned int i = 0; i < ins.size(); i++ ) ((im_imagevec_object*) _vec.data(0))->vec[i] = ins[i].image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = xs.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[xs.size()]; for( unsigned int i = 0; i < xs.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = xs[i]; _vec.call(); for( unsigned int i = 0; i < ins.size(); i++ ) out._ref->addref( ins[i]._ref ); return( out ); } // im_lintra_vec: calculate a*in + b -> out, a and b vectors VImage VImage::lin( std::vector a, std::vector b ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_lintra_vec" ); ((im_doublevec_object*) _vec.data(0))->n = a.size(); ((im_doublevec_object*) _vec.data(0))->vec = new double[a.size()]; for( unsigned int i = 0; i < a.size(); i++ ) ((im_doublevec_object*) _vec.data(0))->vec[i] = a[i]; _vec.data(1) = in.image(); ((im_doublevec_object*) _vec.data(2))->n = b.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[b.size()]; for( unsigned int i = 0; i < b.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = b[i]; _vec.data(3) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_log10tra: log10 of image VImage VImage::log10() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_log10tra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_logtra: ln of image VImage VImage::log() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_logtra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_max: maximum value of image double VImage::max() throw( VError ) { VImage in = *this; double value; Vargv _vec( "im_max" ); _vec.data(0) = in.image(); _vec.call(); value = *((double*)_vec.data(1)); return( value ); } // im_maxpos: position of maximum value of image std::complex VImage::maxpos() throw( VError ) { VImage in = *this; std::complex position; Vargv _vec( "im_maxpos" ); _vec.data(0) = in.image(); _vec.call(); position = *((std::complex*)_vec.data(1)); return( position ); } // im_maxpos_avg: position of maximum value of image, averaging in case of draw double VImage::maxpos_avg( double& y, double& out ) throw( VError ) { VImage in = *this; double x; Vargv _vec( "im_maxpos_avg" ); _vec.data(0) = in.image(); _vec.call(); x = *((double*)_vec.data(1)); y = *((double*)_vec.data(2)); out = *((double*)_vec.data(3)); return( x ); } // im_measure: measure averages of a grid of patches VDMask VImage::measure( int x, int y, int w, int h, int h_patches, int v_patches ) throw( VError ) { VImage in = *this; VDMask mask; Vargv _vec( "im_measure" ); _vec.data(0) = in.image(); ((im_mask_object*) _vec.data(1))->name = (char*)"noname"; *((int*) _vec.data(2)) = x; *((int*) _vec.data(3)) = y; *((int*) _vec.data(4)) = w; *((int*) _vec.data(5)) = h; *((int*) _vec.data(6)) = h_patches; *((int*) _vec.data(7)) = v_patches; _vec.call(); mask.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask ); return( mask ); } // im_min: minimum value of image double VImage::min() throw( VError ) { VImage in = *this; double value; Vargv _vec( "im_min" ); _vec.data(0) = in.image(); _vec.call(); value = *((double*)_vec.data(1)); return( value ); } // im_minpos: position of minimum value of image std::complex VImage::minpos() throw( VError ) { VImage in = *this; std::complex position; Vargv _vec( "im_minpos" ); _vec.data(0) = in.image(); _vec.call(); position = *((std::complex*)_vec.data(1)); return( position ); } // im_multiply: multiply two images VImage VImage::multiply( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_multiply" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_powtra: pel^x of image VImage VImage::pow( double x ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_powtra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = x; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_powtra_vec: pel^[x,y,z] of image VImage VImage::pow( std::vector v ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_powtra_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = v.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[v.size()]; for( unsigned int i = 0; i < v.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = v[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_recomb: linear recombination with mask VImage VImage::recomb( VDMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_recomb" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_remainder: remainder after integer division VImage VImage::remainder( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_remainder" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_remainderconst: remainder after integer division by a constant VImage VImage::remainder( double x ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_remainderconst" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = x; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_remainder_vec: remainder after integer division by a vector of constants VImage VImage::remainder( std::vector x ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_remainder_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = x.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[x.size()]; for( unsigned int i = 0; i < x.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = x[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_rint: round to nearest integer value VImage VImage::rint() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rint" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_sign: unit vector in direction of value VImage VImage::sign() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_sign" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_sintra: sin of image (angles in degrees) VImage VImage::sin() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_sintra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_stats: many image statistics in one pass VDMask VImage::stats() throw( VError ) { VImage in = *this; VDMask statistics; Vargv _vec( "im_stats" ); _vec.data(0) = in.image(); ((im_mask_object*) _vec.data(1))->name = (char*)"noname"; _vec.call(); statistics.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask ); return( statistics ); } // im_subtract: subtract two images VImage VImage::subtract( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_subtract" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_tantra: tan of image (angles in degrees) VImage VImage::tan() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_tantra" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // bodies for package cimg // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_greyc: noise-removing filter VImage VImage::greyc( int iterations, double amplitude, double sharpness, double anisotropy, double alpha, double sigma, double dl, double da, double gauss_prec, int interpolation, int fast_approx ) throw( VError ) { VImage src = *this; VImage dst; Vargv _vec( "im_greyc" ); _vec.data(0) = src.image(); _vec.data(1) = dst.image(); *((int*) _vec.data(2)) = iterations; *((double*) _vec.data(3)) = amplitude; *((double*) _vec.data(4)) = sharpness; *((double*) _vec.data(5)) = anisotropy; *((double*) _vec.data(6)) = alpha; *((double*) _vec.data(7)) = sigma; *((double*) _vec.data(8)) = dl; *((double*) _vec.data(9)) = da; *((double*) _vec.data(10)) = gauss_prec; *((int*) _vec.data(11)) = interpolation; *((int*) _vec.data(12)) = fast_approx; _vec.call(); dst._ref->addref( src._ref ); return( dst ); } // im_greyc_mask: noise-removing filter, with a mask VImage VImage::greyc_mask( VImage mask, int iterations, double amplitude, double sharpness, double anisotropy, double alpha, double sigma, double dl, double da, double gauss_prec, int interpolation, int fast_approx ) throw( VError ) { VImage src = *this; VImage dst; Vargv _vec( "im_greyc_mask" ); _vec.data(0) = src.image(); _vec.data(1) = dst.image(); _vec.data(2) = mask.image(); *((int*) _vec.data(3)) = iterations; *((double*) _vec.data(4)) = amplitude; *((double*) _vec.data(5)) = sharpness; *((double*) _vec.data(6)) = anisotropy; *((double*) _vec.data(7)) = alpha; *((double*) _vec.data(8)) = sigma; *((double*) _vec.data(9)) = dl; *((double*) _vec.data(10)) = da; *((double*) _vec.data(11)) = gauss_prec; *((int*) _vec.data(12)) = interpolation; *((int*) _vec.data(13)) = fast_approx; _vec.call(); dst._ref->addref( src._ref ); dst._ref->addref( mask._ref ); return( dst ); } // bodies for package colour // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_LCh2Lab: convert LCh to Lab VImage VImage::LCh2Lab() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_LCh2Lab" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_LCh2UCS: convert LCh to UCS VImage VImage::LCh2UCS() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_LCh2UCS" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_Lab2LCh: convert Lab to LCh VImage VImage::Lab2LCh() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_Lab2LCh" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_Lab2LabQ: convert Lab to LabQ VImage VImage::Lab2LabQ() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_Lab2LabQ" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_Lab2LabS: convert Lab to LabS VImage VImage::Lab2LabS() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_Lab2LabS" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_Lab2UCS: convert Lab to UCS VImage VImage::Lab2UCS() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_Lab2UCS" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_Lab2XYZ: convert D65 Lab to XYZ VImage VImage::Lab2XYZ() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_Lab2XYZ" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_Lab2XYZ_temp: convert Lab to XYZ, with a specified colour temperature VImage VImage::Lab2XYZ_temp( double X0, double Y0, double Z0 ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_Lab2XYZ_temp" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = X0; *((double*) _vec.data(3)) = Y0; *((double*) _vec.data(4)) = Z0; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_Lab2disp: convert Lab to displayable VImage VImage::Lab2disp( VDisplay disp ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_Lab2disp" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = disp.disp(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_LabQ2LabS: convert LabQ to LabS VImage VImage::LabQ2LabS() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_LabQ2LabS" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_LabQ2Lab: convert LabQ to Lab VImage VImage::LabQ2Lab() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_LabQ2Lab" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_LabQ2XYZ: convert LabQ to XYZ VImage VImage::LabQ2XYZ() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_LabQ2XYZ" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_LabQ2disp: convert LabQ to displayable VImage VImage::LabQ2disp( VDisplay disp ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_LabQ2disp" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = disp.disp(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_LabS2LabQ: convert LabS to LabQ VImage VImage::LabS2LabQ() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_LabS2LabQ" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_LabS2Lab: convert LabS to Lab VImage VImage::LabS2Lab() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_LabS2Lab" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_UCS2LCh: convert UCS to LCh VImage VImage::UCS2LCh() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_UCS2LCh" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_UCS2Lab: convert UCS to Lab VImage VImage::UCS2Lab() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_UCS2Lab" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_UCS2XYZ: convert UCS to XYZ VImage VImage::UCS2XYZ() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_UCS2XYZ" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_XYZ2Lab: convert D65 XYZ to Lab VImage VImage::XYZ2Lab() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_XYZ2Lab" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_XYZ2Lab_temp: convert XYZ to Lab, with a specified colour temperature VImage VImage::XYZ2Lab_temp( double X0, double Y0, double Z0 ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_XYZ2Lab_temp" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = X0; *((double*) _vec.data(3)) = Y0; *((double*) _vec.data(4)) = Z0; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_XYZ2UCS: convert XYZ to UCS VImage VImage::XYZ2UCS() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_XYZ2UCS" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_XYZ2Yxy: convert XYZ to Yxy VImage VImage::XYZ2Yxy() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_XYZ2Yxy" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_XYZ2disp: convert XYZ to displayble VImage VImage::XYZ2disp( VDisplay disp ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_XYZ2disp" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = disp.disp(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_XYZ2sRGB: convert XYZ to sRGB VImage VImage::XYZ2sRGB() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_XYZ2sRGB" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_Yxy2XYZ: convert Yxy to XYZ VImage VImage::Yxy2XYZ() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_Yxy2XYZ" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_dE00_fromLab: calculate delta-E CIE2000 for two Lab images VImage VImage::dE00_fromLab( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_dE00_fromLab" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_dECMC_fromLab: calculate delta-E CMC(1:1) for two Lab images VImage VImage::dECMC_fromLab( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_dECMC_fromLab" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_dECMC_fromdisp: calculate delta-E CMC(1:1) for two displayable images VImage VImage::dECMC_fromdisp( VImage in2, VDisplay disp ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_dECMC_fromdisp" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.data(3) = disp.disp(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_dE_fromLab: calculate delta-E for two Lab images VImage VImage::dE_fromLab( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_dE_fromLab" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_dE_fromXYZ: calculate delta-E for two XYZ images VImage VImage::dE_fromXYZ( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_dE_fromXYZ" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_dE_fromdisp: calculate delta-E for two displayable images VImage VImage::dE_fromdisp( VImage in2, VDisplay disp ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_dE_fromdisp" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.data(3) = disp.disp(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_disp2Lab: convert displayable to Lab VImage VImage::disp2Lab( VDisplay disp ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_disp2Lab" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = disp.disp(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_disp2XYZ: convert displayable to XYZ VImage VImage::disp2XYZ( VDisplay disp ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_disp2XYZ" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = disp.disp(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_float2rad: convert float to Radiance packed VImage VImage::float2rad() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_float2rad" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_icc_ac2rc: convert LAB from AC to RC using an ICC profile VImage VImage::icc_ac2rc( char* profile ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_icc_ac2rc" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = (im_object) profile; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_icc_export_depth: convert a float LAB to device space with an ICC profile VImage VImage::icc_export_depth( int depth, char* output_profile, int intent ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_icc_export_depth" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = depth; _vec.data(3) = (im_object) output_profile; *((int*) _vec.data(4)) = intent; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_icc_import: convert a device image to float LAB with an ICC profile VImage VImage::icc_import( char* input_profile, int intent ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_icc_import" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = (im_object) input_profile; *((int*) _vec.data(3)) = intent; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_icc_import_embedded: convert a device image to float LAB using the embedded profile VImage VImage::icc_import_embedded( int intent ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_icc_import_embedded" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = intent; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_icc_transform: convert between two device images with a pair of ICC profiles VImage VImage::icc_transform( char* input_profile, char* output_profile, int intent ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_icc_transform" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = (im_object) input_profile; _vec.data(3) = (im_object) output_profile; *((int*) _vec.data(4)) = intent; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_lab_morph: morph colourspace of a LAB image VImage VImage::lab_morph( VDMask greyscale, double L_offset, double L_scale, double a_scale, double b_scale ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_lab_morph" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = greyscale.mask().dptr; *((double*) _vec.data(3)) = L_offset; *((double*) _vec.data(4)) = L_scale; *((double*) _vec.data(5)) = a_scale; *((double*) _vec.data(6)) = b_scale; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_rad2float: convert Radiance packed to float VImage VImage::rad2float() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rad2float" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_sRGB2XYZ: convert sRGB to XYZ VImage VImage::sRGB2XYZ() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_sRGB2XYZ" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // bodies for package conversion // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_gaussnoise: generate image of gaussian noise with specified statistics VImage VImage::gaussnoise( int xsize, int ysize, double mean, double sigma ) throw( VError ) { VImage out; Vargv _vec( "im_gaussnoise" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = xsize; *((int*) _vec.data(2)) = ysize; *((double*) _vec.data(3)) = mean; *((double*) _vec.data(4)) = sigma; _vec.call(); return( out ); } // im_bandjoin: bandwise join of two images VImage VImage::bandjoin( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_bandjoin" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_black: generate black image VImage VImage::black( int x_size, int y_size, int bands ) throw( VError ) { VImage output; Vargv _vec( "im_black" ); _vec.data(0) = output.image(); *((int*) _vec.data(1)) = x_size; *((int*) _vec.data(2)) = y_size; *((int*) _vec.data(3)) = bands; _vec.call(); return( output ); } // im_c2amph: convert real and imaginary to phase and amplitude VImage VImage::c2amph() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_c2amph" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_c2imag: extract imaginary part of complex image VImage VImage::c2imag() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_c2imag" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_c2real: extract real part of complex image VImage VImage::c2real() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_c2real" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_c2rect: convert phase and amplitude to real and imaginary VImage VImage::c2rect() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_c2rect" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2fmt: convert image format to ofmt VImage VImage::clip2fmt( int ofmt ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2fmt" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = ofmt; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_copy: copy image VImage VImage::copy() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_copy" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_copy_file: copy image to a file and return that VImage VImage::copy_file() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_copy_file" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_copy_morph: copy image, setting pixel layout VImage VImage::copy_morph( int Bands, int BandFmt, int Coding ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_copy_morph" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = Bands; *((int*) _vec.data(3)) = BandFmt; *((int*) _vec.data(4)) = Coding; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_copy_swap: copy image, swapping byte order VImage VImage::copy_swap() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_copy_swap" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_copy_set: copy image, setting informational fields VImage VImage::copy_set( int Type, double Xres, double Yres, int Xoffset, int Yoffset ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_copy_set" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = Type; *((double*) _vec.data(3)) = Xres; *((double*) _vec.data(4)) = Yres; *((int*) _vec.data(5)) = Xoffset; *((int*) _vec.data(6)) = Yoffset; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_extract_area: extract area VImage VImage::extract_area( int left, int top, int width, int height ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_extract_area" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = left; *((int*) _vec.data(3)) = top; *((int*) _vec.data(4)) = width; *((int*) _vec.data(5)) = height; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_extract_areabands: extract area and bands VImage VImage::extract_areabands( int left, int top, int width, int height, int band, int nbands ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_extract_areabands" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = left; *((int*) _vec.data(3)) = top; *((int*) _vec.data(4)) = width; *((int*) _vec.data(5)) = height; *((int*) _vec.data(6)) = band; *((int*) _vec.data(7)) = nbands; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_extract_band: extract band VImage VImage::extract_band( int band ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_extract_band" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = band; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_extract_bands: extract several bands VImage VImage::extract_bands( int band, int nbands ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_extract_bands" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = band; *((int*) _vec.data(3)) = nbands; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_extract: extract area/band VImage VImage::extract( int left, int top, int width, int height, int band ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_extract" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = left; *((int*) _vec.data(3)) = top; *((int*) _vec.data(4)) = width; *((int*) _vec.data(5)) = height; *((int*) _vec.data(6)) = band; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_falsecolour: turn luminance changes into chrominance changes VImage VImage::falsecolour() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_falsecolour" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_fliphor: flip image left-right VImage VImage::fliphor() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_fliphor" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_flipver: flip image top-bottom VImage VImage::flipver() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_flipver" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_gbandjoin: bandwise join of many images VImage VImage::gbandjoin( std::vector in ) throw( VError ) { VImage out; Vargv _vec( "im_gbandjoin" ); ((im_imagevec_object*) _vec.data(0))->n = in.size(); ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()]; for( unsigned int i = 0; i < in.size(); i++ ) ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image(); _vec.data(1) = out.image(); _vec.call(); for( unsigned int i = 0; i < in.size(); i++ ) out._ref->addref( in[i]._ref ); return( out ); } // im_grid: chop a tall thin image into a grid of images VImage VImage::grid( int tile_height, int across, int down ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_grid" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = tile_height; *((int*) _vec.data(3)) = across; *((int*) _vec.data(4)) = down; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_insert: insert sub-image into main image at position VImage VImage::insert( VImage sub, int x, int y ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_insert" ); _vec.data(0) = in.image(); _vec.data(1) = sub.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = x; *((int*) _vec.data(4)) = y; _vec.call(); out._ref->addref( in._ref ); out._ref->addref( sub._ref ); return( out ); } // im_insertset: insert sub into main at every position in x, y VImage VImage::insert( VImage sub, std::vector x, std::vector y ) throw( VError ) { VImage main = *this; VImage out; Vargv _vec( "im_insertset" ); _vec.data(0) = main.image(); _vec.data(1) = sub.image(); _vec.data(2) = out.image(); ((im_intvec_object*) _vec.data(3))->n = x.size(); ((im_intvec_object*) _vec.data(3))->vec = new int[x.size()]; for( unsigned int i = 0; i < x.size(); i++ ) ((im_intvec_object*) _vec.data(3))->vec[i] = x[i]; ((im_intvec_object*) _vec.data(4))->n = y.size(); ((im_intvec_object*) _vec.data(4))->vec = new int[y.size()]; for( unsigned int i = 0; i < y.size(); i++ ) ((im_intvec_object*) _vec.data(4))->vec[i] = y[i]; _vec.call(); return( out ); } // im_insert_noexpand: insert sub-image into main image at position, no expansion VImage VImage::insert_noexpand( VImage sub, int x, int y ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_insert_noexpand" ); _vec.data(0) = in.image(); _vec.data(1) = sub.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = x; *((int*) _vec.data(4)) = y; _vec.call(); out._ref->addref( in._ref ); out._ref->addref( sub._ref ); return( out ); } // im_embed: embed in within a set of borders VImage VImage::embed( int type, int x, int y, int width, int height ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_embed" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = type; *((int*) _vec.data(3)) = x; *((int*) _vec.data(4)) = y; *((int*) _vec.data(5)) = width; *((int*) _vec.data(6)) = height; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_lrjoin: join two images left-right VImage VImage::lrjoin( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_lrjoin" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_msb: convert to uchar by discarding bits VImage VImage::msb() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_msb" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_msb_band: convert to single band uchar by discarding bits VImage VImage::msb_band( int band ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_msb_band" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = band; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_replicate: replicate an image horizontally and vertically VImage VImage::replicate( int across, int down ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_replicate" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = across; *((int*) _vec.data(3)) = down; _vec.call(); output._ref->addref( input._ref ); return( output ); } // im_ri2c: join two non-complex images to form complex VImage VImage::ri2c( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_ri2c" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_rot180: rotate image 180 degrees VImage VImage::rot180() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rot180" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_rot270: rotate image 270 degrees clockwise VImage VImage::rot270() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rot270" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_rot90: rotate image 90 degrees clockwise VImage VImage::rot90() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rot90" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_scale: scale image linearly to fit range 0-255 VImage VImage::scale() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_scale" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_scaleps: logarithmic scale of image to fit range 0-255 VImage VImage::scaleps() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_scaleps" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_subsample: subsample image by integer factors VImage VImage::subsample( int xshrink, int yshrink ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_subsample" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = xshrink; *((int*) _vec.data(3)) = yshrink; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_system: run command on image char* VImage::system( char* command ) throw( VError ) { VImage im = *this; char* output; Vargv _vec( "im_system" ); _vec.data(0) = im.image(); _vec.data(1) = (im_object) command; _vec.call(); output = (char*) _vec.data(2); return( output ); } // im_system_image: run command on image, with image output VImage VImage::system_image( char* in_format, char* out_format, char* command, char*& log ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_system_image" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = (im_object) in_format; _vec.data(3) = (im_object) out_format; _vec.data(4) = (im_object) command; _vec.call(); log = (char*) _vec.data(5); return( out ); } // im_tbjoin: join two images top-bottom VImage VImage::tbjoin( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_tbjoin" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_text: generate text image VImage VImage::text( char* text, char* font, int width, int alignment, int dpi ) throw( VError ) { VImage out; Vargv _vec( "im_text" ); _vec.data(0) = out.image(); _vec.data(1) = (im_object) text; _vec.data(2) = (im_object) font; *((int*) _vec.data(3)) = width; *((int*) _vec.data(4)) = alignment; *((int*) _vec.data(5)) = dpi; _vec.call(); return( out ); } // im_wrap: shift image origin, wrapping at sides VImage VImage::wrap( int x, int y ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_wrap" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = x; *((int*) _vec.data(3)) = y; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_zoom: simple zoom of an image by integer factors VImage VImage::zoom( int xfac, int yfac ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_zoom" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((int*) _vec.data(2)) = xfac; *((int*) _vec.data(3)) = yfac; _vec.call(); output._ref->addref( input._ref ); return( output ); } // bodies for package convolution // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_aconvsep: approximate separable convolution VImage VImage::aconvsep( VDMask matrix, int n_layers ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_aconvsep" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; *((int*) _vec.data(3)) = n_layers; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_aconv: approximate convolution VImage VImage::aconv( VDMask matrix, int n_layers, int cluster ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_aconv" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; *((int*) _vec.data(3)) = n_layers; *((int*) _vec.data(4)) = cluster; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_addgnoise: add gaussian noise with mean 0 and std. dev. sigma VImage VImage::addgnoise( double sigma ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_addgnoise" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = sigma; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_compass: convolve with 8-way rotating integer mask VImage VImage::compass( VIMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_compass" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_contrast_surface: find high-contrast points in an image VImage VImage::contrast_surface( int half_win_size, int spacing ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_contrast_surface" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = half_win_size; *((int*) _vec.data(3)) = spacing; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_conv: convolve VImage VImage::conv( VIMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_conv" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_conv_f: convolve, with DOUBLEMASK VImage VImage::conv( VDMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_conv_f" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_convsep: seperable convolution VImage VImage::convsep( VIMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_convsep" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_convsep_f: seperable convolution, with DOUBLEMASK VImage VImage::convsep( VDMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_convsep_f" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_fastcor: fast correlate in2 within in1 VImage VImage::fastcor( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_fastcor" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_gradcor: non-normalised correlation of gradient of in2 within in1 VImage VImage::gradcor( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_gradcor" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_gradient: convolve with 2-way rotating mask VImage VImage::gradient( VIMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_gradient" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_grad_x: horizontal difference image VImage VImage::grad_x() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_grad_x" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_grad_y: vertical difference image VImage VImage::grad_y() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_grad_y" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_lindetect: convolve with 4-way rotating mask VImage VImage::lindetect( VIMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_lindetect" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_sharpen: sharpen high frequencies of L channel of LabQ VImage VImage::sharpen( int mask_size, double x1, double y2, double y3, double m1, double m2 ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_sharpen" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = mask_size; *((double*) _vec.data(3)) = x1; *((double*) _vec.data(4)) = y2; *((double*) _vec.data(5)) = y3; *((double*) _vec.data(6)) = m1; *((double*) _vec.data(7)) = m2; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_spcor: normalised correlation of in2 within in1 VImage VImage::spcor( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_spcor" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // bodies for package deprecated // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_argb2rgba: convert pre-multipled argb to png-style rgba VImage VImage::argb2rgba() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_argb2rgba" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_flood_copy: flood with ink from start_x, start_y while pixel == start pixel VImage VImage::flood_copy( int start_x, int start_y, std::vector ink ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_flood_copy" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = start_x; *((int*) _vec.data(3)) = start_y; ((im_doublevec_object*) _vec.data(4))->n = ink.size(); ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i]; _vec.call(); return( out ); } // im_flood_blob_copy: flood with ink from start_x, start_y while pixel == start pixel VImage VImage::flood_blob_copy( int start_x, int start_y, std::vector ink ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_flood_blob_copy" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = start_x; *((int*) _vec.data(3)) = start_y; ((im_doublevec_object*) _vec.data(4))->n = ink.size(); ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i]; _vec.call(); return( out ); } // im_flood_other_copy: flood mark with serial from start_x, start_y while pixel == start pixel VImage VImage::flood_other_copy( VImage mark, int start_x, int start_y, int serial ) throw( VError ) { VImage test = *this; VImage out; Vargv _vec( "im_flood_other_copy" ); _vec.data(0) = test.image(); _vec.data(1) = mark.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = start_x; *((int*) _vec.data(4)) = start_y; *((int*) _vec.data(5)) = serial; _vec.call(); return( out ); } // im_clip: convert to unsigned 8-bit integer VImage VImage::clip() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_c2ps: find power spectrum of complex image VImage VImage::c2ps() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_c2ps" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_resize_linear: resize to X by Y pixels with linear interpolation VImage VImage::resize_linear( int X, int Y ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_resize_linear" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = X; *((int*) _vec.data(3)) = Y; _vec.call(); return( out ); } // im_cmulnorm: multiply two complex images, normalising output VImage VImage::cmulnorm( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_cmulnorm" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_fav4: average of 4 images VImage VImage::fav4( VImage in2, VImage in3, VImage in4 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_fav4" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = in3.image(); _vec.data(3) = in4.image(); _vec.data(4) = out.image(); _vec.call(); return( out ); } // im_gadd: calculate a*in1 + b*in2 + c = outfile VImage VImage::gadd( double a, double b, VImage in2, double c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_gadd" ); *((double*) _vec.data(0)) = a; _vec.data(1) = in1.image(); *((double*) _vec.data(2)) = b; _vec.data(3) = in2.image(); *((double*) _vec.data(4)) = c; _vec.data(5) = out.image(); _vec.call(); return( out ); } // im_icc_export: convert a float LAB to an 8-bit device image with an ICC profile VImage VImage::icc_export( char* output_profile, int intent ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_icc_export" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = (im_object) output_profile; *((int*) _vec.data(3)) = intent; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_litecor: calculate max(white)*factor*(in/white), if clip == 1 VImage VImage::litecor( VImage white, int clip, double factor ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_litecor" ); _vec.data(0) = in.image(); _vec.data(1) = white.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = clip; *((double*) _vec.data(4)) = factor; _vec.call(); return( out ); } // im_affine: affine transform VImage VImage::affine( double a, double b, double c, double d, double dx, double dy, int x, int y, int w, int h ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_affine" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = a; *((double*) _vec.data(3)) = b; *((double*) _vec.data(4)) = c; *((double*) _vec.data(5)) = d; *((double*) _vec.data(6)) = dx; *((double*) _vec.data(7)) = dy; *((int*) _vec.data(8)) = x; *((int*) _vec.data(9)) = y; *((int*) _vec.data(10)) = w; *((int*) _vec.data(11)) = h; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2c: convert to signed 8-bit integer VImage VImage::clip2c() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2c" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2cm: convert to complex VImage VImage::clip2cm() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2cm" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2d: convert to double-precision float VImage VImage::clip2d() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2d" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2dcm: convert to double complex VImage VImage::clip2dcm() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2dcm" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2f: convert to single-precision float VImage VImage::clip2f() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2f" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2i: convert to signed 32-bit integer VImage VImage::clip2i() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2i" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_convsub: convolve uchar to uchar, sub-sampling by xskip, yskip VImage VImage::convsub( VIMask matrix, int xskip, int yskip ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_convsub" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr; *((int*) _vec.data(3)) = xskip; *((int*) _vec.data(4)) = yskip; _vec.call(); return( out ); } // im_convf: convolve, with DOUBLEMASK VImage VImage::convf( VDMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_convf" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_convsepf: seperable convolution, with DOUBLEMASK VImage VImage::convsepf( VDMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_convsepf" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2s: convert to signed 16-bit integer VImage VImage::clip2s() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2s" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_clip2ui: convert to unsigned 32-bit integer VImage VImage::clip2ui() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2ui" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_insertplaceset: insert sub into main at every position in x, y VImage VImage::insertplace( VImage sub, std::vector x, std::vector y ) throw( VError ) { VImage main = *this; VImage out; Vargv _vec( "im_insertplaceset" ); _vec.data(0) = main.image(); _vec.data(1) = sub.image(); _vec.data(2) = out.image(); ((im_intvec_object*) _vec.data(3))->n = x.size(); ((im_intvec_object*) _vec.data(3))->vec = new int[x.size()]; for( unsigned int i = 0; i < x.size(); i++ ) ((im_intvec_object*) _vec.data(3))->vec[i] = x[i]; ((im_intvec_object*) _vec.data(4))->n = y.size(); ((im_intvec_object*) _vec.data(4))->vec = new int[y.size()]; for( unsigned int i = 0; i < y.size(); i++ ) ((im_intvec_object*) _vec.data(4))->vec[i] = y[i]; _vec.call(); return( out ); } // im_clip2us: convert to unsigned 16-bit integer VImage VImage::clip2us() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_clip2us" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_slice: slice an image using two thresholds VImage VImage::slice( double thresh1, double thresh2 ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_slice" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((double*) _vec.data(2)) = thresh1; *((double*) _vec.data(3)) = thresh2; _vec.call(); return( output ); } // im_segment: number continuous regions in an image VImage VImage::segment( int& segments ) throw( VError ) { VImage test = *this; VImage mask; Vargv _vec( "im_segment" ); _vec.data(0) = test.image(); _vec.data(1) = mask.image(); _vec.call(); segments = *((int*)_vec.data(2)); return( mask ); } // im_line: draw line between points (x1,y1) and (x2,y2) void VImage::line( int x1, int y1, int x2, int y2, int pelval ) throw( VError ) { VImage im = *this; Vargv _vec( "im_line" ); _vec.data(0) = im.image(); *((int*) _vec.data(1)) = x1; *((int*) _vec.data(2)) = y1; *((int*) _vec.data(3)) = x2; *((int*) _vec.data(4)) = y2; *((int*) _vec.data(5)) = pelval; _vec.call(); } // im_thresh: slice an image at a threshold VImage VImage::thresh( double threshold ) throw( VError ) { VImage input = *this; VImage output; Vargv _vec( "im_thresh" ); _vec.data(0) = input.image(); _vec.data(1) = output.image(); *((double*) _vec.data(2)) = threshold; _vec.call(); return( output ); } // im_convf_raw: convolve, with DOUBLEMASK, no border VImage VImage::convf_raw( VDMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_convf_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_conv_raw: convolve, no border VImage VImage::conv_raw( VIMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_conv_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_contrast_surface_raw: find high-contrast points in an image VImage VImage::contrast_surface_raw( int half_win_size, int spacing ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_contrast_surface_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = half_win_size; *((int*) _vec.data(3)) = spacing; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_convsepf_raw: seperable convolution, with DOUBLEMASK, no border VImage VImage::convsepf_raw( VDMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_convsepf_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().dptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_convsep_raw: seperable convolution, no border VImage VImage::convsep_raw( VIMask matrix ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_convsep_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = matrix.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_fastcor_raw: fast correlate in2 within in1, no border VImage VImage::fastcor_raw( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_fastcor_raw" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_gradcor_raw: non-normalised correlation of gradient of in2 within in1, no padding VImage VImage::gradcor_raw( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_gradcor_raw" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_spcor_raw: normalised correlation of in2 within in1, no black padding VImage VImage::spcor_raw( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_spcor_raw" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_lhisteq_raw: local histogram equalisation, no border VImage VImage::lhisteq_raw( int width, int height ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_lhisteq_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = width; *((int*) _vec.data(3)) = height; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_stdif_raw: statistical differencing, no border VImage VImage::stdif_raw( double a, double m0, double b, double s0, int xw, int yw ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_stdif_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = a; *((double*) _vec.data(3)) = m0; *((double*) _vec.data(4)) = b; *((double*) _vec.data(5)) = s0; *((int*) _vec.data(6)) = xw; *((int*) _vec.data(7)) = yw; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_rank_raw: rank filter nth element of xsize/ysize window, no border VImage VImage::rank_raw( int xsize, int ysize, int n ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rank_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = xsize; *((int*) _vec.data(3)) = ysize; *((int*) _vec.data(4)) = n; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_dilate_raw: dilate image with mask VImage VImage::dilate_raw( VIMask mask ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_dilate_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_erode_raw: erode image with mask VImage VImage::erode_raw( VIMask mask ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_erode_raw" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_similarity_area: output area xywh of similarity transformation VImage VImage::similarity_area( double a, double b, double dx, double dy, int x, int y, int w, int h ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_similarity_area" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = a; *((double*) _vec.data(3)) = b; *((double*) _vec.data(4)) = dx; *((double*) _vec.data(5)) = dy; *((int*) _vec.data(6)) = x; *((int*) _vec.data(7)) = y; *((int*) _vec.data(8)) = w; *((int*) _vec.data(9)) = h; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_similarity: similarity transformation VImage VImage::similarity( double a, double b, double dx, double dy ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_similarity" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = a; *((double*) _vec.data(3)) = b; *((double*) _vec.data(4)) = dx; *((double*) _vec.data(5)) = dy; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_mask2vips: convert DOUBLEMASK to VIPS image VImage VImage::mask2vips( VDMask input ) throw( VError ) { VImage output; Vargv _vec( "im_mask2vips" ); ((im_mask_object*) _vec.data(0))->mask = input.mask().dptr; _vec.data(1) = output.image(); _vec.call(); return( output ); } // im_vips2mask: convert VIPS image to DOUBLEMASK VDMask VImage::vips2mask() throw( VError ) { VImage input = *this; VDMask output; Vargv _vec( "im_vips2mask" ); _vec.data(0) = input.image(); ((im_mask_object*) _vec.data(1))->name = (char*)"noname"; _vec.call(); output.embed( (DOUBLEMASK *)((im_mask_object*)_vec.data(1))->mask ); return( output ); } // im_insertplace: draw image sub inside image main at position (x,y) void VImage::insertplace( VImage sub, int x, int y ) throw( VError ) { VImage main = *this; Vargv _vec( "im_insertplace" ); _vec.data(0) = main.image(); _vec.data(1) = sub.image(); *((int*) _vec.data(2)) = x; *((int*) _vec.data(3)) = y; _vec.call(); } // im_circle: plot circle on image void VImage::circle( int cx, int cy, int radius, int intensity ) throw( VError ) { VImage image = *this; Vargv _vec( "im_circle" ); _vec.data(0) = image.image(); *((int*) _vec.data(1)) = cx; *((int*) _vec.data(2)) = cy; *((int*) _vec.data(3)) = radius; *((int*) _vec.data(4)) = intensity; _vec.call(); } // im_andimage: bitwise and of two images VImage VImage::andimage( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_andimage" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_andimageconst: bitwise and of an image with a constant VImage VImage::andimage( int c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_andimageconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_andimage_vec: bitwise and of an image with a vector constant VImage VImage::andimage( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_andimage_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_orimage: bitwise or of two images VImage VImage::orimage( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_orimage" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_orimageconst: bitwise or of an image with a constant VImage VImage::orimage( int c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_orimageconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_orimage_vec: bitwise or of an image with a vector constant VImage VImage::orimage( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_orimage_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_eorimage: bitwise eor of two images VImage VImage::eorimage( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_eorimage" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_eorimageconst: bitwise eor of an image with a constant VImage VImage::eorimage( int c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_eorimageconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_eorimage_vec: bitwise eor of an image with a vector constant VImage VImage::eorimage( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_eorimage_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_shiftleft_vec: shift image array bits to left VImage VImage::shiftleft( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_shiftleft_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_shiftleft: shift image n bits to left VImage VImage::shiftleft( int c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_shiftleft" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_shiftright_vec: shift image array bits to right VImage VImage::shiftright( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_shiftright_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_shiftright: shift integer image n bits to right VImage VImage::shiftright( int c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_shiftright" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_blend: use cond image to blend between images in1 and in2 VImage VImage::blend( VImage in1, VImage in2 ) throw( VError ) { VImage cond = *this; VImage out; Vargv _vec( "im_blend" ); _vec.data(0) = cond.image(); _vec.data(1) = in1.image(); _vec.data(2) = in2.image(); _vec.data(3) = out.image(); _vec.call(); out._ref->addref( cond._ref ); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_equal: two images equal in value VImage VImage::equal( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_equal" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_equal_vec: image equals doublevec VImage VImage::equal( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_equal_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_equalconst: image equals const VImage VImage::equal( double c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_equalconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_ifthenelse: use cond image to choose pels from image in1 or in2 VImage VImage::ifthenelse( VImage in1, VImage in2 ) throw( VError ) { VImage cond = *this; VImage out; Vargv _vec( "im_ifthenelse" ); _vec.data(0) = cond.image(); _vec.data(1) = in1.image(); _vec.data(2) = in2.image(); _vec.data(3) = out.image(); _vec.call(); out._ref->addref( cond._ref ); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_less: in1 less than in2 in value VImage VImage::less( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_less" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_less_vec: in less than doublevec VImage VImage::less( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_less_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_lessconst: in less than const VImage VImage::less( double c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_lessconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_lesseq: in1 less than or equal to in2 in value VImage VImage::lesseq( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_lesseq" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_lesseq_vec: in less than or equal to doublevec VImage VImage::lesseq( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_lesseq_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_lesseqconst: in less than or equal to const VImage VImage::lesseq( double c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_lesseqconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_more: in1 more than in2 in value VImage VImage::more( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_more" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_more_vec: in more than doublevec VImage VImage::more( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_more_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_moreconst: in more than const VImage VImage::more( double c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_moreconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_moreeq: in1 more than or equal to in2 in value VImage VImage::moreeq( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_moreeq" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_moreeq_vec: in more than or equal to doublevec VImage VImage::moreeq( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_moreeq_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_moreeqconst: in more than or equal to const VImage VImage::moreeq( double c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_moreeqconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_notequal: two images not equal in value VImage VImage::notequal( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_notequal" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( in1._ref ); out._ref->addref( in2._ref ); return( out ); } // im_notequal_vec: image does not equal doublevec VImage VImage::notequal( std::vector vec ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_notequal_vec" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_doublevec_object*) _vec.data(2))->n = vec.size(); ((im_doublevec_object*) _vec.data(2))->vec = new double[vec.size()]; for( unsigned int i = 0; i < vec.size(); i++ ) ((im_doublevec_object*) _vec.data(2))->vec[i] = vec[i]; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_notequalconst: image does not equal const VImage VImage::notequal( double c ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_notequalconst" ); _vec.data(0) = in1.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = c; _vec.call(); out._ref->addref( in1._ref ); return( out ); } // im_quadratic: transform via quadratic VImage VImage::quadratic( VImage coeff ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_quadratic" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = coeff.image(); _vec.call(); out._ref->addref( in._ref ); out._ref->addref( coeff._ref ); return( out ); } // bodies for package format // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_csv2vips: read a file in csv format VImage VImage::csv2vips( char* filename ) throw( VError ) { VImage im; Vargv _vec( "im_csv2vips" ); _vec.data(0) = (im_object) filename; _vec.data(1) = im.image(); _vec.call(); return( im ); } // im_fits2vips: convert from fits VImage VImage::fits2vips( char* in ) throw( VError ) { VImage out; Vargv _vec( "im_fits2vips" ); _vec.data(0) = (im_object) in; _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_jpeg2vips: convert from jpeg VImage VImage::jpeg2vips( char* in ) throw( VError ) { VImage out; Vargv _vec( "im_jpeg2vips" ); _vec.data(0) = (im_object) in; _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_magick2vips: load file with libMagick VImage VImage::magick2vips( char* in ) throw( VError ) { VImage out; Vargv _vec( "im_magick2vips" ); _vec.data(0) = (im_object) in; _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_png2vips: convert PNG file to VIPS image VImage VImage::png2vips( char* in ) throw( VError ) { VImage out; Vargv _vec( "im_png2vips" ); _vec.data(0) = (im_object) in; _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_exr2vips: convert an OpenEXR file to VIPS VImage VImage::exr2vips( char* in ) throw( VError ) { VImage out; Vargv _vec( "im_exr2vips" ); _vec.data(0) = (im_object) in; _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_ppm2vips: read a file in pbm/pgm/ppm format VImage VImage::ppm2vips( char* filename ) throw( VError ) { VImage im; Vargv _vec( "im_ppm2vips" ); _vec.data(0) = (im_object) filename; _vec.data(1) = im.image(); _vec.call(); return( im ); } // im_analyze2vips: read a file in analyze format VImage VImage::analyze2vips( char* filename ) throw( VError ) { VImage im; Vargv _vec( "im_analyze2vips" ); _vec.data(0) = (im_object) filename; _vec.data(1) = im.image(); _vec.call(); return( im ); } // im_tiff2vips: convert TIFF file to VIPS image VImage VImage::tiff2vips( char* in ) throw( VError ) { VImage out; Vargv _vec( "im_tiff2vips" ); _vec.data(0) = (im_object) in; _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_vips2csv: write an image in csv format void VImage::vips2csv( char* filename ) throw( VError ) { VImage in = *this; Vargv _vec( "im_vips2csv" ); _vec.data(0) = in.image(); _vec.data(1) = (im_object) filename; _vec.call(); } // im_vips2dz: save as deepzoom void VImage::vips2dz( char* out ) throw( VError ) { VImage in = *this; Vargv _vec( "im_vips2dz" ); _vec.data(0) = in.image(); _vec.data(1) = (im_object) out; _vec.call(); } // im_vips2jpeg: convert to jpeg void VImage::vips2jpeg( char* out ) throw( VError ) { VImage in = *this; Vargv _vec( "im_vips2jpeg" ); _vec.data(0) = in.image(); _vec.data(1) = (im_object) out; _vec.call(); } // im_vips2mimejpeg: convert to jpeg as mime type on stdout void VImage::vips2mimejpeg( int qfac ) throw( VError ) { VImage in = *this; Vargv _vec( "im_vips2mimejpeg" ); _vec.data(0) = in.image(); *((int*) _vec.data(1)) = qfac; _vec.call(); } // im_vips2png: convert VIPS image to PNG file void VImage::vips2png( char* out ) throw( VError ) { VImage in = *this; Vargv _vec( "im_vips2png" ); _vec.data(0) = in.image(); _vec.data(1) = (im_object) out; _vec.call(); } // im_vips2ppm: write a file in pbm/pgm/ppm format void VImage::vips2ppm( char* filename ) throw( VError ) { VImage im = *this; Vargv _vec( "im_vips2ppm" ); _vec.data(0) = im.image(); _vec.data(1) = (im_object) filename; _vec.call(); } // im_vips2tiff: convert VIPS image to TIFF file void VImage::vips2tiff( char* out ) throw( VError ) { VImage in = *this; Vargv _vec( "im_vips2tiff" ); _vec.data(0) = in.image(); _vec.data(1) = (im_object) out; _vec.call(); } // bodies for package freq_filt // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_create_fmask: create frequency domain filter mask VImage VImage::create_fmask( int width, int height, int type, double p1, double p2, double p3, double p4, double p5 ) throw( VError ) { VImage out; Vargv _vec( "im_create_fmask" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = width; *((int*) _vec.data(2)) = height; *((int*) _vec.data(3)) = type; *((double*) _vec.data(4)) = p1; *((double*) _vec.data(5)) = p2; *((double*) _vec.data(6)) = p3; *((double*) _vec.data(7)) = p4; *((double*) _vec.data(8)) = p5; _vec.call(); return( out ); } // im_disp_ps: make displayable power spectrum VImage VImage::disp_ps() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_disp_ps" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_flt_image_freq: frequency domain filter image VImage VImage::flt_image_freq( int type, double p1, double p2, double p3, double p4, double p5 ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_flt_image_freq" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = type; *((double*) _vec.data(3)) = p1; *((double*) _vec.data(4)) = p2; *((double*) _vec.data(5)) = p3; *((double*) _vec.data(6)) = p4; *((double*) _vec.data(7)) = p5; _vec.call(); return( out ); } // im_fractsurf: generate a fractal surface of given dimension VImage VImage::fractsurf( int size, double dimension ) throw( VError ) { VImage out; Vargv _vec( "im_fractsurf" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = size; *((double*) _vec.data(2)) = dimension; _vec.call(); return( out ); } // im_freqflt: frequency-domain filter of in with mask VImage VImage::freqflt( VImage mask ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_freqflt" ); _vec.data(0) = in.image(); _vec.data(1) = mask.image(); _vec.data(2) = out.image(); _vec.call(); return( out ); } // im_fwfft: forward fast-fourier transform VImage VImage::fwfft() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_fwfft" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_rotquad: rotate image quadrants to move origin to centre VImage VImage::rotquad() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rotquad" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_invfft: inverse fast-fourier transform VImage VImage::invfft() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_invfft" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_phasecor_fft: non-normalised correlation of gradient of in2 within in1 VImage VImage::phasecor_fft( VImage in2 ) throw( VError ) { VImage in1 = *this; VImage out; Vargv _vec( "im_phasecor_fft" ); _vec.data(0) = in1.image(); _vec.data(1) = in2.image(); _vec.data(2) = out.image(); _vec.call(); return( out ); } // im_invfftr: real part of inverse fast-fourier transform VImage VImage::invfftr() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_invfftr" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); return( out ); } // bodies for package histograms_lut // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_gammacorrect: gamma-correct image VImage VImage::gammacorrect( double exponent ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_gammacorrect" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = exponent; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_heq: histogram-equalise image VImage VImage::heq( int band_number ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_heq" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = band_number; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_hist: find and graph histogram of image VImage VImage::hist( int band_number ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_hist" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = band_number; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_histcum: turn histogram to cumulative histogram VImage VImage::histcum() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_histcum" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_histeq: form histogram equalistion LUT VImage VImage::histeq() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_histeq" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_hist_indexed: make a histogram with an index image VImage VImage::hist_indexed( VImage value ) throw( VError ) { VImage index = *this; VImage out; Vargv _vec( "im_hist_indexed" ); _vec.data(0) = index.image(); _vec.data(1) = value.image(); _vec.data(2) = out.image(); _vec.call(); out._ref->addref( index._ref ); out._ref->addref( value._ref ); return( out ); } // im_histgr: find histogram of image VImage VImage::histgr( int band_number ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_histgr" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = band_number; _vec.call(); return( out ); } // im_histnD: find 1D, 2D or 3D histogram of image VImage VImage::histnD( int bins ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_histnD" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = bins; _vec.call(); return( out ); } // im_histnorm: form normalised histogram VImage VImage::histnorm() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_histnorm" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_histplot: plot graph of histogram VImage VImage::histplot() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_histplot" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_histspec: find histogram which will make pdf of in match ref VImage VImage::histspec( VImage ref ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_histspec" ); _vec.data(0) = in.image(); _vec.data(1) = ref.image(); _vec.data(2) = out.image(); _vec.call(); return( out ); } // im_hsp: match stats of in to stats of ref VImage VImage::hsp( VImage ref ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_hsp" ); _vec.data(0) = in.image(); _vec.data(1) = ref.image(); _vec.data(2) = out.image(); _vec.call(); return( out ); } // im_identity: generate identity histogram VImage VImage::identity( int nbands ) throw( VError ) { VImage out; Vargv _vec( "im_identity" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = nbands; _vec.call(); return( out ); } // im_identity_ushort: generate ushort identity histogram VImage VImage::identity_ushort( int nbands, int size ) throw( VError ) { VImage out; Vargv _vec( "im_identity_ushort" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = nbands; *((int*) _vec.data(2)) = size; _vec.call(); return( out ); } // im_ismonotonic: test LUT for monotonicity int VImage::ismonotonic() throw( VError ) { VImage lut = *this; int mono; Vargv _vec( "im_ismonotonic" ); _vec.data(0) = lut.image(); _vec.call(); mono = *((int*)_vec.data(1)); return( mono ); } // im_lhisteq: local histogram equalisation VImage VImage::lhisteq( int width, int height ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_lhisteq" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = width; *((int*) _vec.data(3)) = height; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_mpercent: find threshold above which there are percent values int VImage::mpercent( double percent ) throw( VError ) { VImage in = *this; int thresh; Vargv _vec( "im_mpercent" ); _vec.data(0) = in.image(); *((double*) _vec.data(1)) = percent; _vec.call(); thresh = *((int*)_vec.data(2)); return( thresh ); } // im_invertlut: generate correction table from set of measures VImage VImage::invertlut( VDMask measures, int lut_size ) throw( VError ) { VImage lut; Vargv _vec( "im_invertlut" ); ((im_mask_object*) _vec.data(0))->mask = measures.mask().dptr; _vec.data(1) = lut.image(); *((int*) _vec.data(2)) = lut_size; _vec.call(); return( lut ); } // im_buildlut: generate LUT table from set of x/y positions VImage VImage::buildlut( VDMask xyes ) throw( VError ) { VImage lut; Vargv _vec( "im_buildlut" ); ((im_mask_object*) _vec.data(0))->mask = xyes.mask().dptr; _vec.data(1) = lut.image(); _vec.call(); return( lut ); } // im_maplut: map image through LUT VImage VImage::maplut( VImage lut ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_maplut" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = lut.image(); _vec.call(); out._ref->addref( in._ref ); out._ref->addref( lut._ref ); return( out ); } // im_project: find horizontal and vertical projections of an image VImage VImage::project( VImage& vout ) throw( VError ) { VImage in = *this; VImage hout; Vargv _vec( "im_project" ); _vec.data(0) = in.image(); _vec.data(1) = hout.image(); _vec.data(2) = vout.image(); _vec.call(); return( hout ); } // im_stdif: statistical differencing VImage VImage::stdif( double a, double m0, double b, double s0, int xw, int yw ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_stdif" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = a; *((double*) _vec.data(3)) = m0; *((double*) _vec.data(4)) = b; *((double*) _vec.data(5)) = s0; *((int*) _vec.data(6)) = xw; *((int*) _vec.data(7)) = yw; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_tone_analyse: analyse in and create LUT for tone adjustment VImage VImage::tone_analyse( double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError ) { VImage in = *this; VImage hist; Vargv _vec( "im_tone_analyse" ); _vec.data(0) = in.image(); _vec.data(1) = hist.image(); *((double*) _vec.data(2)) = Ps; *((double*) _vec.data(3)) = Pm; *((double*) _vec.data(4)) = Ph; *((double*) _vec.data(5)) = S; *((double*) _vec.data(6)) = M; *((double*) _vec.data(7)) = H; _vec.call(); return( hist ); } // im_tone_build: create LUT for tone adjustment of LabS images VImage VImage::tone_build( double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError ) { VImage hist; Vargv _vec( "im_tone_build" ); _vec.data(0) = hist.image(); *((double*) _vec.data(1)) = Lb; *((double*) _vec.data(2)) = Lw; *((double*) _vec.data(3)) = Ps; *((double*) _vec.data(4)) = Pm; *((double*) _vec.data(5)) = Ph; *((double*) _vec.data(6)) = S; *((double*) _vec.data(7)) = M; *((double*) _vec.data(8)) = H; _vec.call(); return( hist ); } // im_tone_build_range: create LUT for tone adjustment VImage VImage::tone_build_range( int in_max, int out_max, double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ) throw( VError ) { VImage hist; Vargv _vec( "im_tone_build_range" ); _vec.data(0) = hist.image(); *((int*) _vec.data(1)) = in_max; *((int*) _vec.data(2)) = out_max; *((double*) _vec.data(3)) = Lb; *((double*) _vec.data(4)) = Lw; *((double*) _vec.data(5)) = Ps; *((double*) _vec.data(6)) = Pm; *((double*) _vec.data(7)) = Ph; *((double*) _vec.data(8)) = S; *((double*) _vec.data(9)) = M; *((double*) _vec.data(10)) = H; _vec.call(); return( hist ); } // im_tone_map: map L channel of LabS or LabQ image through LUT VImage VImage::tone_map( VImage lut ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_tone_map" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = lut.image(); _vec.call(); out._ref->addref( in._ref ); out._ref->addref( lut._ref ); return( out ); } // bodies for package inplace // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_draw_circle: draw circle on image void VImage::draw_circle( int cx, int cy, int radius, int fill, std::vector ink ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_circle" ); _vec.data(0) = image.image(); *((int*) _vec.data(1)) = cx; *((int*) _vec.data(2)) = cy; *((int*) _vec.data(3)) = radius; *((int*) _vec.data(4)) = fill; ((im_doublevec_object*) _vec.data(5))->n = ink.size(); ((im_doublevec_object*) _vec.data(5))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(5))->vec[i] = ink[i]; _vec.call(); } // im_draw_rect: draw rect on image void VImage::draw_rect( int left, int top, int width, int height, int fill, std::vector ink ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_rect" ); _vec.data(0) = image.image(); *((int*) _vec.data(1)) = left; *((int*) _vec.data(2)) = top; *((int*) _vec.data(3)) = width; *((int*) _vec.data(4)) = height; *((int*) _vec.data(5)) = fill; ((im_doublevec_object*) _vec.data(6))->n = ink.size(); ((im_doublevec_object*) _vec.data(6))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(6))->vec[i] = ink[i]; _vec.call(); } // im_draw_line: draw line on image void VImage::draw_line( int x1, int y1, int x2, int y2, std::vector ink ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_line" ); _vec.data(0) = image.image(); *((int*) _vec.data(1)) = x1; *((int*) _vec.data(2)) = y1; *((int*) _vec.data(3)) = x2; *((int*) _vec.data(4)) = y2; ((im_doublevec_object*) _vec.data(5))->n = ink.size(); ((im_doublevec_object*) _vec.data(5))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(5))->vec[i] = ink[i]; _vec.call(); } // im_draw_point: draw point on image void VImage::draw_point( int x, int y, std::vector ink ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_point" ); _vec.data(0) = image.image(); *((int*) _vec.data(1)) = x; *((int*) _vec.data(2)) = y; ((im_doublevec_object*) _vec.data(3))->n = ink.size(); ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i]; _vec.call(); } // im_draw_smudge: smudge part of an image void VImage::draw_smudge( int left, int top, int width, int height ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_smudge" ); _vec.data(0) = image.image(); *((int*) _vec.data(1)) = left; *((int*) _vec.data(2)) = top; *((int*) _vec.data(3)) = width; *((int*) _vec.data(4)) = height; _vec.call(); } // im_draw_flood: flood with ink from x, y while pixel != ink void VImage::draw_flood( int x, int y, std::vector ink ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_flood" ); _vec.data(0) = image.image(); *((int*) _vec.data(1)) = x; *((int*) _vec.data(2)) = y; ((im_doublevec_object*) _vec.data(3))->n = ink.size(); ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i]; _vec.call(); } // im_draw_flood_blob: flood with ink from x, y while pixel == start void VImage::draw_flood_blob( int x, int y, std::vector ink ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_flood_blob" ); _vec.data(0) = image.image(); *((int*) _vec.data(1)) = x; *((int*) _vec.data(2)) = y; ((im_doublevec_object*) _vec.data(3))->n = ink.size(); ((im_doublevec_object*) _vec.data(3))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(3))->vec[i] = ink[i]; _vec.call(); } // im_draw_flood_other: flood image with serial from x, y while pixel == start void VImage::draw_flood_other( VImage test, int x, int y, int serial ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_flood_other" ); _vec.data(0) = image.image(); _vec.data(1) = test.image(); *((int*) _vec.data(2)) = x; *((int*) _vec.data(3)) = y; *((int*) _vec.data(4)) = serial; _vec.call(); } // im_draw_image: draw image sub inside image main at position (x,y) void VImage::draw_image( VImage sub, int x, int y ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_image" ); _vec.data(0) = image.image(); _vec.data(1) = sub.image(); *((int*) _vec.data(2)) = x; *((int*) _vec.data(3)) = y; _vec.call(); } // im_draw_mask: draw mask sub inside image main at position (x,y) void VImage::draw_mask( VImage mask, int x, int y, std::vector ink ) throw( VError ) { VImage image = *this; Vargv _vec( "im_draw_mask" ); _vec.data(0) = image.image(); _vec.data(1) = mask.image(); *((int*) _vec.data(2)) = x; *((int*) _vec.data(3)) = y; ((im_doublevec_object*) _vec.data(4))->n = ink.size(); ((im_doublevec_object*) _vec.data(4))->vec = new double[ink.size()]; for( unsigned int i = 0; i < ink.size(); i++ ) ((im_doublevec_object*) _vec.data(4))->vec[i] = ink[i]; _vec.call(); } // im_lineset: draw line between points (x1,y1) and (x2,y2) VImage VImage::line( VImage mask, VImage ink, std::vector x1, std::vector y1, std::vector x2, std::vector y2 ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_lineset" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = mask.image(); _vec.data(3) = ink.image(); ((im_intvec_object*) _vec.data(4))->n = x1.size(); ((im_intvec_object*) _vec.data(4))->vec = new int[x1.size()]; for( unsigned int i = 0; i < x1.size(); i++ ) ((im_intvec_object*) _vec.data(4))->vec[i] = x1[i]; ((im_intvec_object*) _vec.data(5))->n = y1.size(); ((im_intvec_object*) _vec.data(5))->vec = new int[y1.size()]; for( unsigned int i = 0; i < y1.size(); i++ ) ((im_intvec_object*) _vec.data(5))->vec[i] = y1[i]; ((im_intvec_object*) _vec.data(6))->n = x2.size(); ((im_intvec_object*) _vec.data(6))->vec = new int[x2.size()]; for( unsigned int i = 0; i < x2.size(); i++ ) ((im_intvec_object*) _vec.data(6))->vec[i] = x2[i]; ((im_intvec_object*) _vec.data(7))->n = y2.size(); ((im_intvec_object*) _vec.data(7))->vec = new int[y2.size()]; for( unsigned int i = 0; i < y2.size(); i++ ) ((im_intvec_object*) _vec.data(7))->vec[i] = y2[i]; _vec.call(); return( out ); } // bodies for package iofuncs // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_binfile: open a headerless binary file VImage VImage::binfile( char* filename, int width, int height, int bands, int offset ) throw( VError ) { VImage out; Vargv _vec( "im_binfile" ); _vec.data(0) = (im_object) filename; _vec.data(1) = out.image(); *((int*) _vec.data(2)) = width; *((int*) _vec.data(3)) = height; *((int*) _vec.data(4)) = bands; *((int*) _vec.data(5)) = offset; _vec.call(); return( out ); } // im_cache: cache results of an operation VImage VImage::cache( int tile_width, int tile_height, int max_tiles ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_cache" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = tile_width; *((int*) _vec.data(3)) = tile_height; *((int*) _vec.data(4)) = max_tiles; _vec.call(); return( out ); } // im_getext: return the image metadata XML as a string char* VImage::getext() throw( VError ) { VImage image = *this; char* history; Vargv _vec( "im_getext" ); _vec.data(0) = image.image(); _vec.call(); history = (char*) _vec.data(1); return( history ); } // im_header_get_typeof: return field type int VImage::header_get_typeof( char* field ) throw( VError ) { VImage image = *this; int gtype; Vargv _vec( "im_header_get_typeof" ); _vec.data(0) = (im_object) field; _vec.data(1) = image.image(); _vec.call(); gtype = *((int*)_vec.data(2)); return( gtype ); } // im_header_int: extract int fields from header int VImage::header_int( char* field ) throw( VError ) { VImage image = *this; int value; Vargv _vec( "im_header_int" ); _vec.data(0) = (im_object) field; _vec.data(1) = image.image(); _vec.call(); value = *((int*)_vec.data(2)); return( value ); } // im_header_double: extract double fields from header double VImage::header_double( char* field ) throw( VError ) { VImage image = *this; double value; Vargv _vec( "im_header_double" ); _vec.data(0) = (im_object) field; _vec.data(1) = image.image(); _vec.call(); value = *((double*)_vec.data(2)); return( value ); } // im_header_string: extract fields from headers as strings char* VImage::header_string( char* field ) throw( VError ) { VImage image = *this; char* value; Vargv _vec( "im_header_string" ); _vec.data(0) = (im_object) field; _vec.data(1) = image.image(); _vec.call(); value = (char*) _vec.data(2); return( value ); } // im_history_get: return the image history as a string char* VImage::history_get() throw( VError ) { VImage image = *this; char* history; Vargv _vec( "im_history_get" ); _vec.data(0) = image.image(); _vec.call(); history = (char*) _vec.data(1); return( history ); } // im_printdesc: print an image header to stdout void VImage::printdesc() throw( VError ) { VImage image = *this; Vargv _vec( "im_printdesc" ); _vec.data(0) = image.image(); _vec.call(); } // bodies for package mask // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // bodies for package morphology // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_cntlines: count horizontal or vertical lines double VImage::cntlines( int direction ) throw( VError ) { VImage in = *this; double nlines; Vargv _vec( "im_cntlines" ); _vec.data(0) = in.image(); *((int*) _vec.data(2)) = direction; _vec.call(); nlines = *((double*)_vec.data(1)); return( nlines ); } // im_dilate: dilate image with mask, adding a black border VImage VImage::dilate( VIMask mask ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_dilate" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_rank: rank filter nth element of xsize/ysize window VImage VImage::rank( int xsize, int ysize, int n ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rank" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = xsize; *((int*) _vec.data(3)) = ysize; *((int*) _vec.data(4)) = n; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_rank_image: point-wise pixel rank VImage VImage::rank_image( std::vector in, int index ) throw( VError ) { VImage out; Vargv _vec( "im_rank_image" ); ((im_imagevec_object*) _vec.data(0))->n = in.size(); ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()]; for( unsigned int i = 0; i < in.size(); i++ ) ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = index; _vec.call(); for( unsigned int i = 0; i < in.size(); i++ ) out._ref->addref( in[i]._ref ); return( out ); } // im_maxvalue: point-wise maximum value VImage VImage::maxvalue( std::vector in ) throw( VError ) { VImage out; Vargv _vec( "im_maxvalue" ); ((im_imagevec_object*) _vec.data(0))->n = in.size(); ((im_imagevec_object*) _vec.data(0))->vec = new IMAGE *[in.size()]; for( unsigned int i = 0; i < in.size(); i++ ) ((im_imagevec_object*) _vec.data(0))->vec[i] = in[i].image(); _vec.data(1) = out.image(); _vec.call(); for( unsigned int i = 0; i < in.size(); i++ ) out._ref->addref( in[i]._ref ); return( out ); } // im_label_regions: number continuous regions in an image VImage VImage::label_regions( int& segments ) throw( VError ) { VImage test = *this; VImage mask; Vargv _vec( "im_label_regions" ); _vec.data(0) = test.image(); _vec.data(1) = mask.image(); _vec.call(); segments = *((int*)_vec.data(2)); return( mask ); } // im_zerox: find +ve or -ve zero crossings in image VImage VImage::zerox( int flag ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_zerox" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = flag; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_erode: erode image with mask, adding a black border VImage VImage::erode( VIMask mask ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_erode" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); ((im_mask_object*) _vec.data(2))->mask = mask.mask().iptr; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_profile: find first horizontal/vertical edge VImage VImage::profile( int direction ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_profile" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = direction; _vec.call(); return( out ); } // bodies for package mosaicing // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_align_bands: align the bands of an image VImage VImage::align_bands() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_align_bands" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); return( out ); } // im_correl: search area around sec for match for area around ref double VImage::correl( VImage sec, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, int& x, int& y ) throw( VError ) { VImage ref = *this; double correlation; Vargv _vec( "im_correl" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); *((int*) _vec.data(2)) = xref; *((int*) _vec.data(3)) = yref; *((int*) _vec.data(4)) = xsec; *((int*) _vec.data(5)) = ysec; *((int*) _vec.data(6)) = hwindowsize; *((int*) _vec.data(7)) = hsearchsize; _vec.call(); correlation = *((double*)_vec.data(8)); x = *((int*)_vec.data(9)); y = *((int*)_vec.data(10)); return( correlation ); } // im__find_lroverlap: search for left-right overlap of ref and sec int VImage::_find_lroverlap( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int& dy0, double& scale1, double& angle1, double& dx1, double& dy1 ) throw( VError ) { VImage ref = *this; int dx0; Vargv _vec( "im__find_lroverlap" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); *((int*) _vec.data(2)) = bandno; *((int*) _vec.data(3)) = xr; *((int*) _vec.data(4)) = yr; *((int*) _vec.data(5)) = xs; *((int*) _vec.data(6)) = ys; *((int*) _vec.data(7)) = halfcorrelation; *((int*) _vec.data(8)) = halfarea; _vec.call(); dx0 = *((int*)_vec.data(9)); dy0 = *((int*)_vec.data(10)); scale1 = *((double*)_vec.data(11)); angle1 = *((double*)_vec.data(12)); dx1 = *((double*)_vec.data(13)); dy1 = *((double*)_vec.data(14)); return( dx0 ); } // im__find_tboverlap: search for top-bottom overlap of ref and sec int VImage::_find_tboverlap( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int& dy0, double& scale1, double& angle1, double& dx1, double& dy1 ) throw( VError ) { VImage ref = *this; int dx0; Vargv _vec( "im__find_tboverlap" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); *((int*) _vec.data(2)) = bandno; *((int*) _vec.data(3)) = xr; *((int*) _vec.data(4)) = yr; *((int*) _vec.data(5)) = xs; *((int*) _vec.data(6)) = ys; *((int*) _vec.data(7)) = halfcorrelation; *((int*) _vec.data(8)) = halfarea; _vec.call(); dx0 = *((int*)_vec.data(9)); dy0 = *((int*)_vec.data(10)); scale1 = *((double*)_vec.data(11)); angle1 = *((double*)_vec.data(12)); dx1 = *((double*)_vec.data(13)); dy1 = *((double*)_vec.data(14)); return( dx0 ); } // im_global_balance: automatically rebuild mosaic with balancing VImage VImage::global_balance( double gamma ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_global_balance" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = gamma; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_global_balancef: automatically rebuild mosaic with balancing, float output VImage VImage::global_balancef( double gamma ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_global_balancef" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = gamma; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_lrmerge: left-right merge of in1 and in2 VImage VImage::lrmerge( VImage sec, int dx, int dy, int mwidth ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_lrmerge" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = dx; *((int*) _vec.data(4)) = dy; *((int*) _vec.data(5)) = mwidth; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_lrmerge1: first-order left-right merge of ref and sec VImage VImage::lrmerge1( VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_lrmerge1" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = xr1; *((int*) _vec.data(4)) = yr1; *((int*) _vec.data(5)) = xs1; *((int*) _vec.data(6)) = ys1; *((int*) _vec.data(7)) = xr2; *((int*) _vec.data(8)) = yr2; *((int*) _vec.data(9)) = xs2; *((int*) _vec.data(10)) = ys2; *((int*) _vec.data(11)) = mwidth; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_lrmosaic: left-right mosaic of ref and sec VImage VImage::lrmosaic( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_lrmosaic" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = bandno; *((int*) _vec.data(4)) = xr; *((int*) _vec.data(5)) = yr; *((int*) _vec.data(6)) = xs; *((int*) _vec.data(7)) = ys; *((int*) _vec.data(8)) = halfcorrelation; *((int*) _vec.data(9)) = halfarea; *((int*) _vec.data(10)) = balancetype; *((int*) _vec.data(11)) = mwidth; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_lrmosaic1: first-order left-right mosaic of ref and sec VImage VImage::lrmosaic1( VImage sec, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_lrmosaic1" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = bandno; *((int*) _vec.data(4)) = xr1; *((int*) _vec.data(5)) = yr1; *((int*) _vec.data(6)) = xs1; *((int*) _vec.data(7)) = ys1; *((int*) _vec.data(8)) = xr2; *((int*) _vec.data(9)) = yr2; *((int*) _vec.data(10)) = xs2; *((int*) _vec.data(11)) = ys2; *((int*) _vec.data(12)) = halfcorrelation; *((int*) _vec.data(13)) = halfarea; *((int*) _vec.data(14)) = balancetype; *((int*) _vec.data(15)) = mwidth; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_match_linear: resample ref so that tie-points match VImage VImage::match_linear( VImage sec, int xref1, int yref1, int xsec1, int ysec1, int xref2, int yref2, int xsec2, int ysec2 ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_match_linear" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = xref1; *((int*) _vec.data(4)) = yref1; *((int*) _vec.data(5)) = xsec1; *((int*) _vec.data(6)) = ysec1; *((int*) _vec.data(7)) = xref2; *((int*) _vec.data(8)) = yref2; *((int*) _vec.data(9)) = xsec2; *((int*) _vec.data(10)) = ysec2; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_match_linear_search: search sec, then resample so that tie-points match VImage VImage::match_linear_search( VImage sec, int xref1, int yref1, int xsec1, int ysec1, int xref2, int yref2, int xsec2, int ysec2, int hwindowsize, int hsearchsize ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_match_linear_search" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = xref1; *((int*) _vec.data(4)) = yref1; *((int*) _vec.data(5)) = xsec1; *((int*) _vec.data(6)) = ysec1; *((int*) _vec.data(7)) = xref2; *((int*) _vec.data(8)) = yref2; *((int*) _vec.data(9)) = xsec2; *((int*) _vec.data(10)) = ysec2; *((int*) _vec.data(11)) = hwindowsize; *((int*) _vec.data(12)) = hsearchsize; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_maxpos_subpel: subpixel position of maximum of (phase correlation) image double VImage::maxpos_subpel( double& y ) throw( VError ) { VImage im = *this; double x; Vargv _vec( "im_maxpos_subpel" ); _vec.data(0) = im.image(); _vec.call(); x = *((double*)_vec.data(1)); y = *((double*)_vec.data(2)); return( x ); } // im_remosaic: automatically rebuild mosaic with new files VImage VImage::remosaic( char* old_str, char* new_str ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_remosaic" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.data(2) = (im_object) old_str; _vec.data(3) = (im_object) new_str; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_tbmerge: top-bottom merge of in1 and in2 VImage VImage::tbmerge( VImage sec, int dx, int dy, int mwidth ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_tbmerge" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = dx; *((int*) _vec.data(4)) = dy; *((int*) _vec.data(5)) = mwidth; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_tbmerge1: first-order top-bottom merge of in1 and in2 VImage VImage::tbmerge1( VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_tbmerge1" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = xr1; *((int*) _vec.data(4)) = yr1; *((int*) _vec.data(5)) = xs1; *((int*) _vec.data(6)) = ys1; *((int*) _vec.data(7)) = xr2; *((int*) _vec.data(8)) = yr2; *((int*) _vec.data(9)) = xs2; *((int*) _vec.data(10)) = ys2; *((int*) _vec.data(11)) = mwidth; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_tbmosaic: top-bottom mosaic of in1 and in2 VImage VImage::tbmosaic( VImage sec, int bandno, int xr, int yr, int xs, int ys, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_tbmosaic" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = bandno; *((int*) _vec.data(4)) = xr; *((int*) _vec.data(5)) = yr; *((int*) _vec.data(6)) = xs; *((int*) _vec.data(7)) = ys; *((int*) _vec.data(8)) = halfcorrelation; *((int*) _vec.data(9)) = halfarea; *((int*) _vec.data(10)) = balancetype; *((int*) _vec.data(11)) = mwidth; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // im_tbmosaic1: first-order top-bottom mosaic of ref and sec VImage VImage::tbmosaic1( VImage sec, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int halfcorrelation, int halfarea, int balancetype, int mwidth ) throw( VError ) { VImage ref = *this; VImage out; Vargv _vec( "im_tbmosaic1" ); _vec.data(0) = ref.image(); _vec.data(1) = sec.image(); _vec.data(2) = out.image(); *((int*) _vec.data(3)) = bandno; *((int*) _vec.data(4)) = xr1; *((int*) _vec.data(5)) = yr1; *((int*) _vec.data(6)) = xs1; *((int*) _vec.data(7)) = ys1; *((int*) _vec.data(8)) = xr2; *((int*) _vec.data(9)) = yr2; *((int*) _vec.data(10)) = xs2; *((int*) _vec.data(11)) = ys2; *((int*) _vec.data(12)) = halfcorrelation; *((int*) _vec.data(13)) = halfarea; *((int*) _vec.data(14)) = balancetype; *((int*) _vec.data(15)) = mwidth; _vec.call(); out._ref->addref( ref._ref ); out._ref->addref( sec._ref ); return( out ); } // bodies for package other // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_benchmark: do something complicated for testing VImage VImage::benchmark() throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_benchmark" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_benchmark2: do something complicated for testing double VImage::benchmark2() throw( VError ) { VImage in = *this; double value; Vargv _vec( "im_benchmark2" ); _vec.data(0) = in.image(); _vec.call(); value = *((double*)_vec.data(1)); return( value ); } // im_benchmarkn: do something complicated for testing VImage VImage::benchmarkn( int n ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_benchmarkn" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = n; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_eye: generate IM_BANDFMT_UCHAR [0,255] frequency/amplitude image VImage VImage::eye( int xsize, int ysize, double factor ) throw( VError ) { VImage out; Vargv _vec( "im_eye" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = xsize; *((int*) _vec.data(2)) = ysize; *((double*) _vec.data(3)) = factor; _vec.call(); return( out ); } // im_grey: generate IM_BANDFMT_UCHAR [0,255] grey scale image VImage VImage::grey( int xsize, int ysize ) throw( VError ) { VImage out; Vargv _vec( "im_grey" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = xsize; *((int*) _vec.data(2)) = ysize; _vec.call(); return( out ); } // im_feye: generate IM_BANDFMT_FLOAT [-1,1] frequency/amplitude image VImage VImage::feye( int xsize, int ysize, double factor ) throw( VError ) { VImage out; Vargv _vec( "im_feye" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = xsize; *((int*) _vec.data(2)) = ysize; *((double*) _vec.data(3)) = factor; _vec.call(); return( out ); } // im_fgrey: generate IM_BANDFMT_FLOAT [0,1] grey scale image VImage VImage::fgrey( int xsize, int ysize ) throw( VError ) { VImage out; Vargv _vec( "im_fgrey" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = xsize; *((int*) _vec.data(2)) = ysize; _vec.call(); return( out ); } // im_fzone: generate IM_BANDFMT_FLOAT [-1,1] zone plate image VImage VImage::fzone( int size ) throw( VError ) { VImage out; Vargv _vec( "im_fzone" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = size; _vec.call(); return( out ); } // im_make_xy: generate image with pixel value equal to coordinate VImage VImage::make_xy( int xsize, int ysize ) throw( VError ) { VImage out; Vargv _vec( "im_make_xy" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = xsize; *((int*) _vec.data(2)) = ysize; _vec.call(); return( out ); } // im_sines: generate 2D sine image VImage VImage::sines( int xsize, int ysize, double horfreq, double verfreq ) throw( VError ) { VImage out; Vargv _vec( "im_sines" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = xsize; *((int*) _vec.data(2)) = ysize; *((double*) _vec.data(3)) = horfreq; *((double*) _vec.data(4)) = verfreq; _vec.call(); return( out ); } // im_zone: generate IM_BANDFMT_UCHAR [0,255] zone plate image VImage VImage::zone( int size ) throw( VError ) { VImage out; Vargv _vec( "im_zone" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = size; _vec.call(); return( out ); } // bodies for package resample // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_rightshift_size: decrease size by a power-of-two factor VImage VImage::rightshift_size( int xshift, int yshift, int band_fmt ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_rightshift_size" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((int*) _vec.data(2)) = xshift; *((int*) _vec.data(3)) = yshift; *((int*) _vec.data(4)) = band_fmt; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_shrink: shrink image by xfac, yfac times VImage VImage::shrink( double xfac, double yfac ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_shrink" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = xfac; *((double*) _vec.data(3)) = yfac; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_stretch3: stretch 3%, sub-pixel displace by xdisp/ydisp VImage VImage::stretch3( double xdisp, double ydisp ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_stretch3" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); *((double*) _vec.data(2)) = xdisp; *((double*) _vec.data(3)) = ydisp; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_affinei: affine transform VImage VImage::affinei( char* interpolate, double a, double b, double c, double d, double dx, double dy, int x, int y, int w, int h ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_affinei" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); if( vips__input_interpolate_init( &_vec.data(2), interpolate ) ) verror(); *((double*) _vec.data(3)) = a; *((double*) _vec.data(4)) = b; *((double*) _vec.data(5)) = c; *((double*) _vec.data(6)) = d; *((double*) _vec.data(7)) = dx; *((double*) _vec.data(8)) = dy; *((int*) _vec.data(9)) = x; *((int*) _vec.data(10)) = y; *((int*) _vec.data(11)) = w; *((int*) _vec.data(12)) = h; _vec.call(); out._ref->addref( in._ref ); return( out ); } // im_affinei_all: affine transform of whole image VImage VImage::affinei_all( char* interpolate, double a, double b, double c, double d, double dx, double dy ) throw( VError ) { VImage in = *this; VImage out; Vargv _vec( "im_affinei_all" ); _vec.data(0) = in.image(); _vec.data(1) = out.image(); if( vips__input_interpolate_init( &_vec.data(2), interpolate ) ) verror(); *((double*) _vec.data(3)) = a; *((double*) _vec.data(4)) = b; *((double*) _vec.data(5)) = c; *((double*) _vec.data(6)) = d; *((double*) _vec.data(7)) = dx; *((double*) _vec.data(8)) = dy; _vec.call(); out._ref->addref( in._ref ); return( out ); } // bodies for package video // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // im_video_test: test video grabber VImage VImage::video_test( int brightness, int error ) throw( VError ) { VImage out; Vargv _vec( "im_video_test" ); _vec.data(0) = out.image(); *((int*) _vec.data(1)) = brightness; *((int*) _vec.data(2)) = error; _vec.call(); return( out ); } // im_video_v4l1: grab a video frame with v4l1 VImage VImage::video_v4l1( char* device, int channel, int brightness, int colour, int contrast, int hue, int ngrabs ) throw( VError ) { VImage out; Vargv _vec( "im_video_v4l1" ); _vec.data(0) = out.image(); _vec.data(1) = (im_object) device; *((int*) _vec.data(2)) = channel; *((int*) _vec.data(3)) = brightness; *((int*) _vec.data(4)) = colour; *((int*) _vec.data(5)) = contrast; *((int*) _vec.data(6)) = hue; *((int*) _vec.data(7)) = ngrabs; _vec.call(); return( out ); } vips-7.38.5/libvipsCC/Makefile.in0000644000175000017500000007027212303144056013451 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvipsCC DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libvipsCC_la_DEPENDENCIES = $(top_builddir)/libvips/libvips.la am_libvipsCC_la_OBJECTS = VImage.lo VError.lo VDisplay.lo VMask.lo libvipsCC_la_OBJECTS = $(am_libvipsCC_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libvipsCC_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libvipsCC_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libvipsCC_la_SOURCES) DIST_SOURCES = $(libvipsCC_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ SUBDIRS = \ include AM_CPPFLAGS = \ -I$(top_srcdir)/libvips/include \ -I$(top_srcdir)/libvipsCC/include \ @VIPS_CFLAGS@ lib_LTLIBRARIES = libvipsCC.la libvipsCC_la_SOURCES = \ VImage.cc \ VError.cc \ VDisplay.cc \ VMask.cc libvipsCC_la_LDFLAGS = \ -no-undefined \ -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@ libvipsCC_la_LIBADD = \ $(top_builddir)/libvips/libvips.la @VIPS_LIBS@ EXTRA_DIST = vipsc++.cc all: all-recursive .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvipsCC/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libvipsCC.la: $(libvipsCC_la_OBJECTS) $(libvipsCC_la_DEPENDENCIES) $(EXTRA_libvipsCC_la_DEPENDENCIES) $(AM_V_CXXLD)$(libvipsCC_la_LINK) -rpath $(libdir) $(libvipsCC_la_OBJECTS) $(libvipsCC_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VDisplay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VImage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VMask.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES # swap the 'awk' line for this: # awk '{if($$1!="deprecated") print $$1}'` ; \ # to not generate the wrappers for deprecated functions vipsc++.cc: packages=`vips list packages | \ awk '{print $$1}'` ; \ echo > vipsc++.cc ; \ for name in $$packages; do \ echo "// bodies for package $$name" >> vipsc++.cc ; \ vips cppc $$name >> vipsc++.cc ; \ echo >> vipsc++.cc ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvipsCC/Makefile.am0000644000175000017500000000151412303140253013424 00000000000000SUBDIRS = \ include AM_CPPFLAGS = \ -I$(top_srcdir)/libvips/include \ -I$(top_srcdir)/libvipsCC/include \ @VIPS_CFLAGS@ lib_LTLIBRARIES = libvipsCC.la libvipsCC_la_SOURCES = \ VImage.cc \ VError.cc \ VDisplay.cc \ VMask.cc libvipsCC_la_LDFLAGS = \ -no-undefined \ -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@ libvipsCC_la_LIBADD = \ $(top_builddir)/libvips/libvips.la @VIPS_LIBS@ # swap the 'awk' line for this: # awk '{if($$1!="deprecated") print $$1}'` ; \ # to not generate the wrappers for deprecated functions vipsc++.cc: packages=`vips list packages | \ awk '{print $$1}'` ; \ echo > vipsc++.cc ; \ for name in $$packages; do \ echo "// bodies for package $$name" >> vipsc++.cc ; \ vips cppc $$name >> vipsc++.cc ; \ echo >> vipsc++.cc ; \ done EXTRA_DIST = vipsc++.cc vips-7.38.5/libvipsCC/VMask.cc0000644000175000017500000003261112303140253012722 00000000000000// Object part of VMask class /* Copyright (C) 1991-2001 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #ifdef WITH_DMALLOC #include #endif /*WITH_DMALLOC*/ VIPS_NAMESPACE_START /* Functions for VMask - refcounting layer over VPMask. */ VMask::~VMask() { ref->nrefs--; if( !ref->nrefs ) delete ref; } VMask &VMask::operator=( const VMask &a ) { // Loosing ref to LHS ref->nrefs--; if( ref->nrefs > 0 ) // Need fresh refblock ref = new refblock; else // Recycle old refblock delete ref->pmask; // LHS now points to RHS ref = a.ref; ref->nrefs++; return( *this ); } // Make sure this is a private copy of pmask --- dup if nrefs != 1 void VMask::make_private() { if( ref->nrefs > 1 ) { // Make fresh refblock refblock *ref2 = new refblock; // And copy the mask ref2->pmask = ref->pmask->dup(); ref->nrefs--; ref = ref2; } } void VMask::ostream_print( std::ostream &file ) const { file << *(ref->pmask); } // Embed INTMASK in VIMask void VIMask::embed( INTMASK *i ) throw( VError ) { if( ref->pmask ) verror( "embed: VIMask not empty" ); ref->pmask = new _private_detail::VPIMask( i ); } // Type conversions: implicit INTMASK to DOUBLEMASK VIMask::operator VDMask() { VDMask out( xsize(), ysize() ); out.mask().dptr->scale = scale(); out.mask().dptr->offset = offset(); for( int i = 0; i < size(); i++ ) out[i] = (*this)[i]; return( out ); } // Forward ref of VImage class class VImage; // Type conversions: implicit DOUBLEMASK to INTMASK VDMask::operator VIMask() { VIMask out( xsize(), ysize() ); out.mask().iptr->scale = int( scale() ); out.mask().iptr->offset = int( offset() ); for( int i = 0; i < size(); i++ ) out[i] = (int) rint( (*this)[i] ); return( out ); } // Type conversions: implicit DOUBLEMASK to VImage VDMask::operator VImage() throw( VError ) { VImage out; if( im_mask2vips( mask().dptr, out.image() ) ) verror(); return( out ); } // ... and INTMASK to VImage VIMask::operator VImage() { return( VImage( VDMask( *this ) ) ); } // Embed DOUBLEMASK in VDMask void VDMask::embed( DOUBLEMASK *i ) throw( VError ) { if( ref->pmask ) verror( "embed: VDMask not empty" ); ref->pmask = new _private_detail::VPDMask( i ); } /* Functions for P*Mask - layer over im_*_*mask() functions. */ // Create empty imask _private_detail::VPIMask::VPIMask( int xsize, int ysize ) throw( VError ) { if( !(data.iptr = im_create_imask( "VPIMask::VPIMask", xsize, ysize )) ) verror(); type = _private_detail::VPMask::INT; } // Init from vector _private_detail::VPIMask::VPIMask( int xsize, int ysize, int scale, int offset, std::vector coeff ) throw( VError ) { int i; if( !(data.iptr = im_create_imask( "VPIMask::VPIMask", xsize, ysize )) ) verror(); type = _private_detail::VPMask::INT; data.iptr->scale = scale; data.iptr->offset = offset; for( i = 0; i < xsize * ysize; i++ ) data.iptr->coeff[i] = coeff[i]; } // Create from filename _private_detail::VPIMask::VPIMask( const char *name ) throw( VError ) { if( !(data.iptr = im_read_imask( (char *) name )) ) verror(); type = _private_detail::VPMask::INT; } // Create from existing INTMASK _private_detail::VPIMask::VPIMask( INTMASK *imask ) { data.iptr = imask; type = _private_detail::VPMask::INT; } // Create empty _private_detail::VPIMask::VPIMask() { data.iptr = 0; type = _private_detail::VPMask::UNASSIGNED; } _private_detail::VPIMask::~VPIMask() { if( data.iptr ) { im_free_imask( data.iptr ); data.iptr = 0; type = _private_detail::VPMask::UNASSIGNED; } } // Duplicate -- we are a VPIMask, return a new VPIMask which is a copy of us. // Return as a VPMask tho'. _private_detail::VPMask *_private_detail::VPIMask::dup() const throw( VError ) { _private_detail::VPIMask *out = new _private_detail::VPIMask(); INTMASK *msk; if( !(msk = im_dup_imask( data.iptr, "VPIMask::dup" )) ) { delete out; verror(); } out->embed( msk ); return( out ); } // Insert INTMASK pointer void _private_detail::VPIMask::embed( INTMASK *msk ) throw( VError ) { if( type != _private_detail::VPMask::UNASSIGNED ) verror( "VPIMask::embed: VPIMask not empty" ); data.iptr = msk; type = _private_detail::VPMask::INT; } int _private_detail::VPIMask::xsize() const throw( VError ) { if( !data.iptr ) verror( "xsize: mask not set" ); return( data.iptr->xsize ); } int _private_detail::VPIMask::ysize() const throw( VError ) { if( !data.iptr ) verror( "ysize: mask not set" ); return( data.iptr->ysize ); } int _private_detail::VPIMask::scale() const throw( VError ) { if( !data.iptr ) verror( "scale: mask not set" ); return( data.iptr->scale ); } int _private_detail::VPIMask::offset() const throw( VError ) { if( !data.iptr ) verror( "offset: mask not set" ); return( data.iptr->offset ); } const char *_private_detail::VPIMask::filename() const throw( VError ) { if( !data.iptr ) verror( "filename: mask not set" ); return( data.iptr->filename ); } void _private_detail::VPIMask::ostream_print( std::ostream &file ) const throw( VError ) { if( !data.iptr ) verror( "internal error #7447234" ); int i, j; int *p = data.iptr->coeff; file << this->xsize() << "\t" << this->ysize() << "\t"; file << this->scale() << "\t" << this->offset() << "\n"; for( i = 0; i < this->ysize(); i++ ) { for( j = 0; j < this->xsize(); j++ ) file << *p++ << "\t"; file << "\n"; } } // Extract start of int array int *_private_detail::VPIMask::array() const { return( data.iptr->coeff ); } // Create empty dmask _private_detail::VPDMask::VPDMask( int xsize, int ysize ) throw( VError ) { if( !(data.dptr = im_create_dmask( "VPDMask::VPDMask", xsize, ysize )) ) verror(); type = _private_detail::VPMask::DOUBLE; } // Create from vector _private_detail::VPDMask::VPDMask( int xsize, int ysize, double scale, double offset, std::vector coeff ) throw( VError ) { int i; if( !(data.dptr = im_create_dmask( "VPDMask::VPDMask", xsize, ysize )) ) verror(); type = _private_detail::VPMask::DOUBLE; data.dptr->scale = scale; data.dptr->offset = offset; for( i = 0; i < xsize * ysize; i++ ) data.dptr->coeff[i] = coeff[i]; } // Create from filename _private_detail::VPDMask::VPDMask( const char *name ) throw( VError ) { if( !(data.dptr = im_read_dmask( (char *) name )) ) verror(); type = _private_detail::VPMask::DOUBLE; } // Create empty _private_detail::VPDMask::VPDMask() { data.dptr = 0; type = _private_detail::VPMask::UNASSIGNED; } // Create from existing DOUBLEMASK _private_detail::VPDMask::VPDMask( DOUBLEMASK *dmask ) { data.dptr = dmask; type = _private_detail::VPMask::DOUBLE; } _private_detail::VPDMask::~VPDMask() { if( data.dptr ) { im_free_dmask( data.dptr ); data.dptr = 0; type = _private_detail::VPMask::UNASSIGNED; } } // Duplicate -- we are a VPIMask, return a new VPIMask which is a copy of us. // Return as a VPMask tho'. _private_detail::VPMask *_private_detail::VPDMask::dup() const throw( VError ) { _private_detail::VPDMask *out = new _private_detail::VPDMask(); DOUBLEMASK *msk; if( !(msk = im_dup_dmask( data.dptr, "VPDMask::dup" )) ) { delete out; verror(); } out->embed( msk ); return( out ); } // Insert DOUBLEMASK pointer void _private_detail::VPDMask::embed( DOUBLEMASK *msk ) throw( VError ) { if( type != _private_detail::VPMask::UNASSIGNED ) verror( "VPDMask::embed: VPDMask not empty" ); data.dptr = msk; type = _private_detail::VPMask::DOUBLE; } int _private_detail::VPDMask::xsize() const throw( VError ) { if( !data.dptr ) verror( "xsize: mask not set" ); return( data.dptr->xsize ); } int _private_detail::VPDMask::ysize() const throw( VError ) { if( !data.dptr ) verror( "ysize: mask not set" ); return( data.dptr->ysize ); } double _private_detail::VPDMask::scale() const throw( VError ) { if( !data.dptr ) verror( "scale: mask not set" ); return( data.dptr->scale ); } double _private_detail::VPDMask::offset() const throw( VError ) { if( !data.dptr ) verror( "offset: mask not set" ); return( data.dptr->offset ); } const char *_private_detail::VPDMask::filename() const throw( VError ) { if( !data.dptr ) verror( "filename: mask not set" ); return( data.dptr->filename ); } void _private_detail::VPDMask::ostream_print( std::ostream &file ) const throw( VError ) { if( !data.dptr ) verror( "internal error #7447234" ); int i, j; double *p = data.dptr->coeff; file << this->xsize() << "\t" << this->ysize() << "\t"; file << this->scale() << "\t" << this->offset() << "\n"; for( i = 0; i < this->ysize(); i++ ) { for( j = 0; j < this->xsize(); j++ ) file << *p++ << "\t"; file << "\n"; } } // Extract data pointer double *_private_detail::VPDMask::array() const { return( data.dptr->coeff ); } // Build functions VIMask VIMask::gauss( double sig, double minamp ) throw( VError ) { VIMask out; INTMASK *msk; if( !(msk = im_gauss_imask( "VIMask::gauss", sig, minamp )) ) verror(); out.embed( msk ); return( out ); } VIMask VIMask::gauss_sep( double sig, double minamp ) throw( VError ) { VIMask out; INTMASK *msk; if( !(msk = im_gauss_imask_sep( "VIMask::gauss", sig, minamp )) ) verror(); out.embed( msk ); return( out ); } VDMask VDMask::gauss( double sig, double minamp ) throw( VError ) { VDMask out; DOUBLEMASK *msk; if( !(msk = im_gauss_dmask( "VDMask::gauss", sig, minamp )) ) verror(); out.embed( msk ); return( out ); } VIMask VIMask::log( double sig, double minamp ) throw( VError ) { VIMask out; INTMASK *msk; if( !(msk = im_log_imask( "VIMask::log", sig, minamp )) ) verror(); out.embed( msk ); return( out ); } VDMask VDMask::log( double sig, double minamp ) throw( VError ) { VDMask out; DOUBLEMASK *msk; if( !(msk = im_log_dmask( "VDMask::log", sig, minamp )) ) verror(); out.embed( msk ); return( out ); } // Manipulation functions VIMask VIMask::rotate45() throw( VError ) { VIMask out; INTMASK *msk; if( !(msk = im_rotate_imask45( mask().iptr, "VIMask::rotate45" )) ) verror(); out.embed( msk ); return( out ); } VIMask VIMask::rotate90() throw( VError ) { VIMask out; INTMASK *msk; if( !(msk = im_rotate_imask90( mask().iptr, "VIMask::rotate90" )) ) verror(); out.embed( msk ); return( out ); } VDMask VDMask::rotate45() throw( VError ) { VDMask out; DOUBLEMASK *msk; if( !(msk = im_rotate_dmask45( mask().dptr, "VDMask::rotate45" )) ) verror(); out.embed( msk ); return( out ); } VDMask VDMask::rotate90() throw( VError ) { VDMask out; DOUBLEMASK *msk; if( !(msk = im_rotate_dmask90( mask().dptr, "VDMask::rotate90" )) ) verror(); out.embed( msk ); return( out ); } VDMask VDMask::trn() throw( VError ) { VDMask out; DOUBLEMASK *msk; if( !(msk = im_mattrn( mask().dptr, "VDMask::trn" )) ) verror(); out.embed( msk ); return( out ); } VDMask VDMask::inv() throw( VError ) { VDMask out; DOUBLEMASK *msk; if( !(msk = im_matinv( mask().dptr, "VDMask::inv" )) ) verror(); out.embed( msk ); return( out ); } VDMask VDMask::mul( VDMask m ) throw( VError ) { VDMask out; DOUBLEMASK *msk; if( !(msk = im_matmul( mask().dptr, m.mask().dptr, "VDMask::mul" )) ) verror(); out.embed( msk ); return( out ); } VDMask VDMask::cat( VDMask m ) throw( VError ) { VDMask out; DOUBLEMASK *msk; if( !(msk = im_matcat( mask().dptr, m.mask().dptr, "VDMask::cat" )) ) verror(); out.embed( msk ); return( out ); } VIMask VDMask::scalei() throw( VError ) { VIMask out; INTMASK *msk; if( !(msk = im_scale_dmask( mask().dptr, "VDMask::scalei" )) ) verror(); out.embed( msk ); return( out ); } // Arithmetic on a VIMask ... just cast and use VDMask VDMask VIMask::trn() throw( VError ) { return( ((VDMask)*this).trn() ); } VDMask VIMask::inv() throw( VError ) { return( ((VDMask)*this).inv() ); } VDMask VIMask::cat( VDMask a ) throw( VError ) { return( ((VDMask)*this).cat( a ) ); } VDMask VIMask::mul( VDMask a ) throw( VError ) { return( ((VDMask)*this).mul( a ) ); } // Overload [] to get linear array subscript. // Our caller may write to the result, so make sure we have a private // copy. // Involves function call, slow anyway, so do range checking int &VIMask::operator[]( int x ) throw( VError ) { if( ref->nrefs != 1 ) make_private(); if( x > size() ) verror( "VIMask::operator[]: subscript out of range" ); return( ((_private_detail::VPIMask *)ref->pmask)->array()[x] ); } double &VDMask::operator[]( int x ) throw( VError ) { if( ref->nrefs != 1 ) make_private(); if( x > size() ) verror( "VDMask::operator[]: subscript out of range" ); return( ((_private_detail::VPDMask *)ref->pmask)->array()[x] ); } VIPS_NAMESPACE_END vips-7.38.5/libvipsCC/include/0000755000175000017500000000000012303146332013076 500000000000000vips-7.38.5/libvipsCC/include/Makefile.in0000644000175000017500000005226412303144056015075 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvipsCC/include DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ SUBDIRS = vips all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvipsCC/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvipsCC/include/Makefile.am0000644000175000017500000000002012303140253015036 00000000000000 SUBDIRS = vips vips-7.38.5/libvipsCC/include/vips/0000755000175000017500000000000012303146332014057 500000000000000vips-7.38.5/libvipsCC/include/vips/VDisplay.h0000644000175000017500000000523412303140253015703 00000000000000/* VIPS display class. * * Hide details of im_col_display API. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_VDISPLAY_H #define IM_VDISPLAY_H /* SWIG includes this file directly rather than going through vipscpp.h ... so * we have to define these macros here as well. */ #ifdef SWIG #define VIPS_NAMESPACE_START namespace vips { #define VIPS_NAMESPACE_END } #endif /*SWIG*/ /* Wrap pointers to these, but we don't want to import all the old C API. Just * declare them. */ extern "C" { struct im_col_display; struct im_col_tab_disp; } VIPS_NAMESPACE_START // Wrapper over im_col_display with ref counting class VDisplay { struct refblock { im_col_display *disp; // im_col_display struct im_col_tab_disp *luts; // luts built from this display int priv; // disp is ours, or system int nrefs; // Refs to us // Invalidate lut void cleanlut(); // Break attached stuff void cleanref(); // Get ready to write void wready() throw( VError ); // Check that luts are up-to-date void cluts() throw( VError ); refblock() : disp(0), luts(0), priv(0), nrefs(1) {} ~refblock() { cleanref(); } }; refblock *ref; public: enum VDisplayType { BARCO, // Does many corrections for us DUMB // Needs many corrections }; // Get named display VDisplay( const char *name ) throw( VError ); // Get default display VDisplay(); // Copy constructor VDisplay( const VDisplay &a ) { ref = a.ref; ref->nrefs++; } // Assignment VDisplay &operator=( const VDisplay &a ); // Destructor virtual ~VDisplay(); // The matrix type we use typedef float matrix[3][3]; // Extract display pointer void *disp() const { return( ref->disp ); } // Extract luts pointer, rebuilding luts if necessary im_col_tab_disp *luts() const throw( VError ) { ref->cluts(); return( ref->luts ); } }; VIPS_NAMESPACE_END #endif /*IM_VDISPLAY_H*/ vips-7.38.5/libvipsCC/include/vips/VError.h0000644000175000017500000000377512303140253015377 00000000000000// Header for error type /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_VERROR_H #define IM_VERROR_H /* SWIG includes this file directly rather than going through vipscpp.h ... so * we have to define these macros here as well. */ #ifdef SWIG #define VIPS_NAMESPACE_START namespace vips { #define VIPS_NAMESPACE_END } #endif /*SWIG*/ /* Don't include these when parsing for SWIG. */ #ifndef SWIG # include # include # include #endif /*!SWIG*/ VIPS_NAMESPACE_START // Error type class VError : public std::exception { std::string _what; public: VError( std::string what ) : _what( what ) {} VError() {} virtual ~VError() throw() {} // Print message and exit void perror( const char * ); void perror(); // Append some more text to the message VError &app( std::string txt ); VError &app( const int i ); // Extract string virtual const char *what() const throw() { return _what.c_str(); } void ostream_print( std::ostream & ) const; }; inline std::ostream &operator<<( std::ostream &file, const VError &err ) { err.ostream_print( file ); return( file ); } void verror( std::string str = "" ) throw( VError ); VIPS_NAMESPACE_END #endif /*IM_VERROR_H*/ vips-7.38.5/libvipsCC/include/vips/VImage.h0000644000175000017500000003172712303140253015326 00000000000000// VIPS image wrapper /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_VIMAGE_H #define IM_VIMAGE_H /* SWIG includes this file directly rather than going through vipscpp.h ... so * we have to define these macros here as well. */ #ifdef SWIG # define VIPS_NAMESPACE_START namespace vips { # define VIPS_NAMESPACE_END } #endif /*SWIG*/ /* Don't include these when parsing for SWIG. */ #ifndef SWIG # include # include # include #endif /*!SWIG*/ /* Wrap pointers to these, but we don't want to import all the old C API. Just * declare them. */ extern "C" { struct _VipsImage; /* Needed by Vargv, see below. */ struct im__function; typedef void *im__object; } VIPS_NAMESPACE_START /* vips_init() and vips_shutdown as namespaced C++ functions. */ bool init( const char *argv0 = "nothing" ); void shutdown( void ); /* A VIPS callback, our name for im_callback_fn. */ typedef int (*VCallback)( void *, void * ); /* VIPS image class. * * Slightly tricky: we have two sorts of sharing. Several VImage can share one * refblock (while results are being returned from functions, for example), * and several other refblocks can have IMAGEs which depend upon this IMAGE * for their result. */ class VImage { /* We'd like this to be protected so that user subclasses can define * their own member wrappers. But sadly C++ doesn't work like that: * subclasses of VImage can only refer to protected members via * this->, which isn't what we need. Just make it public and hope no * one touches it. */ public: /* Doesn't need to be wrapped. */ #ifndef SWIG // Count ref etc. in one of these. One for each open VIPS image. struct refblock { _VipsImage *im; // IMAGE pointer int close_on_delete; // Set if we must im_close() int nrefs; // Number of refs to us std::list orefs; // Refs im makes // Construct/destruct refblock(); virtual ~refblock() throw( VError ); // Add a ref - this (output image) depends upon IMAGE in void addref( refblock *in ) throw( VError ); // Remove a ref void removeref() throw( VError ); // Debugging void debug_print(); // Linked list needs "==" -- use address equivalence friend int operator==( const refblock &left, const refblock &right ) { return( &left == &right ); } }; refblock *_ref; #endif /*!SWIG*/ public: #ifdef DEBUG /* All the refblocks in the world. */ static std::list all_refblock; #endif /*DEBUG*/ /* Print all refblocks ... debugging. Compile with DEBUG to enable * this. */ static void print_all(); /* Typedefs and enums we need. */ // Type type enum TType { MULTIBAND = 0, B_W = 1, LUMINACE = 2, XRAY = 3, IR = 4, YUV = 5, RED_ONLY = 6, GREEN_ONLY = 7, BLUE_ONLY = 8, POWER_SPECTRUM = 9, HISTOGRAM = 10, LUT = 11, XYZ = 12, LAB = 13, CMC = 14, CMYK = 15, LABQ = 16, RGB = 17, UCS = 18, LCH = 19, LABS = 21, sRGB = 22, YXY = 23, FOURIER = 24, RGB16 = 25, GREY16 = 26 }; // Format type enum TBandFmt { FMTNOTSET = -1, FMTUCHAR = 0, FMTCHAR = 1, FMTUSHORT = 2, FMTSHORT = 3, FMTUINT = 4, FMTINT = 5, FMTFLOAT = 6, FMTCOMPLEX = 7, FMTDOUBLE = 8, FMTDPCOMPLEX = 9 }; // Coding type enum TCoding { NOCODING = 0, COLQUANT = 1, LABPACK = 2, LABPACK_COMPRESSED = 3, RGB_COMPRESSED = 4, LUM_COMPRESSED = 5, RAD = 6 }; // Compression type enum TCompression { NO_COMPRESSION = 0, TCSF_COMPRESSION = 1, JPEG_COMPRESSION = 2 }; /* Start of wrappers for iofuncs. */ // Plain constructors VImage( const char *name, const char *mode = "rd" ) throw( VError ); VImage( void *data, int width, int height, int bands, TBandFmt format ) throw( VError ); VImage( _VipsImage *image ); VImage() throw( VError ); // Convert to a disc file, eg: // VImage fred = VImage::convert2disc( "im_jpeg2vips", // "file.jpg", "temp.v" ); // Runs im_jpeg2vips to the temp file, then opens that and returns // it. Useful for opening very large files without using a lot of RAM. // Now superseded by the format API, though that's not yet wrapped in // C++ // Also replaced by the new default "rd" mode static VImage convert2disc( const char* convert, const char* in, const char* disc ) throw( VError ); // Copy constructor VImage( const VImage &a ); // Assignment - delete old ref VImage &operator=( const VImage &a ) throw( VError ); // Destructor virtual ~VImage() throw( VError ) { _ref->removeref(); } // Extract underlying IMAGE* pointer _VipsImage *image() const { return( _ref->im ); } // Extract underlying data pointer void *data() const throw( VError ); // Write this to another VImage, to a file, or to a mem buffer VImage write( VImage out ) throw( VError ); VImage write( const char *name ) throw( VError ); VImage write() throw( VError ); // Debugging ... print header fields void debug_print(); // Projection functions to get header fields int Xsize(); int Ysize(); int Bands(); TBandFmt BandFmt(); TCoding Coding(); TType Type(); float Xres(); float Yres(); int Length(); TCompression Compression(); short Level(); int Xoffset(); int Yoffset(); // Derived fields const char *filename(); const char *Hist(); // metadata #ifndef SWIG // base functionality // we don't wrap GValue, so we can't wrap these for now void meta_set( const char *field, GValue *value ) throw( VError ); void meta_get( const char *field, GValue *value_copy ) throw( VError ); #endif /*SWIG*/ // We can wrap these, fwiw gboolean meta_remove( const char *field ); GType meta_get_typeof( const char *field ); // convenience functions int meta_get_int( const char *field ) throw( VError ); double meta_get_double( const char *field ) throw( VError ); const char *meta_get_string( const char *field ) throw( VError ); void *meta_get_area( const char *field ) throw( VError ); void *meta_get_blob( const char *field, size_t *length ) throw( VError ); void meta_set( const char *field, int value ) throw( VError ); void meta_set( const char *field, double value ) throw( VError ); void meta_set( const char *field, const char *value ) throw( VError ); #ifndef SWIG // we don't wrap callbacks yet, so we can't wrap these for now void meta_set( const char *field, VCallback free_fn, void *value ) throw( VError ); void meta_set( const char *field, VCallback free_fn, void *value, size_t length ) throw( VError ); #endif /*SWIG*/ // Set header fields void initdesc( int, int, int, TBandFmt, TCoding, TType, float = 1.0, float = 1.0, int = 0, int = 0 ) throw( VError ); /* Insert automatically generated headers. */ #include "vipsc++.h" /* No point getting SWIG to wrap these ... we do this by hand later so we can * handle things like "a + 12" correctly. */ #ifndef SWIG // And some in-line operator equivalences done by hand friend VImage operator+( VImage a, VImage b ) throw( VError ) { return( a.add( b ) ); } friend VImage operator+( double a, VImage b ) throw( VError ) { return( b.lin( 1.0, a ) ); } friend VImage operator+( VImage a, double b ) throw( VError ) { return( a.lin( 1.0, b ) ); } friend VImage operator-( VImage a, VImage b ) throw( VError ) { return( a.subtract( b ) ); } friend VImage operator-( double a, VImage b ) throw( VError ) { return( b.lin( -1.0, a ) ); } friend VImage operator-( VImage a, double b ) throw( VError ) { return( a.lin( 1.0, -b ) ); } friend VImage operator*( VImage a, VImage b ) throw( VError ) { return( a.multiply( b ) ); } friend VImage operator*( double a, VImage b ) throw( VError ) { return( b.lin( a, 0.0 ) ); } friend VImage operator*( VImage a, double b ) throw( VError ) { return( a.lin( b, 0.0 ) ); } friend VImage operator/( VImage a, VImage b ) throw( VError ) { return( a.divide( b ) ); } friend VImage operator/( double a, VImage b ) throw( VError ) { return( b.pow( -1.0 ).lin( a, 0.0 ) ); } friend VImage operator/( VImage a, double b ) throw( VError ) { return( a.lin( 1.0/b, 0.0 ) ); } friend VImage operator%( VImage a, VImage b ) throw( VError ) { return( a.remainder( b ) ); } friend VImage operator%( VImage a, double b ) throw( VError ) { return( a.remainder( b ) ); } friend VImage operator<( VImage a, VImage b ) throw( VError ) { return( a.less( b ) ); } friend VImage operator<( double a, VImage b ) throw( VError ) { return( b.more( a ) ); } friend VImage operator<( VImage a, double b ) throw( VError ) { return( a.less( b ) ); } friend VImage operator<=( VImage a, VImage b ) throw( VError ) { return( a.lesseq( b ) ); } friend VImage operator<=( double a, VImage b ) throw( VError ) { return( b.moreeq( a ) ); } friend VImage operator<=( VImage a, double b ) throw( VError ) { return( a.lesseq( b ) ); } friend VImage operator>( VImage a, VImage b ) throw( VError ) { return( a.more( b ) ); } friend VImage operator>( double a, VImage b ) throw( VError ) { return( b.less( a ) ); } friend VImage operator>( VImage a, double b ) throw( VError ) { return( a.more( b ) ); } friend VImage operator>=( VImage a, VImage b ) throw( VError ) { return( a.moreeq( b ) ); } friend VImage operator>=( double a, VImage b ) throw( VError ) { return( b.lesseq( a ) ); } friend VImage operator>=( VImage a, double b ) throw( VError ) { return( a.moreeq( b ) ); } friend VImage operator==( VImage a, VImage b ) throw( VError ) { return( a.equal( b ) ); } friend VImage operator==( double a, VImage b ) throw( VError ) { return( b.equal( a ) ); } friend VImage operator==( VImage a, double b ) throw( VError ) { return( a.equal( b ) ); } friend VImage operator!=( VImage a, VImage b ) throw( VError ) { return( a.notequal( b ) ); } friend VImage operator!=( double a, VImage b ) throw( VError ) { return( b.notequal( a ) ); } friend VImage operator!=( VImage a, double b ) throw( VError ) { return( a.notequal( b ) ); } friend VImage operator&( VImage a, VImage b ) throw( VError ) { return( a.andimage( b ) ); } friend VImage operator&( int a, VImage b ) throw( VError ) { return( b.andimage( a ) ); } friend VImage operator&( VImage a, int b ) throw( VError ) { return( a.andimage( b ) ); } friend VImage operator|( VImage a, VImage b ) throw( VError ) { return( a.orimage( b ) ); } friend VImage operator|( int a, VImage b ) throw( VError ) { return( b.orimage( a ) ); } friend VImage operator|( VImage a, int b ) throw( VError ) { return( a.orimage( b ) ); } friend VImage operator^( VImage a, VImage b ) throw( VError ) { return( a.eorimage( b ) ); } friend VImage operator^( int a, VImage b ) throw( VError ) { return( b.eorimage( a ) ); } friend VImage operator^( VImage a, int b ) throw( VError ) { return( a.eorimage( b ) ); } friend VImage operator<<( VImage a, int b ) throw( VError ) { return( a.shiftleft( b ) ); } friend VImage operator>>( VImage a, int b ) throw( VError ) { return( a.shiftright( b ) ); } friend VImage operator-( VImage a ) throw( VError ) { return( a * -1 ); } // Type conversion: VImage to VDMask and VIMask operator VDMask() throw( VError ) { return( this->vips2mask() ); } operator VIMask() throw( VError ) { return( VIMask( VDMask( *this ) ) ); } #endif /*!SWIG*/ }; /* Don't include these when parsing for SWIG. */ #ifndef SWIG /* Class wrapping up a vargv. Member function wrappers need this. It needs to * be part of the public API in case people subclass VImage and add their own * members. */ class Vargv { // Function we are args to im__function *fn; // Base of object vector im__object *base; public: Vargv( const char *name ); ~Vargv(); // Reference to element of base im__object &data( int i = 0 ) { return( base[i] ); }; // Invoke function void call(); }; #endif /*!SWIG*/ VIPS_NAMESPACE_END // Other VIPS protos we need extern "C" { extern int im_init_world( const char *argv0 ); extern void im__print_all(); extern void im_col_Lab2XYZ( float, float, float, float *, float *, float * ); } #endif /*IM_VIMAGE_H*/ vips-7.38.5/libvipsCC/include/vips/vipsc++.h0000644000175000017500000007157512303140253015435 00000000000000 // headers for package arithmetic // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage abs() throw( VError ); VImage acos() throw( VError ); VImage add( VImage add_in2 ) throw( VError ); VImage asin() throw( VError ); VImage atan() throw( VError ); double avg() throw( VError ); double point( char* point_interpolate, double point_x, double point_y, int point_band ) throw( VError ); double point_bilinear( double point_bilinear_x, double point_bilinear_y, int point_bilinear_band ) throw( VError ); VImage bandmean() throw( VError ); VImage ceil() throw( VError ); VImage cos() throw( VError ); VImage cross_phase( VImage cross_phase_in2 ) throw( VError ); double deviate() throw( VError ); VImage divide( VImage divide_in2 ) throw( VError ); VImage exp10() throw( VError ); VImage expn( double expn_x ) throw( VError ); VImage expn( std::vector expn_v ) throw( VError ); VImage exp() throw( VError ); VImage floor() throw( VError ); VImage invert() throw( VError ); VImage lin( double lin_a, double lin_b ) throw( VError ); static VImage linreg( std::vector linreg_ins, std::vector linreg_xs ) throw( VError ); VImage lin( std::vector lin_a, std::vector lin_b ) throw( VError ); VImage log10() throw( VError ); VImage log() throw( VError ); double max() throw( VError ); std::complex maxpos() throw( VError ); double maxpos_avg( double& maxpos_avg_y, double& maxpos_avg_out ) throw( VError ); VDMask measure( int measure_x, int measure_y, int measure_w, int measure_h, int measure_h_patches, int measure_v_patches ) throw( VError ); double min() throw( VError ); std::complex minpos() throw( VError ); VImage multiply( VImage multiply_in2 ) throw( VError ); VImage pow( double pow_x ) throw( VError ); VImage pow( std::vector pow_v ) throw( VError ); VImage recomb( VDMask recomb_matrix ) throw( VError ); VImage remainder( VImage remainder_in2 ) throw( VError ); VImage remainder( double remainder_x ) throw( VError ); VImage remainder( std::vector remainder_x ) throw( VError ); VImage rint() throw( VError ); VImage sign() throw( VError ); VImage sin() throw( VError ); VDMask stats() throw( VError ); VImage subtract( VImage subtract_in2 ) throw( VError ); VImage tan() throw( VError ); // headers for package cimg // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage greyc( int greyc_iterations, double greyc_amplitude, double greyc_sharpness, double greyc_anisotropy, double greyc_alpha, double greyc_sigma, double greyc_dl, double greyc_da, double greyc_gauss_prec, int greyc_interpolation, int greyc_fast_approx ) throw( VError ); VImage greyc_mask( VImage greyc_mask_mask, int greyc_mask_iterations, double greyc_mask_amplitude, double greyc_mask_sharpness, double greyc_mask_anisotropy, double greyc_mask_alpha, double greyc_mask_sigma, double greyc_mask_dl, double greyc_mask_da, double greyc_mask_gauss_prec, int greyc_mask_interpolation, int greyc_mask_fast_approx ) throw( VError ); // headers for package colour // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage LCh2Lab() throw( VError ); VImage LCh2UCS() throw( VError ); VImage Lab2LCh() throw( VError ); VImage Lab2LabQ() throw( VError ); VImage Lab2LabS() throw( VError ); VImage Lab2UCS() throw( VError ); VImage Lab2XYZ() throw( VError ); VImage Lab2XYZ_temp( double Lab2XYZ_temp_X0, double Lab2XYZ_temp_Y0, double Lab2XYZ_temp_Z0 ) throw( VError ); VImage Lab2disp( VDisplay Lab2disp_disp ) throw( VError ); VImage LabQ2LabS() throw( VError ); VImage LabQ2Lab() throw( VError ); VImage LabQ2XYZ() throw( VError ); VImage LabQ2disp( VDisplay LabQ2disp_disp ) throw( VError ); VImage LabS2LabQ() throw( VError ); VImage LabS2Lab() throw( VError ); VImage UCS2LCh() throw( VError ); VImage UCS2Lab() throw( VError ); VImage UCS2XYZ() throw( VError ); VImage XYZ2Lab() throw( VError ); VImage XYZ2Lab_temp( double XYZ2Lab_temp_X0, double XYZ2Lab_temp_Y0, double XYZ2Lab_temp_Z0 ) throw( VError ); VImage XYZ2UCS() throw( VError ); VImage XYZ2Yxy() throw( VError ); VImage XYZ2disp( VDisplay XYZ2disp_disp ) throw( VError ); VImage XYZ2sRGB() throw( VError ); VImage Yxy2XYZ() throw( VError ); VImage dE00_fromLab( VImage dE00_fromLab_in2 ) throw( VError ); VImage dECMC_fromLab( VImage dECMC_fromLab_in2 ) throw( VError ); VImage dECMC_fromdisp( VImage dECMC_fromdisp_in2, VDisplay dECMC_fromdisp_disp ) throw( VError ); VImage dE_fromLab( VImage dE_fromLab_in2 ) throw( VError ); VImage dE_fromXYZ( VImage dE_fromXYZ_in2 ) throw( VError ); VImage dE_fromdisp( VImage dE_fromdisp_in2, VDisplay dE_fromdisp_disp ) throw( VError ); VImage disp2Lab( VDisplay disp2Lab_disp ) throw( VError ); VImage disp2XYZ( VDisplay disp2XYZ_disp ) throw( VError ); VImage float2rad() throw( VError ); VImage icc_ac2rc( char* icc_ac2rc_profile ) throw( VError ); VImage icc_export_depth( int icc_export_depth_depth, char* icc_export_depth_output_profile, int icc_export_depth_intent ) throw( VError ); VImage icc_import( char* icc_import_input_profile, int icc_import_intent ) throw( VError ); VImage icc_import_embedded( int icc_import_embedded_intent ) throw( VError ); VImage icc_transform( char* icc_transform_input_profile, char* icc_transform_output_profile, int icc_transform_intent ) throw( VError ); VImage lab_morph( VDMask lab_morph_greyscale, double lab_morph_L_offset, double lab_morph_L_scale, double lab_morph_a_scale, double lab_morph_b_scale ) throw( VError ); VImage rad2float() throw( VError ); VImage sRGB2XYZ() throw( VError ); // headers for package conversion // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 static VImage gaussnoise( int gaussnoise_xsize, int gaussnoise_ysize, double gaussnoise_mean, double gaussnoise_sigma ) throw( VError ); VImage bandjoin( VImage bandjoin_in2 ) throw( VError ); static VImage black( int black_x_size, int black_y_size, int black_bands ) throw( VError ); VImage c2amph() throw( VError ); VImage c2imag() throw( VError ); VImage c2real() throw( VError ); VImage c2rect() throw( VError ); VImage clip2fmt( int clip2fmt_ofmt ) throw( VError ); VImage copy() throw( VError ); VImage copy_file() throw( VError ); VImage copy_morph( int copy_morph_Bands, int copy_morph_BandFmt, int copy_morph_Coding ) throw( VError ); VImage copy_swap() throw( VError ); VImage copy_set( int copy_set_Type, double copy_set_Xres, double copy_set_Yres, int copy_set_Xoffset, int copy_set_Yoffset ) throw( VError ); VImage extract_area( int extract_area_left, int extract_area_top, int extract_area_width, int extract_area_height ) throw( VError ); VImage extract_areabands( int extract_areabands_left, int extract_areabands_top, int extract_areabands_width, int extract_areabands_height, int extract_areabands_band, int extract_areabands_nbands ) throw( VError ); VImage extract_band( int extract_band_band ) throw( VError ); VImage extract_bands( int extract_bands_band, int extract_bands_nbands ) throw( VError ); VImage extract( int extract_left, int extract_top, int extract_width, int extract_height, int extract_band ) throw( VError ); VImage falsecolour() throw( VError ); VImage fliphor() throw( VError ); VImage flipver() throw( VError ); static VImage gbandjoin( std::vector gbandjoin_in ) throw( VError ); VImage grid( int grid_tile_height, int grid_across, int grid_down ) throw( VError ); VImage insert( VImage insert_sub, int insert_x, int insert_y ) throw( VError ); VImage insert( VImage insert_sub, std::vector insert_x, std::vector insert_y ) throw( VError ); VImage insert_noexpand( VImage insert_noexpand_sub, int insert_noexpand_x, int insert_noexpand_y ) throw( VError ); VImage embed( int embed_type, int embed_x, int embed_y, int embed_width, int embed_height ) throw( VError ); VImage lrjoin( VImage lrjoin_in2 ) throw( VError ); VImage msb() throw( VError ); VImage msb_band( int msb_band_band ) throw( VError ); VImage replicate( int replicate_across, int replicate_down ) throw( VError ); VImage ri2c( VImage ri2c_in2 ) throw( VError ); VImage rot180() throw( VError ); VImage rot270() throw( VError ); VImage rot90() throw( VError ); VImage scale() throw( VError ); VImage scaleps() throw( VError ); VImage subsample( int subsample_xshrink, int subsample_yshrink ) throw( VError ); char* system( char* system_command ) throw( VError ); VImage system_image( char* system_image_in_format, char* system_image_out_format, char* system_image_command, char*& system_image_log ) throw( VError ); VImage tbjoin( VImage tbjoin_in2 ) throw( VError ); static VImage text( char* text_text, char* text_font, int text_width, int text_alignment, int text_dpi ) throw( VError ); VImage wrap( int wrap_x, int wrap_y ) throw( VError ); VImage zoom( int zoom_xfac, int zoom_yfac ) throw( VError ); // headers for package convolution // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage aconvsep( VDMask aconvsep_matrix, int aconvsep_n_layers ) throw( VError ); VImage aconv( VDMask aconv_matrix, int aconv_n_layers, int aconv_cluster ) throw( VError ); VImage addgnoise( double addgnoise_sigma ) throw( VError ); VImage compass( VIMask compass_matrix ) throw( VError ); VImage contrast_surface( int contrast_surface_half_win_size, int contrast_surface_spacing ) throw( VError ); VImage conv( VIMask conv_matrix ) throw( VError ); VImage conv( VDMask conv_matrix ) throw( VError ); VImage convsep( VIMask convsep_matrix ) throw( VError ); VImage convsep( VDMask convsep_matrix ) throw( VError ); VImage fastcor( VImage fastcor_in2 ) throw( VError ); VImage gradcor( VImage gradcor_in2 ) throw( VError ); VImage gradient( VIMask gradient_matrix ) throw( VError ); VImage grad_x() throw( VError ); VImage grad_y() throw( VError ); VImage lindetect( VIMask lindetect_matrix ) throw( VError ); VImage sharpen( int sharpen_mask_size, double sharpen_x1, double sharpen_y2, double sharpen_y3, double sharpen_m1, double sharpen_m2 ) throw( VError ); VImage spcor( VImage spcor_in2 ) throw( VError ); // headers for package deprecated // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage argb2rgba() throw( VError ); VImage flood_copy( int flood_copy_start_x, int flood_copy_start_y, std::vector flood_copy_ink ) throw( VError ); VImage flood_blob_copy( int flood_blob_copy_start_x, int flood_blob_copy_start_y, std::vector flood_blob_copy_ink ) throw( VError ); VImage flood_other_copy( VImage flood_other_copy_mark, int flood_other_copy_start_x, int flood_other_copy_start_y, int flood_other_copy_serial ) throw( VError ); VImage clip() throw( VError ); VImage c2ps() throw( VError ); VImage resize_linear( int resize_linear_X, int resize_linear_Y ) throw( VError ); VImage cmulnorm( VImage cmulnorm_in2 ) throw( VError ); VImage fav4( VImage fav4_in2, VImage fav4_in3, VImage fav4_in4 ) throw( VError ); VImage gadd( double gadd_a, double gadd_b, VImage gadd_in2, double gadd_c ) throw( VError ); VImage icc_export( char* icc_export_output_profile, int icc_export_intent ) throw( VError ); VImage litecor( VImage litecor_white, int litecor_clip, double litecor_factor ) throw( VError ); VImage affine( double affine_a, double affine_b, double affine_c, double affine_d, double affine_dx, double affine_dy, int affine_x, int affine_y, int affine_w, int affine_h ) throw( VError ); VImage clip2c() throw( VError ); VImage clip2cm() throw( VError ); VImage clip2d() throw( VError ); VImage clip2dcm() throw( VError ); VImage clip2f() throw( VError ); VImage clip2i() throw( VError ); VImage convsub( VIMask convsub_matrix, int convsub_xskip, int convsub_yskip ) throw( VError ); VImage convf( VDMask convf_matrix ) throw( VError ); VImage convsepf( VDMask convsepf_matrix ) throw( VError ); VImage clip2s() throw( VError ); VImage clip2ui() throw( VError ); VImage insertplace( VImage insertplace_sub, std::vector insertplace_x, std::vector insertplace_y ) throw( VError ); VImage clip2us() throw( VError ); VImage slice( double slice_thresh1, double slice_thresh2 ) throw( VError ); VImage segment( int& segment_segments ) throw( VError ); void line( int line_x1, int line_y1, int line_x2, int line_y2, int line_pelval ) throw( VError ); VImage thresh( double thresh_threshold ) throw( VError ); VImage convf_raw( VDMask convf_raw_matrix ) throw( VError ); VImage conv_raw( VIMask conv_raw_matrix ) throw( VError ); VImage contrast_surface_raw( int contrast_surface_raw_half_win_size, int contrast_surface_raw_spacing ) throw( VError ); VImage convsepf_raw( VDMask convsepf_raw_matrix ) throw( VError ); VImage convsep_raw( VIMask convsep_raw_matrix ) throw( VError ); VImage fastcor_raw( VImage fastcor_raw_in2 ) throw( VError ); VImage gradcor_raw( VImage gradcor_raw_in2 ) throw( VError ); VImage spcor_raw( VImage spcor_raw_in2 ) throw( VError ); VImage lhisteq_raw( int lhisteq_raw_width, int lhisteq_raw_height ) throw( VError ); VImage stdif_raw( double stdif_raw_a, double stdif_raw_m0, double stdif_raw_b, double stdif_raw_s0, int stdif_raw_xw, int stdif_raw_yw ) throw( VError ); VImage rank_raw( int rank_raw_xsize, int rank_raw_ysize, int rank_raw_n ) throw( VError ); VImage dilate_raw( VIMask dilate_raw_mask ) throw( VError ); VImage erode_raw( VIMask erode_raw_mask ) throw( VError ); VImage similarity_area( double similarity_area_a, double similarity_area_b, double similarity_area_dx, double similarity_area_dy, int similarity_area_x, int similarity_area_y, int similarity_area_w, int similarity_area_h ) throw( VError ); VImage similarity( double similarity_a, double similarity_b, double similarity_dx, double similarity_dy ) throw( VError ); static VImage mask2vips( VDMask mask2vips_input ) throw( VError ); VDMask vips2mask() throw( VError ); void insertplace( VImage insertplace_sub, int insertplace_x, int insertplace_y ) throw( VError ); void circle( int circle_cx, int circle_cy, int circle_radius, int circle_intensity ) throw( VError ); VImage andimage( VImage andimage_in2 ) throw( VError ); VImage andimage( int andimage_c ) throw( VError ); VImage andimage( std::vector andimage_vec ) throw( VError ); VImage orimage( VImage orimage_in2 ) throw( VError ); VImage orimage( int orimage_c ) throw( VError ); VImage orimage( std::vector orimage_vec ) throw( VError ); VImage eorimage( VImage eorimage_in2 ) throw( VError ); VImage eorimage( int eorimage_c ) throw( VError ); VImage eorimage( std::vector eorimage_vec ) throw( VError ); VImage shiftleft( std::vector shiftleft_vec ) throw( VError ); VImage shiftleft( int shiftleft_c ) throw( VError ); VImage shiftright( std::vector shiftright_vec ) throw( VError ); VImage shiftright( int shiftright_c ) throw( VError ); VImage blend( VImage blend_in1, VImage blend_in2 ) throw( VError ); VImage equal( VImage equal_in2 ) throw( VError ); VImage equal( std::vector equal_vec ) throw( VError ); VImage equal( double equal_c ) throw( VError ); VImage ifthenelse( VImage ifthenelse_in1, VImage ifthenelse_in2 ) throw( VError ); VImage less( VImage less_in2 ) throw( VError ); VImage less( std::vector less_vec ) throw( VError ); VImage less( double less_c ) throw( VError ); VImage lesseq( VImage lesseq_in2 ) throw( VError ); VImage lesseq( std::vector lesseq_vec ) throw( VError ); VImage lesseq( double lesseq_c ) throw( VError ); VImage more( VImage more_in2 ) throw( VError ); VImage more( std::vector more_vec ) throw( VError ); VImage more( double more_c ) throw( VError ); VImage moreeq( VImage moreeq_in2 ) throw( VError ); VImage moreeq( std::vector moreeq_vec ) throw( VError ); VImage moreeq( double moreeq_c ) throw( VError ); VImage notequal( VImage notequal_in2 ) throw( VError ); VImage notequal( std::vector notequal_vec ) throw( VError ); VImage notequal( double notequal_c ) throw( VError ); VImage quadratic( VImage quadratic_coeff ) throw( VError ); // headers for package format // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 static VImage csv2vips( char* csv2vips_filename ) throw( VError ); static VImage fits2vips( char* fits2vips_in ) throw( VError ); static VImage jpeg2vips( char* jpeg2vips_in ) throw( VError ); static VImage magick2vips( char* magick2vips_in ) throw( VError ); static VImage png2vips( char* png2vips_in ) throw( VError ); static VImage exr2vips( char* exr2vips_in ) throw( VError ); static VImage ppm2vips( char* ppm2vips_filename ) throw( VError ); static VImage analyze2vips( char* analyze2vips_filename ) throw( VError ); static VImage tiff2vips( char* tiff2vips_in ) throw( VError ); void vips2csv( char* vips2csv_filename ) throw( VError ); void vips2dz( char* vips2dz_out ) throw( VError ); void vips2jpeg( char* vips2jpeg_out ) throw( VError ); void vips2mimejpeg( int vips2mimejpeg_qfac ) throw( VError ); void vips2png( char* vips2png_out ) throw( VError ); void vips2ppm( char* vips2ppm_filename ) throw( VError ); void vips2tiff( char* vips2tiff_out ) throw( VError ); // headers for package freq_filt // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 static VImage create_fmask( int create_fmask_width, int create_fmask_height, int create_fmask_type, double create_fmask_p1, double create_fmask_p2, double create_fmask_p3, double create_fmask_p4, double create_fmask_p5 ) throw( VError ); VImage disp_ps() throw( VError ); VImage flt_image_freq( int flt_image_freq_type, double flt_image_freq_p1, double flt_image_freq_p2, double flt_image_freq_p3, double flt_image_freq_p4, double flt_image_freq_p5 ) throw( VError ); static VImage fractsurf( int fractsurf_size, double fractsurf_dimension ) throw( VError ); VImage freqflt( VImage freqflt_mask ) throw( VError ); VImage fwfft() throw( VError ); VImage rotquad() throw( VError ); VImage invfft() throw( VError ); VImage phasecor_fft( VImage phasecor_fft_in2 ) throw( VError ); VImage invfftr() throw( VError ); // headers for package histograms_lut // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage gammacorrect( double gammacorrect_exponent ) throw( VError ); VImage heq( int heq_band_number ) throw( VError ); VImage hist( int hist_band_number ) throw( VError ); VImage histcum() throw( VError ); VImage histeq() throw( VError ); VImage hist_indexed( VImage hist_indexed_value ) throw( VError ); VImage histgr( int histgr_band_number ) throw( VError ); VImage histnD( int histnD_bins ) throw( VError ); VImage histnorm() throw( VError ); VImage histplot() throw( VError ); VImage histspec( VImage histspec_ref ) throw( VError ); VImage hsp( VImage hsp_ref ) throw( VError ); static VImage identity( int identity_nbands ) throw( VError ); static VImage identity_ushort( int identity_ushort_nbands, int identity_ushort_size ) throw( VError ); int ismonotonic() throw( VError ); VImage lhisteq( int lhisteq_width, int lhisteq_height ) throw( VError ); int mpercent( double mpercent_percent ) throw( VError ); static VImage invertlut( VDMask invertlut_measures, int invertlut_lut_size ) throw( VError ); static VImage buildlut( VDMask buildlut_xyes ) throw( VError ); VImage maplut( VImage maplut_lut ) throw( VError ); VImage project( VImage& project_vout ) throw( VError ); VImage stdif( double stdif_a, double stdif_m0, double stdif_b, double stdif_s0, int stdif_xw, int stdif_yw ) throw( VError ); VImage tone_analyse( double tone_analyse_Ps, double tone_analyse_Pm, double tone_analyse_Ph, double tone_analyse_S, double tone_analyse_M, double tone_analyse_H ) throw( VError ); static VImage tone_build( double tone_build_Lb, double tone_build_Lw, double tone_build_Ps, double tone_build_Pm, double tone_build_Ph, double tone_build_S, double tone_build_M, double tone_build_H ) throw( VError ); static VImage tone_build_range( int tone_build_range_in_max, int tone_build_range_out_max, double tone_build_range_Lb, double tone_build_range_Lw, double tone_build_range_Ps, double tone_build_range_Pm, double tone_build_range_Ph, double tone_build_range_S, double tone_build_range_M, double tone_build_range_H ) throw( VError ); VImage tone_map( VImage tone_map_lut ) throw( VError ); // headers for package inplace // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 void draw_circle( int draw_circle_cx, int draw_circle_cy, int draw_circle_radius, int draw_circle_fill, std::vector draw_circle_ink ) throw( VError ); void draw_rect( int draw_rect_left, int draw_rect_top, int draw_rect_width, int draw_rect_height, int draw_rect_fill, std::vector draw_rect_ink ) throw( VError ); void draw_line( int draw_line_x1, int draw_line_y1, int draw_line_x2, int draw_line_y2, std::vector draw_line_ink ) throw( VError ); void draw_point( int draw_point_x, int draw_point_y, std::vector draw_point_ink ) throw( VError ); void draw_smudge( int draw_smudge_left, int draw_smudge_top, int draw_smudge_width, int draw_smudge_height ) throw( VError ); void draw_flood( int draw_flood_x, int draw_flood_y, std::vector draw_flood_ink ) throw( VError ); void draw_flood_blob( int draw_flood_blob_x, int draw_flood_blob_y, std::vector draw_flood_blob_ink ) throw( VError ); void draw_flood_other( VImage draw_flood_other_test, int draw_flood_other_x, int draw_flood_other_y, int draw_flood_other_serial ) throw( VError ); void draw_image( VImage draw_image_sub, int draw_image_x, int draw_image_y ) throw( VError ); void draw_mask( VImage draw_mask_mask, int draw_mask_x, int draw_mask_y, std::vector draw_mask_ink ) throw( VError ); VImage line( VImage line_mask, VImage line_ink, std::vector line_x1, std::vector line_y1, std::vector line_x2, std::vector line_y2 ) throw( VError ); // headers for package iofuncs // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 static VImage binfile( char* binfile_filename, int binfile_width, int binfile_height, int binfile_bands, int binfile_offset ) throw( VError ); VImage cache( int cache_tile_width, int cache_tile_height, int cache_max_tiles ) throw( VError ); char* getext() throw( VError ); int header_get_typeof( char* header_get_typeof_field ) throw( VError ); int header_int( char* header_int_field ) throw( VError ); double header_double( char* header_double_field ) throw( VError ); char* header_string( char* header_string_field ) throw( VError ); char* history_get() throw( VError ); void printdesc() throw( VError ); // headers for package mask // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 // headers for package morphology // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 double cntlines( int cntlines_direction ) throw( VError ); VImage dilate( VIMask dilate_mask ) throw( VError ); VImage rank( int rank_xsize, int rank_ysize, int rank_n ) throw( VError ); static VImage rank_image( std::vector rank_image_in, int rank_image_index ) throw( VError ); static VImage maxvalue( std::vector maxvalue_in ) throw( VError ); VImage label_regions( int& label_regions_segments ) throw( VError ); VImage zerox( int zerox_flag ) throw( VError ); VImage erode( VIMask erode_mask ) throw( VError ); VImage profile( int profile_direction ) throw( VError ); // headers for package mosaicing // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage align_bands() throw( VError ); double correl( VImage correl_sec, int correl_xref, int correl_yref, int correl_xsec, int correl_ysec, int correl_hwindowsize, int correl_hsearchsize, int& correl_x, int& correl_y ) throw( VError ); int _find_lroverlap( VImage _find_lroverlap_sec, int _find_lroverlap_bandno, int _find_lroverlap_xr, int _find_lroverlap_yr, int _find_lroverlap_xs, int _find_lroverlap_ys, int _find_lroverlap_halfcorrelation, int _find_lroverlap_halfarea, int& _find_lroverlap_dy0, double& _find_lroverlap_scale1, double& _find_lroverlap_angle1, double& _find_lroverlap_dx1, double& _find_lroverlap_dy1 ) throw( VError ); int _find_tboverlap( VImage _find_tboverlap_sec, int _find_tboverlap_bandno, int _find_tboverlap_xr, int _find_tboverlap_yr, int _find_tboverlap_xs, int _find_tboverlap_ys, int _find_tboverlap_halfcorrelation, int _find_tboverlap_halfarea, int& _find_tboverlap_dy0, double& _find_tboverlap_scale1, double& _find_tboverlap_angle1, double& _find_tboverlap_dx1, double& _find_tboverlap_dy1 ) throw( VError ); VImage global_balance( double global_balance_gamma ) throw( VError ); VImage global_balancef( double global_balancef_gamma ) throw( VError ); VImage lrmerge( VImage lrmerge_sec, int lrmerge_dx, int lrmerge_dy, int lrmerge_mwidth ) throw( VError ); VImage lrmerge1( VImage lrmerge1_sec, int lrmerge1_xr1, int lrmerge1_yr1, int lrmerge1_xs1, int lrmerge1_ys1, int lrmerge1_xr2, int lrmerge1_yr2, int lrmerge1_xs2, int lrmerge1_ys2, int lrmerge1_mwidth ) throw( VError ); VImage lrmosaic( VImage lrmosaic_sec, int lrmosaic_bandno, int lrmosaic_xr, int lrmosaic_yr, int lrmosaic_xs, int lrmosaic_ys, int lrmosaic_halfcorrelation, int lrmosaic_halfarea, int lrmosaic_balancetype, int lrmosaic_mwidth ) throw( VError ); VImage lrmosaic1( VImage lrmosaic1_sec, int lrmosaic1_bandno, int lrmosaic1_xr1, int lrmosaic1_yr1, int lrmosaic1_xs1, int lrmosaic1_ys1, int lrmosaic1_xr2, int lrmosaic1_yr2, int lrmosaic1_xs2, int lrmosaic1_ys2, int lrmosaic1_halfcorrelation, int lrmosaic1_halfarea, int lrmosaic1_balancetype, int lrmosaic1_mwidth ) throw( VError ); VImage match_linear( VImage match_linear_sec, int match_linear_xref1, int match_linear_yref1, int match_linear_xsec1, int match_linear_ysec1, int match_linear_xref2, int match_linear_yref2, int match_linear_xsec2, int match_linear_ysec2 ) throw( VError ); VImage match_linear_search( VImage match_linear_search_sec, int match_linear_search_xref1, int match_linear_search_yref1, int match_linear_search_xsec1, int match_linear_search_ysec1, int match_linear_search_xref2, int match_linear_search_yref2, int match_linear_search_xsec2, int match_linear_search_ysec2, int match_linear_search_hwindowsize, int match_linear_search_hsearchsize ) throw( VError ); double maxpos_subpel( double& maxpos_subpel_y ) throw( VError ); VImage remosaic( char* remosaic_old_str, char* remosaic_new_str ) throw( VError ); VImage tbmerge( VImage tbmerge_sec, int tbmerge_dx, int tbmerge_dy, int tbmerge_mwidth ) throw( VError ); VImage tbmerge1( VImage tbmerge1_sec, int tbmerge1_xr1, int tbmerge1_yr1, int tbmerge1_xs1, int tbmerge1_ys1, int tbmerge1_xr2, int tbmerge1_yr2, int tbmerge1_xs2, int tbmerge1_ys2, int tbmerge1_mwidth ) throw( VError ); VImage tbmosaic( VImage tbmosaic_sec, int tbmosaic_bandno, int tbmosaic_xr, int tbmosaic_yr, int tbmosaic_xs, int tbmosaic_ys, int tbmosaic_halfcorrelation, int tbmosaic_halfarea, int tbmosaic_balancetype, int tbmosaic_mwidth ) throw( VError ); VImage tbmosaic1( VImage tbmosaic1_sec, int tbmosaic1_bandno, int tbmosaic1_xr1, int tbmosaic1_yr1, int tbmosaic1_xs1, int tbmosaic1_ys1, int tbmosaic1_xr2, int tbmosaic1_yr2, int tbmosaic1_xs2, int tbmosaic1_ys2, int tbmosaic1_halfcorrelation, int tbmosaic1_halfarea, int tbmosaic1_balancetype, int tbmosaic1_mwidth ) throw( VError ); // headers for package other // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage benchmark() throw( VError ); double benchmark2() throw( VError ); VImage benchmarkn( int benchmarkn_n ) throw( VError ); static VImage eye( int eye_xsize, int eye_ysize, double eye_factor ) throw( VError ); static VImage grey( int grey_xsize, int grey_ysize ) throw( VError ); static VImage feye( int feye_xsize, int feye_ysize, double feye_factor ) throw( VError ); static VImage fgrey( int fgrey_xsize, int fgrey_ysize ) throw( VError ); static VImage fzone( int fzone_size ) throw( VError ); static VImage make_xy( int make_xy_xsize, int make_xy_ysize ) throw( VError ); static VImage sines( int sines_xsize, int sines_ysize, double sines_horfreq, double sines_verfreq ) throw( VError ); static VImage zone( int zone_size ) throw( VError ); // headers for package resample // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 VImage rightshift_size( int rightshift_size_xshift, int rightshift_size_yshift, int rightshift_size_band_fmt ) throw( VError ); VImage shrink( double shrink_xfac, double shrink_yfac ) throw( VError ); VImage stretch3( double stretch3_xdisp, double stretch3_ydisp ) throw( VError ); VImage affinei( char* affinei_interpolate, double affinei_a, double affinei_b, double affinei_c, double affinei_d, double affinei_dx, double affinei_dy, int affinei_x, int affinei_y, int affinei_w, int affinei_h ) throw( VError ); VImage affinei_all( char* affinei_all_interpolate, double affinei_all_a, double affinei_all_b, double affinei_all_c, double affinei_all_d, double affinei_all_dx, double affinei_all_dy ) throw( VError ); // headers for package video // this file automatically generated from // VIPS library 7.34.0-Tue Jun 11 11:18:24 BST 2013 static VImage video_test( int video_test_brightness, int video_test_error ) throw( VError ); static VImage video_v4l1( char* video_v4l1_device, int video_v4l1_channel, int video_v4l1_brightness, int video_v4l1_colour, int video_v4l1_contrast, int video_v4l1_hue, int video_v4l1_ngrabs ) throw( VError ); vips-7.38.5/libvipsCC/include/vips/vipscpp.h0000644000175000017500000000213212303140253015626 00000000000000// Include file to get all VIPS C++ bindings /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* This header is just for compatibility with the pre-namespace C++ bindings. */ #ifndef IM_VIPSCPP_H #define IM_VIPSCPP_H #include using namespace vips; #endif /*IM_VIPSCPP_H*/ vips-7.38.5/libvipsCC/include/vips/Makefile.in0000644000175000017500000004737712303144056016067 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvipsCC/include/vips DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(pkginclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ pkginclude_HEADERS = \ VDisplay.h \ VError.h \ VImage.h \ VMask.h \ vipscpp.h \ vips \ vipsc++.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvipsCC/include/vips/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvipsCC/include/vips/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgincludeHEADERS install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgincludeHEADERS # swap the 'awk' line for this: # awk '{if($$1!="deprecated") print $$1}'` ; \ # to not generate the wrappers for deprecated functions vipsc++.h: packages=`vips list packages | \ awk '{print $$1}'` ; \ echo > vipsc++.h ; \ for name in $$packages; do \ echo "// headers for package $$name" >> vipsc++.h ; \ vips cpph $$name >> vipsc++.h ; \ echo >> vipsc++.h ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvipsCC/include/vips/Makefile.am0000644000175000017500000000076612303140253016040 00000000000000pkginclude_HEADERS = \ VDisplay.h \ VError.h \ VImage.h \ VMask.h \ vipscpp.h \ vips \ vipsc++.h # swap the 'awk' line for this: # awk '{if($$1!="deprecated") print $$1}'` ; \ # to not generate the wrappers for deprecated functions vipsc++.h: packages=`vips list packages | \ awk '{print $$1}'` ; \ echo > vipsc++.h ; \ for name in $$packages; do \ echo "// headers for package $$name" >> vipsc++.h ; \ vips cpph $$name >> vipsc++.h ; \ echo >> vipsc++.h ; \ done vips-7.38.5/libvipsCC/include/vips/vips0000644000175000017500000000433612303140253014705 00000000000000// Include file to get all VIPS C++ bindings /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_VIPS #define IM_VIPS #include // VImage.h uses GValue for metadata #include // If we have already #included the C vips headers, we have to undef a load of // stuff to stop vips's stupid macros messing up our enums #ifdef IM_VIPS_H #ifdef IM_ENABLE_DEPRECATED #undef MULTIBAND #undef B_W #undef LUMINACE #undef XRAY #undef IR #undef YUV #undef RED_ONLY #undef GREEN_ONLY #undef BLUE_ONLY #undef POWER_SPECTRUM #undef HISTOGRAM #undef LUT #undef XYZ #undef LAB #undef CMC #undef CMYK #undef LABQ #undef RGB #undef UCS #undef LCH #undef LABS #undef sRGB #undef FMTNOTSET #undef FMTUCHAR #undef FMTCHAR #undef FMTUSHORT #undef FMTSHORT #undef FMTUINT #undef FMTINT #undef FMTFLOAT #undef FMTCOMPLEX #undef FMTDOUBLE #undef FMTDPCOMPLEX #undef NOCODING #undef COLQUANT #undef LABPACK #undef LABPACK_COMPRESSED #undef RGB_COMPRESSED #undef LUM_COMPRESSED #undef NO_COMPRESSION #undef TCSF_COMPRESSION #undef JPEG_COMPRESSION #endif /*IM_ENABLE_DEPRECATED*/ #endif /*IM_VIPS_H*/ #ifdef IM_RECT_H #ifdef IM_ENABLE_DEPRECATED #undef right #undef bottom #endif /*IM_ENABLE_DEPRECATED*/ #endif /*IM_RECT_H*/ #define VIPS_NAMESPACE_START namespace vips { #define VIPS_NAMESPACE_END } #include #include #include #include #endif /*IM_VIPS*/ vips-7.38.5/libvipsCC/include/vips/VMask.h0000644000175000017500000002362612303140253015176 00000000000000/* VIPS mask class. * * Just like VImage, but we don't need dependency stuff. Instead, have a base * wrapper over *MASK, derive VMaskD and VMaskI from that, and then put * refcounting over all of them. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_VMASK_H #define IM_VMASK_H /* SWIG includes this file directly rather than going through vipscpp.h ... so * we have to define these macros here as well. */ #ifdef SWIG # define VIPS_NAMESPACE_START namespace vips { # define VIPS_NAMESPACE_END } #endif /*SWIG*/ /* Don't include these when parsing for SWIG. */ #ifndef SWIG # include # include # include #endif /*!SWIG*/ /* Wrap pointers to these, but we don't want to import all the old C API. Just * declare them. */ extern "C" { struct im__INTMASK; struct im__DOUBLEMASK; } VIPS_NAMESPACE_START /* This first section is private. Only expose the non-P versions of these * classes later on. Don't need to wrap then in SWIG either. */ #ifndef SWIG namespace _private_detail { union MASKUNION { im__INTMASK *iptr; im__DOUBLEMASK *dptr; }; // Private wrapper over *MASK - user does not see this class VPMask { friend class VMask; public: // Track type of mask with this enum VMaskType { UNASSIGNED, // Not yet set INT, // mask points to INTMASK DOUBLE // mask points to DOUBLEMASK }; MASKUNION data; // Mask pointer - INT or DOUBLE VMaskType type; // Track type too, for safety virtual ~VPMask() {}; // Duplicate virtual VPMask *dup() const = 0; // Projection functions to get MASK fields virtual int xsize() const = 0; virtual int ysize() const = 0; virtual const char *filename() const = 0; // Output virtual void ostream_print( std::ostream & ) const = 0; }; // Specialise for INTMASK class VPIMask : public VPMask { public: VPIMask( int xsize, int ysize ) throw( VError ); VPIMask( int xsize, int ysize, int scale, int offset, std::vector coeff ) throw( VError ); VPIMask( const char * ) throw( VError ); VPIMask( im__INTMASK * ); VPIMask(); virtual ~VPIMask(); VPMask *dup() const throw( VError ); void embed( im__INTMASK * ) throw( VError ); int xsize() const throw( VError ); int ysize() const throw( VError ); int scale() const throw( VError ); int offset() const throw( VError ); const char *filename() const throw( VError ); // Output virtual void ostream_print( std::ostream & ) const throw( VError ); // Extract start of array of ints int *array() const; }; // Specialise for DOUBLEMASK class VPDMask : public VPMask { public: VPDMask( int xsize, int ysize ) throw( VError ); VPDMask( int xsize, int ysize, double scale, double offset, std::vector coeff ) throw( VError ); VPDMask( const char * ) throw( VError ); VPDMask( im__DOUBLEMASK * ); VPDMask(); virtual ~VPDMask(); VPMask *dup() const throw( VError ); void embed( im__DOUBLEMASK * ) throw( VError ); int xsize() const throw( VError ); int ysize() const throw( VError ); double scale() const throw( VError ); double offset() const throw( VError ); const char *filename() const throw( VError ); // Output virtual void ostream_print( std::ostream & ) const throw( VError ); // Extract start of array of doubles double *array() const; }; } // end of namespace _private_detail inline std::ostream &operator<<( std::ostream &file, const _private_detail::VPMask &msk ) { msk.ostream_print( file ); return( file ); } #endif /*!SWIG*/ // Wrapper over VP?Mask with ref counting class VMask { protected: struct refblock { _private_detail::VPMask *pmask; // Mask: double or int int nrefs; // Refs to us refblock() : pmask(0), nrefs(1) {} virtual ~refblock() { delete pmask; } }; refblock *ref; // Make sure this is a private copy of pmask --- dup if nrefs != 1 void make_private(); public: // Constructor leaves msk uninitialised VMask() { ref = new refblock; } // Copy constructor VMask( const VMask &a ) { ref = a.ref; ref->nrefs++; } // Assignment VMask &operator=( const VMask &a ); // Destructor virtual ~VMask(); int xsize() const throw( VError ) { return( ref->pmask->xsize() ); } int ysize() const throw( VError ) { return( ref->pmask->ysize() ); } int size() const throw( VError ) { return( xsize() * ysize() ); } const char *filename() const throw( VError ) { return( ref->pmask->filename() ); } // Extract underlying type _private_detail::VPMask::VMaskType type() const { return( ref->pmask->type ); } // Extract underlying VIPS pointer _private_detail::MASKUNION mask() const { return( ref->pmask->data ); } void ostream_print( std::ostream & ) const; }; inline std::ostream &operator<<( std::ostream &file, const VMask &msk ) { msk.ostream_print( file ); return( file ); } // Need to forward ref these class VDMask; class VImage; // Wrapper over _private_detail::VPIMask with ref counting class VIMask : public VMask { public: VIMask( int xsize, int ysize ) { ref->pmask = new _private_detail::VPIMask( xsize, ysize ); } /* Don't wrap the varargs constructor. We want Python to use the vector one. */ #ifndef SWIG VIMask( int xsize, int ysize, int scale, int offset, ... ) { va_list ap; int i; std::vector coeff( xsize * ysize ); va_start( ap, offset ); for( i = 0; i < xsize * ysize; i++ ) coeff[i] = va_arg( ap, int ); va_end( ap ); ref->pmask = new _private_detail::VPIMask( xsize, ysize, scale, offset, coeff ); } #endif /*!SWIG*/ VIMask( int xsize, int ysize, int scale, int offset, std::vector coeff ) { ref->pmask = new _private_detail::VPIMask( xsize, ysize, scale, offset, coeff ); } VIMask( const char *name ) { ref->pmask = new _private_detail::VPIMask( name ); } // No mask there yet VIMask() {} int scale() { return( ((_private_detail::VPIMask *)ref->pmask)->scale() ); } int offset() { return( ((_private_detail::VPIMask *)ref->pmask)->offset() ); } // Embed INTMASK in VIMask void embed( im__INTMASK * ) throw( VError ); // Overload [] to get linear array subscript. int &operator[]( int ) throw( VError ); // Overload () to get matrix subscript. int &operator()( int x, int y ) throw( VError ) { return( (*this)[x + y*xsize()] ); } // and as a function call that SWIG can wrap int get( int i ) throw( VError ) { return( (*this)[i] ); } // Type conversion: INTMASK->DOUBLEMASK operator VDMask(); // Type conversion: INTMASK->image operator VImage(); // VIMask build functions static VIMask gauss( double, double ) throw( VError ); static VIMask gauss_sep( double, double ) throw( VError ); static VIMask log( double, double ) throw( VError ); // VIMask manipulation VIMask rotate45() throw( VError ); VIMask rotate90() throw( VError ); // Arithmetic ... cast to double, and use VDMask funcs. For some // reason, the compiler won't let us do casts to VDImage yet, so no // inlines. VDMask trn() throw( VError ); VDMask inv() throw( VError ); VDMask cat( VDMask ) throw( VError ); VDMask mul( VDMask ) throw( VError ); }; // Wrapper over _private_detail::VPDMask with ref counting class VDMask : public VMask { public: VDMask( int xsize, int ysize ) { ref->pmask = new _private_detail::VPDMask( xsize, ysize ); } /* Don't wrap the varargs constructor. We want Python to use the vector one. */ #ifndef SWIG VDMask( int xsize, int ysize, double scale, double offset, ... ) { va_list ap; int i; std::vector coeff( xsize * ysize ); va_start( ap, offset ); for( i = 0; i < xsize * ysize; i++ ) coeff[i] = va_arg( ap, double ); va_end( ap ); ref->pmask = new _private_detail::VPDMask( xsize, ysize, scale, offset, coeff ); } #endif /*!SWIG*/ VDMask( int xsize, int ysize, double scale, double offset, std::vector coeff ) { ref->pmask = new _private_detail::VPDMask( xsize, ysize, scale, offset, coeff ); } VDMask( const char *name ) { ref->pmask = new _private_detail::VPDMask( name ); } // No mask yet VDMask() { } // Embed DOUBLEMASK in VDMask void embed( im__DOUBLEMASK * ) throw( VError ); double scale() throw( VError ) { return( ((_private_detail::VPDMask *)ref->pmask)->scale() ); } double offset() throw( VError ) { return( ((_private_detail::VPDMask *)ref->pmask)->offset() ); } // Overload [] to get linear array subscript. double &operator[]( int ) throw( VError ); // Overload () to get matrix subscript. double &operator()( int x, int y ) throw( VError ) { return( (*this)[x + y*xsize()] ); } // and as a function call that SWIG can wrap double get( int i ) throw( VError ) { return( (*this)[i] ); } // Type conversion: double->int operator VIMask(); // Type conversion: DOUBLEMASK->image operator VImage() throw( VError ); // VDMask build functions static VDMask gauss( double, double ) throw( VError ); static VDMask log( double, double ) throw( VError ); // VDMask manipulation VDMask rotate45() throw( VError ); VDMask rotate90() throw( VError ); // Scale to intmask VIMask scalei() throw( VError ); // Simple arithmetic VDMask trn() throw( VError ); VDMask inv() throw( VError ); VDMask cat( VDMask ) throw( VError ); VDMask mul( VDMask ) throw( VError ); }; VIPS_NAMESPACE_END #endif /*IM_VMASK_H*/ vips-7.38.5/po/0000755000175000017500000000000012303146331010212 500000000000000vips-7.38.5/po/de.po0000644000175000017500000032233412303140253011066 00000000000000# German translation of vips. # Copyright (C) 1990-2009 Imperial College, London and others. # This file is distributed under the same license as the vips package. # Copyright (C) Chris Leick 2010, 2011. # See also http://www.gnu-darwin.org/www001/src/ports/graphics/vips/work/ # vips-7.12.4/doc/pdf/vipsmanual.pdf # msgid "" msgstr "" "Project-Id-Version: libvips-doc 7.24.5-2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-03-08 21:02+0000\n" "PO-Revision-Date: 2011-04-21 19:05+0100\n" "Last-Translator: Chris Leick \n" "Language-Team: Debian German \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libvips/arithmetic/abs.c:215 #, fuzzy msgid "absolute value of an image" msgstr "Durchschnittswert des Bildes" #: libvips/arithmetic/statistic.c:147 msgid "VIPS statistic operations" msgstr "" #: libvips/arithmetic/statistic.c:151 libvips/arithmetic/unary.c:87 #: libvips/conversion/bandmean.c:197 libvips/conversion/cast.c:474 #: libvips/conversion/tilecache.c:422 libvips/conversion/extract.c:194 #: libvips/conversion/extract.c:353 libvips/conversion/embed.c:516 #: libvips/conversion/rot.c:355 libvips/conversion/flip.c:240 #: libvips/conversion/copy.c:318 libvips/conversion/recomb.c:200 #: libvips/conversion/replicate.c:196 libvips/conversion/cache.c:106 #: libvips/conversion/bandjoin.c:171 libvips/foreign/foreign.c:1379 msgid "Input" msgstr "" #: libvips/arithmetic/statistic.c:152 libvips/conversion/cast.c:475 #: libvips/conversion/tilecache.c:423 libvips/conversion/extract.c:195 #: libvips/conversion/extract.c:354 libvips/conversion/embed.c:517 #: libvips/conversion/rot.c:356 libvips/conversion/flip.c:241 #: libvips/conversion/copy.c:319 libvips/conversion/replicate.c:197 #: libvips/conversion/cache.c:107 #, fuzzy msgid "Input image" msgstr "null Eingabebilder" #: libvips/arithmetic/im_point_bilinear.c:74 msgid "coords outside image" msgstr "Koordinaten außerhalb des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:298 msgid "absolute value" msgstr "absoluter Wert" #. Name #: libvips/arithmetic/arith_dispatch.c:317 libvips/arithmetic/add.c:186 msgid "add two images" msgstr "zwei Bilder hinzufügen" #. Name #: libvips/arithmetic/arith_dispatch.c:342 msgid "average value of image" msgstr "Durchschnittswert des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:431 msgid "standard deviation of image" msgstr "Standardabweichung des Bildes" # im_exptra() transforms element x of input to # pow(e, x) in output. #. Name #: libvips/arithmetic/arith_dispatch.c:450 msgid "10^pel of image" msgstr "10^pel des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:469 msgid "e^pel of image" msgstr "e^pel des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:498 msgid "x^pel of image" msgstr "x^pel des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:527 msgid "[x,y,z]^pel of image" msgstr "[x,y,z]^pel des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:546 libvips/arithmetic/divide.c:225 msgid "divide two images" msgstr "zwei Bilder teilen" #. Name #: libvips/arithmetic/arith_dispatch.c:565 msgid "photographic negative" msgstr "Fotonegativ" #. Name #: libvips/arithmetic/arith_dispatch.c:596 msgid "calculate a*in + b = outfile" msgstr "Berechnen von a*in + b = Ausgabedatei" #: libvips/arithmetic/arith_dispatch.c:622 msgid "vectors not equal length" msgstr "Vektoren ungleicher Länge" #. Name #: libvips/arithmetic/arith_dispatch.c:633 msgid "calculate a*in + b -> out, a and b vectors" msgstr "Berechnen von a*in + b -> out, a und b Vektoren" #. Name #: libvips/arithmetic/arith_dispatch.c:652 msgid "log10 of image" msgstr "log10 des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:671 msgid "ln of image" msgstr "ln des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:690 msgid "tan of image (angles in degrees)" msgstr "Tangens des Bildes (Winkel in Grad)" #. Name #: libvips/arithmetic/arith_dispatch.c:709 msgid "atan of image (result in degrees)" msgstr "Arkustangens des Bildes (Ergebnis in Grad)" #. Name #: libvips/arithmetic/arith_dispatch.c:728 msgid "cos of image (angles in degrees)" msgstr "Kosinus des Bildes (Winkel in Grad)" #. Name #: libvips/arithmetic/arith_dispatch.c:747 msgid "acos of image (result in degrees)" msgstr "Arkuskosinus des Bildes (Ergebnis in Grad)" # hinter diesem String folgt ein Flag. #. Name #: libvips/arithmetic/arith_dispatch.c:766 msgid "round to smallest integer value not less than" msgstr "auf kleinsten ganzzahligen Wert runden, nicht weniger als" # hinter diesem String folgt ein Flag. #. Name #: libvips/arithmetic/arith_dispatch.c:785 msgid "round to largest integer value not greater than" msgstr "auf größten ganzzahligen Wert runden, nicht größer als" # hinter diesem String folgt ein Flag. #. Name #: libvips/arithmetic/arith_dispatch.c:804 msgid "round to nearest integer value" msgstr "auf nächsten ganzzahligen Wert runden" #. Name #: libvips/arithmetic/arith_dispatch.c:823 msgid "sin of image (angles in degrees)" msgstr "Sinus des Bildes (Winkel in Grad)" #. Name #: libvips/arithmetic/arith_dispatch.c:842 msgid "average image bands" msgstr "durchschnittliche Bildbänder" #. Name #: libvips/arithmetic/arith_dispatch.c:861 msgid "unit vector in direction of value" msgstr "Einheitsvektor in Richtung des Wertes" #. Name #: libvips/arithmetic/arith_dispatch.c:880 msgid "asin of image (result in degrees)" msgstr "Arkussinus des Bildes (Ergebnis in Grad)" #. Name #: libvips/arithmetic/arith_dispatch.c:905 msgid "maximum value of image" msgstr "Maximalwert des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:940 msgid "position of maximum value of image" msgstr "Position des Maximalwerts des Bildes" #: libvips/arithmetic/arith_dispatch.c:968 msgid "position of maximum value of image, averaging in case of draw" msgstr "" "Position des Maximalwerts des Bildes, durchschnittlich im Fall des Zeichnens" #: libvips/arithmetic/arith_dispatch.c:1012 msgid "position and value of n maxima of image" msgstr "Position und Wert von n Maxima des Bildes" #: libvips/arithmetic/arith_dispatch.c:1046 msgid "position and value of n minima of image" msgstr "Position und Wert von n Minima des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:1094 msgid "measure averages of a grid of patches" msgstr "Durchschnittsmaße eine Gitters aus Flickstücken" #. Name #: libvips/arithmetic/arith_dispatch.c:1119 msgid "minimum value of image" msgstr "Minimalwert des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:1147 msgid "position of minimum value of image" msgstr "Position des Minimalwerts des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:1166 msgid "remainder after integer division" msgstr "Rest nach Ganzzahldivision" #. Name #: libvips/arithmetic/arith_dispatch.c:1195 msgid "remainder after integer division by a constant" msgstr "Rest nach Ganzzahldivision durch eine Konstante" #. Name #: libvips/arithmetic/arith_dispatch.c:1224 msgid "remainder after integer division by a vector of constants" msgstr "Rest nach Ganzzahldivision durch einen Vektor von Konstanten" #. Name #: libvips/arithmetic/arith_dispatch.c:1244 libvips/arithmetic/multiply.c:172 msgid "multiply two images" msgstr "zwei Bilder multiplizieren" #. Name #: libvips/arithmetic/arith_dispatch.c:1265 msgid "pel^x of image" msgstr "pel^x des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:1286 msgid "pel^[x,y,z] of image" msgstr "pel^[x,y,z] des Bildes" #. Name #: libvips/arithmetic/arith_dispatch.c:1317 msgid "many image statistics in one pass" msgstr "viele Bildstatistiken in einem Durchgang" #. Name #: libvips/arithmetic/arith_dispatch.c:1336 libvips/arithmetic/subtract.c:161 msgid "subtract two images" msgstr "zwei Bilder subtrahieren" #. Name #: libvips/arithmetic/arith_dispatch.c:1384 msgid "pixelwise linear regression" msgstr "bildpunktweise lineare Regression" #. Name #: libvips/arithmetic/arith_dispatch.c:1403 msgid "phase of cross power spectrum of two complex images" msgstr "Phase des Kreuzleistungsspektrums zweier komplexer Bilder" #: libvips/arithmetic/linear.c:249 #, fuzzy msgid "calculate (a * in + b)" msgstr "Berechnen von a*in + b = Ausgabedatei" #: libvips/arithmetic/linear.c:257 msgid "a" msgstr "" #: libvips/arithmetic/linear.c:258 #, fuzzy msgid "Multiply by this" msgstr "zwei Bilder multiplizieren" #: libvips/arithmetic/linear.c:264 msgid "b" msgstr "" #: libvips/arithmetic/linear.c:265 msgid "Add this" msgstr "" #: libvips/arithmetic/remainder.c:178 #, fuzzy msgid "remainder after integer division of two images" msgstr "Rest nach Ganzzahldivision" #: libvips/arithmetic/remainder.c:327 #, fuzzy msgid "remainder after integer division of an image and a constant" msgstr "Rest nach Ganzzahldivision durch eine Konstante" #: libvips/arithmetic/im_maxpos_vec.c:121 #: libvips/arithmetic/im_maxpos_vec.c:186 msgid "scalar images only" msgstr "nur skalare Bilder" #: libvips/arithmetic/im_maxpos_vec.c:126 #: libvips/arithmetic/im_maxpos_vec.c:191 msgid "single band images only" msgstr "nur Einzelbandbilder" #: libvips/arithmetic/im_maxpos_vec.c:131 #: libvips/arithmetic/im_maxpos_vec.c:196 msgid "uncoded images only" msgstr "nur unkodierte Bilder" #: libvips/arithmetic/im_maxpos_vec.c:136 #: libvips/arithmetic/im_maxpos_vec.c:201 msgid "invalid argument" msgstr "ungültiges Argument" #: libvips/arithmetic/min.c:317 msgid "find image minimum" msgstr "" #: libvips/arithmetic/min.c:325 libvips/arithmetic/arithmetic.c:382 #: libvips/arithmetic/stats.c:423 libvips/arithmetic/measure.c:202 #: libvips/arithmetic/max.c:324 libvips/arithmetic/avg.c:218 #: libvips/arithmetic/deviate.c:219 libvips/conversion/conversion.c:89 #: libvips/foreign/foreign.c:897 msgid "Output" msgstr "" #: libvips/arithmetic/min.c:326 libvips/arithmetic/max.c:325 #: libvips/arithmetic/avg.c:219 libvips/arithmetic/deviate.c:220 #, fuzzy msgid "Output value" msgstr "absoluter Wert" #: libvips/arithmetic/min.c:332 libvips/arithmetic/max.c:331 #: libvips/conversion/embed.c:522 msgid "x" msgstr "" #: libvips/arithmetic/min.c:333 msgid "Horizontal position of minimum" msgstr "" #: libvips/arithmetic/min.c:339 libvips/arithmetic/max.c:338 #: libvips/conversion/embed.c:529 msgid "y" msgstr "" #: libvips/arithmetic/min.c:340 #, fuzzy msgid "Vertical position of minimum" msgstr "Position des Minimalwerts des Bildes" #: libvips/arithmetic/boolean.c:209 msgid "a boolean operation on a pair of images" msgstr "" #: libvips/arithmetic/boolean.c:217 libvips/arithmetic/boolean.c:519 #: libvips/arithmetic/math2.c:204 libvips/arithmetic/math2.c:401 #: libvips/arithmetic/math.c:205 libvips/arithmetic/relational.c:227 #: libvips/arithmetic/relational.c:560 libvips/arithmetic/complex.c:222 #: libvips/arithmetic/complex.c:476 #, fuzzy msgid "Operation" msgstr "Beschreibung" #: libvips/arithmetic/boolean.c:218 libvips/arithmetic/boolean.c:520 msgid "boolean to perform" msgstr "" #: libvips/arithmetic/boolean.c:511 msgid "boolean operations against a constant" msgstr "" #: libvips/arithmetic/arithmetic.c:164 #, c-format msgid "not one band or %d bands" msgstr "nicht ein Band oder %d Bänder" #: libvips/arithmetic/arithmetic.c:168 libvips/histograms_lut/im_identity.c:80 #: libvips/histograms_lut/im_identity.c:143 msgid "bad bands" msgstr "falsche Bänder" #: libvips/arithmetic/arithmetic.c:324 libvips/conversion/bandary.c:131 msgid "too many input images" msgstr "zu viele Eingabebilder" #: libvips/arithmetic/arithmetic.c:378 msgid "arithmetic operations" msgstr "" #: libvips/arithmetic/arithmetic.c:383 libvips/conversion/conversion.c:90 #: libvips/foreign/foreign.c:898 #, fuzzy msgid "Output image" msgstr "zwei Bilder multiplizieren" #: libvips/arithmetic/stats.c:415 libvips/arithmetic/avg.c:210 #: libvips/arithmetic/deviate.c:211 #, fuzzy msgid "find image average" msgstr "keine Bilddaten" #: libvips/arithmetic/stats.c:424 libvips/arithmetic/measure.c:203 msgid "Output array of statistics" msgstr "" #: libvips/arithmetic/math2.c:196 msgid "pow( left, right)" msgstr "" #: libvips/arithmetic/math2.c:205 libvips/arithmetic/math2.c:402 #: libvips/arithmetic/math.c:206 msgid "math to perform" msgstr "" #: libvips/arithmetic/math2.c:393 msgid "pow( @in, @c )" msgstr "" #: libvips/arithmetic/round.c:160 msgid "perform a round function on an image" msgstr "" #: libvips/arithmetic/round.c:168 msgid "Round operation" msgstr "" #: libvips/arithmetic/round.c:169 msgid "rounding operation to perform" msgstr "" #: libvips/arithmetic/measure.c:163 #, fuzzy, c-format msgid "patch %d x %d, band %d: avg = %g, sdev = %g" msgstr "Flicken %d, Bänder %d: Durchschn. = %g, sdev = %g" #: libvips/arithmetic/measure.c:192 msgid "measure a set of patches on a colour chart" msgstr "" #: libvips/arithmetic/measure.c:196 msgid "in" msgstr "" #: libvips/arithmetic/measure.c:197 #, fuzzy msgid "Image to measure" msgstr "Bild zu schmal" #: libvips/arithmetic/measure.c:208 libvips/conversion/replicate.c:202 msgid "Across" msgstr "" #: libvips/arithmetic/measure.c:209 msgid "Number of patches across chart" msgstr "" #: libvips/arithmetic/measure.c:215 libvips/conversion/replicate.c:209 msgid "Down" msgstr "" #: libvips/arithmetic/measure.c:216 msgid "Number of patches down chart" msgstr "" #: libvips/arithmetic/measure.c:222 libvips/arithmetic/binary.c:95 #: libvips/conversion/extract.c:200 msgid "Left" msgstr "" #: libvips/arithmetic/measure.c:223 libvips/conversion/extract.c:201 #, fuzzy msgid "Left edge of extract area" msgstr "falscher extrahierter Bereich" #: libvips/arithmetic/measure.c:229 libvips/conversion/extract.c:207 msgid "Top" msgstr "" #: libvips/arithmetic/measure.c:230 libvips/conversion/extract.c:208 #, fuzzy msgid "Top edge of extract area" msgstr "falscher extrahierter Bereich" #: libvips/arithmetic/measure.c:236 libvips/conversion/extract.c:214 #: libvips/conversion/embed.c:536 libvips/conversion/copy.c:331 #: libvips/conversion/black.c:128 libvips/foreign/rawload.c:122 #: libvips/iofuncs/image.c:845 msgid "Width" msgstr "" #: libvips/arithmetic/measure.c:237 libvips/conversion/extract.c:215 #, fuzzy msgid "Width of extract area" msgstr "falscher extrahierter Bereich" #: libvips/arithmetic/measure.c:243 libvips/conversion/extract.c:221 #: libvips/conversion/embed.c:543 libvips/conversion/copy.c:338 #: libvips/conversion/black.c:135 libvips/foreign/rawload.c:129 #: libvips/iofuncs/image.c:852 msgid "Height" msgstr "" #: libvips/arithmetic/measure.c:244 libvips/conversion/extract.c:222 #, fuzzy msgid "Height of extract area" msgstr "falscher extrahierter Bereich" #: libvips/arithmetic/math.c:197 msgid "perform a math function on an image" msgstr "" #: libvips/arithmetic/relational.c:219 msgid "a relational operation on a pair of images" msgstr "" #: libvips/arithmetic/relational.c:228 libvips/arithmetic/relational.c:561 msgid "relational to perform" msgstr "" #: libvips/arithmetic/relational.c:552 msgid "relational operations against a constant" msgstr "" #: libvips/arithmetic/unaryconst.c:201 msgid "unary operations with a constant" msgstr "" #: libvips/arithmetic/unaryconst.c:205 msgid "c" msgstr "" #: libvips/arithmetic/unaryconst.c:206 msgid "Array of constants" msgstr "" #: libvips/arithmetic/unary.c:80 msgid "unary operations" msgstr "" #: libvips/arithmetic/unary.c:88 libvips/conversion/bandmean.c:198 #: libvips/conversion/recomb.c:201 #, fuzzy msgid "Input image argument" msgstr "zu viele Argumente" #: libvips/arithmetic/invert.c:152 #, fuzzy msgid "invert an image" msgstr "kein RAD-Bild" #: libvips/arithmetic/max.c:316 msgid "find image maximum" msgstr "" #: libvips/arithmetic/max.c:332 msgid "Horizontal position of maximum" msgstr "" #: libvips/arithmetic/max.c:339 #, fuzzy msgid "Vertical position of maximum" msgstr "Position des Maximalwerts des Bildes" #: libvips/arithmetic/complex.c:215 msgid "perform a complex operation on an image" msgstr "" #: libvips/arithmetic/complex.c:223 libvips/arithmetic/complex.c:477 msgid "complex to perform" msgstr "" #: libvips/arithmetic/complex.c:468 msgid "get a component from a complex image" msgstr "" #: libvips/arithmetic/complex.c:666 msgid "form a complex image from two real images" msgstr "" #: libvips/arithmetic/binary.c:88 #, fuzzy msgid "binary operations" msgstr "Bilineare Interpolation" #: libvips/arithmetic/binary.c:96 #, fuzzy msgid "Left-hand image argument" msgstr "zu viele Argumente" #: libvips/arithmetic/binary.c:101 msgid "Right" msgstr "" #: libvips/arithmetic/binary.c:102 #, fuzzy msgid "Right-hand image argument" msgstr "zu viele Argumente" #: libvips/arithmetic/sign.c:151 #, fuzzy msgid "unit vector of pixel" msgstr "Einheitsvektor in Richtung des Wertes" #: libvips/colour/im_rad2float.c:186 msgid "not a RAD image" msgstr "kein RAD-Bild" #: libvips/colour/im_icc_transform.c:202 libvips/colour/im_icc_transform.c:212 #: libvips/colour/im_icc_transform.c:1000 #: libvips/colour/im_icc_transform.c:1010 #, c-format msgid "unable to open profile \"%s\"" msgstr "Profil »%s« kann nicht geöffnet werden" #: libvips/colour/im_icc_transform.c:223 #: libvips/colour/im_icc_transform.c:1022 msgid "unable to create profiles" msgstr "es können keine Profile erstellt werden" #: libvips/colour/im_icc_transform.c:242 #: libvips/colour/im_icc_transform.c:1042 msgid "unable to read profile" msgstr "Profil kann nicht gelesen werden" #: libvips/colour/im_icc_transform.c:363 libvips/colour/im_icc_transform.c:372 #: libvips/colour/im_icc_transform.c:737 #: libvips/colour/im_icc_transform.c:1170 #: libvips/colour/im_icc_transform.c:1179 #: libvips/colour/im_icc_transform.c:1522 #, c-format msgid "" "intent %d (%s) not supported by profile \"%s\"; falling back to default " "intent (usually PERCEPTUAL)" msgstr "" "Ziel-%d (%s) nicht von Profil »%s« unterstützt; Rückfall auf Standardabsicht " "(normalerweise WAHRNEHMUNG)" #: libvips/colour/im_icc_transform.c:382 #: libvips/colour/im_icc_transform.c:1189 msgid "CMYK input profile needs a 4 band input image" msgstr "CMYK-Eingabeprofil benötigt ein Eingabebild mit vier Bändern" #: libvips/colour/im_icc_transform.c:392 #: libvips/colour/im_icc_transform.c:1199 msgid "RGB input profile needs a 3 band input image" msgstr "RGB-Eingabeprofil benötigt ein Eingabebild mit drei Bändern" #: libvips/colour/im_icc_transform.c:401 libvips/colour/im_icc_transform.c:551 #: libvips/colour/im_icc_transform.c:1208 #: libvips/colour/im_icc_transform.c:1340 #, c-format msgid "unimplemented input color space 0x%x" msgstr "nicht implementierter Eingabefarbraum 0x%x" #: libvips/colour/im_icc_transform.c:428 libvips/colour/im_icc_transform.c:767 #: libvips/colour/im_icc_transform.c:1235 #: libvips/colour/im_icc_transform.c:1552 #, c-format msgid "unimplemented output color space 0x%x" msgstr "nicht implementierter Ausgabefarbraum 0x%x" #: libvips/colour/im_icc_transform.c:444 libvips/colour/im_icc_transform.c:567 #: libvips/colour/im_icc_transform.c:1251 #: libvips/colour/im_icc_transform.c:1356 msgid "uchar or ushort input only" msgstr "nur »uchar« oder »ushort«-Eingabe" #: libvips/colour/im_icc_transform.c:516 #: libvips/colour/im_icc_transform.c:1305 #, c-format msgid "" "intent %d (%s) not supported by profile; falling back to default intent " "(usually PERCEPTUAL)" msgstr "" "Ziel-%d (%s) nicht vom Profil unterstützt; Rückfall auf Standardabsicht " "(normalerweise WAHRNEHMUNG)" #: libvips/colour/im_icc_transform.c:533 #: libvips/colour/im_icc_transform.c:1322 msgid "CMYK profile needs a 4 band input image" msgstr "CMYK-Profil benötigt ein Eingabebild mit vier Bändern" #: libvips/colour/im_icc_transform.c:543 #: libvips/colour/im_icc_transform.c:1332 msgid "RGB profile needs a 3 band input image" msgstr "RGB-Profil benötigt ein Eingabebild mit drei Bändern" #: libvips/colour/im_icc_transform.c:634 #: libvips/colour/im_icc_transform.c:1427 msgid "no embedded profile" msgstr "kein eingebettetes Profil" #: libvips/colour/im_icc_transform.c:726 #: libvips/colour/im_icc_transform.c:1511 msgid "unsupported bit depth" msgstr "nicht unterstützte Bit-Tiefe" #: libvips/colour/im_icc_transform.c:815 #: libvips/colour/im_icc_transform.c:1605 msgid "unable to get media white point" msgstr "weißer Medienpunkt kann nicht abgefragt werden" #: libvips/colour/im_icc_transform.c:1672 msgid "lcms library not linked to this VIPS" msgstr "gegen die »lcms«-Bibliothek wird in diesem VIPS nicht verlinkt" #: libvips/colour/im_icc_transform.c:1682 #: libvips/colour/im_icc_transform.c:1691 #: libvips/colour/im_icc_transform.c:1701 #: libvips/colour/im_icc_transform.c:1710 msgid "lmcs library not linked to this VIPS" msgstr "gegen die »lmcs«-Bibliothek wird in diesem VIPS nicht verlinkt" #: libvips/colour/disp.c:397 msgid "out of range [0,255]" msgstr "außerhalb des Bereichs [0,255]" #: libvips/colour/disp.c:423 msgid "bad display type" msgstr "falsche Anzeigetyp" #: libvips/colour/disp.c:537 msgid "display unknown" msgstr "Anzeige unbekannt" #: libvips/colour/im_disp2XYZ.c:86 msgid "input not 3-band uncoded char" msgstr "Eingabe ist kein unkodiertes Zeichen mit drei Bändern" #: libvips/colour/im_XYZ2disp.c:139 msgid "3-band uncoded float only" msgstr "nur unkodierte Fließkommazahlen mit drei Bändern" #: libvips/colour/im_lab_morph.c:75 msgid "bad greyscale mask size" msgstr "falsche Grauskala-Maskengröße" #: libvips/colour/im_lab_morph.c:86 #, c-format msgid "bad greyscale mask value, row %d" msgstr "falscher Grauskala-Maskenwert, Reihe %d" #: libvips/conversion/im_gaussnoise.c:124 msgid "bad parameter" msgstr "falscher Parameter" #: libvips/conversion/bandmean.c:191 msgid "band-wise average" msgstr "" #: libvips/conversion/cast.c:123 #, c-format msgid "%d underflows and %d overflows detected" msgstr "%d Unter- und %d Überläufe entdeckt" #: libvips/conversion/cast.c:470 #, fuzzy msgid "cast an image" msgstr "zu viele Bilder" #: libvips/conversion/cast.c:480 libvips/conversion/copy.c:352 #: libvips/iofuncs/image.c:866 #, fuzzy msgid "Format" msgstr "falsches Format" #: libvips/conversion/cast.c:481 msgid "Format to cast to" msgstr "" #: libvips/conversion/ifthenelse.c:395 #, fuzzy msgid "ifthenelse an image" msgstr "nur Einzelbandbilder" #: libvips/conversion/ifthenelse.c:399 msgid "Condition" msgstr "" #: libvips/conversion/ifthenelse.c:400 #, fuzzy msgid "Condition input image" msgstr "zu viele Eingabebilder" #: libvips/conversion/ifthenelse.c:405 #, fuzzy msgid "Then image" msgstr "ln des Bildes" #: libvips/conversion/ifthenelse.c:406 msgid "Source for TRUE pixels" msgstr "" #: libvips/conversion/ifthenelse.c:411 #, fuzzy msgid "Else image" msgstr "ln des Bildes" #: libvips/conversion/ifthenelse.c:412 msgid "Source for FALSE pixels" msgstr "" #: libvips/conversion/ifthenelse.c:417 msgid "blend" msgstr "" #: libvips/conversion/ifthenelse.c:418 msgid "Blend smoothly between then and else parts" msgstr "" #: libvips/conversion/insert.c:349 #, fuzzy msgid "insert an image" msgstr "kein RAD-Bild" #: libvips/conversion/insert.c:353 msgid "Main" msgstr "" #: libvips/conversion/insert.c:354 #, fuzzy msgid "Main input image" msgstr "zu viele Eingabebilder" #: libvips/conversion/insert.c:359 msgid "Sub-image" msgstr "" #: libvips/conversion/insert.c:360 #, fuzzy msgid "Sub-image to insert into main image" msgstr "»ink«-Bild passt nicht in das Bild" #: libvips/conversion/insert.c:365 msgid "X" msgstr "" #: libvips/conversion/insert.c:366 msgid "Left edge of sub in main" msgstr "" #: libvips/conversion/insert.c:372 msgid "Y" msgstr "" #: libvips/conversion/insert.c:373 msgid "Top edge of sub in main" msgstr "" #: libvips/conversion/insert.c:379 libvips/conversion/join.c:233 msgid "Expand" msgstr "" #: libvips/conversion/insert.c:380 libvips/conversion/join.c:234 msgid "Expand output to hold all of both inputs" msgstr "" #: libvips/conversion/insert.c:386 libvips/conversion/join.c:247 msgid "Background" msgstr "" #: libvips/conversion/insert.c:387 libvips/conversion/join.c:248 msgid "Colour for new pixels" msgstr "" #: libvips/conversion/tilecache.c:418 libvips/conversion/cache.c:102 #, fuzzy msgid "cache an image" msgstr "zu viele Bilder" #: libvips/conversion/tilecache.c:428 libvips/conversion/cache.c:112 #: libvips/foreign/tiffsave.c:213 msgid "Tile width" msgstr "" #: libvips/conversion/tilecache.c:429 libvips/conversion/cache.c:113 #: libvips/foreign/tiffsave.c:214 msgid "Tile width in pixels" msgstr "" #: libvips/conversion/tilecache.c:435 libvips/conversion/cache.c:119 #: libvips/foreign/tiffsave.c:220 msgid "Tile height" msgstr "" #: libvips/conversion/tilecache.c:436 libvips/conversion/cache.c:120 #: libvips/foreign/tiffsave.c:221 msgid "Tile height in pixels" msgstr "" #: libvips/conversion/tilecache.c:442 libvips/conversion/cache.c:126 #, fuzzy msgid "Max tiles" msgstr "falsche Bildgrößen" #: libvips/conversion/tilecache.c:443 libvips/conversion/cache.c:127 msgid "Maximum number of tiles to cache" msgstr "" #: libvips/conversion/tilecache.c:449 msgid "Strategy" msgstr "" #: libvips/conversion/tilecache.c:450 msgid "Expected access pattern" msgstr "" #: libvips/conversion/im_text.c:132 msgid "no text to render" msgstr "kein Text zu rendern" #: libvips/conversion/im_text.c:219 msgid "invalid markup in text" msgstr "ungültige Auszeichnung im Text" #: libvips/conversion/im_text.c:252 msgid "pangoft2 support disabled" msgstr "Pangoft2-Unterstützung deaktiviert" #: libvips/conversion/im_zoom.c:331 msgid "zoom factors should be >= 0" msgstr "Zoomfaktoren sollten >=0 sein" #. Make sure we won't get integer overflow. #. #: libvips/conversion/im_zoom.c:338 msgid "zoom factors too large" msgstr "Zoomfaktoren zu groß" #: libvips/conversion/conver_dispatch.c:918 #: libvips/inplace/inplace_dispatch.c:171 msgid "vectors not same length" msgstr "Vektoren ungleicher Länge" #: libvips/conversion/extract.c:147 msgid "bad extract area" msgstr "falscher extrahierter Bereich" #: libvips/conversion/extract.c:190 msgid "extract an area from an image" msgstr "" #: libvips/conversion/extract.c:318 #, fuzzy msgid "bad extract band" msgstr "falscher extrahierter Bereich" #: libvips/conversion/extract.c:347 msgid "extract band from an image" msgstr "" #: libvips/conversion/extract.c:359 msgid "Band" msgstr "" #: libvips/conversion/extract.c:360 #, fuzzy msgid "Band to extract" msgstr "falscher extrahierter Bereich" #: libvips/conversion/extract.c:366 msgid "n" msgstr "" #: libvips/conversion/extract.c:367 msgid "Number of bands to extract" msgstr "" #: libvips/conversion/embed.c:430 libvips/iofuncs/image.c:1777 msgid "bad dimensions" msgstr "falsche Abmessungen" #: libvips/conversion/embed.c:512 msgid "embed an image in a larger image" msgstr "" #: libvips/conversion/embed.c:523 msgid "Left edge of input in output" msgstr "" #: libvips/conversion/embed.c:530 msgid "Top edge of input in output" msgstr "" #: libvips/conversion/embed.c:537 libvips/conversion/copy.c:332 #: libvips/conversion/black.c:129 libvips/foreign/rawload.c:123 #: libvips/iofuncs/image.c:846 #, fuzzy msgid "Image width in pixels" msgstr "»ink«-Bild nicht 1x1 Bildpunkte" #: libvips/conversion/embed.c:544 libvips/conversion/copy.c:339 #: libvips/conversion/black.c:136 libvips/foreign/rawload.c:130 #: libvips/iofuncs/image.c:853 #, fuzzy msgid "Image height in pixels" msgstr "»ink«-Bild nicht 1x1 Bildpunkte" #: libvips/conversion/embed.c:550 msgid "Extend" msgstr "" #: libvips/conversion/embed.c:551 msgid "How to generate the extra pixels" msgstr "" #: libvips/conversion/im_grid.c:164 #: libvips/convolution/im_contrast_surface.c:140 libvips/iofuncs/image.c:710 #: libvips/iofuncs/sinkscreen.c:1082 libvips/morphology/im_rank.c:342 msgid "bad parameters" msgstr "falsche Parameter" #: libvips/conversion/im_grid.c:169 msgid "bad grid geometry" msgstr "falsche Gittergeometrie" #: libvips/conversion/join.c:210 #, fuzzy msgid "join a pair of images" msgstr "ln des Bildes" #: libvips/conversion/join.c:214 msgid "in1" msgstr "" #: libvips/conversion/join.c:215 #, fuzzy msgid "First input image" msgstr "null Eingabebilder" #: libvips/conversion/join.c:220 msgid "in2" msgstr "" #: libvips/conversion/join.c:221 #, fuzzy msgid "Second input image" msgstr "null Eingabebilder" #: libvips/conversion/join.c:226 #, fuzzy msgid "direction" msgstr "Beschreibung" #: libvips/conversion/join.c:227 msgid "Join left-right or up-down" msgstr "" #: libvips/conversion/join.c:240 msgid "Shim" msgstr "" #: libvips/conversion/join.c:241 #, fuzzy msgid "Pixels between images" msgstr "zwei Bilder teilen" #: libvips/conversion/join.c:254 msgid "Align" msgstr "" #: libvips/conversion/join.c:255 msgid "Align on the low, centre or high coordinate edge" msgstr "" #: libvips/conversion/rot.c:351 #, fuzzy msgid "rotate an image" msgstr "kein RAD-Bild" #: libvips/conversion/rot.c:361 msgid "Angle" msgstr "" #: libvips/conversion/rot.c:362 #, fuzzy msgid "Angle to rotate image" msgstr "Bild1 kann nicht akzeptiert werden" #: libvips/conversion/flip.c:236 #, fuzzy msgid "flip an image" msgstr "ln des Bildes" #: libvips/conversion/flip.c:246 #, fuzzy msgid "Direction" msgstr "Beschreibung" #: libvips/conversion/flip.c:247 #, fuzzy msgid "Direction to flip image" msgstr "Standardabweichung des Bildes" #: libvips/conversion/copy.c:314 #, fuzzy msgid "copy an image" msgstr "zu viele Bilder" #: libvips/conversion/copy.c:324 msgid "Swap" msgstr "" #: libvips/conversion/copy.c:325 msgid "Swap bytes in image between little and big-endian" msgstr "" #: libvips/conversion/copy.c:345 libvips/conversion/black.c:142 #: libvips/foreign/rawload.c:136 libvips/iofuncs/image.c:859 msgid "Bands" msgstr "" #: libvips/conversion/copy.c:346 libvips/conversion/black.c:143 #: libvips/foreign/rawload.c:137 libvips/iofuncs/image.c:860 #, fuzzy msgid "Number of bands in image" msgstr "Mehr als ein Bild benötigt" #: libvips/conversion/copy.c:353 libvips/iofuncs/image.c:867 #, fuzzy msgid "Pixel format in image" msgstr "x^pel des Bildes" #: libvips/conversion/copy.c:359 libvips/iofuncs/image.c:873 #, fuzzy msgid "Coding" msgstr "" #: libvips/conversion/copy.c:360 libvips/iofuncs/image.c:874 msgid "Pixel coding" msgstr "" #: libvips/conversion/copy.c:366 libvips/iofuncs/image.c:880 msgid "Interpretation" msgstr "" #: libvips/conversion/copy.c:367 libvips/iofuncs/image.c:881 #, fuzzy msgid "Pixel interpretation" msgstr "Bilineare Interpolation" #: libvips/conversion/copy.c:373 libvips/foreign/tiffsave.c:249 #: libvips/iofuncs/image.c:887 msgid "Xres" msgstr "" #: libvips/conversion/copy.c:374 libvips/foreign/tiffsave.c:250 #: libvips/iofuncs/image.c:888 #, fuzzy msgid "Horizontal resolution in pixels/mm" msgstr "»Xres« auf R Bildpunkte/mm setzen" #: libvips/conversion/copy.c:380 libvips/foreign/tiffsave.c:256 #: libvips/iofuncs/image.c:894 msgid "Yres" msgstr "" #: libvips/conversion/copy.c:381 libvips/foreign/tiffsave.c:257 #: libvips/iofuncs/image.c:895 #, fuzzy msgid "Vertical resolution in pixels/mm" msgstr "»Xres« auf R Bildpunkte/mm setzen" #: libvips/conversion/copy.c:387 libvips/iofuncs/image.c:901 #, fuzzy msgid "Xoffset" msgstr "»Xoffset« auf N setzen" #: libvips/conversion/copy.c:388 libvips/iofuncs/image.c:902 msgid "Horizontal offset of origin" msgstr "" #: libvips/conversion/copy.c:394 libvips/iofuncs/image.c:908 #, fuzzy msgid "Yoffset" msgstr "»Yoffset« auf N setzen" #: libvips/conversion/copy.c:395 libvips/iofuncs/image.c:909 msgid "Vertical offset of origin" msgstr "" #: libvips/conversion/bandary.c:127 #, fuzzy msgid "no input images" msgstr "null Eingabebilder" #: libvips/conversion/bandary.c:173 #, fuzzy msgid "operations on image bands" msgstr "durchschnittliche Bildbänder" #: libvips/conversion/conversion.c:85 #, fuzzy msgid "conversion operations" msgstr "vektorgesteuerte Versionen von Operationen deaktivieren" #: libvips/conversion/recomb.c:160 msgid "bands in must equal matrix width" msgstr "»in«-Bänder müssen die gleiche Breite wie die Matrix haben" #: libvips/conversion/recomb.c:196 msgid "linear recombination with matrix" msgstr "" #: libvips/conversion/recomb.c:206 msgid "M" msgstr "" #: libvips/conversion/recomb.c:207 msgid "matrix of coefficients" msgstr "" #: libvips/conversion/replicate.c:192 #, fuzzy msgid "replicate an image" msgstr "e^pel des Bildes" #: libvips/conversion/replicate.c:203 msgid "Repeat this many times horizontally" msgstr "" #: libvips/conversion/replicate.c:210 msgid "Repeat this many times vertically" msgstr "" #: libvips/conversion/black.c:124 msgid "make a black image" msgstr "" #: libvips/conversion/im_msb.c:134 libvips/conversion/im_msb.c:213 msgid "unknown coding" msgstr "unbekannte Kodierung" #: libvips/conversion/im_msb.c:169 libvips/resample/im_rightshift_size.c:116 msgid "bad arguments" msgstr "falsche Argumente" #: libvips/conversion/im_msb.c:183 libvips/conversion/im_msb.c:200 msgid "image does not have that many bands" msgstr "Bild hat nicht so viele Bänder" #: libvips/conversion/im_system_image.c:76 #, c-format msgid "command failed: \"%s\"" msgstr "" #: libvips/conversion/im_subsample.c:202 msgid "factors should both be >= 1" msgstr "beide Faktoren sollten >=1 sein" #: libvips/conversion/im_subsample.c:221 libvips/resample/im_shrink.c:286 msgid "image has shrunk to nothing" msgstr "Bild ist zu nichts geschrumpft" #: libvips/conversion/bandjoin.c:165 #, fuzzy msgid "bandwise join a set of images" msgstr "Bandauswahl außerhalb des Bereichs" #: libvips/conversion/bandjoin.c:172 #, fuzzy msgid "Array of input images" msgstr "null Eingabebilder" #: libvips/convolution/im_contrast_surface.c:147 msgid "parameters would result in zero size output image" msgstr "Parameter würden zu einem Ausgabebild der Größe Null führen" #: libvips/convolution/im_aconvsep.c:130 libvips/convolution/im_aconv.c:223 #: libvips/convolution/im_aconv.c:229 libvips/convolution/im_aconv.c:750 #, fuzzy msgid "mask too complex" msgstr "Maske zu groß" #: libvips/convolution/im_aconvsep.c:798 libvips/convolution/im_conv.c:1038 #: libvips/convolution/im_conv_f.c:340 libvips/convolution/im_aconv.c:980 #: libvips/convolution/im_aconv.c:1201 libvips/morphology/morphology.c:721 msgid "image too small for mask" msgstr "Bild zu klein für Maske" #: libvips/convolution/im_conv.c:215 #, c-format msgid "%d overflows and %d underflows detected" msgstr "%d Über- und %d Unterläufe entdeckt" #: libvips/convolution/im_conv.c:1125 libvips/convolution/im_conv_f.c:403 msgid "expect 1xN or Nx1 input mask" msgstr "1xN- oder Nx1-Eingabemaske wird erwartet" # ref und in sind Objekte #: libvips/convolution/im_fastcor.c:134 libvips/convolution/im_spcor.c:247 msgid "ref not smaller than or equal to in" msgstr "»ref« nicht kleiner oder gleich »in«" #: libvips/convolution/im_sharpen.c:325 libvips/histograms_lut/im_stdif.c:196 msgid "parameters out of range" msgstr "Parameter außerhalb des Bereichs" #: libvips/foreign/rawload.c:107 msgid "load raw data from a file" msgstr "" #: libvips/foreign/rawload.c:115 libvips/foreign/fitssave.c:128 #: libvips/foreign/ppmload.c:126 libvips/foreign/radload.c:126 #: libvips/foreign/openslideload.c:176 libvips/foreign/tiffload.c:142 #: libvips/foreign/fitsload.c:116 libvips/foreign/vipssave.c:125 #: libvips/foreign/radsave.c:119 libvips/foreign/openexrload.c:137 #: libvips/foreign/analyzeload.c:126 libvips/foreign/pngload.c:136 #: libvips/foreign/tiffsave.c:169 libvips/foreign/vipsload.c:133 #: libvips/foreign/magickload.c:146 libvips/foreign/matload.c:128 #: libvips/foreign/jpegload.c:245 libvips/foreign/jpegsave.c:193 #: libvips/foreign/rawsave.c:166 libvips/foreign/ppmsave.c:118 #: libvips/foreign/csvsave.c:121 libvips/foreign/csvload.c:132 #: libvips/foreign/pngsave.c:166 libvips/iofuncs/image.c:915 #, fuzzy msgid "Filename" msgstr "Nickname" #: libvips/foreign/rawload.c:116 libvips/foreign/ppmload.c:127 #: libvips/foreign/radload.c:127 libvips/foreign/openslideload.c:177 #: libvips/foreign/tiffload.c:143 libvips/foreign/fitsload.c:117 #: libvips/foreign/openexrload.c:138 libvips/foreign/analyzeload.c:127 #: libvips/foreign/pngload.c:137 libvips/foreign/vipsload.c:134 #: libvips/foreign/magickload.c:147 libvips/foreign/matload.c:129 #: libvips/foreign/jpegload.c:246 libvips/foreign/csvload.c:133 msgid "Filename to load from" msgstr "" #: libvips/foreign/rawload.c:143 libvips/iofuncs/image.c:943 msgid "Size of header" msgstr "" #: libvips/foreign/rawload.c:144 libvips/iofuncs/image.c:944 msgid "Offset in bytes from start of file" msgstr "" #: libvips/foreign/fitssave.c:119 msgid "save image to fits file" msgstr "" #: libvips/foreign/fitssave.c:129 libvips/foreign/vipssave.c:126 #: libvips/foreign/radsave.c:120 libvips/foreign/tiffsave.c:170 #: libvips/foreign/jpegsave.c:194 libvips/foreign/rawsave.c:167 #: libvips/foreign/ppmsave.c:119 libvips/foreign/csvsave.c:122 #: libvips/foreign/pngsave.c:167 #, fuzzy msgid "Filename to save to" msgstr "Dateiname nicht gesetzt" #: libvips/foreign/ppmload.c:114 #, fuzzy msgid "load ppm from file" msgstr "Profil kann nicht gelesen werden" #: libvips/foreign/radload.c:114 msgid "load a Radiance image from a file" msgstr "" #: libvips/foreign/openslideload.c:159 msgid "load file with OpenSlide" msgstr "" #: libvips/foreign/openslideload.c:183 msgid "Level" msgstr "" #: libvips/foreign/openslideload.c:184 msgid "Load this level from the file" msgstr "" #: libvips/foreign/openslideload.c:190 msgid "Associated" msgstr "" #: libvips/foreign/openslideload.c:191 msgid "Load this associated image" msgstr "" #: libvips/foreign/tiffload.c:130 msgid "load tiff from file" msgstr "" #: libvips/foreign/tiffload.c:149 msgid "Page" msgstr "" #: libvips/foreign/tiffload.c:150 msgid "Load this page from the file" msgstr "" #: libvips/foreign/fitsload.c:107 #, fuzzy msgid "load a FITS image" msgstr "kein RAD-Bild" #: libvips/foreign/vipssave.c:114 msgid "save image to vips file" msgstr "" #: libvips/foreign/radsave.c:108 msgid "save image to Radiance file" msgstr "" #: libvips/foreign/openexrload.c:125 #, fuzzy msgid "load an OpenEXR image" msgstr "Bild %s konnte nicht geöffnet werden" #: libvips/foreign/analyzeload.c:114 msgid "load an Analyze6 image" msgstr "" #: libvips/foreign/pngload.c:124 #, fuzzy msgid "load png from file" msgstr "Fehler beim Lesen von Datei »%s«" #: libvips/foreign/tiffsave.c:159 msgid "save image to tiff file" msgstr "" #: libvips/foreign/tiffsave.c:176 libvips/foreign/pngsave.c:103 #, fuzzy msgid "Compression" msgstr "" #: libvips/foreign/tiffsave.c:177 #, fuzzy msgid "Compression for this file" msgstr "automatischer Rücklauf für %s fehlgeschlagen" #: libvips/foreign/tiffsave.c:184 libvips/foreign/jpegsave.c:124 msgid "Q" msgstr "" #: libvips/foreign/tiffsave.c:185 libvips/foreign/jpegsave.c:125 msgid "Q factor" msgstr "" #: libvips/foreign/tiffsave.c:191 msgid "predictor" msgstr "" #: libvips/foreign/tiffsave.c:192 msgid "Compression prediction" msgstr "" #: libvips/foreign/tiffsave.c:199 libvips/foreign/jpegsave.c:131 msgid "profile" msgstr "" #: libvips/foreign/tiffsave.c:200 libvips/foreign/jpegsave.c:132 msgid "ICC profile to embed" msgstr "" #: libvips/foreign/tiffsave.c:206 msgid "Tile" msgstr "" #: libvips/foreign/tiffsave.c:207 #, fuzzy msgid "Write a tiled tiff" msgstr "Schreiben fehlgeschlagen" #: libvips/foreign/tiffsave.c:227 msgid "Pyramid" msgstr "" #: libvips/foreign/tiffsave.c:228 msgid "Write a pyramidal tiff" msgstr "" #: libvips/foreign/tiffsave.c:234 msgid "Squash" msgstr "" #: libvips/foreign/tiffsave.c:235 msgid "Squash images down to 1 bit" msgstr "" #: libvips/foreign/tiffsave.c:241 libvips/foreign/tiffsave.c:242 #, fuzzy msgid "Resolution unit" msgstr "falsche Einheit der Auflösung" #: libvips/foreign/tiffsave.c:263 msgid "Bigtiff" msgstr "" #: libvips/foreign/tiffsave.c:264 msgid "Write a bigtiff image" msgstr "" #: libvips/foreign/csv.c:183 #, c-format msgid "error parsing number, line %d, column %d" msgstr "Fehler beim Auswerten von Nummer, Zeile %d, Spalte %d" #: libvips/foreign/csv.c:237 msgid "end of file while skipping start" msgstr "Dateiende während des Überspringens des Startes" #: libvips/foreign/csv.c:246 libvips/iofuncs/util.c:1072 #: libvips/iofuncs/util.c:1078 msgid "unable to seek" msgstr "kann nicht gesucht werden" #: libvips/foreign/csv.c:257 msgid "empty line" msgstr "leere Zeile" #: libvips/foreign/csv.c:301 #, fuzzy, c-format msgid "unexpected EOF, line %d col %d" msgstr "unerwartetes EOF" #: libvips/foreign/csv.c:307 #, fuzzy, c-format msgid "unexpected EOL, line %d col %d" msgstr "unerwartetes Zeilenende" #: libvips/foreign/vipsload.c:121 msgid "load vips from file" msgstr "" #: libvips/foreign/magickload.c:131 msgid "load file with ImageMagick" msgstr "" #: libvips/foreign/matload.c:116 msgid "load mat from file" msgstr "" #: libvips/foreign/jpegload.c:118 #, c-format msgid "bad shrink factor %d" msgstr "falscher Schrumpffaktor %d" #: libvips/foreign/jpegload.c:140 msgid "load jpeg" msgstr "" #: libvips/foreign/jpegload.c:146 msgid "Shrink" msgstr "" #: libvips/foreign/jpegload.c:147 #, fuzzy msgid "Shrink factor on load" msgstr "falscher Schrumpffaktor %d" #: libvips/foreign/jpegload.c:153 msgid "Fail" msgstr "" #: libvips/foreign/jpegload.c:154 #, fuzzy msgid "Fail on first warning" msgstr "Vips-Warnung" #: libvips/foreign/jpegload.c:234 msgid "load jpeg from file" msgstr "" #: libvips/foreign/jpegload.c:309 msgid "load jpeg from buffer" msgstr "" #: libvips/foreign/jpegload.c:315 libvips/foreign/jpegsave.c:260 #: libvips/foreign/pngsave.c:228 msgid "Buffer" msgstr "" #: libvips/foreign/jpegload.c:316 msgid "Buffer to load from" msgstr "" #: libvips/foreign/openslide2vips.c:134 msgid "invalid associated image name" msgstr "" #: libvips/foreign/openslide2vips.c:159 msgid "failure opening slide" msgstr "" #: libvips/foreign/openslide2vips.c:166 msgid "invalid slide level" msgstr "" #: libvips/foreign/openslide2vips.c:202 #, fuzzy, c-format msgid "getting dimensions: %s" msgstr "falsche Abmessungen" #: libvips/foreign/openslide2vips.c:209 msgid "image dimensions overflow int" msgstr "" #: libvips/foreign/openslide2vips.c:274 #, fuzzy, c-format msgid "reading region: %s" msgstr "Fehler beim Lesen der Auflösung" #: libvips/foreign/openslide2vips.c:348 #, c-format msgid "reading associated image: %s" msgstr "" #: libvips/foreign/analyze2vips.c:308 msgid "header file size incorrect" msgstr "Kopfzeilengröße nicht korrekt" #: libvips/foreign/analyze2vips.c:353 #, fuzzy msgid "header size incorrect" msgstr "Kopfzeilengröße nicht korrekt" #: libvips/foreign/analyze2vips.c:371 #, c-format msgid "%d-dimensional images not supported" msgstr "%d-dimensionale Bilder nicht unterstützt" #: libvips/foreign/analyze2vips.c:424 #, c-format msgid "datatype %d not supported" msgstr "Datentyp %d nicht unterstützt" #: libvips/foreign/tiff2vips.c:262 libvips/foreign/tiff2vips.c:285 #: libvips/foreign/tiff2vips.c:303 #, c-format msgid "required field %d missing" msgstr "benötigtes Feld %d fehlt" #: libvips/foreign/tiff2vips.c:266 #, c-format msgid "required field %d=%d, not %d" msgstr "benötigtes Feld %d=%d, nicht %d" #: libvips/foreign/tiff2vips.c:650 #, fuzzy, c-format msgid "%d bits per sample palette image not supported" msgstr "%d-dimensionale Bilder nicht unterstützt" #: libvips/foreign/tiff2vips.c:659 msgid "bad colormap" msgstr "falsche Farbzusammenstellung" #: libvips/foreign/tiff2vips.c:716 libvips/foreign/tiff2vips.c:747 msgid "3 or 4 bands RGB TIFF only" msgstr "nur RGB-TIFF mit drei oder vier Bändern" #: libvips/foreign/tiff2vips.c:818 msgid "4 or 5 bands CMYK TIFF only" msgstr "nur CMYK-TIFF mit vier oder fünf Bändern" #: libvips/foreign/tiff2vips.c:869 msgid "unknown resolution unit" msgstr "unbekannte Auflösungseinheit" #: libvips/foreign/tiff2vips.c:874 #, c-format msgid "" "no resolution information for TIFF image \"%s\" -- defaulting to 1 pixel per " "mm" msgstr "" "Keine Auflösungsinformationen für TIFF-Bild »%s« -- Standard auf 1 Bildpunkt " "pro mm" #: libvips/foreign/tiff2vips.c:946 #, c-format msgid "unsupported sample format %d for lab image" msgstr "nicht unterstütztes Musterformat %d für LAB-Bild" #: libvips/foreign/tiff2vips.c:956 #, c-format msgid "unsupported depth %d for LAB image" msgstr "nicht unterstützte Tiefe %d für LAB-Bild" #: libvips/foreign/tiff2vips.c:995 #, c-format msgid "unsupported sample format %d for greyscale image" msgstr "nicht unterstütztes Musterformat %d für Graustufenbild" #: libvips/foreign/tiff2vips.c:1004 #, c-format msgid "unsupported depth %d for greyscale image" msgstr "nicht unterstützte Tiefe %d für Graustufenbild" #: libvips/foreign/tiff2vips.c:1052 #, c-format msgid "unsupported sample format %d for rgb image" msgstr "nicht unterstütztes Musterformat %d für RGB-Bild" #: libvips/foreign/tiff2vips.c:1061 #, c-format msgid "unsupported depth %d for RGB image" msgstr "nicht unterstützte Tiefe %d für RGB-Bild" #: libvips/foreign/tiff2vips.c:1075 #, c-format msgid "unknown photometric interpretation %d" msgstr "unbekannte fotometrische Deutung %d" #: libvips/foreign/tiff2vips.c:1331 libvips/foreign/radiance.c:959 msgid "read error" msgstr "Lesefehler" #: libvips/foreign/tiff2vips.c:1444 #, c-format msgid "bad page number %d" msgstr "falsche Seitennummer %d" #: libvips/foreign/tiff2vips.c:1465 libvips/foreign/vips2tiff.c:286 #, c-format msgid "unable to open \"%s\" for input" msgstr "»%s« kann nicht zur Eingabe geöffnet werden" #: libvips/foreign/tiff2vips.c:1520 libvips/foreign/tiff2vips.c:1550 #, c-format msgid "TIFF file does not contain page %d" msgstr "TIFF-Datei enthält nicht Seite %d" #: libvips/foreign/jpegsave.c:118 msgid "save jpeg" msgstr "" #: libvips/foreign/jpegsave.c:187 msgid "save image to jpeg file" msgstr "" #: libvips/foreign/jpegsave.c:256 #, fuzzy msgid "save image to jpeg buffer" msgstr "In den Puffer kann nicht geschrieben werden." #: libvips/foreign/jpegsave.c:261 libvips/foreign/pngsave.c:229 msgid "Buffer to save to" msgstr "" #: libvips/foreign/jpegsave.c:303 msgid "error writing output" msgstr "Fehler beim Schreiben der Ausgabe" #: libvips/foreign/jpegsave.c:319 #, fuzzy msgid "save image to jpeg mime" msgstr "Durchschnitt von vier Bildern" #: libvips/foreign/rawsave.c:159 #, fuzzy msgid "save image to raw file" msgstr "Datei kann nicht zurückgespult werden" #: libvips/foreign/rawsave.c:266 #, fuzzy msgid "write raw image to file descriptor" msgstr "falscher Bild-Deskriptor" #: libvips/foreign/rawsave.c:273 #, fuzzy msgid "File descriptor" msgstr "kein Datei-Deskriptor" #: libvips/foreign/rawsave.c:274 #, fuzzy msgid "File descriptor to write to" msgstr "kein Datei-Deskriptor" #: libvips/foreign/ppmsave.c:109 #, fuzzy msgid "save image to ppm file" msgstr "falscher Bildtyp" #: libvips/foreign/ppmsave.c:125 msgid "ASCII" msgstr "" #: libvips/foreign/ppmsave.c:126 msgid "save as ascii" msgstr "" #: libvips/foreign/vips2jpeg.c:132 #, c-format msgid "%s" msgstr "%s" #: libvips/foreign/vips2jpeg.c:363 msgid "error setting JPEG resolution" msgstr "Fehler beim Setzen der JPEG-Auflösung" #: libvips/foreign/vips2jpeg.c:510 msgid "error saving EXIF" msgstr "Fehler beim Speichern von EXIF" #: libvips/foreign/openexr2vips.c:115 #, c-format msgid "EXR error: %s" msgstr "EXR-Fehler: %s" #: libvips/foreign/magick2vips.c:215 #, c-format msgid "unsupported image type %d" msgstr "nicht unterstützter Bildtyp %d" #: libvips/foreign/magick2vips.c:275 #, c-format msgid "unsupported bit depth %d" msgstr "nicht unterstützte Bit-Tiefe %d" #: libvips/foreign/magick2vips.c:307 #, c-format msgid "unsupported colorspace %d" msgstr "nicht unterstützter Farbraum %d" #: libvips/foreign/magick2vips.c:622 msgid "unable to read pixels" msgstr "Bildpunkte können nicht gelesen werden" #: libvips/foreign/magick2vips.c:658 #, c-format msgid "" "unable to read file \"%s\"\n" "libMagick error: %s %s" msgstr "" "Datei »%s« kann nicht gelesen werden\n" "libMagick-Fehler: %s %s" #: libvips/foreign/magick2vips.c:692 #, c-format msgid "" "unable to ping file \"%s\"\n" "libMagick error: %s %s" msgstr "" "Datei »%s« kann nicht angepingt werden\n" "libMagick-Fehler: %s %s" #: libvips/foreign/magick2vips.c:703 msgid "bad image size" msgstr "falsche Bildgröße" #: libvips/foreign/vipspng.c:230 msgid "unsupported color type" msgstr "nicht unterstützter Farbtyp" #: libvips/foreign/vipspng.c:570 msgid "compress should be in [0,9]" msgstr "Kompression sollte in [0,9] liegen" #: libvips/foreign/vipspng.c:650 #, c-format msgid "unable to write \"%s\"" msgstr "»%s« kann nicht geschrieben werden" #: libvips/foreign/vipspng.c:749 msgid "unable to write to buffer" msgstr "In den Puffer kann nicht geschrieben werden." #: libvips/foreign/matlab.c:106 libvips/foreign/fits.c:178 #: libvips/iofuncs/vips.c:143 libvips/mosaicing/global_balance.c:1181 #: libvips/mosaicing/global_balance.c:1516 #, c-format msgid "unable to open \"%s\"" msgstr "»%s« kann nicht geöffnet werden" #: libvips/foreign/matlab.c:114 #, c-format msgid "no matrix variables in \"%s\"" msgstr "Keine Matrixvariablen in »%s«" #: libvips/foreign/matlab.c:175 #, c-format msgid "unsupported rank %d\n" msgstr "nicht unterstützte Rangstufe %d\n" #: libvips/foreign/matlab.c:188 #, c-format msgid "unsupported class type %d\n" msgstr "nicht unterstützter Klassentyp %d\n" #: libvips/foreign/matlab.c:236 msgid "Mat_VarReadDataAll failed" msgstr "»Mat_VarReadDataAll« fehlgeschlagen" #: libvips/foreign/jpeg2vips.c:167 #, c-format msgid "read gave %ld warnings" msgstr "Lesen ergab %ld Warnungen" #: libvips/foreign/jpeg2vips.c:489 msgid "error reading resolution" msgstr "Fehler beim Lesen der Auflösung" #: libvips/foreign/jpeg2vips.c:510 #, fuzzy msgid "unknown EXIF resolution unit" msgstr "unbekannte Auflösungseinheit" #: libvips/foreign/jpeg2vips.c:718 #, fuzzy msgid "unknown JFIF resolution unit" msgstr "unbekannte Auflösungseinheit" #: libvips/foreign/fits.c:240 msgid "dimensions above 3 must be size 1" msgstr "Dimensionen größer drei müssen die Größe eins haben" #: libvips/foreign/fits.c:256 #, c-format msgid "bad number of axis %d" msgstr "falsche Achsenanzahl %d" #: libvips/foreign/fits.c:272 #, c-format msgid "unsupported bitpix %d\n" msgstr "nicht unterstützte »bitpix« %d\n" #: libvips/foreign/fits.c:576 libvips/iofuncs/vips.c:171 #, c-format msgid "unable to write to \"%s\"" msgstr "auf »%s« kann nicht geschrieben werden" #: libvips/foreign/fits.c:637 #, fuzzy, c-format msgid "unsupported BandFmt %d\n" msgstr "nicht unterstützte Rangstufe %d\n" #: libvips/foreign/csvsave.c:112 #, fuzzy msgid "save image to csv file" msgstr "falsche Bildgröße" #: libvips/foreign/csvsave.c:128 libvips/foreign/csvload.c:160 msgid "Separator" msgstr "" #: libvips/foreign/csvsave.c:129 msgid "Separator characters" msgstr "" #: libvips/foreign/ppm.c:109 msgid "bad int" msgstr "falsche Ganzzahl" #: libvips/foreign/ppm.c:121 msgid "bad float" msgstr "falsche Fließkommazahl" #: libvips/foreign/ppm.c:172 msgid "bad magic number" msgstr "falsche magische Zahl" #: libvips/foreign/ppm.c:222 msgid "not whitespace before start of binary data" msgstr "kein Leerraum vor dem Start der binären Daten" #: libvips/foreign/ppm.c:599 libvips/foreign/ppm.c:611 msgid "write error ... disc full?" msgstr "Schreibfehler ... Platte voll?" #: libvips/foreign/ppm.c:716 msgid "binary >8 bit images must be float" msgstr "binäre Bilder >8 Bit müssen aus Fließkommazahlen bestehen" #: libvips/foreign/vips2tiff.c:270 #, c-format msgid "unable to open \"%s\" for output" msgstr "»%s« kann nicht zur Ausgabe geöffnet werden" #: libvips/foreign/vips2tiff.c:692 msgid "layer buffer exhausted -- try making TIFF output tiles smaller" msgstr "" "Ebenenpuffer aufgebraucht -- versuchen Sie die TIFF-Ausgabekacheln zu " "verkleinern" #: libvips/foreign/vips2tiff.c:922 msgid "TIFF write tile failed" msgstr "Schreiben des TIFF-Bildes fehlgeschlagen" #: libvips/foreign/vips2tiff.c:998 msgid "internal error #9876345" msgstr "interner Fehler #9876345" #: libvips/foreign/vips2tiff.c:1251 msgid "tile size not a multiple of 16" msgstr "Bildgröße kein Vielfaches von 16" #: libvips/foreign/vips2tiff.c:1257 msgid "can't have strip pyramid -- enabling tiling" msgstr "" "nicht ummantelte Pyramide nicht möglich -- Zerteilung wird eingeschaltet" #: libvips/foreign/vips2tiff.c:1268 msgid "can only pyramid LABQ and non-complex images" msgstr "" "nur LABQ und nicht-komplexe Bilder können pyramidenartig verwendet werden" #: libvips/foreign/vips2tiff.c:1285 msgid "can't have 1-bit JPEG -- disabling JPEG" msgstr "1-Bit-JPEG nicht möglich -- JPEG wird ausgeschaltet" #: libvips/foreign/vips2tiff.c:1463 msgid "unsigned 8-bit int, 16-bit int, and 32-bit float only" msgstr "nur vorzeichenlose 8-Bit-Ganzzahl und 32-Bit-Fließkommazahl" #: libvips/foreign/vips2tiff.c:1470 msgid "1 to 5 bands only" msgstr "nur 1 bis 5 Bänder" #: libvips/foreign/radiance.c:885 msgid "error reading radiance header" msgstr "Fehler beim Lesen der Glanz-Kopfzeilen" #: libvips/foreign/csvload.c:121 msgid "load csv from file" msgstr "" #: libvips/foreign/csvload.c:139 msgid "Skip" msgstr "" #: libvips/foreign/csvload.c:140 msgid "Skip this many lines at the start of the file" msgstr "" #: libvips/foreign/csvload.c:146 msgid "Lines" msgstr "" #: libvips/foreign/csvload.c:147 msgid "Read this many lines from the file" msgstr "" #: libvips/foreign/csvload.c:153 msgid "Whitespace" msgstr "" #: libvips/foreign/csvload.c:154 msgid "Set of whitespace characters" msgstr "" #: libvips/foreign/csvload.c:161 msgid "Set of separator characters" msgstr "" #: libvips/foreign/pngsave.c:95 msgid "save png" msgstr "" #: libvips/foreign/pngsave.c:104 #, fuzzy msgid "Compression factor" msgstr "" #: libvips/foreign/pngsave.c:110 msgid "Interlace" msgstr "" #: libvips/foreign/pngsave.c:111 #, fuzzy msgid "Interlace image" msgstr "kein RAD-Bild" #: libvips/foreign/pngsave.c:162 #, fuzzy msgid "save image to png file" msgstr "falscher Bildtyp" #: libvips/foreign/pngsave.c:224 #, fuzzy msgid "save image to png buffer" msgstr "In den Puffer kann nicht geschrieben werden." #: libvips/foreign/foreign.c:384 msgid "load and save image files" msgstr "" #: libvips/foreign/foreign.c:525 libvips/mosaicing/im_remosaic.c:76 #, c-format msgid "file \"%s\" not found" msgstr "Datei »%s« nicht gefunden" #: libvips/foreign/foreign.c:534 libvips/foreign/foreign.c:1022 #, fuzzy, c-format msgid "\"%s\" is not a known file format" msgstr "Datei »%s« hat kein bekanntes Format" #: libvips/foreign/foreign.c:740 #, fuzzy msgid "images do not match" msgstr "»ink«-Bild passt nicht in das Bild" #: libvips/foreign/foreign.c:826 msgid "" "VIPS_FOREIGN_PARTIAL and VIPS_FOREIGN_SEQUENTIAL both set -- using SEQUENTIAL" msgstr "" #: libvips/foreign/foreign.c:894 msgid "file loaders" msgstr "" #: libvips/foreign/foreign.c:903 msgid "Flags" msgstr "" #: libvips/foreign/foreign.c:904 msgid "Flags for this file" msgstr "" #: libvips/foreign/foreign.c:910 msgid "Disc" msgstr "" #: libvips/foreign/foreign.c:911 msgid "Open to disc" msgstr "" #: libvips/foreign/foreign.c:917 msgid "Sequential" msgstr "" #: libvips/foreign/foreign.c:918 msgid "Sequential read only" msgstr "" #: libvips/foreign/foreign.c:1370 msgid "file savers" msgstr "" #: libvips/foreign/foreign.c:1380 #, fuzzy msgid "Image to save" msgstr "Bild zu schmal" #: libvips/freq_filt/im_freq_mask.c:108 msgid "mask sizes power of 2 only" msgstr "Maskengröße nur Potenzen von 2" #: libvips/freq_filt/im_freq_mask.c:155 msgid "unimplemented mask type" msgstr "nicht implementierter Maskentyp" #: libvips/freq_filt/fmaskcir.c:158 libvips/freq_filt/fmaskcir.c:303 #: libvips/freq_filt/fmaskcir.c:394 libvips/freq_filt/fmaskcir.c:476 #: libvips/freq_filt/fmaskcir.c:556 msgid "bad sizes" msgstr "falsche Größen" #: libvips/freq_filt/fmaskcir.c:172 libvips/freq_filt/fmaskcir.c:228 #: libvips/freq_filt/fmaskcir.c:242 libvips/freq_filt/fmaskcir.c:317 #: libvips/freq_filt/fmaskcir.c:321 libvips/freq_filt/fmaskcir.c:408 #: libvips/freq_filt/fmaskcir.c:412 libvips/freq_filt/fmaskcir.c:570 #: libvips/freq_filt/fmaskcir.c:574 libvips/freq_filt/fmask4th.c:120 #: libvips/freq_filt/fmask4th.c:129 libvips/freq_filt/fmask4th.c:163 #: libvips/freq_filt/fmask4th.c:172 libvips/freq_filt/fmask4th.c:205 #: libvips/freq_filt/fmask4th.c:214 libvips/freq_filt/fmask4th.c:252 #: libvips/freq_filt/fmask4th.c:261 libvips/freq_filt/fmask4th.c:292 #: libvips/freq_filt/fmask4th.c:301 libvips/freq_filt/fmask4th.c:333 #: libvips/freq_filt/fmask4th.c:342 libvips/freq_filt/fmask4th.c:373 #: libvips/freq_filt/fmask4th.c:387 libvips/freq_filt/fmask4th.c:423 #: libvips/freq_filt/fmask4th.c:437 libvips/freq_filt/fmask4th.c:473 #: libvips/freq_filt/fmask4th.c:487 libvips/freq_filt/fmask4th.c:527 #: libvips/freq_filt/fmask4th.c:541 libvips/freq_filt/fmask4th.c:578 #: libvips/freq_filt/fmask4th.c:592 libvips/freq_filt/fmask4th.c:629 #: libvips/freq_filt/fmask4th.c:643 libvips/freq_filt/fmask4th.c:697 msgid "bad args" msgstr "falsche Argumente" #: libvips/freq_filt/fmaskcir.c:490 msgid "bad args (f)" msgstr "falsche Argumente (f)" #: libvips/freq_filt/fmaskcir.c:494 msgid "bad args (ac)" msgstr "falsche Argumente (ac)" #: libvips/freq_filt/fmaskcir.c:655 libvips/freq_filt/fmask4th.c:791 msgid "unimplemented mask" msgstr "nicht implementierte Maske" #: libvips/freq_filt/im_fractsurf.c:72 msgid "dimension should be in (2,3)" msgstr "Dimension sollte in (2,3) liegen" #: libvips/freq_filt/im_invfft.c:105 libvips/freq_filt/im_invfftr.c:124 #: libvips/freq_filt/im_fwfft.c:125 libvips/freq_filt/im_fwfft.c:241 msgid "unable to create transform plan" msgstr "Umwandlungsplan kann nicht erstellt werden" #: libvips/freq_filt/im_invfft.c:130 libvips/freq_filt/im_invfftr.c:145 #: libvips/freq_filt/im_fwfft.c:301 #, fuzzy msgid "vips configured without FFT support" msgstr "ohne »im_video_v4l1«-Unterstützung kompiliert" #: libvips/histograms_lut/im_stdif.c:186 #: libvips/histograms_lut/im_lhisteq.c:159 msgid "window too large" msgstr "Fenster zu groß" #: libvips/histograms_lut/im_stdif.c:191 #: libvips/histograms_lut/im_lhisteq.c:164 msgid "window too small" msgstr "Fenster zu klein" #: libvips/histograms_lut/im_histnD.c:227 #, c-format msgid " bins out of range [1,%d]" msgstr " »bins« außerhalb des Bereichs [1,%d]" #: libvips/histograms_lut/im_identity.c:139 libvips/other/im_grey.c:101 #: libvips/other/im_make_xy.c:95 msgid "bad size" msgstr "falsche Größe" #: libvips/histograms_lut/im_buildlut.c:120 msgid "x value not an int" msgstr "x-Wert keine Ganzzahl" #: libvips/histograms_lut/im_buildlut.c:133 msgid "x range too small" msgstr "x-Bereich zu klein" #: libvips/histograms_lut/im_buildlut.c:278 msgid "bad input matrix size" msgstr "falsche Eingabematrix-Größe" #: libvips/histograms_lut/tone.c:194 msgid "bad in_max, out_max parameters" msgstr "falsche »in_max«-, »out_max«-Parameter" #: libvips/histograms_lut/tone.c:199 msgid "bad Lb, Lw parameters" msgstr "falsche »Lb«-, »Lw«-Parameter" #: libvips/histograms_lut/tone.c:204 msgid "Ps not in range [0.0,1.0]" msgstr "»Ps« nicht im Bereich [0.0,1.0]" #: libvips/histograms_lut/tone.c:209 msgid "Pm not in range [0.0,1.0]" msgstr "»Pm« nicht im Bereich [0.0,1.0]" #: libvips/histograms_lut/tone.c:214 msgid "Ph not in range [0.0,1.0]" msgstr "»Ph« nicht im Bereich [0.0,1.0]" #: libvips/histograms_lut/tone.c:219 msgid "S not in range [-30,+30]" msgstr "»S« nicht im Bereich [-30,+30]" #: libvips/histograms_lut/tone.c:224 msgid "M not in range [-30,+30]" msgstr "»M« nicht im Bereich [-30,+30]" #: libvips/histograms_lut/tone.c:229 msgid "H not in range [-30,+30]" msgstr "»H« nicht im Bereich [-30,+30]" #: libvips/histograms_lut/im_invertlut.c:132 msgid "element out of range [0,1]" msgstr "Element außerhalb des Bereichs [0,1]" #: libvips/histograms_lut/im_invertlut.c:287 msgid "bad input matrix" msgstr "falsche Eingabematrix" #: libvips/histograms_lut/im_invertlut.c:292 msgid "bad lut_size" msgstr "falsche »lut_size«" #: libvips/histograms_lut/im_maplut.c:97 #, c-format msgid "%d overflows detected" msgstr "%d Überläufe entdeckt" #: libvips/inplace/im_draw_line.c:389 msgid "mask image not 1 band 8 bit uncoded" msgstr "Maskenbild nicht 8-Bit-kodiert mit einem Band" #: libvips/inplace/im_draw_line.c:395 msgid "ink image does not match in image" msgstr "»ink«-Bild passt nicht in das Bild" #: libvips/inplace/im_draw_line.c:399 msgid "ink image not 1x1 pixels" msgstr "»ink«-Bild nicht 1x1 Bildpunkte" #: libvips/iofuncs/sink.c:105 #, c-format msgid "stop function failed for image \"%s\"" msgstr "»stop«-Funktion für Bild »%s« fehlgeschlagen" #: libvips/iofuncs/sink.c:142 #, c-format msgid "start function failed for image \"%s\"" msgstr "»start«-Funktion für Bild »%s« fehlgeschlagen" #: libvips/iofuncs/sink.c:175 msgid "per-thread state for sink" msgstr "Status pro Thread für »sink«" #: libvips/iofuncs/memory.c:231 msgid "vips_free: too many frees" msgstr "" #: libvips/iofuncs/memory.c:235 msgid "vips_free: too much free" msgstr "" #: libvips/iofuncs/memory.c:295 libvips/iofuncs/memory.c:298 #, c-format msgid "out of memory --- size == %dMB" msgstr "Hauptspeicher reicht nicht aus --- Größe == %dMB" #: libvips/iofuncs/vips.c:286 #, c-format msgid "\"%s\" is not a VIPS image" msgstr "»%s« ist kein VIPS-Bild" #: libvips/iofuncs/vips.c:374 msgid "unable to read history" msgstr "Verlauf kann nicht gelesen werden" #: libvips/iofuncs/vips.c:407 msgid "more than a 10 megabytes of XML? sufferin' succotash!" msgstr "mehr als 10 Megabyte XML? Leidende Succotash!" #: libvips/iofuncs/vips.c:455 msgid "incorrect namespace in XML" msgstr "falscher Namensraum in XML" #: libvips/iofuncs/vips.c:579 msgid "error transforming from save format" msgstr "Fehler beim Umwandeln vom gespeicherten Format" #: libvips/iofuncs/vips.c:680 #, c-format msgid "unable to set property \"%s\" to value \"%s\"." msgstr "Eigenschaft »%s« kann nicht auf Wert »%s« gesetzt werden." #: libvips/iofuncs/vips.c:728 msgid "error transforming to save format" msgstr "Fehler beim Umwandeln in das zu speichernde Format" #: libvips/iofuncs/vips.c:776 libvips/iofuncs/vips.c:973 #: libvips/iofuncs/window.c:237 msgid "file has been truncated" msgstr "Datei wurde gekürzt" #: libvips/iofuncs/vips.c:890 libvips/iofuncs/vips.c:899 #: libvips/iofuncs/vips.c:922 msgid "xml save error" msgstr "XML-Fehler beim Speichern" #: libvips/iofuncs/vips.c:959 #, fuzzy, c-format msgid "unable to read header for \"%s\"" msgstr "Kopfzeilen für »%s« können nicht gelesen werden, %s" #: libvips/iofuncs/vips.c:972 libvips/iofuncs/window.c:236 #, c-format msgid "unable to read data for \"%s\", %s" msgstr "Daten für »%s« können nicht gelesen werden, %s" #: libvips/iofuncs/vips.c:984 #, c-format msgid "error reading XML: %s" msgstr "Fehler beim Lesen von XML: %s" #: libvips/iofuncs/generate.c:343 libvips/iofuncs/header.c:611 msgid "too many images" msgstr "zu viele Bilder" #: libvips/iofuncs/generate.c:606 #, fuzzy msgid "demand hint not set" msgstr "»im_demand_hint()« nicht gesetzt" #: libvips/iofuncs/generate.c:625 libvips/iofuncs/generate.c:650 #, fuzzy msgid "generate() called twice" msgstr "zweimal aufgerufen!" #: libvips/iofuncs/generate.c:682 libvips/iofuncs/image.c:1873 #, c-format msgid "unable to output to a %s image" msgstr "es kann nicht zu einem %s-Bild ausgegeben werden" #: libvips/iofuncs/region.c:212 #, c-format msgid "start function failed for image %s" msgstr "Startfunktion für Bild %s fehlgeschlagen" #: libvips/iofuncs/region.c:528 libvips/iofuncs/region.c:598 #: libvips/iofuncs/region.c:745 libvips/iofuncs/region.c:1241 msgid "valid clipped to nothing" msgstr "gültig an nichts angeklammert" #: libvips/iofuncs/region.c:642 msgid "bad image type" msgstr "falscher Bildtyp" #: libvips/iofuncs/region.c:687 msgid "no pixel data on attached image" msgstr "" #: libvips/iofuncs/region.c:693 #, fuzzy msgid "images do not match in pixel size" msgstr "Bilder müssen in der Größe passen" #: libvips/iofuncs/region.c:726 libvips/iofuncs/region.c:1223 msgid "dest too small" msgstr "Ziel zu klein" #: libvips/iofuncs/region.c:813 msgid "bad position" msgstr "falsche Position" #: libvips/iofuncs/region.c:1102 libvips/iofuncs/region.c:1294 #, c-format msgid "unable to input from a %s image" msgstr "Eingabe von einem %s-Bild nicht möglich" #: libvips/iofuncs/region.c:1126 msgid "incomplete header" msgstr "unvollständige Kopfzeilen" #: libvips/iofuncs/region.c:1197 msgid "inappropriate region type" msgstr "Ungeeigneter Regionstyp" #: libvips/iofuncs/init.c:366 msgid "evaluate with N concurrent threads" msgstr "mit N gleichzeitigen Threads auswerten" #: libvips/iofuncs/init.c:369 msgid "set tile width to N (DEBUG)" msgstr "Bildbreite auf N setzen (DEBUG)" #: libvips/iofuncs/init.c:372 msgid "set tile height to N (DEBUG)" msgstr "Bildhöhe auf N setzen (DEBUG)" #: libvips/iofuncs/init.c:375 msgid "set thinstrip height to N (DEBUG)" msgstr "»thinstrip«-Höhe auf N setzen (DEBUG)" #: libvips/iofuncs/init.c:378 msgid "set fatstrip height to N (DEBUG)" msgstr "»fatstrip«-Höhe auf N setzen (DEBUG)" #: libvips/iofuncs/init.c:381 msgid "show progress feedback" msgstr "Fortschrittsrückmeldung anzeigen" #: libvips/iofuncs/init.c:384 msgid "leak-check on exit" msgstr "" #: libvips/iofuncs/init.c:387 #, fuzzy msgid "images larger than N are decompressed to disc" msgstr "Bildgröße liegt über dem, was auf die Platte dekomprimiert werden kann" #: libvips/iofuncs/init.c:390 msgid "disable vectorised versions of operations" msgstr "vektorgesteuerte Versionen von Operationen deaktivieren" #: libvips/iofuncs/init.c:393 msgid "cache at most N operations" msgstr "" #: libvips/iofuncs/init.c:396 msgid "cache at most N bytes in memory" msgstr "" #: libvips/iofuncs/init.c:399 #, fuzzy msgid "allow at most N open files" msgstr "Profil »%s« kann nicht geöffnet werden" #: libvips/iofuncs/init.c:402 msgid "trace operation cache" msgstr "" #: libvips/iofuncs/init.c:405 msgid "dump operation cache on exit" msgstr "" #: libvips/iofuncs/init.c:428 msgid "VIPS Options" msgstr "VIPS-Optionen" #: libvips/iofuncs/init.c:428 msgid "Show VIPS options" msgstr "VIPS-Optionen anzeigen" #: libvips/iofuncs/image.c:293 #, fuzzy msgid "unable to close fd" msgstr "»fd« für %s kann nicht geschlossen werden" #: libvips/iofuncs/image.c:373 #, c-format msgid "%dx%d %s, %d band, %s" msgid_plural "%dx%d %s, %d bands, %s" msgstr[0] "" msgstr[1] "" #: libvips/iofuncs/image.c:403 #, c-format msgid " %s, %d band, %s" msgid_plural " %s, %d bands, %s" msgstr[0] "" msgstr[1] "" #: libvips/iofuncs/image.c:529 #, c-format msgid "%s %s: %d threads, %d x %d tiles, groups of %d scanlines" msgstr "" #: libvips/iofuncs/image.c:542 #, c-format msgid "%s %s: %d%% complete" msgstr "%s %s: %d%% komplett" #. Spaces at end help to erase the %complete message we overwrite. #. #: libvips/iofuncs/image.c:559 #, c-format msgid "%s %s: done in %ds \n" msgstr "%s %s: Erledigt in %ds \n" #: libvips/iofuncs/image.c:738 #, fuzzy, c-format msgid "unable to open \"%s\", file too short" msgstr "»%s« kann nicht zur Ausgabe geöffnet werden" #: libvips/iofuncs/image.c:748 #, c-format msgid "%s is longer than expected" msgstr "%s ist länger als erwartet" #: libvips/iofuncs/image.c:765 #, c-format msgid "bad mode \"%s\"" msgstr "falscher Modus »%s«" #: libvips/iofuncs/image.c:820 #, fuzzy msgid "image class" msgstr "VIPS-Basisklasse" #: libvips/iofuncs/image.c:916 msgid "Image filename" msgstr "" #: libvips/iofuncs/image.c:922 msgid "Mode" msgstr "" #: libvips/iofuncs/image.c:923 msgid "Open mode" msgstr "" #: libvips/iofuncs/image.c:929 msgid "Kill" msgstr "" #: libvips/iofuncs/image.c:930 msgid "Block evaluation on this image" msgstr "" #: libvips/iofuncs/image.c:936 msgid "Demand style" msgstr "" #: libvips/iofuncs/image.c:937 msgid "Preferred demand style for this image" msgstr "" #: libvips/iofuncs/image.c:950 msgid "Foreign buffer" msgstr "" #: libvips/iofuncs/image.c:951 #, fuzzy msgid "Pointer to foreign pixels" msgstr "Bildpunkte können nicht gelesen werden" #: libvips/iofuncs/image.c:1215 #, c-format msgid "killed for image \"%s\"" msgstr "für Bild »%s« abgeschossen" #: libvips/iofuncs/image.c:1815 msgid "bad image descriptor" msgstr "falscher Bild-Deskriptor" #: libvips/iofuncs/image.c:1917 #, c-format msgid "auto-rewind for %s failed" msgstr "automatischer Rücklauf für %s fehlgeschlagen" #: libvips/iofuncs/image.c:1973 libvips/iofuncs/image.c:2168 #: libvips/iofuncs/image.c:2185 msgid "no image data" msgstr "keine Bilddaten" #: libvips/iofuncs/image.c:2041 libvips/iofuncs/image.c:2208 msgid "image not readable" msgstr "Bild nicht lesbar" #: libvips/iofuncs/image.c:2062 libvips/iofuncs/image.c:2238 #: libvips/iofuncs/image.c:2247 msgid "image already written" msgstr "Bild bereits geschrieben" #: libvips/iofuncs/image.c:2086 libvips/iofuncs/image.c:2259 msgid "image not writeable" msgstr "Bild nicht schreibbar" #: libvips/iofuncs/image.c:2132 msgid "bad file type" msgstr "falscher Dateityp" #: libvips/iofuncs/sinkscreen.c:185 msgid "per-thread state for render" msgstr "Status pro Thread für »render«" #: libvips/iofuncs/sinkscreen.c:537 libvips/iofuncs/sinkdisc.c:236 #: libvips/iofuncs/threadpool.c:606 msgid "unable to create thread" msgstr "Thread kann nicht erstellt werden" #: libvips/iofuncs/mapfile.c:130 libvips/iofuncs/mapfile.c:297 msgid "unable to CreateFileMapping" msgstr "»CreateFileMapping« nicht möglich" #: libvips/iofuncs/mapfile.c:138 libvips/iofuncs/mapfile.c:309 msgid "unable to MapViewOfFile" msgstr "»MapViewOfFile« nicht möglich" #: libvips/iofuncs/mapfile.c:178 msgid "unable to mmap" msgstr "»mmap« nicht möglich" #: libvips/iofuncs/mapfile.c:179 #, c-format msgid "" "map failed (%s), running very low on system resources, expect a crash soon" msgstr "" "»map« fehlgeschlagen (%s), die Systemressourcen werden knapp, ein Absturz " "steht bevor" #: libvips/iofuncs/mapfile.c:196 libvips/iofuncs/mapfile.c:303 msgid "unable to UnmapViewOfFile" msgstr "»UnmapViewOfFile« nicht möglich" #: libvips/iofuncs/mapfile.c:202 msgid "unable to munmap file" msgstr "»munmap« der Datei nicht möglich" #: libvips/iofuncs/mapfile.c:224 msgid "file is less than 64 bytes" msgstr "Datei ist weniger als 64 Byte groß" #: libvips/iofuncs/mapfile.c:229 libvips/iofuncs/mapfile.c:263 msgid "unable to get file status" msgstr "Dateistatus kann nicht abgefragt werden" #: libvips/iofuncs/mapfile.c:235 msgid "not a regular file" msgstr "keine reguläre Datei" #: libvips/iofuncs/mapfile.c:269 msgid "unable to read data" msgstr "Daten können nicht gelesen werden" #: libvips/iofuncs/mapfile.c:329 #, c-format msgid "unable to mmap: \"%s\" - %s" msgstr "»mmap« nicht möglich: \"%s\" - %s" #: libvips/iofuncs/mapfile.c:339 #, c-format msgid "unable to mmap \"%s\" to same address" msgstr "»mmap %s« zur gleichen Adresse nicht möglich" #: libvips/iofuncs/base64.c:170 msgid "too little data" msgstr "zu wenige Daten" #. We shouldn't really be used for large amounts of data. #. #: libvips/iofuncs/base64.c:176 libvips/iofuncs/base64.c:241 msgid "too much data" msgstr "zu viele Daten" #: libvips/iofuncs/object.c:148 #, fuzzy, c-format msgid "parameter %s not set" msgstr "Parameter außerhalb des Bereichs" #: libvips/iofuncs/object.c:505 #, c-format msgid "no property named `%s'" msgstr "" #: libvips/iofuncs/object.c:513 #, c-format msgid "no vips argument named `%s'" msgstr "" #: libvips/iofuncs/object.c:520 #, c-format msgid "argument `%s' has no instance" msgstr "" #: libvips/iofuncs/object.c:1248 libvips/iofuncs/operation.c:287 #: libvips/resample/interpolate.c:615 #, c-format msgid "class \"%s\" not found" msgstr "Klasse »%s« nicht gefunden" #: libvips/iofuncs/object.c:1297 #, fuzzy msgid "base class" msgstr "VIPS-Basisklasse" #: libvips/iofuncs/object.c:1311 msgid "Nickname" msgstr "Nickname" #: libvips/iofuncs/object.c:1312 msgid "Class nickname" msgstr "Klassen-Nickname" #: libvips/iofuncs/object.c:1318 msgid "Description" msgstr "Beschreibung" #: libvips/iofuncs/object.c:1319 msgid "Class description" msgstr "Klassenbeschreibung" #: libvips/iofuncs/object.c:1509 #, c-format msgid "enum '%s' has no member '%s'" msgstr "" #: libvips/iofuncs/object.c:1769 #, fuzzy, c-format msgid "unable to set '%s'" msgstr "»%s« kann nicht geöffnet werden" #: libvips/iofuncs/object.c:1777 msgid "not , or ) after parameter" msgstr "kein »,« oder »)« nach Parameter" #: libvips/iofuncs/object.c:1784 msgid "extra tokens after ')'" msgstr "keine zusätzlichen Token nach »)«" #. File length unit. #. #: libvips/iofuncs/buf.c:520 msgid "bytes" msgstr "" #. Kilo byte unit. #. #: libvips/iofuncs/buf.c:524 msgid "KB" msgstr "" #. Mega byte unit. #. #: libvips/iofuncs/buf.c:528 msgid "MB" msgstr "" #. Giga byte unit. #. #: libvips/iofuncs/buf.c:532 msgid "GB" msgstr "" #. Tera byte unit. #. #: libvips/iofuncs/buf.c:536 msgid "TB" msgstr "" #: libvips/iofuncs/util.c:639 msgid "unable to get file stats" msgstr "Dateistatus kann nicht abgefragt werden" #: libvips/iofuncs/util.c:656 libvips/iofuncs/sinkdisc.c:262 msgid "write failed" msgstr "Schreiben fehlgeschlagen" #: libvips/iofuncs/util.c:720 #, c-format msgid "unable to open file \"%s\" for reading" msgstr "Datei »%s« kann nicht zum Lesen geöffnet werden" #: libvips/iofuncs/util.c:742 #, c-format msgid "unable to open file \"%s\" for writing" msgstr "Datei »%s« kann nicht zum Schreiben geöffnet werden" #: libvips/iofuncs/util.c:767 #, c-format msgid "\"%s\" too long" msgstr "»%s« zu lang" #: libvips/iofuncs/util.c:784 msgid "out of memory" msgstr "Hauptspeicher reicht nicht aus" #: libvips/iofuncs/util.c:810 #, c-format msgid "error reading from file \"%s\"" msgstr "Fehler beim Lesen von Datei »%s«" #: libvips/iofuncs/util.c:857 #, fuzzy, c-format msgid "write error (%zd out of %zd blocks written) ... disc full?" msgstr "Schreibfehler (%zd aus %zd Blöcken geschrieben) ... Platte voll?" #: libvips/iofuncs/util.c:1106 libvips/iofuncs/util.c:1113 msgid "unable to truncate" msgstr "kann nicht gekürzt werden" #: libvips/iofuncs/util.c:1297 msgid "unexpected end of string" msgstr "Unerwartetes Ende der Zeichenkette" #: libvips/iofuncs/util.c:1315 #, c-format msgid "expected %s, saw %s" msgstr "%s erwartet, %s gesehen" #: libvips/iofuncs/util.c:1485 #, c-format msgid "unable to make temporary file %s" msgstr "temporäre Datei %s kann nicht erstellt werden" #: libvips/iofuncs/operation.c:97 #, fuzzy msgid "input" msgstr "Falsche Eingabe" #: libvips/iofuncs/operation.c:97 #, fuzzy msgid "output" msgstr "detaillierte Ausgabe" #: libvips/iofuncs/operation.c:246 msgid "operations" msgstr "" #: libvips/iofuncs/operation.c:273 msgid "usage:" msgstr "" #: libvips/iofuncs/operation.c:699 #, fuzzy, c-format msgid "unknown argument '%s'" msgstr "zu wenige Argumente" #: libvips/iofuncs/operation.c:810 msgid "too few arguments" msgstr "zu wenige Argumente" #: libvips/iofuncs/operation.c:931 msgid "too many arguments" msgstr "zu viele Argumente" #: libvips/iofuncs/header.c:210 #, fuzzy, c-format msgid "unknown band format %d" msgstr "unbekanntes Bandformat" #: libvips/iofuncs/header.c:781 #, c-format msgid "field \"%s\" not found" msgstr "Feld »%s« nicht gefunden" #: libvips/iofuncs/header.c:949 #, c-format msgid "field \"%s\" is of type %s, not %s" msgstr "Feld »%s« ist vom Typ %s, nicht %s" #: libvips/iofuncs/sinkmemory.c:108 #, fuzzy msgid "per-thread state for sinkmemory" msgstr "Status pro Thread für »sink«" #: libvips/iofuncs/sinkdisc.c:121 msgid "per-thread state for sinkdisc" msgstr "Status pro Thread für »sinkdisc«" #: libvips/iofuncs/error.c:210 msgid "windows error" msgstr "Windows-Fehler" #: libvips/iofuncs/error.c:219 msgid "unix error" msgstr "Unix-Fehler" #: libvips/iofuncs/error.c:304 libvips/iofuncs/error.c:305 #: libvips/iofuncs/error.c:354 libvips/iofuncs/error.c:355 #, c-format msgid "%s: " msgstr "%s: " #: libvips/iofuncs/error.c:304 msgid "vips diagnostic" msgstr "Vips-Diagnose" #: libvips/iofuncs/error.c:354 msgid "vips warning" msgstr "Vips-Warnung" #: libvips/iofuncs/error.c:438 msgid "image must be uncoded" msgstr "Bild muss unkodiert sein" #: libvips/iofuncs/error.c:466 msgid "image coding must be NONE or LABQ" msgstr "Bildkodierung muss NONE oder LABQ sein" #: libvips/iofuncs/error.c:494 msgid "unknown image coding" msgstr "unbekannte Bildkodierung" #: libvips/iofuncs/error.c:520 msgid "Radiance coding only" msgstr "Nur Glanzkodierung" #: libvips/iofuncs/error.c:546 msgid "LABQ coding only" msgstr "Nur LABQ-Kodierung" #: libvips/iofuncs/error.c:570 msgid "image must one band" msgstr "Bild muss ein Band haben" #: libvips/iofuncs/error.c:595 #, c-format msgid "image must have %d bands" msgstr "Bild muss %d Bänder haben" #: libvips/iofuncs/error.c:620 msgid "image must have one or three bands" msgstr "Bild muss ein oder drei Bänder haben" #: libvips/iofuncs/error.c:648 msgid "images must have the same number of bands, or one must be single-band" msgstr "" "Bilder müssen die gleiche Anzahl Bänder haben oder eines muss ein Band haben" #: libvips/iofuncs/error.c:675 #, c-format msgid "image must have 1 or %d bands" msgstr "Bild muss ein oder %d Bänder haben" #: libvips/iofuncs/error.c:699 msgid "image must be non-complex" msgstr "Bild muss nicht-komplex sein" #: libvips/iofuncs/error.c:723 msgid "image must be complex" msgstr "Bild muss komplex sein" #: libvips/iofuncs/error.c:749 #, c-format msgid "image must be %s" msgstr "Bild muss %s sein" #: libvips/iofuncs/error.c:774 msgid "image must be integer" msgstr "Bild muss ganzzahlig sein" #: libvips/iofuncs/error.c:799 msgid "image must be unsigned integer" msgstr "Bild muss aus vorzeichenlosen Ganzzahlen bestehen" #: libvips/iofuncs/error.c:827 msgid "image must be 8- or 16-bit integer, signed or unsigned" msgstr "" "Bild muss aus 8- oder 16-Bit Ganzzahlen mit oder ohne Vorzeichen bestehen" #: libvips/iofuncs/error.c:854 msgid "image must be 8- or 16-bit unsigned integer" msgstr "Bild muss aus 8- oder 16-Bit vorzeichenlosen Ganzzahlen bestehen" #: libvips/iofuncs/error.c:880 msgid "image must be 8- or 16-bit unsigned integer, or float" msgstr "" "Bild muss aus 8- oder 16-Bit vorzeichenlosen Ganzzahlen oder " "Fließkommazahlen bestehen" #: libvips/iofuncs/error.c:908 msgid "image must be unsigned int or float" msgstr "" "Bild muss aus 8- oder 16-Bit vorzeichenlosen Ganz- oder Fließkommazahlen " "bestehen" #: libvips/iofuncs/error.c:933 msgid "images must match in size" msgstr "Bilder müssen in der Größe passen" #: libvips/iofuncs/error.c:959 msgid "images must have the same number of bands" msgstr "Bilder müssen die gleiche Anzahl Bänder haben" #: libvips/iofuncs/error.c:1013 msgid "images must have the same band format" msgstr "Bilder müssen das gleiche Bandformat haben" #: libvips/iofuncs/error.c:1039 msgid "images must have the same coding" msgstr "Bilder müssen die gleiche Kodierung haben" #: libvips/iofuncs/error.c:1064 #, c-format msgid "vector must have 1 or %d elements" msgstr "Vektor muss 1 oder %d Elemente haben" #: libvips/iofuncs/error.c:1089 msgid "histograms must have width or height 1" msgstr "Histogramme müssen eine Breite oder Höhe von eins haben" #: libvips/iofuncs/error.c:1094 msgid "histograms must have not have more than 65536 elements" msgstr "Histogramm dürfen nicht mehr als 65536 Elemente haben" #: libvips/iofuncs/error.c:1123 libvips/iofuncs/error.c:1151 msgid "nonsense mask parameters" msgstr "unsinnige Maskenparameter" #: libvips/iofuncs/error.c:1176 #, fuzzy msgid "mask must be 1D" msgstr "Bild muss %s sein" #: libvips/iofuncs/threadpool.c:217 #, c-format msgid "threads clipped to %d" msgstr "Threads an %d angeheftet" #: libvips/iofuncs/threadpool.c:281 msgid "per-thread state for vipsthreadpool" msgstr "Status pro Thread für »vipsthreadpool«" #: libvips/morphology/im_profile.c:104 msgid "dir not 0 or 1" msgstr "»dir« nicht 0 oder 1" #: libvips/morphology/morphology.c:311 #, c-format msgid "bad mask element (%d should be 0, 128 or 255)" msgstr "falsches Maskenelement (%d sollte 0, 128 oder 255 sein)" #: libvips/morphology/im_zerox.c:141 msgid "flag not -1 or 1" msgstr "Schalter nicht -1 oder 1" #: libvips/morphology/im_zerox.c:145 msgid "image too narrow" msgstr "Bild zu schmal" #: libvips/morphology/im_cntlines.c:81 msgid "flag should be 0 (horizontal) or 1 (vertical)" msgstr "Schalter sollte 0 (horizontal) oder 1 (vertikal) sein" #: libvips/morphology/im_rank.c:365 msgid "image too small for window" msgstr "Bild zu klein für Fenster" #: libvips/morphology/im_rank_image.c:303 msgid "zero input images!" msgstr "null Eingabebilder" #: libvips/morphology/im_rank_image.c:308 #, c-format msgid "index should be in range 0 - %d" msgstr "Index sollte im Bereich 0 - %d liegen" #: libvips/mosaicing/im_lrmerge.c:213 libvips/mosaicing/im_lrmerge.c:262 #: libvips/mosaicing/im_lrmerge.c:603 libvips/mosaicing/im_tbmerge.c:163 #: libvips/mosaicing/im_tbmerge.c:217 libvips/mosaicing/im_tbmerge.c:535 msgid "internal error" msgstr "interner Fehler" #: libvips/mosaicing/im_lrmerge.c:703 msgid "mwidth must be -1 or >= 0" msgstr "»mwidth« muss -1 oder >= 0 sein" #: libvips/mosaicing/im_lrmerge.c:732 msgid "no overlap" msgstr "kein Überlappen" #: libvips/mosaicing/im_lrmerge.c:803 libvips/mosaicing/im_tbmerge.c:634 #: libvips/resample/im_affine.c:469 msgid "unknown coding type" msgstr "unbekannter Kodierungstyp" #: libvips/mosaicing/im_lrmerge.c:820 libvips/mosaicing/im_tbmerge.c:652 msgid "too much overlap" msgstr "zu viel Überlappung" #: libvips/mosaicing/im_remosaic.c:104 #, c-format msgid "substitute image \"%s\" is not the same size as \"%s\"" msgstr "Bild zum Ersetzen »%s« hat nicht die gleiche Größe wie »%s«" #: libvips/mosaicing/im_tbmosaic.c:89 libvips/mosaicing/im_lrmosaic.c:113 msgid "bad area parameters" msgstr "falsche Bereichsparameter" #: libvips/mosaicing/im_tbmosaic.c:110 libvips/mosaicing/im_lrmosaic.c:134 msgid "overlap too small for search" msgstr "Überlappen zu klein für Suche" #: libvips/mosaicing/im_tbmosaic.c:143 libvips/mosaicing/im_lrmosaic.c:167 msgid "unknown Coding type" msgstr "unbekannter Kodierungstyp" #: libvips/mosaicing/im_chkpair.c:200 msgid "inputs incompatible" msgstr "Eingaben inkompatibel" #: libvips/mosaicing/im_chkpair.c:204 libvips/mosaicing/im_tbcalcon.c:102 msgid "help!" msgstr "Hilfe!" #: libvips/mosaicing/im_tbcalcon.c:116 msgid "overlap too small" msgstr "Überlappen zu schmal" #: libvips/mosaicing/global_balance.c:145 msgid "no matching '>'" msgstr "kein passendes »>«" #: libvips/mosaicing/global_balance.c:154 msgid "too many items" msgstr "zu viele Elemente" # Propogate a transform down a tree. If dirty is set, we've been here before, # so there is a doubling up of this node. If this is a leaf, then we have the # same leaf twice (which, in fact, we can cope with); if this is a node, we # have circularity. #: libvips/mosaicing/global_balance.c:448 msgid "circularity detected" msgstr "Zirkularität entdeckt" #: libvips/mosaicing/global_balance.c:482 #: libvips/mosaicing/global_balance.c:538 #, c-format msgid "image \"%s\" used twice as output" msgstr "Bild »%s« zweimal als Ausgabe benutzt" #: libvips/mosaicing/global_balance.c:587 msgid "bad number of args in join line" msgstr "falsche Anzahl von Argumenten in »join«-Zeile" #: libvips/mosaicing/global_balance.c:629 msgid "bad number of args in join1 line" msgstr "falsche Anzahl von Argumenten in »join1«-Zeile" #: libvips/mosaicing/global_balance.c:665 msgid "bad number of args in copy line" msgstr "falsche Anzahl von Argumenten in »copy«-Zeile" #: libvips/mosaicing/global_balance.c:723 msgid "" "mosaic root not found in desc file\n" "is this really a mosaiced image?" msgstr "" "Mosaik-Wurzel nicht in Beschreibungsdatei gefunden\n" "ist das wirklich ein Bild?" #: libvips/mosaicing/global_balance.c:734 msgid "more than one root" msgstr "mehr als eine Wurzel" #: libvips/mosaicing/global_balance.c:1053 msgid "empty overlap!" msgstr "leere Überlappung!" #: libvips/mosaicing/im_avgdxdy.c:64 msgid "no points to average" msgstr "keine Punkte zum Mitteln" #: libvips/mosaicing/im_lrcalcon.c:203 msgid "overlap too small for your search size" msgstr "Überlappen zu schmal für Ihre Suchgröße" #: libvips/mosaicing/im_lrcalcon.c:242 #, c-format msgid "found %d tie-points, need at least %d" msgstr "es wurden %d Verbindungspunkte gefunden, mindestens %d sind nötig" #: libvips/mosaicing/im_lrcalcon.c:287 msgid "not 1-band uchar image" msgstr "kein »uchar«-Bild mit einem Band" #: libvips/mosaicing/im_clinear.c:136 msgid "im_invmat failed" msgstr "»im_invmat« fehlgeschlagen" #: libvips/other/im_zone.c:80 msgid "size must be even and positive" msgstr "Größe muss gerade und positiv sein" #: libvips/other/im_sines.c:88 msgid "wrong sizes" msgstr "falsche Größen" #: libvips/other/im_sines.c:101 msgid "calloc failed" msgstr "»calloc« fehlgeschlagen" #: libvips/other/im_eye.c:83 msgid "factor should be in [1,0)" msgstr "Faktor sollte in [0,1) liegen" #: libvips/resample/im_affine.c:410 msgid "output coordinates out of range" msgstr "Ausgabekoordinaten außerhalb des Bereichs" #: libvips/resample/im_shrink.c:346 #, fuzzy msgid "shrink factors should be >= 1" msgstr "beide Schrumpffaktoren sollten >1 sein" #: libvips/resample/interpolate.c:180 #, fuzzy msgid "VIPS interpolators" msgstr "Bilineare Interpolation" #: libvips/resample/interpolate.c:361 msgid "Nearest-neighbour interpolation" msgstr "Nächste-Nachbar-Interpolation" #: libvips/resample/interpolate.c:532 msgid "Bilinear interpolation" msgstr "Bilineare Interpolation" #: libvips/resample/im_rightshift_size.c:120 msgid "shift by zero: falling back to im_copy" msgstr "verschieben um Null: Rückfall auf »im_copy«" #: libvips/resample/im_rightshift_size.c:124 msgid "would result in zero size output image" msgstr "würde in einem Ausgabebild der Größe Null resultieren" #: libvips/resample/im_rightshift_size.c:132 #, fuzzy msgid "image and band_fmt must match in sign" msgstr "Bilder müssen in der Größe passen" #: libvips/video/im_video_test.c:51 msgid "error requested" msgstr "Fehler abgefragt" #: libvips/video/im_video_v4l1.c:241 msgid "no file descriptor" msgstr "kein Datei-Deskriptor" #: libvips/video/im_video_v4l1.c:246 #, c-format msgid "ioctl(0x%x) failed: %s" msgstr "ioctl(0x%x) fehlgeschlagen: %s" #: libvips/video/im_video_v4l1.c:295 #, c-format msgid "cannot open video device \"%s\"" msgstr "Videogerät »%s« kann nicht geöffnet werden" #: libvips/video/im_video_v4l1.c:303 msgid "cannot get video capability" msgstr "Videofähigkeit kann nicht abgefragt werden" #: libvips/video/im_video_v4l1.c:312 msgid "card cannot capture to memory" msgstr "Karte kann nicht in Speicher digitalisiert werden" #: libvips/video/im_video_v4l1.c:458 msgid "unable to map memory" msgstr "Speicher kann nicht abgebildet werden" #: libvips/video/im_video_v4l1.c:470 #, c-format msgid "channel not between 0 and %d" msgstr "Kanal nicht zwischen 0 und %d" #: libvips/video/im_video_v4l1.c:698 msgid "compiled without im_video_v4l1 support" msgstr "ohne »im_video_v4l1«-Unterstützung kompiliert" #: tools/edvips.c:82 msgid "tag file as big or little-endian" msgstr "" #: tools/edvips.c:84 #, fuzzy msgid "set width to N pixels" msgstr "»Xres« auf R Bildpunkte/mm setzen" #: tools/edvips.c:86 #, fuzzy msgid "set height to N pixels" msgstr "»Xres« auf R Bildpunkte/mm setzen" #: tools/edvips.c:88 msgid "set Bands to N" msgstr "Bänder auf N setzen" #: tools/edvips.c:90 #, fuzzy msgid "set BandFmt to F (eg. uchar, float)" msgstr "»BandFmt« auf »F« setzen (z.B. IM_BANDFMT_UCHAR)" #: tools/edvips.c:92 msgid "set interpretation to I (eg. xyz)" msgstr "" #: tools/edvips.c:94 #, fuzzy msgid "set Coding to C (eg. labq)" msgstr "Kodierung auf »C« setzen (z.B. IM_CODING_LABQ)" #: tools/edvips.c:96 msgid "set Xres to R pixels/mm" msgstr "»Xres« auf R Bildpunkte/mm setzen" #: tools/edvips.c:98 msgid "set Yres to R pixels/mm" msgstr "»Yres« auf R Bildpunkte/mm setzen" #: tools/edvips.c:100 #, fuzzy msgid "set Xoffset to N pixels" msgstr "»Xoffset« auf N setzen" #: tools/edvips.c:102 #, fuzzy msgid "set Yoffset to N pixels" msgstr "»Yoffset« auf N setzen" #: tools/edvips.c:104 msgid "replace extension block with stdin" msgstr "Erweiterungsblock mit STDIN ersetzen" #: tools/edvips.c:106 msgid "set Xsize to N (deprecated, use width)" msgstr "" #: tools/edvips.c:108 msgid "set Ysize to N (deprecated, use height)" msgstr "" #: tools/edvips.c:110 msgid "set Type to T (deprecated, use interpretation)" msgstr "" #: tools/edvips.c:121 #, c-format msgid "'%s' is not a positive integer" msgstr "»%s« ist keine positive Ganzzahl" #: tools/edvips.c:133 msgid "unable to start VIPS" msgstr "VIPS kann nicht gestartet werden" #: tools/edvips.c:138 msgid "vipsfile - edit vipsfile header" msgstr "»vipsfile« - »vipsfile«-Kopfzeilen bearbeiten" #: tools/edvips.c:150 #, c-format msgid "usage: %s [OPTION...] vipsfile\n" msgstr "Aufruf: %s [OPTION...] vipsfile\n" #: tools/edvips.c:157 #, c-format msgid "could not open image %s" msgstr "Bild %s konnte nicht geöffnet werden" #: tools/edvips.c:160 #, c-format msgid "could not read VIPS header for %s" msgstr "VIPS-Kopfzeilen für %s konnten nicht gelesen werden" #: tools/edvips.c:169 #, c-format msgid "bad endian-ness %s, should be 'big' or 'little'" msgstr "" #: tools/edvips.c:182 #, c-format msgid "bad format %s" msgstr "falsches Format %s" #: tools/edvips.c:190 #, fuzzy, c-format msgid "bad interpretation %s" msgstr "falsche Ganzzahl »%s« " #: tools/edvips.c:198 #, c-format msgid "bad coding %s" msgstr "falsche Kodierung %s" #: tools/edvips.c:211 #, c-format msgid "could not seek on %s" msgstr "auf %s konnte nicht gesucht werden" #: tools/edvips.c:214 #, c-format msgid "could not write to %s" msgstr "auf %s konnte nicht geschrieben werden" #: tools/edvips.c:221 msgid "could not get ext data" msgstr "zusätzliche Daten konnten nicht abgefragt werden" #: tools/edvips.c:230 msgid "could not set extension" msgstr "Erweiterung konnte nicht gesetzt werden" #: tools/find_mosaic.c:112 tools/find_mosaic.c:122 tools/find_mosaic.c:144 #: tools/find_mosaic.c:154 tools/find_mosaic.c:163 tools/find_mosaic.c:184 #: tools/find_mosaic.c:194 tools/find_mosaic.c:203 tools/mergeup.c:238 #: tools/mergeup.c:248 tools/mergeup.c:270 tools/mergeup.c:280 #: tools/mergeup.c:289 tools/mergeup.c:310 tools/mergeup.c:320 #: tools/mergeup.c:329 #, c-format msgid "bad file name format '%s'" msgstr "falsches Dateinamensformat »%s«" #: tools/header.c:85 msgid "show all fields" msgstr "" #: tools/header.c:87 msgid "" "print value of FIELD (\"getext\" reads extension block, \"Hist\" reads image " "history)" msgstr "" "Wert von FELD ausgeben (»getext« liest Erweiterungsblock, »Hist« liest " "Bildchronik)" #: tools/header.c:210 msgid "- print image header" msgstr "- Bild-Kopfzeilen ausgeben" #: tools/mergeup.c:381 msgid "allocation failure in mergeup" msgstr "Reservierung in »mergeup« gescheitert" #: tools/mergeup.c:391 msgid "Need more than one image" msgstr "Mehr als ein Bild benötigt" #: tools/vips.c:101 msgid "load PLUGIN" msgstr "ERWEITERUNG laden" #: tools/vips.c:102 msgid "PLUGIN" msgstr "ERWEITERUNG" #: tools/vips.c:104 #, fuzzy msgid "print version" msgstr "»im_version_string« ausgeben" #: tools/vips.c:147 #, c-format msgid "no package or function \"%s\"" msgstr "kein Paket oder Funktion »%s«" #: tools/vips.c:917 msgid "list classes|packages|all|package-name|operation-name" msgstr "" #: tools/vips.c:919 msgid "generate headers for C++ binding" msgstr "" #: tools/vips.c:921 msgid "generate bodies for C++ binding" msgstr "" #: tools/vips.c:923 msgid "generate links for vips/bin" msgstr "" #: tools/vips.c:1043 msgid "[ACTION] [OPTIONS] [PARAMETERS] - VIPS driver program" msgstr "" #: tools/vips.c:1111 #, fuzzy msgid "possible actions:\n" msgstr "unmöglicher Status" #: tools/vips.c:1116 msgid "execute named vips operation" msgstr "" #: tools/vips.c:1118 #, fuzzy, c-format msgid "unknown action \"%s\"" msgstr "unbekannte Zusatzoptionen »%s«" #: tools/vipsthumbnail.c:54 msgid "set thumbnail size to SIZE" msgstr "Miniaturansicht auf GRÖSSE setzen" #: tools/vipsthumbnail.c:55 msgid "SIZE" msgstr "GRÖSSE" #: tools/vipsthumbnail.c:57 msgid "set output to FORMAT" msgstr "Ausgabe auf FORMAT setzen" #: tools/vipsthumbnail.c:58 msgid "FORMAT" msgstr "FORMAT" #: tools/vipsthumbnail.c:60 msgid "resample with INTERPOLATOR" msgstr "neues Muster mit INTERPOLATOR erstellen" #: tools/vipsthumbnail.c:61 msgid "INTERPOLATOR" msgstr "INTERPOLATOR" #: tools/vipsthumbnail.c:63 msgid "don't sharpen thumbnail" msgstr "Miniaturansicht nicht schärfen" #: tools/vipsthumbnail.c:65 msgid "export with PROFILE" msgstr "mit PROFIL exportieren" #: tools/vipsthumbnail.c:66 tools/vipsthumbnail.c:69 msgid "PROFILE" msgstr "PROFIL" #: tools/vipsthumbnail.c:68 msgid "import untagged images with PROFILE" msgstr "nicht gekennzeichnetes Bild mit PROFIL importieren" #: tools/vipsthumbnail.c:71 msgid "don't delete profile from exported image" msgstr "Profil aus exportiertem Bild nicht löschen" #: tools/vipsthumbnail.c:73 msgid "verbose output" msgstr "detaillierte Ausgabe" #: tools/vipsthumbnail.c:412 msgid "- thumbnail generator" msgstr "- Miniaturansichten-Generator" #: libvips/resample/bicubic.cpp:430 msgid "Bicubic interpolation (Catmull-Rom)" msgstr "doppelt kubische Interpolation (Catmull-Rom)" #: libvips/resample/nohalo.cpp:1577 msgid "Edge sharpening resampler with halo reduction" msgstr "neues Kantenschärfungsmuster mit Halo-Reduzierung" #: libvips/resample/vsqbs.cpp:400 msgid "B-Splines with antialiasing smoothing" msgstr "B-Splines mit Kantenglättung" #: libvips/resample/lbb.cpp:861 msgid "Reduced halo bicubic" msgstr "doppelt kubische Halo-Reduzierung" #~ msgid "bad input format" #~ msgstr "falsches Eingabeformat" # es geht hier um das Zeichnen einer schwarzen Linie #~ msgid "bad black format" #~ msgstr "falsches Schwarzformat" #~ msgid "patch %d is out of range" #~ msgstr "Flicken %d ist außerhalb des Bereichs" #~ msgid "unknown input type" #~ msgstr "unbekannter Eingabetyp" #~ msgid "xy out of range" #~ msgstr "xy außerhalb des Bereichs" #~ msgid "bad input mask" #~ msgstr "falsche Eingabemaske" #~ msgid "one band, nx1, or 1xn images only" #~ msgstr "nur ein Band, Nx1 oder 1xN Bilder" #~ msgid "fmt out of range" #~ msgstr "»fmt« außerhalb des Bereichs" #~ msgid "unknown type" #~ msgstr "unbekannter Typ" #~ msgid "coding must be NONE, LABQ or RAD" #~ msgstr "Kodierung muss NONE, LABQ oder RAD sein" #~ msgid "bandfmt must be in range [0,%d]" #~ msgstr "»bandfmt« muss im Bereich [0,%d] liegen" #~ msgid "sizeof( pixel ) has changed" #~ msgstr "sizeof( Pixel ) hat sich geändert" #~ msgid "unsupported image type" #~ msgstr "nicht unterstützter Bildtyp" #~ msgid "calloc failed (1)" #~ msgstr "»calloc« fehlgeschlagen (1)" #~ msgid "calloc failed (2)" #~ msgstr "»calloc« fehlgeschlagen (2)" #~ msgid "xskip and yskip must be >= 1" #~ msgstr "»xskip« und »yskip« müssen >= 1 sein" #~ msgid "nput should be unsigned char uncoded" #~ msgstr "»nput« sollte ein vorzeichenloses unkodiertes Zeichen sein" #~ msgid "too small output sizes" #~ msgstr "zu kleine Ausgabegröße" #~ msgid "unable to calloc(1)" #~ msgstr "»calloc(1)« nicht möglich" #~ msgid "unable to calloc(2)" #~ msgstr "»calloc(2)« nicht möglich" #~ msgid "im_create_int_luts failed" #~ msgstr "»im_create_int_luts« fehlgeschlagen" #~ msgid "input should be uncoded" #~ msgstr "Eingabe sollte unkodiert sein" #~ msgid "Unknown input format" #~ msgstr "Unbekanntes Eingabeformat" #~ msgid "multiply two complex images, normalising output" #~ msgstr "" #~ "zwei komplexe Bilder werden multipliziert, die Ausgabe wird normalisiert" #~ msgid "calculate a*in1 + b*in2 + c = outfile" #~ msgstr "es wird »a*in1 + b*in2 + c = Ausgabedatei« berechnet" #~ msgid "calculate max(white)*factor*(in/white), if clip == 1" #~ msgstr "es wird »max(weiß)*Faktor*(in/weiß), wenn clip == 1« berechnet" #~ msgid "non-complex input only" #~ msgstr "nur nicht-komplexe Eingabe" #~ msgid "put should be uncoded" #~ msgstr "»put« sollte unkodiert sein" #~ msgid "input must be uncoded" #~ msgstr "Eingabe muss unkodiert sein" #~ msgid "unsuitable image type" #~ msgstr "ungeeigneter Bildtyp" #~ msgid "unknown input format" #~ msgstr "unbekanntes Eingabeformat" #~ msgid "im_iocheck failed" #~ msgstr "»im_iocheck« fehlgeschlagen" #~ msgid "im_cp_desc failed" #~ msgstr "»im_cp_desc« fehlgeschlagen" #~ msgid "im_setupout failed" #~ msgstr "»im_setupout« fehlgeschlagen" #~ msgid "bad architecture: %d" #~ msgstr "falsche Architektur: %d" #~ msgid "invalid line cooordinates" #~ msgstr "ungültige Linienkoordinaten" #~ msgid "line intensity between 0 and 255" #~ msgstr "Linienintensität zwischen 0 und 255" #~ msgid "image should have one band only" #~ msgstr "Bild sollte nur ein Band haben" #~ msgid "PPM/PBM/PNM/PFM" #~ msgstr "PPM/PBM/PNM/PFM" #~ msgid "VIPS" #~ msgstr "VIPS" #~ msgid "\"%s\" is not a supported image format." #~ msgstr "»%s« ist kein unterstütztes Bildformat." #~ msgid "TIFF support disabled" #~ msgstr "TIFF-Unterstützung ausgeschaltet" #~ msgid "bad predictor parameter" #~ msgstr "falscher Prädiktorparameter" #~ msgid "bad JPEG quality parameter" #~ msgstr "falscher JPEG-Qualitätsparameter" #~ msgid "" #~ "unknown compression mode \"%s\"\n" #~ "should be one of \"none\", \"packbits\", \"ccittfax4\", \"lzw\", \"deflate" #~ "\" or \"jpeg\"" #~ msgstr "" #~ "unbekannter Kompressionsmodus »%s«\n" #~ "sollte »none«, »packbits«, »ccittfax4«, »lzw«, »deflate« oder »jpeg« sein" #~ msgid "bad tile size %dx%d" #~ msgstr "falsche Bildgröße %dx%d" #~ msgid "" #~ "unknown layout mode \"%s\"\n" #~ "should be one of \"tile\" or \"strip\"" #~ msgstr "" #~ "unbekannter Layoutmodus »%s«\n" #~ "sollte »tile« oder »strip« sein" #~ msgid "" #~ "unknown multi-res mode \"%s\"\n" #~ "should be one of \"flat\" or \"pyramid\"" #~ msgstr "" #~ "unbekannter Mehrfachauflösungsmodus »%s«\n" #~ "sollte »flat« oder »pyramid« sein" #~ msgid "" #~ "unknown format \"%s\"\n" #~ "should be one of \"onebit\" or \"manybit\"" #~ msgstr "" #~ "unbekanntes Format »%s«\n" #~ "sollte »onebit« oder »manybit« sein" #~ msgid "" #~ "unknown resolution unit \"%s\"\n" #~ "should be one of \"res_cm\" or \"res_inch\"" #~ msgstr "" #~ "unbekannte Auflösungseinheit »%s«\n" #~ "sollte »res_cm« oder »res_inch« sein" #~ msgid "bad resolution values" #~ msgstr "falsche Auflösungswerte" #~ msgid "bad mode string, should be \"binary\" or \"ascii\"" #~ msgstr "falsche Modus-Zeichenkette, sollte »binary« oder »ascii« sein" #~ msgid "PNG support disabled" #~ msgstr "PNG-Unterstützung ausgeschaltet" #~ msgid "PNG error: \"%s\"" #~ msgstr "PNG-Fehler: »%s«" #~ msgid "PNG warning: \"%s\"" #~ msgstr "PNG-Warnung: »%s«" #~ msgid "PNG" #~ msgstr "PNG" #~ msgid "Analyze 6.0" #~ msgstr "Analyze 6.0" #~ msgid "libMagick support disabled" #~ msgstr "libMagick-Unterstützung ausgeschaltet" #~ msgid "libMagick-supported" #~ msgstr "libMagick-unterstützt" #~ msgid "TIFF" #~ msgstr "TIFF" #~ msgid "OpenEXR support disabled" #~ msgstr "OpenEXR-Unterstützung ausgeschaltet" #~ msgid "OpenEXR" #~ msgstr "OpenEXR" #~ msgid "Matlab" #~ msgstr "Matlab" #~ msgid "JPEG support disabled" #~ msgstr "JPEG-Unterstützung ausgeschaltet" #~ msgid "JPEG" #~ msgstr "JPEG" #~ msgid "FITS" #~ msgstr "PASST" #~ msgid "unexpected end of file" #~ msgstr "unerwartetes Dateiende" #~ msgid "CSV" #~ msgstr "CSV" #~ msgid "unable to convert to saveable format" #~ msgstr "es kann nicht in ein speicherbares Format umgewandelt werden" #~ msgid "Radiance" #~ msgstr "Glanz" #~ msgid "qfac should be in 0-100" #~ msgstr "»qfac« sollte in 0-100 liegen" #~ msgid "one band uncoded only" #~ msgstr "nur unkodiert mit einem Band" #~ msgid "one band complex uncoded only" #~ msgstr "nur komplex unkodiert mit einem Band" #~ msgid "sides must be power of 2" #~ msgstr "Seiten müssen Potenzen von Zwei sein" #~ msgid "fft_sp failed" #~ msgstr "»fft_sp« fehlgeschlagen" #~ msgid "one band non-complex uncoded only" #~ msgstr "nur nicht-komplex mit einem Band" #~ msgid "null image descriptor" #~ msgstr "Null-Bild-Deskriptor" #~ msgid "descriptors differ in size" #~ msgstr "Deskriptoren unterscheiden sich in der Größe" #~ msgid "func already attached" #~ msgstr "»func« bereits angehängt" #~ msgid "unable to close plugin \"%s\"" #~ msgstr "Erweiterung »%s« kann nicht geschlossen werden" #~ msgid "plugins not supported on this platform" #~ msgstr "Erweiterungen werden auf dieser Plattform nicht unterstützt" #~ msgid "unable to open plugin \"%s\"" #~ msgstr "Erweiterung »%s« kann nicht geöffnet werden" #~ msgid "unable to find symbol \"package_table\" in plugin \"%s\"" #~ msgstr "" #~ "Symbol »package_table« kann in Erweiterung »%s« nicht gefunden werden" #~ msgid "corrupted package table in plugin \"%s\"" #~ msgstr "Beschädigte Pakettabelle in Erweiterung »%s«" #~ msgid "\"%s\" not found" #~ msgstr "»%s« nicht gefunden" #~ msgid "flag not 0,1,2" #~ msgstr "Markierung nicht 0,1,2" #~ msgid "" #~ msgstr "" #~ msgid "" #~ msgstr "" #~ msgid "" #~ msgstr "" #~ msgid "" #~ msgstr "" # erstes %s Parameter, zweites ist Objekt #~ msgid "required construct param %s to %s not set" #~ msgstr "erforderlicher Konstrukt-Parameter %s zu %s nicht gesetzt" #~ msgid "no unset required arguments for %s" #~ msgstr "keine nicht gesetzten benötigten Argumente für %s" #~ msgid "bad object arguments" #~ msgstr "falsche Objektargumente" #~ msgid "unable to build class" #~ msgstr "Klasse kann nicht gebildet werden" #~ msgid "base class \"%s\" not found" #~ msgstr "Basisklasse »%s« nicht gefunden" #~ msgid "NULL image descriptor" #~ msgstr "Bild-Deskriptor NULL" #~ msgid "opening brace" #~ msgstr "geschweifte Klammer auf" #~ msgid "closing brace" #~ msgstr "Klammer wird geschlossen" #~ msgid "string" #~ msgstr "Zeichenkette" #~ msgid "unsupported band format: %d" #~ msgstr "nicht unterstütztes Bandformat: %d" #~ msgid "unable to open %s: file has been truncated" #~ msgstr "%s kann nicht geöffnet werden: Datei wurde gekürzt" #~ msgid "no such int field \"%s\"" #~ msgstr "kein solches Ganzzahlfeld »%s«" #~ msgid "no such double field \"%s\"" #~ msgstr "kein solches »double«-Feld »%s«" #~ msgid "no such string field \"%s\"" #~ msgstr "kein solches Zeichenkettenfeld »%s«" #~ msgid "NULL filename or mode" #~ msgstr "NULL-Dateiname oder -Modus" #~ msgid "unsupported filetype \"%s\"" #~ msgstr "nicht unterstützter Dateityp »%s«" #~ msgid "unknown display type \"%s\"" #~ msgstr "unbekannter Anzeigetyp »%s«" #~ msgid "display should be one of:\n" #~ msgstr "Anzeige sollte eine der folgenden sein:\n" # double-Wert für Vektor prüfen #~ msgid "bad double \"%s\"" #~ msgstr "falscher »double« »%s«" #~ msgid "unable to open \"%s\", %s" #~ msgstr "»%s« kann nicht geöffnet werden, %s" #~ msgid "open for read-write for native format images only" #~ msgstr "" #~ "Öffnen zum Lesen und Schreiben nur für Bilder im ursprünglichen Format" #~ msgid "matrices must be same width" #~ msgstr "Matrizen müssen die gleiche Breite haben" #~ msgid "error reading matrix header" #~ msgstr "Fehler beim Lesen der Matrix-Kopfzeilen" #~ msgid "scale should be non-zero" #~ msgstr "Skala sollte nicht Null sein" #~ msgid "scale and offset should be int" #~ msgstr "Skala und Versatz sollten ganzzahlig sein" #~ msgid "ceofficient at position (%d, %d) is not int" #~ msgstr "Koeffizient bei Position (%d, %d) ist nicht ganzzahlig" #~ msgid "write error, disc full?" #~ msgstr "Schreibfehler, Platte voll?" #~ msgid "size not odd" #~ msgstr "Größe nicht ungerade" #~ msgid "mask should be square of odd size" #~ msgstr "Maske sollte Quadrat einer ungeraden Größe sein" #~ msgid "input images incompatible" #~ msgstr "Eingabebilder inkompatibel" #~ msgid "inputs not uncoded or IM_CODING_LABQ" #~ msgstr "Eingaben nicht unkodiert oder »IM_CODING_LABQ«" #~ msgid "bad balancetype parameter" #~ msgstr "falscher Balancetyp-Parameter" #~ msgid "uncoded uchar only for balancing" #~ msgstr "nur unkodiertes »uchar« für Abgleich" #~ msgid "wrong args" #~ msgstr "falsche Argumente" #~ msgid "unable to accept input" #~ msgstr "Eingabe kann nicht akzeptiert werden" #~ msgid "wrong input" #~ msgstr "falsche Eingabe" #~ msgid "Unable to accept input" #~ msgstr "Eingabe kann nicht akzeptiert werden" #~ msgid "unable to im_writeline" #~ msgstr "»im_writeline« nicht möglich" #~ msgid "wrong flag!" #~ msgstr "falsche Markierung!" #~ msgid "unable to calloc" #~ msgstr "»calloc« nicht möglich" #~ msgid "zero std" #~ msgstr "Null »std«" #~ msgid "Invalid step %d" #~ msgstr "Ungültiger Schritt %d" #~ msgid "not uncoded unsigned short" #~ msgstr "kein unkodiertes vorzeichenloses »short«" #~ msgid "displacements out of range [0,1)" #~ msgstr "Verschiebungen außerhalb des Bereichs [0,1)" #~ msgid "unsupported input format" #~ msgstr "nicht unterstütztes Eingabeformat" #~ msgid "integer type images only" #~ msgstr "nur Ganzzahltyp-Bilder" #~ msgid "unsigned input means that output must be unsigned int, short or char" #~ msgstr "" #~ "vorzeichenlose Eingabe bedeutet, dass die Ausgabe »unsigned« »int«, " #~ "»short« oder »char« sein muss" #~ msgid "signed input means that output must be signed int, short or char" #~ msgstr "" #~ "Eingabe mit Vorzeichen bedeutet, dass die Ausgabe »signed« »int«, »short« " #~ "oder »char« sein muss " #~ msgid "list operations in PACKAGE (or \"all\", \"packages\", \"classes\")" #~ msgstr "Operationen im PAKET auflisten (oder »all«, »packages«, »classes«)" #~ msgid "PACKAGE" #~ msgstr "PAKET" #~ msgid "show usage message for OPERATION" #~ msgstr "Aufrufnachricht für OPERATION anzeigen" #~ msgid "OPERATION" #~ msgstr "FUNKTION" #~ msgid "print link lines for all operations" #~ msgstr "verlinkte Zeilen für alle Operationen ausgeben" #~ msgid "print C++ decls for PACKAGE (or \"all\")" #~ msgstr "C++-Deklarationen für PAKET (oder »all«) ausgeben" #~ msgid "print C++ binding for PACKAGE (or \"all\")" #~ msgstr "C++-Bindings für PAKET (oder »all«) ausgeben" #~ msgid "- VIPS driver program" #~ msgstr "- VIPS-Treiberprogramm" #~ msgid "set Xsize to N" #~ msgstr "»Xsize« auf N setzen" #~ msgid "set Ysize to N" #~ msgstr "»Ysize« auf N setzen" #~ msgid "set Type to T (eg. IM_TYPE_XYZ)" #~ msgstr "Typ auf »T« setzen (z.B. IM_TYPE_XYZ)" #~ msgid "bad type %s" #~ msgstr "falscher Typ %s" vips-7.38.5/po/de.gmo0000644000175000017500000010420412303145302011224 00000000000000Þ•¡$ -,à"á"û" #'"#J#'`##ˆ#¬#¯#Ä#â#ý#$!$6$L$^$n$‰$£$%¿$#å$ %- %'N%v%ˆ% —% £%-±%ß%æ% ÿ% &&6&P&p&‰&’&™&¡&»&Õ&,ï&&'C'X'm'†'‹'"'À' ×'ä'ù'!(*(9(!W(!y(›(µ(É(à(ö( ) ) !) .) <) F) T)a)p))’) ¬) º) Ä)Ò) ê) **2*A*P*o*€*–* ž*«*-¼* ê*ø*+ 8+Y+o+ ‚++ Ÿ+¬+Á+ Ê+ Ô+"õ+*,C, `,,n,'›,+Ã,ï, -)-G-d-y-&Ž-µ-Ñ- æ-..!6.X.m.….›.µ.Ä.!á./)/9$W9$|9 ¡9 ­9¹9!È9Jê9#5:Y:t:%‹:±:5È:þ:C;U;i;ƒ;—; ª;¸;È; ä;ï; <M <n<€<™<´<Ë<Û<î<*= 2=@=_=t=”=¦=&Ã=ê=>1>N>c>r>Ž>¨>#Æ>3ê>?4?'P?'x?" ?=Ã?"@Q$@ v@@#˜@ ¼@.Ý@9 A"FAiAƒA A/»AëA- B8BKBZBrB ŠB«B!ÀBâBýBC&6C]C tC•C­CÌC$èC" D#0D2TD‡D ›D¼DÒDñDEE&E6ELE [EiEzE•E±EÉEãEýEF5FNFhFˆF ¨FÉFÞF#íFG+GAGUGsG$’G$·GÜGøG/HGH [H/|H¬HÃHÙHðH*ÿH*I?IRIgII™I­I$ÆIëIþI%J!ÛR7SRSfS wS„S2“SÆS ÍS îSûS T%/TUTtTT ™T¥T!¬T!ÎT!ðT=U6PU‡U!šU ¼UÝUåU"üU(V HVVVmV*|V§V'¿V(çV*W.;WjWˆW!¥WÇWáWóW X X2XBXWXtXˆX›X!¹XÛXíXYY'8Y`YxY‘Y¥Y*¶YáY÷YZ&Z;Z7QZ‰Z/ŸZ/ÏZ0ÿZ0[H[`[s[…[–[±[Á[>Ò[<\/N\%~\¤\J¾\4 ]I>]+ˆ].´]1ã]^3^J^0g^"˜^!»^#Ý^1_%3_4Y_"Ž_'±_&Ù_` ` -`8N`‡`7ž`Ö`è`+û`'aGa%Xa ~aŠa1ža5Ðab"$b&Gb nbb b&¿b.æb2c!Hc&jc(‘cºcÒc$écd,d$LdqdŒd¨d#½dád5údB0ese“e6še9Ñe f'(fPf&iff°fÏfIáf@+gWlgÄgÛgõghR+h1~h°h#Ëh%ïhi.i@iViei~i+™i*Åi/ðiN j$oj2”jÇjßjúj%k$;k!`k6‚k¹klÏkew€!¶€'Ø€ !=; yš$µ(Ú,‚0‚"F‚*i‚”‚¯‚*Ï‚%ú‚ ƒ,ƒFƒ[ƒuƒ#Žƒ²ƒ<Ѓ „ +„"L„#o„“„ °„*Ñ„*ü„0'…X…!x…8š…2Ó…2† 9†Z†$y†ž†¹†Ô† é† ÷†1‡6‡G‡X‡8g‡ ‡¿‡؇é‡ü‡ˆ#ˆ=ˆPˆnˆ›&¿Ç*¼ijhVD ^xé,OPcML“:f7‚„%ÆÔ†P˜Û•6ÿfœˆŒWúBžœë‰54‹Œ^F C$åH<;gä+KÁo91…y/óè Þ®ƒ)u6êxCnO˜Ë>õ‚|ES ܈Šv| …«oS1lQ{sŠA½`ž¾âFÉz*a“ü¶8qk¡`J¸:-À)Xµ92#md‡]~ w8¤N!TÑbªnRïN÷VG Ò,HÙr¯2Ž"YÈôaÖ/{3=.U³ð<†’e£ò¨.ñ›Õø¬r}ögÍK„¥i7¡Ÿ•ÏØí™’Ž3 h‡0@[L'tÊD4@‘~­p" ²-t \δ·sZ} €]kîßX[=q!—æšQ B0Ã+ƒ‹%€”uý(±A»MG°zbm¢ÝeERù_$v—5§Ðç ûc&(¹U>Åþ'‘_Ó–j;ÌTp\ÄlWY #©àdIšáן”IZãìyº‰Ú?J–™w¦? bins out of range [1,%d]"%s" is not a VIPS image"%s" too long%d overflows and %d underflows detected%d overflows detected%d underflows and %d overflows detected%d-dimensional images not supported%s%s %s: %d%% complete%s %s: done in %ds %s is longer than expected%s: '%s' is not a positive integer- print image header- thumbnail generator1 to 5 bands only10^pel of image3 or 4 bands RGB TIFF only3-band uncoded float only4 or 5 bands CMYK TIFF onlyB-Splines with antialiasing smoothingBicubic interpolation (Catmull-Rom)Bilinear interpolationCMYK input profile needs a 4 band input imageCMYK profile needs a 4 band input imageClass descriptionClass nicknameDescriptionEXR error: %sEdge sharpening resampler with halo reductionFORMATH not in range [-30,+30]INTERPOLATORLABQ coding onlyM not in range [-30,+30]Mat_VarReadDataAll failedNearest-neighbour interpolationNeed more than one imageNicknamePLUGINPROFILEPh not in range [0.0,1.0]Pm not in range [0.0,1.0]Ps not in range [0.0,1.0]RGB input profile needs a 3 band input imageRGB profile needs a 3 band input imageRadiance coding onlyReduced halo bicubicS not in range [-30,+30]SIZEShow VIPS optionsTIFF file does not contain page %dTIFF write tile failedVIPS Options[x,y,z]^pel of imageabsolute valueacos of image (result in degrees)add two imagesallocation failure in mergeupasin of image (result in degrees)atan of image (result in degrees)auto-rewind for %s failedaverage image bandsaverage value of imagebad Lb, Lw parametersbad area parametersbad argsbad args (ac)bad args (f)bad argumentsbad bandsbad coding %sbad colormapbad dimensionsbad display typebad extract areabad file name format '%s'bad file typebad floatbad format %sbad greyscale mask sizebad greyscale mask value, row %dbad grid geometrybad image descriptorbad image sizebad image typebad in_max, out_max parametersbad input matrixbad input matrix sizebad intbad lut_sizebad magic numberbad mask element (%d should be 0, 128 or 255)bad mode "%s"bad number of args in copy linebad number of args in join linebad number of args in join1 linebad number of axis %dbad page number %dbad parameterbad parametersbad positionbad shrink factor %dbad sizebad sizesbands in must equal matrix widthbinary >8 bit images must be floatcalculate a*in + b -> out, a and b vectorscalculate a*in + b = outfilecalloc failedcan only pyramid LABQ and non-complex imagescan't have 1-bit JPEG -- disabling JPEGcan't have strip pyramid -- enabling tilingcannot get video capabilitycannot open video device "%s"card cannot capture to memorychannel not between 0 and %dcircularity detectedclass "%s" not foundcompiled without im_video_v4l1 supportcompress should be in [0,9]coords outside imagecos of image (angles in degrees)could not get ext datacould not open image %scould not read VIPS header for %scould not seek on %scould not set extensioncould not write to %sdatatype %d not supporteddest too smalldimension should be in (2,3)dimensions above 3 must be size 1dir not 0 or 1disable vectorised versions of operationsdisplay unknowndivide two imagesdon't delete profile from exported imagedon't sharpen thumbnaile^pel of imageelement out of range [0,1]empty lineempty overlap!end of file while skipping starterror parsing number, line %d, column %derror reading XML: %serror reading from file "%s"error reading radiance headererror reading resolutionerror requestederror saving EXIFerror setting JPEG resolutionerror transforming from save formaterror transforming to save formaterror writing outputevaluate with N concurrent threadsexpect 1xN or Nx1 input maskexpected %s, saw %sexport with PROFILEextra tokens after ')'factor should be in [1,0)factors should both be >= 1field "%s" is of type %s, not %sfield "%s" not foundfile "%s" not foundfile has been truncatedfile is less than 64 bytesflag not -1 or 1flag should be 0 (horizontal) or 1 (vertical)found %d tie-points, need at least %dheader file size incorrecthelp!histograms must have not have more than 65536 elementshistograms must have width or height 1im_invmat failedimage "%s" used twice as outputimage already writtenimage coding must be NONE or LABQimage does not have that many bandsimage has shrunk to nothingimage must be %simage must be 8- or 16-bit integer, signed or unsignedimage must be 8- or 16-bit unsigned integerimage must be 8- or 16-bit unsigned integer, or floatimage must be compleximage must be integerimage must be non-compleximage must be uncodedimage must be unsigned int or floatimage must be unsigned integerimage must have %d bandsimage must have 1 or %d bandsimage must have one or three bandsimage must one bandimage not readableimage not writeableimage too narrowimage too small for maskimage too small for windowimages must have the same band formatimages must have the same codingimages must have the same number of bandsimages must have the same number of bands, or one must be single-bandimages must match in sizeimport untagged images with PROFILEinappropriate region typeincomplete headerincorrect namespace in XMLindex should be in range 0 - %dink image does not match in imageink image not 1x1 pixelsinput not 3-band uncoded charinputs incompatibleintent %d (%s) not supported by profile "%s"; falling back to default intent (usually PERCEPTUAL)intent %d (%s) not supported by profile; falling back to default intent (usually PERCEPTUAL)internal errorinternal error #9876345invalid argumentinvalid markup in textioctl(0x%x) failed: %skilled for image "%s"layer buffer exhausted -- try making TIFF output tiles smallerlcms library not linked to this VIPSlmcs library not linked to this VIPSln of imageload PLUGINlog10 of imagemany image statistics in one passmap failed (%s), running very low on system resources, expect a crash soonmask image not 1 band 8 bit uncodedmask sizes power of 2 onlymaximum value of imagemeasure averages of a grid of patchesminimum value of imagemore than a 10 megabytes of XML? sufferin' succotash!more than one rootmosaic root not found in desc file is this really a mosaiced image?multiply two imagesmwidth must be -1 or >= 0no embedded profileno file descriptorno image datano matching '>'no matrix variables in "%s"no overlapno package or function "%s"no points to averageno resolution information for TIFF image "%s" -- defaulting to 1 pixel per mmno text to rendernonsense mask parametersnot , or ) after parameternot 1-band uchar imagenot a RAD imagenot a regular filenot one band or %d bandsnot whitespace before start of binary dataout of memoryout of memory --- size == %dMBout of range [0,255]output coordinates out of rangeoverlap too smalloverlap too small for searchoverlap too small for your search sizepangoft2 support disabledparameters out of rangeparameters would result in zero size output imagepel^[x,y,z] of imagepel^x of imageper-thread state for renderper-thread state for sinkper-thread state for sinkdiscper-thread state for vipsthreadpoolphase of cross power spectrum of two complex imagesphotographic negativepixelwise linear regressionposition and value of n maxima of imageposition and value of n minima of imageposition of maximum value of imageposition of maximum value of image, averaging in case of drawposition of minimum value of imageprint value of FIELD ("getext" reads extension block, "Hist" reads image history)read errorread gave %ld warningsref not smaller than or equal to inremainder after integer divisionremainder after integer division by a constantremainder after integer division by a vector of constantsreplace extension block with stdinrequired field %d missingrequired field %d=%d, not %dresample with INTERPOLATORround to largest integer value not greater thanround to nearest integer valueround to smallest integer value not less thanscalar images onlyset Bands to Nset Xres to R pixels/mmset Yres to R pixels/mmset fatstrip height to N (DEBUG)set output to FORMATset thinstrip height to N (DEBUG)set thumbnail size to SIZEset tile height to N (DEBUG)set tile width to N (DEBUG)shift by zero: falling back to im_copyshow progress feedbacksin of image (angles in degrees)single band images onlysize must be even and positivestandard deviation of imagestart function failed for image "%s"start function failed for image %sstop function failed for image "%s"substitute image "%s" is not the same size as "%s"subtract two imagestan of image (angles in degrees)threads clipped to %dtile size not a multiple of 16too few argumentstoo little datatoo many argumentstoo many imagestoo many input imagestoo many itemstoo much datatoo much overlapuchar or ushort input onlyunable to CreateFileMappingunable to MapViewOfFileunable to UnmapViewOfFileunable to create profilesunable to create threadunable to create transform planunable to get file statsunable to get file statusunable to get media white pointunable to input from a %s imageunable to make temporary file %sunable to map memoryunable to mmapunable to mmap "%s" to same addressunable to mmap: "%s" - %sunable to munmap fileunable to open "%s"unable to open "%s" for inputunable to open "%s" for outputunable to open file "%s" for readingunable to open file "%s" for writingunable to open profile "%s"unable to output to a %s imageunable to ping file "%s" libMagick error: %s %sunable to read dataunable to read data for "%s", %sunable to read file "%s" libMagick error: %s %sunable to read historyunable to read pixelsunable to read profileunable to seekunable to set property "%s" to value "%s".unable to start VIPSunable to truncateunable to write "%s"unable to write to "%s"unable to write to bufferuncoded images onlyunexpected end of stringunimplemented input color space 0x%xunimplemented maskunimplemented mask typeunimplemented output color space 0x%xunit vector in direction of valueunix errorunknown Coding typeunknown codingunknown coding typeunknown image codingunknown photometric interpretation %dunknown resolution unitunsigned 8-bit int, 16-bit int, and 32-bit float onlyunsupported bit depthunsupported bit depth %dunsupported bitpix %d unsupported class type %d unsupported color typeunsupported colorspace %dunsupported depth %d for LAB imageunsupported depth %d for RGB imageunsupported depth %d for greyscale imageunsupported image type %dunsupported rank %d unsupported sample format %d for greyscale imageunsupported sample format %d for lab imageunsupported sample format %d for rgb imageusage: %s [OPTION...] vipsfile valid clipped to nothingvector must have 1 or %d elementsvectors not equal lengthvectors not same lengthverbose outputvips diagnosticvips warningvipsfile - edit vipsfile headerwindow too largewindow too smallwindows errorwould result in zero size output imagewrite error ... disc full?write failedwrong sizesx range too smallx value not an intx^pel of imagexml save errorzero input images!zoom factors should be >= 0zoom factors too largeProject-Id-Version: libvips-doc 7.24.5-2 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-03-08 21:02+0000 PO-Revision-Date: 2011-04-21 19:05+0100 Last-Translator: Chris Leick Language-Team: Debian German Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit »bins« außerhalb des Bereichs [1,%d]»%s« ist kein VIPS-Bild»%s« zu lang%d Über- und %d Unterläufe entdeckt%d Überläufe entdeckt%d Unter- und %d Überläufe entdeckt%d-dimensionale Bilder nicht unterstützt%s%s %s: %d%% komplett%s %s: Erledigt in %ds %s ist länger als erwartet%s: »%s« ist keine positive Ganzzahl- Bild-Kopfzeilen ausgeben- Miniaturansichten-Generatornur 1 bis 5 Bänder10^pel des Bildesnur RGB-TIFF mit drei oder vier Bändernnur unkodierte Fließkommazahlen mit drei Bändernnur CMYK-TIFF mit vier oder fünf BändernB-Splines mit Kantenglättungdoppelt kubische Interpolation (Catmull-Rom)Bilineare InterpolationCMYK-Eingabeprofil benötigt ein Eingabebild mit vier BändernCMYK-Profil benötigt ein Eingabebild mit vier BändernKlassenbeschreibungKlassen-NicknameBeschreibungEXR-Fehler: %sneues Kantenschärfungsmuster mit Halo-ReduzierungFORMAT»H« nicht im Bereich [-30,+30]INTERPOLATORNur LABQ-Kodierung»M« nicht im Bereich [-30,+30]»Mat_VarReadDataAll« fehlgeschlagenNächste-Nachbar-InterpolationMehr als ein Bild benötigtNicknameERWEITERUNGPROFIL»Ph« nicht im Bereich [0.0,1.0]»Pm« nicht im Bereich [0.0,1.0]»Ps« nicht im Bereich [0.0,1.0]RGB-Eingabeprofil benötigt ein Eingabebild mit drei BändernRGB-Profil benötigt ein Eingabebild mit drei BändernNur Glanzkodierungdoppelt kubische Halo-Reduzierung»S« nicht im Bereich [-30,+30]GRÖSSEVIPS-Optionen anzeigenTIFF-Datei enthält nicht Seite %dSchreiben des TIFF-Bildes fehlgeschlagenVIPS-Optionen[x,y,z]^pel des Bildesabsoluter WertArkuskosinus des Bildes (Ergebnis in Grad)zwei Bilder hinzufügenReservierung in »mergeup« gescheitertArkussinus des Bildes (Ergebnis in Grad)Arkustangens des Bildes (Ergebnis in Grad)automatischer Rücklauf für %s fehlgeschlagendurchschnittliche BildbänderDurchschnittswert des Bildesfalsche »Lb«-, »Lw«-Parameterfalsche Bereichsparameterfalsche Argumentefalsche Argumente (ac)falsche Argumente (f)falsche Argumentefalsche Bänderfalsche Kodierung %sfalsche Farbzusammenstellungfalsche Abmessungenfalsche Anzeigetypfalscher extrahierter Bereichfalsches Dateinamensformat »%s«falscher Dateitypfalsche Fließkommazahlfalsches Format %sfalsche Grauskala-Maskengrößefalscher Grauskala-Maskenwert, Reihe %dfalsche Gittergeometriefalscher Bild-Deskriptorfalsche Bildgrößefalscher Bildtypfalsche »in_max«-, »out_max«-Parameterfalsche Eingabematrixfalsche Eingabematrix-Größefalsche Ganzzahlfalsche »lut_size«falsche magische Zahlfalsches Maskenelement (%d sollte 0, 128 oder 255 sein)falscher Modus »%s«falsche Anzahl von Argumenten in »copy«-Zeilefalsche Anzahl von Argumenten in »join«-Zeilefalsche Anzahl von Argumenten in »join1«-Zeilefalsche Achsenanzahl %dfalsche Seitennummer %dfalscher Parameterfalsche Parameterfalsche Positionfalscher Schrumpffaktor %dfalsche Größefalsche Größen»in«-Bänder müssen die gleiche Breite wie die Matrix habenbinäre Bilder >8 Bit müssen aus Fließkommazahlen bestehenBerechnen von a*in + b -> out, a und b VektorenBerechnen von a*in + b = Ausgabedatei»calloc« fehlgeschlagennur LABQ und nicht-komplexe Bilder können pyramidenartig verwendet werden1-Bit-JPEG nicht möglich -- JPEG wird ausgeschaltetnicht ummantelte Pyramide nicht möglich -- Zerteilung wird eingeschaltetVideofähigkeit kann nicht abgefragt werdenVideogerät »%s« kann nicht geöffnet werdenKarte kann nicht in Speicher digitalisiert werdenKanal nicht zwischen 0 und %dZirkularität entdecktKlasse »%s« nicht gefundenohne »im_video_v4l1«-Unterstützung kompiliertKompression sollte in [0,9] liegenKoordinaten außerhalb des BildesKosinus des Bildes (Winkel in Grad)zusätzliche Daten konnten nicht abgefragt werdenBild %s konnte nicht geöffnet werdenVIPS-Kopfzeilen für %s konnten nicht gelesen werdenauf %s konnte nicht gesucht werdenErweiterung konnte nicht gesetzt werdenauf %s konnte nicht geschrieben werdenDatentyp %d nicht unterstütztZiel zu kleinDimension sollte in (2,3) liegenDimensionen größer drei müssen die Größe eins haben»dir« nicht 0 oder 1vektorgesteuerte Versionen von Operationen deaktivierenAnzeige unbekanntzwei Bilder teilenProfil aus exportiertem Bild nicht löschenMiniaturansicht nicht schärfene^pel des BildesElement außerhalb des Bereichs [0,1]leere Zeileleere Überlappung!Dateiende während des Überspringens des StartesFehler beim Auswerten von Nummer, Zeile %d, Spalte %dFehler beim Lesen von XML: %sFehler beim Lesen von Datei »%s«Fehler beim Lesen der Glanz-KopfzeilenFehler beim Lesen der AuflösungFehler abgefragtFehler beim Speichern von EXIFFehler beim Setzen der JPEG-AuflösungFehler beim Umwandeln vom gespeicherten FormatFehler beim Umwandeln in das zu speichernde FormatFehler beim Schreiben der Ausgabemit N gleichzeitigen Threads auswerten1xN- oder Nx1-Eingabemaske wird erwartet%s erwartet, %s gesehenmit PROFIL exportierenkeine zusätzlichen Token nach »)«Faktor sollte in [0,1) liegenbeide Faktoren sollten >=1 seinFeld »%s« ist vom Typ %s, nicht %sFeld »%s« nicht gefundenDatei »%s« nicht gefundenDatei wurde gekürztDatei ist weniger als 64 Byte großSchalter nicht -1 oder 1Schalter sollte 0 (horizontal) oder 1 (vertikal) seines wurden %d Verbindungspunkte gefunden, mindestens %d sind nötigKopfzeilengröße nicht korrektHilfe!Histogramm dürfen nicht mehr als 65536 Elemente habenHistogramme müssen eine Breite oder Höhe von eins haben»im_invmat« fehlgeschlagenBild »%s« zweimal als Ausgabe benutztBild bereits geschriebenBildkodierung muss NONE oder LABQ seinBild hat nicht so viele BänderBild ist zu nichts geschrumpftBild muss %s seinBild muss aus 8- oder 16-Bit Ganzzahlen mit oder ohne Vorzeichen bestehenBild muss aus 8- oder 16-Bit vorzeichenlosen Ganzzahlen bestehenBild muss aus 8- oder 16-Bit vorzeichenlosen Ganzzahlen oder Fließkommazahlen bestehenBild muss komplex seinBild muss ganzzahlig seinBild muss nicht-komplex seinBild muss unkodiert seinBild muss aus 8- oder 16-Bit vorzeichenlosen Ganz- oder Fließkommazahlen bestehenBild muss aus vorzeichenlosen Ganzzahlen bestehenBild muss %d Bänder habenBild muss ein oder %d Bänder habenBild muss ein oder drei Bänder habenBild muss ein Band habenBild nicht lesbarBild nicht schreibbarBild zu schmalBild zu klein für MaskeBild zu klein für FensterBilder müssen das gleiche Bandformat habenBilder müssen die gleiche Kodierung habenBilder müssen die gleiche Anzahl Bänder habenBilder müssen die gleiche Anzahl Bänder haben oder eines muss ein Band habenBilder müssen in der Größe passennicht gekennzeichnetes Bild mit PROFIL importierenUngeeigneter Regionstypunvollständige Kopfzeilenfalscher Namensraum in XMLIndex sollte im Bereich 0 - %d liegen»ink«-Bild passt nicht in das Bild»ink«-Bild nicht 1x1 BildpunkteEingabe ist kein unkodiertes Zeichen mit drei BändernEingaben inkompatibelZiel-%d (%s) nicht von Profil »%s« unterstützt; Rückfall auf Standardabsicht (normalerweise WAHRNEHMUNG)Ziel-%d (%s) nicht vom Profil unterstützt; Rückfall auf Standardabsicht (normalerweise WAHRNEHMUNG)interner Fehlerinterner Fehler #9876345ungültiges Argumentungültige Auszeichnung im Textioctl(0x%x) fehlgeschlagen: %sfür Bild »%s« abgeschossenEbenenpuffer aufgebraucht -- versuchen Sie die TIFF-Ausgabekacheln zu verkleinerngegen die »lcms«-Bibliothek wird in diesem VIPS nicht verlinktgegen die »lmcs«-Bibliothek wird in diesem VIPS nicht verlinktln des BildesERWEITERUNG ladenlog10 des Bildesviele Bildstatistiken in einem Durchgang»map« fehlgeschlagen (%s), die Systemressourcen werden knapp, ein Absturz steht bevorMaskenbild nicht 8-Bit-kodiert mit einem BandMaskengröße nur Potenzen von 2Maximalwert des BildesDurchschnittsmaße eine Gitters aus FlickstückenMinimalwert des Bildesmehr als 10 Megabyte XML? Leidende Succotash!mehr als eine WurzelMosaik-Wurzel nicht in Beschreibungsdatei gefunden ist das wirklich ein Bild?zwei Bilder multiplizieren»mwidth« muss -1 oder >= 0 seinkein eingebettetes Profilkein Datei-Deskriptorkeine Bilddatenkein passendes »>«Keine Matrixvariablen in »%s«kein Überlappenkein Paket oder Funktion »%s«keine Punkte zum MittelnKeine Auflösungsinformationen für TIFF-Bild »%s« -- Standard auf 1 Bildpunkt pro mmkein Text zu rendernunsinnige Maskenparameterkein »,« oder »)« nach Parameterkein »uchar«-Bild mit einem Bandkein RAD-Bildkeine reguläre Dateinicht ein Band oder %d Bänderkein Leerraum vor dem Start der binären DatenHauptspeicher reicht nicht ausHauptspeicher reicht nicht aus --- Größe == %dMBaußerhalb des Bereichs [0,255]Ausgabekoordinaten außerhalb des BereichsÜberlappen zu schmalÜberlappen zu klein für SucheÜberlappen zu schmal für Ihre SuchgrößePangoft2-Unterstützung deaktiviertParameter außerhalb des BereichsParameter würden zu einem Ausgabebild der Größe Null führenpel^[x,y,z] des Bildespel^x des BildesStatus pro Thread für »render«Status pro Thread für »sink«Status pro Thread für »sinkdisc«Status pro Thread für »vipsthreadpool«Phase des Kreuzleistungsspektrums zweier komplexer BilderFotonegativbildpunktweise lineare RegressionPosition und Wert von n Maxima des BildesPosition und Wert von n Minima des BildesPosition des Maximalwerts des BildesPosition des Maximalwerts des Bildes, durchschnittlich im Fall des ZeichnensPosition des Minimalwerts des BildesWert von FELD ausgeben (»getext« liest Erweiterungsblock, »Hist« liest Bildchronik)LesefehlerLesen ergab %ld Warnungen»ref« nicht kleiner oder gleich »in«Rest nach GanzzahldivisionRest nach Ganzzahldivision durch eine KonstanteRest nach Ganzzahldivision durch einen Vektor von KonstantenErweiterungsblock mit STDIN ersetzenbenötigtes Feld %d fehltbenötigtes Feld %d=%d, nicht %dneues Muster mit INTERPOLATOR erstellenauf größten ganzzahligen Wert runden, nicht größer alsauf nächsten ganzzahligen Wert rundenauf kleinsten ganzzahligen Wert runden, nicht weniger alsnur skalare BilderBänder auf N setzen»Xres« auf R Bildpunkte/mm setzen»Yres« auf R Bildpunkte/mm setzen»fatstrip«-Höhe auf N setzen (DEBUG)Ausgabe auf FORMAT setzen»thinstrip«-Höhe auf N setzen (DEBUG)Miniaturansicht auf GRÖSSE setzenBildhöhe auf N setzen (DEBUG)Bildbreite auf N setzen (DEBUG)verschieben um Null: Rückfall auf »im_copy«Fortschrittsrückmeldung anzeigenSinus des Bildes (Winkel in Grad)nur EinzelbandbilderGröße muss gerade und positiv seinStandardabweichung des Bildes»start«-Funktion für Bild »%s« fehlgeschlagenStartfunktion für Bild %s fehlgeschlagen»stop«-Funktion für Bild »%s« fehlgeschlagenBild zum Ersetzen »%s« hat nicht die gleiche Größe wie »%s«zwei Bilder subtrahierenTangens des Bildes (Winkel in Grad)Threads an %d angeheftetBildgröße kein Vielfaches von 16zu wenige Argumentezu wenige Datenzu viele Argumentezu viele Bilderzu viele Eingabebilderzu viele Elementezu viele Datenzu viel Überlappungnur »uchar« oder »ushort«-Eingabe»CreateFileMapping« nicht möglich»MapViewOfFile« nicht möglich»UnmapViewOfFile« nicht mögliches können keine Profile erstellt werdenThread kann nicht erstellt werdenUmwandlungsplan kann nicht erstellt werdenDateistatus kann nicht abgefragt werdenDateistatus kann nicht abgefragt werdenweißer Medienpunkt kann nicht abgefragt werdenEingabe von einem %s-Bild nicht möglichtemporäre Datei %s kann nicht erstellt werdenSpeicher kann nicht abgebildet werden»mmap« nicht möglich»mmap %s« zur gleichen Adresse nicht möglich»mmap« nicht möglich: "%s" - %s»munmap« der Datei nicht möglich»%s« kann nicht geöffnet werden»%s« kann nicht zur Eingabe geöffnet werden»%s« kann nicht zur Ausgabe geöffnet werdenDatei »%s« kann nicht zum Lesen geöffnet werdenDatei »%s« kann nicht zum Schreiben geöffnet werdenProfil »%s« kann nicht geöffnet werdenes kann nicht zu einem %s-Bild ausgegeben werdenDatei »%s« kann nicht angepingt werden libMagick-Fehler: %s %sDaten können nicht gelesen werdenDaten für »%s« können nicht gelesen werden, %sDatei »%s« kann nicht gelesen werden libMagick-Fehler: %s %sVerlauf kann nicht gelesen werdenBildpunkte können nicht gelesen werdenProfil kann nicht gelesen werdenkann nicht gesucht werdenEigenschaft »%s« kann nicht auf Wert »%s« gesetzt werden.VIPS kann nicht gestartet werdenkann nicht gekürzt werden»%s« kann nicht geschrieben werdenauf »%s« kann nicht geschrieben werdenIn den Puffer kann nicht geschrieben werden.nur unkodierte BilderUnerwartetes Ende der Zeichenkettenicht implementierter Eingabefarbraum 0x%xnicht implementierte Maskenicht implementierter Maskentypnicht implementierter Ausgabefarbraum 0x%xEinheitsvektor in Richtung des WertesUnix-Fehlerunbekannter Kodierungstypunbekannte Kodierungunbekannter Kodierungstypunbekannte Bildkodierungunbekannte fotometrische Deutung %dunbekannte Auflösungseinheitnur vorzeichenlose 8-Bit-Ganzzahl und 32-Bit-Fließkommazahlnicht unterstützte Bit-Tiefenicht unterstützte Bit-Tiefe %dnicht unterstützte »bitpix« %d nicht unterstützter Klassentyp %d nicht unterstützter Farbtypnicht unterstützter Farbraum %dnicht unterstützte Tiefe %d für LAB-Bildnicht unterstützte Tiefe %d für RGB-Bildnicht unterstützte Tiefe %d für Graustufenbildnicht unterstützter Bildtyp %dnicht unterstützte Rangstufe %d nicht unterstütztes Musterformat %d für Graustufenbildnicht unterstütztes Musterformat %d für LAB-Bildnicht unterstütztes Musterformat %d für RGB-BildAufruf: %s [OPTION...] vipsfile gültig an nichts angeklammertVektor muss 1 oder %d Elemente habenVektoren ungleicher LängeVektoren ungleicher Längedetaillierte AusgabeVips-DiagnoseVips-Warnung»vipsfile« - »vipsfile«-Kopfzeilen bearbeitenFenster zu großFenster zu kleinWindows-Fehlerwürde in einem Ausgabebild der Größe Null resultierenSchreibfehler ... Platte voll?Schreiben fehlgeschlagenfalsche Größenx-Bereich zu kleinx-Wert keine Ganzzahlx^pel des BildesXML-Fehler beim Speichernnull EingabebilderZoomfaktoren sollten >=0 seinZoomfaktoren zu großvips-7.38.5/po/ChangeLog0000644000175000017500000000002212303140253011673 00000000000000started 17 dec 03 vips-7.38.5/po/en_GB.gmo0000644000175000017500000000153312303145302011607 00000000000000Þ•T Œ¸ ¹)Æ$ð%;R5l ¢*°%Û&(@bad colormapmeasure a set of patches on a color chartunimplemented input color space 0x%xunimplemented output color space 0x%xunsupported color typeunsupported colorspace %dProject-Id-Version: libvips-doc 7.22.0 Report-Msgid-Bugs-To: POT-Creation-Date: 2012-03-08 21:02+0000 PO-Revision-Date: 2010-05-26 12:11+0100 Last-Translator: John Cupitt Language-Team: Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bad colourmapmeasure a set of patches on a colour chartunimplemented input colour space 0x%xunimplemented output colour space 0x%xunsupported colour typeunsupported colourspace %dvips-7.38.5/po/LINGUAS0000644000175000017500000000000012303140253011142 00000000000000vips-7.38.5/po/vips7.38.pot0000644000175000017500000033114112303146331012162 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=glib&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2014-02-25 17:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: ../libvips/arithmetic/abs.c:230 msgid "absolute value of an image" msgstr "" #: ../libvips/arithmetic/hist_find_ndim.c:112 #, c-format msgid "bins out of range [1,%d]" msgstr "" #: ../libvips/arithmetic/hist_find_ndim.c:289 #: ../libvips/arithmetic/hist_find.c:390 msgid "find image histogram" msgstr "" #: ../libvips/arithmetic/hist_find_ndim.c:298 ../libvips/arithmetic/min.c:428 #: ../libvips/arithmetic/avg.c:219 ../libvips/arithmetic/max.c:425 #: ../libvips/arithmetic/stats.c:420 #: ../libvips/arithmetic/hist_find_indexed.c:387 #: ../libvips/arithmetic/deviate.c:221 ../libvips/arithmetic/measure.c:200 #: ../libvips/arithmetic/arithmetic.c:588 #: ../libvips/arithmetic/hist_find.c:399 ../libvips/colour/colour.c:363 #: ../libvips/colour/colourspace.c:498 ../libvips/conversion/conversion.c:182 #: ../libvips/convolution/gaussblur.c:123 #: ../libvips/convolution/correlation.c:158 #: ../libvips/convolution/sharpen.c:324 #: ../libvips/convolution/convolution.c:128 ../libvips/create/create.c:101 #: ../libvips/foreign/foreign.c:932 ../libvips/freqfilt/freqfilt.c:104 #: ../libvips/histogram/hist_norm.c:147 ../libvips/histogram/hist_equal.c:114 #: ../libvips/histogram/maplut.c:689 ../libvips/histogram/hist_plot.c:348 #: ../libvips/histogram/stdif.c:294 ../libvips/histogram/hist_local.c:302 #: ../libvips/histogram/histogram.c:223 ../libvips/iofuncs/system.c:198 #: ../libvips/morphology/rank.c:405 ../libvips/morphology/morph.c:132 #: ../libvips/resample/resample.c:96 msgid "Output" msgstr "" #: ../libvips/arithmetic/hist_find_ndim.c:299 #: ../libvips/arithmetic/hist_find_indexed.c:388 #: ../libvips/arithmetic/hist_find.c:400 msgid "Output histogram" msgstr "" #: ../libvips/arithmetic/hist_find_ndim.c:304 msgid "Bins" msgstr "" #: ../libvips/arithmetic/hist_find_ndim.c:305 msgid "Number of bins in each dimension" msgstr "" #: ../libvips/arithmetic/complex.c:216 msgid "perform a complex operation on an image" msgstr "" #: ../libvips/arithmetic/complex.c:223 ../libvips/arithmetic/complex.c:502 #: ../libvips/arithmetic/complex.c:717 ../libvips/arithmetic/relational.c:229 #: ../libvips/arithmetic/relational.c:567 ../libvips/arithmetic/math.c:207 #: ../libvips/arithmetic/math2.c:205 ../libvips/arithmetic/math2.c:403 #: ../libvips/arithmetic/boolean.c:218 ../libvips/arithmetic/boolean.c:521 #: ../libvips/conversion/bandbool.c:218 ../tools/vips.c:1013 msgid "Operation" msgstr "" #: ../libvips/arithmetic/complex.c:224 ../libvips/arithmetic/complex.c:718 msgid "complex to perform" msgstr "" #: ../libvips/arithmetic/complex.c:495 msgid "perform a binary complex operation on two images" msgstr "" #: ../libvips/arithmetic/complex.c:503 msgid "binary complex operation to perform" msgstr "" #: ../libvips/arithmetic/complex.c:708 msgid "get a component from a complex image" msgstr "" #: ../libvips/arithmetic/complex.c:908 msgid "form a complex image from two real images" msgstr "" #: ../libvips/arithmetic/invert.c:165 msgid "invert an image" msgstr "" #: ../libvips/arithmetic/multiply.c:173 msgid "multiply two images" msgstr "" #: ../libvips/arithmetic/round.c:161 msgid "perform a round function on an image" msgstr "" #: ../libvips/arithmetic/round.c:169 msgid "Round operation" msgstr "" #: ../libvips/arithmetic/round.c:170 msgid "rounding operation to perform" msgstr "" #: ../libvips/arithmetic/subtract.c:162 msgid "subtract two images" msgstr "" #: ../libvips/arithmetic/min.c:420 msgid "find image minimum" msgstr "" #: ../libvips/arithmetic/min.c:429 ../libvips/arithmetic/avg.c:220 #: ../libvips/arithmetic/max.c:426 ../libvips/arithmetic/deviate.c:222 msgid "Output value" msgstr "" #: ../libvips/arithmetic/min.c:435 ../libvips/arithmetic/max.c:432 #: ../libvips/conversion/wrap.c:125 ../libvips/conversion/embed.c:571 msgid "x" msgstr "" #: ../libvips/arithmetic/min.c:436 msgid "Horizontal position of minimum" msgstr "" #: ../libvips/arithmetic/min.c:442 ../libvips/arithmetic/max.c:439 #: ../libvips/conversion/wrap.c:132 ../libvips/conversion/embed.c:578 msgid "y" msgstr "" #: ../libvips/arithmetic/min.c:443 msgid "Vertical position of minimum" msgstr "" #: ../libvips/arithmetic/min.c:449 ../libvips/arithmetic/max.c:446 #: ../libvips/create/invertlut.c:295 ../libvips/create/identity.c:158 msgid "Size" msgstr "" #: ../libvips/arithmetic/min.c:450 msgid "Number of minimum values to find" msgstr "" #: ../libvips/arithmetic/min.c:456 ../libvips/arithmetic/max.c:453 msgid "Output array" msgstr "" #: ../libvips/arithmetic/min.c:457 ../libvips/arithmetic/max.c:454 msgid "Array of output values" msgstr "" #: ../libvips/arithmetic/min.c:463 ../libvips/arithmetic/max.c:460 msgid "x array" msgstr "" #: ../libvips/arithmetic/min.c:464 ../libvips/arithmetic/max.c:461 msgid "Array of horizontal positions" msgstr "" #: ../libvips/arithmetic/min.c:470 ../libvips/arithmetic/max.c:467 msgid "y array" msgstr "" #: ../libvips/arithmetic/min.c:471 ../libvips/arithmetic/max.c:468 msgid "Array of vertical positions" msgstr "" #: ../libvips/arithmetic/unaryconst.c:204 msgid "unary operations with a constant" msgstr "" #: ../libvips/arithmetic/unaryconst.c:208 msgid "c" msgstr "" #: ../libvips/arithmetic/unaryconst.c:209 msgid "Array of constants" msgstr "" #: ../libvips/arithmetic/project.c:322 msgid "find image projections" msgstr "" #: ../libvips/arithmetic/project.c:330 ../libvips/arithmetic/profile.c:300 msgid "Columns" msgstr "" #: ../libvips/arithmetic/project.c:331 msgid "Sums of columns" msgstr "" #: ../libvips/arithmetic/project.c:336 ../libvips/arithmetic/profile.c:306 msgid "Rows" msgstr "" #: ../libvips/arithmetic/project.c:337 msgid "Sums of rows" msgstr "" #: ../libvips/arithmetic/avg.c:211 ../libvips/arithmetic/stats.c:412 #: ../libvips/arithmetic/deviate.c:213 msgid "find image average" msgstr "" #: ../libvips/arithmetic/max.c:417 msgid "find image maximum" msgstr "" #: ../libvips/arithmetic/max.c:433 msgid "Horizontal position of maximum" msgstr "" #: ../libvips/arithmetic/max.c:440 msgid "Vertical position of maximum" msgstr "" #: ../libvips/arithmetic/max.c:447 msgid "Number of maximum values to find" msgstr "" #: ../libvips/arithmetic/statistic.c:160 msgid "VIPS statistic operations" msgstr "" #: ../libvips/arithmetic/statistic.c:164 ../libvips/arithmetic/unary.c:88 #: ../libvips/colour/colour.c:458 ../libvips/colour/colour.c:596 #: ../libvips/colour/colourspace.c:492 ../libvips/conversion/rot.c:359 #: ../libvips/conversion/grid.c:199 ../libvips/conversion/recomb.c:200 #: ../libvips/conversion/flatten.c:376 ../libvips/conversion/replicate.c:196 #: ../libvips/conversion/subsample.c:271 ../libvips/conversion/cache.c:101 #: ../libvips/conversion/rot45.c:271 ../libvips/conversion/extract.c:197 #: ../libvips/conversion/extract.c:416 ../libvips/conversion/wrap.c:119 #: ../libvips/conversion/zoom.c:391 ../libvips/conversion/bandbool.c:212 #: ../libvips/conversion/tilecache.c:407 ../libvips/conversion/flip.c:240 #: ../libvips/conversion/bandjoin.c:172 ../libvips/conversion/copy.c:326 #: ../libvips/conversion/cast.c:486 ../libvips/conversion/sequential.c:324 #: ../libvips/conversion/embed.c:565 ../libvips/conversion/msb.c:244 #: ../libvips/conversion/bandrank.c:233 ../libvips/conversion/bandmean.c:196 #: ../libvips/conversion/scale.c:146 ../libvips/convolution/gaussblur.c:117 #: ../libvips/convolution/correlation.c:146 #: ../libvips/convolution/sharpen.c:318 #: ../libvips/convolution/convolution.c:122 ../libvips/create/invertlut.c:289 #: ../libvips/create/buildlut.c:261 ../libvips/foreign/foreign.c:1428 #: ../libvips/histogram/hist_norm.c:141 ../libvips/histogram/hist_equal.c:108 #: ../libvips/histogram/maplut.c:683 ../libvips/histogram/hist_plot.c:342 #: ../libvips/histogram/stdif.c:288 ../libvips/histogram/hist_local.c:296 #: ../libvips/histogram/hist_match.c:161 ../libvips/histogram/hist_unary.c:89 #: ../libvips/histogram/hist_ismonotonic.c:117 #: ../libvips/histogram/percent.c:110 ../libvips/iofuncs/system.c:192 #: ../libvips/morphology/morphology.c:116 ../libvips/resample/resample.c:90 msgid "Input" msgstr "" #: ../libvips/arithmetic/statistic.c:165 ../libvips/arithmetic/unary.c:89 #: ../libvips/colour/colour.c:459 ../libvips/colour/colour.c:597 #: ../libvips/colour/colourspace.c:493 ../libvips/conversion/rot.c:360 #: ../libvips/conversion/grid.c:200 ../libvips/conversion/falsecolour.c:378 #: ../libvips/conversion/flatten.c:377 ../libvips/conversion/replicate.c:197 #: ../libvips/conversion/subsample.c:272 ../libvips/conversion/cache.c:102 #: ../libvips/conversion/gamma.c:144 ../libvips/conversion/rot45.c:272 #: ../libvips/conversion/extract.c:198 ../libvips/conversion/extract.c:417 #: ../libvips/conversion/wrap.c:120 ../libvips/conversion/zoom.c:392 #: ../libvips/conversion/tilecache.c:408 ../libvips/conversion/flip.c:241 #: ../libvips/conversion/copy.c:327 ../libvips/conversion/cast.c:487 #: ../libvips/conversion/sequential.c:325 ../libvips/conversion/embed.c:566 #: ../libvips/conversion/msb.c:245 ../libvips/conversion/scale.c:147 #: ../libvips/convolution/gaussblur.c:118 ../libvips/convolution/sharpen.c:319 #: ../libvips/freqfilt/freqfilt.c:99 ../libvips/histogram/hist_norm.c:142 #: ../libvips/histogram/hist_equal.c:109 ../libvips/histogram/maplut.c:684 #: ../libvips/histogram/hist_plot.c:343 ../libvips/histogram/stdif.c:289 #: ../libvips/histogram/hist_local.c:297 ../libvips/histogram/hist_unary.c:90 #: ../libvips/histogram/percent.c:111 ../libvips/iofuncs/system.c:193 msgid "Input image" msgstr "" #: ../libvips/arithmetic/divide.c:225 msgid "divide two images" msgstr "" #: ../libvips/arithmetic/profile.c:292 msgid "find image profiles" msgstr "" #: ../libvips/arithmetic/profile.c:301 msgid "First non-zero pixel in column" msgstr "" #: ../libvips/arithmetic/profile.c:307 msgid "First non-zero pixel in row" msgstr "" #: ../libvips/arithmetic/stats.c:421 ../libvips/arithmetic/measure.c:201 msgid "Output array of statistics" msgstr "" #: ../libvips/arithmetic/binary.c:89 msgid "binary operations" msgstr "" #: ../libvips/arithmetic/binary.c:96 ../libvips/arithmetic/measure.c:220 #: ../libvips/colour/colour.c:766 ../libvips/conversion/extract.c:203 msgid "Left" msgstr "" #: ../libvips/arithmetic/binary.c:97 msgid "Left-hand image argument" msgstr "" #: ../libvips/arithmetic/binary.c:102 ../libvips/colour/colour.c:772 msgid "Right" msgstr "" #: ../libvips/arithmetic/binary.c:103 msgid "Right-hand image argument" msgstr "" #: ../libvips/arithmetic/hist_find_indexed.c:373 msgid "find indexed image histogram" msgstr "" #: ../libvips/arithmetic/hist_find_indexed.c:381 #: ../libvips/conversion/bandrank.c:240 msgid "Index" msgstr "" #: ../libvips/arithmetic/hist_find_indexed.c:382 msgid "Index image" msgstr "" #: ../libvips/arithmetic/relational.c:220 msgid "a relational operation on a pair of images" msgstr "" #: ../libvips/arithmetic/relational.c:230 #: ../libvips/arithmetic/relational.c:568 msgid "relational to perform" msgstr "" #: ../libvips/arithmetic/relational.c:558 msgid "relational operations against a constant" msgstr "" #: ../libvips/arithmetic/measure.c:161 #, c-format msgid "patch %d x %d, band %d: avg = %g, sdev = %g" msgstr "" #: ../libvips/arithmetic/measure.c:190 msgid "measure a set of patches on a color chart" msgstr "" #: ../libvips/arithmetic/measure.c:194 ../libvips/conversion/falsecolour.c:377 #: ../libvips/conversion/gamma.c:143 ../libvips/freqfilt/freqfilt.c:98 msgid "in" msgstr "" #: ../libvips/arithmetic/measure.c:195 msgid "Image to measure" msgstr "" #: ../libvips/arithmetic/measure.c:206 ../libvips/conversion/grid.c:212 #: ../libvips/conversion/replicate.c:202 msgid "Across" msgstr "" #: ../libvips/arithmetic/measure.c:207 msgid "Number of patches across chart" msgstr "" #: ../libvips/arithmetic/measure.c:213 ../libvips/conversion/grid.c:219 #: ../libvips/conversion/replicate.c:209 msgid "Down" msgstr "" #: ../libvips/arithmetic/measure.c:214 msgid "Number of patches down chart" msgstr "" #: ../libvips/arithmetic/measure.c:221 ../libvips/conversion/extract.c:204 msgid "Left edge of extract area" msgstr "" #: ../libvips/arithmetic/measure.c:227 ../libvips/conversion/extract.c:210 msgid "Top" msgstr "" #: ../libvips/arithmetic/measure.c:228 ../libvips/conversion/extract.c:211 msgid "Top edge of extract area" msgstr "" #: ../libvips/arithmetic/measure.c:234 ../libvips/conversion/extract.c:217 #: ../libvips/conversion/copy.c:339 ../libvips/conversion/embed.c:585 #: ../libvips/create/black.c:129 ../libvips/create/gaussnoise.c:158 #: ../libvips/create/logmat.c:191 ../libvips/create/text.c:290 #: ../libvips/create/gaussmat.c:167 ../libvips/create/xyz.c:193 #: ../libvips/create/point.c:155 ../libvips/create/fractsurf.c:102 #: ../libvips/foreign/rawload.c:123 ../libvips/histogram/stdif.c:302 #: ../libvips/histogram/hist_local.c:308 ../libvips/iofuncs/image.c:1051 #: ../libvips/morphology/rank.c:411 msgid "Width" msgstr "" #: ../libvips/arithmetic/measure.c:235 ../libvips/conversion/extract.c:218 msgid "Width of extract area" msgstr "" #: ../libvips/arithmetic/measure.c:241 ../libvips/conversion/extract.c:224 #: ../libvips/conversion/copy.c:346 ../libvips/conversion/embed.c:592 #: ../libvips/create/black.c:136 ../libvips/create/gaussnoise.c:165 #: ../libvips/create/xyz.c:200 ../libvips/create/point.c:162 #: ../libvips/create/fractsurf.c:109 ../libvips/foreign/rawload.c:130 #: ../libvips/histogram/stdif.c:309 ../libvips/histogram/hist_local.c:315 #: ../libvips/iofuncs/image.c:1058 ../libvips/morphology/rank.c:418 msgid "Height" msgstr "" #: ../libvips/arithmetic/measure.c:242 ../libvips/conversion/extract.c:225 msgid "Height of extract area" msgstr "" #: ../libvips/arithmetic/remainder.c:174 msgid "remainder after integer division of two images" msgstr "" #: ../libvips/arithmetic/remainder.c:324 msgid "remainder after integer division of an image and a constant" msgstr "" #: ../libvips/arithmetic/unary.c:81 msgid "unary operations" msgstr "" #: ../libvips/arithmetic/math.c:199 msgid "perform a math function on an image" msgstr "" #: ../libvips/arithmetic/math.c:208 ../libvips/arithmetic/math2.c:206 #: ../libvips/arithmetic/math2.c:404 msgid "math to perform" msgstr "" #: ../libvips/arithmetic/arithmetic.c:359 #, c-format msgid "not one band or %d bands" msgstr "" #: ../libvips/arithmetic/arithmetic.c:363 msgid "bad bands" msgstr "" #: ../libvips/arithmetic/arithmetic.c:524 ../libvips/colour/colour.c:313 #: ../libvips/conversion/bandary.c:139 ../libvips/conversion/bandrank.c:192 msgid "too many input images" msgstr "" #: ../libvips/arithmetic/arithmetic.c:582 msgid "arithmetic operations" msgstr "" #: ../libvips/arithmetic/arithmetic.c:589 ../libvips/colour/colour.c:364 #: ../libvips/colour/colourspace.c:499 ../libvips/conversion/conversion.c:183 #: ../libvips/convolution/gaussblur.c:124 #: ../libvips/convolution/correlation.c:159 #: ../libvips/convolution/sharpen.c:325 #: ../libvips/convolution/convolution.c:129 ../libvips/create/create.c:102 #: ../libvips/foreign/foreign.c:933 ../libvips/freqfilt/freqfilt.c:105 #: ../libvips/histogram/hist_norm.c:148 ../libvips/histogram/hist_equal.c:115 #: ../libvips/histogram/maplut.c:690 ../libvips/histogram/hist_plot.c:349 #: ../libvips/histogram/stdif.c:295 ../libvips/histogram/hist_local.c:303 #: ../libvips/histogram/histogram.c:224 ../libvips/iofuncs/system.c:199 #: ../libvips/morphology/rank.c:406 ../libvips/morphology/morph.c:133 #: ../libvips/resample/resample.c:97 msgid "Output image" msgstr "" #: ../libvips/arithmetic/hist_find.c:405 ../libvips/conversion/extract.c:422 #: ../libvips/conversion/msb.c:250 ../libvips/histogram/hist_equal.c:120 msgid "Band" msgstr "" #: ../libvips/arithmetic/hist_find.c:406 msgid "Find histogram of band" msgstr "" #: ../libvips/arithmetic/add.c:172 msgid "add two images" msgstr "" #: ../libvips/arithmetic/math2.c:197 msgid "binary math operations" msgstr "" #: ../libvips/arithmetic/math2.c:395 msgid "pow( @in, @c )" msgstr "" #: ../libvips/arithmetic/linear.c:380 msgid "calculate (a * in + b)" msgstr "" #: ../libvips/arithmetic/linear.c:388 msgid "a" msgstr "" #: ../libvips/arithmetic/linear.c:389 msgid "Multiply by this" msgstr "" #: ../libvips/arithmetic/linear.c:395 msgid "b" msgstr "" #: ../libvips/arithmetic/linear.c:396 msgid "Add this" msgstr "" #: ../libvips/arithmetic/linear.c:402 msgid "uchar" msgstr "" #: ../libvips/arithmetic/linear.c:403 msgid "Output should be uchar" msgstr "" #: ../libvips/arithmetic/boolean.c:210 msgid "boolean operation on two images" msgstr "" #: ../libvips/arithmetic/boolean.c:219 ../libvips/arithmetic/boolean.c:522 #: ../libvips/conversion/bandbool.c:219 msgid "boolean to perform" msgstr "" #: ../libvips/arithmetic/boolean.c:513 msgid "boolean operations against a constant" msgstr "" #: ../libvips/arithmetic/sign.c:152 msgid "unit vector of pixel" msgstr "" #: ../libvips/colour/scRGB2sRGB.c:166 ../libvips/colour/icc_transform.c:231 msgid "depth must be 8 or 16" msgstr "" #: ../libvips/colour/scRGB2sRGB.c:187 msgid "convert an scRGB image to sRGB" msgstr "" #: ../libvips/colour/scRGB2sRGB.c:193 ../libvips/colour/icc_transform.c:830 #: ../libvips/colour/icc_transform.c:985 ../libvips/foreign/dzsave.c:1410 msgid "Depth" msgstr "" #: ../libvips/colour/scRGB2sRGB.c:194 ../libvips/colour/icc_transform.c:831 #: ../libvips/colour/icc_transform.c:986 msgid "Output device space depth in bits" msgstr "" #: ../libvips/colour/XYZ2scRGB.c:102 msgid "transform XYZ to scRGB" msgstr "" #: ../libvips/colour/Lab2XYZ.c:169 msgid "transform CIELAB to XYZ" msgstr "" #: ../libvips/colour/Lab2XYZ.c:175 ../libvips/colour/XYZ2Lab.c:228 msgid "Temperature" msgstr "" #: ../libvips/colour/Lab2XYZ.c:176 ../libvips/colour/XYZ2Lab.c:229 msgid "Colour temperature" msgstr "" #: ../libvips/colour/LCh2Lab.c:120 msgid "transform LCh to Lab" msgstr "" #: ../libvips/colour/LCh2UCS.c:179 ../libvips/colour/UCS2LCh.c:266 msgid "transform LCh to CMC" msgstr "" #: ../libvips/colour/dE00.c:235 msgid "calculate dE00" msgstr "" #: ../libvips/colour/scRGB2XYZ.c:90 msgid "transform scRGB to XYZ" msgstr "" #: ../libvips/colour/icc_transform.c:276 #, c-format msgid "unimplemented input color space 0x%x" msgstr "" #: ../libvips/colour/icc_transform.c:325 #, c-format msgid "unimplemented output color space 0x%x" msgstr "" #: ../libvips/colour/icc_transform.c:337 msgid "no device profile" msgstr "" #: ../libvips/colour/icc_transform.c:368 msgid "transform using ICC profiles" msgstr "" #: ../libvips/colour/icc_transform.c:372 msgid "Intent" msgstr "" #: ../libvips/colour/icc_transform.c:373 msgid "Rendering intent" msgstr "" #: ../libvips/colour/icc_transform.c:379 msgid "PCS" msgstr "" #: ../libvips/colour/icc_transform.c:380 msgid "Set Profile Connection Space" msgstr "" #: ../libvips/colour/icc_transform.c:424 #, c-format msgid "" "intent %d (%s) not supported by %s profile; falling back to default intent" msgstr "" #: ../libvips/colour/icc_transform.c:428 ../libvips/iofuncs/operation.c:146 msgid "input" msgstr "" #: ../libvips/colour/icc_transform.c:428 ../libvips/iofuncs/operation.c:146 msgid "output" msgstr "" #: ../libvips/colour/icc_transform.c:462 ../libvips/colour/icc_transform.c:664 #: ../libvips/colour/icc_transform.c:887 msgid "unable to load embedded profile" msgstr "" #: ../libvips/colour/icc_transform.c:470 ../libvips/colour/icc_transform.c:672 #: ../libvips/colour/icc_transform.c:895 ../libvips/colour/icc_transform.c:909 #, c-format msgid "unable to open profile \"%s\"" msgstr "" #: ../libvips/colour/icc_transform.c:476 ../libvips/colour/icc_transform.c:901 msgid "no input profile" msgstr "" #: ../libvips/colour/icc_transform.c:586 msgid "import from device with ICC profile" msgstr "" #: ../libvips/colour/icc_transform.c:592 ../libvips/colour/icc_transform.c:971 msgid "Embedded" msgstr "" #: ../libvips/colour/icc_transform.c:593 ../libvips/colour/icc_transform.c:972 msgid "Use embedded input profile, if available" msgstr "" #: ../libvips/colour/icc_transform.c:599 ../libvips/colour/icc_transform.c:978 msgid "Input profile" msgstr "" #: ../libvips/colour/icc_transform.c:600 ../libvips/colour/icc_transform.c:979 msgid "Filename to load input profile from" msgstr "" #: ../libvips/colour/icc_transform.c:680 msgid "no output profile" msgstr "" #: ../libvips/colour/icc_transform.c:817 msgid "output to device with ICC profile" msgstr "" #: ../libvips/colour/icc_transform.c:823 ../libvips/colour/icc_transform.c:964 msgid "Output profile" msgstr "" #: ../libvips/colour/icc_transform.c:824 ../libvips/colour/icc_transform.c:965 msgid "Filename to load output profile from" msgstr "" #: ../libvips/colour/icc_transform.c:958 msgid "transform between devices with ICC profiles" msgstr "" #: ../libvips/colour/icc_transform.c:1030 #: ../libvips/colour/icc_transform.c:1044 msgid "unable to get media white point" msgstr "" #: ../libvips/colour/icc_transform.c:1104 msgid "libvips configured without lcms support" msgstr "" #: ../libvips/colour/dECMC.c:61 msgid "calculate dECMC" msgstr "" #: ../libvips/colour/colour.c:357 msgid "colour operations" msgstr "" #: ../libvips/colour/colour.c:454 msgid "colour space transformations" msgstr "" #: ../libvips/colour/colour.c:592 msgid "change colour coding" msgstr "" #: ../libvips/colour/colour.c:762 msgid "calculate colour difference" msgstr "" #: ../libvips/colour/colour.c:767 msgid "Left-hand input image" msgstr "" #: ../libvips/colour/colour.c:773 msgid "Right-hand input image" msgstr "" #: ../libvips/colour/rad2float.c:190 msgid "unpack Radiance coding to float RGB" msgstr "" #: ../libvips/colour/sRGB2scRGB.c:151 msgid "convert an sRGB image to scRGB" msgstr "" #: ../libvips/colour/Lab2LabQ.c:138 msgid "transform float Lab to LabQ coding" msgstr "" #: ../libvips/colour/colourspace.c:454 #, c-format msgid "no known route between '%s' and '%s'" msgstr "" #: ../libvips/colour/colourspace.c:486 msgid "convert to a new colourspace" msgstr "" #: ../libvips/colour/colourspace.c:504 msgid "Space" msgstr "" #: ../libvips/colour/colourspace.c:505 msgid "Destination colour space" msgstr "" #: ../libvips/colour/Lab2LabS.c:80 msgid "transform float Lab to signed short" msgstr "" #: ../libvips/colour/LabS2LabQ.c:126 msgid "transform short Lab to LabQ coding" msgstr "" #: ../libvips/colour/Lab2LCh.c:132 msgid "transform Lab to LCh" msgstr "" #: ../libvips/colour/Yxy2XYZ.c:93 msgid "transform Yxy to XYZ" msgstr "" #: ../libvips/colour/LabQ2sRGB.c:454 ../libvips/colour/LabQ2LabS.c:104 msgid "unpack a LabQ image to short Lab" msgstr "" #: ../libvips/colour/float2rad.c:201 msgid "transform float RGB to Radiance coding" msgstr "" #: ../libvips/colour/XYZ2Yxy.c:92 msgid "transform XYZ to Yxy" msgstr "" #: ../libvips/colour/dE76.c:113 msgid "calculate dE76" msgstr "" #: ../libvips/colour/XYZ2Lab.c:222 msgid "transform XYZ to Lab" msgstr "" #: ../libvips/colour/LabQ2Lab.c:124 msgid "unpack a LabQ image to float Lab" msgstr "" #: ../libvips/colour/LabS2Lab.c:78 msgid "transform signed short Lab to float" msgstr "" #: ../libvips/conversion/rot.c:355 ../libvips/conversion/rot45.c:267 msgid "rotate an image" msgstr "" #: ../libvips/conversion/rot.c:365 ../libvips/conversion/rot45.c:277 #: ../libvips/convolution/compass.c:156 ../libvips/foreign/dzsave.c:1425 #: ../libvips/resample/similarity.c:123 msgid "Angle" msgstr "" #: ../libvips/conversion/rot.c:366 ../libvips/conversion/rot45.c:278 msgid "Angle to rotate image" msgstr "" #: ../libvips/conversion/conversion.c:178 msgid "conversion operations" msgstr "" #: ../libvips/conversion/grid.c:165 msgid "bad grid geometry" msgstr "" #: ../libvips/conversion/grid.c:195 msgid "grid an image" msgstr "" #: ../libvips/conversion/grid.c:205 ../libvips/conversion/cache.c:114 #: ../libvips/conversion/tilecache.c:413 #: ../libvips/conversion/sequential.c:337 ../libvips/foreign/dzsave.c:1456 #: ../libvips/foreign/tiffsave.c:208 msgid "Tile height" msgstr "" #: ../libvips/conversion/grid.c:206 msgid "chop into tiles this high" msgstr "" #: ../libvips/conversion/grid.c:213 msgid "number of tiles across" msgstr "" #: ../libvips/conversion/grid.c:220 msgid "number of tiles down" msgstr "" #: ../libvips/conversion/recomb.c:159 msgid "bands in must equal matrix width" msgstr "" #: ../libvips/conversion/recomb.c:194 msgid "linear recombination with matrix" msgstr "" #: ../libvips/conversion/recomb.c:201 ../libvips/conversion/bandbool.c:213 #: ../libvips/conversion/bandmean.c:197 #: ../libvips/convolution/correlation.c:147 #: ../libvips/convolution/convolution.c:123 #: ../libvips/morphology/morphology.c:117 ../libvips/resample/resample.c:91 msgid "Input image argument" msgstr "" #: ../libvips/conversion/recomb.c:206 msgid "M" msgstr "" #: ../libvips/conversion/recomb.c:207 msgid "matrix of coefficients" msgstr "" #: ../libvips/conversion/falsecolour.c:371 msgid "false colour an image" msgstr "" #: ../libvips/conversion/flatten.c:370 msgid "flatten alpha out of an image" msgstr "" #: ../libvips/conversion/flatten.c:382 ../libvips/conversion/join.c:265 #: ../libvips/conversion/embed.c:606 ../libvips/conversion/insert.c:391 #: ../libvips/foreign/dzsave.c:1403 msgid "Background" msgstr "" #: ../libvips/conversion/flatten.c:383 msgid "Background value" msgstr "" #: ../libvips/conversion/replicate.c:192 msgid "replicate an image" msgstr "" #: ../libvips/conversion/replicate.c:203 msgid "Repeat this many times horizontally" msgstr "" #: ../libvips/conversion/replicate.c:210 msgid "Repeat this many times vertically" msgstr "" #: ../libvips/conversion/bandary.c:134 msgid "no input images" msgstr "" #: ../libvips/conversion/bandary.c:181 msgid "operations on image bands" msgstr "" #: ../libvips/conversion/subsample.c:228 ../libvips/resample/shrink.c:360 msgid "image has shrunk to nothing" msgstr "" #: ../libvips/conversion/subsample.c:265 msgid "subsample an image" msgstr "" #: ../libvips/conversion/subsample.c:277 ../libvips/conversion/zoom.c:397 msgid "Xfac" msgstr "" #: ../libvips/conversion/subsample.c:278 msgid "Horizontal subsample factor" msgstr "" #: ../libvips/conversion/subsample.c:284 ../libvips/conversion/zoom.c:404 msgid "Yfac" msgstr "" #: ../libvips/conversion/subsample.c:285 msgid "Vertical subsample factor" msgstr "" #: ../libvips/conversion/subsample.c:291 msgid "Point" msgstr "" #: ../libvips/conversion/subsample.c:292 msgid "Point sample" msgstr "" #: ../libvips/conversion/cache.c:97 ../libvips/conversion/tilecache.c:401 msgid "cache an image" msgstr "" #: ../libvips/conversion/cache.c:107 ../libvips/conversion/tilecache.c:792 #: ../libvips/foreign/dzsave.c:1449 ../libvips/foreign/tiffsave.c:201 msgid "Tile width" msgstr "" #: ../libvips/conversion/cache.c:108 ../libvips/conversion/tilecache.c:793 #: ../libvips/foreign/dzsave.c:1450 ../libvips/foreign/tiffsave.c:202 msgid "Tile width in pixels" msgstr "" #: ../libvips/conversion/cache.c:115 ../libvips/conversion/tilecache.c:414 #: ../libvips/conversion/sequential.c:338 ../libvips/foreign/dzsave.c:1457 #: ../libvips/foreign/tiffsave.c:209 msgid "Tile height in pixels" msgstr "" #: ../libvips/conversion/cache.c:121 ../libvips/conversion/tilecache.c:799 msgid "Max tiles" msgstr "" #: ../libvips/conversion/cache.c:122 ../libvips/conversion/tilecache.c:800 msgid "Maximum number of tiles to cache" msgstr "" #: ../libvips/conversion/join.c:228 msgid "join a pair of images" msgstr "" #: ../libvips/conversion/join.c:232 msgid "in1" msgstr "" #: ../libvips/conversion/join.c:233 msgid "First input image" msgstr "" #: ../libvips/conversion/join.c:238 ../libvips/freqfilt/phasecor.c:112 msgid "in2" msgstr "" #: ../libvips/conversion/join.c:239 ../libvips/freqfilt/phasecor.c:113 msgid "Second input image" msgstr "" #: ../libvips/conversion/join.c:244 ../libvips/morphology/countlines.c:142 msgid "direction" msgstr "" #: ../libvips/conversion/join.c:245 msgid "Join left-right or up-down" msgstr "" #: ../libvips/conversion/join.c:251 ../libvips/conversion/insert.c:384 msgid "Expand" msgstr "" #: ../libvips/conversion/join.c:252 ../libvips/conversion/insert.c:385 msgid "Expand output to hold all of both inputs" msgstr "" #: ../libvips/conversion/join.c:258 msgid "Shim" msgstr "" #: ../libvips/conversion/join.c:259 msgid "Pixels between images" msgstr "" #: ../libvips/conversion/join.c:266 ../libvips/conversion/insert.c:392 msgid "Colour for new pixels" msgstr "" #: ../libvips/conversion/join.c:272 ../libvips/create/text.c:297 msgid "Align" msgstr "" #: ../libvips/conversion/join.c:273 ../libvips/create/text.c:298 msgid "Align on the low, centre or high coordinate edge" msgstr "" #: ../libvips/conversion/gamma.c:137 msgid "gamma an image" msgstr "" #: ../libvips/conversion/gamma.c:149 msgid "exponent" msgstr "" #: ../libvips/conversion/gamma.c:150 msgid "Gamma factor" msgstr "" #: ../libvips/conversion/extract.c:150 msgid "bad extract area" msgstr "" #: ../libvips/conversion/extract.c:193 msgid "extract an area from an image" msgstr "" #: ../libvips/conversion/extract.c:381 msgid "bad extract band" msgstr "" #: ../libvips/conversion/extract.c:410 msgid "extract band from an image" msgstr "" #: ../libvips/conversion/extract.c:423 msgid "Band to extract" msgstr "" #: ../libvips/conversion/extract.c:429 msgid "n" msgstr "" #: ../libvips/conversion/extract.c:430 msgid "Number of bands to extract" msgstr "" #: ../libvips/conversion/wrap.c:115 msgid "wrap image origin" msgstr "" #: ../libvips/conversion/wrap.c:126 ../libvips/conversion/embed.c:572 msgid "Left edge of input in output" msgstr "" #: ../libvips/conversion/wrap.c:133 ../libvips/conversion/embed.c:579 msgid "Top edge of input in output" msgstr "" #: ../libvips/conversion/zoom.c:341 msgid "zoom factors too large" msgstr "" #: ../libvips/conversion/zoom.c:385 msgid "zoom an image" msgstr "" #: ../libvips/conversion/zoom.c:398 msgid "Horizontal zoom factor" msgstr "" #: ../libvips/conversion/zoom.c:405 msgid "Vertical zoom factor" msgstr "" #: ../libvips/conversion/bandbool.c:75 #, c-format msgid "operator %s not supported across image bands" msgstr "" #: ../libvips/conversion/bandbool.c:206 msgid "boolean operation across image bands" msgstr "" #: ../libvips/conversion/ifthenelse.c:470 msgid "ifthenelse an image" msgstr "" #: ../libvips/conversion/ifthenelse.c:474 msgid "Condition" msgstr "" #: ../libvips/conversion/ifthenelse.c:475 msgid "Condition input image" msgstr "" #: ../libvips/conversion/ifthenelse.c:480 msgid "Then image" msgstr "" #: ../libvips/conversion/ifthenelse.c:481 msgid "Source for TRUE pixels" msgstr "" #: ../libvips/conversion/ifthenelse.c:486 msgid "Else image" msgstr "" #: ../libvips/conversion/ifthenelse.c:487 msgid "Source for FALSE pixels" msgstr "" #: ../libvips/conversion/ifthenelse.c:492 msgid "blend" msgstr "" #: ../libvips/conversion/ifthenelse.c:493 msgid "Blend smoothly between then and else parts" msgstr "" #: ../libvips/conversion/tilecache.c:420 ../libvips/conversion/tilecache.c:992 #: ../libvips/foreign/foreign.c:952 msgid "Access" msgstr "" #: ../libvips/conversion/tilecache.c:421 ../libvips/conversion/tilecache.c:993 #: ../libvips/conversion/sequential.c:345 msgid "Expected access pattern" msgstr "" #: ../libvips/conversion/tilecache.c:427 msgid "Threaded" msgstr "" #: ../libvips/conversion/tilecache.c:428 msgid "Allow threaded access" msgstr "" #: ../libvips/conversion/tilecache.c:434 msgid "Persistent" msgstr "" #: ../libvips/conversion/tilecache.c:435 msgid "Keep cache between evaluations" msgstr "" #: ../libvips/conversion/tilecache.c:696 #, c-format msgid "error reading tile %dx%d: %s" msgstr "" #: ../libvips/conversion/tilecache.c:788 msgid "cache an image as a set of tiles" msgstr "" #: ../libvips/conversion/tilecache.c:988 msgid "cache an image as a set of lines" msgstr "" #: ../libvips/conversion/flip.c:236 msgid "flip an image" msgstr "" #: ../libvips/conversion/flip.c:246 msgid "Direction" msgstr "" #: ../libvips/conversion/flip.c:247 msgid "Direction to flip image" msgstr "" #: ../libvips/conversion/bandjoin.c:166 msgid "bandwise join a set of images" msgstr "" #: ../libvips/conversion/bandjoin.c:173 ../libvips/conversion/bandrank.c:234 msgid "Array of input images" msgstr "" #: ../libvips/conversion/copy.c:315 msgid "copy an image" msgstr "" #: ../libvips/conversion/copy.c:332 msgid "Swap" msgstr "" #: ../libvips/conversion/copy.c:333 msgid "Swap bytes in image between little and big-endian" msgstr "" #: ../libvips/conversion/copy.c:340 ../libvips/conversion/embed.c:586 #: ../libvips/create/black.c:130 ../libvips/create/gaussnoise.c:159 #: ../libvips/create/xyz.c:194 ../libvips/create/point.c:156 #: ../libvips/create/fractsurf.c:103 ../libvips/foreign/rawload.c:124 #: ../libvips/iofuncs/image.c:1052 msgid "Image width in pixels" msgstr "" #: ../libvips/conversion/copy.c:347 ../libvips/conversion/embed.c:593 #: ../libvips/create/black.c:137 ../libvips/create/gaussnoise.c:166 #: ../libvips/create/xyz.c:201 ../libvips/create/point.c:163 #: ../libvips/create/fractsurf.c:110 ../libvips/foreign/rawload.c:131 #: ../libvips/iofuncs/image.c:1059 msgid "Image height in pixels" msgstr "" #: ../libvips/conversion/copy.c:353 ../libvips/create/black.c:143 #: ../libvips/create/identity.c:144 ../libvips/foreign/rawload.c:137 #: ../libvips/iofuncs/image.c:1065 msgid "Bands" msgstr "" #: ../libvips/conversion/copy.c:354 ../libvips/create/black.c:144 #: ../libvips/foreign/rawload.c:138 ../libvips/iofuncs/image.c:1066 msgid "Number of bands in image" msgstr "" #: ../libvips/conversion/copy.c:360 ../libvips/conversion/cast.c:492 #: ../libvips/iofuncs/image.c:1072 msgid "Format" msgstr "" #: ../libvips/conversion/copy.c:361 ../libvips/iofuncs/image.c:1073 msgid "Pixel format in image" msgstr "" #: ../libvips/conversion/copy.c:367 ../libvips/iofuncs/image.c:1079 msgid "Coding" msgstr "" #: ../libvips/conversion/copy.c:368 ../libvips/iofuncs/image.c:1080 msgid "Pixel coding" msgstr "" #: ../libvips/conversion/copy.c:374 ../libvips/iofuncs/image.c:1086 msgid "Interpretation" msgstr "" #: ../libvips/conversion/copy.c:375 ../libvips/iofuncs/image.c:1087 msgid "Pixel interpretation" msgstr "" #: ../libvips/conversion/copy.c:381 ../libvips/foreign/tiffsave.c:237 #: ../libvips/iofuncs/image.c:1093 msgid "Xres" msgstr "" #: ../libvips/conversion/copy.c:382 ../libvips/foreign/tiffsave.c:238 #: ../libvips/iofuncs/image.c:1094 msgid "Horizontal resolution in pixels/mm" msgstr "" #: ../libvips/conversion/copy.c:388 ../libvips/foreign/tiffsave.c:244 #: ../libvips/iofuncs/image.c:1100 msgid "Yres" msgstr "" #: ../libvips/conversion/copy.c:389 ../libvips/foreign/tiffsave.c:245 #: ../libvips/iofuncs/image.c:1101 msgid "Vertical resolution in pixels/mm" msgstr "" #: ../libvips/conversion/copy.c:395 ../libvips/iofuncs/image.c:1107 msgid "Xoffset" msgstr "" #: ../libvips/conversion/copy.c:396 ../libvips/iofuncs/image.c:1108 msgid "Horizontal offset of origin" msgstr "" #: ../libvips/conversion/copy.c:402 ../libvips/iofuncs/image.c:1114 msgid "Yoffset" msgstr "" #: ../libvips/conversion/copy.c:403 ../libvips/iofuncs/image.c:1115 msgid "Vertical offset of origin" msgstr "" #: ../libvips/conversion/cast.c:128 #, c-format msgid "%d underflows and %d overflows detected" msgstr "" #: ../libvips/conversion/cast.c:480 msgid "cast an image" msgstr "" #: ../libvips/conversion/cast.c:493 msgid "Format to cast to" msgstr "" #: ../libvips/conversion/sequential.c:320 msgid "check sequential access" msgstr "" #: ../libvips/conversion/sequential.c:330 msgid "trace" msgstr "" #: ../libvips/conversion/sequential.c:331 msgid "trace pixel requests" msgstr "" #: ../libvips/conversion/sequential.c:344 msgid "Strategy" msgstr "" #: ../libvips/conversion/embed.c:476 ../libvips/iofuncs/image.c:2078 msgid "bad dimensions" msgstr "" #: ../libvips/conversion/embed.c:559 msgid "embed an image in a larger image" msgstr "" #: ../libvips/conversion/embed.c:599 msgid "Extend" msgstr "" #: ../libvips/conversion/embed.c:600 msgid "How to generate the extra pixels" msgstr "" #: ../libvips/conversion/embed.c:607 ../libvips/foreign/dzsave.c:1404 msgid "Colour for background pixels" msgstr "" #: ../libvips/conversion/insert.c:354 msgid "insert an image" msgstr "" #: ../libvips/conversion/insert.c:358 msgid "Main" msgstr "" #: ../libvips/conversion/insert.c:359 msgid "Main input image" msgstr "" #: ../libvips/conversion/insert.c:364 msgid "Sub-image" msgstr "" #: ../libvips/conversion/insert.c:365 msgid "Sub-image to insert into main image" msgstr "" #: ../libvips/conversion/insert.c:370 msgid "X" msgstr "" #: ../libvips/conversion/insert.c:371 msgid "Left edge of sub in main" msgstr "" #: ../libvips/conversion/insert.c:377 msgid "Y" msgstr "" #: ../libvips/conversion/insert.c:378 msgid "Top edge of sub in main" msgstr "" #: ../libvips/conversion/msb.c:166 msgid "bad band" msgstr "" #: ../libvips/conversion/msb.c:238 msgid "pick most-significant byte from an image" msgstr "" #: ../libvips/conversion/msb.c:251 msgid "Band to msb" msgstr "" #: ../libvips/conversion/bandrank.c:227 msgid "band-wise rank of a set of images" msgstr "" #: ../libvips/conversion/bandrank.c:241 msgid "Select this band element from sorted list" msgstr "" #: ../libvips/conversion/bandmean.c:190 msgid "band-wise average" msgstr "" #: ../libvips/conversion/scale.c:142 msgid "scale an image to uchar" msgstr "" #: ../libvips/conversion/scale.c:152 ../libvips/iofuncs/system.c:225 msgid "Log" msgstr "" #: ../libvips/conversion/scale.c:153 msgid "Log scale" msgstr "" #: ../libvips/conversion/scale.c:159 msgid "Exponent" msgstr "" #: ../libvips/conversion/scale.c:160 msgid "Exponent for log scale" msgstr "" #: ../libvips/convolution/im_aconv.c:224 ../libvips/convolution/im_aconv.c:230 #: ../libvips/convolution/im_aconv.c:751 #: ../libvips/convolution/im_aconvsep.c:131 msgid "mask too complex" msgstr "" #: ../libvips/convolution/im_aconv.c:981 #: ../libvips/convolution/im_aconv.c:1202 #: ../libvips/convolution/im_conv.c:1056 #: ../libvips/convolution/im_aconvsep.c:799 #: ../libvips/convolution/im_conv_f.c:341 ../libvips/morphology/hitmiss.c:725 msgid "image too small for mask" msgstr "" #: ../libvips/convolution/fastcor.c:215 msgid "fast correlation" msgstr "" #: ../libvips/convolution/convsep.c:103 ../libvips/convolution/compass.c:145 #: ../libvips/convolution/conv.c:123 msgid "convolution operation" msgstr "" #: ../libvips/convolution/convsep.c:107 ../libvips/convolution/gaussblur.c:136 #: ../libvips/convolution/compass.c:170 ../libvips/convolution/conv.c:127 msgid "Precision" msgstr "" #: ../libvips/convolution/convsep.c:108 ../libvips/convolution/gaussblur.c:137 #: ../libvips/convolution/compass.c:171 ../libvips/convolution/conv.c:128 msgid "Convolve with this precision" msgstr "" #: ../libvips/convolution/convsep.c:114 ../libvips/convolution/compass.c:177 #: ../libvips/convolution/conv.c:134 msgid "Layers" msgstr "" #: ../libvips/convolution/convsep.c:115 ../libvips/convolution/compass.c:178 #: ../libvips/convolution/conv.c:135 msgid "Use this many layers in approximation" msgstr "" #: ../libvips/convolution/convsep.c:121 ../libvips/convolution/compass.c:184 #: ../libvips/convolution/conv.c:141 msgid "Cluster" msgstr "" #: ../libvips/convolution/convsep.c:122 ../libvips/convolution/compass.c:185 #: ../libvips/convolution/conv.c:142 msgid "Cluster lines closer than this in approximation" msgstr "" #: ../libvips/convolution/gaussblur.c:111 ../libvips/convolution/sharpen.c:312 msgid "Unsharp masking for print" msgstr "" #: ../libvips/convolution/gaussblur.c:129 #: ../libvips/create/mask_butterworth_band.c:134 #: ../libvips/create/mask_gaussian_band.c:121 #: ../libvips/create/mask_ideal_band.c:112 msgid "radius" msgstr "" #: ../libvips/convolution/gaussblur.c:130 ../libvips/convolution/sharpen.c:331 msgid "Mask radius" msgstr "" #: ../libvips/convolution/im_conv.c:219 ../libvips/histogram/maplut.c:113 #, c-format msgid "%d overflows detected" msgstr "" #: ../libvips/convolution/im_conv.c:222 #, c-format msgid "%d underflows detected" msgstr "" #: ../libvips/convolution/correlation.c:140 msgid "correlation operation" msgstr "" #: ../libvips/convolution/correlation.c:152 #: ../libvips/convolution/convolution.c:134 ../libvips/morphology/morph.c:138 msgid "Mask" msgstr "" #: ../libvips/convolution/correlation.c:153 msgid "Input reference image" msgstr "" #: ../libvips/convolution/compass.c:149 msgid "Times" msgstr "" #: ../libvips/convolution/compass.c:150 msgid "Rotate and convolve this many times" msgstr "" #: ../libvips/convolution/compass.c:157 msgid "Rotate mask by this much between convolutions" msgstr "" #: ../libvips/convolution/compass.c:163 msgid "Combine" msgstr "" #: ../libvips/convolution/compass.c:164 msgid "Combine convolution results like this" msgstr "" #: ../libvips/convolution/sharpen.c:230 msgid "parameters out of range" msgstr "" #: ../libvips/convolution/sharpen.c:330 ../libvips/create/logmat.c:184 #: ../libvips/create/gaussmat.c:160 msgid "Radius" msgstr "" #: ../libvips/convolution/sharpen.c:337 msgid "x1" msgstr "" #: ../libvips/convolution/sharpen.c:338 msgid "Flat/jaggy threshold" msgstr "" #: ../libvips/convolution/sharpen.c:344 msgid "y2" msgstr "" #: ../libvips/convolution/sharpen.c:345 msgid "Maximum brightening" msgstr "" #: ../libvips/convolution/sharpen.c:351 msgid "y3" msgstr "" #: ../libvips/convolution/sharpen.c:352 msgid "Maximum darkening" msgstr "" #: ../libvips/convolution/sharpen.c:358 msgid "m1" msgstr "" #: ../libvips/convolution/sharpen.c:359 msgid "Slope for flat areas" msgstr "" #: ../libvips/convolution/sharpen.c:365 msgid "m2" msgstr "" #: ../libvips/convolution/sharpen.c:366 msgid "Slope for jaggy areas" msgstr "" #: ../libvips/convolution/spcor.c:301 msgid "spatial correlation" msgstr "" #: ../libvips/convolution/convolution.c:113 msgid "convolution operations" msgstr "" #: ../libvips/convolution/convolution.c:135 ../libvips/morphology/morph.c:139 msgid "Input matrix image" msgstr "" #: ../libvips/create/mask.c:111 msgid "base class for frequency filters" msgstr "" #: ../libvips/create/mask.c:119 msgid "Optical" msgstr "" #: ../libvips/create/mask.c:120 msgid "Rotate quadrants to optical space" msgstr "" #: ../libvips/create/mask.c:126 msgid "Reject" msgstr "" #: ../libvips/create/mask.c:127 msgid "Invert the sense of the filter" msgstr "" #: ../libvips/create/mask.c:133 msgid "Nodc" msgstr "" #: ../libvips/create/mask.c:134 msgid "Remove DC component" msgstr "" #: ../libvips/create/zone.c:90 msgid "make a zone plate" msgstr "" #: ../libvips/create/invertlut.c:124 msgid "bad input matrix" msgstr "" #: ../libvips/create/invertlut.c:129 msgid "bad size" msgstr "" #: ../libvips/create/invertlut.c:149 #, c-format msgid "element (%d, %d) is %g, outside range [0,1]" msgstr "" #: ../libvips/create/invertlut.c:285 msgid "build an inverted look-up table" msgstr "" #: ../libvips/create/invertlut.c:290 ../libvips/create/buildlut.c:262 msgid "Matrix of XY coordinates" msgstr "" #: ../libvips/create/invertlut.c:296 msgid "LUT size to generate" msgstr "" #: ../libvips/create/mask_gaussian.c:81 #: ../libvips/create/mask_gaussian_band.c:102 msgid "make a gaussian filter" msgstr "" #: ../libvips/create/mask_gaussian.c:86 ../libvips/create/mask_gaussian.c:87 #: ../libvips/create/mask_ideal.c:84 ../libvips/create/mask_ideal.c:85 #: ../libvips/create/mask_butterworth.c:95 #: ../libvips/create/mask_butterworth.c:96 msgid "Frequency cutoff" msgstr "" #: ../libvips/create/mask_gaussian.c:93 ../libvips/create/mask_gaussian.c:94 #: ../libvips/create/mask_butterworth_band.c:141 #: ../libvips/create/mask_butterworth_band.c:142 #: ../libvips/create/mask_gaussian_band.c:128 #: ../libvips/create/mask_gaussian_band.c:129 #: ../libvips/create/mask_butterworth.c:102 #: ../libvips/create/mask_butterworth.c:103 msgid "Amplitude cutoff" msgstr "" #: ../libvips/create/mask_butterworth_band.c:108 msgid "make a butterworth_band filter" msgstr "" #: ../libvips/create/mask_butterworth_band.c:113 #: ../libvips/create/mask_butterworth.c:88 msgid "Order" msgstr "" #: ../libvips/create/mask_butterworth_band.c:114 #: ../libvips/create/mask_butterworth.c:89 msgid "Filter order" msgstr "" #: ../libvips/create/mask_butterworth_band.c:120 #: ../libvips/create/mask_butterworth_band.c:121 #: ../libvips/create/mask_gaussian_band.c:107 #: ../libvips/create/mask_gaussian_band.c:108 #: ../libvips/create/mask_ideal_band.c:98 #: ../libvips/create/mask_ideal_band.c:99 msgid "Frequency cutoff x" msgstr "" #: ../libvips/create/mask_butterworth_band.c:127 #: ../libvips/create/mask_butterworth_band.c:128 #: ../libvips/create/mask_gaussian_band.c:114 #: ../libvips/create/mask_gaussian_band.c:115 #: ../libvips/create/mask_ideal_band.c:105 #: ../libvips/create/mask_ideal_band.c:106 msgid "Frequency cutoff y" msgstr "" #: ../libvips/create/mask_butterworth_band.c:135 #: ../libvips/create/mask_gaussian_band.c:122 #: ../libvips/create/mask_ideal_band.c:113 msgid "radius of circle" msgstr "" #: ../libvips/create/sines.c:121 msgid "make a 2D sine wave" msgstr "" #: ../libvips/create/sines.c:127 msgid "hfreq" msgstr "" #: ../libvips/create/sines.c:128 msgid "Horizontal spatial frequency" msgstr "" #: ../libvips/create/sines.c:134 msgid "vfreq" msgstr "" #: ../libvips/create/sines.c:135 msgid "Vertical spatial frequency" msgstr "" #: ../libvips/create/black.c:125 msgid "make a black image" msgstr "" #: ../libvips/create/mask_ideal_ring.c:93 msgid "make an ideal ring filter" msgstr "" #: ../libvips/create/mask_ideal_ring.c:98 #: ../libvips/create/mask_ideal_ring.c:99 #: ../libvips/create/mask_butterworth_ring.c:106 #: ../libvips/create/mask_butterworth_ring.c:107 #: ../libvips/create/mask_gaussian_ring.c:101 #: ../libvips/create/mask_gaussian_ring.c:102 msgid "Ringwidth" msgstr "" #: ../libvips/create/gaussnoise.c:154 msgid "make a gaussnoise image" msgstr "" #: ../libvips/create/gaussnoise.c:172 ../libvips/histogram/stdif.c:323 msgid "Mean" msgstr "" #: ../libvips/create/gaussnoise.c:173 msgid "Mean of pixels in generated image" msgstr "" #: ../libvips/create/gaussnoise.c:179 msgid "Sigma" msgstr "" #: ../libvips/create/gaussnoise.c:180 msgid "Standard deviation of pixels in generated image" msgstr "" #: ../libvips/create/logmat.c:130 ../libvips/create/gaussmat.c:109 msgid "mask too large" msgstr "" #: ../libvips/create/logmat.c:180 msgid "make a laplacian of gaussian image" msgstr "" #: ../libvips/create/logmat.c:185 msgid "Radius of Logmatian" msgstr "" #: ../libvips/create/logmat.c:192 msgid "Minimum amplitude of Logmatian" msgstr "" #: ../libvips/create/logmat.c:198 ../libvips/create/gaussmat.c:174 msgid "Separable" msgstr "" #: ../libvips/create/logmat.c:199 msgid "Generate separable Logmatian" msgstr "" #: ../libvips/create/logmat.c:205 ../libvips/create/gaussmat.c:181 msgid "Integer" msgstr "" #: ../libvips/create/logmat.c:206 msgid "Generate integer Logmatian" msgstr "" #: ../libvips/create/tonelut.c:221 ../libvips/create/buildlut.c:257 msgid "build a look-up table" msgstr "" #: ../libvips/create/tonelut.c:225 msgid "In-max" msgstr "" #: ../libvips/create/tonelut.c:226 msgid "Size of LUT to build" msgstr "" #: ../libvips/create/tonelut.c:232 msgid "Out-max" msgstr "" #: ../libvips/create/tonelut.c:233 msgid "Maximum value in output LUT" msgstr "" #: ../libvips/create/tonelut.c:239 msgid "Black point" msgstr "" #: ../libvips/create/tonelut.c:240 msgid "Lowest value in output" msgstr "" #: ../libvips/create/tonelut.c:246 msgid "White point" msgstr "" #: ../libvips/create/tonelut.c:247 msgid "Highest value in output" msgstr "" #: ../libvips/create/tonelut.c:253 msgid "Shadow point" msgstr "" #: ../libvips/create/tonelut.c:254 msgid "Position of shadow" msgstr "" #: ../libvips/create/tonelut.c:260 msgid "Mid-tone point" msgstr "" #: ../libvips/create/tonelut.c:261 msgid "Position of mid-tones" msgstr "" #: ../libvips/create/tonelut.c:267 msgid "Highlight point" msgstr "" #: ../libvips/create/tonelut.c:268 msgid "Position of highlights" msgstr "" #: ../libvips/create/tonelut.c:274 msgid "Shadow adjust" msgstr "" #: ../libvips/create/tonelut.c:275 msgid "Adjust shadows by this much" msgstr "" #: ../libvips/create/tonelut.c:281 msgid "Mid-tone adjust" msgstr "" #: ../libvips/create/tonelut.c:282 msgid "Adjust mid-tones by this much" msgstr "" #: ../libvips/create/tonelut.c:288 msgid "Highlight adjust" msgstr "" #: ../libvips/create/tonelut.c:289 msgid "Adjust highlights by this much" msgstr "" #: ../libvips/create/mask_ideal.c:79 msgid "make an ideal filter" msgstr "" #: ../libvips/create/mask_butterworth_ring.c:101 msgid "make a butterworth ring filter" msgstr "" #: ../libvips/create/create.c:97 msgid "create operations" msgstr "" #: ../libvips/create/identity.c:140 msgid "make a 1D image where pixel values are indexes" msgstr "" #: ../libvips/create/identity.c:145 msgid "Number of bands in LUT" msgstr "" #: ../libvips/create/identity.c:151 msgid "Ushort" msgstr "" #: ../libvips/create/identity.c:152 msgid "Create a 16-bit LUT" msgstr "" #: ../libvips/create/identity.c:159 msgid "Size of 16-bit LUT" msgstr "" #: ../libvips/create/eye.c:98 msgid "make an image showing the eye's spatial response" msgstr "" #: ../libvips/create/eye.c:103 msgid "Factor" msgstr "" #: ../libvips/create/eye.c:104 msgid "Maximum spatial frequency" msgstr "" #: ../libvips/create/text.c:164 msgid "invalid markup in text" msgstr "" #: ../libvips/create/text.c:206 msgid "no text to render" msgstr "" #: ../libvips/create/text.c:272 msgid "make a text image" msgstr "" #: ../libvips/create/text.c:276 msgid "Text" msgstr "" #: ../libvips/create/text.c:277 msgid "Text to render" msgstr "" #: ../libvips/create/text.c:283 msgid "Font" msgstr "" #: ../libvips/create/text.c:284 msgid "Font to render width" msgstr "" #: ../libvips/create/text.c:291 msgid "Maximum image width in pixels" msgstr "" #: ../libvips/create/text.c:304 msgid "DPI" msgstr "" #: ../libvips/create/text.c:305 msgid "DPI to render at" msgstr "" #: ../libvips/create/gaussmat.c:156 msgid "make a gaussian image" msgstr "" #: ../libvips/create/gaussmat.c:161 msgid "Radius of Gaussian" msgstr "" #: ../libvips/create/gaussmat.c:168 msgid "Minimum amplitude of Gaussian" msgstr "" #: ../libvips/create/gaussmat.c:175 msgid "Generate separable Gaussian" msgstr "" #: ../libvips/create/gaussmat.c:182 msgid "Generate integer Gaussian" msgstr "" #: ../libvips/create/xyz.c:139 msgid "lower dimensions not set" msgstr "" #: ../libvips/create/xyz.c:156 msgid "image too large" msgstr "" #: ../libvips/create/xyz.c:189 msgid "make an image where pixel values are coordinates" msgstr "" #: ../libvips/create/xyz.c:207 msgid "csize" msgstr "" #: ../libvips/create/xyz.c:208 msgid "Size of third dimension" msgstr "" #: ../libvips/create/xyz.c:214 msgid "dsize" msgstr "" #: ../libvips/create/xyz.c:215 msgid "Size of fourth dimension" msgstr "" #: ../libvips/create/xyz.c:221 msgid "esize" msgstr "" #: ../libvips/create/xyz.c:222 msgid "Size of fifth dimension" msgstr "" #: ../libvips/create/mask_butterworth.c:83 msgid "make a butterworth filter" msgstr "" #: ../libvips/create/mask_gaussian_ring.c:96 msgid "make a gaussian ring filter" msgstr "" #: ../libvips/create/mask_fractal.c:88 msgid "make fractal filter" msgstr "" #: ../libvips/create/mask_fractal.c:93 ../libvips/create/mask_fractal.c:94 #: ../libvips/create/fractsurf.c:116 ../libvips/create/fractsurf.c:117 msgid "Fractal dimension" msgstr "" #: ../libvips/create/point.c:146 msgid "make a point image" msgstr "" #: ../libvips/create/point.c:169 msgid "Uchar" msgstr "" #: ../libvips/create/point.c:170 msgid "Output an unsigned char image" msgstr "" #: ../libvips/create/mask_ideal_band.c:93 msgid "make an ideal band filter" msgstr "" #: ../libvips/create/grey.c:89 msgid "make a grey ramp image" msgstr "" #: ../libvips/create/fractsurf.c:98 msgid "make a fractal surface" msgstr "" #: ../libvips/create/buildlut.c:134 #, c-format msgid "x value row %d not an int" msgstr "" #: ../libvips/create/buildlut.c:149 msgid "x range too small" msgstr "" #: ../libvips/foreign/jpeg2vips.c:175 #, c-format msgid "read gave %ld warnings" msgstr "" #: ../libvips/foreign/jpeg2vips.c:540 msgid "error reading resolution" msgstr "" #: ../libvips/foreign/jpeg2vips.c:570 ../libvips/foreign/vips2jpeg.c:479 msgid "unknown EXIF resolution unit" msgstr "" #: ../libvips/foreign/jpeg2vips.c:756 msgid "unknown JFIF resolution unit" msgstr "" #: ../libvips/foreign/radiance.c:676 msgid "end of file" msgstr "" #: ../libvips/foreign/radiance.c:756 msgid "scanline length mismatch" msgstr "" #: ../libvips/foreign/radiance.c:773 msgid "overrun" msgstr "" #: ../libvips/foreign/radiance.c:1004 msgid "error reading radiance header" msgstr "" #: ../libvips/foreign/radiance.c:1081 #, c-format msgid "read error line %d" msgstr "" #: ../libvips/foreign/vips2jpeg.c:139 #, c-format msgid "%s" msgstr "" #: ../libvips/foreign/vips2jpeg.c:493 msgid "error setting JPEG resolution" msgstr "" #: ../libvips/foreign/vips2jpeg.c:513 msgid "error setting JPEG dimensions" msgstr "" #: ../libvips/foreign/vips2jpeg.c:688 msgid "error saving EXIF" msgstr "" #: ../libvips/foreign/openexrload.c:126 msgid "load an OpenEXR image" msgstr "" #: ../libvips/foreign/openexrload.c:138 ../libvips/foreign/vipssave.c:104 #: ../libvips/foreign/rawsave.c:145 ../libvips/foreign/csvsave.c:103 #: ../libvips/foreign/matrixload.c:147 ../libvips/foreign/radsave.c:120 #: ../libvips/foreign/rawload.c:116 ../libvips/foreign/webpsave.c:166 #: ../libvips/foreign/csvload.c:133 ../libvips/foreign/jpegload.c:237 #: ../libvips/foreign/magickload.c:149 ../libvips/foreign/webpload.c:172 #: ../libvips/foreign/matload.c:136 ../libvips/foreign/jpegsave.c:219 #: ../libvips/foreign/dzsave.c:1367 ../libvips/foreign/ppmsave.c:119 #: ../libvips/foreign/tiffsave.c:157 ../libvips/foreign/matrixsave.c:121 #: ../libvips/foreign/fitssave.c:129 ../libvips/foreign/pngload.c:138 #: ../libvips/foreign/fitsload.c:117 ../libvips/foreign/vipsload.c:134 #: ../libvips/foreign/tiffload.c:151 ../libvips/foreign/analyzeload.c:127 #: ../libvips/foreign/openslideload.c:176 ../libvips/foreign/pngsave.c:169 #: ../libvips/foreign/radload.c:130 ../libvips/foreign/ppmload.c:127 #: ../libvips/iofuncs/image.c:1121 msgid "Filename" msgstr "" #: ../libvips/foreign/openexrload.c:139 ../libvips/foreign/matrixload.c:148 #: ../libvips/foreign/rawload.c:117 ../libvips/foreign/csvload.c:134 #: ../libvips/foreign/jpegload.c:238 ../libvips/foreign/magickload.c:150 #: ../libvips/foreign/webpload.c:173 ../libvips/foreign/matload.c:137 #: ../libvips/foreign/pngload.c:139 ../libvips/foreign/fitsload.c:118 #: ../libvips/foreign/vipsload.c:135 ../libvips/foreign/tiffload.c:152 #: ../libvips/foreign/analyzeload.c:128 ../libvips/foreign/openslideload.c:177 #: ../libvips/foreign/radload.c:131 ../libvips/foreign/ppmload.c:128 msgid "Filename to load from" msgstr "" #: ../libvips/foreign/vipssave.c:94 msgid "save image to vips file" msgstr "" #: ../libvips/foreign/vipssave.c:105 ../libvips/foreign/rawsave.c:146 #: ../libvips/foreign/csvsave.c:104 ../libvips/foreign/radsave.c:121 #: ../libvips/foreign/webpsave.c:167 ../libvips/foreign/jpegsave.c:220 #: ../libvips/foreign/dzsave.c:1368 ../libvips/foreign/ppmsave.c:120 #: ../libvips/foreign/tiffsave.c:158 ../libvips/foreign/matrixsave.c:122 #: ../libvips/foreign/fitssave.c:130 ../libvips/foreign/pngsave.c:170 msgid "Filename to save to" msgstr "" #: ../libvips/foreign/rawsave.c:139 msgid "save image to raw file" msgstr "" #: ../libvips/foreign/rawsave.c:245 msgid "write raw image to file descriptor" msgstr "" #: ../libvips/foreign/rawsave.c:251 msgid "File descriptor" msgstr "" #: ../libvips/foreign/rawsave.c:252 msgid "File descriptor to write to" msgstr "" #: ../libvips/foreign/csvsave.c:95 msgid "save image to csv file" msgstr "" #: ../libvips/foreign/csvsave.c:110 ../libvips/foreign/csvload.c:161 msgid "Separator" msgstr "" #: ../libvips/foreign/csvsave.c:111 msgid "Separator characters" msgstr "" #: ../libvips/foreign/matrixload.c:135 msgid "load matrix from file" msgstr "" #: ../libvips/foreign/radsave.c:109 msgid "save image to Radiance file" msgstr "" #: ../libvips/foreign/rawload.c:108 msgid "load raw data from a file" msgstr "" #: ../libvips/foreign/rawload.c:144 ../libvips/iofuncs/image.c:1149 msgid "Size of header" msgstr "" #: ../libvips/foreign/rawload.c:145 ../libvips/iofuncs/image.c:1150 msgid "Offset in bytes from start of file" msgstr "" #: ../libvips/foreign/webpsave.c:90 msgid "save webp" msgstr "" #: ../libvips/foreign/webpsave.c:96 ../libvips/foreign/jpegsave.c:127 #: ../libvips/foreign/tiffsave.c:172 msgid "Q" msgstr "" #: ../libvips/foreign/webpsave.c:97 ../libvips/foreign/jpegsave.c:128 #: ../libvips/foreign/tiffsave.c:173 msgid "Q factor" msgstr "" #: ../libvips/foreign/webpsave.c:103 msgid "lossless" msgstr "" #: ../libvips/foreign/webpsave.c:104 msgid "enable lossless compression" msgstr "" #: ../libvips/foreign/webpsave.c:160 msgid "save image to webp file" msgstr "" #: ../libvips/foreign/webpsave.c:229 msgid "save image to webp buffer" msgstr "" #: ../libvips/foreign/webpsave.c:233 ../libvips/foreign/jpegload.c:308 #: ../libvips/foreign/webpload.c:240 ../libvips/foreign/jpegsave.c:287 #: ../libvips/foreign/pngload.c:205 ../libvips/foreign/pngsave.c:231 msgid "Buffer" msgstr "" #: ../libvips/foreign/webpsave.c:234 ../libvips/foreign/jpegsave.c:288 #: ../libvips/foreign/pngsave.c:232 msgid "Buffer to save to" msgstr "" #: ../libvips/foreign/webpsave.c:276 ../libvips/foreign/jpegsave.c:331 msgid "error writing output" msgstr "" #: ../libvips/foreign/webpsave.c:292 msgid "save image to webp mime" msgstr "" #: ../libvips/foreign/vips2tiff.c:285 #, c-format msgid "unable to open \"%s\" for output" msgstr "" #: ../libvips/foreign/vips2tiff.c:301 ../libvips/foreign/tiff2vips.c:1584 #, c-format msgid "unable to open \"%s\" for input" msgstr "" #: ../libvips/foreign/vips2tiff.c:724 msgid "layer buffer exhausted -- try making TIFF output tiles smaller" msgstr "" #: ../libvips/foreign/vips2tiff.c:956 msgid "TIFF write tile failed" msgstr "" #: ../libvips/foreign/vips2tiff.c:1032 msgid "internal error #9876345" msgstr "" #: ../libvips/foreign/vips2tiff.c:1104 ../libvips/foreign/vips2tiff.c:1179 msgid "unsupported image format" msgstr "" #: ../libvips/foreign/vips2tiff.c:1331 msgid "tile size not a multiple of 16" msgstr "" #: ../libvips/foreign/vips2tiff.c:1337 msgid "can't have strip pyramid -- enabling tiling" msgstr "" #: ../libvips/foreign/vips2tiff.c:1348 msgid "can only pyramid LABQ and non-complex images" msgstr "" #: ../libvips/foreign/vips2tiff.c:1361 msgid "can only squash 1 band uchar images -- disabling squash" msgstr "" #: ../libvips/foreign/vips2tiff.c:1369 msgid "can't have 1-bit JPEG -- disabling JPEG" msgstr "" #: ../libvips/foreign/vips2webp.c:85 ../libvips/foreign/vips2webp.c:102 #: ../libvips/foreign/vips2webp.c:142 msgid "unable to encode" msgstr "" #: ../libvips/foreign/fits.c:181 ../libvips/foreign/matlab.c:107 #: ../libvips/foreign/webp2vips.c:190 ../libvips/foreign/webp2vips.c:245 #: ../libvips/iofuncs/vips.c:148 ../libvips/mosaicing/global_balance.c:1191 #: ../libvips/mosaicing/global_balance.c:1526 #, c-format msgid "unable to open \"%s\"" msgstr "" #: ../libvips/foreign/fits.c:244 msgid "dimensions above 3 must be size 1" msgstr "" #: ../libvips/foreign/fits.c:260 #, c-format msgid "bad number of axis %d" msgstr "" #: ../libvips/foreign/fits.c:276 #, c-format msgid "unsupported bitpix %d\n" msgstr "" #: ../libvips/foreign/fits.c:580 ../libvips/iofuncs/vips.c:176 #, c-format msgid "unable to write to \"%s\"" msgstr "" #: ../libvips/foreign/fits.c:641 #, c-format msgid "unsupported BandFmt %d\n" msgstr "" #: ../libvips/foreign/matlab.c:115 #, c-format msgid "no matrix variables in \"%s\"" msgstr "" #: ../libvips/foreign/matlab.c:175 #, c-format msgid "unsupported rank %d\n" msgstr "" #: ../libvips/foreign/matlab.c:188 #, c-format msgid "unsupported class type %d\n" msgstr "" #: ../libvips/foreign/matlab.c:236 msgid "Mat_VarReadDataAll failed" msgstr "" #: ../libvips/foreign/csvload.c:122 msgid "load csv from file" msgstr "" #: ../libvips/foreign/csvload.c:140 msgid "Skip" msgstr "" #: ../libvips/foreign/csvload.c:141 msgid "Skip this many lines at the start of the file" msgstr "" #: ../libvips/foreign/csvload.c:147 msgid "Lines" msgstr "" #: ../libvips/foreign/csvload.c:148 msgid "Read this many lines from the file" msgstr "" #: ../libvips/foreign/csvload.c:154 msgid "Whitespace" msgstr "" #: ../libvips/foreign/csvload.c:155 msgid "Set of whitespace characters" msgstr "" #: ../libvips/foreign/csvload.c:162 msgid "Set of separator characters" msgstr "" #: ../libvips/foreign/jpegload.c:109 #, c-format msgid "bad shrink factor %d" msgstr "" #: ../libvips/foreign/jpegload.c:131 msgid "load jpeg" msgstr "" #: ../libvips/foreign/jpegload.c:137 msgid "Shrink" msgstr "" #: ../libvips/foreign/jpegload.c:138 msgid "Shrink factor on load" msgstr "" #: ../libvips/foreign/jpegload.c:144 msgid "Fail" msgstr "" #: ../libvips/foreign/jpegload.c:145 msgid "Fail on first warning" msgstr "" #: ../libvips/foreign/jpegload.c:226 msgid "load jpeg from file" msgstr "" #: ../libvips/foreign/jpegload.c:302 msgid "load jpeg from buffer" msgstr "" #: ../libvips/foreign/jpegload.c:309 ../libvips/foreign/webpload.c:241 #: ../libvips/foreign/pngload.c:206 msgid "Buffer to load from" msgstr "" #: ../libvips/foreign/magickload.c:134 msgid "load file with ImageMagick" msgstr "" #: ../libvips/foreign/magickload.c:156 msgid "all_frames" msgstr "" #: ../libvips/foreign/magickload.c:157 msgid "Read all frames from an image" msgstr "" #: ../libvips/foreign/webpload.c:87 msgid "load webp" msgstr "" #: ../libvips/foreign/webpload.c:161 msgid "load webp from file" msgstr "" #: ../libvips/foreign/webpload.c:234 msgid "load webp from buffer" msgstr "" #: ../libvips/foreign/matload.c:119 msgid "load mat from file" msgstr "" #: ../libvips/foreign/tiff2vips.c:302 ../libvips/foreign/tiff2vips.c:320 #, c-format msgid "required field %d missing" msgstr "" #: ../libvips/foreign/tiff2vips.c:334 #, c-format msgid "not %d bands" msgstr "" #: ../libvips/foreign/tiff2vips.c:348 #, c-format msgid "not at least %d samples per pixel" msgstr "" #: ../libvips/foreign/tiff2vips.c:361 #, c-format msgid "not photometric interpretation %d" msgstr "" #: ../libvips/foreign/tiff2vips.c:374 #, c-format msgid "not %d bits per sample" msgstr "" #: ../libvips/foreign/tiff2vips.c:389 #, c-format msgid "%d bits per sample palette image not supported" msgstr "" #: ../libvips/foreign/tiff2vips.c:443 msgid "unsupported tiff image type\n" msgstr "" #: ../libvips/foreign/tiff2vips.c:755 msgid "bad colormap" msgstr "" #: ../libvips/foreign/tiff2vips.c:878 msgid "unknown resolution unit" msgstr "" #: ../libvips/foreign/tiff2vips.c:883 #, c-format msgid "" "no resolution information for TIFF image \"%s\" -- defaulting to 1 pixel per " "mm" msgstr "" #: ../libvips/foreign/tiff2vips.c:987 msgid "width/height out of range" msgstr "" #: ../libvips/foreign/tiff2vips.c:996 msgid "samples out of range" msgstr "" #: ../libvips/foreign/tiff2vips.c:1211 msgid "tiled separate planes not supported" msgstr "" #: ../libvips/foreign/tiff2vips.c:1242 ../libvips/foreign/tiff2vips.c:1479 msgid "unsupported tiff image type" msgstr "" #: ../libvips/foreign/tiff2vips.c:1282 msgid "read error" msgstr "" #: ../libvips/foreign/tiff2vips.c:1563 #, c-format msgid "bad page number %d" msgstr "" #: ../libvips/foreign/tiff2vips.c:1638 ../libvips/foreign/tiff2vips.c:1667 #, c-format msgid "TIFF file does not contain page %d" msgstr "" #: ../libvips/foreign/openexr2vips.c:116 #, c-format msgid "EXR error: %s" msgstr "" #: ../libvips/foreign/foreign.c:378 msgid "load and save image files" msgstr "" #: ../libvips/foreign/foreign.c:519 ../libvips/mosaicing/im_remosaic.c:77 #, c-format msgid "file \"%s\" not found" msgstr "" #: ../libvips/foreign/foreign.c:528 ../libvips/foreign/foreign.c:1039 #, c-format msgid "\"%s\" is not a known file format" msgstr "" #: ../libvips/foreign/foreign.c:734 msgid "images do not match" msgstr "" #: ../libvips/foreign/foreign.c:827 msgid "" "VIPS_FOREIGN_PARTIAL and VIPS_FOREIGN_SEQUENTIAL both set -- using SEQUENTIAL" msgstr "" #: ../libvips/foreign/foreign.c:847 msgid "ignoring deprecated \"sequential\" mode" msgstr "" #: ../libvips/foreign/foreign.c:849 msgid "please use \"access\" instead" msgstr "" #: ../libvips/foreign/foreign.c:927 msgid "file loaders" msgstr "" #: ../libvips/foreign/foreign.c:938 msgid "Flags" msgstr "" #: ../libvips/foreign/foreign.c:939 msgid "Flags for this file" msgstr "" #: ../libvips/foreign/foreign.c:945 msgid "Disc" msgstr "" #: ../libvips/foreign/foreign.c:946 msgid "Open to disc" msgstr "" #: ../libvips/foreign/foreign.c:953 msgid "Required access pattern for this file" msgstr "" #: ../libvips/foreign/foreign.c:959 msgid "Sequential" msgstr "" #: ../libvips/foreign/foreign.c:960 msgid "Sequential read only" msgstr "" #: ../libvips/foreign/foreign.c:1407 msgid "file savers" msgstr "" #: ../libvips/foreign/foreign.c:1429 msgid "Image to save" msgstr "" #: ../libvips/foreign/foreign.c:1434 msgid "Strip" msgstr "" #: ../libvips/foreign/foreign.c:1435 msgid "Strip all metadata from image" msgstr "" #: ../libvips/foreign/webp2vips.c:228 ../libvips/foreign/magick2vips.c:638 msgid "unable to read pixels" msgstr "" #: ../libvips/foreign/webp2vips.c:264 ../libvips/foreign/webp2vips.c:283 msgid "unable to open buffer" msgstr "" #: ../libvips/foreign/jpegsave.c:121 msgid "save jpeg" msgstr "" #: ../libvips/foreign/jpegsave.c:134 msgid "Profile" msgstr "" #: ../libvips/foreign/jpegsave.c:135 ../libvips/foreign/tiffsave.c:188 msgid "ICC profile to embed" msgstr "" #: ../libvips/foreign/jpegsave.c:141 msgid "Optimize_coding" msgstr "" #: ../libvips/foreign/jpegsave.c:142 msgid "Compute optimal Huffman coding tables" msgstr "" #: ../libvips/foreign/jpegsave.c:148 ../libvips/foreign/pngsave.c:113 msgid "Interlace" msgstr "" #: ../libvips/foreign/jpegsave.c:149 msgid "Generate an interlaced (progressive) jpeg" msgstr "" #: ../libvips/foreign/jpegsave.c:155 msgid "No subsample" msgstr "" #: ../libvips/foreign/jpegsave.c:156 msgid "Disable chroma subsample" msgstr "" #: ../libvips/foreign/jpegsave.c:213 msgid "save image to jpeg file" msgstr "" #: ../libvips/foreign/jpegsave.c:283 msgid "save image to jpeg buffer" msgstr "" #: ../libvips/foreign/jpegsave.c:347 msgid "save image to jpeg mime" msgstr "" #: ../libvips/foreign/dzsave.c:373 #, c-format msgid "Directory \"%s\" exists" msgstr "" #: ../libvips/foreign/dzsave.c:1200 msgid "overlap must be less than tile width and height" msgstr "" #: ../libvips/foreign/dzsave.c:1357 msgid "save image to deep zoom format" msgstr "" #: ../libvips/foreign/dzsave.c:1374 msgid "Layout" msgstr "" #: ../libvips/foreign/dzsave.c:1375 msgid "Directory layout" msgstr "" #: ../libvips/foreign/dzsave.c:1382 msgid "suffix" msgstr "" #: ../libvips/foreign/dzsave.c:1383 msgid "Filename suffix for tiles" msgstr "" #: ../libvips/foreign/dzsave.c:1389 msgid "Overlap" msgstr "" #: ../libvips/foreign/dzsave.c:1390 msgid "Tile overlap in pixels" msgstr "" #: ../libvips/foreign/dzsave.c:1396 msgid "Tile size" msgstr "" #: ../libvips/foreign/dzsave.c:1397 msgid "Tile size in pixels" msgstr "" #: ../libvips/foreign/dzsave.c:1411 msgid "Pyramid depth" msgstr "" #: ../libvips/foreign/dzsave.c:1418 msgid "Center" msgstr "" #: ../libvips/foreign/dzsave.c:1419 msgid "Center image in tile" msgstr "" #: ../libvips/foreign/dzsave.c:1426 msgid "Rotate image during save" msgstr "" #: ../libvips/foreign/dzsave.c:1435 ../libvips/foreign/dzsave.c:1442 msgid "Base name" msgstr "" #: ../libvips/foreign/dzsave.c:1436 ../libvips/foreign/dzsave.c:1443 msgid "Base name to save to" msgstr "" #: ../libvips/foreign/openslide2vips.c:158 msgid "invalid associated image name" msgstr "" #: ../libvips/foreign/openslide2vips.c:175 msgid "specify only one of level or associated image" msgstr "" #: ../libvips/foreign/openslide2vips.c:196 msgid "unsupported slide format" msgstr "" #: ../libvips/foreign/openslide2vips.c:203 #, c-format msgid "opening slide: %s" msgstr "" #: ../libvips/foreign/openslide2vips.c:210 msgid "invalid slide level" msgstr "" #: ../libvips/foreign/openslide2vips.c:257 #, c-format msgid "getting dimensions: %s" msgstr "" #: ../libvips/foreign/openslide2vips.c:264 msgid "image dimensions overflow int" msgstr "" #: ../libvips/foreign/openslide2vips.c:334 #, c-format msgid "reading region: %s" msgstr "" #: ../libvips/foreign/openslide2vips.c:440 #, c-format msgid "reading associated image: %s" msgstr "" #: ../libvips/foreign/analyze2vips.c:309 msgid "header file size incorrect" msgstr "" #: ../libvips/foreign/analyze2vips.c:354 msgid "header size incorrect" msgstr "" #: ../libvips/foreign/analyze2vips.c:372 #, c-format msgid "%d-dimensional images not supported" msgstr "" #: ../libvips/foreign/analyze2vips.c:425 #, c-format msgid "datatype %d not supported" msgstr "" #: ../libvips/foreign/ppmsave.c:110 msgid "save image to ppm file" msgstr "" #: ../libvips/foreign/ppmsave.c:126 msgid "ASCII" msgstr "" #: ../libvips/foreign/ppmsave.c:127 msgid "save as ascii" msgstr "" #: ../libvips/foreign/tiffsave.c:148 msgid "save image to tiff file" msgstr "" #: ../libvips/foreign/tiffsave.c:164 ../libvips/foreign/pngsave.c:106 msgid "Compression" msgstr "" #: ../libvips/foreign/tiffsave.c:165 msgid "Compression for this file" msgstr "" #: ../libvips/foreign/tiffsave.c:179 msgid "predictor" msgstr "" #: ../libvips/foreign/tiffsave.c:180 msgid "Compression prediction" msgstr "" #: ../libvips/foreign/tiffsave.c:187 msgid "profile" msgstr "" #: ../libvips/foreign/tiffsave.c:194 msgid "Tile" msgstr "" #: ../libvips/foreign/tiffsave.c:195 msgid "Write a tiled tiff" msgstr "" #: ../libvips/foreign/tiffsave.c:215 msgid "Pyramid" msgstr "" #: ../libvips/foreign/tiffsave.c:216 msgid "Write a pyramidal tiff" msgstr "" #: ../libvips/foreign/tiffsave.c:222 msgid "Squash" msgstr "" #: ../libvips/foreign/tiffsave.c:223 msgid "Squash images down to 1 bit" msgstr "" #: ../libvips/foreign/tiffsave.c:229 ../libvips/foreign/tiffsave.c:230 msgid "Resolution unit" msgstr "" #: ../libvips/foreign/tiffsave.c:251 msgid "Bigtiff" msgstr "" #: ../libvips/foreign/tiffsave.c:252 msgid "Write a bigtiff image" msgstr "" #: ../libvips/foreign/tiffsave.c:258 msgid "RGB JPEG" msgstr "" #: ../libvips/foreign/tiffsave.c:259 msgid "Output RGB JPEG rather than YCbCr" msgstr "" #: ../libvips/foreign/matrixsave.c:112 msgid "save image to matrix file" msgstr "" #: ../libvips/foreign/matrixsave.c:192 msgid "print matrix" msgstr "" #: ../libvips/foreign/fitssave.c:120 msgid "save image to fits file" msgstr "" #: ../libvips/foreign/csv.c:194 #, c-format msgid "error parsing number, line %d, column %d" msgstr "" #: ../libvips/foreign/csv.c:249 msgid "end of file while skipping start" msgstr "" #: ../libvips/foreign/csv.c:258 ../libvips/iofuncs/util.c:1089 #: ../libvips/iofuncs/util.c:1095 msgid "unable to seek" msgstr "" #: ../libvips/foreign/csv.c:269 msgid "empty line" msgstr "" #: ../libvips/foreign/csv.c:309 #, c-format msgid "unexpected EOF, line %d col %d" msgstr "" #: ../libvips/foreign/csv.c:315 #, c-format msgid "unexpected EOL, line %d col %d" msgstr "" #: ../libvips/foreign/csv.c:530 msgid "no width / height" msgstr "" #: ../libvips/foreign/csv.c:535 msgid "width / height not int" msgstr "" #: ../libvips/foreign/csv.c:545 msgid "width / height out of range" msgstr "" #: ../libvips/foreign/csv.c:549 msgid "bad scale / offset" msgstr "" #: ../libvips/foreign/csv.c:553 msgid "extra chars in header" msgstr "" #: ../libvips/foreign/csv.c:558 msgid "zero scale" msgstr "" #: ../libvips/foreign/csv.c:606 msgid "line too short" msgstr "" #: ../libvips/foreign/csv.c:650 #, c-format msgid "line %d too short" msgstr "" #: ../libvips/foreign/pngload.c:126 msgid "load png from file" msgstr "" #: ../libvips/foreign/pngload.c:199 msgid "load png from buffer" msgstr "" #: ../libvips/foreign/fitsload.c:108 msgid "load a FITS image" msgstr "" #: ../libvips/foreign/vipsload.c:122 msgid "load vips from file" msgstr "" #: ../libvips/foreign/vipspng.c:275 msgid "unsupported color type" msgstr "" #: ../libvips/foreign/vipspng.c:385 msgid "unable to read PNG header" msgstr "" #: ../libvips/foreign/vipspng.c:748 msgid "compress should be in [0,9]" msgstr "" #: ../libvips/foreign/vipspng.c:855 #, c-format msgid "unable to write \"%s\"" msgstr "" #: ../libvips/foreign/vipspng.c:958 msgid "unable to write to buffer" msgstr "" #: ../libvips/foreign/tiffload.c:139 msgid "load tiff from file" msgstr "" #: ../libvips/foreign/tiffload.c:158 msgid "Page" msgstr "" #: ../libvips/foreign/tiffload.c:159 msgid "Load this page from the file" msgstr "" #: ../libvips/foreign/magick2vips.c:220 #, c-format msgid "unsupported image type %d" msgstr "" #: ../libvips/foreign/magick2vips.c:282 #, c-format msgid "unsupported bit depth %d" msgstr "" #: ../libvips/foreign/magick2vips.c:314 #, c-format msgid "unsupported colorspace %d" msgstr "" #: ../libvips/foreign/magick2vips.c:678 #, c-format msgid "" "unable to read file \"%s\"\n" "libMagick error: %s %s" msgstr "" #: ../libvips/foreign/magick2vips.c:717 #, c-format msgid "" "unable to ping file \"%s\"\n" "libMagick error: %s %s" msgstr "" #: ../libvips/foreign/magick2vips.c:728 msgid "bad image size" msgstr "" #: ../libvips/foreign/analyzeload.c:115 msgid "load an Analyze6 image" msgstr "" #: ../libvips/foreign/ppm.c:108 msgid "bad int" msgstr "" #: ../libvips/foreign/ppm.c:120 msgid "bad float" msgstr "" #: ../libvips/foreign/ppm.c:171 msgid "bad magic number" msgstr "" #: ../libvips/foreign/ppm.c:221 msgid "not whitespace before start of binary data" msgstr "" #: ../libvips/foreign/ppm.c:602 ../libvips/foreign/ppm.c:614 msgid "write error ... disc full?" msgstr "" #: ../libvips/foreign/ppm.c:719 msgid "binary >8 bit images must be float" msgstr "" #: ../libvips/foreign/openslideload.c:159 msgid "load file with OpenSlide" msgstr "" #: ../libvips/foreign/openslideload.c:183 msgid "Level" msgstr "" #: ../libvips/foreign/openslideload.c:184 msgid "Load this level from the file" msgstr "" #: ../libvips/foreign/openslideload.c:190 msgid "Associated" msgstr "" #: ../libvips/foreign/openslideload.c:191 msgid "Load this associated image" msgstr "" #: ../libvips/foreign/pngsave.c:98 msgid "save png" msgstr "" #: ../libvips/foreign/pngsave.c:107 msgid "Compression factor" msgstr "" #: ../libvips/foreign/pngsave.c:114 msgid "Interlace image" msgstr "" #: ../libvips/foreign/pngsave.c:165 msgid "save image to png file" msgstr "" #: ../libvips/foreign/pngsave.c:227 msgid "save image to png buffer" msgstr "" #: ../libvips/foreign/radload.c:118 msgid "load a Radiance image from a file" msgstr "" #: ../libvips/foreign/ppmload.c:115 msgid "load ppm from file" msgstr "" #: ../libvips/freqfilt/phasecor.c:108 msgid "calculate phase correlation" msgstr "" #: ../libvips/freqfilt/fwfft.c:135 ../libvips/freqfilt/fwfft.c:249 #: ../libvips/freqfilt/invfft.c:118 ../libvips/freqfilt/invfft.c:191 msgid "unable to create transform plan" msgstr "" #: ../libvips/freqfilt/fwfft.c:324 msgid "forward FFT" msgstr "" #: ../libvips/freqfilt/freqmult.c:127 msgid "frequency-domain filtering" msgstr "" #: ../libvips/freqfilt/freqmult.c:131 msgid "mask" msgstr "" #: ../libvips/freqfilt/freqmult.c:132 msgid "Input mask image" msgstr "" #: ../libvips/freqfilt/freqfilt.c:94 msgid "frequency-domain filter operations" msgstr "" #: ../libvips/freqfilt/invfft.c:241 msgid "inverse FFT" msgstr "" #: ../libvips/freqfilt/invfft.c:245 msgid "Real" msgstr "" #: ../libvips/freqfilt/invfft.c:246 msgid "Ouput only the real part of the transform" msgstr "" #: ../libvips/freqfilt/spectrum.c:101 msgid "make displayable power spectrum" msgstr "" #: ../libvips/histogram/hist_cum.c:147 msgid "form cumulative histogram" msgstr "" #: ../libvips/histogram/hist_norm.c:137 msgid "normalise histogram" msgstr "" #: ../libvips/histogram/hist_equal.c:104 msgid "histogram equalisation" msgstr "" #: ../libvips/histogram/hist_equal.c:121 msgid "Equalise with this band" msgstr "" #: ../libvips/histogram/maplut.c:677 msgid "map an image though a lut" msgstr "" #: ../libvips/histogram/maplut.c:695 msgid "LUT" msgstr "" #: ../libvips/histogram/maplut.c:696 msgid "Look-up table image" msgstr "" #: ../libvips/histogram/maplut.c:701 msgid "band" msgstr "" #: ../libvips/histogram/maplut.c:702 msgid "apply one-band lut to this band of in" msgstr "" #: ../libvips/histogram/hist_plot.c:338 msgid "plot histogram" msgstr "" #: ../libvips/histogram/stdif.c:232 ../libvips/histogram/hist_local.c:244 #: ../libvips/morphology/rank.c:348 msgid "window too large" msgstr "" #: ../libvips/histogram/stdif.c:236 msgid "too many bands" msgstr "" #: ../libvips/histogram/stdif.c:284 msgid "statistical difference" msgstr "" #: ../libvips/histogram/stdif.c:303 ../libvips/histogram/hist_local.c:309 #: ../libvips/morphology/rank.c:412 msgid "Window width in pixels" msgstr "" #: ../libvips/histogram/stdif.c:310 ../libvips/histogram/hist_local.c:316 #: ../libvips/morphology/rank.c:419 msgid "Window height in pixels" msgstr "" #: ../libvips/histogram/stdif.c:316 msgid "Mean weight" msgstr "" #: ../libvips/histogram/stdif.c:317 msgid "Weight of new mean" msgstr "" #: ../libvips/histogram/stdif.c:324 msgid "New mean" msgstr "" #: ../libvips/histogram/stdif.c:330 msgid "Deviation weight" msgstr "" #: ../libvips/histogram/stdif.c:331 msgid "Weight of new deviation" msgstr "" #: ../libvips/histogram/stdif.c:337 msgid "Deviation" msgstr "" #: ../libvips/histogram/stdif.c:338 msgid "New deviation" msgstr "" #: ../libvips/histogram/hist_local.c:292 msgid "local histogram equalisation" msgstr "" #: ../libvips/histogram/histogram.c:214 msgid "histogram operations" msgstr "" #: ../libvips/histogram/hist_match.c:154 msgid "match two histograms" msgstr "" #: ../libvips/histogram/hist_match.c:162 msgid "Input histogram" msgstr "" #: ../libvips/histogram/hist_match.c:167 msgid "Reference" msgstr "" #: ../libvips/histogram/hist_match.c:168 msgid "Reference histogram" msgstr "" #: ../libvips/histogram/hist_unary.c:85 msgid "hist_unary operations" msgstr "" #: ../libvips/histogram/hist_ismonotonic.c:113 msgid "test for monotonicity" msgstr "" #: ../libvips/histogram/hist_ismonotonic.c:118 msgid "Input histogram image" msgstr "" #: ../libvips/histogram/hist_ismonotonic.c:123 msgid "Monotonic" msgstr "" #: ../libvips/histogram/hist_ismonotonic.c:124 msgid "true if in is monotonic" msgstr "" #: ../libvips/histogram/percent.c:106 msgid "find threshold for percent of pixels" msgstr "" #: ../libvips/histogram/percent.c:116 msgid "Percent" msgstr "" #: ../libvips/histogram/percent.c:117 msgid "Percent of pixels" msgstr "" #: ../libvips/histogram/percent.c:123 msgid "Threshold" msgstr "" #: ../libvips/histogram/percent.c:124 msgid "Threshold above which lie percent of pixels" msgstr "" #: ../libvips/inplace/im_draw_line.c:390 msgid "mask image not 1 band 8 bit uncoded" msgstr "" #: ../libvips/inplace/im_draw_line.c:396 msgid "ink image does not match in image" msgstr "" #: ../libvips/inplace/im_draw_line.c:400 msgid "ink image not 1x1 pixels" msgstr "" #: ../libvips/inplace/inplace_dispatch.c:172 msgid "vectors not same length" msgstr "" #: ../libvips/iofuncs/window.c:237 ../libvips/iofuncs/vips.c:985 #, c-format msgid "unable to read data for \"%s\", %s" msgstr "" #: ../libvips/iofuncs/window.c:238 ../libvips/iofuncs/vips.c:781 #: ../libvips/iofuncs/vips.c:986 msgid "file has been truncated" msgstr "" #: ../libvips/iofuncs/base64.c:169 msgid "too little data" msgstr "" #. We shouldn't really be used for large amounts of data. #. #: ../libvips/iofuncs/base64.c:175 ../libvips/iofuncs/base64.c:240 msgid "too much data" msgstr "" #: ../libvips/iofuncs/type.c:657 #, c-format msgid "unable to convert \"%s\" to int" msgstr "" #: ../libvips/iofuncs/type.c:745 #, c-format msgid "unable to convert \"%s\" to float" msgstr "" #: ../libvips/iofuncs/memory.c:236 msgid "vips_free: too many frees" msgstr "" #: ../libvips/iofuncs/memory.c:239 msgid "vips_free: too much free" msgstr "" #: ../libvips/iofuncs/memory.c:295 ../libvips/iofuncs/memory.c:298 #, c-format msgid "out of memory --- size == %dMB" msgstr "" #: ../libvips/iofuncs/vips.c:291 #, c-format msgid "\"%s\" is not a VIPS image" msgstr "" #: ../libvips/iofuncs/vips.c:379 msgid "unable to read history" msgstr "" #: ../libvips/iofuncs/vips.c:412 msgid "more than a 10 megabytes of XML? sufferin' succotash!" msgstr "" #: ../libvips/iofuncs/vips.c:460 msgid "incorrect namespace in XML" msgstr "" #: ../libvips/iofuncs/vips.c:584 msgid "error transforming from save format" msgstr "" #: ../libvips/iofuncs/vips.c:685 #, c-format msgid "unable to set property \"%s\" to value \"%s\"." msgstr "" #: ../libvips/iofuncs/vips.c:733 msgid "error transforming to save format" msgstr "" #: ../libvips/iofuncs/vips.c:895 ../libvips/iofuncs/vips.c:904 #: ../libvips/iofuncs/vips.c:927 msgid "xml save error" msgstr "" #: ../libvips/iofuncs/vips.c:972 #, c-format msgid "unable to read header for \"%s\"" msgstr "" #: ../libvips/iofuncs/vips.c:997 #, c-format msgid "error reading XML: %s" msgstr "" #: ../libvips/iofuncs/init.c:487 msgid "show informative messages" msgstr "" #: ../libvips/iofuncs/init.c:490 msgid "abort on first error or warning" msgstr "" #: ../libvips/iofuncs/init.c:493 msgid "evaluate with N concurrent threads" msgstr "" #: ../libvips/iofuncs/init.c:496 msgid "set tile width to N (DEBUG)" msgstr "" #: ../libvips/iofuncs/init.c:499 msgid "set tile height to N (DEBUG)" msgstr "" #: ../libvips/iofuncs/init.c:502 msgid "set thinstrip height to N (DEBUG)" msgstr "" #: ../libvips/iofuncs/init.c:505 msgid "set fatstrip height to N (DEBUG)" msgstr "" #: ../libvips/iofuncs/init.c:508 msgid "show progress feedback" msgstr "" #: ../libvips/iofuncs/init.c:511 msgid "leak-check on exit" msgstr "" #: ../libvips/iofuncs/init.c:514 msgid "profile and dump timing on exit" msgstr "" #: ../libvips/iofuncs/init.c:517 msgid "images larger than N are decompressed to disc" msgstr "" #: ../libvips/iofuncs/init.c:520 msgid "disable vectorised versions of operations" msgstr "" #: ../libvips/iofuncs/init.c:523 msgid "cache at most N operations" msgstr "" #: ../libvips/iofuncs/init.c:526 msgid "cache at most N bytes in memory" msgstr "" #: ../libvips/iofuncs/init.c:529 msgid "allow at most N open files" msgstr "" #: ../libvips/iofuncs/init.c:532 msgid "trace operation cache" msgstr "" #: ../libvips/iofuncs/init.c:535 msgid "dump operation cache on exit" msgstr "" #: ../libvips/iofuncs/init.c:538 msgid "print libvips version" msgstr "" #: ../libvips/iofuncs/init.c:561 msgid "VIPS Options" msgstr "" #: ../libvips/iofuncs/init.c:561 msgid "Show VIPS options" msgstr "" #: ../libvips/iofuncs/sinkmemory.c:109 msgid "per-thread state for sinkmemory" msgstr "" #. File length unit. #. #: ../libvips/iofuncs/buf.c:521 msgid "bytes" msgstr "" #. Kilo byte unit. #. #: ../libvips/iofuncs/buf.c:525 msgid "KB" msgstr "" #. Mega byte unit. #. #: ../libvips/iofuncs/buf.c:529 msgid "MB" msgstr "" #. Giga byte unit. #. #: ../libvips/iofuncs/buf.c:533 msgid "GB" msgstr "" #. Tera byte unit. #. #: ../libvips/iofuncs/buf.c:537 msgid "TB" msgstr "" #: ../libvips/iofuncs/system.c:160 #, c-format msgid "command failed: \"%s\"" msgstr "" #: ../libvips/iofuncs/system.c:188 msgid "run an external command" msgstr "" #: ../libvips/iofuncs/system.c:204 msgid "Command" msgstr "" #: ../libvips/iofuncs/system.c:205 msgid "Command to run" msgstr "" #: ../libvips/iofuncs/system.c:211 msgid "Input format" msgstr "" #: ../libvips/iofuncs/system.c:212 msgid "Format for input filename" msgstr "" #: ../libvips/iofuncs/system.c:218 msgid "Output format" msgstr "" #: ../libvips/iofuncs/system.c:219 msgid "Format for output filename" msgstr "" #: ../libvips/iofuncs/system.c:226 msgid "Command log" msgstr "" #: ../libvips/iofuncs/threadpool.c:209 msgid "unable to create thread" msgstr "" #: ../libvips/iofuncs/threadpool.c:342 #, c-format msgid "threads clipped to %d" msgstr "" #: ../libvips/iofuncs/threadpool.c:406 msgid "per-thread state for vipsthreadpool" msgstr "" #: ../libvips/iofuncs/operation.c:104 #, c-format msgid "%d pixels calculated" msgstr "" #: ../libvips/iofuncs/operation.c:324 msgid "operations" msgstr "" #: ../libvips/iofuncs/operation.c:366 msgid "usage:" msgstr "" #: ../libvips/iofuncs/operation.c:380 ../libvips/iofuncs/object.c:1279 #: ../libvips/resample/interpolate.c:611 #, c-format msgid "class \"%s\" not found" msgstr "" #: ../libvips/iofuncs/operation.c:761 #, c-format msgid "unknown argument '%s'" msgstr "" #: ../libvips/iofuncs/operation.c:879 msgid "too few arguments" msgstr "" #: ../libvips/iofuncs/operation.c:1000 msgid "too many arguments" msgstr "" #: ../libvips/iofuncs/header.c:211 #, c-format msgid "unknown band format %d" msgstr "" #: ../libvips/iofuncs/header.c:868 #, c-format msgid "field \"%s\" not found" msgstr "" #: ../libvips/iofuncs/header.c:1036 #, c-format msgid "field \"%s\" is of type %s, not %s" msgstr "" #: ../libvips/iofuncs/error.c:269 msgid "windows error" msgstr "" #: ../libvips/iofuncs/error.c:278 msgid "unix error" msgstr "" #: ../libvips/iofuncs/error.c:370 ../libvips/iofuncs/error.c:372 #: ../libvips/iofuncs/error.c:422 ../libvips/iofuncs/error.c:424 #, c-format msgid "%s: " msgstr "" #: ../libvips/iofuncs/error.c:370 msgid "info" msgstr "" #: ../libvips/iofuncs/error.c:422 msgid "vips warning" msgstr "" #: ../libvips/iofuncs/error.c:513 msgid "image must be uncoded" msgstr "" #: ../libvips/iofuncs/error.c:541 msgid "image coding must be 'none' or 'labq'" msgstr "" #: ../libvips/iofuncs/error.c:569 msgid "unknown image coding" msgstr "" #: ../libvips/iofuncs/error.c:594 #, c-format msgid "coding '%s' only" msgstr "" #: ../libvips/iofuncs/error.c:619 msgid "image must one band" msgstr "" #: ../libvips/iofuncs/error.c:644 #, c-format msgid "image must have %d bands" msgstr "" #: ../libvips/iofuncs/error.c:669 msgid "image must have one or three bands" msgstr "" #: ../libvips/iofuncs/error.c:695 #, c-format msgid "image must have at least %d bands" msgstr "" #: ../libvips/iofuncs/error.c:723 msgid "images must have the same number of bands, or one must be single-band" msgstr "" #: ../libvips/iofuncs/error.c:750 #, c-format msgid "image must have 1 or %d bands" msgstr "" #: ../libvips/iofuncs/error.c:774 msgid "image must be non-complex" msgstr "" #: ../libvips/iofuncs/error.c:798 msgid "image must be complex" msgstr "" #: ../libvips/iofuncs/error.c:824 #, c-format msgid "image must be %s" msgstr "" #: ../libvips/iofuncs/error.c:849 msgid "image must be integer" msgstr "" #: ../libvips/iofuncs/error.c:874 msgid "image must be unsigned integer" msgstr "" #: ../libvips/iofuncs/error.c:902 msgid "image must be 8- or 16-bit integer, signed or unsigned" msgstr "" #: ../libvips/iofuncs/error.c:929 msgid "image must be 8- or 16-bit unsigned integer" msgstr "" #: ../libvips/iofuncs/error.c:955 msgid "image must be 8- or 16-bit unsigned integer, or float" msgstr "" #: ../libvips/iofuncs/error.c:983 msgid "image must be unsigned int or float" msgstr "" #: ../libvips/iofuncs/error.c:1008 msgid "images must match in size" msgstr "" #: ../libvips/iofuncs/error.c:1034 msgid "images must be odd and square" msgstr "" #: ../libvips/iofuncs/error.c:1060 msgid "images must have the same number of bands" msgstr "" #: ../libvips/iofuncs/error.c:1114 msgid "images must have the same band format" msgstr "" #: ../libvips/iofuncs/error.c:1140 msgid "images must have the same coding" msgstr "" #: ../libvips/iofuncs/error.c:1163 #, c-format msgid "vector must have %d elements" msgstr "" #: ../libvips/iofuncs/error.c:1188 #, c-format msgid "vector must have 1 or %d elements" msgstr "" #: ../libvips/iofuncs/error.c:1213 msgid "histograms must have width or height 1" msgstr "" #: ../libvips/iofuncs/error.c:1218 msgid "histograms must have not have more than 65536 elements" msgstr "" #: ../libvips/iofuncs/error.c:1252 msgid "matrix image too large" msgstr "" #: ../libvips/iofuncs/error.c:1257 msgid "matrix image must have one band" msgstr "" #: ../libvips/iofuncs/error.c:1288 msgid "separable matrix images must have width or height 1" msgstr "" #: ../libvips/iofuncs/error.c:1317 ../libvips/iofuncs/error.c:1345 msgid "nonsense mask parameters" msgstr "" #: ../libvips/iofuncs/error.c:1370 msgid "mask must be 1D" msgstr "" #: ../libvips/iofuncs/sinkdisc.c:122 msgid "per-thread state for sinkdisc" msgstr "" #: ../libvips/iofuncs/sinkdisc.c:261 ../libvips/iofuncs/util.c:669 msgid "write failed" msgstr "" #: ../libvips/iofuncs/sink.c:106 #, c-format msgid "stop function failed for image \"%s\"" msgstr "" #: ../libvips/iofuncs/sink.c:143 #, c-format msgid "start function failed for image \"%s\"" msgstr "" #: ../libvips/iofuncs/sink.c:176 msgid "per-thread state for sink" msgstr "" #: ../libvips/iofuncs/generate.c:410 msgid "too many images" msgstr "" #: ../libvips/iofuncs/generate.c:673 msgid "demand hint not set" msgstr "" #: ../libvips/iofuncs/generate.c:692 ../libvips/iofuncs/generate.c:717 msgid "generate() called twice" msgstr "" #: ../libvips/iofuncs/generate.c:749 ../libvips/iofuncs/image.c:2172 #, c-format msgid "unable to output to a %s image" msgstr "" #: ../libvips/iofuncs/region.c:231 #, c-format msgid "start function failed for image %s" msgstr "" #: ../libvips/iofuncs/region.c:579 ../libvips/iofuncs/region.c:651 #: ../libvips/iofuncs/region.c:799 ../libvips/iofuncs/region.c:1298 msgid "valid clipped to nothing" msgstr "" #: ../libvips/iofuncs/region.c:696 msgid "bad image type" msgstr "" #: ../libvips/iofuncs/region.c:741 msgid "no pixel data on attached image" msgstr "" #: ../libvips/iofuncs/region.c:747 msgid "images do not match in pixel size" msgstr "" #: ../libvips/iofuncs/region.c:780 ../libvips/iofuncs/region.c:1280 msgid "dest too small" msgstr "" #: ../libvips/iofuncs/region.c:869 msgid "bad position" msgstr "" #: ../libvips/iofuncs/region.c:1159 ../libvips/iofuncs/region.c:1351 #, c-format msgid "unable to input from a %s image" msgstr "" #: ../libvips/iofuncs/region.c:1183 msgid "incomplete header" msgstr "" #: ../libvips/iofuncs/region.c:1254 msgid "inappropriate region type" msgstr "" #: ../libvips/iofuncs/mapfile.c:131 ../libvips/iofuncs/mapfile.c:298 msgid "unable to CreateFileMapping" msgstr "" #: ../libvips/iofuncs/mapfile.c:139 ../libvips/iofuncs/mapfile.c:310 msgid "unable to MapViewOfFile" msgstr "" #: ../libvips/iofuncs/mapfile.c:179 msgid "unable to mmap" msgstr "" #: ../libvips/iofuncs/mapfile.c:180 #, c-format msgid "" "map failed (%s), running very low on system resources, expect a crash soon" msgstr "" #: ../libvips/iofuncs/mapfile.c:197 ../libvips/iofuncs/mapfile.c:304 msgid "unable to UnmapViewOfFile" msgstr "" #: ../libvips/iofuncs/mapfile.c:203 msgid "unable to munmap file" msgstr "" #: ../libvips/iofuncs/mapfile.c:225 msgid "file is less than 64 bytes" msgstr "" #: ../libvips/iofuncs/mapfile.c:230 ../libvips/iofuncs/mapfile.c:264 msgid "unable to get file status" msgstr "" #: ../libvips/iofuncs/mapfile.c:236 msgid "not a regular file" msgstr "" #: ../libvips/iofuncs/mapfile.c:270 msgid "unable to read data" msgstr "" #: ../libvips/iofuncs/mapfile.c:330 #, c-format msgid "unable to mmap: \"%s\" - %s" msgstr "" #: ../libvips/iofuncs/mapfile.c:340 #, c-format msgid "unable to mmap \"%s\" to same address" msgstr "" #: ../libvips/iofuncs/image.c:440 msgid "unable to close fd" msgstr "" #: ../libvips/iofuncs/image.c:520 #, c-format msgid "%dx%d %s, %d band, %s" msgid_plural "%dx%d %s, %d bands, %s" msgstr[0] "" msgstr[1] "" #: ../libvips/iofuncs/image.c:554 #, c-format msgid " %s, %d band, %s" msgid_plural " %s, %d bands, %s" msgstr[0] "" msgstr[1] "" #: ../libvips/iofuncs/image.c:691 #, c-format msgid "%s %s: %d x %d pixels, %d threads, %d x %d tiles, %d lines in buffer" msgstr "" #: ../libvips/iofuncs/image.c:706 #, c-format msgid "%s %s: %d%% complete" msgstr "" #. Spaces at end help to erase the %complete message we overwrite. #. #: ../libvips/iofuncs/image.c:727 #, c-format msgid "%s %s: done in %.3gs \n" msgstr "" #: ../libvips/iofuncs/image.c:889 ../libvips/iofuncs/sinkscreen.c:1065 msgid "bad parameters" msgstr "" #: ../libvips/iofuncs/image.c:917 #, c-format msgid "unable to open \"%s\", file too short" msgstr "" #: ../libvips/iofuncs/image.c:927 #, c-format msgid "%s is longer than expected" msgstr "" #: ../libvips/iofuncs/image.c:945 #, c-format msgid "bad mode \"%s\"" msgstr "" #: ../libvips/iofuncs/image.c:1024 msgid "image class" msgstr "" #: ../libvips/iofuncs/image.c:1122 msgid "Image filename" msgstr "" #: ../libvips/iofuncs/image.c:1128 msgid "Mode" msgstr "" #: ../libvips/iofuncs/image.c:1129 msgid "Open mode" msgstr "" #: ../libvips/iofuncs/image.c:1135 msgid "Kill" msgstr "" #: ../libvips/iofuncs/image.c:1136 msgid "Block evaluation on this image" msgstr "" #: ../libvips/iofuncs/image.c:1142 msgid "Demand style" msgstr "" #: ../libvips/iofuncs/image.c:1143 msgid "Preferred demand style for this image" msgstr "" #: ../libvips/iofuncs/image.c:1156 msgid "Foreign buffer" msgstr "" #: ../libvips/iofuncs/image.c:1157 msgid "Pointer to foreign pixels" msgstr "" #: ../libvips/iofuncs/image.c:1468 #, c-format msgid "killed for image \"%s\"" msgstr "" #: ../libvips/iofuncs/image.c:2114 msgid "bad image descriptor" msgstr "" #: ../libvips/iofuncs/image.c:2236 #, c-format msgid "auto-rewind for %s failed" msgstr "" #: ../libvips/iofuncs/image.c:2292 ../libvips/iofuncs/image.c:2488 #: ../libvips/iofuncs/image.c:2505 msgid "no image data" msgstr "" #: ../libvips/iofuncs/image.c:2360 ../libvips/iofuncs/image.c:2528 msgid "image not readable" msgstr "" #: ../libvips/iofuncs/image.c:2381 ../libvips/iofuncs/image.c:2558 #: ../libvips/iofuncs/image.c:2567 msgid "image already written" msgstr "" #: ../libvips/iofuncs/image.c:2405 ../libvips/iofuncs/image.c:2579 msgid "image not writeable" msgstr "" #: ../libvips/iofuncs/image.c:2452 msgid "bad file type" msgstr "" #: ../libvips/iofuncs/util.c:652 msgid "unable to get file stats" msgstr "" #: ../libvips/iofuncs/util.c:733 #, c-format msgid "unable to open file \"%s\" for reading" msgstr "" #: ../libvips/iofuncs/util.c:755 #, c-format msgid "unable to open file \"%s\" for writing" msgstr "" #: ../libvips/iofuncs/util.c:780 #, c-format msgid "\"%s\" too long" msgstr "" #: ../libvips/iofuncs/util.c:800 msgid "out of memory" msgstr "" #: ../libvips/iofuncs/util.c:827 #, c-format msgid "error reading from file \"%s\"" msgstr "" #: ../libvips/iofuncs/util.c:874 #, c-format msgid "write error (%zd out of %zd blocks written) ... disc full?" msgstr "" #: ../libvips/iofuncs/util.c:1123 ../libvips/iofuncs/util.c:1130 msgid "unable to truncate" msgstr "" #: ../libvips/iofuncs/util.c:1202 #, c-format msgid "unable to create directory \"%s\", %s" msgstr "" #: ../libvips/iofuncs/util.c:1338 msgid "unexpected end of string" msgstr "" #: ../libvips/iofuncs/util.c:1356 #, c-format msgid "expected %s, saw %s" msgstr "" #: ../libvips/iofuncs/util.c:1527 #, c-format msgid "unable to make temporary file %s" msgstr "" #: ../libvips/iofuncs/util.c:1652 msgid "no such enum type" msgstr "" #: ../libvips/iofuncs/util.c:1670 #, c-format msgid "enum '%s' has no member '%s', should be one of: %s" msgstr "" #: ../libvips/iofuncs/sinkscreen.c:178 msgid "per-thread state for render" msgstr "" #: ../libvips/iofuncs/object.c:180 #, c-format msgid "parameter %s not set" msgstr "" #: ../libvips/iofuncs/object.c:538 #, c-format msgid "no property named `%s'" msgstr "" #: ../libvips/iofuncs/object.c:546 #, c-format msgid "no vips argument named `%s'" msgstr "" #: ../libvips/iofuncs/object.c:553 #, c-format msgid "argument `%s' has no instance" msgstr "" #: ../libvips/iofuncs/object.c:1328 msgid "base class" msgstr "" #: ../libvips/iofuncs/object.c:1342 msgid "Nickname" msgstr "" #: ../libvips/iofuncs/object.c:1343 msgid "Class nickname" msgstr "" #: ../libvips/iofuncs/object.c:1349 msgid "Description" msgstr "" #: ../libvips/iofuncs/object.c:1350 msgid "Class description" msgstr "" #: ../libvips/iofuncs/object.c:1510 #, c-format msgid "no value supplied for argument '%s'" msgstr "" #: ../libvips/iofuncs/object.c:1513 #, c-format msgid "no value supplied for argument '%s' ('%s')" msgstr "" #: ../libvips/iofuncs/object.c:1634 ../libvips/iofuncs/object.c:1653 #: ../libvips/iofuncs/object.c:1704 #, c-format msgid "'%s' is not an integer" msgstr "" #: ../libvips/iofuncs/object.c:1670 #, c-format msgid "'%s' is not a double" msgstr "" #: ../libvips/iofuncs/object.c:2037 #, c-format msgid "unable to set '%s'" msgstr "" #: ../libvips/iofuncs/object.c:2045 msgid "not , or ) after parameter" msgstr "" #: ../libvips/iofuncs/object.c:2052 msgid "extra tokens after ')'" msgstr "" #: ../libvips/morphology/countlines.c:131 msgid "count lines in an image" msgstr "" #: ../libvips/morphology/countlines.c:135 msgid "Nolines" msgstr "" #: ../libvips/morphology/countlines.c:136 msgid "Number of lines" msgstr "" #: ../libvips/morphology/countlines.c:143 msgid "Countlines left-right or up-down" msgstr "" #: ../libvips/morphology/rank.c:353 msgid "index out of range" msgstr "" #: ../libvips/morphology/rank.c:401 msgid "rank filter" msgstr "" #: ../libvips/morphology/rank.c:425 msgid "index" msgstr "" #: ../libvips/morphology/rank.c:426 msgid "Select pixel at index" msgstr "" #: ../libvips/morphology/hitmiss.c:314 #, c-format msgid "bad mask element (%d should be 0, 128 or 255)" msgstr "" #: ../libvips/morphology/morphology.c:110 msgid "morphological operations" msgstr "" #: ../libvips/morphology/morph.c:128 msgid "morphology operation" msgstr "" #: ../libvips/morphology/morph.c:144 msgid "Morphology" msgstr "" #: ../libvips/morphology/morph.c:145 msgid "Morphological operation to perform" msgstr "" #: ../libvips/mosaicing/im_tbmosaic.c:90 #: ../libvips/mosaicing/im_lrmosaic.c:114 msgid "bad area parameters" msgstr "" #: ../libvips/mosaicing/im_tbmosaic.c:111 #: ../libvips/mosaicing/im_lrmosaic.c:135 msgid "overlap too small for search" msgstr "" #: ../libvips/mosaicing/im_tbmosaic.c:144 #: ../libvips/mosaicing/im_lrmosaic.c:168 msgid "unknown Coding type" msgstr "" #: ../libvips/mosaicing/im_avgdxdy.c:65 msgid "no points to average" msgstr "" #: ../libvips/mosaicing/im_tbcalcon.c:103 #: ../libvips/mosaicing/im_chkpair.c:205 msgid "help!" msgstr "" #: ../libvips/mosaicing/im_tbcalcon.c:117 msgid "overlap too small" msgstr "" #: ../libvips/mosaicing/im_tbmerge.c:164 ../libvips/mosaicing/im_tbmerge.c:218 #: ../libvips/mosaicing/im_tbmerge.c:536 ../libvips/mosaicing/im_lrmerge.c:214 #: ../libvips/mosaicing/im_lrmerge.c:263 ../libvips/mosaicing/im_lrmerge.c:604 msgid "internal error" msgstr "" #: ../libvips/mosaicing/im_tbmerge.c:635 ../libvips/mosaicing/im_lrmerge.c:804 msgid "unknown coding type" msgstr "" #: ../libvips/mosaicing/im_tbmerge.c:653 ../libvips/mosaicing/im_lrmerge.c:821 msgid "too much overlap" msgstr "" #: ../libvips/mosaicing/im_lrcalcon.c:204 msgid "overlap too small for your search size" msgstr "" #: ../libvips/mosaicing/im_lrcalcon.c:243 #, c-format msgid "found %d tie-points, need at least %d" msgstr "" #: ../libvips/mosaicing/im_lrcalcon.c:288 msgid "not 1-band uchar image" msgstr "" #: ../libvips/mosaicing/im_clinear.c:137 msgid "im_invmat failed" msgstr "" #: ../libvips/mosaicing/im_remosaic.c:105 #, c-format msgid "substitute image \"%s\" is not the same size as \"%s\"" msgstr "" #: ../libvips/mosaicing/im_chkpair.c:201 msgid "inputs incompatible" msgstr "" #: ../libvips/mosaicing/im_lrmerge.c:704 msgid "mwidth must be -1 or >= 0" msgstr "" #: ../libvips/mosaicing/im_lrmerge.c:733 msgid "no overlap" msgstr "" #: ../libvips/mosaicing/global_balance.c:148 msgid "no matching '>'" msgstr "" #: ../libvips/mosaicing/global_balance.c:157 msgid "too many items" msgstr "" #: ../libvips/mosaicing/global_balance.c:451 msgid "circularity detected" msgstr "" #: ../libvips/mosaicing/global_balance.c:485 #: ../libvips/mosaicing/global_balance.c:545 #, c-format msgid "image \"%s\" used twice as output" msgstr "" #: ../libvips/mosaicing/global_balance.c:594 msgid "bad number of args in join line" msgstr "" #: ../libvips/mosaicing/global_balance.c:636 msgid "bad number of args in join1 line" msgstr "" #: ../libvips/mosaicing/global_balance.c:672 msgid "bad number of args in copy line" msgstr "" #: ../libvips/mosaicing/global_balance.c:729 msgid "" "mosaic root not found in desc file\n" "is this really a mosaiced image?" msgstr "" #: ../libvips/mosaicing/global_balance.c:740 msgid "more than one root" msgstr "" #: ../libvips/mosaicing/global_balance.c:1059 msgid "empty overlap!" msgstr "" #: ../libvips/resample/interpolate.c:181 msgid "VIPS interpolators" msgstr "" #: ../libvips/resample/interpolate.c:357 msgid "Nearest-neighbour interpolation" msgstr "" #: ../libvips/resample/interpolate.c:528 msgid "Bilinear interpolation" msgstr "" #: ../libvips/resample/resample.c:86 msgid "resample operations" msgstr "" #: ../libvips/resample/similarity.c:112 msgid "similarity transform of an image" msgstr "" #: ../libvips/resample/similarity.c:116 msgid "Scale" msgstr "" #: ../libvips/resample/similarity.c:117 msgid "Scale by this factor" msgstr "" #: ../libvips/resample/similarity.c:124 msgid "Rotate anticlockwise by this many degrees" msgstr "" #: ../libvips/resample/similarity.c:130 ../libvips/resample/quadratic.c:354 #: ../libvips/resample/affine.c:543 msgid "Interpolate" msgstr "" #: ../libvips/resample/similarity.c:131 ../libvips/resample/affine.c:544 msgid "Interpolate pixels with this" msgstr "" #: ../libvips/resample/similarity.c:136 ../libvips/resample/similarity.c:143 #: ../libvips/resample/affine.c:556 ../libvips/resample/affine.c:563 msgid "Output offset" msgstr "" #: ../libvips/resample/similarity.c:137 ../libvips/resample/affine.c:557 msgid "Horizontal output displacement" msgstr "" #: ../libvips/resample/similarity.c:144 ../libvips/resample/affine.c:564 msgid "Vertical output displacement" msgstr "" #: ../libvips/resample/similarity.c:150 ../libvips/resample/similarity.c:157 #: ../libvips/resample/affine.c:570 ../libvips/resample/affine.c:577 msgid "Input offset" msgstr "" #: ../libvips/resample/similarity.c:151 ../libvips/resample/affine.c:571 msgid "Horizontal input displacement" msgstr "" #: ../libvips/resample/similarity.c:158 ../libvips/resample/affine.c:578 msgid "Vertical input displacement" msgstr "" #: ../libvips/resample/shrink.c:327 msgid "shrink factors should be >= 1" msgstr "" #: ../libvips/resample/shrink.c:334 msgid "not integer shrink factors, expect poor results" msgstr "" #: ../libvips/resample/shrink.c:393 msgid "shrink an image" msgstr "" #: ../libvips/resample/shrink.c:399 msgid "Xshrink" msgstr "" #: ../libvips/resample/shrink.c:400 msgid "Horizontal shrink factor" msgstr "" #: ../libvips/resample/shrink.c:406 msgid "Yshrink" msgstr "" #: ../libvips/resample/shrink.c:407 msgid "Vertical shrink factor" msgstr "" #: ../libvips/resample/quadratic.c:271 msgid "coefficient matrix must have width 2" msgstr "" #: ../libvips/resample/quadratic.c:293 msgid "coefficient matrix must have height 1, 3, 4 or 6" msgstr "" #: ../libvips/resample/quadratic.c:344 msgid "resample an image with a quadratic transform" msgstr "" #: ../libvips/resample/quadratic.c:348 msgid "Coeff" msgstr "" #: ../libvips/resample/quadratic.c:349 msgid "Coefficient matrix" msgstr "" #: ../libvips/resample/quadratic.c:355 msgid "Interpolate values with this" msgstr "" #: ../libvips/resample/affine.c:464 msgid "output coordinates out of range" msgstr "" #: ../libvips/resample/affine.c:532 msgid "affine transform of an image" msgstr "" #: ../libvips/resample/affine.c:536 msgid "Matrix" msgstr "" #: ../libvips/resample/affine.c:537 msgid "Transformation matrix" msgstr "" #: ../libvips/resample/affine.c:549 msgid "Output rect" msgstr "" #: ../libvips/resample/affine.c:550 msgid "Area of output to generate" msgstr "" #: ../libvips/video/im_video_test.c:52 msgid "error requested" msgstr "" #: ../tools/edvips.c:83 msgid "tag file as big or little-endian" msgstr "" #: ../tools/edvips.c:85 msgid "set width to N pixels" msgstr "" #: ../tools/edvips.c:87 msgid "set height to N pixels" msgstr "" #: ../tools/edvips.c:89 msgid "set Bands to N" msgstr "" #: ../tools/edvips.c:91 msgid "set BandFmt to F (eg. uchar, float)" msgstr "" #: ../tools/edvips.c:93 msgid "set interpretation to I (eg. xyz)" msgstr "" #: ../tools/edvips.c:95 msgid "set Coding to C (eg. labq)" msgstr "" #: ../tools/edvips.c:97 msgid "set Xres to R pixels/mm" msgstr "" #: ../tools/edvips.c:99 msgid "set Yres to R pixels/mm" msgstr "" #: ../tools/edvips.c:101 msgid "set Xoffset to N pixels" msgstr "" #: ../tools/edvips.c:103 msgid "set Yoffset to N pixels" msgstr "" #: ../tools/edvips.c:105 msgid "replace extension block with stdin" msgstr "" #: ../tools/edvips.c:107 msgid "set Xsize to N (deprecated, use width)" msgstr "" #: ../tools/edvips.c:109 msgid "set Ysize to N (deprecated, use height)" msgstr "" #: ../tools/edvips.c:111 msgid "set Type to T (deprecated, use interpretation)" msgstr "" #: ../tools/edvips.c:122 #, c-format msgid "'%s' is not a positive integer" msgstr "" #: ../tools/edvips.c:134 msgid "unable to start VIPS" msgstr "" #: ../tools/edvips.c:139 msgid "vipsfile - edit vipsfile header" msgstr "" #: ../tools/edvips.c:151 #, c-format msgid "usage: %s [OPTION...] vipsfile\n" msgstr "" #: ../tools/edvips.c:158 #, c-format msgid "could not open image %s" msgstr "" #: ../tools/edvips.c:161 #, c-format msgid "could not read VIPS header for %s" msgstr "" #: ../tools/edvips.c:170 #, c-format msgid "bad endian-ness %s, should be 'big' or 'little'" msgstr "" #: ../tools/edvips.c:183 #, c-format msgid "bad format %s" msgstr "" #: ../tools/edvips.c:191 #, c-format msgid "bad interpretation %s" msgstr "" #: ../tools/edvips.c:199 #, c-format msgid "bad coding %s" msgstr "" #: ../tools/edvips.c:212 #, c-format msgid "could not seek on %s" msgstr "" #: ../tools/edvips.c:215 #, c-format msgid "could not write to %s" msgstr "" #: ../tools/edvips.c:222 msgid "could not get ext data" msgstr "" #: ../tools/edvips.c:231 msgid "could not set extension" msgstr "" #: ../tools/find_mosaic.c:113 ../tools/find_mosaic.c:123 #: ../tools/find_mosaic.c:147 ../tools/find_mosaic.c:157 #: ../tools/find_mosaic.c:166 ../tools/find_mosaic.c:191 #: ../tools/find_mosaic.c:201 ../tools/find_mosaic.c:210 #: ../tools/mergeup.c:239 ../tools/mergeup.c:249 ../tools/mergeup.c:273 #: ../tools/mergeup.c:283 ../tools/mergeup.c:292 ../tools/mergeup.c:317 #: ../tools/mergeup.c:327 ../tools/mergeup.c:336 #, c-format msgid "bad file name format '%s'" msgstr "" #: ../tools/header.c:88 msgid "show all fields" msgstr "" #: ../tools/header.c:90 msgid "" "print value of FIELD (\"getext\" reads extension block, \"Hist\" reads image " "history)" msgstr "" #: ../tools/header.c:191 msgid "- print image header" msgstr "" #: ../tools/mergeup.c:384 msgid "allocation failure in mergeup" msgstr "" #: ../tools/mergeup.c:394 msgid "Need more than one image" msgstr "" #: ../tools/vips.c:104 msgid "load PLUGIN" msgstr "" #: ../tools/vips.c:105 msgid "PLUGIN" msgstr "" #: ../tools/vips.c:107 msgid "print version" msgstr "" #: ../tools/vips.c:150 #, c-format msgid "no package or function \"%s\"" msgstr "" #: ../tools/vips.c:942 msgid "list classes|packages|all|package-name|operation-name" msgstr "" #: ../tools/vips.c:944 msgid "generate headers for C++ binding" msgstr "" #: ../tools/vips.c:946 msgid "generate bodies for C++ binding" msgstr "" #: ../tools/vips.c:948 msgid "generate links for vips/bin" msgstr "" #: ../tools/vips.c:950 msgid "list possible actions" msgstr "" #: ../tools/vips.c:959 msgid "possible actions:\n" msgstr "" #: ../tools/vips.c:961 msgid "execute vips operation OPER" msgstr "" #: ../tools/vips.c:1013 msgid "Operation help" msgstr "" #: ../tools/vips.c:1052 msgid "[ACTION] [OPTIONS] [PARAMETERS] - VIPS driver program" msgstr "" #: ../tools/vips.c:1206 #, c-format msgid "unknown action \"%s\"" msgstr "" #: ../tools/vipsthumbnail.c:81 msgid "shrink to SIZE or to WIDTHxHEIGHT" msgstr "" #: ../tools/vipsthumbnail.c:82 msgid "SIZE" msgstr "" #: ../tools/vipsthumbnail.c:85 msgid "set output to FORMAT" msgstr "" #: ../tools/vipsthumbnail.c:86 msgid "FORMAT" msgstr "" #: ../tools/vipsthumbnail.c:89 msgid "resample with INTERPOLATOR" msgstr "" #: ../tools/vipsthumbnail.c:90 msgid "INTERPOLATOR" msgstr "" #: ../tools/vipsthumbnail.c:93 msgid "sharpen with none|mild|MASKFILE" msgstr "" #: ../tools/vipsthumbnail.c:94 msgid "none|mild|MASKFILE" msgstr "" #: ../tools/vipsthumbnail.c:97 msgid "export with PROFILE" msgstr "" #: ../tools/vipsthumbnail.c:98 ../tools/vipsthumbnail.c:102 msgid "PROFILE" msgstr "" #: ../tools/vipsthumbnail.c:101 msgid "import untagged images with PROFILE" msgstr "" #: ../tools/vipsthumbnail.c:105 msgid "process in linear space" msgstr "" #: ../tools/vipsthumbnail.c:108 msgid "crop exactly to SIZE" msgstr "" #: ../tools/vipsthumbnail.c:111 msgid "delete profile from exported image" msgstr "" #: ../tools/vipsthumbnail.c:114 ../tools/vipsthumbnail.c:117 #: ../tools/vipsthumbnail.c:120 msgid "(deprecated, does nothing)" msgstr "" #: ../tools/vipsthumbnail.c:641 msgid "- thumbnail generator" msgstr "" #: ../libvips/resample/vsqbs.cpp:399 msgid "B-Splines with antialiasing smoothing" msgstr "" #: ../libvips/resample/bicubic.cpp:431 msgid "Bicubic interpolation (Catmull-Rom)" msgstr "" #: ../libvips/resample/lbb.cpp:859 msgid "Reduced halo bicubic" msgstr "" #: ../libvips/resample/nohalo.cpp:1580 msgid "Edge sharpening resampler with halo reduction" msgstr "" vips-7.38.5/po/Makefile.in.in0000644000175000017500000001760412303144046012615 00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = @SHELL@ @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = mkdir -p CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: $(AM_V_GEN) file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) \ --msgid-bugs-address='http://bugzilla.gnome.org/enter_bug.cgi?product=glib&keywords=I18N+L10N&component=general' \ --add-comments --keyword=_ --keyword=N_ \ --keyword=C_:1c,2 \ --keyword=NC_:1c,2 \ --keyword=g_dcgettext:2 \ --keyword=g_dngettext:2,3 \ --keyword=g_dpgettext2:2c,3 \ --flag=N_:1:pass-c-format \ --flag=C_:2:pass-c-format \ --flag=NC_:2:pass-c-format \ --flag=g_dngettext:2:pass-c-format \ --flag=g_strdup_printf:1:c-format \ --flag=g_string_printf:2:c-format \ --flag=g_string_append_printf:2:c-format \ --flag=g_error_new:3:c-format \ --flag=g_set_error:4:c-format \ --flag=g_markup_printf_escaped:1:c-format \ --flag=g_log:3:c-format \ --flag=g_print:1:c-format \ --flag=g_printerr:1:c-format \ --flag=g_printf:1:c-format \ --flag=g_fprintf:2:c-format \ --flag=g_sprintf:2:c-format \ --flag=g_snprintf:3:c-format \ --flag=g_scanner_error:2:c-format \ --flag=g_scanner_warn:2:c-format \ $(POTFILES) \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ $(MKINSTALLDIRS) $$dir; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "glib"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ done if test "$(PACKAGE)" = "glib"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ fi check: all dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done # POTFILES is created from POTFILES.in by stripping comments, empty lines # and Intltool tags (enclosed in square brackets), and appending a full # relative path to them POTFILES: POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ rm -f $@-t $@ \ && (sed -e '/^#/d' \ -e "s/^\[.*\] +//" \ -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ | sed -e '$$s/\\$$//') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && $(SHELL) ./config.status $(subdir)/$@.in # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/po/en_GB.po0000644000175000017500000024436012303140253011452 00000000000000# UK English translation of vips. # Copyright (C) 1990-2010 Imperial College, London and others. # This file is distributed under the same license as the vips package. # John Cupitt # See also http://www.gnu-darwin.org/www001/src/ports/graphics/vips/work/ # vips-7.12.4/doc/pdf/vipsmanual.pdf # msgid "" msgstr "" "Project-Id-Version: libvips-doc 7.22.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-03-08 21:02+0000\n" "PO-Revision-Date: 2010-05-26 12:11+0100\n" "Last-Translator: John Cupitt \n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../libvips/arithmetic/linear.c:251 msgid "calculate (a * in + b)" msgstr "" #: ../libvips/arithmetic/linear.c:259 msgid "a" msgstr "" #: ../libvips/arithmetic/linear.c:260 msgid "Multiply by this" msgstr "" #: ../libvips/arithmetic/linear.c:266 msgid "b" msgstr "" #: ../libvips/arithmetic/linear.c:267 msgid "Add this" msgstr "" #: ../libvips/arithmetic/avg.c:211 ../libvips/arithmetic/stats.c:416 #: ../libvips/arithmetic/deviate.c:213 msgid "find image average" msgstr "" #: ../libvips/arithmetic/avg.c:219 ../libvips/arithmetic/measure.c:204 #: ../libvips/arithmetic/stats.c:424 ../libvips/arithmetic/deviate.c:221 #: ../libvips/arithmetic/arithmetic.c:581 ../libvips/arithmetic/min.c:422 #: ../libvips/arithmetic/max.c:420 ../libvips/colour/colourspace.c:340 #: ../libvips/colour/colour.c:362 ../libvips/conversion/conversion.c:90 #: ../libvips/foreign/foreign.c:932 ../libvips/resample/resample.c:96 msgid "Output" msgstr "" #: ../libvips/arithmetic/avg.c:220 ../libvips/arithmetic/deviate.c:222 #: ../libvips/arithmetic/min.c:423 ../libvips/arithmetic/max.c:421 msgid "Output value" msgstr "" #: ../libvips/arithmetic/divide.c:229 msgid "divide two images" msgstr "" #: ../libvips/arithmetic/measure.c:165 #, c-format msgid "patch %d x %d, band %d: avg = %g, sdev = %g" msgstr "" #: ../libvips/arithmetic/measure.c:194 msgid "measure a set of patches on a color chart" msgstr "measure a set of patches on a colour chart" #: ../libvips/arithmetic/measure.c:198 msgid "in" msgstr "" #: ../libvips/arithmetic/measure.c:199 msgid "Image to measure" msgstr "" #: ../libvips/arithmetic/measure.c:205 ../libvips/arithmetic/stats.c:425 msgid "Output array of statistics" msgstr "" #: ../libvips/arithmetic/measure.c:210 ../libvips/conversion/replicate.c:203 msgid "Across" msgstr "" #: ../libvips/arithmetic/measure.c:211 msgid "Number of patches across chart" msgstr "" #: ../libvips/arithmetic/measure.c:217 ../libvips/conversion/replicate.c:210 msgid "Down" msgstr "" #: ../libvips/arithmetic/measure.c:218 msgid "Number of patches down chart" msgstr "" #: ../libvips/arithmetic/measure.c:224 ../libvips/arithmetic/binary.c:96 #: ../libvips/colour/colour.c:752 ../libvips/conversion/extract.c:206 msgid "Left" msgstr "" #: ../libvips/arithmetic/measure.c:225 ../libvips/conversion/extract.c:207 msgid "Left edge of extract area" msgstr "" #: ../libvips/arithmetic/measure.c:231 ../libvips/conversion/extract.c:213 msgid "Top" msgstr "" #: ../libvips/arithmetic/measure.c:232 ../libvips/conversion/extract.c:214 msgid "Top edge of extract area" msgstr "" #: ../libvips/arithmetic/measure.c:238 ../libvips/conversion/extract.c:220 #: ../libvips/conversion/black.c:129 ../libvips/conversion/copy.c:335 #: ../libvips/conversion/embed.c:571 ../libvips/foreign/rawload.c:123 #: ../libvips/iofuncs/image.c:891 msgid "Width" msgstr "" #: ../libvips/arithmetic/measure.c:239 ../libvips/conversion/extract.c:221 msgid "Width of extract area" msgstr "" #: ../libvips/arithmetic/measure.c:245 ../libvips/conversion/extract.c:227 #: ../libvips/conversion/black.c:136 ../libvips/conversion/copy.c:342 #: ../libvips/conversion/embed.c:578 ../libvips/foreign/rawload.c:130 #: ../libvips/iofuncs/image.c:898 msgid "Height" msgstr "" #: ../libvips/arithmetic/measure.c:246 ../libvips/conversion/extract.c:228 msgid "Height of extract area" msgstr "" #: ../libvips/arithmetic/math2.c:200 msgid "binary math operations" msgstr "" #: ../libvips/arithmetic/math2.c:208 ../libvips/arithmetic/math2.c:406 #: ../libvips/arithmetic/complex.c:223 ../libvips/arithmetic/complex.c:502 #: ../libvips/arithmetic/complex.c:716 ../libvips/arithmetic/math.c:207 #: ../libvips/arithmetic/relational.c:228 #: ../libvips/arithmetic/relational.c:565 ../libvips/arithmetic/boolean.c:218 #: ../libvips/arithmetic/boolean.c:521 ../libvips/conversion/bandbool.c:218 #: ../tools/vips.c:1013 msgid "Operation" msgstr "" #: ../libvips/arithmetic/math2.c:209 ../libvips/arithmetic/math2.c:407 #: ../libvips/arithmetic/math.c:208 msgid "math to perform" msgstr "" #: ../libvips/arithmetic/math2.c:398 msgid "pow( @in, @c )" msgstr "" #: ../libvips/arithmetic/round.c:161 msgid "perform a round function on an image" msgstr "" #: ../libvips/arithmetic/round.c:169 msgid "Round operation" msgstr "" #: ../libvips/arithmetic/round.c:170 msgid "rounding operation to perform" msgstr "" #: ../libvips/arithmetic/unary.c:81 msgid "unary operations" msgstr "" #: ../libvips/arithmetic/unary.c:88 ../libvips/arithmetic/statistic.c:152 #: ../libvips/colour/colourspace.c:334 ../libvips/colour/colour.c:457 #: ../libvips/colour/colour.c:583 ../libvips/conversion/flip.c:241 #: ../libvips/conversion/bandmean.c:196 ../libvips/conversion/cast.c:483 #: ../libvips/conversion/flatten.c:377 ../libvips/conversion/extract.c:200 #: ../libvips/conversion/extract.c:360 ../libvips/conversion/bandjoin.c:172 #: ../libvips/conversion/bandbool.c:212 ../libvips/conversion/copy.c:322 #: ../libvips/conversion/rot.c:360 ../libvips/conversion/replicate.c:197 #: ../libvips/conversion/tilecache.c:392 ../libvips/conversion/embed.c:551 #: ../libvips/conversion/cache.c:101 ../libvips/conversion/recomb.c:205 #: ../libvips/conversion/sequential.c:304 ../libvips/foreign/foreign.c:1361 #: ../libvips/resample/resample.c:90 msgid "Input" msgstr "" #: ../libvips/arithmetic/unary.c:89 ../libvips/conversion/bandmean.c:197 #: ../libvips/conversion/bandbool.c:213 ../libvips/conversion/recomb.c:206 #: ../libvips/resample/resample.c:91 msgid "Input image argument" msgstr "" #: ../libvips/arithmetic/unaryconst.c:203 msgid "unary operations with a constant" msgstr "" #: ../libvips/arithmetic/unaryconst.c:207 msgid "c" msgstr "" #: ../libvips/arithmetic/unaryconst.c:208 msgid "Array of constants" msgstr "" #: ../libvips/arithmetic/add.c:187 msgid "add two images" msgstr "" #: ../libvips/arithmetic/arithmetic.c:359 #, c-format msgid "not one band or %d bands" msgstr "" #: ../libvips/arithmetic/arithmetic.c:363 #: ../libvips/histograms_lut/im_identity.c:81 #: ../libvips/histograms_lut/im_identity.c:144 msgid "bad bands" msgstr "" #: ../libvips/arithmetic/arithmetic.c:520 ../libvips/colour/colour.c:311 #: ../libvips/conversion/bandary.c:135 msgid "too many input images" msgstr "" #: ../libvips/arithmetic/arithmetic.c:575 msgid "arithmetic operations" msgstr "" #: ../libvips/arithmetic/arithmetic.c:582 ../libvips/colour/colourspace.c:341 #: ../libvips/colour/colour.c:363 ../libvips/conversion/conversion.c:91 #: ../libvips/foreign/foreign.c:933 ../libvips/resample/resample.c:97 msgid "Output image" msgstr "" #: ../libvips/arithmetic/multiply.c:173 msgid "multiply two images" msgstr "" #: ../libvips/arithmetic/min.c:414 msgid "find image minimum" msgstr "" #: ../libvips/arithmetic/min.c:429 ../libvips/arithmetic/max.c:427 #: ../libvips/conversion/embed.c:557 msgid "x" msgstr "" #: ../libvips/arithmetic/min.c:430 msgid "Horizontal position of minimum" msgstr "" #: ../libvips/arithmetic/min.c:436 ../libvips/arithmetic/max.c:434 #: ../libvips/conversion/embed.c:564 msgid "y" msgstr "" #: ../libvips/arithmetic/min.c:437 msgid "Vertical position of minimum" msgstr "" #: ../libvips/arithmetic/min.c:443 ../libvips/arithmetic/max.c:441 msgid "Size" msgstr "" #: ../libvips/arithmetic/min.c:444 msgid "Number of minimum values to find" msgstr "" #: ../libvips/arithmetic/min.c:450 ../libvips/arithmetic/max.c:448 msgid "Output array" msgstr "" #: ../libvips/arithmetic/min.c:451 ../libvips/arithmetic/max.c:449 msgid "Array of output values" msgstr "" #: ../libvips/arithmetic/min.c:457 ../libvips/arithmetic/max.c:455 msgid "x array" msgstr "" #: ../libvips/arithmetic/min.c:458 ../libvips/arithmetic/max.c:456 msgid "Array of horizontal positions" msgstr "" #: ../libvips/arithmetic/min.c:464 ../libvips/arithmetic/max.c:462 msgid "y array" msgstr "" #: ../libvips/arithmetic/min.c:465 ../libvips/arithmetic/max.c:463 msgid "Array of vertical positions" msgstr "" #: ../libvips/arithmetic/complex.c:216 msgid "perform a complex operation on an image" msgstr "" #: ../libvips/arithmetic/complex.c:224 ../libvips/arithmetic/complex.c:717 msgid "complex to perform" msgstr "" #: ../libvips/arithmetic/complex.c:495 msgid "perform a binary complex operation on two images" msgstr "" #: ../libvips/arithmetic/complex.c:503 msgid "binary complex operation to perform" msgstr "" #: ../libvips/arithmetic/complex.c:708 msgid "get a component from a complex image" msgstr "" #: ../libvips/arithmetic/complex.c:907 msgid "form a complex image from two real images" msgstr "" #: ../libvips/arithmetic/invert.c:165 msgid "invert an image" msgstr "" #: ../libvips/arithmetic/remainder.c:180 msgid "remainder after integer division of two images" msgstr "" #: ../libvips/arithmetic/remainder.c:330 msgid "remainder after integer division of an image and a constant" msgstr "" #: ../libvips/arithmetic/math.c:199 msgid "perform a math function on an image" msgstr "" #: ../libvips/arithmetic/abs.c:216 msgid "absolute value of an image" msgstr "" #: ../libvips/arithmetic/relational.c:220 msgid "a relational operation on a pair of images" msgstr "" #: ../libvips/arithmetic/relational.c:229 #: ../libvips/arithmetic/relational.c:566 msgid "relational to perform" msgstr "" #: ../libvips/arithmetic/relational.c:557 msgid "relational operations against a constant" msgstr "" #: ../libvips/arithmetic/binary.c:89 msgid "binary operations" msgstr "" #: ../libvips/arithmetic/binary.c:97 msgid "Left-hand image argument" msgstr "" #: ../libvips/arithmetic/binary.c:102 ../libvips/colour/colour.c:758 msgid "Right" msgstr "" #: ../libvips/arithmetic/binary.c:103 msgid "Right-hand image argument" msgstr "" #: ../libvips/arithmetic/sign.c:152 msgid "unit vector of pixel" msgstr "" #: ../libvips/arithmetic/subtract.c:162 msgid "subtract two images" msgstr "" #: ../libvips/arithmetic/statistic.c:148 msgid "VIPS statistic operations" msgstr "" #: ../libvips/arithmetic/statistic.c:153 ../libvips/colour/colourspace.c:335 #: ../libvips/colour/colour.c:458 ../libvips/colour/colour.c:584 #: ../libvips/conversion/flip.c:242 ../libvips/conversion/cast.c:484 #: ../libvips/conversion/flatten.c:378 ../libvips/conversion/extract.c:201 #: ../libvips/conversion/extract.c:361 ../libvips/conversion/copy.c:323 #: ../libvips/conversion/rot.c:361 ../libvips/conversion/replicate.c:198 #: ../libvips/conversion/tilecache.c:393 ../libvips/conversion/embed.c:552 #: ../libvips/conversion/cache.c:102 ../libvips/conversion/sequential.c:305 msgid "Input image" msgstr "" #: ../libvips/arithmetic/boolean.c:210 msgid "boolean operation on two images" msgstr "" #: ../libvips/arithmetic/boolean.c:219 ../libvips/arithmetic/boolean.c:522 #: ../libvips/conversion/bandbool.c:219 msgid "boolean to perform" msgstr "" #: ../libvips/arithmetic/boolean.c:513 msgid "boolean operations against a constant" msgstr "" #: ../libvips/arithmetic/max.c:412 msgid "find image maximum" msgstr "" #: ../libvips/arithmetic/max.c:428 msgid "Horizontal position of maximum" msgstr "" #: ../libvips/arithmetic/max.c:435 msgid "Vertical position of maximum" msgstr "" #: ../libvips/arithmetic/max.c:442 msgid "Number of maximum values to find" msgstr "" #: ../libvips/colour/dE76.c:113 msgid "calculate dE76" msgstr "" #: ../libvips/colour/colourspace.c:296 #, c-format msgid "no known route between '%s' and '%s'" msgstr "" #: ../libvips/colour/colourspace.c:328 msgid "convert to a new colourspace" msgstr "" #: ../libvips/colour/colourspace.c:346 msgid "Space" msgstr "" #: ../libvips/colour/colourspace.c:347 msgid "Destination colour space" msgstr "" #: ../libvips/colour/Lab2LCh.c:132 msgid "transform Lab to LCh" msgstr "" #: ../libvips/colour/LabS2LabQ.c:126 msgid "transform short Lab to LabQ coding" msgstr "" #: ../libvips/colour/sRGB2scRGB.c:150 msgid "convert an sRGB image to scRGB" msgstr "" #: ../libvips/colour/Yxy2XYZ.c:93 msgid "transform Yxy to XYZ" msgstr "" #: ../libvips/colour/LCh2Lab.c:119 msgid "transform LCh to Lab" msgstr "" #: ../libvips/colour/dE00.c:235 msgid "calculate dE00" msgstr "" #: ../libvips/colour/LabQ2Lab.c:124 msgid "unpack a LabQ image to float Lab" msgstr "" #: ../libvips/colour/Lab2XYZ.c:169 msgid "transform CIELAB to XYZ" msgstr "" #: ../libvips/colour/Lab2XYZ.c:175 ../libvips/colour/XYZ2Lab.c:233 msgid "Temperature" msgstr "" #: ../libvips/colour/Lab2XYZ.c:176 ../libvips/colour/XYZ2Lab.c:234 msgid "Colour temperature" msgstr "" #: ../libvips/colour/rad2float.c:191 msgid "unpack Radiance coding to float RGB" msgstr "" #: ../libvips/colour/Lab2LabQ.c:136 msgid "transform float Lab to LabQ coding" msgstr "" #: ../libvips/colour/colour.c:356 msgid "colour operations" msgstr "" #: ../libvips/colour/colour.c:453 msgid "colour space transformations" msgstr "" #: ../libvips/colour/colour.c:579 msgid "change colour coding" msgstr "" #: ../libvips/colour/colour.c:748 msgid "calculate colour difference" msgstr "" #: ../libvips/colour/colour.c:753 msgid "Left-hand input image" msgstr "" #: ../libvips/colour/colour.c:759 msgid "Right-hand input image" msgstr "" #: ../libvips/colour/LabQ2sRGB.c:454 ../libvips/colour/LabQ2LabS.c:104 msgid "unpack a LabQ image to short Lab" msgstr "" #: ../libvips/colour/XYZ2Lab.c:227 msgid "transform XYZ to Lab" msgstr "" #: ../libvips/colour/UCS2LCh.c:266 ../libvips/colour/LCh2UCS.c:179 msgid "transform LCh to CMC" msgstr "" #: ../libvips/colour/scRGB2XYZ.c:90 msgid "transform scRGB to XYZ" msgstr "" #: ../libvips/colour/LabS2Lab.c:78 msgid "transform signed short Lab to float" msgstr "" #: ../libvips/colour/float2rad.c:199 msgid "transform float RGB to Radiance coding" msgstr "" #: ../libvips/colour/XYZ2Yxy.c:92 msgid "transform XYZ to Yxy" msgstr "" #: ../libvips/colour/Lab2LabS.c:80 msgid "transform float Lab to signed short" msgstr "" #: ../libvips/colour/icc_transform.c:194 ../libvips/colour/scRGB2sRGB.c:165 msgid "depth must be 8 or 16" msgstr "" #: ../libvips/colour/icc_transform.c:229 #, c-format msgid "unimplemented input color space 0x%x" msgstr "unimplemented input colour space 0x%x" #: ../libvips/colour/icc_transform.c:271 #, c-format msgid "unimplemented output color space 0x%x" msgstr "unimplemented output colour space 0x%x" #: ../libvips/colour/icc_transform.c:283 msgid "no device profile" msgstr "" #: ../libvips/colour/icc_transform.c:314 msgid "transform using ICC profiles" msgstr "" #: ../libvips/colour/icc_transform.c:318 msgid "Intent" msgstr "" #: ../libvips/colour/icc_transform.c:319 msgid "Rendering intent" msgstr "" #: ../libvips/colour/icc_transform.c:362 #, c-format msgid "" "intent %d (%s) not supported by %s profile; falling back to default intent" msgstr "" #: ../libvips/colour/icc_transform.c:366 ../libvips/iofuncs/operation.c:99 msgid "input" msgstr "" #: ../libvips/colour/icc_transform.c:366 ../libvips/iofuncs/operation.c:99 msgid "output" msgstr "" #: ../libvips/colour/icc_transform.c:400 ../libvips/colour/icc_transform.c:565 #: ../libvips/colour/icc_transform.c:745 msgid "unable to load embedded profile" msgstr "" #: ../libvips/colour/icc_transform.c:408 ../libvips/colour/icc_transform.c:573 #: ../libvips/colour/icc_transform.c:753 ../libvips/colour/icc_transform.c:767 #, c-format msgid "unable to open profile \"%s\"" msgstr "" #: ../libvips/colour/icc_transform.c:414 ../libvips/colour/icc_transform.c:759 msgid "no input profile" msgstr "" #: ../libvips/colour/icc_transform.c:498 msgid "import from device with ICC profile" msgstr "" #: ../libvips/colour/icc_transform.c:504 ../libvips/colour/icc_transform.c:829 msgid "Embedded" msgstr "" #: ../libvips/colour/icc_transform.c:505 ../libvips/colour/icc_transform.c:830 msgid "Use embedded input profile, if available" msgstr "" #: ../libvips/colour/icc_transform.c:511 ../libvips/colour/icc_transform.c:836 msgid "Input profile" msgstr "" #: ../libvips/colour/icc_transform.c:512 ../libvips/colour/icc_transform.c:837 msgid "Filename to load input profile from" msgstr "" #: ../libvips/colour/icc_transform.c:581 msgid "no output profile" msgstr "" #: ../libvips/colour/icc_transform.c:675 msgid "output to device with ICC profile" msgstr "" #: ../libvips/colour/icc_transform.c:681 ../libvips/colour/icc_transform.c:822 msgid "Output profile" msgstr "" #: ../libvips/colour/icc_transform.c:682 ../libvips/colour/icc_transform.c:823 msgid "Filename to load output profile from" msgstr "" #: ../libvips/colour/icc_transform.c:688 ../libvips/colour/icc_transform.c:843 #: ../libvips/colour/scRGB2sRGB.c:192 ../libvips/foreign/dzsave.c:1354 msgid "Depth" msgstr "" #: ../libvips/colour/icc_transform.c:689 ../libvips/colour/icc_transform.c:844 #: ../libvips/colour/scRGB2sRGB.c:193 msgid "Output device space depth in bits" msgstr "" #: ../libvips/colour/icc_transform.c:816 msgid "transform between devices with ICC profiles" msgstr "" #: ../libvips/colour/icc_transform.c:887 ../libvips/colour/icc_transform.c:901 msgid "unable to get media white point" msgstr "" #: ../libvips/colour/icc_transform.c:962 msgid "libvips configured without lcms support" msgstr "" #: ../libvips/colour/XYZ2scRGB.c:85 msgid "transform XYZ to scRGB" msgstr "" #: ../libvips/colour/dECMC.c:61 msgid "calculate dECMC" msgstr "" #: ../libvips/colour/scRGB2sRGB.c:186 msgid "convert an scRGB image to sRGB" msgstr "" #: ../libvips/conversion/flip.c:237 msgid "flip an image" msgstr "" #: ../libvips/conversion/flip.c:247 msgid "Direction" msgstr "" #: ../libvips/conversion/flip.c:248 msgid "Direction to flip image" msgstr "" #: ../libvips/conversion/bandmean.c:190 msgid "band-wise average" msgstr "" #: ../libvips/conversion/im_zoom.c:332 msgid "zoom factors should be >= 0" msgstr "" #. Make sure we won't get integer overflow. #. #: ../libvips/conversion/im_zoom.c:339 msgid "zoom factors too large" msgstr "" #: ../libvips/conversion/im_gaussnoise.c:125 msgid "bad parameter" msgstr "" #: ../libvips/conversion/bandary.c:130 msgid "no input images" msgstr "" #: ../libvips/conversion/bandary.c:178 msgid "operations on image bands" msgstr "" #: ../libvips/conversion/cast.c:128 #, c-format msgid "%d underflows and %d overflows detected" msgstr "" #: ../libvips/conversion/cast.c:477 msgid "cast an image" msgstr "" #: ../libvips/conversion/cast.c:489 ../libvips/conversion/copy.c:356 #: ../libvips/iofuncs/image.c:912 msgid "Format" msgstr "" #: ../libvips/conversion/cast.c:490 msgid "Format to cast to" msgstr "" #: ../libvips/conversion/conversion.c:86 msgid "conversion operations" msgstr "" #: ../libvips/conversion/flatten.c:371 msgid "flatten alpha out of an image" msgstr "" #: ../libvips/conversion/flatten.c:383 ../libvips/conversion/join.c:267 #: ../libvips/conversion/insert.c:394 ../libvips/conversion/embed.c:592 #: ../libvips/foreign/dzsave.c:1347 msgid "Background" msgstr "" #: ../libvips/conversion/flatten.c:384 msgid "Background value" msgstr "" #: ../libvips/conversion/im_subsample.c:203 msgid "factors should both be >= 1" msgstr "" #: ../libvips/conversion/im_subsample.c:222 ../libvips/resample/shrink.c:354 msgid "image has shrunk to nothing" msgstr "" #: ../libvips/conversion/im_grid.c:165 #: ../libvips/convolution/im_contrast_surface.c:141 #: ../libvips/iofuncs/sinkscreen.c:1063 ../libvips/iofuncs/image.c:736 #: ../libvips/morphology/im_rank.c:343 msgid "bad parameters" msgstr "" #: ../libvips/conversion/im_grid.c:170 msgid "bad grid geometry" msgstr "" #: ../libvips/conversion/extract.c:150 msgid "bad extract area" msgstr "" #: ../libvips/conversion/extract.c:194 msgid "extract an area from an image" msgstr "" #: ../libvips/conversion/extract.c:325 msgid "bad extract band" msgstr "" #: ../libvips/conversion/extract.c:354 msgid "extract band from an image" msgstr "" #: ../libvips/conversion/extract.c:366 msgid "Band" msgstr "" #: ../libvips/conversion/extract.c:367 msgid "Band to extract" msgstr "" #: ../libvips/conversion/extract.c:373 msgid "n" msgstr "" #: ../libvips/conversion/extract.c:374 msgid "Number of bands to extract" msgstr "" #: ../libvips/conversion/bandjoin.c:166 msgid "bandwise join a set of images" msgstr "" #: ../libvips/conversion/bandjoin.c:173 msgid "Array of input images" msgstr "" #: ../libvips/conversion/im_msb.c:135 ../libvips/conversion/im_msb.c:214 msgid "unknown coding" msgstr "" #: ../libvips/conversion/im_msb.c:170 msgid "bad arguments" msgstr "" #: ../libvips/conversion/im_msb.c:184 ../libvips/conversion/im_msb.c:201 msgid "image does not have that many bands" msgstr "" #: ../libvips/conversion/black.c:125 msgid "make a black image" msgstr "" #: ../libvips/conversion/black.c:130 ../libvips/conversion/copy.c:336 #: ../libvips/conversion/embed.c:572 ../libvips/foreign/rawload.c:124 #: ../libvips/iofuncs/image.c:892 msgid "Image width in pixels" msgstr "" #: ../libvips/conversion/black.c:137 ../libvips/conversion/copy.c:343 #: ../libvips/conversion/embed.c:579 ../libvips/foreign/rawload.c:131 #: ../libvips/iofuncs/image.c:899 msgid "Image height in pixels" msgstr "" #: ../libvips/conversion/black.c:143 ../libvips/conversion/copy.c:349 #: ../libvips/foreign/rawload.c:137 ../libvips/iofuncs/image.c:905 msgid "Bands" msgstr "" #: ../libvips/conversion/black.c:144 ../libvips/conversion/copy.c:350 #: ../libvips/foreign/rawload.c:138 ../libvips/iofuncs/image.c:906 msgid "Number of bands in image" msgstr "" #: ../libvips/conversion/bandbool.c:79 #, c-format msgid "operator %s not supported across image bands" msgstr "" #: ../libvips/conversion/bandbool.c:206 msgid "boolean operation across image bands" msgstr "" #: ../libvips/conversion/copy.c:316 msgid "copy an image" msgstr "" #: ../libvips/conversion/copy.c:328 msgid "Swap" msgstr "" #: ../libvips/conversion/copy.c:329 msgid "Swap bytes in image between little and big-endian" msgstr "" #: ../libvips/conversion/copy.c:357 ../libvips/iofuncs/image.c:913 msgid "Pixel format in image" msgstr "" #: ../libvips/conversion/copy.c:363 ../libvips/iofuncs/image.c:919 msgid "Coding" msgstr "" #: ../libvips/conversion/copy.c:364 ../libvips/iofuncs/image.c:920 msgid "Pixel coding" msgstr "" #: ../libvips/conversion/copy.c:370 ../libvips/iofuncs/image.c:926 msgid "Interpretation" msgstr "" #: ../libvips/conversion/copy.c:371 ../libvips/iofuncs/image.c:927 msgid "Pixel interpretation" msgstr "" #: ../libvips/conversion/copy.c:377 ../libvips/foreign/tiffsave.c:252 #: ../libvips/iofuncs/image.c:933 msgid "Xres" msgstr "" #: ../libvips/conversion/copy.c:378 ../libvips/foreign/tiffsave.c:253 #: ../libvips/iofuncs/image.c:934 msgid "Horizontal resolution in pixels/mm" msgstr "" #: ../libvips/conversion/copy.c:384 ../libvips/foreign/tiffsave.c:259 #: ../libvips/iofuncs/image.c:940 msgid "Yres" msgstr "" #: ../libvips/conversion/copy.c:385 ../libvips/foreign/tiffsave.c:260 #: ../libvips/iofuncs/image.c:941 msgid "Vertical resolution in pixels/mm" msgstr "" #: ../libvips/conversion/copy.c:391 ../libvips/iofuncs/image.c:947 msgid "Xoffset" msgstr "" #: ../libvips/conversion/copy.c:392 ../libvips/iofuncs/image.c:948 msgid "Horizontal offset of origin" msgstr "" #: ../libvips/conversion/copy.c:398 ../libvips/iofuncs/image.c:954 msgid "Yoffset" msgstr "" #: ../libvips/conversion/copy.c:399 ../libvips/iofuncs/image.c:955 msgid "Vertical offset of origin" msgstr "" #: ../libvips/conversion/rot.c:356 msgid "rotate an image" msgstr "" #: ../libvips/conversion/rot.c:366 msgid "Angle" msgstr "" #: ../libvips/conversion/rot.c:367 msgid "Angle to rotate image" msgstr "" #: ../libvips/conversion/replicate.c:193 msgid "replicate an image" msgstr "" #: ../libvips/conversion/replicate.c:204 msgid "Repeat this many times horizontally" msgstr "" #: ../libvips/conversion/replicate.c:211 msgid "Repeat this many times vertically" msgstr "" #: ../libvips/conversion/join.c:228 msgid "join a pair of images" msgstr "" #: ../libvips/conversion/join.c:234 msgid "in1" msgstr "" #: ../libvips/conversion/join.c:235 msgid "First input image" msgstr "" #: ../libvips/conversion/join.c:240 msgid "in2" msgstr "" #: ../libvips/conversion/join.c:241 msgid "Second input image" msgstr "" #: ../libvips/conversion/join.c:246 msgid "direction" msgstr "" #: ../libvips/conversion/join.c:247 msgid "Join left-right or up-down" msgstr "" #: ../libvips/conversion/join.c:253 ../libvips/conversion/insert.c:387 msgid "Expand" msgstr "" #: ../libvips/conversion/join.c:254 ../libvips/conversion/insert.c:388 msgid "Expand output to hold all of both inputs" msgstr "" #: ../libvips/conversion/join.c:260 msgid "Shim" msgstr "" #: ../libvips/conversion/join.c:261 msgid "Pixels between images" msgstr "" #: ../libvips/conversion/join.c:268 ../libvips/conversion/insert.c:395 msgid "Colour for new pixels" msgstr "" #: ../libvips/conversion/join.c:274 msgid "Align" msgstr "" #: ../libvips/conversion/join.c:275 msgid "Align on the low, centre or high coordinate edge" msgstr "" #: ../libvips/conversion/im_text.c:133 msgid "no text to render" msgstr "" #: ../libvips/conversion/im_text.c:220 msgid "invalid markup in text" msgstr "" #: ../libvips/conversion/im_text.c:252 msgid "pangoft2 support disabled" msgstr "" #: ../libvips/conversion/conver_dispatch.c:919 #: ../libvips/inplace/inplace_dispatch.c:172 msgid "vectors not same length" msgstr "" #: ../libvips/conversion/insert.c:355 msgid "insert an image" msgstr "" #: ../libvips/conversion/insert.c:361 msgid "Main" msgstr "" #: ../libvips/conversion/insert.c:362 msgid "Main input image" msgstr "" #: ../libvips/conversion/insert.c:367 msgid "Sub-image" msgstr "" #: ../libvips/conversion/insert.c:368 msgid "Sub-image to insert into main image" msgstr "" #: ../libvips/conversion/insert.c:373 msgid "X" msgstr "" #: ../libvips/conversion/insert.c:374 msgid "Left edge of sub in main" msgstr "" #: ../libvips/conversion/insert.c:380 msgid "Y" msgstr "" #: ../libvips/conversion/insert.c:381 msgid "Top edge of sub in main" msgstr "" #: ../libvips/conversion/tilecache.c:386 ../libvips/conversion/cache.c:97 msgid "cache an image" msgstr "" #: ../libvips/conversion/tilecache.c:398 ../libvips/conversion/cache.c:114 #: ../libvips/conversion/sequential.c:317 ../libvips/foreign/tiffsave.c:223 #: ../libvips/foreign/dzsave.c:1386 msgid "Tile height" msgstr "" #: ../libvips/conversion/tilecache.c:399 ../libvips/conversion/cache.c:115 #: ../libvips/conversion/sequential.c:318 ../libvips/foreign/tiffsave.c:224 #: ../libvips/foreign/dzsave.c:1387 msgid "Tile height in pixels" msgstr "" #: ../libvips/conversion/tilecache.c:405 msgid "Threaded" msgstr "" #: ../libvips/conversion/tilecache.c:406 msgid "Allow threaded access" msgstr "" #: ../libvips/conversion/tilecache.c:412 msgid "Strategy" msgstr "" #: ../libvips/conversion/tilecache.c:413 msgid "Expected access pattern" msgstr "" #: ../libvips/conversion/tilecache.c:658 #, c-format msgid "error reading tile %dx%d: %s" msgstr "" #: ../libvips/conversion/tilecache.c:747 msgid "cache an image as a set of tiles" msgstr "" #: ../libvips/conversion/tilecache.c:751 ../libvips/conversion/cache.c:107 #: ../libvips/foreign/tiffsave.c:216 ../libvips/foreign/dzsave.c:1379 msgid "Tile width" msgstr "" #: ../libvips/conversion/tilecache.c:752 ../libvips/conversion/cache.c:108 #: ../libvips/foreign/tiffsave.c:217 ../libvips/foreign/dzsave.c:1380 msgid "Tile width in pixels" msgstr "" #: ../libvips/conversion/tilecache.c:758 ../libvips/conversion/cache.c:121 msgid "Max tiles" msgstr "" #: ../libvips/conversion/tilecache.c:759 ../libvips/conversion/cache.c:122 msgid "Maximum number of tiles to cache" msgstr "" #: ../libvips/conversion/tilecache.c:915 msgid "cache an image as a set of lines" msgstr "" #: ../libvips/conversion/im_system_image.c:77 #, c-format msgid "command failed: \"%s\"" msgstr "" #: ../libvips/conversion/embed.c:462 ../libvips/iofuncs/image.c:1879 msgid "bad dimensions" msgstr "" #: ../libvips/conversion/embed.c:545 msgid "embed an image in a larger image" msgstr "" #: ../libvips/conversion/embed.c:558 msgid "Left edge of input in output" msgstr "" #: ../libvips/conversion/embed.c:565 msgid "Top edge of input in output" msgstr "" #: ../libvips/conversion/embed.c:585 msgid "Extend" msgstr "" #: ../libvips/conversion/embed.c:586 msgid "How to generate the extra pixels" msgstr "" #: ../libvips/conversion/embed.c:593 ../libvips/foreign/dzsave.c:1348 msgid "Colour for background pixels" msgstr "" #: ../libvips/conversion/ifthenelse.c:471 msgid "ifthenelse an image" msgstr "" #: ../libvips/conversion/ifthenelse.c:477 msgid "Condition" msgstr "" #: ../libvips/conversion/ifthenelse.c:478 msgid "Condition input image" msgstr "" #: ../libvips/conversion/ifthenelse.c:483 msgid "Then image" msgstr "" #: ../libvips/conversion/ifthenelse.c:484 msgid "Source for TRUE pixels" msgstr "" #: ../libvips/conversion/ifthenelse.c:489 msgid "Else image" msgstr "" #: ../libvips/conversion/ifthenelse.c:490 msgid "Source for FALSE pixels" msgstr "" #: ../libvips/conversion/ifthenelse.c:495 msgid "blend" msgstr "" #: ../libvips/conversion/ifthenelse.c:496 msgid "Blend smoothly between then and else parts" msgstr "" #: ../libvips/conversion/recomb.c:162 msgid "bands in must equal matrix width" msgstr "" #: ../libvips/conversion/recomb.c:199 msgid "linear recombination with matrix" msgstr "" #: ../libvips/conversion/recomb.c:211 msgid "M" msgstr "" #: ../libvips/conversion/recomb.c:212 msgid "matrix of coefficients" msgstr "" #: ../libvips/conversion/sequential.c:300 msgid "check sequential access" msgstr "" #: ../libvips/conversion/sequential.c:310 msgid "trace" msgstr "" #: ../libvips/conversion/sequential.c:311 msgid "trace pixel requests" msgstr "" #: ../libvips/convolution/im_conv.c:216 #, c-format msgid "%d overflows and %d underflows detected" msgstr "" #: ../libvips/convolution/im_conv.c:1039 #: ../libvips/convolution/im_conv_f.c:341 #: ../libvips/convolution/im_aconvsep.c:799 #: ../libvips/convolution/im_aconv.c:981 #: ../libvips/convolution/im_aconv.c:1202 #: ../libvips/morphology/morphology.c:722 msgid "image too small for mask" msgstr "" #: ../libvips/convolution/im_conv.c:1126 #: ../libvips/convolution/im_conv_f.c:404 msgid "expect 1xN or Nx1 input mask" msgstr "" #: ../libvips/convolution/im_fastcor.c:135 #: ../libvips/convolution/im_spcor.c:252 msgid "ref not smaller than or equal to in" msgstr "" #: ../libvips/convolution/im_contrast_surface.c:148 msgid "parameters would result in zero size output image" msgstr "" #: ../libvips/convolution/im_aconvsep.c:131 #: ../libvips/convolution/im_aconv.c:224 ../libvips/convolution/im_aconv.c:230 #: ../libvips/convolution/im_aconv.c:751 msgid "mask too complex" msgstr "" #: ../libvips/convolution/im_sharpen.c:326 #: ../libvips/histograms_lut/im_stdif.c:197 msgid "parameters out of range" msgstr "" #: ../libvips/foreign/rawsave.c:160 msgid "save image to raw file" msgstr "" #: ../libvips/foreign/rawsave.c:167 ../libvips/foreign/radload.c:127 #: ../libvips/foreign/tiffload.c:150 ../libvips/foreign/ppmsave.c:119 #: ../libvips/foreign/vipsload.c:134 ../libvips/foreign/pngload.c:137 #: ../libvips/foreign/openexrload.c:138 ../libvips/foreign/tiffsave.c:172 #: ../libvips/foreign/analyzeload.c:127 ../libvips/foreign/jpegsave.c:194 #: ../libvips/foreign/fitsload.c:117 ../libvips/foreign/ppmload.c:127 #: ../libvips/foreign/csvload.c:133 ../libvips/foreign/magickload.c:147 #: ../libvips/foreign/openslideload.c:176 ../libvips/foreign/csvsave.c:122 #: ../libvips/foreign/jpegload.c:246 ../libvips/foreign/rawload.c:116 #: ../libvips/foreign/matload.c:129 ../libvips/foreign/fitssave.c:129 #: ../libvips/foreign/radsave.c:120 ../libvips/foreign/vipssave.c:123 #: ../libvips/foreign/pngsave.c:169 ../libvips/iofuncs/image.c:961 msgid "Filename" msgstr "" #: ../libvips/foreign/rawsave.c:168 ../libvips/foreign/ppmsave.c:120 #: ../libvips/foreign/tiffsave.c:173 ../libvips/foreign/jpegsave.c:195 #: ../libvips/foreign/csvsave.c:123 ../libvips/foreign/fitssave.c:130 #: ../libvips/foreign/radsave.c:121 ../libvips/foreign/vipssave.c:124 #: ../libvips/foreign/pngsave.c:170 msgid "Filename to save to" msgstr "" #: ../libvips/foreign/rawsave.c:267 msgid "write raw image to file descriptor" msgstr "" #: ../libvips/foreign/rawsave.c:274 msgid "File descriptor" msgstr "" #: ../libvips/foreign/rawsave.c:275 msgid "File descriptor to write to" msgstr "" #: ../libvips/foreign/radload.c:115 msgid "load a Radiance image from a file" msgstr "" #: ../libvips/foreign/radload.c:128 ../libvips/foreign/tiffload.c:151 #: ../libvips/foreign/vipsload.c:135 ../libvips/foreign/pngload.c:138 #: ../libvips/foreign/openexrload.c:139 ../libvips/foreign/analyzeload.c:128 #: ../libvips/foreign/fitsload.c:118 ../libvips/foreign/ppmload.c:128 #: ../libvips/foreign/csvload.c:134 ../libvips/foreign/magickload.c:148 #: ../libvips/foreign/openslideload.c:177 ../libvips/foreign/jpegload.c:247 #: ../libvips/foreign/rawload.c:117 ../libvips/foreign/matload.c:130 msgid "Filename to load from" msgstr "" #: ../libvips/foreign/tiffload.c:138 msgid "load tiff from file" msgstr "" #: ../libvips/foreign/tiffload.c:157 msgid "Page" msgstr "" #: ../libvips/foreign/tiffload.c:158 msgid "Load this page from the file" msgstr "" #: ../libvips/foreign/magick2vips.c:216 #, c-format msgid "unsupported image type %d" msgstr "" #: ../libvips/foreign/magick2vips.c:276 #, c-format msgid "unsupported bit depth %d" msgstr "" #: ../libvips/foreign/magick2vips.c:308 #, c-format msgid "unsupported colorspace %d" msgstr "unsupported colourspace %d" #: ../libvips/foreign/magick2vips.c:623 msgid "unable to read pixels" msgstr "" #: ../libvips/foreign/magick2vips.c:663 #, c-format msgid "" "unable to read file \"%s\"\n" "libMagick error: %s %s" msgstr "" #: ../libvips/foreign/magick2vips.c:701 #, c-format msgid "" "unable to ping file \"%s\"\n" "libMagick error: %s %s" msgstr "" #: ../libvips/foreign/magick2vips.c:712 msgid "bad image size" msgstr "" #: ../libvips/foreign/ppmsave.c:110 msgid "save image to ppm file" msgstr "" #: ../libvips/foreign/ppmsave.c:126 msgid "ASCII" msgstr "" #: ../libvips/foreign/ppmsave.c:127 msgid "save as ascii" msgstr "" #: ../libvips/foreign/vipsload.c:122 msgid "load vips from file" msgstr "" #: ../libvips/foreign/pngload.c:125 msgid "load png from file" msgstr "" #: ../libvips/foreign/analyze2vips.c:309 msgid "header file size incorrect" msgstr "" #: ../libvips/foreign/analyze2vips.c:354 msgid "header size incorrect" msgstr "" #: ../libvips/foreign/analyze2vips.c:372 #, c-format msgid "%d-dimensional images not supported" msgstr "" #: ../libvips/foreign/analyze2vips.c:425 #, c-format msgid "datatype %d not supported" msgstr "" #: ../libvips/foreign/jpeg2vips.c:175 #, c-format msgid "read gave %ld warnings" msgstr "" #: ../libvips/foreign/jpeg2vips.c:514 msgid "error reading resolution" msgstr "" #: ../libvips/foreign/jpeg2vips.c:544 ../libvips/foreign/vips2jpeg.c:482 msgid "unknown EXIF resolution unit" msgstr "" #: ../libvips/foreign/jpeg2vips.c:730 msgid "unknown JFIF resolution unit" msgstr "" #: ../libvips/foreign/radiance.c:888 msgid "error reading radiance header" msgstr "" #: ../libvips/foreign/radiance.c:962 ../libvips/foreign/tiff2vips.c:1356 msgid "read error" msgstr "" #: ../libvips/foreign/openexrload.c:126 msgid "load an OpenEXR image" msgstr "" #: ../libvips/foreign/tiffsave.c:162 msgid "save image to tiff file" msgstr "" #: ../libvips/foreign/tiffsave.c:179 ../libvips/foreign/pngsave.c:106 msgid "Compression" msgstr "" #: ../libvips/foreign/tiffsave.c:180 msgid "Compression for this file" msgstr "" #: ../libvips/foreign/tiffsave.c:187 ../libvips/foreign/jpegsave.c:125 msgid "Q" msgstr "" #: ../libvips/foreign/tiffsave.c:188 ../libvips/foreign/jpegsave.c:126 msgid "Q factor" msgstr "" #: ../libvips/foreign/tiffsave.c:194 msgid "predictor" msgstr "" #: ../libvips/foreign/tiffsave.c:195 msgid "Compression prediction" msgstr "" #: ../libvips/foreign/tiffsave.c:202 ../libvips/foreign/jpegsave.c:132 msgid "profile" msgstr "" #: ../libvips/foreign/tiffsave.c:203 ../libvips/foreign/jpegsave.c:133 msgid "ICC profile to embed" msgstr "" #: ../libvips/foreign/tiffsave.c:209 msgid "Tile" msgstr "" #: ../libvips/foreign/tiffsave.c:210 msgid "Write a tiled tiff" msgstr "" #: ../libvips/foreign/tiffsave.c:230 msgid "Pyramid" msgstr "" #: ../libvips/foreign/tiffsave.c:231 msgid "Write a pyramidal tiff" msgstr "" #: ../libvips/foreign/tiffsave.c:237 msgid "Squash" msgstr "" #: ../libvips/foreign/tiffsave.c:238 msgid "Squash images down to 1 bit" msgstr "" #: ../libvips/foreign/tiffsave.c:244 ../libvips/foreign/tiffsave.c:245 msgid "Resolution unit" msgstr "" #: ../libvips/foreign/tiffsave.c:266 msgid "Bigtiff" msgstr "" #: ../libvips/foreign/tiffsave.c:267 msgid "Write a bigtiff image" msgstr "" #: ../libvips/foreign/dzsave.c:337 #, c-format msgid "Directory \"%s\" exists" msgstr "" #: ../libvips/foreign/dzsave.c:1167 msgid "overlap must be less than tile width and height" msgstr "" #: ../libvips/foreign/dzsave.c:1301 msgid "save image to deep zoom format" msgstr "" #: ../libvips/foreign/dzsave.c:1311 ../libvips/foreign/dzsave.c:1372 msgid "Base name" msgstr "" #: ../libvips/foreign/dzsave.c:1312 ../libvips/foreign/dzsave.c:1373 msgid "Base name to save to" msgstr "" #: ../libvips/foreign/dzsave.c:1318 msgid "Layout" msgstr "" #: ../libvips/foreign/dzsave.c:1319 msgid "Directory layout" msgstr "" #: ../libvips/foreign/dzsave.c:1326 msgid "suffix" msgstr "" #: ../libvips/foreign/dzsave.c:1327 msgid "Filename suffix for tiles" msgstr "" #: ../libvips/foreign/dzsave.c:1333 msgid "Overlap" msgstr "" #: ../libvips/foreign/dzsave.c:1334 msgid "Tile overlap in pixels" msgstr "" #: ../libvips/foreign/dzsave.c:1340 msgid "Tile size" msgstr "" #: ../libvips/foreign/dzsave.c:1341 msgid "Tile size in pixels" msgstr "" #: ../libvips/foreign/dzsave.c:1355 msgid "Pyramid depth" msgstr "" #: ../libvips/foreign/dzsave.c:1362 msgid "Center" msgstr "" #: ../libvips/foreign/dzsave.c:1363 msgid "Center image in tile" msgstr "" #: ../libvips/foreign/analyzeload.c:115 msgid "load an Analyze6 image" msgstr "" #: ../libvips/foreign/jpegsave.c:119 msgid "save jpeg" msgstr "" #: ../libvips/foreign/jpegsave.c:188 msgid "save image to jpeg file" msgstr "" #: ../libvips/foreign/jpegsave.c:257 msgid "save image to jpeg buffer" msgstr "" #: ../libvips/foreign/jpegsave.c:261 ../libvips/foreign/jpegload.c:316 #: ../libvips/foreign/pngsave.c:231 msgid "Buffer" msgstr "" #: ../libvips/foreign/jpegsave.c:262 ../libvips/foreign/pngsave.c:232 msgid "Buffer to save to" msgstr "" #: ../libvips/foreign/jpegsave.c:304 msgid "error writing output" msgstr "" #: ../libvips/foreign/jpegsave.c:320 msgid "save image to jpeg mime" msgstr "" #: ../libvips/foreign/vips2jpeg.c:142 #, c-format msgid "%s" msgstr "" #: ../libvips/foreign/vips2jpeg.c:496 msgid "error setting JPEG resolution" msgstr "" #: ../libvips/foreign/vips2jpeg.c:516 msgid "error setting JPEG dimensions" msgstr "" #: ../libvips/foreign/vips2jpeg.c:691 msgid "error saving EXIF" msgstr "" #: ../libvips/foreign/ppm.c:110 msgid "bad int" msgstr "" #: ../libvips/foreign/ppm.c:122 msgid "bad float" msgstr "" #: ../libvips/foreign/ppm.c:173 msgid "bad magic number" msgstr "" #: ../libvips/foreign/ppm.c:223 msgid "not whitespace before start of binary data" msgstr "" #: ../libvips/foreign/ppm.c:604 ../libvips/foreign/ppm.c:616 msgid "write error ... disc full?" msgstr "" #: ../libvips/foreign/ppm.c:721 msgid "binary >8 bit images must be float" msgstr "" #: ../libvips/foreign/fitsload.c:108 msgid "load a FITS image" msgstr "" #: ../libvips/foreign/ppmload.c:115 msgid "load ppm from file" msgstr "" #: ../libvips/foreign/csvload.c:122 msgid "load csv from file" msgstr "" #: ../libvips/foreign/csvload.c:140 msgid "Skip" msgstr "" #: ../libvips/foreign/csvload.c:141 msgid "Skip this many lines at the start of the file" msgstr "" #: ../libvips/foreign/csvload.c:147 msgid "Lines" msgstr "" #: ../libvips/foreign/csvload.c:148 msgid "Read this many lines from the file" msgstr "" #: ../libvips/foreign/csvload.c:154 msgid "Whitespace" msgstr "" #: ../libvips/foreign/csvload.c:155 msgid "Set of whitespace characters" msgstr "" #: ../libvips/foreign/csvload.c:161 ../libvips/foreign/csvsave.c:129 msgid "Separator" msgstr "" #: ../libvips/foreign/csvload.c:162 msgid "Set of separator characters" msgstr "" #: ../libvips/foreign/magickload.c:132 msgid "load file with ImageMagick" msgstr "" #: ../libvips/foreign/openslideload.c:159 msgid "load file with OpenSlide" msgstr "" #: ../libvips/foreign/openslideload.c:183 msgid "Level" msgstr "" #: ../libvips/foreign/openslideload.c:184 msgid "Load this level from the file" msgstr "" #: ../libvips/foreign/openslideload.c:190 msgid "Associated" msgstr "" #: ../libvips/foreign/openslideload.c:191 msgid "Load this associated image" msgstr "" #: ../libvips/foreign/csvsave.c:113 msgid "save image to csv file" msgstr "" #: ../libvips/foreign/csvsave.c:130 msgid "Separator characters" msgstr "" #: ../libvips/foreign/jpegload.c:119 #, c-format msgid "bad shrink factor %d" msgstr "" #: ../libvips/foreign/jpegload.c:141 msgid "load jpeg" msgstr "" #: ../libvips/foreign/jpegload.c:147 msgid "Shrink" msgstr "" #: ../libvips/foreign/jpegload.c:148 msgid "Shrink factor on load" msgstr "" #: ../libvips/foreign/jpegload.c:154 msgid "Fail" msgstr "" #: ../libvips/foreign/jpegload.c:155 msgid "Fail on first warning" msgstr "" #: ../libvips/foreign/jpegload.c:235 msgid "load jpeg from file" msgstr "" #: ../libvips/foreign/jpegload.c:310 msgid "load jpeg from buffer" msgstr "" #: ../libvips/foreign/jpegload.c:317 msgid "Buffer to load from" msgstr "" #: ../libvips/foreign/rawload.c:108 msgid "load raw data from a file" msgstr "" #: ../libvips/foreign/rawload.c:144 ../libvips/iofuncs/image.c:989 msgid "Size of header" msgstr "" #: ../libvips/foreign/rawload.c:145 ../libvips/iofuncs/image.c:990 msgid "Offset in bytes from start of file" msgstr "" #: ../libvips/foreign/openexr2vips.c:116 #, c-format msgid "EXR error: %s" msgstr "" #: ../libvips/foreign/tiff2vips.c:280 ../libvips/foreign/tiff2vips.c:298 #, c-format msgid "required field %d missing" msgstr "" #: ../libvips/foreign/tiff2vips.c:318 #, c-format msgid "required field %d = %d, not %d" msgstr "" #: ../libvips/foreign/tiff2vips.c:662 #, c-format msgid "%d bits per sample palette image not supported" msgstr "" #: ../libvips/foreign/tiff2vips.c:671 msgid "bad colormap" msgstr "bad colourmap" #: ../libvips/foreign/tiff2vips.c:728 ../libvips/foreign/tiff2vips.c:759 msgid "3 or 4 bands RGB TIFF only" msgstr "" #: ../libvips/foreign/tiff2vips.c:830 msgid "4 or 5 bands CMYK TIFF only" msgstr "" #: ../libvips/foreign/tiff2vips.c:881 msgid "unknown resolution unit" msgstr "" #: ../libvips/foreign/tiff2vips.c:886 #, c-format msgid "" "no resolution information for TIFF image \"%s\" -- defaulting to 1 pixel per " "mm" msgstr "" #: ../libvips/foreign/tiff2vips.c:918 msgid "not a PLANARCONFIG_CONTIG image" msgstr "" #: ../libvips/foreign/tiff2vips.c:964 #, c-format msgid "unsupported sample format %d for lab image" msgstr "" #: ../libvips/foreign/tiff2vips.c:974 #, c-format msgid "unsupported depth %d for LAB image" msgstr "" #: ../libvips/foreign/tiff2vips.c:1013 #, c-format msgid "unsupported sample format %d for greyscale image" msgstr "" #: ../libvips/foreign/tiff2vips.c:1022 #, c-format msgid "unsupported depth %d for greyscale image" msgstr "" #: ../libvips/foreign/tiff2vips.c:1070 #, c-format msgid "unsupported sample format %d for rgb image" msgstr "" #: ../libvips/foreign/tiff2vips.c:1079 #, c-format msgid "unsupported depth %d for RGB image" msgstr "" #: ../libvips/foreign/tiff2vips.c:1093 #, c-format msgid "unknown photometric interpretation %d" msgstr "" #: ../libvips/foreign/tiff2vips.c:1474 #, c-format msgid "bad page number %d" msgstr "" #: ../libvips/foreign/tiff2vips.c:1495 ../libvips/foreign/vips2tiff.c:295 #, c-format msgid "unable to open \"%s\" for input" msgstr "" #: ../libvips/foreign/tiff2vips.c:1548 ../libvips/foreign/tiff2vips.c:1577 #, c-format msgid "TIFF file does not contain page %d" msgstr "" #: ../libvips/foreign/csv.c:184 #, c-format msgid "error parsing number, line %d, column %d" msgstr "" #: ../libvips/foreign/csv.c:238 msgid "end of file while skipping start" msgstr "" #: ../libvips/foreign/csv.c:247 ../libvips/iofuncs/util.c:1085 #: ../libvips/iofuncs/util.c:1091 msgid "unable to seek" msgstr "" #: ../libvips/foreign/csv.c:258 msgid "empty line" msgstr "" #: ../libvips/foreign/csv.c:302 #, c-format msgid "unexpected EOF, line %d col %d" msgstr "" #: ../libvips/foreign/csv.c:308 #, c-format msgid "unexpected EOL, line %d col %d" msgstr "" #: ../libvips/foreign/matload.c:117 msgid "load mat from file" msgstr "" #: ../libvips/foreign/fitssave.c:120 msgid "save image to fits file" msgstr "" #: ../libvips/foreign/radsave.c:109 msgid "save image to Radiance file" msgstr "" #: ../libvips/foreign/vipssave.c:112 msgid "save image to vips file" msgstr "" #: ../libvips/foreign/fits.c:179 ../libvips/foreign/matlab.c:107 #: ../libvips/iofuncs/vips.c:148 ../libvips/mosaicing/global_balance.c:1192 #: ../libvips/mosaicing/global_balance.c:1527 #, c-format msgid "unable to open \"%s\"" msgstr "" #: ../libvips/foreign/fits.c:241 msgid "dimensions above 3 must be size 1" msgstr "" #: ../libvips/foreign/fits.c:257 #, c-format msgid "bad number of axis %d" msgstr "" #: ../libvips/foreign/fits.c:273 #, c-format msgid "unsupported bitpix %d\n" msgstr "" #: ../libvips/foreign/fits.c:577 ../libvips/iofuncs/vips.c:176 #, c-format msgid "unable to write to \"%s\"" msgstr "" #: ../libvips/foreign/fits.c:638 #, c-format msgid "unsupported BandFmt %d\n" msgstr "" #: ../libvips/foreign/openslide2vips.c:151 msgid "invalid associated image name" msgstr "" #: ../libvips/foreign/openslide2vips.c:168 msgid "specify only one of level or associated image" msgstr "" #: ../libvips/foreign/openslide2vips.c:189 msgid "unsupported slide format" msgstr "" #: ../libvips/foreign/openslide2vips.c:196 #, c-format msgid "opening slide: %s" msgstr "" #: ../libvips/foreign/openslide2vips.c:203 msgid "invalid slide level" msgstr "" #: ../libvips/foreign/openslide2vips.c:250 #, c-format msgid "getting dimensions: %s" msgstr "" #: ../libvips/foreign/openslide2vips.c:257 msgid "image dimensions overflow int" msgstr "" #: ../libvips/foreign/openslide2vips.c:328 #, c-format msgid "reading region: %s" msgstr "" #: ../libvips/foreign/openslide2vips.c:425 #, c-format msgid "reading associated image: %s" msgstr "" #: ../libvips/foreign/pngsave.c:98 msgid "save png" msgstr "" #: ../libvips/foreign/pngsave.c:107 msgid "Compression factor" msgstr "" #: ../libvips/foreign/pngsave.c:113 msgid "Interlace" msgstr "" #: ../libvips/foreign/pngsave.c:114 msgid "Interlace image" msgstr "" #: ../libvips/foreign/pngsave.c:165 msgid "save image to png file" msgstr "" #: ../libvips/foreign/pngsave.c:227 msgid "save image to png buffer" msgstr "" #: ../libvips/foreign/vips2tiff.c:279 #, c-format msgid "unable to open \"%s\" for output" msgstr "" #: ../libvips/foreign/vips2tiff.c:706 msgid "layer buffer exhausted -- try making TIFF output tiles smaller" msgstr "" #: ../libvips/foreign/vips2tiff.c:937 msgid "TIFF write tile failed" msgstr "" #: ../libvips/foreign/vips2tiff.c:1013 msgid "internal error #9876345" msgstr "" #: ../libvips/foreign/vips2tiff.c:1282 msgid "tile size not a multiple of 16" msgstr "" #: ../libvips/foreign/vips2tiff.c:1288 msgid "can't have strip pyramid -- enabling tiling" msgstr "" #: ../libvips/foreign/vips2tiff.c:1299 msgid "can only pyramid LABQ and non-complex images" msgstr "" #: ../libvips/foreign/vips2tiff.c:1316 msgid "can't have 1-bit JPEG -- disabling JPEG" msgstr "" #: ../libvips/foreign/vips2tiff.c:1508 msgid "unsigned 8-bit int, 16-bit int, and 32-bit float only" msgstr "" #: ../libvips/foreign/vips2tiff.c:1515 msgid "1 to 5 bands only" msgstr "" #: ../libvips/foreign/foreign.c:388 msgid "load and save image files" msgstr "" #: ../libvips/foreign/foreign.c:529 ../libvips/mosaicing/im_remosaic.c:77 #, c-format msgid "file \"%s\" not found" msgstr "" #: ../libvips/foreign/foreign.c:538 ../libvips/foreign/foreign.c:1030 #, c-format msgid "\"%s\" is not a known file format" msgstr "" #: ../libvips/foreign/foreign.c:748 msgid "images do not match" msgstr "" #: ../libvips/foreign/foreign.c:841 msgid "" "VIPS_FOREIGN_PARTIAL and VIPS_FOREIGN_SEQUENTIAL both set -- using SEQUENTIAL" msgstr "" #: ../libvips/foreign/foreign.c:927 msgid "file loaders" msgstr "" #: ../libvips/foreign/foreign.c:938 msgid "Flags" msgstr "" #: ../libvips/foreign/foreign.c:939 msgid "Flags for this file" msgstr "" #: ../libvips/foreign/foreign.c:945 msgid "Disc" msgstr "" #: ../libvips/foreign/foreign.c:946 msgid "Open to disc" msgstr "" #: ../libvips/foreign/foreign.c:952 msgid "Sequential" msgstr "" #: ../libvips/foreign/foreign.c:953 msgid "Sequential read only" msgstr "" #: ../libvips/foreign/foreign.c:1344 msgid "file savers" msgstr "" #: ../libvips/foreign/foreign.c:1362 msgid "Image to save" msgstr "" #: ../libvips/foreign/vipspng.c:245 msgid "unsupported color type" msgstr "unsupported colour type" #: ../libvips/foreign/vipspng.c:355 msgid "unable to read PNG header" msgstr "" #: ../libvips/foreign/vipspng.c:647 msgid "compress should be in [0,9]" msgstr "" #: ../libvips/foreign/vipspng.c:754 #, c-format msgid "unable to write \"%s\"" msgstr "" #: ../libvips/foreign/vipspng.c:857 msgid "unable to write to buffer" msgstr "" #: ../libvips/foreign/matlab.c:115 #, c-format msgid "no matrix variables in \"%s\"" msgstr "" #: ../libvips/foreign/matlab.c:176 #, c-format msgid "unsupported rank %d\n" msgstr "" #: ../libvips/foreign/matlab.c:189 #, c-format msgid "unsupported class type %d\n" msgstr "" #: ../libvips/foreign/matlab.c:237 msgid "Mat_VarReadDataAll failed" msgstr "" #: ../libvips/freq_filt/im_fractsurf.c:73 msgid "dimension should be in (2,3)" msgstr "" #: ../libvips/freq_filt/im_freq_mask.c:109 msgid "mask sizes power of 2 only" msgstr "" #: ../libvips/freq_filt/im_freq_mask.c:156 msgid "unimplemented mask type" msgstr "" #: ../libvips/freq_filt/im_fwfft.c:126 ../libvips/freq_filt/im_fwfft.c:242 #: ../libvips/freq_filt/im_invfftr.c:125 ../libvips/freq_filt/im_invfft.c:106 msgid "unable to create transform plan" msgstr "" #: ../libvips/freq_filt/im_fwfft.c:302 ../libvips/freq_filt/im_invfftr.c:146 #: ../libvips/freq_filt/im_invfft.c:131 msgid "vips configured without FFT support" msgstr "" #: ../libvips/freq_filt/fmaskcir.c:159 ../libvips/freq_filt/fmaskcir.c:304 #: ../libvips/freq_filt/fmaskcir.c:395 ../libvips/freq_filt/fmaskcir.c:477 #: ../libvips/freq_filt/fmaskcir.c:557 msgid "bad sizes" msgstr "" #: ../libvips/freq_filt/fmaskcir.c:173 ../libvips/freq_filt/fmaskcir.c:229 #: ../libvips/freq_filt/fmaskcir.c:243 ../libvips/freq_filt/fmaskcir.c:318 #: ../libvips/freq_filt/fmaskcir.c:322 ../libvips/freq_filt/fmaskcir.c:409 #: ../libvips/freq_filt/fmaskcir.c:413 ../libvips/freq_filt/fmaskcir.c:571 #: ../libvips/freq_filt/fmaskcir.c:575 ../libvips/freq_filt/fmask4th.c:121 #: ../libvips/freq_filt/fmask4th.c:130 ../libvips/freq_filt/fmask4th.c:164 #: ../libvips/freq_filt/fmask4th.c:173 ../libvips/freq_filt/fmask4th.c:206 #: ../libvips/freq_filt/fmask4th.c:215 ../libvips/freq_filt/fmask4th.c:253 #: ../libvips/freq_filt/fmask4th.c:262 ../libvips/freq_filt/fmask4th.c:293 #: ../libvips/freq_filt/fmask4th.c:302 ../libvips/freq_filt/fmask4th.c:334 #: ../libvips/freq_filt/fmask4th.c:343 ../libvips/freq_filt/fmask4th.c:374 #: ../libvips/freq_filt/fmask4th.c:388 ../libvips/freq_filt/fmask4th.c:424 #: ../libvips/freq_filt/fmask4th.c:438 ../libvips/freq_filt/fmask4th.c:474 #: ../libvips/freq_filt/fmask4th.c:488 ../libvips/freq_filt/fmask4th.c:528 #: ../libvips/freq_filt/fmask4th.c:542 ../libvips/freq_filt/fmask4th.c:579 #: ../libvips/freq_filt/fmask4th.c:593 ../libvips/freq_filt/fmask4th.c:630 #: ../libvips/freq_filt/fmask4th.c:644 ../libvips/freq_filt/fmask4th.c:698 msgid "bad args" msgstr "" #: ../libvips/freq_filt/fmaskcir.c:491 msgid "bad args (f)" msgstr "" #: ../libvips/freq_filt/fmaskcir.c:495 msgid "bad args (ac)" msgstr "" #: ../libvips/freq_filt/fmaskcir.c:656 ../libvips/freq_filt/fmask4th.c:792 msgid "unimplemented mask" msgstr "" #: ../libvips/histograms_lut/im_buildlut.c:121 msgid "x value not an int" msgstr "" #: ../libvips/histograms_lut/im_buildlut.c:134 msgid "x range too small" msgstr "" #: ../libvips/histograms_lut/im_buildlut.c:279 msgid "bad input matrix size" msgstr "" #: ../libvips/histograms_lut/im_histnD.c:228 #, c-format msgid " bins out of range [1,%d]" msgstr "" #: ../libvips/histograms_lut/im_stdif.c:187 #: ../libvips/histograms_lut/im_lhisteq.c:160 msgid "window too large" msgstr "" #: ../libvips/histograms_lut/im_stdif.c:192 #: ../libvips/histograms_lut/im_lhisteq.c:165 msgid "window too small" msgstr "" #: ../libvips/histograms_lut/im_invertlut.c:133 msgid "element out of range [0,1]" msgstr "" #: ../libvips/histograms_lut/im_invertlut.c:288 msgid "bad input matrix" msgstr "" #: ../libvips/histograms_lut/im_invertlut.c:293 msgid "bad lut_size" msgstr "" #: ../libvips/histograms_lut/tone.c:195 msgid "bad in_max, out_max parameters" msgstr "" #: ../libvips/histograms_lut/tone.c:200 msgid "bad Lb, Lw parameters" msgstr "" #: ../libvips/histograms_lut/tone.c:205 msgid "Ps not in range [0.0,1.0]" msgstr "" #: ../libvips/histograms_lut/tone.c:210 msgid "Pm not in range [0.0,1.0]" msgstr "" #: ../libvips/histograms_lut/tone.c:215 msgid "Ph not in range [0.0,1.0]" msgstr "" #: ../libvips/histograms_lut/tone.c:220 msgid "S not in range [-30,+30]" msgstr "" #: ../libvips/histograms_lut/tone.c:225 msgid "M not in range [-30,+30]" msgstr "" #: ../libvips/histograms_lut/tone.c:230 msgid "H not in range [-30,+30]" msgstr "" #: ../libvips/histograms_lut/im_identity.c:140 #: ../libvips/other/im_make_xy.c:96 ../libvips/other/im_grey.c:102 msgid "bad size" msgstr "" #: ../libvips/histograms_lut/im_maplut.c:98 #, c-format msgid "%d overflows detected" msgstr "" #: ../libvips/inplace/im_draw_line.c:390 msgid "mask image not 1 band 8 bit uncoded" msgstr "" #: ../libvips/inplace/im_draw_line.c:396 msgid "ink image does not match in image" msgstr "" #: ../libvips/inplace/im_draw_line.c:400 msgid "ink image not 1x1 pixels" msgstr "" #: ../libvips/iofuncs/operation.c:277 msgid "operations" msgstr "" #: ../libvips/iofuncs/operation.c:319 msgid "usage:" msgstr "" #: ../libvips/iofuncs/operation.c:333 ../libvips/iofuncs/object.c:1243 #: ../libvips/resample/interpolate.c:611 #, c-format msgid "class \"%s\" not found" msgstr "" #: ../libvips/iofuncs/operation.c:714 #, c-format msgid "unknown argument '%s'" msgstr "" #: ../libvips/iofuncs/operation.c:832 msgid "too few arguments" msgstr "" #: ../libvips/iofuncs/operation.c:953 msgid "too many arguments" msgstr "" #: ../libvips/iofuncs/sinkdisc.c:122 msgid "per-thread state for sinkdisc" msgstr "" #: ../libvips/iofuncs/sinkdisc.c:257 ../libvips/iofuncs/util.c:669 msgid "write failed" msgstr "" #: ../libvips/iofuncs/vips.c:291 #, c-format msgid "\"%s\" is not a VIPS image" msgstr "" #: ../libvips/iofuncs/vips.c:379 msgid "unable to read history" msgstr "" #: ../libvips/iofuncs/vips.c:412 msgid "more than a 10 megabytes of XML? sufferin' succotash!" msgstr "" #: ../libvips/iofuncs/vips.c:460 msgid "incorrect namespace in XML" msgstr "" #: ../libvips/iofuncs/vips.c:584 msgid "error transforming from save format" msgstr "" #: ../libvips/iofuncs/vips.c:685 #, c-format msgid "unable to set property \"%s\" to value \"%s\"." msgstr "" #: ../libvips/iofuncs/vips.c:733 msgid "error transforming to save format" msgstr "" #: ../libvips/iofuncs/vips.c:781 ../libvips/iofuncs/vips.c:986 #: ../libvips/iofuncs/window.c:238 msgid "file has been truncated" msgstr "" #: ../libvips/iofuncs/vips.c:895 ../libvips/iofuncs/vips.c:904 #: ../libvips/iofuncs/vips.c:927 msgid "xml save error" msgstr "" #: ../libvips/iofuncs/vips.c:972 #, c-format msgid "unable to read header for \"%s\"" msgstr "" #: ../libvips/iofuncs/vips.c:985 ../libvips/iofuncs/window.c:237 #, c-format msgid "unable to read data for \"%s\", %s" msgstr "" #: ../libvips/iofuncs/vips.c:997 #, c-format msgid "error reading XML: %s" msgstr "" #: ../libvips/iofuncs/sinkscreen.c:178 msgid "per-thread state for render" msgstr "" #: ../libvips/iofuncs/sinkmemory.c:109 msgid "per-thread state for sinkmemory" msgstr "" #: ../libvips/iofuncs/header.c:211 #, c-format msgid "unknown band format %d" msgstr "" #: ../libvips/iofuncs/header.c:751 ../libvips/iofuncs/generate.c:379 msgid "too many images" msgstr "" #: ../libvips/iofuncs/header.c:921 #, c-format msgid "field \"%s\" not found" msgstr "" #: ../libvips/iofuncs/header.c:1089 #, c-format msgid "field \"%s\" is of type %s, not %s" msgstr "" #: ../libvips/iofuncs/image.c:292 msgid "unable to close fd" msgstr "" #: ../libvips/iofuncs/image.c:372 #, c-format msgid "%dx%d %s, %d band, %s" msgid_plural "%dx%d %s, %d bands, %s" msgstr[0] "" msgstr[1] "" #: ../libvips/iofuncs/image.c:406 #, c-format msgid " %s, %d band, %s" msgid_plural " %s, %d bands, %s" msgstr[0] "" msgstr[1] "" #: ../libvips/iofuncs/image.c:542 #, c-format msgid "%s %s: %d x %d pixels, %d threads, %d x %d tiles, %d lines in buffer" msgstr "" #: ../libvips/iofuncs/image.c:557 #, c-format msgid "%s %s: %d%% complete" msgstr "" #. Spaces at end help to erase the %complete message we overwrite. #. #: ../libvips/iofuncs/image.c:574 #, c-format msgid "%s %s: done in %.3gs \n" msgstr "" #: ../libvips/iofuncs/image.c:764 #, c-format msgid "unable to open \"%s\", file too short" msgstr "" #: ../libvips/iofuncs/image.c:774 #, c-format msgid "%s is longer than expected" msgstr "" #: ../libvips/iofuncs/image.c:791 #, c-format msgid "bad mode \"%s\"" msgstr "" #: ../libvips/iofuncs/image.c:864 msgid "image class" msgstr "" #: ../libvips/iofuncs/image.c:962 msgid "Image filename" msgstr "" #: ../libvips/iofuncs/image.c:968 msgid "Mode" msgstr "" #: ../libvips/iofuncs/image.c:969 msgid "Open mode" msgstr "" #: ../libvips/iofuncs/image.c:975 msgid "Kill" msgstr "" #: ../libvips/iofuncs/image.c:976 msgid "Block evaluation on this image" msgstr "" #: ../libvips/iofuncs/image.c:982 msgid "Demand style" msgstr "" #: ../libvips/iofuncs/image.c:983 msgid "Preferred demand style for this image" msgstr "" #: ../libvips/iofuncs/image.c:996 msgid "Foreign buffer" msgstr "" #: ../libvips/iofuncs/image.c:997 msgid "Pointer to foreign pixels" msgstr "" #: ../libvips/iofuncs/image.c:1304 #, c-format msgid "killed for image \"%s\"" msgstr "" #: ../libvips/iofuncs/image.c:1917 msgid "bad image descriptor" msgstr "" #: ../libvips/iofuncs/image.c:1975 ../libvips/iofuncs/generate.c:719 #, c-format msgid "unable to output to a %s image" msgstr "" #: ../libvips/iofuncs/image.c:2039 #, c-format msgid "auto-rewind for %s failed" msgstr "" #: ../libvips/iofuncs/image.c:2095 ../libvips/iofuncs/image.c:2291 #: ../libvips/iofuncs/image.c:2308 msgid "no image data" msgstr "" #: ../libvips/iofuncs/image.c:2163 ../libvips/iofuncs/image.c:2331 msgid "image not readable" msgstr "" #: ../libvips/iofuncs/image.c:2184 ../libvips/iofuncs/image.c:2361 #: ../libvips/iofuncs/image.c:2370 msgid "image already written" msgstr "" #: ../libvips/iofuncs/image.c:2208 ../libvips/iofuncs/image.c:2382 msgid "image not writeable" msgstr "" #: ../libvips/iofuncs/image.c:2255 msgid "bad file type" msgstr "" #: ../libvips/iofuncs/region.c:213 #, c-format msgid "start function failed for image %s" msgstr "" #: ../libvips/iofuncs/region.c:532 ../libvips/iofuncs/region.c:602 #: ../libvips/iofuncs/region.c:749 ../libvips/iofuncs/region.c:1246 msgid "valid clipped to nothing" msgstr "" #: ../libvips/iofuncs/region.c:646 msgid "bad image type" msgstr "" #: ../libvips/iofuncs/region.c:691 msgid "no pixel data on attached image" msgstr "" #: ../libvips/iofuncs/region.c:697 msgid "images do not match in pixel size" msgstr "" #: ../libvips/iofuncs/region.c:730 ../libvips/iofuncs/region.c:1228 msgid "dest too small" msgstr "" #: ../libvips/iofuncs/region.c:817 msgid "bad position" msgstr "" #: ../libvips/iofuncs/region.c:1107 ../libvips/iofuncs/region.c:1299 #, c-format msgid "unable to input from a %s image" msgstr "" #: ../libvips/iofuncs/region.c:1131 msgid "incomplete header" msgstr "" #: ../libvips/iofuncs/region.c:1202 msgid "inappropriate region type" msgstr "" #: ../libvips/iofuncs/sink.c:106 #, c-format msgid "stop function failed for image \"%s\"" msgstr "" #: ../libvips/iofuncs/sink.c:143 #, c-format msgid "start function failed for image \"%s\"" msgstr "" #: ../libvips/iofuncs/sink.c:176 msgid "per-thread state for sink" msgstr "" #: ../libvips/iofuncs/error.c:214 msgid "windows error" msgstr "" #: ../libvips/iofuncs/error.c:223 msgid "unix error" msgstr "" #: ../libvips/iofuncs/error.c:314 ../libvips/iofuncs/error.c:316 #: ../libvips/iofuncs/error.c:365 ../libvips/iofuncs/error.c:367 #, c-format msgid "%s: " msgstr "" #: ../libvips/iofuncs/error.c:314 msgid "vips diagnostic" msgstr "" #: ../libvips/iofuncs/error.c:365 msgid "vips warning" msgstr "" #: ../libvips/iofuncs/error.c:456 msgid "image must be uncoded" msgstr "" #: ../libvips/iofuncs/error.c:484 msgid "image coding must be 'none' or 'labq'" msgstr "" #: ../libvips/iofuncs/error.c:512 msgid "unknown image coding" msgstr "" #: ../libvips/iofuncs/error.c:537 #, c-format msgid "coding '%s' only" msgstr "" #: ../libvips/iofuncs/error.c:562 msgid "image must one band" msgstr "" #: ../libvips/iofuncs/error.c:587 #, c-format msgid "image must have %d bands" msgstr "" #: ../libvips/iofuncs/error.c:612 msgid "image must have one or three bands" msgstr "" #: ../libvips/iofuncs/error.c:638 #, c-format msgid "image must have at least %d bands" msgstr "" #: ../libvips/iofuncs/error.c:666 msgid "images must have the same number of bands, or one must be single-band" msgstr "" #: ../libvips/iofuncs/error.c:693 #, c-format msgid "image must have 1 or %d bands" msgstr "" #: ../libvips/iofuncs/error.c:717 msgid "image must be non-complex" msgstr "" #: ../libvips/iofuncs/error.c:741 msgid "image must be complex" msgstr "" #: ../libvips/iofuncs/error.c:767 #, c-format msgid "image must be %s" msgstr "" #: ../libvips/iofuncs/error.c:792 msgid "image must be integer" msgstr "" #: ../libvips/iofuncs/error.c:817 msgid "image must be unsigned integer" msgstr "" #: ../libvips/iofuncs/error.c:845 msgid "image must be 8- or 16-bit integer, signed or unsigned" msgstr "" #: ../libvips/iofuncs/error.c:872 msgid "image must be 8- or 16-bit unsigned integer" msgstr "" #: ../libvips/iofuncs/error.c:898 msgid "image must be 8- or 16-bit unsigned integer, or float" msgstr "" #: ../libvips/iofuncs/error.c:926 msgid "image must be unsigned int or float" msgstr "" #: ../libvips/iofuncs/error.c:951 msgid "images must match in size" msgstr "" #: ../libvips/iofuncs/error.c:977 msgid "images must have the same number of bands" msgstr "" #: ../libvips/iofuncs/error.c:1031 msgid "images must have the same band format" msgstr "" #: ../libvips/iofuncs/error.c:1057 msgid "images must have the same coding" msgstr "" #: ../libvips/iofuncs/error.c:1080 #, c-format msgid "vector must have %d elements" msgstr "" #: ../libvips/iofuncs/error.c:1105 #, c-format msgid "vector must have 1 or %d elements" msgstr "" #: ../libvips/iofuncs/error.c:1130 msgid "histograms must have width or height 1" msgstr "" #: ../libvips/iofuncs/error.c:1135 msgid "histograms must have not have more than 65536 elements" msgstr "" #: ../libvips/iofuncs/error.c:1166 msgid "matrix image too large" msgstr "" #: ../libvips/iofuncs/error.c:1171 msgid "matrix image must have one band" msgstr "" #: ../libvips/iofuncs/error.c:1205 ../libvips/iofuncs/error.c:1233 msgid "nonsense mask parameters" msgstr "" #: ../libvips/iofuncs/error.c:1258 msgid "mask must be 1D" msgstr "" #: ../libvips/iofuncs/util.c:652 msgid "unable to get file stats" msgstr "" #: ../libvips/iofuncs/util.c:733 #, c-format msgid "unable to open file \"%s\" for reading" msgstr "" #: ../libvips/iofuncs/util.c:755 #, c-format msgid "unable to open file \"%s\" for writing" msgstr "" #: ../libvips/iofuncs/util.c:780 #, c-format msgid "\"%s\" too long" msgstr "" #: ../libvips/iofuncs/util.c:797 msgid "out of memory" msgstr "" #: ../libvips/iofuncs/util.c:823 #, c-format msgid "error reading from file \"%s\"" msgstr "" #: ../libvips/iofuncs/util.c:870 #, c-format msgid "write error (%zd out of %zd blocks written) ... disc full?" msgstr "" #: ../libvips/iofuncs/util.c:1119 ../libvips/iofuncs/util.c:1126 msgid "unable to truncate" msgstr "" #: ../libvips/iofuncs/util.c:1217 #, c-format msgid "unable to create directory \"%s\", %s" msgstr "" #: ../libvips/iofuncs/util.c:1351 msgid "unexpected end of string" msgstr "" #: ../libvips/iofuncs/util.c:1369 #, c-format msgid "expected %s, saw %s" msgstr "" #: ../libvips/iofuncs/util.c:1539 #, c-format msgid "unable to make temporary file %s" msgstr "" #. File length unit. #. #: ../libvips/iofuncs/buf.c:521 msgid "bytes" msgstr "" #. Kilo byte unit. #. #: ../libvips/iofuncs/buf.c:525 msgid "KB" msgstr "" #. Mega byte unit. #. #: ../libvips/iofuncs/buf.c:529 msgid "MB" msgstr "" #. Giga byte unit. #. #: ../libvips/iofuncs/buf.c:533 msgid "GB" msgstr "" #. Tera byte unit. #. #: ../libvips/iofuncs/buf.c:537 msgid "TB" msgstr "" #: ../libvips/iofuncs/base64.c:169 msgid "too little data" msgstr "" #. We shouldn't really be used for large amounts of data. #. #: ../libvips/iofuncs/base64.c:175 ../libvips/iofuncs/base64.c:240 msgid "too much data" msgstr "" #: ../libvips/iofuncs/generate.c:643 msgid "demand hint not set" msgstr "" #: ../libvips/iofuncs/generate.c:662 ../libvips/iofuncs/generate.c:687 msgid "generate() called twice" msgstr "" #: ../libvips/iofuncs/mapfile.c:131 ../libvips/iofuncs/mapfile.c:298 msgid "unable to CreateFileMapping" msgstr "" #: ../libvips/iofuncs/mapfile.c:139 ../libvips/iofuncs/mapfile.c:310 msgid "unable to MapViewOfFile" msgstr "" #: ../libvips/iofuncs/mapfile.c:179 msgid "unable to mmap" msgstr "" #: ../libvips/iofuncs/mapfile.c:180 #, c-format msgid "" "map failed (%s), running very low on system resources, expect a crash soon" msgstr "" #: ../libvips/iofuncs/mapfile.c:197 ../libvips/iofuncs/mapfile.c:304 msgid "unable to UnmapViewOfFile" msgstr "" #: ../libvips/iofuncs/mapfile.c:203 msgid "unable to munmap file" msgstr "" #: ../libvips/iofuncs/mapfile.c:225 msgid "file is less than 64 bytes" msgstr "" #: ../libvips/iofuncs/mapfile.c:230 ../libvips/iofuncs/mapfile.c:264 msgid "unable to get file status" msgstr "" #: ../libvips/iofuncs/mapfile.c:236 msgid "not a regular file" msgstr "" #: ../libvips/iofuncs/mapfile.c:270 msgid "unable to read data" msgstr "" #: ../libvips/iofuncs/mapfile.c:330 #, c-format msgid "unable to mmap: \"%s\" - %s" msgstr "" #: ../libvips/iofuncs/mapfile.c:340 #, c-format msgid "unable to mmap \"%s\" to same address" msgstr "" #: ../libvips/iofuncs/init.c:404 msgid "abort on first error or warning" msgstr "" #: ../libvips/iofuncs/init.c:407 msgid "evaluate with N concurrent threads" msgstr "" #: ../libvips/iofuncs/init.c:410 msgid "set tile width to N (DEBUG)" msgstr "" #: ../libvips/iofuncs/init.c:413 msgid "set tile height to N (DEBUG)" msgstr "" #: ../libvips/iofuncs/init.c:416 msgid "set thinstrip height to N (DEBUG)" msgstr "" #: ../libvips/iofuncs/init.c:419 msgid "set fatstrip height to N (DEBUG)" msgstr "" #: ../libvips/iofuncs/init.c:422 msgid "show progress feedback" msgstr "" #: ../libvips/iofuncs/init.c:425 msgid "leak-check on exit" msgstr "" #: ../libvips/iofuncs/init.c:428 msgid "images larger than N are decompressed to disc" msgstr "" #: ../libvips/iofuncs/init.c:431 msgid "disable vectorised versions of operations" msgstr "" #: ../libvips/iofuncs/init.c:434 msgid "cache at most N operations" msgstr "" #: ../libvips/iofuncs/init.c:437 msgid "cache at most N bytes in memory" msgstr "" #: ../libvips/iofuncs/init.c:440 msgid "allow at most N open files" msgstr "" #: ../libvips/iofuncs/init.c:443 msgid "trace operation cache" msgstr "" #: ../libvips/iofuncs/init.c:446 msgid "dump operation cache on exit" msgstr "" #: ../libvips/iofuncs/init.c:449 msgid "print libvips version" msgstr "" #: ../libvips/iofuncs/init.c:472 msgid "VIPS Options" msgstr "" #: ../libvips/iofuncs/init.c:472 msgid "Show VIPS options" msgstr "" #: ../libvips/iofuncs/object.c:153 #, c-format msgid "parameter %s not set" msgstr "" #: ../libvips/iofuncs/object.c:505 #, c-format msgid "no property named `%s'" msgstr "" #: ../libvips/iofuncs/object.c:513 #, c-format msgid "no vips argument named `%s'" msgstr "" #: ../libvips/iofuncs/object.c:520 #, c-format msgid "argument `%s' has no instance" msgstr "" #: ../libvips/iofuncs/object.c:1292 msgid "base class" msgstr "" #: ../libvips/iofuncs/object.c:1306 msgid "Nickname" msgstr "" #: ../libvips/iofuncs/object.c:1307 msgid "Class nickname" msgstr "" #: ../libvips/iofuncs/object.c:1313 msgid "Description" msgstr "" #: ../libvips/iofuncs/object.c:1314 msgid "Class description" msgstr "" #: ../libvips/iofuncs/object.c:1460 #, c-format msgid "enum '%s' has no member '%s', should be one of: %s" msgstr "" #: ../libvips/iofuncs/object.c:1480 #, c-format msgid "no value supplied for argument '%s'" msgstr "" #: ../libvips/iofuncs/object.c:1483 #, c-format msgid "no value supplied for argument '%s' ('%s')" msgstr "" #: ../libvips/iofuncs/object.c:1603 ../libvips/iofuncs/object.c:1622 #: ../libvips/iofuncs/object.c:1678 #, c-format msgid "'%s' is not an integer" msgstr "" #: ../libvips/iofuncs/object.c:1639 #, c-format msgid "'%s' is not a double" msgstr "" #: ../libvips/iofuncs/object.c:2013 #, c-format msgid "unable to set '%s'" msgstr "" #: ../libvips/iofuncs/object.c:2021 msgid "not , or ) after parameter" msgstr "" #: ../libvips/iofuncs/object.c:2028 msgid "extra tokens after ')'" msgstr "" #: ../libvips/iofuncs/threadpool.c:179 msgid "unable to create thread" msgstr "" #: ../libvips/iofuncs/threadpool.c:312 #, c-format msgid "threads clipped to %d" msgstr "" #: ../libvips/iofuncs/threadpool.c:376 msgid "per-thread state for vipsthreadpool" msgstr "" #: ../libvips/iofuncs/memory.c:232 msgid "vips_free: too many frees" msgstr "" #: ../libvips/iofuncs/memory.c:236 msgid "vips_free: too much free" msgstr "" #: ../libvips/iofuncs/memory.c:288 ../libvips/iofuncs/memory.c:291 #, c-format msgid "out of memory --- size == %dMB" msgstr "" #: ../libvips/morphology/im_cntlines.c:82 msgid "flag should be 0 (horizontal) or 1 (vertical)" msgstr "" #: ../libvips/morphology/im_profile.c:105 msgid "dir not 0 or 1" msgstr "" #: ../libvips/morphology/im_rank_image.c:304 msgid "zero input images!" msgstr "" #: ../libvips/morphology/im_rank_image.c:309 #, c-format msgid "index should be in range 0 - %d" msgstr "" #: ../libvips/morphology/morphology.c:312 #, c-format msgid "bad mask element (%d should be 0, 128 or 255)" msgstr "" #: ../libvips/morphology/im_zerox.c:142 msgid "flag not -1 or 1" msgstr "" #: ../libvips/morphology/im_zerox.c:146 msgid "image too narrow" msgstr "" #: ../libvips/morphology/im_rank.c:366 msgid "image too small for window" msgstr "" #: ../libvips/mosaicing/im_clinear.c:137 msgid "im_invmat failed" msgstr "" #: ../libvips/mosaicing/im_tbmosaic.c:90 #: ../libvips/mosaicing/im_lrmosaic.c:114 msgid "bad area parameters" msgstr "" #: ../libvips/mosaicing/im_tbmosaic.c:111 #: ../libvips/mosaicing/im_lrmosaic.c:135 msgid "overlap too small for search" msgstr "" #: ../libvips/mosaicing/im_tbmosaic.c:144 #: ../libvips/mosaicing/im_lrmosaic.c:168 msgid "unknown Coding type" msgstr "" #: ../libvips/mosaicing/im_tbmerge.c:164 ../libvips/mosaicing/im_tbmerge.c:218 #: ../libvips/mosaicing/im_tbmerge.c:536 ../libvips/mosaicing/im_lrmerge.c:214 #: ../libvips/mosaicing/im_lrmerge.c:263 ../libvips/mosaicing/im_lrmerge.c:604 msgid "internal error" msgstr "" #: ../libvips/mosaicing/im_tbmerge.c:635 ../libvips/mosaicing/im_lrmerge.c:804 msgid "unknown coding type" msgstr "" #: ../libvips/mosaicing/im_tbmerge.c:653 ../libvips/mosaicing/im_lrmerge.c:821 msgid "too much overlap" msgstr "" #: ../libvips/mosaicing/global_balance.c:148 msgid "no matching '>'" msgstr "" #: ../libvips/mosaicing/global_balance.c:157 msgid "too many items" msgstr "" #: ../libvips/mosaicing/global_balance.c:451 msgid "circularity detected" msgstr "" #: ../libvips/mosaicing/global_balance.c:485 #: ../libvips/mosaicing/global_balance.c:545 #, c-format msgid "image \"%s\" used twice as output" msgstr "" #: ../libvips/mosaicing/global_balance.c:594 msgid "bad number of args in join line" msgstr "" #: ../libvips/mosaicing/global_balance.c:636 msgid "bad number of args in join1 line" msgstr "" #: ../libvips/mosaicing/global_balance.c:672 msgid "bad number of args in copy line" msgstr "" #: ../libvips/mosaicing/global_balance.c:730 msgid "" "mosaic root not found in desc file\n" "is this really a mosaiced image?" msgstr "" #: ../libvips/mosaicing/global_balance.c:741 msgid "more than one root" msgstr "" #: ../libvips/mosaicing/global_balance.c:1060 msgid "empty overlap!" msgstr "" #: ../libvips/mosaicing/im_lrmerge.c:704 msgid "mwidth must be -1 or >= 0" msgstr "" #: ../libvips/mosaicing/im_lrmerge.c:733 msgid "no overlap" msgstr "" #: ../libvips/mosaicing/im_avgdxdy.c:65 msgid "no points to average" msgstr "" #: ../libvips/mosaicing/im_lrcalcon.c:204 msgid "overlap too small for your search size" msgstr "" #: ../libvips/mosaicing/im_lrcalcon.c:243 #, c-format msgid "found %d tie-points, need at least %d" msgstr "" #: ../libvips/mosaicing/im_lrcalcon.c:288 msgid "not 1-band uchar image" msgstr "" #: ../libvips/mosaicing/im_chkpair.c:201 msgid "inputs incompatible" msgstr "" #: ../libvips/mosaicing/im_chkpair.c:205 #: ../libvips/mosaicing/im_tbcalcon.c:103 msgid "help!" msgstr "" #: ../libvips/mosaicing/im_remosaic.c:105 #, c-format msgid "substitute image \"%s\" is not the same size as \"%s\"" msgstr "" #: ../libvips/mosaicing/im_tbcalcon.c:117 msgid "overlap too small" msgstr "" #: ../libvips/other/im_sines.c:89 msgid "wrong sizes" msgstr "" #: ../libvips/other/im_sines.c:102 msgid "calloc failed" msgstr "" #: ../libvips/other/im_zone.c:81 msgid "size must be even and positive" msgstr "" #: ../libvips/other/im_eye.c:84 msgid "factor should be in [1,0)" msgstr "" #: ../libvips/resample/quadratic.c:257 msgid "coefficient matrix must have width 2" msgstr "" #: ../libvips/resample/quadratic.c:279 msgid "coefficient matrix must have height 1, 3, 4 or 6" msgstr "" #: ../libvips/resample/quadratic.c:335 msgid "resample an image with a quadratic transform" msgstr "" #: ../libvips/resample/quadratic.c:339 msgid "Coeff" msgstr "" #: ../libvips/resample/quadratic.c:340 msgid "Coefficient matrix" msgstr "" #: ../libvips/resample/quadratic.c:345 ../libvips/resample/affine.c:549 msgid "Interpolate" msgstr "" #: ../libvips/resample/quadratic.c:346 msgid "Interpolate values with this" msgstr "" #: ../libvips/resample/shrink.c:319 msgid "shrink factors should be >= 1" msgstr "" #: ../libvips/resample/shrink.c:326 msgid "not integer shrink factors, expect poor results" msgstr "" #: ../libvips/resample/shrink.c:387 msgid "shrink an image" msgstr "" #: ../libvips/resample/shrink.c:393 msgid "Xshrink" msgstr "" #: ../libvips/resample/shrink.c:394 msgid "Horizontal shrink factor" msgstr "" #: ../libvips/resample/shrink.c:400 msgid "Yshrink" msgstr "" #: ../libvips/resample/shrink.c:401 msgid "Vertical shrink factor" msgstr "" #: ../libvips/resample/resample.c:86 msgid "resample operations" msgstr "" #: ../libvips/resample/affine.c:460 msgid "output coordinates out of range" msgstr "" #: ../libvips/resample/affine.c:538 msgid "affine transform of an image" msgstr "" #: ../libvips/resample/affine.c:542 msgid "Matrix" msgstr "" #: ../libvips/resample/affine.c:543 msgid "Transformation matrix" msgstr "" #: ../libvips/resample/affine.c:550 msgid "Interpolate pixels with this" msgstr "" #: ../libvips/resample/affine.c:555 msgid "Output rect" msgstr "" #: ../libvips/resample/affine.c:556 msgid "Area of output to generate" msgstr "" #: ../libvips/resample/affine.c:562 ../libvips/resample/affine.c:569 msgid "Output offset" msgstr "" #: ../libvips/resample/affine.c:563 msgid "Horizontal output displacement" msgstr "" #: ../libvips/resample/affine.c:570 msgid "Vertical output displacement" msgstr "" #: ../libvips/resample/affine.c:576 ../libvips/resample/affine.c:583 msgid "Input offset" msgstr "" #: ../libvips/resample/affine.c:577 msgid "Horizontal input displacement" msgstr "" #: ../libvips/resample/affine.c:584 msgid "Vertical input displacement" msgstr "" #: ../libvips/resample/interpolate.c:181 msgid "VIPS interpolators" msgstr "" #: ../libvips/resample/interpolate.c:357 msgid "Nearest-neighbour interpolation" msgstr "" #: ../libvips/resample/interpolate.c:528 msgid "Bilinear interpolation" msgstr "" #: ../libvips/video/im_video_test.c:52 msgid "error requested" msgstr "" #: ../libvips/video/im_video_v4l1.c:242 msgid "no file descriptor" msgstr "" #: ../libvips/video/im_video_v4l1.c:247 #, c-format msgid "ioctl(0x%x) failed: %s" msgstr "" #: ../libvips/video/im_video_v4l1.c:296 #, c-format msgid "cannot open video device \"%s\"" msgstr "" #: ../libvips/video/im_video_v4l1.c:304 msgid "cannot get video capability" msgstr "" #: ../libvips/video/im_video_v4l1.c:313 msgid "card cannot capture to memory" msgstr "" #: ../libvips/video/im_video_v4l1.c:459 msgid "unable to map memory" msgstr "" #: ../libvips/video/im_video_v4l1.c:471 #, c-format msgid "channel not between 0 and %d" msgstr "" #: ../libvips/video/im_video_v4l1.c:699 msgid "compiled without im_video_v4l1 support" msgstr "" #: ../tools/edvips.c:83 msgid "tag file as big or little-endian" msgstr "" #: ../tools/edvips.c:85 msgid "set width to N pixels" msgstr "" #: ../tools/edvips.c:87 msgid "set height to N pixels" msgstr "" #: ../tools/edvips.c:89 msgid "set Bands to N" msgstr "" #: ../tools/edvips.c:91 msgid "set BandFmt to F (eg. uchar, float)" msgstr "" #: ../tools/edvips.c:93 msgid "set interpretation to I (eg. xyz)" msgstr "" #: ../tools/edvips.c:95 msgid "set Coding to C (eg. labq)" msgstr "" #: ../tools/edvips.c:97 msgid "set Xres to R pixels/mm" msgstr "" #: ../tools/edvips.c:99 msgid "set Yres to R pixels/mm" msgstr "" #: ../tools/edvips.c:101 msgid "set Xoffset to N pixels" msgstr "" #: ../tools/edvips.c:103 msgid "set Yoffset to N pixels" msgstr "" #: ../tools/edvips.c:105 msgid "replace extension block with stdin" msgstr "" #: ../tools/edvips.c:107 msgid "set Xsize to N (deprecated, use width)" msgstr "" #: ../tools/edvips.c:109 msgid "set Ysize to N (deprecated, use height)" msgstr "" #: ../tools/edvips.c:111 msgid "set Type to T (deprecated, use interpretation)" msgstr "" #: ../tools/edvips.c:122 #, c-format msgid "'%s' is not a positive integer" msgstr "" #: ../tools/edvips.c:134 msgid "unable to start VIPS" msgstr "" #: ../tools/edvips.c:139 msgid "vipsfile - edit vipsfile header" msgstr "" #: ../tools/edvips.c:151 #, c-format msgid "usage: %s [OPTION...] vipsfile\n" msgstr "" #: ../tools/edvips.c:158 #, c-format msgid "could not open image %s" msgstr "" #: ../tools/edvips.c:161 #, c-format msgid "could not read VIPS header for %s" msgstr "" #: ../tools/edvips.c:170 #, c-format msgid "bad endian-ness %s, should be 'big' or 'little'" msgstr "" #: ../tools/edvips.c:183 #, c-format msgid "bad format %s" msgstr "" #: ../tools/edvips.c:191 #, c-format msgid "bad interpretation %s" msgstr "" #: ../tools/edvips.c:199 #, c-format msgid "bad coding %s" msgstr "" #: ../tools/edvips.c:212 #, c-format msgid "could not seek on %s" msgstr "" #: ../tools/edvips.c:215 #, c-format msgid "could not write to %s" msgstr "" #: ../tools/edvips.c:222 msgid "could not get ext data" msgstr "" #: ../tools/edvips.c:231 msgid "could not set extension" msgstr "" #: ../tools/find_mosaic.c:113 ../tools/find_mosaic.c:123 #: ../tools/find_mosaic.c:145 ../tools/find_mosaic.c:155 #: ../tools/find_mosaic.c:164 ../tools/find_mosaic.c:185 #: ../tools/find_mosaic.c:195 ../tools/find_mosaic.c:204 #: ../tools/mergeup.c:239 ../tools/mergeup.c:249 ../tools/mergeup.c:271 #: ../tools/mergeup.c:281 ../tools/mergeup.c:290 ../tools/mergeup.c:311 #: ../tools/mergeup.c:321 ../tools/mergeup.c:330 #, c-format msgid "bad file name format '%s'" msgstr "" #: ../tools/header.c:88 msgid "show all fields" msgstr "" #: ../tools/header.c:90 msgid "" "print value of FIELD (\"getext\" reads extension block, \"Hist\" reads image " "history)" msgstr "" #: ../tools/header.c:191 msgid "- print image header" msgstr "" #: ../tools/mergeup.c:382 msgid "allocation failure in mergeup" msgstr "" #: ../tools/mergeup.c:392 msgid "Need more than one image" msgstr "" #: ../tools/vips.c:104 msgid "load PLUGIN" msgstr "" #: ../tools/vips.c:105 msgid "PLUGIN" msgstr "" #: ../tools/vips.c:107 msgid "print version" msgstr "" #: ../tools/vips.c:150 #, c-format msgid "no package or function \"%s\"" msgstr "" #: ../tools/vips.c:942 msgid "list classes|packages|all|package-name|operation-name" msgstr "" #: ../tools/vips.c:944 msgid "generate headers for C++ binding" msgstr "" #: ../tools/vips.c:946 msgid "generate bodies for C++ binding" msgstr "" #: ../tools/vips.c:948 msgid "generate links for vips/bin" msgstr "" #: ../tools/vips.c:950 msgid "list possible actions" msgstr "" #: ../tools/vips.c:959 msgid "possible actions:\n" msgstr "" #: ../tools/vips.c:961 msgid "execute vips operation OPER" msgstr "" #: ../tools/vips.c:1013 msgid "Operation help" msgstr "" #: ../tools/vips.c:1052 msgid "[ACTION] [OPTIONS] [PARAMETERS] - VIPS driver program" msgstr "" #: ../tools/vips.c:1206 #, c-format msgid "unknown action \"%s\"" msgstr "" #: ../tools/vipsthumbnail.c:64 msgid "set thumbnail size to SIZE" msgstr "" #: ../tools/vipsthumbnail.c:65 msgid "SIZE" msgstr "" #: ../tools/vipsthumbnail.c:68 msgid "set output to FORMAT" msgstr "" #: ../tools/vipsthumbnail.c:69 msgid "FORMAT" msgstr "" #: ../tools/vipsthumbnail.c:72 msgid "resample with INTERPOLATOR" msgstr "" #: ../tools/vipsthumbnail.c:73 msgid "INTERPOLATOR" msgstr "" #: ../tools/vipsthumbnail.c:76 msgid "don't sharpen thumbnail" msgstr "" #: ../tools/vipsthumbnail.c:79 msgid "export with PROFILE" msgstr "" #: ../tools/vipsthumbnail.c:80 ../tools/vipsthumbnail.c:84 msgid "PROFILE" msgstr "" #: ../tools/vipsthumbnail.c:83 msgid "import untagged images with PROFILE" msgstr "" #: ../tools/vipsthumbnail.c:87 msgid "delete profile from exported image" msgstr "" #: ../tools/vipsthumbnail.c:90 msgid "(deprecated, does nothing)" msgstr "" #: ../tools/vipsthumbnail.c:93 msgid "verbose output" msgstr "" #: ../tools/vipsthumbnail.c:446 msgid "- thumbnail generator" msgstr "" #: ../libvips/resample/vsqbs.cpp:399 msgid "B-Splines with antialiasing smoothing" msgstr "" #: ../libvips/resample/nohalo.cpp:1580 msgid "Edge sharpening resampler with halo reduction" msgstr "" #: ../libvips/resample/lbb.cpp:859 msgid "Reduced halo bicubic" msgstr "" #: ../libvips/resample/bicubic.cpp:431 msgid "Bicubic interpolation (Catmull-Rom)" msgstr "" vips-7.38.5/po/POTFILES.in0000644000175000017500000002260512303140253011711 00000000000000libvips/arithmetic/abs.c libvips/arithmetic/hist_find_ndim.c libvips/arithmetic/complex.c libvips/arithmetic/invert.c libvips/arithmetic/multiply.c libvips/arithmetic/round.c libvips/arithmetic/subtract.c libvips/arithmetic/min.c libvips/arithmetic/unaryconst.c libvips/arithmetic/project.c libvips/arithmetic/avg.c libvips/arithmetic/max.c libvips/arithmetic/statistic.c libvips/arithmetic/divide.c libvips/arithmetic/profile.c libvips/arithmetic/stats.c libvips/arithmetic/binary.c libvips/arithmetic/hist_find_indexed.c libvips/arithmetic/deviate.c libvips/arithmetic/relational.c libvips/arithmetic/measure.c libvips/arithmetic/remainder.c libvips/arithmetic/unary.c libvips/arithmetic/math.c libvips/arithmetic/arithmetic.c libvips/arithmetic/hist_find.c libvips/arithmetic/add.c libvips/arithmetic/math2.c libvips/arithmetic/linear.c libvips/arithmetic/boolean.c libvips/arithmetic/sign.c libvips/cimg/cimg_dispatch.c libvips/colour/scRGB2sRGB.c libvips/colour/XYZ2scRGB.c libvips/colour/Lab2XYZ.c libvips/colour/LCh2Lab.c libvips/colour/LCh2UCS.c libvips/colour/dE00.c libvips/colour/scRGB2XYZ.c libvips/colour/icc_transform.c libvips/colour/dECMC.c libvips/colour/colour.c libvips/colour/rad2float.c libvips/colour/sRGB2scRGB.c libvips/colour/UCS2LCh.c libvips/colour/Lab2LabQ.c libvips/colour/colourspace.c libvips/colour/Lab2LabS.c libvips/colour/LabS2LabQ.c libvips/colour/Lab2LCh.c libvips/colour/Yxy2XYZ.c libvips/colour/LabQ2sRGB.c libvips/colour/float2rad.c libvips/colour/XYZ2Yxy.c libvips/colour/dE76.c libvips/colour/XYZ2Lab.c libvips/colour/LabQ2LabS.c libvips/colour/LabQ2Lab.c libvips/colour/LabS2Lab.c libvips/conversion/rot.c libvips/conversion/conversion.c libvips/conversion/grid.c libvips/conversion/recomb.c libvips/conversion/falsecolour.c libvips/conversion/flatten.c libvips/conversion/replicate.c libvips/conversion/bandary.c libvips/conversion/subsample.c libvips/conversion/cache.c libvips/conversion/join.c libvips/conversion/gamma.c libvips/conversion/rot45.c libvips/conversion/extract.c libvips/conversion/wrap.c libvips/conversion/zoom.c libvips/conversion/bandbool.c libvips/conversion/ifthenelse.c libvips/conversion/tilecache.c libvips/conversion/flip.c libvips/conversion/bandjoin.c libvips/conversion/copy.c libvips/conversion/cast.c libvips/conversion/sequential.c libvips/conversion/embed.c libvips/conversion/insert.c libvips/conversion/msb.c libvips/conversion/bandrank.c libvips/conversion/bandmean.c libvips/conversion/scale.c libvips/convolution/im_aconv.c libvips/convolution/fastcor.c libvips/convolution/convsep.c libvips/convolution/gaussblur.c libvips/convolution/im_conv.c libvips/convolution/correlation.c libvips/convolution/compass.c libvips/convolution/sharpen.c libvips/convolution/spcor.c libvips/convolution/im_aconvsep.c libvips/convolution/conv.c libvips/convolution/im_conv_f.c libvips/convolution/convolution.c libvips/create/mask.c libvips/create/other_dispatch.c libvips/create/zone.c libvips/create/invertlut.c libvips/create/mask_gaussian.c libvips/create/mask_butterworth_band.c libvips/create/sines.c libvips/create/black.c libvips/create/mask_ideal_ring.c libvips/create/gaussnoise.c libvips/create/logmat.c libvips/create/tonelut.c libvips/create/mask_gaussian_band.c libvips/create/mask_ideal.c libvips/create/mask_butterworth_ring.c libvips/create/create.c libvips/create/identity.c libvips/create/eye.c libvips/create/text.c libvips/create/gaussmat.c libvips/create/xyz.c libvips/create/im_benchmark.c libvips/create/mask_butterworth.c libvips/create/mask_gaussian_ring.c libvips/create/mask_fractal.c libvips/create/point.c libvips/create/mask_ideal_band.c libvips/create/grey.c libvips/create/fractsurf.c libvips/create/buildlut.c libvips/foreign/jpeg2vips.c libvips/foreign/radiance.c libvips/foreign/vips2jpeg.c libvips/foreign/openexrload.c libvips/foreign/vipssave.c libvips/foreign/rawsave.c libvips/foreign/csvsave.c libvips/foreign/matrixload.c libvips/foreign/radsave.c libvips/foreign/rawload.c libvips/foreign/webpsave.c libvips/foreign/vips2tiff.c libvips/foreign/vips2webp.c libvips/foreign/fits.c libvips/foreign/matlab.c libvips/foreign/csvload.c libvips/foreign/jpegload.c libvips/foreign/magickload.c libvips/foreign/webpload.c libvips/foreign/matload.c libvips/foreign/tiff2vips.c libvips/foreign/openexr2vips.c libvips/foreign/foreign.c libvips/foreign/webp2vips.c libvips/foreign/jpegsave.c libvips/foreign/dzsave.c libvips/foreign/openslide2vips.c libvips/foreign/analyze2vips.c libvips/foreign/ppmsave.c libvips/foreign/tiffsave.c libvips/foreign/matrixsave.c libvips/foreign/fitssave.c libvips/foreign/csv.c libvips/foreign/pngload.c libvips/foreign/fitsload.c libvips/foreign/vipsload.c libvips/foreign/vipspng.c libvips/foreign/tiffload.c libvips/foreign/magick2vips.c libvips/foreign/analyzeload.c libvips/foreign/ppm.c libvips/foreign/openslideload.c libvips/foreign/pngsave.c libvips/foreign/radload.c libvips/foreign/ppmload.c libvips/freqfilt/phasecor.c libvips/freqfilt/fwfft.c libvips/freqfilt/freqmult.c libvips/freqfilt/freqfilt.c libvips/freqfilt/invfft.c libvips/freqfilt/spectrum.c libvips/histogram/hist_cum.c libvips/histogram/hist_norm.c libvips/histogram/hist_equal.c libvips/histogram/maplut.c libvips/histogram/hist_plot.c libvips/histogram/stdif.c libvips/histogram/hist_local.c libvips/histogram/histogram.c libvips/histogram/hist_match.c libvips/histogram/hist_unary.c libvips/histogram/hist_ismonotonic.c libvips/histogram/percent.c libvips/inplace/im_draw_smudge.c libvips/inplace/im_draw_circle.c libvips/inplace/im_draw_rect.c libvips/inplace/im_draw_mask.c libvips/inplace/draw.c libvips/inplace/im_draw_point.c libvips/inplace/flood.c libvips/inplace/im_draw_image.c libvips/inplace/im_draw_line.c libvips/inplace/inplace_dispatch.c libvips/iofuncs/gate.c libvips/iofuncs/window.c libvips/iofuncs/base64.c libvips/iofuncs/type.c libvips/iofuncs/memory.c libvips/iofuncs/vips.c libvips/iofuncs/init.c libvips/iofuncs/enumtypes.c libvips/iofuncs/cache.c libvips/iofuncs/buffer.c libvips/iofuncs/sinkmemory.c libvips/iofuncs/rect.c libvips/iofuncs/buf.c libvips/iofuncs/system.c libvips/iofuncs/threadpool.c libvips/iofuncs/operation.c libvips/iofuncs/header.c libvips/iofuncs/vector.c libvips/iofuncs/semaphore.c libvips/iofuncs/error.c libvips/iofuncs/sinkdisc.c libvips/iofuncs/sink.c libvips/iofuncs/generate.c libvips/iofuncs/region.c libvips/iofuncs/mapfile.c libvips/iofuncs/image.c libvips/iofuncs/util.c libvips/iofuncs/sinkscreen.c libvips/iofuncs/object.c libvips/morphology/countlines.c libvips/morphology/rank.c libvips/morphology/im_label_regions.c libvips/morphology/hitmiss.c libvips/morphology/morphology.c libvips/morphology/morph.c libvips/mosaicing/im_tbmosaic.c libvips/mosaicing/im_avgdxdy.c libvips/mosaicing/im_tbcalcon.c libvips/mosaicing/im_tbmerge.c libvips/mosaicing/im_lrcalcon.c libvips/mosaicing/im_clinear.c libvips/mosaicing/im_remosaic.c libvips/mosaicing/im_maxpos_subpel.c libvips/mosaicing/im_chkpair.c libvips/mosaicing/im_initialize.c libvips/mosaicing/im_align_bands.c libvips/mosaicing/mosaic1.c libvips/mosaicing/im_lrmerge.c libvips/mosaicing/im_lrmosaic.c libvips/mosaicing/im_improve.c libvips/mosaicing/mosaicing_dispatch.c libvips/mosaicing/match.c libvips/mosaicing/global_balance.c libvips/resample/interpolate.c libvips/resample/resample.c libvips/resample/transform.c libvips/resample/similarity.c libvips/resample/shrink.c libvips/resample/quadratic.c libvips/resample/affine.c libvips/video/im_video_test.c libvips/video/video_dispatch.c tools/edvips.c tools/find_mosaic.c tools/header.c tools/mergeup.c tools/vips.c tools/vipsthumbnail.c libvipsCC/VDisplay.cc libvipsCC/VError.cc libvipsCC/VImage.cc libvipsCC/vipsc++.cc libvipsCC/VMask.cc libvips/cimg/dummy2.cc libvipsCC/include/vips/VDisplay.h libvipsCC/include/vips/VError.h libvipsCC/include/vips/VImage.h libvipsCC/include/vips/vipsc++.h libvipsCC/include/vips/vipscpp.h libvipsCC/include/vips/VMask.h libvips/include/vips/deprecated.h libvips/include/vips/conversion.h libvips/include/vips/vips.h libvips/include/vips/private.h libvips/include/vips/vips7compat.h libvips/include/vips/debug.h libvips/include/vips/memory.h libvips/include/vips/operation.h libvips/include/vips/basic.h libvips/include/vips/image.h libvips/include/vips/error.h libvips/include/vips/internal.h libvips/include/vips/inlines.h libvips/include/vips/cimg_funcs.h libvips/include/vips/dispatch.h libvips/include/vips/interpolate.h libvips/include/vips/intl.h libvips/include/vips/thread.h libvips/include/vips/resample.h libvips/include/vips/semaphore.h libvips/include/vips/gate.h libvips/include/vips/transform.h libvips/include/vips/util.h libvips/include/vips/version.h libvips/include/vips/morphology.h libvips/include/vips/generate.h libvips/include/vips/enumtypes.h libvips/include/vips/region.h libvips/include/vips/vector.h libvips/include/vips/format.h libvips/include/vips/threadpool.h libvips/include/vips/colour.h libvips/include/vips/freqfilt.h libvips/include/vips/create.h libvips/include/vips/video.h libvips/include/vips/type.h libvips/include/vips/mosaicing.h libvips/include/vips/almostdeprecated.h libvips/include/vips/convolution.h libvips/include/vips/object.h libvips/include/vips/buf.h libvips/include/vips/foreign.h libvips/include/vips/mask.h libvips/include/vips/histogram.h libvips/include/vips/header.h libvips/include/vips/arithmetic.h libvips/include/vips/rect.h libvips/include/vips/relational.h libvips/include/vips/inplace.h libvips/cimg/cimg.cpp libvips/resample/vsqbs.cpp libvips/resample/bicubic.cpp libvips/resample/lbb.cpp libvips/resample/nohalo.cpp vips-7.38.5/THANKS0000644000175000017500000000075312303140253010431 00000000000000VIPS THANKS file VIPS was originally written by Nicos Dessipris, Kirk Martinez and John Cupitt. Many people have contributed to VIPS by reporting problems, suggesting improvements, or offering code. Matthew Hanson Joe Padfield Haida Liang Ian Clarke Steve Perry Stephen Chang David Saunders Mike Westmacott Chris Hurst Jim Coddington Lou Rachel Billinge Colin White ENST Thomson-CSF We've also had very helpful funding from the European Commission and Hewlett-Packard. vips-7.38.5/ChangeLog0000644000175000017500000030172612303141420011271 0000000000000024/2/14 started 7.38.5 - jpeg load from buffer could write to input, thanks Lovell - fix webpload from buffer, thanks Lovell - vips_sequential() could fail under heavy load - remove support for seq mode read for operations like extract 13/2/14 started 7.38.4 - --sharpen=none option to vipsthumbnail was broken, thanks ferryfax - more locking on property create and lookup to help very-threaded systems, thanks Nick 22/1/14 started 7.38.3 - undeprecate VIPS_MASK_IDEAL_HIGHPASS and friends, ruby-vips was using them, thanks ahacking 22/1/14 started 7.38.2 - auto RAD decode for affine - falsecolour was not working for some image types - foreign memory buffer images did not have the right dhint, broke command-line falsecolour on sequential images - support many Radiance readers active at once - add secret "rgbjpeg" flag to vips_tiffsave() to help IIP 19/1/14 started 7.38.1 - bump soname, thanks benjamin - better conversion to and from scrgb/xyz for rad (hdr) - fix --interpolate flag to vipsthumbnail, thanks Lovell 18/1/14 started 7.38.0 - version bump 19/10/13 started 7.37.0 - redone im_rotate_*mask45(), im_gauss_*mask*(), im_log_*mask(), im_dilate(), im_erode(), im_rank_image(), im_compass(), im_linedet(), im_gradient(), im_convsep(), im_convsep_f(), im_fastcor(), im_spcor(), im_sharpen() as classes - im_gradcor() deprecated - vips_init() now does some ABI compat checking, though this change requires an ABI break - add "interlace" option to vips_jpegsave() - remove vips_image_copy_fields() and vips_demand_hint() and add vips_image_pipeline() to do both jobs - vipsthumbnail allows non-square bounding boxes, thanks seth - add vips_matrixprint() - add @point subsample mode to vips_subsample() - im_contrast_surface() deprecated: it was slower than calling conv a few times - radiance load supports sequential read - rewritten radiance decode is much faster - add vips_crop(), a synonym for vips_extract_area() - rename vips_gammacorrect() as vips_gamma(), now takes 1 / exp - vips_gamma() works for any format - add --linear mode to vipsthumbnail - support XYZ as a PCS for vips_icc_import() and vips_icc_export() - add --strip option to jpegsave - added vips_gaussblur() convenience function - added --vips-profile, records and dumps thread timing and memory use info - added vipsprofile, visualises --vips-profile output - auto-vectorization-friendly inner loops - added vips::init() and vips::shutdown() to C++ API - reuse pixel buffers on sharing to reduce mem cycling - conv is SMALLTILE, huge mem use saving on wide images - vipsthumbnail has a --crop option - remove video4linux1 code, it was useless on all modern linuxes - redone freq filter builders as classes - redone im_fwfft(), im_invfft(), im_freqflt(), im_disp_ps(), im_fractsurf(), im_phasecor() as classes - vips_colourspace() allows B_W, GREY16, RGB16 as source / target - added vips_thread_shutdown(), thanks Lovell - vips_linear() has a uchar output mode - redone im_cntlines(), im_rank() as classes - move im_zerox() to deprecated, it wasm't very useful 9/1/14 started 7.36.6 - fix some clang compiler warnings 20/11/13 started 7.36.5 - better cache sizing in unbuffered sequential mode - allow larger tile_size in dzsave - remove use of PATH_MAX to help gnu hurd - fix vips_hist_match() 15/11/13 started 7.36.4 - improve compat with im_init_world() 18/10/13 started 7.36.3 - fix compiler warnings in ubuntu 13.10 - reverse similarity rotation direction to match the convention used elsewhere in vips - fix blocked caching of sequential load operations - fix cache flags - fix --delete option to vipsthumbnail 10/10/13 started 7.36.2 - better jpeg startup - rename jpeg bool type to reduce confusion between libraries 3/10/13 started 7.36.1 - fix to help OS X build 3/10/13 started 7.36.0 - version bump 1/7/13 started 7.35.0 - added vips_matrixload() and vips_matrixsave(), load and save vips mat format - rename image arrays as image matrices ... INTERPRETATION_ARRAY -> INTERPRETATION_MATRIX etc. - rewrite im_buildlut(), im_identity*(), im_maplut(), im_falsecolour(), im_gammacorrect(), im_histgr(), im_histcum(), im_histnorm(), im_heq(), im_histnD(), im_histindexed(), im_histspec(), im_invertlut(), im_lhisteq(), im_stdif(), im_project(), im_profile(), im_tone_build*(), im_mpercent*(), im_ismonotonic() as classes - vips_hist_local(), vips_stdif() do any number of bands - thin vips8 wrapper for im_histplot() - added vips_error_freeze() / vips_error_thaw() - used freeze() / thaw() to stop file format sniffers logging spurious errors - vipsthumbnail uses embedded jpg thumbnails if it can - rename vips_diag() as vips_info(), add --vips-info flag - deprecate im_hsp() - added vips_webpload(), vips_webpload_buffer(), vips_webpsave(), vips_webpsave_buffer(), vips_webpsave_mime() - tiff reader allows separate planes for strip read - tiff reader and writer allow many more formats, eg. 32-bit int, complex, etc. - tiff reader and writer allow any number of bands - added vips_image_new_matrixv() - dzsave basename param now called filename, so you can use .dz as a destination (basename is still there but deprecated) - new _UNBUFFERED sequential mode saves memory in some important cases - vips_conv() is a simple wrapper over the old convolution functions - new optimize_coding param for jpeg write produces optimal Huffman tables, thanks Lovell - im_tone_map() and im_tone_analyse() deprecated - new --band arg to vips_maplut() replaces im_tone_map() functionality - added vips_similarity(), simple wrapper for vips_affine() that lets you give a scale and rotate 3/7/13 started 7.34.2 - lower priority for Matlab load to reduce segvs from Mat_Open(), thanks Michael - null-terminate libexif strings, thanks Mike - openslide always outputs solid pixels 28/6/13 started 7.34.1 - fix morphological operators on non-uchar images - remove any ICC profile when we use vips to go to srgb 7/6/13 started 7.34.0 - version bump - oops, VImage.PIL_mode_from_vips() failed for CMYK, thanks Alessandro - fix no-pango build - add im_vips2dz(): run the deepzoom writer from vips7 - vips_magickload() has an option to read all images in a sequence - redo im_make_xy(), im_*eye(), im_zone*(), im_sines() as classes - added vips_pngload_buffer() - faster --centre option to dzsave, thanks Kacey 12/3/13 started 7.33.0 - vipsthumbnail lets you specify the sharpening mask - turn off caching for im_copy()/vips_copy(), we use copy to stop sharing, and it's cheap so caching doesn't help anyway - auto rshift down to 8 bits on save, if necessary - im_gaussnoise(), im_copy_file(), im_grid(), im_scale(), im_scaleps(), im_wrap(), im_rotquad(), im_zoom(), im_subsample(), im_msb(), im_text(), im_system(), im_system_image() redone as classes - add --angle option to dzsave - another vips_shrink() fix argh 14/5/13 started 7.32.4 - icc import and export could segv on very wide images - fix centos 5 build, thanks re-boot 16/4/13 started 7.32.3 - rename GETTEXT_PACKAGE as vips7.32 to help Debian (thanks Jay) - added "persistent" option to tilecache 12/3/13 started 7.32.2 - removed some left-over debugging code from configure.ac - better handling of args without values, thanks Ruven - better error messages from vips.c - fix demand hints so "vips shrink" works again, thanks Jan - im_jpeg2vips.c builds without jpeglib.h, thanks Alessandro 6/2/13 started 7.32.1 - fix --without-lcms, thanks speckins - updates to licence, thanks Benjamin - remove "fred" from dist - better bootstrap on OS X 22/1/13 started 7.32.0 - tilecache in threaded mode could deadlock if the downstream pixel source raised an error (thanks Todd) - fix another dzsave corner-case (thanks Martin) - neater output for "header" - added VIPS_META_LOADER: record the loader name = header displays this loader hint - vipsthumbnail is better at cache sizing 31/8/12 started 7.31.0 - redone im_Lab2XYZ(), im_XYZ2Lab(), im_Lab2LCh(), im_LCh2Lab(), im_UCS2LCh, im_LCh2UCS(), im_XYZ2Yxy(), im_Yxy2XYZ(), im_float2rad(), im_rad2float(), im_Lab2LabQ(), im_LabQ2Lab(), im_Lab2LabS(), im_LabS2Lab(), im_LabQ2LabS(), im_LabS2LabQ(), im_LabQ2disp(), im_XYZ2disp(), im_disp2XYZ(), im_icc_import*(), im_icc_export*(), im_icc_transform*(), im_dE_fromLab(), im_dECMC_fromLab(), im_dE00_from_Lab(), im_icc_ac2rc() as classes - added vips_colourspace(), vips_colourspace_issupported(), replaces all derived conversions - faster and more accurate sRGB <-> XYZ conversion - support 16-bit sRGB import and export - rename UCS colourspace as CMC - dzsave can write zoomify and google maps layout as well - tilecache supports threaded access, so openslide read now threads - openslide2vips gets underlying tile size from openslide - embed has 'background' option - dzsave --layout google has a @background option - dzsave has a --depth option - update for new glib threading API - remove no threads option, glib no longer support it - better --help output for vips driver prog - vipsthumbnail -o allows absolute file names - much better exif handling for jpg images (thanks Gary) - preserve jpeg app13 (photoshop ipct) - vips_max() / _min() track the top n maxima / minima - deprecate im_maxpos_avg(): too specialised to be worth maintaining - deprecate im_linreg(): easily done by combining other operators - deprecate im_point(): easily done by combining other operators - add binary complex operations, with cross_phase as the only one so far - added vips_bandbool(), with vips_bandand(), _bandor(), _bandeor() as convenience functions - added scRGB colourspace, linear light float space with sRGB primaries - all interpolators use corner convention ... we had round-to-nearest in several of them before, causing a range of annoying problems - redone im_affine*() as a class - added input space displacement to affine - VipsArea is threadsafe - dzsave has a --centre option 31/12/12 started 7.30.8 - png icc profile write was broken 31/12/12 started 7.30.7 - better option parsing for "vips", thanks Haida - small fixes to help OS X - backported threaded tile cache from next version, im_tile_cache() now uses it to prevent a deadlock, see comment there 14/11/12 started 7.30.6 - capture tiff warnings earlier 14/11/12 started 7.30.5 - fix libtool version mess up (thanks Benjamin) 2/10/12 started 7.30.4 - remove options from format string in .dzi (thanks Martin) - vipsCC.pc required the wrong version of vips (thanks Alessandro) - larger max tile size for dzsave - linecache is 50% larger to leave some slop room 13/9/12 started 7.30.3 - linecache sized itself too large - fix a compile failure if libtiff was not found (thanks Martin) - dzsave did not work for images with an odd number of scanlines (thanks Martin) 4/9/12 started 7.30.2 - sequential stops all threads on error - sequential delays ahead threads rather than blocking them completely 6/8/12 started 7.30.1 - fixes to dzsave: shrink down to a 1x1 pixel tile, round image size up on shrink, write a .dzi file with the pyramid params, default tile size and overlap now matches the openslide writer - wrap VipsInterpolate for C++ - so affinei and affinei_all appear in Python - be more cautious enabling YCbCr mode in tiff write - add "DEPRECATED" flag to arguments - jpeg load/save note and use the preferred resolution unit - better error msgs for enum args - fix compiler warnings in production build (thanks Dmitry) - fix spurious warnings about exif updates - VipsSequential has an integrated cache and stalls out of order threads - add a line cache ... sizes up dynamically with request size - tilecache / linecache use a hash table not a linear list 20/7/12 started 7.30.0 - support "rs" mode in vips7 - add --vips-version cmdline arg - fix --without-tiff / exr / jpeg / png / magick - add --vips-fatal flag 19/3/12 started 7.29.0 - sanity-check PNG read geometry - nearest-neighbor interpolation rounds coordinates to nearest instead of rounding down (thanks Nicolas) - add dzsave, save in deep zoom format - rework im_shrink() as a class - remove im_rightshift_size(), just a convenience function now - vipsthumbnail no longer removes profiles by default - much more gentle sharpening in thumbnails - added "minimise" signal, used by tilecache to drop - add :seq support to im_tiff2vips(), im_jpeg2vips() ... helps ruby-vips - better thread safety for vips8 operation dispatch - better thread safety for upstream / downstream image linking - added "rs" open mode, removed "rd" - added vips_operation_get_flags() ... system for attaching sets of flags to operations - added VIPS_OPERATION_SEQUENTIAL flag - vips8 command-line interface uses this to turn sequential mode on automatically when possible - better handling of input files in vips7 command-line interface - sequential can skip ahead, so extract / insert are now seq 16/7/12 started 7.28.10 - wopconst was broken - vips_sign() was broken - png save compression range was wrong - more/moreeq was wrong - vips7 ppm save with options was broken - don't cache write operations 18/6/12 started 7.28.9 - slightly more memory debugging output - remove references to the static bicubic interpolator from the docs - fix temp file handling on Windows --- was breaking for non-vips files over 100mb - better support for using images from multiple threads 18/6/12 started 7.28.8 - fixes for centos5 portability 18/6/12 started 7.28.7 - add vips_flatten() -- flatten RGBA to RGB - better alpha handling in PNG load - don't save RGBA PNG as CMYK JPG (thanks Tobsn) - fix a crash with malformed jpg files (thanks Grigoriy) - vipsthumbnail enables sequential mode more and caches lines better 19/4/12 started 7.28.6 - better resolution unit handling in deprecated im_vips2tiff() - use TIFF_CFLAGS output from pkg-config (thanks Jay) - much faster vips_argument_map() - make jpeg pyramids work with tiff4 - tiff loader always offers THINSTRIP (thanks Diuming) - add "nocache" operation flag, set for sequential load (thanks Diuming) - fix a crash in the tiff reader for huge values of RowsPerStrip (thanks Nicolas) - remove use of G_DEFINE_BOXED_TYPE() to help compat (thanks Jake) 19/4/12 started 7.28.5 - ifthenelse blend mode was broken - small blend speedup - default to libtiff-4 17/4/12 started 7.28.4 - up max buffer size for vipsbuf 6/4/12 started 7.28.3 - vips_divide() failed for int arguments - fix warning for unused vips7 gvalue argument - fix openslide read: always return png-style rgba, im_argb2rgba() becomes a NOP - cast to unsigned int now removes <0 values - vips7 interface to openslide now supports :,level,associated options (thanks Benjamin) - make vips8 cache smaller - more accurate progress reporting 13/3/12 started 7.28.2 - xres/yres tiffsave args were broken 13/3/12 started 7.28.1 - add ICC profile read/write for png files 30/1/12 started 7.28.0 - version bump - added vips_foreign_find_save_options()/vips_foreign_find_load_options() - delayed write to foreign via a "w" image was not working - support operations with many returns in Python - sequential read mode - better im_shrink() - added vips_sequential() - new vips_sink_memory() keeps read ordering - tiff, jpeg, png readers support sequential read - max/min avoid NaN - oop, histnorm was broken by the new vipsstats - never use IM ping to get a header, fixes BMP load - set @filename for non-vips formats in vips7 compat layer - make Xres/Yres double - completely disable debug by default in production builds 20/8/11 started 7.27.0 - version bump for new dev cycle - im_subtract(), im_avg(), im_min(), im_minpos(), im_copy(), im_embed(), im_flophor(), im_flipver(), im_insert(), im_insert_noexpand(), im_lrjoin(), im_tbjoin(), im_extract_area(), im_extract_bands(), im_extract_areabands(), im_replicate(), im_clip2fmt(), im_gbandjoin(), im_bandjoin(), im_invert(), im_lintra(), im_lintra_vec(), im_black(), im_rot90, im_rot180(), im_rot270() im_sintra(), im_costra(), im_tantra(), im_asintra(), im_acostra(), im_atantra(), im_exptra(), im_exp10tra(), im_logtra(), im_log10tra(), im_abs(), im_sign(), im_max(), im_maxpos(), im_deviate(), im_divide(), im_multiply(), im_stats(), im_measure(), im_recomb(), im_floor(), im_ceil(), im_rint(), im_equal*(), im_notequal*(), im_less*(), im_lesseq*(), im_more*(), im_moreeq*(), im_remainder*(), im_and*(), im_or*(), im_eor*(), im_shift*(), im_pow*(), im_exp*(), im_ifthenelse(), im_blend(), im_c2amph(), im_c2rect(), im_bandmean(), im_c2real(), im_c2imag(), im_ri2c(), im_jpeg*2vips(), im_vips2jpeg*(), im_tiff2vips(), im_vips2tiff(), im_exr2vips(), im_fits2vips(), im_vips2fits(), im_analyze2vips(), im_raw2vips(), im_vips2raw(), im_magick2vips(), im_png2vips(), im_png2*(), im_ppm2vips(), im_vips2ppm(), im_mat2vips(), im_rad2vips(), im_vips2rad() redone as classes - added argument priorites to help control arg ordering - generate has a 'stop' param to signal successful early termination - added optional output args, eg. x/y for min - CLI supports optional output args - in im_vips2tiff, enable YCbCr compression for jpeg write - VipsMin stops search early if it can - C API supports optional output args - switch back to int-valued operations - add the operation cache, various --vips-cache-* flags - fallback vips_init() - vips_tracked_malloc() tracks allocation size and can report total mem usage - cache limits, drop, init, flush plus command-line controls - remove dmalloc support, was never used and valgrind is better - im_csv2vips() allows quoted strings, including escaped quotes - added vips_shutdown() - added --vips-leak flag - more VipsImage props - added vips_image_write(), old one becomes vips_image_write_to_file() - added vips_region_paint_pel() - added VipsArea as a public struct - added array members and arguments - added nary - remove VipsPool, vips_object_local_array() is much better - cache.c now drops if you have too many open files - CLI args to change max files - new format for handling exif tags - switch SMALLTILE to 128, 512 was just too big - oop mode "rd" was not always being used for images - added ARRAY interpretation for images - VipsStats tracks minpos/maxpos as well - moved mask/ to deprecated - use atexit() to call vips_shutdown() - set _O_TEMPORARY on delete-on-close temp images if possible - unlink temps on rewind on *nix, less likely to leave temps on a crash - added complex conj as a basic operation - rect/polar/conj work on any format, not just complex - new VipsFile system for load/save in image formats - options now introspectable, try "vips jpegsave" - copy swap uses glib byteswap macros, about 2x faster - edvips can change vips header byte ordering - "header" is terse by default - "header" outputs filenames if working on many files - added openslide support (Benjamin Gilbert) - allow new-style load/save options in filenames to vips_image_new_from_file() etc. - VipsFormat is deprecated - remove outchecks from documented API - support gobject-introspection - new Python binding based on gobject-introspection - only spot options at the end of arg strings - add vips_cache() as a vips8 operator - remove the old fft fallback - remove fftw2 support - much faster im_draw_smudge() 14/1/12 started 7.26.8 - interpolate CLI args were broken (thanks speckins) 5/12/11 started 7.26.7 - lazy read from tiled tiff from layers other than 0 was broken - optional args to vips_call*() do not work, disabled (fixed correctly in master) - address calculations in files over 4gb were broken on 32-bit platforms (broken since March 2011, oops) 12/10/11 started 7.26.6 - NOCACHE was not being set correctly on OS X causing performance problems with large files - update Orientation exif tag on jpeg write 12/10/11 started 7.26.5 - jpeg read/write copies over XMP data - handle offset correctly in separable convolutions (thanks Nicolas) - macros for class arg boilerplate - class arg order set by new 'priority' param - VipsExtend, VipsDirection enums added 12/9/11 started 7.26.4 - fallback vips_init() - im_openout() compat stub was wrong, breaking ruby-vips - vips_class_map_concrete_all() needed a compat macro too - vips_class_map_all() was broken 10/8/11 started 7.26.3 - don't use G_VALUE_COLLECT_INIT(), many platforms do not have a glib this recent - don't leave image->kill set when we detect termination - test for a working C++ compiler, disable C++ parts of none found 10/8/11 started 7.26.2 - oops, im_benchmark.c had some stuff turned off - configure option --without-cfitsio was broken (thanks Mike) 26/7/11 started 7.26.1 - doc fixups - oops, ==0 missing from a strcmp() in vips7compat - fixed a race in im_XYZ2Lab() table build - added im_concurrency_get() to operation db - better benchmarkn.sh runs for the correct number of CPUs automatically, runs three times for each one, and just reports the fastest 26/7/11 started 7.26.0 - version bunp for 7.26 - various fixes to get win32 and OS X building 6/12/10 started 7.25.0 - attach the jpeg thumbnail and multiscan fields (thanks Mike) - faster tiff read for some common cases - faster im_tile_cache() - if we use C++ in libvips, add -lstdc++ to vips-7.xx.pc - im_vips2png() / im_png2vips() set / get png resolution (thanks Zhiyu Wu) - updated README - don't use tables for bilinear on float data for a small speedup (thanks Nicolas Robidoux) - no tables for uchar either, about a 15% speedup (thanks Nicolas) - dmask write was broken - lr/tbmerge() cast images to match, like im_insert() - lr/tbmosaic() work for any mix of image formats / bands - removed ancient balance stuff from im_lr/tbmosaic() - gtk-doc for mosaicing - add im_fits2vips() to the operation database - im_fits2vips() is lazy and much faster - im__file_open_write() / _read() has a flag for text_mode, get rid of all the remaining fopen()s - move cooc_* and glds_* to deprecated - move im_dif_std() to almostdeprecated - move im_simcontr() to almostdeprecated - add im_sines() to operation db - move im_spatres() to almostdeprecated - done gtk-doc for other - --vips-progress tells you about nthreads, tile size, nlines - gtk-doc for interpolate - move im_stretch3() to deprecated - move im_clamp() to deprecated - gtk-doc for video ... all operators done! amazing argh - set MAP_NOCACHE on OS X, otherwise performance dives off a cliff with files larger than memory - removed man pages, we are all gtk-doc now - im_jpeg2vips() ignores weird APP1 chunks - im_add() for int/uint was broken - im_ri2c() was broken - added VIPS_FORMAT_BIGENDIAN format flag - moved IMAGE and REGION to VipsImage and VipsRegion, classes over VipsObject - Rect -> VipsRect - libpng-1.5 supported - better png read for 1-bit and palette images - fits write - better fits metadata support - renamed all header fields, old names still supported, hopefully - all of iofuncs moved to vips_ namespace - lots of old iofuncs API moved to deprecated - added VipsOperation, an abstract base class for all vips operations - added VipsAdd, the first operation object - im_tiff2vips() int/uint mixup for rows_per_strip, thanks Bubba - removed the links feature, won't work with vips8 - got rid of the tools/ subdirs - added im_bufjpeg2vips() - tiff reader can do 1, 2, 4, 8 bit palette images - tiff palette read can do mono images - im_bufjpeg2vips() has a "header_only" parameter - added vips_image_get_data() - updated German translation (thanks Chris) - fixed typo in im_conv() overflow estimation which could cause errors - vips.c has new action syntax, knows about vips8 operations - add now has sizealike - vips7 binops all do sizealike too, also gbandjoin and ifthenelse - new API is now functional - vips.c generates GOption flags for vips8 operations - added im_gauss_dmask_sep() - laplacian generator lost -ve lobes for large sigma - added im_aconv(), approximate convolution - bumped smalltile to 512x512 for testing - added VipsPool, got rid of floating refs again, argh - VIPS_EXEEXT is now part of the exported API - im_blend() also does sizealike, oops - jpeg write was not inverting CMYK, thanks Ole - im_falsecolour() converts to mono 8-bit for you - im_icc_import*/export*() cast inputs for you - im_vips2tiff() uses im__temp_name() for intermediates - added vips_wrap7 ... wrap up vips7 operations as vips8 classes - man pages are back for commands 30/11/10 started 7.24.0 - bump for new stable - added im_dmask2imask(), im_imask2dmask() - im_rotate_*mask90() can do masks of any size (thanks Adam Turcotte) 18/7/10 started 7.23.0 - im_vips2bufjpeg() writes to a linked list, so it will work for any size image and header - added im_vips2bufpng() - use GetTempPath() to pick a temp dir on Windows - added "rd" mode to im_open() - vipsthumbnail and vips use "rd" - im_divide spots /0 - remove liboil dependency, we will use Orc instead - various small cleanups (thanks Tim) - add lcms2 support - VImage(filename) defaults to "rd" mode - revise window_offset / window_size, again - fix a mixup with ANY hints that caused performance problems on the main benchmark - rewritten im_circle as im_draw_circle, im_circle moved to almostdeprecated - added IM_TYPE_RW args for inplace ops --- nip2 uses this to wrap inplace ops automatically - special-case 3x3 masks in im_conv() for a 20% speedup - add IM_TYPE_RW flag for im__rw_image, helps nip2 auto-wrap inplace ops - im_insertplace() casts and bandalikes - copy iconv.m4 and friends in bootstrap, thanks Mike - moved the stupid _copy() versions of the inplace ops to deprecated, since nip2 can call inplace ops directly now - added im_draw_rect(), moved im_paintrect() to deprecated - added im_draw_image(), moved im_insertplace() to deprecated - added im_draw_line(), now clips, moved im_fastline() to deprecated - added im_draw_line_user(), now clips, moved im_fastlineuser() to deprecated - added im_draw_mask(), now wrappable, moved im_plotmask() to deprecated - added im_draw_point(), moved im_plotpoint() to deprecated - added im_read_point(), now partial, moved im_readpoint() to deprecated - added im_draw_smudge(), moved im_smudge() / im_smear() to deprecated - convolution functions support complex images - im_blend() can have any format condition image and it's converted to uchar - security fix for vips-7.23 wrapper script (thanks Jay) - im_affine() has a larger safety margin - fix gtk-doc warnings - small mask load/save improvements - mask gtk-doc done - add cfitsio dependancy - add FITS reader - land the vector branch and the orc dependancy ... we have SSE erode/dilate/add/conv - add IM_SWAP - dilate/erode do (!=0) on non-uchar images - add multipass Orc to im_conv(), 3.5x faster for 5x5 mask - im_profile() works for any image format, any number of bands - im_rank_image() works for mix of formats, bands - morph gtk-doc done - oops, missing braces in debug.h and util.h, thanks Laurence - update C++/Python binding - oop, bool constants are always (int) now, so (^-1) works for unsigned types, thanks Nicolas Robidoux - much lower memuse for im_cache() in complex pipelines - im_scale_dmask() normalises to 20, not 100 ... we hit the fast conv path more often 12/5/10 started 7.22.2 - the conditional image of ifthenelse can be any format, a (!=0) is added if necessary - oops vipsthumbnail sharpening was turning off for integer shrinks, thanks Nicolas Robidoux - im_vips2jpeg() could fail for very small images (thanks Tim) - threadpool wasn't stopping on allocate errors (thanks Tim) - vips_sink_disc() could block if allocate failed (thanks Tim) 12/5/10 started 7.22.1 - fix a problem with tiff pyramid write and >1cpu, thanks Ruven - constant ops clip to target range - oops, moreconst and moreeqconst were the same - better buffer handling in sinkdisc for single-line images - less chatty errors from "vips" - oops, don't rename "copy_set" as "copy_", thanks Ole 12/5/10 started 7.22.0 - bump and rename - vipsthumbnail has a manualpage and sharpens correctly - more interpolator work - fixes to --disable-cxx mode (thanks Mike) - added German translation, thanks Chris Leick - fixed typos in some messages, thanks Chris Leick - fix gettext startup - all "colour" in messages changed to "color", have a proper en_GB translation file - vipsthumbnail delete profile failed if there was a profile - interpolate cli unref was broken - more accurate, slightly faster bilinear and bicubic (thanks Nicolas Robidoux) 21/3/10 started 7.21.3 - added progress feedback to threadpool - --vips-wbuffer2 switch does all wbuffer use now - im_wbuffer2() renamed as vips_discsink(), some cleanups - im_gammacorrect() can do 16-bit images too - im_histplot() could fail for signed int histograms - im_fwfft() and im_invfft() could free their output image too early - added im_local_imask(), im_local_dmask() - added im_mpercent_hist() - im_maplut() casts the index image to one of the uint types - fixed a couple of /0 problems with scale == 0 masks - set G_LOG_DOMAIN to VIPS so we can use g_warning etc. - added VIPS_DEBUG_MSG() macro - --vips-wbuffer2 turns on threadpool for im_iterate as well - im_vips2tiff() uses vips_sink() instead of threadgroup - strip out threadgroup - add --enable-debug=xxx flag - im_iterate() -> vips_sink() - better number-of-bands detection for im_magick2vips() - added im_get_argv0() - added PFM read / write 16/1/10 started 7.21.2 - "invalidate" is careful to keep images alive, so invalidate callbacks can do im_close() - flood_blob could loop if start point == ink - added im_meta_remove() - added remove profile option to vipsthumbnail - added vips_bandfmt_iscomplex() and friends, im_iscomplex() and friends deprecated - im_bandjoin()/im_gbandjoin() work with images of varying formats - added im_copy_native(), deprecated im_copy_from() and friends - im_check*() name rationalisation - finally removed old flood stuff - im_insert*() bandalike and formatalike - im_*join() bandalike and formatalike - im_ri2c() bandalike - im_vips2png() saves 16-bit PNGs, if necessary - vipsthumbnail has selectable interpolators, optional sharpen - moved a lot of stuff (eg. im_iscomplex()) from deprecated to almostdeprecated to avoid breakage - im_csv2vips(): allow lines that end with EOF rather than \n - im_vips2tiff has a bigtiff option - oops, im_lineset() needs to ask for WIO of mask and ink - move cache invalidation to REGION, fixes a race - don't im_invalidate() after paint, it can cause horrible performance problems ... for example, im_plotmask() used as the action operator for im_fastlineuser() is terrible - instead, users of the inplace operations need to call im_invalidate() at the end of a set of paint actions to trigger an update - parent/child renamed as upstream/downstream in DAG - set VIPS_ICC_DIR in configure - ICC profiles are looked for in VIPS_ICC_DIR as a fallback - im_render() mask image generation no longer triggers image calc - threadgroups scale output buffers with number of threads for smalltile ... improves SMP scaling for narrow images on many-way machines - default to max number of processors (--vips-concurrency and IM_CONCURRENCY set >0 can override) on linux and win32 - better nprocs guesser - im_render() fixes to help the paintbox, some speedups too - added im_wbuffer2(), a new distributed threading system, and --vips-wbuffer2 to enable it, thank you Christian 15/1/10 started 7.21.1 - added "written" callbacks, used to implement write to non-vips formats 26/11/09 started 7.21.0 - branch for new dev cycle - argh, missing init from colour.c (thanks Peter) - argh, im_measure() was not looping over bands correctly (thanks Peter) - removed mmap_limit, we now always use windows ... reduces VM use hugely, because mmap windows are freed when their regions are freed, while images are only unmapped when they are closed - have a min bytes for mmap windows as well, so we don't make too many tiny windows - im_disp2Lab() was broken - deprecated.h is now defined in terms of current functionality, rather than repeating stuff - im_flood() and friends rewritten, typically 4x faster - removed --with-cimg option, added --disable-cxx - added im_system_image() (thanks Roland) - added postclose callbacks - added vipsthumbnail - oops, generate C++/Python wrappers for deprecated operations by default - read TIFF images strip-wise, not scanline-wise - better TIFF YCbCr reading (thanks Ole) - isanalyze generates fewer silly error messages 26/11/09 started 7.20.3 - updated en_GB.po translation - file_length is gint64 to avoid win32 breakage 23/11/09 started 7.20.2 - GETTEXT_PACKAGE now includes lib version number (thanks Jay) 11/11/09 started 7.20.1 - oop, im_clip2fmt() was missing PTOP flag, should get a small speedup - im_conv() / im_convf() didn't like all-zero masks - small updates to im_convf() from im_conv() - im_read_imask() produced an incorrect error message if passed a doublemask - rename im_convf(), im_convsepf() as _f() - vips.c drops _f suffix when overloading - regenerate C++ binding, don't make deprecated package 9/11/09 started 7.20.0 - removed vips-7.x.spec.in, shouldn't really have this in SVN - bumped version to 7.20 - fixes to get "make dist" working again 3/4/09 started 7.19.0 - version bump - tiny conv speedup - catch lcms error messages - fix includes for gtk+-3.0 - report virtual memory too in im__print_all() - cosmetic changes to nohalo - im_magick2vips() needs to invert alpha - now (more or less) passes -Wextra - added "fail" option to im_jpeg2vips: fail with an error on any warning (thank you Ole) - started gtk-doc changes - renamed im_meta_get_type() and im_header_get_type() as im_meta_get_typeof() and im_header_get_typeof() to prevent confusion with GObject type definers (was breaking gtkdoc object scan) - revised more names, limited documented API - im_buildlut() could segv for non-zero based tables (thanks Jack) - VIPS_BUF_STATIC() does not take length arg - check for SetImageOption() so we work with GraphicsMagick too - "header" sets a non-zero exit code if anything failed - add and use im_check_uncoded() and friends - matlab load handles column-major and plane-separated images (thanks Mikhail) - JPEG save allows "none" for profile, meaning don't attach a profile - saner, simpler, faster typecasting for im_add(), im_subtract(), im_multiply(), im_divide(), im_remainder() - im_remainder() has a float result for float types - im_measure() allows sel == NULL, meaning all patches - added "deprecated" package - faster, simpler, better im_max(), im_min, im_avg(), im_deviate() - im_max() returns true modulus, not square of modulus, for complex images - im_avg() works for complex, returning average modulus - im_system() fix (thanks Roland) - im_system() rewrite - im_maxpos()/im_minpos() are partial and work for complex - im_max()/im_min() are now convenience functions - im_maxpos_avg() handles complex and multi-band images - added im_point(), rewrite im_point_bilinear() in terms of this - close callbacks now happen *after* images have closed resources (such as open files) ... this lets them delete temps and stuff. Expect breakage :( - added vips_interpolate_get_window_offset() - boolean revised: smaller, more general, faster - im_remainderconst_vec() renamed to im_remainder_vec() for consistency - added im_shift*_vec() - renamed im_eor_vec() as im_eorimage_vec() for consistency, also and, or - renamed im_eorconst() as im_eorimage_const() for consistency, also and, or - relational revised: smaller, more general, faster - im_blend()/im_ifthenelse() allows many-band conditional, 1-band then/else - im_blend()/im_ifthenelse() allows band and format to differ between then and else parts - better im_check() functions - added im_flood_other() as start of simple segmentation operator - added im_label_regions() - im_printlines(), im_debugim() deprecated (use im_vips2csv() instead) - meta, header, callback, error, region, check, generate, memory gtkdocs - removed printlines tool, vips2csv is much better - removed other useless tools as well: debugim, binfile - fix up addr calcs on 64-bit machines with >2gb images and inplace ops (thanks Christoph) - im_generate() checks that im_demand_hint() has been called for this image - im_jpeg2vips.c, set scale_num on shrink (thanks Guido) - heh argh reading history always stopped after the first line (thanks Haida) - added im_histindexed - new im_iterate() calls start and stop functions from workers so resources they make are owned by the worker thread ... this makes it possible to have start functions which create mutiple regions and therefore allows im_iterate() to scan more than one image at once - threadgroup no longer has any default action, you must attach a work function - added im_copy_file() - added im_insertset() - im_insertplace() allows small to be outside big - added im__colour_difference(), colour ops now work on any image format - added im_col_display_get_table(), so display tables are now shared by name - added im__colour_unary() - drop "set" postfix from names, so "insert" can now take a vector of positions - deprecate all the "_raw" variants, not really necessary now - removed "contrib", not very useful anymore - added im_header_as_string() - im_malloc()/im_free() now call g_try_malloc()/g_free() ... removes confusion over whether to use im_free() or g_free() for things like im_header_string() - added im_history_get(), im_getexp(), im_printdesc() as wrapped functions ... so you no longer need the "header" program - image vectors from Python work, woo 25/3/09 started 7.18.0 - revised version numbers - updated vipsmanual - revised manpages - removed name and "changed" from vipsobject since we don't use them yet - explicitly link with stdc++ for nohalo etc. stuff - wrap im_gauss_imask_sep in C++/Python 6/3/09 started 7.17.3 - revised nohalo - remove fading stuff from im_render() -- cleaner and simpler - configure spots support for "restrict" - reset dcm:display-range on magick read to help DICOM - saner im_buildlut() behaviour - added im_gauss_imask_sep() - allow open and view of truncated images (thanks Joe & Rachel) - revising rounding on im_affine*() coordinate transforms to make them more stable - added Radiance write - added im_float2rad() - added IM_CODING_RAD, support where it makes sense (extract, flip, rotate, etc.) - IM_PROGRESS env var - docs for rad2float and IM_CODING_RAD 3/3/09 started 7.17.2 - im_magick2vips.c: allow funky bit depths, like 14 (thanks Mikkel) - isradiance was returning TRUE too often - radiance loader now loads packed RGBE/XYZE instead of unpacking to float - added im_rad2float() 11/10/08 started 7.17.0 - merge vips-7.16 brach back into trunk - bumped version number to 7.17.0 - re-added type.[hc] - added vipsinterpolate and im_affinei - added yafrsmooth interpolation - added yafrtest - added yafrnohalo - ubuntu 8.10 changes - interpolators get an output pointer, not region - tuning for bicubic - revised transform / clip code, we now do corner not centre - yafr-smooth reworked along the lines of bicubic - cleanups after yafr hacking - added affinei_all - don't set im_error() on failed callback - moved im_format_t to VipsFormat, now sits over VipsObject - IM_FORMAT_FLAG_PARTIAL -> VIPS_FORMAT_PARTIAL - updated docs - interpolators use type introspection - added vips --list classes, does formats too - include sys/param.h to get PATH_MAX in more places - added vips_format_get_flags() - oop, forgot to check for cancel during tiled tiff write - don't use mmap for tiff read: no performance advantage, chews up VM - VIPS_INTERPOLATE_SHIFT bumped to 12, we need the extra precision for u16 gel data - added string->double transform for cmdline args - merged class-params branch back into trunk - IM_FREE() can do "const char*" variables - im_buf_t renamed as VipsBuf - added vips_object_to_string() - added "nickname" and "description" properties to VipsObject - shift/and/or/eor ops were broken for non-int types - added nohalo interpolator - updated format docs - IM_INPUT_INTERPOLATE() now used by affinei and affinei_all - added vips_object_new - resamplers/interpolators now in a resample package - removed yafrnohalo.c - added matio as a dependency - added Matlab save file read - added Radiance file read - better file-not-found messages 11/9/08 started 7.16.3 - oop typo in manpage for im_project() - doc fixes - returning non-zero from eval callbacks was not always stopping computation 11/9/08 started 7.16.2 - added --without-v4l option - added -no-undefined to libsrcCC build, so we get a libvipsCC.dll - removed the swig dependency: we include the generated bindings in the distribution tarball 6/9/08 started 7.16.1 - trigger eval callbacks on tiled tiff write - added vips as an im_format_t - added im_format_write()/_read() convenience functions - more cleanups for the format API, argh - removed win32/ directory now mingw finally makes DLLs correctly - removed the windowed spcor for now, it has some edge effects 24/8/08 branch for 7.16 - renames and version numbers - load plgs from libdir as well as libdir/vips-x.x for compat - complex -> complex conversion was broken - refstring <-> gstring transforms - better behaviour with Magick non-presence - added --enable-links switch to configure ... we no longer make the bin/im_* links by default - started a 'format' section in the docs - configure fails if no gettext found - revised po/ - released as 7.16.0! 25/5/08 fork for loadable image format branch - image load/save in non-vips format code moved to own dir - simple format searching added - some cleanups for vips load - im_open() simplified - add im_format_flags - only consider formats with a save method in im_format_for_name() - oops, format sort order was reversed - im_filename_suffix() includes "." in suffix - merge back into trunk for 7.15.1 - remove im_ispng(), im_png2vips_header() etc. & friends - add "vips --list formats" - rename VBuf as im_buf_t for consistency - add type.[hc], start of new type system - removed man pages for IM_MIN, MAX and RINT to avoid case confusion on OS X / win 7/3/08 started 7.15.0 - MAGIC constants should be tagged as unsigned - write MAGIC correctly on sparc/powerpc machines (thanks Joe) - oop, we were still making fade threads even when not fading - tiny cond jump fixes for valgrind in colour.c - remove -lstdc++ from libs, except on windows - push Magick cflags earlier in the include order to make it easier to pick GraphicsMagick over ImageMagick (thanks Mikhail) - fix the en_GB translation - use meta to preserve resunit between tiff load and save - small doc improvements - read and write CMYKA tiff (thanks Doron) - performance improvements for morphology ops, esp. when zooming out - oop, im_render() was broken for mask == NULL - better support for multiple Python installs (thanks Jay) - better IM_SETSTR() stops some warnings - im_histcum() works for signed histograms - better rounding for im_conv(), im_convsep() - tiny speedup for im_conv() - better /0 test for remainderconst - revise i18n configure, get rid of intltool - command-line IMAGVEC input could segv with non-vips image output - added .tobuffer()/.frombuffer(), .tostring()/.fromstring() to Python binding - add PIL_mode_from_vips () and vips_from_PIL_mode () utility functions - update docs for new Python stuff - FIND_ macros no longer search for stuff, you have to specify prefixes if the packages are not on the default path (or in $prefix). This avoids some accidents on some platforms - configure prints a summary of optional packages found at the end - im_lhisteq() checks for window too small - added invalidate callbacks - now tests for MagickWand before ImageMagick (thanks Adam Turcotte) - added "-rotate" option to vips2dj - added man page for im_resize_linear - better jpeg-in-tiff YCbCr read (thanks Ole) - oops, invalidatefns were not being freed on im__close() - VMask() can init from std::vector, so Python can init from [] - added IM_LIBDIR, im_guess_libdir() - load plugins from libdir/vips-x.x on startup - added meta get/set int/double/string/area/blob/GValue to C++ API - include time_t in vips.h, thanks Nicolas Robidoux - lock global image list (thanks lee) 25/1/08 started 7.14.0 - bump all version numbers for new stable - better CMYK JPEG read (thanks Ole) - add __str__ to VError in Python (thanks Ole) - revert the dynamic wrapping for Python :-( next version! - added VImage::convert2disc (thanks Ole) - you can now set the jpeg quality factor for tiff pyramids (thanks Joe) - you can now shrink jpegs during read, see "man im_jpeg2vips" - added CMYK JPEG write - optionally use GraphicsMagick (thanks Bob Friesenhahn) - look for MAGICKCORE_HDRI_SUPPORT (thanks Marcel) - set icc profiles in tiff pyramids explicitly (thanks Joe) - add --without-cimg configure option - add im_maxpos_subpel - make im_abs compile without liboil - add im_align_bands - fix type overflow in complex division - fix im_cross_phase and im_addgnoise (Tom) - updated docs, C++ and python - header no longer stops on error - C++ dummy2.cpp helps OS X linking 12/12/07 started 7.13.3 - added "include " to VImage.cc to help gcc 4.3 - started moving the python binding to dynamic wrapping - added im_wrap(), im_wraptwo(), im_phasecor_fft(), im_cross_phase() (Tom) - memleak plugged in im_save_string_setf() - bugfix in and docs for im_gradcor() (Tom) - use Glib macros to make im_msb work on big-endian platforms (Tom) - use Glib macros to get rid of needless compile warnings (Tom) - fix type overflow in im_c2ps/im_abs (Tom) 31/10/07 started 7.13.2 - build cimg on windows fixes - various include cleanups, updated man pages - break im_wbuffer() out to a separate API - use im_wbuffer() to make im_vips2jpeg() compress in the background - also im_vips2png(), im_vips2tiff(), im_vips2ppm() - revised evaluation progress system - new evalstart/evalend/preclose callbacks fix over/underflow reporting - but the meaning of evalend has changed in a non-backwards-compatible way :( use preclose instead ito get the old behaviour - added "--vips-progress" flag to turn on a simple eval progress tracker - make im_spcor[12] static, im_spcor is wrapper (Tom) 28/9/07 started 7.13.1 - vips2dj can print RGB images - oop, include missing - add protos for generate/iterate function args, fix warnings - add cimg package, we now have C++ source inside VIPS, sigh - added OUTPUT_DOUBLEVEC and OUTPUT_INTVEC, use for im_maxpos_vec() and friends 29/8/07 started 7.13.0 - we now have a trunk and the version is 7.13.x, woo! - move manpages into a separate man/ dir ... speeds up builds a lot on windows - don't install malkovich - don't fail on unknown args for python (thanks Simon) 1/8/07 started 7.12.5 - im_embed() is more general ... x and y can be negative - predicate.c is smaller and cleaner - libsrcCC link improvement from Pablo - support 32/64-bit ImageMagick as well (thanks Marcel) - better im_magick2vips() for Q8 ImageMagick - split repository to trunk/branches ready for a stable 7.12.x branch 27/7/07 started 7.12.4 - proto.h had vars called small, breaking on win32 - more python fixing, we now have working matricies too 17/7/07 started 7.12.3 - fix to VImage.i for gcc 4.2 (thanks Damir) - eek, off by 1 for more than 1 band hists - needed a slightly larger worst-case buffer in im__b64_encode() - tiny cleanup for make_hI() prevents cond jump on ui in valgrind - --disable-threads was broken again - remove .svn dirs from dist - now passes distcheck again 17/7/07 started 7.12.2 - added im_bandmean() - added support for TIFFTAG_PREDICTOR (Andrey Kiselev) - fix TIFFOpen() mode snafu (Andrey Kiselev) 11/5/07 started 7.12.1 - memory.c abort()s with DEBUG - oops, im_bits_of_fmt() manpage was not being installed - im_histcum() can do all image types - updated NEWS - added im_csv2vips_header() - command-line csv read was broken (thanks Tom) - removed length limit on argument vectors (Tom) - added IM_PREFIX, configure-time install prefix - oop, turned off memory.c DEBUG - fix some bogus gcc 4.1 warnings with im_open_local_array() - better vips usage message - oops, IM_ANY missing from im_demand_hint() manpage (thanks Shahid) - just warn if plugins fail to load in im_init_world() - expose Vargv and make refblock public rather than private so that subclasses of VImage can add vips-style member operations (thanks Pablo) - oops, im_initdesc() needed to have bbits set correctly (thanks Shahid) - make VError derive from std::exception more officially - woo, got exceptions working in SWIG - soname version bumped to 12.x.x - oops, added vector ops to Python - check for overflow of int in return of strtol in dispatch system (Tom) - add im_[di]mask_[xy]size to dispatch system (Tom) - add im_gradcor(), im_grad_[xy] (Tom) 26/3/07 started 7.11.21 - ooo, added %include "std_except.i" & friends to VError.i, VImage.i - im_init_world() is more lenient about recursive invocation - im_gbandjoin() falls back to im_copy() for 1 input image - race condition fixed in im_render.c (thanks Simon) - bump for 7.12!!! 26/1/07 started 7.11.20 - another fix to im_region_image() (thanks Mikkel) - tiny speed up to im_rect_includesrect() - avoid recursive invocation in im_init_world() (thanks Christian) - fix to extract_prefix (thanks Christian) - buffer cache is now per thread - combine buffer unref and ref in a single operation to reduce malloc/free cycles - new internal API for passing regions between threads means we can remove buffer locks - more buffer/region sanity checks, plus a memory barrier - lock around error buffer changes - im_vips2mask() was wrong for nx1 m-band images - liboil back to "test" - add buffer_cache_list to avoid GHashTable _insert()s - oop, --vips-concurrency was broken - renamed (in dispatch layer) im_and/or/eor_const -> im_and/or/eorimageconst for consistency - C++ API wraps IMAGEVEC, DOUBLEVEC, INTVEC arguments - oop, IMAGE % vector was broken 21/12/06 started 7.11.19 - added im_linreg() (Tom) - various C++ API polishes, plus a bugfix (Dennis Lubert) - vips.spec split to devel and python too (Dennis Lubert) - be more explicit about sizeof(magic) - init magic to native order by default (thanks Dennis) - Hist becomes im_history_get() - new history mechanism is faster, uses much less memory, and removes duplicate lines - added im_get_option_group() - added official im_concurrency_set()/_get()() - don't read bbits from vips files ... set ourselves from bandfmt - oops add RGB16 and GREY16 to C++ header - --list packages option to vips.c - updated docs to 7.12 - oops, im_region_image() snafu was causing a lot of recomputation - make im_mpercent() suck a little less - EXIF save was a bit bOrked ... cause of mac crashes? - im_histgr(), im_heq(), im_hist() all number bands from zero now - fix stride in liboil calls - set RGB16 on 16-bit RGB ICC export 29/11/06 started 7.11.18 - added im_buffer_t so regions can share calculated pixels: 2-3x speedup on the benchmark - im_region_local() -> im_region_buffer() - im_sharpen() order change to help sharing - im_invalidate() clears buffer caches - add sentinel attributes - add some missing im_demand_hint()s - paint ops invalidate the output image - fix nothread eval - raise threads limit to 1024 (thanks Christian) - manual redone - vipsCC python init() hooks - add liboil dependency - use liboil for im_abs(), im_add(), im_divide(), im_floor(), im_multiply(), im_subtract(), im_lintra(), im_avg(),im_deviate() - quiet libtoolize test (thanks Tom) - im_benchmarkn now regrows image each time - strip meta from sample2.v ... saves a lot of mem (esp. Hist) - added im_isscalar() (Tom) - added IM_REGION_ADDR_TOPLEFT() (Tom) - reduce size of im_rightshift_size.c to help compile (Tom) - make im_stop_many(NULL) safe (Tom) 24/11/06 started 7.11.17 1;5Q - better benchmark script makes graphing easier - double-buffer image file writes - reuse write threads - clean up threadgroup / iterate / generate - added im_benchmarkn to make it easier to make a CPU-bound op on large machines - im_cache() failed for cpus > 1 1/11/06 started 7.11.16 - moved im__convert_saveable() into im_copy() (thanks Christian) - missing gobject dependency (thanks Christian) - --enable-threads was broken (thanks Christian) - eval without theads was broken (thanks Christian) - LIBADD libvips.la to libvipsCC.la (thanks Simon) - benchmark.sh is now plain sh, not bash - set ORIENTATION_TOPLEFT in im_vips2tiff (thanks Josef) - oops, im_vips2csv() output separator was broken - added im_benchmark2 - move XYZ2Lab LUT build outside the eval thread 30/10/06 started 7.11.15 - print leaked windows - oops, race condition in im_window_unref() - integrated im_region_window() into im_region_image(), tiny speed up 6/10/06 started 7.11.14 - ifthenelse and affine dhints revised - buildlut no longer outputs x cods - configure asks for glib >= 2.6 (we need GOption) - configure uses AC_TOOL_CHECK to find tool names to help cross-compiling. - better configure test for libexif - add C++ include ... include in a namespace - added im_benchmark / SMP benchmark script - add im_maxpos_avg() and im_point_bilinear() (Tom) - make im_region_free(NULL) safe (Tom) - link in manpages for im_contrast_surface (Tom) 8/9/06 started 7.11.11 - add im_norm_dmask() - removed old code for gradient and lindetect - internal decls split from proto.h to help SWIG - test for python and SWIG during configure - added python dir for the binding - python binding done! - oops, --without-python was broken (thanks Tom) - added python/test - add im_lu_decomp() im_lu_solve(), rewrite NR type functions in terms of these (Tom) 23/6/06 started 7.11.10 - still more im_affine() rounding/clipping tweaks - ignore "--" arguments to vips.c - im_init_world() also sets g_*_prgname() and loads plugins - add manpage for im_init_world() (oops) - error_exit() prints prgname - various cygwin fixes - fix cache thread assert failure (thanks Joe) - "header" now uses GOption, slightly different args, will loop over args - fixed assert() overenthusiasm in im_prepare() - im_csv2vips() now has separate whitespace / separator tables - add im_rightshift_size() (Tom) - add im_maxpos_vec(), im_minpos_vec() (Tom) - add im_norm_dmask() (Tom) - make im_free_[di]mask(NULL) safe (Tom) 23/6/06 started 7.11.9 - back on sourceforge CVS again - require openexr 1.2.2 or greater - range check xy on im_insert*() for sanity - VMask::invertlut decl removed (thanks Jean) - added \"all\" option to vips.c 17/5/06 started 7.11.8 - debrokened openexr read - added im_tile_cache() - added tiled read to im_exr2vips() - im_tiff2vips() now uses im_tile_cache() rather than its own cache ... faster in some cases, less RAM use in some cases, saves 200+ lines - removed 'broken' read option from im_tiff2vips() - read/write doubles with g_ascii_strtod() and friends where appropriate - add a "thread" member to region to help sanity check region ownership - saner threadgroup fixes a race problem on gcc 4.0.3 / amd64 - added im_vips2csv() - im_open() now does CSV read/write too - oops, broke vips main prog for function name in argv1 case 22/4/06 started 7.11.7 - split vips_png.c to im_vips2png.c and im_png2vips.c - added OpenEXR dependency - added im_exr2vips(), im_exr2vips_header() - added im_isexr(), im_open() knows about OpenEXR - added im_contrast_surface(), im_contrast_surface_raw() (Tom) - added im_msb(), im_msb_band() (Tom) - im_scale() sets Type on output - added RGB16, GREY16 types - im_*2vips() set these types if appropriate - configure fixes for mac - vips main prog uses GOption - im_icc_* locks around calls to cmsDoTransform() to avoid corruption on SMP machines - add im_prepare_many() (Tom) 10/3/06 started 7.11.6 - typo in manpage and header for im_rect_dup() (Tom) - don't abort image load if XML read fails - added im_video_test() ... test video source - oops, lcms .pc finder was not working - clipping problem in im_affine() fixed (thanks Clare) - test for attr support in libmagick - im_text() returns an error for empty string - im_falsecolour() scale reversed - im_remosaic() could crash on bad mosaics - configure changes to fix --without-magick, lcms and fftw (but sadly we now require .pc files for these libs) - im_vips2jpeg() automatically converts to 1 or 3 band sRGB uchar for write - also im_vips2png() - added im_project() 20/2/06 started 7.11.5 - added im_csv2vips() - commas in filename options can be escaped with a '\' - raise tile buffer limit (thanks Ruven) - im_spcor() and im_fastcor() have prettier borders - im_fastcor() returns sum of squares of differences, not sum of abs of differences 18/11/05 started 7.11.4 - small win32 fixes, thanks Juan - added im_flood_blob_copy() ... a temporary hack - much faster im_histplot() - read RGBA palette-ized PNG images more robustly (thanks Tom) - turn on -ms-bitfields automatically for mingw 26/9/05 started 7.11.3 - better error recovery for im_binfile() file too large - all raw files now use mmap windows, so (eg.) ppm and analyze reads can go >2GB - remove DISABLE_COMPAT ... you now have to define IM_ENABLE_DEPRECATED to get broken #defines - fix to build without exif, thanks Chas - use native win32 API for seek()/truncate() to work with large files - use attribute to check printf-style args with gcc - fix gcc4 warnings - removed ebuild, since it's in gentoo now - im_magick2vips() sets meta from attributes (good for dicom) - im_magick2vips() writes many-frame images as tall thin VIPS images - im_histcum() was broken for vertical histograms - im_histnorm() is neater - simpler and faster inner loop for im_conv() and im_convf() avoids gcc4 bug - appendc() was reading past the end of the buffer on MSB machines 13/6/05 started 7.11.2 - im_copy_set() was messed up in 7.11.1 - put into CVS, phew - fixed a rounding bug in im_affine() ... should no longer get black edges on image resize - if TIFF open fails in im_open(), try going through libmagick - merge requires all bands == 0 for transparency (used to just check 1st band) - 16 bit LAB TIFF read/write was wrong - new GType for refstring makes it visible from im_header_map() - jpeg loader attaches exif data (and human-readable meta fields) - jpeg saver writes any exif data - meta not wiped by im_*incheck() in a "w" image - meta keeps traverse order - now require glib >= 2.4 - require libxml-2.0 for meta save and new history mechanism - no more .desc files, history saved in XML after pixel data - i/s/d meta fields saved there too - added base64 encode/decode - added blob header write - added a save string type: types which define transforms to and from the save format get serialized - GValue meta API now exposed, since we can serialise anything - jpeg loader loads ICC profiles - jpeg saver saves ICC profiles from the VIPS header - src/header.c knows about meta system - added im_analyze2vips(), im_grid(), im_raw2vips() - extract/grid/replicate/zoom were not setting TRANSFORM flag - better falsecolour LUT - less stupid + more portable read/write of VIPS header - better im_updatehist() - jpeg load sets vips xres/yres from exif, if possible - jpeg save sets exif xres/yres from vips, if possible - icc_export and icc_transform attach profiles and intents to output images - added im_icc_import_embedded() to import with an embedded profile - split vips_jpeg.c into two, it was getting too big - added im_cp_descv(), im_cp_desc_array(), funcs use them - removed im_append_Hist() from API - fixed meta copy bug - better history copy, removed nonsense about 1st line of Hist being special - tiff read/write now reads/writes ICC profile from meta - edvips rewritten to remove stupidness, and can now set xml - header can now print xml extension block - IM_ prefix for colour temp names 1/6/05 started 7.11 - added im_copy_morph() - im_region_region() allows Bands and BandFmt to differ, provided sizeof( pel ) is the same ... makes im_copy_morph() work - added im_meta*() functions (MW) - im_header_*() rewritten for meta - added im_header_exists(), im_header_map() - use pkg-config to find libpng and ImageMagick - added im_lineset() - added im_extract_areabands() (JF) - added im_copy_from() (JF) 15/4/05 started 7.10.12 - im_ifthenelse just evals left/right for region all zero/all one - also im_blend - swap g_setenv() back to plain setenv() so we work with glib 2.2 9/4/05 JC started 7.10.11 - docs no longer have broken links - fixed memleak in im_text() 8/4/05 - one bit tiff read was sometimes reading a byte too far in each scanline 14/1/05 started 7.10.9 - im_filename_split() will now usually work for filenames containing ':' characters - added im_render_fade() for fancier nip2 image repaint - added "ccittfax4" as a TIFF compression option - fix all 64-bit compiler warnings - "," allowed as column separator in mask read - better at spotting singular matricies - small im_render() tidies - glib dependancy reduced to just 2.0, but untested ... helps people building on older systems who aren't interested in nip2 - removing leading spaces from IMAGEVEC arguments - load non-interlaced PNGs more efficiently - 1 point mosaic functions work on more image types - better memory allocation debugging info - local memory on regions can shrink as well as grow - shut down threadgroups on render if no dirty tiles - limit number of simultaneous renders - higher mmap window threshold - allow max == -1 for unlimited render cache - 'priority' marks non-suspendable renders - im_embed() mode == 4 paints white pels - im_tiff2vips() was broken with --disable-threads - oops, im_errormsg() compat macros were GCC only - larger default tile size and strip height - tiff write sets PHOTOMETRIC_CIELAB for vips TYPE_LAB images ... so we can write float LAB as well as float RGB (thanks Ruven) - also 16 bit LAB TIFF write - im_render() rewritten 20/11/04 started 7.10.8 - im_sharpen() is ~15% faster - more quoting for MAGICK finder - im_XYZ2Lab() uses a LUT rather than cbrt(), 5x faster - --disable-threads removes gthread dependency completely (thanks Simon) - intercept TIFF warnings as well as errors ... stops occasional libMagick exceptions - add im_init_world() to im_init() as well to help backwards compat (thanks Simon) - im_icc_present() function description was broken, thanks Jay - oops, libtool library versioning was wrong, thanks Jay - can now make TIFF pyramids of any non-complex image type (was uchar and LAB only), thanks Ruven - 1st order mosaic code now works for LABQ too - build system changes to make "make distcheck" work - RPM .spec files fixed up and updated by configure (thanks Simon) - tiny cleanups for vdump - use g_setenv()/g_getenv() - tiny improvements to IM_FREE*() - tiny VImage debug print fixes (thanks Jay) - swap off_t for gint64 to fix LARGEFILE support on win32 - computation feedback now uses gint64 for number of pels, so we give feedback correctly on images with >2**31 pels - other small fixes for >2**31 pels in an image 10/11/04 started 7.10.7 - im_histnD() was not checking BandFmt (thanks Kirk) - improvements to threading system speed up non-vips output in some cases - use cbrt(x) where we can ... 10x faster than pow(x,1.0/3) on win32 - typeo in im_text() when built without PANGOFT2 (thanks Stefan) 1/11/04 styarted 7.10.6 - tiny doc fixes - scripts now only depend on 'vips' program - im_open( "r" ) is now lazier ... for non-VIPS formats, we delay read until the first ->generate() - so im_open_header() now deprecated since im_open("r") is identical - now looks for fftw3 as well as fftw2 ... slightly faster ffts 19/10/04 started 7.10.5 - fix to light_correct (thanks Jay) - edvips knows about xoffset/yoffset - better vips enum<->char conversions 4/10/04 started 7.10.4 - man page fixes (thanks Jay) - removed last csh scripts (thanks Jay) - scripts default VIPSHOME to $prefix (thanks Jay) - doc build system tidies - im_rank() edge padding was wrong - im_vips2tiff() can now embed ICC profiles 22/9/04 started 7.10.3 - mildly better im_vips2tiff() - *, -, +, /, % between two images now work for mixed number of bands - im_free() was missing a man page - revised documentation 1/9/04 started 7.10.2 - C++ .pc files were still set for 7.9, grr - im_insertplace() didn't check compatibility of images (thanks Matt) 27/7/04 started 7.10.1 - set default stack size explicitly to help platforms with a very low default - 16 bit RGB tiff read was broken (bug introduced in 7.9.5, thanks Haida) - !pangoft2 was broken, thanks Kenneth - win32 build fixes 12/7/04 renamed as 7.10.0 - added NOCACHE function flag ... stops nip memoising video & paint ops - added im_extract_bands() ... takes out many bands from an image - im_vips2tiff() scanline write speed up for area pipelines 10/6/04 started 7.9.6 - tiny polishing of im_ppm2vips() - im_blend() can now work on labq - boolean ops all work on float/complex images (by casting to int) - im_maplut() was broken for 1 band image + many band lut + >8 bit output - im_lintra_vec() now handles 1 band image and many band vector to make many band image - oops, im_lintra_vec() was missing a man page - im_measure() can work on labq - im_lhisteq() uses new embed mode, _raw() version is one pixel smaller, sets Xoffset/Yoffset for new origin scheme - generalised im_tone_build() to any image type to make im_tone_build_range() 20/5/04 started 7.9.5 - tiff output res can be a single number too - added im_text() to make a bitmap from a string with pango - im_tiff2vips() does 16 bit RGBA - im_binfile() was broken since 7.9.2 due to im_mapfile() change - im_ppm2vips() now works for 16 bit images - added im_copy_swap() ... copies, reversing byte order - im_resize_linear() was broken for some images, thanks Javi 8/3/04 started 7.9.4 - oops, config.h include missing in a few places - im_vips2tiff() can now write 1 bit images - im__find_lr/tboverlap() now exported to nip - better edge tile handling for tiff read/write (thanks Ruven) - added extend-pixels-from-edge mode to im_embed() - im_conv*(), im_rank(), im_stdif(), im_dilate(), im_erode() all use it to expand their input, so their output now has guess borders, not black borders - im_fastcor() now does an im_embed( 1 ) on the output ... the zero borders were very annoying before, since you would usually be searching for the minimum point - no change to im_spcor(), since you will usually be searching for the maximum - better im_render() cache behaviour under heavy loads - im_affine() revised * clip, resample and transform is now pixel-perfect for all inputs (I hope) * uses the new embed to make sure there are no black borders from edge interpolation * about 20 - 30% faster - policy change: Xoffset and Yoffset are now set by all operations to record the position of the input origin in the output - im_replicate() is much faster for some cases - added tile and mirror flags to im_embed() - added im_cache() convenience function - better ETA for image calculation - im_tiff2vips() now has a "broken" option so it can read tiled tiffs made with earlier versions of vips - on convert float to int format, now does floor() not rint() ... more 'mathematical' - added im_rint() - im_sharpen() now uses a gaussian mask - im_convsep() more resistant to int overflow problems - added im_make_xy(), avoids rounding problems with the old float-based thing - im_profile() now makes vertical images for a vertical profile - added im_vips2tiff() option to set the resolution in inches not cm (thanks Andrey) - im_binfile() is now exported 6/2/04 started 7.9.3 - added an im_init_world() to im_open(), to help old progs - renamed VSemaphore as im_semaphore_t - started using libtool library versioning - now uses g_module_*() in place of dlopen() - now uses pkg-config instead of vips-config (thanks Simon) - fixes to vips.h for _ADDR() with DEBUG on (thanks Konrad) 10/12/03 started 7.9.2 - patches for freebsd, thanks Lev Serebryakov - vips2dj knows about my colour laser printer - added i18n support, glib/gmodule/gthread dependency - im_error*() API revised to be more i18n friendly - List type removed, now uses g_slist - VBuf added, some more utility funcs pushed down from nip - im_thread stuff removed, now uses g_thread - im_lock stuff removed, now uses g_mutex - im_semaphore_t renamed to VSemaphore, not sure this is a good idea - build with --disable-threads to turn off threaded render - #include now pulls in most of the public API, you shouldn't need other vips includes very often - im_close() is better at cleaning up if there's an error - inverse FFTs could fail for wider-than-high images with fftw - better im_icc_transform error messages - bug fix in im_render with large caches - im_binfile() now has an offset parameter - im_mapfile()/im_unmapfile() now work on IMAGE and record the length of the file they mapped ... this lets VIPS successfully unmap a file if it changes size while it's open 20/10/03 started 7.9.1 - threadgroups now have their own kill flag - im_plotmask() now does anti-aliasing - im_iterate() fix for operations on mmap window images (thanks Clare) - im_writeline() stops on kill - fix for im_fwfft() segv for wider-than-high real images (thanks Andrey) - fix for im_fwfft() to work for non-square real images (thanks Andrey) - can now read and write 32-bit IEEE float TIFF (Andrey Kiselev) - clean-ups for colour.c (Andrey Kiselev) - no longer lets you make an image with width|height|bands == 0 (thanks Joe) - im_vips2tiff(), im_vips2*jpeg*(), im_vips2png(), im_vips2ppm() could sometimes fail for mmap window input images (thanks David) - added IM_RECT_HCENTRE(), IM_RECT_VCENTRE() macros 20/8/03 JC - started 7.9.0 - added im_rank_image() ... im_maxvalue() a special case of this - im_subtract() goes up to int earlier for better value preserving, thanks Haida - im_rank() much faster for large windows, correct result on all platforms (dratted memcpy() was causing problems before) - fixed problem with libMagick config if installed somewhere strange - fixed problem with include order in library compile - added --without-magick configure option - added im_render(), threaded background image paint - added im_replicate(), replicate an image horizontally and vertically 31/5/03 JC - started 7.8.11 - fixed a problem with relational operators and some combinations of input types (bug introduced in 7.8.9), thanks Haida - vips-7.8 script overrides VIPSHOME environment variable - better im_guess_prefix - stupid light_correct script no longer uses /pics/tmp - added batch_crop script 22/5/03 - started 7.8.10 - the JPEG writer can embed ICC profiles in output images ... although I've yet to see it make any difference :-( test this carefully at some point - fixed a possible coredumper in jpeg write - jpeg read now spots truncated files - im_invertlut() now makes an image, not a mask ... sorry :-( - im_histnD() makes an n-dimensional histogram from an n-band image - im_col_pythagoras() patch - IM_NUMBER() now returns int not size_t - new win32 build system from Juan and friends, based on tmake - sample project files for MSVC added, thanks Juan - win32/ subdir now has the win32 build systems - spec/ subdir now has the spec files for building RPMs - dist now includes formatted documentation - license change: VIPS is now LGPL, nip stays GPL ... this means proprietary programs can link against the vips library - had a report of a working VIPS build on a 64 bit system (!) - im_log_dmask() now includes all of the negative lobe, thanks matt - vips-7.8 start script now auto-relocates - im_spcor_raw(), im_fastcor_raw() now exported 29/4/03 - started 7.8.9 - changes to build to help MSVC - oops, makedef.pl missed out function names with an initial cap, and error_exit() - im_min() and im_max() gave random wrong results for >1 thread on >1 CPU machines (bug introduced in 7.7.20), thanks Joe - vips.c no longer generates C++ wrappers for functions with no image argument (thanks Haida) - im_invertlut() now wrapped by hand in VMask.cc - C++ docs updated - added im_open_header(), returns an IMAGE with just width/height/etc and no data - ... so now "header" will print useful stuff even on truncated files - tiff writer knows about alpha (thanks Jenny) 7/2/03 - started 7.8.8 - build failed with lcms turned off - im_spcor() could segv for 16bit images (thanks Joe) - im_tiff2vips() read resolution expressed as pixels/cm incorrectly - im_vips2tiff() tries not to write mad resolutions - header and im_open file type tests reordered for slight speedup - im_copy_set() had a broken dispatch function for xres/yres - im_fwfft() exploits libfftw real -> complex transform if possible for a 2x speed-up (thanks Matt) - im_invfftr() added for complex -> real inverse transform for 2x speed-up (thanks Matt) - im_freqflt() now uses im_invfftr() for real result and speedup - im_flipver() could segv on some inputs, thanks Clare - relational operators now work on complex - relational rewritten ... now fractionally slower, but 1/3 the size - vips2dj -1:1 produced incorrect height - better overlap-too-small detection in mosaicing code - im_system() can have NULL output - global balance ignores overlaps with only transparent pixels 3/1/03 - started 7.8.7 - worked in patch from Hans Breuer (thanks!) - png read/write with im_png2vips(), im_png2vips_header(), im_vips2png(), im_ispng() - im_errorstring() and im_col_displays() are now functions not externs (helps DLLs) - many include fixes to help native win32 build - added libMagick support, 78 file formats now loadable with im_magick2vips(), im_magick2vips_header() and im_ismagick(), w00t - now installs vips.m4 to $prefix/share/aclocal - added im_icc_export_depth() ... export to device space with a specified bit depth (8 or 16) - vips.def now rebuilt with custom rule in libsrc/Makefile.am - removed externs im_Type, im_BandFmt, im_Coding, im_Compression to simplify DLL build - im_mmap() -> im__mmap(), since it's supposed to be an internal function - new vips-7.8.x/proj directory holds unsupported sample makefiles and config.h for building with the MSC toolchain - new scripts batch_image_convert and batch_rubber_sheet (thanks Joe) - added the RPM .spec files to the main distribution - InitializeMagic() now passed "" rather than NULL to avoid assert() problems on some libMagic versions 2/12/02 - started 7.8.6 - now reads 8-bit RGBA tiff - C++ build guide fixes (thanks fsicre) - im_Type2char array text slightly messed up - global_balance is safer for complex mixed mosaics - removed im_lintra() fallback to im_copy() for scale == 1, offset == 0 ... too confusing - im_tiff2vips() now reads 16-bit LAB - added im_Lab2LabS() and im_LabS2Lab() 5/11/02 - started 7.8.5 - fix for mmap window of local region ... caused im_iterate() to break sometimes for large images, in turn occasionally breaking im_max()/im_min()/etc. (thanks Joe) - tiny speed up for im_rot90()/270() - on install on win32, add .exe suffix for links - vips.c knows to remove .exe suffix for linked commands - added im_errormsg_system() ... decode win32 error codes too - pagesize calcs for roving mmap windows were messed up on win32 (thanks Kirk) - some TODO cleanups - global balance broke horribly if you had filenames with spaces in (thanks Clare) 31/10/02 - started 7.8.4 - im_unmapfile() includes mixed up on mac os x - libtool patched for mac os x - vips.c sets numeric locale to "C" 27/10/02 - started 7.8.3 - configure fixes help mac os x - im_guess_prefix() adds ".exe" suffix on w32 if not there - changed im_measure() error messages to number bands from 1 - added func descriptor for im_read_dmask() to help nip, updated C++ API, docs 21/10/02 JC - started 7.8.2 - tries rand() if random() is not available - tries mktemp() if mkstemp() is not available - turns off realpath() if not available - added IM_DIR_SEP/IM_DIR_SEP_STR directory separator character/string - added IM_PATH_SEP/IM_PATH_SEP_STR path separator character/string - added im_path_is_absolute() - vips.c knows to link to vips.exe on win32 - spot mingw* and set BINARY_OPEN - open images in binary too (since we now read() the header) 10/10/02 JC - im_lintra() and im_lintra_vec() were broken for complex images :-( thanks matt - renamed im_and() as im_andimage(), im_eor() as im_eorimage() and im_or() as im_orimage() ... avoids breakage in the C++ layer - added im_dE00_fromLab() - limited release as vips-7.8.0 2/10/02 - renamed as vips-7.8, woohoo - revised documentation 19/9/02 JC - started sorting out VIPS #defines ... there are now a sensible set of new names (eg. NOCODING becomes IM_CODING_NONE, LAB becomes IM_TYPE_LAB) - define IM_NO_VIPS7_COMPAT to turn off the old names - added im_mmap()/im_munmap() layer for windows portability - removed the contents of history.h .. obsolete - added IM_IMAGE_ADDR() macro 10/9/02 JC - handle errors from TIFF lib correctly - configure fixes for cygwin - CMYK TIFF write fixed - configure fixes for mingw 5/9/02 JC - im_cp_desc() now copies Xoffset/Yoffset 21/8/02 JC - started 7.7.24 - reads CMYK TIFF - reads dpi from TIFFs - better float Xres/Yres 14/8/02 JC - new header fields Xoffset and Yoffset ... used by functions to hint the position of the origin in output images - support added to c++ api and to header - im__lrmerge(), im__tbmerge(), im__affine(), im_insert(), set Xoffset/Yoffset - now uses , not for better suse w0rkage - better configure for fftw (uses libdfftw name if libfftw not found) 8/8/02 JC - large file support with mmap() windows ... had to change im_prepare_inplace() to im_prepare_to() benchmark: - system hardware: 2 x 2.5GHz P4, 1GB RAM, 15k SCSI, ReiserFS os: suse 8 (kernel 2.4.18) compiler: gcc 2.95.3, -O2, threads turned on images: fred.v, fred2.v; both 4k by 4k LABPACK (64MB) images: jim.v, jim2.v; both 15k by 15k LABPACK (900MB) time: smallest real of 5 runs, system idle vips: 7.7.23, debug on in im_openin.c, window limit set with an environment variable - benchmarks cpu-bound: im_sharpen fred.v fred3.v 11 1.5 20 50 1 2 io-bound: im_insert fred.v fred2.v fred3.v 4000 0 worst-case: im_rot90 fred.v fred3.v - results desktop: no mmap windows mmap windows cpu-bound real 0m3.712s real 0m3.970s user 0m6.010s user 0m6.390s sys 0m0.900s sys 0m1.110s io-bound real 0m1.813s real 0m1.865s user 0m0.900s user 0m0.990s sys 0m1.720s sys 0m1.520s worst-case real 0m1.344s real 0m3.039s user 0m1.270s user 0m2.230s sys 0m0.850s sys 0m3.050s not quite sure why sharpen is a little slower (4%?) ... IO speed is about the same though ... worst-case is having to constantly move windows about (500,000 page faults, vs 10,000 for no windows) again, with an image larger than RAM no mmap windows mmap windows io-bound real 2m52.759s real 2m11.172s user 0m14.940s user 0m14.890s sys 0m29.940s sys 0m26.560s worst-case real 3m35.391s real 3m50.760s user 0m19.850s user 0m26.600s sys 0m12.650s sys 0m43.130s mmap windows actually slightly faster in this case ... plus they stress the OS less 31/7/02 JC - added -lm for better lcms detect - README notes for fftw on suse8 - im_profile() sets HISTOGRAM for output image - im_copy()/im_copy_set() function descriptor no longer sets PTOP ... helps avoid LUT problems - im_subsample()/im_zoom() fall back to im_copy() for shrink/grow == 1 - im_lintra() falls back to im_copy() for scale == 1, offset == 0 - no longer use Type == LUT ... all just Type == HISTOGRAM now - im_blend() was messed up for > 1 band images :( 16/7/02 JC - started 7.7.23 - im_XYZ2sRGB() wasn't setting Type = sRGB - im_icc_import() was broken for rgb - im_header_string() had wrong return type in function database 13/7/02 JC - added im_flood_blob() - added im_open_local_array() ... C API convenience function - oop, im_flood() was missing a man page - Type == FOURIER added to help visualisation - released as 7.7.22 30/6/02 JC - JPEG, TIFF and PPM import all now set sRGB Type for RGB import - im_header_int(), im_header_double() and im_header_string() added to aid UIs - now uses gettimeofday(), not time() - for consistency with other trig functions, im_c2amph() now returns degrees not radians (ouch) - added im_c2rect() ... turn (amp, phase) to rectangular - added im_sign() ... unit vector in direction of value - better im_scaleps() ... old code was terrible - rewritten im_rotquad() ... now partial - im_icc_export()/_import() now do ABSOLUTE correctly - added im_icc_ac2rc() ... converts absolute to relative colorimetry 25/6/02 JC - added im_copy_set(3) ... like im_copy(), but set informational header fields 20/6/02 JC - added im_ceil(), im_floor() - im_Lab2LabQ was not clipping a/b range correctly - im_icc_export(), own ABSOLUTE mode - released as 7.7.21 28/5/02 JC - im_remainderconst_vec broken for float/double - added Yxy colourspace 16/05/02 JC - auug, libtool was all messed up ... redone all the autotools stuff - uses libtool convenience libraries to build vips in sections - uses config subdir for temp files and .m4 things - patched stupid suse config.guess - vips2dj patched for better raw cmyk - released as 7.7.20 12/5/02 JC - im_vips2jpeg*() and im_vips2ppm() now both partial - started updating the C++ guide - had to change the location of the C++ headers :-( all C++ progs should now have: #include this is so things can work on systems which do not have case sensitive file systems - changes for Mac OS X * im_system() TRUE/FALSE removed * searches /*/[lib|include] to get fink libs for tiff and jpeg 30/4/02 JC - several functions were missing IM_FN_PIO in their descriptor ... this was harmless for nip/ip/C, but broke the ref counting in the C++ layer - im_system() now defaults "/tmp" for temp files - STRING input and output args were broken for C++ :-( - threads exit more quickly on error - im_min()/im_max() now partial (at last) - im_remainderconst()/im_remainderconst_vec() added - --with-dmalloc configure switch - vips2dj does CMYK and mono too - im_vips2tiff() allows any number of bands (but not the right way to write CMYK, see TODO) 26/4/02 JC - old ICC profile reader removed - little cms wrapped ... configure spots it, im_icc_transform() uses it to map between two images - also im_icc_import() and im_icc_export() so you can see PCS images - im_icc_present() to test for existence of lib - README fixes 4/4/02 JC - TODO changes - oops, DEBUG left on in im_invertlut() 2/4/02 JC - im_fwfft.c/im_invfft.c now use libfftw if available ... about 5x speed up and double precision - added FIND_FFTW autoconf macro - include/vips/proto.h changes 26/3/02 JC - started 7.7.19 25/3/02 JC - im_log_dmask() was broken (thanks matt) - casts between VDMask and VIMask were broken (thanks matt) - various error msgs improvements and tiny man page fixes 13/3/02 JC - tb/lr merge first/last cache moved to per-call state for better sharing - im_remosaic() bails out faster on error and makes better error messages 13/3/02 ruven - im_vips2tiff() pyramids stop at tilesize, not 64x64 25/02/02 JC - im_remosaic() is smarter, and works better with im_global_balance() - im_affine() 2x faster 14/2/02 JC - started 7.7.18 - vips.m4 and libsrc/Makefile.am fixes for IRIX 11/02/02 JC - vips/thread.h and vips/threadgroup.h were missing extern "C" for C++ - VImage::write() now tracks dependencies, so you can write() to a partial safely ... although it's not a very useful thing to do (thanks Mike) - new VImage::print() function for debugging - added im_print() 22/01/02 JC - started 7.7.17 15/01/02 JC - im_rect_unionrect() and im_rect_intersectrect() safer for repeated args - im_video_v4l() no longer perrror()s on ioctl fail for less spam 03/01/02 JC - started 7.7.16 - im_version_string() really does return the date as well now 12/12/01 JC - im_guess_prefix() extra smartness for relative path names - VImage() no longer uses tmpnam() (thanks Paul) 11/12/01 JC - renamed im_fexists() as im_existsf() 7/12/01 JC - ppm man pages added (doh) 28/11/01 JC - warnings on g++ 2.96 fixed 22/11/01 JC - started 7.7.15 - im_video_v4l() failed to compile on non-linux platforms 7/11/01 JC - im_remosaic() added - im_*merge() are more intelligent about transparency in bizarre overlaps - grr! putenv() semantics change on more recent clibs ... should be safer now 19/10/01 JC - VDisplay( "display name" ) segved on unknown display :-( thanks mike 26/9/01 JC - contrib tools get data files from share/vips/xxx area now - im_vipshome() renamed as im_guess_prefix(), reworked for new package layout - doc/ build sorted out - ... but of course, docs still need updating for 7.8 20/9/01 JC - fix to im_vipshome() - ip2 renamed as nip - split to library only ... separate ip and nip packages - new VIPS_VERSION_* macros set from configure.in in vips/version.h.in - vips.m4 VIPS finder - reworked README, doc/README and TODO - now installs to /usr/local/ by default - fmask4th.c was including varargs.h ... d'oh - include area reorganised: everything inside now ... hopefully the only user-visible change is that all plain C progs need to change: #include to: #include the C++ API should be unaltered 21/8/01 ruven - im_setupout() was missing some #includes 20/8/01 JC - started 7.7.14 15/8/01 JC - added libxml dependency for ip2 27/7/01 JC - im_conv(), im_convf(), im_convsep(), im_convsepf() now reject masks with scale == 0 26/7/01 JC - started 7.7.12 25/7/01 JC - started 7.7.11 - oop, im_histeq() and im_tonemap() also missed - better error messages from im_run_command() 23/7/01 JC - started 7.7.10 - im_sharpen() failed due to change in im_band_extract() offset 20/7/01 JC - started 7.7.9 4/7/01 JC - im_open(,"w") open() delayed until im_setupout(), very slightly safer - updated im_open() man page - im_tiff2vips() now embeds index in filename ... and it's page number (from 0), not subsample factor - finally bit the bullet ... im_extract()/im_extract_band() now number from zero (sorry!) - and im_lrmosaic()/im_tbmosaic() bandno param too 29/6/01 JC - im_region_free() now frees immediately 27/6/01 JC - im_vips2tiff() man page updated for deflate, 2 years late 22/6/01 JC - oops, limit wrong on im_rank() 21/6/01 JC - better post_install for --prefix outside VIPS's tree - -ltiff needs -lm in acinclude.m4 ... fixes configure on redhat 7.x 13/6/01 JC - started 7.7.8 6/6/01 JC - im_invertlut() added 31/5/01 JC - im_colour_temperature, im_XYZ2Lab_temp, im_Lab2XYZ_temp added - ... colour temp stuff needs sorting out properly 25/5/01 JC - added vips-config script, cf. gtk-config - --without-threads option added - did a bit of work on the C++ API docs 24/5/01 JC - added im_tiff2vips_header(), im_jpeg2vips_header() and im_ppm2vips_header() - header uses these to print fields quickly - switched to config.h - configure.in rewritten ... much nicer, fewer options, more automatic 17/5/01 JC - im_matinv() didn't free stuff correctly on singular matrix 16/5/01 JC - vips2dj now knows about 5000ps printers - allow RW mode for non-native VIPS image files, for 8 bit images 2/5/01 JC - started 7.7.7 1/5/01 JC - im_addgnoise() did not work for >1 band images 23/4/01 JC - configure options to remove support for JPEG and TIFF ... helpful for a no- dependencies build 20/4/01 JC - im_(v)snprintf() added - all sprintf()s removed 15/4/01 JC - im_affine() had a rounding problem 11/4/01 JC - tiny mosaicing bug fixed in im__lrcalcon - started 7.7.6 21/3/01 JC - new iblend code in im_tbmerge() was typo-d - mosaic1 was broken by affine too 20/3/01 JC - im_image() failed for FMTUCHAR 12/3/01 JC - started 7.7.5 - im_sharpen() uses seperable convolution for big speed up - new "Print" menu 11/3/01 JC - REALVEC renamed as DOUBLEVEC - added IMAGEVEC - added IM_INPUT_IMAGEVEC - gbandjoin now has function description - new function im_maxvalue() - im_compass()/im_lindetect() reimplemented with im_conv()/im_maxvalue(), about 15% faster, works for any type, partial - im_gradient() reimplemented with im_conv()/im_abs()/im_add(), about 30% slower, works for any type, partial 10/3/01 JC - new function, im_clip2fmt() converts between any image formats ... slightly faster than the old im_clip() - legacy im_clip2us() etc. functions now just call this 9/3/01 JC - im_conv() rewritten, simpler, about 10% faster - im_convsep() rewritten, now does any non-complex type, partial, 20% faster - new functions: im_convf(), im_convsepf() for DOUBLEMASK - raw versions of each - legacy convolvers (eg. im_convbi()) removed 8/3/01 JC - new function im_blend() - new function im_lab_morph() - speed up to im_ifthenelse() - speed up to im_*merge() (uses integer arithmetic for integer blends) 4/3/01 JC - tiny speed ups to im_histgr() - speed ups to im_maplut() 3/3/01 JC - new functions: im_histnorm(), im_histcum() - im_histeq() more general - im_vipshome() --- better behaviour for relative paths 2/3/01 JC - new video package - im_video_v4l1() (video for linux) added - configure.in switches to turn v4l1 on and off 1/3/01 JC - new im_histspec() implementation ... more general, bugs removed 14/2/01 JC - better vips2dj usage message 13/2/01 JC - im_image_sanity() added, called in various places in iofuncs 9/2/01 JC - added 'check' and 'name' class member stuff to ip from ip_gtk2 - new "Plot" menu - new "Overlay" menu - more stuff in _stdenv/_list ... curried forms of head/tail etc. 7/2/01 JC - started 7.7.4 - vips2dj and vdump now use im_vipshome() 5/2/01 JC - new im_vipshome() function - min()/max() macros renamed as MIN()/MAX() - new im_load_plugins() function - vips.exe and ip now load $VIPSHOME/lib plugins at startup 2/2/01 JC - mosaicing functions now have an extra max blend width parameter 30/1/01 JC - fixed tbmerge no overlap detect 13/12/00 JC - started 7.7.3 30/12/00 JC - vips.h fixes for cygwin/wingdi conflict 27/11/00 JC - added im_vips2ppm(), im_open() imports and exports it - fixed nasty implicit output conversion problem for PIO dispatch() calls 21/11/00 JC - added im_ppm2vips() 16/11/00 JC - configure.in fixes ... jpeg found correctly now - searches for libz as well 16/11/00 JC - started 7.7.2 5/11/00 JC - speed up to lab2labq 19/10/00 JC - started 7.7.1 13/1/00 JC - oops, im_open() was missing an 'else' in jpeg/tiff load 5/8/00 JC - im_vips2tiff() now has mode string embedded in output filename - im_vips2jpeg() now has qfac in output filename - im_open() understands this 11/7/00 JC - new im_image() function ... wraps a VIPS image around a memory buffer - C++ layer changes: * now use #include * error renamed as VError * new VMask() constructors * new VImage() constructor * new VImage::data() access member * more operator equivalences: <, >, <=, >=, ==, !=, &, |, ^, % 17/6/00 JC - more consts added to vips protos 10/5/00 JC - minor configure.in changes to help solaris - removed _TIFFmalloc() and _TIFFfree() calls 9/3/00 JC - fixed rounding problem in generate grid 8/3/00 JC - fixup to im_system() temp dir 7/3/00 JC - added im_system() - small tidies 1/3/00 JC - better plugin test in configure.in 26/2/00 JC - fixes to Makefile.am in ip/src* and configure.in, to help ip find the right gtk includes on systems with more than one gtk-xxx installed 21/2/00 JC - now builds ip and ip_gtk2 16/2/00 JC - configure.in fixes for xil and some TIFF/JPEG strangeness 15/2/00 JC - im_global_balancef() was broken! d'oh - note in README about enabling video cards 10/2/00 JC - configure now searches for xil ... FIND_XIL macro - im_zoom() spots integer overflow - better shape set on region drag end in ip - better zoom-too-far handling in ip 13/1/00 JC - fixes to configure etc. to help cygwin - jpeg is now searched for too ... FIND_JPEG macro 10/1/00 JC - global_balance() now uses new affine() atuff 27/12/99 JC - mosaic1 stuff now uses new affine() funcs 21/12/99 JC - added Joe's docs - im_LabS2LabQ() rounding on a/b slightly broken for a/b == 0 20/12/99 JC - new function: im_affine() - similarity*() now in terms of affine() - tests for error return in reduce.c from maplut - small clean-ups 15/12/99 - im_version() added, new iofuncs package for it - ip did not call zero-input-arg vips functions - vips.c did not like zero-input-arg functions 6/12/99 JC - Sobel filter was a bit broken 3/12/99 JC - menu reorganisation - generate gauss mask dialog 2/12/99 JC - reworked text file IO, better error messages 1/12/99 JC - reworked .iprc filename stuff, cleaner 30/11/99 JC - better menu set switcher in calc preferences - ip now thinks it's 7.7 - did a spellcheck on the ip guide 29/11/99 JC - 7.7 started! - srgb D65->D50 converter - Negate added to arith - find similar pixel value dialog - find similar colour dialog - paste into background dialog 19/11/99 JC - adjust labq was mising - shrink image defaulted to /2 not /1 - sharpdropshadow broken - Rotate.* broken - vips-7.6.3 release 18/11/99 JC - ip didn't report space free on >2GB filesystems correctly - ip did not link statically against libXpm on solaris7 17/11/99 JC - im_histplot() failed for all 0's histogram - new profile_image dialog - man pages for im_sRGB2XYZ/im_XYZ2sRGB were broken - new colourize image dialog - new shrink image image dialog - new expand image image dialog - better doc Makefiles 16/11/99 JC - more menu reorganising - new image_to_mask/mask_to_image buttons - new match_two_images dialog - new measure_colour_chart dialog 15/11/99 JC - new custom LABQ sharpen in Image menu - configure support for SGI video (thanks Ruven) - menu fiddling in ip - new "resize canvas" menu item - im_insert_noexpand() added, no docs tho' 11/11/99 JC - new ip menu item: Image=>Adjust white/black/saturation of LabQ - fixed bug in decompose complex number - browse-icons now ignores errors - better error msg for "12 12" etc cases 10/11/99 JC - open hi-res gives proper error msg if no file found - made file-select boxes a bit more compact and clearer - updated configure.in for vips-examples-7.6 9/11/99 JC - new column start point moved - vdump now defaults to subsample 1, portrait - navigation boxes were broken - no longer shrink-to-fit if loading as high res - better positioning of zoom windows - removed some old cruft 8/11/99 JC - ooops, im_remainder() got lost somehow - refguide converted to latex and updated - cppguide updated 5/11/99 JC - libguide converted to latex and updated 4/11/99 JC - ip guide now latex2htmls cleanly ... still needs updating tho' - cpp/app guide latex2html redone 2/11/99 JC - configure no longer adds -32 to IRIX builds for you - some more stuff in README - simple DEBUGM malloc tracking, made libsrc/iofuncs/memory.c - changed im_malloc() to return void * - removed duplicate im_malloc() proto from util.h - changed all malloc/free to go through im_malloc()/im_free() 23/10/99 JC - double-click on error image now pops a load browser and an error dialog - add-new-column no longer scrolls to right edge of workspace - better scroll-to-bottom on item add - load ws twice does not cause 'already open' errors - memorise directory button in fsb 18/10/99 JC - new FIND_TIFF/FIND_MOTIF macros for acinclude.m4 - new ./configure switches, see ./configure --help - enabled static libs 8/10/99 - broke action_proc_bop() into smaller functions, stops bad code gen on gcc2.95.1 (and others, prolly) - restored old Makefiles in doc/src/ipguide - vips7.6 script renamed as vips-7.6 5/10/99 - replace image was broken - some menu reorganisation - 'reload all menus' button 4/10/99 - computed regions in ip were broken - updated system.iprc defaults - new menu item: adjust white/black points 2/10/99 - browse icons was broken - greyscale 16-bit tiled tiff was broken - extra mutex locks for TIFF*() in im_tiff2vips() 1/10/99 - some automake probs fixed - squished two ip bugs 30/9/99 - fixed problem with pthreads, now works on suse6.2 as well - new API stuff for threaded evaluation with im_threadgroup_t - new public interface provide platform independent threads/locks/semaphores - no error box if you zoom out too far now 26/9/99 - lr/tb merge blend was not quite right ... should be smoother now - histplot broken for float images 24/9/99 - better mono->labq converter - more portable ispoweroftwo detect for freq filter stuff 23/9/99 - better graphics expose handling 17/9/99 - >/< stuff in ip was a bit mixed up - ink preview fixed for mono images - help popup fixed 15/9/99 - linedetect and sobel filters for ip, thnx Kirk 14/9/99 - Find_histogram was broken - im_profile() man pages was broken - ooops, ip had old set of macros 10/9/99 - im_and/im_or/im_eor now work for any integer type Summer hols: (2nd half August '99) - initial heap block larger to avoid start gcs - def slicer fixed - larger max heap - toolkits with initial '_' hidden by default - custom recomb - dialog.def removed - ... other menu fixes - generate grid menu - im_remainder() added - new cursor change code, hglass rotates during comp! - dialog.c handles cursor changes better - rubber band in paintbox displays - mag widget stays on right! - undo/redo single pixel paint ops - heap size control from prefs - cancel for reductions as well as for image calc - browse stuff reworked, no more .icon.v files - save stops you overwriting open .v files - better animate_countdown() handling - better resize behaviour for bars added to images - better code generation, bug fixed in state tracking - auto recover from crash vips-7.38.5/TODO0000644000175000017500000001744712303141142010214 00000000000000 - need to do mosaicing and inplace, plus im_label_regions in morph - now vips_linear() has uchar output, can we do something with orc? - do restrict on some more packages, we've just done arithmetic so far also resample, colour, some of conversion, create, - maybe avg? but avg doesn't subclass arithmetic, so we can't - for interpolate, we'd need to be able to unroll the vector, so the interpolator would need to be built for the bands / stride / type of the image need new API For this, since interpolators currently work for any image - vips_gaussblur() should switch to float prec if given a float image? same for vips_conv()? maybe precision is a dumb thing - support --strip for other writers - vipsthumbnail could shrink-on-load openslide and pyr tiff as well? - use the webp advanced encoding api to set a write function for webp save to file - use g_log() instead of vips_info()? - object construction is threadsafe, but class construction is not https://github.com/jcupitt/libvips/issues/64 we worked around this by adding vips_class_ping_all() to dsave build, but this is not a good fix find out why vips class construct fails, test on seurat, kirk's 24-core monster - quadratic doesn't work for order 3 start to get jaggies on lines --- the 3rd differential isn't being initialised correctly for the sub-region? seems fine vertically, only get errors on horizontal tile boundaries because we step across tiles left to right: y doesn't change, only x does - the operation cache needs to detect invalidate tricky! perhaps have operations always watching all of their inputs and resignalling "invalidate" themselves cache then just needs to watch for "invalidate" on operations it tracks need to add an "invalidate" signal to operation mosaic ====== - balance should use new meta stuff - histogram balance option? resample ======== - check mosaic1, global_balance, similarity etc. use of im__affine how can we move them to im_affinei ? - perspective transform with a matrix ... base it on the Lenz transformer, but partial foreign ======= - magick2vips should spot ICC profiles and attach them as meta - interlaced jpg needs massive memory, we should have two jpg read modes, like png - add more sequential mode readers $ grep -l write_line *.c csv.c matlab.c openexr2vips.c ppm.c radiance.c - foreign docs come up as "VipsForeignSave", annoying, why? - add nifti support http://niftilib.sourceforge.net/ - add matlab write - im_exr2vips can now use c++ api see TODO notes in openexr read (though they all need more openexr C API) consider openexr write - magick should set some header field for n_frames and frame_height? see also analyze - im_csv2vips() could use "-" for filename to mean stdin but then we'd have to read to a malloced buffer of some sort rather than an image, since we might need to grow it during the read, since we couldn't then seek packaging ========= - test _O_TEMPORARY thing on Windows - do we bundle "convert" in the OS X / win32 builds? if we don't we should convolution =========== - revisit orc conv use an 8.8 accumulator ... build the scale into the 8.8 coeffs ... no div at the end, just a shift need 8 x 8.8 -> 8.8 for each coeff though - im_conv()/im_morph() could have more than 10 programs? try 20 and see if we still have a speedup make a base class for vector area operations with a matrix with three vfuncs for init / generate code for one element / end and a gslist of programs, use that as the base for morph and conv wait for vipsobject for this - we have aconv and aconvsep test timing, make sure it;s worth having a separate aconvsep version if it is, make im_aconvsep an optimisation: call im_aconvsep_raw() from vips_conv() if mask width or height == 1 and prec == APPROX now we can get rid of im_aconvsep() since it's just vips_convsep() with prec set to approx aconv needs some more work, get it going at least with gaussian arithmetic ========== - avg/dev etc. should uncode images? eg. labq2lab etc. how about ifthenelse? - HAVE_HYPOT could define a hypot() macro? - fix a better NaN policy should we not generate images containing NaN (eg. divide tries to avoid /0), or should vips_max() etc. try to avoid NaN in images (eg. vips_max() takes a lot a care to skip NaN, though vips_stats() does not)? iofuncs ======= - need vips_image_invalidate_area() - look at libpeas for plugin support http://live.gnome.org/Libpeas - how about vips max add[babe.jpg,babe2.jpg] does that make any sense? vips copy add[babe.jpg,add[babe2.jpg,babe3.jpg]] sum.v perhaps use curly brackets for code? vips max add{babe.jpg,babe2.jpg} no brackets or square brackets for options - transform_g_string_array_image() can't handle quoted strings, so filenames with spaces will break is there an easy fix? can we reuse code from the csv parser? the csv parser just parses FILE* streams, we'd need to break it out - note member free stuff in vipsobject docs should boxed get freed in finalise rather than dispose? vipsobject has few docs atm :( - vips_object_set_argument_from_string() needs more arg types must be some way to make this more automatic - generate the code for vips_add() etc. automatically? it might be nice to have them all in one place at least - what does G_UNLIKELY() do? can we use it? - look into G_GNUC_DEPRECATED for back compat in vips8 - should im_rwcheck() copy to disc? maybe im_rwcheck_disc() copies to im->filename and maps that rather awkward to do atm with the way check.c is structured swig ==== - swig is not wrapping im_project() correctly ... returns an extra VImage via a param - doc strings would be nice, read the SWIG notes on this new bindings ============ - new binding is still missing constants how do boxed types work? confusing we need to be able to make a VipsArrayDouble - Vips.Image has members like chain, __subclasshook__ etc etc, are we really subclassing it correctly? - add __add__ etc overloads freq_filt ========= - fft with odd width or height is broken ... DC ends up in the wrong place libvipsCC ========= - need new C++ API - need an im_init_world() for C++ which does cmd-line args too, so C++ progs can get --vips-progress and stuff automatically tools ===== - need a way to make the vips.1 etc. man pages gtk has things like docs/reference/gtk/gtk-update-icon-cache.xml and man pages are made from that with xslt - get rid of a lot of the command-line programs, who wants to write a man page for batch_image_convert etc yuk - can we make man pages for the API as well? probably not from googling a bit - rename header, edvips as vipsheader, vipsedit maybe have back compat links? new operations ============== - bilateral filtering, see: http://en.wikipedia.org/wiki/Bilateral_filter http://www.shellandslate.com/fastmedian.html http://people.csail.mit.edu/sparis/bf_course/ also a mail from Martin Breidt has links to several fast free C implementations - http://en.wikipedia.org/wiki/Otsu%27s_method - non-linear sharpen: replace each pixel by the lightest or darkest neighbour depending on which is closer in value - look at There is an order 1 algorithm for doing medians over boxes (truly O(1) per pixel: I checked it carefully; it's like doing means over boxes in order 1 per pixel) in OpenCV since February 2012 I think, due to Perreault (and Hebert). It appears to be well respected, at least for 8-bit medians. Very memory intensive. Simple and elegant. No clue if it fits VIPS well (probably not?). Article: nomis80.org/ctmf.pdf - check CMC equations against web http://en.wikipedia.org/wiki/Color_difference#CMC_l:c_.281984.29 - see http://www.dentistry.bham.ac.uk/landinig/software/cdeconv/cdeconv.html sounds useful for BM? vips-7.38.5/vipsCC.pc.in0000644000175000017500000000034012303140253011626 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: vipsCC Description: C++ API for vips image processing library Version: @VERSION@ Requires: vips = @VERSION@ Libs: -L${libdir} -lvipsCC vips-7.38.5/NEWS0000644000175000017500000002216312303140253010214 00000000000000VIPS changed from 7.10 to 7.12 (not exhaustive, see ChangeLog for details) Non-backwards compatible changes ================================ - IMAGE->Hist is deprecated, use im_history_get() instead - im_append_Hist() removed - IMAGE->Bbits is deprecated (now ignored) - im_region_local() replaced by im_region_buffer() VIPS enhancements ================= - new backwards and forwards compatible VIPS file format: it has a new metadata system that efficiently shares and propogates ICC profiles, EXIF data, etc. & whatever - speed ups: new pixel buffer cache saves and reuses computations, uses liboil where possible for a small speedup - SMP scaling: simplified lock system improves SMP scaling, double-buffered image writes overlap computation - lower mem use: new mmap window cache shares file mappings, history buffers share and reuse image history metadata - built-in support for new image formats: OpenEXR, Analyze7, CSV - RGB16 and GREY16 image hints - uses GOption for much better command-line argument handling - better C++ binding: namespaces, VError derives from std::exception, image and number vector constants - python binding - gcc sentinel attributes added - added GValue as an arg type - added im_benchmark() and friends for testing - new functions: im_analyze2vips(), im_benchmark*(), im_buildlut(), im_concurrency_get/set(), im_contrast_surface(), im_contrast_surface_raw(), im_copy_from(), im_copy_morph(), im_cp_desc_array(), im_cp_descv(), im_extract_areabands(), im_flood_blob_copy(), im_get_option_group(), im_grid(), im_header_exists(), im_header_map(), im_history_get(), im_invalidate(), im_isscalar(), im_lineset(), im_linreg(), im_meta*(), im_msb(), im_norm_dmask(), im_project(), im_raw2vips(), IM_REGION_ADDR_TOPLEFT(), im_tile_cache(), im_video_test() VIPS changed from 7.8 to 7.10 (not exhaustive, see ChangeLog for details) Non-backwards compatible changes ================================ - no longer generates vips-config script, instead it makes .pc files for pkg-config ... replace any "vips-config" with "pkg-config vips-7.10" - origin hint semantics changed ... it now records the position in the output image of the origin of the input image - all float to int casts on pixel values are now floor() rather than rint(), for consistency with C casting semantics VIPS enhancements ================= - nip reworked for gtk+-2.4, now called nip2 - now based on glib, so VIPS no longer has it's own thread, plugin and data structure libraries - i18n support, although not quite complete yet - new error message API to make i18n possible (compatibility macros mean the old API still works) - new 'start up VIPS' call, im_init_world(), sets up i18n and threads (optional to call it, but i18n won't fully work unless you do) - C programs now just need "#include ", no other includes required - wraps the Pango font rendering library, see im_text() - new function flag: NOCACHE ... means the result of the call should not be cached, useful for video grab functions and paintbox functions - im_embed() now supports a wider range of embedding styles, including a fast edge stretch - all area operations use the new embed style to expand their input rather than their output, so there are no more black borders on filtered images - other new functions: im_render(), im_cache(), im_extract_bands(), im_copy_swap(), im_rint(), im_make_xy(), im_init_world(), im_error(), im_warn(), im_diag(), im_rank_image(), im_replicate() - many fixes and improvements to old funcs - configure and portability improvements Bug fixes ========= - all serious bug fixes got back-ported to 7.8, I think VIPS changes from 7.6 to 7.8 (again, not exhaustive, see ChangeLog for details) Non-backwards compatible changes ================================ - output format options specified in filenames: new prototypes for load and save tiff and jpeg - C++ API name changes ... error => VError - include path change - C includes - C++ includes - im_extract*() numbers bands from zero, not from 1 ... also other funcs which refer to bands (eg. im_lrmosaic() etc.) - mosaic funcs have extra max blend width parameter VIPS enhancements ================= - rewritten and much fancier ip (see separate docs), now called nip ... old ip (slightly fixed) still there - mmap windows remove 2GB image size limit - images have an origin hint field - icc transforms supported via wrapping of Little CMS - much, much faster Fourier transforms via wrapping of libfwfft - ppm/pgm/pbm read/write - C++ API enhancements: new constructors, more operator equivalences - new colourspace: Yxy - support for D50 colour temperature images - new functions: im_image(), im_system(), im_version*(), im_blend(), im_copy_set(), im_flood_blob(), im_icc_*(), im_open_local_array(), im_header_*(), im_sign(), im_ceil(), im_floor(), im_remainderconst*(), im_print(), im_guess_prefix(), im_remosaic(), im_invertlut(), Yxy funcs, color temperature funcs, im_clip2fmt(), im_blend(), im_lab_morph(), im_histnorm(), im_histcum(), im_video_v4l(), im_LabS2Lab(), im_Lab2LabS() - new type: IMAGEVEC - header is much faster - ip/nip split to separate packages - better vips2dj - better cygwin support, mingw support too - Mac OS X and Windows build support - new set of sensible #define names, old names can be turned off with -DIM_NO_VIPS7_COMPAT - many configure improvements Bug fixes ========= - speed ups - fixes to implicit image format conversions - im_zoom() spots integer overflow - im_LabS2LabQ() rounding on a/b slightly broken for a/b == 0 - fixes to refcounting in C++ API - mask casts in C++ were broken VIPS Changes for 7.4 to 7.6 Non-backwards compatible changes ================================ - im_histplot() has new (and better) rules - im_andconst(), im_orconst() and im_eorconst() now take a double, not an unsigned char, as their constant argument type - im_global_balance_float() renamed as im_global_balancef() to be more consistent with other functions - im_global_balance_search() removed ... you can do this efficiently with an ip macro now - new parameter "gamma" to im_global_balance() and im_global_balancef() ... sets the gamma for the input device with which the images were captured, set to 1.0 for old behaviour - im_malloc() now returns void *, not char * Bug fixes ========= - tiny memory leak in im_list_remove() fixed - oops, the value for sRGB in the header was wrong, now 22 - missing function descriptor for im_rank_raw() - im_dECMC_fromLab() was broken - im_erode() and im_dilate() output incorrect error messages if mask elements were not one of 0, 128, 255 - im_rotate_*mask*() functions were not preserving scale and offset values Package enhancements ==================== The whole thing is now GPL, with GNU configure ip changes ========== - better display control bar - matrix operations now appear in the workspace - new UI elements: input options and toggles - better LUT optimisation --- arithmetic operations on UCHAR images should be much faster - new macro language --- same as old one, but faster and much more powerful - all standard menus rewritten in new macro language, much nicer! - batch operations with Group/Ungroup - now uses GDK for drawing in image windows, much better colour handling on 8/16-bit graphics cards - image repaint is now threaded for an about-linear speedup as you add more CPUs - many interface improvements and polishes VIPS enhancements ================= - VIPS now uses POSIX threads (7.4 used Solaris threads) and has been rejigged to provide a nice threading API to functions which call the library - im_open() now knows about LSB- and MSB- first VIPS images, and silently converts them to native order ... it also now ignores case when deciding what format to write - new parameter type IM_INPUT_REALVEC, a vector of doubles - new set of functions with vector constants: im_lintra_vec(), im_powtra_vec(), im_expntra_vec(), all relational (im_equal_vec(), im_notequal_vec(), etc.), all boolean (im_and_vec() etc.) - new flag for function descriptors: "IM_FN_PTOP" set for point-to-point functions ... makes ip use LUTs for operation - im_tiff2vips() now reads and writes 16-bit images, and knows about zip (deflate) compression - convenience functions im_extract_band() extracts a band from an image; im_extract_area() extracts an area - im_list_member() tests for list contains object - new functions im_write_*mask_name(), im_create_*maskv() _ new functions im_remainder() and im_profile() - fourier filtering, forward transform, reverse transform, make power spectrum all free memory more quickly, making them suitable for very large images - new functions im_isMSBfirst() and im_amiMSBfirst() test images and this processor for MSB first byte order - im_malloc() now prints low-on-memory warnings to stderr with im_warning() for easier bug catching - D65_X0 updated for latest recommedations, D60, D93, D55, D50, A, B, C added - minor fixes to the C++ interface to bring it in line with the newer ANSI standards - more and more comprehensive prototypes in "proto.h" to aid C++ (use of "const" etc.) - im_and*(), im_or*() and im_eor*() can now work on any integer image vips-7.38.5/man/0000755000175000017500000000000012303146331010347 500000000000000vips-7.38.5/man/batch_crop.10000644000175000017500000000121512303140253012451 00000000000000.TH BATCH_CROP 1 "2 Feb 2002" .SH NAME batch_crop \- crop a set of images .SH SYNOPSIS .B batch_crop left top width height image1 image2 ... .SH DESCRIPTION The area defined by the rectangle left, top, width, height is cropped out of each of the images and saved in a file of the same name, but prefixed by "crop_". For example: batch_crop 10 10 100 100 fred.jpg jim.png will make two images, crop_fred.jpg and crop_jim.png, each of 100 by 100 pixels, taken from the corresponding input images. .SH RETURN VALUE returns 0 on success and non-zero on error. .SH SEE ALSO header(1), im_vips2tiff(3), im_vips2jpeg(3), im_vips2png(3), im_vips2ppm(3) vips-7.38.5/man/vipsthumbnail.10000644000175000017500000000573612303140253013246 00000000000000.TH VIPSTHUMBNAIL 1 "13 May 2010" .SH NAME vipsthumbnail \- make thumbnails of image files .SH SYNOPSIS .B vipsthumbnail [flags] imagefile1 imagefile2 ... .SH DESCRIPTION .B vipsthumbnail(1) processes each .B imagefile in turn, shrinking each image to fit within a 128 by 128 pixel square. The shrunk image is written to a new file named .B tn_imagefile.jpg. This program is typically faster and uses less memory than other image thumbnail programs. For example: $ vipsthumbnail fred.png jim.tif will read image files .B fred.png and .B jim.tif and write thumbnails to the files .B tn_fred.jpg and .B tn_jim.jpg. $ vipsthumbnail --size=64 -o thumbnails/%s.png fred.jpg will read image file .B fred.jpg and write a 64 x 64 pixel thumbnail to the file .B thumbnails/fred.png. .SH OPTIONS .TP .B -s N, --size=N Set the output thumbnail size to .B N x .B N pixels. You can use MxN to specify a rectangular bounding box. The image is shrunk so that it just fits within this area, images which are smaller than this are expanded. .TP .B -o FORMAT, --output=FORMAT Set the output format string. The input filename has any file type suffix removed, then that value is substitued into .B FORMAT replacing .B %s. The default value is .B tn_%s.jpg meaning JPEG output, with .B tn_ prepended. You can add format options too, for example .B tn_%s.jpg[Q=20] will write JPEG images with Q set to 20. .TP .B -p I, --interpolator=I Resample with interpolator .B I. Use .B vips --list classes to see a list of valid interpolators. The default is .B bilinear. .TP .B -r, --sharpen=none|mild|MASKFILE Images can look a little soft after shrinking. This option lets you specify a sharpening mask. Use "none" to disable sharpening, or "mild" to sharpen lightly, or give the filename of a custom mask file to use. The default is "mild". The built-in mild sharpen mask is: 3 3 24 0 -1 -1 -1 -1 32 -1 -1 -1 -1 .TP .B -e PROFILE, --eprofile=PROFILE Export thumbnails with this ICC profile. Images are only colour-transformed if there is both an output and an input profile available. The input profile can either be embedded in the input image or supplied with the .B --iprofile option. .TP .B -i PROFILE, --iprofile=PROFILE Import images with this ICC profile, if no profile is embdedded in the image. Images are only colour-transformed if there is both an output and an input profile available. The output profile should be supplied with the .B --oprofile option. .TP .B -c, --crop Crop the output image down. The image is shrunk so as to completely fill the bounding box in both axies, then any excess is cropped off. .TP .B -d, --delete Delete the output profile from the image. This can save a small amount of space. .TP .B -v, --verbose .B vipsthumbnail(1) normally runs silently, except for warning and error messages. This option makes it print a list of the operations it performs on each image. .SH RETURN VALUE returns 0 on success and non-zero on error. .SH SEE ALSO header(1) vips-7.38.5/man/header.10000644000175000017500000000126112303140253011576 00000000000000.TH HEADER 1 "12 July 1990" .SH NAME header \- prints information about an image file .SH SYNOPSIS header [OPTIONS ...] files ... .SH DESCRIPTION .B header(1) prints image header fields to stdout. .SH OPTIONS .TP .B -f FIELD, --field=FIELD Print value of .B FIELD from image header. The special field name getext prints the VIPS extension block: the XML defining the image metadata. You can alter this, then reattach with .B edvips(1). .TP .B -a, --all Show all fields. Normally .B header just shows a one-line summary. .SH EXAMPLES $ header -f Xsize ~/pics/*.v 1024 1279 22865 1 256 .SH SEE ALSO edvips(1) .SH COPYRIGHT N. Dessipris .SH AUTHOR N. Dessipris \- 12/07/1990 vips-7.38.5/man/light_correct.10000644000175000017500000000240012303140253013172 00000000000000.TH LIGHT_CORRECT 1 "14 Oct 1996" .SH NAME light_correct \- correct illumination errors on set of images .SH SYNOPSIS .B light_correct grey image1 image2 image3 ... .SH DESCRIPTION The first argument should be an image of a piece of grey card, subsequent arguments should be images taken with the same lighting set-up which need correcting. The corrected images are written to files prefixed with "ic_". For example, suppose you have a directory with the following files in: example% ls dat1.1.v dat1.2.v dat2.1.v dat2.2.v dat3.1.v dat3.2.v dat4.1.v dat4.2.v grey.v then run light_correct like this: example% light_correct grey.v dat*.v to generate this: example% ls dat1.1.v dat1.2.v dat2.1.v dat2.2.v dat3.1.v dat3.2.v dat4.1.v dat4.2.v grey.v ic_dat1.1.v ic_dat1.2.v ic_dat2.1.v ic_dat2.2.v ic_dat3.1.v ic_dat3.2.v ic_dat4.1.v ic_dat4.2.v light_correct works by smoothing out the grey card image, finding grey-mean/pixel for each point, and then multiplying the result by all the following images. It also removes any .desc files it generates, to avoid problems with im_global_balance(3). .SH RETURN VALUE returns 0 on success and non-zero on error. .SH SEE ALSO header(1), vips(1) .SH COPYRIGHT The National Gallery and Birkbeck College, 1989-1996. vips-7.38.5/man/vipsprofile.10000644000175000017500000000271412303140253012714 00000000000000.TH VIPSPROFILE 1 "13 December 2013" .SH NAME vipsprofile \- analyze vips profiles .SH SYNOPSIS .B vipsprofile .SH DESCRIPTION .B vipsprofile(1) analyzes the file written by the --vips-profile option, calculates some statistics, and draws a graph of evaluation. Run any vips program with the --vips-profile option to generate a file called "vips-profile.txt". This contains timing information about CPU use, memory use and thread synchronisation. Run .B vipsprofile(1) to load this file, calculate some statistics, and draw a graph of evaluation saved to vips-profile.svg. This analysis can help track down performance problems. For example: $ vips sharpen shark.jpg x.jpg --vips-profile recording profile in vips-profile.txt $ vipsprofile reading from vips-profile.txt loaded 3622 events total time = 0.138322 name alive wait% work% unkn% memory peakm worker 20 0.069 34.5 58.9 6.65 3.14 5.56 worker 21 0.07 1.36 60.2 38.4 2.65 5.07 worker 22 0.07 33 55.8 11.1 2.62 5.04 worker 23 0.072 34.2 59.7 6.15 2.72 5.14 wbuffer 24 0.075 99 1.03 0.00401 0 0 wbuffer 25 0.075 95.6 4.39 0.00667 0 0 main 26 0.14 52.8 0 47.2 -11.1 0.787 peak memory = 21.6 MB writing to vips-profile.svg .SH RETURN VALUE returns 0 on success and non-zero on error. .SH SEE ALSO vips(1) vips-7.38.5/man/edvips.10000644000175000017500000000241412303140253011641 00000000000000.TH EDVIPS 1 "30 June 1993" .SH NAME edvips \- edit header of a vips image file .SH SYNOPSIS .B edvips [OPTION...] vipsfile .SH DESCRIPTION .B edvips alters a VIPS image file's header. This is useful for setting the resolution, for example. The options are: -x, --xsize=N set Xsize to N -y, --ysize=N set Ysize to N -b, --bands=N set Bands to N -f, --format=F set BandFmt to F (eg. uchar) -i, --interpretation=I set Interpretation to I (eg. xyz) -c, --coding=C set Coding to C (eg. labq) -X, --xres=R set Xres to R pixels/mm -Y, --yres=R set Yres to R pixels/mm -u, --xoffset=N set Xoffset to N -v, --yoffset=N set Yoffset to N -e, --setext replace extension block with stdin Be very careful when changing Xsize, Ysize, BandFmt or Bands. edvips does no checking! .SH EXAMPLES To set the Xsize to 512 and Bands to 6: edvips --xsize=512 --bands=6 fred.v or edvips -x 512 -b 6 fred.v Extract the XML metadata from an image with .B header(1), edit it, and reattach with .B edvips(1). header -f getext fred.v | sed s/banana/pineapple/ | edvips -e fred.v .SH RETURN VALUE returns 0 on success and non-zero on error. .SH SEE ALSO header(1) .SH COPYRIGHT K. Martinez 1993 vips-7.38.5/man/batch_image_convert.10000644000175000017500000000150412303140253014331 00000000000000.TH BATCH_IMAGE_CONVERT 1 "2 Feb 2002" .SH NAME batch_image_convert \- use VIPS to convert a set of images to a new type .SH SYNOPSIS .B batch_image_convert type image1 image2 ... .SH DESCRIPTION The first argument is the name of an image type, subsequent arguments are the names of files to be converted to that type. VIPS can usually read almost any image type, but it can only write VIPS, PNG, TIFF, PPM/PGM/PBM and JPEG. You can specify conversion parameters in the type name. For example: batch_image_convert tiff fred.jpg jim.png will convert .B fred.jpg and .B jim.png to TIFF format. batch_image_convert jpeg:95 jim.png will write jim.jpeg with a 95% quality factor. .SH RETURN VALUE returns 0 on success and non-zero on error. .SH SEE ALSO header(1), im_vips2tiff(3), im_vips2jpeg(3), im_vips2png(3), im_vips2ppm(3) vips-7.38.5/man/batch_rubber_sheet.10000644000175000017500000000137012303140253014161 00000000000000.TH BATCH_RUBBER_SHEET 1 "2 Feb 2002" .SH NAME batch_rubber_sheet \- warp a set of images with a rubber-sheet transformation .SH SYNOPSIS .B batch_rubber_sheet matrix image1 image2 ... .SH DESCRIPTION The first argument specifies a file containing the transformation, subsequent arguments are image files to be transformed. The transformed image is written to a new file, named as the old file, but with "rsc_" prepended to the file name. For example: batch_rubber_sheet lens.mat fred.jpg jim.png will read a transform from the file .B lens.mat and apply it to .B fred.jpg and .B jim.png, writing files .B rsc_fred.jpg and .B rsc_jim.png. .SH RETURN VALUE returns 0 on success and non-zero on error. .SH SEE ALSO The "Image=>Rubber" menu in nip. vips-7.38.5/man/vips.10000644000175000017500000000375512303140253011341 00000000000000.TH VIPS 1 "30 June 1993" .SH NAME vips \- run vips operations from the command line .SH SYNOPSIS .B vips [options] [command] [command-options] [command-args] .SH DESCRIPTION .B vips(1) is the VIPS universal main program. You can use it to run any VIPS operation from the command line, to query the VIPS function database, and to maintain parts of the VIPS library. To run a VIPS function, the first argument should be the name of the function and following arguments should be the function parameters. For example: $ vips im_invert lena.v lena2.v .SH OPTIONS .TP .B -p PLUGIN, --plugin=PLUGIN Load PLUGIN. Note that plugins in $VIPSHOME/lib are loaded automatically. .TP .B -v, --version Show VIPS version. .SH COMMANDS .TP .B list PACKAGE List operations defined in PACKAGE. PACKAGE can also be "classes", "packages" or "all". .TP .B cpph PACKAGE Print C++ header for PACKAGE. PACKAGE can also be a function name, or "all". .TP .B cppc PACKAGE Print C++ binding for PACKAGE. PACKAGE can also be a function name, or "all". .TP .B operation-name operation-arguments Execute a named operation, for example im_invert, or add. Names prefixed with "im_" are called via the vips7 interface, names without the prefix use the new vips8 interface. .SH EXAMPLES Run a vips7 operation. The vips7 interface does not suport optional arguments. $ vips im_invert lena.v lena2.v Run a vips8 operation. Operation options must follow the operation name. $ vips add --imtest=option.jpg lena.v lena2.v out.v Get a "usage" message for an operation $ vips add usage: add left right out add two images where: left - Left-hand image argument, input VipsImage right - Right-hand image argument, input VipsImage out - Output image, output VipsImage operation flags: sequential-unbuffered add: too few arguments .SH RETURN VALUE returns 0 on success and non-zero on error. .SH SEE ALSO header(1) .SH COPYRIGHT The National Gallery and Birkbeck College, 1989-1996. vips-7.38.5/man/Makefile.in0000644000175000017500000004416612303144056012351 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ man_MANS = \ batch_crop.1 \ batch_image_convert.1 \ batch_rubber_sheet.1 \ edvips.1 \ header.1 \ light_correct.1 \ vips.1 \ vipsprofile.1 \ vipsthumbnail.1 EXTRA_DIST = ${man_MANS} all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-man \ uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/man/Makefile.am0000644000175000017500000000027712303140253012326 00000000000000man_MANS = \ batch_crop.1 \ batch_image_convert.1 \ batch_rubber_sheet.1 \ edvips.1 \ header.1 \ light_correct.1 \ vips.1 \ vipsprofile.1 \ vipsthumbnail.1 EXTRA_DIST = ${man_MANS} vips-7.38.5/py-compile0000755000175000017500000001107612303144056011527 00000000000000#!/bin/sh # py-compile - Compile a Python program scriptversion=2011-06-08.12; # UTC # Copyright (C) 2000-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . if [ -z "$PYTHON" ]; then PYTHON=python fi me=py-compile usage_error () { echo "$me: $*" >&2 echo "Try '$me --help' for more information." >&2 exit 1 } basedir= destdir= while test $# -ne 0; do case "$1" in --basedir) if test $# -lt 2; then usage_error "option '--basedir' requires an argument" else basedir=$2 fi shift ;; --destdir) if test $# -lt 2; then usage_error "option '--destdir' requires an argument" else destdir=$2 fi shift ;; -h|--help) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." Byte compile some python scripts FILES. Use --destdir to specify any leading directory path to the FILES that you don't want to include in the byte compiled file. Specify --basedir for any additional path information you do want to be shown in the byte compiled file. Example: py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py Report bugs to . EOF exit $? ;; -v|--version) echo "$me $scriptversion" exit $? ;; --) shift break ;; -*) usage_error "unrecognized option '$1'" ;; *) break ;; esac shift done files=$* if test -z "$files"; then usage_error "no files given" fi # if basedir was given, then it should be prepended to filenames before # byte compilation. if [ -z "$basedir" ]; then pathtrans="path = file" else pathtrans="path = os.path.join('$basedir', file)" fi # if destdir was given, then it needs to be prepended to the filename to # byte compile but not go into the compiled file. if [ -z "$destdir" ]; then filetrans="filepath = path" else filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" fi $PYTHON -c " import sys, os, py_compile, imp files = '''$files''' sys.stdout.write('Byte-compiling python modules...\n') for file in files.split(): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue sys.stdout.write(file) sys.stdout.flush() if hasattr(imp, 'get_tag'): py_compile.compile(filepath, imp.cache_from_source(filepath), path) else: py_compile.compile(filepath, filepath + 'c', path) sys.stdout.write('\n')" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " import sys, os, py_compile, imp # pypy does not use .pyo optimization if hasattr(sys, 'pypy_translation_info'): sys.exit(0) files = '''$files''' sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') for file in files.split(): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue sys.stdout.write(file) sys.stdout.flush() if hasattr(imp, 'get_tag'): py_compile.compile(filepath, imp.cache_from_source(filepath, False), path) else: py_compile.compile(filepath, filepath + 'o', path) sys.stdout.write('\n')" 2>/dev/null || : # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: vips-7.38.5/acinclude.m40000644000175000017500000003415012303140253011705 00000000000000dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding dnl dnl FIND_ZIP[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] dnl ------------------------------------------------ dnl dnl Find ZIP libraries and headers dnl dnl Put includes stuff in ZIP_INCLUDES dnl Put link stuff in ZIP_LIBS dnl Define HAVE_ZIP if found dnl AC_DEFUN([FIND_ZIP], [ AC_REQUIRE([AC_PATH_XTRA]) ZIP_INCLUDES="" ZIP_LIBS="" AC_ARG_WITH(zip, AS_HELP_STRING([--without-zip], [build without libx (default: test)])) # Treat --without-zip like --without-zip-includes --without-zip-libraries. if test "$with_zip" = "no"; then ZIP_INCLUDES=no ZIP_LIBS=no fi AC_ARG_WITH(zip-includes, AS_HELP_STRING([--with-zip-includes=DIR], [libz includes are in DIR]), ZIP_INCLUDES="-I$withval") AC_ARG_WITH(zip-libraries, AS_HELP_STRING([--with-zip-libraries=DIR], [libz libraries are in DIR]), ZIP_LIBS="-L$withval -lz") AC_MSG_CHECKING(for ZIP) # Look for zlib.h if test "$ZIP_INCLUDES" = ""; then # Check the standard search path AC_TRY_COMPILE([#include ],[int a;],[ ZIP_INCLUDES="" ], [ # zlib.h is not in the standard search path, try # $prefix zip_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" AC_TRY_COMPILE([#include ],[int a;],[ ZIP_INCLUDES="-I${prefix}/include" ], [ ZIP_INCLUDES="no" ]) INCLUDES=$zip_save_INCLUDES ]) fi # Now for the libraries if test "$ZIP_LIBS" = ""; then zip_save_LIBS="$LIBS" zip_save_INCLUDES="$INCLUDES" LIBS="-lz $LIBS" INCLUDES="$ZIP_INCLUDES $INCLUDES" # Try the standard search path first AC_TRY_LINK([#include ],[zlibVersion()], [ ZIP_LIBS="-lz" ], [ # libz is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" AC_TRY_LINK([#include ],[zlibVersion()], [ ZIP_LIBS="-L${prefix}/lib -lz" ], [ ZIP_LIBS=no ]) ]) LIBS="$zip_save_LIBS" INCLUDES="$zip_save_INCLUDES" fi AC_SUBST(ZIP_LIBS) AC_SUBST(ZIP_INCLUDES) # Print a helpful message zip_libraries_result="$ZIP_LIBS" zip_includes_result="$ZIP_INCLUDES" if test x"$zip_libraries_result" = x""; then zip_libraries_result="in default path" fi if test x"$zip_includes_result" = x""; then zip_includes_result="in default path" fi if test "$zip_libraries_result" = "no"; then zip_libraries_result="(none)" fi if test "$zip_includes_result" = "no"; then zip_includes_result="(none)" fi AC_MSG_RESULT([libraries $zip_libraries_result, headers $zip_includes_result]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$ZIP_INCLUDES" != "no" && test "$ZIP_LIBS" != "no"; then AC_DEFINE(HAVE_ZIP,1,[Define if you have libz libraries and header files.]) $1 else ZIP_LIBS="" ZIP_INCLUDES="" $2 fi ])dnl dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding dnl dnl FIND_TIFF[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] dnl ------------------------------------------------ dnl dnl Find TIFF libraries and headers dnl dnl Put compile stuff in TIFF_INCLUDES dnl Put link stuff in TIFF_LIBS dnl Define HAVE_TIFF if found dnl AC_DEFUN([FIND_TIFF], [ AC_REQUIRE([AC_PATH_XTRA]) TIFF_INCLUDES="" TIFF_LIBS="" AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff], [build without libtiff (default: test)])) # Treat --without-tiff like --without-tiff-includes --without-tiff-libraries. if test "$with_tiff" = "no"; then TIFF_INCLUDES=no TIFF_LIBS=no fi AC_ARG_WITH(tiff-includes, AS_HELP_STRING([--with-tiff-includes=DIR], [libtiff includes are in DIR]), TIFF_INCLUDES="-I$withval") AC_ARG_WITH(tiff-libraries, AS_HELP_STRING([--with-tiff-libraries=DIR], [libtiff libraries are in DIR]), TIFF_LIBS="-L$withval -ltiff") AC_MSG_CHECKING(for TIFF) # Look for tiff.h if test "$TIFF_INCLUDES" = ""; then # Check the standard search path AC_TRY_COMPILE([#include ],[int a;],[ TIFF_INCLUDES="" ], [ # tiff.h is not in the standard search path, try # $prefix tiff_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" AC_TRY_COMPILE([#include ],[int a;],[ TIFF_INCLUDES="-I${prefix}/include" ], [ TIFF_INCLUDES="no" ]) INCLUDES=$tiff_save_INCLUDES ]) fi # Now for the libraries if test "$TIFF_LIBS" = ""; then tiff_save_LIBS="$LIBS" tiff_save_INCLUDES="$INCLUDES" LIBS="-ltiff -lm $LIBS" INCLUDES="$TIFF_INCLUDES $INCLUDES" # Try the standard search path first AC_TRY_LINK([#include ],[TIFFGetVersion()], [ TIFF_LIBS="-ltiff" ], [ # libtiff is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" AC_TRY_LINK([#include ],[TIFFGetVersion()], [ TIFF_LIBS="-L${prefix}/lib -ltiff" ], [ TIFF_LIBS=no ]) ]) LIBS="$tiff_save_LIBS" INCLUDES="$tiff_save_INCLUDES" fi AC_SUBST(TIFF_LIBS) AC_SUBST(TIFF_INCLUDES) # Print a helpful message tiff_libraries_result="$TIFF_LIBS" tiff_includes_result="$TIFF_INCLUDES" if test x"$tiff_libraries_result" = x""; then tiff_libraries_result="in default path" fi if test x"$tiff_includes_result" = x""; then tiff_includes_result="in default path" fi if test "$tiff_libraries_result" = "no"; then tiff_libraries_result="(none)" fi if test "$tiff_includes_result" = "no"; then tiff_includes_result="(none)" fi AC_MSG_RESULT([libraries $tiff_libraries_result, headers $tiff_includes_result]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$TIFF_INCLUDES" != "no" && test "$TIFF_LIBS" != "no"; then AC_DEFINE(HAVE_TIFF,1,[Define if you have tiff libraries and header files.]) $1 else TIFF_INCLUDES="" TIFF_LIBS="" $2 fi ])dnl dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding dnl dnl FIND_JPEG[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] dnl ------------------------------------------------ dnl dnl Find JPEG libraries and headers dnl dnl Put compile stuff in JPEG_INCLUDES dnl Put link stuff in JPEG_LIBS dnl Define HAVE_JPEG if found dnl AC_DEFUN([FIND_JPEG], [ AC_REQUIRE([AC_PATH_XTRA]) JPEG_INCLUDES="" JPEG_LIBS="" AC_ARG_WITH(jpeg, AS_HELP_STRING([--without-jpeg], [build without libjpeg (default: test)])) # Treat --without-jpeg like --without-jpeg-includes --without-jpeg-libraries. if test "$with_jpeg" = "no"; then JPEG_INCLUDES=no JPEG_LIBS=no fi AC_ARG_WITH(jpeg-includes, AS_HELP_STRING([--with-jpeg-includes=DIR], [libjpeg includes are in DIR]), JPEG_INCLUDES="-I$withval") AC_ARG_WITH(jpeg-libraries, AS_HELP_STRING([--with-jpeg-libraries=DIR], [libjpeg libraries are in DIR]), JPEG_LIBS="-L$withval -ljpeg") AC_MSG_CHECKING(for JPEG) # Look for jpeglib.h if test "$JPEG_INCLUDES" = ""; then # Check the standard search path AC_TRY_COMPILE([#include #include ],[int a;],[ JPEG_INCLUDES="" ], [ # jpeglib.h is not in the standard search path, try # $prefix jpeg_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" AC_TRY_COMPILE([#include #include ],[int a;],[ JPEG_INCLUDES="-I${prefix}/include" ], [ JPEG_INCLUDES="no" ]) INCLUDES=$jpeg_save_INCLUDES ]) fi # Now for the libraries if test "$JPEG_LIBS" = ""; then jpeg_save_LIBS="$LIBS" jpeg_save_INCLUDES="$INCLUDES" LIBS="-ljpeg $LIBS" INCLUDES="$JPEG_INCLUDES $INCLUDES" # Try the standard search path first AC_TRY_LINK([#include #include ],[jpeg_abort((void*)0)], [ JPEG_LIBS="-ljpeg" ], [ # libjpeg is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" AC_TRY_LINK([#include #include ],[jpeg_abort((void*)0)], [ JPEG_LIBS="-L${prefix}/lib -ljpeg" ], [ JPEG_LIBS=no ]) ]) LIBS="$jpeg_save_LIBS" INCLUDES="$jpeg_save_INCLUDES" fi AC_SUBST(JPEG_LIBS) AC_SUBST(JPEG_INCLUDES) # Print a helpful message jpeg_libraries_result="$JPEG_LIBS" jpeg_includes_result="$JPEG_INCLUDES" if test x"$jpeg_libraries_result" = x""; then jpeg_libraries_result="in default path" fi if test x"$jpeg_includes_result" = x""; then jpeg_includes_result="in default path" fi if test "$jpeg_libraries_result" = "no"; then jpeg_libraries_result="(none)" fi if test "$jpeg_includes_result" = "no"; then jpeg_includes_result="(none)" fi AC_MSG_RESULT([libraries $jpeg_libraries_result, headers $jpeg_includes_result]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$JPEG_INCLUDES" != "no" && test "$JPEG_LIBS" != "no"; then AC_DEFINE(HAVE_JPEG,1,[Define if you have jpeg libraries and header files.]) $1 else JPEG_INCLUDES="" JPEG_LIBS="" $2 fi ])dnl dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding dnl dnl FIND_PNG[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] dnl ------------------------------------------------ dnl dnl Find PNG libraries and headers dnl dnl Put compile stuff in PNG_INCLUDES dnl Put link stuff in PNG_LIBS dnl Define HAVE_PNG if found. dnl AC_DEFUN([FIND_PNG], [ AC_REQUIRE([AC_PATH_XTRA]) PNG_INCLUDES="" PNG_LIBS="" AC_ARG_WITH(png, AS_HELP_STRING([--without-png], [build without libpng (default: test)])) # Treat --without-png like --without-png-includes --without-png-libraries. if test "$with_png" = "no"; then PNG_INCLUDES=no PNG_LIBS=no fi AC_ARG_WITH(png-includes, AS_HELP_STRING([--with-png-includes=DIR], [libpng includes are in DIR]), PNG_INCLUDES="-I$withval") AC_ARG_WITH(png-libraries, AS_HELP_STRING([--with-png-libraries=DIR], [libpng libraries are in DIR]), PNG_LIBS="-L$withval -lpng") AC_MSG_CHECKING(for libpng) # Look for png.h if test "$PNG_INCLUDES" = ""; then # Check the standard search path AC_TRY_COMPILE([#include ],[int a;],[ PNG_INCLUDES="" ], [ # png.h is not in the standard search path, try # $prefix png_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" AC_TRY_COMPILE([#include ],[int a;],[ PNG_INCLUDES="-I${prefix}/include" ], [ PNG_INCLUDES="no" ]) INCLUDES=$png_save_INCLUDES ]) fi # Now for the libraries if test "$PNG_LIBS" = ""; then png_save_LIBS="$LIBS" png_save_INCLUDES="$INCLUDES" LIBS="-lpng $LIBS" INCLUDES="$PNG_INCLUDES $INCLUDES" # Try the standard search path first AC_TRY_LINK([#include ],[png_access_version_number()], [ PNG_LIBS="-lpng" ], [ # libpng is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" AC_TRY_LINK([#include ],[png_access_version_number()], [ PNG_LIBS="-L${prefix}/lib -lpng" ], [ PNG_LIBS=no ]) ]) LIBS="$png_save_LIBS" INCLUDES="$png_save_INCLUDES" fi AC_SUBST(PNG_LIBS) AC_SUBST(PNG_INCLUDES) # Print a helpful message png_libraries_result="$PNG_LIBS" png_includes_result="$PNG_INCLUDES" if test x"$png_libraries_result" = x""; then png_libraries_result="in default path" fi if test x"$png_includes_result" = x""; then png_includes_result="in default path" fi if test "$png_libraries_result" = "no"; then png_libraries_result="(none)" fi if test "$png_includes_result" = "no"; then png_includes_result="(none)" fi AC_MSG_RESULT([libraries $png_libraries_result, headers $png_includes_result]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$PNG_INCLUDES" != "no" && test "$PNG_LIBS" != "no"; then AC_DEFINE(HAVE_PNG,1,[Define if you have png libraries and header files.]) $1 else PNG_INCLUDES="" PNG_LIBS="" $2 fi ])dnl dnl a macro to check for ability to create python extensions dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) dnl function also defines PYTHON_INCLUDES AC_DEFUN([AM_CHECK_PYTHON_HEADERS], [AC_REQUIRE([AM_PATH_PYTHON]) AC_MSG_CHECKING(for headers required to compile python extensions) dnl deduce PYTHON_INCLUDES py_prefix=`$PYTHON -c "import sys; print sys.prefix"` py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" if test "$py_prefix" != "$py_exec_prefix"; then PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" fi AC_SUBST(PYTHON_INCLUDES) dnl check if the headers exist: save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" AC_TRY_CPP([#include ],dnl [AC_MSG_RESULT(found) $1],dnl [AC_MSG_RESULT(not found) $2]) CPPFLAGS="$save_CPPFLAGS" ]) dnl @synopsis AC_FUNC_MKDIR dnl dnl Check whether mkdir() is mkdir or _mkdir, and whether it takes one dnl or two arguments. dnl dnl This macro can define HAVE_MKDIR, HAVE__MKDIR, and dnl MKDIR_TAKES_ONE_ARG, which are expected to be used as follows: dnl dnl #if HAVE_MKDIR dnl # if MKDIR_TAKES_ONE_ARG dnl /* MinGW32 */ dnl # define mkdir(a, b) mkdir(a) dnl # endif dnl #else dnl # if HAVE__MKDIR dnl /* plain Windows 32 */ dnl # define mkdir(a, b) _mkdir(a) dnl # else dnl # error "Don't know how to create a directory on this system." dnl # endif dnl #endif dnl dnl @category C dnl @author Alexandre Duret-Lutz dnl @version 2003-12-28 dnl @license GPLWithACException AC_DEFUN([AC_FUNC_MKDIR], [AC_CHECK_FUNCS([mkdir _mkdir]) AC_CACHE_CHECK([whether mkdir takes one argument], [ac_cv_mkdir_takes_one_arg], [AC_TRY_COMPILE([ #include #if HAVE_UNISTD_H # include #endif ], [mkdir (".");], [ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])]) if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1, [Define if mkdir takes only one argument.]) fi ]) dnl Note: dnl ===== dnl I have not implemented the following suggestion because I don't have dnl access to such a broken environment to test the macro. So I'm just dnl appending the comments here in case you have, and want to fix dnl AC_FUNC_MKDIR that way. dnl dnl |Thomas E. Dickey (dickey@herndon4.his.com) said: dnl | it doesn't cover the problem areas (compilers that mistreat mkdir dnl | may prototype it in dir.h and dirent.h, for instance). dnl | dnl |Alexandre: dnl | Would it be sufficient to check for these headers and #include dnl | them in the AC_TRY_COMPILE block? (and is AC_HEADER_DIRENT dnl | suitable for this?) dnl | dnl |Thomas: dnl | I think that might be a good starting point (with the set of recommended dnl | ifdef's and includes for AC_HEADER_DIRENT, of course). vips-7.38.5/vips.pc.in0000644000175000017500000000037712303140253011432 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: vips Description: Image processing library Version: @VERSION@ Requires: @PACKAGES_USED@ Libs: -L${libdir} -lvips @VIPS_LIBS@ @VIPS_CXX_LIBS@ Cflags: -I${includedir} vips-7.38.5/missing0000755000175000017500000001533112303144055011117 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: vips-7.38.5/libvips/0000755000175000017500000000000012303146331011244 500000000000000vips-7.38.5/libvips/create/0000755000175000017500000000000012303146331012507 500000000000000vips-7.38.5/libvips/create/mask.c0000644000175000017500000000643712303140253013535 00000000000000/* base class for frequency filter create operations * * 02/01/14 * - from sines.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" G_DEFINE_ABSTRACT_TYPE( VipsMask, vips_mask, VIPS_TYPE_POINT ); static float vips_mask_point( VipsPoint *point, int x, int y ) { VipsMask *mask = VIPS_MASK( point ); VipsMaskClass *class = VIPS_MASK_GET_CLASS( point ); int half_width = point->width / 2; int half_height = point->height / 2; double result; /* Move centre for an optical transform mask. */ if( !mask->optical ) { x = (x + half_width) % point->width; y = (y + half_height) % point->height; } x = x - half_width; y = y - half_height; if( !mask->nodc && x == 0 && y == 0 ) /* DC component is always 1. */ result = 1.0; else { double dx, dy; dx = (double) x / half_width; dy = (double) y / half_height; result = class->point( mask, dx, dy ); /* Invert filter sense for a highpass filter, or to swap * band-pass for band-reject. */ if( mask->reject ) result = 1.0 - result; } return( result ); } static void vips_mask_class_init( VipsMaskClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsPointClass *point_class = VIPS_POINT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask"; vobject_class->description = _( "base class for frequency filters" ); point_class->point = vips_mask_point; point_class->min = 0.0; point_class->max = 1.0; point_class->interpretation = VIPS_INTERPRETATION_FOURIER; VIPS_ARG_BOOL( class, "optical", 5, _( "Optical" ), _( "Rotate quadrants to optical space" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMask, optical ), FALSE ); VIPS_ARG_BOOL( class, "reject", 5, _( "Reject" ), _( "Invert the sense of the filter" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMask, reject ), FALSE ); VIPS_ARG_BOOL( class, "nodc", 5, _( "Nodc" ), _( "Remove DC component" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMask, nodc ), FALSE ); } static void vips_mask_init( VipsMask *mask ) { } vips-7.38.5/libvips/create/other_dispatch.c0000644000175000017500000002046612303140253015600 00000000000000/* Function dispatch tables for other. * * J. Cupitt, 8/2/95 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * SECTION: other * @short_description: miscellaneous operators * @stability: Stable * @include: vips/vips.h * * These functions generate various test images. You can combine them with * the arithmetic and rotate functions to build more complicated images. * * The im_benchmark() operations are for testing the VIPS SMP system. */ /* Args for im_sines. */ static im_arg_desc sines_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xsize" ), IM_INPUT_INT( "ysize" ), IM_INPUT_DOUBLE( "horfreq" ), IM_INPUT_DOUBLE( "verfreq" ) }; /* Call im_sines via arg vector. */ static int sines_vec( im_object *argv ) { int xsize = *((int *) argv[1]); int ysize = *((int *) argv[2]); double horfreq = *((double *) argv[3]); double verfreq = *((double *) argv[4]); return( im_sines( argv[0], xsize, ysize, horfreq, verfreq ) ); } /* Description of im_sines. */ static im_function sines_desc = { "im_sines", /* Name */ "generate 2D sine image", 0, /* Flags */ sines_vec, /* Dispatch function */ IM_NUMBER( sines_args ), /* Size of arg list */ sines_args /* Arg list */ }; /* Args for im_eye. */ static im_arg_desc eye_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xsize" ), IM_INPUT_INT( "ysize" ), IM_INPUT_DOUBLE( "factor" ) }; /* Call im_eye via arg vector. */ static int eye_vec( im_object *argv ) { int xsize = *((int *) argv[1]); int ysize = *((int *) argv[2]); double factor = *((double *) argv[3]); return( im_eye( argv[0], xsize, ysize, factor ) ); } /* Description of im_eye. */ static im_function eye_desc = { "im_eye", /* Name */ "generate IM_BANDFMT_UCHAR [0,255] frequency/amplitude image", 0, /* Flags */ eye_vec, /* Dispatch function */ IM_NUMBER( eye_args ), /* Size of arg list */ eye_args /* Arg list */ }; /* Call im_feye via arg vector. */ static int feye_vec( im_object *argv ) { int xsize = *((int *) argv[1]); int ysize = *((int *) argv[2]); double factor = *((double *) argv[3]); return( im_feye( argv[0], xsize, ysize, factor ) ); } /* Description of im_feye. */ static im_function feye_desc = { "im_feye", /* Name */ "generate IM_BANDFMT_FLOAT [-1,1] frequency/amplitude image", 0, /* Flags */ feye_vec, /* Dispatch function */ IM_NUMBER( eye_args ), /* Size of arg list */ eye_args /* Arg list */ }; /* Args for im_zone. */ static im_arg_desc zone_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "size" ) }; /* Call im_zone via arg vector. */ static int zone_vec( im_object *argv ) { int size = *((int *) argv[1]); return( im_zone( argv[0], size ) ); } /* Description of im_zone. */ static im_function zone_desc = { "im_zone", /* Name */ "generate IM_BANDFMT_UCHAR [0,255] zone plate image", /* Description */ 0, /* Flags */ zone_vec, /* Dispatch function */ IM_NUMBER( zone_args ), /* Size of arg list */ zone_args /* Arg list */ }; /* Call im_fzone via arg vector. */ static int fzone_vec( im_object *argv ) { int size = *((int *) argv[1]); return( im_fzone( argv[0], size ) ); } /* Description of im_fzone. */ static im_function fzone_desc = { "im_fzone", /* Name */ "generate IM_BANDFMT_FLOAT [-1,1] zone plate image", /* Description */ 0, /* Flags */ fzone_vec, /* Dispatch function */ IM_NUMBER( zone_args ), /* Size of arg list */ zone_args /* Arg list */ }; /* Args for im_benchmark. */ static im_arg_desc benchmark_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_benchmark via arg vector. */ static int benchmark_vec( im_object *argv ) { return( im_benchmarkn( argv[0], argv[1], 1 ) ); } /* Description of im_benchmark. */ static im_function benchmark_desc = { "im_benchmark", /* Name */ "do something complicated for testing", /* Description */ IM_FN_PIO, /* Flags */ benchmark_vec, /* Dispatch function */ IM_NUMBER( benchmark_args ), /* Size of arg list */ benchmark_args /* Arg list */ }; /* Args for im_benchmark2. */ static im_arg_desc benchmark2_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_DOUBLE( "value" ) }; /* Call im_benchmark2 via arg vector. */ static int benchmark2_vec( im_object *argv ) { double f; if( im_benchmark2( argv[0], &f ) ) return( -1 ); *((double *) argv[1]) = f; return( 0 ); } /* Description of im_benchmark2. */ static im_function benchmark2_desc = { "im_benchmark2", /* Name */ "do something complicated for testing", /* Description */ IM_FN_PIO, /* Flags */ benchmark2_vec, /* Dispatch function */ IM_NUMBER( benchmark2_args ), /* Size of arg list */ benchmark2_args /* Arg list */ }; /* Args for im_benchmarkn. */ static im_arg_desc benchmarkn_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "n" ) }; /* Call im_benchmarkn via arg vector. */ static int benchmarkn_vec( im_object *argv ) { int n = *((int *) argv[2]); return( im_benchmarkn( argv[0], argv[1], n ) ); } /* Description of im_benchmarkn. */ static im_function benchmarkn_desc = { "im_benchmarkn", /* Name */ "do something complicated for testing", /* Description */ IM_FN_PIO, /* Flags */ benchmarkn_vec, /* Dispatch function */ IM_NUMBER( benchmarkn_args ), /* Size of arg list */ benchmarkn_args /* Arg list */ }; /* Args for im_grey. */ static im_arg_desc grey_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xsize" ), IM_INPUT_INT( "ysize" ) }; /* Call im_grey via arg vector. */ static int grey_vec( im_object *argv ) { int xsize = *((int *) argv[1]); int ysize = *((int *) argv[2]); return( im_grey( argv[0], xsize, ysize ) ); } /* Description of im_grey. */ static im_function grey_desc = { "im_grey", /* Name */ "generate IM_BANDFMT_UCHAR [0,255] grey scale image", /* Description */ 0, /* Flags */ grey_vec, /* Dispatch function */ IM_NUMBER( grey_args ), /* Size of arg list */ grey_args /* Arg list */ }; /* Call im_fgrey via arg vector. */ static int fgrey_vec( im_object *argv ) { int xsize = *((int *) argv[1]); int ysize = *((int *) argv[2]); return( im_fgrey( argv[0], xsize, ysize ) ); } /* Description of im_fgrey. */ static im_function fgrey_desc = { "im_fgrey", /* Name */ "generate IM_BANDFMT_FLOAT [0,1] grey scale image", /* Description */ 0, /* Flags */ fgrey_vec, /* Dispatch function */ IM_NUMBER( grey_args ), /* Size of arg list */ grey_args /* Arg list */ }; /* Call im_make_xy via arg vector. */ static int make_xy_vec( im_object *argv ) { int xsize = *((int *) argv[1]); int ysize = *((int *) argv[2]); return( im_make_xy( argv[0], xsize, ysize ) ); } /* Description of im_make_xy. */ static im_function make_xy_desc = { "im_make_xy", /* Name */ "generate image with pixel value equal to coordinate", /* Description */ 0, /* Flags */ make_xy_vec, /* Dispatch function */ IM_NUMBER( grey_args ), /* Size of arg list */ grey_args /* Arg list */ }; /* Package up all these functions. */ static im_function *other_list[] = { &benchmark_desc, &benchmark2_desc, &benchmarkn_desc, &eye_desc, &grey_desc, &feye_desc, &fgrey_desc, &fzone_desc, &make_xy_desc, &sines_desc, &zone_desc }; /* Package of functions. */ im_package im__other = { "other", IM_NUMBER( other_list ), other_list }; vips-7.38.5/libvips/create/zone.c0000644000175000017500000000543312303140253013550 00000000000000/* square zone plate of size * * N. Dessipris 01/02/1991 * * 22/7/93 JC * - externs removed * - im_outcheck() added * 30/8/95 JC * - modernized * - memory leaks fixed * - split into im_zone() and im_fzone() * 1/2/11 * - gtk-doc * 13/6/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" typedef VipsPoint VipsZone; typedef VipsPointClass VipsZoneClass; G_DEFINE_TYPE( VipsZone, vips_zone, VIPS_TYPE_POINT ); static float vips_zone_point( VipsPoint *point, int x, int y ) { VipsZone *zone = (VipsZone *) point; int hwidth = point->width / 2; int hheight = point->height / 2; int h2 = (x - hwidth) * (x - hwidth); int v2 = (y - hheight) * (y - hheight); double c = VIPS_PI / zone->width; return( cos( c * (v2 + h2) ) ); } static void vips_zone_class_init( VipsZoneClass *class ) { VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsPointClass *point_class = VIPS_POINT_CLASS( class ); vobject_class->nickname = "zone"; vobject_class->description = _( "make a zone plate" ); point_class->point = vips_zone_point; } static void vips_zone_init( VipsZone *zone ) { } /** * vips_zone: * @out: output image * @xsize: image size * @ysize: image size * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @uchar: output a uchar image * * Create a one-band image of a zone plate. * * Pixels are normally in [-1, +1], set @uchar to output [0, 255]. * * See also: vips_eye(), vips_xyz(). * * Returns: 0 on success, -1 on error */ int vips_zone( VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "zone", ap, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/invertlut.c0000644000175000017500000002141012303140253014622 00000000000000/* invert a lut * * Written on: 5/6/01 * Modified on : * * 7/7/03 JC * - generate image rather than doublemask (arrg) * 23/3/10 * - gtkdoc * 23/5/13 * - fix 1 high input matrices * - fix file output * 4/9/13 * - convert to a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pcreate.h" /* #define DEBUG */ /* Our state. */ typedef struct _VipsInvertlut { VipsCreate parent_instance; /* Input image. */ VipsImage *in; /* .. and cast to a matrix. */ VipsImage *mat; int size; /* Number of output elements to generate */ double **data; /* Rows of unpacked matrix */ double *buf; /* Output buffer */ } VipsInvertlut; typedef VipsCreateClass VipsInvertlutClass; G_DEFINE_TYPE( VipsInvertlut, vips_invertlut, VIPS_TYPE_CREATE ); static void vips_invertlut_dispose( GObject *gobject ) { VipsInvertlut *lut = (VipsInvertlut *) gobject; VIPS_FREE( lut->data ); VIPS_FREE( lut->buf ); VIPS_UNREF( lut->mat ); G_OBJECT_CLASS( vips_invertlut_parent_class )->dispose( gobject ); } /* Use this to sort our input rows by the first column. */ static int compare( const void *a, const void *b ) { double **r1 = (double **) a; double **r2 = (double **) b; double diff = r1[0][0] - r2[0][0]; if( diff > 0 ) return( 1 ); else if( diff == 0 ) return( 0 ); else return( -1 ); } static int vips_invertlut_build_init( VipsInvertlut *lut ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( lut ); int x, y; if( !lut->mat || lut->mat->Xsize < 2 || lut->mat->Ysize < 1 ) { vips_error( class->nickname, "%s", _( "bad input matrix" ) ); return( -1 ); } if( lut->size < 1 || lut->size > 65536 ) { vips_error( class->nickname, "%s", _( "bad size" ) ); return( -1 ); } if( !(lut->buf = VIPS_ARRAY( NULL, lut->size * (lut->mat->Xsize - 1), double )) ) return( -1 ); if( !(lut->data = VIPS_ARRAY( NULL, lut->mat->Ysize, double * )) ) return( -1 ); for( y = 0; y < lut->mat->Ysize; y++ ) lut->data[y] = VIPS_MATRIX( lut->mat, 0, y ); /* Sanity check for data range. */ for( y = 0; y < lut->mat->Ysize; y++ ) for( x = 0; x < lut->mat->Xsize; x++ ) if( lut->data[y][x] > 1.0 || lut->data[y][x] < 0.0 ) { vips_error( class->nickname, _( "element (%d, %d) is %g, " "outside range [0,1]" ), x, y, lut->data[y][x] ); return( -1 ); } /* Sort by 1st column in input. */ qsort( lut->data, lut->mat->Ysize, sizeof( double * ), compare ); #ifdef DEBUG printf( "Input table, sorted by 1st column\n" ); for( y = 0; y < lut->mat->Ysize; y++ ) { printf( "%.4d ", y ); for( x = 0; x < lut->mat->Xsize; x++ ) printf( "%.9f ", lut->data[y][x] ); printf( "\n" ); } #endif /*DEBUG*/ return( 0 ); } static int vips_invertlut_build_create( VipsInvertlut *lut ) { int bands = lut->mat->Xsize - 1; int height = lut->mat->Ysize; int b; /* Do each output channel separately. */ for( b = 0; b < bands; b++ ) { /* The first and last lut positions we know real values for. */ int first = lut->data[0][b + 1] * (lut->size - 1); int last = lut->data[height - 1][b + 1] * (lut->size - 1); int k; /* Extrapolate bottom and top segments to (0,0) and (1,1). */ for( k = 0; k < first; k++ ) { /* Have this inside the loop to avoid /0 errors if * first == 0. */ double fac = lut->data[0][0] / first; lut->buf[b + k * bands] = k * fac; } for( k = last; k < lut->size; k++ ) { /* Inside the loop to avoid /0 errors for last == * (size - 1). */ double fac = (1 - lut->data[height - 1][0]) / ((lut->size - 1) - last); lut->buf[b + k * bands] = lut->data[height - 1][0] + (k - last) * fac; } /* Interpolate the data sections. */ for( k = first; k < last; k++ ) { /* Where we're at in the [0,1] range. */ double ki = (double) k / (lut->size - 1); double irange, orange; int j; /* Search for the lowest real value < ki. There may * not be one: if not, just use 0. Tiny error. */ for( j = height - 1; j >= 0; j-- ) if( lut->data[j][b + 1] < ki ) break; if( j == -1 ) j = 0; /* Interpolate k as being between row data[j] and row * data[j + 1]. */ irange = lut->data[j + 1][b + 1] - lut->data[j][b + 1]; orange = lut->data[j + 1][0] - lut->data[j][0]; lut->buf[b + k * bands] = lut->data[j][0] + orange * ((ki - lut->data[j][b + 1]) / irange); } } return( 0 ); } static int vips_invertlut_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsCreate *create = VIPS_CREATE( object ); VipsInvertlut *lut = (VipsInvertlut *) object; if( VIPS_OBJECT_CLASS( vips_invertlut_parent_class )->build( object ) ) return( -1 ); if( vips_check_matrix( class->nickname, lut->in, &lut->mat ) ) return( -1 ); if( vips_invertlut_build_init( lut ) || vips_invertlut_build_create( lut ) ) return( -1 ); vips_image_init_fields( create->out, lut->size, 1, lut->mat->Xsize - 1, VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE, VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 ); if( vips_image_write_line( create->out, 0, (VipsPel *) lut->buf ) ) return( -1 ); return( 0 ); } static void vips_invertlut_class_init( VipsInvertlutClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->dispose = vips_invertlut_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "invertlut"; vobject_class->description = _( "build an inverted look-up table" ); vobject_class->build = vips_invertlut_build; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Matrix of XY coordinates" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsInvertlut, in ) ); VIPS_ARG_INT( class, "size", 5, _( "Size" ), _( "LUT size to generate" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsInvertlut, size ), 1, 1000000, 256 ); } static void vips_invertlut_init( VipsInvertlut *lut ) { lut->size = 256; } /** * vips_invertlut: * @in: input mask * @out: output LUT * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @size: generate this much * * Given a mask of target values and real values, generate a LUT which * will map reals to targets. Handy for linearising images from * measurements of a colour chart. All values in [0,1]. Piecewise linear * interpolation, extrapolate head and tail to 0 and 1. * * Eg. input like this: * * * * * 4 * 3 * * * 0.1 * 0.2 * 0.3 * 0.1 * * * 0.2 * 0.4 * 0.4 * 0.2 * * * 0.7 * 0.5 * 0.6 * 0.3 * * * * * Means a patch with 10% reflectance produces an image with 20% in * channel 1, 30% in channel 2, and 10% in channel 3, and so on. * * Inputs don't need to be sorted (we do that). Generate any precision * LUT, default to 256 elements. * * It won't work too well for non-monotonic camera responses * (we should fix this). Interpolation is simple piecewise linear; we ought to * do something better really. * * See also: vips_buildlut(). * * Returns: 0 on success, -1 on error */ int vips_invertlut( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "invertlut", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/mask_gaussian.c0000644000175000017500000000716112303140253015422 00000000000000/* creates a gaussian filter. * * 02/01/14 * - from gaussian.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" G_DEFINE_TYPE( VipsMaskGaussian, vips_mask_gaussian, VIPS_TYPE_MASK ); static double vips_mask_gaussian_point( VipsMask *mask, double dx, double dy ) { VipsMaskGaussian *gaussian = (VipsMaskGaussian *) mask; double fc = gaussian->frequency_cutoff; double ac = gaussian->amplitude_cutoff; double cnst = log( ac ); double fc2 = fc * fc; double dist2 = (dx * dx + dy * dy) / fc2; return( exp( cnst * dist2 ) ); } static void vips_mask_gaussian_class_init( VipsMaskGaussianClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_gaussian"; vobject_class->description = _( "make a gaussian filter" ); mask_class->point = vips_mask_gaussian_point; VIPS_ARG_DOUBLE( class, "frequency_cutoff", 7, _( "Frequency cutoff" ), _( "Frequency cutoff" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskGaussian, frequency_cutoff ), 0.0, 1000000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "amplitude_cutoff", 8, _( "Amplitude cutoff" ), _( "Amplitude cutoff" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskGaussian, amplitude_cutoff ), 0.0, 1.0, 0.5 ); } static void vips_mask_gaussian_init( VipsMaskGaussian *gaussian ) { gaussian->frequency_cutoff = 0.5; gaussian->amplitude_cutoff = 0.5; } /** * vips_mask_gaussian: * @out: output image * @width: image size * @height: image size * @frequency_cutoff: frequency threshold * @amplitude_cutoff: amplitude threshold * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make a gaussian high- or low-pass filter, that is, one with a variable, * smooth transition positioned at @frequency_cutoff. * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_gaussian( VipsImage **out, int width, int height, double frequency_cutoff, double amplitude_cutoff, ... ) { va_list ap; int result; va_start( ap, amplitude_cutoff ); result = vips_call_split( "mask_gaussian", ap, out, width, height, frequency_cutoff, amplitude_cutoff ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/mask_butterworth_band.c0000644000175000017500000001322212303140253017160 00000000000000/* creates an butterworth_band filter. * * 02/01/14 * - from butterworth_band.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" typedef struct _VipsMaskButterworthBand { VipsMask parent_instance; double order; double frequency_cutoff_x; double frequency_cutoff_y; double radius; double amplitude_cutoff; } VipsMaskButterworthBand; typedef VipsMaskClass VipsMaskButterworthBandClass; G_DEFINE_TYPE( VipsMaskButterworthBand, vips_mask_butterworth_band, VIPS_TYPE_MASK ); static double vips_mask_butterworth_band_point( VipsMask *mask, double dx, double dy ) { VipsMaskButterworthBand *butterworth_band = (VipsMaskButterworthBand *) mask; double order = butterworth_band->order; double fcx = butterworth_band->frequency_cutoff_x; double fcy = butterworth_band->frequency_cutoff_y; double r2 = butterworth_band->radius * butterworth_band->radius; double ac = butterworth_band->amplitude_cutoff; double cnst = (1.0 / ac) - 1.0; /* Normalise the amplitude at (fcx, fcy) to 1.0. */ double cnsta = 1.0 / (1.0 + 1.0 / (1.0 + cnst * pow( 4.0 * (fcx * fcx + fcy * fcy) / r2, order ))); double d1 = (dx - fcx) * (dx - fcx) + (dy - fcy) * (dy - fcy); double d2 = (dx + fcx) * (dx + fcx) + (dy + fcy) * (dy + fcy); return( cnsta * (1.0 / (1.0 + cnst * pow( d1 / r2, order )) + 1.0 / (1.0 + cnst * pow( d2 / r2, order ))) ); } static void vips_mask_butterworth_band_class_init( VipsMaskButterworthBandClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_butterworth_band"; vobject_class->description = _( "make a butterworth_band filter" ); mask_class->point = vips_mask_butterworth_band_point; VIPS_ARG_DOUBLE( class, "order", 6, _( "Order" ), _( "Filter order" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworthBand, order ), 1.0, 1000000.0, 1.0 ); VIPS_ARG_DOUBLE( class, "frequency_cutoff_x", 7, _( "Frequency cutoff x" ), _( "Frequency cutoff x" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworthBand, frequency_cutoff_x ), 0.0, 1000000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "frequency_cutoff_y", 8, _( "Frequency cutoff y" ), _( "Frequency cutoff y" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworthBand, frequency_cutoff_y ), 0.0, 1000000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "radius", 9, _( "radius" ), _( "radius of circle" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworthBand, radius ), 0.0, 1000000.0, 0.1 ); VIPS_ARG_DOUBLE( class, "amplitude_cutoff", 10, _( "Amplitude cutoff" ), _( "Amplitude cutoff" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworthBand, amplitude_cutoff ), 0.0, 1.0, 0.5 ); } static void vips_mask_butterworth_band_init( VipsMaskButterworthBand *butterworth_band ) { butterworth_band->order = 1.0; butterworth_band->frequency_cutoff_x = 0.5; butterworth_band->frequency_cutoff_y = 0.5; butterworth_band->radius = 0.1; butterworth_band->amplitude_cutoff = 0.5; } /** * vips_mask_butterworth_band: * @out: output image * @width: image size * @height: image size * @order: filter order * @frequency_cutoff_x: band position * @frequency_cutoff_y: band position * @radius: band radius * @amplitude_cutoff: amplitude threshold * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make an butterworth band-pass or band-reject filter, that is, one with a * variable, smooth transition positioned at @frequency_cutoff_x, * @frequency_cutoff_y, of radius @radius. * The shape of the curve is controlled by * @order: higher values give a sharper transition. See Gonzalez and Wintz, * Digital Image Processing, 1987. * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_butterworth_band( VipsImage **out, int width, int height, double order, double frequency_cutoff_x, double frequency_cutoff_y, double radius, double amplitude_cutoff, ... ) { va_list ap; int result; va_start( ap, amplitude_cutoff ); result = vips_call_split( "mask_butterworth_band", ap, out, width, height, order, frequency_cutoff_x, frequency_cutoff_y, radius, amplitude_cutoff ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/sines.c0000644000175000017500000001060112303140253013707 00000000000000/* creates a 2d sinewave * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/02/1990 * Modified on: * 22/7/93 JC * - externs removed * - im_outcheck() added * 1/2/11 * - gtk-doc * 13/6/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" typedef struct _VipsSines { VipsPoint parent_instance; double hfreq; double vfreq; double c; double sintheta; double costheta; } VipsSines; typedef VipsPointClass VipsSinesClass; G_DEFINE_TYPE( VipsSines, vips_sines, VIPS_TYPE_POINT ); static float vips_sines_point( VipsPoint *point, int x, int y ) { VipsSines *sines = (VipsSines *) point; return( cos( sines->c * (x * sines->costheta - y * sines->sintheta) ) ); } static int vips_sines_build( VipsObject *object ) { VipsPoint *point = VIPS_POINT( object ); VipsSines *sines = (VipsSines *) object; double theta; double factor; if( VIPS_OBJECT_CLASS( vips_sines_parent_class )->build( object ) ) return( -1 ); theta = sines->hfreq == 0.0 ? VIPS_PI / 2.0 : atan( sines->vfreq / sines->hfreq ); factor = sqrt( sines->hfreq * sines->hfreq + sines->vfreq * sines->vfreq ); sines->costheta = cos( theta ); sines->sintheta = sin( theta ); sines->c = factor * VIPS_PI * 2.0 / point->width; return( 0 ); } static void vips_sines_class_init( VipsSinesClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsPointClass *point_class = VIPS_POINT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "sines"; vobject_class->description = _( "make a 2D sine wave" ); vobject_class->build = vips_sines_build; point_class->point = vips_sines_point; VIPS_ARG_DOUBLE( class, "hfreq", 6, _( "hfreq" ), _( "Horizontal spatial frequency" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSines, hfreq ), 0.0, 10000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "vfreq", 7, _( "vfreq" ), _( "Vertical spatial frequency" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSines, vfreq ), 0.0, 10000.0, 0.5 ); } static void vips_sines_init( VipsSines *sines ) { sines->hfreq = 0.5; sines->vfreq = 0.5; } /** * vips_sines: * @out: output image * @xsize: image size * @ysize: image size * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @hfreq: horizontal frequency * @vreq: vertical frequency * @uchar: output a uchar image * * Creates a float one band image of the a sine waveform in two * dimensions. * * The number of horizontal and vertical spatial frequencies are * determined by the variables @hfreq and @vfreq respectively. The * function is useful for creating displayable sine waves and * square waves in two dimensions. * * If horfreq and verfreq are integers the resultant image is periodical * and therfore the Fourier transform does not present spikes * * Pixels are normally in [-1, +1], set @uchar to output [0, 255]. * * See also: vips_grey(), vips_xyz(). * * Returns: 0 on success, -1 on error */ int vips_sines( VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "sines", ap, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/black.c0000644000175000017500000001007312303140253013645 00000000000000/* im_black.c * * Copyright: 1990, J. Cupitt * * Author: J. Cupitt * Written on: 02/08/1990 * Modified on : 16/04/1991 by N. Dessipris to work on a line by line basis * 15/8/94 JC * - adapted for partials * - ANSIfied * - memory leaks fixed! * 2/3/98 JC * - IM_ANY added * 18/1/09 * - gtkdoc * 31/10/11 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pcreate.h" typedef struct _VipsBlack { VipsCreate parent_instance; int width; int height; int bands; } VipsBlack; typedef VipsCreateClass VipsBlackClass; G_DEFINE_TYPE( VipsBlack, vips_black, VIPS_TYPE_CREATE ); static int vips_black_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { vips_region_black( or ); return( 0 ); } static int vips_black_build( VipsObject *object ) { VipsCreate *create = VIPS_CREATE( object ); VipsBlack *black = (VipsBlack *) object; if( VIPS_OBJECT_CLASS( vips_black_parent_class )->build( object ) ) return( -1 ); vips_image_init_fields( create->out, black->width, black->height, black->bands, VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, black->bands == 1 ? VIPS_INTERPRETATION_B_W : VIPS_INTERPRETATION_MULTIBAND, 1.0, 1.0 ); vips_image_pipelinev( create->out, VIPS_DEMAND_STYLE_ANY, NULL ); if( vips_image_generate( create->out, NULL, vips_black_gen, NULL, NULL, NULL ) ) return( -1 ); return( 0 ); } static void vips_black_class_init( VipsBlackClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_black_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "black"; vobject_class->description = _( "make a black image" ); vobject_class->build = vips_black_build; VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBlack, width ), 1, 1000000, 1 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBlack, height ), 1, 1000000, 1 ); VIPS_ARG_INT( class, "bands", 6, _( "Bands" ), _( "Number of bands in image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsBlack, bands ), 1, 1000000, 1 ); } static void vips_black_init( VipsBlack *black ) { black->bands = 1; } /** * vips_black: * @out: output image * @width: output width * @height: output height * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @bands: output bands * * Make a black unsigned char image of a specified size. * * See also: im_make_xy(), im_text(), im_gaussnoise(). * * Returns: 0 on success, -1 on error */ int vips_black( VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "black", ap, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/mask_ideal_ring.c0000644000175000017500000000726012303140253015705 00000000000000/* creates an ideal ringpass filter. * * 02/01/14 * - from ideal.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" typedef struct _VipsMaskIdealRing { VipsMaskIdeal parent_instance; double ringwidth; } VipsMaskIdealRing; typedef VipsMaskIdealClass VipsMaskIdealRingClass; G_DEFINE_TYPE( VipsMaskIdealRing, vips_mask_ideal_ring, VIPS_TYPE_MASK_IDEAL ); static double vips_mask_ideal_ring_point( VipsMask *mask, double dx, double dy ) { VipsMaskIdeal *ideal = (VipsMaskIdeal *) mask; VipsMaskIdealRing *ideal_ring = (VipsMaskIdealRing *) mask; double fc = ideal->frequency_cutoff; double ringwidth = ideal_ring->ringwidth; double df = ringwidth / 2.0; double dist2 = dx * dx + dy * dy; double fc2_1 = (fc - df) * (fc - df); double fc2_2 = (fc + df) * (fc + df); return( dist2 > fc2_1 && dist2 < fc2_2 ? 1.0 : 0.0 ); } static void vips_mask_ideal_ring_class_init( VipsMaskIdealClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_ideal_ring"; vobject_class->description = _( "make an ideal ring filter" ); mask_class->point = vips_mask_ideal_ring_point; VIPS_ARG_DOUBLE( class, "ringwidth", 20, _( "Ringwidth" ), _( "Ringwidth" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskIdealRing, ringwidth ), 0.0, 1000000.0, 0.5 ); } static void vips_mask_ideal_ring_init( VipsMaskIdealRing *ideal_ring ) { ideal_ring->ringwidth = 0.5; } /** * vips_mask_ideal_ring: * @out: output image * @width: image size * @height: image size * @frequency_cutoff: * @ringwidth: ringwidth * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make an ideal ring-pass or ring-reject filter, that is, one with a sharp * ring positioned at @frequency_cutoff of width @width, where * @frequency_cutoff and @width are expressed as the range 0 - 1. * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_ideal_ring( VipsImage **out, int width, int height, double frequency_cutoff, double ringwidth, ... ) { va_list ap; int result; va_start( ap, ringwidth ); result = vips_call_split( "mask_ideal_ring", ap, out, width, height, frequency_cutoff, ringwidth ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/gaussnoise.c0000644000175000017500000001246112303140253014754 00000000000000/* im_gaussnoise * * Copyright 1990, N. Dessipris. * * File written on 2/12/1986 * Author : N. Dessipris * Updated : 6/6/1991 * 21/7/93 JC * - im_outcheck() call added * 1/2/95 JC * - declaration for drand48() added * - partialised, adapting im_gaussnoise() * 23/10/98 JC * - drand48() chaged to random() for portability * 21/10/02 JC * - tries rand() if random() is not available * - uses RAND_MAX, d'oh * 29/1/10 * - cleanups * - gtkdoc * 29/5/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcreate.h" typedef struct _VipsGaussnoise { VipsCreate parent_instance; int width; int height; double mean; double sigma; } VipsGaussnoise; typedef VipsCreateClass VipsGaussnoiseClass; G_DEFINE_TYPE( VipsGaussnoise, vips_gaussnoise, VIPS_TYPE_CREATE ); /* Make a random number in 0 - 1. Prefer random(). */ #ifdef HAVE_RANDOM #define VIPS_RND() ((double) random() / RAND_MAX) #else /*!HAVE_RANDOM*/ #ifdef HAVE_RAND #define VIPS_RND() ((double) rand() / RAND_MAX) #else /*!HAVE_RAND*/ #error "no random number generator found" #endif /*HAVE_RAND*/ #endif /*HAVE_RANDOM*/ static int vips_gaussnoise_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsGaussnoise *gaussnoise = (VipsGaussnoise *) a; int sz = VIPS_REGION_N_ELEMENTS( or ); int y; for( y = 0; y < or->valid.height; y++ ) { float *q = (float *) VIPS_REGION_ADDR( or, or->valid.left, y + or->valid.top ); int x; for( x = 0; x < sz; x++ ) { double sum; int i; sum = 0.0; for( i = 0; i < 12; i++ ) sum += VIPS_RND(); q[x] = (sum - 6.0) * gaussnoise->sigma + gaussnoise->mean; } } return( 0 ); } static int vips_gaussnoise_build( VipsObject *object ) { VipsCreate *create = VIPS_CREATE( object ); VipsGaussnoise *gaussnoise = (VipsGaussnoise *) object; if( VIPS_OBJECT_CLASS( vips_gaussnoise_parent_class )->build( object ) ) return( -1 ); vips_image_init_fields( create->out, gaussnoise->width, gaussnoise->height, 1, VIPS_FORMAT_FLOAT, VIPS_CODING_NONE, VIPS_INTERPRETATION_B_W, 1.0, 1.0 ); vips_image_pipelinev( create->out, VIPS_DEMAND_STYLE_ANY, NULL ); if( vips_image_generate( create->out, NULL, vips_gaussnoise_gen, NULL, gaussnoise, NULL ) ) return( -1 ); return( 0 ); } static void vips_gaussnoise_class_init( VipsGaussnoiseClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "gaussnoise"; vobject_class->description = _( "make a gaussnoise image" ); vobject_class->build = vips_gaussnoise_build; VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGaussnoise, width ), 1, 1000000, 1 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGaussnoise, height ), 1, 1000000, 1 ); VIPS_ARG_DOUBLE( class, "mean", 6, _( "Mean" ), _( "Mean of pixels in generated image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsGaussnoise, mean ), -10000000, 1000000, 128 ); VIPS_ARG_DOUBLE( class, "sigma", 6, _( "Sigma" ), _( "Standard deviation of pixels in generated image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsGaussnoise, sigma ), 0, 100000, 30 ); } static void vips_gaussnoise_init( VipsGaussnoise *gaussnoise ) { gaussnoise->mean = 128.0; gaussnoise->sigma = 30.0; } /** * vips_gaussnoise: * @out: output image * @width: output width * @height: output height * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @mean: mean of generated pixels * @sigma: standard deviation of generated pixels * * Make a one band float image of gaussian noise with the specified * distribution. The noise distribution is created by averaging 12 random * numbers with the appropriate weights. * * See also: vips_black(), im_make_xy(), im_text(). * * Returns: 0 on success, -1 on error */ int vips_gaussnoise( VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "gaussnoise", ap, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/logmat.c0000644000175000017500000001542612303140253014063 00000000000000/* laplacian of logmatian * * Written on: 30/11/1989 * Updated on: 6/12/1991 * 7/8/96 JC * - ansified, mem leaks plugged * 20/11/98 JC * - mask too large check added * 26/3/02 JC * - ahem, was broken since '96, thanks matt * 16/7/03 JC * - makes mask out to zero, not out to minimum, thanks again matt * 22/10/10 * - gtkdoc * 20/10/13 * - redone as a class from logmat.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" typedef struct _VipsLogmat { VipsCreate parent_instance; double sigma; double min_ampl; gboolean separable; gboolean integer; } VipsLogmat; typedef struct _VipsLogmatClass { VipsCreateClass parent_class; } VipsLogmatClass; G_DEFINE_TYPE( VipsLogmat, vips_logmat, VIPS_TYPE_CREATE ); static int vips_logmat_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsCreate *create = VIPS_CREATE( object ); VipsLogmat *logmat = (VipsLogmat *) object; double sig2 = logmat->sigma * logmat->sigma; double last; int x, y; int width, height; double sum; if( VIPS_OBJECT_CLASS( vips_logmat_parent_class )->build( object ) ) return( -1 ); /* Find the size of the mask. We want to eval the mask out to the * flat zero part, ie. beyond the minimum and to the point where it * comes back up towards zero. */ last = 0.0; for( x = 0; x < 5000; x++ ) { const double distance = x * x; double val; /* Handbook of Pattern Recognition and image processing * by Young and Fu AP 1986 pp 220-221 * temp = (1.0 / (2.0 * IM_PI * sig4)) * (2.0 - (distance / sig2)) * exp( (-1.0) * distance / (2.0 * sig2) ) .. use 0.5 to normalise */ val = 0.5 * (2.0 - (distance / sig2)) * exp( -distance / (2.0 * sig2) ); /* Stop when change in value (ie. difference from the last * point) is positive (ie. we are going up) and absolute value * is less than the min. */ if( val - last >= 0 && fabs( val ) < logmat->min_ampl ) break; last = val; } if( x == 5000 ) { vips_error( class->nickname, "%s", _( "mask too large" ) ); return( -1 ); } width = x * 2 + 1; height = logmat->separable ? 1 : width; vips_image_init_fields( create->out, width, height, 1, VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE, VIPS_INTERPRETATION_B_W, 1.0, 1.0 ); vips_image_pipelinev( create->out, VIPS_DEMAND_STYLE_ANY, NULL ); if( vips_image_write_prepare( create->out ) ) return( -1 ); sum = 0.0; for( y = 0; y < height; y++ ) { for( x = 0; x < width; x++ ) { int xo = x - width / 2; int yo = y - height / 2; double distance = xo * xo + yo * yo; double v = 0.5 * (2.0 - (distance / sig2)) * exp( -distance / (2.0 * sig2) ); if( logmat->integer ) v = VIPS_RINT( 20 * v ); *VIPS_MATRIX( create->out, x, y ) = v; sum += v; } } vips_image_set_double( create->out, "scale", sum ); vips_image_set_double( create->out, "offset", 0.0 ); return( 0 ); } static void vips_logmat_class_init( VipsLogmatClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "logmat"; vobject_class->description = _( "make a laplacian of gaussian image" ); vobject_class->build = vips_logmat_build; VIPS_ARG_DOUBLE( class, "sigma", 2, _( "Radius" ), _( "Radius of Logmatian" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsLogmat, sigma ), 0.000001, 10000.0, 1.0 ); VIPS_ARG_DOUBLE( class, "min_ampl", 3, _( "Width" ), _( "Minimum amplitude of Logmatian" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsLogmat, min_ampl ), 0.000001, 10000.0, 0.1 ); VIPS_ARG_BOOL( class, "separable", 4, _( "Separable" ), _( "Generate separable Logmatian" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsLogmat, separable ), FALSE ); VIPS_ARG_BOOL( class, "integer", 5, _( "Integer" ), _( "Generate integer Logmatian" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsLogmat, integer ), FALSE ); } static void vips_logmat_init( VipsLogmat *logmat ) { logmat->sigma = 1; logmat->min_ampl = 0.1; } /** * vips_logmat: * @sigma: standard deviation of mask * @min_ampl: minimum amplitude * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @separable: generate a separable logmatian * @integer: generate an integer logmatian * * Creates a circularly symmetric Laplacian of Gaussian mask * of radius * @sigma. The size of the mask is determined by the variable @min_ampl; * if for instance the value .1 is entered this means that the produced mask * is clipped at values within 10 persent of zero, and where the change * between mask elements is less than 10%. * * The program uses the following equation: (from Handbook of Pattern * Recognition and image processing by Young and Fu, AP 1986 pages 220-221): * * H(r) = (1 / (2 * M_PI * s4)) * * (2 - (r2 / s2)) * * exp(-r2 / (2 * s2)) * * where s2 = @sigma * @sigma, s4 = s2 * s2, r2 = r * r. * * The generated mask has odd size and its maximum value is normalised to * 1.0, unless @integer is set. * * If @separable is set, only the centre horizontal is generated. This is * useful for separable convolutions. * * If @integer is set, an integer logmatian is generated. This is useful for * integer convolutions. * * "scale" is set to the sum of all the mask elements. * * See also: vips_gauss(), vips_conv(). * * Returns: 0 on success, -1 on error */ int vips_logmat( VipsImage **out, double sigma, double min_ampl, ... ) { va_list ap; int result; va_start( ap, min_ampl ); result = vips_call_split( "logmat", ap, out, sigma, min_ampl ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/tonelut.c0000644000175000017500000001771512303140253014275 00000000000000/* Build a tone curve. * * Author: John Cupitt * Written on: 18/7/1995 * 17/9/96 JC * - restrictions on Ps, Pm, Ph relaxed * - restrictions on S, M, H relaxed * 25/7/01 JC * - patched for im_extract_band() change * 11/7/04 * - generalised to im_tone_build_range() ... so you can use it for any * image, not just LabS * 26/3/10 * - cleanups * - gtkdoc * 20/9/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pcreate.h" typedef struct _VipsTonelut { VipsCreate parent_instance; /* Parameters for tone curve formation. */ double Lb, Lw; double Ps, Pm, Ph; double S, M, H; /* Range we process. */ int in_max; int out_max; /* Derived values. */ double Ls, Lm, Lh; } VipsTonelut; typedef VipsCreateClass VipsTonelutClass; G_DEFINE_TYPE( VipsTonelut, vips_tonelut, VIPS_TYPE_CREATE ); /* Calculate shadow curve. */ static double shad( VipsTonelut *lut, double x ) { double x1 = (x - lut->Lb) / (lut->Ls - lut->Lb); double x2 = (x - lut->Ls) / (lut->Lm - lut->Ls); double out; if( x < lut->Lb ) out = 0; else if( x < lut->Ls ) out = 3.0 * x1 * x1 - 2.0 * x1 * x1 * x1; else if( x < lut->Lm ) out = 1.0 - 3.0 * x2 * x2 + 2.0 * x2 * x2 * x2; else out = 0; return( out ); } /* Calculate mid-tone curve. */ static double mid( VipsTonelut *lut, double x ) { double x1 = (x - lut->Ls) / (lut->Lm - lut->Ls); double x2 = (x - lut->Lm) / (lut->Lh - lut->Lm); double out; if( x < lut->Ls ) out = 0; else if( x < lut->Lm ) out = 3.0 * x1 * x1 - 2.0 * x1 * x1 * x1; else if( x < lut->Lh ) out = 1.0 - 3.0 * x2 * x2 + 2.0 * x2 * x2 * x2; else out = 0; return( out ); } /* Calculate highlight curve. */ static double high( VipsTonelut *lut, double x ) { double x1 = (x - lut->Lm) / (lut->Lh - lut->Lm); double x2 = (x - lut->Lh) / (lut->Lw - lut->Lh); double out; if( x < lut->Lm ) out = 0; else if( x < lut->Lh ) out = 3.0 * x1 * x1 - 2.0 * x1 * x1 * x1; else if( x < lut->Lw ) out = 1.0 - 3.0 * x2 * x2 + 2.0 * x2 * x2 * x2; else out = 0; return( out ); } /* Generate a point on the tone curve. Everything is 0-100. */ static double tone_curve( VipsTonelut *lut, double x ) { double out; out = x + lut->S * shad( lut, x ) + lut->M * mid( lut, x ) + lut->H * high( lut, x ); return( out ); } static int vips_tonelut_build( VipsObject *object ) { VipsCreate *create = VIPS_CREATE( object ); VipsTonelut *lut = (VipsTonelut *) object; int i; unsigned short buf[65536]; if( VIPS_OBJECT_CLASS( vips_tonelut_parent_class )->build( object ) ) return( -1 ); g_assert( lut->in_max > 0 && lut->in_max < 65536 ); g_assert( lut->out_max > 0 && lut->out_max < 65536 ); /* Note derived params. */ lut->Ls = lut->Lb + lut->Ps * (lut->Lw - lut->Lb); lut->Lm = lut->Lb + lut->Pm * (lut->Lw - lut->Lb); lut->Lh = lut->Lb + lut->Ph * (lut->Lw - lut->Lb); /* Generate curve. */ for( i = 0; i <= lut->in_max; i++ ) { int v = (lut->out_max / 100.0) * tone_curve( lut, 100.0 * i / lut->in_max ); if( v < 0 ) v = 0; else if( v > lut->out_max ) v = lut->out_max; buf[i] = v; } /* Make the output image. */ vips_image_init_fields( create->out, lut->in_max + 1, 1, 1, VIPS_FORMAT_USHORT, VIPS_CODING_NONE, VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 ); if( vips_image_write_line( create->out, 0, (VipsPel *) buf ) ) return( -1 ); return( 0 ); } static void vips_tonelut_class_init( VipsTonelutClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "tonelut"; vobject_class->description = _( "build a look-up table" ); vobject_class->build = vips_tonelut_build; VIPS_ARG_INT( class, "in_max", 4, _( "In-max" ), _( "Size of LUT to build" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, in_max ), 1, 65535, 32767 ); VIPS_ARG_INT( class, "out_max", 5, _( "Out-max" ), _( "Maximum value in output LUT" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, out_max ), 1, 65535, 32767 ); VIPS_ARG_DOUBLE( class, "Lb", 6, _( "Black point" ), _( "Lowest value in output" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, Lb ), 0, 100, 0 ); VIPS_ARG_DOUBLE( class, "Lw", 7, _( "White point" ), _( "Highest value in output" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, Lw ), 0, 100, 100 ); VIPS_ARG_DOUBLE( class, "Ps", 8, _( "Shadow point" ), _( "Position of shadow" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, Ps ), 0, 1, 0.2 ); VIPS_ARG_DOUBLE( class, "Pm", 9, _( "Mid-tone point" ), _( "Position of mid-tones" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, Pm ), 0, 1, 0.5 ); VIPS_ARG_DOUBLE( class, "Ph", 10, _( "Highlight point" ), _( "Position of highlights" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, Ph ), 0, 1, 0.8 ); VIPS_ARG_DOUBLE( class, "S", 11, _( "Shadow adjust" ), _( "Adjust shadows by this much" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, S ), -30, 30, 0 ); VIPS_ARG_DOUBLE( class, "M", 12, _( "Mid-tone adjust" ), _( "Adjust mid-tones by this much" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, M ), -30, 30, 0 ); VIPS_ARG_DOUBLE( class, "H", 13, _( "Highlight adjust" ), _( "Adjust highlights by this much" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsTonelut, H ), -30, 30, 0 ); } static void vips_tonelut_init( VipsTonelut *lut ) { lut->in_max = 32767; lut->out_max = 32767; lut->Lb = 0.0; lut->Lw = 100.0; lut->Ps = 0.2; lut->Pm = 0.5; lut->Ph = 0.8; lut->S = 0.0; lut->M = 0.0; lut->H = 0.0; } /** * vips_tonelut: * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @in_max: input range * @out_max: output range * @Lb: black-point [0-100] * @Lw: white-point [0-100] * @Ps: shadow point (eg. 0.2) * @Pm: mid-tone point (eg. 0.5) * @Ph: highlight point (eg. 0.8) * @S: shadow adjustment (+/- 30) * @M: mid-tone adjustment (+/- 30) * @H: highlight adjustment (+/- 30) * * vips_tonelut() generates a tone curve for the adjustment of image * levels. It is mostly designed for adjusting the L* part of a LAB image in * a way suitable for print work, but you can use it for other things too. * * The curve is an unsigned 16-bit image with (@in_max + 1) entries, * each in the range [0, @out_max]. * * @Lb, @Lw are expressed as 0-100, as in LAB colour space. You * specify the scaling for the input and output images with the @in_max and * @out_max parameters. * * Returns: 0 on success, -1 on error */ int vips_tonelut( VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "tonelut", ap, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/mask_gaussian_band.c0000644000175000017500000001174312303140253016407 00000000000000/* creates a gaussian filter. * * 02/01/14 * - from gaussian.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" typedef struct _VipsMaskGaussianBand { VipsMask parent_instance; double frequency_cutoff_x; double frequency_cutoff_y; double radius; double amplitude_cutoff; } VipsMaskGaussianBand; typedef VipsMaskClass VipsMaskGaussianBandClass; G_DEFINE_TYPE( VipsMaskGaussianBand, vips_mask_gaussian_band, VIPS_TYPE_MASK ); static double vips_mask_gaussian_band_point( VipsMask *mask, double dx, double dy ) { VipsMaskGaussianBand *gaussian_band = (VipsMaskGaussianBand *) mask; double fcx = gaussian_band->frequency_cutoff_x; double fcy = gaussian_band->frequency_cutoff_y; double r2 = gaussian_band->radius * gaussian_band->radius; double ac = gaussian_band->amplitude_cutoff; double cnst = log( ac ); double d1 = (dx - fcx) * (dx - fcx) + (dy - fcy) * (dy - fcy); double d2 = (dx + fcx) * (dx + fcx) + (dy + fcy) * (dy + fcy); /* Normalise the amplitude at (fcx, fcy) to 1.0. */ double cnsta = 1.0 / (1.0 + exp( cnst * 4.0 * (fcx * fcx + fcy * fcy) / r2 )); return( cnsta * (exp( cnst * d1 / r2 ) + exp( cnst * d2 / r2 )) ); } static void vips_mask_gaussian_band_class_init( VipsMaskGaussianBandClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_gaussian_band"; vobject_class->description = _( "make a gaussian filter" ); mask_class->point = vips_mask_gaussian_band_point; VIPS_ARG_DOUBLE( class, "frequency_cutoff_x", 7, _( "Frequency cutoff x" ), _( "Frequency cutoff x" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskGaussianBand, frequency_cutoff_x ), 0.0, 1000000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "frequency_cutoff_y", 8, _( "Frequency cutoff y" ), _( "Frequency cutoff y" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskGaussianBand, frequency_cutoff_y ), 0.0, 1000000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "radius", 9, _( "radius" ), _( "radius of circle" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskGaussianBand, radius ), 0.0, 1000000.0, 0.1 ); VIPS_ARG_DOUBLE( class, "amplitude_cutoff", 10, _( "Amplitude cutoff" ), _( "Amplitude cutoff" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskGaussianBand, amplitude_cutoff ), 0.0, 1.0, 0.5 ); } static void vips_mask_gaussian_band_init( VipsMaskGaussianBand *gaussian_band ) { gaussian_band->frequency_cutoff_x = 0.5; gaussian_band->frequency_cutoff_x = 0.5; gaussian_band->radius = 0.1; gaussian_band->amplitude_cutoff = 0.5; } /** * vips_mask_gaussian_band: * @out: output image * @width: image size * @height: image size * @frequency_cutoff_x: band position * @frequency_cutoff_y: band position * @radius: band radius * @amplitude_cutoff: amplitude threshold * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make a gaussian band-pass or band-reject filter, that is, one with a * variable, smooth transition positioned at @frequency_cutoff_x, * @frequency_cutoff_y, of radius @radius. * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_gaussian_band( VipsImage **out, int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double radius, double amplitude_cutoff, ... ) { va_list ap; int result; va_start( ap, amplitude_cutoff ); result = vips_call_split( "mask_gaussian_band", ap, out, width, height, frequency_cutoff_x, frequency_cutoff_y, radius, amplitude_cutoff ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/mask_ideal.c0000644000175000017500000001021312303140253014656 00000000000000/* creates an ideal filter. * * 02/01/14 * - from ideal.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" G_DEFINE_TYPE( VipsMaskIdeal, vips_mask_ideal, VIPS_TYPE_MASK ); static double vips_mask_ideal_point( VipsMask *mask, double dx, double dy ) { VipsMaskIdeal *ideal = (VipsMaskIdeal *) mask; double fc = ideal->frequency_cutoff; double dist2 = dx * dx + dy * dy; double fc2 = fc * fc; return( dist2 <= fc2 ? 1.0 : 0.0 ); } static void vips_mask_ideal_class_init( VipsMaskIdealClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_ideal"; vobject_class->description = _( "make an ideal filter" ); mask_class->point = vips_mask_ideal_point; VIPS_ARG_DOUBLE( class, "frequency_cutoff", 6, _( "Frequency cutoff" ), _( "Frequency cutoff" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskIdeal, frequency_cutoff ), 0.0, 1000000.0, 0.5 ); } static void vips_mask_ideal_init( VipsMaskIdeal *ideal ) { ideal->frequency_cutoff = 0.5; } /** * vips_mask_ideal: * @out: output image * @width: image size * @height: image size * @frequency_cutoff: * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make an ideal high- or low-pass filter, that is, one with a sharp cutoff * positioned at @frequency_cutoff, where @frequency_cutoff is in * the range 0 - 1. * * This operation creates a one-band float image of the specified size. * The image has * values in the range [0, 1] and is typically used for multiplying against * frequency domain images to filter them. * Masks are created with the DC component at (0, 0). The DC pixel always * has the value 1.0. * * Set @nodc to not set the DC pixel. * * Set @optical to position the DC component in the centre of the image. This * makes the mask suitable for multiplying against optical Fourier transforms. * See vips_wrap(). * * Set @reject to invert the sense of * the filter. For example, low-pass becomes low-reject. * * Set @uchar to output an 8-bit unsigned char image rather than a * float image. In this case, pixels are in the range [0 - 255]. * * See also: vips_mask_ideal(), vips_mask_ideal_ring(), * vips_mask_ideal_band(), vips_mask_butterworth(), * vips_mask_butterworth_ring(), vips_mask_butterworth_band(), * vips_mask_gaussian(), vips_mask_gaussian_ring(), * vips_mask_gaussian_band(). * * Returns: 0 on success, -1 on error */ int vips_mask_ideal( VipsImage **out, int width, int height, double frequency_cutoff, ... ) { va_list ap; int result; va_start( ap, frequency_cutoff ); result = vips_call_split( "mask_ideal", ap, out, width, height, frequency_cutoff ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/mask_butterworth_ring.c0000644000175000017500000001041412303140253017213 00000000000000/* creates an butterworth filter. * * 02/01/14 * - from butterworth.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" typedef struct _VipsMaskButterworthRing { VipsMaskButterworth parent_instance; double ringwidth; } VipsMaskButterworthRing; typedef VipsMaskButterworthClass VipsMaskButterworthRingClass; G_DEFINE_TYPE( VipsMaskButterworthRing, vips_mask_butterworth_ring, VIPS_TYPE_MASK_BUTTERWORTH ); static double vips_mask_butterworth_ring_point( VipsMask *mask, double dx, double dy ) { VipsMaskButterworth *butterworth = (VipsMaskButterworth *) mask; VipsMaskButterworthRing *butterworth_ring = (VipsMaskButterworthRing *) mask; double order = butterworth->order; double fc = butterworth->frequency_cutoff; double ac = butterworth->amplitude_cutoff; double ringwidth = butterworth_ring->ringwidth; double df = ringwidth / 2.0; double cnst = (1.0 / ac) - 1.0; double df2 = df * df; double dist = sqrt( dx * dx + dy * dy ); return( 1.0 / (1.0 + cnst * pow( (dist - fc) * (dist - fc) / df2, order )) ); } static void vips_mask_butterworth_ring_class_init( VipsMaskButterworthRingClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_butterworth_ring"; vobject_class->description = _( "make a butterworth ring filter" ); mask_class->point = vips_mask_butterworth_ring_point; VIPS_ARG_DOUBLE( class, "ringwidth", 20, _( "Ringwidth" ), _( "Ringwidth" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworthRing, ringwidth ), 0.0, 1000000.0, 0.1 ); } static void vips_mask_butterworth_ring_init( VipsMaskButterworthRing *butterworth_ring ) { butterworth_ring->ringwidth = 0.1; } /** * vips_mask_butterworth_ring: * @out: output image * @width: image size * @height: image size * @order: filter order * @frequency_cutoff: frequency threshold * @amplitude_cutoff: amplitude threshold * @ringwidth: ringwidth * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make a butterworth ring-pass or ring-reject filter, that is, one with a * variable, * smooth transition * positioned at @frequency_cutoff of width @width, where @frequency_cutoff is * in the range 0 - 1. The shape of the curve is controlled by * @order: higher values give a sharper transition. See Gonzalez and Wintz, * Digital Image Processing, 1987. * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_butterworth_ring( VipsImage **out, int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, double ringwidth, ... ) { va_list ap; int result; va_start( ap, ringwidth ); result = vips_call_split( "mask_butterworth_ring", ap, out, width, height, order, frequency_cutoff, amplitude_cutoff, ringwidth ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/create.c0000644000175000017500000001111612303140253014033 00000000000000/* base class for all create operations * * properties: * - single output image we build */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" /** * SECTION: create * @short_description: create #VipsImage in various ways * @stability: Stable * @include: vips/vips.h * * These functions generate various test images. You can combine them with * the arithmetic and rotate functions to build more complicated images. * * The im_benchmark() operations are for testing the VIPS SMP system. */ G_DEFINE_ABSTRACT_TYPE( VipsCreate, vips_create, VIPS_TYPE_OPERATION ); static int vips_create_build( VipsObject *object ) { VipsCreate *create = VIPS_CREATE( object ); #ifdef DEBUG printf( "vips_create_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_object_set( create, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_create_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_create_class_init( VipsCreateClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "create"; vobject_class->description = _( "create operations" ); vobject_class->build = vips_create_build; VIPS_ARG_IMAGE( class, "out", 1, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsCreate, out ) ); } static void vips_create_init( VipsCreate *create ) { } void vips_create_operation_init( void ) { extern GType vips_black_get_type( void ); extern GType vips_gaussmat_get_type( void ); extern GType vips_logmat_get_type( void ); extern GType vips_gaussnoise_get_type( void ); #ifdef HAVE_PANGOFT2 extern GType vips_text_get_type( void ); #endif /*HAVE_PANGOFT2*/ extern GType vips_xyz_get_type( void ); extern GType vips_eye_get_type( void ); extern GType vips_grey_get_type( void ); extern GType vips_zone_get_type( void ); extern GType vips_sines_get_type( void ); extern GType vips_buildlut_get_type( void ); extern GType vips_invertlut_get_type( void ); extern GType vips_tonelut_get_type( void ); extern GType vips_identity_get_type( void ); extern GType vips_mask_butterworth_ring_get_type( void ); extern GType vips_mask_butterworth_band_get_type( void ); extern GType vips_mask_gaussian_ring_get_type( void ); extern GType vips_mask_gaussian_band_get_type( void ); extern GType vips_mask_ideal_ring_get_type( void ); extern GType vips_mask_ideal_band_get_type( void ); extern GType vips_mask_fractal_get_type( void ); extern GType vips_fractsurf_get_type( void ); vips_black_get_type(); vips_gaussmat_get_type(); vips_logmat_get_type(); vips_gaussnoise_get_type(); #ifdef HAVE_PANGOFT2 vips_text_get_type(); #endif /*HAVE_PANGOFT2*/ vips_xyz_get_type(); vips_eye_get_type(); vips_grey_get_type(); vips_zone_get_type(); vips_sines_get_type(); vips_buildlut_get_type(); vips_invertlut_get_type(); vips_tonelut_get_type(); vips_identity_get_type(); vips_mask_ideal_get_type(); vips_mask_ideal_ring_get_type(); vips_mask_ideal_band_get_type(); vips_mask_butterworth_get_type(); vips_mask_butterworth_ring_get_type(); vips_mask_butterworth_band_get_type(); vips_mask_gaussian_get_type(); vips_mask_gaussian_ring_get_type(); vips_mask_gaussian_band_get_type(); vips_mask_fractal_get_type(); vips_fractsurf_get_type(); } vips-7.38.5/libvips/create/identity.c0000644000175000017500000001150612303140253014424 00000000000000/* identity LUTs * * Copyright 1991, N. Dessipris. * * Author N. Dessipris * Written on 11/03/1991 * Updated on: * 18/6/93 JC * - im_outcheck() call added * - ANSIfied * 24/8/94 JC * - im_identity_ushort() added * 24/3/10 * - gtkdoc * 3/7/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pcreate.h" typedef struct _VipsIdentity { VipsCreate parent_instance; int bands; gboolean ushort; int size; } VipsIdentity; typedef VipsCreateClass VipsIdentityClass; G_DEFINE_TYPE( VipsIdentity, vips_identity, VIPS_TYPE_CREATE ); #define IDENTITY( TYPE ) { \ TYPE *q = (TYPE *) VIPS_REGION_ADDR( or, le, 0 ); \ \ for( x = le; x < ri; x++ ) { \ for( i = 0; i < identity->bands; i++ ) \ q[i] = x; \ \ q += identity->bands; \ } \ } static int vips_identity_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsIdentity *identity = (VipsIdentity *) a; VipsRect *r = &or->valid; int le = r->left; int ri = VIPS_RECT_RIGHT( r ); int x, i; if( identity->ushort ) { IDENTITY( unsigned short ); } else { IDENTITY( unsigned char ); } return( 0 ); } static int vips_identity_build( VipsObject *object ) { VipsCreate *create = VIPS_CREATE( object ); VipsIdentity *identity = (VipsIdentity *) object; if( VIPS_OBJECT_CLASS( vips_identity_parent_class )->build( object ) ) return( -1 ); vips_image_init_fields( create->out, identity->ushort ? identity->size : 256, 1, identity->bands, identity->ushort ? VIPS_FORMAT_USHORT : VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 ); vips_image_pipelinev( create->out, VIPS_DEMAND_STYLE_ANY, NULL ); if( vips_image_generate( create->out, NULL, vips_identity_gen, NULL, identity, NULL ) ) return( -1 ); return( 0 ); } static void vips_identity_class_init( VipsIdentityClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "identity"; vobject_class->description = _( "make a 1D image where pixel values are indexes" ); vobject_class->build = vips_identity_build; VIPS_ARG_INT( class, "bands", 3, _( "Bands" ), _( "Number of bands in LUT" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIdentity, bands ), 1, 100000, 1 ); VIPS_ARG_BOOL( class, "ushort", 4, _( "Ushort" ), _( "Create a 16-bit LUT" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIdentity, ushort ), FALSE ); VIPS_ARG_INT( class, "size", 5, _( "Size" ), _( "Size of 16-bit LUT" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIdentity, size ), 1, 65536, 65536 ); } static void vips_identity_init( VipsIdentity *identity ) { identity->bands = 1; identity->ushort = FALSE; identity->size = 65536; } /** * vips_identity: * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @bands: number of bands to create * @ushort: %TRUE for an unsigned short identity * @size: number of LUT elements for a ushort image * * Creates an identity lookup table, ie. one which will leave an image * unchanged when applied with vips_maplut(). Each entry in the table has a * value equal to its position. * * Use the arithmetic operations on these tables to make LUTs representing * arbitrary functions. * * Normally LUTs are 8-bit. Set @ushort to create a 16-bit table. * * Normally 16-bit tables have 65536 entries. You can set this smaller with * @size. * * See also: vips_xyz(), vips_maplut(). * * Returns: 0 on success, -1 on error */ int vips_identity( VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "identity", ap, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/eye.c0000644000175000017500000000651712303140253013363 00000000000000/* make a test pattern to show the eye's frequency response * * Copyright: 1990, 1991, N.Dessipris. * * Author N. Dessipris * Written on 30/05/1990 * Updated on: 27/01/1991, 07/03/1991, * 22/7/93 JC * - im_outcheck() added * 30/8/95 JC * - modernized * 1/2/11 * - gtk-doc * 13/6/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" typedef struct _VipsEye { VipsPoint parent_instance; double factor; } VipsEye; typedef VipsPointClass VipsEyeClass; G_DEFINE_TYPE( VipsEye, vips_eye, VIPS_TYPE_POINT ); static float vips_eye_point( VipsPoint *point, int x, int y ) { VipsEye *eye = (VipsEye *) point; double c = eye->factor * VIPS_PI / (2 * (point->width - 1)); double h = ((point->height - 1) * (point->height - 1)); return( y * y * cos( c * x * x ) / h ); } static void vips_eye_class_init( VipsEyeClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsPointClass *point_class = VIPS_POINT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "eye"; vobject_class->description = _( "make an image showing the eye's spatial response" ); point_class->point = vips_eye_point; VIPS_ARG_DOUBLE( class, "factor", 6, _( "Factor" ), _( "Maximum spatial frequency" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsEye, factor ), 0.0, 1.0, 0.5 ); } static void vips_eye_init( VipsEye *eye ) { eye->factor = 0.5; } /** * vips_eye: * @out: output image * @xsize: image size * @ysize: image size * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @factor: maximum spatial frequency * @uchar: output a uchar image * * Create a test pattern with increasing spatial frequence in X and * amplitude in Y. @factor should be between 0 and 1 and determines the * maximum spatial frequency. * * Set @uchar to output a uchar image. * * See also: vips_zone(). * * Returns: 0 on success, -1 on error */ int vips_eye( VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "eye", ap, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/point.h0000644000175000017500000000371712303140253013736 00000000000000/* base class for point generators */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_POINT_H #define VIPS_POINT_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_TYPE_POINT (vips_point_get_type()) #define VIPS_POINT( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_POINT, VipsPoint )) #define VIPS_POINT_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_POINT, VipsPointClass)) #define VIPS_IS_POINT( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_POINT )) #define VIPS_IS_POINT_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_POINT )) #define VIPS_POINT_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_POINT, VipsPointClass )) typedef struct _VipsPoint { VipsCreate parent_instance; int width; int height; gboolean uchar; } VipsPoint; typedef struct _VipsPointClass { VipsCreateClass parent_class; float (*point)( VipsPoint *, int, int ); float min; float max; VipsInterpretation interpretation; } VipsPointClass; GType vips_point_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_POINT_H*/ vips-7.38.5/libvips/create/text.c0000644000175000017500000002217112303140253013557 00000000000000/* vips_text * * Written on: 20/5/04 * 29/7/04 * - !HAVE_PANGOFT2 was broken, thanks Kenneth * 15/11/04 * - gah, still broken, thanks Stefan * 5/4/06 * - return an error for im_text( "" ) rather than trying to make an * empty image * 2/2/10 * - gtkdoc * 3/6/13 * - rewrite as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #ifdef HAVE_PANGOFT2 #include #include #include "pcreate.h" typedef struct _VipsText { VipsCreate parent_instance; char *text; char *font; int width; VipsAlign align; int dpi; FT_Bitmap bitmap; PangoContext *context; PangoLayout *layout; } VipsText; typedef VipsCreateClass VipsTextClass; G_DEFINE_TYPE( VipsText, vips_text, VIPS_TYPE_CREATE ); /* Just have one of these and reuse it. * * This does not unref cleanly on many platforms, so we will leak horribly * unless we reuse it. Sadly this means vips_text() needs to use a lock * internally to single-thread text rendering. */ static PangoFontMap *vips_text_fontmap = NULL; /* ... single-thread the body of vips_text() with this. */ static GMutex *vips_text_lock = NULL; static void vips_text_dispose( GObject *gobject ) { VipsText *text = (VipsText *) gobject; VIPS_UNREF( text->layout ); VIPS_UNREF( text->context ); VIPS_FREE( text->bitmap.buffer ); G_OBJECT_CLASS( vips_text_parent_class )->dispose( gobject ); } static PangoLayout * text_layout_new( PangoContext *context, const char *text, const char *font, int width, VipsAlign align, int dpi ) { PangoLayout *layout; PangoFontDescription *font_description; PangoAlignment palign; layout = pango_layout_new( context ); pango_layout_set_markup( layout, text, -1 ); font_description = pango_font_description_from_string( font ); pango_layout_set_font_description( layout, font_description ); pango_font_description_free( font_description ); if( width > 0 ) pango_layout_set_width( layout, width * PANGO_SCALE ); switch( align ) { case VIPS_ALIGN_LOW: palign = PANGO_ALIGN_LEFT; break; case VIPS_ALIGN_CENTRE: palign = PANGO_ALIGN_CENTER; break; case VIPS_ALIGN_HIGH: palign = PANGO_ALIGN_RIGHT; break; default: palign = PANGO_ALIGN_LEFT; break; } pango_layout_set_alignment( layout, palign ); return( layout ); } static int vips_text_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsCreate *create = VIPS_CREATE( object ); VipsText *text = (VipsText *) object; PangoRectangle logical_rect; int left; int top; int width; int height; int y; if( VIPS_OBJECT_CLASS( vips_text_parent_class )->build( object ) ) return( -1 ); if( !pango_parse_markup( text->text, -1, 0, NULL, NULL, NULL, NULL ) ) { vips_error( class->nickname, "%s", _( "invalid markup in text" ) ); return( -1 ); } if( !text->font ) g_object_set( text, "font", "sans 12", NULL ); g_mutex_lock( vips_text_lock ); if( !vips_text_fontmap ) vips_text_fontmap = pango_ft2_font_map_new(); pango_ft2_font_map_set_resolution( PANGO_FT2_FONT_MAP( vips_text_fontmap ), text->dpi, text->dpi ); text->context = pango_font_map_create_context( PANGO_FONT_MAP( vips_text_fontmap ) ); if( !(text->layout = text_layout_new( text->context, text->text, text->font, text->width, text->align, text->dpi )) ) { g_mutex_unlock( vips_text_lock ); return( -1 ); } pango_layout_get_extents( text->layout, NULL, &logical_rect ); #ifdef DEBUG printf( "logical left = %d, top = %d, width = %d, height = %d\n", PANGO_PIXELS( logical_rect.x ), PANGO_PIXELS( logical_rect.y ), PANGO_PIXELS( logical_rect.width ), PANGO_PIXELS( logical_rect.height ) ); #endif /*DEBUG*/ left = PANGO_PIXELS( logical_rect.x ); top = PANGO_PIXELS( logical_rect.y ); width = PANGO_PIXELS( logical_rect.width ); height = PANGO_PIXELS( logical_rect.height ); /* Can happen for "", for example. */ if( width == 0 || height == 0 ) { vips_error( class->nickname, "%s", _( "no text to render" ) ); g_mutex_unlock( vips_text_lock ); return( -1 ); } text->bitmap.width = width; text->bitmap.pitch = (text->bitmap.width + 3) & ~3; text->bitmap.rows = height; if( !(text->bitmap.buffer = im_malloc( NULL, text->bitmap.pitch * text->bitmap.rows )) ) { g_mutex_unlock( vips_text_lock ); return( -1 ); } text->bitmap.num_grays = 256; text->bitmap.pixel_mode = ft_pixel_mode_grays; memset( text->bitmap.buffer, 0x00, text->bitmap.pitch * text->bitmap.rows ); if( pango_layout_get_width( text->layout ) != -1 ) pango_ft2_render_layout( &text->bitmap, text->layout, -left, -top ); else pango_ft2_render_layout( &text->bitmap, text->layout, 0, 0 ); g_mutex_unlock( vips_text_lock ); vips_image_init_fields( create->out, text->bitmap.width, text->bitmap.rows, 1, VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, VIPS_INTERPRETATION_B_W, 1.0, 1.0 ); vips_image_pipelinev( create->out, VIPS_DEMAND_STYLE_ANY, NULL ); for( y = 0; y < text->bitmap.rows; y++ ) if( vips_image_write_line( create->out, y, (VipsPel *) text->bitmap.buffer + y * text->bitmap.pitch ) ) return( -1 ); return( 0 ); } static void * vips_text_make_lock( void *client ) { if( !vips_text_lock ) vips_text_lock = vips_g_mutex_new(); return( NULL ); } static void vips_text_class_init( VipsTextClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); static GOnce once = G_ONCE_INIT; (void) g_once( &once, vips_text_make_lock, NULL ); gobject_class->dispose = vips_text_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "text"; vobject_class->description = _( "make a text image" ); vobject_class->build = vips_text_build; VIPS_ARG_STRING( class, "text", 4, _( "Text" ), _( "Text to render" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsText, text ), NULL ); VIPS_ARG_STRING( class, "font", 4, _( "Font" ), _( "Font to render width" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsText, font ), NULL ); VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Maximum image width in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsText, width ), 0, 1000000, 0 ); VIPS_ARG_ENUM( class, "align", 5, _( "Align" ), _( "Align on the low, centre or high coordinate edge" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsText, align ), VIPS_TYPE_ALIGN, VIPS_ALIGN_LOW ); VIPS_ARG_INT( class, "dpi", 4, _( "DPI" ), _( "DPI to render at" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsText, dpi ), 1, 1000000, 72 ); } static void vips_text_init( VipsText *text ) { text->align = VIPS_ALIGN_LOW; text->dpi = 72; text->bitmap.buffer = NULL; } #endif /*HAVE_PANGOFT2*/ /** * vips_text: * @out: output image * @text: utf-8 text string to render * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @font: font to render with * @width: render within this many pixels across * @alignment: left/centre/right alignment * @dpi: render at this resolution * * Draw the string @text to an image. @out is a one-band 8-bit * unsigned char image, with 0 for no text and 255 for text. Values inbetween * are used for anti-aliasing. * * @text is the text to render as a UTF-8 string. It can contain Pango markup, * for example "<i>The</i>Guardian". * * @font is the font to render with, as a fontconfig name. Examples might be * "sans 12" or perhaps "bitstream charter bold 10". * * @width is the maximum number of pixels across to draw within. If the * generated text is wider than this, it will wrap to a new line. In this * case, @alignment can be used to set the alignment style for multi-line * text. 0 means left-align, 1 centre, 2 right-align. * * @dpi sets the resolution to render at. "sans 12" at 72 dpi draws characters * approximately 12 pixels high. * * See also: vips_make_xy(), vips_text(), vips_gaussnoise(). * * Returns: 0 on success, -1 on error */ int vips_text( VipsImage **out, const char *text, ... ) { va_list ap; int result; va_start( ap, text ); result = vips_call_split( "text", ap, out, text ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/pcreate.h0000644000175000017500000000362612303140253014227 00000000000000/* base class for all create operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PCREATE_H #define VIPS_PCREATE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_TYPE_CREATE (vips_create_get_type()) #define VIPS_CREATE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_CREATE, VipsCreate )) #define VIPS_CREATE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_CREATE, VipsCreateClass)) #define VIPS_IS_CREATE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_CREATE )) #define VIPS_IS_CREATE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_CREATE )) #define VIPS_CREATE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_CREATE, VipsCreateClass )) typedef struct _VipsCreate { VipsOperation parent_instance; /* All have an output image. */ VipsImage *out; } VipsCreate; typedef struct _VipsCreateClass { VipsOperationClass parent_class; } VipsCreateClass; GType vips_create_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PCREATE_H*/ vips-7.38.5/libvips/create/gaussmat.c0000644000175000017500000001366612303140253014430 00000000000000/* generate gaussian images * * Written on: 30/11/1989 by Nicos * Updated on: 6/12/1991 * 7/8/96 JC * - ansified, mem leaks plugged * 20/11/98 JC * - mask too large check added * 18/3/09 * - bumped max mask size *40 * - added _sep variant * 30/3/09 * - set scale in _sep variant, why not * 21/10/10 * - gtkdoc * 20/10/13 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" typedef struct _VipsGaussmat { VipsCreate parent_instance; double sigma; double min_ampl; gboolean separable; gboolean integer; } VipsGaussmat; typedef struct _VipsGaussmatClass { VipsCreateClass parent_class; } VipsGaussmatClass; G_DEFINE_TYPE( VipsGaussmat, vips_gaussmat, VIPS_TYPE_CREATE ); static int vips_gaussmat_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsCreate *create = VIPS_CREATE( object ); VipsGaussmat *gaussmat = (VipsGaussmat *) object; double sig2 = 2. * gaussmat->sigma * gaussmat->sigma; int max_x = 8 * gaussmat->sigma > 5000 ? 5000 : 8 * gaussmat->sigma ; int x, y; int width, height; double sum; if( VIPS_OBJECT_CLASS( vips_gaussmat_parent_class )->build( object ) ) return( -1 ); /* Find the size of the mask. Limit the mask size to 10k x 10k for * sanity. */ for( x = 0; x < max_x; x++ ) { double v = exp( - ((double)(x * x)) / sig2 ); if( v < gaussmat->min_ampl ) break; } if( x == max_x ) { vips_error( class->nickname, "%s", _( "mask too large" ) ); return( -1 ); } width = x * 2 + 1; height = gaussmat->separable ? 1 : width; vips_image_init_fields( create->out, width, height, 1, VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE, VIPS_INTERPRETATION_B_W, 1.0, 1.0 ); vips_image_pipelinev( create->out, VIPS_DEMAND_STYLE_ANY, NULL ); if( vips_image_write_prepare( create->out ) ) return( -1 ); sum = 0.0; for( y = 0; y < height; y++ ) { for( x = 0; x < width; x++ ) { int xo = x - width / 2; int yo = y - height / 2; double distance = xo * xo + yo * yo; double v = exp( -distance / sig2 ); if( gaussmat->integer ) v = VIPS_RINT( 20 * v ); *VIPS_MATRIX( create->out, x, y ) = v; sum += v; } } vips_image_set_double( create->out, "scale", sum ); vips_image_set_double( create->out, "offset", 0.0 ); return( 0 ); } static void vips_gaussmat_class_init( VipsGaussmatClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "gaussmat"; vobject_class->description = _( "make a gaussian image" ); vobject_class->build = vips_gaussmat_build; VIPS_ARG_DOUBLE( class, "sigma", 2, _( "Radius" ), _( "Radius of Gaussian" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGaussmat, sigma ), 0.000001, 10000.0, 1.0 ); VIPS_ARG_DOUBLE( class, "min_ampl", 3, _( "Width" ), _( "Minimum amplitude of Gaussian" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGaussmat, min_ampl ), 0.000001, 10000.0, 0.1 ); VIPS_ARG_BOOL( class, "separable", 4, _( "Separable" ), _( "Generate separable Gaussian" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsGaussmat, separable ), FALSE ); VIPS_ARG_BOOL( class, "integer", 5, _( "Integer" ), _( "Generate integer Gaussian" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsGaussmat, integer ), FALSE ); } static void vips_gaussmat_init( VipsGaussmat *gaussmat ) { gaussmat->sigma = 1; gaussmat->min_ampl = 0.1; } /** * vips_gaussmat: * @sigma: standard deviation of mask * @min_ampl: minimum amplitude * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @separable: generate a separable gaussian * @integer: generate an integer gaussian * * Creates a circularly symmetric Gaussian image of radius * @sigma. The size of the mask is determined by the variable @min_ampl; * if for instance the value .1 is entered this means that the produced mask * is clipped at values less than 10 percent of the maximum amplitude. * * The program uses the following equation: * * H(r) = exp( -(r * r) / (2 * @sigma * @sigma) ) * * The generated image has odd size and its maximum value is normalised to * 1.0, unless @integer is set. * * If @separable is set, only the centre horizontal is generated. This is * useful for separable convolutions. * * If @integer is set, an integer gaussian is generated. This is useful for * integer convolutions. * * "scale" is set to the sum of all the mask elements. * * See also: im_log_dmask(), vips_conv(). * * Returns: 0 on success, -1 on error */ int vips_gaussmat( VipsImage **out, double sigma, double min_ampl, ... ) { va_list ap; int result; va_start( ap, min_ampl ); result = vips_call_split( "gaussmat", ap, out, sigma, min_ampl ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/pmask.h0000644000175000017500000001100012303140253013700 00000000000000/* base class for mask generators */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PMASK_H #define VIPS_PMASK_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_TYPE_MASK (vips_mask_get_type()) #define VIPS_MASK( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_MASK, VipsMask )) #define VIPS_MASK_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_MASK, VipsMaskClass)) #define VIPS_IS_MASK( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_MASK )) #define VIPS_IS_MASK_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_MASK )) #define VIPS_MASK_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_MASK, VipsMaskClass )) typedef struct _VipsMask { VipsPoint parent_instance; gboolean optical; gboolean reject; gboolean nodc; } VipsMask; typedef struct _VipsMaskClass { VipsPointClass parent_class; double (*point)( VipsMask *, double, double ); } VipsMaskClass; GType vips_mask_get_type( void ); #define VIPS_TYPE_MASK_IDEAL (vips_mask_ideal_get_type()) #define VIPS_MASK_IDEAL( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_MASK_IDEAL, VipsMaskIdeal )) #define VIPS_MASK_IDEAL_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_MASK_IDEAL, VipsMaskIdealClass)) #define VIPS_IS_MASK_IDEAL( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_MASK_IDEAL )) #define VIPS_IS_MASK_IDEAL_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_MASK_IDEAL )) #define VIPS_MASK_IDEAL_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_MASK_IDEAL, VipsMaskIdealClass )) typedef struct _VipsMaskIdeal { VipsMask parent_instance; double frequency_cutoff; } VipsMaskIdeal; typedef VipsMaskClass VipsMaskIdealClass; GType vips_mask_ideal_get_type( void ); #define VIPS_TYPE_MASK_BUTTERWORTH (vips_mask_butterworth_get_type()) #define VIPS_MASK_BUTTERWORTH( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_MASK_BUTTERWORTH, VipsMaskButterworth )) #define VIPS_MASK_BUTTERWORTH_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_MASK_BUTTERWORTH, VipsMaskButterworthClass)) #define VIPS_IS_MASK_BUTTERWORTH( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_MASK_BUTTERWORTH )) #define VIPS_IS_MASK_BUTTERWORTH_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_MASK_BUTTERWORTH )) #define VIPS_MASK_BUTTERWORTH_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_MASK_BUTTERWORTH, VipsMaskButterworthClass )) typedef struct _VipsMaskButterworth { VipsMask parent_instance; double order; double frequency_cutoff; double amplitude_cutoff; } VipsMaskButterworth; typedef VipsMaskClass VipsMaskButterworthClass; GType vips_mask_butterworth_get_type( void ); #define VIPS_TYPE_MASK_GAUSSIAN (vips_mask_gaussian_get_type()) #define VIPS_MASK_GAUSSIAN( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_MASK_GAUSSIAN, VipsMaskGaussian )) #define VIPS_MASK_GAUSSIAN_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_MASK_GAUSSIAN, VipsMaskGaussianClass)) #define VIPS_IS_MASK_GAUSSIAN( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_MASK_GAUSSIAN )) #define VIPS_IS_MASK_GAUSSIAN_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_MASK_GAUSSIAN )) #define VIPS_MASK_GAUSSIAN_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_MASK_GAUSSIAN, VipsMaskGaussianClass )) typedef struct _VipsMaskGaussian { VipsMask parent_instance; double frequency_cutoff; double amplitude_cutoff; } VipsMaskGaussian; typedef VipsMaskClass VipsMaskGaussianClass; GType vips_mask_gaussian_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PMASK_H*/ vips-7.38.5/libvips/create/xyz.c0000644000175000017500000001427512303140253013433 00000000000000/* make an xy index image * * 21/4/04 * - from im_grey * 1/2/11 * - gtk-doc * 31/10/11 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pcreate.h" typedef struct _VipsXyz { VipsCreate parent_instance; int width; int height; int csize; int dsize; int esize; int dimensions; } VipsXyz; typedef VipsCreateClass VipsXyzClass; G_DEFINE_TYPE( VipsXyz, vips_xyz, VIPS_TYPE_CREATE ); static int vips_xyz_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsXyz *xyz = (VipsXyz *) a; VipsRect *r = &or->valid; int le = r->left; int to = r->top; int ri = VIPS_RECT_RIGHT( r ); int bo = VIPS_RECT_BOTTOM( r ); int x, y, i; for( y = to; y < bo; y++ ) { unsigned int *q = (unsigned int *) VIPS_REGION_ADDR( or, le, y ); unsigned int dims[5]; int r; int h; h = xyz->height * xyz->csize * xyz->dsize; dims[4] = y / h; r = y % h; h /= xyz->dsize; dims[3] = r / h; r %= h; h /= xyz->csize; dims[2] = r / h; r %= h; dims[1] = r; for( x = le; x < ri; x++ ) { dims[0] = x; for( i = 0; i < xyz->dimensions; i++ ) q[i] = dims[i]; q += xyz->dimensions; } } return( 0 ); } static int vips_xyz_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsCreate *create = VIPS_CREATE( object ); VipsXyz *xyz = (VipsXyz *) object; double d; int ysize; if( VIPS_OBJECT_CLASS( vips_xyz_parent_class )->build( object ) ) return( -1 ); if( (vips_object_argument_isset( object, "dsize" ) && !vips_object_argument_isset( object, "csize" )) || (vips_object_argument_isset( object, "esize" ) && !vips_object_argument_isset( object, "dsize" )) ) { vips_error( class->nickname, "%s", _( "lower dimensions not set" ) ); return( -1 ); } if( vips_object_argument_isset( object, "csize" ) ) { xyz->dimensions += 1; if( vips_object_argument_isset( object, "dsize" ) ) { xyz->dimensions += 1; if( vips_object_argument_isset( object, "esize" ) ) xyz->dimensions += 1; } } d = (double) xyz->height * xyz->csize * xyz->dsize * xyz->esize; if( d > INT_MAX ) { vips_error( class->nickname, "%s", _( "image too large" ) ); return( -1 ); } ysize = d; vips_image_init_fields( create->out, xyz->width, ysize, xyz->dimensions, VIPS_FORMAT_UINT, VIPS_CODING_NONE, VIPS_INTERPRETATION_MULTIBAND, 1.0, 1.0 ); vips_image_pipelinev( create->out, VIPS_DEMAND_STYLE_ANY, NULL ); if( vips_image_generate( create->out, NULL, vips_xyz_gen, NULL, xyz, NULL ) ) return( -1 ); return( 0 ); } static void vips_xyz_class_init( VipsXyzClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_xyz_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "xyz"; vobject_class->description = _( "make an image where pixel values are coordinates" ); vobject_class->build = vips_xyz_build; VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsXyz, width ), 1, 1000000, 64 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsXyz, height ), 1, 1000000, 64 ); VIPS_ARG_INT( class, "csize", 6, _( "csize" ), _( "Size of third dimension" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsXyz, csize ), 1, 1000000, 1 ); VIPS_ARG_INT( class, "dsize", 7, _( "dsize" ), _( "Size of fourth dimension" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsXyz, dsize ), 1, 1000000, 1 ); VIPS_ARG_INT( class, "esize", 8, _( "esize" ), _( "Size of fifth dimension" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsXyz, esize ), 1, 1000000, 1 ); } static void vips_xyz_init( VipsXyz *xyz ) { xyz->width = 64; xyz->height = 64; xyz->dimensions = 2; xyz->csize = 1; xyz->dsize = 1; xyz->esize = 1; } /** * vips_xyz: * @out: output image * @width: horizontal size * @height: vertical size * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @csize: size for third dimension * @dsize: size for fourth dimension * @esize: size for fifth dimension * * Create a two-band uint32 image where the elements in the first band have the * value of their x coordinate and elements in the second band have their y * coordinate. * * You can make any image where the value of a pixel is a function of its (x, * y) coordinate by combining this operator with the arithmetic operators. * * Set @csize, @dsize, @esize to generate higher dimensions and add more * bands. The extra dimensions are placed down the vertical axis. Use * vips_grid() to change the layout. * * See also: vips_grey(), vips_grid(), vips_identity(). * * Returns: 0 on success, -1 on error */ int vips_xyz( VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "xyz", ap, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/im_benchmark.c0000644000175000017500000001745212303140253015220 00000000000000/* a complicated operation for testing * * 6/10/06 * - hacked in * 27/11/06 * - added im_benchmarkn() * 1/2/11 * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* VIPS SMP benchmark ------------------ This is adapted from the system used to generate images for POD: http://cima.ng-london.org.uk/~john/POD Images from a 10k by 10k studio digital camera are colour processed, resized, cropped and sharpened. The original POD script was written in nip (see below). This operation is a reimplementation in vanilla C to make it easier to run (and less fragile!). This thing was originally processing images off a remote server over a 100mbit network. No attempt was made to make it quick (there was no point): you could make it a lot faster very easily. ------ benchmark in nip2 ----------- #!/home/john/vips/bin/nip2 -s // get command-line arguments image_path = argv?1; crop_id = parse_pint argv?2; crop_left = parse_pint argv?3; crop_top = parse_pint argv?4; crop_width = parse_pint argv?5; crop_height = parse_pint argv?6; width = parse_pint argv?7; height = parse_pint argv?8; sharp = parse_pint argv?9; // scale down by this much to undo photographic's relativisation darken = Vector [1.18, 1, 1]; // fudge factor in XYZ to get a match under NGC lights on uv-durable paper white_point_adjust = Vector [1.06, 1, 1.01]; // brighten by this in XYZ to get relative colorimetry brighten = 1.5; // blacks down by this much in LAB blacks_down = Vector [-2, 0, 0]; // sharpen params for 400, 300, 200 and 150 dpi // just change the size of the area we search sharpen_params_table = [ [ 11, 2.5, 40, 20, 0.5, 1.5 ], [ 7, 2.5, 40, 20, 0.5, 1.5 ], [ 5, 2.5, 40, 20, 0.5, 1.5 ], [ 3, 2.5, 40, 20, 0.5, 1.5 ] ]; // convert D65 XYZ to D50 XYZ D652D50 = recomb D652D50_direct; stage_crop in = extract_area crop_left crop_top crop_width crop_height in, crop_id != 0 = in; // fit within a width / height stage_shrink image = image, factor > 1; // never upscale = resize factor factor Interpolate.BILINEAR image { hfactor = width / get_width image; vfactor = height / get_height image; factor = min_pair hfactor vfactor; } // unphotoize, go to xyz, convert to D50, adjust white point, back to lab stage_colour in = if in?0 > 99 then Vector [100, 0, 0] else in''' { // back to absolute in' = in / darken; xyz = colour_transform_to Image_type.XYZ in'; xyz' = D652D50 xyz * white_point_adjust * brighten; in'' = colour_transform_to Image_type.LAB xyz'; // shadows down in''' = in'' + blacks_down; } stage_sharp in = (sharpen params?0 params?1 params?2 params?3 params?4 params?5 @ colour_transform_to Image_type.LABQ) in { params = sharpen_params_table?sharp; } // This was: // // stage_srgb in // = (icc_export 8 "$VIPSHOME/share/nip2/data/sRGB.icm" 1 @ // colour_transform_to Image_type.LABQ) in; // // but that uses lcms which is single-threaded. So for this benchmark, we use // VIPS's own ->sRGB converter, which is less accurate but does thread. stage_srgb in = colour_transform_to Image_type.sRGB in; main = (get_image @ stage_srgb @ stage_sharp @ stage_colour @ stage_shrink @ stage_crop @ colour_transform_to Image_type.LAB @ Image_file) image_path; ------ benchmark in nip2 ----------- */ /* The main part of the benchmark ... transform labq to labq. Chain several of * these together to get a CPU-bound operation. */ static int benchmark( IMAGE *in, IMAGE *out ) { IMAGE *t[18]; double one[3] = { 1.0, 1.0, 1.0 }; double zero[3] = { 0.0, 0.0, 0.0 }; double darken[3] = { 1.0 / 1.18, 1.0, 1.0 }; double whitepoint[3] = { 1.06, 1.0, 1.01 }; double shadow[3] = { -2, 0, 0 }; double white[3] = { 100, 0, 0 }; DOUBLEMASK *d652d50 = im_create_dmaskv( "d652d50", 3, 3, 1.13529, -0.0604663, -0.0606321, 0.0975399, 0.935024, -0.0256156, -0.0336428, 0.0414702, 0.994135 ); im_add_close_callback( out, (im_callback_fn) im_free_dmask, d652d50, NULL ); return( /* Set of descriptors for this operation. */ im_open_local_array( out, t, 18, "im_benchmark", "p" ) || /* Unpack to float. */ im_LabQ2Lab( in, t[0] ) || /* Crop 100 pixels off all edges. */ im_extract_area( t[0], t[1], 100, 100, t[0]->Xsize - 200, t[0]->Ysize - 200 ) || /* Shrink by 10%, bilinear interp. */ im_affinei_all( t[1], t[2], vips_interpolate_bilinear_static(), 0.9, 0, 0, 0.9, 0, 0 ) || /* Find L ~= 100 areas (white surround). */ im_extract_band( t[2], t[3], 0 ) || im_moreconst( t[3], t[4], 99 ) || /* Adjust white point and shadows. */ im_lintra_vec( 3, darken, t[2], zero, t[5] ) || im_Lab2XYZ( t[5], t[6] ) || im_recomb( t[6], t[7], d652d50 ) || im_lintra_vec( 3, whitepoint, t[7], zero, t[8] ) || im_lintra( 1.5, t[8], 0.0, t[9] ) || im_XYZ2Lab( t[9], t[10] ) || im_lintra_vec( 3, one, t[10], shadow, t[11] ) || /* Make a solid white image. */ im_black( t[12], t[4]->Xsize, t[4]->Ysize, 3 ) || im_lintra_vec( 3, zero, t[12], white, t[13] ) || /* Reattach border. */ im_ifthenelse( t[4], t[13], t[11], t[14] ) || /* Sharpen. */ im_Lab2LabQ( t[14], t[15] ) || im_sharpen( t[15], out, 11, 2.5, 40, 20, 0.5, 1.5 ) ); } /** * im_benchmarkn: * @in: input image * @out: output image * @n: iterations * * This operation runs a complicated set of other operations on image @in, * producing image @out. Use @n to set the number of iterations to run: a * larger number will make the operation more CPU-bound, a smaller number will * make the operation more IO-bound. * * See http://www.vips.ecs.soton.ac.uk/index.php?title=Benchmarks for a * detailed discussion of the benchmark and some sample results. * * See also: im_benchmark2(). * * Returns: 0 on success, -1 on error */ int im_benchmarkn( IMAGE *in, IMAGE *out, int n ) { IMAGE *t[2]; if( n == 0 ) /* To sRGB. */ return( im_LabQ2disp( in, out, im_col_displays( 7 ) ) ); else return( im_open_local_array( out, t, 2, "benchmarkn", "p" ) || benchmark( in, t[0] ) || /* Expand back to the original size again ... * benchmark does a 200 pixel crop plus a 10% shrink, * so if we chain many of them together the image gets * too small. */ im_affinei_all( t[0], t[1], vips_interpolate_bilinear_static(), (double) in->Xsize / t[0]->Xsize, 0, 0, (double) in->Ysize / t[0]->Ysize, 0, 0 ) || im_benchmarkn( t[1], out, n - 1 ) ); } /** * im_benchmark2: * @in: input image * @out: average image value * * This operation runs a single im_benchmarkn() and calculates the average * pixel value. It's useful if you just want to test image input. * * See also: im_benchmarkn(). * * Returns: 0 on success, -1 on error */ int im_benchmark2( IMAGE *in, double *out ) { IMAGE *t; return( !(t = im_open_local( in, "benchmarkn", "p" )) || im_benchmarkn( in, t, 1 ) || im_avg( t, out ) ); } vips-7.38.5/libvips/create/mask_butterworth.c0000644000175000017500000001031712303140253016176 00000000000000/* creates an butterworth filter. * * 02/01/14 * - from butterworth.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" G_DEFINE_TYPE( VipsMaskButterworth, vips_mask_butterworth, VIPS_TYPE_MASK ); static double vips_mask_butterworth_point( VipsMask *mask, double dx, double dy ) { VipsMaskButterworth *butterworth = (VipsMaskButterworth *) mask; double order = butterworth->order; double fc = butterworth->frequency_cutoff; double ac = butterworth->amplitude_cutoff; double cnst = (1.0 / ac) - 1.0; double fc2 = fc * fc; double dist2 = fc2 / (dx * dx + dy * dy); return( 1.0 / (1.0 + cnst * pow( dist2, order )) ); } static void vips_mask_butterworth_class_init( VipsMaskButterworthClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_butterworth"; vobject_class->description = _( "make a butterworth filter" ); mask_class->point = vips_mask_butterworth_point; VIPS_ARG_DOUBLE( class, "order", 6, _( "Order" ), _( "Filter order" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworth, order ), 1.0, 1000000.0, 1.0 ); VIPS_ARG_DOUBLE( class, "frequency_cutoff", 7, _( "Frequency cutoff" ), _( "Frequency cutoff" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworth, frequency_cutoff ), 0.0, 1000000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "amplitude_cutoff", 8, _( "Amplitude cutoff" ), _( "Amplitude cutoff" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskButterworth, amplitude_cutoff ), 0.0, 1.0, 0.5 ); } static void vips_mask_butterworth_init( VipsMaskButterworth *butterworth ) { butterworth->order = 1.0; butterworth->frequency_cutoff = 0.5; butterworth->amplitude_cutoff = 0.5; } /** * vips_mask_butterworth: * @out: output image * @width: image size * @height: image size * @order: filter order * @frequency_cutoff: frequency threshold * @amplitude_cutoff: amplitude threshold * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make an butterworth high- or low-pass filter, that is, one with a variable, * smooth transition * positioned at @frequency_cutoff, where @frequency_cutoff is in * range 0 - 1. The shape of the curve is controlled by * @order: higher values give a sharper transition. See Gonzalez and Wintz, * Digital Image Processing, 1987. * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_butterworth( VipsImage **out, int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, ... ) { va_list ap; int result; va_start( ap, amplitude_cutoff ); result = vips_call_split( "mask_butterworth", ap, out, width, height, order, frequency_cutoff, amplitude_cutoff ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/Makefile.in0000644000175000017500000005660512303144055014511 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/create DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcreate_la_LIBADD = am_libcreate_la_OBJECTS = create.lo gaussmat.lo logmat.lo buildlut.lo \ invertlut.lo tonelut.lo identity.lo point.lo mask.lo \ mask_ideal.lo mask_ideal_ring.lo mask_ideal_band.lo \ mask_butterworth.lo mask_butterworth_ring.lo \ mask_butterworth_band.lo mask_gaussian.lo \ mask_gaussian_ring.lo mask_gaussian_band.lo mask_fractal.lo \ fractsurf.lo eye.lo grey.lo xyz.lo black.lo text.lo \ gaussnoise.lo im_benchmark.lo sines.lo zone.lo \ other_dispatch.lo libcreate_la_OBJECTS = $(am_libcreate_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcreate_la_SOURCES) DIST_SOURCES = $(libcreate_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libcreate.la libcreate_la_SOURCES = \ create.c \ pcreate.h \ gaussmat.c \ logmat.c \ buildlut.c \ invertlut.c \ tonelut.c \ identity.c \ point.c \ point.h \ mask.c \ pmask.h \ mask_ideal.c \ mask_ideal_ring.c \ mask_ideal_band.c \ mask_butterworth.c \ mask_butterworth_ring.c \ mask_butterworth_band.c \ mask_gaussian.c \ mask_gaussian_ring.c \ mask_gaussian_band.c \ mask_fractal.c \ fractsurf.c \ eye.c \ grey.c \ xyz.c \ black.c \ text.c \ gaussnoise.c \ im_benchmark.c \ sines.c \ zone.c \ other_dispatch.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/create/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/create/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcreate.la: $(libcreate_la_OBJECTS) $(libcreate_la_DEPENDENCIES) $(EXTRA_libcreate_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcreate_la_OBJECTS) $(libcreate_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/black.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildlut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eye.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fractsurf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaussmat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaussnoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grey.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/identity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_benchmark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invertlut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logmat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_butterworth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_butterworth_band.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_butterworth_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_fractal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_gaussian.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_gaussian_band.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_gaussian_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_ideal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_ideal_band.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_ideal_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/other_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/point.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sines.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tonelut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xyz.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zone.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/create/Makefile.am0000644000175000017500000000120412303140253014455 00000000000000noinst_LTLIBRARIES = libcreate.la libcreate_la_SOURCES = \ create.c \ pcreate.h \ gaussmat.c \ logmat.c \ buildlut.c \ invertlut.c \ tonelut.c \ identity.c \ point.c \ point.h \ mask.c \ pmask.h \ mask_ideal.c \ mask_ideal_ring.c \ mask_ideal_band.c \ mask_butterworth.c \ mask_butterworth_ring.c \ mask_butterworth_band.c \ mask_gaussian.c \ mask_gaussian_ring.c \ mask_gaussian_band.c \ mask_fractal.c \ fractsurf.c \ eye.c \ grey.c \ xyz.c \ black.c \ text.c \ gaussnoise.c \ im_benchmark.c \ sines.c \ zone.c \ other_dispatch.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/create/mask_gaussian_ring.c0000644000175000017500000000755612303140253016451 00000000000000/* creates a gaussian_ring filter. * * 02/01/14 * - from gaussian_ring.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" typedef struct _VipsMaskGaussianRing { VipsMaskGaussian parent_instance; double ringwidth; } VipsMaskGaussianRing; typedef VipsMaskGaussianClass VipsMaskGaussianRingClass; G_DEFINE_TYPE( VipsMaskGaussianRing, vips_mask_gaussian_ring, VIPS_TYPE_MASK_GAUSSIAN ); static double vips_mask_gaussian_ring_point( VipsMask *mask, double dx, double dy ) { VipsMaskGaussian *gaussian = (VipsMaskGaussian *) mask; VipsMaskGaussianRing *gaussian_ring = (VipsMaskGaussianRing *) mask; double fc = gaussian->frequency_cutoff; double ac = gaussian->amplitude_cutoff; double ringwidth = gaussian_ring->ringwidth; double df = ringwidth / 2.0; double df2 = df * df; double cnst = log( ac ); double dist = sqrt( dx * dx + dy * dy ); return( exp( cnst * (dist - fc) * (dist - fc) / df2 ) ); } static void vips_mask_gaussian_ring_class_init( VipsMaskGaussianRingClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_gaussian_ring"; vobject_class->description = _( "make a gaussian ring filter" ); mask_class->point = vips_mask_gaussian_ring_point; VIPS_ARG_DOUBLE( class, "ringwidth", 20, _( "Ringwidth" ), _( "Ringwidth" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskGaussianRing, ringwidth ), 0.0, 1000000.0, 0.5 ); } static void vips_mask_gaussian_ring_init( VipsMaskGaussianRing *gaussian_ring ) { gaussian_ring->ringwidth = 0.5; } /** * vips_mask_gaussian_ring: * @out: output image * @width: image size * @height: image size * @frequency_cutoff: frequency threshold * @amplitude_cutoff: amplitude threshold * @ringwidth: ringwidth * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make a gaussian ring-pass or ring-reject filter, that is, one with a * variable, smooth transition positioned at @frequency_cutoff of width * @ringwidth. * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_gaussian_ring( VipsImage **out, int width, int height, double frequency_cutoff, double amplitude_cutoff, double ringwidth, ... ) { va_list ap; int result; va_start( ap, ringwidth ); result = vips_call_split( "mask_gaussian_ring", ap, out, width, height, frequency_cutoff, amplitude_cutoff, ringwidth ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/mask_fractal.c0000644000175000017500000000652712303140253015231 00000000000000/* creates a fractal filter. * * 02/01/14 * - from ideal.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" typedef struct _VipsMaskFractal { VipsMask parent_instance; double fractal_dimension; } VipsMaskFractal; typedef VipsMaskClass VipsMaskFractalClass; G_DEFINE_TYPE( VipsMaskFractal, vips_mask_fractal, VIPS_TYPE_MASK ); static double vips_mask_fractal_point( VipsMask *mask, double dx, double dy ) { VipsMaskFractal *fractal = (VipsMaskFractal *) mask; double fd = (fractal->fractal_dimension - 4.0) / 2.0; double d2 = dx * dx + dy * dy; return( pow( d2, fd ) ); } static void vips_mask_fractal_class_init( VipsMaskFractalClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_fractal"; vobject_class->description = _( "make fractal filter" ); mask_class->point = vips_mask_fractal_point; VIPS_ARG_DOUBLE( class, "fractal_dimension", 8, _( "Fractal dimension" ), _( "Fractal dimension" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskFractal, fractal_dimension ), 2.0, 3.0, 2.5 ); } static void vips_mask_fractal_init( VipsMaskFractal *fractal ) { fractal->fractal_dimension = 2.5; } /** * vips_mask_fractal: * @out: output image * @width: image size * @height: image size * @fractal_dimension: fractal dimension * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * This operation should be used to create fractal images by filtering the * power spectrum of Gaussian white noise. See vips_gaussnoise(). * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_fractal( VipsImage **out, int width, int height, double fractal_dimension, ... ) { va_list ap; int result; va_start( ap, fractal_dimension ); result = vips_call_split( "mask_fractal", ap, out, width, height, fractal_dimension ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/point.c0000644000175000017500000001025212303140253013721 00000000000000/* make a test pattern to show the point's frequency response * * Copyright: 1990, 1991, N.Dessipris. * * Author N. Dessipris * Written on 30/05/1990 * Updated on: 27/01/1991, 07/03/1991, * 22/7/93 JC * - im_outcheck() added * 30/8/95 JC * - modernized * 1/2/11 * - gtk-doc * 13/6/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" G_DEFINE_ABSTRACT_TYPE( VipsPoint, vips_point, VIPS_TYPE_CREATE ); static int vips_point_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsPoint *point = (VipsPoint *) a; VipsPointClass *class = VIPS_POINT_GET_CLASS( point ); VipsRect *r = &or->valid; int x, y; for( y = 0; y < r->height; y++ ) { int ay = r->top + y; float *q = (float *) VIPS_REGION_ADDR( or, r->left, ay ); for( x = 0; x < r->width; x++ ) q[x] = class->point( point, r->left + x, ay ); } return( 0 ); } static int vips_point_build( VipsObject *object ) { VipsCreate *create = VIPS_CREATE( object ); VipsPoint *point = VIPS_POINT( object ); VipsPointClass *class = VIPS_POINT_GET_CLASS( point ); VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); VipsImage *in; if( VIPS_OBJECT_CLASS( vips_point_parent_class )->build( object ) ) return( -1 ); t[0] = vips_image_new(); vips_image_init_fields( t[0], point->width, point->height, 1, VIPS_FORMAT_FLOAT, VIPS_CODING_NONE, class->interpretation, 1.0, 1.0 ); vips_image_pipelinev( t[0], VIPS_DEMAND_STYLE_ANY, NULL ); if( vips_image_generate( t[0], NULL, vips_point_gen, NULL, point, NULL ) ) return( -1 ); in = t[0]; if( point->uchar ) { float min = class->min; float max = class->max; float range = max - min; if( vips_linear1( in, &t[2], 255.0 / range, -min * 255.0 / range, "uchar", TRUE, NULL ) ) return( -1 ); in = t[2]; /* uchar mode always does B_W. We don't want FOURIER or * whatever in this case. */ in->Type = VIPS_INTERPRETATION_B_W; } if( vips_image_write( in, create->out ) ) return( -1 ); return( 0 ); } static void vips_point_class_init( VipsPointClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "point"; vobject_class->description = _( "make a point image" ); vobject_class->build = vips_point_build; class->point = NULL; class->min = -1.0; class->max = 1.0; class->interpretation = VIPS_INTERPRETATION_B_W; VIPS_ARG_INT( class, "width", 2, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsPoint, width ), 1, 1000000, 1 ); VIPS_ARG_INT( class, "height", 3, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsPoint, height ), 1, 1000000, 1 ); VIPS_ARG_BOOL( class, "uchar", 4, _( "Uchar" ), _( "Output an unsigned char image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsPoint, uchar ), FALSE ); } static void vips_point_init( VipsPoint *point ) { } vips-7.38.5/libvips/create/mask_ideal_band.c0000644000175000017500000001042012303140253015642 00000000000000/* creates an ideal filter. * * 02/01/14 * - from ideal.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" #include "pmask.h" typedef struct _VipsMaskIdealBand { VipsMask parent_instance; double frequency_cutoff_x; double frequency_cutoff_y; double radius; } VipsMaskIdealBand; typedef VipsMaskClass VipsMaskIdealBandClass; G_DEFINE_TYPE( VipsMaskIdealBand, vips_mask_ideal_band, VIPS_TYPE_MASK ); static double vips_mask_ideal_band_point( VipsMask *mask, double dx, double dy ) { VipsMaskIdealBand *ideal_band = (VipsMaskIdealBand *) mask; double fcx = ideal_band->frequency_cutoff_x; double fcy = ideal_band->frequency_cutoff_y; double r2 = ideal_band->radius * ideal_band->radius; double d1 = (dx - fcx) * (dx - fcx) + (dy - fcy) * (dy - fcy); double d2 = (dx + fcx) * (dx + fcx) + (dy + fcy) * (dy + fcy); return( d1 < r2 || d2 < r2 ? 1.0 : 0.0 ); } static void vips_mask_ideal_band_class_init( VipsMaskIdealBandClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsMaskClass *mask_class = VIPS_MASK_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "mask_ideal_band"; vobject_class->description = _( "make an ideal band filter" ); mask_class->point = vips_mask_ideal_band_point; VIPS_ARG_DOUBLE( class, "frequency_cutoff_x", 6, _( "Frequency cutoff x" ), _( "Frequency cutoff x" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskIdealBand, frequency_cutoff_x ), 0.0, 1000000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "frequency_cutoff_y", 7, _( "Frequency cutoff y" ), _( "Frequency cutoff y" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskIdealBand, frequency_cutoff_y ), 0.0, 1000000.0, 0.5 ); VIPS_ARG_DOUBLE( class, "radius", 8, _( "radius" ), _( "radius of circle" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaskIdealBand, radius ), 0.0, 1000000.0, 0.1 ); } static void vips_mask_ideal_band_init( VipsMaskIdealBand *ideal_band ) { ideal_band->frequency_cutoff_x = 0.5; ideal_band->frequency_cutoff_y = 0.5; ideal_band->radius = 0.1; } /** * vips_mask_ideal_band: * @out: output image * @width: image size * @height: image size * @frequency_cutoff_x: position of band * @frequency_cutoff_y: position of band * @radius: size of band * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @nodc: don't set the DC pixel * @reject: invert the filter sense * @optical: coordinates in optical space * @uchar: output a uchar image * * Make an ideal band-pass or band-reject filter, that is, one with a * sharp cutoff around the point @frequency_cutoff_x, @frequency_cutoff_y, * of size @r. * * See also: vips_mask_ideal(). * * Returns: 0 on success, -1 on error */ int vips_mask_ideal_band( VipsImage **out, int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double radius, ... ) { va_list ap; int result; va_start( ap, radius ); result = vips_call_split( "mask_ideal_band", ap, out, width, height, frequency_cutoff_x, frequency_cutoff_y, radius ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/grey.c0000644000175000017500000000554012303140253013542 00000000000000/* grey ramps * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/02/1990 * Modified on: * 22/7/93 JC * - im_outcheck() added * - externs removed * 8/2/95 JC * - ANSIfied * - im_fgrey() made from im_grey() * 31/8/95 JC * - now makes [0,1], rather than [0,256) * - im_grey() now defined in terms of im_fgrey() * 2/3/98 JC * - partialed * 1/2/11 * - gtk-doc * 13/6/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcreate.h" #include "point.h" typedef VipsPoint VipsGrey; typedef VipsPointClass VipsGreyClass; G_DEFINE_TYPE( VipsGrey, vips_grey, VIPS_TYPE_POINT ); static float vips_grey_point( VipsPoint *point, int x, int y ) { return( (double) x / (point->width - 1) ); } static void vips_grey_class_init( VipsGreyClass *class ) { VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsPointClass *point_class = VIPS_POINT_CLASS( class ); vobject_class->nickname = "grey"; vobject_class->description = _( "make a grey ramp image" ); point_class->point = vips_grey_point; } static void vips_grey_init( VipsGrey *grey ) { } /** * vips_grey: * @out: output image * @xsize: image size * @ysize: image size * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @uchar: output a uchar image * * Create a one-band float image with the left-most column zero and the * right-most 1. Intermediate pixels are a linear ramp. * * Set @uchar to output a uchar image with the leftmost pixel 0 and the * rightmost 255. * * See also: vips_xyz(), vips_identity(). * * Returns: 0 on success, -1 on error */ int vips_grey( VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "grey", ap, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/fractsurf.c0000644000175000017500000000770512303140253014600 00000000000000/* fractal surface * * Author: N. Dessipris * Written on: 10/09/1991 * Modified on: * 20/9/95 JC * - modernised, a little * 7/2/10 * - cleanups * - gtkdoc * 4/1/14 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcreate.h" typedef struct _VipsFractsurf { VipsCreate parent_instance; int width; int height; double fractal_dimension; } VipsFractsurf; typedef VipsCreateClass VipsFractsurfClass; G_DEFINE_TYPE( VipsFractsurf, vips_fractsurf, VIPS_TYPE_CREATE ); static int vips_fractsurf_build( VipsObject *object ) { VipsCreate *create = VIPS_CREATE( object ); VipsFractsurf *fractsurf = (VipsFractsurf *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 ); if( VIPS_OBJECT_CLASS( vips_fractsurf_parent_class )->build( object ) ) return( -1 ); if( vips_gaussnoise( &t[0], fractsurf->width, fractsurf->height, 0.0, 1.0, NULL ) || vips_mask_fractal( &t[1], fractsurf->width, fractsurf->height, fractsurf->fractal_dimension, NULL ) || vips_freqmult( t[0], t[1], &t[2], NULL ) || vips_image_write( t[2], create->out ) ) return( -1 ); return( 0 ); } static void vips_fractsurf_class_init( VipsFractsurfClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "fractsurf"; vobject_class->description = _( "make a fractal surface" ); vobject_class->build = vips_fractsurf_build; VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFractsurf, width ), 1, 1000000, 64 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFractsurf, height ), 1, 1000000, 64 ); VIPS_ARG_DOUBLE( class, "fractal_dimension", 8, _( "Fractal dimension" ), _( "Fractal dimension" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFractsurf, fractal_dimension ), 2.0, 3.0, 2.5 ); } static void vips_fractsurf_init( VipsFractsurf *fractsurf ) { fractsurf->width = 64; fractsurf->height = 64; fractsurf->fractal_dimension = 2.5; } /** * vips_fractsurf: * @out: output image * @width: output width * @height: output height * @fractal_dimension: fractal dimension * @...: %NULL-terminated list of optional named arguments * * Generate an image of size @width by @height and fractal dimension * @fractal_dimension. The dimension should be between 2 and 3. * * See also: vips_gaussnoise(), vips_mask_fractal(). * * Returns: 0 on success, -1 on error */ int vips_fractsurf( VipsImage **out, int width, int height, double fractal_dimension, ... ) { va_list ap; int result; va_start( ap, fractal_dimension ); result = vips_call_split( "fractsurf", ap, out, width, height, fractal_dimension ); va_end( ap ); return( result ); } vips-7.38.5/libvips/create/buildlut.c0000644000175000017500000002011312303140253014411 00000000000000/* Build a LUT from a set of x/y points. * * Written on: 26/9/06 * - from im_invertlut() * 9/10/06 * - don't output x values * 18/3/09 * - saner limit and rounding behaviour * 30/3/09 * - argh, fixed again * 22/6/09 * - more fixes for tables that don't start at zero (thanks Jack) * 23/3/10 * - gtkdoc * 2/7/13 * - convert to a class * 10/12/13 * - be more forgiving about x vales not quite integers */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pcreate.h" typedef struct _VipsBuildlut { VipsCreate parent_instance; /* Input image. */ VipsImage *in; /* .. and cast to a matrix. */ VipsImage *mat; int xlow; /* Index 0 in output is this x */ int lut_size; /* Number of output elements to generate */ double **data; /* Matrix row pointers */ double *buf; /* Ouput buffer */ } VipsBuildlut; typedef VipsCreateClass VipsBuildlutClass; G_DEFINE_TYPE( VipsBuildlut, vips_buildlut, VIPS_TYPE_CREATE ); static void vips_buildlut_dispose( GObject *gobject ) { VipsBuildlut *lut = (VipsBuildlut *) gobject; VIPS_FREE( lut->data ); VIPS_FREE( lut->buf ); VIPS_UNREF( lut->mat ); G_OBJECT_CLASS( vips_buildlut_parent_class )->dispose( gobject ); } /* Use this to sort our input rows by the first column. */ static int vips_buildlut_compare( const void *a, const void *b ) { double **r1 = (double **) a; double **r2 = (double **) b; double diff = r1[0][0] - r2[0][0]; if( diff > 0 ) return( 1 ); else if( diff == 0 ) return( 0 ); else return( -1 ); } static int vips_buildlut_build_init( VipsBuildlut *lut ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( lut ); int y; int xlow, xhigh; /* Need xlow and xhigh to get the size of the LUT we build. */ xlow = xhigh = *VIPS_MATRIX( lut->mat, 0, 0 ); for( y = 0; y < lut->mat->Ysize; y++ ) { double v = *VIPS_MATRIX( lut->mat, 0, y ); /* Allow for being a bit off. */ if( abs( v - VIPS_RINT( v ) ) > 0.001 ) { vips_error( class->nickname, _( "x value row %d not an int" ), y ); return( -1 ); } v = VIPS_RINT( v ); if( v < xlow ) xlow = v; if( v > xhigh ) xhigh = v; } lut->xlow = xlow; lut->lut_size = xhigh - xlow + 1; if( lut->lut_size < 1 ) { vips_error( class->nickname, "%s", _( "x range too small" ) ); return( -1 ); } if( !(lut->data = VIPS_ARRAY( NULL, lut->mat->Ysize, double * )) ) return( -1 ); for( y = 0; y < lut->mat->Ysize; y++ ) lut->data[y] = VIPS_MATRIX( lut->mat, 0, y ); if( !(lut->buf = VIPS_ARRAY( NULL, lut->lut_size * (lut->mat->Xsize - 1), double )) ) return( -1 ); /* Sort by 1st column in input. */ qsort( lut->data, lut->mat->Ysize, sizeof( double * ), vips_buildlut_compare ); #ifdef DEBUG printf( "Input table, sorted by 1st column\n" ); for( y = 0; y < lut->mat->Ysize; y++ ) { printf( "%.4d ", y ); for( x = 0; x < lut->mat->Xsize; x++ ) printf( "%.9f ", lut->data[y][x] ); printf( "\n" ); } #endif /*DEBUG*/ return( 0 ); } static int vips_buildlut_build_create( VipsBuildlut *lut ) { const int xlow = lut->xlow; const VipsImage *mat = lut->mat; const int xsize = mat->Xsize; const int ysize = mat->Ysize; const int bands = xsize - 1; const int xlast = lut->data[ysize - 1][0]; int b, i, x; /* Do each output channel separately. */ for( b = 0; b < bands; b++ ) { for( i = 0; i < ysize - 1; i++ ) { const int x1 = VIPS_RINT( lut->data[i][0] ); const int x2 = VIPS_RINT( lut->data[i + 1][0] ); const int dx = x2 - x1; const double y1 = lut->data[i][b + 1]; const double y2 = lut->data[i + 1][b + 1]; const double dy = y2 - y1; for( x = 0; x < dx; x++ ) lut->buf[b + (x + x1 - xlow) * bands] = y1 + x * dy / dx; } /* We are inclusive: pop the final value in by hand. */ lut->buf[b + (xlast - xlow) * bands] = lut->data[ysize - 1][b + 1]; } return( 0 ); } static int vips_buildlut_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsCreate *create = VIPS_CREATE( object ); VipsBuildlut *lut = (VipsBuildlut *) object; if( VIPS_OBJECT_CLASS( vips_buildlut_parent_class )->build( object ) ) return( -1 ); if( vips_check_matrix( class->nickname, lut->in, &lut->mat ) ) return( -1 ); if( vips_buildlut_build_init( lut ) || vips_buildlut_build_create( lut ) ) return( -1 ); vips_image_init_fields( create->out, lut->lut_size, 1, lut->mat->Xsize - 1, VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE, VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 ); if( vips_image_write_line( create->out, 0, (VipsPel *) lut->buf ) ) return( -1 ); return( 0 ); } static void vips_buildlut_class_init( VipsBuildlutClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->dispose = vips_buildlut_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "buildlut"; vobject_class->description = _( "build a look-up table" ); vobject_class->build = vips_buildlut_build; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Matrix of XY coordinates" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBuildlut, in ) ); } static void vips_buildlut_init( VipsBuildlut *lut ) { } /** * vips_buildlut: * @in: input matrix * @out: output image * @...: %NULL-terminated list of optional named arguments * * This operation builds a lookup table from a set of points. Intermediate * values are generated by piecewise linear interpolation. * * For example, consider this 2 x 2 matrix of (x, y) coordinates: * * * * * 0 * 0 * * * 255 * 100 * * * * * We then generate: * * * * * Index * Value * * * * * 0 * 0 * * * 1 * 0.4 * * * ... * etc. by linear interpolation * * * 255 * 100 * * * * * This is then written as the output image, with the left column giving the * index in the image to place the value. * * The (x, y) points don't need to be sorted: we do that. You can have * several Ys, each becomes a band in the output LUT. You don't need to * start at zero, any integer will do, including negatives. * * See also: vips_identity(), vips_invertlut(). * * Returns: 0 on success, -1 on error */ int vips_buildlut( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "buildlut", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/0000755000175000017500000000000012303146330012546 500000000000000vips-7.38.5/libvips/colour/scRGB2sRGB.c0000644000175000017500000001264712303140253014402 00000000000000/* Turn scRGB files into displayable rgb. * * Author: J-P. Laurent * Modified: * 15/11/94 JC * - error message added * - out->Type set to IM_TYPE_RGB * - memory leak fixed * 16/11/94 JC * - uses im_wrapone() * 15/2/95 JC * - oops! now uses PEL, not float for output pointer * 2/1/96 JC * - sometimes produced incorrect result at extrema * - reformatted * - now uses IM_RINT() and clip() * 18/9/96 JC * - some speed-ups ... 3x faster * - slightly less accurate, but who cares * - added out-of-mem check for table build * 21/9/12 * - redone as a class * - sRGB only, support for other RGBs is now via lcms * 6/11/12 * - added 16-bit option * 11/12/12 * - cut about to make scRGB2sRGB.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef struct _VipsscRGB2sRGB { VipsColourCode parent_instance; int depth; } VipsscRGB2sRGB; typedef VipsColourCodeClass VipsscRGB2sRGBClass; G_DEFINE_TYPE( VipsscRGB2sRGB, vips_scRGB2sRGB, VIPS_TYPE_COLOUR_CODE ); /* Process a buffer of data. */ static void vips_scRGB2sRGB_line_8( VipsPel * restrict q, float * restrict p, int width ) { int i; for( i = 0; i < width; i++ ) { float R = p[0]; float G = p[1]; float B = p[2]; int r, g, b; int or; vips_col_scRGB2sRGB_8( R, G, B, &r, &g, &b, &or ); p += 3; q[0] = r; q[1] = g; q[2] = b; q += 3; } } static void vips_scRGB2sRGB_line_16( unsigned short * restrict q, float * restrict p, int width ) { int i; for( i = 0; i < width; i++ ) { float R = p[0]; float G = p[1]; float B = p[2]; int r, g, b; int or; vips_col_scRGB2sRGB_16( R, G, B, &r, &g, &b, &or ); p += 3; q[0] = r; q[1] = g; q[2] = b; q += 3; } } static void vips_scRGB2sRGB_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { VipsscRGB2sRGB *scRGB2sRGB = (VipsscRGB2sRGB *) colour; if( scRGB2sRGB->depth == 16 ) vips_scRGB2sRGB_line_16( (unsigned short *) out, (float *) in[0], width ); else vips_scRGB2sRGB_line_8( (VipsPel *) out, (float *) in[0], width ); } static int vips_scRGB2sRGB_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsscRGB2sRGB *scRGB2sRGB = (VipsscRGB2sRGB *) object; VipsColour *colour = VIPS_COLOUR( scRGB2sRGB ); switch( scRGB2sRGB->depth ) { case 16: colour->interpretation = VIPS_INTERPRETATION_RGB16; colour->format = VIPS_FORMAT_USHORT; break; case 8: colour->interpretation = VIPS_INTERPRETATION_sRGB; colour->format = VIPS_FORMAT_UCHAR; break; default: vips_error( class->nickname, "%s", _( "depth must be 8 or 16" ) ); return( -1 ); } if( VIPS_OBJECT_CLASS( vips_scRGB2sRGB_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_scRGB2sRGB_class_init( VipsscRGB2sRGBClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "scRGB2sRGB"; object_class->description = _( "convert an scRGB image to sRGB" ); object_class->build = vips_scRGB2sRGB_build; colour_class->process_line = vips_scRGB2sRGB_line; VIPS_ARG_INT( class, "depth", 130, _( "Depth" ), _( "Output device space depth in bits" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsscRGB2sRGB, depth ), 8, 16, 8 ); } static void vips_scRGB2sRGB_init( VipsscRGB2sRGB *scRGB2sRGB ) { VipsColour *colour = VIPS_COLOUR( scRGB2sRGB ); VipsColourCode *code = VIPS_COLOUR_CODE( scRGB2sRGB ); /* Just the default, can be overridden, see above. */ colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_sRGB; colour->format = VIPS_FORMAT_UCHAR; colour->bands = 3; code->input_coding = VIPS_CODING_NONE; code->input_bands = 3; code->input_format = VIPS_FORMAT_FLOAT; scRGB2sRGB->depth = 8; } /** * vips_scRGB2sRGB: * @in: input image * @out: output image * * Optional arguments: * * @depth: depth of output image in bits * * Convert an scRGB image to sRGB. Set @depth to 16 to get 16-bit output. * * See also: vips_LabS2LabQ(), vips_scRGB2sRGB(), vips_rad2float(). * * Returns: 0 on success, -1 on error. */ int vips_scRGB2sRGB( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "scRGB2sRGB", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/XYZ2scRGB.c0000644000175000017500000000572412303140253014275 00000000000000/* Turn XYZ to scRGB colourspace. * * 11/12/12 * - from Yxy2XYZ.c * 1/7/13 * - remove any ICC profile */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourSpace VipsXYZ2scRGB; typedef VipsColourSpaceClass VipsXYZ2scRGBClass; G_DEFINE_TYPE( VipsXYZ2scRGB, vips_XYZ2scRGB, VIPS_TYPE_COLOUR_SPACE ); static int vips_XYZ2scRGB_build( VipsObject *object ) { if( VIPS_OBJECT_CLASS( vips_XYZ2scRGB_parent_class )->build( object ) ) return( -1 ); /* We've converted to sRGB without a profile. We must remove any ICC * profile left over from import or there will be a mismatch between * pixel values and the attached profile. */ vips_image_remove( VIPS_COLOUR( object )->out, VIPS_META_ICC_NAME ); return( 0 ); } void vips_XYZ2scRGB_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p = (float *) in[0]; float * restrict q = (float *) out; int i; for( i = 0; i < width; i++ ) { float X = p[0]; float Y = p[1]; float Z = p[2]; float R, G, B; p += 3; vips_col_XYZ2scRGB( X, Y, Z, &R, &G, &B ); q[0] = R; q[1] = G; q[2] = B; q += 3; } } static void vips_XYZ2scRGB_class_init( VipsXYZ2scRGBClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "XYZ2scRGB"; object_class->description = _( "transform XYZ to scRGB" ); object_class->build = vips_XYZ2scRGB_build; colour_class->process_line = vips_XYZ2scRGB_line; } static void vips_XYZ2scRGB_init( VipsXYZ2scRGB *XYZ2scRGB ) { VipsColour *colour = VIPS_COLOUR( XYZ2scRGB ); colour->interpretation = VIPS_INTERPRETATION_scRGB; } /** * vips_XYZ2scRGB: * @in: input image * @out: output image * * Turn XYZ to Yxy. * * Returns: 0 on success, -1 on error */ int vips_XYZ2scRGB( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "XYZ2scRGB", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/Lab2XYZ.c0000644000175000017500000001246612303140253014034 00000000000000/* Lab to XYZ. * * Modified: * 15/11/94 JC * - ANSIfied * - sets Type of output * - better error messages * 16/11/94 JC * - partialed * - in-line conversion * 8/2/95 JC * - new im_wrapone function * 2/11/09 * - gtkdoc * - cleanups * 18/9/12 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pcolour.h" typedef struct _VipsLab2XYZ { VipsColourSpace parent_instance; /* The colour temperature -- default to D65. */ VipsArea *temp; /* Broken out as xyz. */ double X0; double Y0; double Z0; } VipsLab2XYZ; typedef VipsColourSpaceClass VipsLab2XYZClass; G_DEFINE_TYPE( VipsLab2XYZ, vips_Lab2XYZ, VIPS_TYPE_COLOUR_SPACE ); /* Process a buffer of data. */ static void vips_Lab2XYZ_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { VipsLab2XYZ *Lab2XYZ = (VipsLab2XYZ *) colour; float * restrict p = (float *) in[0]; float * restrict q = (float *) out; int x; VIPS_DEBUG_MSG( "vips_Lab2XYZ_line: X0 = %g, Y0 = %g, Z0 = %g\n", Lab2XYZ->X0, Lab2XYZ->Y0, Lab2XYZ->Z0 ); for( x = 0; x < width; x++ ) { float L, a, b; float X, Y, Z; double cby, tmp; L = p[0]; a = p[1]; b = p[2]; p += 3; if( L < 8.0 ) { Y = (L * Lab2XYZ->Y0) / 903.3; cby = 7.787 * (Y / Lab2XYZ->Y0) + 16.0 / 116.0; } else { cby = (L + 16.0) / 116.0; Y = Lab2XYZ->Y0 * cby * cby * cby; } tmp = a / 500.0 + cby; if( tmp < 0.2069 ) X = Lab2XYZ->X0 * (tmp - 0.13793) / 7.787; else X = Lab2XYZ->X0 * tmp * tmp * tmp; tmp = cby - b / 200.0; if( tmp < 0.2069 ) Z = Lab2XYZ->Z0 * (tmp - 0.13793) / 7.787; else Z = Lab2XYZ->Z0 * tmp * tmp * tmp; /* Write. */ q[0] = X; q[1] = Y; q[2] = Z; q += 3; } } static int vips_Lab2XYZ_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsLab2XYZ *Lab2XYZ = (VipsLab2XYZ *) object; if( Lab2XYZ->temp ) { if( vips_check_vector_length( class->nickname, Lab2XYZ->temp->n, 3 ) ) return( -1 ); Lab2XYZ->X0 = ((double *) Lab2XYZ->temp->data)[0]; Lab2XYZ->Y0 = ((double *) Lab2XYZ->temp->data)[1]; Lab2XYZ->Z0 = ((double *) Lab2XYZ->temp->data)[2]; } if( VIPS_OBJECT_CLASS( vips_Lab2XYZ_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_Lab2XYZ_class_init( VipsLab2XYZClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "Lab2XYZ"; object_class->description = _( "transform CIELAB to XYZ" ); object_class->build = vips_Lab2XYZ_build; colour_class->process_line = vips_Lab2XYZ_line; VIPS_ARG_BOXED( class, "temp", 110, _( "Temperature" ), _( "Colour temperature" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsLab2XYZ, temp ), VIPS_TYPE_ARRAY_DOUBLE ); } static void vips_Lab2XYZ_init( VipsLab2XYZ *Lab2XYZ ) { VipsColour *colour = VIPS_COLOUR( Lab2XYZ ); Lab2XYZ->X0 = VIPS_D65_X0; Lab2XYZ->Y0 = VIPS_D65_Y0; Lab2XYZ->Z0 = VIPS_D65_Z0; colour->interpretation = VIPS_INTERPRETATION_XYZ; } /** * vips_Lab2XYZ: * @in: input image * @out: output image * * optional arguments: * * @temp: colour temperature * * Turn Lab to XYZ. The colour temperature defaults to D65, but can be * specified with @temp. * * Returns: 0 on success, -1 on error */ int vips_Lab2XYZ( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "Lab2XYZ", ap, in, out ); va_end( ap ); return( result ); } /** * vips_col_Lab2XYZ: * @L: Input CIE Lab value * @a: Input CIE Lab value * @b: Input CIE Lab value * @X: Return CIE XYZ colour * @Y: Return CIE XYZ colour * @Z: Return CIE XYZ colour * * Calculate XYZ from Lab, D65. * * See also: vips_Lab2XYZ(). */ void vips_col_Lab2XYZ( float L, float a, float b, float *X, float *Y, float *Z ) { float in[3]; float *x; float out[3]; VipsLab2XYZ Lab2XYZ; in[0] = L; in[1] = a; in[2] = b; x = in; Lab2XYZ.X0 = VIPS_D65_X0; Lab2XYZ.Y0 = VIPS_D65_Y0; Lab2XYZ.Z0 = VIPS_D65_Z0; vips_Lab2XYZ_line( (VipsColour *) &Lab2XYZ, (VipsPel *) out, (VipsPel **) &x, 1 ); *X = out[0]; *Y = out[1]; *Z = out[2]; } vips-7.38.5/libvips/colour/LCh2Lab.c0000644000175000017500000000602012303140253013775 00000000000000/* im_LCh2Lab * * 15/11/94 JC * - error messages added * - memory leak fixed * 16/11/94 JC * - uses im_wrap_oneonebuf() now * 8/2/95 JC * - im_wrap v2 * 2/11/09 * - gtkdoc * 19/9/12 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourSpace VipsLCh2Lab; typedef VipsColourSpaceClass VipsLCh2LabClass; G_DEFINE_TYPE( VipsLCh2Lab, vips_LCh2Lab, VIPS_TYPE_COLOUR_SPACE ); /* Process a buffer of data. */ static void vips_LCh2Lab_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p = (float *) in[0]; float * restrict q = (float *) out; int x; for( x = 0; x < width; x++ ) { float L = p[0]; float C = p[1]; float h = p[2]; float a, b; p += 3; a = C * cos( VIPS_RAD( h ) ); b = C * sin( VIPS_RAD( h ) ); q[0] = L; q[1] = a; q[2] = b; q += 3; } } /** * vips_col_Ch2ab: * @C: Chroma * @h: Hue angle (degrees) * @a: return CIE a* value * @b: return CIE b* value * * Calculate ab from Ch, h in degrees. */ void vips_col_Ch2ab( float C, float h, float *a, float *b ) { float in[3]; float out[3]; float *x; in[1] = C; in[2] = h; x = &in[0]; vips_LCh2Lab_line( NULL, (VipsPel *) out, (VipsPel **) &x, 1 ); *a = out[1]; *b = out[2]; } static void vips_LCh2Lab_class_init( VipsLCh2LabClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "LCh2Lab"; object_class->description = _( "transform LCh to Lab" ); colour_class->process_line = vips_LCh2Lab_line; } static void vips_LCh2Lab_init( VipsLCh2Lab *LCh2Lab ) { VipsColour *colour = VIPS_COLOUR( LCh2Lab ); colour->interpretation = VIPS_INTERPRETATION_LAB; } /** * vips_LCh2Lab: * @in: input image * @out: output image * * Turn LCh to Lab. * * Returns: 0 on success, -1 on error */ int vips_LCh2Lab( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "LCh2Lab", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/LCh2UCS.c0000644000175000017500000000724712303140253013745 00000000000000/* im_LCh2CMC * * Modified: * 2/11/09 * - gtkdoc * 19/9/12 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourSpace VipsLCh2CMC; typedef VipsColourSpaceClass VipsLCh2CMCClass; G_DEFINE_TYPE( VipsLCh2CMC, vips_LCh2CMC, VIPS_TYPE_COLOUR_SPACE ); /** * vips_col_L2Lcmc: * @L: CIE L* * * Calculate Lcmc from L. * * Returns: Lcmc */ float vips_col_L2Lcmc( float L ) { float Lcmc; if( L >= 16.0 ) Lcmc = (21.75 * log( L ) + 0.3838 * L - 38.54); else Lcmc = 1.744 * L; return( Lcmc ); } /** * vips_col_C2Ccmc: * @C: Chroma * * Calculate Ccmc from C. * * Returns: Ccmc. */ float vips_col_C2Ccmc( float C ) { float Ccmc; Ccmc = 0.162 * C + 10.92 * log( 0.638 + 0.07216 * C ) + 4.907; if( Ccmc < 0 ) Ccmc = 0; return( Ccmc ); } /** * vips_col_Ch2hcmc: * @C: Chroma * @h: Hue (degrees) * * Calculate hcmc from C and h. * * Returns: hcmc. */ float vips_col_Ch2hcmc( float C, float h ) { float P, D, f, g; float k4, k5, k6, k7, k8; float hcmc; if( h < 49.1 ) { k4 = 133.87; k5 = -134.5; k6 = -.924; k7 = 1.727; k8 = 340.0; } else if( h < 110.1 ) { k4 = 11.78; k5 = -12.7; k6 = -.218; k7 = 2.12; k8 = 333.0; } else if( h < 269.6 ) { k4 = 13.87; k5 = 10.93; k6 = 0.14; k7 = 1.0; k8 = -83.0; } else { k4 = .14; k5 = 5.23; k6 = .17; k7 = 1.61; k8 = 233.0; } P = cos( VIPS_RAD( k8 + k7 * h ) ); D = k4 + k5 * P * pow( fabs( P ), k6 ); g = C * C * C * C; f = sqrt( g / (g + 1900.0) ); hcmc = h + D * f; return( hcmc ); } static void vips_LCh2CMC_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float *p = (float *) in[0]; float *q = (float *) out; int x; for( x = 0; x < width; x++ ) { float L = p[0]; float C = p[1]; float h = p[2]; p += 3; q[0] = vips_col_L2Lcmc( L ); q[1] = vips_col_C2Ccmc( C ); q[2] = vips_col_Ch2hcmc( C, h ); q += 3; } } static void vips_LCh2CMC_class_init( VipsLCh2CMCClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "LCh2CMC"; object_class->description = _( "transform LCh to CMC" ); colour_class->process_line = vips_LCh2CMC_line; } static void vips_LCh2CMC_init( VipsLCh2CMC *LCh2CMC ) { VipsColour *colour = VIPS_COLOUR( LCh2CMC ); colour->interpretation = VIPS_INTERPRETATION_CMC; } /** * vips_LCh2CMC: * @in: input image * @out: output image * * Turn LCh to CMC. * * Returns: 0 on success, -1 on error */ int vips_LCh2CMC( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "LCh2CMC", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/dE00.c0000644000175000017500000001423312303140253013323 00000000000000/* dE00.c * * Modified: * 31/10/12 * - from dE76.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef struct _VipsdE00 { VipsColourDifference parent_instance; } VipsdE00; typedef VipsColourSpaceClass VipsdE00Class; G_DEFINE_TYPE( VipsdE00, vips_dE00, VIPS_TYPE_COLOUR_DIFFERENCE ); /** * vips_col_dE00: * @L1: Input coordinate 1 * @a1: Input coordinate 1 * @b1: Input coordinate 1 * @L2: Input coordinate 2 * @a2: Input coordinate 2 * @b2: Input coordinate 2 * * CIEDE2000, from: * * Luo, Cui, Rigg, "The Development of the CIE 2000 Colour-Difference * Formula: CIEDE2000", COLOR research and application, pp 340 * * Returns: CIE dE2000 colour difference. */ float vips_col_dE00( float L1, float a1, float b1, float L2, float a2, float b2 ) { /* Code if you want XYZ params and the colour temp used in the reference float vips_col_dE00( float X1, float Y1, float Z1, float X2, float Y2, float Z2 ) { const double X0 = 94.811; const double Y0 = 100.0; const double Z0 = 107.304; #define f(I) ((I) > 0.008856 ? \ cbrt( (I), 1.0 / 3.0 ) : 7.7871 * (I) + (16.0 / 116.0)) double nX1 = f( X1 / X0 ); double nY1 = f( Y1 / Y0 ); double nZ1 = f( Z1 / Z0 ); double L1 = 116 * nY1 - 16; double a1 = 500 * (nX1 - nY1); double b1 = 200 * (nY1 - nZ1); double nX2 = f( X2 / X0 ); double nY2 = f( Y2 / Y0 ); double nZ2 = f( Z2 / Z0 ); double L2 = 116 * nY2 - 16; double a2 = 500 * (nX2 - nY2); double b2 = 200 * (nY2 - nZ2); */ /* Chroma and mean chroma (C bar) */ double C1 = sqrt( a1 * a1 + b1 * b1 ); double C2 = sqrt( a2 * a2 + b2 * b2 ); double Cb = (C1 + C2) / 2; /* G */ double Cb7 = Cb * Cb * Cb * Cb * Cb * Cb * Cb; double G = 0.5 * (1 - sqrt( Cb7 / (Cb7 + pow( 25, 7 )) )); /* L', a', b', C', h' */ double L1d = L1; double a1d = (1 + G) * a1; double b1d = b1; double C1d = sqrt( a1d * a1d + b1d * b1d ); double h1d = vips_col_ab2h( a1d, b1d ); double L2d = L2; double a2d = (1 + G) * a2; double b2d = b2; double C2d = sqrt( a2d * a2d + b2d * b2d ); double h2d = vips_col_ab2h( a2d, b2d ); /* L' bar, C' bar, h' bar */ double Ldb = (L1d + L2d) / 2; double Cdb = (C1d + C2d) / 2; double hdb = fabs( h1d - h2d ) < 180 ? (h1d + h2d) / 2 : fabs( h1d + h2d - 360 ) / 2; /* dtheta, RC */ double hdbd = (hdb - 275) / 25; double dtheta = 30 * exp( -(hdbd * hdbd) ); double Cdb7 = Cdb * Cdb * Cdb * Cdb * Cdb * Cdb * Cdb; double RC = 2 * sqrt( Cdb7 / (Cdb7 + pow( 25, 7 )) ); /* RT, T. */ double RT = -sin( IM_RAD( 2 * dtheta ) ) * RC; double T = 1 - 0.17 * cos( IM_RAD( hdb - 30 ) ) + 0.24 * cos( IM_RAD( 2 * hdb ) ) + 0.32 * cos( IM_RAD( 3 * hdb + 6 ) ) - 0.20 * cos( IM_RAD( 4 * hdb - 63 ) ); /* SL, SC, SH */ double Ldb50 = Ldb - 50; double SL = 1 + (0.015 * Ldb50 * Ldb50) / sqrt( 20 + Ldb50 * Ldb50); double SC = 1 + 0.045 * Cdb; double SH = 1 + 0.015 * Cdb * T; /* hue difference ... careful! */ double dhd = fabs( h1d - h2d ) < 180 ? h1d - h2d : 360 - (h1d - h2d); /* dLd, dCd dHd */ double dLd = L1d - L2d; double dCd = C1d - C2d; double dHd = 2 * sqrt( C1d * C2d ) * sin( IM_RAD( dhd / 2 ) ); /* Parametric factors for viewing parameters. */ const double kL = 1.0; const double kC = 1.0; const double kH = 1.0; /* Normalised terms. */ double nL = dLd / (kL * SL); double nC = dCd / (kC * SC); double nH = dHd / (kH * SH); /* dE00!! */ double dE00 = sqrt( nL * nL + nC * nC + nH * nH + RT * nC * nH ); /* printf( "X1 = %g, Y1 = %g, Z1 = %g\n", X1, Y1, Z1 ); printf( "X2 = %g, Y2 = %g, Z2 = %g\n", X2, Y2, Z2 ); printf( "L1 = %g, a1 = %g, b1 = %g\n", L1, a1, b1 ); printf( "L2 = %g, a2 = %g, b2 = %g\n", L2, a2, b2 ); printf( "L1d = %g, a1d = %g, b1d = %g, C1d = %g, h1d = %g\n", L1d, a1d, b1d, C1d, h1d ); printf( "L2d = %g, a2d = %g, b2d = %g, C2d = %g, h2d = %g\n", L2d, a2d, b2d, C2d, h2d ); printf( "G = %g, T = %g, SL = %g, SC = %g, SH = %g, RT = %g\n", G, T, SL, SC, SH, RT ); printf( "dE00 = %g\n", dE00 ); */ return( dE00 ); } /* Find the difference between two buffers of LAB data. */ void vips_dE00_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float *p1 = (float *) in[0]; float *p2 = (float *) in[1]; float *q = (float *) out; int x; for( x = 0; x < width; x++ ) { q[x] = vips_col_dE00( p1[0], p1[1], p1[2], p2[0], p2[1], p2[2] ); p1 += 3; p2 += 3; } } static void vips_dE00_class_init( VipsdE00Class *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "dE00"; object_class->description = _( "calculate dE00" ); colour_class->process_line = vips_dE00_line; } static void vips_dE00_init( VipsdE00 *dE00 ) { VipsColourDifference *difference = VIPS_COLOUR_DIFFERENCE( dE00 ); difference->interpretation = VIPS_INTERPRETATION_LAB; } /** * vips_dE00: * @left: first input image * @right: second input image * @out: output image * * Calculate dE 00. * * Returns: 0 on success, -1 on error */ int vips_dE00( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "dE00", ap, left, right, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/scRGB2XYZ.c0000644000175000017500000000505212303140253014267 00000000000000/* Turn scRGB to XYZ colourspace. * * Modified: * 29/5/02 JC * - from lab2xyz * 2/11/09 * - gtkdoc * - cleanups * 20/9/12 * redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourSpace VipsscRGB2XYZ; typedef VipsColourSpaceClass VipsscRGB2XYZClass; G_DEFINE_TYPE( VipsscRGB2XYZ, vips_scRGB2XYZ, VIPS_TYPE_COLOUR_SPACE ); void vips_scRGB2XYZ_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p = (float *) in[0]; float * restrict q = (float *) out; int i; for( i = 0; i < width; i++ ) { float R = p[0]; float G = p[1]; float B = p[2]; float X, Y, Z; p += 3; vips_col_scRGB2XYZ( R, G, B, &X, &Y, &Z ); q[0] = X; q[1] = Y; q[2] = Z; q += 3; } } static void vips_scRGB2XYZ_class_init( VipsscRGB2XYZClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "scRGB2XYZ"; object_class->description = _( "transform scRGB to XYZ" ); colour_class->process_line = vips_scRGB2XYZ_line; } static void vips_scRGB2XYZ_init( VipsscRGB2XYZ *scRGB2XYZ ) { VipsColour *colour = VIPS_COLOUR( scRGB2XYZ ); colour->interpretation = VIPS_INTERPRETATION_XYZ; } /** * vips_scRGB2XYZ: * @in: input image * @out: output image * * Turn XYZ to scRGB. * * Returns: 0 on success, -1 on error */ int vips_scRGB2XYZ( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "scRGB2XYZ", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/icc_transform.c0000644000175000017500000007230512303140253015470 00000000000000/* Transform images with little cms *default: * * 26/4/02 JC * 26/8/05 * - attach profiles and intents to output images * - added im_icc_import_embedded() to import with an embedded profile * 12/5/06 * - lock around cmsDoTransform * 23/1/07 * - set RGB16 on 16-bit RGB export * 6/4/09 * - catch lcms error messages * 2/11/09 * - gtkdoc * - small cleanups * - call attach_profile() before im_wrapone() so the profile will get * written if we are wrinting to a file * 2/8/10 * - add lcms2 * 12/7/11 * - import and export cast @in to an appropriate format for you * 25/9/12 * - redo as a class * 14/5/13 * - import and export would segv on very wide images * 12/11/13 * - support XYZ as an alternative PCS */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #if defined( HAVE_LCMS ) || defined( HAVE_LCMS2 ) #include #include #include /* Has to be before VIPS to avoid nameclashes. */ #ifdef HAVE_LCMS2 #include #else /*HAVE_LCMS*/ #include /* Use the lcms2 names. */ #define cmsSigRgbData icSigRgbData #define cmsSigLabData icSigLabData #define cmsSigCmykData icSigCmykData #define cmsSigXYZData icSigXYZData #endif #include #include "pcolour.h" /* Call lcms with up to this many pixels at once. */ #define PIXEL_BUFFER_SIZE (10000) /* LCMS1 was missing some stuff. */ #ifdef HAVE_LCMS typedef DWORD cmsUInt32Number; /* This doesn't exist in lcms1, just set it to zero. */ #define cmsFLAGS_NOCACHE (0) #endif /** * VipsIntent: * @VIPS_INTENT_PERCEPTUAL: perceptual rendering intent * @VIPS_INTENT_RELATIVE: relative colorimetric rendering intent * @VIPS_INTENT_SATURATION: saturation rendering intent * @VIPS_INTENT_ABSOLUTE: absolute colorimetric rendering intent * * The rendering intent. #VIPS_INTENT_ABSOLUTE is best for * scientific work, #VIPS_INTENT_RELATIVE is usually best for * accurate communication with other imaging libraries. */ /** * VipsPCS: * @VIPS_PCS_LAB: use CIELAB D65 as the Profile Connection Space * @VIPS_PCS_XYZ: use XYZ as the Profile Connection Space * * Pick a Profile Connection Space for vips_icc_import() and * vips_icc_export(). LAB is usually best, XYZ can be more convenient in some * cases. */ /** * vips_icc_present: * * VIPS can optionally be built without the ICC library. Use this function to * test for its availability. * * Returns: non-zero if the ICC library is present. */ int vips_icc_present( void ) { return( 1 ); } #define VIPS_TYPE_ICC (vips_icc_get_type()) #define VIPS_ICC( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_ICC, VipsIcc )) #define VIPS_ICC_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_ICC, VipsIccClass)) #define VIPS_IS_ICC( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_ICC )) #define VIPS_IS_ICC_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_ICC )) #define VIPS_ICC_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_ICC, VipsIccClass )) typedef struct _VipsIcc { VipsColourCode parent_instance; VipsIntent intent; VipsPCS pcs; int depth; cmsHPROFILE in_profile; cmsHPROFILE out_profile; cmsUInt32Number in_icc_format; cmsUInt32Number out_icc_format; cmsHTRANSFORM trans; /* We need to single-thread calls to LCMS 1. */ GMutex *lock; } VipsIcc; typedef VipsColourCodeClass VipsIccClass; G_DEFINE_ABSTRACT_TYPE( VipsIcc, vips_icc, VIPS_TYPE_COLOUR_CODE ); /* Error from lcms. */ #ifdef HAVE_LCMS2 static void icc_error( cmsContext context, cmsUInt32Number code, const char *text ) { vips_error( "VipsIcc", "%s", text ); } #else static int icc_error( int code, const char *text ) { if( code == LCMS_ERRC_WARNING ) vips_warn( "VipsIcc", "%s", text ); else vips_error( "VipsIcc", "%s", text ); return( 0 ); } #endif static void vips_icc_dispose( GObject *gobject ) { VipsIcc *icc = (VipsIcc *) gobject; VIPS_FREEF( cmsDeleteTransform, icc->trans ); VIPS_FREEF( cmsCloseProfile, icc->in_profile ); VIPS_FREEF( cmsCloseProfile, icc->out_profile ); VIPS_FREEF( vips_g_mutex_free, icc->lock ); G_OBJECT_CLASS( vips_icc_parent_class )->dispose( gobject ); } /* Is a profile just a pcs stub. */ static gboolean is_pcs( cmsHPROFILE profile ) { return( cmsGetColorSpace( profile ) == cmsSigLabData || cmsGetColorSpace( profile ) == cmsSigXYZData ); } static int vips_icc_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsColour *colour = (VipsColour *) object; VipsColourCode *code = (VipsColourCode *) object; VipsIcc *icc = (VipsIcc *) object; if( icc->depth != 8 && icc->depth != 16 ) { vips_error( class->nickname, "%s", _( "depth must be 8 or 16" ) ); return( -1 ); } if( icc->in_profile && code->in ) { switch( cmsGetColorSpace( icc->in_profile ) ) { case cmsSigRgbData: code->input_bands = 3; code->input_format = code->in->BandFmt == VIPS_FORMAT_USHORT ? VIPS_FORMAT_USHORT : VIPS_FORMAT_UCHAR; icc->in_icc_format = code->in->BandFmt == VIPS_FORMAT_USHORT ? TYPE_RGB_16 : TYPE_RGB_8; break; case cmsSigCmykData: code->input_bands = 4; code->input_format = code->in->BandFmt == VIPS_FORMAT_USHORT ? VIPS_FORMAT_USHORT : VIPS_FORMAT_UCHAR; icc->in_icc_format = code->in->BandFmt == VIPS_FORMAT_USHORT ? TYPE_CMYK_16 : TYPE_CMYK_8; break; case cmsSigLabData: code->input_bands = 3; code->input_format = VIPS_FORMAT_FLOAT; code->input_interpretation = VIPS_INTERPRETATION_LAB; icc->in_icc_format = TYPE_Lab_16; break; case cmsSigXYZData: code->input_bands = 3; code->input_format = VIPS_FORMAT_FLOAT; code->input_interpretation = VIPS_INTERPRETATION_XYZ; icc->in_icc_format = TYPE_XYZ_16; break; default: vips_error( class->nickname, _( "unimplemented input color space 0x%x" ), cmsGetColorSpace( icc->in_profile ) ); return( -1 ); } } if( icc->out_profile ) switch( cmsGetColorSpace( icc->out_profile ) ) { case cmsSigRgbData: colour->interpretation = icc->depth == 8 ? VIPS_INTERPRETATION_RGB : VIPS_INTERPRETATION_RGB16; colour->format = icc->depth == 8 ? VIPS_FORMAT_UCHAR : VIPS_FORMAT_USHORT; colour->bands = 3; icc->out_icc_format = icc->depth == 16 ? TYPE_RGB_16 : TYPE_RGB_8; break; case cmsSigCmykData: colour->interpretation = VIPS_INTERPRETATION_CMYK; colour->format = icc->depth == 8 ? VIPS_FORMAT_UCHAR : VIPS_FORMAT_USHORT; colour->bands = 4; icc->out_icc_format = icc->depth == 16 ? TYPE_CMYK_16 : TYPE_CMYK_8; break; case cmsSigLabData: colour->interpretation = VIPS_INTERPRETATION_LAB; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 3; icc->out_icc_format = TYPE_Lab_16; break; case cmsSigXYZData: colour->interpretation = VIPS_INTERPRETATION_XYZ; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 3; icc->out_icc_format = TYPE_XYZ_16; break; default: vips_error( class->nickname, _( "unimplemented output color space 0x%x" ), cmsGetColorSpace( icc->out_profile ) ); return( -1 ); } /* At least one must be a device profile. */ if( icc->in_profile && icc->out_profile && is_pcs( icc->in_profile ) && is_pcs( icc->out_profile ) ) { vips_error( class->nickname, "%s", _( "no device profile" ) ); return( -1 ); } /* Use cmsFLAGS_NOCACHE to disable the 1-pixel cache and make * calling cmsDoTransform() from multiple threads safe. */ if( !(icc->trans = cmsCreateTransform( icc->in_profile, icc->in_icc_format, icc->out_profile, icc->out_icc_format, icc->intent, cmsFLAGS_NOCACHE )) ) return( -1 ); if( VIPS_OBJECT_CLASS( vips_icc_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } static void vips_icc_class_init( VipsIccClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->dispose = vips_icc_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "icc"; object_class->description = _( "transform using ICC profiles" ); object_class->build = vips_icc_build; VIPS_ARG_ENUM( class, "intent", 6, _( "Intent" ), _( "Rendering intent" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIcc, intent ), VIPS_TYPE_INTENT, VIPS_INTENT_RELATIVE ); VIPS_ARG_ENUM( class, "pcs", 6, _( "PCS" ), _( "Set Profile Connection Space" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIcc, pcs ), VIPS_TYPE_PCS, VIPS_PCS_LAB ); #ifdef HAVE_LCMS2 cmsSetLogErrorHandler( icc_error ); #else /* Ask lcms not to abort on error. */ cmsErrorAction( LCMS_ERROR_IGNORE ); cmsSetErrorHandler( icc_error ); #endif } static void vips_icc_init( VipsIcc *icc ) { icc->lock = vips_g_mutex_new(); icc->intent = VIPS_INTENT_RELATIVE; icc->pcs = VIPS_PCS_LAB; icc->depth = 8; } typedef struct _VipsIccImport { VipsIcc parent_instance; gboolean embedded; char *input_profile_filename; } VipsIccImport; typedef VipsIccClass VipsIccImportClass; G_DEFINE_TYPE( VipsIccImport, vips_icc_import, VIPS_TYPE_ICC ); static void vips_check_intent( const char *domain, cmsHPROFILE profile, VipsIntent intent, int direction ) { if( profile && !cmsIsIntentSupported( profile, intent, direction ) ) vips_warn( domain, _( "intent %d (%s) not supported by " "%s profile; falling back to default intent" ), intent, vips_enum_nick( VIPS_TYPE_INTENT, intent ), direction == LCMS_USED_AS_INPUT ? _( "input" ) : _( "output" ) ); } static int vips_icc_import_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsColourCode *code = (VipsColourCode *) object; VipsIcc *icc = (VipsIcc *) object; VipsIccImport *import = (VipsIccImport *) object; /* We read the input profile like this: * * embedded filename action * 0 0 image * 1 0 image * 0 1 file * 1 1 image, then fall back to file * * see also import_build. */ if( code->in && (import->embedded || !import->input_profile_filename) && vips_image_get_typeof( code->in, VIPS_META_ICC_NAME ) ) { void *data; size_t data_length; if( vips_image_get_blob( code->in, VIPS_META_ICC_NAME, &data, &data_length ) || !(icc->in_profile = cmsOpenProfileFromMem( data, data_length )) ) { vips_error( class->nickname, "%s", _( "unable to load embedded profile" ) ); return( -1 ); } } else if( import->input_profile_filename ) { if( !(icc->in_profile = cmsOpenProfileFromFile( import->input_profile_filename, "r" )) ) { vips_error( class->nickname, _( "unable to open profile \"%s\"" ), import->input_profile_filename ); return( -1 ); } } else { vips_error( class->nickname, "%s", _( "no input profile" ) ); return( -1 ); } vips_check_intent( class->nickname, icc->in_profile, icc->intent, LCMS_USED_AS_INPUT ); if( icc->pcs == VIPS_PCS_LAB ) { #ifdef HAVE_LCMS2 cmsCIExyY white; cmsWhitePointFromTemp( &white, 6500 ); icc->out_profile = cmsCreateLab4Profile( &white ); #else icc->out_profile = cmsCreateLabProfile( NULL ); #endif } else icc->out_profile = cmsCreateXYZProfile(); if( VIPS_OBJECT_CLASS( vips_icc_import_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void decode_lab( guint16 *fixed, float *lab, int n ) { int i; for( i = 0; i < n; i++ ) { lab[0] = (double) fixed[0] / 652.800; lab[1] = ((double) fixed[1] / 256.0) - 128.0; lab[2] = ((double) fixed[2] / 256.0) - 128.0; lab += 3; fixed += 3; } } #define X_FAC (VIPS_D50_X0 * 32768 / (VIPS_D65_X0 * 100)) #define Y_FAC (VIPS_D50_Y0 * 32768 / (VIPS_D65_Y0 * 100)) #define Z_FAC (VIPS_D50_Z0 * 32768 / (VIPS_D65_Z0 * 100)) static void decode_xyz( guint16 *fixed, float *xyz, int n ) { int i; for( i = 0; i < n; i++ ) { xyz[0] = (double) fixed[0] / X_FAC; xyz[1] = (double) fixed[1] / Y_FAC; xyz[2] = (double) fixed[2] / Z_FAC; xyz += 3; fixed += 3; } } /* Process a buffer of data. */ static void vips_icc_import_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { VipsIcc *icc = (VipsIcc *) colour; VipsPel *p; float *q; int i; /* Buffer of encoded 16-bit pixels we transform. */ guint16 encoded[3 * PIXEL_BUFFER_SIZE]; p = (VipsPel *) in[0]; q = (float *) out; for( i = 0; i < width; i += PIXEL_BUFFER_SIZE ) { const int chunk = VIPS_MIN( width - i, PIXEL_BUFFER_SIZE ); #ifdef HAVE_LCMS2 cmsDoTransform( icc->trans, p, encoded, chunk ); #else g_mutex_lock( icc->lock ); cmsDoTransform( icc->trans, p, encoded, chunk ); g_mutex_unlock( icc->lock ); #endif if( icc->pcs == VIPS_PCS_LAB ) decode_lab( encoded, q, chunk ); else decode_xyz( encoded, q, chunk ); p += PIXEL_BUFFER_SIZE * VIPS_IMAGE_SIZEOF_PEL( colour->in[0] ); q += PIXEL_BUFFER_SIZE * 3; } } static void vips_icc_import_class_init( VipsIccImportClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "icc_import"; object_class->description = _( "import from device with ICC profile" ); object_class->build = vips_icc_import_build; colour_class->process_line = vips_icc_import_line; VIPS_ARG_BOOL( class, "embedded", 110, _( "Embedded" ), _( "Use embedded input profile, if available" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIccImport, embedded ), FALSE ); VIPS_ARG_STRING( class, "input_profile", 120, _( "Input profile" ), _( "Filename to load input profile from" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIccImport, input_profile_filename ), NULL ); } static void vips_icc_import_init( VipsIccImport *import ) { } typedef struct _VipsIccExport { VipsIcc parent_instance; char *output_profile_filename; } VipsIccExport; typedef VipsIccClass VipsIccExportClass; G_DEFINE_TYPE( VipsIccExport, vips_icc_export, VIPS_TYPE_ICC ); static int vips_icc_export_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsColour *colour = (VipsColour *) object; VipsColourCode *code = (VipsColourCode *) object; VipsIcc *icc = (VipsIcc *) object; VipsIccExport *export = (VipsIccExport *) object; /* If icc->pcs hasn't been set and this image is tagged as XYZ, swap * to XYZ pcs. This will save a XYZ->LAB conversion when we chain up. */ if( !vips_object_argument_isset( object, "pcs" ) && code->in && code->in->Type == VIPS_INTERPRETATION_XYZ ) icc->pcs = VIPS_PCS_XYZ; if( icc->pcs == VIPS_PCS_LAB ) { #ifdef HAVE_LCMS2 cmsCIExyY white; cmsWhitePointFromTemp( &white, 6500 ); icc->in_profile = cmsCreateLab4Profile( &white ); #else icc->in_profile = cmsCreateLabProfile( NULL ); #endif } else icc->in_profile = cmsCreateXYZProfile(); if( code->in && !export->output_profile_filename && vips_image_get_typeof( code->in, VIPS_META_ICC_NAME ) ) { void *data; size_t data_length; if( vips_image_get_blob( code->in, VIPS_META_ICC_NAME, &data, &data_length ) || !(icc->out_profile = cmsOpenProfileFromMem( data, data_length )) ) { vips_error( class->nickname, "%s", _( "unable to load embedded profile" ) ); return( -1 ); } } else if( export->output_profile_filename ) { if( !(icc->out_profile = cmsOpenProfileFromFile( export->output_profile_filename, "r" )) ) { vips_error( class->nickname, _( "unable to open profile \"%s\"" ), export->output_profile_filename ); return( -1 ); } colour->profile_filename = export->output_profile_filename; } else { vips_error( class->nickname, "%s", _( "no output profile" ) ); return( -1 ); } vips_check_intent( class->nickname, icc->out_profile, icc->intent, LCMS_USED_AS_OUTPUT ); if( VIPS_OBJECT_CLASS( vips_icc_export_parent_class )->build( object ) ) return( -1 ); return( 0 ); } /* Pack a buffer of floats into lcms's fixed-point formats. Cut from * lcms-1.0.8. */ static void encode_lab( float *lab, guint16 *fixed, int n ) { int i; for( i = 0; i < n; i++ ) { float L = lab[0]; float a = lab[1]; float b = lab[2]; if( L < 0 ) L = 0; if( L > 100. ) L = 100.; if( a < -128. ) a = -128; if( a > 127.9961 ) a = 127.9961; if( b < -128. ) b = -128; if( b > 127.9961 ) b = 127.9961; fixed[0] = L * 652.800 + 0.5; fixed[1] = (a + 128.0) * 256.0 + 0.5; fixed[2] = (b + 128.0) * 256.0 + 0.5; lab += 3; fixed += 3; } } #define MAX_ENCODEABLE_XYZ (100 * (1.0 + 32767.0 / 32768.0)) // 1.15 fixed point for XYZ static void encode_xyz( float *xyz, guint16 *fixed, int n ) { int i; for( i = 0; i < n; i++ ) { float X = xyz[0]; float Y = xyz[1]; float Z = xyz[2]; if( X < 0 ) X = 0; if( X > MAX_ENCODEABLE_XYZ ) X = MAX_ENCODEABLE_XYZ; if( Y < 0 ) Y = 0; if( Y > MAX_ENCODEABLE_XYZ ) Y = MAX_ENCODEABLE_XYZ; if( Z < 0 ) Z = 0; if( Z > MAX_ENCODEABLE_XYZ ) Z = MAX_ENCODEABLE_XYZ; fixed[0] = X * X_FAC + 0.5; fixed[1] = Y * Y_FAC + 0.5; fixed[2] = Z * Z_FAC + 0.5; xyz += 3; fixed += 3; } } /* Process a buffer of data. */ static void vips_icc_export_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { VipsIcc *icc = (VipsIcc *) colour; float *p; VipsPel *q; int x; /* Buffer of encoded 16-bit pixels we transform. */ guint16 encoded[3 * PIXEL_BUFFER_SIZE]; p = (float *) in[0]; q = (VipsPel *) out; for( x = 0; x < width; x += PIXEL_BUFFER_SIZE ) { const int chunk = VIPS_MIN( width - x, PIXEL_BUFFER_SIZE ); if( icc->pcs == VIPS_PCS_LAB ) encode_lab( p, encoded, chunk ); else encode_xyz( p, encoded, chunk ); #ifdef HAVE_LCMS2 cmsDoTransform( icc->trans, encoded, q, chunk ); #else g_mutex_lock( icc->lock ); cmsDoTransform( icc->trans, encoded, q, chunk ); g_mutex_unlock( icc->lock ); #endif p += PIXEL_BUFFER_SIZE * 3; q += PIXEL_BUFFER_SIZE * VIPS_IMAGE_SIZEOF_PEL( colour->out ); } } static void vips_icc_export_class_init( VipsIccExportClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "icc_export"; object_class->description = _( "output to device with ICC profile" ); object_class->build = vips_icc_export_build; colour_class->process_line = vips_icc_export_line; VIPS_ARG_STRING( class, "output_profile", 110, _( "Output profile" ), _( "Filename to load output profile from" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIccExport, output_profile_filename ), NULL ); VIPS_ARG_INT( class, "depth", 130, _( "Depth" ), _( "Output device space depth in bits" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIcc, depth ), 8, 16, 8 ); } static void vips_icc_export_init( VipsIccExport *export ) { } typedef struct _VipsIccTransform { VipsIcc parent_instance; gboolean embedded; char *input_profile_filename; char *output_profile_filename; } VipsIccTransform; typedef VipsIccClass VipsIccTransformClass; G_DEFINE_TYPE( VipsIccTransform, vips_icc_transform, VIPS_TYPE_ICC ); static int vips_icc_transform_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsColour *colour = (VipsColour *) object; VipsColourCode *code = (VipsColourCode *) object; VipsIcc *icc = (VipsIcc *) object; VipsIccTransform *transform = (VipsIccTransform *) object; /* We read the input profile like this: * * embedded filename action * 0 0 image * 1 0 image * 0 1 file * 1 1 image, then fall back to file * * see also import_build. */ if( code->in && (transform->embedded || !transform->input_profile_filename) && vips_image_get_typeof( code->in, VIPS_META_ICC_NAME ) ) { void *data; size_t data_length; if( vips_image_get_blob( code->in, VIPS_META_ICC_NAME, &data, &data_length ) || !(icc->in_profile = cmsOpenProfileFromMem( data, data_length )) ) { vips_error( class->nickname, "%s", _( "unable to load embedded profile" ) ); return( -1 ); } } else if( transform->input_profile_filename ) { if( !(icc->in_profile = cmsOpenProfileFromFile( transform->input_profile_filename, "r" )) ) { vips_error( class->nickname, _( "unable to open profile \"%s\"" ), transform->input_profile_filename ); return( -1 ); } } else { vips_error( class->nickname, "%s", _( "no input profile" ) ); return( -1 ); } if( transform->output_profile_filename ) { if( !(icc->out_profile = cmsOpenProfileFromFile( transform->output_profile_filename, "r" )) ) { vips_error( class->nickname, _( "unable to open profile \"%s\"" ), transform->output_profile_filename ); return( -1 ); } colour->profile_filename = transform->output_profile_filename; } vips_check_intent( class->nickname, icc->in_profile, icc->intent, LCMS_USED_AS_INPUT ); vips_check_intent( class->nickname, icc->out_profile, icc->intent, LCMS_USED_AS_OUTPUT ); if( VIPS_OBJECT_CLASS( vips_icc_transform_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } /* Process a buffer of data. */ static void vips_icc_transform_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { VipsIcc *icc = (VipsIcc *) colour; #ifdef HAVE_LCMS2 cmsDoTransform( icc->trans, in[0], out, width ); #else g_mutex_lock( icc->lock ); cmsDoTransform( icc->trans, in[0], out, width ); g_mutex_unlock( icc->lock ); #endif } static void vips_icc_transform_class_init( VipsIccImportClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "icc_transform"; object_class->description = _( "transform between devices with ICC profiles" ); object_class->build = vips_icc_transform_build; colour_class->process_line = vips_icc_transform_line; VIPS_ARG_STRING( class, "output_profile", 110, _( "Output profile" ), _( "Filename to load output profile from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsIccTransform, output_profile_filename ), NULL ); VIPS_ARG_BOOL( class, "embedded", 120, _( "Embedded" ), _( "Use embedded input profile, if available" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIccTransform, embedded ), FALSE ); VIPS_ARG_STRING( class, "input_profile", 130, _( "Input profile" ), _( "Filename to load input profile from" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIccTransform, input_profile_filename ), NULL ); VIPS_ARG_INT( class, "depth", 140, _( "Depth" ), _( "Output device space depth in bits" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIcc, depth ), 8, 16, 8 ); } static void vips_icc_transform_init( VipsIccTransform *transform ) { } /** * vips_icc_ac2rc: * @in: input image * @out: output image * @profile_filename: use this profile * * Transform an image from absolute to relative colorimetry using the * MediaWhitePoint stored in the ICC profile. * * See also: vips_icc_transform(), vips_icc_import(). * * Returns: 0 on success, -1 on error. */ int vips_icc_ac2rc( VipsImage *in, VipsImage **out, const char *profile_filename ) { VipsImage *t; cmsHPROFILE profile; double X, Y, Z; double *add; double *mul; int i; if( !(profile = cmsOpenProfileFromFile( profile_filename, "r" )) ) return( -1 ); #ifdef HAVE_LCMS2 { cmsCIEXYZ *media; if( !(media = cmsReadTag( profile, cmsSigMediaWhitePointTag )) ) { vips_error( "vips_icc_ac2rc", "%s", _( "unable to get media white point" ) ); return( -1 ); } X = media->X; Y = media->Y; Z = media->Z; } #else /*HAVE_LCMS*/ { cmsCIEXYZ media; if( !cmsTakeMediaWhitePoint( &media, profile ) ) { vips_error( "vips_icc_ac2rc", "%s", _( "unable to get media white point" ) ); return( -1 ); } X = media.X; Y = media.Y; Z = media.Z; } #endif cmsCloseProfile( profile ); /* We need XYZ so we can adjust the white balance. */ if( vips_colourspace( in, &t, VIPS_INTERPRETATION_XYZ, NULL ) ) return( -1 ); in = t; if( !(add = VIPS_ARRAY( in, in->Bands, double )) || !(mul = VIPS_ARRAY( in, in->Bands, double )) ) return( -1 ); /* There might be extra bands off to the right somewhere. */ for( i = 0; i < in->Bands; i++ ) add[i] = 0.0; mul[0] = VIPS_D50_X0 / (X * 100.0); mul[1] = VIPS_D50_Y0 / (Y * 100.0); mul[2] = VIPS_D50_Z0 / (Z * 100.0); for( i = 3; i < in->Bands; i++ ) mul[i] = 1.0; if( vips_linear( in, &t, add, mul, in->Bands, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = t; *out = in; return( 0 ); } #else /*!HAVE_LCMS*/ #include int vips_icc_present( void ) { return( 0 ); } int vips_icc_ac2rc( VipsImage *in, VipsImage **out, const char *profile_filename ) { vips_error( "VipsIcc", "%s", _( "libvips configured without lcms support" ) ); return( -1 ); } #endif /*HAVE_LCMS*/ /** * vips_icc_import: * @in: input image * @out: output image * * Optional arguments: * * @input_profile: get the input profile from here * @intent: transform with this intent * @embedded: use profile embedded in input image * @pcs: use XYZ or LAB PCS * * Import an image from device space to D65 LAB with an ICC profile. If @pcs is * set to #VIPS_PCS_XYZ, use CIE XYZ PCS instead. * * If @embedded is set, the input profile is taken from the input image * metadata. If there is no embedded profile, * @input_profile_filename is used as a fall-back. * * If @embedded is not set, the input profile is taken from * @input_profile. If @input_profile is not supplied, the * metadata profile, if any, is used as a fall-back. * * Returns: 0 on success, -1 on error. */ int vips_icc_import( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "icc_import", ap, in, out ); va_end( ap ); return( result ); } /** * vips_icc_export: * @in: input image * @out: output image * * Optional arguments: * * @intent: transform with this intent * @depth: depth of output image in bits * @output_profile: get the output profile from here * @pcs: use XYZ or LAB PCS * * Export an image from D65 LAB to device space with an ICC profile. * If @pcs is * set to #VIPS_PCS_XYZ, use CIE XYZ PCS instead. * If @output_profile is not set, use the embedded profile, if any. * If @output_profile is set, export with that and attach it to the output * image. * * Returns: 0 on success, -1 on error. */ int vips_icc_export( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "icc_export", ap, in, out ); va_end( ap ); return( result ); } /** * vips_icc_transform: * @in: input image * @out: output image * @output_profile: get the output profile from here * * Optional arguments: * * @input_profile: get the input profile from here * @intent: transform with this intent * @depth: depth of output image in bits * @embedded: use profile embedded in input image * * Transform an image with a pair of ICC profiles. The input image is moved to * profile-connection space with the input profile and then to the output * space with the output profile. * * If @embedded is set, the input profile is taken from the input image * metadata, if present. If there is no embedded profile, * @input_profile is used as a fall-back. * * If @embedded is not set, the input profile is taken from * @input_profile. If @input_profile is not supplied, the * metadata profile, if any, is used as a fall-back. * * Use vips_icc_import() and vips_icc_export() to do either the first or * second half of this operation in isolation. * * Returns: 0 on success, -1 on error. */ int vips_icc_transform( VipsImage *in, VipsImage **out, const char *output_profile, ... ) { va_list ap; int result; va_start( ap, output_profile ); result = vips_call_split( "icc_transform", ap, in, out, output_profile ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/dECMC.c0000644000175000017500000000475612303140253013517 00000000000000/* dECMC.c * * Modified: * 31/10/12 * - from dE76.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pcolour.h" typedef struct _VipsdECMC { VipsColourDifference parent_instance; } VipsdECMC; typedef VipsColourSpaceClass VipsdECMCClass; G_DEFINE_TYPE( VipsdECMC, vips_dECMC, VIPS_TYPE_COLOUR_DIFFERENCE ); static void vips_dECMC_class_init( VipsdECMCClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "dECMC"; object_class->description = _( "calculate dECMC" ); colour_class->process_line = vips__pythagoras_line; } static void vips_dECMC_init( VipsdECMC *dECMC ) { VipsColourDifference *difference = VIPS_COLOUR_DIFFERENCE( dECMC ); difference->interpretation = VIPS_INTERPRETATION_CMC; } /** * vips_dECMC: * @left: first input image * @right: second input image * @out: output image * * Calculate dE CMC. The input images are transformed to CMC colour space and * the euclidean distance between corresponding pixels calculated. * * To calculate a colour difference with values for (l:c) other than (1:1), * transform the two source images to CMC yourself, scale the channels * appropriately, and call this function. * * See also: vips_colourspace() * * Returns: 0 on success, -1 on error */ int vips_dECMC( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "dECMC", ap, left, right, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/colour.c0000644000175000017500000005344712303141142014146 00000000000000/* base class for all colour operations */ /* Copyright (C) 1991-2005 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcolour.h" /** * SECTION: colour * @short_description: colour operators * @stability: Stable * @see_also: arithmetic * @include: vips/vips.h * * These operators let you transform coordinates and images between colour * spaces, calculate colour differences, and move * to and from device spaces. * * Radiance images have four 8-bits bands and store 8 bits of R, G and B and * another 8 bits of exponent, common to all channels. They are widely used in * the HDR imaging community. * * * The colour functions can be divided into three main groups. First, * functions to transform images between the different colour spaces supported * by VIPS: RGB, sRGB, * XYZ, Yxy, * Lab, LabQ, * LabS, LCh and * CMC). Use vips_colourspace() to move an image to a * target colourspace using the best sequence of colour transform operations. * Secondly, there are a set of operations for * calculating colour difference metrics. Finally, VIPS wraps LittleCMS and * uses it to provide a set of operations for reading and writing images with * ICC profiles. * * This figure shows how the VIPS colour spaces interconvert: * * * * The colour spaces supported by VIPS are: * * * * * LabQ * * This is the principal VIPS colorimetric storage format. * LabQ images have four 8-bit bands and store 10 bits of L and 11 bits * of a and b. * * You cannot perform calculations on LabQ images (they are * tagged with %VIPS_CODING_LABQ), though a few operations such as * vips_extract_area() will work directly with them. * * * * * LabS * * This format represents coordinates in CIELAB space as a * three-band #VIPS_FORMAT_SHORT image, scaled to fit the full range of * bits. It is the best format for computation, being relatively * compact, quick, and accurate. Colour values expressed in this way * are hard to visualise. * * * * * Lab * * Lab colourspace represents CIELAB colour values with a three-band * #VIPS_FORMAT_FLOAT image. This is the simplest format for general * work: adding the constant 50 to the L channel, for example, has the * expected result. * * VIPS uses D65 LAB, but you can use other colour temperatures with a * little effort, see vips_XYZ2Lab(). * * * * * XYZ * * CIE XYZ colour space represented as a three-band #VIPS_FORMAT_FLOAT * image. * * * * * Yxy * * CIE Yxy colour space represented as a three-band #VIPS_FORMAT_FLOAT * image. * * * * * RGB / sRGB * * VIPS converts XYZ to and from sRGB using the usual formula: * * http://en.wikipedia.org/wiki/SRGB * * You can also use vips_icc_transform() and friends to go to and from * device space with a generic profile. * * * * * LCh * * Like Lab, but rectangular ab coordinates * are replaced with * polar Ch (Chroma and hue) coordinates. * Hue angles are expressed in degrees. * * * * * CMC * * A colour space based on the CMC(1:1) colour difference measurement. * This is a highly uniform colour space, much better than CIELAB for * expressing small differences. * * You can calculate metrics like CMC(2:1) by scaling the spaces before * finding differences. * * * */ /* Areas under curves for Dxx. 2 degree observer. */ /** * VIPS_D93_X0: * * Areas under curves for D93, 2 degree observer. */ /** * VIPS_D75_X0: * * Areas under curves for D75, 2 degree observer. */ /** * VIPS_D65_X0: * * Areas under curves for D65, 2 degree observer. */ /** * VIPS_D55_X0: * * Areas under curves for D55, 2 degree observer. */ /** * VIPS_D50_X0: * * Areas under curves for D50, 2 degree observer. */ /** * VIPS_A_X0: * * Areas under curves for illuminant A (2856K), 2 degree observer. */ /** * VIPS_B_X0: * * Areas under curves for illuminant B (4874K), 2 degree observer. */ /** * VIPS_C_X0: * * Areas under curves for illuminant C (6774K), 2 degree observer. */ /** * VIPS_E_X0: * * Areas under curves for equal energy illuminant E. */ /** * VIPS_D3250_X0: * * Areas under curves for black body at 3250K, 2 degree observer. */ G_DEFINE_ABSTRACT_TYPE( VipsColour, vips_colour, VIPS_TYPE_OPERATION ); /* Maximum number of input images -- why not? */ #define MAX_INPUT_IMAGES (64) static int vips_colour_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion **ir = (VipsRegion **) seq; VipsColour *colour = VIPS_COLOUR( b ); VipsColourClass *class = VIPS_COLOUR_GET_CLASS( colour ); VipsRect *r = &or->valid; int i, y; VipsPel *p[MAX_INPUT_IMAGES], *q; for( i = 0; ir[i]; i++ ) if( vips_region_prepare( ir[i], r ) ) return( -1 ); VIPS_GATE_START( "vips_colour_gen: work" ); for( y = 0; y < r->height; y++ ) { for( i = 0; ir[i]; i++ ) p[i] = VIPS_REGION_ADDR( ir[i], r->left, r->top + y ); p[i] = NULL; q = VIPS_REGION_ADDR( or, r->left, r->top + y ); class->process_line( colour, q, p, r->width ); } VIPS_GATE_STOP( "vips_colour_gen: work" ); return( 0 ); } static int vips_colour_attach_profile( VipsImage *im, const char *filename ) { char *data; unsigned int data_length; if( !(data = vips__file_read_name( filename, VIPS_ICC_DIR, &data_length )) ) return( -1 ); vips_image_set_blob( im, VIPS_META_ICC_NAME, (VipsCallbackFn) g_free, data, data_length ); return( 0 ); } static int vips_colour_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsColour *colour = VIPS_COLOUR( object ); int i; #ifdef DEBUG printf( "vips_colour_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ if( VIPS_OBJECT_CLASS( vips_colour_parent_class )-> build( object ) ) return( -1 ); g_object_set( colour, "out", vips_image_new(), NULL ); if( colour->n > MAX_INPUT_IMAGES ) { vips_error( class->nickname, "%s", _( "too many input images" ) ); return( -1 ); } for( i = 0; i < colour->n; i++ ) if( vips_image_pio_input( colour->in[i] ) ) return( -1 ); /* colour->in[] must be NULL-terminated, we use it as an arg to * vips_start_many(). */ g_assert( !colour->in[colour->n] ); if( vips_image_pipeline_array( colour->out, VIPS_DEMAND_STYLE_THINSTRIP, colour->in ) ) return( -1 ); colour->out->Coding = colour->coding; colour->out->Type = colour->interpretation; colour->out->BandFmt = colour->format; colour->out->Bands = colour->bands; if( colour->profile_filename ) if( vips_colour_attach_profile( colour->out, colour->profile_filename ) ) return( -1 ); if( vips_image_generate( colour->out, vips_start_many, vips_colour_gen, vips_stop_many, colour->in, colour ) ) return( -1 ); return( 0 ); } static void vips_colour_class_init( VipsColourClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "colour"; vobject_class->description = _( "colour operations" ); vobject_class->build = vips_colour_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "out", 100, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsColour, out ) ); } static void vips_colour_init( VipsColour *colour ) { colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_sRGB; colour->format = VIPS_FORMAT_UCHAR; colour->bands = 3; } G_DEFINE_ABSTRACT_TYPE( VipsColourSpace, vips_colour_space, VIPS_TYPE_COLOUR ); static int vips_colour_space_build( VipsObject *object ) { VipsColour *colour = VIPS_COLOUR( object ); VipsColourSpace *space = VIPS_COLOUR_SPACE( object ); VipsImage **t; VipsImage *in; VipsImage *extra; t = (VipsImage **) vips_object_local_array( object, 4 ); in = space->in; extra = NULL; /* We only process float. */ if( vips_cast_float( in, &t[0], NULL ) ) return( -1 ); in = t[0]; /* If there are more than n bands, process just the first three and * reattach the rest after. This lets us handle RGBA etc. */ if( in->Bands > 3 ) { if( vips_extract_band( in, &t[1], 0, "n", 3, NULL ) || vips_extract_band( in, &t[2], 3, "n", in->Bands - 3, NULL ) ) return( -1 ); in = t[1]; extra = t[2]; } else if( vips_check_bands_atleast( VIPS_OBJECT_GET_CLASS( object )->nickname, in, 3 ) ) return( -1 ); colour->n = 1; colour->in = (VipsImage **) vips_object_local_array( object, 2 ); colour->in[0] = in; colour->in[1] = NULL; if( colour->in[0] ) g_object_ref( colour->in[0] ); if( VIPS_OBJECT_CLASS( vips_colour_space_parent_class )-> build( object ) ) return( -1 ); /* Reattach higher bands, if necessary. */ if( extra ) { VipsImage *x; if( vips_bandjoin2( colour->out, extra, &x, NULL ) ) return( -1 ); VIPS_UNREF( colour->out ); colour->out = x; } return( 0 ); } static void vips_colour_space_class_init( VipsColourSpaceClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "space"; vobject_class->description = _( "colour space transformations" ); vobject_class->build = vips_colour_space_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsColourSpace, in ) ); } static void vips_colour_space_init( VipsColourSpace *space ) { VipsColour *colour = (VipsColour *) space; /* What we write. interpretation should be overwritten in subclass * builds. */ colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_LAB; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 3; } G_DEFINE_ABSTRACT_TYPE( VipsColourCode, vips_colour_code, VIPS_TYPE_COLOUR ); static int vips_colour_code_build( VipsObject *object ) { VipsColour *colour = VIPS_COLOUR( object ); VipsColourCode *code = VIPS_COLOUR_CODE( object ); VipsColourCodeClass *class = VIPS_COLOUR_CODE_GET_CLASS( object ); VipsImage **t = (VipsImage **) vips_object_local_array( object, 6 ); VipsImage *in; VipsImage *extra; in = code->in; extra = NULL; /* If this is a LABQ and the coder wants uncoded, unpack. */ if( in && in->Coding == VIPS_CODING_LABQ && code->input_coding == VIPS_CODING_NONE ) { if( vips_LabQ2Lab( in, &t[0], NULL ) ) return( -1 ); in = t[0]; } if( in && vips_check_coding( VIPS_OBJECT_CLASS( class )->nickname, in, code->input_coding ) ) return( -1 ); /* Extra band processing. don't do automatic detach/reattach if either * input or output will be coded. */ if( in && code->input_coding == VIPS_CODING_NONE && colour->coding == VIPS_CODING_NONE && code->input_bands > 0 ) { if( in->Bands > code->input_bands ) { if( vips_extract_band( in, &t[1], 0, "n", code->input_bands, NULL ) ) return( -1 ); if( vips_extract_band( in, &t[2], code->input_bands, "n", in->Bands - code->input_bands, NULL ) ) return( -1 ); in = t[1]; extra = t[2]; } else if( vips_check_bands_atleast( VIPS_OBJECT_CLASS( class )->nickname, in, code->input_bands ) ) return( -1 ); } if( in && code->input_coding == VIPS_CODING_NONE && code->input_format != VIPS_FORMAT_NOTSET ) { if( vips_cast( in, &t[3], code->input_format, NULL ) ) return( -1 ); in = t[3]; } if( in && code->input_coding == VIPS_CODING_NONE && code->input_interpretation != VIPS_INTERPRETATION_ERROR ) { if( vips_colourspace( in, &t[4], code->input_interpretation, NULL ) ) return( -1 ); in = t[4]; } colour->n = 1; colour->in = (VipsImage **) vips_object_local_array( object, 2 ); colour->in[0] = in; colour->in[1] = NULL; if( colour->in[0] ) g_object_ref( colour->in[0] ); if( VIPS_OBJECT_CLASS( vips_colour_space_parent_class )-> build( object ) ) return( -1 ); /* Reattach higher bands, if necessary. * * Our processing on the first three bands may have changed the image * format. For example, converting LAB to LABS will make a short * image. We need to force the extra bands to match this new type. */ if( extra ) { VipsImage *x; if( vips_cast( extra, &t[5], colour->out->BandFmt, NULL ) || vips_bandjoin2( colour->out, t[5], &x, NULL ) ) return( -1 ); VIPS_UNREF( colour->out ); colour->out = x; } return( 0 ); } static void vips_colour_code_class_init( VipsColourCodeClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "code"; vobject_class->description = _( "change colour coding" ); vobject_class->build = vips_colour_code_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsColourCode, in ) ); } static void vips_colour_code_init( VipsColourCode *code ) { code->input_interpretation = VIPS_INTERPRETATION_ERROR; } G_DEFINE_ABSTRACT_TYPE( VipsColourDifference, vips_colour_difference, VIPS_TYPE_COLOUR ); static int vips_colour_difference_build( VipsObject *object ) { VipsColour *colour = VIPS_COLOUR( object ); VipsColourDifference *difference = VIPS_COLOUR_DIFFERENCE( object ); VipsColourDifferenceClass *class = VIPS_COLOUR_DIFFERENCE_GET_CLASS( object ); VipsImage **t; VipsImage *left; VipsImage *right; VipsImage *extra; t = (VipsImage **) vips_object_local_array( object, 12 ); left = difference->left; right = difference->right; extra = NULL; /* Unpack LABQ images, */ if( left && left->Coding == VIPS_CODING_LABQ ) { if( vips_LabQ2Lab( left, &t[0], NULL ) ) return( -1 ); left = t[0]; } if( right && right->Coding == VIPS_CODING_LABQ ) { if( vips_LabQ2Lab( right, &t[1], NULL ) ) return( -1 ); right = t[1]; } if( left && vips_check_uncoded( VIPS_OBJECT_CLASS( class )->nickname, left ) ) return( -1 ); if( right && vips_check_uncoded( VIPS_OBJECT_CLASS( class )->nickname, right ) ) return( -1 ); /* Detach and reattach extra bands, if any. If both left and right * have extra bands, give up. */ if( left && left->Bands > 3 && right && right->Bands > 3 ) { vips_error( VIPS_OBJECT_CLASS( class )->nickname, "%s", "both images have extra bands" ); return( -1 ); } if( left && left->Bands > 3 ) { if( vips_extract_band( left, &t[2], 0, "n", 3, NULL ) ) return( -1 ); if( vips_extract_band( left, &t[3], 3, "n", left->Bands - 3, NULL ) ) return( -1 ); left = t[2]; extra = t[3]; } if( right && right->Bands > 3 ) { if( vips_extract_band( right, &t[4], 0, "n", 3, NULL ) ) return( -1 ); if( vips_extract_band( right, &t[5], 3, "n", right->Bands - 3, NULL ) ) return( -1 ); right = t[4]; extra = t[5]; } if( vips_check_bands_atleast( VIPS_OBJECT_CLASS( class )->nickname, left, 3 ) ) return( -1 ); if( vips_check_bands_atleast( VIPS_OBJECT_CLASS( class )->nickname, right, 3 ) ) return( -1 ); if( vips_colourspace( left, &t[6], difference->interpretation, NULL ) ) return( -1 ); left = t[6]; if( vips_colourspace( right, &t[7], difference->interpretation, NULL ) ) return( -1 ); right = t[7]; /* We only process float. */ if( vips_cast_float( left, &t[8], NULL ) ) return( -1 ); left = t[8]; if( vips_cast_float( right, &t[9], NULL ) ) return( -1 ); right = t[9]; if( vips__sizealike( left, right, &t[10], &t[11] ) ) return( -1 ); left = t[10]; right = t[11]; colour->n = 2; colour->in = (VipsImage **) vips_object_local_array( object, 3 ); colour->in[0] = left; colour->in[1] = right; colour->in[2] = NULL; if( colour->in[0] ) g_object_ref( colour->in[0] ); if( colour->in[1] ) g_object_ref( colour->in[1] ); if( VIPS_OBJECT_CLASS( vips_colour_space_parent_class )-> build( object ) ) return( -1 ); /* Reattach higher bands, if necessary. */ if( extra ) { VipsImage *x; if( vips_bandjoin2( colour->out, extra, &x, NULL ) ) return( -1 ); VIPS_UNREF( colour->out ); colour->out = x; } return( 0 ); } static void vips_colour_difference_class_init( VipsColourDifferenceClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "difference"; vobject_class->description = _( "calculate colour difference" ); vobject_class->build = vips_colour_difference_build; VIPS_ARG_IMAGE( class, "left", 1, _( "Left" ), _( "Left-hand input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsColourDifference, left ) ); VIPS_ARG_IMAGE( class, "right", 2, _( "Right" ), _( "Right-hand input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsColourDifference, right ) ); } static void vips_colour_difference_init( VipsColourDifference *difference ) { VipsColour *colour = VIPS_COLOUR( difference ); colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_B_W; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 1; } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_colour_operation_init( void ) { extern GType vips_colourspace_get_type( void ); extern GType vips_Lab2XYZ_get_type( void ); extern GType vips_XYZ2Lab_get_type( void ); extern GType vips_Lab2LCh_get_type( void ); extern GType vips_LCh2Lab_get_type( void ); extern GType vips_LCh2CMC_get_type( void ); extern GType vips_CMC2LCh_get_type( void ); extern GType vips_Yxy2XYZ_get_type( void ); extern GType vips_XYZ2Yxy_get_type( void ); extern GType vips_LabQ2Lab_get_type( void ); extern GType vips_Lab2LabQ_get_type( void ); extern GType vips_LabQ2LabS_get_type( void ); extern GType vips_LabS2LabQ_get_type( void ); extern GType vips_LabS2Lab_get_type( void ); extern GType vips_Lab2LabS_get_type( void ); extern GType vips_rad2float_get_type( void ); extern GType vips_float2rad_get_type( void ); extern GType vips_LabQ2sRGB_get_type( void ); extern GType vips_XYZ2sRGB_get_type( void ); extern GType vips_sRGB2XYZ_get_type( void ); extern GType vips_sRGB2scRGB_get_type( void ); extern GType vips_scRGB2XYZ_get_type( void ); extern GType vips_XYZ2scRGB_get_type( void ); extern GType vips_scRGB2sRGB_get_type( void ); #if defined(HAVE_LCMS) || defined(HAVE_LCMS2) extern GType vips_icc_import_get_type( void ); extern GType vips_icc_export_get_type( void ); extern GType vips_icc_transform_get_type( void ); #endif extern GType vips_dE76_get_type( void ); extern GType vips_dE00_get_type( void ); extern GType vips_dECMC_get_type( void ); vips_colourspace_get_type(); vips_Lab2XYZ_get_type(); vips_XYZ2Lab_get_type(); vips_Lab2LCh_get_type(); vips_LCh2Lab_get_type(); vips_LCh2CMC_get_type(); vips_CMC2LCh_get_type(); vips_XYZ2Yxy_get_type(); vips_Yxy2XYZ_get_type(); vips_LabQ2Lab_get_type(); vips_Lab2LabQ_get_type(); vips_LabQ2LabS_get_type(); vips_LabS2LabQ_get_type(); vips_LabS2Lab_get_type(); vips_Lab2LabS_get_type(); vips_rad2float_get_type(); vips_float2rad_get_type(); vips_LabQ2sRGB_get_type(); vips_sRGB2scRGB_get_type(); vips_scRGB2XYZ_get_type(); vips_XYZ2scRGB_get_type(); vips_scRGB2sRGB_get_type(); #if defined(HAVE_LCMS) || defined(HAVE_LCMS2) vips_icc_import_get_type(); vips_icc_export_get_type(); vips_icc_transform_get_type(); #endif vips_dE76_get_type(); vips_dE00_get_type(); vips_dECMC_get_type(); } vips-7.38.5/libvips/colour/rad2float.c0000644000175000017500000001574412303140253014521 00000000000000/* Convert Radiance 32bit packed format to float. * * 3/3/09 * - from LabQ2Lab and Radiance sources * 2/11/09 * - gtkdoc * 20/9/12 * - redo as a class * 13/12/12 * - tag output as scRGB, since it'll be 0-1 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Sections of this file from Greg Ward and Radiance with kind permission. The Radience copyright notice appears below. */ /* ==================================================================== * The Radiance Software License, Version 1.0 * * Copyright (c) 1990 - 2009 The Regents of the University of California, * through Lawrence Berkeley National Laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes Radiance software * (http://radsite.lbl.gov/) * developed by the Lawrence Berkeley National Laboratory * (http://www.lbl.gov/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Radiance," "Lawrence Berkeley National Laboratory" * and "The Regents of the University of California" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact radiance@radsite.lbl.gov. * * 5. Products derived from this software may not be called "Radiance", * nor may "Radiance" appear in their name, without prior written * permission of Lawrence Berkeley National Laboratory. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of Lawrence Berkeley National Laboratory. For more * information on Lawrence Berkeley National Laboratory, please see * . */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" /* Begin copy-paste from Radiance sources. */ #define RED 0 #define GRN 1 #define BLU 2 #define CIEX 0 /* or, if input is XYZ... */ #define CIEY 1 #define CIEZ 2 #define EXP 3 /* exponent same for either format */ #define COLXS 128 /* excess used for exponent */ #define WHT 3 /* used for RGBPRIMS type */ #undef BYTE #define BYTE unsigned char /* 8-bit unsigned integer */ typedef BYTE COLR[4]; /* red, green, blue (or X,Y,Z), exponent */ typedef float COLORV; typedef COLORV COLOR[3]; /* red, green, blue (or X,Y,Z) */ #define copycolor(c1,c2) ((c1)[0]=(c2)[0],(c1)[1]=(c2)[1],(c1)[2]=(c2)[2]) static void colr_color(col, clr) /* convert short to float color */ register COLOR col; register COLR clr; { if (clr[EXP] == 0) col[RED] = col[GRN] = col[BLU] = 0.0; else { double f = ldexp(1.0, (int)clr[EXP]-(COLXS+8)); col[RED] = (clr[RED] + 0.5)*f; col[GRN] = (clr[GRN] + 0.5)*f; col[BLU] = (clr[BLU] + 0.5)*f; } } /* End copy-paste from Radiance sources. */ typedef VipsColourCode VipsRad2float; typedef VipsColourCodeClass VipsRad2floatClass; G_DEFINE_TYPE( VipsRad2float, vips_rad2float, VIPS_TYPE_COLOUR_CODE ); static void vips_rad2float_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { COLR *inp = (COLR *) in[0]; COLOR *outbuf = (COLOR *) out; colr_color(outbuf[0], inp[0]); while (--width > 0) { outbuf++; inp++; if (inp[0][RED] == inp[-1][RED] && inp[0][GRN] == inp[-1][GRN] && inp[0][BLU] == inp[-1][BLU] && inp[0][EXP] == inp[-1][EXP]) copycolor(outbuf[0], outbuf[-1]); else colr_color(outbuf[0], inp[0]); } } static void vips_rad2float_class_init( VipsRad2floatClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "rad2float"; object_class->description = _( "unpack Radiance coding to float RGB" ); colour_class->process_line = vips_rad2float_line; } static void vips_rad2float_init( VipsRad2float *rad2float ) { VipsColour *colour = VIPS_COLOUR( rad2float ); VipsColourCode *code = VIPS_COLOUR_CODE( rad2float ); colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_scRGB; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 3; code->input_coding = VIPS_CODING_RAD; } /** * vips_rad2float: * @in: input image * @out: output image * * Unpack a RAD (#IM_CODING_RAD) image to a three-band float image. * * See also: vips_float2rad(), vips_LabQ2LabS(). * * Returns: 0 on success, -1 on error. */ int vips_rad2float( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "rad2float", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/sRGB2scRGB.c0000644000175000017500000001022412303140253014367 00000000000000/* Turn displayable rgb files to scRGB. * * Modified: * 15/11/94 JC * - memory leak fixed * - error message added * 16/11/94 JC * - partialed * 21/9/12 * - redone as a class * - sRGB only, support for other RGBs is now via lcms * 6/11/12 * - add 16-bit sRGB import * 11/12/12 * - cut about to make sRGB2scRGB.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourCode VipssRGB2scRGB; typedef VipsColourCodeClass VipssRGB2scRGBClass; G_DEFINE_TYPE( VipssRGB2scRGB, vips_sRGB2scRGB, VIPS_TYPE_COLOUR_CODE ); /* Convert a buffer of 8-bit pixels. */ static void vips_sRGB2scRGB_line_8( float * restrict q, VipsPel * restrict p, int width ) { int i; for( i = 0; i < width; i++ ) { int r = p[0]; int g = p[1]; int b = p[2]; float R, G, B; p += 3; vips_col_sRGB2scRGB_8( r, g, b, &R, &G, &B ); q[0] = R; q[1] = G; q[2] = B; q += 3; } } /* Convert a buffer of 16-bit pixels. */ static void vips_sRGB2scRGB_line_16( float * restrict q, unsigned short * restrict p, int width ) { int i; for( i = 0; i < width; i++ ) { int r = p[0]; int g = p[1]; int b = p[2]; float R, G, B; p += 3; vips_col_sRGB2scRGB_16( r, g, b, &R, &G, &B ); q[0] = R; q[1] = G; q[2] = B; q += 3; } } static void vips_sRGB2scRGB_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { if( colour->in[0]->BandFmt == VIPS_FORMAT_UCHAR ) vips_sRGB2scRGB_line_8( (float *) out, (VipsPel *) in[0], width ); else vips_sRGB2scRGB_line_16( (float *) out, (unsigned short *) in[0], width ); } static int vips_sRGB2scRGB_build( VipsObject *object ) { VipsColourCode *code = (VipsColourCode *) object; if( code->in ) code->input_format = code->in->BandFmt == VIPS_FORMAT_USHORT ? VIPS_FORMAT_USHORT : VIPS_FORMAT_UCHAR; if( VIPS_OBJECT_CLASS( vips_sRGB2scRGB_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } static void vips_sRGB2scRGB_class_init( VipssRGB2scRGBClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "sRGB2scRGB"; object_class->description = _( "convert an sRGB image to scRGB" ); object_class->build = vips_sRGB2scRGB_build; colour_class->process_line = vips_sRGB2scRGB_line; } static void vips_sRGB2scRGB_init( VipssRGB2scRGB *sRGB2scRGB ) { VipsColour *colour = VIPS_COLOUR( sRGB2scRGB ); VipsColourCode *code = VIPS_COLOUR_CODE( sRGB2scRGB ); colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_scRGB; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 3; code->input_coding = VIPS_CODING_NONE; code->input_bands = 3; /* The default. This can get changed above ^^ if we see a * 16-bit input. */ code->input_format = VIPS_FORMAT_UCHAR; } /** * vips_sRGB2scRGB: * @in: input image * @out: output image * * Convert an sRGB image to scRGB. * * See also: vips_sRGB2XYZ(), vips_rad2float(). * * Returns: 0 on success, -1 on error. */ int vips_sRGB2scRGB( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "sRGB2scRGB", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/UCS2LCh.c0000644000175000017500000001304412303140253013735 00000000000000/* Turn CMC to LCh * * 15/11/94 JC * - error messages added * - memory leak fixed * 16/11/94 JC * - uses im_wrap_oneonebuf() now * 2/11/09 * - gtkdoc * 30/11/09 * - argh, im_col_make_tables_CMC(); missing, thanks Peter * 19/9/12 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" /* Arrays for lookup tables for the inverse function. */ static float LI[1001]; static float CI[3001]; static float hI[101][361]; typedef VipsColourSpace VipsCMC2LCh; typedef VipsColourSpaceClass VipsCMC2LChClass; G_DEFINE_TYPE( VipsCMC2LCh, vips_CMC2LCh, VIPS_TYPE_COLOUR_SPACE ); /* Generate LI (inverse) tables. */ static void make_LI( void ) { int i; float Ll[1001]; for( i = 0; i < 1001; i++ ) Ll[i] = vips_col_L2Lcmc( i / 10.0 ); for( i = 0; i < 1001; i++ ) { int j; for( j = 0; j < 1001 && Ll[j] <= i / 10.0; j++ ) ; LI[i] = (j - 1) / 10.0 + (i / 10.0 - Ll[j - 1]) / ((Ll[j] - Ll[j - 1]) * 10.0); } } /* Generate Ccmc table. */ static void make_CI( void ) { int i; float Cl[3001]; for( i = 0; i < 3001; i++ ) Cl[i] = vips_col_C2Ccmc( i / 10.0 ); for( i = 0; i < 3001; i++ ) { int j; for( j = 0; j < 3001 && Cl[j] <= i / 10.0; j++ ) ; CI[i] = (j - 1) / 10.0 + (i / 10.0 - Cl[j - 1]) / ((Cl[j] - Cl[j - 1]) * 10.0); } } /* The difficult one: hcmc. */ static void make_hI( void ) { int i, j; float hl[101][361]; for( i = 0; i < 361; i++ ) for( j = 0; j < 101; j++ ) hl[j][i] = vips_col_Ch2hcmc( j * 2.0, i ); for( j = 0; j < 101; j++ ) { for( i = 0; i < 361; i++ ) { int k; for( k = 0; k < 361 && hl[j][k] <= i; k++ ) ; hI[j][i] = k - 1 + (i - hl[j][k - 1]) / (hl[j][k] - hl[j][k - 1]); } } } /** * vips_col_Lcmc2L: * @Lcmc: L cmc * * Calculate L from Lcmc using a table. Call vips_col_make_tables_CMC() at * least once before using this function. * * Returns: L* */ float vips_col_Lcmc2L( float Lcmc ) { int known; known = floor( Lcmc * 10.0 ); known = VIPS_CLIP( 0, known, 1000 ); return( LI[known] + (LI[known + 1] - LI[known]) * (Lcmc * 10.0 - known) ); } /** * vips_col_Ccmc2C: * @Ccmc: Ccmc * * Calculate C from Ccmc using a table. * Call vips_col_make_tables_CMC() at * least once before using this function. * * Returns: C. */ float vips_col_Ccmc2C( float Ccmc ) { int known; known = floor( Ccmc * 10.0 ); known = VIPS_CLIP( 0, known, 3000 ); return( CI[known] + (CI[known + 1] - CI[known]) * (Ccmc * 10.0 - known) ); } /** * vips_col_Chcmc2h: * @C: Chroma * @hcmc: Hue cmc (degrees) * * Calculate h from C and hcmc, using a table. * Call vips_col_make_tables_CMC() at * least once before using this function. * * Returns: h. */ float vips_col_Chcmc2h( float C, float hcmc ) { int r; int known; /* Which row of the table? */ r = (int) ((C + 1.0) / 2.0); r = VIPS_CLIP( 0, r, 100 ); known = floor( hcmc ); known = VIPS_CLIP( 0, known, 360 ); return( hI[r][known] + (hI[r][(known + 1) % 360] - hI[r][known]) * (hcmc - known) ); } static void * tables_init( void *client ) { make_LI(); make_CI(); make_hI(); return( NULL ); } /** * vips_col_make_tables_CMC: * * Make the lookup tables for cmc. */ void vips_col_make_tables_CMC( void ) { static GOnce once = G_ONCE_INIT; (void) g_once( &once, tables_init, NULL ); } /* Process a buffer of data. */ void vips_CMC2LCh_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float *p = (float *) in[0]; float *q = (float *) out; int x; for( x = 0; x < width; x++ ) { float Lcmc = p[0]; float Ccmc = p[1]; float hcmc = p[2]; /* Turn from CMC. */ float C = vips_col_Ccmc2C( Ccmc ); float h = vips_col_Chcmc2h( C, hcmc ); float L = vips_col_Lcmc2L( Lcmc ); p += 3; q[0] = L; q[1] = C; q[2] = h; q += 3; } } static void vips_CMC2LCh_class_init( VipsCMC2LChClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "CMC2LCh"; object_class->description = _( "transform LCh to CMC" ); colour_class->process_line = vips_CMC2LCh_line; } static void vips_CMC2LCh_init( VipsCMC2LCh *CMC2LCh ) { VipsColour *colour = VIPS_COLOUR( CMC2LCh ); vips_col_make_tables_CMC(); colour->interpretation = VIPS_INTERPRETATION_LCH; } /** * vips_CMC2LCh: * @in: input image * @out: output image * * Turn LCh to CMC. * * Returns: 0 on success, -1 on error */ int vips_CMC2LCh( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "CMC2LCh", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/Lab2LabQ.c0000644000175000017500000001105412303140253014151 00000000000000/* Lab2LabQ: quantise FLOAT Lab image into 10 11 11 format * * 4 bytes per pel: l a b lsbs * this is an image wrapper which calls line-wise packing * Copyright K.Martinez 3/5/93 * Modified: * 7/6/93 JC * - adapted for partial v2 * 5/5/94 JC * - some nint->+0.5, for speed and to ease portability * - other nint->rint * - now inclues ! * 15/11/94 JC * - all nint(), rint() removed for speed * - now -128 rather than -127 for a, b * - checks input type properly * 16/11/94 JC * - uses new im_wrap_oneonebuf() * 22/5/95 JC * - changed L to scale by 10.24, not 10.23 * 11/7/95 JC * - now uses IM_RINT() for rounding * 4/9/97 JC * - L* = 100.0 now allowed * 5/11/00 JC * - go int earlier for speed up * 20/6/02 JC * - oops, were not clipping a/b range correctly * 1/11/09 * - gtkdoc * - cleanups * 20/9/12 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourCode VipsLab2LabQ; typedef VipsColourCodeClass VipsLab2LabQClass; G_DEFINE_TYPE( VipsLab2LabQ, vips_Lab2LabQ, VIPS_TYPE_COLOUR_CODE ); /* @(#) convert float Lab to packed Lab32 format 10 11 11 bits * works only on buffers, not IMAGEs * Copyright 1993 K.Martinez * Modified: 3/5/93, 16/6/93 */ static void vips_Lab2LabQ_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p = (float *) in[0]; VipsPel * restrict q = out; float fval; int lsbs; int intv; int i; for( i = 0; i < width; i++) { /* Scale L up to 10 bits. Add 0.5 rather than call VIPS_RINT * for speed. This will not round negatives correctly! But * this does not matter, since L is >0. L*=100.0 -> 1023. */ intv = 10.23 * p[0] + 0.5; /* scale L up to 10 bits */ intv = VIPS_CLIP( 0, intv, 1023 ); lsbs = (intv & 0x3) << 6; /* 00000011 -> 11000000 */ q[0] = (intv >> 2); /* drop bot 2 bits and store */ fval = 8.0 * p[1]; /* do a */ intv = VIPS_RINT( fval ); intv = VIPS_CLIP( -1024, intv, 1023 ); lsbs |= (intv & 0x7) << 3; /* 00000111 -> 00111000 */ q[1] = (intv >> 3); /* drop bot 3 bits & store */ fval = 8.0 * p[2]; /* do b */ intv = VIPS_RINT( fval ); intv = VIPS_CLIP( -1024, intv, 1023 ); lsbs |= (intv & 0x7); q[2] = (intv >> 3); q[3] = lsbs; /* store lsb band */ p += 3; q += 4; } } void vips__Lab2LabQ_vec( VipsPel *out, float *in, int width ) { vips_Lab2LabQ_line( NULL, out, (VipsPel **) &in, width ); } static void vips_Lab2LabQ_class_init( VipsLab2LabQClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "Lab2LabQ"; object_class->description = _( "transform float Lab to LabQ coding" ); colour_class->process_line = vips_Lab2LabQ_line; } static void vips_Lab2LabQ_init( VipsLab2LabQ *Lab2LabQ ) { VipsColour *colour = VIPS_COLOUR( Lab2LabQ ); VipsColourCode *code = VIPS_COLOUR_CODE( Lab2LabQ ); colour->coding = VIPS_CODING_LABQ; colour->interpretation = VIPS_INTERPRETATION_LABQ; colour->format = VIPS_FORMAT_UCHAR; colour->bands = 4; code->input_coding = VIPS_CODING_NONE; code->input_format = VIPS_FORMAT_FLOAT; code->input_bands = 3; } /** * vips_Lab2LabQ: * @in: input image * @out: output image * * Convert a Lab three-band float image to LabQ (#IM_CODING_LABQ). * * See also: vips_LabQ2Lab(). * * Returns: 0 on success, -1 on error. */ int vips_Lab2LabQ( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "Lab2LabQ", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/colourspace.c0000644000175000017500000004367512303141142015164 00000000000000/* convert between colourspaces * * 6/11/12 * - add RGB16 as a destination * 12/1/14 * - add B_W as a source / dest * - add GREY16 as a source / dest * - add RGB16 as a source * 19/1/14 * - auto-decode RAD images */ /* Copyright (C) 1991-2005 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pcolour.h" static int vips_scRGB2RGB16( VipsImage *in, VipsImage **out, ... ) { return( vips_scRGB2sRGB( in, out, "depth", 16, NULL ) ); } static int vips_sRGB2BW( VipsImage *in, VipsImage **out, ... ) { if( vips_extract_band( in, out, 1, NULL ) ) return( -1 ); (*out)->Type = VIPS_INTERPRETATION_B_W; return( 0 ); } static int vips_BW2sRGB( VipsImage *in, VipsImage **out, ... ) { VipsImage *t[3]; t[0] = in; t[1] = in; t[2] = in; if( vips_bandjoin( t, out, 3, NULL ) ) return( -1 ); (*out)->Type = VIPS_INTERPRETATION_sRGB; return( 0 ); } static int vips_RGB162GREY16( VipsImage *in, VipsImage **out, ... ) { if( vips_extract_band( in, out, 1, NULL ) ) return( -1 ); (*out)->Type = VIPS_INTERPRETATION_GREY16; return( 0 ); } static int vips_GREY162RGB16( VipsImage *in, VipsImage **out, ... ) { VipsImage *t[3]; t[0] = in; t[1] = in; t[2] = in; if( vips_bandjoin( t, out, 3, NULL ) ) return( -1 ); (*out)->Type = VIPS_INTERPRETATION_RGB16; return( 0 ); } /* A colour-transforming function. */ typedef int (*VipsColourTransformFn)( VipsImage *in, VipsImage **out, ... ); /* Maximum number of steps we allow in a route. 10 steps should be enough * for anyone. */ #define MAX_STEPS (10) /* A route between two colour spaces. */ typedef struct _VipsColourRoute { VipsInterpretation from; VipsInterpretation to; VipsColourTransformFn route[MAX_STEPS + 1]; } VipsColourRoute; /* Some defines to save typing. These are the colour spaces we support * conversions between. */ #define XYZ VIPS_INTERPRETATION_XYZ #define LAB VIPS_INTERPRETATION_LAB #define LABQ VIPS_INTERPRETATION_LABQ #define LCH VIPS_INTERPRETATION_LCH #define CMC VIPS_INTERPRETATION_CMC #define LABS VIPS_INTERPRETATION_LABS #define scRGB VIPS_INTERPRETATION_scRGB #define sRGB VIPS_INTERPRETATION_sRGB #define RGB16 VIPS_INTERPRETATION_RGB16 #define GREY16 VIPS_INTERPRETATION_GREY16 #define YXY VIPS_INTERPRETATION_YXY #define BW VIPS_INTERPRETATION_B_W /* All the routes we know about. */ static VipsColourRoute vips_colour_routes[] = { { XYZ, LAB, { vips_XYZ2Lab, NULL } }, { XYZ, LABQ, { vips_XYZ2Lab, vips_Lab2LabQ, NULL } }, { XYZ, LCH, { vips_XYZ2Lab, vips_Lab2LCh, NULL } }, { XYZ, CMC, { vips_XYZ2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { XYZ, LABS, { vips_XYZ2Lab, vips_Lab2LabS, NULL } }, { XYZ, scRGB, { vips_XYZ2scRGB, NULL } }, { XYZ, sRGB, { vips_XYZ2scRGB, vips_scRGB2sRGB, NULL } }, { XYZ, BW, { vips_XYZ2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { XYZ, RGB16, { vips_XYZ2scRGB, vips_scRGB2RGB16, NULL } }, { XYZ, GREY16, { vips_XYZ2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { XYZ, YXY, { vips_XYZ2Yxy, NULL } }, { LAB, XYZ, { vips_Lab2XYZ, NULL } }, { LAB, LABQ, { vips_Lab2LabQ, NULL } }, { LAB, LCH, { vips_Lab2LCh, NULL } }, { LAB, CMC, { vips_Lab2LCh, vips_LCh2CMC, NULL } }, { LAB, LABS, { vips_Lab2LabS, NULL } }, { LAB, scRGB, { vips_Lab2XYZ, vips_XYZ2scRGB, NULL } }, { LAB, sRGB, { vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, NULL } }, { LAB, BW, { vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { LAB, RGB16, { vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, NULL } }, { LAB, GREY16, { vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { LAB, YXY, { vips_Lab2XYZ, vips_XYZ2Yxy, NULL } }, { LABQ, XYZ, { vips_LabQ2Lab, vips_Lab2XYZ, NULL } }, { LABQ, LAB, { vips_LabQ2Lab, NULL } }, { LABQ, LCH, { vips_LabQ2Lab, vips_Lab2LCh, NULL } }, { LABQ, CMC, { vips_LabQ2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { LABQ, LABS, { vips_LabQ2LabS, NULL } }, { LABQ, scRGB, { vips_LabQ2Lab, vips_Lab2XYZ, vips_XYZ2scRGB } }, { LABQ, sRGB, { vips_LabQ2sRGB, NULL } }, { LABQ, BW, { vips_LabQ2sRGB, vips_sRGB2BW, NULL } }, { LABQ, RGB16, { vips_LabQ2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, NULL } }, { LABQ, GREY16, { vips_LabQ2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { LABQ, YXY, { vips_LabQ2Lab, vips_Lab2XYZ, vips_XYZ2Yxy, NULL } }, { LCH, XYZ, { vips_LCh2Lab, vips_Lab2XYZ, NULL } }, { LCH, LAB, { vips_LCh2Lab, NULL } }, { LCH, LABQ, { vips_LCh2Lab, vips_Lab2LabQ, NULL } }, { LCH, CMC, { vips_LCh2CMC, NULL } }, { LCH, LABS, { vips_LCh2Lab, vips_Lab2LabS, NULL } }, { LCH, scRGB, { vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, NULL } }, { LCH, sRGB, { vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, NULL } }, { LCH, BW, { vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { LCH, RGB16, { vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, NULL } }, { LCH, GREY16, { vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { LCH, YXY, { vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2Yxy, NULL } }, { CMC, XYZ, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2XYZ, NULL } }, { CMC, LAB, { vips_CMC2LCh, vips_LCh2Lab, NULL } }, { CMC, LABQ, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2LabQ, NULL } }, { CMC, LCH, { vips_CMC2LCh, NULL } }, { CMC, LABS, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2LabS, NULL } }, { CMC, scRGB, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, NULL } }, { CMC, sRGB, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, NULL } }, { CMC, BW, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { CMC, RGB16, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, NULL } }, { CMC, GREY16, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { CMC, YXY, { vips_CMC2LCh, vips_LCh2Lab, vips_Lab2XYZ, vips_XYZ2Yxy, NULL } }, { LABS, XYZ, { vips_LabS2Lab, vips_Lab2XYZ, NULL } }, { LABS, LAB, { vips_LabS2Lab, NULL } }, { LABS, LABQ, { vips_LabS2LabQ, NULL } }, { LABS, LCH, { vips_LabS2Lab, vips_Lab2LCh, NULL } }, { LABS, CMC, { vips_LabS2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { LABS, scRGB, { vips_LabS2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, NULL } }, { LABS, sRGB, { vips_LabS2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, NULL } }, { LABS, BW, { vips_LabS2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { LABS, RGB16, { vips_LabS2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, NULL } }, { LABS, GREY16, { vips_LabS2Lab, vips_Lab2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { LABS, YXY, { vips_LabS2Lab, vips_Lab2XYZ, vips_XYZ2Yxy, NULL } }, { scRGB, XYZ, { vips_scRGB2XYZ, NULL } }, { scRGB, LAB, { vips_scRGB2XYZ, vips_XYZ2Lab, NULL } }, { scRGB, LABQ, { vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabQ, NULL } }, { scRGB, LCH, { vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, NULL } }, { scRGB, CMC, { vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { scRGB, sRGB, { vips_scRGB2sRGB, NULL } }, { scRGB, BW, { vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { scRGB, LABS, { vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabS, NULL } }, { scRGB, RGB16, { vips_scRGB2RGB16, NULL } }, { scRGB, GREY16, { vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { scRGB, YXY, { vips_scRGB2XYZ, vips_XYZ2Yxy, NULL } }, { sRGB, XYZ, { vips_sRGB2scRGB, vips_scRGB2XYZ, NULL } }, { sRGB, LAB, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, NULL } }, { sRGB, LABQ, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabQ, NULL } }, { sRGB, LCH, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, NULL } }, { sRGB, CMC, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { sRGB, scRGB, { vips_sRGB2scRGB, NULL } }, { sRGB, BW, { vips_sRGB2BW, NULL } }, { sRGB, LABS, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabS, NULL } }, { sRGB, RGB16, { vips_sRGB2scRGB, vips_scRGB2RGB16, NULL } }, { sRGB, GREY16, { vips_sRGB2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { sRGB, YXY, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Yxy, NULL } }, { RGB16, XYZ, { vips_sRGB2scRGB, vips_scRGB2XYZ, NULL } }, { RGB16, LAB, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, NULL } }, { RGB16, LABQ, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabQ, NULL } }, { RGB16, LCH, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, NULL } }, { RGB16, CMC, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { RGB16, scRGB, { vips_sRGB2scRGB, NULL } }, { RGB16, sRGB, { vips_sRGB2scRGB, vips_scRGB2sRGB, NULL } }, { RGB16, BW, { vips_sRGB2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { RGB16, LABS, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabS, NULL } }, { RGB16, GREY16, { vips_RGB162GREY16, NULL } }, { RGB16, YXY, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Yxy, NULL } }, { GREY16, XYZ, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2XYZ, NULL } }, { GREY16, LAB, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, NULL } }, { GREY16, LABQ, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabQ, NULL } }, { GREY16, LCH, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, NULL } }, { GREY16, CMC, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { GREY16, scRGB, { vips_GREY162RGB16, vips_sRGB2scRGB, NULL } }, { GREY16, sRGB, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2sRGB, NULL } }, { GREY16, BW, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { GREY16, LABS, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabS, NULL } }, { GREY16, RGB16, { vips_GREY162RGB16, NULL } }, { GREY16, YXY, { vips_GREY162RGB16, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Yxy, NULL } }, { BW, XYZ, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2XYZ, NULL } }, { BW, LAB, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, NULL } }, { BW, LABQ, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabQ, NULL } }, { BW, LCH, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, NULL } }, { BW, CMC, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { BW, scRGB, { vips_BW2sRGB, vips_sRGB2scRGB, NULL } }, { BW, sRGB, { vips_BW2sRGB, NULL } }, { BW, LABS, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab, vips_Lab2LabS, NULL } }, { BW, RGB16, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2RGB16, NULL } }, { BW, GREY16, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } }, { BW, YXY, { vips_BW2sRGB, vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Yxy, NULL } }, { YXY, XYZ, { vips_Yxy2XYZ, NULL } }, { YXY, LAB, { vips_Yxy2XYZ, vips_XYZ2Lab, NULL } }, { YXY, LABQ, { vips_Yxy2XYZ, vips_XYZ2Lab, vips_Lab2LabQ, NULL } }, { YXY, LCH, { vips_Yxy2XYZ, vips_XYZ2Lab, vips_Lab2LCh, NULL } }, { YXY, CMC, { vips_Yxy2XYZ, vips_XYZ2Lab, vips_Lab2LCh, vips_LCh2CMC, NULL } }, { YXY, LABS, { vips_Yxy2XYZ, vips_XYZ2Lab, vips_Lab2LabS, NULL } }, { YXY, scRGB, { vips_Yxy2XYZ, vips_XYZ2scRGB, NULL } }, { YXY, sRGB, { vips_Yxy2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, NULL } }, { YXY, BW, { vips_Yxy2XYZ, vips_XYZ2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } }, { YXY, RGB16, { vips_Yxy2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, NULL } }, { YXY, GREY16, { vips_Yxy2XYZ, vips_XYZ2scRGB, vips_scRGB2RGB16, vips_RGB162GREY16, NULL } } }; /* Is an image in a supported colourspace. */ /** * vips_colourspace_issupported: * @in: input image * * Test if @image is in a colourspace that vips_colourspace() can process. For * example, #VIPS_INTERPRETATION_RGB images are not in a well-defined * colourspace, but #VIPS_INTERPRETATION_sRGB ones are. * * Returns: %TRUE if @image is in a supported colourspace. */ gboolean vips_colourspace_issupported( const VipsImage *image ) { VipsInterpretation interpretation; int i; /* Treat RGB and RGB16 as sRGB. If you want some other treatment, * you'll need to use the icc funcs. * * sRGB2XYZ can handle 8 and 16-bit images. */ interpretation = vips_image_guess_interpretation( image ); if( interpretation == VIPS_INTERPRETATION_RGB || interpretation == VIPS_INTERPRETATION_RGB16 ) interpretation = VIPS_INTERPRETATION_sRGB; for( i = 0; i < VIPS_NUMBER( vips_colour_routes ); i++ ) if( vips_colour_routes[i].from == interpretation ) return( TRUE ); return( FALSE ); } typedef struct _VipsColourspace { VipsOperation parent_instance; VipsImage *in; VipsImage *out; VipsInterpretation space; } VipsColourspace; typedef VipsOperationClass VipsColourspaceClass; G_DEFINE_TYPE( VipsColourspace, vips_colourspace, VIPS_TYPE_OPERATION ); static int vips_colourspace_build( VipsObject *object ) { VipsColourspace *colourspace = (VipsColourspace *) object; int i, j; VipsImage *x; VipsImage **t = (VipsImage **) vips_object_local_array( object, 1 ); VipsImage **pipe = (VipsImage **) vips_object_local_array( object, MAX_STEPS ); VipsInterpretation interpretation; /* Verify that all input args have been set. */ if( VIPS_OBJECT_CLASS( vips_colourspace_parent_class )-> build( object ) ) return( -1 ); x = colourspace->in; /* Unpack radiance-coded images. We can't use interpretation for this, * since rad images can be scRGB or XYZ. */ if( x->Coding == VIPS_CODING_RAD ) { if( vips_rad2float( x, &t[0], NULL ) ) return( -1 ); x = t[0]; } interpretation = vips_image_guess_interpretation( x ); /* Treat RGB and RGB16 as sRGB. If you want some other treatment, * you'll need to use the icc funcs. * * sRGB2XYZ can handle 8 and 16-bit images. */ if( interpretation == VIPS_INTERPRETATION_RGB || interpretation == VIPS_INTERPRETATION_RGB16 ) interpretation = VIPS_INTERPRETATION_sRGB; /* No conversion necessary. */ if( interpretation == colourspace->space ) { g_object_set( colourspace, "out", vips_image_new(), NULL ); return( vips_image_write( colourspace->in, colourspace->out ) ); } for( i = 0; i < VIPS_NUMBER( vips_colour_routes ); i++ ) if( vips_colour_routes[i].from == interpretation && vips_colour_routes[i].to == colourspace->space ) break; if( i == VIPS_NUMBER( vips_colour_routes ) ) { vips_error( "vips_colourspace", _( "no known route between '%s' and '%s'" ), vips_enum_nick( VIPS_TYPE_INTERPRETATION, interpretation ), vips_enum_nick( VIPS_TYPE_INTERPRETATION, colourspace->space ) ); return( -1 ); } for( j = 0; vips_colour_routes[i].route[j]; j++ ) { if( vips_colour_routes[i].route[j]( x, &pipe[j], NULL ) ) return( -1 ); x = pipe[j]; } g_object_set( colourspace, "out", vips_image_new(), NULL ); if( vips_image_write( x, colourspace->out ) ) return( -1 ); return( 0 ); } static void vips_colourspace_class_init( VipsColourspaceClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "colourspace"; vobject_class->description = _( "convert to a new colourspace" ); vobject_class->build = vips_colourspace_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsColourspace, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsColourspace, out ) ); VIPS_ARG_ENUM( class, "space", 6, _( "Space" ), _( "Destination colour space" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsColourspace, space ), VIPS_TYPE_INTERPRETATION, VIPS_INTERPRETATION_sRGB ); } static void vips_colourspace_init( VipsColourspace *colourspace ) { } /** * vips_colourspace: * @in: input image * @out: output image * @space: convert to this colour space * * This operation looks at the interpretation field of @in and runs * a set of colourspace conversion functions to move it to @space. * * For example, given an image tagged as #VIPS_INTERPRETATION_YXY, running * vips_colourspace() with @space set to #VIPS_INTERPRETATION_LAB will * convert with vips_Yxy2XYZ() and vips_XYZ2Lab(). * * See also: vips_colourspace_issupported(), * vips_image_guess_interpretation(). * * Returns: 0 on success, -1 on error. */ int vips_colourspace( VipsImage *in, VipsImage **out, VipsInterpretation space, ... ) { va_list ap; int result; va_start( ap, space ); result = vips_call_split( "colourspace", ap, in, out, space ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/Lab2LabS.c0000644000175000017500000000546412303140253014163 00000000000000/* Lab2LabS: quantise FLOAT Lab image into signed short format * * 12/12/02 JC * - from im_Lab2LabS * 1/11/09 * - gtkdoc * - cleanups * 20/9/12 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourCode VipsLab2LabS; typedef VipsColourCodeClass VipsLab2LabSClass; G_DEFINE_TYPE( VipsLab2LabS, vips_Lab2LabS, VIPS_TYPE_COLOUR_CODE ); static void vips_Lab2LabS_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p = (float *) in[0]; signed short * restrict q = (signed short *) out; int i; for( i = 0; i < width; i++ ) { q[0] = p[0] * (32767.0 / 100.0); q[1] = p[1] * (32768.0 / 128.0); q[2] = p[2] * (32768.0 / 128.0); q += 3; p += 3; } } static void vips_Lab2LabS_class_init( VipsLab2LabSClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "Lab2LabS"; object_class->description = _( "transform float Lab to signed short" ); colour_class->process_line = vips_Lab2LabS_line; } static void vips_Lab2LabS_init( VipsLab2LabS *Lab2LabS ) { VipsColour *colour = VIPS_COLOUR( Lab2LabS ); VipsColourCode *code = VIPS_COLOUR_CODE( Lab2LabS ); colour->interpretation = VIPS_INTERPRETATION_LABS; colour->format = VIPS_FORMAT_SHORT; colour->bands = 3; code->input_coding = VIPS_CODING_NONE; code->input_format = VIPS_FORMAT_FLOAT; code->input_bands = 3; } /** * vips_Lab2LabS: * @in: input image * @out: output image * * Turn Lab to LabS, signed 16-bit int fixed point. * * See also: vips_LabQ2Lab(). * * Returns: 0 on success, -1 on error. */ int vips_Lab2LabS( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "Lab2LabS", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/LabS2LabQ.c0000644000175000017500000000710512303140253014276 00000000000000/* LabS2LabQ() * * 17/11/93 JC * - adapted from im_LabS2LabQ() * 16/11/94 JC * - adapted to new im_wrap_oneonebuf() function * 15/6/95 JC * - oops! rounding was broken * 6/6/95 JC * - added round-to-nearest * - somewhat slower ... * 21/12/99 JC * - a/b ==0 rounding was broken * 2/11/09 * - gtkdoc, cleanup * 21/9/12 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pcolour.h" typedef VipsColourCode VipsLabS2LabQ; typedef VipsColourCodeClass VipsLabS2LabQClass; G_DEFINE_TYPE( VipsLabS2LabQ, vips_LabS2LabQ, VIPS_TYPE_COLOUR_CODE ); /* Convert n pels from signed short to IM_CODING_LABQ. */ static void vips_LabS2LabQ_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { signed short *p = (signed short *) in[0]; unsigned char *q = (unsigned char *) out; int i; int l, a, b; unsigned char ext; for( i = 0; i < width; i++ ) { /* Get LAB, rounding to 10, 11, 11. */ l = p[0] + 16; l = VIPS_CLIP( 0, l, 32767 ); l >>= 5; /* Make sure we round -ves in the right direction! */ a = p[1]; if( a >= 0 ) a += 16; else a -= 16; a = VIPS_CLIP( -32768, a, 32767 ); a >>= 5; b = p[2]; if( b >= 0 ) b += 16; else b -= 16; b = VIPS_CLIP( -32768, b, 32767 ); b >>= 5; p += 3; /* Extract top 8 bits. */ q[0] = l >> 2; q[1] = a >> 3; q[2] = b >> 3; /* Form extension byte. */ ext = (l << 6) & 0xc0; ext |= (a << 3) & 0x38; ext |= b & 0x7; q[3] = ext; q += 4; } } static void vips_LabS2LabQ_class_init( VipsLabS2LabQClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "LabS2LabQ"; object_class->description = _( "transform short Lab to LabQ coding" ); colour_class->process_line = vips_LabS2LabQ_line; } static void vips_LabS2LabQ_init( VipsLabS2LabQ *LabS2LabQ ) { VipsColour *colour = VIPS_COLOUR( LabS2LabQ ); VipsColourCode *code = VIPS_COLOUR_CODE( LabS2LabQ ); colour->coding = VIPS_CODING_LABQ; colour->interpretation = VIPS_INTERPRETATION_LABQ; colour->format = VIPS_FORMAT_UCHAR; colour->bands = 4; code->input_coding = VIPS_CODING_NONE; code->input_format = VIPS_FORMAT_SHORT; code->input_bands = 3; } /** * vips_LabS2LabQ: * @in: input image * @out: output image * * Convert a LabS three-band signed short image to LabQ * * See also: vips_LabQ2LabS(). * * Returns: 0 on success, -1 on error. */ int vips_LabS2LabQ( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "LabS2LabQ", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/Lab2LCh.c0000644000175000017500000000607312303140253014005 00000000000000/* Turn Lab to LCh * * 2/11/09 * - gtkdoc * - cleanups * 18/9/12 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourSpace VipsLab2LCh; typedef VipsColourSpaceClass VipsLab2LChClass; G_DEFINE_TYPE( VipsLab2LCh, vips_Lab2LCh, VIPS_TYPE_COLOUR_SPACE ); /** * vips_col_ab2h: * @a: CIE a * @b: CIE b * * Returns: Hue (degrees) */ double vips_col_ab2h( double a, double b ) { double h; /* We have to get the right quadrant! */ if( a == 0 ) { if( b < 0.0 ) h = 270; else if( b == 0.0 ) h = 0; else h = 90; } else { double t = atan( b / a ); if( a > 0.0 ) if( b < 0.0 ) h = VIPS_DEG( t + VIPS_PI * 2.0 ); else h = VIPS_DEG( t ); else h = VIPS_DEG( t + VIPS_PI ); } return( h ); } void vips_col_ab2Ch( float a, float b, float *C, float *h ) { *h = vips_col_ab2h( a, b ); *C = sqrt( a * a + b * b ); } static void vips_Lab2LCh_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p = (float *) in[0]; float * restrict q = (float *) out; int x; for( x = 0; x < width; x++ ) { float L = p[0]; float a = p[1]; float b = p[2]; float C, h; p += 3; C = sqrt( a * a + b * b ); h = vips_col_ab2h( a, b ); q[0] = L; q[1] = C; q[2] = h; q += 3; } } static void vips_Lab2LCh_class_init( VipsLab2LChClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "Lab2LCh"; object_class->description = _( "transform Lab to LCh" ); colour_class->process_line = vips_Lab2LCh_line; } static void vips_Lab2LCh_init( VipsLab2LCh *Lab2LCh ) { VipsColour *colour = VIPS_COLOUR( Lab2LCh ); colour->interpretation = VIPS_INTERPRETATION_LCH; } /** * vips_Lab2LCh: * @in: input image * @out: output image * * Turn Lab to LCh. * * Returns: 0 on success, -1 on error */ int vips_Lab2LCh( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "Lab2LCh", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/Makefile.in0000644000175000017500000005563112303144055014547 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/colour DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcolour_la_LIBADD = am_libcolour_la_OBJECTS = colour.lo colourspace.lo dE76.lo dE00.lo \ dECMC.lo icc_transform.lo Lab2XYZ.lo Lab2LCh.lo LCh2Lab.lo \ LCh2UCS.lo UCS2LCh.lo XYZ2Lab.lo XYZ2Yxy.lo Yxy2XYZ.lo \ float2rad.lo rad2float.lo Lab2LabQ.lo LabQ2Lab.lo LabS2Lab.lo \ Lab2LabS.lo LabS2LabQ.lo LabQ2LabS.lo LabQ2sRGB.lo \ sRGB2scRGB.lo scRGB2XYZ.lo XYZ2scRGB.lo scRGB2sRGB.lo libcolour_la_OBJECTS = $(am_libcolour_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcolour_la_SOURCES) DIST_SOURCES = $(libcolour_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libcolour.la libcolour_la_SOURCES = \ colour.c \ pcolour.h \ colourspace.c \ dE76.c \ dE00.c \ dECMC.c \ icc_transform.c \ Lab2XYZ.c \ Lab2LCh.c \ LCh2Lab.c \ LCh2UCS.c \ UCS2LCh.c \ XYZ2Lab.c \ XYZ2Yxy.c \ Yxy2XYZ.c \ float2rad.c \ rad2float.c \ Lab2LabQ.c \ LabQ2Lab.c \ LabS2Lab.c \ Lab2LabS.c \ LabS2LabQ.c \ LabQ2LabS.c \ LabQ2sRGB.c \ sRGB2scRGB.c \ scRGB2XYZ.c \ XYZ2scRGB.c \ scRGB2sRGB.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/colour/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/colour/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcolour.la: $(libcolour_la_OBJECTS) $(libcolour_la_DEPENDENCIES) $(EXTRA_libcolour_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcolour_la_OBJECTS) $(libcolour_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LCh2Lab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LCh2UCS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Lab2LCh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Lab2LabQ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Lab2LabS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Lab2XYZ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LabQ2Lab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LabQ2LabS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LabQ2sRGB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LabS2Lab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LabS2LabQ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UCS2LCh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XYZ2Lab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XYZ2Yxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XYZ2scRGB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Yxy2XYZ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colour.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colourspace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dE00.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dE76.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dECMC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float2rad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icc_transform.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rad2float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sRGB2scRGB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scRGB2XYZ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scRGB2sRGB.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/colour/Yxy2XYZ.c0000644000175000017500000000505412303140253014122 00000000000000/* Turn Yxy to XYZ colourspace. * * Modified: * 29/5/02 JC * - from lab2xyz * 2/11/09 * - gtkdoc * - cleanups * 20/9/12 * redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourSpace VipsYxy2XYZ; typedef VipsColourSpaceClass VipsYxy2XYZClass; G_DEFINE_TYPE( VipsYxy2XYZ, vips_Yxy2XYZ, VIPS_TYPE_COLOUR_SPACE ); void vips_Yxy2XYZ_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p = (float *) in[0]; float * restrict q = (float *) out; int i; for( i = 0; i < width; i++ ) { float Y = p[0]; float x = p[1]; float y = p[2]; double total; float X, Z; p += 3; total = Y / y; X = x * total; Z = (X - x * X - x * Y) / x; q[0] = X; q[1] = Y; q[2] = Z; q += 3; } } static void vips_Yxy2XYZ_class_init( VipsYxy2XYZClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "Yxy2XYZ"; object_class->description = _( "transform Yxy to XYZ" ); colour_class->process_line = vips_Yxy2XYZ_line; } static void vips_Yxy2XYZ_init( VipsYxy2XYZ *Yxy2XYZ ) { VipsColour *colour = VIPS_COLOUR( Yxy2XYZ ); colour->interpretation = VIPS_INTERPRETATION_XYZ; } /** * vips_Yxy2XYZ: * @in: input image * @out: output image * * Turn XYZ to Yxy. * * Returns: 0 on success, -1 on error */ int vips_Yxy2XYZ( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "Yxy2XYZ", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/Makefile.am0000644000175000017500000000101612303140253014516 00000000000000noinst_LTLIBRARIES = libcolour.la libcolour_la_SOURCES = \ colour.c \ pcolour.h \ colourspace.c \ dE76.c \ dE00.c \ dECMC.c \ icc_transform.c \ Lab2XYZ.c \ Lab2LCh.c \ LCh2Lab.c \ LCh2UCS.c \ UCS2LCh.c \ XYZ2Lab.c \ XYZ2Yxy.c \ Yxy2XYZ.c \ float2rad.c \ rad2float.c \ Lab2LabQ.c \ LabQ2Lab.c \ LabS2Lab.c \ Lab2LabS.c \ LabS2LabQ.c \ LabQ2LabS.c \ LabQ2sRGB.c \ sRGB2scRGB.c \ scRGB2XYZ.c \ XYZ2scRGB.c \ scRGB2sRGB.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/colour/LabQ2sRGB.c0000644000175000017500000002576712303140253014270 00000000000000/* Turn Lab 32bit packed format into displayable rgb. Fast, but very * inaccurate: for display only! Note especially that this dithers and will * give different results on different runs. * * The XYZ <-> sRGB transform implemented is this one: * * http://en.wikipedia.org/wiki/SRGB * * 5/11/97 Steve Perry * - adapted from old ip code * 7/11/97 JC * - small tidies, added to VIPS * - LUT build split into separate function * 21/9/12 * - redone as a class * - sRGB only, support for other RGBs is now via lcms * 1/11/12 * - faster and more accurate sRGB <-> XYZ conversion * 6/11/12 * - added a 16-bit path * 11/12/12 * - spot NaN, Inf in XYZ2RGB, they break LUT indexing * - split sRGB <-> XYZ into sRGB <-> scRGB <-> XYZ so we can support * scRGB as a colourspace */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pcolour.h" typedef VipsColourCode VipsLabQ2sRGB; typedef VipsColourCodeClass VipsLabQ2sRGBClass; G_DEFINE_TYPE( VipsLabQ2sRGB, vips_LabQ2sRGB, VIPS_TYPE_COLOUR_CODE ); /* 8-bit linear -> sRGB lut. * * There's an extra element at the end to let us do a +1 for interpolation. */ static int vips_Y2v_8[256 + 1]; /* 8-bit sRGB -> linear lut. */ static float vips_v2Y_8[256]; /* 16-bit linear -> sRGB lut. * * There's an extra element at the end to let us do a +1 for interpolation. */ static int vips_Y2v_16[65536 + 1]; /* 16-bit sRGB -> linear lut. */ static float vips_v2Y_16[65536]; /* Do our own indexing of the arrays below to make sure we get efficient mults. */ #define INDEX( L, A, B ) (L + (A << 6) + (B << 12)) /* A set of LUTs for quick LabQ->sRGB transforms. */ static VipsPel vips_red[64 * 64 * 64]; static VipsPel vips_green[64 * 64 * 64]; static VipsPel vips_blue[64 * 64 * 64]; /* sRGB to scRGB. * * @range is eg. 256 for 8-bit data. */ static int vips_col_sRGB2scRGB( int range, float *lut, int r, int g, int b, float *R, float *G, float *B ) { int maxval = range - 1; int i; i = VIPS_CLIP( 0, r, maxval ); *R = lut[i]; i = VIPS_CLIP( 0, g, maxval ); *G = lut[i]; i = VIPS_CLIP( 0, b, maxval ); *B = lut[i]; return( 0 ); } /* Create the sRGB linear and unlinear luts. @range is eg. 256 for 8-bit luts. */ static void calcul_tables( int range, int *Y2v, float *v2Y ) { int i; for( i = 0; i < range; i++ ) { float f = (float) i / (range - 1); float v; if( f <= 0.0031308 ) v = 12.92 * f; else v = (1.0 + 0.055) * pow( f, 1.0 / 2.4 ) - 0.055; Y2v[i] = VIPS_RINT( (range - 1) * v ); } /* Copy the final element. This is used in the piecewise linear * interpolator below. */ Y2v[range] = Y2v[range - 1]; for( i = 0; i < range; i++ ) { float f = (float) i / (range - 1); if( f <= 0.04045 ) v2Y[i] = f / 12.92; else v2Y[i] = pow( (f + 0.055) / (1 + 0.055), 2.4 ); } } static void * calcul_tables_8( void *client ) { calcul_tables( 256, vips_Y2v_8, vips_v2Y_8 ); return( NULL ); } static void vips_col_make_tables_RGB_8( void ) { static gboolean made_tables = FALSE; /* We want to avoid having a mutex in this path, so use gonce and a * static var instead. */ if( !made_tables ) { static GOnce once = G_ONCE_INIT; (void) g_once( &once, calcul_tables_8, NULL ); made_tables = TRUE; } } int vips_col_sRGB2scRGB_8( int r, int g, int b, float *R, float *G, float *B ) { vips_col_make_tables_RGB_8(); return( vips_col_sRGB2scRGB( 256, vips_v2Y_8, r, g, b, R, G, B ) ); } static void * calcul_tables_16( void *client ) { calcul_tables( 65536, vips_Y2v_16, vips_v2Y_16 ); return( NULL ); } static void vips_col_make_tables_RGB_16( void ) { static gboolean made_tables = FALSE; /* We want to avoid having a mutex in this path, so use gonce and a * static var instead. */ if( !made_tables ) { static GOnce once = G_ONCE_INIT; (void) g_once( &once, calcul_tables_16, NULL ); made_tables = TRUE; } } int vips_col_sRGB2scRGB_16( int r, int g, int b, float *R, float *G, float *B ) { vips_col_make_tables_RGB_16(); return( vips_col_sRGB2scRGB( 65536, vips_v2Y_16, r, g, b, R, G, B ) ); } /* The matrix already includes the D65 channel weighting, so we just scale by * Y. */ #define SCALE (VIPS_D65_Y0) /* scRGB to XYZ. */ int vips_col_scRGB2XYZ( float R, float G, float B, float *X, float *Y, float *Z ) { *X = SCALE * 0.4124 * R + SCALE * 0.3576 * G + SCALE * 0.18056 * B; *Y = SCALE * 0.2126 * R + SCALE * 0.7152 * G + SCALE * 0.07220 * B; *Z = SCALE * 0.0193 * R + SCALE * 0.1192 * G + SCALE * 0.9505 * B; return( 0 ); } /* Turn XYZ into scRGB. */ int vips_col_XYZ2scRGB( float X, float Y, float Z, float *R, float *G, float *B ) { *R = 3.2406 / SCALE * X + -1.5372 / SCALE * Y + -0.4986 / SCALE * Z; *G = -0.9689 / SCALE * X + 1.8758 / SCALE * Y + 0.0415 / SCALE * Z; *B = 0.0557 / SCALE * X + -0.2040 / SCALE * Y + 1.0570 / SCALE * Z; return( 0 ); } /* Turn scRGB into sRGB. Return or=1 for out of gamut - rgb will contain an * approximation of the right colour. * * Return -1 for NaN, Inf etc. */ static int vips_col_scRGB2sRGB( int range, int *lut, float R, float G, float B, int *r, int *g, int *b, int *or_ret ) { int maxval = range - 1; int or; float Yf; int Yi; float v; /* XYZ can be Nan, Inf etc. Throw those values out, they will break * our clipping. */ if( !isnormal( R ) || !isnormal( G ) || !isnormal( B ) ) { *r = 0; *g = 0; *b = 0; return( -1 ); } /* Clip range, set the out-of-range flag. */ #define CLIP( L, V, H ) { \ if( (V) < (L) ) { \ (V) = (L); \ or = 1; \ } \ if( (V) > (H) ) { \ (V) = (H); \ or = 1; \ } \ } /* Look up with a float index: interpolate between the nearest two * points. * * The +1 on the index is safe, see above. */ or = 0; Yf = R * maxval; CLIP( 0, Yf, maxval ); Yi = (int) Yf; v = lut[Yi] + (lut[Yi + 1] - lut[Yi]) * (Yf - Yi); *r = VIPS_RINT( v ); Yf = G * maxval; CLIP( 0, Yf, maxval ); Yi = (int) Yf; v = lut[Yi] + (lut[Yi + 1] - lut[Yi]) * (Yf - Yi); *g = VIPS_RINT( v ); Yf = B * maxval; CLIP( 0, Yf, maxval ); Yi = (int) Yf; v = lut[Yi] + (lut[Yi + 1] - lut[Yi]) * (Yf - Yi); *b = VIPS_RINT( v ); if( or_ret ) *or_ret = or; return( 0 ); } int vips_col_scRGB2sRGB_8( float R, float G, float B, int *r, int *g, int *b, int *or ) { vips_col_make_tables_RGB_8(); return( vips_col_scRGB2sRGB( 256, vips_Y2v_8, R, G, B, r, g, b, or ) ); } int vips_col_scRGB2sRGB_16( float R, float G, float B, int *r, int *g, int *b, int *or ) { vips_col_make_tables_RGB_16(); return( vips_col_scRGB2sRGB( 65536, vips_Y2v_16, R, G, B, r, g, b, or ) ); } /* Build Lab->disp dither tables. */ static void * build_tables( void *client ) { int l, a, b; int t; for( l = 0; l < 64; l++ ) { for( a = 0; a < 64; a++ ) { for( b = 0; b < 64; b++ ) { /* Scale to lab space. */ float L = (l << 2) * (100.0/256.0); float A = (signed char) (a << 2); float B = (signed char) (b << 2); float X, Y, Z; float Rf, Gf, Bf; int rb, gb, bb; int oflow; vips_col_Lab2XYZ( L, A, B, &X, &Y, &Z ); vips_col_XYZ2scRGB( X, Y, Z, &Rf, &Gf, &Bf ); vips_col_scRGB2sRGB_8( Rf, Gf, Bf, &rb, &gb, &bb, &oflow ); t = INDEX( l, a, b ); vips_red[t] = rb; vips_green[t] = gb; vips_blue[t] = bb; } } } return( NULL ); } static void vips_col_make_tables_LabQ2sRGB( void ) { static GOnce once = G_ONCE_INIT; (void) g_once( &once, build_tables, NULL ); } /* Process a buffer of data. */ static void vips_LabQ2sRGB_line( VipsColour *colour, VipsPel *q, VipsPel **in, int width ) { unsigned char *p = (unsigned char *) in[0]; int i, t; /* Current error. */ int le = 0; int ae = 0; int be = 0; for( i = 0; i < width; i++ ) { /* Get colour, add in error from previous pixel. */ int L = p[0] + le; int A = (signed char) p[1] + ae; int B = (signed char) p[2] + be; p += 4; /* Look out for overflow. */ L = VIPS_MIN( 255, L ); A = VIPS_MIN( 127, A ); B = VIPS_MIN( 127, B ); /* Find new quant error. This will always be +ve. */ le = L & 3; ae = A & 3; be = B & 3; /* Scale to 0-63. */ L = (L >> 2) & 63; A = (A >> 2) & 63; B = (B >> 2) & 63; /* Convert to RGB. */ t = INDEX( L, A, B ); q[0] = vips_red[t]; q[1] = vips_green[t]; q[2] = vips_blue[t]; q += 3; } } static void vips_LabQ2sRGB_class_init( VipsLabQ2sRGBClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "LabQ2sRGB"; object_class->description = _( "unpack a LabQ image to short Lab" ); colour_class->process_line = vips_LabQ2sRGB_line; vips_col_make_tables_LabQ2sRGB(); } static void vips_LabQ2sRGB_init( VipsLabQ2sRGB *LabQ2sRGB ) { VipsColour *colour = VIPS_COLOUR( LabQ2sRGB ); VipsColourCode *code = VIPS_COLOUR_CODE( LabQ2sRGB ); colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_sRGB; colour->format = VIPS_FORMAT_UCHAR; colour->bands = 3; code->input_coding = VIPS_CODING_LABQ; } /** * vips_LabQ2sRGB: * @in: input image * @out: output image * * Unpack a LabQ (#VIPS_CODING_LABQ) image to a three-band short image. * * See also: vips_LabS2LabQ(), vips_LabQ2sRGB(), vips_rad2float(). * * Returns: 0 on success, -1 on error. */ int vips_LabQ2sRGB( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "LabQ2sRGB", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/float2rad.c0000644000175000017500000001634612303140253014520 00000000000000/* Convert float to Radiance 32bit packed format * * 23/3/09 * - from im_rad2float and Radiance sources * 2/11/09 * - gtkdoc * 20/9/12 * - redo as a class * 13/12/12 * - tag as scRGB rather than XYZ */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Sections of this file from Greg Ward and Radiance with kind permission. The Radience copyright notice appears below. */ /* ==================================================================== * The Radiance Software License, Version 1.0 * * Copyright (c) 1990 - 2009 The Regents of the University of California, * through Lawrence Berkeley National Laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes Radiance software * (http://radsite.lbl.gov/) * developed by the Lawrence Berkeley National Laboratory * (http://www.lbl.gov/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Radiance," "Lawrence Berkeley National Laboratory" * and "The Regents of the University of California" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact radiance@radsite.lbl.gov. * * 5. Products derived from this software may not be called "Radiance", * nor may "Radiance" appear in their name, without prior written * permission of Lawrence Berkeley National Laboratory. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of Lawrence Berkeley National Laboratory. For more * information on Lawrence Berkeley National Laboratory, please see * . */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" /* Begin copy-paste from Radiance sources. */ #define RED 0 #define GRN 1 #define BLU 2 #define CIEX 0 /* or, if input is XYZ... */ #define CIEY 1 #define CIEZ 2 #define EXP 3 /* exponent same for either format */ #define COLXS 128 /* excess used for exponent */ #define WHT 3 /* used for RGBPRIMS type */ #undef BYTE #define BYTE unsigned char /* 8-bit unsigned integer */ typedef BYTE COLR[4]; /* red, green, blue (or X,Y,Z), exponent */ typedef float COLORV; typedef COLORV COLOR[3]; /* red, green, blue (or X,Y,Z) */ #define copycolor(c1,c2) ((c1)[0]=(c2)[0],(c1)[1]=(c2)[1],(c1)[2]=(c2)[2]) static void setcolr( COLR clr, double r, double g, double b ) /* assign a short color value */ { double d; int e; d = r > g ? r : g; if (b > d) d = b; if (d <= 1e-32) { clr[RED] = clr[GRN] = clr[BLU] = 0; clr[EXP] = 0; return; } d = frexp(d, &e) * 255.9999 / d; if (r > 0.0) clr[RED] = r * d; else clr[RED] = 0; if (g > 0.0) clr[GRN] = g * d; else clr[GRN] = 0; if (b > 0.0) clr[BLU] = b * d; else clr[BLU] = 0; clr[EXP] = e + COLXS; } /* End copy-paste from Radiance sources. */ typedef VipsColourCode VipsFloat2rad; typedef VipsColourCodeClass VipsFloat2radClass; G_DEFINE_TYPE( VipsFloat2rad, vips_float2rad, VIPS_TYPE_COLOUR_CODE ); static void vips_float2rad_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { COLOR *inp = (COLOR *) in[0]; COLR *outbuf = (COLR *) out; while( width-- > 0 ) { setcolr( outbuf[0], inp[0][RED], inp[0][GRN], inp[0][BLU] ); inp++; outbuf++; } } static void vips_float2rad_class_init( VipsFloat2radClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "float2rad"; object_class->description = _( "transform float RGB to Radiance coding" ); colour_class->process_line = vips_float2rad_line; } static void vips_float2rad_init( VipsFloat2rad *float2rad ) { VipsColour *colour = VIPS_COLOUR( float2rad ); VipsColourCode *code = VIPS_COLOUR_CODE( float2rad ); colour->coding = VIPS_CODING_RAD; colour->interpretation = VIPS_INTERPRETATION_scRGB; colour->format = VIPS_FORMAT_UCHAR; colour->bands = 4; code->input_coding = VIPS_CODING_NONE; code->input_format = VIPS_FORMAT_FLOAT; code->input_bands = 3; } /** * vips_float2rad: * @in: input image * @out: output image * * Convert a three-band float image to Radiance 32-bit packed format. * * See also: vips_rad2float(), #VipsFormatRad, vips_LabQ2Lab(). * * Returns: 0 on success, -1 on error. */ int vips_float2rad( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "float2rad", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/XYZ2Yxy.c0000644000175000017500000000503712303140253014123 00000000000000/* Turn XYZ to Yxy colourspace. * * Modified: * 29/5/02 JC * - from lab2xyz * 2/11/09 * - gtkdoc * - cleanups * 20/9/12 * redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef VipsColourSpace VipsXYZ2Yxy; typedef VipsColourSpaceClass VipsXYZ2YxyClass; G_DEFINE_TYPE( VipsXYZ2Yxy, vips_XYZ2Yxy, VIPS_TYPE_COLOUR_SPACE ); static void vips_XYZ2Yxy_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p = (float *) in[0]; float * restrict q = (float *) out; int i; for( i = 0; i < width; i++ ) { float X = p[0]; float Y = p[1]; float Z = p[2]; double total = X + Y + Z; float x, y; p += 3; x = X / total; y = Y / total; q[0] = Y; q[1] = x; q[2] = y; q += 3; } } static void vips_XYZ2Yxy_class_init( VipsXYZ2YxyClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "XYZ2Yxy"; object_class->description = _( "transform XYZ to Yxy" ); colour_class->process_line = vips_XYZ2Yxy_line; } static void vips_XYZ2Yxy_init( VipsXYZ2Yxy *XYZ2Yxy ) { VipsColour *colour = VIPS_COLOUR( XYZ2Yxy ); colour->interpretation = VIPS_INTERPRETATION_YXY; } /** * vips_XYZ2Yxy: * @in: input image * @out: output image * * Turn XYZ to Yxy. * * Returns: 0 on success, -1 on error */ int vips_XYZ2Yxy( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "XYZ2Yxy", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/dE76.c0000644000175000017500000000624212303140253013341 00000000000000/* dE76.c * * Modified: * 16/11/94 JC * - partialed! * 31/10/09 * - use im__colour_binary() * - gtkdoc comment * 25/10/12 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pcolour.h" typedef struct _VipsdE76 { VipsColourDifference parent_instance; } VipsdE76; typedef VipsColourSpaceClass VipsdE76Class; G_DEFINE_TYPE( VipsdE76, vips_dE76, VIPS_TYPE_COLOUR_DIFFERENCE ); /** * vips_pythagoras: * @L1: Input coordinate 1 * @a1: Input coordinate 1 * @b1: Input coordinate 1 * @L2: Input coordinate 2 * @a2: Input coordinate 2 * @b2: Input coordinate 2 * * Pythagorean distance between two points in colour space. Lab/XYZ/CMC etc. */ float vips_pythagoras( float L1, float a1, float b1, float L2, float a2, float b2 ) { float dL = L1 - L2; float da = a1 - a2; float db = b1 - b2; return( sqrt( dL * dL + da * da + db * db ) ); } /* Find the difference between two buffers of LAB data. */ void vips__pythagoras_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float * restrict p1 = (float *) in[0]; float * restrict p2 = (float *) in[1]; float * restrict q = (float *) out; int x; for( x = 0; x < width; x++ ) { float dL = p1[0] - p2[0]; float da = p1[1] - p2[1]; float db = p1[2] - p2[2]; q[x] = sqrt( dL * dL + da * da + db * db ); p1 += 3; p2 += 3; } } static void vips_dE76_class_init( VipsdE76Class *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "dE76"; object_class->description = _( "calculate dE76" ); colour_class->process_line = vips__pythagoras_line; } static void vips_dE76_init( VipsdE76 *dE76 ) { VipsColourDifference *difference = VIPS_COLOUR_DIFFERENCE( dE76 ); difference->interpretation = VIPS_INTERPRETATION_LAB; } /** * vips_dE76: * @left: first input image * @right: second input image * @out: output image * * Calculate dE 76. * * Returns: 0 on success, -1 on error */ int vips_dE76( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "dE76", ap, left, right, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/pcolour.h0000644000175000017500000001307612303140253014327 00000000000000/* base class for all colour operations */ /* Copyright (C) 1991-2005 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PCOLOUR_H #define VIPS_PCOLOUR_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_COLOUR (vips_colour_get_type()) #define VIPS_COLOUR( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_COLOUR, VipsColour )) #define VIPS_COLOUR_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_COLOUR, VipsColourClass)) #define VIPS_IS_COLOUR( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_COLOUR )) #define VIPS_IS_COLOUR_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_COLOUR )) #define VIPS_COLOUR_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_COLOUR, VipsColourClass )) struct _VipsColour; typedef void (*VipsColourProcessFn)( struct _VipsColour *colour, VipsPel *out, VipsPel **in, int width ); typedef struct _VipsColour { VipsOperation parent_instance; /* Null-terminated array of input arguments, set these from a * subclass. */ VipsImage **in; int n; VipsImage *out; /* Set fields on ->out from these. */ VipsCoding coding; VipsInterpretation interpretation; VipsBandFormat format; int bands; /* Attach this profile, if set. */ char *profile_filename; } VipsColour; typedef struct _VipsColourClass { VipsOperationClass parent_class; /* The buffer processor. */ VipsColourProcessFn process_line; } VipsColourClass; GType vips_colour_get_type( void ); /* A float in, float out colourspace transformation. */ #define VIPS_TYPE_COLOUR_SPACE (vips_colour_space_get_type()) #define VIPS_COLOUR_SPACE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_COLOUR_SPACE, VipsColourSpace )) #define VIPS_COLOUR_SPACE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_COLOUR_SPACE, VipsColourSpaceClass)) #define VIPS_IS_COLOUR_SPACE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_COLOUR_SPACE )) #define VIPS_IS_COLOUR_SPACE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_COLOUR_SPACE )) #define VIPS_COLOUR_SPACE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_COLOUR_SPACE, VipsColourSpaceClass )) typedef struct _VipsColourSpace { VipsColour parent_instance; VipsImage *in; } VipsColourSpace; typedef struct _VipsColourSpaceClass { VipsColourClass parent_class; } VipsColourSpaceClass; GType vips_colour_space_get_type( void ); /* Change colour encoding ... either in or out is not three-band float. */ #define VIPS_TYPE_COLOUR_CODE (vips_colour_code_get_type()) #define VIPS_COLOUR_CODE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_COLOUR_CODE, VipsColourCode )) #define VIPS_COLOUR_CODE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_COLOUR_CODE, VipsColourCodeClass)) #define VIPS_IS_COLOUR_CODE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_COLOUR_CODE )) #define VIPS_IS_COLOUR_CODE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_COLOUR_CODE )) #define VIPS_COLOUR_CODE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_COLOUR_CODE, VipsColourCodeClass )) typedef struct _VipsColourCode { VipsColour parent_instance; VipsImage *in; /* Test in against these. */ VipsCoding input_coding; VipsBandFormat input_format; int input_bands; VipsInterpretation input_interpretation; } VipsColourCode; typedef struct _VipsColourCodeClass { VipsColourClass parent_class; } VipsColourCodeClass; GType vips_colour_code_get_type( void ); /* Difference between two colour images. */ #define VIPS_TYPE_COLOUR_DIFFERENCE (vips_colour_difference_get_type()) #define VIPS_COLOUR_DIFFERENCE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_COLOUR_DIFFERENCE, VipsColourDifference )) #define VIPS_COLOUR_DIFFERENCE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_COLOUR_DIFFERENCE, VipsColourDifferenceClass)) #define VIPS_IS_COLOUR_DIFFERENCE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_COLOUR_DIFFERENCE )) #define VIPS_IS_COLOUR_DIFFERENCE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_COLOUR_DIFFERENCE )) #define VIPS_COLOUR_DIFFERENCE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_COLOUR_DIFFERENCE, VipsColourDifferenceClass )) typedef struct _VipsColourDifference { VipsColour parent_instance; VipsImage *left; VipsImage *right; /* Both get converted to this space. */ VipsInterpretation interpretation; } VipsColourDifference; typedef struct _VipsColourDifferenceClass { VipsColourClass parent_class; } VipsColourDifferenceClass; GType vips_colour_difference_get_type( void ); void vips__pythagoras_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PCOLOUR_H*/ vips-7.38.5/libvips/colour/XYZ2Lab.c0000644000175000017500000001371012303140253014025 00000000000000/* Turn XYZ to Lab colourspace. * * Modifed: * 16/11/94 JC * - uses im_wrapone() * - in-line conversion * 27/1/03 JC * - swapped cbrt() for pow(), more portable * 12/11/04 * - swapped pow() for cbrt() again, pow() is insanely slow on win32 * - added a configure test for cbrt(). * 23/11/04 * - use a large LUT instead, about 5x faster * 23/11/06 * - ahem, build the LUT outside the eval thread * 2/11/09 * - gtkdoc * 3/8/11 * - fix a race in the table build * 19/9/12 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pcolour.h" #ifndef HAVE_CBRT #define cbrt( X ) pow( (X), 1.0 / 3.0 ) #endif /*!HAVE_CBRT*/ /* Lookup table size. */ #define QUANT_ELEMENTS (100000) float cbrt_table[QUANT_ELEMENTS]; typedef struct _VipsXYZ2Lab { VipsColourSpace parent_instance; /* The colour temperature -- default to D65. */ VipsArea *temp; /* Broken out as xyz. */ double X0; double Y0; double Z0; } VipsXYZ2Lab; typedef VipsColourSpaceClass VipsXYZ2LabClass; G_DEFINE_TYPE( VipsXYZ2Lab, vips_XYZ2Lab, VIPS_TYPE_COLOUR_SPACE ); static void * table_init( void *client ) { int i; for( i = 0; i < QUANT_ELEMENTS; i++ ) { float Y = (double) i / QUANT_ELEMENTS; if( Y < 0.008856 ) cbrt_table[i] = 7.787 * Y + (16.0 / 116.0); else cbrt_table[i] = cbrt( Y ); } return( NULL ); } /* Process a buffer of data. */ static void vips_XYZ2Lab_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { static GOnce once = G_ONCE_INIT; VipsXYZ2Lab *XYZ2Lab = (VipsXYZ2Lab *) colour; float *p = (float *) in[0]; float *q = (float *) out; int x; (void) g_once( &once, table_init, NULL ); for( x = 0; x < width; x++ ) { float nX, nY, nZ; int i; float f; float cbx, cby, cbz; nX = QUANT_ELEMENTS * p[0] / XYZ2Lab->X0; nY = QUANT_ELEMENTS * p[1] / XYZ2Lab->Y0; nZ = QUANT_ELEMENTS * p[2] / XYZ2Lab->Z0; p += 3; i = VIPS_CLIP( 0, (int) nX, QUANT_ELEMENTS - 2 ); f = nX - i; cbx = cbrt_table[i] + f * (cbrt_table[i + 1] - cbrt_table[i]); i = VIPS_CLIP( 0, (int) nY, QUANT_ELEMENTS - 2 ); f = nY - i; cby = cbrt_table[i] + f * (cbrt_table[i + 1] - cbrt_table[i]); i = VIPS_CLIP( 0, (int) nZ, QUANT_ELEMENTS - 2 ); f = nZ - i; cbz = cbrt_table[i] + f * (cbrt_table[i + 1] - cbrt_table[i]); q[0] = 116.0 * cby - 16.0; q[1] = 500.0 * (cbx - cby); q[2] = 200.0 * (cby - cbz); q += 3; } } /** * vips_col_XYZ2Lab: * @X: Input CIE XYZ colour * @Y: Input CIE XYZ colour * @Z: Input CIE XYZ colour * @L: Return CIE Lab value * @a: Return CIE Lab value * @b: Return CIE Lab value * * Calculate XYZ from Lab, D65. * * See also: vips_XYZ2Lab(). */ void vips_col_XYZ2Lab( float X, float Y, float Z, float *L, float *a, float *b ) { float in[3]; float out[3]; float *x; VipsXYZ2Lab XYZ2Lab; in[0] = X; in[1] = Y; in[2] = Z; x = in; XYZ2Lab.X0 = VIPS_D65_X0; XYZ2Lab.Y0 = VIPS_D65_Y0; XYZ2Lab.Z0 = VIPS_D65_Z0; vips_XYZ2Lab_line( (VipsColour *) &XYZ2Lab, (VipsPel *) out, (VipsPel **) &x, 1 ); *L = out[0]; *a = out[1]; *b = out[2]; } static int vips_XYZ2Lab_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsXYZ2Lab *XYZ2Lab = (VipsXYZ2Lab *) object; if( XYZ2Lab->temp ) { if( vips_check_vector_length( class->nickname, XYZ2Lab->temp->n, 3 ) ) return( -1 ); XYZ2Lab->X0 = ((double *) XYZ2Lab->temp->data)[0]; XYZ2Lab->Y0 = ((double *) XYZ2Lab->temp->data)[1]; XYZ2Lab->Z0 = ((double *) XYZ2Lab->temp->data)[2]; } if( VIPS_OBJECT_CLASS( vips_XYZ2Lab_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_XYZ2Lab_class_init( VipsXYZ2LabClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "XYZ2Lab"; object_class->description = _( "transform XYZ to Lab" ); object_class->build = vips_XYZ2Lab_build; colour_class->process_line = vips_XYZ2Lab_line; VIPS_ARG_BOXED( class, "temp", 110, _( "Temperature" ), _( "Colour temperature" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsXYZ2Lab, temp ), VIPS_TYPE_ARRAY_DOUBLE ); } static void vips_XYZ2Lab_init( VipsXYZ2Lab *XYZ2Lab ) { VipsColour *colour = VIPS_COLOUR( XYZ2Lab ); XYZ2Lab->X0 = VIPS_D65_X0; XYZ2Lab->Y0 = VIPS_D65_Y0; XYZ2Lab->Z0 = VIPS_D65_Z0; colour->interpretation = VIPS_INTERPRETATION_LAB; } /** * vips_XYZ2Lab: * @in: input image * @out: output image * * optional arguments: * * @temp: colour temperature * * Turn XYZ to Lab, optionally specifying the colour temperature. @temp * defaults to D65. * * Returns: 0 on success, -1 on error. */ int vips_XYZ2Lab( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "XYZ2Lab", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/LabQ2LabS.c0000644000175000017500000000631112303140253014274 00000000000000/* LabQ2LabS * * 17/11/93 JC * - adapted from im_LabQ2LabS() * 16/11/94 JC * - uses new im_wrap_oneonebuf() fn * 9/2/95 JC * - new im_wrapone function * 2/11/09 * - gtkdoc * 21/9/12 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pcolour.h" typedef VipsColourCode VipsLabQ2LabS; typedef VipsColourCodeClass VipsLabQ2LabSClass; G_DEFINE_TYPE( VipsLabQ2LabS, vips_LabQ2LabS, VIPS_TYPE_COLOUR_CODE ); /* CONVERT n pels from packed 32bit Lab to signed short. */ static void vips_LabQ2LabS_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { unsigned char * restrict p = (unsigned char *) in[0]; signed short * restrict q = (signed short *) out; int i; unsigned char ext; signed short l, a, b; for( i = 0; i < width; i++ ) { /* Get most significant 8 bits of lab. */ l = p[0] << 7; a = p[1] << 8; b = p[2] << 8; /* Get x-tra bits. */ ext = p[3]; p += 4; /* Shift and mask in to lab. */ l |= (unsigned char) (ext & 0xc0) >> 1; a |= (ext & 0x38) << 2; b |= (ext & 0x7) << 5; /* Write! */ q[0] = l; q[1] = a; q[2] = b; q += 3; } } static void vips_LabQ2LabS_class_init( VipsLabQ2LabSClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "LabQ2LabS"; object_class->description = _( "unpack a LabQ image to short Lab" ); colour_class->process_line = vips_LabQ2LabS_line; } static void vips_LabQ2LabS_init( VipsLabQ2LabS *LabQ2LabS ) { VipsColour *colour = VIPS_COLOUR( LabQ2LabS ); VipsColourCode *code = VIPS_COLOUR_CODE( LabQ2LabS ); colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_LABS; colour->format = VIPS_FORMAT_SHORT; colour->bands = 3; code->input_coding = VIPS_CODING_LABQ; } /** * vips_LabQ2LabS: * @in: input image * @out: output image * * Unpack a LabQ (#IM_CODING_LABQ) image to a three-band short image. * * See also: vips_LabS2LabQ(), vips_LabQ2LabS(), vips_rad2float(). * * Returns: 0 on success, -1 on error. */ int vips_LabQ2LabS( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "LabQ2LabS", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/LabQ2Lab.c0000644000175000017500000000752512303140253014161 00000000000000/* LabQ2Lab * * Copyright Kirk Martinez 2/5/1993 * * Modified: 16/6/93 * 7/6/93 JC * - adapted for partial v2 * 16/11/94 JC * - adapted to new im_wrap_oneonebuf() function. * 9/2/95 JC * - new im_wrapone function * 22/5/95 JC * - changed char to unsigned char for RS/6000 * - small tidies and speed-ups * 4/9/97 JC * - L* = 100.0 now handled correctly * 2/11/09 * - gtkdoc * 20/9/12 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pcolour.h" typedef VipsColourCode VipsLabQ2Lab; typedef VipsColourCodeClass VipsLabQ2LabClass; G_DEFINE_TYPE( VipsLabQ2Lab, vips_LabQ2Lab, VIPS_TYPE_COLOUR_CODE ); /* imb_LabQ2Lab: CONVERT n pels from packed 32bit Lab to float values * in a buffer * ARGS: VipsPel *inp pointer to first byte of Lab32 buffer * float *outbuf destination buffer * int n number of pels to process * (C) K.Martinez 2/5/93 */ static void vips_LabQ2Lab_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { signed char * restrict p = (signed char *) in[0]; float * restrict q = (float *) out; int l; int lsbs; /* for lsbs byte */ int i; /* counter */ /* Read input with a signed pointer to get signed ab easily. */ for( i = 0; i < width; i++ ) { /* Get extra bits. */ lsbs = ((unsigned char *) p)[3]; /* Build L. */ l = ((unsigned char *)p)[0]; l = (l << 2) | (lsbs >> 6); q[0] = (float) l * (100.0 / 1023.0); /* Build a. */ l = (p[1] << 3) | ((lsbs >> 3) & 0x7); q[1] = (float) l * 0.125; /* And b. */ l = (p[2] << 3) | (lsbs & 0x7); q[2] = (float) l * 0.125; p += 4; q += 3; } } void vips__LabQ2Lab_vec( float *out, VipsPel *in, int width ) { vips_LabQ2Lab_line( NULL, (VipsPel *) out, &in, width ); } static void vips_LabQ2Lab_class_init( VipsLabQ2LabClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "LabQ2Lab"; object_class->description = _( "unpack a LabQ image to float Lab" ); colour_class->process_line = vips_LabQ2Lab_line; } static void vips_LabQ2Lab_init( VipsLabQ2Lab *LabQ2Lab ) { VipsColour *colour = VIPS_COLOUR( LabQ2Lab ); VipsColourCode *code = VIPS_COLOUR_CODE( LabQ2Lab ); colour->coding = VIPS_CODING_NONE; colour->interpretation = VIPS_INTERPRETATION_LAB; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 3; code->input_coding = VIPS_CODING_LABQ; } /** * vips_LabQ2Lab: * @in: input image * @out: output image * * Unpack a LabQ (#IM_CODING_LABQ) image to a three-band float image. * * See also: vips_LabQ2Lab(), vips_LabQ2LabS(), vips_rad2float(). * * Returns: 0 on success, -1 on error. */ int vips_LabQ2Lab( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "LabQ2Lab", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/colour/LabS2Lab.c0000644000175000017500000000541512303140253014157 00000000000000/* LabS2Lab() * * 12/12/02 JC * - adapted from im_LabS2LabQ() * 2/11/09 * - gtkdoc, cleanup */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pcolour.h" typedef VipsColourCode VipsLabS2Lab; typedef VipsColourCodeClass VipsLabS2LabClass; G_DEFINE_TYPE( VipsLabS2Lab, vips_LabS2Lab, VIPS_TYPE_COLOUR_CODE ); /* Convert n pels from signed short to Lab. */ static void vips_LabS2Lab_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { signed short *p = (signed short *) in[0]; float *q = (float *) out; int i; for( i = 0; i < width; i++ ) { q[0] = p[0] / (32767.0 / 100.0); q[1] = p[1] / (32768.0 / 128.0); q[2] = p[2] / (32768.0 / 128.0); p += 3; q += 3; } } static void vips_LabS2Lab_class_init( VipsLabS2LabClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "LabS2Lab"; object_class->description = _( "transform signed short Lab to float" ); colour_class->process_line = vips_LabS2Lab_line; } static void vips_LabS2Lab_init( VipsLabS2Lab *LabS2Lab ) { VipsColour *colour = VIPS_COLOUR( LabS2Lab ); VipsColourCode *code = VIPS_COLOUR_CODE( LabS2Lab ); colour->interpretation = VIPS_INTERPRETATION_LAB; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 3; code->input_coding = VIPS_CODING_NONE; code->input_format = VIPS_FORMAT_SHORT; code->input_bands = 3; } /** * vips_LabS2Lab: * @in: input image * @out: output image * * Convert a LabS three-band signed short image to a three-band float image. * * See also: vips_LabS2Lab(). * * Returns: 0 on success, -1 on error. */ int vips_LabS2Lab( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "LabS2Lab", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/video/0000755000175000017500000000000012303146331012352 500000000000000vips-7.38.5/libvips/video/im_video_test.c0000644000175000017500000000277112303140253015274 00000000000000/* test video grabber ... just generates noise and optional errors */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include /** * im_video_test: * @im: write image here * @brightness: brightness setting * @error: set this to make the function return an error * * Make a test video image. Set @error to trigger an error. * * Returns: 0 on success, -1 on error */ int im_video_test( IMAGE *im, int brightness, int error ) { if( error ) { im_error( "im_video_test", "%s", _( "error requested" ) ); return( -1 ); } else return( im_gaussnoise( im, 720, 576, brightness, 20 ) ); } vips-7.38.5/libvips/video/video_dispatch.c0000644000175000017500000000661012303140253015423 00000000000000/* function dispatch tables for video */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * SECTION: video * @short_description: various video grabbers * @see_also: image * @stability: Stable * @include: vips/vips.h * * Read an image from a video source. */ static int video_v4l1_vec( im_object *argv ) { IMAGE *out = argv[0]; char *device = (char *) argv[1]; int channel = *((int*)argv[2]); int brightness = *((int*)argv[3]); int colour = *((int*)argv[4]); int contrast = *((int*)argv[5]); int hue = *((int*)argv[6]); int ngrabs = *((int*)argv[7]); return( im_video_v4l1( out, device, channel, brightness, colour, contrast, hue, ngrabs ) ); } static im_arg_desc video_v4l1_arg_types[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_STRING( "device" ), IM_INPUT_INT( "channel" ), IM_INPUT_INT( "brightness" ), IM_INPUT_INT( "colour" ), IM_INPUT_INT( "contrast" ), IM_INPUT_INT( "hue" ), IM_INPUT_INT( "ngrabs" ) }; static im_function video_v4l1_desc = { "im_video_v4l1", /* Name */ "grab a video frame with v4l1", /* Description */ IM_FN_NOCACHE, /* Flags */ video_v4l1_vec, /* Dispatch function */ IM_NUMBER( video_v4l1_arg_types ), /* Size of arg list */ video_v4l1_arg_types /* Arg list */ }; static int video_test_vec( im_object *argv ) { IMAGE *out = argv[0]; int brightness = *((int*)argv[1]); int error = *((int*)argv[2]); return( im_video_test( out, brightness, error ) ); } static im_arg_desc video_test_arg_types[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "brightness" ), IM_INPUT_INT( "error" ) }; static im_function video_test_desc = { "im_video_test", /* Name */ "test video grabber", /* Description */ IM_FN_NOCACHE, /* Flags */ video_test_vec, /* Dispatch function */ IM_NUMBER( video_test_arg_types ), /* Size of arg list */ video_test_arg_types /* Arg list */ }; static im_function *video_list[] = { &video_test_desc, &video_v4l1_desc }; im_package im__video = { "video", /* Package name */ IM_NUMBER( video_list ), /* Function list */ video_list }; vips-7.38.5/libvips/video/Makefile.in0000644000175000017500000005075012303144056014350 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/video DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libvideo_la_LIBADD = am_libvideo_la_OBJECTS = video_dispatch.lo im_video_test.lo libvideo_la_OBJECTS = $(am_libvideo_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libvideo_la_SOURCES) DIST_SOURCES = $(libvideo_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libvideo.la libvideo_la_SOURCES = \ video_dispatch.c \ im_video_test.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/video/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/video/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libvideo.la: $(libvideo_la_OBJECTS) $(libvideo_la_DEPENDENCIES) $(EXTRA_libvideo_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libvideo_la_OBJECTS) $(libvideo_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_video_test.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/video_dispatch.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/video/Makefile.am0000644000175000017500000000025612303140253014326 00000000000000noinst_LTLIBRARIES = libvideo.la libvideo_la_SOURCES = \ video_dispatch.c \ im_video_test.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/morphology/0000755000175000017500000000000012303146331013443 500000000000000vips-7.38.5/libvips/morphology/countlines.c0000644000175000017500000001114512303140253015711 00000000000000/* count lines * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on : * * 19/9/95 JC * - tidied up * 23/10/10 * - gtk-doc * 17/1/14 * - redone as a class, now just a convenience function */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pmorphology.h" typedef struct _VipsCountlines { VipsMorphology parent_instance; double nolines; VipsDirection direction; } VipsCountlines; typedef VipsMorphologyClass VipsCountlinesClass; G_DEFINE_TYPE( VipsCountlines, vips_countlines, VIPS_TYPE_MORPHOLOGY ); static int vips_countlines_build( VipsObject *object ) { VipsMorphology *morphology = VIPS_MORPHOLOGY( object ); VipsCountlines *countlines = (VipsCountlines *) object; VipsImage *in = morphology->in; VipsImage **t = (VipsImage **) vips_object_local_array( object, 7 ); double nolines; if( VIPS_OBJECT_CLASS( vips_countlines_parent_class )->build( object ) ) return( -1 ); switch( countlines->direction ) { case VIPS_DIRECTION_HORIZONTAL: if( !(t[0] = vips_image_new_matrixv( 1, 2, -1.0, 1.0 )) || vips_moreeq_const1( in, &t[1], 128, NULL ) || vips_conv( t[1], &t[2], t[0], NULL ) || vips_project( t[2], &t[3], &t[4], NULL ) || vips_avg( t[3], &nolines, NULL ) ) return( -1 ); break; case VIPS_DIRECTION_VERTICAL: if( !(t[0] = vips_image_new_matrixv( 2, 1, -1.0, 1.0 )) || vips_moreeq_const1( in, &t[1], 128, NULL ) || vips_conv( t[1], &t[2], t[0], NULL ) || vips_project( t[2], &t[3], &t[4], NULL ) || vips_avg( t[4], &nolines, NULL ) ) return( -1 ); break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } g_object_set( object, "nolines", nolines / 255.0, NULL ); return( 0 ); } static void vips_countlines_class_init( VipsCountlinesClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_countlines_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "countlines"; vobject_class->description = _( "count lines in an image" ); vobject_class->build = vips_countlines_build; VIPS_ARG_DOUBLE( class, "nolines", 2, _( "Nolines" ), _( "Number of lines" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsCountlines, nolines ), 0, 10000000, 0.0 ); VIPS_ARG_ENUM( class, "direction", 3, _( "direction" ), _( "Countlines left-right or up-down" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsCountlines, direction ), VIPS_TYPE_DIRECTION, VIPS_DIRECTION_HORIZONTAL ); } static void vips_countlines_init( VipsCountlines *countlines ) { } /** * vips_countlines: * @in: input image * @nolines: output average number of lines * @direction: count lines horizontally or vertically * @...: %NULL-terminated list of optional named arguments * * Function which calculates the number of transitions * between black and white for the horizontal or the vertical * direction of an image. black<128 , white>=128 * The function calculates the number of transitions for all * Xsize or Ysize and returns the mean of the result * Input should be one band, 8-bit. * * See also: vips_morph(), vips_zerox(), vips_conv(). * * Returns: 0 on success, -1 on error. */ int vips_countlines( VipsImage *in, double *nolines, VipsDirection direction, ... ) { va_list ap; int result; va_start( ap, direction ); result = vips_call_split( "countlines", ap, in, nolines, direction ); va_end( ap ); return( result ); } vips-7.38.5/libvips/morphology/pmorphology.h0000644000175000017500000000400512303140253016107 00000000000000/* base class for all morphology operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PMORPHOLOGY_H #define VIPS_PMORPHOLOGY_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_MORPHOLOGY (vips_morphology_get_type()) #define VIPS_MORPHOLOGY( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_MORPHOLOGY, VipsMorphology )) #define VIPS_MORPHOLOGY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_MORPHOLOGY, VipsMorphologyClass)) #define VIPS_IS_MORPHOLOGY( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_MORPHOLOGY )) #define VIPS_IS_MORPHOLOGY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_MORPHOLOGY )) #define VIPS_MORPHOLOGY_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_MORPHOLOGY, VipsMorphologyClass )) typedef struct _VipsMorphology VipsMorphology; struct _VipsMorphology { VipsOperation parent_instance; VipsImage *in; }; typedef struct _VipsMorphologyClass { VipsOperationClass parent_class; } VipsMorphologyClass; GType vips_morphology_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PMORPHOLOGY_H*/ vips-7.38.5/libvips/morphology/rank.c0000644000175000017500000002777412303141142014476 00000000000000/* Rank filter. * * Author: JC * Written on: 19/8/96 * Modified on: * JC 20/8/96 * - now uses insert-sort rather than bubble-sort * - now works for any non-complex type * JC 22/6/01 * - oops, sanity check on n wrong * JC 28/8/03 * - cleanups * - better selection algorithm ... same speed for 3x3, about 3x faster * for 5x5, faster still for larger windows * - index from zero for consistency with other parts of vips * 7/4/04 * - now uses im_embed() with edge stretching on the input, not * the output * - sets Xoffset / Yoffset * 7/10/04 * - oops, im_embed() size was wrong * 10/11/10 * - cleanups * - gtk-doc * 17/1/14 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pmorphology.h" typedef struct _VipsRank { VipsMorphology parent_instance; VipsImage *out; int width; int height; int index; int n; } VipsRank; typedef VipsMorphologyClass VipsRankClass; G_DEFINE_TYPE( VipsRank, vips_rank, VIPS_TYPE_MORPHOLOGY ); /* Sequence value: just the array we sort in. */ typedef struct { VipsRegion *ir; VipsPel *sort; } VipsRankSequence; static int vips_rank_stop( void *vseq, void *a, void *b ) { VipsRankSequence *seq = (VipsRankSequence *) vseq; VIPS_FREEF( g_object_unref, seq->ir ); return( 0 ); } static void * vips_rank_start( IMAGE *out, void *a, void *b ) { VipsImage *in = (VipsImage *) a; VipsRank *rank = (VipsRank *) b; VipsRankSequence *seq; if( !(seq = VIPS_NEW( out, VipsRankSequence )) ) return( NULL ); seq->ir = NULL; seq->sort = NULL; seq->ir = vips_region_new( in ); if( !(seq->sort = VIPS_ARRAY( out, VIPS_IMAGE_SIZEOF_ELEMENT( in ) * rank->n, VipsPel )) ) { vips_rank_stop( seq, in, rank ); return( NULL ); } return( (void *) seq ); } /* Inner loop for select-sorting TYPE. */ #define LOOP_SELECT( TYPE ) { \ TYPE *q = (TYPE *) VIPS_REGION_ADDR( or, r->left, r->top + y ); \ TYPE *p = (TYPE *) VIPS_REGION_ADDR( ir, r->left, r->top + y ); \ TYPE *sort = (TYPE *) seq->sort; \ TYPE a; \ \ for( x = 0; x < sz; x++ ) { \ TYPE *d = p + x; \ \ /* Copy window into sort[]. */ \ for( k = 0, j = 0; j < rank->height; j++ ) { \ for( i = 0; i < eaw; i += bands, k++ ) \ sort[k] = d[i]; \ d += ls; \ } \ \ /* Rearrange sort[] to make the index-th element the index-th * smallest, adapted from Numerical Recipes in C. */ \ lower = 0; /* Range we know the result lies in */ \ upper = rank->n - 1; \ for(;;) { \ if( upper - lower < 2 ) { \ /* 1 or 2 elements left. */ \ if( upper - lower == 1 && \ sort[lower] > sort[upper] ) \ VIPS_SWAP( TYPE, \ sort[lower], sort[upper] ); \ break; \ } \ else { \ /* Pick mid-point of remaining elements. */ \ mid = (lower + upper) >> 1; \ \ /* Sort lower/mid/upper elements, hold * midpoint in sort[lower + 1] for * partitioning. */ \ VIPS_SWAP( TYPE, sort[lower + 1], sort[mid] ); \ if( sort[lower] > sort[upper] ) \ VIPS_SWAP( TYPE, \ sort[lower], sort[upper] ); \ if( sort[lower + 1] > sort[upper] ) \ VIPS_SWAP( TYPE, \ sort[lower + 1], sort[upper] );\ if( sort[lower] > sort[lower + 1] ) \ VIPS_SWAP( TYPE, \ sort[lower], sort[lower + 1] );\ \ i = lower + 1; \ j = upper; \ a = sort[lower + 1]; \ \ for(;;) { \ /* Search for out of order elements. */ \ do \ i++; \ while( sort[i] < a ); \ do \ j--; \ while( sort[j] > a ); \ if( j < i ) \ break; \ VIPS_SWAP( TYPE, sort[i], sort[j] ); \ } \ \ /* Replace mid element. */ \ sort[lower + 1] = sort[j]; \ sort[j] = a; \ \ /* Move to partition with the kth element. */ \ if( j >= rank->index ) \ upper = j - 1; \ if( j <= rank->index ) \ lower = i; \ } \ } \ \ q[x] = sort[rank->index]; \ } \ } /* Loop for find max of window. */ #define LOOP_MAX( TYPE ) { \ TYPE *q = (TYPE *) VIPS_REGION_ADDR( or, r->left, r->top + y ); \ TYPE *p = (TYPE *) VIPS_REGION_ADDR( ir, r->left, r->top + y ); \ \ for( x = 0; x < sz; x++ ) { \ TYPE *d = &p[x]; \ TYPE max; \ \ max = *d; \ for( j = 0; j < rank->height; j++ ) { \ TYPE *e = d; \ \ for( i = 0; i < rank->width; i++ ) { \ if( *e > max ) \ max = *e; \ \ e += bands; \ } \ \ d += ls; \ } \ \ q[x] = max; \ } \ } /* Loop for find min of window. */ #define LOOP_MIN( TYPE ) { \ TYPE *q = (TYPE *) VIPS_REGION_ADDR( or, r->left, r->top + y ); \ TYPE *p = (TYPE *) VIPS_REGION_ADDR( ir, r->left, r->top + y ); \ \ for( x = 0; x < sz; x++ ) { \ TYPE *d = &p[x]; \ TYPE min; \ \ min = *d; \ for( j = 0; j < rank->height; j++ ) { \ TYPE *e = d; \ \ for( i = 0; i < rank->width; i++ ) { \ if( *e < min ) \ min = *e; \ \ e += bands; \ } \ \ d += ls; \ } \ \ q[x] = min; \ } \ } #define SWITCH( OPERATION ) \ switch( rank->out->BandFmt ) { \ case VIPS_FORMAT_UCHAR: OPERATION( unsigned char ); break; \ case VIPS_FORMAT_CHAR: OPERATION( signed char ); break; \ case VIPS_FORMAT_USHORT: OPERATION( unsigned short ); break; \ case VIPS_FORMAT_SHORT: OPERATION( signed short ); break; \ case VIPS_FORMAT_UINT: OPERATION( unsigned int ); break; \ case VIPS_FORMAT_INT: OPERATION( signed int ); break; \ case VIPS_FORMAT_FLOAT: OPERATION( float ); break; \ case VIPS_FORMAT_DOUBLE: OPERATION( double ); break; \ \ default: \ g_assert( 0 ); \ } static int vips_rank_generate( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsRect *r = &or->valid; VipsRankSequence *seq = (VipsRankSequence *) vseq; VipsRegion *ir = seq->ir; VipsImage *in = (VipsImage *) a; VipsRank *rank = (VipsRank *) b; int bands = in->Bands; int eaw = rank->width * bands; /* elements across window */ int sz = VIPS_REGION_N_ELEMENTS( or ); VipsRect s; int ls; int x, y; int i, j, k; int upper, lower, mid; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += rank->width - 1; s.height += rank->height - 1; if( vips_region_prepare( ir, &s ) ) return( -1 ); ls = VIPS_REGION_LSKIP( ir ) / VIPS_IMAGE_SIZEOF_ELEMENT( in ); for( y = 0; y < r->height; y++ ) { if( rank->index == 0 ) SWITCH( LOOP_MIN ) else if( rank->index == rank->n - 1 ) SWITCH( LOOP_MAX ) else SWITCH( LOOP_SELECT ) } return( 0 ); } static int vips_rank_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsMorphology *morphology = VIPS_MORPHOLOGY( object ); VipsRank *rank = (VipsRank *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 3 ); VipsImage *in; if( VIPS_OBJECT_CLASS( vips_rank_parent_class )->build( object ) ) return( -1 ); in = morphology->in; if( vips_check_uncoded( class->nickname, in ) || vips_check_noncomplex( class->nickname, in ) ) return( -1 ); if( rank->width > in->Xsize || rank->height > in->Ysize ) { vips_error( class->nickname, "%s", _( "window too large" ) ); return( -1 ); } rank->n = rank->width * rank->height; if( rank->index < 0 || rank->index > rank->n - 1 ) { vips_error( class->nickname, "%s", _( "index out of range" ) ); return( -1 ); } /* Expand the input. */ if( vips_embed( in, &t[0], rank->width / 2, rank->height / 2, in->Xsize + rank->width - 1, in->Ysize + rank->height - 1, "extend", VIPS_EXTEND_COPY, NULL ) ) return( -1 ); in = t[0]; g_object_set( object, "out", vips_image_new(), NULL ); /* Set demand hints. FATSTRIP is good for us, as THINSTRIP will cause * too many recalculations on overlaps. */ if( vips_image_pipelinev( rank->out, VIPS_DEMAND_STYLE_FATSTRIP, in, NULL ) ) return( -1 ); rank->out->Xsize -= rank->width - 1; rank->out->Ysize -= rank->height - 1; if( vips_image_generate( rank->out, vips_rank_start, vips_rank_generate, vips_rank_stop, in, rank ) ) return( -1 ); rank->out->Xoffset = 0; rank->out->Yoffset = 0; return( 0 ); } static void vips_rank_class_init( VipsRankClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "rank"; object_class->description = _( "rank filter" ); object_class->build = vips_rank_build; VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsRank, out ) ); VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Window width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRank, width ), 1, 100000, 11 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Window height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRank, height ), 1, 100000, 11 ); VIPS_ARG_INT( class, "index", 6, _( "index" ), _( "Select pixel at index" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRank, index ), 1, 100000000, 50 ); } static void vips_rank_init( VipsRank *rank ) { rank->width = 11; rank->height = 11; rank->index = 50; } /** * vips_rank: * @in: input image * @out: output image * @width: width of region * @height: height of region * @index: select pixel * @...: %NULL-terminated list of optional named arguments * * vips_rank() does rank filtering on an image. A window of size @width by * @height is passed over the image. At each position, the pixels inside the * window are sorted into ascending order and the pixel at position @index is * output. @index numbers from 0. * * It works for any non-complex image type, with any number of bands. * The input is expanded by copying edge pixels before performing the * operation so that the output image has the same size as the input. * Edge pixels in the output image are therefore only approximate. * * For a median filter with mask size m (3 for 3x3, 5 for 5x5, etc.) use * * vips_rank( in, out, m, m, m * m / 2 ); * * The special cases n == 0 and n == m * m - 1 are useful dilate and * expand operators. * * See also: vips_conv(), vips_median(), vips_spcor(). * * Returns: 0 on success, -1 on error */ int vips_rank( VipsImage *in, VipsImage **out, int width, int height, int index, ... ) { va_list ap; int result; va_start( ap, index ); result = vips_call_split( "rank", ap, in, out, width, height, index ); va_end( ap ); return( result ); } /** * vips_median: * @in: input image * @out: output image * @size: size of region * @...: %NULL-terminated list of optional named arguments * * A convenience function equivalent to: * * vips_rank( in, out, size, size, (size * size) / 2 ); * * See also: vips_rank(). * * Returns: 0 on success, -1 on error */ int vips_median( VipsImage *in, VipsImage **out, int size, ... ) { va_list ap; int result; va_start( ap, size ); result = vips_call_split( "rank", ap, in, out, size, size, (size * size) / 2 ); va_end( ap ); return( result ); } vips-7.38.5/libvips/morphology/im_label_regions.c0000644000175000017500000000564312303141142017024 00000000000000/* im_label_regions.c * * 5/11/09 * - renamed from im_segment() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * im_label_regions: * @test: image to test * @mask: write labelled regions here * @segments: return number of regions here * * im_label_regions() repeatedly scans @test for regions of 4-connected pixels * with the same pixel value. Every time a region is discovered, those * pixels are marked in @mask with a unique serial number. Once all pixels * have been labelled, the operation returns, setting @segments to the number * of discrete regions which were detected. * * @mask is always a 1-band %IM_BANDFMT_UINT image of the same dimensions as * @test. * * This operation is useful for, for example, blob counting. You can use the * morphological operators to detect and isolate a series of objects, then use * im_label_regions() to number them all. * * Use im_histindexed() to (for example) find blob coordinates. * * See also: im_histindexed() * * Returns: 0 on success, -1 on error. */ int im_label_regions( IMAGE *test, IMAGE *mask, int *segments ) { IMAGE *t[2]; int serial; int *m; int x, y; /* Create the zero mask image. */ if( im_open_local_array( mask, t, 2, "im_label_regions", "p" ) || im_black( t[0], test->Xsize, test->Ysize, 1 ) || im_clip2fmt( t[0], t[1], IM_BANDFMT_INT ) ) return( -1 ); /* Search the mask image, flooding as we find zero pixels. */ if( im_rwcheck( t[1] ) ) return( -1 ); serial = 0; m = (int *) t[1]->data; for( y = 0; y < test->Ysize; y++ ) { for( x = 0; x < test->Xsize; x++ ) { if( !m[x] ) { /* if( im_flood_other_old( t[1], test, x, y, serial ) ) */ if( im_flood_other( test, t[1], x, y, serial, NULL ) ) // if( im_flood_other_old( t[1], test, // x, y, serial ) ) return( -1 ); serial += 1; } } m += test->Xsize; } /* Copy result to mask. */ if( im_copy( t[1], mask ) ) return( -1 ); if( segments ) *segments = serial; return( 0 ); } vips-7.38.5/libvips/morphology/hitmiss.c0000644000175000017500000004132012303140253015204 00000000000000/* morphological operators * * 19/9/95 JC * - rewritten * 6/7/99 JC * - small tidies * 7/4/04 * - now uses im_embed() with edge stretching on the input, not * the output * - sets Xoffset / Yoffset * 21/4/08 * - only rebuild the buffer offsets if bpl changes * - small cleanups * 25/10/10 * - start again from the Orc'd im_conv * 29/10/10 * - use VipsVector * - do erode as well * 7/11/10 * - gtk-doc * - do (!=0) to make uchar, if we're not given uchar * 28/6/13 * - oops, fix !=0 code */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include /* The two operators we implement. They are more hit-miss, really. */ typedef enum { ERODE, DILATE } MorphOp; /* We can't run more than this many passes. Larger than this and we * fall back to C. */ #define MAX_PASS (10) /* A pass with a vector. */ typedef struct { int first; /* The index of the first mask coff we use */ int last; /* The index of the last mask coff we use */ int r; /* Set previous result in this var */ /* The code we generate for this section of this mask. */ VipsVector *vector; } Pass; /* Our parameters. */ typedef struct { IMAGE *in; IMAGE *out; INTMASK *mask; /* Copy of mask arg */ MorphOp op; /* The passes we generate for this mask. */ int n_pass; Pass pass[MAX_PASS]; } Morph; static void pass_free( Morph *morph ) { int i; for( i = 0; i < morph->n_pass; i++ ) IM_FREEF( vips_vector_free, morph->pass[i].vector ); morph->n_pass = 0; } static int morph_close( Morph *morph ) { IM_FREEF( im_free_imask, morph->mask ); pass_free( morph ); return( 0 ); } #define TEMP( N, S ) vips_vector_temporary( v, N, S ) #define SCANLINE( N, P, S ) vips_vector_source_scanline( v, N, P, S ) #define CONST( N, V, S ) vips_vector_constant( v, N, V, S ) #define ASM2( OP, A, B ) vips_vector_asm2( v, OP, A, B ) #define ASM3( OP, A, B, C ) vips_vector_asm3( v, OP, A, B, C ) /* Generate code for a section of the mask. first is the index we start * at, we set last to the index of the last one we use before we run * out of intermediates / constants / parameters / sources or mask * coefficients. * * 0 for success, -1 on error. */ static int pass_compile_section( Pass *pass, Morph *morph, gboolean first_pass ) { INTMASK *mask = morph->mask; const int n_mask = mask->xsize * mask->ysize; VipsVector *v; char offset[256]; char source[256]; char zero[256]; char one[256]; int i; pass->vector = v = vips_vector_new( "morph", 1 ); /* The value we fetch from the image, the accumulated sum. */ TEMP( "value", 1 ); TEMP( "sum", 1 ); CONST( zero, 0, 1 ); CONST( one, 255, 1 ); /* Init the sum. If this is the first pass, it's a constant. If this * is a later pass, we have to init the sum from the result * of the previous pass. */ if( first_pass ) { if( morph->op == DILATE ) ASM2( "copyb", "sum", zero ); else ASM2( "copyb", "sum", one ); } else { /* "r" is the result of the previous pass. */ pass->r = vips_vector_source_name( v, "r", 1 ); ASM2( "loadb", "sum", "r" ); } for( i = pass->first; i < n_mask; i++ ) { int x = i % mask->xsize; int y = i / mask->xsize; /* Exclude don't-care elements. */ if( mask->coeff[i] == 128 ) continue; /* The source. sl0 is the first scanline in the mask. */ SCANLINE( source, y, 1 ); /* The offset, only for non-first-columns though. */ if( x > 0 ) { CONST( offset, morph->in->Bands * x, 1 ); ASM3( "loadoffb", "value", source, offset ); } else ASM2( "loadb", "value", source ); /* Join to our sum. If the mask element is zero, we have to * add an extra negate. */ if( morph->op == DILATE ) { if( !mask->coeff[i] ) ASM3( "xorb", "value", "value", one ); ASM3( "orb", "sum", "sum", "value" ); } else { if( !mask->coeff[i] ) ASM3( "andnb", "sum", "sum", "value" ); else ASM3( "andb", "sum", "sum", "value" ); } if( vips_vector_full( v ) ) break; } pass->last = i; ASM2( "copyb", "d1", "sum" ); if( !vips_vector_compile( v ) ) return( -1 ); #ifdef DEBUG printf( "done matrix coeffs %d to %d\n", pass->first, pass->last ); vips_vector_print( v ); #endif /*DEBUG*/ return( 0 ); } /* Generate a set of passes. */ static int pass_compile( Morph *morph ) { INTMASK *mask = morph->mask; const int n_mask = mask->xsize * mask->ysize; int i; Pass *pass; #ifdef DEBUG printf( "morph: generating vector code\n" ); #endif /*DEBUG*/ /* Generate passes until we've used up the whole mask. */ for( i = 0;;) { /* Skip any don't-care coefficients at the start of the mask * region. */ for( ; i < n_mask && mask->coeff[i] == 128; i++ ) ; if( i == n_mask ) break; /* Allocate space for another pass. */ if( morph->n_pass == MAX_PASS ) return( -1 ); pass = &morph->pass[morph->n_pass]; morph->n_pass += 1; pass->first = i; pass->last = i; pass->r = -1; if( pass_compile_section( pass, morph, morph->n_pass == 1 ) ) return( -1 ); i = pass->last + 1; if( i >= n_mask ) break; } return( 0 ); } static Morph * morph_new( IMAGE *in, IMAGE *out, INTMASK *mask, MorphOp op ) { const int n_mask = mask->xsize * mask->ysize; Morph *morph; int i; /* If in is not uchar, do (!=0) to make a uchar image. */ if( in->BandFmt != IM_BANDFMT_UCHAR ) { IMAGE *t; if( !(t = im_open_local( out, "morph_new", "p" )) || im_notequalconst( in, t, 0 ) ) return( NULL ); in = t; } if( im_piocheck( in, out ) || im_check_uncoded( "morph", in ) || im_check_format( "morph", in, IM_BANDFMT_UCHAR ) || im_check_imask( "morph", mask ) ) return( NULL ); for( i = 0; i < n_mask; i++ ) if( mask->coeff[i] != 0 && mask->coeff[i] != 128 && mask->coeff[i] != 255 ) { im_error( "morph", _( "bad mask element (%d " "should be 0, 128 or 255)" ), mask->coeff[i] ); return( NULL ); } if( !(morph = IM_NEW( out, Morph )) ) return( NULL ); morph->in = in; morph->out = out; morph->mask = NULL; morph->op = op; morph->n_pass = 0; for( i = 0; i < MAX_PASS; i++ ) morph->pass[i].vector = NULL; if( im_add_close_callback( out, (im_callback_fn) morph_close, morph, NULL ) || !(morph->mask = im_dup_imask( mask, "morph" )) ) return( NULL ); /* Generate code for this mask / image, if possible. */ if( vips_vector_isenabled() ) { if( pass_compile( morph ) ) pass_free( morph ); } return( morph ); } /* Our sequence value. */ typedef struct { Morph *morph; REGION *ir; /* Input region */ int *soff; /* Offsets we check for set */ int ss; /* ... and number we check for set */ int *coff; /* Offsets we check for clear */ int cs; /* ... and number we check for clear */ int last_bpl; /* Avoid recalcing offsets, if we can */ /* In vector mode we need a pair of intermediate buffers to keep the * results of each pass in. */ void *t1; void *t2; } MorphSequence; /* Free a sequence value. */ static int morph_stop( void *vseq, void *a, void *b ) { MorphSequence *seq = (MorphSequence *) vseq; IM_FREEF( im_region_free, seq->ir ); IM_FREE( seq->t1 ); IM_FREE( seq->t2 ); return( 0 ); } /* Morph start function. */ static void * morph_start( IMAGE *out, void *a, void *b ) { IMAGE *in = (IMAGE *) a; Morph *morph = (Morph *) b; int n_mask = morph->mask->xsize * morph->mask->ysize; int sz = IM_IMAGE_N_ELEMENTS( in ); MorphSequence *seq; if( !(seq = IM_NEW( out, MorphSequence )) ) return( NULL ); /* Init! */ seq->morph = morph; seq->ir = NULL; seq->soff = NULL; seq->ss = 0; seq->coff = NULL; seq->cs = 0; seq->last_bpl = -1; seq->t1 = NULL; seq->t2 = NULL; /* Attach region and arrays. */ seq->ir = im_region_create( in ); seq->soff = IM_ARRAY( out, n_mask, int ); seq->coff = IM_ARRAY( out, n_mask, int ); seq->t1 = IM_ARRAY( NULL, sz, VipsPel ); seq->t2 = IM_ARRAY( NULL, sz, VipsPel ); if( !seq->ir || !seq->soff || !seq->coff || !seq->t1 || !seq->t2 ) { morph_stop( seq, in, NULL ); return( NULL ); } return( seq ); } /* Dilate! */ static int dilate_gen( REGION *or, void *vseq, void *a, void *b ) { MorphSequence *seq = (MorphSequence *) vseq; Morph *morph = (Morph *) b; INTMASK *mask = morph->mask; REGION *ir = seq->ir; int *soff = seq->soff; int *coff = seq->coff; Rect *r = &or->valid; Rect s; int le = r->left; int to = r->top; int bo = IM_RECT_BOTTOM( r ); int sz = IM_REGION_N_ELEMENTS( or ); int *t; int x, y; int result, i; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); #ifdef DEBUG printf( "dilate_gen: preparing %dx%d@%dx%d pixels\n", s.width, s.height, s.left, s.top ); #endif /*DEBUG*/ /* Scan mask, building offsets we check when processing. Only do this * if the bpl has changed since the previous im_prepare(). */ if( seq->last_bpl != IM_REGION_LSKIP( ir ) ) { seq->last_bpl = IM_REGION_LSKIP( ir ); seq->ss = 0; seq->cs = 0; for( t = mask->coeff, y = 0; y < mask->ysize; y++ ) for( x = 0; x < mask->xsize; x++, t++ ) switch( *t ) { case 255: soff[seq->ss++] = IM_REGION_ADDR( ir, x + le, y + to ) - IM_REGION_ADDR( ir, le, to ); break; case 128: break; case 0: coff[seq->cs++] = IM_REGION_ADDR( ir, x + le, y + to ) - IM_REGION_ADDR( ir, le, to ); break; default: g_assert( 0 ); } } /* Dilate! */ for( y = to; y < bo; y++ ) { VipsPel *p = IM_REGION_ADDR( ir, le, y ); VipsPel *q = IM_REGION_ADDR( or, le, y ); /* Loop along line. */ for( x = 0; x < sz; x++, q++, p++ ) { /* Search for a hit on the set list. */ result = 0; for( i = 0; i < seq->ss; i++ ) if( p[soff[i]] ) { /* Found a match! */ result = 255; break; } /* No set pixels ... search for a hit in the clear * pixels. */ if( !result ) for( i = 0; i < seq->cs; i++ ) if( !p[coff[i]] ) { /* Found a match! */ result = 255; break; } *q = result; } } return( 0 ); } /* Erode! */ static int erode_gen( REGION *or, void *vseq, void *a, void *b ) { MorphSequence *seq = (MorphSequence *) vseq; Morph *morph = (Morph *) b; INTMASK *mask = morph->mask; REGION *ir = seq->ir; int *soff = seq->soff; int *coff = seq->coff; Rect *r = &or->valid; Rect s; int le = r->left; int to = r->top; int bo = IM_RECT_BOTTOM(r); int sz = IM_REGION_N_ELEMENTS( or ); int *t; int x, y; int result, i; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); #ifdef DEBUG printf( "erode_gen: preparing %dx%d@%dx%d pixels\n", s.width, s.height, s.left, s.top ); #endif /*DEBUG*/ /* Scan mask, building offsets we check when processing. Only do this * if the bpl has changed since the previous im_prepare(). */ if( seq->last_bpl != IM_REGION_LSKIP( ir ) ) { seq->last_bpl = IM_REGION_LSKIP( ir ); seq->ss = 0; seq->cs = 0; for( t = mask->coeff, y = 0; y < mask->ysize; y++ ) for( x = 0; x < mask->xsize; x++, t++ ) switch( *t ) { case 255: soff[seq->ss++] = IM_REGION_ADDR( ir, x + le, y + to ) - IM_REGION_ADDR( ir, le, to ); break; case 128: break; case 0: coff[seq->cs++] = IM_REGION_ADDR( ir, x + le, y + to ) - IM_REGION_ADDR( ir, le, to ); break; default: g_assert( 0 ); } } /* Erode! */ for( y = to; y < bo; y++ ) { VipsPel *p = IM_REGION_ADDR( ir, le, y ); VipsPel *q = IM_REGION_ADDR( or, le, y ); /* Loop along line. */ for( x = 0; x < sz; x++, q++, p++ ) { /* Check all set pixels are set. */ result = 255; for( i = 0; i < seq->ss; i++ ) if( !p[soff[i]] ) { /* Found a mismatch! */ result = 0; break; } /* Check all clear pixels are clear. */ if( result ) for( i = 0; i < seq->cs; i++ ) if( p[coff[i]] ) { result = 0; break; } *q = result; } } return( 0 ); } /* The vector codepath. */ static int morph_vector_gen( REGION *or, void *vseq, void *a, void *b ) { MorphSequence *seq = (MorphSequence *) vseq; Morph *morph = (Morph *) b; INTMASK *mask = morph->mask; REGION *ir = seq->ir; Rect *r = &or->valid; int sz = IM_REGION_N_ELEMENTS( or ); Rect s; int y, j; VipsExecutor executor[MAX_PASS]; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); #ifdef DEBUG printf( "morph_vector_gen: preparing %dx%d@%dx%d pixels\n", s.width, s.height, s.left, s.top ); #endif /*DEBUG*/ for( j = 0; j < morph->n_pass; j++ ) vips_executor_set_program( &executor[j], morph->pass[j].vector, sz ); for( y = 0; y < r->height; y++ ) { for( j = 0; j < morph->n_pass; j++ ) { void *d; /* The last pass goes to the output image, * intermediate passes go to t2. */ if( j == morph->n_pass - 1 ) d = IM_REGION_ADDR( or, r->left, r->top + y ); else d = seq->t2; vips_executor_set_scanline( &executor[j], ir, r->left, r->top + y ); vips_executor_set_array( &executor[j], morph->pass[j].r, seq->t1 ); vips_executor_set_destination( &executor[j], d ); vips_executor_run( &executor[j] ); IM_SWAP( void *, seq->t1, seq->t2 ); } } return( 0 ); } /* Morph an image. */ static int morphology( IMAGE *in, IMAGE *out, INTMASK *mask, MorphOp op ) { Morph *morph; im_generate_fn generate; /* Check parameters. */ if( !(morph = morph_new( in, out, mask, op )) ) return( -1 ); /* Prepare output. Consider a 7x7 mask and a 7x7 image --- the output * would be 1x1. */ if( im_cp_desc( morph->out, morph->in ) ) return( -1 ); morph->out->Xsize -= morph->mask->xsize - 1; morph->out->Ysize -= morph->mask->ysize - 1; if( morph->out->Xsize <= 0 || morph->out->Ysize <= 0 ) { im_error( "morph", "%s", _( "image too small for mask" ) ); return( -1 ); } if( morph->n_pass ) { generate = morph_vector_gen; #ifdef DEBUG printf( "morph_vector_gen: %d passes\n", morph->n_pass ); #endif /*DEBUG*/ } else if( morph->op == DILATE ) generate = dilate_gen; else generate = erode_gen; if( im_demand_hint( morph->out, IM_SMALLTILE, morph->in, NULL ) || im_generate( morph->out, morph_start, generate, morph_stop, morph->in, morph ) ) return( -1 ); morph->out->Xoffset = -morph->mask->xsize / 2; morph->out->Yoffset = -morph->mask->ysize / 2; return( 0 ); } /* Keep the _raw versions for compat. */ int im_dilate_raw( IMAGE *in, IMAGE *out, INTMASK *mask ) { return( morphology( in, out, mask, DILATE ) ); } int im_erode_raw( IMAGE *in, IMAGE *out, INTMASK *mask ) { return( morphology( in, out, mask, ERODE ) ); } int im_dilate( IMAGE *in, IMAGE *out, INTMASK *mask ) { IMAGE *t1 = im_open_local( out, "im_dilate:1", "p" ); if( !t1 || im_embed( in, t1, 1, mask->xsize / 2, mask->ysize / 2, in->Xsize + mask->xsize - 1, in->Ysize + mask->ysize - 1 ) || morphology( t1, out, mask, DILATE ) ) return( -1 ); out->Xoffset = 0; out->Yoffset = 0; return( 0 ); } int im_erode( IMAGE *in, IMAGE *out, INTMASK *mask ) { IMAGE *t1 = im_open_local( out, "im_erode:1", "p" ); if( !t1 || im_embed( in, t1, 1, mask->xsize / 2, mask->ysize / 2, in->Xsize + mask->xsize - 1, in->Ysize + mask->ysize - 1 ) || morphology( t1, out, mask, ERODE ) ) return( -1 ); out->Xoffset = 0; out->Yoffset = 0; return( 0 ); } vips-7.38.5/libvips/morphology/morphology.c0000644000175000017500000001020612303141142015720 00000000000000/* base class for all morphological operations * * properties: * - one input image */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pmorphology.h" /** * SECTION: morphology * @short_description: morphological operators, rank filters and related image * analysis * @see_also: boolean * @stability: Stable * @include: vips/vips.h * * The morphological functions search images * for particular patterns of pixels, specified with the mask argument, * either adding or removing pixels when they find a match. They are useful * for cleaning up images --- for example, you might threshold an image, and * then use one of the morphological functions to remove all single isolated * pixels from the result. * * If you combine the morphological operators with the mask rotators * im_rotate_imask45(), for example) and apply them repeatedly, you * can achieve very complicated effects: you can thin, prune, fill, open edges, * close gaps, and many others. For example, see `Fundamentals of Digital * Image Processing' by A. Jain, pp 384-388, Prentice-Hall, 1989 for more * ideas. * * Beware that VIPS reverses the usual image processing convention, by * assuming white objects (non-zero pixels) on a black background (zero * pixels). * * The mask you give to the morphological functions should contain only the * values 0 (for background), 128 (for don't care) and 255 (for object). The * mask must have odd length sides --- the origin of the mask is taken to be * the centre value. For example, the mask: * * 3 3 * 128 255 128 * 255 0 255 * 128 255 128 * * applied to an image with im_erode(), will find all black pixels * 4-way connected with white pixels. Essentially, im_dilate() * sets pixels in the output if any part of the mask matches, whereas * im_erode() sets pixels only if all of the mask matches. * * See im_andimage(), im_orimage() and im_eorimage() * for analogues of the usual set difference and set union operations. */ G_DEFINE_ABSTRACT_TYPE( VipsMorphology, vips_morphology, VIPS_TYPE_OPERATION ); static void vips_morphology_class_init( VipsMorphologyClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "morphology"; vobject_class->description = _( "morphological operations" ); /* Inputs set by subclassess. */ VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMorphology, in ) ); } static void vips_morphology_init( VipsMorphology *morphology ) { } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_morphology_operation_init( void ) { extern int vips_morph_get_type( void ); extern int vips_rank_get_type( void ); extern int vips_countlines_get_type( void ); vips_morph_get_type(); vips_rank_get_type(); vips_countlines_get_type(); } vips-7.38.5/libvips/morphology/Makefile.in0000644000175000017500000005171012303144055015435 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/morphology DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmorphology_la_LIBADD = am_libmorphology_la_OBJECTS = morphology.lo countlines.lo rank.lo \ hitmiss.lo morph.lo im_label_regions.lo libmorphology_la_OBJECTS = $(am_libmorphology_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmorphology_la_SOURCES) DIST_SOURCES = $(libmorphology_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libmorphology.la libmorphology_la_SOURCES = \ morphology.c \ pmorphology.h \ countlines.c \ rank.c \ hitmiss.c \ morph.c \ im_label_regions.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/morphology/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/morphology/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmorphology.la: $(libmorphology_la_OBJECTS) $(libmorphology_la_DEPENDENCIES) $(EXTRA_libmorphology_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmorphology_la_OBJECTS) $(libmorphology_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/countlines.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hitmiss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_label_regions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/morph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/morphology.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rank.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/morphology/Makefile.am0000644000175000017500000000037212303141142015414 00000000000000noinst_LTLIBRARIES = libmorphology.la libmorphology_la_SOURCES = \ morphology.c \ pmorphology.h \ countlines.c \ rank.c \ hitmiss.c \ morph.c \ im_label_regions.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/morphology/morph.c0000644000175000017500000001321412303141142014650 00000000000000/* morphology * * 23/10/13 * - from vips_conv() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* This is a simple wrapper over the old vips7 functions. At some point we * should rewrite this as a pure vips8 class and redo the vips7 functions as * wrappers over this. */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pmorphology.h" /** * VipsOperationMorphology: * @VIPS_OPERATION_MORPHOLOGY_ERODE: true if all set * @VIPS_OPERATION_MORPHOLOGY_DILATE: true if one set * * More like hit-miss, really. * * See also: vips_morph(). */ typedef struct { VipsMorphology parent_instance; VipsImage *out; VipsImage *mask; VipsOperationMorphology morph; /* @mask cast ready for processing. */ VipsImage *M; } VipsMorph; typedef VipsMorphologyClass VipsMorphClass; G_DEFINE_TYPE( VipsMorph, vips_morph, VIPS_TYPE_MORPHOLOGY ); static int vips_morph_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsMorphology *morphology = (VipsMorphology *) object; VipsMorph *morph = (VipsMorph *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 2 ); INTMASK *imsk; g_object_set( morph, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_morph_parent_class )->build( object ) ) return( -1 ); if( vips_check_matrix( class->nickname, morph->mask, &t[0] ) ) return( -1 ); morph->M = t[0]; if( !(imsk = im_vips2imask( morph->M, class->nickname )) || !im_local_imask( morph->out, imsk ) ) return( -1 ); switch( morph->morph ) { case VIPS_OPERATION_MORPHOLOGY_DILATE: if( im_dilate( morphology->in, morph->out, imsk ) ) return( -1 ); break; case VIPS_OPERATION_MORPHOLOGY_ERODE: if( im_erode( morphology->in, morph->out, imsk ) ) return( -1 ); break; default: g_assert( 0 ); } return( 0 ); } static void vips_morph_class_init( VipsMorphClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "morph"; object_class->description = _( "morphology operation" ); object_class->build = vips_morph_build; VIPS_ARG_IMAGE( class, "out", 10, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsMorph, out ) ); VIPS_ARG_IMAGE( class, "mask", 20, _( "Mask" ), _( "Input matrix image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMorph, mask ) ); VIPS_ARG_ENUM( class, "morph", 103, _( "Morphology" ), _( "Morphological operation to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMorph, morph ), VIPS_TYPE_OPERATION_MORPHOLOGY, VIPS_OPERATION_MORPHOLOGY_ERODE ); } static void vips_morph_init( VipsMorph *morph ) { morph->morph = VIPS_OPERATION_MORPHOLOGY_ERODE; } /** * vips_morph: * @in: input image * @out: output image * @mask: morphology with this mask * @morph: operation to perform * @...: %NULL-terminated list of optional named arguments * * Performs a morphological operation on @in using @mask as a * structuring element. * * The image should have 0 (black) for no object and 255 * (non-zero) for an object. Note that this is the reverse of the usual * convention for these operations, but more convenient when combined with the * boolean operators. The output image is the same * size as the input image: edge pxels are made by expanding the input image * as necessary. * * Mask coefficients can be either 0 (for object) or 255 (for background) * or 128 (for do not care). The origin of the mask is at location * (m.xsize / 2, m.ysize / 2), integer division. All algorithms have been * based on the book "Fundamentals of Digital Image Processing" by A. Jain, * pp 384-388, Prentice-Hall, 1989. * * For #VIPS_OPERATION_MOPHOLOGY_ERODE, * the whole mask must match for the output pixel to be * set, that is, the result is the logical AND of the selected input pixels. * * For #VIPS_OPERATION_MOPHOLOGY_DILATE, * the output pixel is set if any part of the mask * matches, that is, the result is the logical OR of the selected input pixels. * * See the boolean operations vips_andimage(), vips_orimage() and * vips_eorimage() * for analogues of the usual set difference and set union operations. * * Operations are performed using the processor's vector unit, * if possible. Disable this with --vips-novector or IM_NOVECTOR. * * Returns: 0 on success, -1 on error */ int vips_morph( VipsImage *in, VipsImage **out, VipsImage *mask, VipsOperationMorphology morph, ... ) { va_list ap; int result; va_start( ap, morph ); result = vips_call_split( "morph", ap, in, out, mask, morph ); va_end( ap ); return( result ); } vips-7.38.5/libvips/freqfilt/0000755000175000017500000000000012303146330013057 500000000000000vips-7.38.5/libvips/freqfilt/phasecor.c0000644000175000017500000000676412303140253014762 00000000000000/* Like spcor, but calculates phase correlation in the Fourier domain. * * Copyright: 2008, Nottingham Trent University * * Author: Tom Vajzovic * Written on: 2008-01-16 * 7/2/10 * - cleanups * - gtkdoc * 3/1/14 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pfreqfilt.h" typedef struct _VipsPhasecor { VipsFreqfilt parent_instance; VipsImage *in2; } VipsPhasecor; typedef VipsFreqfiltClass VipsPhasecorClass; G_DEFINE_TYPE( VipsPhasecor, vips_phasecor, VIPS_TYPE_FREQFILT ); static int vips_phasecor_build( VipsObject *object ) { VipsFreqfilt *freqfilt = VIPS_FREQFILT( object ); VipsPhasecor *phasecor = (VipsPhasecor *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 ); VipsImage *in1, *in2; if( VIPS_OBJECT_CLASS( vips_phasecor_parent_class )-> build( object ) ) return( -1 ); in1 = freqfilt->in; in2 = phasecor->in2; if( in1->BandFmt != VIPS_FORMAT_COMPLEX ) { if( vips_fwfft( in1, &t[0], NULL ) ) return( -1 ); in1 = t[0]; } if( in2->BandFmt != VIPS_FORMAT_COMPLEX ) { if( vips_fwfft( in2, &t[1], NULL ) ) return( -1 ); in2 = t[1]; } if( vips_cross_phase( in1, in2, &t[2], NULL ) || vips_invfft( t[2], &t[3], "real", TRUE, NULL ) || vips_image_write( t[3], freqfilt->out ) ) return( -1 ); return( 0 ); } static void vips_phasecor_class_init( VipsPhasecorClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "phasecor"; vobject_class->description = _( "calculate phase correlation" ); vobject_class->build = vips_phasecor_build; VIPS_ARG_IMAGE( class, "in2", 0, _( "in2" ), _( "Second input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsPhasecor, in2 ) ); } static void vips_phasecor_init( VipsPhasecor *phasecor ) { } /** * vips_phasecor: * @in1: first input image * @in2: second input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert the two input images to Fourier space, calculate phase-correlation, * back to real space. * * See also: vips_fwfft(), vips_cross_phase(), * * Returns: 0 on success, -1 on error. */ int vips_phasecor( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "phasecor", ap, in1, in2, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/freqfilt/fwfft.c0000644000175000017500000002135412303141142014260 00000000000000/* forward FFT * * Author: Nicos Dessipris * Written on: 12/04/1990 * Modified on : 09/05/1990 to cope with float input * Modified on : 08/03/1991 history removed * Modified on : 03/04/1991 to cope with any input * * 28/6/95 JC * - rewritten to use im_clip2f() rather than own code * - memory leaks fixed * 10/9/98 JC * - frees memory more quickly * 2/4/02 JC * - fftw code added * 13/7/02 JC * - output Type set to IM_TYPE_FOURIER to help nip * 27/2/03 JC * - exploits real_to_complex() path in libfftw for real input (thanks * Matt) for a 2x speed-up * 17/11/03 JC * - fix a segv for wider than high images in the real_to_complex() path * (thanks Andrey) * - fixes to real_to_complex() path to give the correct result for * non-square images, including odd widths and heights * 3/11/04 * - added fftw3 support * 7/2/10 * - cleanups * - gtkdoc * 25/3/10 * - have a "t" image linked to out to keep the image alive for longer * 27/1/12 * - better setting of interpretation * - remove own fft fallback code * - remove fftw2 path * - reduce memuse * 3/1/14 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pfreqfilt.h" #ifdef HAVE_FFTW #include typedef struct _VipsFwfft { VipsFreqfilt parent_instance; } VipsFwfft; typedef VipsFreqfiltClass VipsFwfftClass; G_DEFINE_TYPE( VipsFwfft, vips_fwfft, VIPS_TYPE_FREQFILT ); /* Real to complex forward transform. */ static int rfwfft1( VipsObject *object, VipsImage *in, VipsImage **out ) { VipsFwfft *fwfft = (VipsFwfft *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( fwfft ); const guint64 size = VIPS_IMAGE_N_PELS( in ); const int half_width = in->Xsize / 2 + 1; double *half_complex; double *planner_scratch; fftw_plan plan; double *buf, *q, *p; int x, y; if( vips_check_mono( class->nickname, in ) || vips_check_uncoded( class->nickname, in ) ) return( -1 ); /* Convert input to a real double membuffer. */ t[1] = vips_image_new_buffer(); if( vips_cast_double( in, &t[0], NULL ) || vips_image_write( t[0], t[1] ) ); /* Make the plan for the transform. Yes, they really do use nx for * height and ny for width. Use a separate scratch buffer for the * planner, we can't overwrite real->data */ if( !(planner_scratch = VIPS_ARRAY( fwfft, VIPS_IMAGE_N_PELS( in ), double )) ) return( -1 ); if( !(half_complex = VIPS_ARRAY( fwfft, in->Ysize * half_width * 2, double )) ) return( -1 ); if( !(plan = fftw_plan_dft_r2c_2d( in->Ysize, in->Xsize, planner_scratch, (fftw_complex *) half_complex, 0 )) ) { vips_error( class->nickname, "%s", _( "unable to create transform plan" ) ); return( -1 ); } fftw_execute_dft_r2c( plan, (double *) t[1]->data, (fftw_complex *) half_complex ); fftw_destroy_plan( plan ); /* Write to out as another memory buffer. */ *out = vips_image_new_buffer(); if( vips_image_pipelinev( *out, VIPS_DEMAND_STYLE_ANY, in, NULL ) ) return( -1 ); (*out)->BandFmt = VIPS_FORMAT_DPCOMPLEX; (*out)->Type = VIPS_INTERPRETATION_FOURIER; if( !(buf = VIPS_ARRAY( fwfft, VIPS_IMAGE_N_PELS( *out ), double )) ) return( -1 ); /* Copy and normalise. The right half is the up/down and * left/right flip of the left, but conjugated. Do the first * row separately, then mirror around the centre row. */ p = half_complex; q = buf; for( x = 0; x < half_width; x++ ) { q[0] = p[0] / size; q[1] = p[1] / size; p += 2; q += 2; } p = half_complex + ((in->Xsize + 1) / 2 - 1) * 2; for( x = half_width; x < (*out)->Xsize; x++ ) { q[0] = p[0] / size; q[1] = -1.0 * p[1] / size; p -= 2; q += 2; } if( vips_image_write_line( *out, 0, (VipsPel *) buf ) ) return( -1 ); for( y = 1; y < (*out)->Ysize; y++ ) { p = half_complex + y * half_width * 2; q = buf; for( x = 0; x < half_width; x++ ) { q[0] = p[0] / size; q[1] = p[1] / size; p += 2; q += 2; } /* Good grief. */ p = half_complex + 2 * (((*out)->Ysize - y + 1) * half_width - 2 + (in->Xsize & 1)); for( x = half_width; x < (*out)->Xsize; x++ ) { q[0] = p[0] / size; q[1] = -1.0 * p[1] / size; p -= 2; q += 2; } if( vips_image_write_line( *out, y, (VipsPel *) buf ) ) return( -1 ); } return( 0 ); } /* Complex to complex forward transform. */ static int cfwfft1( VipsObject *object, VipsImage *in, VipsImage **out ) { VipsFwfft *fwfft = (VipsFwfft *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( fwfft ); fftw_plan plan; double *planner_scratch; double *buf, *q, *p; int x, y; if( vips_check_mono( class->nickname, in ) || vips_check_uncoded( class->nickname, in ) ) return( -1 ); /* Convert input to a complex double membuffer. */ t[1] = vips_image_new_buffer(); if( vips_cast_dpcomplex( in, &t[0], NULL ) || vips_image_write( t[0], t[1] ) ); /* We have to have a separate buffer for the planner to work on. */ if( !(planner_scratch = VIPS_ARRAY( fwfft, VIPS_IMAGE_N_PELS( in ) * 2, double )) ) return( -1 ); /* Make the plan for the transform. */ if( !(plan = fftw_plan_dft_2d( in->Ysize, in->Xsize, (fftw_complex *) planner_scratch, (fftw_complex *) planner_scratch, FFTW_FORWARD, 0 )) ) { vips_error( class->nickname, "%s", _( "unable to create transform plan" ) ); return( -1 ); } fftw_execute_dft( plan, (fftw_complex *) t[1]->data, (fftw_complex *) t[1]->data ); fftw_destroy_plan( plan ); /* Write to out as another memory buffer. */ *out = vips_image_new_buffer(); if( vips_image_pipelinev( *out, VIPS_DEMAND_STYLE_ANY, in, NULL ) ) return( -1 ); (*out)->BandFmt = VIPS_FORMAT_DPCOMPLEX; (*out)->Type = VIPS_INTERPRETATION_FOURIER; if( !(buf = VIPS_ARRAY( fwfft, VIPS_IMAGE_N_PELS( *out ), double )) ) return( -1 ); /* Copy to out, normalise. */ p = (double *) t[1]->data; for( y = 0; y < (*out)->Ysize; y++ ) { guint64 size = VIPS_IMAGE_N_PELS( *out ); q = buf; for( x = 0; x < (*out)->Xsize; x++ ) { q[0] = p[0] / size; q[1] = p[1] / size; p += 2; q += 2; } if( vips_image_write_line( *out, y, (VipsPel *) buf ) ) return( -1 ); } return( 0 ); } static int vips_fwfft_build( VipsObject *object ) { VipsFreqfilt *freqfilt = VIPS_FREQFILT( object ); VipsFwfft *fwfft = (VipsFwfft *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); if( VIPS_OBJECT_CLASS( vips_fwfft_parent_class )-> build( object ) ) return( -1 ); if( vips_bandfmt_iscomplex( freqfilt->in->BandFmt ) ) { if( vips__fftproc( VIPS_OBJECT( fwfft ), freqfilt->in, &t[0], cfwfft1 ) ) return( -1 ); } else { if( vips__fftproc( VIPS_OBJECT( fwfft ), freqfilt->in, &t[0], rfwfft1 ) ) return( -1 ); } if( vips_image_write( t[0], freqfilt->out ) ) return( -1 ); return( 0 ); } static void vips_fwfft_class_init( VipsFwfftClass *class ) { VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); vobject_class->nickname = "fwfft"; vobject_class->description = _( "forward FFT" ); vobject_class->build = vips_fwfft_build; } static void vips_fwfft_init( VipsFwfft *fwfft ) { } #endif /*HAVE_FFTW*/ /** * vips_fwfft: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Transform an image to Fourier space. * * VIPS uses the fftw Fourier Transform library. If this library was not * available when VIPS was configured, these functions will fail. * * See also: vips_invfft(). * * Returns: 0 on success, -1 on error. */ int vips_fwfft( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "fwfft", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/freqfilt/pfreqfilt.h0000644000175000017500000000417412303140253015150 00000000000000/* base class for all freqfilt operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PFREQFILT_H #define VIPS_PFREQFILT_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_FREQFILT (vips_freqfilt_get_type()) #define VIPS_FREQFILT( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_FREQFILT, VipsFreqfilt )) #define VIPS_FREQFILT_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_FREQFILT, VipsFreqfiltClass)) #define VIPS_IS_FREQFILT( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FREQFILT )) #define VIPS_IS_FREQFILT_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FREQFILT )) #define VIPS_FREQFILT_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_FREQFILT, VipsFreqfiltClass )) typedef struct _VipsFreqfilt { VipsOperation parent_instance; VipsImage *in; VipsImage *out; } VipsFreqfilt; typedef struct _VipsFreqfiltClass { VipsOperationClass parent_class; } VipsFreqfiltClass; GType vips_freqfilt_get_type( void ); typedef int (*VipsFftProcessFn)( VipsObject *, VipsImage *, VipsImage ** ); int vips__fftproc( VipsObject *context, VipsImage *in, VipsImage **out, VipsFftProcessFn fn ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PFREQFILT_H*/ vips-7.38.5/libvips/freqfilt/freqmult.c0000644000175000017500000001036012303140253015000 00000000000000/* frequency-domain filter an image * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on : 08/03/1991 * 16/6/93 J.Cupitt * - im_multiply() called, rather than im_cmultim() * 27/10/93 JC * - im_clip2*() called, rather than im_any2*() * 20/9/95 JC * - rewritten * 10/9/98 JC * - frees memory more quickly * 4/3/03 JC * - use im_invfftr() to get real back for speedup * 3/1/14 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pfreqfilt.h" typedef struct _VipsFreqmult { VipsFreqfilt parent_instance; VipsImage *mask; } VipsFreqmult; typedef VipsFreqfiltClass VipsFreqmultClass; G_DEFINE_TYPE( VipsFreqmult, vips_freqmult, VIPS_TYPE_FREQFILT ); static int vips_freqmult_build( VipsObject *object ) { VipsFreqfilt *freqfilt = VIPS_FREQFILT( object ); VipsFreqmult *freqmult = (VipsFreqmult *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 ); VipsImage *in; if( VIPS_OBJECT_CLASS( vips_freqmult_parent_class )-> build( object ) ) return( -1 ); in = freqfilt->in; if( vips_bandfmt_iscomplex( in->BandFmt ) ) { if( vips_multiply( in, freqmult->mask, &t[0], NULL ) || vips_invfft( t[0], &t[1], "real", TRUE, NULL ) ) return( -1 ); in = t[1]; } else { /* Optimisation: output of vips_invfft() is double, we * will usually cast to char, so rather than keeping a * large double buffer and partial to char from that, * cast to a memory buffer and copy to out from that. * * FIXME does this actually work now we're a class? test * perhaps we need a temporary object */ t[4] = vips_image_new_buffer(); if( vips_fwfft( in, &t[0], NULL ) || vips_multiply( t[0], freqmult->mask, &t[1], NULL ) || vips_invfft( t[1], &t[2], "real", TRUE, NULL ) || vips_cast( t[2], &t[3], in->BandFmt, NULL ) || vips_image_write( t[3], t[4] ) ) return( -1 ); in = t[4]; } if( vips_image_write( in, freqfilt->out ) ) return( -1 ); return( 0 ); } static void vips_freqmult_class_init( VipsFreqmultClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "freqmult"; vobject_class->description = _( "frequency-domain filtering" ); vobject_class->build = vips_freqmult_build; VIPS_ARG_IMAGE( class, "mask", 0, _( "mask" ), _( "Input mask image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFreqmult, mask ) ); } static void vips_freqmult_init( VipsFreqmult *freqmult ) { } /** * vips_freqmult: * @in: input image * @mask: mask image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Multiply @in by @mask in Fourier space. * * @in is transformed to Fourier space, multipled with @mask, then * transformed back to real space. If @in is already a complex image, just * multiply then inverse transform. * * See also: vips_invfft(), vips_mask_ideal(). * * Returns: 0 on success, -1 on error. */ int vips_freqmult( VipsImage *in, VipsImage *mask, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "freqmult", ap, in, mask, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/freqfilt/freqfilt.c0000644000175000017500000001106112303140253014754 00000000000000/* base class for all Fourier stuff * * properties: * - single output image */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pfreqfilt.h" /** * SECTION: freq_filt * @short_description: fourier transforms and frequency-domin filters * @stability: Stable * @see_also: image * @include: vips/vips.h * * To and from Fourier space, filter in Fourier space, convert Fourier-space * images to a displayable form. */ G_DEFINE_ABSTRACT_TYPE( VipsFreqfilt, vips_freqfilt, VIPS_TYPE_OPERATION ); static int vips_freqfilt_build( VipsObject *object ) { VipsFreqfilt *freqfilt = VIPS_FREQFILT( object ); #ifdef DEBUG printf( "vips_freqfilt_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_object_set( freqfilt, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_freqfilt_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_freqfilt_class_init( VipsFreqfiltClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "freqfilt"; vobject_class->description = _( "frequency-domain filter operations" ); vobject_class->build = vips_freqfilt_build; VIPS_ARG_IMAGE( class, "in", -1, _( "in" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFreqfilt, in ) ); VIPS_ARG_IMAGE( class, "out", 1, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsFreqfilt, out ) ); } static void vips_freqfilt_init( VipsFreqfilt *freqfilt ) { } /* Transform an n-band image with a 1-band processing function. * * Memory strategy: we need memory buffers for the input and the output of * fftw. In some modes fftw generates only half the output and we construct * the rest. * * input pipeline -> * bandsplit -> * full memory image, freed when im_*fft*() exits -> * fftw -> * half memory image, freed when im_*fft*() exits -> * full memory image, freed when @out is freed -> * partial bandjoin -> * output pipeline * * im__fftproc() needs to just call im__fftproc_fn directly for 1 band images, * so we can't cache the output in this fn. */ int vips__fftproc( VipsObject *context, VipsImage *in, VipsImage **out, VipsFftProcessFn fn ) { VipsImage **bands = (VipsImage **) vips_object_local_array( context, in->Bands ); VipsImage **fft = (VipsImage **) vips_object_local_array( context, in->Bands ); int b; if( in->Bands == 1 ) return( fn( context, in, out ) ); for( b = 0; b < in->Bands; b++ ) if( vips_extract_band( in, &bands[b], b, NULL ) || fn( context, bands[b], &fft[b] ) ) return( -1 ); if( vips_bandjoin( fft, out, in->Bands, NULL ) ) return( -1 ); return( 0 ); } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_freqfilt_operation_init( void ) { #ifdef HAVE_FFTW extern GType vips_fwfft_get_type( void ); extern GType vips_invfft_get_type( void ); #endif /*HAVE_FFTW*/ extern GType vips_freqmult_get_type( void ); extern GType vips_spectrum_get_type( void ); extern GType vips_phasecor_get_type( void ); #ifdef HAVE_FFTW vips_fwfft_get_type(); vips_invfft_get_type(); #endif /*HAVE_FFTW*/ vips_freqmult_get_type(); vips_spectrum_get_type(); vips_phasecor_get_type(); } vips-7.38.5/libvips/freqfilt/Makefile.in0000644000175000017500000005161112303144055015052 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/freqfilt DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfreqfilt_la_LIBADD = am_libfreqfilt_la_OBJECTS = freqfilt.lo fwfft.lo invfft.lo freqmult.lo \ spectrum.lo phasecor.lo libfreqfilt_la_OBJECTS = $(am_libfreqfilt_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfreqfilt_la_SOURCES) DIST_SOURCES = $(libfreqfilt_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libfreqfilt.la libfreqfilt_la_SOURCES = \ freqfilt.c \ pfreqfilt.h \ fwfft.c \ invfft.c \ freqmult.c \ spectrum.c \ phasecor.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/freqfilt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/freqfilt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfreqfilt.la: $(libfreqfilt_la_OBJECTS) $(libfreqfilt_la_DEPENDENCIES) $(EXTRA_libfreqfilt_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libfreqfilt_la_OBJECTS) $(libfreqfilt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freqfilt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freqmult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fwfft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invfft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phasecor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spectrum.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/freqfilt/Makefile.am0000644000175000017500000000035312303140253015032 00000000000000noinst_LTLIBRARIES = libfreqfilt.la libfreqfilt_la_SOURCES = \ freqfilt.c \ pfreqfilt.h \ fwfft.c \ invfft.c \ freqmult.c \ spectrum.c \ phasecor.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/freqfilt/invfft.c0000644000175000017500000001575412303141142014447 00000000000000/* Inverse FFT * * Author: Nicos Dessipris * Written on: 12/04/1990 * Modified on : * 28/6/95 JC * - rewritten, based on new im_invfft() code * 10/9/98 JC * - frees memory more quickly * 2/4/02 JC * - fftw code added * 13/7/02 JC * - Type reset * 27/2/03 JC * - tiny speed-up ... save 1 copy on write * 22/1/04 JC * - oops, fix for segv on wider than high fftw transforms * 3/11/04 * - added fftw3 support * 7/2/10 * - gtkdoc * 27/1/12 * - better setting of interpretation * - remove own fft fallback code * - remove fftw2 path * - reduce memuse * 3/1/14 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pfreqfilt.h" #ifdef HAVE_FFTW #include typedef struct _VipsInvfft { VipsFreqfilt parent_instance; gboolean real; } VipsInvfft; typedef VipsFreqfiltClass VipsInvfftClass; G_DEFINE_TYPE( VipsInvfft, vips_invfft, VIPS_TYPE_FREQFILT ); /* Complex to complex inverse transform. */ static int cinvfft1( VipsObject *object, VipsImage *in, VipsImage **out ) { VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); VipsInvfft *invfft = (VipsInvfft *) object; VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( invfft ); fftw_plan plan; double *planner_scratch; if( vips_check_mono( class->nickname, in ) || vips_check_uncoded( class->nickname, in ) ) return( -1 ); /* Convert input to a complex double membuffer. */ *out = vips_image_new_buffer(); if( vips_cast_dpcomplex( in, &t[0], NULL ) || vips_image_write( t[0], *out ) ); /* Make the plan for the transform. Yes, they really do use nx for * height and ny for width. */ if( !(planner_scratch = VIPS_ARRAY( invfft, VIPS_IMAGE_N_PELS( in ) * 2, double )) ) return( -1 ); if( !(plan = fftw_plan_dft_2d( in->Ysize, in->Xsize, (fftw_complex *) planner_scratch, (fftw_complex *) planner_scratch, FFTW_BACKWARD, 0 )) ) { vips_error( class->nickname, "%s", _( "unable to create transform plan" ) ); return( -1 ); } fftw_execute_dft( plan, (fftw_complex *) (*out)->data, (fftw_complex *) (*out)->data ); fftw_destroy_plan( plan ); (*out)->Type = VIPS_INTERPRETATION_B_W; return( 0 ); } /* Complex to real inverse transform. */ static int rinvfft1( VipsObject *object, VipsImage *in, VipsImage **out ) { VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); VipsInvfft *invfft = (VipsInvfft *) object; VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( invfft ); const int half_width = in->Xsize / 2 + 1; double *half_complex; double *planner_scratch; fftw_plan plan; int x, y; double *q, *p; /* Convert input to a complex double membuffer. */ t[1] = vips_image_new_buffer(); if( vips_cast_dpcomplex( in, &t[0], NULL ) || vips_image_write( t[0], t[1] ) ); /* Build half-complex image. */ if( !(half_complex = VIPS_ARRAY( invfft, t[1]->Ysize * half_width * 2, double )) ) return( -1 ); q = half_complex; for( y = 0; y < t[1]->Ysize; y++ ) { p = ((double *) t[1]->data) + (guint64) y * t[1]->Xsize * 2; for( x = 0; x < half_width; x++ ) { q[0] = p[0]; q[1] = p[1]; p += 2; q += 2; } } /* Make mem buffer real image for output. */ *out = vips_image_new_buffer(); if( vips_image_pipelinev( *out, VIPS_DEMAND_STYLE_ANY, t[1], NULL ) ) return( -1 ); (*out)->BandFmt = VIPS_FORMAT_DOUBLE; (*out)->Type = VIPS_INTERPRETATION_B_W; if( vips_image_write_prepare( *out ) ) return( -1 ); /* Make the plan for the transform. Yes, they really do use nx for * height and ny for width. */ if( !(planner_scratch = VIPS_ARRAY( invfft, t[1]->Ysize * half_width * 2, double )) ) return( -1 ); if( !(plan = fftw_plan_dft_c2r_2d( t[1]->Ysize, t[1]->Xsize, (fftw_complex *) planner_scratch, (double *) (*out)->data, 0 )) ) { vips_error( class->nickname, "%s", _( "unable to create transform plan" ) ); return( -1 ); } fftw_execute_dft_c2r( plan, (fftw_complex *) half_complex, (double *) (*out)->data ); fftw_destroy_plan( plan ); return( 0 ); } static int vips_invfft_build( VipsObject *object ) { VipsFreqfilt *freqfilt = VIPS_FREQFILT( object ); VipsInvfft *invfft = (VipsInvfft *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); if( VIPS_OBJECT_CLASS( vips_invfft_parent_class )-> build( object ) ) return( -1 ); if( invfft->real ) { if( vips__fftproc( VIPS_OBJECT( invfft ), freqfilt->in, &t[0], rinvfft1 ) ) return( -1 ); } else { if( vips__fftproc( VIPS_OBJECT( invfft ), freqfilt->in, &t[0], cinvfft1 ) ) return( -1 ); } if( vips_image_write( t[0], freqfilt->out ) ) return( -1 ); return( 0 ); } static void vips_invfft_class_init( VipsInvfftClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "invfft"; vobject_class->description = _( "inverse FFT" ); vobject_class->build = vips_invfft_build; VIPS_ARG_BOOL( class, "real", 4, _( "Real" ), _( "Ouput only the real part of the transform" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsInvfft, real ), FALSE ); } static void vips_invfft_init( VipsInvfft *invfft ) { } #endif /*HAVE_FFTW*/ /** * vips_invfft: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @real: only output the real part * * Transform an image from Fourier space to real space. The result is complex. * If you are OK with a real result, set @real, it's quicker. * * VIPS uses the fftw Fourier Transform library. If this library was not * available when VIPS was configured, these functions will fail. * * See also: vips_fwfft(). * * Returns: 0 on success, -1 on error. */ int vips_invfft( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "invfft", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/freqfilt/spectrum.c0000644000175000017500000000623012303140253015004 00000000000000/* make a displayable power spectrum for an image * * Author: Nicos Dessipris * Written on: 27/03/1991 * Modified on : * 16/6/93 J.Cupitt * - im_ioflag() changed to im_iocheck() * 23/2/95 JC * - rewritten for partials * 10/9/98 JC * - frees memory more quickly * 2/4/02 JC * - any number of bands * 7/2/10 * - gtkdoc * - cleanups * 3/1/14 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pfreqfilt.h" typedef VipsFreqfilt VipsSpectrum; typedef VipsFreqfiltClass VipsSpectrumClass; G_DEFINE_TYPE( VipsSpectrum, vips_spectrum, VIPS_TYPE_FREQFILT ); static int vips_spectrum_build( VipsObject *object ) { VipsFreqfilt *freqfilt = VIPS_FREQFILT( object ); VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 ); VipsImage *in; if( VIPS_OBJECT_CLASS( vips_spectrum_parent_class )-> build( object ) ) return( -1 ); in = freqfilt->in; if( in->BandFmt != VIPS_FORMAT_COMPLEX ) { if( vips_fwfft( in, &t[0], NULL ) ) return( -1 ); in = t[0]; } if( vips_abs( in, &t[1], NULL ) || vips_scale( t[1], &t[2], "log", TRUE, NULL ) || vips_wrap( t[2], &t[3], NULL ) ) return( -1 ); if( vips_image_write( t[3], freqfilt->out ) ) return( -1 ); return( 0 ); } static void vips_spectrum_class_init( VipsSpectrumClass *class ) { VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); vobject_class->nickname = "spectrum"; vobject_class->description = _( "make displayable power spectrum" ); vobject_class->build = vips_spectrum_build; } static void vips_spectrum_init( VipsSpectrum *spectrum ) { } /** * vips_spectrum: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Make a displayable (ie. 8-bit unsigned int) power spectrum. * * If @in is non-complex, it is transformed to Fourier space. Then the * absolute value is passed through vips_scale() in log mode, and vips_wrap(). * * See also: vips_fwfft(), vips_scale(), vips_wrap(). * * Returns: 0 on success, -1 on error. */ int vips_spectrum( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "spectrum", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/inplace/0000755000175000017500000000000012303146331012657 500000000000000vips-7.38.5/libvips/inplace/im_draw_smudge.c0000644000175000017500000001014312303141142015723 00000000000000/* Smudge a piece of image. * * Copyright: J. Cupitt * Written: 15/06/1992 * 22/7/93 JC * - im_incheck() added * 16/8/94 JC * - im_incheck() changed to im_makerw() * ? JC * - im_makerw() changed to im_rwcheck() * 5/12/06 * - im_invalidate() after paint * 6/3/10 * - don't im_invalidate() after paint, this now needs to be at a higher * level * 30/9/10 * - gtk-doc * - deprecate im_smear() * 30/1/12 * - back to the custom smear, the conv one was too slow */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /** * im_draw_smudge: * @image: image to smudge * @left: area to smudge * @top: area to smudge * @width: area to smudge * @height: area to smudge * * Smudge a section of @image. Each pixel in the area @left, @top, @width, * @height is replaced by the average of the surrounding 3x3 pixels. * * This an inplace operation, so @image is changed. It does not thread and will * not work well as part of a pipeline. On 32-bit machines it will be limited * to 2GB images. * * See also: im_draw_line(). * * Returns: 0 on success, or -1 on error. */ int im_draw_smudge( VipsImage *im, int left, int top, int width, int height ) { /* Double bands for complex images. */ int bands = vips_image_get_bands( im ) * (vips_band_format_iscomplex( vips_image_get_format( im ) ) ? 2 : 1); int elements = bands * vips_image_get_width( im ); VipsRect area, image, clipped; double *total; int x, y, i, j, b; area.left = left; area.top = top; area.width = width; area.height = height; /* Don't do the margins. */ image.left = 0; image.top = 0; image.width = im->Xsize; image.height = im->Ysize; vips_rect_marginadjust( &image, -1 ); vips_rect_intersectrect( &area, &image, &clipped ); if( vips_rect_isempty( &clipped ) ) return( 0 ); if( !(total = VIPS_ARRAY( im, bands, double )) || im_rwcheck( im ) ) return( -1 ); /* What we do for each type. */ #define SMUDGE(TYPE) \ for( y = 0; y < clipped.height; y++ ) { \ TYPE *q; \ TYPE *p; \ \ q = (TYPE *) VIPS_IMAGE_ADDR( im, \ clipped.left, clipped.top + y ); \ p = q - elements - bands; \ for( x = 0; x < clipped.width; x++ ) { \ TYPE *p1, *p2; \ \ for( b = 0; b < bands; b++ ) \ total[b] = 0.0; \ \ p1 = p; \ for( i = 0; i < 3; i++ ) { \ p2 = p1; \ for( j = 0; j < 3; j++ ) \ for( b = 0; b < bands; b++ ) \ total[b] += *p2++; \ \ p1 += elements; \ } \ \ for( b = 0; b < bands; b++ ) \ q[b] = (16 * (double) q[b] + total[b]) / 25.0; \ \ p += bands; \ q += bands; \ } \ } switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_UCHAR: SMUDGE( unsigned char ); break; case VIPS_FORMAT_CHAR: SMUDGE( char ); break; case VIPS_FORMAT_USHORT: SMUDGE( unsigned short ); break; case VIPS_FORMAT_SHORT: SMUDGE( short ); break; case VIPS_FORMAT_UINT: SMUDGE( unsigned int ); break; case VIPS_FORMAT_INT: SMUDGE( int ); break; case VIPS_FORMAT_FLOAT: SMUDGE( float ); break; case VIPS_FORMAT_DOUBLE: SMUDGE( double ); break; case VIPS_FORMAT_COMPLEX: SMUDGE( float ); break; case VIPS_FORMAT_DPCOMPLEX: SMUDGE( double ); break; default: g_assert( 0 ); } return( 0 ); } vips-7.38.5/libvips/inplace/im_draw_circle.c0000644000175000017500000001161612303141142015706 00000000000000/* draw a circle on an image * * Author N. Dessipris * Written on 30/05/1990 * Updated on: * 22/7/93 JC * - im_incheck() call added * 16/8/94 JC * - im_incheck() changed to im_makerw() * 5/12/06 * - im_invalidate() after paint * 6/3/10 * - don't im_invalidate() after paint, this now needs to be at a higher * level * 18/8/10 * - gtkdoc * - rewritten: clips, fills, any bands, any format * 27/9/10 * - break base out to Draw */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "draw.h" /* Our state. */ typedef struct { Draw draw; /* Parameters. */ int cx, cy; int radius; gboolean fill; /* Derived stuff. */ VipsPel *centre; } Circle; static void circle_octants( Circle *circle, int x, int y ) { Draw *draw = DRAW( circle ); if( circle->fill ) { const int cx = circle->cx; const int cy = circle->cy; im__draw_scanline( draw, cy + y, cx - x, cx + x ); im__draw_scanline( draw, cy - y, cx - x, cx + x ); im__draw_scanline( draw, cy + x, cx - y, cx + y ); im__draw_scanline( draw, cy - x, cx - y, cx + y ); } else if( DRAW( circle )->noclip ) { const size_t lsize = draw->lsize; const size_t psize = draw->psize; VipsPel *centre = circle->centre; im__draw_pel( draw, centre + lsize * y - psize * x ); im__draw_pel( draw, centre + lsize * y + psize * x ); im__draw_pel( draw, centre - lsize * y - psize * x ); im__draw_pel( draw, centre - lsize * y + psize * x ); im__draw_pel( draw, centre + lsize * x - psize * y ); im__draw_pel( draw, centre + lsize * x + psize * y ); im__draw_pel( draw, centre - lsize * x - psize * y ); im__draw_pel( draw, centre - lsize * x + psize * y ); } else { const int cx = circle->cx; const int cy = circle->cy; im__draw_pel_clip( draw, cx + y, cy - x ); im__draw_pel_clip( draw, cx + y, cy + x ); im__draw_pel_clip( draw, cx - y, cy - x ); im__draw_pel_clip( draw, cx - y, cy + x ); im__draw_pel_clip( draw, cx + x, cy - y ); im__draw_pel_clip( draw, cx + x, cy + y ); im__draw_pel_clip( draw, cx - x, cy - y ); im__draw_pel_clip( draw, cx - x, cy + y ); } } static void circle_free( Circle *circle ) { im__draw_free( DRAW( circle ) ); im_free( circle ); } static Circle * circle_new( IMAGE *im, int cx, int cy, int radius, gboolean fill, VipsPel *ink ) { Circle *circle; if( im_check_coding_known( "im_draw_circle", im ) ) return( NULL ); if( !(circle = IM_NEW( NULL, Circle )) ) return( NULL ); if( !im__draw_init( DRAW( circle ), im, ink ) ) { circle_free( circle ); return( NULL ); } circle->cx = cx; circle->cy = cy; circle->radius = radius; circle->fill = fill; circle->centre = IM_IMAGE_ADDR( im, cx, cy ); if( cx - radius >= 0 && cx + radius < im->Xsize && cy - radius >= 0 && cy + radius < im->Ysize ) DRAW( circle )->noclip = TRUE; return( circle ); } static void circle_draw( Circle *circle ) { int x, y, d; y = circle->radius; d = 3 - 2 * circle->radius; for( x = 0; x < y; x++ ) { circle_octants( circle, x, y ); if( d < 0 ) d += 4 * x + 6; else { d += 4 * (x - y) + 10; y--; } } if( x == y ) circle_octants( circle, x, y ); } /** * im_draw_circle: * @image: image to draw on * @x: centre of circle * @y: centre of circle * @radius: circle radius * @fill: fill the circle * @ink: value to draw * * Draws a circle on @image. If @fill is %TRUE then the circle is filled, * otherwise a 1-pixel-wide perimeter is drawn. * * @ink is an array of bytes containing a valid pixel for the image's format. * It must have at least IM_IMAGE_SIZEOF_PEL( @image ) bytes. * * See also: im_draw_line(). * * Returns: 0 on success, or -1 on error. */ int im_draw_circle( VipsImage *image, int x, int y, int radius, gboolean fill, VipsPel *ink ) { if( x + radius >= 0 && x - radius < image->Xsize && y + radius >= 0 && y - radius < image->Ysize ) { Circle *circle; if( !(circle = circle_new( image, x, y, radius, fill, ink )) ) return( -1 ); circle_draw( circle ); circle_free( circle ); } return( 0 ); } vips-7.38.5/libvips/inplace/im_draw_rect.c0000644000175000017500000000634112303141142015401 00000000000000/* Fill Rect r of image im with pels of colour ink. * * Copyright: J. Cupitt * Written: 15/06/1992 * 22/7/93 JC * - im_incheck() added * 16/8/94 JC * - im_incheck() changed to im_makerw() * 5/12/06 * - im_invalidate() after paint * 6/3/10 * - don't im_invalidate() after paint, this now needs to be at a higher * level * 22/9/10 * - gtk-doc * - added 'fill' * - renamed as im_draw_rect() for consistency * 27/9/10 * - memcpy() subsequent lines of the rect */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "draw.h" /** * im_draw_rect: * @image: image to draw on * @left: area to paint * @top: area to paint * @width: area to paint * @height: area to paint * @fill: fill the rect * @ink: paint with this colour * * Paint pixels within @left, @top, @width, @height in @image with @ink. If * @fill is zero, just paint a 1-pixel-wide outline. * * See also: im_draw_circle(). * * Returns: 0 on success, or -1 on error. */ int im_draw_rect( IMAGE *image, int left, int top, int width, int height, int fill, VipsPel *ink ) { Rect im, rect, clipped; Draw draw; if( !fill ) return( im_draw_rect( image, left, top, width, 1, 1, ink ) || im_draw_rect( image, left + width - 1, top, 1, height, 1, ink ) || im_draw_rect( image, left, top + height - 1, width, 1, 1, ink ) || im_draw_rect( image, left, top, 1, height, 1, ink ) ); int x, y; VipsPel *to; VipsPel *q; /* Find area we plot. */ im.left = 0; im.top = 0; im.width = image->Xsize; im.height = image->Ysize; rect.left = left; rect.top = top; rect.width = width; rect.height = height; im_rect_intersectrect( &rect, &im, &clipped ); /* Any points left to plot? */ if( im_rect_isempty( &clipped ) ) return( 0 ); if( im_check_coding_known( "im_draw_rect", image ) || !im__draw_init( &draw, image, ink ) ) return( -1 ); /* We plot the first line pointwise, then memcpy() it for the * subsequent lines. */ to = IM_IMAGE_ADDR( image, clipped.left, clipped.top ); q = to; for( x = 0; x < clipped.width; x++ ) { im__draw_pel( &draw, q ); q += draw.psize; } q = to + draw.lsize; for( y = 1; y < clipped.height; y++ ) { memcpy( q, to, clipped.width * draw.psize ); q += draw.lsize; } im__draw_free( &draw ); return( 0 ); } vips-7.38.5/libvips/inplace/draw.h0000644000175000017500000000400112303141142013673 00000000000000/* base class for drawing operations */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Our state. */ typedef struct _Draw { /* Parameters. */ IMAGE *im; /* Draw here */ VipsPel *ink; /* Copy of ink param */ /* Derived stuff. */ size_t lsize; size_t psize; /* If the object to draw is entirely within the image, we have a * faster noclip path. */ gboolean noclip; } Draw; #define DRAW(X) ((Draw *)(X)) static inline void im__draw_pel( Draw *draw, VipsPel *q ) { int j; /* Faster than memcopy() for n < about 20. */ for( j = 0; j < draw->psize; j++ ) q[j] = draw->ink[j]; } /* Paint, with clip. */ static inline void im__draw_pel_clip( Draw *draw, int x, int y ) { if( x < 0 || x >= draw->im->Xsize ) return; if( y < 0 || y >= draw->im->Ysize ) return; im__draw_pel( draw, IM_IMAGE_ADDR( draw->im, x, y ) ); } /* Is p painted? */ static inline gboolean im__draw_painted( Draw *draw, VipsPel *p ) { int j; for( j = 0; j < draw->psize; j++ ) if( p[j] != draw->ink[j] ) break; return( j == draw->psize ); } void im__draw_scanline( Draw *draw, int y, int x1, int x2 ); void im__draw_free( Draw *draw ); Draw *im__draw_init( Draw *draw, IMAGE *im, VipsPel *ink ); vips-7.38.5/libvips/inplace/im_draw_mask.c0000644000175000017500000001621712303141142015402 00000000000000/* Draw a mask on an image. * * Copyright: J. Cupitt * Written: 15/06/1992 * 22/7/93 JC * - im_incheck() added * 16/8/94 JC * - im_incheck() changed to im_makerw() * 24/10/03 JC * - now blends with 0-255 mask * 5/12/06 * - im_invalidate() after paint * 6/3/10 * - don't im_invalidate() after paint, this now needs to be at a higher * level * 28/9/10 * - gtk-doc * - renamed as im_draw_mask() * - use Draw base class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "draw.h" typedef struct _Mask { Draw draw; /* Parameters. */ int x; int y; VipsImage *mask_im; /* Derived. */ Rect image_clip; Rect mask_clip; } Mask; static void mask_free( Mask *mask ) { im__draw_free( DRAW( mask ) ); im_free( mask ); } static Mask * mask_new( VipsImage *im, int x, int y, VipsPel *ink, VipsImage *mask_im ) { Mask *mask; Rect area, image; if( im_check_coding_noneorlabq( "im_draw_mask", im ) || im_incheck( mask_im ) || im_check_mono( "im_draw_mask", mask_im ) || im_check_uncoded( "im_draw_mask", mask_im ) || im_check_format( "im_draw_mask", mask_im, IM_BANDFMT_UCHAR ) || !(mask = IM_NEW( NULL, Mask )) ) return( NULL ); if( !im__draw_init( DRAW( mask ), im, ink ) ) { mask_free( mask ); return( NULL ); } mask->x = x; mask->y = y; mask->mask_im = mask_im; /* Find the area we draw on the image. */ area.left = x; area.top = y; area.width = mask_im->Xsize; area.height = mask_im->Ysize; image.left = 0; image.top = 0; image.width = im->Xsize; image.height = im->Ysize; im_rect_intersectrect( &area, &image, &mask->image_clip ); /* And the area of the mask image we use. */ mask->mask_clip = mask->image_clip; mask->mask_clip.left -= x; mask->mask_clip.top -= y; return( mask ); } /* Paint ink into an 8 or 16 bit integer image. */ #define IBLEND( TYPE, TO, INK ) { \ TYPE *tto = (TYPE *) (TO); \ TYPE *tink = (TYPE *) (INK); \ \ int x, i, j; \ \ for( j = 0, x = 0; x < mask->image_clip.width; x++ ) \ for( i = 0; i < DRAW( mask )->im->Bands; i++, j++ ) \ tto[j] = (tink[i] * mask_line[x] + \ tto[j] * (255 - mask_line[x])) / 255; \ } /* Do the blend with doubles. */ #define DBLEND( TYPE, TO, INK ) { \ TYPE *tto = (TYPE *) (TO); \ TYPE *tink = (TYPE *) (INK); \ \ int x, i, j; \ \ for( j = 0, x = 0; x < mask->image_clip.width; x++ ) \ for( i = 0; i < DRAW( mask )->im->Bands; i++, j++ ) \ tto[j] = ((double) tink[i] * mask_line[x] + \ (double) tto[j] * (255 - mask_line[x])) / 255;\ } /* Blend of complex. */ #define CBLEND( TYPE, TO, INK ) { \ TYPE *tto = (TYPE *) (TO); \ TYPE *tink = (TYPE *) (INK); \ \ int x, i, j; \ \ for( j = 0, x = 0; x < mask->image_clip.width; x++ ) \ for( i = 0; i < DRAW( mask )->im->Bands * 2; i += 2, j += 2 ) { \ tto[j] = ((double) tink[i] * mask_line[x] + \ (double) tto[j] * (255 - mask_line[x])) / 255;\ tto[j + 1] = ((double) tink[i + 1] * mask_line[x] + \ (double) tto[j + 1] * (255 - mask_line[x])) / \ 255;\ } \ } static int mask_draw_labq( Mask *mask ) { float *lab_buffer; float ink_buffer[3]; int y; if( !(lab_buffer = IM_ARRAY( NULL, mask->image_clip.width * 3, float )) ) return( -1 ); vips__LabQ2Lab_vec( ink_buffer, DRAW( mask )->ink, 1 ); for( y = 0; y < mask->image_clip.height; y++ ) { VipsPel *to = IM_IMAGE_ADDR( DRAW( mask )->im, mask->image_clip.left, y + mask->image_clip.top ); VipsPel *mask_line = IM_IMAGE_ADDR( mask->mask_im, mask->mask_clip.left, y + mask->mask_clip.top ); vips__LabQ2Lab_vec( lab_buffer, to, mask->image_clip.width ); DBLEND( float, lab_buffer, ink_buffer ); vips__Lab2LabQ_vec( to, lab_buffer, mask->image_clip.width ); } im_free( lab_buffer ); return( 0 ); } static int mask_draw( Mask *mask ) { int y; for( y = 0; y < mask->image_clip.height; y++ ) { VipsPel *to = IM_IMAGE_ADDR( DRAW( mask )->im, mask->image_clip.left, y + mask->image_clip.top ); VipsPel *mask_line = IM_IMAGE_ADDR( mask->mask_im, mask->mask_clip.left, y + mask->mask_clip.top ); switch( DRAW( mask )->im->BandFmt ) { case IM_BANDFMT_UCHAR: IBLEND( unsigned char, to, DRAW( mask )->ink ); break; case IM_BANDFMT_CHAR: IBLEND( signed char, to, DRAW( mask )->ink ); break; case IM_BANDFMT_USHORT: IBLEND( unsigned short, to, DRAW( mask )->ink ); break; case IM_BANDFMT_SHORT: IBLEND( signed short, to, DRAW( mask )->ink ); break; case IM_BANDFMT_UINT: DBLEND( unsigned int, to, DRAW( mask )->ink ); break; case IM_BANDFMT_INT: DBLEND( signed int, to, DRAW( mask )->ink ); break; case IM_BANDFMT_FLOAT: DBLEND( float, to, DRAW( mask )->ink ); break; case IM_BANDFMT_DOUBLE: DBLEND( double, to, DRAW( mask )->ink ); break; case IM_BANDFMT_COMPLEX: CBLEND( float, to, DRAW( mask )->ink ); break; case IM_BANDFMT_DPCOMPLEX: CBLEND( double, to, DRAW( mask )->ink ); break; default: g_assert( 0 ); } } return( 0 ); } /** * im_draw_mask: * @image: image to draw on * @x: draw mask here * @y: draw mask here * @ink: value to draw * @mask_im: mask of 0/255 values showing where to plot * * Draw a mask on the image. @mask_im is a monochrome 8-bit image with 0/255 * for transparent or @ink coloured points. Intermediate values blend the ink * with the pixel. Use with im_text() to draw text on an image. * * @ink is an array of bytes * containing a valid pixel for the image's format. * It must have at least IM_IMAGE_SIZEOF_PEL( @image ) bytes. * * See also: im_draw_circle(), im_text(), im_draw_line_user(). * * Returns: 0 on success, or -1 on error. */ int im_draw_mask( VipsImage *image, VipsImage *mask_im, int x, int y, VipsPel *ink ) { Mask *mask; if( !(mask = mask_new( image, x, y, ink, mask_im )) ) return( -1 ); /* Any points to plot? */ if( im_rect_isempty( &mask->image_clip ) ) { mask_free( mask ); return( 0 ); } /* Loop through image plotting where required. */ switch( image->Coding ) { case IM_CODING_LABQ: if( mask_draw_labq( mask ) ) { mask_free( mask ); return( 0 ); } break; case IM_CODING_NONE: if( mask_draw( mask ) ) { mask_free( mask ); return( 0 ); } break; default: g_assert( 0 ); } mask_free( mask ); return( 0 ); } vips-7.38.5/libvips/inplace/draw.c0000644000175000017500000000424112303141142013674 00000000000000/* base class for drawing operations * * 27/9/10 * - from im_draw_circle() * 17/11/10 * - oops, scanline clipping was off by 1 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "draw.h" /* Fill a scanline between points x1 and x2 inclusive. x1 < x2. */ void im__draw_scanline( Draw *draw, int y, int x1, int x2 ) { VipsPel *mp; int i; int len; g_assert( x1 <= x2 ); if( y < 0 || y >= draw->im->Ysize ) return; if( x1 < 0 && x2 < 0 ) return; if( x1 >= draw->im->Xsize && x2 >= draw->im->Xsize ) return; x1 = IM_CLIP( 0, x1, draw->im->Xsize - 1 ); x2 = IM_CLIP( 0, x2, draw->im->Xsize - 1 ); mp = IM_IMAGE_ADDR( draw->im, x1, y ); len = x2 - x1 + 1; for( i = 0; i < len; i++ ) { im__draw_pel( draw, mp ); mp += draw->psize; } } void im__draw_free( Draw *draw ) { IM_FREE( draw->ink ); } Draw * im__draw_init( Draw *draw, IMAGE *im, VipsPel *ink ) { if( im_rwcheck( im ) ) return( NULL ); draw->im = im; draw->ink = NULL; draw->lsize = IM_IMAGE_SIZEOF_LINE( im ); draw->psize = IM_IMAGE_SIZEOF_PEL( im ); draw->noclip = FALSE; if( ink ) { if( !(draw->ink = (VipsPel *) im_malloc( NULL, draw->psize )) ) return( NULL ); memcpy( draw->ink, ink, draw->psize ); } return( draw ); } vips-7.38.5/libvips/inplace/Makefile.in0000644000175000017500000005257412303144055014662 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/inplace DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libinplace_la_LIBADD = am_libinplace_la_OBJECTS = draw.lo flood.lo im_draw_circle.lo \ im_draw_line.lo im_draw_image.lo im_draw_rect.lo \ im_draw_mask.lo im_draw_point.lo im_draw_smudge.lo \ inplace_dispatch.lo libinplace_la_OBJECTS = $(am_libinplace_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libinplace_la_SOURCES) DIST_SOURCES = $(libinplace_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libinplace.la libinplace_la_SOURCES = \ draw.c \ draw.h \ flood.c \ im_draw_circle.c \ im_draw_line.c \ im_draw_image.c \ im_draw_rect.c \ im_draw_mask.c \ im_draw_point.c \ im_draw_smudge.c \ inplace_dispatch.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/inplace/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/inplace/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libinplace.la: $(libinplace_la_OBJECTS) $(libinplace_la_DEPENDENCIES) $(EXTRA_libinplace_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libinplace_la_OBJECTS) $(libinplace_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/draw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flood.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_draw_circle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_draw_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_draw_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_draw_mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_draw_point.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_draw_rect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_draw_smudge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inplace_dispatch.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/inplace/Makefile.am0000644000175000017500000000050312303141142014624 00000000000000noinst_LTLIBRARIES = libinplace.la libinplace_la_SOURCES = \ draw.c \ draw.h \ flood.c \ im_draw_circle.c \ im_draw_line.c \ im_draw_image.c \ im_draw_rect.c \ im_draw_mask.c \ im_draw_point.c \ im_draw_smudge.c \ inplace_dispatch.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/inplace/im_draw_point.c0000644000175000017500000000615312303141142015576 00000000000000/* draw / read single points * * Copyright: J. Cupitt * Written: 15/06/1992 * 22/7/93 JC * - im_incheck() added * 16/8/94 JC * - im_incheck() changed to im_makerw() * 5/12/06 * - im_invalidate() after paint * 6/3/10 * - don't im_invalidate() after paint, this now needs to be at a higher * level * 29/9/10 * - gtk-doc * - use Draw base class * - read_point partial-ised */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "draw.h" typedef struct _Point { Draw draw; } Point; /** * im_draw_point: * @image: image to draw on * @x: position to draw * @y: position to draw * @ink: value to draw * * Draws a single point on an image. * * @ink is an array of bytes containing a valid pixel for the image's format. * It must have at least IM_IMAGE_SIZEOF_PEL( @im ) bytes. * * See also: im_draw_line(). * * Returns: 0 on success, or -1 on error. */ int im_draw_point( VipsImage *image, int x, int y, VipsPel *ink ) { Point point; if( im_check_coding_known( "im_draw_point", image ) || im__draw_init( DRAW( &point ), image, NULL ) ) return( -1 ); /* Check coordinates. */ if( x >= 0 && x < image->Xsize && y >= 0 && y < image->Ysize ) memcpy( IM_IMAGE_ADDR( image, x, y ), ink, DRAW( image )->psize ); im__draw_free( DRAW( &point ) ); return( 0 ); } /** * im_read_point: * @image: image to read from * @x: position to read * @y: position to read * @ink: read value here * * Reads a single point on an image. * * @ink is an array of bytes to contain a valid pixel for the image's format. * It must have at least IM_IMAGE_SIZEOF_PEL( @im ) bytes. * * See also: im_draw_point(). * * Returns: 0 on success, or -1 on error. */ int im_read_point( VipsImage *image, int x, int y, VipsPel *ink ) { REGION *reg; Rect area; if( im_check_coding_known( "im_draw_point", image ) || !(reg = im_region_create( image )) ) return( -1 ); area.left = x; area.top = y; area.width = 1; area.height = 1; if( im_prepare( reg, &area ) ) { im_region_free( reg ); return( -1 ); } memcpy( ink, IM_REGION_ADDR( reg, x, y ), IM_IMAGE_SIZEOF_PEL( image ) ); im_region_free( reg ); return( 0 ); } vips-7.38.5/libvips/inplace/flood.c0000644000175000017500000003072512303141142014050 00000000000000/* flood-fill * * JC 30/8/97 * - VIPSified, cleaned up, from "John Robinson's prog to fill * enclosed areas" * - something Kirk gave me, so thanks John * JC 1/10/97 * - swapped inner memcmp/cpy for a loop ... faster for small pixels * 13/7/02 JC * - im_flood_blob() added * 5/12/06 * - im_invalidate() after paint * 24/3/09 * - added IM_CODING_RAD support * 28/9/09 * - ooops, tiny memleak * 17/12/09 * - use inline rather than defines, so we can add scanline fills more * easily * - gtk-doc comments * 21/12/09 * - rewrite for a scanline based fill, about 4x faster! * - allow separate test and mark images * 22/1/10 * - flood_blob could loop if start point == ink * 6/3/10 * - don't im_invalidate() after paint, this now needs to be at a higher * level * 27/9/10 * - use Draw base class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "draw.h" /* Size of a scanline buffer. We allocate a list of these to hold scanlines * we need to visit. */ #define PBUFSIZE (1000) /* A scanline we know could contain pixels connected to us. * * Dir is the direction of connection: +1 means y is increasing, ie. the line * above this one is filled. -1 if y is decreasing. */ typedef struct { int x1, x2; int y; int dir; } Scan; /* A buffer of scanlines, and how many of them have been used. If ->next is * non-NULL, the next block could contain more of them. * * We keep a pair of these, then loop over one and write to the other. */ typedef struct _Buffer { struct _Buffer *next; int n; Scan scan[PBUFSIZE]; } Buffer; /* Our state. */ typedef struct { Draw draw; /* Parameters. */ IMAGE *test; /* Test this image */ int x, y; Rect *dout; /* Write dirty here at end */ /* Derived stuff. */ VipsPel *edge; /* Boundary colour */ int equal; /* Fill to == edge, or != edge */ int tsize; /* sizeof( one pel in test ) */ int left, right; /* Record bounding box of modified pixels */ int top, bottom; /* Read from in, add new possibilities to out. */ Buffer *in; Buffer *out; } Flood; /* Alloc a new buffer. */ static Buffer * buffer_build( void ) { Buffer *buf; buf = g_new( Buffer, 1 ); buf->next = NULL; buf->n = 0; return( buf ); } /* Free a chain of buffers. */ static void buffer_free( Buffer *buf ) { while( buf ) { Buffer *p; p = buf->next; g_free( buf ); buf = p; } } /* Add a scanline to a buffer, prepending a new buffer if necessary. Return * the new head buffer. */ static inline Buffer * buffer_add( Buffer *buf, Flood *flood, int x1, int x2, int y, int dir ) { /* Clip against image size. */ if( y < 0 || y >= flood->test->Ysize ) return( buf ); x1 = IM_CLIP( 0, x1, flood->test->Xsize - 1 ); x2 = IM_CLIP( 0, x2, flood->test->Xsize - 1 ); if( x2 - x1 < 0 ) return( buf ); buf->scan[buf->n].x1 = x1; buf->scan[buf->n].x2 = x2; buf->scan[buf->n].y = y; buf->scan[buf->n].dir = dir; buf->n += 1; if( buf->n == PBUFSIZE ) { Buffer *new; new = buffer_build(); new->next = buf; buf = new; } return( buf ); } /* Is p "connected"? ie. is equal to or not equal to flood->edge, depending on * whether we are flooding to the edge boundary or flooding edge-coloured * pixels. */ static inline gboolean flood_connected( Flood *flood, VipsPel *tp ) { int j; for( j = 0; j < flood->tsize; j++ ) if( tp[j] != flood->edge[j] ) break; /* If flood->equal, true if point == edge. */ return( flood->equal ^ (j < flood->tsize) ); } /* Fill left and right, return the endpoints. The start point (x, y) must be * connected and unpainted. */ static void flood_scanline( Flood *flood, int x, int y, int *x1, int *x2 ) { Draw *draw = DRAW( flood ); const int width = flood->test->Xsize; VipsPel *tp; int i; g_assert( flood_connected( flood, IM_IMAGE_ADDR( flood->test, x, y ) ) ); g_assert( !im__draw_painted( draw, IM_IMAGE_ADDR( draw->im, x, y ) ) ); /* Search to the right for the first non-connected pixel. If the start * pixel is unpainted, we know all the intervening pixels must be * unpainted too. */ tp = IM_IMAGE_ADDR( flood->test, x + 1, y ); for( i = x + 1; i < width; i++ ) { if( !flood_connected( flood, tp ) ) break; tp += flood->tsize; } *x2 = i - 1; /* Search left. */ tp = IM_IMAGE_ADDR( flood->test, x - 1, y ); for( i = x - 1; i >= 0; i-- ) { if( !flood_connected( flood, tp ) ) break; tp -= flood->tsize; } *x1 = i + 1; /* Paint the range we discovered. */ im__draw_scanline( draw, y, *x1, *x2 ); if( flood->dout ) { flood->left = IM_MIN( flood->left, *x1 ); flood->right = IM_MAX( flood->right, *x2 ); flood->top = IM_MIN( flood->top, y ); flood->bottom = IM_MAX( flood->bottom, y ); } } /* We know the line below or above us is filled between x1 and x2. Search our * line in this range looking for an edge pixel we can flood from. */ static void flood_around( Flood *flood, Scan *scan ) { Draw *draw = DRAW( flood ); VipsPel *tp; int x; g_assert( scan->dir == 1 || scan->dir == -1 ); for( tp = IM_IMAGE_ADDR( flood->test, scan->x1, scan->y ), x = scan->x1; x <= scan->x2; tp += flood->tsize, x++ ) { if( flood_connected( flood, tp ) ) { int x1a; int x2a; /* If mark and test are different images, we also need * to check for painted. Otherwise we can get stuck in * connected loops. */ if( draw->im != flood->test ) { VipsPel *mp = IM_IMAGE_ADDR( draw->im, x, scan->y ); if( im__draw_painted( draw, mp ) ) continue; } flood_scanline( flood, x, scan->y, &x1a, &x2a ); /* Our new scanline can have up to three more * scanlines connected to it: above, below left, below * right. */ if( x1a < scan->x1 - 1 ) flood->out = buffer_add( flood->out, flood, x1a, scan->x1 - 2, scan->y - scan->dir, -scan->dir ); if( x2a > scan->x2 + 1 ) flood->out = buffer_add( flood->out, flood, scan->x2 + 2, x2a, scan->y - scan->dir, -scan->dir ); flood->out = buffer_add( flood->out, flood, x1a, x2a, scan->y + scan->dir, scan->dir ); x = x2a + 1; tp = IM_IMAGE_ADDR( flood->test, x, scan->y ); } } } static void flood_all( Flood *flood, int x, int y ) { int x1, x2; /* Test start pixel ... nothing to do? */ if( !flood_connected( flood, IM_IMAGE_ADDR( flood->test, x, y ) ) ) return; flood_scanline( flood, x, y, &x1, &x2 ); flood->in = buffer_add( flood->in, flood, x1, x2, y + 1, 1 ); flood->in = buffer_add( flood->in, flood, x1, x2, y - 1, -1 ); while( flood->in->n ) { Buffer *p; for( p = flood->in; p; p = p->next ) { int i; for( i = 0; i < p->n; i++ ) flood_around( flood, &p->scan[i] ); p->n = 0; } IM_SWAP( Buffer *, flood->in, flood->out ); } } static void flood_free( Flood *flood ) { /* Write dirty back to caller. */ if( flood->dout ) { flood->dout->left = flood->left; flood->dout->top = flood->top; flood->dout->width = flood->right - flood->left + 1; flood->dout->height = flood->bottom - flood->top + 1; } im__draw_free( DRAW( flood ) ); IM_FREE( flood->edge ); IM_FREEF( buffer_free, flood->in ); IM_FREEF( buffer_free, flood->out ); im_free( flood ); } static Flood * flood_new( IMAGE *image, IMAGE *test, int x, int y, VipsPel *ink, Rect *dout ) { Flood *flood; if( !(flood = IM_NEW( NULL, Flood )) ) return( NULL ); if( !im__draw_init( DRAW( flood ), image, ink ) ) { flood_free( flood ); return( NULL ); } flood->test = test; flood->x = x; flood->y = y; flood->dout = dout; flood->edge = NULL; flood->tsize = IM_IMAGE_SIZEOF_PEL( test ); flood->left = x; flood->top = y; flood->right = x; flood->bottom = y; flood->in = buffer_build(); flood->out = buffer_build(); if( !(flood->edge = (VipsPel *) im_malloc( NULL, flood->tsize )) ) { flood_free( flood ); return( NULL ); } return( flood ); } /** * im_draw_flood: * @image: image to fill * @x: position to start fill * @y: position to start fill * @ink: colour to fill with * @dout: output the bounding box of the filled area * * Flood-fill @image with @ink, starting at position @x, @y. The filled area is * bounded by pixels that are equal to the ink colour, in other words, it * searches for pixels enclosed by a line of @ink. * * The bounding box of the modified pixels is returned in @dout. @dout may be * NULL. * * See also: im_draw_flood_blob(), im_draw_flood_other(). * * Returns: 0 on success, or -1 on error. */ int im_draw_flood( IMAGE *image, int x, int y, VipsPel *ink, Rect *dout ) { Flood *flood; if( im_check_coding_known( "im_draw_flood", image ) || !(flood = flood_new( image, image, x, y, ink, dout )) ) return( -1 ); /* Flood to != ink. */ memcpy( flood->edge, ink, flood->tsize ); flood->equal = 0; flood_all( flood, x, y ); flood_free( flood ); return( 0 ); } /** * im_draw_flood_blob: * @image: image to fill * @x: position to start fill * @y: position to start fill * @ink: colour to fill with * @dout: output the bounding box of the filled area * * Flood-fill @image with @ink, starting at position @x, @y. The filled area is * bounded by pixels that are equal to the start pixel, in other words, it * searches for a blob of same-coloured pixels. * * The bounding box of the modified pixels is returned in @dout. @dout may be * NULL. * * See also: im_draw_flood(), im_draw_flood_other(), im_draw_flood_blob(). * * Returns: 0 on success, or -1 on error. */ int im_draw_flood_blob( IMAGE *image, int x, int y, VipsPel *ink, Rect *dout ) { Flood *flood; int j; if( im_check_coding_known( "im_draw_flood_blob", image ) || !(flood = flood_new( image, image, x, y, ink, dout )) ) return( -1 ); /* Edge is set by colour of start pixel. */ memcpy( flood->edge, IM_IMAGE_ADDR( image, x, y ), flood->tsize ); flood->equal = 1; /* If edge == ink, we'll never stop :-( or rather, there's nothing to * do. */ for( j = 0; j < flood->tsize; j++ ) if( flood->edge[j] != DRAW( flood )->ink[j] ) break; if( j == flood->tsize ) return( 0 ); flood_all( flood, x, y ); flood_free( flood ); return( 0 ); } /** * im_draw_flood_other: * @image: image to mark * @test: image to test * @x: position to start fill * @y: position to start fill * @serial: mark pixels with this number * @dout: output the bounding box of the filled area * * Flood-fill @image with @serial, starting at position @x, @y. The filled * area is bounded by pixels in @test that are equal to the start pixel, in * other words, it searches @test for a blob of same-coloured pixels, marking * those pixels in @image with @serial. * * The bounding box of the modified pixels is returned in @dout. @dout may be * NULL. * * See also: im_draw_flood(), im_label_regions(), im_draw_flood_blob(). * * Returns: 0 on success, or -1 on error. */ int im_draw_flood_other( IMAGE *image, IMAGE *test, int x, int y, int serial, Rect *dout ) { int *m; Flood *flood; if( im_incheck( test ) || im_check_coding_known( "im_draw_flood_other", test ) || im_check_uncoded( "im_draw_flood_other", image ) || im_check_mono( "im_draw_flood_other", image ) || im_check_format( "im_draw_flood_other", image, IM_BANDFMT_INT ) || im_check_size_same( "im_draw_flood_other", test, image ) ) return( -1 ); /* Have we done this point already? */ m = (int *) IM_IMAGE_ADDR( image, x, y ); if( *m == serial ) return( 0 ); if( !(flood = flood_new( image, test, x, y, (VipsPel *) &serial, dout )) ) return( -1 ); /* Edge is set by colour of start pixel. */ memcpy( flood->edge, IM_IMAGE_ADDR( test, x, y ), flood->tsize ); flood->equal = 1; flood_all( flood, x, y ); flood_free( flood ); return( 0 ); } vips-7.38.5/libvips/inplace/im_draw_image.c0000644000175000017500000000735212303141142015531 00000000000000/* in-place insert * * Copyright: J. Cupitt * Written: 15/06/1992 * 22/7/93 JC * - im_incheck() added * 16/8/94 JC * - im_incheck() changed to im_makerw() * 1/9/04 JC * - checks bands/types/etc match (thanks Matt) * - smarter pixel size calculations * 5/12/06 * - im_invalidate() after paint * 24/3/09 * - added IM_CODING_RAD support * 21/10/09 * - allow sub to be outside main * - gtkdoc * 6/3/10 * - don't im_invalidate() after paint, this now needs to be at a higher * level * 25/8/10 * - cast and bandalike sub to main * 22/9/10 * - rename to im_draw_image() * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include /* The common part of most binary inplace operators. * * Unlike im__formatalike() and friends, we can only change one of the images, * since the other is being updated. */ VipsImage * im__inplace_base( const char *domain, VipsImage *main, VipsImage *sub, VipsImage *out ) { VipsImage *t[2]; if( im_rwcheck( main ) || im_pincheck( sub ) || im_check_coding_known( domain, main ) || im_check_coding_same( domain, main, sub ) || im_check_bands_1orn_unary( domain, sub, main->Bands ) ) return( NULL ); /* Cast sub to match main in bands and format. */ if( im_open_local_array( out, t, 2, domain, "p" ) || im__bandup( domain, sub, t[0], main->Bands ) || im_clip2fmt( t[0], t[1], main->BandFmt ) ) return( NULL ); return( t[1] ); } /** * im_draw_image: * @image: image to draw on * @sub: image to draw * @x: position to insert * @y: position to insert * * Draw @sub on top of @image at position @x, @y. The two images must have the * same * Coding. If @sub has 1 band, the bands will be duplicated to match the * number of bands in @image. @sub will be converted to @image's format, see * im_clip2fmt(). * * See also: im_insert(). * * Returns: 0 on success, or -1 on error. */ int im_draw_image( VipsImage *image, VipsImage *sub, int x, int y ) { Rect br, sr, clip; VipsPel *p, *q; int z; /* Make rects for main and sub and clip. */ br.left = 0; br.top = 0; br.width = image->Xsize; br.height = image->Ysize; sr.left = x; sr.top = y; sr.width = sub->Xsize; sr.height = sub->Ysize; im_rect_intersectrect( &br, &sr, &clip ); if( im_rect_isempty( &clip ) ) return( 0 ); if( !(sub = im__inplace_base( "im_draw_image", image, sub, image )) || im_rwcheck( image ) || im_incheck( sub ) ) return( -1 ); /* Loop, memcpying sub to main. */ p = IM_IMAGE_ADDR( sub, clip.left - x, clip.top - y ); q = IM_IMAGE_ADDR( image, clip.left, clip.top ); for( z = 0; z < clip.height; z++ ) { memcpy( (char *) q, (char *) p, clip.width * IM_IMAGE_SIZEOF_PEL( sub ) ); p += IM_IMAGE_SIZEOF_LINE( sub ); q += IM_IMAGE_SIZEOF_LINE( image ); } return( 0 ); } vips-7.38.5/libvips/inplace/im_draw_line.c0000644000175000017500000002150512303141142015372 00000000000000/* draw straight lines * * Copyright: J. Cupitt * Written: 15/06/1992 * Modified : 22/10/92 - clipping constraints changed * 22/7/93 JC * - im_incheck() added * 16/8/94 JC * - im_incheck() changed to im_makerw() * 5/12/06 * - im_invalidate() after paint * 1/3/10 * - oops, lineset needs to ask for WIO of mask and ink * 6/3/10 * - don't im_invalidate() after paint, this now needs to be at a higher * level * 27/9/10 * - gtk-doc * - use draw.c base class * - do pointwise clipping * - rename as im_draw_line() for consistency * - cleanups! */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "draw.h" typedef struct _Line { Draw draw; int x1, y1; int x2, y2; int dx; int dy; VipsPlotFn plot; void *a; void *b; void *c; } Line; static void line_free( Line *line ) { im__draw_free( DRAW( line ) ); im_free( line ); } static Line * line_new( VipsImage *im, int x1, int y1, int x2, int y2, VipsPel *ink ) { Line *line; if( !(line = IM_NEW( NULL, Line )) ) return( NULL ); if( !im__draw_init( DRAW( line ), im, ink ) ) { line_free( line ); return( NULL ); } /* Find offsets. */ line->dx = x2 - x1; line->dy = y2 - y1; /* Swap endpoints to reduce number of cases. */ if( abs( line->dx ) >= abs( line->dy ) && line->dx < 0 ) { /* Swap to get all x greater or equal cases going to the * right. Do diagonals here .. just have up and right and down * and right now. */ IM_SWAP( int, x1, x2 ); IM_SWAP( int, y1, y2 ); } else if( abs( line->dx ) < abs( line->dy ) && line->dy < 0 ) { /* Swap to get all y greater cases going down the screen. */ IM_SWAP( int, x1, x2 ); IM_SWAP( int, y1, y2 ); } /* Recalculate dx, dy. */ line->dx = x2 - x1; line->dy = y2 - y1; line->x1 = x1; line->y1 = y1; line->x2 = x2; line->y2 = y2; line->plot = NULL; line->a = NULL; line->b = NULL; line->c = NULL; if( x1 < im->Xsize && x1 >= 0 && x2 < im->Xsize && x2 >= 0 && y1 < im->Ysize && y1 >= 0 && y2 < im->Ysize && y2 >= 0 ) DRAW( line )->noclip = TRUE; return( line ); } static inline int line_plot( Line *line, int x, int y ) { return( line->plot( DRAW( line )->im, x, y, line->a, line->b, line->c ) ); } static int line_draw( Line *line ) { int x, y, err; /* Start point and offset. */ x = line->x1; y = line->y1; /* Special case: zero width and height is single point. */ if( line->dx == 0 && line->dy == 0 ) { if( line_plot( line, x, y ) ) return( -1 ); } /* Special case vertical and horizontal lines for speed. */ else if( line->dx == 0 ) { /* Vertical line going down. */ for( ; y <= line->y2; y++ ) { if( line_plot( line, x, y ) ) return( -1 ); } } else if( line->dy == 0 ) { /* Horizontal line to the right. */ for( ; x <= line->x2; x++ ) { if( line_plot( line, x, y ) ) return( -1 ); } } /* Special case diagonal lines. */ else if( abs( line->dy ) == abs( line->dx ) && line->dy > 0 ) { /* Diagonal line going down and right. */ for( ; x <= line->x2; x++, y++ ) { if( line_plot( line, x, y ) ) return( -1 ); } } else if( abs( line->dy ) == abs( line->dx ) && line->dy < 0 ) { /* Diagonal line going up and right. */ for( ; x <= line->x2; x++, y-- ) { if( line_plot( line, x, y ) ) return( -1 ); } } else if( abs( line->dy ) < abs( line->dx ) && line->dy > 0 ) { /* Between -45 and 0 degrees. */ for( err = 0; x <= line->x2; x++ ) { if( line_plot( line, x, y ) ) return( -1 ); err += line->dy; if( err >= line->dx ) { err -= line->dx; y++; } } } else if( abs( line->dy ) < abs( line->dx ) && line->dy < 0 ) { /* Between 0 and 45 degrees. */ for( err = 0; x <= line->x2; x++ ) { if( line_plot( line, x, y ) ) return( -1 ); err -= line->dy; if( err >= line->dx ) { err -= line->dx; y--; } } } else if( abs( line->dy ) > abs( line->dx ) && line->dx > 0 ) { /* Between -45 and -90 degrees. */ for( err = 0; y <= line->y2; y++ ) { if( line_plot( line, x, y ) ) return( -1 ); err += line->dx; if( err >= line->dy ) { err -= line->dy; x++; } } } else if( abs( line->dy ) > abs( line->dx ) && line->dx < 0 ) { /* Between -90 and -135 degrees. */ for( err = 0; y <= line->y2; y++ ) { if( line_plot( line, x, y ) ) return( -1 ); err -= line->dx; if( err >= line->dy ) { err -= line->dy; x--; } } } else g_assert( 0 ); return( 0 ); } /** * VipsPlotFn: * @image: image to draw on * @x: position to draw at * @y: position to draw at * @a: user data * @b: user data * @c: user data * * A plot function, as used by im_draw_line_user() to draw on an image. */ /** * im_draw_line_user: * @image: image to draw on * @x1: start point * @y1: start point * @x2: end point * @y2: end point * @plot: draw operation * @a: draw operation parameter * @b: draw operation parameter * @c: draw operation parameter * * Calls @plot for every point on the line connecting @x1, @y1 and @x2, @y2. * If you pass im_draw_mask() as the plot operation, you can draw wide lines * or lines with various brushes. * * See also: im_draw_mask(), im_draw_line(), im_draw_circle(). * * Returns: 0 on success, or -1 on error. */ int im_draw_line_user( VipsImage *image, int x1, int y1, int x2, int y2, VipsPlotFn plot, void *a, void *b, void *c ) { Line *line; if( im_check_coding_known( "im_draw_line_user", image ) || !(line = line_new( image, x1, y1, x2, y2, NULL )) ) return( -1 ); line->plot = plot; line->a = a; line->b = b; line->c = c; if( line_draw( line ) ) { line_free( line ); return( -1 ); } line_free( line ); return( 0 ); } static int line_plot_point( VipsImage *im, int x, int y, void *a, void *b, void *c ) { Draw *draw = (Draw *) a; if( draw->noclip ) im__draw_pel( draw, IM_IMAGE_ADDR( draw->im, x, y ) ); else im__draw_pel_clip( draw, x, y ); return( 0 ); } /** * im_draw_line: * @image: image to draw on * @x1: start point * @y1: start point * @x2: end point * @y2: end point * @ink: value to draw * * Draws a 1-pixel-wide line on an image. * * @ink is an array of bytes * containing a valid pixel for the image's format. * It must have at least IM_IMAGE_SIZEOF_PEL( @image ) bytes. * * See also: im_draw_circle(). * * Returns: 0 on success, or -1 on error. */ int im_draw_line( VipsImage *image, int x1, int y1, int x2, int y2, VipsPel *ink ) { Line *line; if( im_check_coding_known( "im_draw_line", image ) || !(line = line_new( image, x1, y1, x2, y2, ink )) ) return( -1 ); line->plot = line_plot_point; line->a = line; if( line_draw( line ) ) { line_free( line ); return( 0 ); } line_free( line ); return( 0 ); } /* Draw a set of lines with an ink and a mask. A non-inplace operation, handy * for nip2. */ int im_lineset( IMAGE *in, IMAGE *out, IMAGE *mask, IMAGE *ink, int n, int *x1v, int *y1v, int *x2v, int *y2v ) { Rect mask_rect; int i; if( mask->Bands != 1 || mask->BandFmt != IM_BANDFMT_UCHAR || mask->Coding != IM_CODING_NONE ) { im_error( "im_lineset", "%s", _( "mask image not 1 band 8 bit uncoded" ) ); return( -1 ); } if( ink->Bands != in->Bands || ink->BandFmt != in->BandFmt || ink->Coding != in->Coding ) { im_error( "im_lineset", "%s", _( "ink image does not match in image" ) ); return( -1 ); } if( ink->Xsize != 1 || ink->Ysize != 1 ) { im_error( "im_lineset", "%s", _( "ink image not 1x1 pixels" ) ); return( -1 ); } /* Copy the image then fastline to it ... this will render to a "t" * usually. */ if( im_copy( in, out ) ) return( -1 ); mask_rect.left = mask->Xsize / 2; mask_rect.top = mask->Ysize / 2; mask_rect.width = mask->Xsize; mask_rect.height = mask->Ysize; if( im_incheck( ink ) || im_incheck( mask ) ) return( -1 ); for( i = 0; i < n; i++ ) { if( im_fastlineuser( out, x1v[i], y1v[i], x2v[i], y2v[i], im_plotmask, ink->data, mask->data, &mask_rect ) ) return( -1 ); } return( 0 ); } vips-7.38.5/libvips/inplace/inplace_dispatch.c0000644000175000017500000003435412303141142016241 00000000000000/* Function dispatch tables for inplace. * * J. Cupitt, 8/2/95 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * SECTION: inplace * @short_description: in-place paintbox operations: flood, paste, line, * circle * @stability: Stable * @include: vips/vips.h * * These operations directly modify the image. They do not thread, on 32-bit * machines they will be limited to 2GB images, and a little care needs to be * taken if you use them as part of an image pipeline. * * They are mostly supposed to be useful * for paintbox-style programs. * */ /* Calculate a pixel for an image from a vec of double. Valid while im is * valid. */ VipsPel * im__vector_to_ink( const char *domain, IMAGE *im, int n, double *vec ) { IMAGE *t[3]; double *zeros; int i; if( im_check_vector( domain, n, im ) ) return( NULL ); if( im_open_local_array( im, t, 3, domain, "t" ) || !(zeros = IM_ARRAY( im, n, double )) ) return( NULL ); for( i = 0; i < n; i++ ) zeros[i] = 0.0; if( im_black( t[0], 1, 1, im->Bands ) || im_lintra_vec( n, zeros, t[0], vec, t[1] ) || im_clip2fmt( t[1], t[2], im->BandFmt ) ) return( NULL ); return( t[2]->data ); } double * im__ink_to_vector( const char *domain, IMAGE *im, VipsPel *ink ) { double *vec; int i; if( im_check_uncoded( "im__ink_to_vector", im ) || im_check_noncomplex( "im__ink_to_vector", im ) ) return( NULL ); if( !(vec = IM_ARRAY( NULL, im->Bands, double )) ) return( NULL ); #define READ( TYPE ) \ vec[i] = ((TYPE *) ink)[i]; for( i = 0; i < im->Bands; i++ ) switch( im->BandFmt ) { case IM_BANDFMT_UCHAR: READ( unsigned char ); break; case IM_BANDFMT_CHAR: READ( signed char ); break; case IM_BANDFMT_USHORT: READ( unsigned short ); break; case IM_BANDFMT_SHORT: READ( signed short ); break; case IM_BANDFMT_UINT: READ( unsigned int ); break; case IM_BANDFMT_INT: READ( signed int ); break; case IM_BANDFMT_FLOAT: READ( float ); break; case IM_BANDFMT_DOUBLE: READ( double ); break; default: g_assert( 0 ); } return( vec ); } /* Args for im_draw_image. */ static im_arg_desc draw_image_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_IMAGE( "sub" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ) }; /* Call im_draw_image via arg vector. */ static int draw_image_vec( im_object *argv ) { int x = *((int *) argv[2]); int y = *((int *) argv[3]); return( im_draw_image( argv[0], argv[1], x, y ) ); } /* Description of im_draw_image. */ static im_function draw_image_desc = { "im_draw_image", /* Name */ "draw image sub inside image main at position (x,y)", 0, /* Flags */ draw_image_vec, /* Dispatch function */ IM_NUMBER( draw_image_args ), /* Size of arg list */ draw_image_args /* Arg list */ }; /* Args for im_lineset. */ static im_arg_desc lineset_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMAGE( "mask" ), IM_INPUT_IMAGE( "ink" ), IM_INPUT_INTVEC( "x1" ), IM_INPUT_INTVEC( "y1" ), IM_INPUT_INTVEC( "x2" ), IM_INPUT_INTVEC( "y2" ) }; /* Call im_lineset via arg vector. */ static int lineset_vec( im_object *argv ) { im_intvec_object *x1v = (im_intvec_object *) argv[4]; im_intvec_object *y1v = (im_intvec_object *) argv[5]; im_intvec_object *x2v = (im_intvec_object *) argv[6]; im_intvec_object *y2v = (im_intvec_object *) argv[7]; if( x1v->n != y1v->n || x1v->n != x2v->n || x1v->n != y2v->n ) { im_error( "im_lineset", "%s", _( "vectors not same length" ) ); return( -1 ); } return( im_lineset( argv[0], argv[1], argv[2], argv[3], x1v->n, x1v->vec, y1v->vec, x2v->vec, y2v->vec ) ); } /* Description of im_lineset. */ static im_function lineset_desc = { "im_lineset", /* Name */ "draw line between points (x1,y1) and (x2,y2)", 0, /* Flags */ lineset_vec, /* Dispatch function */ IM_NUMBER( lineset_args ), /* Size of arg list */ lineset_args /* Arg list */ }; /* Args for im_draw_mask. */ static im_arg_desc draw_mask_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_IMAGE( "mask" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_draw_mask via arg vector. */ static int draw_mask_vec( im_object *argv ) { IMAGE *image = argv[0]; IMAGE *mask = argv[1]; int x = *((int *) argv[2]); int y = *((int *) argv[3]); im_doublevec_object *dv = (im_doublevec_object *) argv[4]; VipsPel *ink; if( !(ink = im__vector_to_ink( "im_draw_mask", image, dv->n, dv->vec )) ) return( -1 ); return( im_draw_mask( image, mask, x, y, ink ) ); } /* Description of im_draw_mask. */ static im_function draw_mask_desc = { "im_draw_mask", /* Name */ "draw mask sub inside image main at position (x,y)", 0, /* Flags */ draw_mask_vec, /* Dispatch function */ IM_NUMBER( draw_mask_args ), /* Size of arg list */ draw_mask_args /* Arg list */ }; /* Args for im_draw_flood_blob(). */ static im_arg_desc draw_flood_blob_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_draw_flood_blob() via arg vector. */ static int draw_flood_blob_vec( im_object *argv ) { IMAGE *image = argv[0]; int x = *((int *) argv[1]); int y = *((int *) argv[2]); im_doublevec_object *dv = (im_doublevec_object *) argv[3]; VipsPel *ink; if( !(ink = im__vector_to_ink( "im_draw_flood_blob", image, dv->n, dv->vec )) ) return( -1 ); return( im_draw_flood_blob( image, x, y, ink, NULL ) ); } /* Description of im_draw_flood_blob(). */ static im_function draw_flood_blob_desc = { "im_draw_flood_blob", /* Name */ "flood with ink from x, y while pixel == start", 0, /* Flags */ draw_flood_blob_vec, /* Dispatch function */ IM_NUMBER( draw_flood_blob_args ),/* Size of arg list */ draw_flood_blob_args /* Arg list */ }; /* Args for im_draw_flood(). */ static im_arg_desc draw_flood_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_draw_flood() via arg vector. */ static int draw_flood_vec( im_object *argv ) { IMAGE *image = argv[0]; int x = *((int *) argv[1]); int y = *((int *) argv[2]); im_doublevec_object *dv = (im_doublevec_object *) argv[3]; VipsPel *ink; if( !(ink = im__vector_to_ink( "im_draw_flood", image, dv->n, dv->vec )) ) return( -1 ); return( im_draw_flood( image, x, y, ink, NULL ) ); } /* Description of im_draw_flood(). */ static im_function draw_flood_desc = { "im_draw_flood", /* Name */ "flood with ink from x, y while pixel != ink", 0, /* Flags */ draw_flood_vec, /* Dispatch function */ IM_NUMBER( draw_flood_args ),/* Size of arg list */ draw_flood_args /* Arg list */ }; /* Args for im_draw_flood_other(). */ static im_arg_desc draw_flood_other_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_IMAGE( "test" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_INT( "serial" ) }; /* Call im_draw_flood_other() via arg vector. */ static int draw_flood_other_vec( im_object *argv ) { IMAGE *image = argv[0]; IMAGE *test = argv[1]; int x = *((int *) argv[2]); int y = *((int *) argv[3]); int serial = *((int *) argv[4]); return( im_draw_flood_other( image, test, x, y, serial, NULL ) ); } /* Description of im_draw_flood_other(). */ static im_function draw_flood_other_desc = { "im_draw_flood_other", /* Name */ "flood image with serial from x, y while pixel == start", 0, /* Flags */ draw_flood_other_vec, /* Dispatch function */ IM_NUMBER( draw_flood_other_args ),/* Size of arg list */ draw_flood_other_args /* Arg list */ }; /* Args for im_draw_point. */ static im_arg_desc draw_point_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_draw_point via arg vector. */ static int draw_point_vec( im_object *argv ) { IMAGE *image = argv[0]; int x = *((int *) argv[1]); int y = *((int *) argv[2]); im_doublevec_object *dv = (im_doublevec_object *) argv[3]; VipsPel *ink; if( !(ink = im__vector_to_ink( "im_draw_point", image, dv->n, dv->vec )) ) return( -1 ); return( im_draw_point( image, x, y, ink ) ); } /* Description of im_draw_point. */ static im_function draw_point_desc = { "im_draw_point", /* Name */ "draw point on image", 0, /* Flags */ draw_point_vec, /* Dispatch function */ IM_NUMBER( draw_point_args ), /* Size of arg list */ draw_point_args /* Arg list */ }; /* Args for im_read_point. */ static im_arg_desc read_point_args[] = { IM_INPUT_IMAGE( "image" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_OUTPUT_DOUBLEVEC( "ink" ) }; /* Call im_read_point via arg vector. */ static int read_point_vec( im_object *argv ) { IMAGE *image = argv[0]; int x = *((int *) argv[1]); int y = *((int *) argv[2]); im_doublevec_object *dv = (im_doublevec_object *) argv[3]; VipsPel *ink; if( !(ink = IM_ARRAY( image, IM_IMAGE_SIZEOF_PEL( image ), VipsPel )) || im_read_point( image, x, y, ink ) || !(dv->vec = im__ink_to_vector( "im_read_point", image, ink )) ) return( -1 ); dv->n = image->Bands; return( 0 ); } /* Description of im_read_point. */ static im_function read_point_desc = { "im_read_point", /* Name */ "read point from image", 0, /* Flags */ read_point_vec, /* Dispatch function */ IM_NUMBER( read_point_args ), /* Size of arg list */ read_point_args /* Arg list */ }; /* Args for im_draw_line. */ static im_arg_desc draw_line_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_INT( "x1" ), IM_INPUT_INT( "y1" ), IM_INPUT_INT( "x2" ), IM_INPUT_INT( "y2" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_draw_line via arg vector. */ static int draw_line_vec( im_object *argv ) { IMAGE *image = argv[0]; int x1 = *((int *) argv[1]); int y1 = *((int *) argv[2]); int x2 = *((int *) argv[3]); int y2 = *((int *) argv[4]); im_doublevec_object *dv = (im_doublevec_object *) argv[5]; VipsPel *ink; if( !(ink = im__vector_to_ink( "im_draw_line", image, dv->n, dv->vec )) ) return( -1 ); return( im_draw_line( image, x1, y1, x2, y2, ink ) ); } /* Description of im_draw_line. */ static im_function draw_line_desc = { "im_draw_line", /* Name */ "draw line on image", 0, /* Flags */ draw_line_vec, /* Dispatch function */ IM_NUMBER( draw_line_args ), /* Size of arg list */ draw_line_args /* Arg list */ }; /* Args for im_draw_smudge. */ static im_arg_desc draw_smudge_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_INT( "left" ), IM_INPUT_INT( "top" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ) }; /* Call im_draw_smudge via arg vector. */ static int draw_smudge_vec( im_object *argv ) { IMAGE *image = argv[0]; int left = *((int *) argv[1]); int top = *((int *) argv[2]); int width = *((int *) argv[3]); int height = *((int *) argv[4]); return( im_draw_smudge( image, left, top, width, height ) ); } /* Description of im_draw_smudge. */ static im_function draw_smudge_desc = { "im_draw_smudge", /* Name */ "smudge part of an image", 0, /* Flags */ draw_smudge_vec, /* Dispatch function */ IM_NUMBER( draw_smudge_args ), /* Size of arg list */ draw_smudge_args /* Arg list */ }; /* Args for im_draw_rect. */ static im_arg_desc draw_rect_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_INT( "left" ), IM_INPUT_INT( "top" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ), IM_INPUT_INT( "fill" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_draw_rect via arg vector. */ static int draw_rect_vec( im_object *argv ) { IMAGE *image = argv[0]; int left = *((int *) argv[1]); int top = *((int *) argv[2]); int width = *((int *) argv[3]); int height = *((int *) argv[4]); int fill = *((int *) argv[5]); im_doublevec_object *dv = (im_doublevec_object *) argv[6]; VipsPel *ink; if( !(ink = im__vector_to_ink( "im_draw_rect", image, dv->n, dv->vec )) ) return( -1 ); return( im_draw_rect( image, left, top, width, height, fill, ink ) ); } /* Description of im_draw_rect. */ static im_function draw_rect_desc = { "im_draw_rect", /* Name */ "draw rect on image", 0, /* Flags */ draw_rect_vec, /* Dispatch function */ IM_NUMBER( draw_rect_args ), /* Size of arg list */ draw_rect_args /* Arg list */ }; /* Args for im_draw_circle. */ static im_arg_desc draw_circle_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_INT( "cx" ), IM_INPUT_INT( "cy" ), IM_INPUT_INT( "radius" ), IM_INPUT_INT( "fill" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_draw_circle via arg vector. */ static int draw_circle_vec( im_object *argv ) { IMAGE *image = argv[0]; int cx = *((int *) argv[1]); int cy = *((int *) argv[2]); int radius = *((int *) argv[3]); int fill = *((int *) argv[4]); im_doublevec_object *dv = (im_doublevec_object *) argv[5]; VipsPel *ink; if( !(ink = im__vector_to_ink( "im_draw_circle", image, dv->n, dv->vec )) ) return( -1 ); return( im_draw_circle( image, cx, cy, radius, fill, ink ) ); } /* Description of im_draw_circle. */ static im_function draw_circle_desc = { "im_draw_circle", /* Name */ "draw circle on image", 0, /* Flags */ draw_circle_vec, /* Dispatch function */ IM_NUMBER( draw_circle_args ), /* Size of arg list */ draw_circle_args /* Arg list */ }; /* Package up all these functions. */ static im_function *inplace_list[] = { &draw_circle_desc, &draw_rect_desc, &draw_line_desc, &draw_point_desc, &read_point_desc, &draw_smudge_desc, &draw_flood_desc, &draw_flood_blob_desc, &draw_flood_other_desc, &draw_image_desc, &draw_mask_desc, &lineset_desc }; /* Package of functions. */ im_package im__inplace = { "inplace", IM_NUMBER( inplace_list ), inplace_list }; vips-7.38.5/libvips/histogram/0000755000175000017500000000000012303146330013240 500000000000000vips-7.38.5/libvips/histogram/hist_cum.c0000644000175000017500000001075112303140253015141 00000000000000/* histogram cumulativisation * * Author: N. Dessipris * Written on: 02/08/1990 * 24/5/95 JC * - tidied up and ANSIfied * 20/7/95 JC * - smartened up again * - now works for hists >256 elements * 3/3/01 JC * - broken into cum and norm ... helps im_histspec() * - better behaviour for >8 bit hists * 31/10/05 JC * - was broken for vertical histograms, gah * - neater im_histnorm() * 23/7/07 * - eek, off by 1 for more than 1 band hists * 12/5/08 * - histcum works for signed hists now as well * 24/3/10 * - gtkdoc * - small cleanups * 12/8/13 * - redone im_histcum() as a class, vips_hist_cum() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "phistogram.h" #include "hist_unary.h" typedef VipsHistUnary VipsHistCum; typedef VipsHistUnaryClass VipsHistCumClass; G_DEFINE_TYPE( VipsHistCum, vips_hist_cum, VIPS_TYPE_HIST_UNARY ); #define ACCUMULATE( ITYPE, OTYPE ) { \ for( b = 0; b < nb; b++ ) { \ ITYPE *p = (ITYPE *) in[0]; \ OTYPE *q = (OTYPE *) out; \ OTYPE total; \ \ total = 0; \ for( x = b; x < mx; x += nb ) { \ total += p[x]; \ q[x] = total; \ } \ } \ } static void vips_hist_cum_process( VipsHistogram *histogram, VipsPel *out, VipsPel **in, int width ) { const int bands = vips_image_get_bands( histogram->ready[0] ); const int nb = vips_bandfmt_iscomplex( histogram->ready[0]->BandFmt ) ? bands * 2 : bands; int mx = width * nb; int x, b; switch( vips_image_get_format( histogram->ready[0] ) ) { case VIPS_FORMAT_CHAR: ACCUMULATE( signed char, signed int ); break; case VIPS_FORMAT_UCHAR: ACCUMULATE( unsigned char, unsigned int ); break; case VIPS_FORMAT_SHORT: ACCUMULATE( signed short, signed int ); break; case VIPS_FORMAT_USHORT: ACCUMULATE( unsigned short, unsigned int ); break; case VIPS_FORMAT_INT: ACCUMULATE( signed int, signed int ); break; case VIPS_FORMAT_UINT: ACCUMULATE( unsigned int, unsigned int ); break; case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_COMPLEX: ACCUMULATE( float, float ); break; case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DPCOMPLEX: ACCUMULATE( double, double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static const VipsBandFormat vips_hist_cum_format_table[10] = { /* UC C US S UI I F X D DX */ UI, I, UI, I, UI, I, F, F, D, D }; static void vips_hist_cum_class_init( VipsHistCumClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsHistogramClass *hclass = VIPS_HISTOGRAM_CLASS( class ); object_class->nickname = "hist_cum"; object_class->description = _( "form cumulative histogram" ); hclass->format_table = vips_hist_cum_format_table; hclass->process = vips_hist_cum_process; } static void vips_hist_cum_init( VipsHistCum *hist_cum ) { } /** * vips_hist_cum: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Form cumulative histogram. * * See also: vips_hist_norm(). * * Returns: 0 on success, -1 on error */ int vips_hist_cum( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "hist_cum", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/hist_norm.c0000644000175000017500000001045312303140253015327 00000000000000/* histogram normalisation * * Author: N. Dessipris * Written on: 02/08/1990 * 24/5/95 JC * - tidied up and ANSIfied * 20/7/95 JC * - smartened up again * - now works for hists >256 elements * 3/3/01 JC * - broken into norm and norm ... helps im_histspec() * - better behaviour for >8 bit hists * 31/10/05 JC * - was broken for vertical histograms, gah * - neater im_histnorm() * 23/7/07 * - eek, off by 1 for more than 1 band hists * 12/5/08 * - histnorm works for signed hists now as well * 24/3/10 * - gtkdoc * - small cleanups * 12/8/13 * - redone im_histnorm() as a class, vips_hist_norm() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include typedef struct _VipsHistNorm { VipsOperation parent_instance; VipsImage *in; VipsImage *out; } VipsHistNorm; typedef VipsOperationClass VipsHistNormClass; G_DEFINE_TYPE( VipsHistNorm, vips_hist_norm, VIPS_TYPE_OPERATION ); static int vips_hist_norm_build( VipsObject *object ) { VipsHistNorm *norm = (VipsHistNorm *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 3 ); guint64 px; int bands; double *a, *b; int y; VipsBandFormat fmt; g_object_set( object, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_hist_norm_parent_class )->build( object ) ) return( -1 ); /* Need max for each channel. */ if( vips_stats( norm->in, &t[0], NULL ) ) return( -1 ); /* Scale each channel by px / channel max */ px = VIPS_IMAGE_N_PELS( norm->in ); bands = norm->in->Bands; if( !(a = VIPS_ARRAY( object, bands, double )) || !(b = VIPS_ARRAY( object, bands, double )) ) return( -1 ); for( y = 0; y < bands; y++ ) { a[y] = px / *VIPS_MATRIX( t[0], 1, y + 1 ); b[y] = 0; } if( vips_linear( norm->in, &t[1], a, b, bands, NULL ) ) return( -1 ); /* Make output format as small as we can. */ if( px <= 256 ) fmt = VIPS_FORMAT_UCHAR; else if( px <= 65536 ) fmt = VIPS_FORMAT_USHORT; else fmt = VIPS_FORMAT_UINT; if( vips_cast( t[1], &t[2], fmt, NULL ) || vips_image_write( t[2], norm->out ) ) return( -1 ); return( 0 ); } static void vips_hist_norm_class_init( VipsHistNormClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "hist_norm"; object_class->description = _( "normalise histogram" ); object_class->build = vips_hist_norm_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistNorm, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistNorm, out ) ); } static void vips_hist_norm_init( VipsHistNorm *hist_norm ) { } /** * vips_hist_norm: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Normalise histogram ... normalise range to make it square (ie. max == * number of elements). Normalise each band separately. * * See also: vips_hist_cum(). * * Returns: 0 on success, -1 on error */ int vips_hist_norm( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "hist_norm", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/hist_equal.c0000644000175000017500000000737212303140253015471 00000000000000/* Histogram-equalise an image. * * Copyright: 1991, N. Dessipris. * * Author: Nicos Dessipris * Written on: 27/03/1991 * Modified on : * 16/6/93 J.Cupitt * - im_ioflag() changed to im_iocheck() * 24/5/95 JC * - ANSIfied and tidied up * 3/3/01 JC * - more cleanup * 23/3/10 * - gtkdoc * 12/8/13 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include typedef struct _VipsHistEqual { VipsOperation parent_instance; VipsImage *in; VipsImage *out; /* -1 for all bands, or the band we scan. */ int which; } VipsHistEqual; typedef VipsOperationClass VipsHistEqualClass; G_DEFINE_TYPE( VipsHistEqual, vips_hist_equal, VIPS_TYPE_OPERATION ); static int vips_hist_equal_build( VipsObject *object ) { VipsHistEqual *equal = (VipsHistEqual *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); g_object_set( equal, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_hist_equal_parent_class )->build( object ) ) return( -1 ); if( vips_hist_find( equal->in, &t[0], "band", equal->which, NULL ) || vips_hist_cum( t[0], &t[1], NULL ) || vips_hist_norm( t[1], &t[2], NULL ) || vips_maplut( equal->in, &t[3], t[2], NULL ) || vips_image_write( t[3], equal->out ) ) return( -1 ); return( 0 ); } static void vips_hist_equal_class_init( VipsHistEqualClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "hist_equal"; object_class->description = _( "histogram equalisation" ); object_class->build = vips_hist_equal_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistEqual, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistEqual, out ) ); VIPS_ARG_INT( class, "band", 110, _( "Band" ), _( "Equalise with this band" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsHistEqual, which ), -1, 100000, -1 ); } static void vips_hist_equal_init( VipsHistEqual *equal ) { equal->which = -1; } /** * vips_hist_equal: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @band: band to equalise * * Histogram-equalise @in. Equalise using band @bandno, or if @bandno is -1, * equalise bands independently. * * See also: * * Returns: 0 on success, -1 on error */ int vips_hist_equal( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "hist_equal", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/maplut.c0000644000175000017500000004434712303140253014640 00000000000000/* map though a LUT * * Modified: * 18/6/93 JC * - oops! im_incheck() added for LUT image * - some ANSIfication * 15/7/93 JC * - adapted for partial v2 * - ANSIfied * - now does complex LUTs too * 10/3/94 JC * - more helpful error messages, slight reformatting * 24/8/94 JC * - now allows non-uchar image input * 7/10/94 JC * - uses im_malloc(), IM_NEW() etc. * 13/3/95 JC * - now takes a private copy of LUT, so user can im_close() LUT image * after im_maplut() without fear of coredumps * 23/6/95 JC * - lut may now have many bands if image has just one band * 3/3/01 JC * - small speed ups * 30/6/04 * - heh, 1 band image + 3 band lut + >8bit output has been broken for 9 * years :-) * 7/11/07 * - new eval start/end system * 25/3/10 * - gtkdoc * - small cleanups * 5/7/13 * - convert to a class * 2/10/13 * - add --band arg, replacing im_tone_map() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include typedef struct _VipsMaplut { VipsOperation parent_instance; VipsImage *in; VipsImage *out; VipsImage *lut; int band; int fmt; /* LUT image BandFmt */ int nb; /* Number of bands in lut */ int es; /* VIPS_IMAGE_SIZEOF_ELEMENT() for lut image */ int sz; /* Number of elements in minor dimension */ int clp; /* Value we clip against */ VipsPel **table; /* Lut converted to 2d array */ int overflow; /* Number of overflows for non-uchar lut */ } VipsMaplut; typedef VipsOperationClass VipsMaplutClass; G_DEFINE_TYPE( VipsMaplut, vips_maplut, VIPS_TYPE_OPERATION ); static void vips_maplut_preeval( VipsImage *image, VipsProgress *progress, VipsMaplut *maplut ) { maplut->overflow = 0; } static void vips_maplut_posteval( VipsImage *image, VipsProgress *progress, VipsMaplut *maplut ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( maplut ); if( maplut->overflow ) vips_warn( class->nickname, _( "%d overflows detected" ), maplut->overflow ); } /* Our sequence value: the region this sequence is using, and local stats. */ typedef struct { VipsRegion *ir; /* Input region */ int overflow; /* Number of overflows */ } VipsMaplutSequence; /* Our start function. */ static void * vips_maplut_start( VipsImage *out, void *a, void *b ) { VipsImage *in = (VipsImage *) a; VipsMaplutSequence *seq; if( !(seq = VIPS_NEW( out, VipsMaplutSequence )) ) return( NULL ); /* Init! */ seq->ir = NULL; seq->overflow = 0; if( !(seq->ir = vips_region_new( in )) ) return( NULL ); return( seq ); } /* Map through n non-complex luts. */ #define loop( OUT ) { \ int b = maplut->nb; \ \ for( y = to; y < bo; y++ ) { \ for( z = 0; z < b; z++ ) { \ VipsPel *p = VIPS_REGION_ADDR( ir, le, y ); \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ OUT *tlut = (OUT *) maplut->table[z]; \ \ for( x = z; x < ne; x += b ) \ q[x] = tlut[p[x]]; \ } \ } \ } /* Map through n complex luts. */ #define loopc( OUT ) { \ int b = in->Bands; \ \ for( y = to; y < bo; y++ ) { \ for( z = 0; z < b; z++ ) { \ VipsPel *p = VIPS_REGION_ADDR( ir, le, y ) + z; \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ) + z * 2; \ OUT *tlut = (OUT *) maplut->table[z]; \ \ for( x = 0; x < ne; x += b ) { \ int n = p[x] * 2; \ \ q[0] = tlut[n]; \ q[1] = tlut[n + 1]; \ q += b * 2; \ } \ } \ } \ } #define loopg( IN, OUT ) { \ int b = maplut->nb; \ \ for( y = to; y < bo; y++ ) { \ for( z = 0; z < b; z++ ) { \ IN *p = (IN *) VIPS_REGION_ADDR( ir, le, y ); \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ OUT *tlut = (OUT *) maplut->table[z]; \ \ for( x = z; x < ne; x += b ) { \ int index = p[x]; \ \ if( index > maplut->clp ) { \ index = maplut->clp; \ seq->overflow++; \ } \ \ q[x] = tlut[index]; \ } \ } \ } \ } #define loopcg( IN, OUT ) { \ int b = in->Bands; \ \ for( y = to; y < bo; y++ ) { \ for( z = 0; z < b; z++ ) { \ IN *p = (IN *) VIPS_REGION_ADDR( ir, le, y ) + z; \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ) + z * 2; \ OUT *tlut = (OUT *) maplut->table[z]; \ \ for( x = 0; x < ne; x += b ) { \ int index = p[x]; \ \ if( index > maplut->clp ) { \ index = maplut->clp; \ seq->overflow++; \ } \ \ q[0] = tlut[index * 2]; \ q[1] = tlut[index * 2 + 1]; \ \ q += b * 2; \ } \ } \ } \ } /* Map image through one non-complex lut. */ #define loop1( OUT ) { \ OUT *tlut = (OUT *) maplut->table[0]; \ \ for( y = to; y < bo; y++ ) { \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ VipsPel *p = VIPS_REGION_ADDR( ir, le, y ); \ \ for( x = 0; x < ne; x++ ) \ q[x] = tlut[p[x]]; \ } \ } /* Map image through one complex lut. */ #define loop1c( OUT ) { \ OUT *tlut = (OUT *) maplut->table[0]; \ \ for( y = to; y < bo; y++ ) { \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ VipsPel *p = VIPS_REGION_ADDR( ir, le, y ); \ \ for( x = 0; x < ne; x++ ) { \ int n = p[x] * 2; \ \ q[0] = tlut[n]; \ q[1] = tlut[n + 1]; \ q += 2; \ } \ } \ } /* As above, but the input image may be any unsigned integer type. We have to * index the lut carefully, and record the number of overflows we detect. */ #define loop1g( IN, OUT ) { \ OUT *tlut = (OUT *) maplut->table[0]; \ \ for( y = to; y < bo; y++ ) { \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ IN *p = (IN *) VIPS_REGION_ADDR( ir, le, y ); \ \ for( x = 0; x < ne; x++ ) { \ int index = p[x]; \ \ if( index > maplut->clp ) { \ index = maplut->clp; \ seq->overflow++; \ } \ \ q[x] = tlut[index]; \ } \ } \ } #define loop1cg( IN, OUT ) { \ OUT *tlut = (OUT *) maplut->table[0]; \ \ for( y = to; y < bo; y++ ) { \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ IN *p = (IN *) VIPS_REGION_ADDR( ir, le, y ); \ \ for( x = 0; x < ne; x++ ) { \ int index = p[x]; \ \ if( index > maplut->clp ) { \ index = maplut->clp; \ seq->overflow++; \ } \ \ q[0] = tlut[index * 2]; \ q[1] = tlut[index * 2 + 1]; \ q += 2; \ } \ } \ } /* Map 1-band image through a many-band non-complex lut. */ #define loop1m( OUT ) { \ OUT **tlut = (OUT **) maplut->table; \ \ for( y = to; y < bo; y++ ) { \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ VipsPel *p = VIPS_REGION_ADDR( ir, le, y ); \ \ for( i = 0, x = 0; x < np; x++ ) { \ int n = p[x]; \ \ for( z = 0; z < maplut->nb; z++, i++ ) \ q[i] = tlut[z][n]; \ } \ } \ } /* Map 1-band image through many-band complex lut. */ #define loop1cm( OUT ) { \ OUT **tlut = (OUT **) maplut->table; \ \ for( y = to; y < bo; y++ ) { \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ VipsPel *p = VIPS_REGION_ADDR( ir, le, y ); \ \ for( x = 0; x < np; x++ ) { \ int n = p[x] * 2; \ \ for( z = 0; z < maplut->nb; z++ ) { \ q[0] = tlut[z][n]; \ q[1] = tlut[z][n+1]; \ q += 2; \ } \ } \ } \ } /* Map 1-band uint or ushort image through a many-band non-complex LUT. */ #define loop1gm( IN, OUT ) { \ OUT **tlut = (OUT **) maplut->table; \ \ for( y = to; y < bo; y++ ) { \ IN *p = (IN *) VIPS_REGION_ADDR( ir, le, y ); \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ \ for( i = 0, x = 0; x < np; x++ ) { \ int n = p[x]; \ \ if( n > maplut->clp ) { \ n = maplut->clp; \ seq->overflow++; \ } \ \ for( z = 0; z < maplut->nb; z++, i++ ) \ q[i] = tlut[z][n]; \ } \ } \ } /* Map 1-band uint or ushort image through a many-band complex LUT. */ #define loop1cgm( IN, OUT ) { \ OUT **tlut = (OUT **) maplut->table; \ \ for( y = to; y < bo; y++ ) { \ IN *p = (IN *) VIPS_REGION_ADDR( ir, le, y ); \ OUT *q = (OUT *) VIPS_REGION_ADDR( or, le, y ); \ \ for( x = 0; x < np; x++ ) { \ int n = p[x]; \ \ if( n > maplut->clp ) { \ n = maplut->clp; \ seq->overflow++; \ } \ \ for( z = 0; z < maplut->nb; z++ ) { \ q[0] = tlut[z][n * 2]; \ q[1] = tlut[z][n * 2 + 1]; \ q += 2; \ } \ } \ } \ } /* Switch for input types. Has to be uint type! */ #define inner_switch( UCHAR, GEN, OUT ) \ switch( ir->im->BandFmt ) { \ case VIPS_FORMAT_UCHAR: UCHAR( OUT ); break; \ case VIPS_FORMAT_USHORT: GEN( unsigned short, OUT ); break; \ case VIPS_FORMAT_UINT: GEN( unsigned int, OUT ); break; \ default: \ g_assert( 0 ); \ } /* Switch for LUT types. One function for non-complex images, a * variant for complex ones. Another pair as well, in case the input is not * uchar. */ #define outer_switch( UCHAR_F, UCHAR_FC, GEN_F, GEN_FC ) \ switch( maplut->fmt ) { \ case VIPS_FORMAT_UCHAR: \ inner_switch( UCHAR_F, GEN_F, unsigned char ); break; \ case VIPS_FORMAT_CHAR:\ inner_switch( UCHAR_F, GEN_F, char ); break; \ case VIPS_FORMAT_USHORT: \ inner_switch( UCHAR_F, GEN_F, unsigned short ); break; \ case VIPS_FORMAT_SHORT: \ inner_switch( UCHAR_F, GEN_F, short ); break; \ case VIPS_FORMAT_UINT: \ inner_switch( UCHAR_F, GEN_F, unsigned int ); break; \ case VIPS_FORMAT_INT: \ inner_switch( UCHAR_F, GEN_F, int ); break; \ case VIPS_FORMAT_FLOAT: \ inner_switch( UCHAR_F, GEN_F, float ); break; \ case VIPS_FORMAT_DOUBLE: \ inner_switch( UCHAR_F, GEN_F, double ); break; \ case VIPS_FORMAT_COMPLEX: \ inner_switch( UCHAR_FC, GEN_FC, float ); break; \ case VIPS_FORMAT_DPCOMPLEX: \ inner_switch( UCHAR_FC, GEN_FC, double ); break; \ default: \ g_assert( 0 ); \ } /* Do a map. */ static int vips_maplut_gen( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsMaplutSequence *seq = (VipsMaplutSequence *) vseq; VipsImage *in = (VipsImage *) a; VipsMaplut *maplut = (VipsMaplut *) b; VipsRegion *ir = seq->ir; VipsRect *r = &or->valid; int le = r->left; int to = r->top; int bo = VIPS_RECT_BOTTOM( r ); int np = r->width; /* Pels across region */ int ne = VIPS_REGION_N_ELEMENTS( or ); /* Number of elements */ int x, y, z, i; if( vips_region_prepare( ir, r ) ) return( -1 ); if( maplut->nb == 1 ) /* One band lut. */ outer_switch( loop1, loop1c, loop1g, loop1cg ) else /* Many band lut. */ if( in->Bands == 1 ) /* ... but 1 band input. */ outer_switch( loop1m, loop1cm, loop1gm, loop1cgm ) else outer_switch( loop, loopc, loopg, loopcg ) return( 0 ); } /* Destroy a sequence value. */ static int vips_maplut_stop( void *vseq, void *a, void *b ) { VipsMaplutSequence *seq = (VipsMaplutSequence *) vseq; VipsMaplut *maplut = (VipsMaplut *) b; /* Add to global stats. */ maplut->overflow += seq->overflow; VIPS_UNREF( seq->ir ); return( 0 ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define US VIPS_FORMAT_USHORT #define UI VIPS_FORMAT_UINT /* Type mapping: go to uchar / ushort / uint to make an index. */ static int bandfmt_maplut[10] = { /* UC C US S UI I F X D DX */ UC, UC, US, US, UI, UI, UI, UI, UI, UI }; /* Repack lut into a set of band arrays. If we're just passing one band of the * image through the lut, put the identity function in the other bands. */ #define PACK_TABLE( TYPE ) { \ TYPE *data = (TYPE *) lut->data; \ int x, b; \ \ for( x = 0; x < maplut->sz; x++ ) \ for( b = 0; b < maplut->nb; b++ ) { \ TYPE *q = (TYPE *) maplut->table[b]; \ \ if( maplut->band >= 0 && \ lut->Bands == 1 ) { \ if( b == maplut->band ) \ q[x] = data[x]; \ else \ q[x] = x; \ } \ else \ q[x] = data[x * lut->Bands + b]; \ } \ } static int vips_maplut_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsMaplut *maplut = (VipsMaplut *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 1 ); VipsImage *in; VipsImage *lut; int i; g_object_set( object, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_maplut_parent_class )->build( object ) ) return( -1 ); in = maplut->in; lut = maplut->lut; if( vips_check_hist( class->nickname, lut ) || vips_check_uncoded( class->nickname, lut ) || vips_image_wio_input( lut ) ) return( -1 ); /* Cast @in to u8/u16/u32 to make the index image. */ if( vips_cast( in, &t[0], bandfmt_maplut[in->BandFmt], NULL ) ) return( -1 ); in = t[0]; if( vips_check_uncoded( class->nickname, in ) || vips_check_bands_1orn( class->nickname, in, lut ) || vips_image_pio_input( in ) ) return( -1 ); if( vips_image_pipelinev( maplut->out, VIPS_DEMAND_STYLE_THINSTRIP, in, lut, NULL ) ) return( -1 ); maplut->out->BandFmt = lut->BandFmt; /* Output has same number of bands as LUT, unless LUT has 1 band, in * which case output has same number of bands as input. */ if( lut->Bands != 1 ) maplut->out->Bands = lut->Bands; g_signal_connect( in, "preeval", G_CALLBACK( vips_maplut_preeval ), maplut ); g_signal_connect( in, "posteval", G_CALLBACK( vips_maplut_posteval ), maplut ); /* Make luts. We unpack the LUT image into a 2D C array to speed * processing. */ maplut->fmt = lut->BandFmt; maplut->es = VIPS_IMAGE_SIZEOF_ELEMENT( lut ); maplut->sz = lut->Xsize * lut->Ysize; maplut->clp = maplut->sz - 1; /* If @bands is >= 0, we need to expand the lut to the number of bands * in the input image. */ if( maplut->band >= 0 && lut->Bands == 1 ) maplut->nb = in->Bands; else maplut->nb = lut->Bands; /* Attach tables. */ if( !(maplut->table = VIPS_ARRAY( maplut, maplut->nb, VipsPel * )) ) return( -1 ); for( i = 0; i < maplut->nb; i++ ) if( !(maplut->table[i] = VIPS_ARRAY( maplut, maplut->sz * maplut->es, VipsPel )) ) return( -1 ); /* Scan LUT and fill table. */ switch( lut->BandFmt ) { case VIPS_FORMAT_UCHAR: PACK_TABLE( unsigned char ); break; case VIPS_FORMAT_CHAR: PACK_TABLE( char ); break; case VIPS_FORMAT_USHORT: { unsigned short *data = (unsigned short *) lut->data; int x, b; for( x = 0; x < maplut->sz; x++ ) for( b = 0; b < maplut->nb; b++ ) { unsigned short *q = (unsigned short *) maplut->table[b]; if( maplut->band >= 0 && lut->Bands == 1 ) { if( b == maplut->band ) q[x] = data[x]; else q[x] = x; } else q[x] = data[x * lut->Bands + b]; } } //PACK_TABLE( unsigned short ); break; break; case VIPS_FORMAT_SHORT: PACK_TABLE( short ); break; case VIPS_FORMAT_UINT: PACK_TABLE( unsigned int ); break; case VIPS_FORMAT_INT: PACK_TABLE( int ); break; case VIPS_FORMAT_FLOAT: PACK_TABLE( float ); break; case VIPS_FORMAT_DOUBLE: PACK_TABLE( double ); break; case VIPS_FORMAT_COMPLEX: PACK_TABLE( float ); break; case VIPS_FORMAT_DPCOMPLEX: PACK_TABLE( double ); break; default: g_assert( 0 ); } if( vips_image_generate( maplut->out, vips_maplut_start, vips_maplut_gen, vips_maplut_stop, in, maplut ) ) return( -1 ); return( 0 ); } static void vips_maplut_class_init( VipsMaplutClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "maplut"; object_class->description = _( "map an image though a lut" ); object_class->build = vips_maplut_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaplut, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsMaplut, out ) ); VIPS_ARG_IMAGE( class, "lut", 3, _( "LUT" ), _( "Look-up table image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMaplut, lut ) ); VIPS_ARG_INT( class, "band", 4, _( "band" ), _( "apply one-band lut to this band of in" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMaplut, band ), -1, 10000, -1 ); } static void vips_maplut_init( VipsMaplut *maplut ) { maplut->band = -1; } /** * vips_maplut: * @in: input image * @out: output image * @lut: look-up table * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @band: apply one-band @lut to this band of @in * * Map an image through another image acting as a LUT (Look Up Table). * The lut may have any type and the output image will be that type. * * The input image will be cast to one of the unsigned integer types, that is, * VIPS_FORMAT_UCHAR, VIPS_FORMAT_USHORT or VIPS_FORMAT_UINT. * * If @lut is too small for the input type (for example, if @in is * VIPS_FORMAT_UCHAR but @lut only has 100 elements), the lut is padded out * by copying the last element. Overflows are reported at the end of * computation. * If @lut is too large, extra values are ignored. * * If @lut has one band and @band is -1 (the default), then all bands of @in * pass through @lut. If @band is >= 0, then just that band of @in passes * through @lut and other bands are just copied. * * If @lut * has same number of bands as @in, then each band is mapped * separately. If @in has one band, then @lut may have many bands and * the output will have the same number of bands as @lut. * * See also: im_histgr(), vips_identity(). * * Returns: 0 on success, -1 on error */ int vips_maplut( VipsImage *in, VipsImage **out, VipsImage *lut, ... ) { va_list ap; int result; va_start( ap, lut ); result = vips_call_split( "maplut", ap, in, out, lut ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/phistogram.h0000644000175000017500000000502312303140253015504 00000000000000/* base class for all histogram operations * * many hists in, one hist out, a buffer processing function in the class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PHISTOGRAM_H #define VIPS_PHISTOGRAM_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_HISTOGRAM (vips_histogram_get_type()) #define VIPS_HISTOGRAM( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_HISTOGRAM, VipsHistogram )) #define VIPS_HISTOGRAM_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_HISTOGRAM, VipsHistogramClass)) #define VIPS_IS_HISTOGRAM( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_HISTOGRAM )) #define VIPS_IS_HISTOGRAM_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_HISTOGRAM )) #define VIPS_HISTOGRAM_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_HISTOGRAM, VipsHistogramClass )) typedef struct _VipsHistogram VipsHistogram; typedef void (*VipsHistogramProcessFn)( VipsHistogram *histogram, VipsPel *out, VipsPel **in, int width ); struct _VipsHistogram { VipsOperation parent_instance; VipsImage *out; /* NULL-terminated array of input images. */ VipsImage **in; int n; /* ... and transformed ready for processing. */ VipsImage **ready; }; typedef struct _VipsHistogramClass { VipsOperationClass parent_class; /* For each input format, what output format. */ const VipsBandFormat *format_table; /* If not VIPS_FORMAT_NOTSET, upcast all ins to this. */ VipsBandFormat input_format; VipsHistogramProcessFn process; } VipsHistogramClass; GType vips_histogram_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PHISTOGRAM_H*/ vips-7.38.5/libvips/histogram/hist_unary.h0000644000175000017500000000374512303140253015525 00000000000000/* base class for all hist_unary operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PHIST_UNARY_H #define VIPS_PHIST_UNARY_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_HIST_UNARY (vips_hist_unary_get_type()) #define VIPS_HIST_UNARY( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_HIST_UNARY, VipsHistUnary )) #define VIPS_HIST_UNARY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_HIST_UNARY, VipsHistUnaryClass)) #define VIPS_IS_HIST_UNARY( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_HIST_UNARY )) #define VIPS_IS_HIST_UNARY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_HIST_UNARY )) #define VIPS_HIST_UNARY_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_HIST_UNARY, VipsHistUnaryClass )) typedef struct _VipsHistUnary { VipsHistogram parent_instance; VipsImage *in; } VipsHistUnary; typedef struct _VipsHistUnaryClass { VipsHistogramClass parent_class; } VipsHistUnaryClass; GType vips_hist_unary_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PHIST_UNARY_H*/ vips-7.38.5/libvips/histogram/hist_plot.c0000644000175000017500000002045112303140253015331 00000000000000/* draw a histogram * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris. * Written on: 09/07/1990 * Modified on : 12/03/1991 * 20/6/95 JC * - rules rationalised * - im_lineprof removed * - rewritten * 13/8/99 JC * - rewritten again for partial, rules redone * 19/9/99 JC * - oooops, broken for >1 band * 26/9/99 JC * - oooops, graph float was wrong * 17/11/99 JC * - oops, failed for all 0's histogram * 14/12/05 * - redone plot function in C, also use incheck() to cache calcs * - much, much faster! * 12/5/09 * - fix signed/unsigned warning * 24/3/10 * - gtkdoc * - small cleanups * - oop, would fail for signed int histograms * 19/8/13 * - wrap as a class, left a rewrite for now */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "phistogram.h" static int plotalise( IMAGE *in, IMAGE *out ) { if( im_check_uncoded( "im_histplot", in ) || im_check_noncomplex( "im_histplot", in ) ) return( -1 ); if( vips_bandfmt_isuint( in->BandFmt ) ) { if( im_copy( in, out ) ) return( -1 ); } else if( vips_bandfmt_isint( in->BandFmt ) ) { double min; /* Move min up to 0. */ if( im_min( in, &min ) || im_lintra( 1.0, in, -min, out ) ) return( -1 ); } else { /* Float image: scale min--max to 0--any. Output square * graph. */ DOUBLEMASK *stats; double min, max; int any; if( in->Xsize == 1 ) any = in->Ysize; else any = in->Xsize; if( !(stats = im_stats( in )) ) return( -1 ); min = IM_MASK( stats, 0, 0 ); max = IM_MASK( stats, 1, 0 ); im_free_dmask( stats ); if( im_lintra( any / (max - min), in, -min * any / (max - min), out ) ) return( -1 ); } return( 0 ); } #define VERT( TYPE ) { \ TYPE *p1 = (TYPE *) p; \ \ for( x = le; x < ri; x++ ) { \ for( z = 0; z < nb; z++ ) \ q[z] = p1[z] < ((TYPE) x) ? 0 : 255; \ \ q += nb; \ } \ } /* Generate function. */ static int make_vert_gen( REGION *or, void *seq, void *a, void *b ) { IMAGE *in = (IMAGE *) a; Rect *r = &or->valid; int le = r->left; int to = r->top; int ri = IM_RECT_RIGHT( r ); int bo = IM_RECT_BOTTOM( r ); int nb = in->Bands; int x, y, z; for( y = to; y < bo; y++ ) { VipsPel *q = IM_REGION_ADDR( or, le, y ); VipsPel *p = IM_IMAGE_ADDR( in, 0, y ); switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: VERT( unsigned char ); break; case IM_BANDFMT_CHAR: VERT( signed char ); break; case IM_BANDFMT_USHORT: VERT( unsigned short ); break; case IM_BANDFMT_SHORT: VERT( signed short ); break; case IM_BANDFMT_UINT: VERT( unsigned int ); break; case IM_BANDFMT_INT: VERT( signed int ); break; case IM_BANDFMT_FLOAT: VERT( float ); break; case IM_BANDFMT_DOUBLE: VERT( double ); break; default: g_assert( 0 ); } } return( 0 ); } #define HORZ( TYPE ) { \ TYPE *p1 = (TYPE *) p; \ \ for( y = to; y < bo; y++ ) { \ for( z = 0; z < nb; z++ ) \ q[z] = p1[z] < ((TYPE) (ht - y)) ? 0 : 255; \ \ q += lsk; \ } \ } /* Generate function. */ static int make_horz_gen( REGION *or, void *seq, void *a, void *b ) { IMAGE *in = (IMAGE *) a; Rect *r = &or->valid; int le = r->left; int to = r->top; int ri = IM_RECT_RIGHT( r ); int bo = IM_RECT_BOTTOM( r ); int nb = in->Bands; int lsk = IM_REGION_LSKIP( or ); int ht = or->im->Ysize; int x, y, z; for( x = le; x < ri; x++ ) { VipsPel *q = IM_REGION_ADDR( or, x, to ); VipsPel *p = IM_IMAGE_ADDR( in, x, 0 ); switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: HORZ( unsigned char ); break; case IM_BANDFMT_CHAR: HORZ( signed char ); break; case IM_BANDFMT_USHORT: HORZ( unsigned short ); break; case IM_BANDFMT_SHORT: HORZ( signed short ); break; case IM_BANDFMT_UINT: HORZ( unsigned int ); break; case IM_BANDFMT_INT: HORZ( signed int ); break; case IM_BANDFMT_FLOAT: HORZ( float ); break; case IM_BANDFMT_DOUBLE: HORZ( double ); break; default: g_assert( 0 ); } } return( 0 ); } /* Plot image. */ static int plot( IMAGE *in, IMAGE *out ) { double max; int tsize; int xsize; int ysize; if( im_incheck( in ) || im_poutcheck( out ) ) return( -1 ); /* Find range we will plot. */ if( im_max( in, &max ) ) return( -1 ); g_assert( max >= 0 ); if( in->BandFmt == IM_BANDFMT_UCHAR ) tsize = 256; else tsize = ceil( max ); /* Make sure we don't make a zero height image. */ if( tsize == 0 ) tsize = 1; if( in->Xsize == 1 ) { /* Vertical graph. */ xsize = tsize; ysize = in->Ysize; } else { /* Horizontal graph. */ xsize = in->Xsize; ysize = tsize; } /* Set image. */ im_initdesc( out, xsize, ysize, in->Bands, IM_BBITS_BYTE, IM_BANDFMT_UCHAR, IM_CODING_NONE, IM_TYPE_HISTOGRAM, 1.0, 1.0, 0, 0 ); /* Set hints - ANY is ok with us. */ if( im_demand_hint( out, IM_ANY, NULL ) ) return( -1 ); /* Generate image. */ if( in->Xsize == 1 ) { if( im_generate( out, NULL, make_vert_gen, NULL, in, NULL ) ) return( -1 ); } else { if( im_generate( out, NULL, make_horz_gen, NULL, in, NULL ) ) return( -1 ); } return( 0 ); } int im_histplot( IMAGE *in, IMAGE *out ) { IMAGE *t1; if( im_check_hist( "im_histplot", in ) ) return( -1 ); if( !(t1 = im_open_local( out, "im_histplot:1", "p" )) || plotalise( in, t1 ) || plot( t1, out ) ) return( -1 ); return( 0 ); } typedef struct _VipsHistPlot { VipsOperation parent_instance; VipsImage *in; VipsImage *out; } VipsHistPlot; typedef VipsOperationClass VipsHistPlotClass; G_DEFINE_TYPE( VipsHistPlot, vips_hist_plot, VIPS_TYPE_OPERATION ); static int vips_hist_plot_build( VipsObject *object ) { VipsHistPlot *plot = (VipsHistPlot *) object; g_object_set( plot, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_hist_plot_parent_class )->build( object ) ) return( -1 ); if( im_histplot( plot->in, plot->out ) ) return( -1 ); return( 0 ); } static void vips_hist_plot_class_init( VipsHistPlotClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "hist_plot"; object_class->description = _( "plot histogram" ); object_class->build = vips_hist_plot_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistPlot, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistPlot, out ) ); } static void vips_hist_plot_init( VipsHistPlot *hist_plot ) { } /** * vips_hist_plot: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Plot a 1 by any or any by 1 image file as a max by any or * any by max image using these rules: * * unsigned char max is always 256 * * other unsigned integer types output 0 - maxium * value of @in. * * signed int types min moved to 0, max moved to max + min. * * float types min moved to 0, max moved to any * (square output) * * Returns: 0 on success, -1 on error */ int vips_hist_plot( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "hist_plot", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/stdif.c0000644000175000017500000002321412303141142014433 00000000000000/* statistical difference * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on : * 6/8/93 JC * - now works for odd window sizes * - ANSIfication * 25/5/95 JC * - new IM_ARRAY() macro * 25/1/96 JC * - im_lhisteq() adapted to make new im_stdif() * - now partial, plus rolling window * - 5x faster, amazingly * - works * 7/4/04 * - now uses im_embed() with edge stretching on the input, not * the output * 25/3/10 * - gtkdoc * - small cleanups * 10/8/13 * - wrapped as a class using hist_local.c * - many bands */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include typedef struct _VipsStdif { VipsOperation parent_instance; VipsImage *in; VipsImage *out; int width; int height; double a; double m0; double b; double s0; } VipsStdif; typedef VipsOperationClass VipsStdifClass; G_DEFINE_TYPE( VipsStdif, vips_stdif, VIPS_TYPE_OPERATION ); /* How ugly and stupid. */ #define MAX_BANDS (100) static int vips_stdif_generate( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsRect *r = &or->valid; VipsRegion *ir = (VipsRegion *) vseq; VipsImage *in = (VipsImage *) a; VipsStdif *stdif = (VipsStdif *) b; int bands = in->Bands; int npel = stdif->width * stdif->width; VipsRect irect; int y; int lsk; int centre; /* Offset to move to centre of window */ /* What part of ir do we need? */ irect.left = or->valid.left; irect.top = or->valid.top; irect.width = or->valid.width + stdif->width; irect.height = or->valid.height + stdif->height; if( vips_region_prepare( ir, &irect ) ) return( -1 ); lsk = VIPS_REGION_LSKIP( ir ); centre = lsk * (stdif->height / 2) + stdif->width / 2; for( y = 0; y < r->height; y++ ) { /* Get input and output pointers for this line. */ VipsPel *p = VIPS_REGION_ADDR( ir, r->left, r->top + y ); VipsPel *q = VIPS_REGION_ADDR( or, r->left, r->top + y ); double f1 = stdif->a * stdif->m0; double f2 = 1.0 - stdif->a; double f3 = stdif->b * stdif->s0; VipsPel *p1; int x, i, j, b; /* We will get int overflow for windows larger than about 256 * x 256, sadly. */ unsigned int sum[MAX_BANDS]; unsigned int sum2[MAX_BANDS]; /* Find sum, sum of squares for the start of this line. */ for( b = 0; b < bands; b++ ) { memset( sum, 0, bands * sizeof( unsigned int ) ); memset( sum2, 0, bands * sizeof( unsigned int ) ); } p1 = p; for( j = 0; j < stdif->height; j++ ) { i = 0; for( x = 0; x < stdif->width; x++ ) { for( b = 0; b < bands; b++ ) { int t = p1[i++]; sum[b] += t; sum2[b] += t * t; } } p1 += lsk; } /* Loop for output pels. */ for( x = 0; x < r->width; x++ ) { for( b = 0; b < bands; b++ ) { /* Find stats. */ double mean = (double) sum[b] / npel; double var = (double) sum2[b] / npel - (mean * mean); double sig = sqrt( var ); /* Transform. */ double res = f1 + f2 * mean + ((double) p[centre] - mean) * (f3 / (stdif->s0 + stdif->b * sig)); /* And write. */ if( res < 0.0 ) *q++ = 0; else if( res >= 256.0 ) *q++ = 255; else *q++ = res + 0.5; /* Adapt sums - remove the pels from the left * hand column, add in pels for a new * right-hand column. */ p1 = p; for( j = 0; j < stdif->height; j++ ) { int t1 = p1[0]; int t2 = p1[bands * stdif->width]; sum[b] -= t1; sum2[b] -= t1 * t1; sum[b] += t2; sum2[b] += t2 * t2; p1 += lsk; } p += 1; } } } return( 0 ); } static int vips_stdif_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsStdif *stdif = (VipsStdif *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 3 ); VipsImage *in; if( VIPS_OBJECT_CLASS( vips_stdif_parent_class )->build( object ) ) return( -1 ); in = stdif->in; if( vips_check_uncoded( class->nickname, in ) || vips_check_format( class->nickname, in, VIPS_FORMAT_UCHAR ) ) return( -1 ); if( stdif->width > in->Xsize || stdif->height > in->Ysize ) { vips_error( class->nickname, "%s", _( "window too large" ) ); return( -1 ); } if( in->Bands > MAX_BANDS ) { vips_error( class->nickname, "%s", _( "too many bands" ) ); return( -1 ); } /* Expand the input. */ if( vips_embed( in, &t[0], stdif->width / 2, stdif->height / 2, in->Xsize + stdif->width - 1, in->Ysize + stdif->height - 1, "extend", VIPS_EXTEND_COPY, NULL ) ) return( -1 ); in = t[0]; g_object_set( object, "out", vips_image_new(), NULL ); /* Set demand hints. FATSTRIP is good for us, as THINSTRIP will cause * too many recalculations on overlaps. */ if( vips_image_pipelinev( stdif->out, VIPS_DEMAND_STYLE_FATSTRIP, in, NULL ) ) return( -1 ); stdif->out->Xsize -= stdif->width - 1; stdif->out->Ysize -= stdif->height - 1; if( vips_image_generate( stdif->out, vips_start_one, vips_stdif_generate, vips_stop_one, in, stdif ) ) return( -1 ); stdif->out->Xoffset = 0; stdif->out->Yoffset = 0; return( 0 ); } static void vips_stdif_class_init( VipsStdifClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "stdif"; object_class->description = _( "statistical difference" ); object_class->build = vips_stdif_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsStdif, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsStdif, out ) ); /* Windows larger than 256x256 will overflow sum2, see above. */ VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Window width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsStdif, width ), 1, 256, 11 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Window height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsStdif, height ), 1, 256, 11 ); VIPS_ARG_DOUBLE( class, "a", 2, _( "Mean weight" ), _( "Weight of new mean" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsStdif, a ), 0.0, 1.0, 0.5 ); VIPS_ARG_DOUBLE( class, "m0", 2, _( "Mean" ), _( "New mean" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsStdif, m0 ), -INFINITY, INFINITY, 128 ); VIPS_ARG_DOUBLE( class, "b", 2, _( "Deviation weight" ), _( "Weight of new deviation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsStdif, b ), 0.0, 2.0, 0.5 ); VIPS_ARG_DOUBLE( class, "s0", 2, _( "Deviation" ), _( "New deviation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsStdif, s0 ), -INFINITY, INFINITY, 50 ); } static void vips_stdif_init( VipsStdif *stdif ) { stdif->width = 11; stdif->height = 11; stdif->a = 0.5; stdif->m0 = 128.0; stdif->b = 0.5; stdif->s0 = 50.0; } /** * vips_stdif: * @in: input image * @out: output image * @width: width of region * @height: height of region * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @a: weight of new mean * @m0: target mean * @b: weight of new deviation * @s0: target deviation * * vips_stdif() preforms statistical differencing according to the formula * given in page 45 of the book "An Introduction to Digital Image * Processing" by Wayne Niblack. This transformation emphasises the way in * which a pel differs statistically from its neighbours. It is useful for * enhancing low-contrast images with lots of detail, such as X-ray plates. * * At point (i,j) the output is given by the equation: * * vout(i,j) = @a * @m0 + (1 - @a) * meanv + * (vin(i,j) - meanv) * (@b * @s0) / (@s0 + @b * stdv) * * Values @a, @m0, @b and @s0 are entered, while meanv and stdv are the values * calculated over a moving window of size @width, @height centred on pixel * (i,j). @m0 is the new mean, @a is the weight given to it. @s0 is the new * standard deviation, @b is the weight given to it. * * Try: * * vips stdif $VIPSHOME/pics/huysum.v fred.v 0.5 128 0.5 50 11 11 * * The operation works on one-band uchar images only, and writes a one-band * uchar image as its result. The output image has the same size as the * input. * * See also: vips_hist_local(). * * Returns: 0 on success, -1 on error */ int vips_stdif( VipsImage *in, VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "stdif", ap, in, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/hist_local.c0000644000175000017500000002043612303141142015446 00000000000000/* local histogram equalisation * * Copyright: 1991, N. Dessipris * * Author: N. Dessipris * Written on: 24/10/1991 * Modified on : * 25/1/96 JC * - rewritten, adapting im_spcor() * - correct result, 2x faster, partial, simpler, better arg checking * 8/7/04 * - expand input rather than output with new im_embed() mode * - _raw() output is one pixel larger * - sets Xoffset/Yoffset * 23/6/08 * - check for window too small as well * 25/3/10 * - gtkdoc * - small cleanups * 5/9/13 * - redo as a class * 9/9/13 * - any number of bands */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include typedef struct _VipsHistLocal { VipsOperation parent_instance; VipsImage *in; VipsImage *out; int width; int height; } VipsHistLocal; typedef VipsOperationClass VipsHistLocalClass; G_DEFINE_TYPE( VipsHistLocal, vips_hist_local, VIPS_TYPE_OPERATION ); /* Our sequence value: the region this sequence is using, and local stats. */ typedef struct { VipsRegion *ir; /* Input region */ /* A 256-element hist for evry band. */ unsigned int **hist; } VipsHistLocalSequence; static int vips_hist_local_stop( void *vseq, void *a, void *b ) { VipsHistLocalSequence *seq = (VipsHistLocalSequence *) vseq; VipsImage *in = (VipsImage *) a; VIPS_UNREF( seq->ir ); if( seq->hist && in ) { int i; for( i = 0; i < in->Bands; i++ ) VIPS_FREE( seq->hist[i] ); VIPS_FREE( seq->hist ); } VIPS_FREE( seq ); return( 0 ); } static void * vips_hist_local_start( VipsImage *out, void *a, void *b ) { VipsImage *in = (VipsImage *) a; VipsHistLocalSequence *seq; int i; if( !(seq = VIPS_NEW( NULL, VipsHistLocalSequence )) ) return( NULL ); seq->ir = NULL; seq->hist = NULL; if( !(seq->ir = vips_region_new( in )) || !(seq->hist = VIPS_ARRAY( NULL, in->Bands, unsigned int * )) ) { vips_hist_local_stop( seq, NULL, NULL ); return( NULL ); } for( i = 0; i < in->Bands; i++ ) if( !(seq->hist[i] = VIPS_ARRAY( NULL, 256, unsigned int )) ) { vips_hist_local_stop( seq, NULL, NULL ); return( NULL ); } return( seq ); } static int vips_hist_local_generate( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsHistLocalSequence *seq = (VipsHistLocalSequence *) vseq; VipsImage *in = (VipsImage *) a; const VipsHistLocal *local = (VipsHistLocal *) b; VipsRect *r = &or->valid; int bands = in->Bands; VipsRect irect; int y; int lsk; int centre; /* Offset to move to centre of window */ /* What part of ir do we need? */ irect.left = r->left; irect.top = r->top; irect.width = r->width + local->width; irect.height = r->height + local->height; if( vips_region_prepare( seq->ir, &irect ) ) return( -1 ); lsk = VIPS_REGION_LSKIP( seq->ir ); centre = lsk * (local->height / 2) + bands * local->width / 2; for( y = 0; y < r->height; y++ ) { /* Get input and output pointers for this line. */ VipsPel *p = VIPS_REGION_ADDR( seq->ir, r->left, r->top + y ); VipsPel *q = VIPS_REGION_ADDR( or, r->left, r->top + y ); VipsPel *p1; int x, i, j, b; /* Find histogram for start of this line. */ for( b = 0; b < bands; b++ ) memset( seq->hist[b], 0, 256 * sizeof( unsigned int ) ); p1 = p; for( j = 0; j < local->height; j++ ) { i = 0; for( x = 0; x < local->width; x++ ) for( b = 0; b < bands; b++ ) seq->hist[b][p1[i++]] += 1; p1 += lsk; } /* Loop for output pels. */ for( x = 0; x < r->width; x++ ) { for( b = 0; b < bands; b++ ) { /* Sum histogram up to current pel. */ unsigned int *hist = seq->hist[b]; int target = p[centre]; int sum; sum = 0; for( i = 0; i < target; i++ ) sum += hist[i]; *q++ = 256 * sum / (local->width * local->height); /* Adapt histogram --- remove the pels from * the left hand column, add in pels for a * new right-hand column. */ p1 = p; for( j = 0; j < local->height; j++ ) { hist[p1[0]] -= 1; hist[p1[bands * local->width]] += 1; p1 += lsk; } p += 1; } } } return( 0 ); } static int vips_hist_local_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsHistLocal *local = (VipsHistLocal *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 3 ); VipsImage *in; if( VIPS_OBJECT_CLASS( vips_hist_local_parent_class )->build( object ) ) return( -1 ); in = local->in; if( vips_check_uncoded( class->nickname, in ) || vips_check_format( class->nickname, in, VIPS_FORMAT_UCHAR ) ) return( -1 ); if( local->width > in->Xsize || local->height > in->Ysize ) { vips_error( class->nickname, "%s", _( "window too large" ) ); return( -1 ); } /* Expand the input. */ if( vips_embed( in, &t[0], local->width / 2, local->height / 2, in->Xsize + local->width - 1, in->Ysize + local->height - 1, "extend", VIPS_EXTEND_COPY, NULL ) ) return( -1 ); in = t[0]; g_object_set( object, "out", vips_image_new(), NULL ); /* Set demand hints. FATSTRIP is good for us, as THINSTRIP will cause * too many recalculations on overlaps. */ if( vips_image_pipelinev( local->out, VIPS_DEMAND_STYLE_FATSTRIP, in, NULL ) ) return( -1 ); local->out->Xsize -= local->width - 1; local->out->Ysize -= local->height - 1; if( vips_image_generate( local->out, vips_hist_local_start, vips_hist_local_generate, vips_hist_local_stop, in, local ) ) return( -1 ); local->out->Xoffset = 0; local->out->Yoffset = 0; return( 0 ); } static void vips_hist_local_class_init( VipsHistLocalClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "hist_local"; object_class->description = _( "local histogram equalisation" ); object_class->build = vips_hist_local_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistLocal, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistLocal, out ) ); VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Window width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistLocal, width ), 1, 1000000, 1 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Window height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistLocal, height ), 1, 1000000, 1 ); } static void vips_hist_local_init( VipsHistLocal *local ) { } /** * vips_hist_local: * @in: input image * @out: output image * @width: width of region * @height: height of region * @...: %NULL-terminated list of optional named arguments * * Performs local histogram equalisation on @in using a * window of size @xwin by @ywin centered on the input pixel. * * The output image is the same size as the input image. The edge pixels are * created by copy edge pixels of the input image outwards. * * See also: vips_hist_equal(). * * Returns: 0 on success, -1 on error */ int vips_hist_local( VipsImage *in, VipsImage **out, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "hist_local", ap, in, out, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/histogram.c0000644000175000017500000001646412303141142015330 00000000000000/* base class for all histogram operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "phistogram.h" /** * SECTION: histogram * @short_description: find, manipulate and apply histograms and lookup tables * @stability: Stable * @see_also: image * @include: vips/vips.h * * Histograms and look-up tables are 1xn or nx1 images, where n is less than * 256 or less than 65536, corresponding to 8- and 16-bit unsigned int images. * They are * tagged with a #VipsType of IM_TYPE_HISTOGRAM and usually displayed by * user-interfaces such as nip2 as plots rather than images. * * These functions can be broadly grouped as things to find or build * histograms (im_histgr(), im_buildlut(), in_identity()), operations that * manipulate histograms in some way (im_histcum(), im_histnorm()), operations * to apply histograms (im_maplut()), and a variety of utility * operations. * * A final group of operations build tone curves. These are useful in * pre-press work for adjusting the appearance of images. They are designed * for CIELAB images, but might be useful elsewhere. */ G_DEFINE_ABSTRACT_TYPE( VipsHistogram, vips_histogram, VIPS_TYPE_OPERATION ); /* sizealike by expanding in just one dimension and copying the final element. */ static int vips__hist_sizealike_vec( VipsImage **in, VipsImage **out, int n ) { int i; int max_size; g_assert( n >= 1 ); max_size = VIPS_MAX( in[0]->Xsize, in[0]->Ysize ); for( i = 1; i < n; i++ ) max_size = VIPS_MAX( max_size, VIPS_MAX( in[0]->Xsize, in[0]->Ysize ) ); for( i = 0; i < n; i++ ) if( in[i]->Ysize == 1 ) { if( vips_embed( in[i], &out[i], 0, 0, max_size, 1, "extend", VIPS_EXTEND_COPY, NULL ) ) return( -1 ); } else { if( vips_embed( in[i], &out[i], 0, 0, 1, max_size, "extend", VIPS_EXTEND_COPY, NULL ) ) return( -1 ); } return( 0 ); } static int vips_histogram_build( VipsObject *object ) { VipsHistogram *histogram = VIPS_HISTOGRAM( object ); VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsHistogramClass *hclass = VIPS_HISTOGRAM_GET_CLASS( histogram ); VipsImage **format; VipsImage **band; VipsImage **size; VipsPel *outbuf; VipsPel **inbuf; int i; #ifdef DEBUG printf( "vips_histogram_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ if( VIPS_OBJECT_CLASS( vips_histogram_parent_class )->build( object ) ) return( -1 ); g_assert( histogram->n > 0 ); /* Must be NULL-terminated. */ g_assert( !histogram->in[histogram->n] ); format = (VipsImage **) vips_object_local_array( object, histogram->n ); band = (VipsImage **) vips_object_local_array( object, histogram->n ); size = (VipsImage **) vips_object_local_array( object, histogram->n ); g_object_set( histogram, "out", vips_image_new(), NULL ); for( i = 0; i < histogram->n; i++ ) if( vips_check_uncoded( class->nickname, histogram->in[i] ) || vips_check_hist( class->nickname, histogram->in[i] ) ) return( -1 ); /* Cast our input images up to a common format, bands and size. If * input_format is set, cast to a fixed input type. */ if( hclass->input_format != VIPS_FORMAT_NOTSET ) { for( i = 0; i < histogram->n; i++ ) if( vips_cast( histogram->in[i], &format[i], hclass->input_format, NULL ) ) return( -1 ); } else { if( vips__formatalike_vec( histogram->in, format, histogram->n ) ) return( -1 ); } if( vips__bandalike_vec( class->nickname, format, band, histogram->n, 1 ) || vips__hist_sizealike_vec( band, size, histogram->n ) ) return( -1 ); /* Keep a copy of the processed images here for subclasses. */ histogram->ready = size; if( vips_image_pipeline_array( histogram->out, VIPS_DEMAND_STYLE_THINSTRIP, histogram->ready ) ) return( -1 ); histogram->out->Xsize = VIPS_IMAGE_N_PELS( histogram->ready[0] ); histogram->out->Ysize = 1; if( hclass->format_table ) histogram->out->BandFmt = hclass->format_table[histogram->ready[0]->BandFmt]; histogram->out->Type = VIPS_INTERPRETATION_HISTOGRAM; if( !(outbuf = vips_malloc( object, VIPS_IMAGE_SIZEOF_LINE( histogram->out ))) ) return( -1 ); if( !(inbuf = VIPS_ARRAY( object, histogram->n + 1, VipsPel * )) ) return( -1 ); for( i = 0; i < histogram->n; i++ ) { if( vips_image_wio_input( histogram->ready[i] ) ) return( -1 ); inbuf[i] = VIPS_IMAGE_ADDR( histogram->ready[i], 0, 0 ); } inbuf[i] = NULL; hclass->process( histogram, outbuf, inbuf, histogram->ready[0]->Xsize ); if( vips_image_write_line( histogram->out, 0, outbuf ) ) return( -1 ); return( 0 ); } static void vips_histogram_class_init( VipsHistogramClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "histogram"; vobject_class->description = _( "histogram operations" ); vobject_class->build = vips_histogram_build; class->input_format = VIPS_FORMAT_NOTSET; /* Inputs set by subclassess. */ VIPS_ARG_IMAGE( class, "out", 10, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistogram, out ) ); } static void vips_histogram_init( VipsHistogram *histogram ) { /* Sanity check this above. */ histogram->n = -1; } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_histogram_operation_init( void ) { extern GType vips_maplut_get_type( void ); extern GType vips_percent_get_type( void ); extern GType vips_hist_cum_get_type( void ); extern GType vips_hist_norm_get_type( void ); extern GType vips_hist_equal_get_type( void ); extern GType vips_hist_plot_get_type( void ); extern GType vips_hist_match_get_type( void ); extern GType vips_hist_local_get_type( void ); extern GType vips_hist_ismonotonic_get_type( void ); extern GType vips_stdif_get_type( void ); vips_maplut_get_type(); vips_percent_get_type(); vips_stdif_get_type(); vips_hist_cum_get_type(); vips_hist_norm_get_type(); vips_hist_equal_get_type(); vips_hist_plot_get_type(); vips_hist_match_get_type(); vips_hist_local_get_type(); vips_hist_ismonotonic_get_type(); } vips-7.38.5/libvips/histogram/Makefile.in0000644000175000017500000005307112303144055015235 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/histogram DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhistogram_la_LIBADD = am_libhistogram_la_OBJECTS = histogram.lo maplut.lo hist_unary.lo \ hist_cum.lo hist_norm.lo hist_equal.lo hist_plot.lo \ hist_match.lo hist_local.lo percent.lo hist_ismonotonic.lo \ stdif.lo libhistogram_la_OBJECTS = $(am_libhistogram_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libhistogram_la_SOURCES) DIST_SOURCES = $(libhistogram_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libhistogram.la libhistogram_la_SOURCES = \ histogram.c \ phistogram.h \ maplut.c \ hist_unary.c \ hist_unary.h \ hist_cum.c \ hist_norm.c \ hist_equal.c \ hist_plot.c \ hist_match.c \ hist_local.c \ percent.c \ hist_ismonotonic.c \ stdif.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/histogram/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/histogram/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libhistogram.la: $(libhistogram_la_OBJECTS) $(libhistogram_la_DEPENDENCIES) $(EXTRA_libhistogram_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libhistogram_la_OBJECTS) $(libhistogram_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_cum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_equal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_ismonotonic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_local.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_match.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_norm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_plot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_unary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/histogram.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maplut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/percent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdif.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/histogram/Makefile.am0000644000175000017500000000054412303140253015215 00000000000000noinst_LTLIBRARIES = libhistogram.la libhistogram_la_SOURCES = \ histogram.c \ phistogram.h \ maplut.c \ hist_unary.c \ hist_unary.h \ hist_cum.c \ hist_norm.c \ hist_equal.c \ hist_plot.c \ hist_match.c \ hist_local.c \ percent.c \ hist_ismonotonic.c \ stdif.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/histogram/hist_match.c0000644000175000017500000001146512303140253015454 00000000000000/* Match two normalised, cumulative histograms. * * Copyright: 1991, N. Dessipris. * * Author: Nicos Dessipris * Written on: 19/07/1990 * Modified on: 26/03/1991 * * 1/3/01 JC * - bleurg! rewritten, now does 16 bits as well, bugs removed, faster, * smaller * 24/3/10 * - gtkdoc * - small cleanups * 12/8/13 * - redone im_histspec() as a class, vips_hist_match() * 19/12/13 * - oop, upcast input */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "phistogram.h" /* #define DEBUG */ typedef struct _VipsHistMatch { VipsHistogram parent_instance; VipsImage *in; VipsImage *ref; } VipsHistMatch; typedef VipsHistogramClass VipsHistMatchClass; G_DEFINE_TYPE( VipsHistMatch, vips_hist_match, VIPS_TYPE_HISTOGRAM ); static void vips_hist_match_process( VipsHistogram *histogram, VipsPel *out, VipsPel **in, int width ) { VipsHistMatch *match = (VipsHistMatch *) histogram; const int bands = match->in->Bands; const int max = width * bands; unsigned int *inbuf = (unsigned int *) in[0]; unsigned int *refbuf = (unsigned int *) in[1]; unsigned int *outbuf = (unsigned int *) out; int i, j; for( j = 0; j < bands; j++ ) { /* Track up refbuf[] with this. */ int ri = j; int limit = max - bands; for( i = j; i < max; i += bands ) { unsigned int inv = inbuf[i]; for( ; ri < limit; ri += bands ) if( inv <= refbuf[ri] ) break; if( ri < limit ) { /* Simple rounding. */ double mid = refbuf[ri] + refbuf[ri + bands] / 2.0; if( inv < mid ) outbuf[i] = ri / bands; else outbuf[i] = ri / bands + 1; } else outbuf[i] = refbuf[ri]; } } } static int vips_hist_match_build( VipsObject *object ) { VipsHistogram *histogram = VIPS_HISTOGRAM( object ); VipsHistMatch *match = (VipsHistMatch *) object; histogram->n = 2; histogram->in = (VipsImage **) vips_object_local_array( object, 2 ); histogram->in[0] = match->in; histogram->in[1] = match->ref; if( histogram->in[0] ) g_object_ref( histogram->in[0] ); if( histogram->in[1] ) g_object_ref( histogram->in[1] ); if( VIPS_OBJECT_CLASS( vips_hist_match_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_hist_match_class_init( VipsHistMatchClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsHistogramClass *hclass = VIPS_HISTOGRAM_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "hist_match"; vobject_class->description = _( "match two histograms" ); vobject_class->build = vips_hist_match_build; hclass->input_format = VIPS_FORMAT_UINT; hclass->process = vips_hist_match_process; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input histogram" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistMatch, in ) ); VIPS_ARG_IMAGE( class, "ref", 2, _( "Reference" ), _( "Reference histogram" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistMatch, ref ) ); } static void vips_hist_match_init( VipsHistMatch *match ) { } /** * vips_hist_match: * @in: input histogram * @ref: reference histogram * @out: output histogram * @...: %NULL-terminated list of optional named arguments * * Adjust @in to match @ref. If @in and @ref are normalised * cumulative histograms, @out will be a LUT that adjusts the PDF of the image * from which @in was made to match the PDF of @ref's image. * * See also: vips_maplut(), vips_hist_find(), vips_hist_norm(), * vips_hist_cum(). * * Returns: 0 on success, -1 on error */ int vips_hist_match( VipsImage *in, VipsImage *ref, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "hist_match", ap, in, ref, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/hist_unary.c0000644000175000017500000000466312303140253015520 00000000000000/* a hist operation implemented as a unary processor * * properties: * - single hist to single hist */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "phistogram.h" #include "hist_unary.h" G_DEFINE_ABSTRACT_TYPE( VipsHistUnary, vips_hist_unary, VIPS_TYPE_HISTOGRAM ); static int vips_hist_unary_build( VipsObject *object ) { VipsHistogram *histogram = VIPS_HISTOGRAM( object ); VipsHistUnary *unary = VIPS_HIST_UNARY( object ); histogram->n = 1; histogram->in = (VipsImage **) vips_object_local_array( object, 1 ); histogram->in[0] = unary->in; if( histogram->in[0] ) g_object_ref( histogram->in[0] ); if( VIPS_OBJECT_CLASS( vips_hist_unary_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } static void vips_hist_unary_class_init( VipsHistUnaryClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "hist_unary"; vobject_class->description = _( "hist_unary operations" ); vobject_class->build = vips_hist_unary_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistUnary, in ) ); } static void vips_hist_unary_init( VipsHistUnary *hist_unary ) { } vips-7.38.5/libvips/histogram/hist_ismonotonic.c0000644000175000017500000000774412303140253016726 00000000000000/* test for monotonicity * * Author: John Cupitt * Written on: 18/7/1995 * 17/9/96 JC * - restrictions on Ps, Pm, Ph relaxed * - restrictions on S, M, H relaxed * 25/7/01 JC * - patched for im_extract_band() change * 11/7/04 * - generalised to im_tone_build_range() ... so you can use it for any * image, not just LabS * 26/3/10 * - cleanups * - gtkdoc * 20/9/13 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include typedef struct _VipsHistIsmonotonic { VipsOperation parent_instance; VipsImage *in; gboolean monotonic; } VipsHistIsmonotonic; typedef VipsOperationClass VipsHistIsmonotonicClass; G_DEFINE_TYPE( VipsHistIsmonotonic, vips_hist_ismonotonic, VIPS_TYPE_OPERATION ); static int vips_hist_ismonotonic_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsHistIsmonotonic *ismonotonic = (VipsHistIsmonotonic *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); double m; if( VIPS_OBJECT_CLASS( vips_hist_ismonotonic_parent_class )-> build( object ) ) return( -1 ); if( vips_check_hist( class->nickname, ismonotonic->in ) ) return( -1 ); if( ismonotonic->in->Xsize == 1 ) t[0] = vips_image_new_matrixv( 1, 2, -1.0, 1.0 ); else t[0] = vips_image_new_matrixv( 2, 1, -1.0, 1.0 ); vips_image_set_double( t[0], "offset", 128 ); /* We want >=128 everywhere, ie. no -ve transitions. */ if( vips_conv( ismonotonic->in, &t[1], t[0], NULL ) || vips_moreeq_const1( t[1], &t[2], 128, NULL ) || vips_min( t[2], &m, NULL ) ) return( -1 ); g_object_set( ismonotonic, "monotonic", (int) m == 255, NULL ); return( 0 ); } static void vips_hist_ismonotonic_class_init( VipsHistIsmonotonicClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "hist_ismonotonic"; object_class->description = _( "test for monotonicity" ); object_class->build = vips_hist_ismonotonic_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input histogram image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistIsmonotonic, in ) ); VIPS_ARG_BOOL( class, "monotonic", 2, _( "Monotonic" ), _( "true if in is monotonic" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistIsmonotonic, monotonic ), FALSE ); } static void vips_hist_ismonotonic_init( VipsHistIsmonotonic *ismonotonic ) { } /** * vips_hist_ismonotonic: * @in: lookup-table to test * @out: set non-zero if @in is monotonic * @...: %NULL-terminated list of optional named arguments * * Test @in for monotonicity. @out is set non-zero if @in is monotonic. * * Returns: 0 on success, -1 on error */ int vips_hist_ismonotonic( VipsImage *in, gboolean *monotonic, ... ) { va_list ap; int result; va_start( ap, monotonic ); result = vips_call_split( "hist_ismonotonic", ap, in, monotonic ); va_end( ap ); return( result ); } vips-7.38.5/libvips/histogram/percent.c0000644000175000017500000001032112303140253014757 00000000000000/* find percent of pixels * * Copyright: 1990, N. Dessipris * * Author: N. Dessipris * Written on: 02/08/1990 * Modified on : 29/4/93 K.Martinez for Sys5 * 20/2/95 JC * - now returns result through parameter * - ANSIfied a little * 19/1/07 * - redone with the vips hist operators * 25/3/10 * - gtkdoc * 20/9/13 * - wrap as a class * - more accurate */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include typedef struct _VipsPercent { VipsOperation parent_instance; VipsImage *in; double percent; int threshold; } VipsPercent; typedef VipsOperationClass VipsPercentClass; G_DEFINE_TYPE( VipsPercent, vips_percent, VIPS_TYPE_OPERATION ); static int vips_percent_build( VipsObject *object ) { VipsPercent *percent = (VipsPercent *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 7 ); double threshold; if( VIPS_OBJECT_CLASS( vips_percent_parent_class )-> build( object ) ) return( -1 ); if( vips_hist_find( percent->in, &t[0], NULL ) || vips_hist_cum( t[0], &t[1], NULL ) || vips_hist_norm( t[1], &t[2], NULL ) || vips_more_const1( t[2], &t[3], (percent->percent / 100.0) * t[2]->Xsize, NULL ) || vips_profile( t[3], &t[5], &t[6], NULL ) || vips_avg( t[6], &threshold, NULL ) ) return( -1 ); g_object_set( object, "threshold", (int) threshold, NULL ); return( 0 ); } static void vips_percent_class_init( VipsPercentClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "percent"; object_class->description = _( "find threshold for percent of pixels" ); object_class->build = vips_percent_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsPercent, in ) ); VIPS_ARG_DOUBLE( class, "percent", 2, _( "Percent" ), _( "Percent of pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsPercent, percent ), 0, 100, 50 ); VIPS_ARG_INT( class, "threshold", 3, _( "Threshold" ), _( "Threshold above which lie percent of pixels" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsPercent, threshold ), 0, 65535, 0 ); } static void vips_percent_init( VipsPercent *percent ) { } /** * vips_percent: * @in: input image * @percent: threshold percentage * @threshold: output threshold value * @...: %NULL-terminated list of optional named arguments * * vips_percent() returns (through the @threshold parameter) the threshold * above which there are @percent values of @in. If for example percent=10, the * number of pels of the input image with values greater than @threshold * will correspond to 10% of all pels of the image. * * The function works for uchar and ushort images only. It can be used * to threshold the scaled result of a filtering operation. * * See also: vips_hist_find(), vips_profile(). * * Returns: 0 on success, -1 on error */ int vips_percent( VipsImage *in, double percent, int *threshold, ... ) { va_list ap; int result; va_start( ap, threshold ); result = vips_call_split( "percent", ap, in, percent, threshold ); va_end( ap ); return( result ); } vips-7.38.5/libvips/resample/0000755000175000017500000000000012303146330013053 500000000000000vips-7.38.5/libvips/resample/interpolate.c0000644000175000017500000004163412303141142015471 00000000000000/* vipsinterpolate ... abstract base class for various interpolators * * J. Cupitt, 15/10/08 * * 12/8/10 * - revise window_size / window_offset stuff again: window_offset now * defaults to (window_size / 2 - 1), so for a 4x4 stencil (eg. * bicubic) we have an offset of 1 * - tiny speedups * 7/1/11 * - don't use tables for bilinear on float data for a small speedup * (thanks Nicolas Robidoux) * 12/1/11 * - faster, more accuarate uchar bilinear (thanks Nicolas) * 2/2/11 * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /** * SECTION: interpolate * @short_description: various interpolators: nearest, bilinear, and * some non-linear * @stability: Stable * @include: vips/vips.h * * A number of image interpolators. */ G_DEFINE_ABSTRACT_TYPE( VipsInterpolate, vips_interpolate, VIPS_TYPE_OBJECT ); /** * VipsInterpolateMethod: * @interpolate: the interpolator * @out: write the interpolated pixel here * @in: read source pixels from here * @x: interpolate value at this position * @y: interpolate value at this position * * An interpolation function. It should read source pixels from @in with * VIPS_REGION_ADDR(), it can look left and up from (x, y) by @window_offset * pixels and it can access pixels in a window of size @window_size. * * The interpolated value should be written to the pixel pointed to by @out. * * See also: #VipsInterpolateClass. */ /** * VipsInterpolateClass: * @interpolate: the interpolation method * @get_window_size: return the size of the window needed by this method * @window_size: or just set this for a constant window size * @get_window_offset: return the window offset for this method * @window_offset: or just set this for a constant window offset * * The abstract base class for the various VIPS interpolation functions. * Use "vips --list classes" to see all the interpolators available. * * An interpolator consists of a function to perform the interpolation, plus * some extra data fields which tell vips how to call the function and what * data it needs. * * @window_size is the size of the window that the interpolator needs. For * example, a bicubic interpolator needs to see a window of 4x4 pixels to be * able to interpolate a value. * * You can either have a function in @get_window_size which returns the window * that a specific interpolator needs, or you can leave @get_window_size %NULL * and set a constant value in @window_size. * * @window_offset is how much to offset the window up and left of (x, y). For * example, a bicubic interpolator will want a @window_offset of 1. * * You can either have a function in @get_window_offset which returns the * offset that a specific interpolator needs, or you can leave * @get_window_offset %NULL and set a constant value in @window_offset. * * You also need to set @nickname and @description in #VipsObject. * * See also: #VipsInterpolateMethod, #VipsObject, * vips_interpolate_bilinear_static(). */ #ifdef DEBUG static void vips_interpolate_finalize( GObject *gobject ) { printf( "vips_interpolate_finalize: " ); vips_object_print_name( VIPS_OBJECT( gobject ) ); G_OBJECT_CLASS( vips_interpolate_parent_class )->finalize( gobject ); } #endif /*DEBUG*/ static int vips_interpolate_real_get_window_size( VipsInterpolate *interpolate ) { VipsInterpolateClass *class = VIPS_INTERPOLATE_GET_CLASS( interpolate ); g_assert( class->window_size != -1 ); return( class->window_size ); } static int vips_interpolate_real_get_window_offset( VipsInterpolate *interpolate ) { VipsInterpolateClass *class = VIPS_INTERPOLATE_GET_CLASS( interpolate ); /* Default to half window size - 1. For example, bicubic is a 4x4 * stencil and needs an offset of 1. */ if( class->window_offset != -1 ) return( class->window_offset ); else { int window_size = vips_interpolate_get_window_size( interpolate ); /* Don't go -ve, of course, for window_size 1. */ return( VIPS_MAX( 0, window_size / 2 - 1 ) ); } } static void vips_interpolate_class_init( VipsInterpolateClass *class ) { VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); #ifdef DEBUG GObjectClass *gobject_class = G_OBJECT_CLASS( class ); #endif /*DEBUG*/ #ifdef DEBUG gobject_class->finalize = vips_interpolate_finalize; #endif /*DEBUG*/ vobject_class->nickname = "interpolate"; vobject_class->description = _( "VIPS interpolators" ); class->interpolate = NULL; class->get_window_size = vips_interpolate_real_get_window_size; class->get_window_offset = vips_interpolate_real_get_window_offset; class->window_size = -1; class->window_offset = -1; } static void vips_interpolate_init( VipsInterpolate *interpolate ) { #ifdef DEBUG printf( "vips_interpolate_init: " ); vips_object_print_name( VIPS_OBJECT( interpolate ) ); #endif /*DEBUG*/ } /** * vips_interpolate: (skip) * @interpolate: interpolator to use * @out: write result here * @in: read source data from here * @x: interpolate value at this position * @y: interpolate value at this position * * Look up the @interpolate method in the class and call it. Use * vips_interpolate_get_method() to get a direct pointer to the function and * avoid the lookup overhead. * * You need to set @in and @out up correctly. */ void vips_interpolate( VipsInterpolate *interpolate, void *out, VipsRegion *in, double x, double y ) { VipsInterpolateClass *class = VIPS_INTERPOLATE_GET_CLASS( interpolate ); g_assert( class->interpolate ); class->interpolate( interpolate, out, in, x, y ); } /** * vips_interpolate_get_method: (skip) * @interpolate: interpolator to use * * Look up the @interpolate method in the class and return it. Use this * instead of vips_interpolate() to cache method dispatch. * * Returns: a pointer to the interpolation function */ VipsInterpolateMethod vips_interpolate_get_method( VipsInterpolate *interpolate ) { VipsInterpolateClass *class = VIPS_INTERPOLATE_GET_CLASS( interpolate ); g_assert( class->interpolate ); return( class->interpolate ); } /** * vips_interpolate_get_window_size: * @interpolate: interpolator to use * * Look up an interpolators desired window size. * * Returns: the interpolators required window size */ int vips_interpolate_get_window_size( VipsInterpolate *interpolate ) { VipsInterpolateClass *class = VIPS_INTERPOLATE_GET_CLASS( interpolate ); g_assert( class->get_window_size ); return( class->get_window_size( interpolate ) ); } /** * vips_interpolate_get_window_offset: * @interpolate: interpolator to use * * Look up an interpolators desired window offset. * * Returns: the interpolators required window offset */ int vips_interpolate_get_window_offset( VipsInterpolate *interpolate ) { VipsInterpolateClass *class = VIPS_INTERPOLATE_GET_CLASS( interpolate ); g_assert( class->get_window_offset ); return( class->get_window_offset( interpolate ) ); } /** * VIPS_TRANSFORM_SHIFT: * * Many of the vips interpolators use fixed-point arithmetic for coordinate * calculation. This is how many bits of precision they use. */ /** * VIPS_TRANSFORM_SCALE: * * #VIPS_TRANSFORM_SHIFT as a multiplicative constant. */ /** * VIPS_INTERPOLATE_SHIFT: * * Many of the vips interpolators use fixed-point arithmetic for value * calcualtion. This is how many bits of precision they use. */ /** * VIPS_INTERPOLATE_SCALE: * * #VIPS_INTERPOLATE_SHIFT as a multiplicative constant. */ /* VipsInterpolateNearest class */ #define VIPS_TYPE_INTERPOLATE_NEAREST (vips_interpolate_nearest_get_type()) #define VIPS_INTERPOLATE_NEAREST( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_INTERPOLATE_NEAREST, VipsInterpolateNearest )) #define VIPS_INTERPOLATE_NEAREST_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_INTERPOLATE_NEAREST, VipsInterpolateNearestClass)) #define VIPS_IS_INTERPOLATE_NEAREST( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_NEAREST )) #define VIPS_IS_INTERPOLATE_NEAREST_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_NEAREST )) #define VIPS_INTERPOLATE_NEAREST_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_INTERPOLATE_NEAREST, VipsInterpolateNearestClass )) /* No new members. */ typedef VipsInterpolate VipsInterpolateNearest; typedef VipsInterpolateClass VipsInterpolateNearestClass; G_DEFINE_TYPE( VipsInterpolateNearest, vips_interpolate_nearest, VIPS_TYPE_INTERPOLATE ); static void vips_interpolate_nearest_interpolate( VipsInterpolate *interpolate, void *out, VipsRegion *in, double x, double y ) { const int ps = VIPS_IMAGE_SIZEOF_PEL( in->im ); const int xi = (int) x; const int yi = (int) y; const VipsPel * restrict p = VIPS_REGION_ADDR( in, xi, yi ); VipsPel * restrict q = (VipsPel *) out; int z; for( z = 0; z < ps; z++ ) q[z] = p[z]; } static void vips_interpolate_nearest_class_init( VipsInterpolateNearestClass *class ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( class ); object_class->nickname = "nearest"; object_class->description = _( "Nearest-neighbour interpolation" ); interpolate_class->interpolate = vips_interpolate_nearest_interpolate; interpolate_class->window_size = 1; } static void vips_interpolate_nearest_init( VipsInterpolateNearest *nearest ) { #ifdef DEBUG printf( "vips_interpolate_nearest_init: " ); vips_object_print_name( VIPS_OBJECT( nearest ) ); #endif /*DEBUG*/ } VipsInterpolate * vips_interpolate_nearest_new( void ) { return( VIPS_INTERPOLATE( vips_object_new( VIPS_TYPE_INTERPOLATE_NEAREST, NULL, NULL, NULL ) ) ); } /** * vips_interpolate_nearest_static: * * A convenience function that returns a nearest-neighbour interpolator you * don't need to free. * * Returns: (transfer none): a nearest-neighbour interpolator */ VipsInterpolate * vips_interpolate_nearest_static( void ) { static VipsInterpolate *interpolate = NULL; if( !interpolate ) { interpolate = vips_interpolate_nearest_new(); vips_object_set_static( VIPS_OBJECT( interpolate ), TRUE ); } return( interpolate ); } /* VipsInterpolateBilinear class */ #define VIPS_TYPE_INTERPOLATE_BILINEAR (vips_interpolate_bilinear_get_type()) #define VIPS_INTERPOLATE_BILINEAR( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_INTERPOLATE_BILINEAR, VipsInterpolateBilinear )) #define VIPS_INTERPOLATE_BILINEAR_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_INTERPOLATE_BILINEAR, VipsInterpolateBilinearClass)) #define VIPS_IS_INTERPOLATE_BILINEAR( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_BILINEAR )) #define VIPS_IS_INTERPOLATE_BILINEAR_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_BILINEAR )) #define VIPS_INTERPOLATE_BILINEAR_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_INTERPOLATE_BILINEAR, VipsInterpolateBilinearClass )) typedef VipsInterpolate VipsInterpolateBilinear; typedef VipsInterpolateClass VipsInterpolateBilinearClass; G_DEFINE_TYPE( VipsInterpolateBilinear, vips_interpolate_bilinear, VIPS_TYPE_INTERPOLATE ); /* in this class, name vars in the 2x2 grid as eg. * p1 p2 * p3 p4 */ /* Fixed-point arithmetic, no tables. */ #define BILINEAR_INT( TYPE ) { \ TYPE * restrict tq = (TYPE *) out; \ \ const int X = (x - ix) * VIPS_INTERPOLATE_SCALE; \ const int Y = (iy - y) * VIPS_INTERPOLATE_SCALE; \ \ const TYPE * restrict tp1 = (TYPE *) p1; \ const TYPE * restrict tp2 = (TYPE *) p2; \ const TYPE * restrict tp3 = (TYPE *) p3; \ const TYPE * restrict tp4 = (TYPE *) p4; \ \ for( z = 0; z < b; z++ ) { \ const int top = tp1[z] + \ ((X * (tp2[z] - tp1[z])) >> VIPS_INTERPOLATE_SHIFT); \ const int bot = tp3[z] + \ ((X * (tp4[z] - tp3[z])) >> VIPS_INTERPOLATE_SHIFT); \ \ tq[z] = top - ((Y * (bot - top)) >> VIPS_INTERPOLATE_SHIFT); \ } \ } /* Interpolate a pel ... int32 and float types, no tables, float * arithmetic. */ #define BILINEAR_FLOAT( TYPE ) { \ TYPE * restrict tq = (TYPE *) out; \ \ float Y = y - iy; \ float X = x - ix; \ \ float Yd = 1.0f - Y; \ \ float c4 = Y * X; \ float c2 = Yd * X; \ float c3 = Y - c4; \ float c1 = Yd - c2; \ \ const TYPE * restrict tp1 = (TYPE *) p1; \ const TYPE * restrict tp2 = (TYPE *) p2; \ const TYPE * restrict tp3 = (TYPE *) p3; \ const TYPE * restrict tp4 = (TYPE *) p4; \ \ for( z = 0; z < b; z++ ) \ tq[z] = c1 * tp1[z] + c2 * tp2[z] + \ c3 * tp3[z] + c4 * tp4[z]; \ } /* Expand for band types. with a fixed-point interpolator and a float * interpolator. */ #define SWITCH_INTERPOLATE( FMT, INT, FLOAT ) { \ switch( (FMT) ) { \ case VIPS_FORMAT_UCHAR: INT( unsigned char ); break; \ case VIPS_FORMAT_CHAR: INT( char ); break; \ case VIPS_FORMAT_USHORT:INT( unsigned short ); break; \ case VIPS_FORMAT_SHORT: INT( short ); break; \ case VIPS_FORMAT_UINT: FLOAT( unsigned int ); break; \ case VIPS_FORMAT_INT: FLOAT( int ); break; \ case VIPS_FORMAT_FLOAT: FLOAT( float ); break; \ case VIPS_FORMAT_DOUBLE:FLOAT( double ); break; \ default: \ g_assert( FALSE ); \ } \ } static void vips_interpolate_bilinear_interpolate( VipsInterpolate *interpolate, void *out, VipsRegion *in, double x, double y ) { /* Pel size and line size. */ const int ps = VIPS_IMAGE_SIZEOF_PEL( in->im ); const int ls = VIPS_REGION_LSKIP( in ); const int b = in->im->Bands; const int ix = (int) x; const int iy = (int) y; const VipsPel * restrict p1 = VIPS_REGION_ADDR( in, ix, iy ); const VipsPel * restrict p2 = p1 + ps; const VipsPel * restrict p3 = p1 + ls; const VipsPel * restrict p4 = p3 + ps; int z; SWITCH_INTERPOLATE( in->im->BandFmt, BILINEAR_INT, BILINEAR_FLOAT ); } static void vips_interpolate_bilinear_class_init( VipsInterpolateBilinearClass *class ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); VipsInterpolateClass *interpolate_class = (VipsInterpolateClass *) class; object_class->nickname = "bilinear"; object_class->description = _( "Bilinear interpolation" ); interpolate_class->interpolate = vips_interpolate_bilinear_interpolate; interpolate_class->window_size = 2; } static void vips_interpolate_bilinear_init( VipsInterpolateBilinear *bilinear ) { #ifdef DEBUG printf( "vips_interpolate_bilinear_init: " ); vips_object_print_name( VIPS_OBJECT( bilinear ) ); #endif /*DEBUG*/ } VipsInterpolate * vips_interpolate_bilinear_new( void ) { return( VIPS_INTERPOLATE( vips_object_new( VIPS_TYPE_INTERPOLATE_BILINEAR, NULL, NULL, NULL ) ) ); } /** * vips_interpolate_bilinear_static: * * A convenience function that returns a bilinear interpolator you * don't need to free. * * Returns: (transfer none): a bilinear interpolator */ VipsInterpolate * vips_interpolate_bilinear_static( void ) { static VipsInterpolate *interpolate = NULL; if( !interpolate ) { interpolate = vips_interpolate_bilinear_new(); vips_object_set_static( VIPS_OBJECT( interpolate ), TRUE ); } return( interpolate ); } /* Called on startup: register the base vips interpolators. */ void vips__interpolate_init( void ) { extern GType vips_interpolate_bicubic_get_type( void ); extern GType vips_interpolate_lbb_get_type( void ); extern GType vips_interpolate_nohalo_get_type( void ); extern GType vips_interpolate_vsqbs_get_type( void ); vips_interpolate_nearest_get_type(); vips_interpolate_bilinear_get_type(); #ifdef ENABLE_CXX vips_interpolate_bicubic_get_type(); vips_interpolate_lbb_get_type(); vips_interpolate_nohalo_get_type(); vips_interpolate_vsqbs_get_type(); #endif /*ENABLE_CXX*/ } /** * vips_interpolate_new: * @nickname: nickname for interpolator * * Look up an interpolator from a nickname and make one. You need to free the * result with g_object_unref() when you're done with it. * * See also: vips_type_find(). * * Returns: an interpolator, or %NULL on error. */ VipsInterpolate * vips_interpolate_new( const char *nickname ) { GType type; if( !(type = vips_type_find( "VipsInterpolate", nickname )) ) { vips_error( "VipsInterpolate", _( "class \"%s\" not found" ), nickname ); return( NULL ); } return( VIPS_INTERPOLATE( vips_object_new( type, NULL, NULL, NULL ) ) ); } vips-7.38.5/libvips/resample/resample.c0000644000175000017500000000576112303140253014756 00000000000000/* base class for all resample operations * * properties: * - one in, one out * - not point-to-point * - size can change in any way * - bands, type, format etc. all fixed */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "presample.h" G_DEFINE_ABSTRACT_TYPE( VipsResample, vips_resample, VIPS_TYPE_OPERATION ); static int vips_resample_build( VipsObject *object ) { VipsResample *resample = VIPS_RESAMPLE( object ); #ifdef DEBUG printf( "vips_resample_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_object_set( resample, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_resample_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_resample_class_init( VipsResampleClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "resample"; vobject_class->description = _( "resample operations" ); vobject_class->build = vips_resample_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsResample, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsResample, out ) ); } static void vips_resample_init( VipsResample *resample ) { } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_resample_operation_init( void ) { extern GType vips_shrink_get_type( void ); extern GType vips_quadratic_get_type( void ); extern GType vips_affine_get_type( void ); extern GType vips_similarity_get_type( void ); vips_shrink_get_type(); vips_quadratic_get_type(); vips_affine_get_type(); vips_similarity_get_type(); } vips-7.38.5/libvips/resample/transform.c0000644000175000017500000001432612303140253015156 00000000000000/* affine transforms */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* */ #define DEBUG #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include /* Calculate the inverse transformation. */ int vips__transform_calc_inverse( VipsTransformation *trn ) { DOUBLEMASK *msk, *msk2; if( !(msk = im_create_dmaskv( "boink", 2, 2, trn->a, trn->b, trn->c, trn->d )) ) return( -1 ); if( !(msk2 = im_matinv( msk, "boink2" )) ) { (void) im_free_dmask( msk ); return( -1 ); } trn->ia = msk2->coeff[0]; trn->ib = msk2->coeff[1]; trn->ic = msk2->coeff[2]; trn->id = msk2->coeff[3]; (void) im_free_dmask( msk ); (void) im_free_dmask( msk2 ); return( 0 ); } /* Init a VipsTransform. */ void vips__transform_init( VipsTransformation *trn ) { trn->oarea.left = 0; trn->oarea.top = 0; trn->oarea.width = -1; trn->oarea.height = -1; trn->iarea.left = 0; trn->iarea.top = 0; trn->iarea.width = -1; trn->iarea.height = -1; trn->a = 1.0; /* Identity transform */ trn->b = 0.0; trn->c = 0.0; trn->d = 1.0; trn->idx = 0.0; trn->idy = 0.0; trn->odx = 0.0; trn->ody = 0.0; (void) vips__transform_calc_inverse( trn ); } /* Test for transform is identity function. */ int vips__transform_isidentity( const VipsTransformation *trn ) { if( trn->a == 1.0 && trn->b == 0.0 && trn->c == 0.0 && trn->d == 1.0 && trn->idx == 0.0 && trn->idy == 0.0 && trn->odx == 0.0 && trn->ody == 0.0 ) return( 1 ); else return( 0 ); } /* Combine two transformations. out can be one of the ins. */ int vips__transform_add( const VipsTransformation *in1, const VipsTransformation *in2, VipsTransformation *out ) { out->a = in1->a * in2->a + in1->c * in2->b; out->b = in1->b * in2->a + in1->d * in2->b; out->c = in1->a * in2->c + in1->c * in2->d; out->d = in1->b * in2->c + in1->d * in2->d; // fixme: do idx/idy as well out->odx = in1->odx * in2->a + in1->ody * in2->b + in2->odx; out->ody = in1->odx * in2->c + in1->ody * in2->d + in2->ody; if( vips__transform_calc_inverse( out ) ) return( -1 ); return( 0 ); } void vips__transform_print( const VipsTransformation *trn ) { printf( "vips__transform_print:\n" ); printf( " iarea: left=%d, top=%d, width=%d, height=%d\n", trn->iarea.left, trn->iarea.top, trn->iarea.width, trn->iarea.height ); printf( " oarea: left=%d, top=%d, width=%d, height=%d\n", trn->oarea.left, trn->oarea.top, trn->oarea.width, trn->oarea.height ); printf( " mat: a=%g, b=%g, c=%g, d=%g\n", trn->a, trn->b, trn->c, trn->d ); printf( " off: odx=%g, ody=%g, idx=%g, idy=%g\n", trn->odx, trn->ody, trn->idx, trn->idy ); } /* Map a pixel coordinate through the transform. */ void vips__transform_forward_point( const VipsTransformation *trn, double x, double y, /* In input space */ double *ox, double *oy ) /* In output space */ { x += trn->idx; y += trn->idy; *ox = trn->a * x + trn->b * y + trn->odx; *oy = trn->c * x + trn->d * y + trn->ody; } /* Map a pixel coordinate through the inverse transform. */ void vips__transform_invert_point( const VipsTransformation *trn, double x, double y, /* In output space */ double *ox, double *oy ) /* In input space */ { x -= trn->odx; y -= trn->ody; *ox = trn->ia * x + trn->ib * y - trn->idx; *oy = trn->ic * x + trn->id * y - trn->idy; } typedef void (*transform_fn)( const VipsTransformation *, const double, const double, double*, double* ); /* Transform a rect using a point transformer. */ static void transform_rect( const VipsTransformation *trn, transform_fn transform, const Rect *in, /* In input space */ Rect *out ) /* In output space */ { double x1, y1; /* Map corners */ double x2, y2; double x3, y3; double x4, y4; double left, right, top, bottom; /* Map input Rect. */ transform( trn, in->left, in->top, &x1, &y1 ); transform( trn, in->left, IM_RECT_BOTTOM( in ), &x3, &y3 ); transform( trn, IM_RECT_RIGHT( in ), in->top, &x2, &y2 ); transform( trn, IM_RECT_RIGHT( in ), IM_RECT_BOTTOM( in ), &x4, &y4 ); /* Find bounding box for these four corners. Round-to-nearest to try * to stop rounding errors growing images. */ left = IM_MIN( x1, IM_MIN( x2, IM_MIN( x3, x4 ) ) ); right = IM_MAX( x1, IM_MAX( x2, IM_MAX( x3, x4 ) ) ); top = IM_MIN( y1, IM_MIN( y2, IM_MIN( y3, y4 ) ) ); bottom = IM_MAX( y1, IM_MAX( y2, IM_MAX( y3, y4 ) ) ); out->left = IM_RINT( left ); out->top = IM_RINT( top ); out->width = IM_RINT( right - left ); out->height = IM_RINT( bottom - top ); } /* Given an area in the input image, calculate the bounding box for those * pixels in the output image. */ void vips__transform_forward_rect( const VipsTransformation *trn, const Rect *in, /* In input space */ Rect *out ) /* In output space */ { transform_rect( trn, vips__transform_forward_point, in, out ); } /* Given an area in the output image, calculate the bounding box for the * corresponding pixels in the input image. */ void vips__transform_invert_rect( const VipsTransformation *trn, const Rect *in, /* In output space */ Rect *out ) /* In input space */ { transform_rect( trn, vips__transform_invert_point, in, out ); } /* Set output area of trn so that it just holds all of our input pels. */ void vips__transform_set_area( VipsTransformation *trn ) { vips__transform_forward_rect( trn, &trn->iarea, &trn->oarea ); } vips-7.38.5/libvips/resample/similarity.c0000644000175000017500000001211112303140253015317 00000000000000/* simple wrapper over vips_similarity() to make scale / rotate easy from the * command-line * * 3/10/13 * - from similarity.c * 25/10/13 * - oops, reverse rotation direction to match the convention used in the * rest of vips */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "presample.h" typedef struct _VipsSimilarity { VipsResample parent_instance; double scale; double angle; VipsInterpolate *interpolate; double odx; double ody; double idx; double idy; } VipsSimilarity; typedef VipsResampleClass VipsSimilarityClass; G_DEFINE_TYPE( VipsSimilarity, vips_similarity, VIPS_TYPE_RESAMPLE ); static int vips_similarity_build( VipsObject *object ) { VipsResample *resample = VIPS_RESAMPLE( object ); VipsSimilarity *similarity = (VipsSimilarity *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); double a, b, c, d; if( VIPS_OBJECT_CLASS( vips_similarity_parent_class )->build( object ) ) return( -1 ); a = similarity->scale * cos( VIPS_RAD( similarity->angle ) ); b = -sin( VIPS_RAD( similarity->angle ) ); c = -b; d = a; if( vips_affine( resample->in, &t[0], a, b, c, d, "interpolate", similarity->interpolate, "odx", similarity->odx, "ody", similarity->ody, "idx", similarity->idx, "idy", similarity->idy, NULL ) || vips_image_write( t[0], resample->out ) ) return( -1 ); return( 0 ); } static void vips_similarity_class_init( VipsSimilarityClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "similarity"; vobject_class->description = _( "similarity transform of an image" ); vobject_class->build = vips_similarity_build; VIPS_ARG_DOUBLE( class, "scale", 3, _( "Scale" ), _( "Scale by this factor" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSimilarity, scale ), 0, 10000000, 1 ); VIPS_ARG_DOUBLE( class, "angle", 4, _( "Angle" ), _( "Rotate anticlockwise by this many degrees" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSimilarity, angle ), -10000000, 10000000, 0 ); VIPS_ARG_INTERPOLATE( class, "interpolate", 2, _( "Interpolate" ), _( "Interpolate pixels with this" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSimilarity, interpolate ) ); VIPS_ARG_DOUBLE( class, "odx", 112, _( "Output offset" ), _( "Horizontal output displacement" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSimilarity, odx ), -10000000, 10000000, 0 ); VIPS_ARG_DOUBLE( class, "ody", 113, _( "Output offset" ), _( "Vertical output displacement" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSimilarity, ody ), -10000000, 10000000, 0 ); VIPS_ARG_DOUBLE( class, "idx", 114, _( "Input offset" ), _( "Horizontal input displacement" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSimilarity, idx ), -10000000, 10000000, 0 ); VIPS_ARG_DOUBLE( class, "idy", 115, _( "Input offset" ), _( "Vertical input displacement" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSimilarity, idy ), -10000000, 10000000, 0 ); } static void vips_similarity_init( VipsSimilarity *similarity ) { similarity->scale = 1; } /** * vips_similarity: * @in: input image * @out: output image * * Optional arguments: * * @scale: scale by this factor * @angle: rotate by this many degrees anticlockwise * @interpolate: interpolate pixels with this * @idx: input horizontal offset * @idy: input vertical offset * @odx: output horizontal offset * @ody: output vertical offset * * This operator calls vips_affine() for you, calculating the matrix for the * affine transform from @scale and @angle. Other parameters are passed on to * vips_affine() unaltered. * * See also: vips_affine(), #VipsInterpolate. * * Returns: 0 on success, -1 on error */ int vips_similarity( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "similarity", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/resample/vsqbs.cpp0000644000175000017500000003345312303140253014643 00000000000000/* vertex-split subdivision followed by quadratic b-spline smoothing * * C. Racette 23-28/05/2010 based on code by N. Robidoux and J. Cupitt * * N. Robidoux 29-30/05/2010 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* * 2010 (c) Chantal Racette, Nicolas Robidoux, John Cupitt. * * Nicolas Robidoux thanks Adam Turcotte, Geert Jordaens, Ralf Meyer, * Øyvind Kolås, Minglun Gong and Eric Daoust for useful comments and * code. * * Chantal Racette's image resampling research and programming funded * in part by a NSERC Discovery Grant awarded to Julien Dompierre * (20-61098). */ /* * Vertex-Split Quadratic B-Splines (VSQBS) is a brand new method * which consists of vertex-split subdivision, a subdivision method * with the (as yet unknown?) property that data which is (locally) * constant on diagonals is subdivided into data which is (locally) * constant on diagonals, followed by quadratic B-Spline smoothing. * Because both methods are linear, their combination can be * implemented as if there is no subdivision. * * At high enlargement ratios, VSQBS is very effective at "masking" * that the original has pixels uniformly distributed on a grid. In * particular, VSQBS produces resamples with only very mild * staircasing. Like cubic B-Spline smoothing, however, VSQBS is not * an interpolatory method. For example, using VSQBS to perform the * identity geometric transformation (enlargement by a scaling factor * equal to 1) on an image does not return the original: VSQBS * effectively smooths out the image with the convolution mask * * 1/8 * 1/8 1/2 1/8 * 1/8 * * which is a fairly moderate blur (although the checkerboard mode is * in its nullspace). * * By blending VSQBS with an interpolatory method (bilinear, say) in a * transformation adaptive environment (current GEGL, for example), it * is quite easy to restore that resampling for identity geometric * transformation is equivalent to the identity, and rotations are not * affected by the above, implicit, blur. Contact N. Robidoux for * details. * * An article on VSQBS is forthcoming. */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "templates.h" #define VIPS_TYPE_INTERPOLATE_VSQBS \ (vips_interpolate_vsqbs_get_type()) #define VIPS_INTERPOLATE_VSQBS( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbs )) #define VIPS_INTERPOLATE_VSQBS_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbsClass)) #define VIPS_IS_INTERPOLATE_VSQBS( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_VSQBS )) #define VIPS_IS_INTERPOLATE_VSQBS_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_VSQBS )) #define VIPS_INTERPOLATE_VSQBS_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_INTERPOLATE_VSQBS, VipsInterpolateVsqbsClass )) typedef struct _VipsInterpolateVsqbs { VipsInterpolate parent_object; } VipsInterpolateVsqbs; typedef struct _VipsInterpolateVsqbsClass { VipsInterpolateClass parent_class; } VipsInterpolateVsqbsClass; /* * THE STENCIL OF INPUT VALUES: * * Pointer arithmetic is used to implicitly reflect the input stencil * about dos_two---assumed closer to the sampling location than other * pixels (ties are OK)---in such a way that after reflection the * sampling point is to the bottom right of dos_two. * * The following code and picture assumes that the stencil reflexion * has already been performed. (X is the sampling location.) * * * (ix,iy-1) (ix+1,iy-1) * = uno_two = uno_thr * * * * (ix-1,iy) (ix,iy) (ix+1,iy) * = dos_one = dos_two = dos_thr * X * * * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) * = tre_one = tre_two = tre_thr * * * The above input pixel values are the ones needed in order to * IMPLICITLY make available the following values, needed by quadratic * B-Splines, which is performed on (shifted) double density data: * * * uno_one_1 = uno_two_1 = uno_thr_1 = * (ix-1/4,iy-1/4) (ix+1/4,iy-1/4) (ix+3/4,iy-1/4) * * * * X or X * dos_one_1 = dos_two_1 = dos_thr_1 = * (ix-1/4,iy+1/4) (ix+1/4,iy+1/4) (ix+3/4,iy+1/4) * or X or X * * * * tre_one_1 = tre_two_1 = tre_thr_1 = * (ix-1/4,iy+3/4) (ix+1/4,iy+3/4) (ix+3/4,iy+3/4) * * * In the coefficient computations, we fix things so that coordinates * are relative to dos_two_1, and so that distances are rescaled so * that double density pixel locations are at a distance of 1. */ /* * Call vertex-split + quadratic B-splines with a careful type * conversion as a parameter. (It would be nice to do this with * templates somehow---for one thing this would allow code * comments---but we can't figure a clean way to do it.) */ #define VSQBS_CONVERSION( conversion ) \ template static void inline \ vsqbs_ ## conversion( void* restrict pout, \ const VipsPel* restrict pin, \ const int bands, \ const int lskip, \ const double x_0, \ const double y_0 ) \ { \ T* restrict out = (T *) pout; \ \ const T* restrict in = (T *) pin; \ \ const int sign_of_x_0 = 2 * ( x_0 >= 0. ) - 1; \ const int sign_of_y_0 = 2 * ( y_0 >= 0. ) - 1; \ \ const int shift_forw_1_pix = sign_of_x_0 * bands; \ const int shift_forw_1_row = sign_of_y_0 * lskip; \ \ const int shift_back_1_pix = -shift_forw_1_pix; \ const int shift_back_1_row = -shift_forw_1_row; \ \ const int uno_two_shift = shift_back_1_row; \ const int uno_thr_shift = shift_forw_1_pix + shift_back_1_row; \ \ const int dos_one_shift = shift_back_1_pix; \ const int dos_two_shift = 0; \ const int dos_thr_shift = shift_forw_1_pix; \ \ const int tre_one_shift = shift_back_1_pix + shift_forw_1_row; \ const int tre_two_shift = shift_forw_1_row; \ const int tre_thr_shift = shift_forw_1_pix + shift_forw_1_row; \ \ \ const double twice_abs_x_0 = ( 2 * sign_of_x_0 ) * x_0; \ const double twice_abs_y_0 = ( 2 * sign_of_y_0 ) * y_0; \ const double x = twice_abs_x_0 + -0.5; \ const double y = twice_abs_y_0 + -0.5; \ const double cent = 0.75 - x * x; \ const double mid = 0.75 - y * y; \ const double left = -0.5 * ( x + cent ) + 0.5; \ const double top = -0.5 * ( y + mid ) + 0.5; \ const double left_p_cent = left + cent; \ const double top_p_mid = top + mid; \ const double cent_p_rite = 1.0 - left; \ const double mid_p_bot = 1.0 - top; \ const double rite = 1.0 - left_p_cent; \ const double bot = 1.0 - top_p_mid; \ \ const double four_c_uno_two = left_p_cent * top; \ const double four_c_dos_one = left * top_p_mid; \ const double four_c_dos_two = left_p_cent + top_p_mid; \ const double four_c_dos_thr = cent_p_rite * top_p_mid + rite; \ const double four_c_tre_two = mid_p_bot * left_p_cent + bot; \ const double four_c_tre_thr = mid_p_bot * rite + cent_p_rite * bot; \ const double four_c_uno_thr = top - four_c_uno_two; \ const double four_c_tre_one = left - four_c_dos_one; \ \ \ int band = bands; \ \ do \ { \ const double double_result = \ ( \ ( \ ( \ four_c_uno_two * in[uno_two_shift] \ + \ four_c_dos_one * in[dos_one_shift] \ ) \ + \ ( \ four_c_dos_two * in[dos_two_shift] \ + \ four_c_dos_thr * in[dos_thr_shift] \ ) \ ) \ + \ ( \ ( \ four_c_tre_two * in[tre_two_shift] \ + \ four_c_tre_thr * in[tre_thr_shift] \ ) \ + \ ( \ four_c_uno_thr * in[uno_thr_shift] \ + \ four_c_tre_one * in[tre_one_shift] \ ) \ ) \ ) * 0.25; \ \ const T result = to_ ## conversion( double_result ); \ in++; \ *out++ = result; \ \ } while (--band); \ } VSQBS_CONVERSION( fptypes ) VSQBS_CONVERSION( withsign ) VSQBS_CONVERSION( nosign ) #define CALL( T, conversion ) \ vsqbs_ ## conversion( out, \ p, \ bands, \ lskip, \ relative_x, \ relative_y ); /* * We need C linkage: */ extern "C" { G_DEFINE_TYPE( VipsInterpolateVsqbs, vips_interpolate_vsqbs, VIPS_TYPE_INTERPOLATE ); } static void vips_interpolate_vsqbs_interpolate( VipsInterpolate* restrict interpolate, void* restrict out, REGION* restrict in, double absolute_x, double absolute_y ) { /* absolute_x and absolute_y are always >= 1.0 (see double-check assert * below), so we don't need floor(). * * It's 1 not 0 since we ask for a window_offset of 1 at the bottom. */ const int ix = (int) (absolute_x + 0.5); const int iy = (int) (absolute_y + 0.5); /* * Move the pointer to (the first band of) the top/left pixel of the * 2x2 group of pixel centers which contains the sampling location * in its convex hull: */ const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy ); const double relative_x = absolute_x - ix; const double relative_y = absolute_y - iy; /* * VIPS versions of Nicolas's pixel addressing values. */ const int lskip = VIPS_REGION_LSKIP( in ) / VIPS_IMAGE_SIZEOF_ELEMENT( in->im ); /* * Double the bands for complex images to account for the real and * imaginary parts being computed independently: */ const int actual_bands = in->im->Bands; const int bands = vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands; /* Confirm that absolute_x and absolute_y are >= 1, see above. */ g_assert( absolute_x >= 1.0 ); g_assert( absolute_y >= 1.0 ); switch( in->im->BandFmt ) { case VIPS_FORMAT_UCHAR: CALL( unsigned char, nosign ); break; case VIPS_FORMAT_CHAR: CALL( signed char, withsign ); break; case VIPS_FORMAT_USHORT: CALL( unsigned short, nosign ); break; case VIPS_FORMAT_SHORT: CALL( signed short, withsign ); break; case VIPS_FORMAT_UINT: CALL( unsigned int, nosign ); break; case VIPS_FORMAT_INT: CALL( signed int, withsign ); break; /* * Complex images are handled by doubling bands: */ case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_COMPLEX: CALL( float, fptypes ); break; case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DPCOMPLEX: CALL( double, fptypes ); break; default: g_assert( 0 ); break; } } static void vips_interpolate_vsqbs_class_init( VipsInterpolateVsqbsClass *klass ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass ); VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( klass ); object_class->nickname = "vsqbs"; object_class->description = _( "B-Splines with antialiasing smoothing" ); interpolate_class->interpolate = vips_interpolate_vsqbs_interpolate; interpolate_class->window_size = 3; interpolate_class->window_offset = 1; } static void vips_interpolate_vsqbs_init( VipsInterpolateVsqbs *vsqbs ) { } vips-7.38.5/libvips/resample/presample.h0000644000175000017500000000366312303140253015142 00000000000000/* base class for all resample operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PRESAMPLE_H #define VIPS_PRESAMPLE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_TYPE_RESAMPLE (vips_resample_get_type()) #define VIPS_RESAMPLE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_RESAMPLE, VipsResample )) #define VIPS_RESAMPLE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_RESAMPLE, VipsResampleClass)) #define VIPS_IS_RESAMPLE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_RESAMPLE )) #define VIPS_IS_RESAMPLE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_RESAMPLE )) #define VIPS_RESAMPLE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_RESAMPLE, VipsResampleClass )) typedef struct _VipsResample { VipsOperation parent_instance; VipsImage *in; VipsImage *out; } VipsResample; typedef struct _VipsResampleClass { VipsOperationClass parent_class; } VipsResampleClass; GType vips_resample_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PRESAMPLE_H*/ vips-7.38.5/libvips/resample/templates.h0000644000175000017500000001547012303140253015147 00000000000000/* various interpolation templates */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* * FAST_PSEUDO_FLOOR is a floor and floorf replacement which has been * found to be faster on several linux boxes than the library * version. It returns the floor of its argument unless the argument * is a negative integer, in which case it returns one less than the * floor. For example: * * FAST_PSEUDO_FLOOR(0.5) = 0 * * FAST_PSEUDO_FLOOR(0.) = 0 * * FAST_PSEUDO_FLOOR(-.5) = -1 * * as expected, but * * FAST_PSEUDO_FLOOR(-1.) = -2 * * The locations of the discontinuities of FAST_PSEUDO_FLOOR are the * same as floor and floorf; it is just that at negative integers the * function is discontinuous on the right instead of the left. */ #define FAST_PSEUDO_FLOOR(x) ( (int)(x) - ( (x) < 0. ) ) /* * Various casts which assume that the data is already in range. (That * is, they are to be used with monotone samplers.) */ template static T inline to_fptypes( const double val ) { const T newval = val; return( newval ); } template static T inline to_withsign( const double val ) { const int sign_of_val = 2 * ( val >= 0. ) - 1; const int rounded_abs_val = .5 + sign_of_val * val; const T newval = sign_of_val * rounded_abs_val; return( newval ); } template static T inline to_nosign( const double val ) { const T newval = .5 + val; return( newval ); } /* * Various bilinear implementation templates. Note that no clampling * is used: There is an assumption that the data is such that * over/underflow is not an issue: */ /* * Bilinear interpolation for float and double types. The first four * inputs are weights, the last four are the corresponding pixel * values: */ template static T inline bilinear_fptypes( const double w_times_z, const double x_times_z, const double w_times_y, const double x_times_y, const double tre_thr, const double tre_thrfou, const double trequa_thr, const double trequa_thrfou ) { const T newval = w_times_z * tre_thr + x_times_z * tre_thrfou + w_times_y * trequa_thr + x_times_y * trequa_thrfou; return( newval ); } /* * Bilinear interpolation for signed integer types: */ template static T inline bilinear_withsign( const double w_times_z, const double x_times_z, const double w_times_y, const double x_times_y, const double tre_thr, const double tre_thrfou, const double trequa_thr, const double trequa_thrfou ) { const double val = w_times_z * tre_thr + x_times_z * tre_thrfou + w_times_y * trequa_thr + x_times_y * trequa_thrfou; const int sign_of_val = 2 * ( val >= 0. ) - 1; const int rounded_abs_val = .5 + sign_of_val * val; const T newval = sign_of_val * rounded_abs_val; return( newval ); } /* * Bilinear Interpolation for unsigned integer types: */ template static T inline bilinear_nosign( const double w_times_z, const double x_times_z, const double w_times_y, const double x_times_y, const double tre_thr, const double tre_thrfou, const double trequa_thr, const double trequa_thrfou ) { const T newval = w_times_z * tre_thr + x_times_z * tre_thrfou + w_times_y * trequa_thr + x_times_y * trequa_thrfou + 0.5; return( newval ); } /* * Bicubic (Catmull-Rom) interpolation templates: */ /* Fixed-point integer bicubic, used for 8 and 16-bit types. */ template static int inline bicubic_int( const T uno_one, const T uno_two, const T uno_thr, const T uno_fou, const T dos_one, const T dos_two, const T dos_thr, const T dos_fou, const T tre_one, const T tre_two, const T tre_thr, const T tre_fou, const T qua_one, const T qua_two, const T qua_thr, const T qua_fou, const int* restrict cx, const int* restrict cy ) { const int r0 = (cx[0] * uno_one + cx[1] * uno_two + cx[2] * uno_thr + cx[3] * uno_fou) >> VIPS_INTERPOLATE_SHIFT; const int r1 = (cx[0] * dos_one + cx[1] * dos_two + cx[2] * dos_thr + cx[3] * dos_fou) >> VIPS_INTERPOLATE_SHIFT; const int r2 = (cx[0] * tre_one + cx[1] * tre_two + cx[2] * tre_thr + cx[3] * tre_fou) >> VIPS_INTERPOLATE_SHIFT; const int r3 = (cx[0] * qua_one + cx[1] * qua_two + cx[2] * qua_thr + cx[3] * qua_fou) >> VIPS_INTERPOLATE_SHIFT; return( (cy[0] * r0 + cy[1] * r1 + cy[2] * r2 + cy[3] * r3) >> VIPS_INTERPOLATE_SHIFT ); } /* Floating-point bicubic, used for int/float/double types. */ template static T inline bicubic_float( const T uno_one, const T uno_two, const T uno_thr, const T uno_fou, const T dos_one, const T dos_two, const T dos_thr, const T dos_fou, const T tre_one, const T tre_two, const T tre_thr, const T tre_fou, const T qua_one, const T qua_two, const T qua_thr, const T qua_fou, const double* restrict cx, const double* restrict cy ) { return( cy[0] * (cx[0] * uno_one + cx[1] * uno_two + cx[2] * uno_thr + cx[3] * uno_fou) + cy[1] * (cx[0] * dos_one + cx[1] * dos_two + cx[2] * dos_thr + cx[3] * dos_fou) + cy[2] * (cx[0] * tre_one + cx[1] * tre_two + cx[2] * tre_thr + cx[3] * tre_fou) + cy[3] * (cx[0] * qua_one + cx[1] * qua_two + cx[2] * qua_thr + cx[3] * qua_fou) ); } /* Given an offset in [0,1] (we can have x == 1 when building tables), * calculate c0, c1, c2, c3, the catmull-rom coefficients. This is called * from the interpolator as well as from the table builder. */ static void inline calculate_coefficients_catmull( const double x, double c[4] ) { /* Nicolas believes that the following is an hitherto unknown * hyper-efficient method of computing Catmull-Rom coefficients. It * only uses 4* & 1+ & 5- for a total of only 10 flops to compute * four coefficients. */ const double cr1 = 1. - x; const double cr2 = -.5 * x; const double cr3 = cr1 * cr2; const double cone = cr1 * cr3; const double cfou = x * cr3; const double cr4 = cfou - cone; const double ctwo = cr1 - cone + cr4; const double cthr = x - cfou - cr4; g_assert( x >= 0. && x <= 1. ); c[0] = cone; c[3] = cfou; c[1] = ctwo; c[2] = cthr; } vips-7.38.5/libvips/resample/shrink.c0000644000175000017500000002674412303141142014446 00000000000000/* shrink with a box filter * * Copyright: 1990, N. Dessipris. * * Authors: Nicos Dessipris and Kirk Martinez * Written on: 29/04/1991 * Modified on: 2/11/92, 22/2/93 Kirk Martinez - Xres Yres & cleanup incredibly inefficient for box filters as LUTs are used instead of + Needs converting to a smoother filter: eg Gaussian! KM * 15/7/93 JC * - rewritten for partial v2 * - ANSIfied * - now shrinks any non-complex type * - no longer cloned from im_convsub() * - could be much better! see km comments above * 3/8/93 JC * - rounding bug fixed * 11/1/94 JC * - problems with .000001 and round up/down ignored! Try shrink 3738 * pixel image by 9.345000000001 * 7/10/94 JC * - IM_NEW and IM_ARRAY added * - more typedef * 3/7/95 JC * - IM_CODING_LABQ handling added here * 20/12/08 * - fall back to im_copy() for 1/1 shrink * 2/2/11 * - gtk-doc * 10/2/12 * - shrink in chunks to reduce peak memuse for large shrinks * - simpler * 12/6/12 * - redone as a class * - warn about non-int shrinks * - some tuning .. tried an int coordinate path, not worthwhile * 16/11/12 * - don't change xres/yres, see comment below * 8/4/13 * - oops demand_hint was incorrect, thanks Jan * 6/6/13 * - don't chunk horizontally, fixes seq problems with large shrink * factors */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "presample.h" typedef struct _VipsShrink { VipsResample parent_instance; double xshrink; /* Shrink factors */ double yshrink; int mw; /* Size of area we average */ int mh; int np; /* Number of pels we average */ } VipsShrink; typedef VipsResampleClass VipsShrinkClass; G_DEFINE_TYPE( VipsShrink, vips_shrink, VIPS_TYPE_RESAMPLE ); /* Our per-sequence parameter struct. Somewhere to sum band elements. */ typedef struct { VipsRegion *ir; VipsPel *sum; } VipsShrinkSequence; /* Free a sequence value. */ static int vips_shrink_stop( void *vseq, void *a, void *b ) { VipsShrinkSequence *seq = (VipsShrinkSequence *) vseq; VIPS_FREEF( g_object_unref, seq->ir ); return( 0 ); } /* Make a sequence value. */ static void * vips_shrink_start( VipsImage *out, void *a, void *b ) { VipsImage *in = (VipsImage *) a; VipsShrink *shrink = (VipsShrink *) b; VipsShrinkSequence *seq; if( !(seq = IM_NEW( out, VipsShrinkSequence )) ) return( NULL ); seq->ir = vips_region_new( in ); if( !(seq->sum = (VipsPel *) VIPS_ARRAY( out, in->Bands, double )) ) { vips_shrink_stop( seq, in, shrink ); return( NULL ); } return( (void *) seq ); } /* Integer shrink. */ #define ISHRINK( TYPE ) { \ int *sum = (int *) seq->sum; \ TYPE *p = (TYPE *) in; \ TYPE *q = (TYPE *) out; \ \ for( b = 0; b < bands; b++ ) \ sum[b] = 0; \ \ for( y1 = 0; y1 < shrink->mh; y1++ ) { \ for( i = 0, x1 = 0; x1 < shrink->mw; x1++ ) \ for( b = 0; b < bands; b++, i++ ) \ sum[b] += p[i]; \ \ p += ls; \ } \ \ for( b = 0; b < bands; b++ ) \ q[b] = (sum[b] + shrink->np / 2) / shrink->np; \ } /* Float shrink. */ #define FSHRINK( TYPE ) { \ double *sum = (double *) seq->sum; \ TYPE *p = (TYPE *) in; \ TYPE *q = (TYPE *) out; \ \ for( b = 0; b < bands; b++ ) \ sum[b] = 0.0; \ \ for( y1 = 0; y1 < shrink->mh; y1++ ) { \ for( i = 0, x1 = 0; x1 < shrink->mw; x1++ ) \ for( b = 0; b < bands; b++, i++ ) \ sum[b] += p[i]; \ \ p += ls; \ } \ \ for( b = 0; b < bands; b++ ) \ q[b] = sum[b] / shrink->np; \ } /* Generate an area of @or. @ir is large enough. */ static void vips_shrink_gen2( VipsShrink *shrink, VipsShrinkSequence *seq, VipsRegion *or, VipsRegion *ir, int left, int top, int width, int height ) { VipsResample *resample = VIPS_RESAMPLE( shrink ); const int bands = resample->in->Bands; const int sizeof_pixel = VIPS_IMAGE_SIZEOF_PEL( resample->in ); const int ls = VIPS_REGION_LSKIP( ir ) / VIPS_IMAGE_SIZEOF_ELEMENT( resample->in ); int x, y, i; int x1, y1, b; for( y = 0; y < height; y++ ) { VipsPel *out = VIPS_REGION_ADDR( or, left, top + y ); for( x = 0; x < width; x++ ) { int ix = (left + x) * shrink->xshrink; int iy = (top + y) * shrink->yshrink; VipsPel *in = VIPS_REGION_ADDR( ir, ix, iy ); switch( resample->in->BandFmt ) { case VIPS_FORMAT_UCHAR: ISHRINK( unsigned char ); break; case VIPS_FORMAT_CHAR: ISHRINK( char ); break; case VIPS_FORMAT_USHORT: ISHRINK( unsigned short ); break; case VIPS_FORMAT_SHORT: ISHRINK( short ); break; case VIPS_FORMAT_UINT: ISHRINK( unsigned int ); break; case VIPS_FORMAT_INT: ISHRINK( int ); break; case VIPS_FORMAT_FLOAT: FSHRINK( float ); break; case VIPS_FORMAT_DOUBLE: FSHRINK( double ); break; default: g_assert( 0 ); } out += sizeof_pixel; } } } static int vips_shrink_gen( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsShrinkSequence *seq = (VipsShrinkSequence *) vseq; VipsShrink *shrink = (VipsShrink *) b; VipsRegion *ir = seq->ir; VipsRect *r = &or->valid; /* How do we chunk up the image? We don't want to prepare the whole of * the input region corresponding to *r since it could be huge. * * Each pixel of *r will depend on roughly mw x mh * pixels, so we walk *r in chunks which map to the tile size. * * Make sure we can't ask for a zero step. * * We don't chunk horizontally. We want "vips shrink x.jpg b.jpg 100 * 100" to run sequentially. If we chunk horizontally, we will fetch * 100x100 lines from the top of the image, then 100x100 100 lines * down, etc. for each thread, then when they've finished, fetch * 100x100, 100 pixels across from the top of the image. This will * break sequentiality. */ int ystep = shrink->mh > VIPS__TILE_HEIGHT ? 1 : VIPS__TILE_HEIGHT / shrink->mh; int y; #ifdef DEBUG printf( "vips_shrink_gen: generating %d x %d at %d x %d\n", r->width, r->height, r->left, r->top ); #endif /*DEBUG*/ for( y = 0; y < r->height; y += ystep ) { /* Clip the this rect against the demand size. */ int height = VIPS_MIN( ystep, r->height - y ); VipsRect s; s.left = r->left * shrink->xshrink; s.top = (r->top + y) * shrink->yshrink; s.width = ceil( r->width * shrink->xshrink ); s.height = ceil( height * shrink->yshrink ); #ifdef DEBUG printf( "shrink_gen: requesting %d x %d at %d x %d\n", s.width, s.height, s.left, s.top ); #endif /*DEBUG*/ if( vips_region_prepare( ir, &s ) ) return( -1 ); VIPS_GATE_START( "vips_shrink_gen: work" ); vips_shrink_gen2( shrink, seq, or, ir, r->left, r->top + y, r->width, height ); VIPS_GATE_STOP( "vips_shrink_gen: work" ); } return( 0 ); } static int vips_shrink_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsResample *resample = VIPS_RESAMPLE( object ); VipsShrink *shrink = (VipsShrink *) object; if( VIPS_OBJECT_CLASS( vips_shrink_parent_class )->build( object ) ) return( -1 ); shrink->mw = ceil( shrink->xshrink ); shrink->mh = ceil( shrink->yshrink ); shrink->np = shrink->mw * shrink->mh; if( vips_check_noncomplex( class->nickname, resample->in ) ) return( -1 ); if( shrink->xshrink < 1.0 || shrink->yshrink < 1.0 ) { vips_error( class->nickname, "%s", _( "shrink factors should be >= 1" ) ); return( -1 ); } if( (int) shrink->xshrink != shrink->xshrink || (int) shrink->yshrink != shrink->yshrink ) vips_warn( class->nickname, "%s", _( "not integer shrink factors, " "expect poor results" ) ); if( shrink->xshrink == 1.0 && shrink->yshrink == 1.0 ) return( vips_image_write( resample->in, resample->out ) ); /* THINSTRIP will work, anything else will break seq mode. If you * combine shrink with conv you'll need to use a line cache to maintain * sequentiality. */ if( vips_image_pipelinev( resample->out, VIPS_DEMAND_STYLE_THINSTRIP, resample->in, NULL ) ) return( -1 ); /* Size output. Note: we round the output width down! * * Don't change xres/yres, leave that to the application layer. For * example, vipsthumbnail knows the true shrink factor (including the * fractional part), we just see the integer part here. */ resample->out->Xsize = resample->in->Xsize / shrink->xshrink; resample->out->Ysize = resample->in->Ysize / shrink->yshrink; if( resample->out->Xsize <= 0 || resample->out->Ysize <= 0 ) { vips_error( class->nickname, "%s", _( "image has shrunk to nothing" ) ); return( -1 ); } #ifdef DEBUG printf( "vips_shrink_build: shrinking %d x %d image to %d x %d\n", resample->in->Xsize, resample->in->Ysize, resample->out->Xsize, resample->out->Ysize ); printf( "vips_shrink_build: %d x %d block average\n", shrink->mw, shrink->mh ); #endif /*DEBUG*/ if( vips_image_generate( resample->out, vips_shrink_start, vips_shrink_gen, vips_shrink_stop, resample->in, shrink ) ) return( -1 ); return( 0 ); } static void vips_shrink_class_init( VipsShrinkClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_shrink_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "shrink"; vobject_class->description = _( "shrink an image" ); vobject_class->build = vips_shrink_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL; VIPS_ARG_DOUBLE( class, "xshrink", 8, _( "Xshrink" ), _( "Horizontal shrink factor" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsShrink, xshrink ), 1.0, 1000000, 1 ); VIPS_ARG_DOUBLE( class, "yshrink", 9, _( "Yshrink" ), _( "Vertical shrink factor" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsShrink, yshrink ), 1.0, 1000000, 1 ); } static void vips_shrink_init( VipsShrink *shrink ) { } /** * vips_shrink: * @in: input image * @out: output image * @xshrink: horizontal shrink * @yshrink: vertical shrink * * Shrink @in by a pair of factors with a simple box filter. * * You will get aliasing for non-integer shrinks. In this case, shrink with * this function to the nearest integer size above the target shrink, then * downsample to the exact size with vips_affine() and your choice of * interpolator. * * See also: vips_affine(). * * Returns: 0 on success, -1 on error */ int vips_shrink( VipsImage *in, VipsImage **out, double xshrink, double yshrink, ... ) { va_list ap; int result; va_start( ap, yshrink ); result = vips_call_split( "shrink", ap, in, out, xshrink, yshrink ); va_end( ap ); return( result ); } vips-7.38.5/libvips/resample/bicubic.cpp0000644000175000017500000002721012303141142015075 00000000000000/* bicubic (catmull-rom) interpolator * * 12/8/10 * - revise window_size / window_offset stuff again */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Bicubic (Catmull-Rom) interpolator derived from Nicolas Robidoux's * original YAFR resampler with permission and thanks. */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "templates.h" #ifdef WITH_DMALLOC #include #endif /*WITH_DMALLOC*/ #define VIPS_TYPE_INTERPOLATE_BICUBIC \ (vips_interpolate_bicubic_get_type()) #define VIPS_INTERPOLATE_BICUBIC( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubic )) #define VIPS_INTERPOLATE_BICUBIC_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubicClass)) #define VIPS_IS_INTERPOLATE_BICUBIC( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_BICUBIC )) #define VIPS_IS_INTERPOLATE_BICUBIC_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_BICUBIC )) #define VIPS_INTERPOLATE_BICUBIC_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_INTERPOLATE_BICUBIC, VipsInterpolateBicubicClass )) typedef VipsInterpolate VipsInterpolateBicubic; typedef VipsInterpolateClass VipsInterpolateBicubicClass; /* Precalculated interpolation matrices. int (used for pel * sizes up to short), and double (for all others). We go to * scale + 1 so we can round-to-nearest safely. */ /* We could keep a large set of 2d 4x4 matricies, but this actually * works out slower since for many resizes the thing will no longer * fit in L1. */ static int vips_bicubic_matrixi[VIPS_TRANSFORM_SCALE + 1][4]; static double vips_bicubic_matrixf[VIPS_TRANSFORM_SCALE + 1][4]; /* We need C linkage for this. */ extern "C" { G_DEFINE_TYPE( VipsInterpolateBicubic, vips_interpolate_bicubic, VIPS_TYPE_INTERPOLATE ); } /* Pointers to write to / read from, number of bands, * how many bytes to add to move down a line. */ /* T is the type of pixels we are reading and writing. */ /* Fixed-point version, for 8 and 16-bit types. */ template static void inline bicubic_int_tab( void *pout, const VipsPel *pin, const int bands, const int lskip, const int *cx, const int *cy ) { T* restrict out = (T *) pout; const T* restrict in = (T *) pin; const int b1 = bands; const int b2 = b1 + b1; const int b3 = b1 + b2; const int l1 = lskip / sizeof( T ); const int l2 = l1 + l1; const int l3 = l1 + l2; const int l1_plus_b1 = l1 + b1; const int l1_plus_b2 = l1 + b2; const int l1_plus_b3 = l1 + b3; const int l2_plus_b1 = l2 + b1; const int l2_plus_b2 = l2 + b2; const int l2_plus_b3 = l2 + b3; const int l3_plus_b1 = l3 + b1; const int l3_plus_b2 = l3 + b2; const int l3_plus_b3 = l3 + b3; for( int z = 0; z < bands; z++ ) { const T uno_one = in[0]; const T uno_two = in[b1]; const T uno_thr = in[b2]; const T uno_fou = in[b3]; const T dos_one = in[l1]; const T dos_two = in[l1_plus_b1]; const T dos_thr = in[l1_plus_b2]; const T dos_fou = in[l1_plus_b3]; const T tre_one = in[l2]; const T tre_two = in[l2_plus_b1]; const T tre_thr = in[l2_plus_b2]; const T tre_fou = in[l2_plus_b3]; const T qua_one = in[l3]; const T qua_two = in[l3_plus_b1]; const T qua_thr = in[l3_plus_b2]; const T qua_fou = in[l3_plus_b3]; int bicubic = bicubic_int( uno_one, uno_two, uno_thr, uno_fou, dos_one, dos_two, dos_thr, dos_fou, tre_one, tre_two, tre_thr, tre_fou, qua_one, qua_two, qua_thr, qua_fou, cx, cy ); if( bicubic < min_value ) bicubic = min_value; else if( bicubic > max_value ) bicubic = max_value; out[z] = bicubic; in += 1; } } /* Floating-point version, for int/float types. */ template static void inline bicubic_float_tab( void *pout, const VipsPel *pin, const int bands, const int lskip, const double *cx, const double *cy ) { T* restrict out = (T *) pout; const T* restrict in = (T *) pin; const int b1 = bands; const int b2 = b1 + b1; const int b3 = b1 + b2; const int l1 = lskip / sizeof( T ); const int l2 = l1 + l1; const int l3 = l1 + l2; const int l1_plus_b1 = l1 + b1; const int l1_plus_b2 = l1 + b2; const int l1_plus_b3 = l1 + b3; const int l2_plus_b1 = l2 + b1; const int l2_plus_b2 = l2 + b2; const int l2_plus_b3 = l2 + b3; const int l3_plus_b1 = l3 + b1; const int l3_plus_b2 = l3 + b2; const int l3_plus_b3 = l3 + b3; for( int z = 0; z < bands; z++ ) { const T uno_one = in[0]; const T uno_two = in[b1]; const T uno_thr = in[b2]; const T uno_fou = in[b3]; const T dos_one = in[l1]; const T dos_two = in[l1_plus_b1]; const T dos_thr = in[l1_plus_b2]; const T dos_fou = in[l1_plus_b3]; const T tre_one = in[l2]; const T tre_two = in[l2_plus_b1]; const T tre_thr = in[l2_plus_b2]; const T tre_fou = in[l2_plus_b3]; const T qua_one = in[l3]; const T qua_two = in[l3_plus_b1]; const T qua_thr = in[l3_plus_b2]; const T qua_fou = in[l3_plus_b3]; const T bicubic = bicubic_float( uno_one, uno_two, uno_thr, uno_fou, dos_one, dos_two, dos_thr, dos_fou, tre_one, tre_two, tre_thr, tre_fou, qua_one, qua_two, qua_thr, qua_fou, cx, cy ); out[z] = bicubic; in += 1; } } /* Ultra-high-quality version for double images. */ template static void inline bicubic_notab( void *pout, const VipsPel *pin, const int bands, const int lskip, double x, double y ) { T* restrict out = (T *) pout; const T* restrict in = (T *) pin; const int b1 = bands; const int b2 = b1 + b1; const int b3 = b1 + b2; const int l1 = lskip / sizeof( T ); const int l2 = l1 + l1; const int l3 = l1 + l2; const int l1_plus_b1 = l1 + b1; const int l1_plus_b2 = l1 + b2; const int l1_plus_b3 = l1 + b3; const int l2_plus_b1 = l2 + b1; const int l2_plus_b2 = l2 + b2; const int l2_plus_b3 = l2 + b3; const int l3_plus_b1 = l3 + b1; const int l3_plus_b2 = l3 + b2; const int l3_plus_b3 = l3 + b3; double cx[4]; double cy[4]; calculate_coefficients_catmull( x, cx ); calculate_coefficients_catmull( y, cy ); for( int z = 0; z < bands; z++ ) { const T uno_one = in[0]; const T uno_two = in[b1]; const T uno_thr = in[b2]; const T uno_fou = in[b3]; const T dos_one = in[l1]; const T dos_two = in[l1_plus_b1]; const T dos_thr = in[l1_plus_b2]; const T dos_fou = in[l1_plus_b3]; const T tre_one = in[l2]; const T tre_two = in[l2_plus_b1]; const T tre_thr = in[l2_plus_b2]; const T tre_fou = in[l2_plus_b3]; const T qua_one = in[l3]; const T qua_two = in[l3_plus_b1]; const T qua_thr = in[l3_plus_b2]; const T qua_fou = in[l3_plus_b3]; const T bicubic = bicubic_float( uno_one, uno_two, uno_thr, uno_fou, dos_one, dos_two, dos_thr, dos_fou, tre_one, tre_two, tre_thr, tre_fou, qua_one, qua_two, qua_thr, qua_fou, cx, cy ); out[z] = bicubic; in += 1; } } static void vips_interpolate_bicubic_interpolate( VipsInterpolate *interpolate, void *out, VipsRegion *in, double x, double y ) { /* Find the mask index. We round-to-nearest, so we need to generate * indexes in 0 to VIPS_TRANSFORM_SCALE, 2^n + 1 values. We multiply * by 2 more than we need to, add one, mask, then shift down again to * get the extra range. */ const int sx = x * VIPS_TRANSFORM_SCALE * 2; const int sy = y * VIPS_TRANSFORM_SCALE * 2; const int six = sx & (VIPS_TRANSFORM_SCALE * 2 - 1); const int siy = sy & (VIPS_TRANSFORM_SCALE * 2 - 1); const int tx = (six + 1) >> 1; const int ty = (siy + 1) >> 1; /* We know x/y are always positive, so we can just (int) them. */ const int ix = (int) x; const int iy = (int) y; /* Back and up one to get the top-left of the 4x4. */ const VipsPel *p = VIPS_REGION_ADDR( in, ix - 1, iy - 1 ); /* Look up the tables we need. */ const int *cxi = vips_bicubic_matrixi[tx]; const int *cyi = vips_bicubic_matrixi[ty]; const double *cxf = vips_bicubic_matrixf[tx]; const double *cyf = vips_bicubic_matrixf[ty]; /* Pel size and line size. */ const int bands = in->im->Bands; const int lskip = VIPS_REGION_LSKIP( in ); #ifdef DEBUG printf( "vips_interpolate_bicubic_interpolate: %g %g\n", x, y ); printf( "\tleft=%d, top=%d, width=%d, height=%d\n", ix - 1, iy - 1, 4, 4 ); printf( "\tmaskx=%d, masky=%d\n", tx, ty ); #endif /*DEBUG*/ switch( in->im->BandFmt ) { case VIPS_FORMAT_UCHAR: bicubic_int_tab( out, p, bands, lskip, cxi, cyi ); /* Handy for benchmarking bicubic_float_tab( out, p, bands, lskip, cxf, cyf ); bicubic_notab( out, p, bands, lskip, x - ix, y - iy ); */ break; case VIPS_FORMAT_CHAR: bicubic_int_tab( out, p, bands, lskip, cxi, cyi ); break; case VIPS_FORMAT_USHORT: bicubic_int_tab( out, p, bands, lskip, cxi, cyi ); break; case VIPS_FORMAT_SHORT: bicubic_int_tab( out, p, bands, lskip, cxi, cyi ); break; case VIPS_FORMAT_UINT: bicubic_float_tab( out, p, bands, lskip, cxf, cyf ); break; case VIPS_FORMAT_INT: bicubic_float_tab( out, p, bands, lskip, cxf, cyf ); break; case VIPS_FORMAT_FLOAT: bicubic_float_tab( out, p, bands, lskip, cxf, cyf ); break; case VIPS_FORMAT_DOUBLE: bicubic_notab( out, p, bands, lskip, x - ix, y - iy ); break; case VIPS_FORMAT_COMPLEX: bicubic_float_tab( out, p, bands * 2, lskip, cxf, cyf ); break; case VIPS_FORMAT_DPCOMPLEX: bicubic_notab( out, p, bands * 2, lskip, x - ix, y - iy ); break; default: break; } } static void vips_interpolate_bicubic_class_init( VipsInterpolateBicubicClass *iclass ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( iclass ); VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( iclass ); object_class->nickname = "bicubic"; object_class->description = _( "Bicubic interpolation (Catmull-Rom)" ); interpolate_class->interpolate = vips_interpolate_bicubic_interpolate; interpolate_class->window_size = 4; /* Build the tables of pre-computed coefficients. */ for( int x = 0; x < VIPS_TRANSFORM_SCALE + 1; x++ ) { calculate_coefficients_catmull( (float) x / VIPS_TRANSFORM_SCALE, vips_bicubic_matrixf[x] ); for( int i = 0; i < 4; i++ ) vips_bicubic_matrixi[x][i] = vips_bicubic_matrixf[x][i] * VIPS_INTERPOLATE_SCALE; } } static void vips_interpolate_bicubic_init( VipsInterpolateBicubic *bicubic ) { #ifdef DEBUG printf( "vips_interpolate_bicubic_init: " ); vips_object_print( VIPS_OBJECT( bicubic ) ); #endif /*DEBUG*/ } vips-7.38.5/libvips/resample/quadratic.c0000644000175000017500000002066012303140253015116 00000000000000/* Resample an image with a quadratic transform. * * Original code from Reimar Lenz, * Adapted by Lars Raffelt for many bands, * VIPSified by JC ... other numeric types, partial output * * 7/11/12 * - rewritten again for vips8 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG #define DEBUG_GEOMETRY */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "presample.h" /* The transform we compute: x',y' = coordinates of srcim x,y = coordinates of dstim a .. l = coefficients x = x' + a : order 0 image shift only + b x' + c y' : order 1 + affine transf. + d x' y' : order 2 + bilinear transf. + e x' x' + f y' y' : order 3 + quadratic transf. y = y' + g + h y' + i x' + j y' x' + k y' y' + l x' x' input matrix: a g -- b h c i -- d j -- e k f l matrix height may be 1, 3, 4, 6 */ typedef struct _VipsQuadratic { VipsResample parent_instance; VipsImage *coeff; VipsInterpolate *interpolate; /* The coeff array argment, made into an in-memory double. */ VipsImage *mat; /* Transform order. */ int order; } VipsQuadratic; typedef VipsResampleClass VipsQuadraticClass; G_DEFINE_TYPE( VipsQuadratic, vips_quadratic, VIPS_TYPE_RESAMPLE ); static void vips_quadratic_dispose( GObject *gobject ) { VipsQuadratic *quadratic = (VipsQuadratic *) gobject; VIPS_UNREF( quadratic->mat ); G_OBJECT_CLASS( vips_quadratic_parent_class )->dispose( gobject ); } static int vips_quadratic_gen( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) vseq; VipsQuadratic *quadratic = (VipsQuadratic *) b; VipsResample *resample = VIPS_RESAMPLE( quadratic ); VipsInterpolateMethod interpolate_fn = vips_interpolate_get_method( quadratic->interpolate ); /* @in is the enlarged image (borders on, after vips_embed()). Use * @resample->in for the original, not-expanded image. */ const VipsImage *in = (VipsImage *) a; const int ps = VIPS_IMAGE_SIZEOF_PEL( in ); double *vec = VIPS_MATRIX( quadratic->mat, 0, 0 ); int clip_width = resample->in->Xsize; int clip_height = resample->in->Ysize; int xlow = or->valid.left; int ylow = or->valid.top; int xhigh = VIPS_RECT_RIGHT( &or->valid ); int yhigh = VIPS_RECT_BOTTOM( &or->valid ); VipsPel *q; int xo, yo; /* output coordinates, dstimage */ int z; double fxi, fyi; /* input coordinates */ double dx, dy; /* xo derivative of input coord. */ double ddx, ddy; /* 2nd xo derivative of input coord. */ VipsRect image; image.left = 0; image.top = 0; image.width = in->Xsize; image.height = in->Ysize; if( vips_region_image( ir, &image ) ) return( -1 ); for( yo = ylow; yo < yhigh; yo++ ) { fxi = 0.0; fyi = 0.0; dx = 0.0; dy = 0.0; ddx = 0.0; ddy = 0.0; switch( quadratic->order ) { case 3: fxi += vec[10] * yo * yo + vec[8] * xlow * xlow; fyi += vec[11] * yo * yo + vec[9] * xlow * xlow; dx += vec[8]; ddx += vec[8] * 2.0; dy += vec[9]; ddy += vec[9] * 2.0; case 2: fxi += vec[6] * xlow * yo; fyi += vec[7] * xlow * yo; dx += vec[6] * yo; dy += vec[7] * yo; case 1: fxi += vec[4] * yo + vec[2] * xlow; fyi += vec[5] * yo + vec[3] * xlow; dx += vec[2]; dy += vec[3]; case 0: fxi += vec[0]; fyi += vec[1]; break; default: g_assert( 0 ); return( -7 ); } printf( "dx = %g, dy = %g\n", dx, dy ); q = VIPS_REGION_ADDR( or, xlow, yo ); for( xo = xlow; xo < xhigh; xo++ ) { int xi, yi; xi = fxi; yi = fyi; /* Clipping! */ if( xi < 0 || yi < 0 || xi >= clip_width || yi >= clip_height ) { for( z = 0; z < ps; z++ ) q[z] = 0; } else interpolate_fn( quadratic->interpolate, q, ir, fxi, fyi ); q += ps; fxi += dx; fyi += dy; if( quadratic->order > 2 ) { dx += ddx; dy += ddy; } } } return( 0 ); } static int vips_quadratic_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsResample *resample = VIPS_RESAMPLE( object ); VipsQuadratic *quadratic = (VipsQuadratic *) object; VipsInterpolate *interpolate; int window_size; int window_offset; VipsImage *in; VipsImage *t; if( VIPS_OBJECT_CLASS( vips_quadratic_parent_class )->build( object ) ) return( -1 ); /* We have the whole of the input in memory, so we can generate any * output. */ if( vips_image_pipelinev( resample->out, VIPS_DEMAND_STYLE_ANY, resample->in, NULL ) ) return( -1 ); in = resample->in; if( vips_check_uncoded( class->nickname, in ) || vips_check_noncomplex( class->nickname, in ) || vips_check_matrix( class->nickname, quadratic->coeff, &quadratic->mat ) ) return( -1 ); if( quadratic->mat->Xsize != 2 ) { vips_error( class->nickname, "%s", _( "coefficient matrix must have width 2" ) ); return( -1 ); } switch( quadratic->mat->Ysize ) { case 1: quadratic->order = 0; break; case 3: quadratic->order = 1; break; case 4: quadratic->order = 2; break; case 6: quadratic->order = 3; break; default: vips_error( class->nickname, "%s", _( "coefficient matrix must have height " "1, 3, 4 or 6" ) ); return( -1 ); } if( !vips_object_argument_isset( object, "interpolator" ) ) quadratic->interpolate = vips_interpolate_new( "bilinear" ); interpolate = quadratic->interpolate; window_size = vips_interpolate_get_window_size( interpolate ); window_offset = vips_interpolate_get_window_offset( interpolate ); /* Enlarge the input image. */ if( vips_embed( in, &t, window_offset, window_offset, in->Xsize + window_size, in->Ysize + window_size, "extend", VIPS_EXTEND_COPY, NULL ) ) return( -1 ); vips_object_local( object, t ); in = t; /* We need random access to our input. */ if( vips_image_wio_input( in ) ) return( -1 ); if( vips_image_generate( resample->out, vips_start_one, vips_quadratic_gen, vips_stop_one, in, quadratic ) ) return( -1 ); return( 0 ); } static void vips_quadratic_class_init( VipsQuadraticClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_quadratic_class_init\n" ); gobject_class->dispose = vips_quadratic_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "quadratic"; vobject_class->description = _( "resample an image with a quadratic transform" ); vobject_class->build = vips_quadratic_build; VIPS_ARG_IMAGE( class, "coeff", 8, _( "Coeff" ), _( "Coefficient matrix" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsQuadratic, coeff ) ); VIPS_ARG_INTERPOLATE( class, "interpolate", 9, _( "Interpolate" ), _( "Interpolate values with this" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsQuadratic, interpolate ) ); } static void vips_quadratic_init( VipsQuadratic *quadratic ) { } /** * vips_quadratic: * @in: input image * @out: output image * @coeff: horizontal quadratic * * Optional arguments: * * @interpolate: use this interpolator (default bilinear) * * See also: im_affinei(). * * Returns: 0 on success, -1 on error */ int vips_quadratic( VipsImage *in, VipsImage **out, VipsImage *coeff, ... ) { va_list ap; int result; va_start( ap, coeff ); result = vips_call_split( "quadratic", ap, in, out, coeff ); va_end( ap ); return( result ); } vips-7.38.5/libvips/resample/lbb.cpp0000644000175000017500000010170512303141142014236 00000000000000/* lbb (locally bounded bicubic) resampler * * N. Robidoux, C. Racette and J. Cupitt, 23-28/03/2010 * * N. Robidoux, 16-19/05/2010 * * N. Robidoux, 22/11/2011 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* * 2010 (c) Nicolas Robidoux, Chantal Racette, John Cupitt. * * N. Robidoux thanks Adam Turcotte, Geert Jordaens, Ralf Meyer, * Øyvind Kolås, Minglun Gong, Eric Daoust and Sven Neumann for useful * comments and code. * * C. Racette's image resampling research and programming funded in * part by an NSERC (National Science and Engineering Research Council * of Canada) Alexander Graham Bell Canada Graduate Scholarship, by an * NSERC Discovery Grant awarded to Julien Dompierre (grant number * 20-61098) and by N. Robidoux's Laurentian University professional * allowance. */ /* * LBB has two versions: * * A "soft" version, which shows a little less staircasing and a * little more haloing, and which is a little more expensive to * compute. We recommend this as the default. * * A "sharp" version, which shows a little more staircasing and a * little less haloing, which is a little cheaper (it uses 6 less * comparisons and 12 less "? :"). * * The only difference between the two is that the "soft" versions * uses local minima and maxima computed over 3x3 square blocks, and * the "sharp" version uses local minima and maxima computed over 3x3 * crosses. * * If you want to use the "sharp" version, comment out the following * three pre-processor code lines: */ /* #ifndef __LBB_CHEAP_H__ #define __LBB_CHEAP_H__ #endif */ /* * LBB (Locally Bounded Bicubic) is a high quality nonlinear variant * of Catmull-Rom. Images resampled with LBB have much smaller halos * than images resampled with windowed sincs or other interpolatory * cubic spline filters. Specifically, LBB halos are narrower and the * over/undershoot amplitude is smaller. This is accomplished without * significantly affecting the smoothness of the result (compared to * Catmull-Rom). * * Another important property is that the resampled values are * contained within the range of nearby input values. Consequently, no * final clamping is needed to stay "in range" (e.g., 0-255 for * standard 8-bit images). * * LBB was developed by N. Robidoux and C. Racette at the Department * of Mathematics and Computer Science of Laurentian University in the * course of C. Racette's Masters thesis in Computational * Sciences. Preliminary work directly leading to the LBB method and * code was performed by C. Racette and N. Robidoux in the course of * her honours thesis, and by N. Robidoux, A. Turcotte and E. Daoust * during Google Summer of Code 2009 (through two awards made to GIMP * to improve GEGL). * * LBB is a novel method with the following properties: * * --LBB is a Hermite bicubic method: The bicubic surface is defined, * one convex hull of four nearby input points at a time, using four * point values, four x-derivatives, four y-derivatives, and four * cross-derivatives. * * --The stencil for values in a square patch is the usual 4x4. * * --LBB is interpolatory. * * --It is C^1 with continuous cross derivatives. * * --When the limiters are inactive, LBB gives the same result as * Catmull-Rom. * * --When used on binary images, LBB gives results similar to bicubic * Hermite with all first derivatives---but not necessarily the * cross derivatives (this last assertion needs to be double * checked)--at input pixel locations set to zero. * * --The LBB reconstruction is locally bounded: Over each square * patch, the surface is contained between the minimum and the * maximum of the 16 nearest input pixel values. * * --Consequently, the LBB reconstruction is globally bounded between * the very smallest input pixel value and the very largest input * pixel value. It is not necessary to clamp results. * * The LBB method is based on the method of Ken Brodlie, Petros * Mashwama and Sohail Butt for constraining Hermite interpolants * between globally defined planes: * * Visualization of surface data to preserve positivity and other * simple constraints. Computer & Graphics, Vol. 19, Number 4, pages * 585-594, 1995. DOI: 10.1016/0097-8493(95)00036-C. * * Instead of forcing the reconstructed surface to lie between two * GLOBALLY defined planes, LBB constrains one patch at a time to lie * between LOCALLY defined planes. This is accomplished by * constraining the derivatives (x, y and cross) at each input pixel * location so that if the constraint was applied everywhere the * surface would fit between the min and max of the values at the 9 * closest pixel locations. Because this is done with each of the four * pixel locations which define the bicubic patch, this forces the * reconstructed surface to lie between the min and max of the values * at the 16 closest values pixel locations. (Each corner defines its * own 3x3 subgroup of the 4x4 stencil. Consequently, the surface is * necessarily above the minimum of the four minima, which happens to * be the minimum over the 4x4. Similarly with the maxima.) * * The above paragraph described the "soft" version of LBB. The * "sharp" version is similar. */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "templates.h" #define VIPS_TYPE_INTERPOLATE_LBB \ (vips_interpolate_lbb_get_type()) #define VIPS_INTERPOLATE_LBB( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbb )) #define VIPS_INTERPOLATE_LBB_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbbClass)) #define VIPS_IS_INTERPOLATE_LBB( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_LBB )) #define VIPS_IS_INTERPOLATE_LBB_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_LBB )) #define VIPS_INTERPOLATE_LBB_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_INTERPOLATE_LBB, VipsInterpolateLbbClass )) typedef struct _VipsInterpolateLbb { VipsInterpolate parent_object; } VipsInterpolateLbb; typedef struct _VipsInterpolateLbbClass { VipsInterpolateClass parent_class; } VipsInterpolateLbbClass; /* * Absolute value and sign macros: */ #define LBB_ABS(x) ( ((x)>=0.) ? (x) : -(x) ) #define LBB_SIGN(x) ( ((x)>=0.) ? 1.0 : -1.0 ) /* * MIN and MAX macros set up so that I can put the likely winner in * the first argument (forward branch likely blah blah blah): */ #define LBB_MIN(x,y) ( ((x)<=(y)) ? (x) : (y) ) #define LBB_MAX(x,y) ( ((x)>=(y)) ? (x) : (y) ) static inline double lbbicubic( const double c00, const double c10, const double c01, const double c11, const double c00dx, const double c10dx, const double c01dx, const double c11dx, const double c00dy, const double c10dy, const double c01dy, const double c11dy, const double c00dxdy, const double c10dxdy, const double c01dxdy, const double c11dxdy, const double uno_one, const double uno_two, const double uno_thr, const double uno_fou, const double dos_one, const double dos_two, const double dos_thr, const double dos_fou, const double tre_one, const double tre_two, const double tre_thr, const double tre_fou, const double qua_one, const double qua_two, const double qua_thr, const double qua_fou ) { /* * STENCIL (FOOTPRINT) OF INPUT VALUES: * * The stencil of LBB is the same as for any standard Hermite * bicubic (e.g., Catmull-Rom): * * (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1) * = uno_one = uno_two = uno_thr = uno_fou * * (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy) * = dos_one = dos_two = dos_thr = dos_fou * X * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1) * = tre_one = tre_two = tre_thr = tre_fou * * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2) (ix+2,iy+2) * = qua_one = qua_two = qua_thr = qua_fou * * where ix is the (pseudo-)floor of the requested left-to-right * location ("X"), and iy is the floor of the requested up-to-down * location. */ #if defined (__LBB_CHEAP_H__) /* * Computation of the four min and four max over 3x3 input data * sub-crosses of the 4x4 input stencil, performed with only 22 * comparisons and 28 "? :". If you can figure out how to do this * more efficiently, let us know. * * This is the cheaper (but arguably less desirable in terms of * quality) version of the computation. */ const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ; const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ; const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ; const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ; const double m3 = (uno_two <= dos_one) ? uno_two : dos_one ; const double M3 = (uno_two <= dos_one) ? dos_one : uno_two ; const double m4 = (uno_thr <= dos_fou) ? uno_thr : dos_fou ; const double M4 = (uno_thr <= dos_fou) ? dos_fou : uno_thr ; const double m5 = (tre_one <= qua_two) ? tre_one : qua_two ; const double M5 = (tre_one <= qua_two) ? qua_two : tre_one ; const double m6 = (tre_fou <= qua_thr) ? tre_fou : qua_thr ; const double M6 = (tre_fou <= qua_thr) ? qua_thr : tre_fou ; const double m7 = LBB_MIN( m1, tre_two ); const double M7 = LBB_MAX( M1, tre_two ); const double m8 = LBB_MIN( m1, tre_thr ); const double M8 = LBB_MAX( M1, tre_thr ); const double m9 = LBB_MIN( m2, dos_two ); const double M9 = LBB_MAX( M2, dos_two ); const double m10 = LBB_MIN( m2, dos_thr ); const double M10 = LBB_MAX( M2, dos_thr ); const double min00 = LBB_MIN( m7, m3 ); const double max00 = LBB_MAX( M7, M3 ); const double min10 = LBB_MIN( m8, m4 ); const double max10 = LBB_MAX( M8, M4 ); const double min01 = LBB_MIN( m9, m5 ); const double max01 = LBB_MAX( M9, M5 ); const double min11 = LBB_MIN( m10, m6 ); const double max11 = LBB_MAX( M10, M6 ); #else /* * Computation of the four min and four max over 3x3 input data * sub-blocks of the 4x4 input stencil, performed with only 28 * comparisons and 34 "? :". If you can figure how to do this more * efficiently, let us know. */ const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ; const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ; const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ; const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ; const double m6 = (dos_one <= tre_one) ? dos_one : tre_one ; const double M6 = (dos_one <= tre_one) ? tre_one : dos_one ; const double m7 = (dos_fou <= tre_fou) ? dos_fou : tre_fou ; const double M7 = (dos_fou <= tre_fou) ? tre_fou : dos_fou ; const double m3 = (uno_two <= uno_thr) ? uno_two : uno_thr ; const double M3 = (uno_two <= uno_thr) ? uno_thr : uno_two ; const double m4 = (qua_two <= qua_thr) ? qua_two : qua_thr ; const double M4 = (qua_two <= qua_thr) ? qua_thr : qua_two ; const double m5 = LBB_MIN( m1, m2 ); const double M5 = LBB_MAX( M1, M2 ); const double m10 = LBB_MIN( m6, uno_one ); const double M10 = LBB_MAX( M6, uno_one ); const double m11 = LBB_MIN( m6, qua_one ); const double M11 = LBB_MAX( M6, qua_one ); const double m12 = LBB_MIN( m7, uno_fou ); const double M12 = LBB_MAX( M7, uno_fou ); const double m13 = LBB_MIN( m7, qua_fou ); const double M13 = LBB_MAX( M7, qua_fou ); const double m8 = LBB_MIN( m5, m3 ); const double M8 = LBB_MAX( M5, M3 ); const double m9 = LBB_MIN( m5, m4 ); const double M9 = LBB_MAX( M5, M4 ); const double min00 = LBB_MIN( m8, m10 ); const double max00 = LBB_MAX( M8, M10 ); const double min10 = LBB_MIN( m8, m12 ); const double max10 = LBB_MAX( M8, M12 ); const double min01 = LBB_MIN( m9, m11 ); const double max01 = LBB_MAX( M9, M11 ); const double min11 = LBB_MIN( m9, m13 ); const double max11 = LBB_MAX( M9, M13 ); #endif /* * The remainder of the "per channel" computation involves the * computation of: * * --8 conditional moves, * * --8 signs (in which the sign of zero is unimportant), * * --12 minima of two values, * * --8 maxima of two values, * * --8 absolute values, * * for a grand total of 29 minima, 25 maxima, 8 conditional moves, 8 * signs, and 8 absolute values. If everything is done with * conditional moves, "only" 28+8+8+12+8+8=72 flags are involved * (because initial min and max can be computed with one flag). * * The "per channel" part of the computation also involves 107 * arithmetic operations (54 *, 21 +, 42 -). */ /* * Distances to the local min and max: */ const double u00 = dos_two - min00; const double v00 = max00 - dos_two; const double u10 = dos_thr - min10; const double v10 = max10 - dos_thr; const double u01 = tre_two - min01; const double v01 = max01 - tre_two; const double u11 = tre_thr - min11; const double v11 = max11 - tre_thr; /* * Initial values of the derivatives computed with centered * differences. Factors of 1/2 are left out because they are folded * in later: */ const double dble_dzdx00i = dos_thr - dos_one; const double dble_dzdy11i = qua_thr - dos_thr; const double dble_dzdx10i = dos_fou - dos_two; const double dble_dzdy01i = qua_two - dos_two; const double dble_dzdx01i = tre_thr - tre_one; const double dble_dzdy10i = tre_thr - uno_thr; const double dble_dzdx11i = tre_fou - tre_two; const double dble_dzdy00i = tre_two - uno_two; /* * Signs of the derivatives. The upcoming clamping does not change * them (except if the clamping sends a negative derivative to 0, in * which case the sign does not matter anyway). */ const double sign_dzdx00 = LBB_SIGN( dble_dzdx00i ); const double sign_dzdx10 = LBB_SIGN( dble_dzdx10i ); const double sign_dzdx01 = LBB_SIGN( dble_dzdx01i ); const double sign_dzdx11 = LBB_SIGN( dble_dzdx11i ); const double sign_dzdy00 = LBB_SIGN( dble_dzdy00i ); const double sign_dzdy10 = LBB_SIGN( dble_dzdy10i ); const double sign_dzdy01 = LBB_SIGN( dble_dzdy01i ); const double sign_dzdy11 = LBB_SIGN( dble_dzdy11i ); /* * Initial values of the cross-derivatives. Factors of 1/4 are left * out because folded in later: */ const double quad_d2zdxdy00i = uno_one - uno_thr + dble_dzdx01i; const double quad_d2zdxdy10i = uno_two - uno_fou + dble_dzdx11i; const double quad_d2zdxdy01i = qua_thr - qua_one - dble_dzdx00i; const double quad_d2zdxdy11i = qua_fou - qua_two - dble_dzdx10i; /* * Slope limiters. The key multiplier is 3 but we fold a factor of * 2, hence 6: */ const double dble_slopelimit_00 = 6.0 * LBB_MIN( u00, v00 ); const double dble_slopelimit_10 = 6.0 * LBB_MIN( u10, v10 ); const double dble_slopelimit_01 = 6.0 * LBB_MIN( u01, v01 ); const double dble_slopelimit_11 = 6.0 * LBB_MIN( u11, v11 ); /* * Clamped first derivatives: */ const double dble_dzdx00 = ( sign_dzdx00 * dble_dzdx00i <= dble_slopelimit_00 ) ? dble_dzdx00i : sign_dzdx00 * dble_slopelimit_00; const double dble_dzdy00 = ( sign_dzdy00 * dble_dzdy00i <= dble_slopelimit_00 ) ? dble_dzdy00i : sign_dzdy00 * dble_slopelimit_00; const double dble_dzdx10 = ( sign_dzdx10 * dble_dzdx10i <= dble_slopelimit_10 ) ? dble_dzdx10i : sign_dzdx10 * dble_slopelimit_10; const double dble_dzdy10 = ( sign_dzdy10 * dble_dzdy10i <= dble_slopelimit_10 ) ? dble_dzdy10i : sign_dzdy10 * dble_slopelimit_10; const double dble_dzdx01 = ( sign_dzdx01 * dble_dzdx01i <= dble_slopelimit_01 ) ? dble_dzdx01i : sign_dzdx01 * dble_slopelimit_01; const double dble_dzdy01 = ( sign_dzdy01 * dble_dzdy01i <= dble_slopelimit_01 ) ? dble_dzdy01i : sign_dzdy01 * dble_slopelimit_01; const double dble_dzdx11 = ( sign_dzdx11 * dble_dzdx11i <= dble_slopelimit_11 ) ? dble_dzdx11i : sign_dzdx11 * dble_slopelimit_11; const double dble_dzdy11 = ( sign_dzdy11 * dble_dzdy11i <= dble_slopelimit_11 ) ? dble_dzdy11i : sign_dzdy11 * dble_slopelimit_11; /* * Sums and differences of first derivatives: */ const double twelve_sum00 = 6.0 * ( dble_dzdx00 + dble_dzdy00 ); const double twelve_dif00 = 6.0 * ( dble_dzdx00 - dble_dzdy00 ); const double twelve_sum10 = 6.0 * ( dble_dzdx10 + dble_dzdy10 ); const double twelve_dif10 = 6.0 * ( dble_dzdx10 - dble_dzdy10 ); const double twelve_sum01 = 6.0 * ( dble_dzdx01 + dble_dzdy01 ); const double twelve_dif01 = 6.0 * ( dble_dzdx01 - dble_dzdy01 ); const double twelve_sum11 = 6.0 * ( dble_dzdx11 + dble_dzdy11 ); const double twelve_dif11 = 6.0 * ( dble_dzdx11 - dble_dzdy11 ); /* * Absolute values of the sums: */ const double twelve_abs_sum00 = LBB_ABS( twelve_sum00 ); const double twelve_abs_sum10 = LBB_ABS( twelve_sum10 ); const double twelve_abs_sum01 = LBB_ABS( twelve_sum01 ); const double twelve_abs_sum11 = LBB_ABS( twelve_sum11 ); /* * Scaled distances to the min: */ const double u00_times_36 = 36.0 * u00; const double u10_times_36 = 36.0 * u10; const double u01_times_36 = 36.0 * u01; const double u11_times_36 = 36.0 * u11; /* * First cross-derivative limiter: */ const double first_limit00 = twelve_abs_sum00 - u00_times_36; const double first_limit10 = twelve_abs_sum10 - u10_times_36; const double first_limit01 = twelve_abs_sum01 - u01_times_36; const double first_limit11 = twelve_abs_sum11 - u11_times_36; const double quad_d2zdxdy00ii = LBB_MAX( quad_d2zdxdy00i, first_limit00 ); const double quad_d2zdxdy10ii = LBB_MAX( quad_d2zdxdy10i, first_limit10 ); const double quad_d2zdxdy01ii = LBB_MAX( quad_d2zdxdy01i, first_limit01 ); const double quad_d2zdxdy11ii = LBB_MAX( quad_d2zdxdy11i, first_limit11 ); /* * Scaled distances to the max: */ const double v00_times_36 = 36.0 * v00; const double v10_times_36 = 36.0 * v10; const double v01_times_36 = 36.0 * v01; const double v11_times_36 = 36.0 * v11; /* * Second cross-derivative limiter: */ const double second_limit00 = v00_times_36 - twelve_abs_sum00; const double second_limit10 = v10_times_36 - twelve_abs_sum10; const double second_limit01 = v01_times_36 - twelve_abs_sum01; const double second_limit11 = v11_times_36 - twelve_abs_sum11; const double quad_d2zdxdy00iii = LBB_MIN( quad_d2zdxdy00ii, second_limit00 ); const double quad_d2zdxdy10iii = LBB_MIN( quad_d2zdxdy10ii, second_limit10 ); const double quad_d2zdxdy01iii = LBB_MIN( quad_d2zdxdy01ii, second_limit01 ); const double quad_d2zdxdy11iii = LBB_MIN( quad_d2zdxdy11ii, second_limit11 ); /* * Absolute values of the differences: */ const double twelve_abs_dif00 = LBB_ABS( twelve_dif00 ); const double twelve_abs_dif10 = LBB_ABS( twelve_dif10 ); const double twelve_abs_dif01 = LBB_ABS( twelve_dif01 ); const double twelve_abs_dif11 = LBB_ABS( twelve_dif11 ); /* * Third cross-derivative limiter: */ const double third_limit00 = twelve_abs_dif00 - v00_times_36; const double third_limit10 = twelve_abs_dif10 - v10_times_36; const double third_limit01 = twelve_abs_dif01 - v01_times_36; const double third_limit11 = twelve_abs_dif11 - v11_times_36; const double quad_d2zdxdy00iiii = LBB_MAX( quad_d2zdxdy00iii, third_limit00); const double quad_d2zdxdy10iiii = LBB_MAX( quad_d2zdxdy10iii, third_limit10); const double quad_d2zdxdy01iiii = LBB_MAX( quad_d2zdxdy01iii, third_limit01); const double quad_d2zdxdy11iiii = LBB_MAX( quad_d2zdxdy11iii, third_limit11); /* * Fourth cross-derivative limiter: */ const double fourth_limit00 = u00_times_36 - twelve_abs_dif00; const double fourth_limit10 = u10_times_36 - twelve_abs_dif10; const double fourth_limit01 = u01_times_36 - twelve_abs_dif01; const double fourth_limit11 = u11_times_36 - twelve_abs_dif11; const double quad_d2zdxdy00 = LBB_MIN( quad_d2zdxdy00iiii, fourth_limit00); const double quad_d2zdxdy10 = LBB_MIN( quad_d2zdxdy10iiii, fourth_limit10); const double quad_d2zdxdy01 = LBB_MIN( quad_d2zdxdy01iiii, fourth_limit01); const double quad_d2zdxdy11 = LBB_MIN( quad_d2zdxdy11iiii, fourth_limit11); /* * Part of the result which does not need derivatives: */ const double newval1 = c00 * dos_two + c10 * dos_thr + c01 * tre_two + c11 * tre_thr; /* * Twice the part of the result which only needs first derivatives. */ const double newval2 = c00dx * dble_dzdx00 + c10dx * dble_dzdx10 + c01dx * dble_dzdx01 + c11dx * dble_dzdx11 + c00dy * dble_dzdy00 + c10dy * dble_dzdy10 + c01dy * dble_dzdy01 + c11dy * dble_dzdy11; /* * Four times the part of the result which only uses cross * derivatives: */ const double newval3 = c00dxdy * quad_d2zdxdy00 + c10dxdy * quad_d2zdxdy10 + c01dxdy * quad_d2zdxdy01 + c11dxdy * quad_d2zdxdy11; const double newval = newval1 + .5 * newval2 + .25 * newval3; return newval; } /* * Call lbb with a type conversion operator as a parameter. * * It would be nice to do this with templates but we can't figure out * how to do it cleanly. Suggestions welcome! */ #define LBB_CONVERSION( conversion ) \ template static void inline \ lbb_ ## conversion( void* restrict pout, \ const VipsPel* restrict pin, \ const int bands, \ const int lskip, \ const double relative_x, \ const double relative_y ) \ { \ T* restrict out = (T *) pout; \ \ const T* restrict in = (T *) pin; \ \ const int one_shift = -bands; \ const int thr_shift = bands; \ const int fou_shift = 2*bands; \ \ const int uno_two_shift = -lskip; \ \ const int tre_two_shift = lskip; \ const int qua_two_shift = 2*lskip; \ \ const int uno_one_shift = uno_two_shift + one_shift; \ const int dos_one_shift = one_shift; \ const int tre_one_shift = tre_two_shift + one_shift; \ const int qua_one_shift = qua_two_shift + one_shift; \ \ const int uno_thr_shift = uno_two_shift + thr_shift; \ const int dos_thr_shift = thr_shift; \ const int tre_thr_shift = tre_two_shift + thr_shift; \ const int qua_thr_shift = qua_two_shift + thr_shift; \ \ const int uno_fou_shift = uno_two_shift + fou_shift; \ const int dos_fou_shift = fou_shift; \ const int tre_fou_shift = tre_two_shift + fou_shift; \ const int qua_fou_shift = qua_two_shift + fou_shift; \ \ const double xp1over2 = relative_x; \ const double xm1over2 = xp1over2 - 1.0; \ const double onepx = 0.5 + xp1over2; \ const double onemx = 1.5 - xp1over2; \ const double xp1over2sq = xp1over2 * xp1over2; \ \ const double yp1over2 = relative_y; \ const double ym1over2 = yp1over2 - 1.0; \ const double onepy = 0.5 + yp1over2; \ const double onemy = 1.5 - yp1over2; \ const double yp1over2sq = yp1over2 * yp1over2; \ \ const double xm1over2sq = xm1over2 * xm1over2; \ const double ym1over2sq = ym1over2 * ym1over2; \ \ const double twice1px = onepx + onepx; \ const double twice1py = onepy + onepy; \ const double twice1mx = onemx + onemx; \ const double twice1my = onemy + onemy; \ \ const double xm1over2sq_times_ym1over2sq = xm1over2sq * ym1over2sq; \ const double xp1over2sq_times_ym1over2sq = xp1over2sq * ym1over2sq; \ const double xp1over2sq_times_yp1over2sq = xp1over2sq * yp1over2sq; \ const double xm1over2sq_times_yp1over2sq = xm1over2sq * yp1over2sq; \ \ const double four_times_1px_times_1py = twice1px * twice1py; \ const double four_times_1mx_times_1py = twice1mx * twice1py; \ const double twice_xp1over2_times_1py = xp1over2 * twice1py; \ const double twice_xm1over2_times_1py = xm1over2 * twice1py; \ \ const double twice_xm1over2_times_1my = xm1over2 * twice1my; \ const double twice_xp1over2_times_1my = xp1over2 * twice1my; \ const double four_times_1mx_times_1my = twice1mx * twice1my; \ const double four_times_1px_times_1my = twice1px * twice1my; \ \ const double twice_1px_times_ym1over2 = twice1px * ym1over2; \ const double twice_1mx_times_ym1over2 = twice1mx * ym1over2; \ const double xp1over2_times_ym1over2 = xp1over2 * ym1over2; \ const double xm1over2_times_ym1over2 = xm1over2 * ym1over2; \ \ const double xm1over2_times_yp1over2 = xm1over2 * yp1over2; \ const double xp1over2_times_yp1over2 = xp1over2 * yp1over2; \ const double twice_1mx_times_yp1over2 = twice1mx * yp1over2; \ const double twice_1px_times_yp1over2 = twice1px * yp1over2; \ \ const double c00 = \ four_times_1px_times_1py * xm1over2sq_times_ym1over2sq; \ const double c00dx = \ twice_xp1over2_times_1py * xm1over2sq_times_ym1over2sq; \ const double c00dy = \ twice_1px_times_yp1over2 * xm1over2sq_times_ym1over2sq; \ const double c00dxdy = \ xp1over2_times_yp1over2 * xm1over2sq_times_ym1over2sq; \ \ const double c10 = \ four_times_1mx_times_1py * xp1over2sq_times_ym1over2sq; \ const double c10dx = \ twice_xm1over2_times_1py * xp1over2sq_times_ym1over2sq; \ const double c10dy = \ twice_1mx_times_yp1over2 * xp1over2sq_times_ym1over2sq; \ const double c10dxdy = \ xm1over2_times_yp1over2 * xp1over2sq_times_ym1over2sq; \ \ const double c01 = \ four_times_1px_times_1my * xm1over2sq_times_yp1over2sq; \ const double c01dx = \ twice_xp1over2_times_1my * xm1over2sq_times_yp1over2sq; \ const double c01dy = \ twice_1px_times_ym1over2 * xm1over2sq_times_yp1over2sq; \ const double c01dxdy = \ xp1over2_times_ym1over2 * xm1over2sq_times_yp1over2sq; \ \ const double c11 = \ four_times_1mx_times_1my * xp1over2sq_times_yp1over2sq; \ const double c11dx = \ twice_xm1over2_times_1my * xp1over2sq_times_yp1over2sq; \ const double c11dy = \ twice_1mx_times_ym1over2 * xp1over2sq_times_yp1over2sq; \ const double c11dxdy = \ xm1over2_times_ym1over2 * xp1over2sq_times_yp1over2sq; \ \ int band = bands; \ \ do \ { \ const double double_result = \ lbbicubic( c00, \ c10, \ c01, \ c11, \ c00dx, \ c10dx, \ c01dx, \ c11dx, \ c00dy, \ c10dy, \ c01dy, \ c11dy, \ c00dxdy, \ c10dxdy, \ c01dxdy, \ c11dxdy, \ in[ uno_one_shift ], \ in[ uno_two_shift ], \ in[ uno_thr_shift ], \ in[ uno_fou_shift ], \ in[ dos_one_shift ], \ in[ 0 ], \ in[ dos_thr_shift ], \ in[ dos_fou_shift ], \ in[ tre_one_shift ], \ in[ tre_two_shift ], \ in[ tre_thr_shift ], \ in[ tre_fou_shift ], \ in[ qua_one_shift ], \ in[ qua_two_shift ], \ in[ qua_thr_shift ], \ in[ qua_fou_shift ] ); \ \ const T result = to_ ## conversion( double_result ); \ in++; \ *out++ = result; \ } while (--band); \ } LBB_CONVERSION( fptypes ) LBB_CONVERSION( withsign ) LBB_CONVERSION( nosign ) #define CALL( T, conversion ) \ lbb_ ## conversion( out, \ p, \ bands, \ lskip, \ relative_x, \ relative_y ); /* * We need C linkage: */ extern "C" { G_DEFINE_TYPE( VipsInterpolateLbb, vips_interpolate_lbb, VIPS_TYPE_INTERPOLATE ); } static void vips_interpolate_lbb_interpolate( VipsInterpolate* restrict interpolate, void* restrict out, VipsRegion* restrict in, double absolute_x, double absolute_y ) { /* absolute_x and absolute_y are always >= 1.0 (see double-check assert * below), so we don't need floor(). * * It's 1 not 0 since have a window_offset of 1. */ const int ix = (int) absolute_x; const int iy = (int) absolute_y; /* * Move the pointer to (the first band of) the top/left pixel of the * 2x2 group of pixel centers which contains the sampling location * in its convex hull: */ const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy ); const double relative_x = absolute_x - ix; const double relative_y = absolute_y - iy; /* * VIPS versions of Nicolas's pixel addressing values. */ const int lskip = VIPS_REGION_LSKIP( in ) / VIPS_IMAGE_SIZEOF_ELEMENT( in->im ); /* * Double the bands for complex images to account for the real and * imaginary parts being computed independently: */ const int actual_bands = in->im->Bands; const int bands = vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands; /* Confirm that absolute_x and absolute_y are >= 1, see above. */ g_assert( absolute_x >= 1.0 ); g_assert( absolute_y >= 1.0 ); switch( in->im->BandFmt ) { case VIPS_FORMAT_UCHAR: CALL( unsigned char, nosign ); break; case VIPS_FORMAT_CHAR: CALL( signed char, withsign ); break; case VIPS_FORMAT_USHORT: CALL( unsigned short, nosign ); break; case VIPS_FORMAT_SHORT: CALL( signed short, withsign ); break; case VIPS_FORMAT_UINT: CALL( unsigned int, nosign ); break; case VIPS_FORMAT_INT: CALL( signed int, withsign ); break; /* * Complex images are handled by doubling of bands. */ case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_COMPLEX: CALL( float, fptypes ); break; case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DPCOMPLEX: CALL( double, fptypes ); break; default: g_assert( 0 ); break; } } static void vips_interpolate_lbb_class_init( VipsInterpolateLbbClass *klass ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass ); VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( klass ); object_class->nickname = "lbb"; object_class->description = _( "Reduced halo bicubic" ); interpolate_class->interpolate = vips_interpolate_lbb_interpolate; interpolate_class->window_size = 4; } static void vips_interpolate_lbb_init( VipsInterpolateLbb *lbb ) { } vips-7.38.5/libvips/resample/Makefile.in0000644000175000017500000006152712303144056015056 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/resample DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libresample_la_LIBADD = am__libresample_la_SOURCES_DIST = resample.c similarity.c presample.h \ shrink.c affine.c interpolate.c quadratic.c transform.c \ bicubic.cpp lbb.cpp nohalo.cpp vsqbs.cpp templates.h @ENABLE_CXX_FALSE@am_libresample_la_OBJECTS = resample.lo \ @ENABLE_CXX_FALSE@ similarity.lo shrink.lo affine.lo \ @ENABLE_CXX_FALSE@ interpolate.lo quadratic.lo transform.lo @ENABLE_CXX_TRUE@am_libresample_la_OBJECTS = affine.lo quadratic.lo \ @ENABLE_CXX_TRUE@ resample.lo similarity.lo shrink.lo \ @ENABLE_CXX_TRUE@ interpolate.lo transform.lo bicubic.lo lbb.lo \ @ENABLE_CXX_TRUE@ nohalo.lo vsqbs.lo libresample_la_OBJECTS = $(am_libresample_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libresample_la_SOURCES) DIST_SOURCES = $(am__libresample_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ @ENABLE_CXX_FALSE@libresample_la_SOURCES = \ @ENABLE_CXX_FALSE@ resample.c \ @ENABLE_CXX_FALSE@ similarity.c \ @ENABLE_CXX_FALSE@ presample.h \ @ENABLE_CXX_FALSE@ shrink.c \ @ENABLE_CXX_FALSE@ affine.c \ @ENABLE_CXX_FALSE@ interpolate.c \ @ENABLE_CXX_FALSE@ quadratic.c \ @ENABLE_CXX_FALSE@ transform.c # only build the C++ stuff if ENABLE_CXX # you'd think we could just define a couple of variables, but that seems to # confuse libtool and make it link the library with g++ # instead, have two completely different paths @ENABLE_CXX_TRUE@libresample_la_SOURCES = \ @ENABLE_CXX_TRUE@ affine.c \ @ENABLE_CXX_TRUE@ quadratic.c \ @ENABLE_CXX_TRUE@ resample.c \ @ENABLE_CXX_TRUE@ similarity.c \ @ENABLE_CXX_TRUE@ presample.h \ @ENABLE_CXX_TRUE@ shrink.c \ @ENABLE_CXX_TRUE@ interpolate.c \ @ENABLE_CXX_TRUE@ transform.c \ @ENABLE_CXX_TRUE@ bicubic.cpp \ @ENABLE_CXX_TRUE@ lbb.cpp \ @ENABLE_CXX_TRUE@ nohalo.cpp \ @ENABLE_CXX_TRUE@ vsqbs.cpp \ @ENABLE_CXX_TRUE@ templates.h @ENABLE_CXX_FALSE@EXTRA_DIST = \ @ENABLE_CXX_FALSE@ bicubic.cpp \ @ENABLE_CXX_FALSE@ lbb.cpp \ @ENABLE_CXX_FALSE@ nohalo.cpp \ @ENABLE_CXX_FALSE@ vsqbs.cpp \ @ENABLE_CXX_FALSE@ templates.h noinst_LTLIBRARIES = libresample.la AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/resample/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/resample/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libresample.la: $(libresample_la_OBJECTS) $(libresample_la_DEPENDENCIES) $(EXTRA_libresample_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libresample_la_OBJECTS) $(libresample_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bicubic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpolate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nohalo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quadratic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/similarity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsqbs.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/resample/Makefile.am0000644000175000017500000000143712303140253015032 00000000000000# only build the C++ stuff if ENABLE_CXX # you'd think we could just define a couple of variables, but that seems to # confuse libtool and make it link the library with g++ # instead, have two completely different paths if ENABLE_CXX libresample_la_SOURCES = \ affine.c \ quadratic.c \ resample.c \ similarity.c \ presample.h \ shrink.c \ interpolate.c \ transform.c \ bicubic.cpp \ lbb.cpp \ nohalo.cpp \ vsqbs.cpp \ templates.h else libresample_la_SOURCES = \ resample.c \ similarity.c \ presample.h \ shrink.c \ affine.c \ interpolate.c \ quadratic.c \ transform.c EXTRA_DIST = \ bicubic.cpp \ lbb.cpp \ nohalo.cpp \ vsqbs.cpp \ templates.h endif noinst_LTLIBRARIES = libresample.la AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/resample/affine.c0000644000175000017500000004271012303141142014367 00000000000000/* im_affine() ... affine transform with a supplied interpolator. * * * Copyright N. Dessipris * Written on: 01/11/1991 * Modified on: 12/3/92 JC * - rounding error in interpolation routine fixed * - test for scale=1, angle=0 case fixed * - clipping of output removed: redundant * - various little tidies * - problems remain with scale>20, size<10 * * Re-written on: 20/08/92, J.Ph Laurent * * 21/02/93, JC * - speed-ups * - simplifications * - im_similarity now calculates a window and calls this routine * 6/7/93 JC * - rewritten for partials * - ANSIfied * - now rotates any non-complex type * 3/6/94 JC * - C revised in bug search * 9/6/94 JC * - im_prepare() was preparing too small an area! oops * 22/5/95 JC * - added code to detect all-black output area case - helps lazy ip * 3/7/95 JC * - IM_CODING_LABQ handling moved to here * 31/7/97 JC * - dx/dy sign reversed to be less confusing ... now follows comment at * top ... ax - by + dx etc. * - tiny speed up, replaced the *++ on interpolation with [z] * - im_similarity() moved in here * - args swapped: was whxy, now xywh * - didn't agree with dispatch fns before :( * 3/3/98 JC * - im_demand_hint() added * 20/12/99 JC * - im_affine() made from im_similarity_area() * - transform stuff cleaned up a bit * 14/4/01 JC * - oops, invert_point() had a rounding problem * 23/2/02 JC * - pre-calculate interpolation matricies * - integer interpolation for int8/16 types, double for * int32/float/double * - faster transformation * 15/8/02 JC * - records Xoffset/Yoffset * 14/4/04 * - rounding, clipping and transforming revised, now pixel-perfect (or * better than gimp, anyway) * 22/6/05 * - all revised again, simpler and more reliable now * 30/3/06 * - gah, still an occasional clipping problem * 12/7/06 * - still more tweaking, gah again * 7/10/06 * - set THINSTRIP for no-rotate affines * 20/10/08 * - version with interpolate parameter, from im_affine() * 30/10/08 * - allow complex image types * 4/11/08 * - take an interpolator as a param * - replace im_affine with this, provide an im_affine() compat wrapper * - break transform stuff out to transform.c * - revise clipping / transform stuff, again * - now do corner rather than centre: this way the identity transform * returns the input exactly * 12/8/10 * - revise window_size / window_offset stuff again, see also * interpolate.c * 2/2/11 * - gtk-doc * 14/12/12 * - redone as a class * - added input space translation * 22/1/14 * - auto RAD decode */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG #define DEBUG_GEOMETRY */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include #include #include "presample.h" typedef struct _VipsAffine { VipsResample parent_instance; VipsArea *matrix; VipsInterpolate *interpolate; VipsArea *oarea; double odx; double ody; double idx; double idy; VipsTransformation trn; } VipsAffine; typedef VipsResampleClass VipsAffineClass; G_DEFINE_TYPE( VipsAffine, vips_affine, VIPS_TYPE_RESAMPLE ); /* * FAST_PSEUDO_FLOOR is a floor and floorf replacement which has been * found to be faster on several linux boxes than the library * version. It returns the floor of its argument unless the argument * is a negative integer, in which case it returns one less than the * floor. For example: * * FAST_PSEUDO_FLOOR(0.5) = 0 * * FAST_PSEUDO_FLOOR(0.) = 0 * * FAST_PSEUDO_FLOOR(-.5) = -1 * * as expected, but * * FAST_PSEUDO_FLOOR(-1.) = -2 * * The locations of the discontinuities of FAST_PSEUDO_FLOOR are the * same as floor and floorf; it is just that at negative integers the * function is discontinuous on the right instead of the left. */ #define FAST_PSEUDO_FLOOR(x) ( (int)(x) - ( (x) < 0. ) ) /* We have five (!!) coordinate systems. Working forward through them, these * are: * * 1. The original input image * * 2. This is embedded in a larger image to provide borders for the * interpolator. iarea->left/top give the offset. These are the coordinates we * pass to VIPS_REGION_ADDR()/vips_region_prepare() for the input image. * * The borders are sized by the interpolator's window_size property and offset * by the interpolator's window_offset property. For example, * for bilinear (window_size 2, window_offset 0) we add a single line * of extra pixels along the bottom and right (window_size - 1). For * bicubic (window_size 4, window_offset 1) we add a single line top and left * (window_offset), and two lines bottom and right (window_size - 1 - * window_offset). * * 3. We need point (0, 0) in (1) to be at (0, 0) for the transformation. So * shift everything up and left to make the displaced input image. This is the * space that the transformation maps from, and can have negative pixels * (up and left of the image, for interpolation). * * 4. Output transform space. This is the where the transform maps to. Pixels * can be negative, since a rotated image can go up and left of the origin. * * 5. Output image space. This is the wh of the xywh passed to vips_affine() * below. These are the coordinates we pass to VIPS_REGION_ADDR() for the * output image, and that affinei_gen() is asked for. */ static int vips_affine_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; const VipsAffine *affine = (VipsAffine *) b; const VipsImage *in = (VipsImage *) a; const int window_size = vips_interpolate_get_window_size( affine->interpolate ); const int window_offset = vips_interpolate_get_window_offset( affine->interpolate ); const VipsInterpolateMethod interpolate = vips_interpolate_get_method( affine->interpolate ); /* Area we generate in the output image. */ const VipsRect *r = &or->valid; const int le = r->left; const int ri = VIPS_RECT_RIGHT( r ); const int to = r->top; const int bo = VIPS_RECT_BOTTOM( r ); const VipsRect *iarea = &affine->trn.iarea; const VipsRect *oarea = &affine->trn.oarea; int ps = VIPS_IMAGE_SIZEOF_PEL( in ); int x, y, z; VipsRect image, want, need, clipped; #ifdef DEBUG printf( "affine: generating left=%d, top=%d, width=%d, height=%d\n", r->left, r->top, r->width, r->height ); #endif /*DEBUG*/ /* We are generating this chunk of the transformed image. */ want = *r; want.left += oarea->left; want.top += oarea->top; /* Find the area of the input image we need. */ vips__transform_invert_rect( &affine->trn, &want, &need ); /* That does round-to-nearest, because it has to stop rounding errors * growing images unexpectedly. We need round-down, so we must * add half a pixel along the left and top. But we are int :( so add 1 * pixel. * * Add an extra line along the right and bottom as well, for rounding. */ vips_rect_marginadjust( &need, 1 ); /* Now go to space (2) above. */ need.left += iarea->left; need.top += iarea->top; /* Add a border for interpolation. */ need.width += window_size - 1; need.height += window_size - 1; need.left -= window_offset; need.top -= window_offset; /* Clip against the size of (2). */ image.left = 0; image.top = 0; image.width = in->Xsize; image.height = in->Ysize; vips_rect_intersectrect( &need, &image, &clipped ); /* Outside input image? All black. */ if( vips_rect_isempty( &clipped ) ) { vips_region_black( or ); return( 0 ); } /* We do need some pixels from the input image to make our output - * ask for them. */ if( vips_region_prepare( ir, &clipped ) ) return( -1 ); #ifdef DEBUG printf( "affine: preparing left=%d, top=%d, width=%d, height=%d\n", clipped.left, clipped.top, clipped.width, clipped.height ); #endif /*DEBUG*/ VIPS_GATE_START( "vips_affine_gen: work" ); /* Resample! x/y loop over pixels in the output image (5). */ for( y = to; y < bo; y++ ) { /* Input clipping rectangle. */ const int ile = iarea->left; const int ito = iarea->top; const int iri = iarea->left + iarea->width; const int ibo = iarea->top + iarea->height; /* Derivative of matrix. */ const double ddx = affine->trn.ia; const double ddy = affine->trn.ic; /* Continuous cods in transformed space. */ const double ox = le + oarea->left - affine->trn.odx; const double oy = y + oarea->top - affine->trn.ody; /* Continuous cods in input space. */ double ix, iy; VipsPel *q; /* To (3). */ ix = affine->trn.ia * ox + affine->trn.ib * oy; iy = affine->trn.ic * ox + affine->trn.id * oy; /* Now move to (2). */ ix += iarea->left; iy += iarea->top; /* And the input offset. */ ix -= affine->trn.idx; iy -= affine->trn.idy; q = VIPS_REGION_ADDR( or, le, y ); for( x = le; x < ri; x++ ) { int fx, fy; fx = FAST_PSEUDO_FLOOR( ix ); fy = FAST_PSEUDO_FLOOR( iy ); /* Clipping! */ if( fx < ile || fx >= iri || fy < ito || fy >= ibo ) { for( z = 0; z < ps; z++ ) q[z] = 0; } else { interpolate( affine->interpolate, q, ir, ix, iy ); } ix += ddx; iy += ddy; q += ps; } } VIPS_GATE_STOP( "vips_affine_gen: work" ); return( 0 ); } static int vips_affine_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsResample *resample = VIPS_RESAMPLE( object ); VipsAffine *affine = (VipsAffine *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); VipsImage *in; VipsDemandStyle hint; int window_size; int window_offset; double edge; if( VIPS_OBJECT_CLASS( vips_affine_parent_class )->build( object ) ) return( -1 ); if( vips_check_coding_known( class->nickname, resample->in ) ) return( -1 ); if( vips_check_vector_length( class->nickname, affine->matrix->n, 4 ) ) return( -1 ); if( vips_object_argument_isset( object, "oarea" ) && vips_check_vector_length( class->nickname, affine->oarea->n, 4 ) ) return( -1 ); if( !affine->interpolate ) affine->interpolate = vips_interpolate_new( "bilinear" ); in = resample->in; /* Set up transform. */ window_size = vips_interpolate_get_window_size( affine->interpolate ); window_offset = vips_interpolate_get_window_offset( affine->interpolate ); affine->trn.iarea.left = window_offset; affine->trn.iarea.top = window_offset; affine->trn.iarea.width = in->Xsize; affine->trn.iarea.height = in->Ysize; affine->trn.a = ((double *) affine->matrix->data)[0]; affine->trn.b = ((double *) affine->matrix->data)[1]; affine->trn.c = ((double *) affine->matrix->data)[2]; affine->trn.d = ((double *) affine->matrix->data)[3]; affine->trn.idx = 0; affine->trn.idy = 0; affine->trn.odx = 0; affine->trn.ody = 0; vips__transform_set_area( &affine->trn ); if( vips_object_argument_isset( object, "oarea" ) ) { affine->trn.oarea.left = ((int *) affine->oarea->data)[0]; affine->trn.oarea.top = ((int *) affine->oarea->data)[1]; affine->trn.oarea.width = ((int *) affine->oarea->data)[2]; affine->trn.oarea.height = ((int *) affine->oarea->data)[3]; } if( vips_object_argument_isset( object, "odx" ) ) affine->trn.odx = affine->odx; if( vips_object_argument_isset( object, "ody" ) ) affine->trn.ody = affine->ody; if( vips_object_argument_isset( object, "idx" ) ) affine->trn.idx = affine->idx; if( vips_object_argument_isset( object, "idy" ) ) affine->trn.idy = affine->idy; if( vips__transform_calc_inverse( &affine->trn ) ) return( -1 ); if( vips__transform_isidentity( &affine->trn ) ) return( vips_image_write( in, resample->out ) ); /* Check for coordinate overflow ... we want to be able to hold the * output space inside INT_MAX / TRANSFORM_SCALE. */ edge = INT_MAX / VIPS_TRANSFORM_SCALE; if( affine->trn.oarea.left < -edge || affine->trn.oarea.top < -edge || VIPS_RECT_RIGHT( &affine->trn.oarea ) > edge || VIPS_RECT_BOTTOM( &affine->trn.oarea ) > edge ) { vips_error( class->nickname, "%s", _( "output coordinates out of range" ) ); return( -1 ); } /* Unpack for processing. */ if( in->Coding == VIPS_CODING_LABQ ) { if( vips_LabQ2LabS( in, &t[0], NULL ) ) return( -1 ); in = t[0]; } else if( in->Coding == VIPS_CODING_RAD ) { if( vips_rad2float( in, &t[1], NULL ) ) return( -1 ); in = t[1]; } /* Add new pixels around the input so we can interpolate at the edges. */ if( vips_embed( in, &t[2], window_offset, window_offset, in->Xsize + window_size, in->Ysize + window_size, "extend", VIPS_EXTEND_COPY, NULL ) ) return( -1 ); in = t[2]; /* Normally SMALLTILE ... except if this is a size up/down affine. */ if( affine->trn.b == 0.0 && affine->trn.c == 0.0 ) hint = VIPS_DEMAND_STYLE_FATSTRIP; else hint = VIPS_DEMAND_STYLE_SMALLTILE; if( vips_image_pipelinev( resample->out, hint, in, NULL ) ) return( -1 ); resample->out->Xsize = affine->trn.oarea.width; resample->out->Ysize = affine->trn.oarea.height; /* Generate! */ if( vips_image_generate( resample->out, vips_start_one, vips_affine_gen, vips_stop_one, in, affine ) ) return( -1 ); /* Finally: can now set Xoffset/Yoffset. */ resample->out->Xoffset = affine->trn.odx - affine->trn.oarea.left; resample->out->Yoffset = affine->trn.ody - affine->trn.oarea.top; return( 0 ); } static void vips_affine_class_init( VipsAffineClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_affine_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "affine"; vobject_class->description = _( "affine transform of an image" ); vobject_class->build = vips_affine_build; VIPS_ARG_BOXED( class, "matrix", 110, _( "Matrix" ), _( "Transformation matrix" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsAffine, matrix ), VIPS_TYPE_ARRAY_DOUBLE ); VIPS_ARG_INTERPOLATE( class, "interpolate", 2, _( "Interpolate" ), _( "Interpolate pixels with this" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsAffine, interpolate ) ); VIPS_ARG_BOXED( class, "oarea", 111, _( "Output rect" ), _( "Area of output to generate" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsAffine, oarea ), VIPS_TYPE_ARRAY_INT ); VIPS_ARG_DOUBLE( class, "odx", 112, _( "Output offset" ), _( "Horizontal output displacement" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsAffine, odx ), -10000000, 10000000, 0 ); VIPS_ARG_DOUBLE( class, "ody", 113, _( "Output offset" ), _( "Vertical output displacement" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsAffine, ody ), -10000000, 10000000, 0 ); VIPS_ARG_DOUBLE( class, "idx", 114, _( "Input offset" ), _( "Horizontal input displacement" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsAffine, idx ), -10000000, 10000000, 0 ); VIPS_ARG_DOUBLE( class, "idy", 115, _( "Input offset" ), _( "Vertical input displacement" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsAffine, idy ), -10000000, 10000000, 0 ); } static void vips_affine_init( VipsAffine *affine ) { } /** * vips_affine: * @in: input image * @out: output image * @a: transformation matrix coefficient * @b: transformation matrix coefficient * @c: transformation matrix coefficient * @d: transformation matrix coefficient * * Optional arguments: * * @interpolate: interpolate pixels with this * @oarea: output rectangle * @idx: input horizontal offset * @idy: input vertical offset * @odx: output horizontal offset * @ody: output vertical offset * * This operator performs an affine transform on an image using @interpolate. * * The transform is: * * X = @a * (x + @idx) + @b * (y + @idy) + @odx * Y = @c * (x + @idx) + @d * (y + @idy) + @doy * * x and y are the coordinates in input image. * X and Y are the coordinates in output image. * (0,0) is the upper left corner. * * The section of the output space defined by @oarea is written to * @out. @oarea is a four-element int array of left, top, width, height. * By default @oarea is just large enough to cover the whole of the * transformed input image. * * @interpolate defaults to bilinear. * * @idx, @idy, @odx, @ody default to zero. * * See also: vips_shrink(), #VipsInterpolate. * * Returns: 0 on success, -1 on error */ int vips_affine( VipsImage *in, VipsImage **out, double a, double b, double c, double d, ... ) { va_list ap; VipsArea *matrix; int result; matrix = (VipsArea *) vips_array_double_newv( 4, a, b, c, d ); va_start( ap, d ); result = vips_call_split( "affine", ap, in, out, matrix ); va_end( ap ); vips_area_unref( matrix ); return( result ); } vips-7.38.5/libvips/resample/nohalo.cpp0000644000175000017500000017311612303141142014764 00000000000000/* nohalo subdivision followed by lbb (locally bounded bicubic) * interpolation resampler * * Nohalo level 1 with bilinear finishing scheme hacked for VIPS by * J. Cupitt based on code by N. Robidoux, 20/1/09 * * N. Robidoux and J. Cupitt, 4-17/3/09 * * N. Robidoux, 1/4-29/5/2009 * * Nohalo level 2 with bilinear finishing scheme by N. Robidoux based * on code by N. Robidoux, A. Turcotte and J. Cupitt, 27/1/2010 * * Nohalo level 1 with LBB finishing scheme by N. Robidoux and * C. Racette, 11-18/5/2010 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* * 2009-2010 (c) Nicolas Robidoux, Chantal Racette, John Cupitt and * Adam Turcotte * * N. Robidoux thanks Geert Jordaens, Ralf Meyer, Øyvind Kolås, * Minglun Gong, Eric Daoust and Sven Neumann for useful comments and * code. * * N. Robidoux's early research on Nohalo funded in part by an NSERC * (National Science and Engineering Research Council of Canada) * Discovery Grant awarded to him (298424--2004). * * C. Racette's image resampling research and programming funded in * part by an NSERC (National Science and Engineering Research Council * of Canada) Alexander Graham Bell Canada Graduate Scholarship, by an * NSERC Discovery Grant awarded to Julien Dompierre (grant number * 20-61098) and by N. Robidoux's Laurentian University professional * allowance. * * A. Turcotte's image resampling research on reduced halo funded in * part by an NSERC Alexander Graham Bell Canada Graduate Scholarhip * awarded to him and by a Google Summer of Code 2010 award awarded to * GIMP (Gnu Image Manipulation Program). * * Nohalo with LBB finishing scheme was developed by N. Robidoux and * C. Racette at the Department of Mathematics and Computer Science of * Laurentian University in the course of C. Racette's Masters thesis * in Computational Sciences. Preliminary work on Nohalo and monotone * interpolation was performed by C. Racette and N. Robidoux in the * course of her honours thesis, by N. Robidoux, A. Turcotte and * E. Daoust during Google Summer of Code 2009 (through two awards * made to GIMP to improve GEGL), and, earlier, by N. Robidoux, * A. Turcotte, J. Cupitt, M. Gong and K. Martinez. */ /* * Nohalo with LBB as finishing scheme has two versions, which are * only different in the way LBB is implemented: * * A "soft" version, which shows a little less staircasing and a * little more haloing, and which is a little more expensive to * compute. We recommend this as the default. * * A "sharp" version, which shows a little more staircasing and a * little less haloing, and which is a little cheaper (it uses 6 * less comparisons and 12 less "? :"). * * The only difference between the two is that the "soft" versions * uses local minima and maxima computed over 3x3 square blocks, and * the "sharp" version uses local minima and maxima computed over 3x3 * crosses. * * The "sharp" version is (a little) faster. We don't know yet for * sure, but it appears that the "soft" version gives marginally * better results. * * If you want to use the "sharp" (cheaper) version, uncomment the * following three pre-processor code lines: */ /* #ifndef __NOHALO_CHEAP_H__ #define __NOHALO_CHEAP_H__ #endif */ /* * ================ * NOHALO RESAMPLER * ================ * * "Nohalo" is a resampler with a mission: smoothly straightening * oblique lines without undesirable side-effects. In particular, * without much blurring and with no added haloing. * * In this code, one Nohalo subdivision is performed. The * interpolation is finished with LBB (Locally Bounded Bicubic). * * Key properties: * * ======================= * Nohalo is interpolatory * ======================= * * That is, Nohalo preserves point values: If asked for the value at * the center of an input pixel, the sampler returns the corresponding * value, unchanged. In addition, because Nohalo is continuous, if * asked for a value at a location "very close" to the center of an * input pixel, then the sampler returns a value "very close" to * it. (Nohalo is not smoothing like, say, B-Spline * pseudo-interpolation.) * * ==================================================================== * Nohalo subdivision is co-monotone (this is why it's called "no-halo") * ==================================================================== * * One consequence of monotonicity is that additional subdivided * values are in the range of the four closest input values, which is * a form of local boundedness. (Note: plain vanilla bilinear and * nearest neighbour are also co-monotone.) LBB is also locally * bounded. Consequently, Nohalo subdivision followed by LBB is * locally bounded. When used as a finishing scheme for Nohalo, the * standard LBB bounds imply that the final interpolated value is in * the range of the nine closest input values. This property is why * there is very little added haloing, even when a finishing scheme * which is not strictly monotone. Another consequence of local * boundedness is that clamping is unnecessary (provided abyss values * are within the range of acceptable values, which is "always" the * case). * * Note: If the abyss policy is an extrapolating one---for example, * linear or bilinear extrapolation---clamping is still unnecessary * UNLESS one attempts to resample outside of the convex hull of the * input pixel positions. Consequence: the "corner" image size * convention does not require clamping when using linear * extrapolation abyss policy when performing image resizing, but the * "center" one does, when upscaling, at locations very close to the * boundary. If computing values at locations outside of the convex * hull of the pixel locations of the input image, nearest neighbour * abyss policy is most likely better anyway, because linear * extrapolation produces "streaks" if positions far outside the * original image boundary are resampled. * * ======================== * Nohalo is a local method * ======================== * * The interpolated pixel value when using Nohalo subdivision followed * by LBB only depends on the 21 (5x5 minus the four corners) closest * input values. * * =============================== * Nohalo is second order accurate * =============================== * * (Except possibly near the boundary: it is easy to make this * property carry over everywhere but this requires a tuned abyss * policy---linear extrapolation, say---or building the boundary * conditions inside the sampler.) Nohalo+LBB is exact on linear * intensity profiles, meaning that if the input pixel values (in the * stencil) are obtained from a function of the form f(x,y) = a + b*x * + c*y (a, b, c constants), then the computed pixel value is exactly * the value of f(x,y) at the asked-for sampling location. The * boundary condition which is emulated by VIPS through the "extend" * extension of the input image---this corresponds to the nearest * neighbour abyss policy---does NOT make this resampler exact on * linears near the boundary. It does, however, guarantee that no * clamping is required even when resampled values are computed at * positions outside of the extent of the input image (when * extrapolation is required). * * =================== * Nohalo is nonlinear * =================== * * Both Nohalo and LBB are nonlinear, consequently their composition * is nonlinear. In particular, resampling a sum of images may not be * the same as summing the resamples. (This occurs even without taking * into account over and underflow issues: images can only take values * within a banded range, and consequently no sampler is truly * linear.) * * ==================== * Weaknesses of Nohalo * ==================== * * In some cases, the initial subdivision computation is wasted: * * If a region is bi-chromatic, the nonlinear component of Nohalo * subdivision is zero in the interior of the region, and consequently * Nohalo subdivision boils down to bilinear. For such images, LBB is * probably a better choice. * * ========================= * Bibliographical reference * ========================= * * For more information about Nohalo (a prototype version with * bilinear finish instead of LBB), see * * CPU, SMP and GPU implementations of Nohalo level 1, a fast * co-convex antialiasing image resampler by Nicolas Robidoux, Minglun * Gong, John Cupitt, Adam Turcotte, and Kirk Martinez, in C3S2E '09: * Proceedings of the 2nd Canadian Conference on Computer Science and * Software Engineering, p. 185--195, ACM, New York, NY, USA, 2009. * http://doi.acm.org/10.1145/1557626.1557657. */ /* Uncomment to enable bounds checking for VIPS_REGION_ADDR(). */ #define DEBUG #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "templates.h" #define VIPS_TYPE_INTERPOLATE_NOHALO \ (vips_interpolate_nohalo_get_type()) #define VIPS_INTERPOLATE_NOHALO( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohalo )) #define VIPS_INTERPOLATE_NOHALO_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohaloClass)) #define VIPS_IS_INTERPOLATE_NOHALO( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE_NOHALO )) #define VIPS_IS_INTERPOLATE_NOHALO_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE_NOHALO )) #define VIPS_INTERPOLATE_NOHALO_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_INTERPOLATE_NOHALO, VipsInterpolateNohaloClass )) typedef struct _VipsInterpolateNohalo { VipsInterpolate parent_object; } VipsInterpolateNohalo; typedef struct _VipsInterpolateNohaloClass { VipsInterpolateClass parent_class; } VipsInterpolateNohaloClass; /* * NOHALO_MINMOD is an implementation of the minmod function which * only needs two "conditional moves." * NOHALO_MINMOD(a,b,a_times_a,a_times_b) "returns" * minmod(a,b). The macro parameter ("input") a_times_a is assumed to * contain the square of a; a_times_b, the product of a and b. * * For uncompressed natural images in high bit depth (images for which * the slopes a and b are unlikely to be equal to zero or be equal to * each other), or chips with good branch prediction, the following * version of the minmod function may work well: * * ( (a_times_b)>=0. ? ( (a_times_b)<(a_times_a) ? (b) : (a) ) : 0. ) * * In this version, the forward branch of the second conditional move * is taken when |b|>|a| and when a*b<0. However, the "else" branch is * taken when a=0 (or when a=b), which is why the above version is not * as effective for images with regions with constant pixel values (or * regions with pixel values which vary linearly or bilinearly) since * we apply minmod to pairs of differences. * * The following version is more suitable for images with flat * (constant) colour areas, since a, which is a pixel difference, will * often be 0, in which case both forward branches are likely. This * may be preferable if "branch flag look ahead" does not work so * well. * * ( (a_times_b)>=0. ? ( (a_times_a)<=(a_times_b) ? (a) : (b) ) : 0. ) * * This last version appears to be slightly better than the former in * speed tests performed on a recent multicore Intel chip, especially * when enlarging a sharp image by a large factor, hence the choice. */ #define NOHALO_MINMOD(a,b,a_times_a,a_times_b) \ ( ( (a_times_b)>=0. ) ? ( (a_times_a)<=(a_times_b) ? (a) : (b) ) : 0. ) /* * Absolute value and sign macros: */ #define NOHALO_ABS(x) ( ((x)>=0.) ? (x) : -(x) ) #define NOHALO_SIGN(x) ( ((x)>=0.) ? 1. : -1. ) /* * MIN and MAX macros set up so that I can put the likely winner in * the first argument (forward branch likely blah blah blah): */ #define NOHALO_MIN(x,y) ( ((x)<=(y)) ? (x) : (y) ) #define NOHALO_MAX(x,y) ( ((x)>=(y)) ? (x) : (y) ) static void inline nohalo_subdivision (const double uno_two, const double uno_thr, const double uno_fou, const double dos_one, const double dos_two, const double dos_thr, const double dos_fou, const double dos_fiv, const double tre_one, const double tre_two, const double tre_thr, const double tre_fou, const double tre_fiv, const double qua_one, const double qua_two, const double qua_thr, const double qua_fou, const double qua_fiv, const double cin_two, const double cin_thr, const double cin_fou, double* restrict uno_one_1, double* restrict uno_two_1, double* restrict uno_thr_1, double* restrict uno_fou_1, double* restrict dos_one_1, double* restrict dos_two_1, double* restrict dos_thr_1, double* restrict dos_fou_1, double* restrict tre_one_1, double* restrict tre_two_1, double* restrict tre_thr_1, double* restrict tre_fou_1, double* restrict qua_one_1, double* restrict qua_two_1, double* restrict qua_thr_1, double* restrict qua_fou_1) { /* * nohalo_subdivision calculates the missing twelve double density * pixel values, and also returns the "already known" four, so that * the sixteen values which make up the stencil of LBB are * available. */ /* * THE STENCIL OF INPUT VALUES: * * Pointer arithmetic is used to implicitly reflect the input * stencil about tre_thr---assumed closer to the sampling location * than other pixels (ties are OK)---in such a way that after * reflection the sampling point is to the bottom right of tre_thr. * * The following code and picture assumes that the stencil reflexion * has already been performed. * * (ix-1,iy-2) (ix,iy-2) (ix+1,iy-2) * =uno_two = uno_thr = uno_fou * * * * (ix-2,iy-1) (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1) * = dos_one = dos_two = dos_thr = dos_fou = dos_fiv * * * * (ix-2,iy) (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy) * = tre_one = tre_two = tre_thr = tre_fou = tre_fiv * X * * * (ix-2,iy+1) (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1) * = qua_one = qua_two = qua_thr = qua_fou = qua_fiv * * * * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2) * = cin_two = cin_thr = cin_fou * * * The above input pixel values are the ones needed in order to make * available the following values, needed by LBB: * * uno_one_1 = uno_two_1 = uno_thr_1 = uno_fou_1 = * (ix-1/2,iy-1/2) (ix,iy-1/2) (ix+1/2,iy-1/2) (ix+1,iy-1/2) * * * * * dos_one_1 = dos_two_1 = dos_thr_1 = dos_fou_1 = * (ix-1/2,iy) (ix,iy) (ix+1/2,iy) (ix+1,iy) * * X * * * tre_one_1 = tre_two_1 = tre_thr_1 = tre_fou_1 = * (ix-1/2,iy+1/2) (ix,iy+1/2) (ix+1/2,iy+1/2) (ix+1,iy+1/2) * * * * * qua_one_1 = qua_two_1 = qua_thr_1 = qua_fou_1 = * (ix-1/2,iy+1) (ix,iy+1) (ix+1/2,iy+1) (ix+1,iy+1) * */ /* * Computation of the nonlinear slopes: If two consecutive pixel * value differences have the same sign, the smallest one (in * absolute value) is taken to be the corresponding slope; if the * two consecutive pixel value differences don't have the same sign, * the corresponding slope is set to 0. * * In other words: Apply minmod to consecutive differences. */ /* * Two vertical simple differences: */ const double d_unodos_two = dos_two - uno_two; const double d_dostre_two = tre_two - dos_two; const double d_trequa_two = qua_two - tre_two; const double d_quacin_two = cin_two - qua_two; /* * Thr(ee) vertical differences: */ const double d_unodos_thr = dos_thr - uno_thr; const double d_dostre_thr = tre_thr - dos_thr; const double d_trequa_thr = qua_thr - tre_thr; const double d_quacin_thr = cin_thr - qua_thr; /* * Fou(r) vertical differences: */ const double d_unodos_fou = dos_fou - uno_fou; const double d_dostre_fou = tre_fou - dos_fou; const double d_trequa_fou = qua_fou - tre_fou; const double d_quacin_fou = cin_fou - qua_fou; /* * Dos horizontal differences: */ const double d_dos_onetwo = dos_two - dos_one; const double d_dos_twothr = dos_thr - dos_two; const double d_dos_thrfou = dos_fou - dos_thr; const double d_dos_foufiv = dos_fiv - dos_fou; /* * Tre(s) horizontal differences: */ const double d_tre_onetwo = tre_two - tre_one; const double d_tre_twothr = tre_thr - tre_two; const double d_tre_thrfou = tre_fou - tre_thr; const double d_tre_foufiv = tre_fiv - tre_fou; /* * Qua(ttro) horizontal differences: */ const double d_qua_onetwo = qua_two - qua_one; const double d_qua_twothr = qua_thr - qua_two; const double d_qua_thrfou = qua_fou - qua_thr; const double d_qua_foufiv = qua_fiv - qua_fou; /* * Recyclable vertical products and squares: */ const double d_unodos_times_dostre_two = d_unodos_two * d_dostre_two; const double d_dostre_two_sq = d_dostre_two * d_dostre_two; const double d_dostre_times_trequa_two = d_dostre_two * d_trequa_two; const double d_trequa_times_quacin_two = d_quacin_two * d_trequa_two; const double d_quacin_two_sq = d_quacin_two * d_quacin_two; const double d_unodos_times_dostre_thr = d_unodos_thr * d_dostre_thr; const double d_dostre_thr_sq = d_dostre_thr * d_dostre_thr; const double d_dostre_times_trequa_thr = d_trequa_thr * d_dostre_thr; const double d_trequa_times_quacin_thr = d_trequa_thr * d_quacin_thr; const double d_quacin_thr_sq = d_quacin_thr * d_quacin_thr; const double d_unodos_times_dostre_fou = d_unodos_fou * d_dostre_fou; const double d_dostre_fou_sq = d_dostre_fou * d_dostre_fou; const double d_dostre_times_trequa_fou = d_trequa_fou * d_dostre_fou; const double d_trequa_times_quacin_fou = d_trequa_fou * d_quacin_fou; const double d_quacin_fou_sq = d_quacin_fou * d_quacin_fou; /* * Recyclable horizontal products and squares: */ const double d_dos_onetwo_times_twothr = d_dos_onetwo * d_dos_twothr; const double d_dos_twothr_sq = d_dos_twothr * d_dos_twothr; const double d_dos_twothr_times_thrfou = d_dos_twothr * d_dos_thrfou; const double d_dos_thrfou_times_foufiv = d_dos_thrfou * d_dos_foufiv; const double d_dos_foufiv_sq = d_dos_foufiv * d_dos_foufiv; const double d_tre_onetwo_times_twothr = d_tre_onetwo * d_tre_twothr; const double d_tre_twothr_sq = d_tre_twothr * d_tre_twothr; const double d_tre_twothr_times_thrfou = d_tre_thrfou * d_tre_twothr; const double d_tre_thrfou_times_foufiv = d_tre_thrfou * d_tre_foufiv; const double d_tre_foufiv_sq = d_tre_foufiv * d_tre_foufiv; const double d_qua_onetwo_times_twothr = d_qua_onetwo * d_qua_twothr; const double d_qua_twothr_sq = d_qua_twothr * d_qua_twothr; const double d_qua_twothr_times_thrfou = d_qua_thrfou * d_qua_twothr; const double d_qua_thrfou_times_foufiv = d_qua_thrfou * d_qua_foufiv; const double d_qua_foufiv_sq = d_qua_foufiv * d_qua_foufiv; /* * Minmod slopes and first level pixel values: */ const double dos_thr_y = NOHALO_MINMOD( d_dostre_thr, d_unodos_thr, d_dostre_thr_sq, d_unodos_times_dostre_thr ); const double tre_thr_y = NOHALO_MINMOD( d_dostre_thr, d_trequa_thr, d_dostre_thr_sq, d_dostre_times_trequa_thr ); const double newval_uno_two = .5 * ( dos_thr + tre_thr ) + .25 * ( dos_thr_y - tre_thr_y ); const double qua_thr_y = NOHALO_MINMOD( d_quacin_thr, d_trequa_thr, d_quacin_thr_sq, d_trequa_times_quacin_thr ); const double newval_tre_two = .5 * ( tre_thr + qua_thr ) + .25 * ( tre_thr_y - qua_thr_y ); const double tre_fou_y = NOHALO_MINMOD( d_dostre_fou, d_trequa_fou, d_dostre_fou_sq, d_dostre_times_trequa_fou ); const double qua_fou_y = NOHALO_MINMOD( d_quacin_fou, d_trequa_fou, d_quacin_fou_sq, d_trequa_times_quacin_fou ); const double newval_tre_fou = .5 * ( tre_fou + qua_fou ) + .25 * ( tre_fou_y - qua_fou_y ); const double dos_fou_y = NOHALO_MINMOD( d_dostre_fou, d_unodos_fou, d_dostre_fou_sq, d_unodos_times_dostre_fou ); const double newval_uno_fou = .5 * ( dos_fou + tre_fou ) + .25 * (dos_fou_y - tre_fou_y ); const double tre_two_x = NOHALO_MINMOD( d_tre_twothr, d_tre_onetwo, d_tre_twothr_sq, d_tre_onetwo_times_twothr ); const double tre_thr_x = NOHALO_MINMOD( d_tre_twothr, d_tre_thrfou, d_tre_twothr_sq, d_tre_twothr_times_thrfou ); const double newval_dos_one = .5 * ( tre_two + tre_thr ) + .25 * ( tre_two_x - tre_thr_x ); const double tre_fou_x = NOHALO_MINMOD( d_tre_foufiv, d_tre_thrfou, d_tre_foufiv_sq, d_tre_thrfou_times_foufiv ); const double tre_thr_x_minus_tre_fou_x = tre_thr_x - tre_fou_x; const double newval_dos_thr = .5 * ( tre_thr + tre_fou ) + .25 * tre_thr_x_minus_tre_fou_x; const double qua_thr_x = NOHALO_MINMOD( d_qua_twothr, d_qua_thrfou, d_qua_twothr_sq, d_qua_twothr_times_thrfou ); const double qua_fou_x = NOHALO_MINMOD( d_qua_foufiv, d_qua_thrfou, d_qua_foufiv_sq, d_qua_thrfou_times_foufiv ); const double qua_thr_x_minus_qua_fou_x = qua_thr_x - qua_fou_x; const double newval_qua_thr = .5 * ( qua_thr + qua_fou ) + .25 * qua_thr_x_minus_qua_fou_x; const double qua_two_x = NOHALO_MINMOD( d_qua_twothr, d_qua_onetwo, d_qua_twothr_sq, d_qua_onetwo_times_twothr ); const double newval_qua_one = .5 * ( qua_two + qua_thr ) + .25 * ( qua_two_x - qua_thr_x ); const double newval_tre_thr = .125 * ( tre_thr_x_minus_tre_fou_x + qua_thr_x_minus_qua_fou_x ) + .5 * ( newval_tre_two + newval_tre_fou ); const double dos_thr_x = NOHALO_MINMOD( d_dos_twothr, d_dos_thrfou, d_dos_twothr_sq, d_dos_twothr_times_thrfou ); const double dos_fou_x = NOHALO_MINMOD( d_dos_foufiv, d_dos_thrfou, d_dos_foufiv_sq, d_dos_thrfou_times_foufiv ); const double newval_uno_thr = .25 * ( dos_fou - tre_thr ) + .125 * ( dos_fou_y - tre_fou_y + dos_thr_x - dos_fou_x ) + .5 * ( newval_uno_two + newval_dos_thr ); const double tre_two_y = NOHALO_MINMOD( d_dostre_two, d_trequa_two, d_dostre_two_sq, d_dostre_times_trequa_two ); const double qua_two_y = NOHALO_MINMOD( d_quacin_two, d_trequa_two, d_quacin_two_sq, d_trequa_times_quacin_two ); const double newval_tre_one = .25 * ( qua_two - tre_thr ) + .125 * ( qua_two_x - qua_thr_x + tre_two_y - qua_two_y ) + .5 * ( newval_dos_one + newval_tre_two ); const double dos_two_x = NOHALO_MINMOD( d_dos_twothr, d_dos_onetwo, d_dos_twothr_sq, d_dos_onetwo_times_twothr ); const double dos_two_y = NOHALO_MINMOD( d_dostre_two, d_unodos_two, d_dostre_two_sq, d_unodos_times_dostre_two ); const double newval_uno_one = .25 * ( dos_two + dos_thr + tre_two + tre_thr ) + .125 * ( dos_two_x - dos_thr_x + tre_two_x - tre_thr_x + dos_two_y + dos_thr_y - tre_two_y - tre_thr_y ); /* * Return the sixteen LBB stencil values: */ *uno_one_1 = newval_uno_one; *uno_two_1 = newval_uno_two; *uno_thr_1 = newval_uno_thr; *uno_fou_1 = newval_uno_fou; *dos_one_1 = newval_dos_one; *dos_two_1 = tre_thr; *dos_thr_1 = newval_dos_thr; *dos_fou_1 = tre_fou; *tre_one_1 = newval_tre_one; *tre_two_1 = newval_tre_two; *tre_thr_1 = newval_tre_thr; *tre_fou_1 = newval_tre_fou; *qua_one_1 = newval_qua_one; *qua_two_1 = qua_thr; *qua_thr_1 = newval_qua_thr; *qua_fou_1 = qua_fou; } /* * LBB (Locally Bounded Bicubic) is a high quality nonlinear variant * of Catmull-Rom. Images resampled with LBB have much smaller halos * than images resampled with windowed sincs or other interpolatory * cubic spline filters. Specifically, LBB halos are narrower and the * over/undershoot amplitude is smaller. This is accomplished without * a significant reduction in the smoothness of the result (compared * to Catmull-Rom). * * Another important property is that the resampled values are * contained within the range of nearby input values. Consequently, no * final clamping is needed to stay "in range" (e.g., 0-255 for * standard 8-bit images). * * LBB was developed by N. Robidoux and C. Racette of the Department * of Mathematics and Computer Science of Laurentian University in the * course of C.'s Masters Thesis in Computational Sciences. */ /* * LBB is a novel method with the following properties: * * --LBB is a Hermite bicubic method: The bicubic surface is defined, * one convex hull of four nearby input points at a time, using four * point values, four x-derivatives, four y-derivatives, and four * cross-derivatives. * * --The stencil for values in a square patch is the usual 4x4. * * --LBB is interpolatory. * * --It is C^1 with continuous cross derivatives. * * --When the limiters are inactive, LBB gives the same results as * Catmull-Rom. * * --When used on binary images, LBB gives results similar to bicubic * Hermite with all first derivatives---but not necessarily the * cross derivatives--at the input pixel locations set to zero. * * --The LBB reconstruction is locally bounded: Over each square * patch, the surface is contained between the minimum and the * maximum values among the 16 nearest input pixel values (those in * the stencil). * * --Consequently, the LBB reconstruction is globally bounded between * the very smallest input pixel value and the very largest input * pixel value. (It is not necessary to clamp results.) * * The LBB method is based on the method of Ken Brodlie, Petros * Mashwama and Sohail Butt for constraining Hermite interpolants * between globally defined planes: * * Visualization of surface data to preserve positivity and other * simple constraints. Computer & Graphics, Vol. 19, Number 4, pages * 585-594, 1995. DOI: 10.1016/0097-8493(95)00036-C. * * Instead of forcing the reconstructed surface to lie between two * GLOBALLY defined planes, LBB constrains one patch at a time to lie * between LOCALLY defined planes. This is accomplished by * constraining the derivatives (x, y and cross) at each input pixel * location so that if the constraint was applied everywhere the * surface would fit between the min and max of the values at the 9 * closest pixel locations. Because this is done with each of the four * pixel locations which define the bicubic patch, this forces the * reconstructed surface to lie between the min and max of the values * at the 16 closest values pixel locations. (Each corner defines its * own 3x3 subgroup of the 4x4 stencil. Consequently, the surface is * necessarily above the minimum of the four minima, which happens to * be the minimum over the 4x4. Similarly with the maxima.) * * The above paragraph described the "soft" version of LBB. The * "sharp" version is similar. */ static inline double lbbicubic( const double c00, const double c10, const double c01, const double c11, const double c00dx, const double c10dx, const double c01dx, const double c11dx, const double c00dy, const double c10dy, const double c01dy, const double c11dy, const double c00dxdy, const double c10dxdy, const double c01dxdy, const double c11dxdy, const double uno_one, const double uno_two, const double uno_thr, const double uno_fou, const double dos_one, const double dos_two, const double dos_thr, const double dos_fou, const double tre_one, const double tre_two, const double tre_thr, const double tre_fou, const double qua_one, const double qua_two, const double qua_thr, const double qua_fou ) { /* * STENCIL (FOOTPRINT) OF INPUT VALUES: * * The stencil of LBB is the same as for any standard Hermite * bicubic (e.g., Catmull-Rom): * * (ix-1,iy-1) (ix,iy-1) (ix+1,iy-1) (ix+2,iy-1) * = uno_one = uno_two = uno_thr = uno_fou * * (ix-1,iy) (ix,iy) (ix+1,iy) (ix+2,iy) * = dos_one = dos_two = dos_thr = dos_fou * X * (ix-1,iy+1) (ix,iy+1) (ix+1,iy+1) (ix+2,iy+1) * = tre_one = tre_two = tre_thr = tre_fou * * (ix-1,iy+2) (ix,iy+2) (ix+1,iy+2) (ix+2,iy+2) * = qua_one = qua_two = qua_thr = qua_fou * * where ix is the (pseudo-)floor of the requested left-to-right * location ("X"), and iy is the floor of the requested up-to-down * location. */ #if defined (__NOHALO_CHEAP_H__) /* * Computation of the four min and four max over 3x3 input data * sub-crosses of the 4x4 input stencil. * * We exploit the fact that the data comes from the (co-monotone) * method Nohalo so that it is known ahead of time that * * dos_thr is between dos_two and dos_fou * * tre_two is between dos_two and qua_two * * tre_fou is between dos_fou and qua_fou * * qua_thr is between qua_two and qua_fou * * tre_thr is in the convex hull of dos_two, dos_fou, qua_two and qua_fou * * to minimize the number of flags and conditional moves. * * (The "between" are not strict: "a between b and c" means * * "min(b,c) <= a <= max(b,c)".) * * We have, however, succeeded in eliminating one flag computation * (one comparison) and one use of an intermediate result. See the * two commented out lines below. * * Overall, only 20 comparisons and 28 "? :" are needed (to compute * 4 mins and 4 maxes). If you can figure how to do this more * efficiently, let us know. */ const double m1 = (uno_two <= tre_two) ? uno_two : tre_two ; const double M1 = (uno_two <= tre_two) ? tre_two : uno_two ; const double m2 = (dos_thr <= qua_thr) ? dos_thr : qua_thr ; const double M2 = (dos_thr <= qua_thr) ? qua_thr : dos_thr ; const double m3 = (dos_two <= dos_fou) ? dos_two : dos_fou ; const double M3 = (dos_two <= dos_fou) ? dos_fou : dos_two ; const double m4 = (uno_thr <= tre_thr) ? uno_thr : tre_thr ; const double M4 = (uno_thr <= tre_thr) ? tre_thr : uno_thr ; const double m5 = (dos_two <= qua_two) ? dos_two : qua_two ; const double M5 = (dos_two <= qua_two) ? qua_two : dos_two ; const double m6 = (tre_one <= tre_thr) ? tre_one : tre_thr ; const double M6 = (tre_one <= tre_thr) ? tre_thr : tre_one ; const double m7 = (dos_one <= dos_thr) ? dos_one : dos_thr ; const double M7 = (dos_one <= dos_thr) ? dos_thr : dos_one ; const double m8 = (tre_two <= tre_fou) ? tre_two : tre_fou ; const double M8 = (tre_two <= tre_fou) ? tre_fou : tre_two ; const double m9 = NOHALO_MIN( m1, dos_two ); const double M9 = NOHALO_MAX( M1, dos_two ); const double m10 = NOHALO_MIN( m2, tre_thr ); const double M10 = NOHALO_MAX( M2, tre_thr ); const double min10 = NOHALO_MIN( m3, m4 ); const double max10 = NOHALO_MAX( M3, M4 ); const double min01 = NOHALO_MIN( m5, m6 ); const double max01 = NOHALO_MAX( M5, M6 ); const double min00 = NOHALO_MIN( m9, m7 ); const double max00 = NOHALO_MAX( M9, M7 ); const double min11 = NOHALO_MIN( m10, m8 ); const double max11 = NOHALO_MAX( M10, M8 ); #else /* * Computation of the four min and four max over 3x3 input data * sub-blocks of the 4x4 input stencil. * * Surprisingly, we have not succeeded in reducing the number of "? * :" needed by using the fact that the data comes from the * (co-monotone) method Nohalo so that it is known ahead of time * that * * dos_thr is between dos_two and dos_fou * * tre_two is between dos_two and qua_two * * tre_fou is between dos_fou and qua_fou * * qua_thr is between qua_two and qua_fou * * tre_thr is in the convex hull of dos_two, dos_fou, qua_two and qua_fou * * to minimize the number of flags and conditional moves. * * (The "between" are not strict: "a between b and c" means * * "min(b,c) <= a <= max(b,c)".) * * We have, however, succeeded in eliminating one flag computation * (one comparison) and one use of an intermediate result. See the * two commented out lines below. * * Overall, only 27 comparisons are needed (to compute 4 mins and 4 * maxes!). Without the simplification, 28 comparisons would be * used. Either way, the number of "? :" used is 34. If you can * figure how to do this more efficiently, let us know. */ const double m1 = (dos_two <= dos_thr) ? dos_two : dos_thr ; const double M1 = (dos_two <= dos_thr) ? dos_thr : dos_two ; const double m2 = (tre_two <= tre_thr) ? tre_two : tre_thr ; const double M2 = (tre_two <= tre_thr) ? tre_thr : tre_two ; const double m4 = (qua_two <= qua_thr) ? qua_two : qua_thr ; const double M4 = (qua_two <= qua_thr) ? qua_thr : qua_two ; const double m3 = (uno_two <= uno_thr) ? uno_two : uno_thr ; const double M3 = (uno_two <= uno_thr) ? uno_thr : uno_two ; const double m5 = NOHALO_MIN( m1, m2 ); const double M5 = NOHALO_MAX( M1, M2 ); const double m6 = (dos_one <= tre_one) ? dos_one : tre_one ; const double M6 = (dos_one <= tre_one) ? tre_one : dos_one ; const double m7 = (dos_fou <= tre_fou) ? dos_fou : tre_fou ; const double M7 = (dos_fou <= tre_fou) ? tre_fou : dos_fou ; const double m13 = (dos_fou <= qua_fou) ? dos_fou : qua_fou ; const double M13 = (dos_fou <= qua_fou) ? qua_fou : dos_fou ; /* * Because the data comes from Nohalo subdivision, the following two * lines can be replaced by the above, simpler, two lines without * changing the results. * * const double m13 = NOHALO_MIN( m7, qua_fou ); * const double M13 = NOHALO_MAX( M7, qua_fou ); * * This also allows reodering the comparisons to put space between * the computation of a result and its use. */ const double m9 = NOHALO_MIN( m5, m4 ); const double M9 = NOHALO_MAX( M5, M4 ); const double m11 = NOHALO_MIN( m6, qua_one ); const double M11 = NOHALO_MAX( M6, qua_one ); const double m10 = NOHALO_MIN( m6, uno_one ); const double M10 = NOHALO_MAX( M6, uno_one ); const double m8 = NOHALO_MIN( m5, m3 ); const double M8 = NOHALO_MAX( M5, M3 ); const double m12 = NOHALO_MIN( m7, uno_fou ); const double M12 = NOHALO_MAX( M7, uno_fou ); const double min11 = NOHALO_MIN( m9, m13 ); const double max11 = NOHALO_MAX( M9, M13 ); const double min01 = NOHALO_MIN( m9, m11 ); const double max01 = NOHALO_MAX( M9, M11 ); const double min00 = NOHALO_MIN( m8, m10 ); const double max00 = NOHALO_MAX( M8, M10 ); const double min10 = NOHALO_MIN( m8, m12 ); const double max10 = NOHALO_MAX( M8, M12 ); #endif /* * The remainder of the "per channel" computation involves the * computation of: * * --8 conditional moves, * * --8 signs (in which the sign of zero is unimportant), * * --12 minima of two values, * * --8 maxima of two values, * * --8 absolute values, * * for a grand total of 29 minima, 25 maxima, 8 conditional moves, 8 * signs, and 8 absolute values. If everything is done with * conditional moves, "only" 28+8+8+12+8+8=72 flags are involved * (because initial min and max can be computed with one flag). * * The "per channel" part of the computation also involves 107 * arithmetic operations (54 *, 21 +, 42 -). */ /* * Distances to the local min and max: */ const double u11 = tre_thr - min11; const double v11 = max11 - tre_thr; const double u01 = tre_two - min01; const double v01 = max01 - tre_two; const double u00 = dos_two - min00; const double v00 = max00 - dos_two; const double u10 = dos_thr - min10; const double v10 = max10 - dos_thr; /* * Initial values of the derivatives computed with centered * differences. Factors of 1/2 are left out because they are folded * in later: */ const double dble_dzdx00i = dos_thr - dos_one; const double dble_dzdy11i = qua_thr - dos_thr; const double dble_dzdx10i = dos_fou - dos_two; const double dble_dzdy01i = qua_two - dos_two; const double dble_dzdx01i = tre_thr - tre_one; const double dble_dzdy10i = tre_thr - uno_thr; const double dble_dzdx11i = tre_fou - tre_two; const double dble_dzdy00i = tre_two - uno_two; /* * Signs of the derivatives. The upcoming clamping does not change * them (except if the clamping sends a negative derivative to 0, in * which case the sign does not matter anyway). */ const double sign_dzdx00 = NOHALO_SIGN( dble_dzdx00i ); const double sign_dzdx10 = NOHALO_SIGN( dble_dzdx10i ); const double sign_dzdx01 = NOHALO_SIGN( dble_dzdx01i ); const double sign_dzdx11 = NOHALO_SIGN( dble_dzdx11i ); const double sign_dzdy00 = NOHALO_SIGN( dble_dzdy00i ); const double sign_dzdy10 = NOHALO_SIGN( dble_dzdy10i ); const double sign_dzdy01 = NOHALO_SIGN( dble_dzdy01i ); const double sign_dzdy11 = NOHALO_SIGN( dble_dzdy11i ); /* * Initial values of the cross-derivatives. Factors of 1/4 are left * out because folded in later: */ const double quad_d2zdxdy00i = uno_one - uno_thr + dble_dzdx01i; const double quad_d2zdxdy10i = uno_two - uno_fou + dble_dzdx11i; const double quad_d2zdxdy01i = qua_thr - qua_one - dble_dzdx00i; const double quad_d2zdxdy11i = qua_fou - qua_two - dble_dzdx10i; /* * Slope limiters. The key multiplier is 3 but we fold a factor of * 2, hence 6: */ const double dble_slopelimit_00 = 6.0 * NOHALO_MIN( u00, v00 ); const double dble_slopelimit_10 = 6.0 * NOHALO_MIN( u10, v10 ); const double dble_slopelimit_01 = 6.0 * NOHALO_MIN( u01, v01 ); const double dble_slopelimit_11 = 6.0 * NOHALO_MIN( u11, v11 ); /* * Clamped first derivatives: */ const double dble_dzdx00 = ( sign_dzdx00 * dble_dzdx00i <= dble_slopelimit_00 ) ? dble_dzdx00i : sign_dzdx00 * dble_slopelimit_00; const double dble_dzdy00 = ( sign_dzdy00 * dble_dzdy00i <= dble_slopelimit_00 ) ? dble_dzdy00i : sign_dzdy00 * dble_slopelimit_00; const double dble_dzdx10 = ( sign_dzdx10 * dble_dzdx10i <= dble_slopelimit_10 ) ? dble_dzdx10i : sign_dzdx10 * dble_slopelimit_10; const double dble_dzdy10 = ( sign_dzdy10 * dble_dzdy10i <= dble_slopelimit_10 ) ? dble_dzdy10i : sign_dzdy10 * dble_slopelimit_10; const double dble_dzdx01 = ( sign_dzdx01 * dble_dzdx01i <= dble_slopelimit_01 ) ? dble_dzdx01i : sign_dzdx01 * dble_slopelimit_01; const double dble_dzdy01 = ( sign_dzdy01 * dble_dzdy01i <= dble_slopelimit_01 ) ? dble_dzdy01i : sign_dzdy01 * dble_slopelimit_01; const double dble_dzdx11 = ( sign_dzdx11 * dble_dzdx11i <= dble_slopelimit_11 ) ? dble_dzdx11i : sign_dzdx11 * dble_slopelimit_11; const double dble_dzdy11 = ( sign_dzdy11 * dble_dzdy11i <= dble_slopelimit_11 ) ? dble_dzdy11i : sign_dzdy11 * dble_slopelimit_11; /* * Sums and differences of first derivatives: */ const double twelve_sum00 = 6.0 * ( dble_dzdx00 + dble_dzdy00 ); const double twelve_dif00 = 6.0 * ( dble_dzdx00 - dble_dzdy00 ); const double twelve_sum10 = 6.0 * ( dble_dzdx10 + dble_dzdy10 ); const double twelve_dif10 = 6.0 * ( dble_dzdx10 - dble_dzdy10 ); const double twelve_sum01 = 6.0 * ( dble_dzdx01 + dble_dzdy01 ); const double twelve_dif01 = 6.0 * ( dble_dzdx01 - dble_dzdy01 ); const double twelve_sum11 = 6.0 * ( dble_dzdx11 + dble_dzdy11 ); const double twelve_dif11 = 6.0 * ( dble_dzdx11 - dble_dzdy11 ); /* * Absolute values of the sums: */ const double twelve_abs_sum00 = NOHALO_ABS( twelve_sum00 ); const double twelve_abs_sum10 = NOHALO_ABS( twelve_sum10 ); const double twelve_abs_sum01 = NOHALO_ABS( twelve_sum01 ); const double twelve_abs_sum11 = NOHALO_ABS( twelve_sum11 ); /* * Scaled distances to the min: */ const double u00_times_36 = 36.0 * u00; const double u10_times_36 = 36.0 * u10; const double u01_times_36 = 36.0 * u01; const double u11_times_36 = 36.0 * u11; /* * First cross-derivative limiter: */ const double first_limit00 = twelve_abs_sum00 - u00_times_36; const double first_limit10 = twelve_abs_sum10 - u10_times_36; const double first_limit01 = twelve_abs_sum01 - u01_times_36; const double first_limit11 = twelve_abs_sum11 - u11_times_36; const double quad_d2zdxdy00ii = NOHALO_MAX( quad_d2zdxdy00i, first_limit00 ); const double quad_d2zdxdy10ii = NOHALO_MAX( quad_d2zdxdy10i, first_limit10 ); const double quad_d2zdxdy01ii = NOHALO_MAX( quad_d2zdxdy01i, first_limit01 ); const double quad_d2zdxdy11ii = NOHALO_MAX( quad_d2zdxdy11i, first_limit11 ); /* * Scaled distances to the max: */ const double v00_times_36 = 36.0 * v00; const double v10_times_36 = 36.0 * v10; const double v01_times_36 = 36.0 * v01; const double v11_times_36 = 36.0 * v11; /* * Second cross-derivative limiter: */ const double second_limit00 = v00_times_36 - twelve_abs_sum00; const double second_limit10 = v10_times_36 - twelve_abs_sum10; const double second_limit01 = v01_times_36 - twelve_abs_sum01; const double second_limit11 = v11_times_36 - twelve_abs_sum11; const double quad_d2zdxdy00iii = NOHALO_MIN( quad_d2zdxdy00ii, second_limit00 ); const double quad_d2zdxdy10iii = NOHALO_MIN( quad_d2zdxdy10ii, second_limit10 ); const double quad_d2zdxdy01iii = NOHALO_MIN( quad_d2zdxdy01ii, second_limit01 ); const double quad_d2zdxdy11iii = NOHALO_MIN( quad_d2zdxdy11ii, second_limit11 ); /* * Absolute values of the differences: */ const double twelve_abs_dif00 = NOHALO_ABS( twelve_dif00 ); const double twelve_abs_dif10 = NOHALO_ABS( twelve_dif10 ); const double twelve_abs_dif01 = NOHALO_ABS( twelve_dif01 ); const double twelve_abs_dif11 = NOHALO_ABS( twelve_dif11 ); /* * Third cross-derivative limiter: */ const double third_limit00 = twelve_abs_dif00 - v00_times_36; const double third_limit10 = twelve_abs_dif10 - v10_times_36; const double third_limit01 = twelve_abs_dif01 - v01_times_36; const double third_limit11 = twelve_abs_dif11 - v11_times_36; const double quad_d2zdxdy00iiii = NOHALO_MAX( quad_d2zdxdy00iii, third_limit00); const double quad_d2zdxdy10iiii = NOHALO_MAX( quad_d2zdxdy10iii, third_limit10); const double quad_d2zdxdy01iiii = NOHALO_MAX( quad_d2zdxdy01iii, third_limit01); const double quad_d2zdxdy11iiii = NOHALO_MAX( quad_d2zdxdy11iii, third_limit11); /* * Fourth cross-derivative limiter: */ const double fourth_limit00 = u00_times_36 - twelve_abs_dif00; const double fourth_limit10 = u10_times_36 - twelve_abs_dif10; const double fourth_limit01 = u01_times_36 - twelve_abs_dif01; const double fourth_limit11 = u11_times_36 - twelve_abs_dif11; const double quad_d2zdxdy00 = NOHALO_MIN( quad_d2zdxdy00iiii, fourth_limit00); const double quad_d2zdxdy10 = NOHALO_MIN( quad_d2zdxdy10iiii, fourth_limit10); const double quad_d2zdxdy01 = NOHALO_MIN( quad_d2zdxdy01iiii, fourth_limit01); const double quad_d2zdxdy11 = NOHALO_MIN( quad_d2zdxdy11iiii, fourth_limit11); /* * Part of the result which does not need derivatives: */ const double newval1 = c00 * dos_two + c10 * dos_thr + c01 * tre_two + c11 * tre_thr; /* * Twice the part of the result which only needs first derivatives. */ const double newval2 = c00dx * dble_dzdx00 + c10dx * dble_dzdx10 + c01dx * dble_dzdx01 + c11dx * dble_dzdx11 + c00dy * dble_dzdy00 + c10dy * dble_dzdy10 + c01dy * dble_dzdy01 + c11dy * dble_dzdy11; /* * Four times the part of the result which only uses cross * derivatives: */ const double newval3 = c00dxdy * quad_d2zdxdy00 + c10dxdy * quad_d2zdxdy10 + c01dxdy * quad_d2zdxdy01 + c11dxdy * quad_d2zdxdy11; const double newval = newval1 + .5 * newval2 + .25 * newval3; return newval; } /* * Call Nohalo+LBB with a careful type conversion as a parameter. * * It would be nice to do this with templates somehow---for one thing * this would allow code comments!---but we can't figure a clean way * to do it. */ #define NOHALO_CONVERSION( conversion ) \ template static void inline \ nohalo_ ## conversion( void* restrict pout, \ const void* restrict pin, \ const int bands, \ const int lskip, \ const double x_0, \ const double y_0 ) \ { \ T* restrict out = (T *) pout; \ \ const T* restrict in = (T *) pin; \ \ \ const int sign_of_x_0 = 2 * ( x_0 >= 0. ) - 1; \ const int sign_of_y_0 = 2 * ( y_0 >= 0. ) - 1; \ \ \ const int shift_forw_1_pix = sign_of_x_0 * bands; \ const int shift_forw_1_row = sign_of_y_0 * lskip; \ \ const int shift_back_1_pix = -shift_forw_1_pix; \ const int shift_back_1_row = -shift_forw_1_row; \ \ const int shift_back_2_pix = 2 * shift_back_1_pix; \ const int shift_back_2_row = 2 * shift_back_1_row; \ const int shift_forw_2_pix = 2 * shift_forw_1_pix; \ const int shift_forw_2_row = 2 * shift_forw_1_row; \ \ \ const int uno_two_shift = shift_back_1_pix + shift_back_2_row; \ const int uno_thr_shift = shift_back_2_row; \ const int uno_fou_shift = shift_forw_1_pix + shift_back_2_row; \ \ const int dos_one_shift = shift_back_2_pix + shift_back_1_row; \ const int dos_two_shift = shift_back_1_pix + shift_back_1_row; \ const int dos_thr_shift = shift_back_1_row; \ const int dos_fou_shift = shift_forw_1_pix + shift_back_1_row; \ const int dos_fiv_shift = shift_forw_2_pix + shift_back_1_row; \ \ const int tre_one_shift = shift_back_2_pix; \ const int tre_two_shift = shift_back_1_pix; \ const int tre_thr_shift = 0; \ const int tre_fou_shift = shift_forw_1_pix; \ const int tre_fiv_shift = shift_forw_2_pix; \ \ const int qua_one_shift = shift_back_2_pix + shift_forw_1_row; \ const int qua_two_shift = shift_back_1_pix + shift_forw_1_row; \ const int qua_thr_shift = shift_forw_1_row; \ const int qua_fou_shift = shift_forw_1_pix + shift_forw_1_row; \ const int qua_fiv_shift = shift_forw_2_pix + shift_forw_1_row; \ \ const int cin_two_shift = shift_back_1_pix + shift_forw_2_row; \ const int cin_thr_shift = shift_forw_2_row; \ const int cin_fou_shift = shift_forw_1_pix + shift_forw_2_row; \ \ \ const double xp1over2 = ( 2 * sign_of_x_0 ) * x_0; \ const double xm1over2 = xp1over2 - 1.0; \ const double onepx = 0.5 + xp1over2; \ const double onemx = 1.5 - xp1over2; \ const double xp1over2sq = xp1over2 * xp1over2; \ \ const double yp1over2 = ( 2 * sign_of_y_0 ) * y_0; \ const double ym1over2 = yp1over2 - 1.0; \ const double onepy = 0.5 + yp1over2; \ const double onemy = 1.5 - yp1over2; \ const double yp1over2sq = yp1over2 * yp1over2; \ \ const double xm1over2sq = xm1over2 * xm1over2; \ const double ym1over2sq = ym1over2 * ym1over2; \ \ const double twice1px = onepx + onepx; \ const double twice1py = onepy + onepy; \ const double twice1mx = onemx + onemx; \ const double twice1my = onemy + onemy; \ \ const double xm1over2sq_times_ym1over2sq = xm1over2sq * ym1over2sq; \ const double xp1over2sq_times_ym1over2sq = xp1over2sq * ym1over2sq; \ const double xp1over2sq_times_yp1over2sq = xp1over2sq * yp1over2sq; \ const double xm1over2sq_times_yp1over2sq = xm1over2sq * yp1over2sq; \ \ const double four_times_1px_times_1py = twice1px * twice1py; \ const double four_times_1mx_times_1py = twice1mx * twice1py; \ const double twice_xp1over2_times_1py = xp1over2 * twice1py; \ const double twice_xm1over2_times_1py = xm1over2 * twice1py; \ \ const double twice_xm1over2_times_1my = xm1over2 * twice1my; \ const double twice_xp1over2_times_1my = xp1over2 * twice1my; \ const double four_times_1mx_times_1my = twice1mx * twice1my; \ const double four_times_1px_times_1my = twice1px * twice1my; \ \ const double twice_1px_times_ym1over2 = twice1px * ym1over2; \ const double twice_1mx_times_ym1over2 = twice1mx * ym1over2; \ const double xp1over2_times_ym1over2 = xp1over2 * ym1over2; \ const double xm1over2_times_ym1over2 = xm1over2 * ym1over2; \ \ const double xm1over2_times_yp1over2 = xm1over2 * yp1over2; \ const double xp1over2_times_yp1over2 = xp1over2 * yp1over2; \ const double twice_1mx_times_yp1over2 = twice1mx * yp1over2; \ const double twice_1px_times_yp1over2 = twice1px * yp1over2; \ \ \ const double c00 = \ four_times_1px_times_1py * xm1over2sq_times_ym1over2sq; \ const double c00dx = \ twice_xp1over2_times_1py * xm1over2sq_times_ym1over2sq; \ const double c00dy = \ twice_1px_times_yp1over2 * xm1over2sq_times_ym1over2sq; \ const double c00dxdy = \ xp1over2_times_yp1over2 * xm1over2sq_times_ym1over2sq; \ \ const double c10 = \ four_times_1mx_times_1py * xp1over2sq_times_ym1over2sq; \ const double c10dx = \ twice_xm1over2_times_1py * xp1over2sq_times_ym1over2sq; \ const double c10dy = \ twice_1mx_times_yp1over2 * xp1over2sq_times_ym1over2sq; \ const double c10dxdy = \ xm1over2_times_yp1over2 * xp1over2sq_times_ym1over2sq; \ \ const double c01 = \ four_times_1px_times_1my * xm1over2sq_times_yp1over2sq; \ const double c01dx = \ twice_xp1over2_times_1my * xm1over2sq_times_yp1over2sq; \ const double c01dy = \ twice_1px_times_ym1over2 * xm1over2sq_times_yp1over2sq; \ const double c01dxdy = \ xp1over2_times_ym1over2 * xm1over2sq_times_yp1over2sq; \ \ const double c11 = \ four_times_1mx_times_1my * xp1over2sq_times_yp1over2sq; \ const double c11dx = \ twice_xm1over2_times_1my * xp1over2sq_times_yp1over2sq; \ const double c11dy = \ twice_1mx_times_ym1over2 * xp1over2sq_times_yp1over2sq; \ const double c11dxdy = \ xm1over2_times_ym1over2 * xp1over2sq_times_yp1over2sq; \ \ \ int band = bands; \ \ \ do \ { \ double uno_one, uno_two, uno_thr, uno_fou; \ double dos_one, dos_two, dos_thr, dos_fou; \ double tre_one, tre_two, tre_thr, tre_fou; \ double qua_one, qua_two, qua_thr, qua_fou; \ \ nohalo_subdivision( in[ uno_two_shift ], \ in[ uno_thr_shift ], \ in[ uno_fou_shift ], \ in[ dos_one_shift ], \ in[ dos_two_shift ], \ in[ dos_thr_shift ], \ in[ dos_fou_shift ], \ in[ dos_fiv_shift ], \ in[ tre_one_shift ], \ in[ tre_two_shift ], \ in[ tre_thr_shift ], \ in[ tre_fou_shift ], \ in[ tre_fiv_shift ], \ in[ qua_one_shift ], \ in[ qua_two_shift ], \ in[ qua_thr_shift ], \ in[ qua_fou_shift ], \ in[ qua_fiv_shift ], \ in[ cin_two_shift ], \ in[ cin_thr_shift ], \ in[ cin_fou_shift ], \ &uno_one, \ &uno_two, \ &uno_thr, \ &uno_fou, \ &dos_one, \ &dos_two, \ &dos_thr, \ &dos_fou, \ &tre_one, \ &tre_two, \ &tre_thr, \ &tre_fou, \ &qua_one, \ &qua_two, \ &qua_thr, \ &qua_fou ); \ \ const double double_result = \ lbbicubic( c00, \ c10, \ c01, \ c11, \ c00dx, \ c10dx, \ c01dx, \ c11dx, \ c00dy, \ c10dy, \ c01dy, \ c11dy, \ c00dxdy, \ c10dxdy, \ c01dxdy, \ c11dxdy, \ uno_one, \ uno_two, \ uno_thr, \ uno_fou, \ dos_one, \ dos_two, \ dos_thr, \ dos_fou, \ tre_one, \ tre_two, \ tre_thr, \ tre_fou, \ qua_one, \ qua_two, \ qua_thr, \ qua_fou ); \ \ { \ const T result = to_ ## conversion( double_result ); \ in++; \ *out++ = result; \ } \ \ } while (--band); \ } NOHALO_CONVERSION( fptypes ) NOHALO_CONVERSION( withsign ) NOHALO_CONVERSION( nosign ) #define CALL( T, conversion ) \ nohalo_ ## conversion( out, \ p, \ bands, \ lskip, \ relative_x, \ relative_y ); /* * We need C linkage: */ extern "C" { G_DEFINE_TYPE( VipsInterpolateNohalo, vips_interpolate_nohalo, VIPS_TYPE_INTERPOLATE ); } static void vips_interpolate_nohalo_interpolate( VipsInterpolate* restrict interpolate, void* restrict out, VipsRegion* restrict in, double absolute_x, double absolute_y ) { /* absolute_x and absolute_y are always >= 2.0 (see double-check assert * below), so we don't need floor(). * * It's 2 not 0 since we ask for a window_offset of 2 at the bottom. */ const int ix = (int) (absolute_x + 0.5); const int iy = (int) (absolute_y + 0.5); /* * Move the pointer to (the first band of) the top/left pixel of the * 2x2 group of pixel centers which contains the sampling location * in its convex hull: */ const VipsPel* restrict p = VIPS_REGION_ADDR( in, ix, iy ); const double relative_x = absolute_x - ix; const double relative_y = absolute_y - iy; /* * VIPS versions of Nicolas's pixel addressing values. */ const int lskip = VIPS_REGION_LSKIP( in ) / VIPS_IMAGE_SIZEOF_ELEMENT( in->im ); /* * Double the bands for complex images to account for the real and * imaginary parts being computed independently: */ const int actual_bands = in->im->Bands; const int bands = vips_bandfmt_iscomplex( in->im->BandFmt ) ? 2 * actual_bands : actual_bands; /* Confirm that absolute_x and absolute_y are >= 2, see above. */ g_assert( absolute_x >= 2.0 ); g_assert( absolute_y >= 2.0 ); switch( in->im->BandFmt ) { case VIPS_FORMAT_UCHAR: CALL( unsigned char, nosign ); break; case VIPS_FORMAT_CHAR: CALL( signed char, withsign ); break; case VIPS_FORMAT_USHORT: CALL( unsigned short, nosign ); break; case VIPS_FORMAT_SHORT: CALL( signed short, withsign ); break; case VIPS_FORMAT_UINT: CALL( unsigned int, nosign ); break; case VIPS_FORMAT_INT: CALL( signed int, withsign ); break; /* * Complex images are handled by doubling of bands. */ case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_COMPLEX: CALL( float, fptypes ); break; case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DPCOMPLEX: CALL( double, fptypes ); break; default: g_assert( 0 ); break; } } static void vips_interpolate_nohalo_class_init( VipsInterpolateNohaloClass *klass ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( klass ); VipsInterpolateClass *interpolate_class = VIPS_INTERPOLATE_CLASS( klass ); object_class->nickname = "nohalo"; object_class->description = _( "Edge sharpening resampler with halo reduction" ); interpolate_class->interpolate = vips_interpolate_nohalo_interpolate; interpolate_class->window_size = 5; interpolate_class->window_offset = 2; } static void vips_interpolate_nohalo_init( VipsInterpolateNohalo *nohalo ) { } vips-7.38.5/libvips/arithmetic/0000755000175000017500000000000012303146330013374 500000000000000vips-7.38.5/libvips/arithmetic/abs.c0000644000175000017500000001473212303140253014232 00000000000000/* absolute value * * Copyright: 1990, N. Dessipris, based on im_powtra() * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 5/5/93 J.Cupitt * - adapted from im_lintra to work with partial images * - complex and signed support added * 30/6/93 JC * - adapted for partial v2 * - ANSI conversion * - spe29873r6k3h()**!@lling errors removed * 9/2/95 JC * - adapted for im_wrap... * 20/6/02 JC * - tiny speed up * 8/12/06 * - add liboil support * 28/8/09 * - gtkdoc * - tiny polish * 31/7/10 * - remove liboil * 6/11/11 * - redone as a class * 3/12/13 * - add orc, though the speed improvement vs. gcc's auto-vectorizer * seems very marginal */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "unary.h" typedef VipsUnary VipsAbs; typedef VipsUnaryClass VipsAbsClass; G_DEFINE_TYPE( VipsAbs, vips_abs, VIPS_TYPE_UNARY ); static int vips_abs_build( VipsObject *object ) { VipsUnary *unary = (VipsUnary *) object; if( unary->in && vips_band_format_isuint( unary->in->BandFmt ) ) return( vips_unary_copy( unary ) ); if( VIPS_OBJECT_CLASS( vips_abs_parent_class )->build( object ) ) return( -1 ); return( 0 ); } /* Integer abs operation: just test and negate. */ #define ABS_INT( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ int x; \ \ for( x = 0; x < sz; x++ ) \ q[x] = p[x] < 0 ? 0 - p[x] : p[x]; \ } /* Float abs operation: call fabs(). */ #define ABS_FLOAT( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ int x; \ \ for( x = 0; x < sz; x++ ) \ q[x] = fabs( p[x] ); \ } /* Complex abs operation: calculate modulus. */ #ifdef HAVE_HYPOT #define ABS_COMPLEX( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ int x; \ \ for( x = 0; x < sz; x++ ) { \ q[x] = hypot( p[0], p[1] ); \ p += 2; \ } \ } #else /*HAVE_HYPOT*/ #define ABS_COMPLEX( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ int x; \ \ for( x = 0; x < sz; x++ ) { \ double rp = p[0]; \ double ip = p[1]; \ double abs_rp = fabs( rp ); \ double abs_ip = fabs( ip ); \ \ if( abs_rp > abs_ip ) { \ double temp = ip / rp; \ \ q[x] = abs_rp * sqrt( 1.0 + temp * temp ); \ } \ else { \ double temp = rp / ip; \ \ q[x] = abs_ip * sqrt( 1.0 + temp * temp ); \ } \ \ p += 2; \ } \ } #endif /*HAVE_HYPOT*/ static void vips_abs_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsArithmeticClass *class = VIPS_ARITHMETIC_GET_CLASS( arithmetic ); VipsImage *im = arithmetic->ready[0]; const int bands = vips_image_get_bands( im ); int sz = width * bands; VipsVector *v; if( (v = vips_arithmetic_get_vector( class, vips_image_get_format( im ) )) ) { VipsExecutor ex; vips_executor_set_program( &ex, v, sz ); vips_executor_set_array( &ex, v->s[0], in[0] ); vips_executor_set_destination( &ex, out ); vips_executor_run( &ex ); } else { switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_CHAR: ABS_INT( signed char ); break; case VIPS_FORMAT_SHORT: ABS_INT( signed short ); break; case VIPS_FORMAT_INT: ABS_INT( signed int ); break; case VIPS_FORMAT_FLOAT: ABS_FLOAT( float ); break; case VIPS_FORMAT_DOUBLE: ABS_FLOAT( double ); break; case VIPS_FORMAT_COMPLEX: ABS_COMPLEX( float ); break; case VIPS_FORMAT_DPCOMPLEX: ABS_COMPLEX( double ); break; default: g_assert( 0 ); } } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Format doesn't change with abs, other than complex -> real. */ static const VipsBandFormat vips_abs_format_table[10] = { /* UC C US S UI I F X D DX */ UC, C, US, S, UI, I, F, F, D, D }; static void vips_abs_class_init( VipsAbsClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); VipsVector *v; object_class->nickname = "abs"; object_class->description = _( "absolute value of an image" ); object_class->build = vips_abs_build; aclass->process_line = vips_abs_buffer; vips_arithmetic_set_format_table( aclass, vips_abs_format_table ); v = vips_arithmetic_get_program( aclass, VIPS_FORMAT_CHAR ); vips_vector_asm2( v, "absb", "d1", "s1" ); v = vips_arithmetic_get_program( aclass, VIPS_FORMAT_SHORT ); vips_vector_asm2( v, "absw", "d1", "s1" ); v = vips_arithmetic_get_program( aclass, VIPS_FORMAT_INT ); vips_vector_asm2( v, "absl", "d1", "s1" ); vips_arithmetic_compile( aclass ); } static void vips_abs_init( VipsAbs *abs ) { } /** * vips_abs: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * This operation finds the absolute value of an image. It does a copy for * unsigned integer types, negate for negative values in * signed integer types, fabs(3) for * float types, and calculates modulus for complex * types. * * See also: vips_sign(). * * Returns: 0 on success, -1 on error */ int vips_abs( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "abs", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/unaryconst.h0000644000175000017500000000442012303140253015670 00000000000000/* base class for all unaryconst arithmetic operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_UNARY_CONST_H #define VIPS_UNARY_CONST_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include "unary.h" #define VIPS_TYPE_UNARY_CONST (vips_unary_const_get_type()) #define VIPS_UNARY_CONST( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_UNARY_CONST, VipsUnaryConst )) #define VIPS_UNARY_CONST_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_UNARY_CONST, VipsUnaryConstClass)) #define VIPS_IS_UNARY_CONST( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_UNARY_CONST )) #define VIPS_IS_UNARY_CONST_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_UNARY_CONST )) #define VIPS_UNARY_CONST_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_UNARY_CONST, VipsUnaryConstClass )) typedef struct _VipsUnaryConst { VipsUnary parent_instance; /* Our constants. */ VipsArea *c; /* The format the constant should be cast to. Subclasses set this * ready for unaryconst's build method. */ VipsBandFmt const_format; /* Our constant expanded to match arith->ready in size and * const_format in type. */ int n; VipsPel *c_ready; } VipsUnaryConst; typedef struct _VipsUnaryConstClass { VipsUnaryClass parent_class; } VipsUnaryConstClass; GType vips_unary_const_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_UNARY_CONST_H*/ vips-7.38.5/libvips/arithmetic/hist_find_ndim.c0000644000175000017500000002007612303141142016437 00000000000000/* n-dimensional histogram * * Written on: 8/7/03 * 10/11/04 * - oops, was not checking the bandfmt coming in * 24/3/10 * - gtkdoc * - small celanups * 17/8/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "statistic.h" struct _VipsHistFindNDim; /* Accumulate a histogram in one of these. */ typedef struct { struct _VipsHistFindNDim *ndim; int bins; int max_val; unsigned int ***data; } Histogram; typedef struct _VipsHistFindNDim { VipsStatistic parent_instance; /* Number of bins on each axis. */ int bins; /* Main image histogram. Subhists accumulate to this. */ Histogram *hist; /* Write hist to this output image. */ VipsImage *out; } VipsHistFindNDim; typedef VipsStatisticClass VipsHistFindNDimClass; G_DEFINE_TYPE( VipsHistFindNDim, vips_hist_find_ndim, VIPS_TYPE_STATISTIC ); /* Build a Histogram. */ static Histogram * histogram_new( VipsHistFindNDim *ndim ) { VipsImage *in = VIPS_STATISTIC( ndim )->ready; VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( ndim ); int bins = ndim->bins; /* How many dimensions do we need to allocate? */ int ilimit = in->Bands > 2 ? bins : 1; int jlimit = in->Bands > 1 ? bins : 1; int i, j; Histogram *hist; if( !(hist = VIPS_NEW( ndim, Histogram )) ) return( NULL ); hist->ndim = ndim; hist->bins = bins; hist->max_val = in->BandFmt == VIPS_FORMAT_UCHAR ? 256 : 65536; if( bins < 1 || bins > hist->max_val ) { vips_error( class->nickname, _( "bins out of range [1,%d]" ), hist->max_val ); return( NULL ); } if( !(hist->data = VIPS_ARRAY( ndim, bins, unsigned int ** )) ) return( NULL ); memset( hist->data, 0, bins * sizeof( unsigned int ** ) ); for( i = 0; i < ilimit; i++ ) { if( !(hist->data[i] = VIPS_ARRAY( ndim, bins, unsigned int * )) ) return( NULL ); memset( hist->data[i], 0, bins * sizeof( unsigned int * ) ); for( j = 0; j < jlimit; j++ ) { if( !(hist->data[i][j] = VIPS_ARRAY( ndim, bins, unsigned int )) ) return( NULL ); memset( hist->data[i][j], 0, bins * sizeof( unsigned int ) ); } } return( hist ); } static int vips_hist_find_ndim_build( VipsObject *object ) { VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsHistFindNDim *ndim = (VipsHistFindNDim *) object; unsigned int *obuffer; int y, i, x, z; g_object_set( object, "out", vips_image_new(), NULL ); /* main hist made on first thread start. */ if( VIPS_OBJECT_CLASS( vips_hist_find_ndim_parent_class )-> build( object ) ) return( -1 ); if( vips_image_pipelinev( ndim->out, VIPS_DEMAND_STYLE_ANY, statistic->ready, NULL ) ) return( -1 ); vips_image_init_fields( ndim->out, ndim->bins, statistic->ready->Bands > 1 ? ndim->bins : 1, statistic->ready->Bands > 2 ? ndim->bins : 1, VIPS_FORMAT_UINT, VIPS_CODING_NONE, VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 ); if( !(obuffer = VIPS_ARRAY( ndim, VIPS_IMAGE_N_ELEMENTS( ndim->out ), unsigned int )) ) return( -1 ); for( y = 0; y < ndim->out->Ysize; y++ ) { for( i = 0, x = 0; x < ndim->out->Xsize; x++ ) for( z = 0; z < ndim->out->Bands; z++, i++ ) obuffer[i] = ndim->hist->data[z][y][x]; if( vips_image_write_line( ndim->out, y, (VipsPel *) obuffer ) ) return( -1 ); } return( 0 ); } static void * vips_hist_find_ndim_start( VipsStatistic *statistic ) { VipsHistFindNDim *ndim = (VipsHistFindNDim *) statistic; /* Make the main hist, if necessary. */ if( !ndim->hist ) ndim->hist = histogram_new( ndim ); return( (void *) histogram_new( ndim ) ); } /* Join a sub-hist onto the main hist. */ static int vips_hist_find_ndim_stop( VipsStatistic *statistic, void *seq ) { Histogram *sub_hist = (Histogram *) seq; VipsHistFindNDim *ndim = (VipsHistFindNDim *) statistic; Histogram *hist = ndim->hist; int i, j, k; for( i = 0; i < hist->bins; i++ ) for( j = 0; j < hist->bins; j++ ) for( k = 0; k < hist->bins; k++ ) if( hist->data[i] && hist->data[i][j] ) { hist->data[i][j][k] += sub_hist->data[i][j][k]; /* Zap sub-hist to make sure we * can't add it again. */ sub_hist->data[i][j][k] = 0; } return( 0 ); } #define LOOP( TYPE ) { \ TYPE *p = (TYPE *) in; \ \ for( i = 0, j = 0; j < n; j++ ) { \ for( k = 0; k < nb; k++, i++ ) \ index[k] = p[i] / scale; \ \ hist->data[index[2]][index[1]][index[0]] += 1; \ } \ } static int vips_hist_find_ndim_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { Histogram *hist = (Histogram *) seq; VipsImage *im = statistic->ready; int nb = im->Bands; double scale = (double) (hist->max_val + 1) / hist->bins; int i, j, k; int index[3]; /* Fill these with dimensions, backwards. */ index[0] = index[1] = index[2] = 0; switch( im->BandFmt ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char ); break; case VIPS_FORMAT_USHORT: LOOP( unsigned short ); break; default: g_assert( 0 ); } return( 0 ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define US VIPS_FORMAT_USHORT #define UI VIPS_FORMAT_UINT /* Type mapping: go to uchar or ushort. */ static const VipsBandFormat vips_hist_find_ndim_format_table[10] = { /* UC C US S UI I F X D DX */ UC, UC, US, US, US, US, US, US, US, US }; static void vips_hist_find_ndim_class_init( VipsHistFindNDimClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "hist_find_ndim"; object_class->description = _( "find image histogram" ); object_class->build = vips_hist_find_ndim_build; sclass->start = vips_hist_find_ndim_start; sclass->scan = vips_hist_find_ndim_scan; sclass->stop = vips_hist_find_ndim_stop; sclass->format_table = vips_hist_find_ndim_format_table; VIPS_ARG_IMAGE( class, "out", 100, _( "Output" ), _( "Output histogram" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistFindNDim, out ) ); VIPS_ARG_INT( class, "bins", 110, _( "Bins" ), _( "Number of bins in each dimension" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsHistFindNDim, bins ), 1, 65536, 10 ); } static void vips_hist_find_ndim_init( VipsHistFindNDim *ndim ) { ndim->bins = 10; } /** * vips_hist_find_ndim: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @bins: number of bins to make on each axis * * Make a one, two or three dimensional histogram of a 1, 2 or * 3 band image. Divide each axis into @bins bins .. ie. * output is 1 x bins, bins x bins, or bins x bins x bins bands. * @bins defaults to 10. * * Images are cast to uchar or ushort before histogramming. * * See also: vips_hist_find(), vips_hist_find_indexed(). * * Returns: 0 on success, -1 on error */ int vips_hist_find_ndim( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "hist_find_ndim", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/complex.c0000644000175000017500000005442412303141142015134 00000000000000/* complex.c ... various complex operations * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 12/02/1990 * Modified on : 09/05/1990 * 15/6/93 JC * - stupid stupid includes and externs fixed * - I have been editing for 1 1/2 hours and I'm still drowning in * rubbish extetrnshh * 13/12/94 JC * - modernised * 9/7/02 JC * - degree output, for consistency * - slightly better behaviour in edge cases * 27/1/10 * - modernised * - gtk-doc * 19/11/11 * - redo as a class * 21/11/11 * - add vips_complexget() */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "unary.h" #include "binary.h" typedef struct _VipsComplex { VipsUnary parent_instance; VipsOperationComplex cmplx; } VipsComplex; typedef VipsUnaryClass VipsComplexClass; G_DEFINE_TYPE( VipsComplex, vips_complex, VIPS_TYPE_UNARY ); #define LOOP( IN, OUT, OP ) { \ IN * restrict p = (IN *) in[0]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) { \ OP( q, p[x], 0.0 ); \ \ q += 2; \ } \ } #define CLOOP( IN, OUT, OP ) { \ IN * restrict p = (IN *) in[0]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) { \ OP( q, p[0], p[1] ); \ \ p += 2; \ q += 2; \ } \ } #define SWITCH( OP ) \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_UCHAR: \ LOOP( unsigned char, float, OP ); break; \ case VIPS_FORMAT_CHAR: \ LOOP( signed char, float, OP ); break; \ case VIPS_FORMAT_USHORT: \ LOOP( unsigned short, float, OP ); break; \ case VIPS_FORMAT_SHORT: \ LOOP( signed short, float, OP ); break; \ case VIPS_FORMAT_UINT: \ LOOP( unsigned int, float, OP ); break; \ case VIPS_FORMAT_INT: \ LOOP( signed int, float, OP ); break; \ case VIPS_FORMAT_FLOAT: \ LOOP( float, float, OP ); break; \ case VIPS_FORMAT_DOUBLE: \ LOOP( double, double, OP ); break;\ case VIPS_FORMAT_COMPLEX: \ CLOOP( float, float, OP ); break; \ case VIPS_FORMAT_DPCOMPLEX: \ CLOOP( double, double, OP ); break;\ \ default: \ g_assert( 0 ); \ } #define POLAR( Q, X, Y ) { \ double re = (X); \ double im = (Y); \ double am, ph; \ \ am = sqrt( re * re + im * im ); \ ph = im_col_ab2h( re, im ); \ \ Q[0] = am; \ Q[1] = ph; \ } #define RECT( Q, X, Y ) { \ double am = (X); \ double ph = (Y); \ double re, im; \ \ re = am * cos( VIPS_RAD( ph ) ); \ im = am * sin( VIPS_RAD( ph ) ); \ \ Q[0] = re; \ Q[1] = im; \ } #define CONJ( Q, X, Y ) { \ double re = (X); \ double im = (Y); \ \ im *= -1; \ \ Q[0] = re; \ Q[1] = im; \ } static void vips_complex_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsComplex *cmplx = (VipsComplex *) arithmetic; VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( cmplx->cmplx ) { case VIPS_OPERATION_COMPLEX_POLAR: SWITCH( POLAR ); break; case VIPS_OPERATION_COMPLEX_RECT: SWITCH( RECT ); break; case VIPS_OPERATION_COMPLEX_CONJ: SWITCH( CONJ ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static const VipsBandFormat vips_complex_format_table[10] = { /* UC C US S UI I F X D DX */ X, X, X, X, X, X, X, X, DX, DX }; static void vips_complex_class_init( VipsComplexClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "complex"; object_class->description = _( "perform a complex operation on an image" ); aclass->process_line = vips_complex_buffer; vips_arithmetic_set_format_table( aclass, vips_complex_format_table ); VIPS_ARG_ENUM( class, "cmplx", 200, _( "Operation" ), _( "complex to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsComplex, cmplx ), VIPS_TYPE_OPERATION_COMPLEX, VIPS_OPERATION_COMPLEX_POLAR ); } static void vips_complex_init( VipsComplex *cmplx ) { } static int vips_complexv( VipsImage *in, VipsImage **out, VipsOperationComplex cmplx, va_list ap ) { return( vips_call_split( "complex", ap, in, out, cmplx ) ); } /** * vips_complex: * @in: input #VipsImage * @out: output #VipsImage * @cmplx: complex operation to perform * @...: %NULL-terminated list of optional named arguments * * Perform various operations on complex images. * * Angles are expressed in degrees. The output type is complex unless the * input is double or dpcomplex, in which case the output is dpcomplex. * * Returns: 0 on success, -1 on error */ int vips_complex( VipsImage *in, VipsImage **out, VipsOperationComplex cmplx, ... ) { va_list ap; int result; va_start( ap, cmplx ); result = vips_complexv( in, out, cmplx, ap ); va_end( ap ); return( result ); } /** * vips_polar: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_COMPLEX_POLAR on an image. See vips_complex(). * * Returns: 0 on success, -1 on error */ int vips_polar( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_complexv( in, out, VIPS_OPERATION_COMPLEX_POLAR, ap ); va_end( ap ); return( result ); } /** * vips_rect: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_COMPLEX_RECT on an image. See vips_complex(). * * Returns: 0 on success, -1 on error */ int vips_rect( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_complexv( in, out, VIPS_OPERATION_COMPLEX_POLAR, ap ); va_end( ap ); return( result ); } /** * vips_conj: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_COMPLEX_CONJ on an image. See vips_complex(). * * Returns: 0 on success, -1 on error */ int vips_conj( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_complexv( in, out, VIPS_OPERATION_COMPLEX_CONJ, ap ); va_end( ap ); return( result ); } typedef struct _VipsComplex2 { VipsBinary parent_instance; VipsOperationComplex2 cmplx; } VipsComplex2; typedef VipsBinaryClass VipsComplex2Class; G_DEFINE_TYPE( VipsComplex2, vips_complex2, VIPS_TYPE_BINARY ); #define LOOP2( IN, OUT, OP ) { \ IN *p1 = (IN *) in[0]; \ IN *p2 = (IN *) in[1]; \ OUT *q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) { \ OP( q, p1[x], 0.0, p2[x], 0.0 ); \ \ q += 2; \ } \ } #define CLOOP2( IN, OUT, OP ) { \ IN *p1 = (IN *) in[0]; \ IN *p2 = (IN *) in[1]; \ OUT *q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) { \ OP( q, p1[0], p1[1], p2[0], p2[1] ); \ \ p1 += 2; \ p2 += 2; \ q += 2; \ } \ } #define SWITCH2( OP ) \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_UCHAR: \ LOOP2( unsigned char, float, OP ); break; \ case VIPS_FORMAT_CHAR: \ LOOP2( signed char, float, OP ); break; \ case VIPS_FORMAT_USHORT: \ LOOP2( unsigned short, float, OP ); break; \ case VIPS_FORMAT_SHORT: \ LOOP2( signed short, float, OP ); break; \ case VIPS_FORMAT_UINT: \ LOOP2( unsigned int, float, OP ); break; \ case VIPS_FORMAT_INT: \ LOOP2( signed int, float, OP ); break; \ case VIPS_FORMAT_FLOAT: \ LOOP2( float, float, OP ); break; \ case VIPS_FORMAT_DOUBLE: \ LOOP2( double, double, OP ); break;\ case VIPS_FORMAT_COMPLEX: \ CLOOP2( float, float, OP ); break; \ case VIPS_FORMAT_DPCOMPLEX: \ CLOOP2( double, double, OP ); break;\ \ default: \ g_assert( 0 ); \ } /* There doesn't seem to be much difference in speed between these two methods * (on an Athlon64), so I use the modulus argument version, since atan2() is * in c89 but hypot() is c99. * * If you think that it might be faster on your platform, uncomment the * following: */ #define USE_MODARG_DIV #ifdef USE_MODARG_DIV #define CROSS( Q, X1, Y1, X2, Y2 ) { \ double arg = atan2( X2, X1 ) - atan2( Y2, Y1 ); \ \ Q[0] = cos( arg ); \ Q[1] = sin( arg ); \ } #else /* USE_MODARG_DIV */ #define CROSS( Q, X1, Y1, X2, Y2 ) { \ if( ABS( Y1 ) > ABS( Y2 ) ) { \ double a = Y2 / Y1; \ double b = Y1 + Y2 * a; \ double re = (X1 + X2 * a) / b; \ double im = (X2 - X1 * a) / b; \ double mod = vips__hypot( re, im ); \ \ Q[0] = re / mod; \ Q[1] = im / mod; \ } \ else { \ double a = Y1 / Y2; \ double b = Y2 + Y1 * a; \ double re = (X1 * a + X2) / b; \ double im = (X2 * a - X1) / b; \ double mod = vips__hypot( re, im ); \ \ Q[0] = re / mod; \ Q[1] = im / mod; \ } \ } #endif /* USE_MODARG_DIV */ static void vips_complex2_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsComplex2 *cmplx = (VipsComplex2 *) arithmetic; VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( cmplx->cmplx ) { case VIPS_OPERATION_COMPLEX2_CROSS_PHASE: SWITCH2( CROSS ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static const VipsBandFormat vips_complex2_format_table[10] = { /* UC C US S UI I F X D DX */ X, X, X, X, X, X, X, X, DX, DX }; static void vips_complex2_class_init( VipsComplex2Class *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "complex2"; object_class->description = _( "perform a binary complex operation on two images" ); aclass->process_line = vips_complex2_buffer; vips_arithmetic_set_format_table( aclass, vips_complex2_format_table ); VIPS_ARG_ENUM( class, "cmplx", 200, _( "Operation" ), _( "binary complex operation to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsComplex2, cmplx ), VIPS_TYPE_OPERATION_COMPLEX2, VIPS_OPERATION_COMPLEX2_CROSS_PHASE ); } static void vips_complex2_init( VipsComplex2 *cmplx ) { } static int vips_complex2v( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationComplex2 cmplx, va_list ap ) { return( vips_call_split( "complex2", ap, left, right, out, cmplx ) ); } /** * vips_complex2: * @left: input #VipsImage * @right: input #VipsImage * @out: output #VipsImage * @cmplx: complex2 operation to perform * @...: %NULL-terminated list of optional named arguments * * Perform various binary operations on complex images. * * Angles are expressed in degrees. The output type is complex unless the * input is double or dpcomplex, in which case the output is dpcomplex. * * Returns: 0 on success, -1 on error */ int vips_complex2( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationComplex2 cmplx, ... ) { va_list ap; int result; va_start( ap, cmplx ); result = vips_complex2v( left, right, out, cmplx, ap ); va_end( ap ); return( result ); } /** * vips_cross_phase: * @left: input #VipsImage * @right: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_COMPLEX2_CROSS_PHASE on an image. * See vips_complex2(). * * Returns: 0 on success, -1 on error */ int vips_cross_phase( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_complex2v( left, right, out, VIPS_OPERATION_COMPLEX2_CROSS_PHASE, ap ); va_end( ap ); return( result ); } typedef struct _VipsComplexget { VipsUnary parent_instance; VipsOperationComplexget get; } VipsComplexget; typedef VipsUnaryClass VipsComplexgetClass; G_DEFINE_TYPE( VipsComplexget, vips_complexget, VIPS_TYPE_UNARY ); static int vips_complexget_build( VipsObject *object ) { VipsUnary *unary = (VipsUnary *) object; VipsComplexget *complexget = (VipsComplexget *) object; if( unary->in && !vips_band_format_iscomplex( unary->in->BandFmt ) && complexget->get == VIPS_OPERATION_COMPLEXGET_REAL ) return( vips_unary_copy( unary ) ); if( VIPS_OBJECT_CLASS( vips_complexget_parent_class )->build( object ) ) return( -1 ); return( 0 ); } #define GETLOOP( TYPE, OP ) { \ TYPE *p __attribute__ ((unused)) = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ OP( q[x], p[x], 0.0 ); \ } \ } #define CGETLOOP( TYPE, OP ) { \ TYPE *p __attribute__ ((unused)) = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ OP( q[x], p[0], p[1] ); \ \ p += 2; \ } \ } #define GETSWITCH( OP ) \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_UCHAR: \ GETLOOP( unsigned char, OP ); break; \ case VIPS_FORMAT_CHAR: \ GETLOOP( signed char, OP ); break; \ case VIPS_FORMAT_USHORT: \ GETLOOP( unsigned short, OP ); break; \ case VIPS_FORMAT_SHORT: \ GETLOOP( signed short, OP ); break; \ case VIPS_FORMAT_UINT: \ GETLOOP( unsigned int, OP ); break; \ case VIPS_FORMAT_INT: \ GETLOOP( signed int, OP ); break; \ case VIPS_FORMAT_FLOAT: \ GETLOOP( float, OP ); break; \ case VIPS_FORMAT_DOUBLE: \ GETLOOP( double, OP ); break;\ case VIPS_FORMAT_COMPLEX: \ CGETLOOP( float, OP ); break; \ case VIPS_FORMAT_DPCOMPLEX: \ CGETLOOP( double, OP ); break;\ \ default: \ g_assert( 0 ); \ } #define REAL( Q, X, Y ) { \ Q = X; \ } #define IMAG( Q, X, Y ) { \ Q = Y; \ } static void vips_complexget_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsComplexget *complexget = (VipsComplexget *) arithmetic; VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( complexget->get ) { case VIPS_OPERATION_COMPLEXGET_REAL: GETSWITCH( REAL ); break; case VIPS_OPERATION_COMPLEXGET_IMAG: GETSWITCH( IMAG ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static const VipsBandFormat vips_complexget_format_table[10] = { /* UC C US S UI I F X D DX */ UC, C, US, S, UI, I, F, F, D, D }; static void vips_complexget_class_init( VipsComplexgetClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "complexget"; object_class->description = _( "get a component from a complex image" ); object_class->build = vips_complexget_build; aclass->process_line = vips_complexget_buffer; vips_arithmetic_set_format_table( aclass, vips_complexget_format_table ); VIPS_ARG_ENUM( class, "get", 200, _( "Operation" ), _( "complex to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsComplexget, get ), VIPS_TYPE_OPERATION_COMPLEXGET, VIPS_OPERATION_COMPLEXGET_REAL ); } static void vips_complexget_init( VipsComplexget *complexget ) { } static int vips_complexgetv( VipsImage *in, VipsImage **out, VipsOperationComplexget get, va_list ap ) { return( vips_call_split( "complexget", ap, in, out, get ) ); } /** * vips_complexget: * @in: input #VipsImage * @out: output #VipsImage * @get: complex operation to perform * @...: %NULL-terminated list of optional named arguments * * Get components of complex images. * * The output type is the same as the input type, except #VIPS_FORMAT_COMPLEX * becomes #VIPS_FORMAT_FLOAT and #VIPS_FORMAT_DPCOMPLEX becomes * #VIPS_FORMAT_DOUBLE. * * Returns: 0 on success, -1 on error */ int vips_complexget( VipsImage *in, VipsImage **out, VipsOperationComplexget get, ... ) { va_list ap; int result; va_start( ap, get ); result = vips_complexgetv( in, out, get, ap ); va_end( ap ); return( result ); } /** * vips_real: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_COMPLEXGET_REAL on an image. See vips_complexget(). * * Returns: 0 on success, -1 on error */ int vips_real( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_complexgetv( in, out, VIPS_OPERATION_COMPLEXGET_REAL, ap ); va_end( ap ); return( result ); } /** * vips_imag: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_COMPLEXGET_IMAG on an image. See vips_complexget(). * * Returns: 0 on success, -1 on error */ int vips_imag( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_complexgetv( in, out, VIPS_OPERATION_COMPLEXGET_IMAG, ap ); va_end( ap ); return( result ); } typedef VipsBinary VipsComplexform; typedef VipsBinaryClass VipsComplexformClass; G_DEFINE_TYPE( VipsComplexform, vips_complexform, VIPS_TYPE_BINARY ); static int vips_complexform_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsBinary *binary = (VipsBinary *) object; if( binary->left && vips_check_noncomplex( class->nickname, binary->left ) ) return( -1 ); if( binary->right && vips_check_noncomplex( class->nickname, binary->right ) ) return( -1 ); if( VIPS_OBJECT_CLASS( vips_complexform_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } #define CFORM( IN, OUT ) { \ IN *left = (IN *) in[0]; \ IN *right = (IN *) in[1]; \ OUT *q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) { \ q[0] = left[x]; \ q[1] = right[x]; \ \ q += 2; \ } \ } static void vips_complexform_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; /* Keep types here in sync with bandfmt_complexform[] * below. */ switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_CHAR: CFORM( signed char, float ); break; case VIPS_FORMAT_UCHAR: CFORM( unsigned char, float ); break; case VIPS_FORMAT_SHORT: CFORM( signed short, float ); break; case VIPS_FORMAT_USHORT:CFORM( unsigned short, float ); break; case VIPS_FORMAT_INT: CFORM( signed int, float ); break; case VIPS_FORMAT_UINT: CFORM( unsigned int, float ); break; case VIPS_FORMAT_FLOAT: CFORM( float, float ); break; case VIPS_FORMAT_DOUBLE: CFORM( double, double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type promotion for division. Sign and value preserving. Make sure * these match the case statement in complexform_buffer() above. */ static int vips_complexform_format_table[10] = { /* UC C US S UI I F X D DX */ X, X, X, X, X, X, X, X, DX,DX }; static void vips_complexform_class_init( VipsComplexformClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); object_class->nickname = "complexform"; object_class->description = _( "form a complex image from two real images" ); object_class->build = vips_complexform_build; aclass->process_line = vips_complexform_buffer; vips_arithmetic_set_format_table( aclass, vips_complexform_format_table ); } static void vips_complexform_init( VipsComplexform *complexform ) { } /** * vips_complexform: * @left: input image * @right: input image * @out: output image * * Compose two real images to make a complex image. If either @left or @right * are #VIPS_FORMAT_DOUBLE, @out is #VIPS_FORMAT_DPCOMPLEX. Otherwise @out * is #VIPS_FORMAT_COMPLEX. @left becomes the real component of @out and * @right the imaginary. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * See also: vips_complexget(). * * Returns: 0 on success, -1 on error */ int vips_complexform( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "complexform", ap, left, right, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/invert.c0000644000175000017500000001111012303140253014757 00000000000000/* photographic negative ... just an example, really * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 12/02/1990 * Modified on : * 7/7/93 JC * - memory leaks fixed * - adapted for partial v2 * - ANSIfied * 22/2/95 JC * - tidied up again * 2/9/09 * - gtk-doc comment * 23/8/11 * - rewrite as a class * 7/12/12 * - only invert real part of complex */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "unary.h" typedef VipsUnary VipsInvert; typedef VipsUnaryClass VipsInvertClass; G_DEFINE_TYPE( VipsInvert, vips_invert, VIPS_TYPE_UNARY ); #define LOOP( TYPE, L ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = (L) - p[x]; \ } #define LOOPN( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = -1 * p[x]; \ } #define LOOPC( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ q[0] = -1 * p[0]; \ q[1] = p[1]; \ \ p += 2; \ q += 2; \ } \ } static void vips_invert_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char, UCHAR_MAX ); break; case VIPS_FORMAT_CHAR: LOOPN( signed char ); break; case VIPS_FORMAT_USHORT: LOOP( unsigned short, USHRT_MAX ); break; case VIPS_FORMAT_SHORT: LOOPN( signed short ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int, UINT_MAX ); break; case VIPS_FORMAT_INT: LOOPN( signed int ); break; case VIPS_FORMAT_FLOAT: LOOPN( float ); break; case VIPS_FORMAT_DOUBLE: LOOPN( double ); break; case VIPS_FORMAT_COMPLEX: LOOPC( float ); break; case VIPS_FORMAT_DPCOMPLEX: LOOPC( double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Format doesn't change with invert. */ static const VipsBandFormat vips_invert_format_table[10] = { /* UC C US S UI I F X D DX */ UC, C, US, S, UI, I, F, X, D, DX }; static void vips_invert_class_init( VipsInvertClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); object_class->nickname = "invert"; object_class->description = _( "invert an image" ); aclass->process_line = vips_invert_buffer; vips_arithmetic_set_format_table( aclass, vips_invert_format_table ); } static void vips_invert_init( VipsInvert *invert ) { } /** * vips_invert: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * For unsigned formats, this operation calculates (max - @in), eg. (255 - * @in) for uchar. For signed and float formats, this operation calculates (-1 * @in). * * For complex images, only the real part is inverted. See also vips_conj(). * * See also: vips_linear(). * * Returns: 0 on success, -1 on error */ int vips_invert( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "invert", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/multiply.c0000644000175000017500000001605012303140253015337 00000000000000/* im_multiply.c * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 29/4/93 JC * - now works for partial images * 1/7/93 JC * - adapted for partial v2 * - ANSIfied * 19/10/93 JC * - coredump-inducing bug in complex*complex fixed * 13/12/93 * - char*short bug fixed * 12/6/95 JC * - new im_add adapted to make new im_multiply * 27/9/04 * - updated for 1 band $op n band image -> n band image case * 8/12/06 * - add liboil support * 18/8/08 * - revise upcasting system * - add gtkdoc comments * 31/7/10 * - remove liboil * 7/11/11 * - redo as a class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "binary.h" typedef VipsBinary VipsMultiply; typedef VipsBinaryClass VipsMultiplyClass; G_DEFINE_TYPE( VipsMultiply, vips_multiply, VIPS_TYPE_BINARY ); /* Complex multiply. */ #define CLOOP( TYPE ) { \ TYPE * restrict left = (TYPE *) in[0]; \ TYPE * restrict right = (TYPE *) in[1]; \ TYPE * restrict q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ double x1 = left[0]; \ double y1 = left[1]; \ double x2 = right[0]; \ double y2 = right[1]; \ \ left += 2; \ right += 2; \ \ q[0] = x1 * x2 - y1 * y2; \ q[1] = x1 * y2 + x2 * y1; \ \ q += 2; \ } \ } /* Real multiply. */ #define RLOOP( IN, OUT ) { \ IN * restrict left = (IN *) in[0]; \ IN * restrict right = (IN *) in[1]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = left[x] * right[x]; \ } static void vips_multiply_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; /* Keep types here in sync with vips_bandfmt_multiply[] * below. */ switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_CHAR: RLOOP( signed char, signed short ); break; case VIPS_FORMAT_UCHAR: RLOOP( unsigned char, signed short ); break; case VIPS_FORMAT_SHORT: RLOOP( signed short, signed int ); break; case VIPS_FORMAT_USHORT:RLOOP( unsigned short, signed int ); break; case VIPS_FORMAT_INT: RLOOP( signed int, signed int ); break; case VIPS_FORMAT_UINT: RLOOP( unsigned int, signed int ); break; case VIPS_FORMAT_FLOAT: RLOOP( float, float ); break; case VIPS_FORMAT_DOUBLE: RLOOP( double, double ); break; case VIPS_FORMAT_COMPLEX: CLOOP( float ); break; case VIPS_FORMAT_DPCOMPLEX: CLOOP( double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type promotion for multiplication. Sign and value preserving. Make sure * these match the case statement in multiply_buffer() above. */ static int vips_multiply_format_table[10] = { /* UC C US S UI I F X D DX */ US, S, UI, I, UI, I, F, X, D, DX }; static void vips_multiply_class_init( VipsMultiplyClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); object_class->nickname = "multiply"; object_class->description = _( "multiply two images" ); aclass->process_line = vips_multiply_buffer; vips_arithmetic_set_format_table( aclass, vips_multiply_format_table ); } static void vips_multiply_init( VipsMultiply *multiply ) { } /** * vips_multiply: * @left: left-hand image * @right: right-hand image * @out: output image * * This operation calculates @left * @right and writes the result to @out. * * If the images differ in size, the smaller image is enlarged to match the * larger by adding zero pixels along the bottom and right. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common format (see table * Smallest common format in * arithmetic), then the * following table is used to determine the output type: * * * VipsMultiply type promotion * * * * input type * output type * * * * * uchar * ushort * * * char * short * * * ushort * uint * * * short * int * * * uint * uint * * * int * int * * * float * float * * * double * double * * * complex * complex * * * double complex * double complex * * * *
* * In other words, the output type is just large enough to hold the whole * range of possible values. * * See also: vips_add(), vips_linear(). * * Returns: 0 on success, -1 on error */ int vips_multiply( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "multiply", ap, left, right, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/round.c0000644000175000017500000001467312303140253014620 00000000000000/* round.c --- various rounding operations * * 20/6/02 JC * - adapted from im_abs() * 29/8/09 * - gtkdoc * - tiny cleanups * 19/9/09 * - im_ceil.c adapted to make round.c * 10/11/11 * - redone as a class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "unary.h" typedef struct _VipsRound { VipsUnary parent_instance; VipsOperationRound round; } VipsRound; typedef VipsUnaryClass VipsRoundClass; G_DEFINE_TYPE( VipsRound, vips_round, VIPS_TYPE_UNARY ); static int vips_round_build( VipsObject *object ) { VipsUnary *unary = (VipsUnary *) object; /* Is this one of the int types? Degenerate to vips_copy() if it * is. */ if( unary->in && vips_bandfmt_isint( unary->in->BandFmt ) ) return( vips_unary_copy( unary ) ); if( VIPS_OBJECT_CLASS( vips_round_parent_class )->build( object ) ) return( -1 ); return( 0 ); } #define LOOP( TYPE, OP ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = OP( p[x] ); \ } #define SWITCH( OP ) { \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_COMPLEX: \ case VIPS_FORMAT_FLOAT: LOOP( float, OP ); break; \ \ case VIPS_FORMAT_DPCOMPLEX: \ case VIPS_FORMAT_DOUBLE:LOOP( double, OP ); break;\ \ default: \ g_assert( 0 ); \ } \ } static void vips_round_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsRound *round = (VipsRound *) arithmetic; VipsImage *im = arithmetic->ready[0]; /* Complex just doubles the size. */ const int sz = width * im->Bands * (vips_bandfmt_iscomplex( im->BandFmt ) ? 2 : 1); int x; switch( round->round ) { case VIPS_OPERATION_ROUND_RINT: SWITCH( VIPS_RINT ); break; case VIPS_OPERATION_ROUND_CEIL: SWITCH( ceil ); break; case VIPS_OPERATION_ROUND_FLOOR: SWITCH( floor ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static const VipsBandFormat vips_round_format_table[10] = { /* UC C US S UI I F X D DX */ UC, C, US, S, UI, I, F, X, D, DX }; static void vips_round_class_init( VipsRoundClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "round"; object_class->description = _( "perform a round function on an image" ); object_class->build = vips_round_build; aclass->process_line = vips_round_buffer; vips_arithmetic_set_format_table( aclass, vips_round_format_table ); VIPS_ARG_ENUM( class, "round", 200, _( "Round operation" ), _( "rounding operation to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRound, round ), VIPS_TYPE_OPERATION_ROUND, VIPS_OPERATION_ROUND_RINT ); } static void vips_round_init( VipsRound *round ) { } static int vips_roundv( VipsImage *in, VipsImage **out, VipsOperationRound round, va_list ap ) { return( vips_call_split( "round", ap, in, out, round ) ); } /** * vips_round: * @in: input #VipsImage * @out: output #VipsImage * @round: #VipsOperationRound rounding operation to perform * @...: %NULL-terminated list of optional named arguments * * Round to an integral value. * * Copy for integer types, round float and * complex types. * * The format of @out is always the same as @in, so you may wish to cast to an * integer format afterwards. * * See also: vips_cast() * * Returns: 0 on success, -1 on error */ int vips_round( VipsImage *in, VipsImage **out, VipsOperationRound round, ... ) { va_list ap; int result; va_start( ap, round ); result = vips_roundv( in, out, round, ap ); va_end( ap ); return( result ); } /** * vips_floor: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Round to an integral value with #VIPS_OPERATION_ROUND_FLOOR. See * vips_round(). * * Returns: 0 on success, -1 on error */ int vips_floor( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_roundv( in, out, VIPS_OPERATION_ROUND_FLOOR, ap ); va_end( ap ); return( result ); } /** * vips_ceil: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Round to an integral value with #VIPS_OPERATION_ROUND_CEIL. See * vips_round(). * * Returns: 0 on success, -1 on error */ int vips_ceil( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_roundv( in, out, VIPS_OPERATION_ROUND_CEIL, ap ); va_end( ap ); return( result ); } /** * vips_rint: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Round to an integral value with #VIPS_OPERATION_ROUND_RINT. See * vips_round(). * * Returns: 0 on success, -1 on error */ int vips_rint( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_roundv( in, out, VIPS_OPERATION_ROUND_RINT, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/subtract.c0000644000175000017500000001572712303140253015321 00000000000000/* Subtract two images * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 29/4/93 J.Cupitt * - now works for partial images * 1/7/93 JC * - adapted for partial v2 * 9/5/95 JC * - simplified: now just handles 10 cases (instead of 50), using * im_clip2*() to help * - now uses im_wrapmany() rather than im_generate() * 12/6/95 JC * - new im_add() adapted to make this * 31/5/96 JC * - what was this SWAP() stuff? failed for small - big! * 22/8/03 JC * - cast up more quickly to help accuracy * 27/9/04 * - updated for 1 band $op n band image -> n band image case * 8/12/06 * - add liboil support * 18/8/08 * - revise upcasting system * - add gtkdoc comments * - remove separate complex case, just double size * 31/7/10 * - remove liboil * 23/8/11 * - rewrite as a class from add.c */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "binary.h" typedef VipsBinary VipsSubtract; typedef VipsBinaryClass VipsSubtractClass; G_DEFINE_TYPE( VipsSubtract, vips_subtract, VIPS_TYPE_BINARY ); #define LOOP( IN, OUT ) { \ IN * restrict left = (IN *) in[0]; \ IN * restrict right = (IN *) in[1]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = left[x] - right[x]; \ } static void vips_subtract_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = arithmetic->ready[0]; /* Complex just doubles the size. */ const int sz = width * vips_image_get_bands( im ) * (vips_band_format_iscomplex( vips_image_get_format( im ) ) ? 2 : 1); int x; /* Keep types here in sync with bandfmt_subtract[] * below. */ switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_CHAR: LOOP( signed char, signed short ); break; case VIPS_FORMAT_UCHAR: LOOP( unsigned char, signed short ); break; case VIPS_FORMAT_SHORT: LOOP( signed short, signed int ); break; case VIPS_FORMAT_USHORT:LOOP( unsigned short, signed int ); break; case VIPS_FORMAT_INT: LOOP( signed int, signed int ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int, signed int ); break; case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_COMPLEX: LOOP( float, float ); break; case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DPCOMPLEX: LOOP( double, double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type promotion for subtraction. Sign and value preserving. Make sure these * match the case statement in vips_subtract_buffer() above. */ static const VipsBandFormat vips_subtract_format_table[10] = { /* UC C US S UI I F X D DX */ S, S, I, I, I, I, F, X, D, DX }; static void vips_subtract_class_init( VipsSubtractClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); object_class->nickname = "subtract"; object_class->description = _( "subtract two images" ); aclass->process_line = vips_subtract_buffer; vips_arithmetic_set_format_table( aclass, vips_subtract_format_table ); } static void vips_subtract_init( VipsSubtract *subtract ) { } /** * vips_subtract: * @in1: input image * @in2: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * This operation calculates @in1 - @in2 and writes the result to @out. * * If the images differ in size, the smaller image is enlarged to match the * larger by adding zero pixels along the bottom and right. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common format (see table * Smallest common format in * arithmetic), then the * following table is used to determine the output type: * * * VipsSubtract type promotion * * * * input type * output type * * * * * uchar * short * * * char * short * * * ushort * int * * * short * int * * * uint * int * * * int * int * * * float * float * * * double * double * * * complex * complex * * * double complex * double complex * * * *
* * In other words, the output type is just large enough to hold the whole * range of possible values. * * See also: vips_add(), vips_linear(). * * Returns: 0 on success, -1 on error */ int vips_subtract( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "subtract", ap, left, right, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/min.c0000644000175000017500000003037312303141142014245 00000000000000/* find image minimum * * Copyright: 1990, J. Cupitt * * Author: J. Cupitt * Written on: 02/05/1990 * Modified on : 18/03/1991, N. Dessipris * 23/11/92 JC * - correct result for more than 1 band now. * 23/7/93 JC * - im_incheck() added * 20/6/95 JC * - now returns double for value, like im_min() * 4/9/09 * - gtkdoc comment * 8/9/09 * - rewrite, from im_minpos() * 30/8/11 * - rewrite as a class * 5/9/11 * - abandon scan if we find minimum possible value * 24/2/12 * - avoid NaN in float/double/complex images * - allow +/- INFINITY as a result * 4/12/12 * - from min.c * - track and return bottom n values */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "statistic.h" /* Track min values and position here. We need one of these for each thread, * and one for the main value. * * We will generally only be tracking a small (<10?) number of values, so * simple arrays will be fastest. */ typedef struct _VipsValues { struct _VipsMin *min; /* The min number of values we track. */ int size; /* How many values we have in the arrays. */ int n; /* Position and values. We track mod**2 for complex and do a sqrt() at * the end. The three arrays are sorted by @value, largest first. */ double *value; int *x_pos; int *y_pos; } VipsValues; typedef struct _VipsMin { VipsStatistic parent_instance; /* Number of values we track. */ int size; /* The single min. Can be unset if, for example, the whole image is * NaN. */ double min; int x; int y; /* And the positions and values we found as VipsArrays for returning * to our caller. */ VipsArrayDouble *min_array; VipsArrayInt *x_array; VipsArrayInt *y_array; /* Global state here. */ VipsValues values; } VipsMin; static void vips_values_init( VipsValues *values, VipsMin *min ) { values->min = min; values->size = min->size; values->n = 0; values->value = VIPS_ARRAY( min, values->size, double ); values->x_pos = VIPS_ARRAY( min, values->size, int ); values->y_pos = VIPS_ARRAY( min, values->size, int ); } /* Add a value. Do nothing if the value is too large. */ static void vips_values_add( VipsValues *values, double v, int x, int y ) { int i, j; /* Find insertion point. */ for( i = 0; i < values->n; i++ ) if( v >= values->value[i] ) break; /* Array full? */ if( values->n == values->size ) { if( i > 0 ) { /* We need to move stuff to the left to make space, * shunting the largest out. */ for( j = 0; j < i - 1; j++ ) { values->value[j] = values->value[j + 1]; values->x_pos[j] = values->x_pos[j + 1]; values->y_pos[j] = values->y_pos[j + 1]; } values->value[i - 1] = v; values->x_pos[i - 1] = x; values->y_pos[i - 1] = y; } } else { /* Not full, move stuff to the right into empty space. */ for( j = values->n; j > i; j-- ) { values->value[j] = values->value[j - 1]; values->x_pos[j] = values->x_pos[j - 1]; values->y_pos[j] = values->y_pos[j - 1]; } values->value[i] = v; values->x_pos[i] = x; values->y_pos[i] = y; values->n += 1; } } typedef VipsStatisticClass VipsMinClass; G_DEFINE_TYPE( VipsMin, vips_min, VIPS_TYPE_STATISTIC ); static int vips_min_build( VipsObject *object ) { VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsMin *min = (VipsMin *) object; VipsValues *values = &min->values; vips_values_init( values, min ); if( VIPS_OBJECT_CLASS( vips_min_parent_class )->build( object ) ) return( -1 ); /* For speed we accumulate min ** 2 for complex. */ if( vips_bandfmt_iscomplex( vips_image_get_format( statistic->in ) ) ) { int i; for( i = 0; i < values->n; i++ ) values->value[i] = sqrt( values->value[i] ); } /* Don't set if there's no value (eg. if every pixel is NaN). This * will trigger an error later. */ if( values->n > 0 ) { VipsArrayDouble *out_array; VipsArrayInt *x_array; VipsArrayInt *y_array; out_array = vips_array_double_new( values->value, values->n ); x_array = vips_array_int_new( values->x_pos, values->n ); y_array = vips_array_int_new( values->y_pos, values->n ); /* We have to set the props via g_object_set() to stop vips * complaining they are unset. */ g_object_set( min, "out", values->value[values->n - 1], "x", values->x_pos[values->n - 1], "y", values->y_pos[values->n - 1], "out_array", out_array, "x_array", x_array, "y_array", y_array, NULL ); vips_area_unref( (VipsArea *) out_array ); vips_area_unref( (VipsArea *) x_array ); vips_area_unref( (VipsArea *) y_array ); } #ifdef DEBUG { int i; printf( "vips_min_build: %d values found\n", values->n ); for( i = 0; i < values->n; i++ ) printf( "%d) %g\t%d\t%d\n", i, values->value[i], values->x_pos[i], values->y_pos[i] ); } #endif /*DEBUG*/ return( 0 ); } /* New sequence value. Make a private VipsValues for this thread. */ static void * vips_min_start( VipsStatistic *statistic ) { VipsValues *values; values = g_new( VipsValues, 1 ); vips_values_init( values, (VipsMin *) statistic ); return( (void *) values ); } /* Merge the sequence value back into the per-call state. */ static int vips_min_stop( VipsStatistic *statistic, void *seq ) { VipsMin *min = (VipsMin *) statistic; VipsValues *values = (VipsValues *) seq; int i; for( i = 0; i < values->n; i++ ) vips_values_add( &min->values, values->value[i], values->x_pos[i], values->y_pos[i] ); g_free( values ); return( 0 ); } /* Real min with a lower bound. * * Add values to the buffer if they are less than the buffer maximum. If * the buffer isn't full, there is no maximum. * * Avoid a double test by splitting the loop into two phases: before and after * the buffer fills. * * Stop if our array fills with minval. */ #define LOOPU( TYPE, LOWER ) { \ TYPE *p = (TYPE *) in; \ TYPE m; \ \ for( i = 0; i < sz && values->n < values->size; i++ ) \ vips_values_add( values, p[i], x + i / bands, y ); \ m = values->value[0]; \ \ for( ; i < sz; i++ ) { \ if( p[i] < m ) { \ vips_values_add( values, p[i], x + i / bands, y ); \ m = values->value[0]; \ \ if( m <= LOWER ) { \ statistic->stop = TRUE; \ break; \ } \ } \ } \ } /* float/double min ... no limits, and we have to avoid NaN. * * NaN compares false to every float value, so we don't need to test for NaN * in the second loop. */ #define LOOPF( TYPE ) { \ TYPE *p = (TYPE *) in; \ TYPE m; \ \ for( i = 0; i < sz && values->n < values->size; i++ ) \ if( !isnan( p[i] ) ) \ vips_values_add( values, p[i], x + i / bands, y ); \ m = values->value[0]; \ \ for( ; i < sz; i++ ) \ if( p[i] < m ) { \ vips_values_add( values, p[i], x + i / bands, y ); \ m = values->value[0]; \ } \ } /* As LOOPF, but complex. Track min(mod ** 2) to avoid sqrt(). */ #define LOOPC( TYPE ) { \ TYPE *p = (TYPE *) in; \ TYPE m; \ \ for( i = 0; i < sz && values->n < values->size; i++ ) { \ TYPE mod2 = p[0] * p[0] + p[1] * p[1]; \ \ if( !isnan( mod2 ) ) \ vips_values_add( values, p[i], x + i / bands, y ); \ \ p += 2; \ } \ m = values->value[0]; \ \ for( ; i < sz; i++ ) { \ TYPE mod2 = p[0] * p[0] + p[1] * p[1]; \ \ if( mod2 < m ) { \ vips_values_add( values, mod2, x + i / bands, y ); \ m = values->value[0]; \ } \ \ p += 2; \ } \ } /* Loop over region, adding to seq. */ static int vips_min_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { VipsValues *values = (VipsValues *) seq; const int bands = vips_image_get_bands( statistic->in ); const int sz = n * bands; int i; switch( vips_image_get_format( statistic->in ) ) { case VIPS_FORMAT_UCHAR: LOOPU( unsigned char, 0 ); break; case VIPS_FORMAT_CHAR: LOOPU( signed char, SCHAR_MIN ); break; case VIPS_FORMAT_USHORT: LOOPU( unsigned short, 0 ); break; case VIPS_FORMAT_SHORT: LOOPU( signed short, SHRT_MIN ); break; case VIPS_FORMAT_UINT: LOOPU( unsigned int, 0 ); break; case VIPS_FORMAT_INT: LOOPU( signed int, INT_MIN ); break; case VIPS_FORMAT_FLOAT: LOOPF( float ); break; case VIPS_FORMAT_DOUBLE: LOOPF( double ); break; case VIPS_FORMAT_COMPLEX: LOOPC( float ); break; case VIPS_FORMAT_DPCOMPLEX: LOOPC( double ); break; default: g_assert( 0 ); } return( 0 ); } static void vips_min_class_init( VipsMinClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "min"; object_class->description = _( "find image minimum" ); object_class->build = vips_min_build; sclass->start = vips_min_start; sclass->scan = vips_min_scan; sclass->stop = vips_min_stop; VIPS_ARG_DOUBLE( class, "out", 1, _( "Output" ), _( "Output value" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsMin, min ), -INFINITY, INFINITY, 0.0 ); VIPS_ARG_INT( class, "x", 2, _( "x" ), _( "Horizontal position of minimum" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMin, x ), 0, 1000000, 0 ); VIPS_ARG_INT( class, "y", 3, _( "y" ), _( "Vertical position of minimum" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMin, y ), 0, 1000000, 0 ); VIPS_ARG_INT( class, "size", 4, _( "Size" ), _( "Number of minimum values to find" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMin, size ), 0, 1000000, 10 ); VIPS_ARG_BOXED( class, "out_array", 6, _( "Output array" ), _( "Array of output values" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMin, min_array ), VIPS_TYPE_ARRAY_DOUBLE ); VIPS_ARG_BOXED( class, "x_array", 7, _( "x array" ), _( "Array of horizontal positions" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMin, x_array ), VIPS_TYPE_ARRAY_INT ); VIPS_ARG_BOXED( class, "y_array", 8, _( "y array" ), _( "Array of vertical positions" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMin, y_array ), VIPS_TYPE_ARRAY_INT ); } static void vips_min_init( VipsMin *min ) { min->size = 1; } /** * vips_min: * @in: input #VipsImage * @out: output pixel minimum * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @x: horizontal position of minimum * @y: vertical position of minimum * @size: number of minima to find * @out_array: return array of minimum values * @x_array: corresponding horizontal positions * @y_array: corresponding vertical positions * * This operation finds the minimum value in an image. * * If the image contains several minimum values, only the first @size * found are returned. * * It operates on all * bands of the input image: use vips_stats() if you need to find an * minimum for each band. * * For complex images, this operation finds the minimum modulus. * * You can read out the position of the minimum with @x and @y. You can read * out arrays of the values and positions of the top @size minima with * @out_array, @x_array and @y_array. * * See also: vips_min(), vips_stats(). * * Returns: 0 on success, -1 on error */ int vips_min( VipsImage *in, double *out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "min", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/unaryconst.c0000644000175000017500000001227112303140253015666 00000000000000/* an image plus a constant * * 11/11/11 * - from arith_binary_const */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "unaryconst.h" G_DEFINE_ABSTRACT_TYPE( VipsUnaryConst, vips_unary_const, VIPS_TYPE_UNARY ); /* Cast a vector of double to a vector of TYPE, clipping to a range. */ #define CAST_CLIP( TYPE, N, X ) { \ TYPE * restrict tq = (TYPE *) q; \ \ for( i = 0; i < m; i++ ) { \ double v = p[VIPS_MIN( n - 1, i )]; \ \ tq[i] = (TYPE) VIPS_CLIP( N, v, X ); \ } \ } /* Cast a vector of double to a vector of TYPE. */ #define CAST( TYPE ) { \ TYPE * restrict tq = (TYPE *) q; \ \ for( i = 0; i < m; i++ ) \ tq[i] = (TYPE) p[VIPS_MIN( n - 1, i )]; \ } /* Cast a vector of double to a complex vector of TYPE. */ #define CASTC( TYPE ) { \ TYPE * restrict tq = (TYPE *) q; \ \ for( i = 0; i < m; i++ ) { \ tq[0] = (TYPE) p[VIPS_MIN( n - 1, i )]; \ tq[1] = 0; \ \ tq += 2; \ } \ } /* Cast a n-band vector of double to a m-band vector in another format. */ static VipsPel * make_pixel( VipsObject *obj, int m, VipsBandFmt fmt, int n, double * restrict p ) { VipsPel *q; int i; if( !(q = VIPS_ARRAY( obj, m * vips__image_sizeof_bandformat[fmt], VipsPel )) ) return( NULL ); switch( fmt ) { case VIPS_FORMAT_CHAR: CAST_CLIP( signed char, SCHAR_MIN, SCHAR_MAX ); break; case VIPS_FORMAT_UCHAR: CAST_CLIP( unsigned char, 0, UCHAR_MAX ); break; case VIPS_FORMAT_SHORT: CAST_CLIP( signed short, SCHAR_MIN, SCHAR_MAX ); break; case VIPS_FORMAT_USHORT: CAST_CLIP( unsigned short, 0, USHRT_MAX ); break; case VIPS_FORMAT_INT: CAST_CLIP( signed int, INT_MIN, INT_MAX ); break; case VIPS_FORMAT_UINT: CAST_CLIP( unsigned int, 0, UINT_MAX ); break; case VIPS_FORMAT_FLOAT: CAST( float ); break; case VIPS_FORMAT_DOUBLE: CAST( double ); break; case VIPS_FORMAT_COMPLEX: CASTC( float ); break; case VIPS_FORMAT_DPCOMPLEX: CASTC( double ); break; default: g_assert( 0 ); } return( q ); } static int vips_unary_const_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsArithmetic *arithmetic = VIPS_ARITHMETIC( object ); VipsUnary *unary = (VipsUnary *) object; VipsUnaryConst *uconst = (VipsUnaryConst *) object; /* If we have a three-element vector we need to bandup the image to * match. */ uconst->n = 1; if( uconst->c ) uconst->n = VIPS_MAX( uconst->n, uconst->c->n ); if( unary->in ) uconst->n = VIPS_MAX( uconst->n, unary->in->Bands ); arithmetic->base_bands = uconst->n; if( unary->in && uconst->c ) { if( vips_check_vector( class->nickname, uconst->c->n, unary->in ) ) return( -1 ); } /* Some operations need the vector in the input type (eg. * im_equal_vec() where the output type is always uchar and is useless * for comparisons), some need it in the output type (eg. * im_andimage_vec() where we want to get the double to an int so we * can do bitwise-and without having to cast for each pixel), some * need a fixed type (eg. im_powtra_vec(), where we want to keep it as * double). * * Therefore pass in the desired vector type as a param. */ if( uconst->c ) uconst->c_ready = make_pixel( (VipsObject *) uconst, uconst->n, uconst->const_format, uconst->c->n, (double *) uconst->c->data ); if( VIPS_OBJECT_CLASS( vips_unary_const_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } static void vips_unary_const_class_init( VipsUnaryConstClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "unary_const"; object_class->description = _( "unary operations with a constant" ); object_class->build = vips_unary_const_build; VIPS_ARG_BOXED( class, "c", 200, _( "c" ), _( "Array of constants" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsUnaryConst, c ), VIPS_TYPE_ARRAY_DOUBLE ); } static void vips_unary_const_init( VipsUnaryConst *uconst ) { } vips-7.38.5/libvips/arithmetic/binary.h0000644000175000017500000000367012303140253014755 00000000000000/* base class for all binary arithmetic operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_BINARY_H #define VIPS_BINARY_H #include #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include "parithmetic.h" #define VIPS_TYPE_BINARY (vips_binary_get_type()) #define VIPS_BINARY( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), VIPS_TYPE_BINARY, VipsBinary )) #define VIPS_BINARY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), VIPS_TYPE_BINARY, VipsBinaryClass)) #define VIPS_IS_BINARY( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_BINARY )) #define VIPS_IS_BINARY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_BINARY )) #define VIPS_BINARY_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), VIPS_TYPE_BINARY, VipsBinaryClass )) typedef struct _VipsBinary { VipsArithmetic parent_instance; /* Original left and right image args. */ VipsImage *left; VipsImage *right; } VipsBinary; typedef VipsArithmeticClass VipsBinaryClass; GType vips_binary_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_BINARY_H*/ vips-7.38.5/libvips/arithmetic/project.c0000644000175000017500000002115512303140253015130 00000000000000/* horizontal and vertical projection * * 20/4/06 * - from im_histgr() * 25/3/10 * - gtkdoc * - small celanups * 11/9/13 * - redo as a class, from vips_hist_find() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "statistic.h" struct _Project; typedef struct { /* Horizontal array: sums of all columns. */ void *column_sums; /* Vertical array: sums of all rows. */ void *row_sums; } Histogram; typedef struct _VipsProject { VipsStatistic parent_instance; /* Main image histogram. Subhists accumulate to this. */ Histogram *hist; /* Write sums here. */ VipsImage *columns; VipsImage *rows; } VipsProject; typedef VipsStatisticClass VipsProjectClass; G_DEFINE_TYPE( VipsProject, vips_project, VIPS_TYPE_STATISTIC ); /* Save a bit of typing. */ #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define D VIPS_FORMAT_DOUBLE #define N VIPS_FORMAT_NOTSET static const VipsBandFormat vips_project_format_table[10] = { /* UC C US S UI I F X D DX */ UI, I, UI, I, UI, I, D, N, D, N }; static Histogram * histogram_new( VipsProject *project ) { VipsStatistic *statistic = VIPS_STATISTIC( project ); VipsImage *in = statistic->ready; VipsBandFormat outfmt = vips_project_format_table[in->BandFmt]; int psize = vips__image_sizeof_bandformat[outfmt] * in->Bands; Histogram *hist; if( !(hist = VIPS_NEW( project, Histogram )) ) return( NULL ); hist->column_sums = VIPS_ARRAY( project, psize * in->Xsize, guchar ); hist->row_sums = VIPS_ARRAY( project, psize * in->Ysize, guchar ); if( !hist->column_sums || !hist->row_sums ) return( NULL ); memset( hist->column_sums, 0, psize * in->Xsize ); memset( hist->row_sums, 0, psize * in->Ysize ); return( hist ); } static int vips_project_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsProject *project = (VipsProject *) object; int y; if( statistic->in && vips_check_noncomplex( class->nickname, statistic->in ) ) return( -1 ); g_object_set( object, "columns", vips_image_new(), "rows", vips_image_new(), NULL ); /* main hist made on first thread start. */ if( VIPS_OBJECT_CLASS( vips_project_parent_class )->build( object ) ) return( -1 ); /* Make the output image. */ if( vips_image_pipelinev( project->columns, VIPS_DEMAND_STYLE_ANY, statistic->ready, NULL ) || vips_image_pipelinev( project->rows, VIPS_DEMAND_STYLE_ANY, statistic->ready, NULL ) ) return( -1 ); project->columns->Ysize = 1; project->columns->BandFmt = vips_project_format_table[statistic->ready->BandFmt]; project->columns->Type = VIPS_INTERPRETATION_HISTOGRAM; project->rows->Xsize = 1; project->rows->BandFmt = vips_project_format_table[statistic->ready->BandFmt]; project->rows->Type = VIPS_INTERPRETATION_HISTOGRAM; if( vips_image_write_line( project->columns, 0, (VipsPel *) project->hist->column_sums ) ) return( -1 ); for( y = 0; y < project->rows->Ysize; y++ ) if( vips_image_write_line( project->rows, y, (VipsPel *) project->hist->row_sums + y * VIPS_IMAGE_SIZEOF_PEL( project->rows ) ) ) return( -1 ); return( 0 ); } /* Build a sub-hist, based on the main hist. */ static void * vips_project_start( VipsStatistic *statistic ) { VipsProject *project = (VipsProject *) statistic; /* Make the main hist, if necessary. */ if( !project->hist ) project->hist = histogram_new( project ); return( (void *) histogram_new( project ) ); } /* Add a line of pixels. */ #define ADD_PIXELS( OUT, IN ) { \ OUT *row_sums = ((OUT *) hist->row_sums) + y * nb; \ OUT *column_sums; \ IN *p; \ \ column_sums = ((OUT *) hist->column_sums) + x * nb; \ p = (IN *) in; \ for( i = 0; i < n; i++ ) { \ for( j = 0; j < nb; j++ ) { \ column_sums[j] += p[j]; \ row_sums[j] += p[j]; \ } \ \ p += nb; \ column_sums += nb; \ } \ } /* Add a region to a project. */ static int vips_project_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { int nb = statistic->ready->Bands; Histogram *hist = (Histogram *) seq; int i, j; switch( statistic->ready->BandFmt ) { case VIPS_FORMAT_UCHAR: ADD_PIXELS( guint, guchar ); break; case VIPS_FORMAT_CHAR: ADD_PIXELS( int, char ); break; case VIPS_FORMAT_USHORT: ADD_PIXELS( guint, gushort ); break; case VIPS_FORMAT_SHORT: ADD_PIXELS( int, short ); break; case VIPS_FORMAT_UINT: ADD_PIXELS( guint, guint ); break; case VIPS_FORMAT_INT: ADD_PIXELS( int, int ); break; case VIPS_FORMAT_FLOAT: ADD_PIXELS( double, float ); break; case VIPS_FORMAT_DOUBLE: ADD_PIXELS( double, double ); break; default: g_assert( 0 ); } return( 0 ); } #define ADD_BUFFER( TYPE, Q, P, N ) { \ TYPE *p = (TYPE *) (P); \ TYPE *q = (TYPE *) (Q); \ int n = (N); \ int i; \ \ for( i = 0; i < n; i++ ) \ q[i] += p[i]; \ } /* Join a sub-project onto the main project. */ static int vips_project_stop( VipsStatistic *statistic, void *seq ) { VipsProject *project = (VipsProject *) statistic; Histogram *hist = project->hist; Histogram *sub_hist = (Histogram *) seq; VipsImage *in = statistic->ready; VipsBandFormat outfmt = vips_project_format_table[in->BandFmt]; int hsz = in->Xsize * in->Bands; int vsz = in->Ysize * in->Bands; /* Add on sub-data. */ switch( outfmt ) { case VIPS_FORMAT_UINT: ADD_BUFFER( guint, hist->column_sums, sub_hist->column_sums, hsz ); ADD_BUFFER( guint, hist->row_sums, sub_hist->row_sums, vsz ); break; case VIPS_FORMAT_INT: ADD_BUFFER( int, hist->column_sums, sub_hist->column_sums, hsz ); ADD_BUFFER( int, hist->row_sums, sub_hist->row_sums, vsz ); break; case VIPS_FORMAT_DOUBLE: ADD_BUFFER( double, hist->column_sums, sub_hist->column_sums, hsz ); ADD_BUFFER( double, hist->row_sums, sub_hist->row_sums, vsz ); break; default: g_assert( 0 ); } /* Blank out sub-project to make sure we can't add it again. */ sub_hist->column_sums = NULL; sub_hist->row_sums = NULL; return( 0 ); } static void vips_project_class_init( VipsProjectClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "project"; object_class->description = _( "find image projections" ); object_class->build = vips_project_build; sclass->start = vips_project_start; sclass->scan = vips_project_scan; sclass->stop = vips_project_stop; VIPS_ARG_IMAGE( class, "columns", 100, _( "Columns" ), _( "Sums of columns" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsProject, columns ) ); VIPS_ARG_IMAGE( class, "rows", 101, _( "Rows" ), _( "Sums of rows" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsProject, rows ) ); } static void vips_project_init( VipsProject *project ) { } /** * vips_project: * @in: input image * @columns: sums of columns * @rows: sums of rows * @...: %NULL-terminated list of optional named arguments * * Find the horizontal and vertical projections of an image, ie. the sum * of every row of pixels, and the sum of every column of pixels. The output * format is uint, int or double, depending on the input format. * * Non-complex images only. * * See also: vips_hist_find(), vips_profile(). * * Returns: 0 on success, -1 on error */ int vips_project( VipsImage *in, VipsImage **columns, VipsImage **rows, ... ) { va_list ap; int result; va_start( ap, rows ); result = vips_call_split( "project", ap, in, columns, rows ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/avg.c0000644000175000017500000001344212303140253014237 00000000000000/* avg ... average value of image * * Copyright: 1990, J. Cupitt * * Author: J. Cupitt * Written on: 02/08/1990 * Modified on: * 5/5/93 JC * - now does partial images * - less likely to overflow * 1/7/93 JC * - adapted for partial v2 * - ANSI C * 21/2/95 JC * - modernised again * 11/5/95 JC * - oops! return( NULL ) in im_avg(), instead of return( -1 ) * 20/6/95 JC * - now returns double * 13/1/05 * - use 64 bit arithmetic * 8/12/06 * - add liboil support * 18/8/09 * - gtkdoc, minor reformatting * 7/9/09 * - rewrite for im__wrapiter() * - add complex case (needed for im_max()) * 8/9/09 * - wrapscan stuff moved here * 31/7/10 * - remove liboil * 24/8/11 * - rewrite as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "statistic.h" typedef struct _VipsAvg { VipsStatistic parent_instance; double sum; double out; } VipsAvg; typedef VipsStatisticClass VipsAvgClass; G_DEFINE_TYPE( VipsAvg, vips_avg, VIPS_TYPE_STATISTIC ); static int vips_avg_build( VipsObject *object ) { VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsAvg *avg = (VipsAvg *) object; gint64 vals; double average; if( VIPS_OBJECT_CLASS( vips_avg_parent_class )->build( object ) ) return( -1 ); /* Calculate average. For complex, we accumulate re*re + * im*im, so we need to sqrt. */ vals = (gint64) vips_image_get_width( statistic->in ) * vips_image_get_height( statistic->in ) * vips_image_get_bands( statistic->in ); average = avg->sum / vals; if( vips_bandfmt_iscomplex( vips_image_get_format( statistic->in ) ) ) average = sqrt( average ); g_object_set( object, "out", average, NULL ); return( 0 ); } /* Start function: allocate space for a double in which we can accumulate the * sum for this thread. */ static void * vips_avg_start( VipsStatistic *statistic ) { return( (void *) g_new0( double, 1 ) ); } /* Stop function. Add this little sum to the main sum. */ static int vips_avg_stop( VipsStatistic *statistic, void *seq ) { VipsAvg *avg = (VipsAvg *) statistic; double *sum = (double *) seq; avg->sum += *sum; g_free( seq ); return( 0 ); } /* Sum pels in this section. */ #define LOOP( TYPE ) { \ TYPE *p = (TYPE *) in; \ \ for( i = 0; i < sz; i++ ) \ m += p[i]; \ } #define CLOOP( TYPE ) { \ TYPE *p = (TYPE *) in; \ \ for( i = 0; i < sz; i++ ) { \ double mod; \ \ mod = p[0] * p[0] + p[1] * p[1]; \ p += 2; \ \ m += mod; \ } \ } /* Loop over region, accumulating a sum in *tmp. */ static int vips_avg_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { const int sz = n * vips_image_get_bands( statistic->in ); double *sum = (double *) seq; int i; double m; m = *sum; /* Now generate code for all types. */ switch( vips_image_get_format( statistic->in ) ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char ); break; case VIPS_FORMAT_CHAR: LOOP( signed char ); break; case VIPS_FORMAT_USHORT: LOOP( unsigned short ); break; case VIPS_FORMAT_SHORT: LOOP( signed short ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int ); break; case VIPS_FORMAT_INT: LOOP( signed int ); break; case VIPS_FORMAT_FLOAT: LOOP( float ); break; case VIPS_FORMAT_DOUBLE: LOOP( double ); break; case VIPS_FORMAT_COMPLEX: CLOOP( float ); break; case VIPS_FORMAT_DPCOMPLEX: CLOOP( double ); break; default: g_assert( 0 ); } *sum = m; return( 0 ); } static void vips_avg_class_init( VipsAvgClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "avg"; object_class->description = _( "find image average" ); object_class->build = vips_avg_build; sclass->start = vips_avg_start; sclass->scan = vips_avg_scan; sclass->stop = vips_avg_stop; VIPS_ARG_DOUBLE( class, "out", 2, _( "Output" ), _( "Output value" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsAvg, out ), -INFINITY, INFINITY, 0.0 ); } static void vips_avg_init( VipsAvg *avg ) { } /** * vips_avg: * @in: input #VipsImage * @out: output pixel average * @...: %NULL-terminated list of optional named arguments * * This operation finds the average value in an image. It operates on all * bands of the input image: use vips_stats() if you need to calculate an * average for each band. For complex images, return the average modulus. * * See also: vips_stats(), vips_bandmean(), vips_deviate(), vips_rank() * * Returns: 0 on success, -1 on error */ int vips_avg( VipsImage *in, double *out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "avg", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/max.c0000644000175000017500000003050412303141142014243 00000000000000/* find image maximum * * Copyright: 1990, J. Cupitt * * Author: J. Cupitt * Written on: 02/05/1990 * Modified on : 18/03/1991, N. Dessipris * 23/11/92: J.Cupitt - correct result for more than 1 band now. * 23/7/93 JC * - im_incheck() call added * 20/6/95 JC * - now returns double for value, like im_max() * 4/9/09 * - gtkdoc comment * 8/9/09 * - rewrite based on im_max() to get partial * - move im_max() in here as a convenience function * 6/11/11 * - rewrite as a class * - abandon scan if we find maximum possible value * 24/2/12 * - avoid NaN in float/double/complex images * - allow +/- INFINITY as a result * 4/12/12 * - track and return top n values */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "statistic.h" /* Track max values and position here. We need one of these for each thread, * and one for the main value. * * We will generally only be tracking a small (<10?) number of values, so * simple arrays will be fastest. */ typedef struct _VipsValues { struct _VipsMax *max; /* Number of values we track. */ int size; /* How many values we have in the arrays. */ int n; /* Position and values. We track mod**2 for complex and do a sqrt() at * the end. The three arrays are sorted by @value, smallest first. */ double *value; int *x_pos; int *y_pos; } VipsValues; typedef struct _VipsMax { VipsStatistic parent_instance; /* Max number of values we track. */ int size; /* The single max. Can be unset if, for example, the whole image is * NaN. */ double max; int x; int y; /* And the positions and values we found as VipsArrays for returning * to our caller. */ VipsArrayDouble *max_array; VipsArrayInt *x_array; VipsArrayInt *y_array; /* Global state here. */ VipsValues values; } VipsMax; static void vips_values_init( VipsValues *values, VipsMax *max ) { values->max = max; values->size = max->size; values->n = 0; values->value = VIPS_ARRAY( max, values->size, double ); values->x_pos = VIPS_ARRAY( max, values->size, int ); values->y_pos = VIPS_ARRAY( max, values->size, int ); } /* Add a value. Do nothing if the value is too small. */ static void vips_values_add( VipsValues *values, double v, int x, int y ) { int i, j; /* Find insertion point. */ for( i = 0; i < values->n; i++ ) if( v <= values->value[i] ) break; /* Array full? */ if( values->n == values->size ) { if( i > 0 ) { /* We need to move stuff to the left to make space, * shunting the smallest out. */ for( j = 0; j < i - 1; j++ ) { values->value[j] = values->value[j + 1]; values->x_pos[j] = values->x_pos[j + 1]; values->y_pos[j] = values->y_pos[j + 1]; } values->value[i - 1] = v; values->x_pos[i - 1] = x; values->y_pos[i - 1] = y; } } else { /* Not full, move stuff to the right into empty space. */ for( j = values->n; j > i; j-- ) { values->value[j] = values->value[j - 1]; values->x_pos[j] = values->x_pos[j - 1]; values->y_pos[j] = values->y_pos[j - 1]; } values->value[i] = v; values->x_pos[i] = x; values->y_pos[i] = y; values->n += 1; } } typedef VipsStatisticClass VipsMaxClass; G_DEFINE_TYPE( VipsMax, vips_max, VIPS_TYPE_STATISTIC ); static int vips_max_build( VipsObject *object ) { VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsMax *max = (VipsMax *) object; VipsValues *values = &max->values; vips_values_init( values, max ); if( VIPS_OBJECT_CLASS( vips_max_parent_class )->build( object ) ) return( -1 ); /* For speed we accumulate max ** 2 for complex. */ if( vips_bandfmt_iscomplex( vips_image_get_format( statistic->in ) ) ) { int i; for( i = 0; i < values->n; i++ ) values->value[i] = sqrt( values->value[i] ); } /* Don't set if there's no value (eg. if every pixel is NaN). This * will trigger an error later. */ if( values->n > 0 ) { VipsArrayDouble *out_array; VipsArrayInt *x_array; VipsArrayInt *y_array; out_array = vips_array_double_new( values->value, values->n ); x_array = vips_array_int_new( values->x_pos, values->n ); y_array = vips_array_int_new( values->y_pos, values->n ); /* We have to set the props via g_object_set() to stop vips * complaining they are unset. */ g_object_set( max, "out", values->value[values->n - 1], "x", values->x_pos[values->n - 1], "y", values->y_pos[values->n - 1], "out_array", out_array, "x_array", x_array, "y_array", y_array, NULL ); vips_area_unref( (VipsArea *) out_array ); vips_area_unref( (VipsArea *) x_array ); vips_area_unref( (VipsArea *) y_array ); } #ifdef DEBUG { int i; printf( "vips_max_build: %d values found\n", values->n ); for( i = 0; i < values->n; i++ ) printf( "%d) %g\t%d\t%d\n", i, values->value[i], values->x_pos[i], values->y_pos[i] ); } #endif /*DEBUG*/ return( 0 ); } /* New sequence value. Make a private VipsValues for this thread. */ static void * vips_max_start( VipsStatistic *statistic ) { VipsValues *values; values = g_new( VipsValues, 1 ); vips_values_init( values, (VipsMax *) statistic ); return( (void *) values ); } /* Merge the sequence value back into the per-call state. */ static int vips_max_stop( VipsStatistic *statistic, void *seq ) { VipsMax *max = (VipsMax *) statistic; VipsValues *values = (VipsValues *) seq; int i; for( i = 0; i < values->n; i++ ) vips_values_add( &max->values, values->value[i], values->x_pos[i], values->y_pos[i] ); g_free( values ); return( 0 ); } /* Real max with an upper bound. * * Add values to the buffer if they are greater than the buffer minimum. If * the buffer isn't full, there is no minimum. * * Avoid a double test by splitting the loop into two phases: before and after * the buffer fills. * * Stop if our array fills with maxval. */ #define LOOPU( TYPE, UPPER ) { \ TYPE *p = (TYPE *) in; \ TYPE m; \ \ for( i = 0; i < sz && values->n < values->size; i++ ) \ vips_values_add( values, p[i], x + i / bands, y ); \ m = values->value[0]; \ \ for( ; i < sz; i++ ) { \ if( p[i] > m ) { \ vips_values_add( values, p[i], x + i / bands, y ); \ m = values->value[0]; \ \ if( m >= UPPER ) { \ statistic->stop = TRUE; \ break; \ } \ } \ } \ } /* float/double max ... no limits, and we have to avoid NaN. * * NaN compares false to every float value, so we don't need to test for NaN * in the second loop. */ #define LOOPF( TYPE ) { \ TYPE *p = (TYPE *) in; \ TYPE m; \ \ for( i = 0; i < sz && values->n < values->size; i++ ) \ if( !isnan( p[i] ) ) \ vips_values_add( values, p[i], x + i / bands, y ); \ m = values->value[0]; \ \ for( ; i < sz; i++ ) \ if( p[i] > m ) { \ vips_values_add( values, p[i], x + i / bands, y ); \ m = values->value[0]; \ } \ } /* As LOOPF, but complex. Track max(mod ** 2) to avoid sqrt(). */ #define LOOPC( TYPE ) { \ TYPE *p = (TYPE *) in; \ TYPE m; \ \ for( i = 0; i < sz && values->n < values->size; i++ ) { \ TYPE mod2 = p[0] * p[0] + p[1] * p[1]; \ \ if( !isnan( mod2 ) ) \ vips_values_add( values, p[i], x + i / bands, y ); \ \ p += 2; \ } \ m = values->value[0]; \ \ for( ; i < sz; i++ ) { \ TYPE mod2 = p[0] * p[0] + p[1] * p[1]; \ \ if( mod2 > m ) { \ vips_values_add( values, mod2, x + i / bands, y ); \ m = values->value[0]; \ } \ \ p += 2; \ } \ } /* Loop over region, adding to seq. */ static int vips_max_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { VipsValues *values = (VipsValues *) seq; const int bands = vips_image_get_bands( statistic->in ); const int sz = n * bands; int i; switch( vips_image_get_format( statistic->in ) ) { case VIPS_FORMAT_UCHAR: LOOPU( unsigned char, UCHAR_MAX ); break; case VIPS_FORMAT_CHAR: LOOPU( signed char, SCHAR_MAX ); break; case VIPS_FORMAT_USHORT: LOOPU( unsigned short, USHRT_MAX ); break; case VIPS_FORMAT_SHORT: LOOPU( signed short, SHRT_MAX ); break; case VIPS_FORMAT_UINT: LOOPU( unsigned int, UINT_MAX ); break; case VIPS_FORMAT_INT: LOOPU( signed int, INT_MAX ); break; case VIPS_FORMAT_FLOAT: LOOPF( float ); break; case VIPS_FORMAT_DOUBLE: LOOPF( double ); break; case VIPS_FORMAT_COMPLEX: LOOPC( float ); break; case VIPS_FORMAT_DPCOMPLEX: LOOPC( double ); break; default: g_assert( 0 ); } return( 0 ); } static void vips_max_class_init( VipsMaxClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "max"; object_class->description = _( "find image maximum" ); object_class->build = vips_max_build; sclass->start = vips_max_start; sclass->scan = vips_max_scan; sclass->stop = vips_max_stop; VIPS_ARG_DOUBLE( class, "out", 1, _( "Output" ), _( "Output value" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsMax, max ), -INFINITY, INFINITY, 0.0 ); VIPS_ARG_INT( class, "x", 2, _( "x" ), _( "Horizontal position of maximum" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMax, x ), 0, 1000000, 0 ); VIPS_ARG_INT( class, "y", 3, _( "y" ), _( "Vertical position of maximum" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMax, y ), 0, 1000000, 0 ); VIPS_ARG_INT( class, "size", 4, _( "Size" ), _( "Number of maximum values to find" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMax, size ), 0, 1000000, 10 ); VIPS_ARG_BOXED( class, "out_array", 6, _( "Output array" ), _( "Array of output values" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMax, max_array ), VIPS_TYPE_ARRAY_DOUBLE ); VIPS_ARG_BOXED( class, "x_array", 7, _( "x array" ), _( "Array of horizontal positions" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMax, x_array ), VIPS_TYPE_ARRAY_INT ); VIPS_ARG_BOXED( class, "y_array", 8, _( "y array" ), _( "Array of vertical positions" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsMax, y_array ), VIPS_TYPE_ARRAY_INT ); } static void vips_max_init( VipsMax *max ) { max->size = 1; } /** * vips_max: * @in: input #VipsImage * @out: output pixel maximum * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @x: horizontal position of maximum * @y: vertical position of maximum * @size: number of maxima to find * @out_array: return array of maximum values * @x_array: corresponding horizontal positions * @y_array: corresponding vertical positions * * This operation finds the maximum value in an image. * * If the image contains several maximum values, only the first @size * found are returned. * * It operates on all * bands of the input image: use vips_stats() if you need to find an * maximum for each band. * * For complex images, this operation finds the maximum modulus. * * You can read out the position of the maximum with @x and @y. You can read * out arrays of the values and positions of the top @size maxima with * @out_array, @x_array and @y_array. * * See also: vips_min(), vips_stats(). * * Returns: 0 on success, -1 on error */ int vips_max( VipsImage *in, double *out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "max", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/statistic.c0000644000175000017500000001047012303141142015465 00000000000000/* base class for all stats operations * * properties: * - one image in, single value or matrix out * - output depends on whole of input, ie. we have a sink * * 24/8/11 * - from im_avg.c */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "statistic.h" G_DEFINE_ABSTRACT_TYPE( VipsStatistic, vips_statistic, VIPS_TYPE_OPERATION ); static void * vips_statistic_scan_start( VipsImage *in, void *a, void *b ) { VipsStatistic *statistic = VIPS_STATISTIC( a ); VipsStatisticClass *class = VIPS_STATISTIC_GET_CLASS( statistic ); return( class->start( statistic ) ); } static int vips_statistic_scan( VipsRegion *region, void *seq, void *a, void *b, gboolean *stop ) { VipsStatistic *statistic = VIPS_STATISTIC( a ); VipsStatisticClass *class = VIPS_STATISTIC_GET_CLASS( statistic ); VipsRect *r = ®ion->valid; int lsk = IM_REGION_LSKIP( region ); int y; VipsPel *p; VIPS_DEBUG_MSG( "vips_statistic_scan: %d x %d @ %d x %d\n", r->width, r->height, r->left, r->top ); p = VIPS_REGION_ADDR( region, r->left, r->top ); for( y = 0; y < r->height; y++ ) { if( class->scan( statistic, seq, r->left, r->top + y, p, r->width ) ) return( -1 ); p += lsk; } /* If we've requested stop, pass the message on. */ if( statistic->stop ) *stop = TRUE; return( 0 ); } static int vips_statistic_scan_stop( void *seq, void *a, void *b ) { VipsStatistic *statistic = VIPS_STATISTIC( a ); VipsStatisticClass *class = VIPS_STATISTIC_GET_CLASS( statistic ); return( class->stop( statistic, seq ) ); } static int vips_statistic_build( VipsObject *object ) { VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsStatisticClass *sclass = VIPS_STATISTIC_GET_CLASS( statistic ); VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); const char *domain = class->nickname; VipsImage **t = (VipsImage **) vips_object_local_array( object, 1 ); #ifdef DEBUG printf( "vips_statistic_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ if( VIPS_OBJECT_CLASS( vips_statistic_parent_class )->build( object ) ) return( -1 ); /* If there's a format table, cast the input. */ if( sclass->format_table ) { if( vips_cast( statistic->in, &t[0], sclass->format_table[statistic->in->BandFmt], NULL ) ) return( -1 ); statistic->ready = t[0]; } else statistic->ready = statistic->in; if( vips_image_pio_input( statistic->ready ) || vips_check_uncoded( domain, statistic->ready ) ) return( -1 ); if( vips_sink( statistic->ready, vips_statistic_scan_start, vips_statistic_scan, vips_statistic_scan_stop, statistic, NULL ) ) return( -1 ); return( 0 ); } static void vips_statistic_class_init( VipsStatisticClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "statistic"; vobject_class->description = _( "VIPS statistic operations" ); vobject_class->build = vips_statistic_build; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsStatistic, in ) ); } static void vips_statistic_init( VipsStatistic *statistic ) { } vips-7.38.5/libvips/arithmetic/divide.c0000644000175000017500000002066012303140253014726 00000000000000/* Divide two images * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 29/4/93 JC * - now works for partial images * 1/7/93 JC * - adapted for partial v2 * - ANSIfied * 19/10/93 JC * - coredump-inducing bug in complex*complex fixed * 13/12/93 * - char*short bug fixed * 12/6/95 JC * - new im_multiply adapted to make new im_divide * 27/9/04 * - updated for 1 band $op n band image -> n band image case * 8/12/06 * - add liboil support * 18/8/08 * - revise upcasting system * - add gtkdoc comments * 31/7/10 * - remove liboil support * - avoid /0 * 6/11/11 * - rewrite as a class * 22/2/12 * - avoid /0 for complex as well * 6/4/12 * - fixed switch cases * - fixed int operands with <1 result */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "binary.h" typedef VipsBinary VipsDivide; typedef VipsBinaryClass VipsDivideClass; G_DEFINE_TYPE( VipsDivide, vips_divide, VIPS_TYPE_BINARY ); /* Complex divide. */ #ifdef USE_MODARG_DIV /* This is going to be much slower */ #define CLOOP( TYPE ) { \ TYPE * restrict left = (TYPE *) in[0]; \ TYPE * restrict right = (TYPE *) in[1]; \ TYPE * restrict q = (TYPE *) out; \ int i; \ \ for( i = 0; i < sz; i++ ) { \ if( right[0] == 0.0 && \ right[1] == 0.0 ) { \ q[0] = 0.0; \ q[1] = 0.0; \ } \ else { \ double arg = atan2( left[1], left[0] ) - \ atan2( right[1], right[0] ); \ double mod = hypot( left[1], left[0] ) / \ hypot( right[1], right[0] ); \ \ q[0] = mod * cos( arg ); \ q[1] = mod * sin( arg ); \ } \ \ left += 2; \ right += 2; \ q += 2; \ } \ } #else /* USE_MODARG_DIV */ #define CLOOP( TYPE ) { \ TYPE * restrict left = (TYPE *) in[0]; \ TYPE * restrict right = (TYPE *) in[1]; \ TYPE * restrict q = (TYPE *) out; \ int i; \ \ for( i = 0; i < sz; i++ ) { \ if( right[0] == 0.0 && \ right[1] == 0.0 ) { \ q[0] = 0.0; \ q[1] = 0.0; \ } \ else if( fabs( right[0] ) > fabs( right[1] ) ) { \ double a = right[1] / right[0]; \ double b = right[0] + right[1] * a; \ \ q[0] = (left[0] + left[1] * a) / b; \ q[1] = (left[1] - left[0] * a) / b; \ } \ else { \ double a = right[0] / right[1]; \ double b = right[1] + right[0] * a; \ \ q[0] = (left[0] * a + left[1]) / b; \ q[1] = (left[1] * a - left[0]) / b; \ } \ \ left += 2; \ right += 2; \ q += 2; \ } \ } #endif /* USE_MODARG_DIV */ /* Real divide. Cast in to OUT before divide so we work for float output. */ #define RLOOP( IN, OUT ) { \ IN * restrict left = (IN *) in[0]; \ IN * restrict right = (IN *) in[1]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = right[x] == 0 ? 0 : (OUT) left[x] / (OUT) right[x]; \ } static void vips_divide_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; /* Keep types here in sync with vips_divide_format_table[] * below. */ switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_CHAR: RLOOP( signed char, float ); break; case VIPS_FORMAT_UCHAR: RLOOP( unsigned char, float ); break; case VIPS_FORMAT_SHORT: RLOOP( signed short, float ); break; case VIPS_FORMAT_USHORT: RLOOP( unsigned short, float ); break; case VIPS_FORMAT_INT: RLOOP( signed int, float ); break; case VIPS_FORMAT_UINT: RLOOP( unsigned int, float ); break; case VIPS_FORMAT_FLOAT: RLOOP( float, float ); break; case VIPS_FORMAT_DOUBLE: RLOOP( double, double ); break; case VIPS_FORMAT_COMPLEX: CLOOP( float ); break; case VIPS_FORMAT_DPCOMPLEX: CLOOP( double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type promotion for division. Sign and value preserving. Make sure * these match the case statement in divide_buffer() above. */ static int vips_divide_format_table[10] = { /* UC C US S UI I F X D DX */ F, F, F, F, F, F, F, X, D, DX }; static void vips_divide_class_init( VipsDivideClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); object_class->nickname = "divide"; object_class->description = _( "divide two images" ); aclass->process_line = vips_divide_buffer; vips_arithmetic_set_format_table( aclass, vips_divide_format_table ); } static void vips_divide_init( VipsDivide *divide ) { } /** * vips_divide: * @in1: input image 1 * @in2: input image 2 * @out: output image * @...: %NULL-terminated list of optional named arguments * * This operation calculates @in1 / @in2 and writes the result to @out. If any * pixels in @in2 are zero, the corresponding pixel in @out is also zero. * * If the images differ in size, the smaller image is enlarged to match the * larger by adding zero pixels along the bottom and right. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common format (see table * Smallest common format in * arithmetic), then the * following table is used to determine the output type: * * * im_divide() type promotion * * * * input type * output type * * * * * uchar * float * * * char * float * * * ushort * float * * * short * float * * * uint * float * * * int * float * * * float * float * * * double * double * * * complex * complex * * * double complex * double complex * * * *
* * In other words, the output type is just large enough to hold the whole * range of possible values. * * See also: vips_multiply(), vips_linear(), vips_power(). * * Returns: 0 on success, -1 on error */ int vips_divide( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "divide", ap, left, right, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/profile.c0000644000175000017500000001747712303140253015136 00000000000000/* find image profiles * * 11/8/99 JC * - from im_cntlines() * 22/4/04 * - now outputs horizontal/vertical image * 9/11/10 * - any image format, any number of bands * - gtk-doc * 21/9/13 * - rewrite as a class * - output h and v profile in one pass * - partial * - output is int rather than ushort */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "statistic.h" struct _Edges; typedef struct { /* Horizontal array: Ys of top-most non-zero pixel. */ int *column_edges; /* Vertical array: Xs of left-most non-zero pixel. */ int *row_edges; } Edges; typedef struct _VipsProfile { VipsStatistic parent_instance; /* Main edge set. Threads accumulate to this. */ Edges *edges; /* Write profiles here. */ VipsImage *columns; VipsImage *rows; } VipsProfile; typedef VipsStatisticClass VipsProfileClass; G_DEFINE_TYPE( VipsProfile, vips_profile, VIPS_TYPE_STATISTIC ); static Edges * edges_new( VipsProfile *profile ) { VipsStatistic *statistic = VIPS_STATISTIC( profile ); VipsImage *in = statistic->ready; Edges *edges; int i; if( !(edges = VIPS_NEW( profile, Edges )) ) return( NULL ); edges->column_edges = VIPS_ARRAY( profile, in->Xsize * in->Bands, int ); edges->row_edges = VIPS_ARRAY( profile, in->Ysize * in->Bands, int ); if( !edges->column_edges || !edges->row_edges ) return( NULL ); for( i = 0; i < in->Xsize * in->Bands; i++ ) edges->column_edges[i] = in->Ysize; for( i = 0; i < in->Ysize * in->Bands; i++ ) edges->row_edges[i] = in->Xsize; return( edges ); } static int vips_profile_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsProfile *profile = (VipsProfile *) object; int y; if( statistic->in && vips_check_noncomplex( class->nickname, statistic->in ) ) return( -1 ); g_object_set( object, "columns", vips_image_new(), "rows", vips_image_new(), NULL ); /* main edge set made on first thread start. */ if( VIPS_OBJECT_CLASS( vips_profile_parent_class )->build( object ) ) return( -1 ); /* Make the output image. */ if( vips_image_pipelinev( profile->columns, VIPS_DEMAND_STYLE_ANY, statistic->ready, NULL ) || vips_image_pipelinev( profile->rows, VIPS_DEMAND_STYLE_ANY, statistic->ready, NULL ) ) return( -1 ); profile->columns->Ysize = 1; profile->columns->BandFmt = VIPS_FORMAT_INT; profile->columns->Type = VIPS_INTERPRETATION_HISTOGRAM; profile->rows->Xsize = 1; profile->rows->BandFmt = VIPS_FORMAT_INT; profile->rows->Type = VIPS_INTERPRETATION_HISTOGRAM; if( vips_image_write_line( profile->columns, 0, (VipsPel *) profile->edges->column_edges ) ) return( -1 ); for( y = 0; y < profile->rows->Ysize; y++ ) if( vips_image_write_line( profile->rows, y, (VipsPel *) profile->edges->row_edges + y * VIPS_IMAGE_SIZEOF_PEL( profile->rows ) ) ) return( -1 ); return( 0 ); } /* New edge accumulator. */ static void * vips_profile_start( VipsStatistic *statistic ) { VipsProfile *profile = (VipsProfile *) statistic; /* Make the main hist, if necessary. */ if( !profile->edges ) profile->edges = edges_new( profile ); return( (void *) edges_new( profile ) ); } /* We do this a lot. */ #define MINBANG( V, C ) ((V) = VIPS_MIN( V, C )) /* Add a line of pixels. */ #define ADD_PIXELS( TYPE ) { \ TYPE *p; \ int *column_edges; \ int *row_edges; \ \ p = (TYPE *) in; \ column_edges = edges->column_edges + x * nb; \ row_edges = edges->row_edges + y * nb; \ for( i = 0; i < n; i++ ) { \ for( j = 0; j < nb; j++ ) { \ if( p[j] ) { \ MINBANG( column_edges[j], y ); \ MINBANG( row_edges[j], x + i ); \ } \ } \ \ p += nb; \ column_edges += nb; \ } \ } /* Add a region to a profile. */ static int vips_profile_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { int nb = statistic->ready->Bands; Edges *edges = (Edges *) seq; int i, j; switch( statistic->ready->BandFmt ) { case VIPS_FORMAT_UCHAR: ADD_PIXELS( guchar ); break; case VIPS_FORMAT_CHAR: ADD_PIXELS( char ); break; case VIPS_FORMAT_USHORT: ADD_PIXELS( gushort ); break; case VIPS_FORMAT_SHORT: ADD_PIXELS( short ); break; case VIPS_FORMAT_UINT: ADD_PIXELS( guint ); break; case VIPS_FORMAT_INT: ADD_PIXELS( int ); break; case VIPS_FORMAT_FLOAT: ADD_PIXELS( float ); break; case VIPS_FORMAT_DOUBLE: ADD_PIXELS( double ); break; default: g_assert( 0 ); } return( 0 ); } /* Join a sub-profile onto the main profile. */ static int vips_profile_stop( VipsStatistic *statistic, void *seq ) { VipsProfile *profile = (VipsProfile *) statistic; Edges *edges = profile->edges; Edges *sub_edges = (Edges *) seq; VipsImage *in = statistic->ready; int i; for( i = 0; i < in->Xsize * in->Bands; i++ ) MINBANG( edges->column_edges[i], sub_edges->column_edges[i] ); for( i = 0; i < in->Ysize * in->Bands; i++ ) MINBANG( edges->row_edges[i], sub_edges->row_edges[i] ); /* Blank out sub-profile to make sure we can't add it again. */ sub_edges->row_edges = NULL; sub_edges->column_edges = NULL; return( 0 ); } static void vips_profile_class_init( VipsProfileClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "profile"; object_class->description = _( "find image profiles" ); object_class->build = vips_profile_build; sclass->start = vips_profile_start; sclass->scan = vips_profile_scan; sclass->stop = vips_profile_stop; VIPS_ARG_IMAGE( class, "columns", 100, _( "Columns" ), _( "First non-zero pixel in column" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsProfile, columns ) ); VIPS_ARG_IMAGE( class, "rows", 101, _( "Rows" ), _( "First non-zero pixel in row" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsProfile, rows ) ); } static void vips_profile_init( VipsProfile *profile ) { } /** * vips_profile: * @in: input image * @columns: distances from top edge * @rows: distances from left edge * @...: %NULL-terminated list of optional named arguments * * vips_profile() searches inward from the edge of @in and finds the * first non-zero pixel. Pixels in @columns have the distance from the top edge * to the first non-zero pixel in that column, @rows has the distance from the * left edge to the first non-zero pixel in that row. * * See also: vips_project(), vips_hist_find(). * * Returns: 0 on success, -1 on error */ int vips_profile( VipsImage *in, VipsImage **columns, VipsImage **rows, ... ) { va_list ap; int result; va_start( ap, rows ); result = vips_call_split( "profile", ap, in, columns, rows ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/stats.c0000644000175000017500000002525012303140253014620 00000000000000/* stats.c ... many image stats in a single pass * (C) Kirk Martinez 1993 23/4/93 J.Cupitt - adapted to partial images - special struct abandoned; now returns DOUBLEMASK. 1/7/93 JC - adapted for partial v2 - ANSIfied 27/7/93 JC - init of mask changed to use actual values, not IM_MAXDOUBLE and (-IM_MAXDOUBLE). These caused problems when assigned to floats. funny business with offset==42, yuk! 31/8/93 JC - forgot to init global max/min properly! sorry. 21/6/95 JC - still did not init max and min correctly --- now fixed for good * 13/1/05 * - use 64 bit arithmetic * 1/9/09 * - argh nope min/max was broken again for >1CPU in short pipelines on * some architectures * 7/9/09 * - rework based on new im__wrapscan() / im_max() ideas for a proper fix * - gtkdoc comment * 7/11/11 * - redone as a class * - track maxpos / minpos too */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "statistic.h" typedef struct _VipsStats { VipsStatistic parent_instance; VipsImage *out; gboolean set; /* FALSE means no value yet */ } VipsStats; typedef VipsStatisticClass VipsStatsClass; G_DEFINE_TYPE( VipsStats, vips_stats, VIPS_TYPE_STATISTIC ); /* Names for our columns. */ enum { COL_MIN = 0, COL_MAX = 1, COL_SUM = 2, COL_SUM2 = 3, COL_AVG = 4, COL_SD = 5, COL_XMIN = 6, COL_YMIN = 7, COL_XMAX = 8, COL_YMAX = 9, COL_LAST = 10 }; static int vips_stats_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsStats *stats = (VipsStats *) object; gint64 vals, pels; double *row0, *row; int b, y, i; if( statistic->in ) { int bands = vips_image_get_bands( statistic->in ); if( vips_check_noncomplex( class->nickname, statistic->in ) ) return( -1 ); g_object_set( object, "out", vips_image_new_matrix( COL_LAST, bands + 1 ), NULL ); } if( VIPS_OBJECT_CLASS( vips_stats_parent_class )->build( object ) ) return( -1 ); pels = (gint64) vips_image_get_width( statistic->in ) * vips_image_get_height( statistic->in ); vals = pels * vips_image_get_bands( statistic->in ); row0 = VIPS_MATRIX( stats->out, 0, 0 ); row = VIPS_MATRIX( stats->out, 0, 1 ); for( i = 0; i < COL_LAST; i++ ) row0[i] = row[i]; for( b = 1; b < vips_image_get_bands( statistic->in ); b++ ) { row = VIPS_MATRIX( stats->out, 0, b + 1 ); if( row[COL_MIN] < row0[COL_MIN] ) { row0[COL_MIN] = row[COL_MIN]; row0[COL_XMIN] = row[COL_XMIN]; row0[COL_YMIN] = row[COL_YMIN]; } if( row[COL_MAX] > row0[COL_MAX] ) { row0[COL_MAX] = row[COL_MAX]; row0[COL_XMAX] = row[COL_XMAX]; row0[COL_YMAX] = row[COL_YMAX]; } row0[COL_SUM] += row[COL_SUM]; row0[COL_SUM2] += row[COL_SUM2]; } for( y = 1; y < vips_image_get_height( stats->out ); y++ ) { double *row = VIPS_MATRIX( stats->out, 0, y ); row[COL_AVG] = row[COL_SUM] / pels; row[COL_SD] = sqrt( fabs( row[COL_SUM2] - (row[COL_SUM] * row[COL_SUM] / pels) ) / (pels - 1) ); } row0[COL_AVG] = row0[COL_SUM] / vals; row0[COL_SD] = sqrt( fabs( row0[COL_SUM2] - (row0[COL_SUM] * row0[COL_SUM] / vals) ) / (vals - 1) ); return( 0 ); } /* Stop function. Add these little stats to the main set of stats. */ static int vips_stats_stop( VipsStatistic *statistic, void *seq ) { int bands = vips_image_get_bands( statistic->in ); VipsStats *global = (VipsStats *) statistic; VipsStats *local = (VipsStats *) seq; int b; if( local->set && !global->set ) { for( b = 0; b < bands; b++ ) { double *p = VIPS_MATRIX( local->out, 0, b + 1 ); double *q = VIPS_MATRIX( global->out, 0, b + 1 ); int i; for( i = 0; i < COL_LAST; i++ ) q[i] = p[i]; } global->set = TRUE; } else if( local->set && global->set ) { for( b = 0; b < bands; b++ ) { double *p = VIPS_MATRIX( local->out, 0, b + 1 ); double *q = VIPS_MATRIX( global->out, 0, b + 1 ); if( p[COL_MIN] < q[COL_MIN] ) { q[COL_MIN] = p[COL_MIN]; q[COL_XMIN] = p[COL_XMIN]; q[COL_YMIN] = p[COL_YMIN]; } if( p[COL_MAX] > q[COL_MAX] ) { q[COL_MAX] = p[COL_MAX]; q[COL_XMAX] = p[COL_XMAX]; q[COL_YMAX] = p[COL_YMAX]; } q[COL_SUM] += p[COL_SUM]; q[COL_SUM2] += p[COL_SUM2]; } } VIPS_FREEF( g_object_unref, local->out ); VIPS_FREEF( g_free, seq ); return( 0 ); } /* Start function: make a dummy local stats for the private use of this thread. */ static void * vips_stats_start( VipsStatistic *statistic ) { int bands = vips_image_get_bands( statistic->in ); VipsStats *stats; stats = g_new( VipsStats, 1 ); if( !(stats->out = vips_image_new_matrix( COL_LAST, bands + 1 )) ) { g_free( stats ); return( NULL ); } stats->set = FALSE; return( (void *) stats ); } /* We scan lines bands times to avoid repeating band loops. * Use temp variables of same type for min/max for faster comparisons. */ #define LOOP( TYPE ) { \ for( b = 0; b < bands; b++ ) { \ TYPE *p = ((TYPE *) in) + b; \ double *q = VIPS_MATRIX( local->out, 0, b + 1 ); \ TYPE small, big; \ double sum, sum2; \ int xmin, ymin; \ int xmax, ymax; \ \ if( local->set ) { \ small = q[COL_MIN]; \ big = q[COL_MAX]; \ sum = q[COL_SUM]; \ sum2 = q[COL_SUM2]; \ xmin = q[COL_XMIN]; \ ymin = q[COL_YMIN]; \ xmax = q[COL_XMAX]; \ ymax = q[COL_YMAX]; \ } \ else { \ small = p[0]; \ big = p[0]; \ sum = 0; \ sum2 = 0; \ xmin = x; \ ymin = y; \ xmax = x; \ ymax = y; \ } \ \ for( i = 0; i < n; i++ ) { \ TYPE value = *p; \ \ sum += value; \ sum2 += (double) value * (double) value; \ if( value > big ) { \ big = value; \ xmax = x + i; \ ymax = y; \ } \ else if( value < small ) { \ small = value; \ xmin = x + i; \ ymin = y; \ } \ \ p += bands; \ } \ \ q[COL_MIN] = small; \ q[COL_MAX] = big; \ q[COL_SUM] = sum; \ q[COL_SUM2] = sum2; \ q[COL_XMIN] = xmin; \ q[COL_YMIN] = ymin; \ q[COL_XMAX] = xmax; \ q[COL_YMAX] = ymax; \ } \ \ local->set = TRUE; \ } /* As above, but for float/double types where we have to avoid NaN. */ #define LOOPF( TYPE ) { \ for( b = 0; b < bands; b++ ) { \ TYPE *p = ((TYPE *) in) + b; \ double *q = VIPS_MATRIX( local->out, 0, b + 1 ); \ TYPE small, big; \ double sum, sum2; \ int xmin, ymin; \ int xmax, ymax; \ \ if( local->set ) { \ small = q[COL_MIN]; \ big = q[COL_MAX]; \ sum = q[COL_SUM]; \ sum2 = q[COL_SUM2]; \ xmin = q[COL_XMIN]; \ ymin = q[COL_YMIN]; \ xmax = q[COL_XMAX]; \ ymax = q[COL_YMAX]; \ } \ else { \ small = p[0]; \ big = p[0]; \ sum = 0; \ sum2 = 0; \ xmin = x; \ ymin = y; \ xmax = x; \ ymax = y; \ } \ \ for( i = 0; i < n; i++ ) { \ TYPE value = *p; \ \ sum += value; \ sum2 += (double) value * (double) value; \ if( value > big ) { \ big = value; \ xmax = x + i; \ ymax = y; \ } \ else if( value < small ) { \ small = value; \ xmin = x + i; \ ymin = y; \ } \ \ p += bands; \ } \ \ q[COL_MIN] = small; \ q[COL_MAX] = big; \ q[COL_SUM] = sum; \ q[COL_SUM2] = sum2; \ q[COL_XMIN] = xmin; \ q[COL_YMIN] = ymin; \ q[COL_XMAX] = xmax; \ q[COL_YMAX] = ymax; \ } \ \ local->set = TRUE; \ } /* Loop over region, accumulating a sum in *tmp. */ static int vips_stats_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { const int bands = vips_image_get_bands( statistic->in ); VipsStats *local = (VipsStats *) seq; int b, i; switch( vips_image_get_format( statistic->in ) ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char ); break; case VIPS_FORMAT_CHAR: LOOP( signed char ); break; case VIPS_FORMAT_USHORT: LOOP( unsigned short ); break; case VIPS_FORMAT_SHORT: LOOP( signed short ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int ); break; case VIPS_FORMAT_INT: LOOP( signed int ); break; case VIPS_FORMAT_FLOAT: LOOP( float ); break; case VIPS_FORMAT_DOUBLE: LOOP( double ); break; default: g_assert( 0 ); } return( 0 ); } static void vips_stats_class_init( VipsStatsClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "stats"; object_class->description = _( "find image average" ); object_class->build = vips_stats_build; sclass->start = vips_stats_start; sclass->scan = vips_stats_scan; sclass->stop = vips_stats_stop; VIPS_ARG_IMAGE( class, "out", 100, _( "Output" ), _( "Output array of statistics" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsStats, out ) ); } static void vips_stats_init( VipsStats *stats ) { } /** * vips_stats: * @in: image to scan * @out: image of statistics * @...: %NULL-terminated list of optional named arguments * * Find many image statistics in a single pass through the data. @out is a * one-band #VIPS_FORMAT_DOUBLE image of at least 10 columns by n + 1 * (where n is number of bands in image @in) * rows. Columns are statistics, and are, in order: minimum, maximum, sum, * sum of squares, mean, standard deviation, x coordinate of minimum, y * coordinate of minimum, x coordinate of maximum, y coordinate of maximum. * Later versions of vips_stats() may add more columns. * * Row 0 has statistics for all * bands together, row 1 has stats for band 1, and so on. * * See also: vips_avg(), vips_min(). * * Returns: 0 on success, -1 on error */ int vips_stats( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "stats", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/binary.c0000644000175000017500000000541112303140253014743 00000000000000/* base class for all binary operations * * 13/3/11 * - argh, forgot to make a private array for the inputs * 16/5/11 * - added sizealike * 30/10/11 * - moe most functionality into arithmetic.c */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "binary.h" G_DEFINE_ABSTRACT_TYPE( VipsBinary, vips_binary, VIPS_TYPE_ARITHMETIC ); static int vips_binary_build( VipsObject *object ) { VipsArithmetic *arithmetic = VIPS_ARITHMETIC( object ); VipsBinary *binary = VIPS_BINARY( object ); arithmetic->n = 2; arithmetic->in = (VipsImage **) vips_object_local_array( object, 2 ); arithmetic->in[0] = binary->left; arithmetic->in[1] = binary->right; if( arithmetic->in[0] ) g_object_ref( arithmetic->in[0] ); if( arithmetic->in[1] ) g_object_ref( arithmetic->in[1] ); if( VIPS_OBJECT_CLASS( vips_binary_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_binary_class_init( VipsBinaryClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "binary"; vobject_class->description = _( "binary operations" ); vobject_class->build = vips_binary_build; /* Create properties. */ VIPS_ARG_IMAGE( class, "left", 1, _( "Left" ), _( "Left-hand image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBinary, left ) ); VIPS_ARG_IMAGE( class, "right", 2, _( "Right" ), _( "Right-hand image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBinary, right ) ); } static void vips_binary_init( VipsBinary *binary ) { /* Init our instance fields. */ } vips-7.38.5/libvips/arithmetic/hist_find_indexed.c0000644000175000017500000002476512303141142017141 00000000000000/* indexed histogram: use an index image to pick the bins * * 13/10/09 * - from im_histgr.c * 24/3/10 * - gtkdoc * 17/8/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "statistic.h" struct _VipsHistFindIndexed; /* Accumulate a histogram in one of these. */ typedef struct { struct _VipsHistFindIndexed *indexed; VipsRegion *reg; /* Get index pixels with this */ int size; /* Length of bins */ int mx; /* Maximum value we have seen */ double *bins; /* All the bins! */ } Histogram; typedef struct _VipsHistFindIndexed { VipsStatistic parent_instance; VipsImage *index; /* Index image, cast to uchar/ushort. */ VipsImage *index_ready; /* Main image histogram. Subhists accumulate to this. */ Histogram *hist; /* Write hist to this output image. */ VipsImage *out; } VipsHistFindIndexed; typedef VipsStatisticClass VipsHistFindIndexedClass; G_DEFINE_TYPE( VipsHistFindIndexed, vips_hist_find_indexed, VIPS_TYPE_STATISTIC ); static Histogram * histogram_new( VipsHistFindIndexed *indexed ) { VipsStatistic *statistic = VIPS_STATISTIC( indexed ); int bands = statistic->ready->Bands; Histogram *hist; if( !(hist = VIPS_NEW( indexed, Histogram )) ) return( NULL ); hist->indexed = indexed; hist->reg = NULL; hist->size = indexed->index_ready->BandFmt == VIPS_FORMAT_UCHAR ? 256 : 65536; hist->mx = 0; hist->bins = NULL; if( !(hist->bins = VIPS_ARRAY( indexed, bands * hist->size, double )) || !(hist->reg = vips_region_new( indexed->index_ready )) ) return( NULL ); memset( hist->bins, 0, bands * hist->size * sizeof( double ) ); return( hist ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define US VIPS_FORMAT_USHORT /* Type mapping: go to uchar or ushort. */ static const VipsBandFormat vips_hist_find_indexed_format[10] = { /* UC C US S UI I F X D DX */ UC, UC, US, US, US, US, US, US, US, US }; static int vips_hist_find_indexed_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsHistFindIndexed *indexed = (VipsHistFindIndexed *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 1 ); g_object_set( object, "out", vips_image_new(), NULL ); /* main hist made on first thread start. */ /* index image must be cast to uchar/ushort. */ if( indexed->index && statistic->in ) { if( vips_check_uncoded( class->nickname, indexed->index ) || vips_check_size_same( class->nickname, indexed->index, statistic->in ) || vips_check_mono( class->nickname, indexed->index ) ) return( -1 ); if( vips_cast( indexed->index, &t[0], vips_hist_find_indexed_format[indexed->index->BandFmt], NULL ) ) return( -1 ); indexed->index_ready = t[0]; } if( VIPS_OBJECT_CLASS( vips_hist_find_indexed_parent_class )-> build( object ) ) return( -1 ); VIPS_UNREF( indexed->hist->reg ); if( vips_image_pipelinev( indexed->out, VIPS_DEMAND_STYLE_ANY, statistic->ready, indexed->index_ready, NULL ) ) return( -1 ); vips_image_init_fields( indexed->out, indexed->hist->mx + 1, 1, statistic->ready->Bands, VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE, VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 ); if( vips_image_write_line( indexed->out, 0, (VipsPel *) indexed->hist->bins ) ) return( -1 ); return( 0 ); } static void * vips_hist_find_indexed_start( VipsStatistic *statistic ) { VipsHistFindIndexed *indexed = (VipsHistFindIndexed *) statistic; /* Make the main hist, if necessary. */ if( !indexed->hist ) indexed->hist = histogram_new( indexed ); return( (void *) histogram_new( indexed ) ); } /* Join a sub-hist onto the main hist. */ static int vips_hist_find_indexed_stop( VipsStatistic *statistic, void *seq ) { Histogram *sub_hist = (Histogram *) seq; VipsHistFindIndexed *indexed = (VipsHistFindIndexed *) statistic; Histogram *hist = indexed->hist; int bands = statistic->ready->Bands; int i; /* Add on sub-data. */ hist->mx = VIPS_MAX( hist->mx, sub_hist->mx ); for( i = 0; i < bands * hist->size; i++ ) { hist->bins[i] += sub_hist->bins[i]; sub_hist->bins[i] = 0; } VIPS_UNREF( sub_hist->reg ); return( 0 ); } /* Accumulate a buffer of pels, uchar index. */ #define ACCUMULATE_UCHAR( TYPE ) { \ int x, z; \ TYPE *tv = (TYPE *) in; \ \ for( x = 0; x < n; x++ ) { \ double *bin = hist->bins + i[x] * bands; \ \ for( z = 0; z < bands; z++ ) \ bin[z] += tv[z]; \ \ tv += bands; \ } \ } /* A uchar index image. */ static void vips_hist_find_indexed_uchar_scan( VipsHistFindIndexed *indexed, Histogram *hist, void *in, void *index, int n ) { VipsStatistic *statistic = VIPS_STATISTIC( indexed ); int bands = statistic->ready->Bands; unsigned char *i = (unsigned char *) index; switch( statistic->ready->BandFmt ) { case VIPS_FORMAT_UCHAR: ACCUMULATE_UCHAR( unsigned char ); break; case VIPS_FORMAT_CHAR: ACCUMULATE_UCHAR( signed char ); break; case VIPS_FORMAT_USHORT: ACCUMULATE_UCHAR( unsigned short ); break; case VIPS_FORMAT_SHORT: ACCUMULATE_UCHAR( signed short ); break; case VIPS_FORMAT_UINT: ACCUMULATE_UCHAR( unsigned int ); break; case VIPS_FORMAT_INT: ACCUMULATE_UCHAR( signed int ); break; case VIPS_FORMAT_FLOAT: ACCUMULATE_UCHAR( float ); break; case VIPS_FORMAT_DOUBLE: ACCUMULATE_UCHAR( double ); break; default: g_assert( 0 ); } /* Max is always 255. */ hist->mx = 255; } /* Accumulate a buffer of pels, ushort index. */ #define ACCUMULATE_USHORT( TYPE ) { \ int x, z; \ TYPE *tv = (TYPE *) in; \ \ for( x = 0; x < n; x++ ) { \ int ix = i[x]; \ double *bin = hist->bins + ix * bands; \ \ if( ix > mx ) \ mx = ix; \ \ for( z = 0; z < bands; z++ ) \ bin[z] += tv[z]; \ \ tv += bands; \ } \ } /* A ushort index image. */ static void vips_hist_find_indexed_ushort_scan( VipsHistFindIndexed *indexed, Histogram *hist, void *in, void *index, int n ) { VipsStatistic *statistic = VIPS_STATISTIC( indexed ); int bands = statistic->ready->Bands; unsigned short *i = (unsigned short *) index; int mx; mx = hist->mx; switch( statistic->ready->BandFmt ) { case VIPS_FORMAT_UCHAR: ACCUMULATE_USHORT( unsigned char ); break; case VIPS_FORMAT_CHAR: ACCUMULATE_USHORT( signed char ); break; case VIPS_FORMAT_USHORT: ACCUMULATE_USHORT( unsigned short ); break; case VIPS_FORMAT_SHORT: ACCUMULATE_USHORT( signed short ); break; case VIPS_FORMAT_UINT: ACCUMULATE_USHORT( unsigned int ); break; case VIPS_FORMAT_INT: ACCUMULATE_USHORT( signed int ); break; case VIPS_FORMAT_FLOAT: ACCUMULATE_USHORT( float ); break; case VIPS_FORMAT_DOUBLE: ACCUMULATE_USHORT( double ); break; default: g_assert( 0 ); } /* Note the maximum. */ hist->mx = mx; } typedef void (*VipsHistFindIndexedScanFn)( VipsHistFindIndexed *indexed, Histogram *hist, void *in, void *index, int n ); static int vips_hist_find_indexed_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { Histogram *hist = (Histogram *) seq; VipsHistFindIndexed *indexed = (VipsHistFindIndexed *) statistic; VipsRect r = { x, y, n, 1 }; VipsHistFindIndexedScanFn scan; /* Need the corresponding area of the index image. */ if( vips_region_prepare( hist->reg, &r ) ) return( -1 ); if( indexed->index_ready->BandFmt == VIPS_FORMAT_UCHAR ) scan = vips_hist_find_indexed_uchar_scan; else scan = vips_hist_find_indexed_ushort_scan; scan( indexed, hist, in, VIPS_REGION_ADDR( hist->reg, x, y ), n ); return( 0 ); } static void vips_hist_find_indexed_class_init( VipsHistFindIndexedClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "hist_find_indexed"; object_class->description = _( "find indexed image histogram" ); object_class->build = vips_hist_find_indexed_build; sclass->start = vips_hist_find_indexed_start; sclass->scan = vips_hist_find_indexed_scan; sclass->stop = vips_hist_find_indexed_stop; VIPS_ARG_IMAGE( class, "index", 90, _( "Index" ), _( "Index image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsHistFindIndexed, index ) ); VIPS_ARG_IMAGE( class, "out", 100, _( "Output" ), _( "Output histogram" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistFindIndexed, out ) ); } static void vips_hist_find_indexed_init( VipsHistFindIndexed *hist_find ) { } /** * vips_hist_find_indexed: * @in: input image * @index: input index image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Make a histogram of @in, but use image @index to pick the bins. In other * words, element zero in @out contains the sum of all the pixels in @in * whose corresponding pixel in @index is zero. * * @index must have just one band and be u8 or u16. @value must be * non-complex. @out always has the same size and format as @value. * * This operation is useful in conjunction with im_label_regions(). You can * use it to find the centre of gravity of blobs in an image, for example. * * See also: vips_hist_find(), im_label_regions(). * * Returns: 0 on success, -1 on error */ int vips_hist_find_indexed( VipsImage *in, VipsImage *index, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "hist_find_indexed", ap, in, index, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/deviate.c0000644000175000017500000001357512303141142015110 00000000000000/* VipsDeviate * * Copyright: 1990, J. Cupitt * * Author: J. Cupitt * Written on: 02/08/1990 * Modified on: * 5/5/93 JC * - now does partial images * - less likely to overflow * - adapted from im_deviate * 1/7/93 JC * - adapted for partial v2 * - ANSIfied * 21/2/95 JC * - modernised again * 11/5/95 JC * - oops! return( NULL ) in im_deviate(), instead of return( -1 ) * 20/6/95 JC * - now returns double, not float * 13/1/05 * - use 64 bit arithmetic * 8/12/06 * - add liboil support * 2/9/09 * - gtk-doc comment * - minor reformatting * 4/9/09 * - use im__wrapscan() * 31/7/10 * - remove liboil * 6/11/11 * - rewrite as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "statistic.h" typedef struct _VipsDeviate { VipsStatistic parent_instance; double sum; double sum2; double out; } VipsDeviate; typedef VipsStatisticClass VipsDeviateClass; G_DEFINE_TYPE( VipsDeviate, vips_deviate, VIPS_TYPE_STATISTIC ); static int vips_deviate_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsDeviate *deviate = (VipsDeviate *) object; gint64 vals; double s, s2; if( statistic->in && vips_check_noncomplex( class->nickname, statistic->in ) ) return( -1 ); if( VIPS_OBJECT_CLASS( vips_deviate_parent_class )->build( object ) ) return( -1 ); /* NOTE: NR suggests a two-pass algorithm to minimise roundoff. But that's too expensive for us :-( so do it the old one-pass way. */ /* Calculate and return deviation. Add a fabs to stop sqrt(<=0). */ vals = (gint64) vips_image_get_width( statistic->in ) * vips_image_get_height( statistic->in ) * vips_image_get_bands( statistic->in ); s = deviate->sum; s2 = deviate->sum2; g_object_set( object, "out", sqrt( fabs( s2 - (s * s / vals) ) / (vals - 1) ), NULL ); return( 0 ); } /* Start function: allocate space for an array in which we can accumulate the * sum and sum of squares for this thread. */ static void * vips_deviate_start( VipsStatistic *statistic ) { return( (void *) g_new0( double, 2 ) ); } /* Stop function. Add this little sum to the main sum. */ static int vips_deviate_stop( VipsStatistic *statistic, void *seq ) { VipsDeviate *deviate = (VipsDeviate *) statistic; double *ss2 = (double *) seq; deviate->sum += ss2[0]; deviate->sum2 += ss2[1]; g_free( ss2 ); return( 0 ); } #define LOOP( TYPE ) { \ TYPE *p = (TYPE *) in; \ \ for( x = 0; x < sz; x++ ) { \ TYPE v = p[x]; \ \ sum += v; \ sum2 += (double) v * (double) v; \ } \ } static int vips_deviate_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { const int sz = n * vips_image_get_bands( statistic->in ); double *ss2 = (double *) seq; double sum; double sum2; sum = ss2[0]; sum2 = ss2[1]; /* Now generate code for all types. */ switch( vips_image_get_format( statistic->in ) ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char ); break; case VIPS_FORMAT_CHAR: LOOP( signed char ); break; case VIPS_FORMAT_USHORT: LOOP( unsigned short ); break; case VIPS_FORMAT_SHORT: LOOP( signed short ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int ); break; case VIPS_FORMAT_INT: LOOP( signed int ); break; case VIPS_FORMAT_FLOAT: LOOP( float ); break; case VIPS_FORMAT_DOUBLE: LOOP( double ); break; default: g_assert( 0 ); } ss2[0] = sum; ss2[1] = sum2; return( 0 ); } static void vips_deviate_class_init( VipsDeviateClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "deviate"; object_class->description = _( "find image average" ); object_class->build = vips_deviate_build; sclass->start = vips_deviate_start; sclass->scan = vips_deviate_scan; sclass->stop = vips_deviate_stop; VIPS_ARG_DOUBLE( class, "out", 2, _( "Output" ), _( "Output value" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsDeviate, out ), -INFINITY, INFINITY, 0.0 ); } static void vips_deviate_init( VipsDeviate *deviate ) { } /** * vips_deviate(): * @in: input #VipsImage * @out: output pixel standard deviation * @...: %NULL-terminated list of optional named arguments * * This operation finds the standard deviation of all pixels in @in. It * operates on all bands of the input image: use vips_stats() if you need * to calculate an average for each band. * * Non-complex images only. * * See also: vips_avg(), vips_stats().. * * Returns: 0 on success, -1 on error */ int vips_deviate( VipsImage *in, double *out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "deviate", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/relational.c0000644000175000017500000005751612303141142015624 00000000000000/* relational.c --- various relational operations * * Modified: * 26/7/93 JC * - >,<,>=,<= tests now as (double) to prevent compiler warnings. Should * split into int/float cases really for speed. * 25/1/95 JC * - partialized * - updated * 7/2/95 JC * - oops! bug with doubles fixed * 3/7/98 JC * - vector versions added ... im_equal_vec(), im_lesseq_vec() etc * - small tidies * - should be a bit faster, lots of *q++ changed to q[x] * 10/3/03 JC * - reworked to remove nested #defines: a bit slower, but much smaller * - all except _vec forms now work on complex * 31/7/03 JC * - oops, relational_format was broken for some combinations * 23/9/09 * - gtkdoc * - use new im__arith_binary*() functions * - more meta-programming * 23/6/10 * - oops, moreconst and moreeqconst were the same * 4/11/11 * - redone as a class * 1/2/12 * - complex ==, != were broken * 16/7/12 * - im1 > im2, im1 >= im2 were broken */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "binary.h" #include "unaryconst.h" typedef struct _VipsRelational { VipsBinary parent_instance; VipsOperationRelational relational; } VipsRelational; typedef VipsBinaryClass VipsRelationalClass; G_DEFINE_TYPE( VipsRelational, vips_relational, VIPS_TYPE_BINARY ); static int vips_relational_build( VipsObject *object ) { VipsRelational *relational = (VipsRelational *) object; VipsBinary *binary = (VipsBinary *) object; if( relational->relational == VIPS_OPERATION_RELATIONAL_MORE ) { relational->relational = VIPS_OPERATION_RELATIONAL_LESS; VIPS_SWAP( VipsImage *, binary->left, binary->right ); } if( relational->relational == VIPS_OPERATION_RELATIONAL_MOREEQ ) { relational->relational = VIPS_OPERATION_RELATIONAL_LESSEQ; VIPS_SWAP( VipsImage *, binary->left, binary->right ); } if( VIPS_OBJECT_CLASS( vips_relational_parent_class )->build( object ) ) return( -1 ); return( 0 ); } #define RLOOP( TYPE, ROP ) { \ TYPE * restrict left = (TYPE *) in[0]; \ TYPE * restrict right = (TYPE *) in[1]; \ VipsPel * restrict q = (VipsPel *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = (left[x] ROP right[x]) ? 255 : 0; \ } #define CLOOP( TYPE, COP ) { \ TYPE * restrict left = (TYPE *) in[0]; \ TYPE * restrict right = (TYPE *) in[1]; \ VipsPel * restrict q = (VipsPel *) out; \ \ for( x = 0; x < sz; x++ ) { \ q[x] = COP( left[0], left[1], right[0], right[1]) ? 255 : 0; \ \ left += 2; \ right += 2; \ } \ } #define SWITCH( R, C, ROP, COP ) \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_UCHAR: R( unsigned char, ROP ); break; \ case VIPS_FORMAT_CHAR: R( signed char, ROP ); break; \ case VIPS_FORMAT_USHORT: R( unsigned short, ROP ); break; \ case VIPS_FORMAT_SHORT: R( signed short, ROP ); break; \ case VIPS_FORMAT_UINT: R( unsigned int, ROP ); break; \ case VIPS_FORMAT_INT: R( signed int, ROP ); break; \ case VIPS_FORMAT_FLOAT: R( float, ROP ); break; \ case VIPS_FORMAT_DOUBLE: R( double, ROP ); break;\ case VIPS_FORMAT_COMPLEX: C( float, COP ); break; \ case VIPS_FORMAT_DPCOMPLEX: C( double, COP ); break;\ \ default: \ g_assert( 0 ); \ } #define CEQUAL( x1, y1, x2, y2 ) (x1 == x2 && y1 == y2) #define CNOTEQUAL( x1, y1, x2, y2 ) (x1 != x2 || y1 != y2) #define CLESS( x1, y1, x2, y2 ) (x1 * x1 + y1 * y1 < x2 * x2 + y2 * y2) #define CLESSEQ( x1, y1, x2, y2 ) (x1 * x1 + y1 * y1 <= x2 * x2 + y2 * y2) #define CMORE( x1, y1, x2, y2 ) (x1 * x1 + y1 * y1 > x2 * x2 + y2 * y2) #define CMOREEQ( x1, y1, x2, y2 ) (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) static void vips_relational_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsRelational *relational = (VipsRelational *) arithmetic; VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( relational->relational ) { case VIPS_OPERATION_RELATIONAL_EQUAL: SWITCH( RLOOP, CLOOP, ==, CEQUAL ); break; case VIPS_OPERATION_RELATIONAL_NOTEQUAL: SWITCH( RLOOP, CLOOP, !=, CNOTEQUAL ); break; case VIPS_OPERATION_RELATIONAL_LESS: SWITCH( RLOOP, CLOOP, <, CLESS ); break; case VIPS_OPERATION_RELATIONAL_LESSEQ: SWITCH( RLOOP, CLOOP, <=, CLESSEQ ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static const VipsBandFormat vips_relational_format_table[10] = { /* UC C US S UI I F X D DX */ UC, UC, UC, UC, UC, UC, UC, UC, UC, UC }; static void vips_relational_class_init( VipsRelationalClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "relational"; object_class->description = _( "a relational operation on a pair of images" ); object_class->build = vips_relational_build; aclass->process_line = vips_relational_buffer; vips_arithmetic_set_format_table( aclass, vips_relational_format_table ); VIPS_ARG_ENUM( class, "relational", 200, _( "Operation" ), _( "relational to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRelational, relational ), VIPS_TYPE_OPERATION_RELATIONAL, VIPS_OPERATION_RELATIONAL_EQUAL ); } static void vips_relational_init( VipsRelational *relational ) { } static int vips_relationalv( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationRelational relational, va_list ap ) { return( vips_call_split( "relational", ap, left, right, out, relational ) ); } /** * vips_relational: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @relational: relational operation to perform * @...: %NULL-terminated list of optional named arguments * * Perform various relational operations on pairs of images. * * The output type is always uchar, with 0 for FALSE and 255 for TRUE. * * Less-than and greater-than for complex images compare the modulus. * * If the images differ in size, the smaller image is enlarged to match the * larger by adding zero pixels along the bottom and right. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common format (see table * Smallest common format in * arithmetic). * * To decide if pixels match exactly, that is have the same value in every * band, use vips_bandbool() after this operation to AND or OR image bands * together. * * See also: vips_boolean(), vips_bandbool(), vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_relational( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationRelational relational, ... ) { va_list ap; int result; va_start( ap, relational ); result = vips_relationalv( left, right, out, relational, ap ); va_end( ap ); return( result ); } /** * vips_equal: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_EQUAL on a pair of images. See * vips_relational(). * * Returns: 0 on success, -1 on error */ int vips_equal( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_relationalv( left, right, out, VIPS_OPERATION_RELATIONAL_EQUAL, ap ); va_end( ap ); return( result ); } /** * vips_notequal: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_NOTEQUAL on a pair of images. See * vips_relational(). * * Returns: 0 on success, -1 on error */ int vips_notequal( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_relationalv( left, right, out, VIPS_OPERATION_RELATIONAL_NOTEQUAL, ap ); va_end( ap ); return( result ); } /** * vips_more: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_MORE on a pair of images. See * vips_relational(). * * Returns: 0 on success, -1 on error */ int vips_more( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_relationalv( left, right, out, VIPS_OPERATION_RELATIONAL_MORE, ap ); va_end( ap ); return( result ); } /** * vips_moreeq: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_MOREEQ on a pair of images. See * vips_relational(). * * Returns: 0 on success, -1 on error */ int vips_moreeq( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_relationalv( left, right, out, VIPS_OPERATION_RELATIONAL_MOREEQ, ap ); va_end( ap ); return( result ); } /** * vips_less: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_LESS on a pair of images. See * vips_relational(). * * Returns: 0 on success, -1 on error */ int vips_less( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_relationalv( left, right, out, VIPS_OPERATION_RELATIONAL_LESS, ap ); va_end( ap ); return( result ); } /** * vips_lesseq: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_LESSEQ on a pair of images. See * vips_relational(). * * Returns: 0 on success, -1 on error */ int vips_lesseq( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_relationalv( left, right, out, VIPS_OPERATION_RELATIONAL_LESSEQ, ap ); va_end( ap ); return( result ); } typedef struct _VipsRelationalConst { VipsUnaryConst parent_instance; VipsOperationRelational relational; } VipsRelationalConst; typedef VipsUnaryConstClass VipsRelationalConstClass; G_DEFINE_TYPE( VipsRelationalConst, vips_relational_const, VIPS_TYPE_UNARY_CONST ); static int vips_relational_const_build( VipsObject *object ) { VipsUnary *unary = (VipsUnary *) object; VipsUnaryConst *uconst = (VipsUnaryConst *) object; if( unary->in ) uconst->const_format = unary->in->BandFmt; if( VIPS_OBJECT_CLASS( vips_relational_const_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } #define RLOOPC( TYPE, OP ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict c = (TYPE *) uconst->c_ready; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( b = 0; b < bands; b++, i++ ) \ out[i] = (p[i] OP c[b]) ? 255 : 0; \ } #define CLOOPC( TYPE, OP ) { \ TYPE * restrict p = (TYPE *) in[0]; \ \ for( i = 0, x = 0; x < width; x++ ) { \ TYPE * restrict c = (TYPE *) uconst->c_ready; \ \ for( b = 0; b < bands; b++, i++ ) { \ out[i] = OP( p[0], p[1], c[0], c[1]) ? 255 : 0; \ \ p += 2; \ c += 2; \ } \ } \ } static void vips_relational_const_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsUnaryConst *uconst = (VipsUnaryConst *) arithmetic; VipsRelationalConst *rconst = (VipsRelationalConst *) arithmetic; VipsImage *im = arithmetic->ready[0]; int bands = im->Bands; int i, x, b; switch( rconst->relational ) { case VIPS_OPERATION_RELATIONAL_EQUAL: SWITCH( RLOOPC, CLOOPC, ==, CEQUAL ); break; case VIPS_OPERATION_RELATIONAL_NOTEQUAL: SWITCH( RLOOPC, CLOOPC, !=, CNOTEQUAL ); break; case VIPS_OPERATION_RELATIONAL_LESS: SWITCH( RLOOPC, CLOOPC, <, CLESS ); break; case VIPS_OPERATION_RELATIONAL_LESSEQ: SWITCH( RLOOPC, CLOOPC, <=, CLESSEQ ); break; case VIPS_OPERATION_RELATIONAL_MORE: SWITCH( RLOOPC, CLOOPC, >, CMORE ); break; case VIPS_OPERATION_RELATIONAL_MOREEQ: SWITCH( RLOOPC, CLOOPC, >=, CMOREEQ ); break; default: g_assert( 0 ); } } static void vips_relational_const_class_init( VipsRelationalConstClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "relational_const"; object_class->description = _( "relational operations against a constant" ); object_class->build = vips_relational_const_build; aclass->process_line = vips_relational_const_buffer; vips_arithmetic_set_format_table( aclass, vips_relational_format_table ); VIPS_ARG_ENUM( class, "relational", 200, _( "Operation" ), _( "relational to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRelationalConst, relational ), VIPS_TYPE_OPERATION_RELATIONAL, VIPS_OPERATION_RELATIONAL_EQUAL ); } static void vips_relational_const_init( VipsRelationalConst *relational_const ) { } static int vips_relational_constv( VipsImage *in, VipsImage **out, VipsOperationRelational relational, double *c, int n, va_list ap ) { VipsArea *area_c; double *array; int result; int i; area_c = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), n ); array = (double *) area_c->data; for( i = 0; i < n; i++ ) array[i] = c[i]; result = vips_call_split( "relational_const", ap, in, out, relational, area_c ); vips_area_unref( area_c ); return( result ); } /** * vips_relational_const: * @in: input image * @out: output image * @relational: relational operation to perform * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform various relational operations on an image and an array of * constants. * * The output type is always uchar, with 0 for FALSE and 255 for TRUE. * * If the array of constants has just one element, that constant is used for * all image bands. If the array has more than one element and they have * the same number of elements as there are bands in the image, then * one array element is used for each band. If the arrays have more than one * element and the image only has a single band, the result is a many-band * image where each band corresponds to one array element. * * See also: vips_boolean(), vips_relational(). * * Returns: 0 on success, -1 on error */ int vips_relational_const( VipsImage *in, VipsImage **out, VipsOperationRelational relational, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_relational_constv( in, out, relational, c, n, ap ); va_end( ap ); return( result ); } /** * vips_equal_const: * @in: input #VipsImage * @out: output #VipsImage * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_EQUAL on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_equal_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_EQUAL, c, n, ap ); va_end( ap ); return( result ); } /** * vips_notequal_const: * @in: input #VipsImage * @out: output #VipsImage * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_NOTEQUAL on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_notequal_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_NOTEQUAL, c, n, ap ); va_end( ap ); return( result ); } /** * vips_less_const: * @in: input #VipsImage * @out: output #VipsImage * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_LESS on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_less_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_LESS, c, n, ap ); va_end( ap ); return( result ); } /** * vips_lesseq_const: * @in: input #VipsImage * @out: output #VipsImage * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_LESSEQ on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_lesseq_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_LESSEQ, c, n, ap ); va_end( ap ); return( result ); } /** * vips_more_const: * @in: input #VipsImage * @out: output #VipsImage * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_MORE on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_more_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_MORE, c, n, ap ); va_end( ap ); return( result ); } /** * vips_moreeq_const: * @in: input #VipsImage * @out: output #VipsImage * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_MOREEQ on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_moreeq_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_MOREEQ, c, n, ap ); va_end( ap ); return( result ); } /** * vips_relational_const1: * @in: input image * @out: output image * @relational: relational operation to perform * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform various relational operations on an image and a constant. See * vips_relational_const(). * * See also: vips_boolean(), vips_relational(). * * Returns: 0 on success, -1 on error */ int vips_relational_const1( VipsImage *in, VipsImage **out, VipsOperationRelational relational, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_relational_constv( in, out, relational, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_equal_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_EQUAL on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_equal_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_EQUAL, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_notequal_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_NOTEQUAL on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_notequal_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_NOTEQUAL, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_less_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_LESS on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_less_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_LESS, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_lesseq_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_LESSEQ on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_lesseq_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_LESSEQ, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_more_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_MORE on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_more_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_MORE, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_moreeq_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_RELATIONAL_MOREEQ on an image and a constant. See * vips_relational_const(). * * Returns: 0 on success, -1 on error */ int vips_moreeq_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_relational_constv( in, out, VIPS_OPERATION_RELATIONAL_MOREEQ, &c, 1, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/measure.c0000644000175000017500000001633612303141142015126 00000000000000/* im_measure.c * * Modified: * 19/8/94 JC * - now uses doubles for addressing * - could miss by up to h pixels previously! * - ANSIfied * - now issues warning if any deviations are greater than 20% of the * mean * 31/10/95 JC * - more careful about warning for averages <0, or averages near zero * - can get these cases with im_measure() of IM_TYPE_LAB images * 28/10/02 JC * - number bands from zero in error messages * 7/7/04 * - works on labq * 18/8/08 * - add gtkdoc comments * - remove deprecated im_extract() * 30/11/09 * - changes for im_extract() broke averaging * 9/11/11 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "statistic.h" typedef struct _VipsStats { VipsOperation parent_instance; VipsImage *in; VipsImage *out; int left; int top; int width; int height; int h; int v; } VipsMeasure; typedef VipsOperationClass VipsMeasureClass; G_DEFINE_TYPE( VipsMeasure, vips_measure, VIPS_TYPE_OPERATION ); static int vips_measure_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsMeasure *measure = (VipsMeasure *) object; int bands; double pw; double ph; int j, i; int w, h; int b; if( VIPS_OBJECT_CLASS( vips_measure_parent_class )->build( object ) ) return( -1 ); bands = vips_image_get_bands( measure->in ); g_object_set( object, "out", vips_image_new_matrix( bands, measure->h * measure->v ), NULL ); /* left/top/width/height default to the size of the image. */ if( !vips_object_argument_isset( object, "width" ) ) g_object_set( object, "width", vips_image_get_width( measure->in ), NULL ); if( !vips_object_argument_isset( object, "height" ) ) g_object_set( object, "height", vips_image_get_height( measure->in ), NULL ); /* How large are the patches we are to measure? */ pw = (double) measure->width / measure->h; ph = (double) measure->height / measure->v; /* The size of a patch. */ w = (pw + 1) / 2; h = (ph + 1) / 2; for( j = 0; j < measure->v; j++ ) { for( i = 0; i < measure->h; i++ ) { int x = measure->left + i * pw + (pw + 2) / 4; int y = measure->top + j * ph + (ph + 2) / 4; double avg, dev; for( b = 0; b < bands; b++ ) { VipsImage **t = (VipsImage **) vips_object_local_array( object, 2 ); /* Extract and measure. */ if( vips_extract_area( measure->in, &t[0], x, y, w, h, NULL ) || vips_extract_band( t[0], &t[1], b, NULL ) || vips_avg( t[1], &avg, NULL ) || vips_deviate( t[1], &dev, NULL ) ) return( -1 ); /* Is the deviation large compared with the * average? This could be a clue that our * parameters have caused us to miss the * patch. Look out for averages <0, or * averages near zero (can get these if use * measure on IM_TYPE_LAB images). */ if( dev * 5 > fabs( avg ) && fabs( avg ) > 3 ) vips_warn( class->nickname, _( "patch %d x %d, band %d: " "avg = %g, sdev = %g" ), i, j, b, avg, dev ); *VIPS_MATRIX( measure->out, b, i + j * measure->h ) = avg; } } } return( 0 ); } /* xy range we sanity check on ... just to stop crazy numbers from 1/0 etc. * causing g_assert() failures later. */ #define RANGE (100000000) static void vips_measure_class_init( VipsMeasureClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "measure"; object_class->description = _( "measure a set of patches on a color chart" ); object_class->build = vips_measure_build; VIPS_ARG_IMAGE( class, "in", 1, _( "in" ), _( "Image to measure" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMeasure, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output array of statistics" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsMeasure, out ) ); VIPS_ARG_INT( class, "h", 5, _( "Across" ), _( "Number of patches across chart" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMeasure, h ), 1, RANGE, 1 ); VIPS_ARG_INT( class, "v", 6, _( "Down" ), _( "Number of patches down chart" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMeasure, v ), 1, RANGE, 1 ); VIPS_ARG_INT( class, "left", 10, _( "Left" ), _( "Left edge of extract area" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMeasure, left ), 0, RANGE, 0 ); VIPS_ARG_INT( class, "top", 11, _( "Top" ), _( "Top edge of extract area" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMeasure, top ), 0, RANGE, 0 ); VIPS_ARG_INT( class, "width", 12, _( "Width" ), _( "Width of extract area" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMeasure, width ), 1, RANGE, 1 ); VIPS_ARG_INT( class, "height", 13, _( "Height" ), _( "Height of extract area" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMeasure, height ), 1, RANGE, 1 ); } static void vips_measure_init( VipsMeasure *measure ) { } /** * vips_measure: * @im: image to measure * @out: array of measurements * @h: patches across chart * @v: patches down chart * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @left: area of image containing chart * @top: area of image containing chart * @width: area of image containing chart * @height: area of image containing chart * * Analyse a grid of colour patches, producing an array of patch averages. * The mask has a row for each measured patch and a column for each image * band. The operations issues a warning if any patch has a deviation more * than 20% of * the mean. Only the central 50% of each patch is averaged. * * If the chart does not fill the whole image, use the optional @left, @top, * @width, @height arguments to indicate the * position of the chart. * * See also: vips_avg(), vips_deviate(). * * Returns: 0 on success, -1 on error */ int vips_measure( VipsImage *in, VipsImage **out, int h, int v, ... ) { va_list ap; int result; va_start( ap, v ); result = vips_call_split( "measure", ap, in, out, h, v ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/remainder.c0000644000175000017500000002770112303140253015433 00000000000000/* remainder.c * * 2/8/99 JC * - im_divide adapted to make im_remainder * 8/5/02 JC * - im_remainderconst added * - im_remainderconst_vec added * 27/9/04 * - updated for 1 band $op n band image -> n band image case * 26/2/07 * - oop, broken for _vec case :-( * 14/5/08 * - better /0 test * 27/8/08 * - revise upcasting system * - add gtkdoc comments * 23/6/10 * - constant ops clip to target range * 12/11/11 * - redone as a class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "binary.h" #include "unaryconst.h" typedef VipsBinary VipsRemainder; typedef VipsBinaryClass VipsRemainderClass; G_DEFINE_TYPE( VipsRemainder, vips_remainder, VIPS_TYPE_BINARY ); static int vips_remainder_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsBinary *binary = (VipsBinary *) object; if( binary->left && vips_check_noncomplex( class->nickname, binary->left ) ) return( -1 ); if( binary->right && vips_check_noncomplex( class->nickname, binary->right ) ) return( -1 ); if( VIPS_OBJECT_CLASS( vips_remainder_parent_class )->build( object ) ) return( -1 ); return( 0 ); } /* Integer remainder-after-division. */ #define IREMAINDER( TYPE ) { \ TYPE * restrict p1 = (TYPE *) in[0]; \ TYPE * restrict p2 = (TYPE *) in[1]; \ TYPE * restrict q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = p2[x] ? p1[x] % p2[x] : -1; \ } /* Float remainder-after-division. */ #define FREMAINDER( TYPE ) { \ TYPE * restrict p1 = (TYPE *) in[0]; \ TYPE * restrict p2 = (TYPE *) in[1]; \ TYPE * restrict q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ double a = p1[x]; \ double b = p2[x]; \ \ q[x] = b ? a - b * floor (a / b) : -1; \ } \ } static void vips_remainder_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_CHAR: IREMAINDER( signed char ); break; case VIPS_FORMAT_UCHAR: IREMAINDER( unsigned char ); break; case VIPS_FORMAT_SHORT: IREMAINDER( signed short ); break; case VIPS_FORMAT_USHORT:IREMAINDER( unsigned short ); break; case VIPS_FORMAT_INT: IREMAINDER( signed int ); break; case VIPS_FORMAT_UINT: IREMAINDER( unsigned int ); break; case VIPS_FORMAT_FLOAT: FREMAINDER( float ); break; case VIPS_FORMAT_DOUBLE:FREMAINDER( double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type promotion for remainder. Keep in sync with remainder_buffer() above. */ static int vips_remainder_format_table[10] = { /* UC C US S UI I F X D DX */ UC, C, US, S, UI, I, F, X, D, DX }; static void vips_remainder_class_init( VipsRemainderClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "remainder"; object_class->description = _( "remainder after integer division of two images" ); object_class->build = vips_remainder_build; aclass->process_line = vips_remainder_buffer; vips_arithmetic_set_format_table( aclass, vips_remainder_format_table ); } static void vips_remainder_init( VipsRemainder *remainder ) { } /** * vips_remainder: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * This operation calculates @left % @right (remainder after integer division) * and writes the result to @out. The images may have any * non-complex format. For float formats, vips_remainder() calculates @in1 - * @in2 * floor (@in1 / @in2). * * If the images differ in size, the smaller image is enlarged to match the * larger by adding zero pixels along the bottom and right. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common format (see table * Smallest common format in * arithmetic), and that format is the * result type. * * See also: vips_remainder_const(), vips_divide(), vips_round(). * * Returns: 0 on success, -1 on error */ int vips_remainder( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "remainder", ap, left, right, out ); va_end( ap ); return( result ); } typedef VipsUnaryConst VipsRemainderConst; typedef VipsUnaryConstClass VipsRemainderConstClass; G_DEFINE_TYPE( VipsRemainderConst, vips_remainder_const, VIPS_TYPE_UNARY_CONST ); static int vips_remainder_const_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsUnary *unary = (VipsUnary *) object; VipsUnaryConst *uconst = (VipsUnaryConst *) object; if( unary->in && vips_check_noncomplex( class->nickname, unary->in ) ) return( -1 ); if( unary->in ) uconst->const_format = unary->in->BandFmt; if( VIPS_OBJECT_CLASS( vips_remainder_const_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } /* Integer remainder-after-divide, per-band constant. */ #define IREMAINDERCONST( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ TYPE * restrict c = (TYPE *) uconst->c_ready; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( b = 0; b < bands; b++, i++ ) \ q[i] = p[i] % c[b]; \ } /* Float remainder-after-divide, per-band constant. */ #define FREMAINDERCONST( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ TYPE * restrict c = (TYPE *) uconst->c_ready; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( b = 0; b < bands; b++, i++ ) { \ double left = p[i]; \ double right = c[b]; \ \ q[i] = right ? \ left - right * floor( left / right ) : \ -1; \ } \ } static void vips_remainder_const_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsUnaryConst *uconst = (VipsUnaryConst *) arithmetic; VipsImage *im = arithmetic->ready[0]; int bands = im->Bands; int i, x, b; switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_CHAR: IREMAINDERCONST( signed char ); break; case VIPS_FORMAT_UCHAR: IREMAINDERCONST( unsigned char ); break; case VIPS_FORMAT_SHORT: IREMAINDERCONST( signed short ); break; case VIPS_FORMAT_USHORT:IREMAINDERCONST( unsigned short ); break; case VIPS_FORMAT_INT: IREMAINDERCONST( signed int ); break; case VIPS_FORMAT_UINT: IREMAINDERCONST( unsigned int ); break; case VIPS_FORMAT_FLOAT: FREMAINDERCONST( float ); break; case VIPS_FORMAT_DOUBLE:FREMAINDERCONST( double ); break; default: g_assert( 0 ); } } static void vips_remainder_const_class_init( VipsRemainderConstClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "remainder_const"; object_class->description = _( "remainder after integer division of an image " "and a constant" ); object_class->build = vips_remainder_const_build; aclass->process_line = vips_remainder_const_buffer; vips_arithmetic_set_format_table( aclass, vips_remainder_format_table ); } static void vips_remainder_const_init( VipsRemainderConst *remainder_const ) { } static int vips_remainder_constv( VipsImage *in, VipsImage **out, double *c, int n, va_list ap ) { VipsArea *area_c; double *array; int result; int i; area_c = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), n ); array = (double *) area_c->data; for( i = 0; i < n; i++ ) array[i] = c[i]; result = vips_call_split( "remainder_const", ap, in, out, area_c ); vips_area_unref( area_c ); return( result ); } /** * vips_remainder_const: * @in: input image * @out: output image * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * This operation calculates @in % @c (remainder after division by an * array of constants) * and writes the result to @out. * The image may have any * non-complex format. For float formats, vips_remainder_const() calculates * @in - @c * floor (@in / @c). * * If the array of constants has just one element, that constant is used for * all image bands. If the array has more than one element and they have * the same number of elements as there are bands in the image, then * one array element is used for each band. If the arrays have more than one * element and the image only has a single band, the result is a many-band * image where each band corresponds to one array element. * * See also: vips_remainder(), vips_divide(), vips_round(). * * Returns: 0 on success, -1 on error */ int vips_remainder_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_remainder_constv( in, out, c, n, ap ); va_end( ap ); return( result ); } /** * vips_remainder_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * This operation calculates @in % @c (remainder after division by a * constant) * and writes the result to @out. * The image may have any * non-complex format. For float formats, vips_remainder_const() calculates * @in - @c * floor (@in / @c). * * If the array of constants has just one element, that constant is used for * all image bands. If the array has more than one element and they have * the same number of elements as there are bands in the image, then * one array element is used for each band. If the arrays have more than one * element and the image only has a single band, the result is a many-band * image where each band corresponds to one array element. * * See also: vips_remainder(), vips_divide(), vips_round(). * * Returns: 0 on success, -1 on error */ int vips_remainder_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_remainder_constv( in, out, &c, 1, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/unary.c0000644000175000017500000000541512303140253014621 00000000000000/* base class for all unary operations * * 30/10/11 * - from binary.c */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "unary.h" G_DEFINE_ABSTRACT_TYPE( VipsUnary, vips_unary, VIPS_TYPE_ARITHMETIC ); static int vips_unary_build( VipsObject *object ) { VipsArithmetic *arithmetic = VIPS_ARITHMETIC( object ); VipsUnary *unary = VIPS_UNARY( object ); arithmetic->n = 1; arithmetic->in = (VipsImage **) vips_object_local_array( object, 1 ); arithmetic->in[0] = unary->in; if( arithmetic->in[0] ) g_object_ref( arithmetic->in[0] ); if( VIPS_OBJECT_CLASS( vips_unary_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_unary_class_init( VipsUnaryClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "unary"; vobject_class->description = _( "unary operations" ); vobject_class->build = vips_unary_build; /* Create properties. */ VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsUnary, in ) ); } static void vips_unary_init( VipsUnary *unary ) { /* Init our instance fields. */ } /* Call this before chaining up in _build() to make the operation fall back to * copy. */ int vips_unary_copy( VipsUnary *unary ) { VipsArithmetic *arithmetic = VIPS_ARITHMETIC( unary ); /* This isn't set by arith until build(), so we have to set * again here. * * Should arith set out in _init()? */ g_object_set( unary, "out", vips_image_new(), NULL ); return( vips_image_write( unary->in, arithmetic->out ) ); } vips-7.38.5/libvips/arithmetic/Makefile.in0000644000175000017500000005650012303144055015371 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/arithmetic DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libarithmetic_la_LIBADD = am_libarithmetic_la_OBJECTS = abs.lo complex.lo deviate.lo divide.lo \ measure.lo multiply.lo remainder.lo sign.lo statistic.lo \ stats.lo avg.lo min.lo max.lo hist_find.lo hist_find_ndim.lo \ hist_find_indexed.lo project.lo profile.lo subtract.lo math.lo \ arithmetic.lo binary.lo unary.lo unaryconst.lo relational.lo \ boolean.lo add.lo linear.lo invert.lo math2.lo round.lo libarithmetic_la_OBJECTS = $(am_libarithmetic_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libarithmetic_la_SOURCES) DIST_SOURCES = $(libarithmetic_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libarithmetic.la libarithmetic_la_SOURCES = \ abs.c \ complex.c \ deviate.c \ divide.c \ measure.c \ multiply.c \ remainder.c \ sign.c \ statistic.c \ statistic.h \ stats.c \ avg.c \ min.c \ max.c \ hist_find.c \ hist_find_ndim.c \ hist_find_indexed.c \ project.c \ profile.c \ subtract.c \ math.c \ arithmetic.c \ parithmetic.h \ binary.c \ binary.h \ unary.c \ unary.h \ unaryconst.c \ unaryconst.h \ relational.c \ boolean.c \ add.c \ linear.c \ invert.c \ math2.c \ round.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/arithmetic/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/arithmetic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libarithmetic.la: $(libarithmetic_la_OBJECTS) $(libarithmetic_la_DEPENDENCIES) $(EXTRA_libarithmetic_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libarithmetic_la_OBJECTS) $(libarithmetic_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arithmetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boolean.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deviate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/divide.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_find.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_find_indexed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_find_ndim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/measure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiply.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/project.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relational.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remainder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statistic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stats.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subtract.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unaryconst.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/arithmetic/Makefile.am0000644000175000017500000000114712303141142015347 00000000000000noinst_LTLIBRARIES = libarithmetic.la libarithmetic_la_SOURCES = \ abs.c \ complex.c \ deviate.c \ divide.c \ measure.c \ multiply.c \ remainder.c \ sign.c \ statistic.c \ statistic.h \ stats.c \ avg.c \ min.c \ max.c \ hist_find.c \ hist_find_ndim.c \ hist_find_indexed.c \ project.c \ profile.c \ subtract.c \ math.c \ arithmetic.c \ parithmetic.h \ binary.c \ binary.h \ unary.c \ unary.h \ unaryconst.c \ unaryconst.h \ relational.c \ boolean.c \ add.c \ linear.c \ invert.c \ math2.c \ round.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/arithmetic/math.c0000644000175000017500000002540212303141142014410 00000000000000/* VipsMath --- call various -lm functions (trig, log etc.) on images * * Copyright: 1990, N. Dessipris, based on im_powtra() * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 5/5/93 JC * - adapted from im_lintra to work with partial images * - incorrect implementation of complex logs removed * 1/7/93 JC * - adapted for partial v2 * - ANSIfied * 24/2/95 JC * - im_logtra() adapted to make im_sintra() * - adapted for im_wrapone() * 26/1/96 JC * - im_asintra() added * 30/8/09 * - gtkdoc * - tiny cleanups * - use im__math() * 19/9/09 * - im_sintra() adapted to make math.c * 4/11/11 * - redone as a class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "unary.h" typedef struct _VipsMath { VipsUnary parent_instance; VipsOperationMath math; } VipsMath; typedef VipsUnaryClass VipsMathClass; G_DEFINE_TYPE( VipsMath, vips_math, VIPS_TYPE_UNARY ); static int vips_math_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsUnary *unary = (VipsUnary *) object; if( unary->in && vips_check_noncomplex( class->nickname, unary->in ) ) return( -1 ); if( VIPS_OBJECT_CLASS( vips_math_parent_class )->build( object ) ) return( -1 ); return( 0 ); } #define LOOP( IN, OUT, OP ) { \ IN * restrict p = (IN *) in[0]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = OP( p[x] ); \ } #define SWITCH( OP ) \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_UCHAR: \ LOOP( unsigned char, float, OP ); break; \ case VIPS_FORMAT_CHAR: \ LOOP( signed char, float, OP ); break; \ case VIPS_FORMAT_USHORT: \ LOOP( unsigned short, float, OP ); break; \ case VIPS_FORMAT_SHORT: \ LOOP( signed short, float, OP ); break; \ case VIPS_FORMAT_UINT: \ LOOP( unsigned int, float, OP ); break; \ case VIPS_FORMAT_INT: \ LOOP( signed int, float, OP ); break; \ case VIPS_FORMAT_FLOAT: \ LOOP( float, float, OP ); break; \ case VIPS_FORMAT_DOUBLE: \ LOOP( double, double, OP ); break;\ \ default: \ g_assert( 0 ); \ } /* sin/cos/tan in degrees. */ #define DSIN( X ) (sin( IM_RAD( X ) )) #define DCOS( X ) (cos( IM_RAD( X ) )) #define DTAN( X ) (tan( IM_RAD( X ) )) #define ADSIN( X ) (IM_DEG( asin( X ) )) #define ADCOS( X ) (IM_DEG( acos( X ) )) #define ADTAN( X ) (IM_DEG( atan( X ) )) /* exp10() is a gnu extension, use pow(). */ #define EXP10( X ) (pow( 10.0, (X) )) static void vips_math_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsMath *math = (VipsMath *) arithmetic; VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( math->math ) { case VIPS_OPERATION_MATH_SIN: SWITCH( DSIN ); break; case VIPS_OPERATION_MATH_COS: SWITCH( DCOS ); break; case VIPS_OPERATION_MATH_TAN: SWITCH( DTAN ); break; case VIPS_OPERATION_MATH_ASIN: SWITCH( ADSIN ); break; case VIPS_OPERATION_MATH_ACOS: SWITCH( ADCOS ); break; case VIPS_OPERATION_MATH_ATAN: SWITCH( ADTAN ); break; case VIPS_OPERATION_MATH_LOG: SWITCH( log ); break; case VIPS_OPERATION_MATH_LOG10: SWITCH( log10 ); break; case VIPS_OPERATION_MATH_EXP: SWITCH( exp ); break; case VIPS_OPERATION_MATH_EXP10: SWITCH( EXP10 ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static const VipsBandFormat vips_math_format_table[10] = { /* UC C US S UI I F X D DX */ F, F, F, F, F, F, F, X, D, DX }; static void vips_math_class_init( VipsMathClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "math"; object_class->description = _( "perform a math function on an image" ); object_class->build = vips_math_build; aclass->process_line = vips_math_buffer; vips_arithmetic_set_format_table( aclass, vips_math_format_table ); VIPS_ARG_ENUM( class, "math", 200, _( "Operation" ), _( "math to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMath, math ), VIPS_TYPE_OPERATION_MATH, VIPS_OPERATION_MATH_SIN ); } static void vips_math_init( VipsMath *math ) { } static int vips_mathv( VipsImage *in, VipsImage **out, VipsOperationMath math, va_list ap ) { return( vips_call_split( "math", ap, in, out, math ) ); } /** * vips_math: * @in: input #VipsImage * @out: output #VipsImage * @math: math operation to perform * @...: %NULL-terminated list of optional named arguments * * Perform various functions in -lm, the maths library, on images. * * Angles are expressed in degrees. The output type is float unless the * input is double, in which case the output is double. * * Non-complex images only. * * See also: vips_math2(). * * Returns: 0 on success, -1 on error */ int vips_math( VipsImage *in, VipsImage **out, VipsOperationMath math, ... ) { va_list ap; int result; va_start( ap, math ); result = vips_mathv( in, out, math, ap ); va_end( ap ); return( result ); } /** * vips_sin: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_SIN on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_sin( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_SIN, ap ); va_end( ap ); return( result ); } /** * vips_cos: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_COS on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_cos( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_COS, ap ); va_end( ap ); return( result ); } /** * vips_tan: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_TAN on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_tan( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_TAN, ap ); va_end( ap ); return( result ); } /** * vips_asin: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_ASIN on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_asin( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_ASIN, ap ); va_end( ap ); return( result ); } /** * vips_acos: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_ACOS on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_acos( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_ACOS, ap ); va_end( ap ); return( result ); } /** * vips_atan: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_ATAN on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_atan( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_ATAN, ap ); va_end( ap ); return( result ); } /** * vips_log: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_LOG on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_log( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_LOG, ap ); va_end( ap ); return( result ); } /** * vips_log10: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_LOG10 on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_log10( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_LOG10, ap ); va_end( ap ); return( result ); } /** * vips_exp: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_EXP on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_exp( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_EXP, ap ); va_end( ap ); return( result ); } /** * vips_exp10: * @in: input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH_EXP10 on an image. See vips_math(). * * Returns: 0 on success, -1 on error */ int vips_exp10( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_mathv( in, out, VIPS_OPERATION_MATH_EXP10, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/parithmetic.h0000644000175000017500000000650112303140253015776 00000000000000/* base class for all arithmetic operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PARITHMETIC_H #define VIPS_PARITHMETIC_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #include #define VIPS_TYPE_ARITHMETIC (vips_arithmetic_get_type()) #define VIPS_ARITHMETIC( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_ARITHMETIC, VipsArithmetic )) #define VIPS_ARITHMETIC_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_ARITHMETIC, VipsArithmeticClass)) #define VIPS_IS_ARITHMETIC( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_ARITHMETIC )) #define VIPS_IS_ARITHMETIC_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_ARITHMETIC )) #define VIPS_ARITHMETIC_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_ARITHMETIC, VipsArithmeticClass )) struct _VipsArithmetic; typedef void (*VipsArithmeticProcessFn)( struct _VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ); typedef struct _VipsArithmetic { VipsOperation parent_instance; /* All have an output image. */ VipsImage *out; /* Array of input arguments, set these from a subclass. */ VipsImage **in; int n; /* The minimum number of output bands. For example, VipsLinear with a * three element constant must make at least a three-band output. */ int base_bands; /* The input images, ready for the operation. */ VipsImage **ready; /* Set this to override class->format_table. */ VipsBandFormat format; } VipsArithmetic; typedef struct _VipsArithmeticClass { VipsOperationClass parent_class; /* For each input format, what output format. Used for arithmetic * too, since we cast inputs to match. */ const VipsBandFormat *format_table; /* A vector program for each input type. */ VipsVector *vectors[VIPS_FORMAT_LAST]; /* ... and if we've set a program for this format. */ gboolean vector_program[VIPS_FORMAT_LAST]; /* The buffer processor. */ VipsArithmeticProcessFn process_line; } VipsArithmeticClass; GType vips_arithmetic_get_type( void ); void vips_arithmetic_set_format_table( VipsArithmeticClass *klass, const VipsBandFormat *format_table ); VipsVector *vips_arithmetic_get_vector( VipsArithmeticClass *klass, VipsBandFormat fmt ); void vips_arithmetic_compile( VipsArithmeticClass *klass ); VipsVector *vips_arithmetic_get_program( VipsArithmeticClass *klass, VipsBandFormat fmt ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PARITHMETIC_H*/ vips-7.38.5/libvips/arithmetic/arithmetic.c0000644000175000017500000005067712303141142015624 00000000000000/* base class for all arithmetic operations * * properties: * - one output image, one or more inputs * - cast input images to match * - output is large enough to hold output values (value preserving) * - point-to-point operations (ie. each pixel depends only on the * corresponding pixel in the input) * - LUT-able: ie. arithmetic (image) can be exactly replaced by * maplut (image, arithmetic (lut)) for 8/16 bit int images */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "parithmetic.h" /** * SECTION: arithmetic * @short_description: operations which perform pixel arithmetic, trig, log, statistics * @see_also: boolean * @stability: Stable * @include: vips/vips.h * * These operations perform pixel arithmetic, that is, they perform an * arithmetic operation, such as addition, on every pixel in an image or a * pair of images. All (except in a few cases noted below) will work with * images of any type or any mixture of types, of any size and of any number * of bands. * * For binary operations, if the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * In the same way, for operations that take an array constant, such as * vips_remainder_const(), you can mix single-element arrays or single-band * images freely. * * Arithmetic operations try to preserve precision by increasing the number of * bits in the output image when necessary. Generally, this follows the ANSI C * conventions for type promotion, so multiplying two * #VIPS_FORMAT_UCHAR images together, for example, produces a * #VIPS_FORMAT_USHORT image, and taking the im_costra() of a * #VIPS_FORMAT_USHORT image produces #VIPS_FORMAT_FLOAT image. * * For binary arithmetic operations, type promotion occurs in two stages. * First, the two input images are cast up to the smallest common format, * that is, the type with the smallest range that can represent the full * range of both inputs. This conversion can be represented as a table: * * * Smallest common format * * * * @in2/@in1 * uchar * char * ushort * short * uint * int * float * double * complex * double complex * * * * * uchar * ushort * short * ushort * short * uint * int * float * double * complex * double complex * * * char * short * short * short * short * int * int * float * double * complex * double complex * * * ushort * ushort * short * ushort * short * uint * int * float * double * complex * double complex * * * short * short * short * short * short * int * int * float * double * complex * double complex * * * uint * uint * int * uint * int * uint * int * float * double * complex * double complex * * * int * int * int * int * int * int * int * float * double * complex * double complex * * * float * float * float * float * float * float * float * float * double * complex * double complex * * * double * double * double * double * double * double * double * double * double * double complex * double complex * * * complex * complex * complex * complex * complex * complex * complex * complex * double complex * complex * double complex * * * double complex * double complex * double complex * double complex * double complex * double complex * double complex * double complex * double complex * double complex * double complex * * * *
* * In the second stage, the operation is performed between the two identical * types to form the output. The details vary between operations, but * generally the principle is that the output type should be large enough to * represent the whole range of possible values, except that int never becomes * float. */ G_DEFINE_ABSTRACT_TYPE( VipsArithmetic, vips_arithmetic, VIPS_TYPE_OPERATION ); /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* For two integer types, the "largest", ie. one which can represent the * full range of both. */ static VipsBandFormat format_largest[6][6] = { /* UC C US S UI I */ /* UC */ { UC, S, US, S, UI, I }, /* C */ { S, C, I, S, I, I }, /* US */ { US, I, US, I, UI, I }, /* S */ { S, S, I, S, I, I }, /* UI */ { UI, I, UI, I, UI, I }, /* I */ { I, I, I, I, I, I } }; /* For two formats, find one which can represent the full range of both. */ static VipsBandFormat vips_format_common( VipsBandFormat a, VipsBandFormat b ) { if( vips_band_format_iscomplex( a ) || vips_band_format_iscomplex( b ) ) { if( a == VIPS_FORMAT_DPCOMPLEX || b == VIPS_FORMAT_DPCOMPLEX ) return( VIPS_FORMAT_DPCOMPLEX ); else return( VIPS_FORMAT_COMPLEX ); } else if( vips_band_format_isfloat( a ) || vips_band_format_isfloat( b ) ) { if( a == VIPS_FORMAT_DOUBLE || b == VIPS_FORMAT_DOUBLE ) return( VIPS_FORMAT_DOUBLE ); else return( VIPS_FORMAT_FLOAT ); } else return( format_largest[a][b] ); } int vips__formatalike_vec( VipsImage **in, VipsImage **out, int n ) { int i; VipsBandFormat format; g_assert( n >= 1 ); format = in[0]->BandFmt; for( i = 1; i < n; i++ ) format = vips_format_common( format, in[i]->BandFmt ); for( i = 0; i < n; i++ ) if( vips_cast( in[i], &out[i], format, NULL ) ) return( -1 ); return( 0 ); } int vips__sizealike_vec( VipsImage **in, VipsImage **out, int n ) { int i; int width_max; int height_max; g_assert( n >= 1 ); width_max = in[0]->Xsize; height_max = in[0]->Ysize; for( i = 1; i < n; i++ ) { width_max = VIPS_MAX( width_max, in[i]->Xsize ); height_max = VIPS_MAX( height_max, in[i]->Ysize ); } for( i = 0; i < n; i++ ) if( vips_embed( in[i], &out[i], 0, 0, width_max, height_max, NULL ) ) return( -1 ); return( 0 ); } /* Make an n-band image. Input 1 or n bands. */ int vips__bandup( const char *domain, VipsImage *in, VipsImage **out, int n ) { VipsImage *bands[256]; int i; if( in->Bands == n ) return( vips_copy( in, out, NULL ) ); if( in->Bands != 1 ) { vips_error( domain, _( "not one band or %d bands" ), n ); return( -1 ); } if( n > 256 || n < 1 ) { vips_error( domain, "%s", _( "bad bands" ) ); return( -1 ); } for( i = 0; i < n; i++ ) bands[i] = in; return( vips_bandjoin( bands, out, n, NULL ) ); } /* base_bands is the default minimum. * * Handy for example, if you have VipsLinear with * a 3-element vector of constants and a 1-band input image, you need to cast * the image up to three bands. */ int vips__bandalike_vec( const char *domain, VipsImage **in, VipsImage **out, int n, int base_bands ) { int i; int max_bands; g_assert( n >= 1 ); max_bands = base_bands; for( i = 0; i < n; i++ ) max_bands = VIPS_MAX( max_bands, in[i]->Bands ); for( i = 0; i < n; i++ ) if( vips__bandup( domain, in[i], &out[i], max_bands ) ) return( -1 ); return( 0 ); } int vips__formatalike( VipsImage *in1, VipsImage *in2, VipsImage **out1, VipsImage **out2 ) { VipsImage *in[2]; VipsImage *out[2]; in[0] = in1; in[1] = in2; if( vips__formatalike_vec( in, out, 2 ) ) return( -1 ); *out1 = out[0]; *out2 = out[1]; return( 0 ); } int vips__sizealike( VipsImage *in1, VipsImage *in2, VipsImage **out1, VipsImage **out2 ) { VipsImage *in[2]; VipsImage *out[2]; in[0] = in1; in[1] = in2; if( vips__sizealike_vec( in, out, 2 ) ) return( -1 ); *out1 = out[0]; *out2 = out[1]; return( 0 ); } int vips__bandalike( const char *domain, VipsImage *in1, VipsImage *in2, VipsImage **out1, VipsImage **out2 ) { VipsImage *in[2]; VipsImage *out[2]; in[0] = in1; in[1] = in2; if( vips__bandalike_vec( domain, in, out, 2, 1 ) ) return( -1 ); *out1 = out[0]; *out2 = out[1]; return( 0 ); } /* Maximum number of input images -- why not? */ #define MAX_INPUT_IMAGES (64) static int vips_arithmetic_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion **ir = (VipsRegion **) seq; VipsArithmetic *arithmetic = VIPS_ARITHMETIC( b ); VipsArithmeticClass *class = VIPS_ARITHMETIC_GET_CLASS( arithmetic ); Rect *r = &or->valid; VipsPel *p[MAX_INPUT_IMAGES], *q; int i, y; /* Prepare all input regions and make buffer pointers. */ for( i = 0; ir[i]; i++ ) { if( vips_region_prepare( ir[i], r ) ) return( -1 ); p[i] = (VipsPel *) VIPS_REGION_ADDR( ir[i], r->left, r->top ); } p[i] = NULL; q = (VipsPel *) VIPS_REGION_ADDR( or, r->left, r->top ); VIPS_GATE_START( "vips_arithmetic_gen: work" ); for( y = 0; y < r->height; y++ ) { class->process_line( arithmetic, q, p, r->width ); for( i = 0; ir[i]; i++ ) p[i] += VIPS_REGION_LSKIP( ir[i] ); q += VIPS_REGION_LSKIP( or ); } VIPS_GATE_STOP( "vips_arithmetic_gen: work" ); return( 0 ); } static int vips_arithmetic_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsArithmetic *arithmetic = VIPS_ARITHMETIC( object ); VipsArithmeticClass *aclass = VIPS_ARITHMETIC_GET_CLASS( arithmetic ); VipsImage **format; VipsImage **band; VipsImage **size; int i; #ifdef DEBUG printf( "vips_arithmetic_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ if( VIPS_OBJECT_CLASS( vips_arithmetic_parent_class )-> build( object ) ) return( -1 ); g_object_set( arithmetic, "out", vips_image_new(), NULL ); /* No need to check input bands, bandalike will do this for us. */ if( arithmetic->n > MAX_INPUT_IMAGES ) { vips_error( class->nickname, "%s", _( "too many input images" ) ); return( -1 ); } for( i = 0; i < arithmetic->n; i++ ) if( vips_image_pio_input( arithmetic->in[i] ) || vips_check_uncoded( class->nickname, arithmetic->in[i] ) ) return( -1 ); format = (VipsImage **) vips_object_local_array( object, arithmetic->n ); band = (VipsImage **) vips_object_local_array( object, arithmetic->n ); size = (VipsImage **) vips_object_local_array( object, arithmetic->n ); /* Cast our input images up to a common format, bands and size. */ if( vips__formatalike_vec( arithmetic->in, format, arithmetic->n ) || vips__bandalike_vec( class->nickname, format, band, arithmetic->n, arithmetic->base_bands ) || vips__sizealike_vec( band, size, arithmetic->n ) ) return( -1 ); /* Keep a copy of the processed images here for subclasses. */ arithmetic->ready = size; if( vips_image_pipeline_array( arithmetic->out, VIPS_DEMAND_STYLE_THINSTRIP, arithmetic->ready ) ) return( -1 ); arithmetic->out->Bands = arithmetic->ready[0]->Bands; if( arithmetic->format != VIPS_FORMAT_NOTSET ) arithmetic->out->BandFmt = arithmetic->format; else arithmetic->out->BandFmt = aclass->format_table[arithmetic->ready[0]->BandFmt]; if( vips_image_generate( arithmetic->out, vips_start_many, vips_arithmetic_gen, vips_stop_many, arithmetic->ready, arithmetic ) ) return( -1 ); return( 0 ); } static void vips_arithmetic_class_init( VipsArithmeticClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "arithmetic"; vobject_class->description = _( "arithmetic operations" ); vobject_class->build = vips_arithmetic_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "out", 100, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsArithmetic, out ) ); } static void vips_arithmetic_init( VipsArithmetic *arithmetic ) { arithmetic->base_bands = 1; arithmetic->format = VIPS_FORMAT_NOTSET; } void vips_arithmetic_set_format_table( VipsArithmeticClass *class, const VipsBandFormat *format_table ) { int i; g_assert( !class->format_table ); class->format_table = format_table; for( i = 0; i < VIPS_FORMAT_LAST; i++ ) { int isize = vips_format_sizeof( i ); int osize = vips_format_sizeof( (int) format_table[i] ); VipsVector *v; v = vips_vector_new( "arithmetic", osize ); vips_vector_source_name( v, "s1", isize ); vips_vector_source_name( v, "s2", isize ); vips_vector_temporary( v, "t1", osize ); vips_vector_temporary( v, "t2", osize ); class->vectors[i] = v; } } /* Get the stub for this program ... use _get_vector() to get the compiled * code. */ VipsVector * vips_arithmetic_get_program( VipsArithmeticClass *class, VipsBandFormat fmt ) { g_assert( (int) fmt >= 0 && (int) fmt < VIPS_FORMAT_LAST ); g_assert( !class->vector_program[fmt] ); class->vector_program[fmt] = TRUE; return( class->vectors[fmt] ); } /* Get the compiled code for this type, if available. */ VipsVector * vips_arithmetic_get_vector( VipsArithmeticClass *class, VipsBandFormat fmt ) { g_assert( fmt >= 0 && fmt < VIPS_FORMAT_LAST ); if( !vips_vector_isenabled() || !class->vector_program[fmt] ) return( NULL ); return( class->vectors[fmt] ); } void vips_arithmetic_compile( VipsArithmeticClass *class ) { int i; g_assert( class->format_table ); for( i = 0; i < VIPS_FORMAT_LAST; i++ ) if( class->vector_program[i] && !vips_vector_compile( class->vectors[i] ) ) /* If compilation fails, turn off the vector for this * type. */ class->vector_program[i] = FALSE; #ifdef DEBUG printf( "vips_arithmetic_compile: " ); for( i = 0; i < VIPS_FORMAT_LAST; i++ ) if( class->vector_program[i] ) printf( "%s ", vips_enum_nick( VIPS_TYPE_BAND_FORMAT, i ) ); printf( "\n" ); #endif /*DEBUG*/ } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_arithmetic_operation_init( void ) { extern GType vips_add_get_type( void ); extern GType vips_subtract_get_type( void ); extern GType vips_multiply_get_type( void ); extern GType vips_divide_get_type( void ); extern GType vips_invert_get_type( void ); extern GType vips_avg_get_type( void ); extern GType vips_min_get_type( void ); extern GType vips_max_get_type( void ); extern GType vips_deviate_get_type( void ); extern GType vips_linear_get_type( void ); extern GType vips_math_get_type( void ); extern GType vips_abs_get_type( void ); extern GType vips_sign_get_type( void ); extern GType vips_stats_get_type( void ); extern GType vips_hist_find_get_type( void ); extern GType vips_hist_find_ndim_get_type( void ); extern GType vips_hist_find_indexed_get_type( void ); extern GType vips_project_get_type( void ); extern GType vips_profile_get_type( void ); extern GType vips_measure_get_type( void ); extern GType vips_round_get_type( void ); extern GType vips_relational_get_type( void ); extern GType vips_relational_const_get_type( void ); extern GType vips_remainder_get_type( void ); extern GType vips_remainder_const_get_type( void ); extern GType vips_boolean_get_type( void ); extern GType vips_boolean_const_get_type( void ); extern GType vips_math2_get_type( void ); extern GType vips_math2_const_get_type( void ); extern GType vips_complex_get_type( void ); extern GType vips_complex2_get_type( void ); extern GType vips_complexget_get_type( void ); extern GType vips_complexform_get_type( void ); vips_add_get_type(); vips_subtract_get_type(); vips_multiply_get_type(); vips_divide_get_type(); vips_invert_get_type(); vips_avg_get_type(); vips_min_get_type(); vips_max_get_type(); vips_deviate_get_type(); vips_linear_get_type(); vips_math_get_type(); vips_abs_get_type(); vips_sign_get_type(); vips_stats_get_type(); vips_hist_find_get_type(); vips_hist_find_ndim_get_type(); vips_hist_find_indexed_get_type(); vips_project_get_type(); vips_profile_get_type(); vips_measure_get_type(); vips_round_get_type(); vips_relational_get_type(); vips_relational_const_get_type(); vips_remainder_get_type(); vips_remainder_const_get_type(); vips_boolean_get_type(); vips_boolean_const_get_type(); vips_math2_get_type(); vips_math2_const_get_type(); vips_complex_get_type(); vips_complex2_get_type(); vips_complexget_get_type(); vips_complexform_get_type(); } vips-7.38.5/libvips/arithmetic/hist_find.c0000644000175000017500000002366612303140253015442 00000000000000/* find histograms * * Copyright: 1990, 1991, N. Dessipris. * * Author: Nicos Dessipris. * Written on: 09/07/1990 * Modified on : 11/03/1991 * 19/7/93 JC * - test for Coding type added * 26/10/94 JC * - rewritten for ANSI * - now does USHORT too * - 5 x faster! * 2/6/95 JC * - rewritten for partials * 3/3/01 JC * - tiny speed ups * 21/1/07 * - number bands from zero * 24/3/10 * - gtkdoc * - small cleanups * 25/1/12 * - cast @in to u8/u16. * 12/8/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "statistic.h" /* Accumulate a histogram in one of these. */ typedef struct { int bands; /* Number of bands in output */ int which; /* If one band in out, which band of input */ int size; /* Number of bins for each band */ int mx; /* Maximum value we have seen */ unsigned int **bins; /* All the bins! */ } Histogram; typedef struct _VipsHistFind { VipsStatistic parent_instance; /* -1 for all bands, or the band we scan. */ int which; /* Main image histogram. Subhists accumulate to this. */ Histogram *hist; /* Write hist to this output image. */ VipsImage *out; } VipsHistFind; typedef VipsStatisticClass VipsHistFindClass; G_DEFINE_TYPE( VipsHistFind, vips_hist_find, VIPS_TYPE_STATISTIC ); /* Build a Histogram. */ static Histogram * histogram_new( VipsHistFind *hist_find, int bands, int which, int size ) { Histogram *hist; int i; if( !(hist = VIPS_NEW( hist_find, Histogram )) || !(hist->bins = VIPS_ARRAY( hist_find, bands, unsigned int * )) ) return( NULL ); for( i = 0; i < bands; i++ ) { if( !(hist->bins[i] = VIPS_ARRAY( hist_find, size, unsigned int )) ) return( NULL ); memset( hist->bins[i], 0, size * sizeof( unsigned int ) ); } hist->bands = bands; hist->which = which; hist->size = size; hist->mx = 0; return( hist ); } static int vips_hist_find_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsStatistic *statistic = VIPS_STATISTIC( object ); VipsHistFind *hist_find = (VipsHistFind *) object; unsigned int *obuffer; unsigned int *q; int i, j; g_object_set( object, "out", vips_image_new(), NULL ); if( statistic->in && vips_check_bandno( class->nickname, statistic->in, hist_find->which ) ) return( -1 ); /* main hist made on first thread start. */ if( VIPS_OBJECT_CLASS( vips_hist_find_parent_class )->build( object ) ) return( -1 ); /* Make the output image. */ if( vips_image_pipelinev( hist_find->out, VIPS_DEMAND_STYLE_ANY, statistic->ready, NULL ) ) return( -1 ); vips_image_init_fields( hist_find->out, hist_find->hist->mx + 1, 1, hist_find->hist->bands, VIPS_FORMAT_UINT, VIPS_CODING_NONE, VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 ); /* Interleave for output. */ if( !(obuffer = VIPS_ARRAY( object, VIPS_IMAGE_N_ELEMENTS( hist_find->out ), unsigned int )) ) return( -1 ); for( q = obuffer, j = 0; j < hist_find->out->Xsize; j++ ) for( i = 0; i < hist_find->out->Bands; i++ ) *q++ = hist_find->hist->bins[i][j]; if( vips_image_write_line( hist_find->out, 0, (VipsPel *) obuffer ) ) return( -1 ); return( 0 ); } /* Build a sub-hist, based on the main hist. */ static void * vips_hist_find_start( VipsStatistic *statistic ) { VipsHistFind *hist_find = (VipsHistFind *) statistic; /* Make the main hist, if necessary. */ if( !hist_find->hist ) hist_find->hist = histogram_new( hist_find, hist_find->which == -1 ? statistic->ready->Bands : 1, hist_find->which, statistic->ready->BandFmt == VIPS_FORMAT_UCHAR ? 256 : 65536 ); return( (void *) histogram_new( hist_find, hist_find->hist->bands, hist_find->hist->which, hist_find->hist->size ) ); } /* Join a sub-hist onto the main hist. */ static int vips_hist_find_stop( VipsStatistic *statistic, void *seq ) { Histogram *sub_hist = (Histogram *) seq; VipsHistFind *hist_find = (VipsHistFind *) statistic; Histogram *hist = hist_find->hist; int i, j; g_assert( sub_hist->bands == hist->bands && sub_hist->size == hist->size ); /* Add on sub-data. */ hist->mx = VIPS_MAX( hist->mx, sub_hist->mx ); for( i = 0; i < hist->bands; i++ ) for( j = 0; j < hist->size; j++ ) hist->bins[i][j] += sub_hist->bins[i][j]; /* Blank out sub-hist to make sure we can't add it again. */ sub_hist->mx = 0; for( i = 0; i < sub_hist->bands; i++ ) sub_hist->bins[i] = NULL; return( 0 ); } /* Hist of all bands of uchar. */ static int vips_hist_find_uchar_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { Histogram *hist = (Histogram *) seq; int nb = statistic->ready->Bands; VipsPel *p = (VipsPel *) in; int i, j, z; /* Tried swapping these loops, no meaningful speedup. */ for( i = 0, j = 0; j < n; j++ ) for( z = 0; z < nb; z++, i++ ) hist->bins[z][p[i]] += 1; /* Note the maximum. */ hist->mx = 255; return( 0 ); } /* Histogram of a selected band of a uchar image. */ static int vips_hist_find_uchar_extract_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { Histogram *hist = (Histogram *) seq; int nb = statistic->ready->Bands; int max = n * nb; unsigned int *bins = hist->bins[0]; VipsPel *p = (VipsPel *) in; int i; for( i = hist->which; i < max; i += nb ) bins[p[i]] += 1; /* Note the maximum. */ hist->mx = 255; return( 0 ); } /* Histogram of all bands of a ushort image. */ static int vips_hist_find_ushort_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { Histogram *hist = (Histogram *) seq; int mx = hist->mx; int nb = statistic->ready->Bands; unsigned short *p = (unsigned short *) in; int i, j, z; for( i = 0, j = 0; j < n; j++ ) for( z = 0; z < nb; z++, i++ ) { int v = p[i]; /* Adjust maximum. */ if( v > mx ) mx = v; hist->bins[z][v] += 1; } /* Note the maximum. */ hist->mx = mx; return( 0 ); } /* Histogram of one band of a ushort image. */ static int vips_hist_find_ushort_extract_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { Histogram *hist = (Histogram *) seq; int mx = hist->mx; unsigned int *bins = hist->bins[0]; unsigned short *p = (unsigned short *) in; int nb = statistic->ready->Bands; int max = nb * n; int i; for( i = hist->which; i < max; i += nb ) { int v = p[i]; /* Adjust maximum. */ if( v > mx ) mx = v; bins[v] += 1; } /* Note the maximum. */ hist->mx = mx; return( 0 ); } static int vips_hist_find_scan( VipsStatistic *statistic, void *seq, int x, int y, void *in, int n ) { VipsHistFind *hist_find = (VipsHistFind *) statistic; VipsStatisticScanFn scan; if( hist_find->which < 0 ) { if( statistic->in->BandFmt == VIPS_FORMAT_UCHAR ) scan = vips_hist_find_uchar_scan; else scan = vips_hist_find_ushort_scan; } else { if( statistic->in->BandFmt == VIPS_FORMAT_UCHAR ) scan = vips_hist_find_uchar_extract_scan; else scan = vips_hist_find_ushort_extract_scan; } return( scan( statistic, seq, x, y, in, n ) ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define US VIPS_FORMAT_USHORT /* Type mapping: go to uchar or ushort. */ static const VipsBandFormat vips_histgr_format_table[10] = { /* UC C US S UI I F X D DX */ UC, UC, US, US, US, US, US, US, US, US }; static void vips_hist_find_class_init( VipsHistFindClass *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *object_class = (VipsObjectClass *) class; VipsStatisticClass *sclass = VIPS_STATISTIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "hist_find"; object_class->description = _( "find image histogram" ); object_class->build = vips_hist_find_build; sclass->start = vips_hist_find_start; sclass->scan = vips_hist_find_scan; sclass->stop = vips_hist_find_stop; sclass->format_table = vips_histgr_format_table; VIPS_ARG_IMAGE( class, "out", 100, _( "Output" ), _( "Output histogram" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsHistFind, out ) ); VIPS_ARG_INT( class, "band", 110, _( "Band" ), _( "Find histogram of band" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsHistFind, which ), -1, 100000, -1 ); } static void vips_hist_find_init( VipsHistFind *hist_find ) { hist_find->which = -1; } /** * vips_hist_find: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @band: band to equalise * * Find the histogram of @in. Find the histogram for band @band (producing a * one-band histogram), or for all bands (producing an n-band histogram) if * @band is -1. * * @in is cast to u8 or u16. @out is always u32. * * See also: vips_hist_find_ndim(), vips_hist_find_indexed(). * * Returns: 0 on success, -1 on error */ int vips_hist_find( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "hist_find", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/unary.h0000644000175000017500000000356112303140253014626 00000000000000/* base class for all unary arithmetic operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_UNARY_H #define VIPS_UNARY_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include "parithmetic.h" #define VIPS_TYPE_UNARY (vips_unary_get_type()) #define VIPS_UNARY( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), VIPS_TYPE_UNARY, VipsUnary )) #define VIPS_UNARY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), VIPS_TYPE_UNARY, VipsUnaryClass)) #define VIPS_IS_UNARY( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_UNARY )) #define VIPS_IS_UNARY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_UNARY )) #define VIPS_UNARY_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), VIPS_TYPE_UNARY, VipsUnaryClass )) typedef struct _VipsUnary { VipsArithmetic parent_instance; VipsImage *in; } VipsUnary; typedef VipsArithmeticClass VipsUnaryClass; GType vips_unary_get_type( void ); int vips_unary_copy( VipsUnary *unary ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_UNARY_H*/ vips-7.38.5/libvips/arithmetic/add.c0000644000175000017500000001632712303140253014217 00000000000000/* add operation * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 29/4/93 J.Cupitt * - now works for partial images * 1/7/93 JC * - adapted for partial v2 * 9/5/95 JC * - simplified: now just handles 10 cases (instead of 50), using * im_clip2*() to help * - now uses im_wrapmany() rather than im_generate() * 31/5/96 JC * - SWAP() removed, *p++ removed * 27/9/04 * - im__cast_and_call() now matches bands as well * - ... so 1 band + 4 band image -> 4 band image * 8/12/06 * - add liboil support * 18/8/08 * - revise upcasting system * - im__cast_and_call() no longer sets bbits for you * - add gtkdoc comments * - remove separate complex case, just double size * 11/9/09 * - im__cast_and_call() becomes im__arith_binary() * - more of operation scaffold moved inside * 25/7/10 * - remove oil support again ... we'll try Orc instead * 29/10/10 * - move to VipsVector for Orc support * 28/2/11 * - argh vector int/uint was broken * 4/4/11 * - rewrite as a class * 2/12/13 * - remove vector code, gcc autovec with -O3 is now as fast */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "binary.h" typedef VipsBinary VipsAdd; typedef VipsBinaryClass VipsAddClass; G_DEFINE_TYPE( VipsAdd, vips_add, VIPS_TYPE_BINARY ); #define LOOP( IN, OUT ) { \ IN * restrict left = (IN *) in[0]; \ IN * restrict right = (IN *) in[1]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = left[x] + right[x]; \ } static void add_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = arithmetic->ready[0]; /* Complex just doubles the size. */ const int sz = width * vips_image_get_bands( im ) * (vips_band_format_iscomplex( vips_image_get_format( im ) ) ? 2 : 1); int x; /* Add all input types. Keep types here in sync with * vips_add_format_table[] below. */ switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char, unsigned short ); break; case VIPS_FORMAT_CHAR: LOOP( signed char, signed short ); break; case VIPS_FORMAT_USHORT: LOOP( unsigned short, unsigned int ); break; case VIPS_FORMAT_SHORT: LOOP( signed short, signed int ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int, unsigned int ); break; case VIPS_FORMAT_INT: LOOP( signed int, signed int ); break; case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_COMPLEX: LOOP( float, float ); break; case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DPCOMPLEX: LOOP( double, double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type promotion for addition. Sign and value preserving. Make sure these * match the case statement in add_buffer() above. */ static const VipsBandFormat vips_add_format_table[10] = { /* UC C US S UI I F X D DX */ US, S, UI, I, UI, I, F, X, D, DX }; static void vips_add_class_init( VipsAddClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); object_class->nickname = "add"; object_class->description = _( "add two images" ); aclass->process_line = add_buffer; vips_arithmetic_set_format_table( aclass, vips_add_format_table ); } static void vips_add_init( VipsAdd *add ) { } /** * vips_add: * @left: input image * @right: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * This operation calculates @in1 + @in2 and writes the result to @out. * * If the images differ in size, the smaller image is enlarged to match the * larger by adding zero pixels along the bottom and right. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common format (see table * Smallest common format in * arithmetic), then the * following table is used to determine the output type: * * * VipsAdd type promotion * * * * input type * output type * * * * * uchar * ushort * * * char * short * * * ushort * uint * * * short * int * * * uint * uint * * * int * int * * * float * float * * * double * double * * * complex * complex * * * double complex * double complex * * * *
* * In other words, the output type is just large enough to hold the whole * range of possible values. * * Operations on integer images are performed using the processor's vector unit, * if possible. Disable this with --vips-novector or IM_NOVECTOR. * * See also: vips_subtract(), vips_linear(). * * Returns: 0 on success, -1 on error */ int vips_add( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "add", ap, left, right, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/statistic.h0000644000175000017500000000532212303140253015474 00000000000000/* base class for all stats operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_STATISTIC_H #define VIPS_STATISTIC_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_STATISTIC (vips_statistic_get_type()) #define VIPS_STATISTIC( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_STATISTIC, VipsStatistic )) #define VIPS_STATISTIC_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_STATISTIC, VipsStatisticClass)) #define VIPS_IS_STATISTIC( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_STATISTIC )) #define VIPS_IS_STATISTIC_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_STATISTIC )) #define VIPS_STATISTIC_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_STATISTIC, VipsStatisticClass )) typedef struct _VipsStatistic VipsStatistic; typedef struct _VipsStatisticClass VipsStatisticClass; typedef void *(*VipsStatisticStartFn)( VipsStatistic *statistic ); typedef int (*VipsStatisticScanFn)( VipsStatistic *statistic, void *seq, int x, int y, void *p, int n ); typedef int (*VipsStatisticStopFn)( VipsStatistic *statistic, void *seq ); struct _VipsStatistic { VipsOperation parent_instance; /* All have an input image. */ VipsImage *in; /* The input image cast and ready for processing. */ VipsImage *ready; /* Set this to stop computation early. */ gboolean stop; /* Client data for the subclass. */ void *a; void *b; }; struct _VipsStatisticClass { VipsOperationClass parent_class; /* Start/scan/stop, for vips_sink. */ VipsStatisticStartFn start; VipsStatisticScanFn scan; VipsStatisticStopFn stop; /* For each input format, what output format. If NULL, no casting. */ const VipsBandFormat *format_table; }; GType vips_statistic_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_STATISTIC_H*/ vips-7.38.5/libvips/arithmetic/math2.c0000644000175000017500000003557312303140253014506 00000000000000/* math2.c --- 2ary math funcs * * Copyright: 1990, N. Dessipris * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 10/12/93 JC * - now reports total number of x/0, rather than each one. * 1/2/95 JC * - rewritten for PIO with im_wrapone() * - incorrect complex code removed * - /0 reporting removed for ease of programming * 15/4/97 JC * - return( 0 ) missing, oops! * 6/7/98 JC * - _vec form added * 30/8/09 * - gtkdoc * - tiny cleanups * 20/9/09 * - im_powtra() adapated to make math2.c * 12/11/11 * - redone as a class * 17/7/12 * - wopconst was broken */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "binary.h" #include "unaryconst.h" typedef struct _VipsMath2 { VipsBinary parent_instance; VipsOperationMath2 math2; } VipsMath2; typedef VipsBinaryClass VipsMath2Class; G_DEFINE_TYPE( VipsMath2, vips_math2, VIPS_TYPE_BINARY ); static int vips_math2_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsBinary *binary = (VipsBinary *) object; if( binary->left && vips_check_noncomplex( class->nickname, binary->left ) ) return( -1 ); if( binary->right && vips_check_noncomplex( class->nickname, binary->right ) ) return( -1 ); if( VIPS_OBJECT_CLASS( vips_math2_parent_class )->build( object ) ) return( -1 ); return( 0 ); } #define LOOP( IN, OUT, OP ) { \ IN * restrict p1 = (IN *) in[0]; \ IN * restrict p2 = (IN *) in[1]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < sz; x++ ) \ OP( q[x], p1[x], p2[x] ); \ } #define SWITCH( L, OP ) \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_UCHAR: \ L( unsigned char, float, OP ); break; \ case VIPS_FORMAT_CHAR: \ L( signed char, float, OP ); break; \ case VIPS_FORMAT_USHORT: \ L( unsigned short, float, OP ); break; \ case VIPS_FORMAT_SHORT: \ L( signed short, float, OP ); break; \ case VIPS_FORMAT_UINT: \ L( unsigned int, float, OP ); break; \ case VIPS_FORMAT_INT: \ L( signed int, float, OP ); break; \ case VIPS_FORMAT_FLOAT: \ L( float, float, OP ); break; \ case VIPS_FORMAT_DOUBLE: \ L( double, double, OP ); break;\ \ default: \ g_assert( 0 ); \ } #define POW( Y, X, E ) { \ double left = (double) (X); \ double right = (double) (E); \ \ /* Division by zero! Difficult to report tho' \ */ \ (Y) = (left == 0.0 && right < 0.0) ? 0.0 : pow( left, right ); \ } #define WOP( Y, X, E ) POW( Y, E, X ) static void vips_math2_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsMath2 *math2 = (VipsMath2 *) arithmetic; VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( math2->math2 ) { case VIPS_OPERATION_MATH2_POW: SWITCH( LOOP, POW ); break; case VIPS_OPERATION_MATH2_WOP: SWITCH( LOOP, WOP ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type promotion for math2. Keep in sync with math2_buffer() above. */ static int vips_math2_format_table[10] = { /* UC C US S UI I F X D DX */ F, F, F, F, F, F, F, X, D, DX }; static void vips_math2_class_init( VipsMath2Class *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "math2"; object_class->description = _( "binary math operations" ); object_class->build = vips_math2_build; aclass->process_line = vips_math2_buffer; vips_arithmetic_set_format_table( aclass, vips_math2_format_table ); VIPS_ARG_ENUM( class, "math2", 200, _( "Operation" ), _( "math to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMath2, math2 ), VIPS_TYPE_OPERATION_MATH2, VIPS_OPERATION_MATH2_POW ); } static void vips_math2_init( VipsMath2 *math2 ) { } static int vips_math2v( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationMath2 math2, va_list ap ) { return( vips_call_split( "math2", ap, left, right, out, math2 ) ); } /** * vips_math2: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @math2: math operation to perform * @...: %NULL-terminated list of optional named arguments * * This operation calculates a 2-ary maths operation on a pair of images * and writes the result to @out. The images may have any * non-complex format. @out is float except in the case that either of @left * or @right are double, in which case @out is also double. * * It detects division by zero, setting those pixels to zero in the output. * Beware: it does this silently! * * If the images differ in size, the smaller image is enlarged to match the * larger by adding zero pixels along the bottom and right. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common format (see table * Smallest common format in * arithmetic), and that format is the * result type. * * See also: vips_math2_const(). * * Returns: 0 on success, -1 on error */ int vips_math2( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationMath2 math2, ... ) { va_list ap; int result; va_start( ap, math2 ); result = vips_math2v( left, right, out, math2, ap ); va_end( ap ); return( result ); } /** * vips_pow: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH2_POW on a pair of images. See * vips_math2(). * * Returns: 0 on success, -1 on error */ int vips_pow( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_math2v( left, right, out, VIPS_OPERATION_MATH2_POW, ap ); va_end( ap ); return( result ); } /** * vips_wop: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH2_WOP on a pair of images. See * vips_math2(). * * Returns: 0 on success, -1 on error */ int vips_wop( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_math2v( left, right, out, VIPS_OPERATION_MATH2_WOP, ap ); va_end( ap ); return( result ); } typedef struct _VipsMath2Const { VipsUnaryConst parent_instance; VipsOperationMath2 math2; } VipsMath2Const; typedef VipsUnaryConstClass VipsMath2ConstClass; G_DEFINE_TYPE( VipsMath2Const, vips_math2_const, VIPS_TYPE_UNARY_CONST ); static int vips_math2_const_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsUnary *unary = (VipsUnary *) object; VipsUnaryConst *uconst = (VipsUnaryConst *) object; if( unary->in && vips_check_noncomplex( class->nickname, unary->in ) ) return( -1 ); uconst->const_format = VIPS_FORMAT_DOUBLE; if( VIPS_OBJECT_CLASS( vips_math2_const_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } #define LOOPC( IN, OUT, OP ) { \ IN * restrict p = (IN *) in[0]; \ OUT * restrict q = (OUT *) out; \ double * restrict c = (double *) uconst->c_ready; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( b = 0; b < bands; b++, i++ ) \ OP( q[i], p[i], c[b] ); \ } static void vips_math2_const_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsUnaryConst *uconst = (VipsUnaryConst *) arithmetic; VipsMath2Const *math2 = (VipsMath2Const *) arithmetic; VipsImage *im = arithmetic->ready[0]; int bands = im->Bands; int i, x, b; switch( math2->math2 ) { case VIPS_OPERATION_MATH2_POW: SWITCH( LOOPC, POW ); break; case VIPS_OPERATION_MATH2_WOP: SWITCH( LOOPC, WOP ); break; default: g_assert( 0 ); } } static void vips_math2_const_class_init( VipsMath2ConstClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "math2_const"; object_class->description = _( "pow( @in, @c )" ); object_class->build = vips_math2_const_build; aclass->process_line = vips_math2_const_buffer; vips_arithmetic_set_format_table( aclass, vips_math2_format_table ); VIPS_ARG_ENUM( class, "math2", 200, _( "Operation" ), _( "math to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMath2Const, math2 ), VIPS_TYPE_OPERATION_MATH2, VIPS_OPERATION_MATH2_POW ); } static void vips_math2_const_init( VipsMath2Const *math2_const ) { } static int vips_math2_constv( VipsImage *in, VipsImage **out, VipsOperationMath2 math2, double *c, int n, va_list ap ) { VipsArea *area_c; double *array; int result; int i; area_c = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), n ); array = (double *) area_c->data; for( i = 0; i < n; i++ ) array[i] = c[i]; result = vips_call_split( "math2_const", ap, in, out, math2, area_c ); vips_area_unref( area_c ); return( result ); } /** * vips_math2_const: * @in: input image * @out: output image * @math2: math operation to perform * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * This operation calculates various 2-ary maths operations on an image and * an array of constants and writes the result to @out. * The image may have any * non-complex format. @out is float except in the case that @in * is double, in which case @out is also double. * * It detects division by zero, setting those pixels to zero in the output. * Beware: it does this silently! * * If the array of constants has just one element, that constant is used for * all image bands. If the array has more than one element and they have * the same number of elements as there are bands in the image, then * one array element is used for each band. If the arrays have more than one * element and the image only has a single band, the result is a many-band * image where each band corresponds to one array element. * * See also: vips_math2(), vips_math(). * * Returns: 0 on success, -1 on error */ int vips_math2_const( VipsImage *in, VipsImage **out, VipsOperationMath2 math2, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_math2_constv( in, out, math2, c, n, ap ); va_end( ap ); return( result ); } /** * vips_pow_const: * @in: left-hand input #VipsImage * @out: output #VipsImage * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH2_POW on an image and a constant. See * vips_math2_const(). * * Returns: 0 on success, -1 on error */ int vips_pow_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_math2_constv( in, out, VIPS_OPERATION_MATH2_POW, c, n, ap ); va_end( ap ); return( result ); } /** * vips_wop_const: * @in: left-hand input #VipsImage * @out: output #VipsImage * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH2_WOP on an image and a constant. See * vips_math2_const(). * * Returns: 0 on success, -1 on error */ int vips_wop_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_math2_constv( in, out, VIPS_OPERATION_MATH2_WOP, c, n, ap ); va_end( ap ); return( result ); } /** * vips_math2_const1: * @in: input image * @out: output image * @math2: math operation to perform * @c: constant * @...: %NULL-terminated list of optional named arguments * * This operation calculates various 2-ary maths operations on an image and * a constant. See vips_math2_const(). * * Returns: 0 on success, -1 on error */ int vips_math2_const1( VipsImage *in, VipsImage **out, VipsOperationMath2 math2, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_math2_constv( in, out, math2, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_pow_const1: * @in: left-hand input #VipsImage * @out: output #VipsImage * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH2_POW on an image and a constant. See * vips_math2_const(). * * Returns: 0 on success, -1 on error */ int vips_pow_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_math2_constv( in, out, VIPS_OPERATION_MATH2_POW, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_wop_const1: * @in: left-hand input #VipsImage * @out: output #VipsImage * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_MATH2_WOP on an image and a constant. See * vips_math2_const(). * * Returns: 0 on success, -1 on error */ int vips_wop_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_math2_constv( in, out, VIPS_OPERATION_MATH2_WOP, &c, 1, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/linear.c0000644000175000017500000002771612303141142014743 00000000000000/* im_lintra.c -- linear transform * * Copyright: 1990, N. Dessipris, based on im_powtra() * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 23/4/93 JC * - adapted to work with partial images * 1/7/93 JC * - adapted for partial v2 * 7/10/94 JC * - new IM_NEW() * - more typedefs * 9/2/95 JC * - adapted for im_wrap... * - operations on complex images now just transform the real channel * 29/9/95 JC * - complex was broken * 15/4/97 JC * - return(0) missing from generate, arrgh! * 1/7/98 JC * - im_lintra_vec added * 3/8/02 JC * - fall back to im_copy() for a == 1, b == 0 * 10/10/02 JC * - auug, failing to multiply imag for complex! (thanks matt) * 10/12/02 JC * - removed im_copy() fallback ... meant that output format could change * with value :-( very confusing * 30/6/04 * - added 1 band image * n band vector case * 8/12/06 * - add liboil support * 9/9/09 * - gtkdoc comment, minor reformat * 31/7/10 * - remove liboil * 31/10/11 * - rework as a class * - removed the 1-ary constant path, no faster * 30/11/13 * - 1ary is back, faster with gcc 4.8 * 3/12/13 * - try an ORC path with the band loop unrolled * 14/1/14 * - add uchar output option */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "unary.h" typedef struct _VipsLinear { VipsUnary parent_instance; /* Our constants: multiply by a, add b. */ VipsArea *a; VipsArea *b; /* uchar output. */ gboolean uchar; /* Our constants expanded to match arith->ready in size. */ int n; double *a_ready; double *b_ready; } VipsLinear; typedef VipsUnaryClass VipsLinearClass; G_DEFINE_TYPE( VipsLinear, vips_linear, VIPS_TYPE_UNARY ); static int vips_linear_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsArithmetic *arithmetic = VIPS_ARITHMETIC( object ); VipsUnary *unary = (VipsUnary *) object; VipsLinear *linear = (VipsLinear *) object; int i; /* If we have a three-element vector we need to bandup the image to * match. */ linear->n = 1; if( linear->a ) linear->n = VIPS_MAX( linear->n, linear->b->n ); if( linear->b ) linear->n = VIPS_MAX( linear->n, linear->b->n ); if( unary->in ) linear->n = VIPS_MAX( linear->n, unary->in->Bands ); arithmetic->base_bands = linear->n; if( unary->in && linear->a && linear->b ) { if( vips_check_vector( class->nickname, linear->a->n, unary->in ) || vips_check_vector( class->nickname, linear->b->n, unary->in ) ) return( -1 ); } /* Make up-banded versions of our constants. */ linear->a_ready = VIPS_ARRAY( linear, linear->n, double ); linear->b_ready = VIPS_ARRAY( linear, linear->n, double ); for( i = 0; i < linear->n; i++ ) { if( linear->a ) { double *ary = (double *) linear->a->data; int j = VIPS_MIN( i, linear->a->n - 1 ); linear->a_ready[i] = ary[j]; } if( linear->b ) { double *ary = (double *) linear->b->data; int j = VIPS_MIN( i, linear->b->n - 1 ); linear->b_ready[i] = ary[j]; } } if( linear->uchar ) arithmetic->format = VIPS_FORMAT_UCHAR; if( VIPS_OBJECT_CLASS( vips_linear_parent_class )->build( object ) ) return( -1 ); return( 0 ); } /* Non-complex input, any output, all bands of the constant equal. */ #define LOOP1( IN, OUT ) { \ IN * restrict p = (IN *) in[0]; \ OUT * restrict q = (OUT *) out; \ OUT a1 = a[0]; \ OUT b1 = b[0]; \ int sz = width * nb; \ \ for( x = 0; x < sz; x++ ) \ q[x] = a1 * (OUT) p[x] + b1; \ } /* Non-complex input, any output. */ #define LOOPN( IN, OUT ) { \ IN * restrict p = (IN *) in[0]; \ OUT * restrict q = (OUT *) out; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( k = 0; k < nb; k++, i++ ) \ q[i] = a[k] * (OUT) p[i] + b[k]; \ } #define LOOP( IN, OUT ) { \ if( linear->a->n == 1 && linear->b->n == 1 ) { \ LOOP1( IN, OUT ); \ } \ else { \ LOOPN( IN, OUT ); \ } \ } /* Complex input, complex output. */ #define LOOPCMPLXN( IN, OUT ) { \ IN * restrict p = (IN *) in[0]; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < width; x++ ) \ for( k = 0; k < nb; k++ ) { \ q[0] = a[k] * p[0] + b[k]; \ q[1] = p[1]; \ q += 2; \ p += 2; \ } \ } /* Non-complex input, any output, all bands of the constant equal, uchar * output. */ #define LOOP1uc( IN ) { \ IN * restrict p = (IN *) in[0]; \ VipsPel * restrict q = (VipsPel *) out; \ float a1 = a[0]; \ float b1 = b[0]; \ int sz = width * nb; \ \ for( x = 0; x < sz; x++ ) { \ float t = a1 * p[x] + b1; \ \ q[x] = VIPS_CLIP( 0, t, 255 ); \ } \ } /* Non-complex input, uchar output. */ #define LOOPNuc( IN ) { \ IN * restrict p = (IN *) in[0]; \ VipsPel * restrict q = (VipsPel *) out; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( k = 0; k < nb; k++, i++ ) { \ double t = a[k] * p[i] + b[k]; \ \ q[i] = VIPS_CLIP( 0, t, 255 ); \ } \ } #define LOOPuc( IN ) { \ if( linear->a->n == 1 && linear->b->n == 1 ) { \ LOOP1uc( IN ); \ } \ else { \ LOOPNuc( IN ); \ } \ } /* Complex input, uchar output. */ #define LOOPCMPLXNuc( IN ) { \ IN * restrict p = (IN *) in[0]; \ VipsPel * restrict q = (VipsPel *) out; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( k = 0; k < nb; k++, i++ ) { \ double t = a[k] * p[0] + b[k]; \ \ q[i] = VIPS_CLIP( 0, t, 255 ); \ p += 2; \ } \ } /* Lintra a buffer, n set of scale/offset. */ static void vips_linear_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = arithmetic->ready[0]; VipsLinear *linear = (VipsLinear *) arithmetic; double * restrict a = linear->a_ready; double * restrict b = linear->b_ready; int nb = im->Bands; int i, x, k; if( linear->uchar ) switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_UCHAR: LOOPuc( unsigned char ); break; case VIPS_FORMAT_CHAR: LOOPuc( signed char ); break; case VIPS_FORMAT_USHORT: LOOPuc( unsigned short ); break; case VIPS_FORMAT_SHORT: LOOPuc( signed short ); break; case VIPS_FORMAT_UINT: LOOPuc( unsigned int ); break; case VIPS_FORMAT_INT: LOOPuc( signed int ); break; case VIPS_FORMAT_FLOAT: LOOPuc( float ); break; case VIPS_FORMAT_DOUBLE: LOOPuc( double ); break; case VIPS_FORMAT_COMPLEX: LOOPCMPLXNuc( float ); break; case VIPS_FORMAT_DPCOMPLEX: LOOPCMPLXNuc( double ); break; default: g_assert( 0 ); } else switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char, float ); break; case VIPS_FORMAT_CHAR: LOOP( signed char, float ); break; case VIPS_FORMAT_USHORT: LOOP( unsigned short, float ); break; case VIPS_FORMAT_SHORT: LOOP( signed short, float ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int, float ); break; case VIPS_FORMAT_INT: LOOP( signed int, float ); break; case VIPS_FORMAT_FLOAT: LOOP( float, float ); break; case VIPS_FORMAT_DOUBLE: LOOP( double, double ); break; case VIPS_FORMAT_COMPLEX: LOOPCMPLXN( float, float ); break; case VIPS_FORMAT_DPCOMPLEX: LOOPCMPLXN( double, double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Format doesn't change with linear. */ static const VipsBandFormat vips_linear_format_table[10] = { /* UC C US S UI I F X D DX */ F, F, F, F, F, F, F, X, D, DX }; static void vips_linear_class_init( VipsLinearClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "linear"; object_class->description = _( "calculate (a * in + b)" ); object_class->build = vips_linear_build; aclass->process_line = vips_linear_buffer; vips_arithmetic_set_format_table( aclass, vips_linear_format_table ); VIPS_ARG_BOXED( class, "a", 110, _( "a" ), _( "Multiply by this" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsLinear, a ), VIPS_TYPE_ARRAY_DOUBLE ); VIPS_ARG_BOXED( class, "b", 111, _( "b" ), _( "Add this" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsLinear, b ), VIPS_TYPE_ARRAY_DOUBLE ); VIPS_ARG_BOOL( class, "uchar", 112, _( "uchar" ), _( "Output should be uchar" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsLinear, uchar ), FALSE ); } static void vips_linear_init( VipsLinear *linear ) { } static int vips_linearv( VipsImage *in, VipsImage **out, double *a, double *b, int n, va_list ap ) { VipsArea *area_a; VipsArea *area_b; int result; area_a = (VipsArea *) vips_array_double_new( a, n ); area_b = (VipsArea *) vips_array_double_new( b, n ); result = vips_call_split( "linear", ap, in, out, area_a, area_b ); vips_area_unref( area_a ); vips_area_unref( area_b ); return( result ); } /** * vips_linear: * @in: image to transform * @out: output image * @a: (array length=n): array of constants for multiplication * @b: (array length=n): array of constants for addition * @n: length of constant arrays * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @uchar: output uchar pixels * * Pass an image through a linear transform, ie. (@out = @in * @a + @b). Output * is float for integer input, double for double input, complex for * complex input and double complex for double complex input. Set @uchar to * output uchar pixels. * * If the arrays of constants have just one element, that constant is used for * all image bands. If the arrays have more than one element and they have * the same number of elements as there are bands in the image, then * one array element is used for each band. If the arrays have more than one * element and the image only has a single band, the result is a many-band * image where each band corresponds to one array element. * * See also: vips_linear1(), vips_add(). * * Returns: 0 on success, -1 on error */ int vips_linear( VipsImage *in, VipsImage **out, double *a, double *b, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_linearv( in, out, a, b, n, ap ); va_end( ap ); return( result ); } /** * vips_linear1: * @in: image to transform * @out: output image * @a: constant for multiplication * @b: constant for addition * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @uchar: output uchar pixels * * Run vips_linear() with a single constant. * * See also: vips_linear(). * * Returns: 0 on success, -1 on error */ int vips_linear1( VipsImage *in, VipsImage **out, double a, double b, ... ) { va_list ap; int result; va_start( ap, b ); result = vips_linearv( in, out, &a, &b, 1, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/boolean.c0000644000175000017500000005230112303140253015076 00000000000000/* boolean.c --- various bit operations * * Modified: * 15/12/94 JC * - ANSIfied * - adapted to partials with im_wrap... * 25/1/95 JC * - added check1ary(), check2ary() * 8/2/95 JC * - new im_wrapmany * 19/7/95 JC * - added im_shiftleft() and im_shiftright() * 6/7/98 JC * - added _vec forms * - removed *p++ stuff * 10/9/99 JC * - and/or/eor now do all int types * 10/10/02 JC * - renamed im_and() etc. as im_andimage() to remove breakage in the C++ * layer if operator names are turned on * 30/6/04 * - now cast float/complex args to int * 11/9/09 * - use new im__cast_and__call() * - therefore now supports 1-band $op n-band * 17/9/09 * - moved to im__arith_binary*() * - renamed im_eor_vec() as im_eorimage_vec() for C++ sanity * 21/11/10 * - oop, constants are always (int) now, so (^-1) works for unsigned * types * 12/11/11 * - redo as a class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "binary.h" #include "unaryconst.h" typedef struct _VipsBoolean { VipsBinary parent_instance; VipsOperationBoolean operation; } VipsBoolean; typedef VipsBinaryClass VipsBooleanClass; G_DEFINE_TYPE( VipsBoolean, vips_boolean, VIPS_TYPE_BINARY ); static int vips_boolean_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsBinary *binary = (VipsBinary *) object; if( binary->left && vips_check_noncomplex( class->nickname, binary->left ) ) return( -1 ); if( binary->right && vips_check_noncomplex( class->nickname, binary->right ) ) return( -1 ); if( VIPS_OBJECT_CLASS( vips_boolean_parent_class )->build( object ) ) return( -1 ); return( 0 ); } #define LOOP( TYPE, OP ) { \ TYPE * restrict left = (TYPE *) in[0]; \ TYPE * restrict right = (TYPE *) in[1]; \ TYPE * restrict q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = left[x] OP right[x]; \ } #define FLOOP( TYPE, OP ) { \ TYPE * restrict left = (TYPE *) in[0]; \ TYPE * restrict right = (TYPE *) in[1]; \ int * restrict q = (int *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = ((int) left[x]) OP ((int) right[x]); \ } #define SWITCH( I, F, OP ) \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_UCHAR: I( unsigned char, OP ); break; \ case VIPS_FORMAT_CHAR: I( signed char, OP ); break; \ case VIPS_FORMAT_USHORT: I( unsigned short, OP ); break; \ case VIPS_FORMAT_SHORT: I( signed short, OP ); break; \ case VIPS_FORMAT_UINT: I( unsigned int, OP ); break; \ case VIPS_FORMAT_INT: I( signed int, OP ); break; \ case VIPS_FORMAT_FLOAT: F( float, OP ); break; \ case VIPS_FORMAT_DOUBLE: F( double, OP ); break;\ \ default: \ g_assert( 0 ); \ } static void vips_boolean_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsBoolean *boolean = (VipsBoolean *) arithmetic; VipsImage *im = arithmetic->ready[0]; const int sz = width * vips_image_get_bands( im ); int x; switch( boolean->operation ) { case VIPS_OPERATION_BOOLEAN_AND: SWITCH( LOOP, FLOOP, & ); break; case VIPS_OPERATION_BOOLEAN_OR: SWITCH( LOOP, FLOOP, | ); break; case VIPS_OPERATION_BOOLEAN_EOR: SWITCH( LOOP, FLOOP, ^ ); break; case VIPS_OPERATION_BOOLEAN_LSHIFT: SWITCH( LOOP, FLOOP, << ); break; case VIPS_OPERATION_BOOLEAN_RSHIFT: SWITCH( LOOP, FLOOP, >> ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type conversions for boolean. */ static const VipsBandFormat vips_boolean_format_table[10] = { /* UC C US S UI I F X D DX */ UC, C, US, S, UI, I, I, I, I, I, }; static void vips_boolean_class_init( VipsBooleanClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "boolean"; object_class->description = _( "boolean operation on two images" ); object_class->build = vips_boolean_build; aclass->process_line = vips_boolean_buffer; vips_arithmetic_set_format_table( aclass, vips_boolean_format_table ); VIPS_ARG_ENUM( class, "boolean", 200, _( "Operation" ), _( "boolean to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBoolean, operation ), VIPS_TYPE_OPERATION_BOOLEAN, VIPS_OPERATION_BOOLEAN_AND ); } static void vips_boolean_init( VipsBoolean *boolean ) { } static int vips_booleanv( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationBoolean operation, va_list ap ) { return( vips_call_split( "boolean", ap, left, right, out, operation ) ); } /** * vips_boolean: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @operation: boolean operation to perform * @...: %NULL-terminated list of optional named arguments * * Perform various boolean operations on pairs of images. * * The output image is the same format as the upcast input images for integer * types. Float types are cast to int before processing. Complex types are not * supported. * * If the images differ in size, the smaller image is enlarged to match the * larger by adding zero pixels along the bottom and right. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common format (see table * Smallest common format in * arithmetic). * * See also: vips_boolean_const(). * * Returns: 0 on success, -1 on error */ int vips_boolean( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationBoolean operation, ... ) { va_list ap; int result; va_start( ap, operation ); result = vips_booleanv( left, right, out, operation, ap ); va_end( ap ); return( result ); } /** * vips_andimage: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_AND on a pair of images. See * vips_boolean(). * * Returns: 0 on success, -1 on error */ int vips_andimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_booleanv( left, right, out, VIPS_OPERATION_BOOLEAN_AND, ap ); va_end( ap ); return( result ); } /** * vips_orimage: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_OR on a pair of images. See * vips_boolean(). * * Returns: 0 on success, -1 on error */ int vips_orimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_booleanv( left, right, out, VIPS_OPERATION_BOOLEAN_OR, ap ); va_end( ap ); return( result ); } /** * vips_eorimage: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_EOR on a pair of images. See * vips_boolean(). * * Returns: 0 on success, -1 on error */ int vips_eorimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_booleanv( left, right, out, VIPS_OPERATION_BOOLEAN_EOR, ap ); va_end( ap ); return( result ); } /** * vips_lshift: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_LSHIFT on a pair of images. See * vips_boolean(). * * Returns: 0 on success, -1 on error */ int vips_lshift( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_booleanv( left, right, out, VIPS_OPERATION_BOOLEAN_LSHIFT, ap ); va_end( ap ); return( result ); } /** * vips_rshift: * @left: left-hand input #VipsImage * @right: right-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_RSHIFT on a pair of images. See * vips_boolean(). * * Returns: 0 on success, -1 on error */ int vips_rshift( VipsImage *left, VipsImage *right, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_booleanv( left, right, out, VIPS_OPERATION_BOOLEAN_RSHIFT, ap ); va_end( ap ); return( result ); } typedef struct _VipsBooleanConst { VipsUnaryConst parent_instance; VipsOperationBoolean operation; } VipsBooleanConst; typedef VipsUnaryConstClass VipsBooleanConstClass; G_DEFINE_TYPE( VipsBooleanConst, vips_boolean_const, VIPS_TYPE_UNARY_CONST ); static int vips_boolean_const_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsUnary *unary = (VipsUnary *) object; VipsUnaryConst *uconst = (VipsUnaryConst *) object; if( unary->in && vips_check_noncomplex( class->nickname, unary->in ) ) return( -1 ); uconst->const_format = VIPS_FORMAT_INT; if( VIPS_OBJECT_CLASS( vips_boolean_const_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } #define LOOPC( TYPE, OP ) { \ TYPE *p = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ int *c = (int *) uconst->c_ready; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( b = 0; b < bands; b++, i++ ) \ q[i] = p[i] OP c[b]; \ } #define FLOOPC( TYPE, OP ) { \ TYPE *p = (TYPE *) in[0]; \ int *q = (int *) out; \ int *c = (int *) uconst->c_ready; \ \ for( i = 0, x = 0; x < width; x++ ) \ for( b = 0; b < bands; b++, i++ ) \ q[i] = ((int) p[i]) OP ((int) c[b]); \ } static void vips_boolean_const_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsUnaryConst *uconst = (VipsUnaryConst *) arithmetic; VipsBooleanConst *bconst = (VipsBooleanConst *) arithmetic; VipsImage *im = arithmetic->ready[0]; int bands = im->Bands; int i, x, b; switch( bconst->operation ) { case VIPS_OPERATION_BOOLEAN_AND: SWITCH( LOOPC, FLOOPC, & ); break; case VIPS_OPERATION_BOOLEAN_OR: SWITCH( LOOPC, FLOOPC, | ); break; case VIPS_OPERATION_BOOLEAN_EOR: SWITCH( LOOPC, FLOOPC, ^ ); break; case VIPS_OPERATION_BOOLEAN_LSHIFT: SWITCH( LOOPC, FLOOPC, << ); break; case VIPS_OPERATION_BOOLEAN_RSHIFT: SWITCH( LOOPC, FLOOPC, >> ); break; default: g_assert( 0 ); } } static void vips_boolean_const_class_init( VipsBooleanConstClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "boolean_const"; object_class->description = _( "boolean operations against a constant" ); object_class->build = vips_boolean_const_build; aclass->process_line = vips_boolean_const_buffer; vips_arithmetic_set_format_table( aclass, vips_boolean_format_table ); VIPS_ARG_ENUM( class, "boolean", 200, _( "Operation" ), _( "boolean to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBooleanConst, operation ), VIPS_TYPE_OPERATION_BOOLEAN, VIPS_OPERATION_BOOLEAN_AND ); } static void vips_boolean_const_init( VipsBooleanConst *boolean_const ) { } static int vips_boolean_constv( VipsImage *in, VipsImage **out, VipsOperationBoolean operation, double *c, int n, va_list ap ) { VipsArea *area_c; double *array; int result; int i; area_c = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), n ); array = (double *) area_c->data; for( i = 0; i < n; i++ ) array[i] = c[i]; result = vips_call_split( "boolean_const", ap, in, out, operation, area_c ); vips_area_unref( area_c ); return( result ); } /** * vips_boolean_const: * @in: input image * @out: output image * @operation: boolean operation to perform * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform various boolean operations on an image against an array of * constants. * * The output type is always uchar, with 0 for FALSE and 255 for TRUE. * * If the array of constants has just one element, that constant is used for * all image bands. If the array has more than one element and they have * the same number of elements as there are bands in the image, then * one array element is used for each band. If the arrays have more than one * element and the image only has a single band, the result is a many-band * image where each band corresponds to one array element. * * See also: vips_boolean(), vips_boolean_const1(). * * Returns: 0 on success, -1 on error */ int vips_boolean_const( VipsImage *in, VipsImage **out, VipsOperationBoolean operation, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_boolean_constv( in, out, operation, c, n, ap ); va_end( ap ); return( result ); } /** * vips_andimage_const: * @in: input image * @out: output image * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_AND on an image and an array of constants. * See vips_boolean_const(). * * See also: vips_boolean(), vips_boolean_const1(). * * Returns: 0 on success, -1 on error */ int vips_andimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_AND, c, n, ap ); va_end( ap ); return( result ); } /** * vips_orimage_const: * @in: input image * @out: output image * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_OR on an image and an array of constants. * See vips_boolean_const(). * * See also: vips_boolean(), vips_boolean_const1(). * * Returns: 0 on success, -1 on error */ int vips_orimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_OR, c, n, ap ); va_end( ap ); return( result ); } /** * vips_eorimage_const: * @in: input image * @out: output image * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_EOR on an image and an array of constants. * See vips_boolean_const(). * * See also: vips_boolean(), vips_boolean_const1(). * * Returns: 0 on success, -1 on error */ int vips_eorimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_EOR, c, n, ap ); va_end( ap ); return( result ); } /** * vips_lshift_const: * @in: input image * @out: output image * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_LSHIFT on an image and an array of constants. * See vips_boolean_const(). * * See also: vips_boolean(), vips_boolean_const1(). * * Returns: 0 on success, -1 on error */ int vips_lshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_LSHIFT, c, n, ap ); va_end( ap ); return( result ); } /** * vips_rshift_const: * @in: input image * @out: output image * @c: array of constants * @n: number of constants in @c * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_LSHIFT on an image and an array of constants. * See vips_boolean_const(). * * See also: vips_boolean(), vips_boolean_const1(). * * Returns: 0 on success, -1 on error */ int vips_rshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_RSHIFT, c, n, ap ); va_end( ap ); return( result ); } /** * vips_boolean_const1: * @in: input image * @out: output image * @boolean: boolean operation to perform * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform various boolean operations on an image with a single constant. See * vips_boolean_const(). * * See also: vips_boolean(), vips_boolean_const(). * * Returns: 0 on success, -1 on error */ int vips_boolean_const1( VipsImage *in, VipsImage **out, VipsOperationBoolean boolean, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_boolean_constv( in, out, boolean, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_andimage_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_AND on an image and a constant. * See vips_boolean_const1(). * * See also: vips_boolean(), vips_boolean_const(). * * Returns: 0 on success, -1 on error */ int vips_andimage_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_AND, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_orimage_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_OR on an image and a constant. * See vips_boolean_const1(). * * See also: vips_boolean(), vips_boolean_const(). * * Returns: 0 on success, -1 on error */ int vips_orimage_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_OR, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_eorimage_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_EOR on an image and a constant. * See vips_boolean_const1(). * * See also: vips_boolean(), vips_boolean_const(). * * Returns: 0 on success, -1 on error */ int vips_eorimage_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_EOR, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_lshift_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_LSHIFT on an image and a constant. * See vips_boolean_const1(). * * See also: vips_boolean(), vips_boolean_const(). * * Returns: 0 on success, -1 on error */ int vips_lshift_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_LSHIFT, &c, 1, ap ); va_end( ap ); return( result ); } /** * vips_rshift_const1: * @in: input image * @out: output image * @c: constant * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_RSHIFT on an image and a constant. * See vips_boolean_const1(). * * See also: vips_boolean(), vips_boolean_const(). * * Returns: 0 on success, -1 on error */ int vips_rshift_const1( VipsImage *in, VipsImage **out, double c, ... ) { va_list ap; int result; va_start( ap, c ); result = vips_boolean_constv( in, out, VIPS_OPERATION_BOOLEAN_RSHIFT, &c, 1, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/arithmetic/sign.c0000644000175000017500000001052612303140253014422 00000000000000/* im_sign.c * * 9/7/02 JC * - from im_cmulnorm * 9/9/09 * - gtkdoc, tidies * 6/11/11 * - redone as a class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "unary.h" typedef VipsUnary VipsSign; typedef VipsUnaryClass VipsSignClass; G_DEFINE_TYPE( VipsSign, vips_sign, VIPS_TYPE_UNARY ); #define CSIGN( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ TYPE * restrict q = (TYPE *) out; \ int x; \ \ for( x = 0; x < sz; x++ ) { \ TYPE re = p[0]; \ TYPE im = p[1]; \ double fac = sqrt( re * re + im * im ); \ \ p += 2; \ \ if( fac == 0.0 ) { \ q[0] = 0.0; \ q[1] = 0.0; \ } \ else { \ q[0] = re / fac; \ q[1] = im / fac; \ } \ \ q += 2; \ } \ } #define SIGN( TYPE ) { \ TYPE * restrict p = (TYPE *) in[0]; \ signed char * restrict q = (signed char *) out; \ int x; \ \ for( x = 0; x < sz; x++ ) { \ TYPE v = p[x]; \ \ if( v > 0 ) \ q[x] = 1; \ else if( v == 0 ) \ q[x] = 0; \ else \ q[x] = -1; \ } \ } static void vips_sign_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width ) { VipsUnary *unary = VIPS_UNARY( arithmetic ); const int bands = vips_image_get_bands( unary->in ); int sz = width * bands; switch( vips_image_get_format( unary->in ) ) { case VIPS_FORMAT_UCHAR: SIGN( unsigned char ); break; case VIPS_FORMAT_CHAR: SIGN( signed char ); break; case VIPS_FORMAT_USHORT: SIGN( unsigned short ); break; case VIPS_FORMAT_SHORT: SIGN( signed short ); break; case VIPS_FORMAT_UINT: SIGN( unsigned int ); break; case VIPS_FORMAT_INT: SIGN( signed int ); break; case VIPS_FORMAT_FLOAT: SIGN( float ); break; case VIPS_FORMAT_DOUBLE: SIGN( double ); break; case VIPS_FORMAT_COMPLEX: CSIGN( float ); break; case VIPS_FORMAT_DPCOMPLEX: CSIGN( double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static const VipsBandFormat vips_sign_format_table[10] = { /* UC C US S UI I F X D DX */ C, C, C, C, C, C, C, X, C, DX }; static void vips_sign_class_init( VipsSignClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsArithmeticClass *aclass = VIPS_ARITHMETIC_CLASS( class ); object_class->nickname = "sign"; object_class->description = _( "unit vector of pixel" ); aclass->process_line = vips_sign_buffer; vips_arithmetic_set_format_table( aclass, vips_sign_format_table ); } static void vips_sign_init( VipsSign *sign ) { } /** * vips_sign: * @in: input image * @out: output image * * Finds the unit vector in the direction of the pixel value. For non-complex * images, it returns a signed char image with values -1, 0, and 1 for negative, * zero and positive pixels. For complex images, it returns a * complex normalised to length 1. * * See also: vips_abs(). * * Returns: 0 on success, -1 on error */ int vips_sign( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "sign", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/Makefile.in0000644000175000017500000010306412303144055013236 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_CXX_TRUE@am__append_1 = @VIPS_CXX_LIBS@ @HAVE_INTROSPECTION_TRUE@am__append_2 = Vips-8.0.gir @HAVE_INTROSPECTION_TRUE@am__append_3 = $(gir_DATA) $(typelib_DATA) subdir = libvips DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ "$(DESTDIR)$(typelibdir)" LTLIBRARIES = $(lib_LTLIBRARIES) @ENABLE_CXX_TRUE@am__DEPENDENCIES_1 = cimg/libcimg.la am__DEPENDENCIES_2 = libvips_la_DEPENDENCIES = resample/libresample.la \ arithmetic/libarithmetic.la colour/libcolour.la \ conversion/libconversion.la convolution/libconvolution.la \ deprecated/libdeprecated.la $(am__DEPENDENCIES_1) \ foreign/libforeign.la freqfilt/libfreqfilt.la \ histogram/libhistogram.la inplace/libinplace.la \ iofuncs/libiofuncs.la morphology/libmorphology.la \ mosaicing/libmosaicing.la create/libcreate.la \ video/libvideo.la $(am__DEPENDENCIES_2) am_libvips_la_OBJECTS = libvips_la_OBJECTS = $(am_libvips_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libvips_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libvips_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libvips_la_SOURCES) $(nodist_EXTRA_libvips_la_SOURCES) DIST_SOURCES = $(libvips_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(gir_DATA) $(typelib_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = include foreign arithmetic resample colour conversion \ deprecated convolution cimg freqfilt histogram inplace iofuncs \ morphology mosaicing create video . DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ @ENABLE_CXX_FALSE@C_COMPILE_DIR = # only build in the cimg dir if C++ is enabled @ENABLE_CXX_TRUE@C_COMPILE_DIR = cimg @ENABLE_CXX_FALSE@C_DIST_DIR = cimg @ENABLE_CXX_TRUE@C_DIST_DIR = @ENABLE_CXX_FALSE@C_LIB = @ENABLE_CXX_TRUE@C_LIB = cimg/libcimg.la SUBDIRS = \ include \ foreign \ arithmetic \ resample \ colour \ conversion \ deprecated \ convolution \ $(C_COMPILE_DIR) \ freqfilt \ histogram \ inplace \ iofuncs \ morphology \ mosaicing \ create \ video \ . lib_LTLIBRARIES = libvips.la # empty means default to C linking libvips_la_SOURCES = # if we have C++ components enabled, make sure we link the top-level with c++ # # sadly the if/endif isn't enough to stop automake detecting a c++ link even # when c++ is disabled ... comment out this line if you have linking problems @ENABLE_CXX_TRUE@nodist_EXTRA_libvips_la_SOURCES = cimg/dummy2.cc # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end libvips_la_LIBADD = resample/libresample.la \ arithmetic/libarithmetic.la colour/libcolour.la \ conversion/libconversion.la convolution/libconvolution.la \ deprecated/libdeprecated.la $(C_LIB) foreign/libforeign.la \ freqfilt/libfreqfilt.la histogram/libhistogram.la \ inplace/libinplace.la iofuncs/libiofuncs.la \ morphology/libmorphology.la mosaicing/libmosaicing.la \ create/libcreate.la video/libvideo.la @VIPS_LIBS@ \ $(am__append_1) libvips_la_LDFLAGS = \ -no-undefined \ -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@ EXTRA_DIST = \ $(C_DIST_DIR) CLEANFILES = $(am__append_3) INTROSPECTION_GIRS = $(am__append_2) INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) # we can't get the _SOURCES lists from the subdirs directly, we get passed it # by configure instead @HAVE_INTROSPECTION_TRUE@introspection_sources = @vips_introspection_sources@ @HAVE_INTROSPECTION_TRUE@Vips_8_0_gir_INCLUDES = GObject-2.0 @HAVE_INTROSPECTION_TRUE@Vips_8_0_gir_CFLAGS = $(INCLUDES) -I${top_srcdir}/libvips/include @HAVE_INTROSPECTION_TRUE@Vips_8_0_gir_LIBS = libvips.la @HAVE_INTROSPECTION_TRUE@Vips_8_0_gir_FILES = $(introspection_sources) @HAVE_INTROSPECTION_TRUE@Vips_8_0_gir_SCANNERFLAGS = \ @HAVE_INTROSPECTION_TRUE@ --warn-all \ @HAVE_INTROSPECTION_TRUE@ --verbose \ @HAVE_INTROSPECTION_TRUE@ --identifier-prefix=Vips \ @HAVE_INTROSPECTION_TRUE@ --identifier-prefix=vips \ @HAVE_INTROSPECTION_TRUE@ --symbol-prefix=vips \ @HAVE_INTROSPECTION_TRUE@ --symbol-prefix=im \ @HAVE_INTROSPECTION_TRUE@ --symbol-prefix=im_ @HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0 @HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS) @HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0 @HAVE_INTROSPECTION_TRUE@typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) all: all-recursive .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libvips.la: $(libvips_la_OBJECTS) $(libvips_la_DEPENDENCIES) $(EXTRA_libvips_la_DEPENDENCIES) $(AM_V_CXXLD)$(libvips_la_LINK) -rpath $(libdir) $(libvips_la_OBJECTS) $(libvips_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy2.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< dummy2.lo: cimg/dummy2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dummy2.lo -MD -MP -MF $(DEPDIR)/dummy2.Tpo -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dummy2.Tpo $(DEPDIR)/dummy2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cimg/dummy2.cc' object='dummy2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dummy2.lo `test -f 'cimg/dummy2.cc' || echo '$(srcdir)/'`cimg/dummy2.cc mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-girDATA: $(gir_DATA) @$(NORMAL_INSTALL) @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(girdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(girdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(girdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(girdir)" || exit $$?; \ done uninstall-girDATA: @$(NORMAL_UNINSTALL) @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir) install-typelibDATA: $(typelib_DATA) @$(NORMAL_INSTALL) @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(typelibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(typelibdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(typelibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(typelibdir)" || exit $$?; \ done uninstall-typelibDATA: @$(NORMAL_UNINSTALL) @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(typelibdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(typelibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-girDATA install-typelibDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-typelibDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-girDATA \ install-html install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip install-typelibDATA \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-typelibDATA -include $(INTROSPECTION_MAKEFILE) # we make the vips8 API @HAVE_INTROSPECTION_TRUE@Vips-8.0.gir: libvips.la # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/Makefile.am0000644000175000017500000000501312303141142013212 00000000000000# only build in the cimg dir if C++ is enabled if ENABLE_CXX C_COMPILE_DIR = cimg C_DIST_DIR = C_LIB = cimg/libcimg.la else C_COMPILE_DIR = C_DIST_DIR = cimg C_LIB = endif SUBDIRS = \ include \ foreign \ arithmetic \ resample \ colour \ conversion \ deprecated \ convolution \ $(C_COMPILE_DIR) \ freqfilt \ histogram \ inplace \ iofuncs \ morphology \ mosaicing \ create \ video \ . lib_LTLIBRARIES = libvips.la # empty means default to C linking libvips_la_SOURCES = # if we have C++ components enabled, make sure we link the top-level with c++ # # sadly the if/endif isn't enough to stop automake detecting a c++ link even # when c++ is disabled ... comment out this line if you have linking problems if ENABLE_CXX nodist_EXTRA_libvips_la_SOURCES = cimg/dummy2.cc endif # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end libvips_la_LIBADD = \ resample/libresample.la \ arithmetic/libarithmetic.la \ colour/libcolour.la \ conversion/libconversion.la \ convolution/libconvolution.la \ deprecated/libdeprecated.la \ $(C_LIB) \ foreign/libforeign.la \ freqfilt/libfreqfilt.la \ histogram/libhistogram.la \ inplace/libinplace.la \ iofuncs/libiofuncs.la \ morphology/libmorphology.la \ mosaicing/libmosaicing.la \ create/libcreate.la \ video/libvideo.la \ @VIPS_LIBS@ if ENABLE_CXX libvips_la_LIBADD += @VIPS_CXX_LIBS@ endif libvips_la_LDFLAGS = \ -no-undefined \ -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@ EXTRA_DIST = \ $(C_DIST_DIR) CLEANFILES = -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) if HAVE_INTROSPECTION # we can't get the _SOURCES lists from the subdirs directly, we get passed it # by configure instead introspection_sources = @vips_introspection_sources@ # we make the vips8 API Vips-8.0.gir: libvips.la Vips_8_0_gir_INCLUDES = GObject-2.0 Vips_8_0_gir_CFLAGS = $(INCLUDES) -I${top_srcdir}/libvips/include Vips_8_0_gir_LIBS = libvips.la Vips_8_0_gir_FILES = $(introspection_sources) INTROSPECTION_GIRS += Vips-8.0.gir Vips_8_0_gir_SCANNERFLAGS = \ --warn-all \ --verbose \ --identifier-prefix=Vips \ --identifier-prefix=vips \ --symbol-prefix=vips \ --symbol-prefix=im \ --symbol-prefix=im_ girdir = $(datadir)/gir-1.0 gir_DATA = $(INTROSPECTION_GIRS) typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += $(gir_DATA) $(typelib_DATA) endif vips-7.38.5/libvips/cimg/0000755000175000017500000000000012303146330012162 500000000000000vips-7.38.5/libvips/cimg/cimg.cpp0000644000175000017500000001633012303140253013526 00000000000000/* Pass VIPS images through CImg * * JC, 15/10/07 * 29/4/10 * - oop, should be smalltile, probably * - tiny cleanups * - gtkdoc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /* CImg needs to call pthread directly, this is the preproc magic they * prefer. */ #if defined(sun) || defined(__sun) || defined(linux) || defined(__linux) \ || defined(__linux__) || defined(__CYGWIN__) || defined(BSD) || defined(__FreeBSD__) \ || defined(__OPENBSD__) || defined(__MACOSX__) || defined(__APPLE__) || defined(sgi) \ || defined(__sgi) #include #endif #include "CImg.h" using namespace cimg_library; /* Save params here. */ struct Greyc { IMAGE *in; IMAGE *out; IMAGE *mask; IMAGE **arry; int iterations; float amplitude; float sharpness; float anisotropy; float alpha; float sigma; float dl; float da; float gauss_prec; int interpolation; bool fast_approx; }; // copy part of a vips region into a cimg template static CImg * vips_to_cimg( REGION *in, Rect *area ) { IMAGE *im = in->im; CImg *img = new CImg( area->width, area->height, 1, im->Bands ); for( int y = 0; y < area->height; y++ ) { T *p = (T *) IM_REGION_ADDR( in, area->left, area->top + y ); for( int x = 0; x < area->width; x++ ) { for( int z = 0; z < im->Bands; z++ ) (*img)( x, y, z ) = p[z]; p += im->Bands; } } return( img ); } // write a CImg to a vips region // fill out->valid, img has pixels in img_rect template static void cimg_to_vips( CImg *img, Rect *img_rect, REGION *out ) { IMAGE *im = out->im; Rect *valid = &out->valid; g_assert( im_rect_includesrect( img_rect, valid ) ); int x_off = valid->left - img_rect->left; int y_off = valid->top - img_rect->top; for( int y = 0; y < valid->height; y++ ) { T *p = (T *) IM_REGION_ADDR( out, valid->left, valid->top + y ); for( int x = 0; x < valid->width; x++ ) { for( int z = 0; z < im->Bands; z++ ) p[z] = static_cast( (*img)( x + x_off, y + y_off, z ) ); p += im->Bands; } } } template static int greyc_gen( REGION *out, REGION **in, IMAGE **arry, Greyc *greyc ) { static const float gfact = (sizeof( T ) == 2) ? 1.0 / 256 : 1.0; static const int tile_border = 4; Rect *ir = &out->valid; Rect need; Rect image; CImg *img; CImg *msk; need = *ir; im_rect_marginadjust( &need, tile_border ); image.left = 0; image.top = 0; image.width = in[0]->im->Xsize; image.height = in[0]->im->Ysize; im_rect_intersectrect( &need, &image, &need ); if( im_prepare( in[0], &need ) ) return( -1 ); if( in[1] && im_prepare( in[1], &need ) ) return( -1 ); img = NULL; msk = NULL; try { img = vips_to_cimg( in[0], &need ); if( in[1] ) msk = vips_to_cimg( in[1], &need ); else // empty mask msk = new CImg(); for( int i = 0; i < greyc->iterations; i++ ) img->blur_anisotropic( *msk, greyc->amplitude, greyc->sharpness, greyc->anisotropy, greyc->alpha, greyc->sigma, greyc->dl, greyc->da, greyc->gauss_prec, greyc->interpolation, greyc->fast_approx, gfact ); cimg_to_vips( img, &need, out ); } catch( CImgException e ) { if( img ) delete( img ); if( msk ) delete( msk ); im_error( "GREYCstoration", "%s", e.message ); return( -1 ); } if( img ) delete( img ); if( msk ) delete( msk ); return( 0 ); } // Hmm, strange double-cast needed typedef int (*generate_fn)( REGION *out, REGION **in, IMAGE **im, Greyc *greyc ); // as a plain C function /** * im_greyc_mask: * @in: input image * @out: output image * @mask: input mask * @iterations: number of iterations to perform (eg. 1) * @amplitude: scaling factor (eg. 40) * @sharpness: degree of sharpening to apply (eg. 0.9) * @anisotropy: how much to blur along lines (eg. 0.15) * @alpha: blur by this much before calculating geometry (eg. 0.6) * @sigma: blur geometry by this much (eg. 1.1) * @dl: spatial integration step (eg. 0.8) * @da: angular integration step (eg. 30) * @gauss_prec: precision (eg. 2) * @interpolation: interpolation (eg. 0 for nearest-neighbour) * * This operation calls the blur_anisotropic() method of the CImag image * processing library. It is handy for denoising images and for upscaling. * * See also: im_conv(). * * Returns: 0 on success, -1 on error */ int im_greyc_mask( IMAGE *in, IMAGE *out, IMAGE *mask, int iterations, float amplitude, float sharpness, float anisotropy, float alpha, float sigma, float dl, float da, float gauss_prec, int interpolation, int fast_approx ) { IMAGE **arry; Greyc *greyc; if( im_piocheck( in, out ) || im_check_uncoded( "im_greyc_mask", in ) || im_check_u8or16orf( "im_greyc_mask", in ) ) return( -1 ); if( mask ) { if( im_pincheck( mask ) || im_check_uncoded( "im_greyc_mask", mask ) || im_check_size_same( "im_greyc_mask", in, mask ) || im_check_format( "im_greyc_mask", mask, IM_BANDFMT_UCHAR ) ) return( -1 ); } if( im_cp_desc( out, in ) || !(arry = im_allocate_input_array( out, in, mask, NULL )) || !(greyc = IM_NEW( out, Greyc )) || im_demand_hint( out, IM_SMALLTILE, in, NULL ) ) return( -1 ); greyc->in = in; greyc->out = out; greyc->mask = mask; greyc->arry = arry; greyc->iterations = iterations; greyc->amplitude = amplitude; greyc->sharpness = sharpness; greyc->anisotropy = anisotropy; greyc->alpha = alpha; greyc->sigma = sigma; greyc->dl = dl; greyc->da = da; greyc->gauss_prec = gauss_prec; greyc->interpolation = interpolation; greyc->fast_approx = fast_approx; switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: if( im_generate( out, im_start_many, // double-cast to give g++ enough context to expand the // template correctly (im_generate_fn) ( (generate_fn) greyc_gen), im_stop_many, arry, greyc ) ) return( -1 ); break; case IM_BANDFMT_USHORT: if( im_generate( out, im_start_many, (im_generate_fn) ( (generate_fn) greyc_gen), im_stop_many, arry, greyc ) ) return( -1 ); break; case IM_BANDFMT_FLOAT: if( im_generate( out, im_start_many, (im_generate_fn) ( (generate_fn) greyc_gen), im_stop_many, arry, greyc ) ) return( -1 ); break; default: g_assert( 0 ); } return( 0 ); } vips-7.38.5/libvips/cimg/dummy2.cc0000644000175000017500000000025512303140253013626 00000000000000/* mac os x libtool needs to link libraries containing c++ (eg. cimg) with * g++ ... force this with a dummy c++ file at the top level */ const int im__dummy_value = 42; vips-7.38.5/libvips/cimg/Makefile.in0000644000175000017500000005615112303144055014161 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/cimg DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcimg_la_LIBADD = am_libcimg_la_OBJECTS = cimg_dispatch.lo cimg.lo libcimg_la_OBJECTS = $(am_libcimg_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libcimg_la_SOURCES) DIST_SOURCES = $(libcimg_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libcimg.la libcimg_la_SOURCES = \ CImg.h \ cimg_dispatch.c \ cimg.cpp @OS_WIN32_FALSE@AM_CPPFLAGS = -Dcimg_strict -Dcimg_OS=1 \ @OS_WIN32_FALSE@ -Dcimg_display_type=0 \ @OS_WIN32_FALSE@ -DLOCALEDIR=\""$(LOCALEDIR)"\" \ @OS_WIN32_FALSE@ -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ \ @OS_WIN32_FALSE@ @VIPS_INCLUDES@ $(am__empty) # various cimg settings as well # we need to change these a bit for win32 @OS_WIN32_TRUE@AM_CPPFLAGS = -Dcimg_strict -Dcimg_OS=0 \ @OS_WIN32_TRUE@ -Dcimg_display_type=0 \ @OS_WIN32_TRUE@ -DLOCALEDIR=\""$(LOCALEDIR)"\" \ @OS_WIN32_TRUE@ -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ \ @OS_WIN32_TRUE@ @VIPS_INCLUDES@ $(am__empty) # used by the final libvips link rather than us EXTRA_DIST = dummy2.cc all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/cimg/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/cimg/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcimg.la: $(libcimg_la_OBJECTS) $(libcimg_la_DEPENDENCIES) $(EXTRA_libcimg_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libcimg_la_OBJECTS) $(libcimg_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cimg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cimg_dispatch.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/cimg/Makefile.am0000644000175000017500000000105312303140253014133 00000000000000noinst_LTLIBRARIES = libcimg.la libcimg_la_SOURCES = \ CImg.h \ cimg_dispatch.c \ cimg.cpp # various cimg settings as well # we need to change these a bit for win32 if OS_WIN32 AM_CPPFLAGS = \ -Dcimg_strict \ -Dcimg_OS=0 \ -Dcimg_display_type=0 \ -DLOCALEDIR=\""$(LOCALEDIR)"\" else AM_CPPFLAGS = \ -Dcimg_strict \ -Dcimg_OS=1 \ -Dcimg_display_type=0 \ -DLOCALEDIR=\""$(LOCALEDIR)"\" endif # used by the final libvips link rather than us EXTRA_DIST = dummy2.cc AM_CPPFLAGS += -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/cimg/CImg.h0000644000175000017500000437657612303140253013124 00000000000000/* # # File : CImg.h # # Description : The C++ Template Image Processing Library # ( http://cimg.sourceforge.net ) # # Copyright : David Tschumperle # ( http://www.greyc.ensicaen.fr/~dtschump/ ) # # License : CeCILL-C # # This software is governed by the CeCILL-C license under French law and # abiding by the rules of distribution of free software. You can use, # modify and or redistribute the software under the terms of the CeCILL-C # license as circulated by CEA, CNRS and INRIA at the following URL # "http://www.cecill.info". # # As a counterpart to the access to the source code and rights to copy, # modify and redistribute granted by the license, users are provided only # with a limited warranty and the software's author, the holder of the # economic rights, and the successive licensors have only limited # liability. # # In this respect, the user's attention is drawn to the risks associated # with loading, using, modifying and/or developing or reproducing the # software by the user in light of its specific status of free software, # that may mean that it is complicated to manipulate, and that also # therefore means that it is reserved for developers and experienced # professionals having in-depth computer knowledge. Users are therefore # encouraged to load and test the software's suitability as regards their # requirements in conditions enabling the security of their systems and/or # data to be ensured and, more generally, to use and operate it in the # same conditions as regards security. # # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-C license and that you accept its terms. # */ #ifndef cimg_version #define cimg_version 1.20 // Detect Microsoft VC++ 6.0 compiler to get some workarounds afterwards. #if defined(_MSC_VER) && _MSC_VER<1300 #define cimg_use_visualcpp6 #endif // Avoid strange 'deprecated' warning messages with Visual C++ .NET. #if defined(_MSC_VER) && _MSC_VER>=1300 #define _CRT_SECURE_NO_DEPRECATE 1 #define _CRT_NONSTDC_NO_DEPRECATE 1 #endif // Standard C++ includes. #include #include #include #include #include #include // Overcome VisualC++ 6.0 compilers namespace 'std::' bug. #ifdef cimg_use_visualcpp6 #define std #endif /* # # Set CImg configuration flags. # # If compilation flags are not adapted to your system, # you may override their values, before including # the header file "CImg.h" (use the #define directive). # */ // Try to detect the current system and set value of 'cimg_OS'. #ifndef cimg_OS #if defined(sun) || defined(__sun) || defined(linux) || defined(__linux) \ || defined(__linux__) || defined(__CYGWIN__) || defined(BSD) || defined(__FreeBSD__) \ || defined(__OPENBSD__) || defined(__MACOSX__) || defined(__APPLE__) || defined(sgi) \ || defined(__sgi) // Unix-like (Linux, Solaris, BSD, MacOSX, Irix,...). #define cimg_OS 1 #ifndef cimg_display_type #define cimg_display_type 1 #endif #ifndef cimg_color_terminal #define cimg_color_terminal #endif #elif defined(_WIN32) || defined(__WIN32__) // Windows. #define cimg_OS 2 #ifndef cimg_display_type #define cimg_display_type 2 #endif #else // Unknown configuration : ask for minimal dependencies (no display). #define cimg_OS 0 #ifndef cimg_display_type #define cimg_display_type 0 #endif #endif #endif // Debug configuration. // // Set 'cimg_debug' to : 0 to remove debug messages (exceptions are still thrown anyway). // 1 to display debug messages on standard error output (console). // 2 to display debug messages with modal windows (default behavior). // 3 to do as 2 + add extra memory access warnings (may slow down the code) #ifndef cimg_debug #define cimg_debug 2 #endif // Allow compatibility with older CImg versions. // // Define 'cimg_strict' to avoid keeping the compatibility with older code #ifndef cimg_strict #define CImgl CImgList #define cimgl_map cimglist_for #define cimglist_map cimglist_for #define cimg_map cimg_for #define cimg_mapoff cimg_foroff #define cimg_mapX cimg_forX #define cimg_mapY cimg_forY #define cimg_mapZ cimg_forZ #define cimg_mapV cimg_forV #define cimg_mapXY cimg_forXY #define cimg_mapXZ cimg_forXZ #define cimg_mapXV cimg_forXV #define cimg_mapYZ cimg_forYZ #define cimg_mapYV cimg_forYV #define cimg_mapZV cimg_forZV #define cimg_mapXYZ cimg_forXYZ #define cimg_mapXYV cimg_forXYV #define cimg_mapXZV cimg_forXZV #define cimg_mapYZV cimg_forYZV #define cimg_mapXYZV cimg_forXYZV #define cimg_imapX cimg_for_insideX #define cimg_imapY cimg_for_insideY #define cimg_imapZ cimg_for_insideZ #define cimg_imapV cimg_for_insideV #define cimg_imapXY cimg_for_insideXY #define cimg_imapXYZ cimg_for_insideXYZ #define cimg_bmapX cimg_for_borderX #define cimg_bmapY cimg_for_borderY #define cimg_bmapZ cimg_for_borderZ #define cimg_bmapV cimg_for_borderV #define cimg_bmapXY cimg_for_borderXY #define cimg_bmapXYZ cimg_for_borderXYZ #define cimg_2mapX cimg_for2X #define cimg_2mapY cimg_for2Y #define cimg_2mapZ cimg_for2Z #define cimg_2mapXY cimg_for2XY #define cimg_2mapXZ cimg_for2XZ #define cimg_2mapYZ cimg_for2YZ #define cimg_2mapXYZ cimg_for2XYZ #define cimg_3mapX cimg_for3X #define cimg_3mapY cimg_for3Y #define cimg_3mapZ cimg_for3Z #define cimg_3mapXY cimg_for3XY #define cimg_3mapXZ cimg_for3XZ #define cimg_3mapYZ cimg_for3YZ #define cimg_3mapXYZ cimg_for3XYZ #define cimg_4mapX cimg_for4X #define cimg_4mapY cimg_for4Y #define cimg_4mapZ cimg_for4Z #define cimg_4mapXY cimg_for4XY #define cimg_4mapXZ cimg_for4XZ #define cimg_4mapYZ cimg_for4YZ #define cimg_4mapXYZ cimg_for4XYZ #define cimg_5mapX cimg_for5X #define cimg_5mapY cimg_for5Y #define cimg_5mapZ cimg_for5Z #define cimg_5mapXY cimg_for5XY #define cimg_5mapXZ cimg_for5XZ #define cimg_5mapYZ cimg_for5YZ #define cimg_5mapXYZ cimg_for5XYZ #define cimg_map2x2x1 cimg_for2x2 #define cimg_map3x3x1 cimg_for3x3 #define cimg_map4x4x1 cimg_for4x4 #define cimg_map5x5x1 cimg_for5x5 #define cimg_map2x2 cimg_for2x2 #define cimg_map3x3 cimg_for3x3 #define cimg_map4x4 cimg_for4x4 #define cimg_map5x5 cimg_for5x5 #define cimg_map3x3x3 cimg_for3x3x3 #define cimg_map2x2x2 cimg_for2x2x2 #define CImg_2x2x1 CImg_2x2 #define CImg_3x3x1 CImg_3x3 #define CImg_4x4x1 CImg_4x4 #define CImg_5x5x1 CImg_5x5 #define scroll translate #define cimg_convert_path cimg_imagemagick_path #define load_convert load_imagemagick #define save_convert save_imagemagick #endif // Architecture-dependent includes. #if cimg_OS==1 #include #include #elif cimg_OS==2 #include // Discard unuseful macros in windows.h // to allow compilation with VC++ 6.0. #ifdef min #undef min #undef max #undef abs #endif #endif // Display-dependent includes. #if cimg_display_type==1 #include #include #include #include #ifdef cimg_use_xshm #include #include #include #endif #ifdef cimg_use_xrandr #include #endif #endif // Configuration for native PNG and JPEG support // // Define 'cimg_use_png', 'cimg_use_jpeg' or 'cimg_use_tiff' to enable native PNG, JPEG or TIFF files support. // This requires you link your code with the zlib/png, jpeg or tiff libraries. // Without these libraries, PNG,JPEG and TIFF support will be done by the Image Magick's 'convert' tool, // or byt the GraphicsMagick 'gm' tool if installed // (this is the case on most unix plateforms). #ifdef cimg_use_png extern "C" { #include "png.h" } #endif #ifdef cimg_use_jpeg extern "C" { #include "jpeglib.h" } #endif #ifdef cimg_use_tiff extern "C" { #include "tiffio.h" } #endif #ifdef cimg_use_magick #include "Magick++.h" #endif #ifdef cimg_use_fftw3 extern "C" { #include "fftw3.h" } #endif /* # # # Define some useful macros. Macros of the CImg Library are prefixed by 'cimg_' # Documented macros below may be safely used in your own code # (particularly useful for option parsing, image loops and neighborhoods). # # */ // Macros used to describe the program usage, and retrieve command line arguments // (See corresponding module 'Retrieving command line arguments' in the generated documentation). #define cimg_usage(usage) cimg_library::cimg::option((char*)0,argc,argv,(char*)0,usage) #define cimg_help(str) cimg_library::cimg::option((char*)0,argc,argv,str,(char*)0) #define cimg_option(name,defaut,usage) cimg_library::cimg::option(name,argc,argv,defaut,usage) // Macros used for neighborhood definitions and manipulations. // (see module 'Using Image Loops' in the generated documentation). #define CImg_2(I,T) T I##cc,I##nc=0 #define CImg_2x2(I,T) T I##cc,I##nc=0,I##cn,I##nn=0 #define CImg_3(I,T) T I##pp,I##cp,I##np=0 #define CImg_3x3(I,T) T I##pp,I##cp,I##np=0,I##pc,I##cc,I##nc=0,I##pn,I##cn,I##nn=0 #define CImg_4(I,T) T I##pp,I##cp,I##np=0,I##ap=0 #define CImg_4x4(I,T) T I##pp,I##cp,I##np=0,I##ap=0, \ I##pc,I##cc,I##nc=0,I##ac=0, \ I##pn,I##cn,I##nn=0,I##an=0, \ I##pa,I##ca,I##na=0,I##aa=0 #define CImg_5(I,T) T I##bb,I##pb,I##cb,I##nb=0,I##ab=0 #define CImg_5x5(I,T) T I##bb,I##pb,I##cb,I##nb=0,I##ab=0, \ I##bp,I##pp,I##cp,I##np=0,I##ap=0, \ I##bc,I##pc,I##cc,I##nc=0,I##ac=0, \ I##bn,I##pn,I##cn,I##nn=0,I##an=0, \ I##ba,I##pa,I##ca,I##na=0,I##aa=0 #define CImg_2x2x2(I,T) T I##ccc,I##ncc=0,I##cnc,I##nnc=0, \ I##ccn,I##ncn=0,I##cnn,I##nnn=0 #define CImg_3x3x3(I,T) T I##ppp,I##cpp,I##npp=0,I##pcp,I##ccp,I##ncp=0,I##pnp,I##cnp,I##nnp=0, \ I##ppc,I##cpc,I##npc=0,I##pcc,I##ccc,I##ncc=0,I##pnc,I##cnc,I##nnc=0, \ I##ppn,I##cpn,I##npn=0,I##pcn,I##ccn,I##ncn=0,I##pnn,I##cnn,I##nnn=0 #define CImg_2x2_ref(I,T,tab) T &I##cc=(tab)[0],&I##nc=(tab)[1],&I##cn=(tab)[2],&I##nn=(tab)[3] #define CImg_3x3_ref(I,T,tab) T &I##pp=(tab)[0],&I##cp=(tab)[1],&I##np=(tab)[2], \ &I##pc=(tab)[3],&I##cc=(tab)[4],&I##nc=(tab)[5], \ &I##pn=(tab)[6],&I##cn=(tab)[7],&I##nn=(tab)[8] #define CImg_4x4_ref(I,T,tab) T &I##pp=(tab)[0],&I##cp=(tab)[1],&I##np=(tab)[2],&I##ap=(tab)[3], \ &I##pc=(tab)[4],&I##cc=(tab)[5],&I##nc=(tab)[6],&I##ap=(tab)[7], \ &I##pn=(tab)[8],&I##cn=(tab)[9],&I##nn=(tab)[10],&I##aa=(tab)[11], \ &I##pa=(tab)[12],&I##ca=(tab)[13],&I##na=(tab)[14],&I##aa=(tab)[15] #define CImg_5x5_ref(I,T,tab) T &I##bb=(tab)[0],&I##pb=(tab)[1],&I##cb=(tab)[2],&I##nb=(tab)[3],&I##ab=(tab)[4], \ &I##bp=(tab)[5],&I##pp=(tab)[6],&I##cp=(tab)[7],&I##np=(tab)[8],&I##ap=(tab)[9], \ &I##bc=(tab)[10],&I##pc=(tab)[11],&I##cc=(tab)[12],&I##nc=(tab)[13],&I##ac=(tab)[14], \ &I##bn=(tab)[15],&I##pn=(tab)[16],&I##cn=(tab)[17],&I##nn=(tab)[18],&I##an=(tab)[19], \ &I##ba=(tab)[20],&I##pa=(tab)[21],&I##ca=(tab)[22],&I##na=(tab)[23],&I##aa=(tab)[24] #define CImg_2x2x2_ref(I,T,tab) T &I##ccc=(tab)[0],&I##ncc=(tab)[1],&I##cnc=(tab)[2],&I##nnc=(tab)[3], \ &I##ccn=(tab)[4],&I##ncn=(tab)[5],&I##cnn=(tab)[6],&I##nnn=(tab)[7] #define CImg_3x3x3_ref(I,T,tab) T &I##ppp=(tab)[0],&I##cpp=(tab)[1],&I##npp=(tab)[2], \ &I##pcp=(tab)[3],&I##ccp=(tab)[4],&I##ncp=(tab)[5], \ &I##pnp=(tab)[6],&I##cnp=(tab)[7],&I##nnp=(tab)[8], \ &I##ppc=(tab)[9],&I##cpc=(tab)[10],&I##npc=(tab)[11], \ &I##pcc=(tab)[12],&I##ccc=(tab)[13],&I##ncc=(tab)[14], \ &I##pnc=(tab)[15],&I##cnc=(tab)[16],&I##nnc=(tab)[17], \ &I##ppn=(tab)[18],&I##cpn=(tab)[19],&I##npn=(tab)[20], \ &I##pcn=(tab)[21],&I##ccn=(tab)[22],&I##ncn=(tab)[23], \ &I##pnn=(tab)[24],&I##cnn=(tab)[25],&I##nnn=(tab)[26] #define cimg_copy2x2(J,I) I##cc=J##cc, I##nc=J##nc, I##cn=J##cn, I##nn=J##nn #define cimg_copy3x3(J,I) I##pp=J##pp, I##cp=J##cp, I##np=J##np, \ I##pc=J##pc, I##cc=J##cc, I##nc=J##nc, \ I##pn=J##pn, I##cn=J##cn, I##nn=J##nn #define cimg_copy5x5(J,I) I##bb=J##bb, I##pb=J##pb, I##cb=J##cb, I##nb=J##nb, I##ab=J##ab, \ I##bp=J##bp, I##pp=J##pp, I##cp=J##cp, I##np=J##np, I##ap=J##ap, \ I##bc=J##bc, I##pc=J##pc, I##cc=J##cc, I##nc=J##nc, I##ac=J##ac, \ I##bn=J##bn, I##pn=J##pn, I##cn=J##cn, I##nn=J##nn, I##an=J##an, \ I##ba=J##ba, I##pa=J##pa, I##ca=J##ca, I##na=J##na, I##aa=J##aa #define cimg_squaresum2x2(I) ( I##cc*I##cc + I##nc*I##nc + I##cn*I##cn + I##nn*I##nn ) #define cimg_squaresum3x3(I) ( I##pp*I##pp + I##cp*I##cp + I##np*I##np + \ I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + \ I##pn*I##pn + I##cn*I##cn + I##nn*I##nn ) #define cimg_squaresum4x4(I) ( I##pp*I##pp + I##cp*I##cp + I##np*I##np + I##ap*I##ap + \ I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + I##ac*I##ac + \ I##pn*I##pn + I##cn*I##cn + I##nn*I##nn + I##an*I##an + \ I##pa*I##pa + I##ca*I##ca + I##na*I##na + I##aa*I##aa ) #define cimg_squaresum5x5(I) ( I##bb*I##bb + I##pb*I##pb + I##cb*I##cb + I##nb*I##nb + I##ab*I##ab + \ I##bp*I##bp + I##pp*I##pp + I##cp*I##cp + I##np*I##np + I##ap*I##ap + \ I##bc*I##bc + I##pc*I##pc + I##cc*I##cc + I##nc*I##nc + I##ac*I##ac + \ I##bn*I##bn + I##pn*I##pn + I##cn*I##cn + I##nn*I##nn + I##an*I##an + \ I##ba*I##ba + I##pa*I##pa + I##ca*I##ca + I##na*I##na + I##aa*I##aa ) #define cimg_squaresum2x2x2(I) ( I##ccc*I##ccc + I##ncc*I##ncc + I##cnc*I##cnc + I##nnc*I##nnc + \ I##ccn*I##ccn + I##ncn*I##ncn + I##cnn*I##cnn + I##nnn*I##nnn ) #define cimg_squaresum3x3x3(I) ( I##ppp*I##ppp + I##cpp*I##cpp + I##npp*I##npp + \ I##pcp*I##pcp + I##ccp*I##ccp + I##ncp*I##ncp + \ I##pnp*I##pnp + I##cnp*I##cnp + I##nnp*I##nnp + \ I##ppc*I##ppc + I##cpc*I##cpc + I##npc*I##npc + \ I##pcc*I##pcc + I##ccc*I##ccc + I##ncc*I##ncc + \ I##pnc*I##pnc + I##cnc*I##cnc + I##nnc*I##nnc + \ I##ppn*I##ppn + I##cpn*I##cpn + I##npn*I##npn + \ I##pcn*I##pcn + I##ccn*I##ccn + I##ncn*I##ncn + \ I##pnn*I##pnn + I##cnn*I##cnn + I##nnn*I##nnn ) #define cimg_corr2x2(I,m) ( I##cc*(m)(0,0)+I##nc*(m)(1,0)+I##cn*(m)(0,1)+I##nn*(m)(1,1) ) #define cimg_corr3x3(I,m) ( I##pp*(m)(0,0)+I##cp*(m)(1,0)+I##np*(m)(2,0) + \ I##pc*(m)(0,1)+I##cc*(m)(1,1)+I##nc*(m)(2,1) + \ I##pn*(m)(0,2)+I##cn*(m)(1,2)+I##nn*(m)(2,2) ) #define cimg_corr4x4(I,m) ( I##pp*(m)(0,0)+I##cp*(m)(1,0)+I##np*(m)(2,0)+I##ap*(m)(3,0) + \ I##pc*(m)(0,1)+I##cc*(m)(1,1)+I##nc*(m)(2,1)+I##ac*(m)(3,1) + \ I##pn*(m)(0,2)+I##cn*(m)(1,2)+I##nn*(m)(2,2)+I##an*(m)(3,2) + \ I##pa*(m)(0,3)+I##ca*(m)(1,3)+I##na*(m)(2,3)+I##aa*(m)(3,3) ) #define cimg_corr5x5(I,m) ( I##bb*(m)(0,0)+I##pb*(m)(1,0)+I##cb*(m)(2,0)+I##nb*(m)(3,0)+I##ab*(m)(4,0) + \ I##bp*(m)(0,1)+I##pp*(m)(1,1)+I##cp*(m)(2,1)+I##np*(m)(3,1)+I##ap*(m)(4,1) + \ I##bc*(m)(0,2)+I##pc*(m)(1,2)+I##cc*(m)(2,2)+I##nc*(m)(3,2)+I##ac*(m)(4,2) + \ I##bn*(m)(0,3)+I##pn*(m)(1,3)+I##cn*(m)(2,3)+I##nn*(m)(3,3)+I##an*(m)(4,3) + \ I##ba*(m)(0,4)+I##pa*(m)(1,4)+I##ca*(m)(2,4)+I##na*(m)(3,4)+I##aa*(m)(4,4) ) #define cimg_corr2x2x2(I,m) ( I##ccc*(m)(0,0,0)+I##ncc*(m)(1,0,0)+I##cnc*(m)(0,1,0)+I##nnc*(m)(1,1,0) + \ I##ccn*(m)(0,0,1)+I##ncn*(m)(1,0,1)+I##cnn*(m)(0,1,1)+I##nnn*(m)(1,1,1) ) #define cimg_corr3x3x3(I,m) ( I##ppp*(m)(0,0,0)+I##cpp*(m)(1,0,0)+I##npp*(m)(2,0,0) + \ I##pcp*(m)(0,1,0)+I##ccp*(m)(1,1,0)+I##ncp*(m)(2,1,0) + \ I##pnp*(m)(0,2,0)+I##cnp*(m)(1,2,0)+I##nnp*(m)(2,2,0) + \ I##ppc*(m)(0,0,1)+I##cpc*(m)(1,0,1)+I##npc*(m)(2,0,1) + \ I##pcc*(m)(0,1,1)+I##ccc*(m)(1,1,1)+I##ncc*(m)(2,1,1) + \ I##pnc*(m)(0,2,1)+I##cnc*(m)(1,2,1)+I##nnc*(m)(2,2,1) + \ I##ppn*(m)(0,0,2)+I##cpn*(m)(1,0,2)+I##npn*(m)(2,0,2) + \ I##pcn*(m)(0,1,2)+I##ccn*(m)(1,1,2)+I##ncn*(m)(2,1,2) + \ I##pnn*(m)(0,2,2)+I##cnn*(m)(1,2,2)+I##nnn*(m)(2,2,2) ) #define cimg_conv2x2(I,m) ( I##cc*(m)(1,1)+I##nc*(m)(0,1)+I##cn*(m)(1,0)+I##nn*(m)(0,0) ) #define cimg_conv3x3(I,m) ( I##pp*(m)(2,2)+I##cp*(m)(1,2)+I##np*(m)(0,2) + \ I##pc*(m)(2,1)+I##cc*(m)(1,1)+I##nc*(m)(0,1) + \ I##pn*(m)(2,0)+I##cn*(m)(1,0)+I##nn*(m)(0,0) ) #define cimg_conv4x4(I,m) ( I##pp*(m)(3,3)+I##cp*(m)(2,3)+I##np*(m)(1,3)+I##ap*(m)(0,3) + \ I##pc*(m)(3,2)+I##cc*(m)(2,2)+I##nc*(m)(1,2)+I##ac*(m)(0,2) + \ I##pn*(m)(3,1)+I##cn*(m)(2,1)+I##nn*(m)(1,1)+I##an*(m)(0,1) + \ I##pa*(m)(3,0)+I##ca*(m)(2,0)+I##na*(m)(1,0)+I##aa*(m)(0,0) ) #define cimg_conv5x5(I,m) ( I##bb*(m)(4,4)+I##pb*(m)(3,4)+I##cb*(m)(2,4)+I##nb*(m)(1,4)+I##ab*(m)(0,4) + \ I##bp*(m)(4,3)+I##pp*(m)(3,3)+I##cp*(m)(2,3)+I##np*(m)(1,3)+I##ap*(m)(0,3) + \ I##bc*(m)(4,2)+I##pc*(m)(3,2)+I##cc*(m)(2,2)+I##nc*(m)(1,2)+I##ac*(m)(0,2) + \ I##bn*(m)(4,1)+I##pn*(m)(3,1)+I##cn*(m)(2,1)+I##nn*(m)(1,1)+I##an*(m)(0,1) + \ I##ba*(m)(4,0)+I##pa*(m)(3,0)+I##ca*(m)(2,0)+I##na*(m)(1,0)+I##aa*(m)(0,0) ) #define cimg_conv2x2x2(I,m) ( I##ccc*(m)(1,1,1)+I##ncc*(m)(0,1,1)+I##cnc*(m)(1,0,1)+I##nnc*(m)(0,0,1) + \ I##ccn*(m)(1,1,0)+I##ncn*(m)(0,1,0)+I##cnn*(m)(1,0,0)+I##nnn*(m)(0,0,0) ) #define cimg_conv3x3x3(I,m) ( I##ppp*(m)(2,2,2)+I##cpp*(m)(1,2,2)+I##npp*(m)(0,2,2) + \ I##pcp*(m)(2,1,2)+I##ccp*(m)(1,1,2)+I##ncp*(m)(0,1,2) + \ I##pnp*(m)(2,0,2)+I##cnp*(m)(1,0,2)+I##nnp*(m)(0,0,2) + \ I##ppc*(m)(2,2,1)+I##cpc*(m)(1,2,1)+I##npc*(m)(0,2,1) + \ I##pcc*(m)(2,1,1)+I##ccc*(m)(1,1,1)+I##ncc*(m)(0,1,1) + \ I##pnc*(m)(2,0,1)+I##cnc*(m)(1,0,1)+I##nnc*(m)(0,0,1) + \ I##ppn*(m)(2,2,0)+I##cpn*(m)(1,2,0)+I##npn*(m)(0,2,0) + \ I##pcn*(m)(2,1,0)+I##ccn*(m)(1,1,0)+I##ncn*(m)(0,1,0) + \ I##pnn*(m)(2,0,0)+I##cnn*(m)(1,0,0)+I##nnn*(m)(0,0,0) ) #define cimg_get2x2(img,x,y,z,v,I) \ I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), \ I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v) #define cimg_get3x3(img,x,y,z,v,I) \ I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), \ I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), \ I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v) #define cimg_get4x4(img,x,y,z,v,I) \ I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), I##ap=(img)(_a##x,_p##y,z,v), \ I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), I##ac=(img)(_a##x, y,z,v), \ I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v), I##an=(img)(_a##x,_n##y,z,v), \ I##pa=(img)(_p##x,_a##y,z,v), I##ca=(img)(x,_a##y,z,v), I##na=(img)(_n##x,_a##y,z,v), I##aa=(img)(_a##x,_a##y,z,v) #define cimg_get5x5(img,x,y,z,v,I) \ I##bb=(img)(_b##x,_b##y,z,v), I##pb=(img)(_p##x,_b##y,z,v), I##cb=(img)(x,_b##y,z,v), I##nb=(img)(_n##x,_b##y,z,v), I##ab=(img)(_a##x,_b##y,z,v), \ I##bp=(img)(_b##x,_p##y,z,v), I##pp=(img)(_p##x,_p##y,z,v), I##cp=(img)(x,_p##y,z,v), I##np=(img)(_n##x,_p##y,z,v), I##ap=(img)(_a##x,_p##y,z,v), \ I##bc=(img)(_b##x, y,z,v), I##pc=(img)(_p##x, y,z,v), I##cc=(img)(x, y,z,v), I##nc=(img)(_n##x, y,z,v), I##ac=(img)(_a##x, y,z,v), \ I##bn=(img)(_b##x,_n##y,z,v), I##pn=(img)(_p##x,_n##y,z,v), I##cn=(img)(x,_n##y,z,v), I##nn=(img)(_n##x,_n##y,z,v), I##an=(img)(_a##x,_n##y,z,v), \ I##ba=(img)(_b##x,_a##y,z,v), I##pa=(img)(_p##x,_a##y,z,v), I##ca=(img)(x,_a##y,z,v), I##na=(img)(_n##x,_a##y,z,v), I##aa=(img)(_a##x,_a##y,z,v) #define cimg_get2x2x2(img,x,y,z,v,I) \ I##ccc=(img)(x,y, z,v), I##ncc=(img)(_n##x,y, z,v), I##cnc=(img)(x,_n##y, z,v), I##nnc=(img)(_n##x,_n##y, z,v), \ I##ccc=(img)(x,y,_n##z,v), I##ncc=(img)(_n##x,y,_n##z,v), I##cnc=(img)(x,_n##y,_n##z,v), I##nnc=(img)(_n##x,_n##y,_n##z,v) #define cimg_get3x3x3(img,x,y,z,v,I) \ I##ppp=(img)(_p##x,_p##y,_p##z,v), I##cpp=(img)(x,_p##y,_p##z,v), I##npp=(img)(_n##x,_p##y,_p##z,v), \ I##pcp=(img)(_p##x, y,_p##z,v), I##ccp=(img)(x, y,_p##z,v), I##ncp=(img)(_n##x, y,_p##z,v), \ I##pnp=(img)(_p##x,_n##y,_p##z,v), I##cnp=(img)(x,_n##y,_p##z,v), I##nnp=(img)(_n##x,_n##y,_p##z,v), \ I##ppc=(img)(_p##x,_p##y, z,v), I##cpc=(img)(x,_p##y, z,v), I##npc=(img)(_n##x,_p##y, z,v), \ I##pcc=(img)(_p##x, y, z,v), I##ccc=(img)(x, y, z,v), I##ncc=(img)(_n##x, y, z,v), \ I##pnc=(img)(_p##x,_n##y, z,v), I##cnc=(img)(x,_n##y, z,v), I##nnc=(img)(_n##x,_n##y, z,v), \ I##ppn=(img)(_p##x,_p##y,_n##z,v), I##cpn=(img)(x,_p##y,_n##z,v), I##npn=(img)(_n##x,_p##y,_n##z,v), \ I##pcn=(img)(_p##x, y,_n##z,v), I##ccn=(img)(x, y,_n##z,v), I##ncn=(img)(_n##x, y,_n##z,v), \ I##pnn=(img)(_p##x,_n##y,_n##z,v), I##cnn=(img)(x,_n##y,_n##z,v), I##nnn=(img)(_n##x,_n##y,_n##z,v) // Macros used to define special image loops. // (see module 'Using Image Loops' in the generated documentation). #define cimg_for(img,ptr,T_ptr) for (T_ptr *ptr=(img).data+(img).size(); (ptr--)>(img).data; ) #define cimglist_for(list,l) for (unsigned int l=0; l<(list).size; l++) #define cimglist_apply(list,fn) cimglist_for(list,__##fn) (list)[__##fn].fn #define cimg_foroff(img,off) for (unsigned int off=0; off<(img).size(); off++) #define cimg_forX(img,x) for (int x=0; x<(int)((img).width); x++) #define cimg_forY(img,y) for (int y=0; y<(int)((img).height);y++) #define cimg_forZ(img,z) for (int z=0; z<(int)((img).depth); z++) #define cimg_forV(img,v) for (int v=0; v<(int)((img).dim); v++) #define cimg_forXY(img,x,y) cimg_forY(img,y) cimg_forX(img,x) #define cimg_forXZ(img,x,z) cimg_forZ(img,z) cimg_forX(img,x) #define cimg_forYZ(img,y,z) cimg_forZ(img,z) cimg_forY(img,y) #define cimg_forXV(img,x,v) cimg_forV(img,v) cimg_forX(img,x) #define cimg_forYV(img,y,v) cimg_forV(img,v) cimg_forY(img,y) #define cimg_forZV(img,z,v) cimg_forV(img,v) cimg_forZ(img,z) #define cimg_forXYZ(img,x,y,z) cimg_forZ(img,z) cimg_forXY(img,x,y) #define cimg_forXYV(img,x,y,v) cimg_forV(img,v) cimg_forXY(img,x,y) #define cimg_forXZV(img,x,z,v) cimg_forV(img,v) cimg_forXZ(img,x,z) #define cimg_forYZV(img,y,z,v) cimg_forV(img,v) cimg_forYZ(img,y,z) #define cimg_forXYZV(img,x,y,z,v) cimg_forV(img,v) cimg_forXYZ(img,x,y,z) #define cimg_for_insideX(img,x,n) for (int x=(n); x<(int)((img).width-(n)); x++) #define cimg_for_insideY(img,y,n) for (int y=(n); y<(int)((img).height-(n)); y++) #define cimg_for_insideZ(img,z,n) for (int z=(n); z<(int)((img).depth-(n)); z++) #define cimg_for_insideV(img,v,n) for (int v=(n); v<(int)((img).dim-(n)); v++) #define cimg_for_insideXY(img,x,y,n) cimg_for_insideY(img,y,n) cimg_for_insideX(img,x,n) #define cimg_for_insideXYZ(img,x,y,z,n) cimg_for_insideZ(img,z,n) cimg_for_insideXY(img,x,y,n) #define cimg_for_borderX(img,x,n) for (int x=0; x<(int)((img).width); x==(n)-1?(x=(img).width-(n)): x++) #define cimg_for_borderY(img,y,n) for (int y=0; y<(int)((img).height); y==(n)-1?(x=(img).height-(n)):y++) #define cimg_for_borderZ(img,z,n) for (int z=0; z<(int)((img).depth); z==(n)-1?(x=(img).depth-(n)): z++) #define cimg_for_borderV(img,v,n) for (int v=0; v<(int)((img).dim); v==(n)-1?(x=(img).dim-(n)): v++) #define cimg_for_borderXY(img,x,y,n) cimg_forY(img,y) for (int x=0; x<(int)((img).width); (y<(n) || y>=(int)((img).height)-(n))?x++: \ ((x<(n)-1 || x>=(int)((img).width)-(n))?x++:(x=(img).width-(n)))) #define cimg_for_borderXYZ(img,x,y,z,n) cimg_forYZ(img,y,z) for (int x=0; x<(int)((img).width); (y<(n) || y>=(int)((img).height)-(n) || z<(n) || z>=(int)((img).depth)-(n))?x++: \ ((x<(n)-1 || x>=(int)((img).width)-(n))?x++:(x=(img).width-(n)))) #define cimg_for2X(img,x) for (int x=0,_n##x=1; _n##x<(int)((img).width) || x==--_n##x; x++, _n##x++) #define cimg_for2Y(img,y) for (int y=0,_n##y=1; _n##y<(int)((img).height) || y==--_n##y; y++, _n##y++) #define cimg_for2Z(img,z) for (int z=0,_n##z=1; _n##z<(int)((img).depth) || z==--_n##z; z++, _n##z++) #define cimg_for2XY(img,x,y) cimg_for2Y(img,y) cimg_for2X(img,x) #define cimg_for2XZ(img,x,z) cimg_for2Z(img,z) cimg_for2X(img,x) #define cimg_for2YZ(img,y,z) cimg_for2Z(img,z) cimg_for2Y(img,y) #define cimg_for2XYZ(img,x,y,z) cimg_for2Z(img,z) cimg_for2XY(img,x,y) #define cimg_for3X(img,x) for (int x=0,_p##x=0,_n##x=1; _n##x<(int)((img).width) || x==--_n##x; _p##x=x++,_n##x++) #define cimg_for3Y(img,y) for (int y=0,_p##y=0,_n##y=1; _n##y<(int)((img).height) || y==--_n##y; _p##y=y++,_n##y++) #define cimg_for3Z(img,z) for (int z=0,_p##z=0,_n##z=1; _n##z<(int)((img).depth) || z==--_n##z; _p##z=z++,_n##z++) #define cimg_for3XY(img,x,y) cimg_for3Y(img,y) cimg_for3X(img,x) #define cimg_for3XZ(img,x,z) cimg_for3Z(img,z) cimg_for3X(img,x) #define cimg_for3YZ(img,y,z) cimg_for3Z(img,z) cimg_for3Y(img,y) #define cimg_for3XYZ(img,x,y,z) cimg_for3Z(img,z) cimg_for3XY(img,x,y) #define cimg_for4X(img,x) for (int _p##x=0,x=0,_n##x=1,_a##x=2; \ _a##x<(int)((img).width) || _n##x==--_a##x || x==(_a##x=--_n##x); \ _p##x=x++,_n##x++,_a##x++) #define cimg_for4Y(img,y) for (int _p##y=0,y=0,_n##y=1,_a##y=2; \ _a##y<(int)((img).height) || _n##y==--_a##y || y==(_a##y=--_n##y); \ _p##y=y++,_n##y++,_a##y++) #define cimg_for4Z(img,z) for (int _p##z=0,z=0,_n##z=1,_a##z=2; \ _a##z<(int)((img).depth) || _n##z==--_a##z || z==(_a##z=--_n##z); \ _p##z=z++,_n##z++,_a##z++) #define cimg_for4XY(img,x,y) cimg_for4Y(img,y) cimg_for4X(img,x) #define cimg_for4XZ(img,x,z) cimg_for4Z(img,z) cimg_for4X(img,x) #define cimg_for4YZ(img,y,z) cimg_for4Z(img,z) cimg_for4Y(img,y) #define cimg_for4XYZ(img,x,y,z) cimg_for4Z(img,z) cimg_for4XY(img,x,y) #define cimg_for5X(img,x) for (int _b##x=0,_p##x=0,x=0,_n##x=1,_a##x=2; \ _a##x<(int)((img).width) || _n##x==--_a##x || x==(_a##x=--_n##x); \ _b##x=_p##x,_p##x=x++,_n##x++,_a##x++) #define cimg_for5Y(img,y) for (int _b##y=0,_p##y=0,y=0,_n##y=1,_a##y=2; \ _a##y<(int)((img).height) || _n##y==--_a##y || y==(_a##y=--_n##y); \ _b##y=_p##y,_p##y=y++,_n##y++,_a##y++) #define cimg_for5Z(img,z) for (int _b##z=0,_p##z=0,z=0,_n##z=1,_a##z=2; \ _a##z<(int)((img).depth) || _n##z==--_a##z || z==(_a##z=--_n##z); \ _b##z=_p##z,_p##z=z++,_n##z++,_a##z++) #define cimg_for5XY(img,x,y) cimg_for5Y(img,y) cimg_for5X(img,x) #define cimg_for5XZ(img,x,z) cimg_for5Z(img,z) cimg_for5X(img,x) #define cimg_for5YZ(img,y,z) cimg_for5Z(img,z) cimg_for5Y(img,y) #define cimg_for5XYZ(img,x,y,z) cimg_for5Z(img,z) cimg_for5XY(img,x,y) #define cimg_for2x2(img,x,y,z,v,I) cimg_for2Y(img,y) \ for (int _n##x=1, x=(int)((I##cc=(img)(0, y,z,v)), \ (I##cn=(img)(0,_n##y,z,v)), \ 0); \ (_n##x<(int)((img).width) && ((I##nc=(img)(_n##x, y,z,v)), \ (I##nn=(img)(_n##x,_n##y,z,v)), \ 1)) || x==--_n##x; \ I##cc=I##nc, I##cn=I##nn, \ x++,_n##x++ ) #define cimg_for3x3(img,x,y,z,v,I) cimg_for3Y(img,y) \ for (int _n##x=1, _p##x=(int)((I##cp=I##pp=(img)(0,_p##y,z,v)), \ (I##cc=I##pc=(img)(0, y,z,v)), \ (I##cn=I##pn=(img)(0,_n##y,z,v))), \ x=_p##x=0; \ (_n##x<(int)((img).width) && ((I##np=(img)(_n##x,_p##y,z,v)), \ (I##nc=(img)(_n##x, y,z,v)), \ (I##nn=(img)(_n##x,_n##y,z,v)), \ 1)) || x==--_n##x; \ I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, \ I##cp=I##np, I##cc=I##nc, I##cn=I##nn, \ _p##x=x++,_n##x++ ) #define cimg_for4x4(img,x,y,z,v,I) cimg_for4Y(img,y) \ for (int _a##x=2, _n##x=1, x=(int)((I##cp=I##pp=(img)(0,_p##y,z,v)), \ (I##cc=I##pc=(img)(0, y,z,v)), \ (I##cn=I##pn=(img)(0,_n##y,z,v)), \ (I##ca=I##pa=(img)(0,_a##y,z,v)), \ (I##np=(img)(_n##x,_p##y,z,v)), \ (I##nc=(img)(_n##x, y,z,v)), \ (I##nn=(img)(_n##x,_n##y,z,v)), \ (I##na=(img)(_n##x,_a##y,z,v)), \ 0), _p##x=0; \ (_a##x<(int)((img).width) && ((I##ap=(img)(_a##x,_p##y,z,v)), \ (I##ac=(img)(_a##x, y,z,v)), \ (I##an=(img)(_a##x,_n##y,z,v)), \ (I##aa=(img)(_a##x,_a##y,z,v)), \ 1)) || _n##x==--_a##x || x==(_a##x=--_n##x); \ I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, I##pa=I##ca, \ I##cp=I##np, I##cc=I##nc, I##cn=I##nn, I##ca=I##na, \ I##np=I##ap, I##nc=I##ac, I##nn=I##an, I##na=I##aa, \ _p##x=x++, _n##x++, _a##x++ ) #define cimg_for5x5(img,x,y,z,v,I) cimg_for5Y(img,y) \ for (int _a##x=2, _n##x=1, _b##x=(int)((I##cb=I##pb=I##bb=(img)(0,_b##y,z,v)), \ (I##cp=I##pp=I##bp=(img)(0,_p##y,z,v)), \ (I##cc=I##pc=I##bc=(img)(0, y,z,v)), \ (I##cn=I##pn=I##bn=(img)(0,_n##y,z,v)), \ (I##ca=I##pa=I##ba=(img)(0,_a##y,z,v)), \ (I##nb=(img)(_n##x,_b##y,z,v)), \ (I##np=(img)(_n##x,_p##y,z,v)), \ (I##nc=(img)(_n##x, y,z,v)), \ (I##nn=(img)(_n##x,_n##y,z,v)), \ (I##na=(img)(_n##x,_a##y,z,v))), \ x=0, _p##x=_b##x=0; \ (_a##x<(int)((img).width) && ((I##ab=(img)(_a##x,_b##y,z,v)), \ (I##ap=(img)(_a##x,_p##y,z,v)), \ (I##ac=(img)(_a##x, y,z,v)), \ (I##an=(img)(_a##x,_n##y,z,v)), \ (I##aa=(img)(_a##x,_a##y,z,v)), \ 1)) || _n##x==--_a##x || x==(_a##x=--_n##x); \ I##bb=I##pb, I##bp=I##pp, I##bc=I##pc, I##bn=I##pn, I##ba=I##pa, \ I##pb=I##cb, I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, I##pa=I##ca, \ I##cb=I##nb, I##cp=I##np, I##cc=I##nc, I##cn=I##nn, I##ca=I##na, \ I##nb=I##ab, I##np=I##ap, I##nc=I##ac, I##nn=I##an, I##na=I##aa, \ _b##x=_p##x, _p##x=x++, _n##x++, _a##x++ ) #define cimg_for2x2x2(img,x,y,z,v,I) cimg_for2YZ(img,y,z) \ for (int _n##x=1, x=(int)((I##ccc=(img)(0, y, z,v)), \ (I##cnc=(img)(0,_n##y, z,v)), \ (I##ccn=(img)(0, y,_n##z,v)), \ (I##cnn=(img)(0,_n##y,_n##z,v)), \ 0); \ (_n##x<(int)((img).width) && ((I##ncc=(img)(_n##x, y, z,v)), \ (I##nnc=(img)(_n##x,_n##y, z,v)), \ (I##ncn=(img)(_n##x, y,_n##z,v)), \ (I##nnn=(img)(_n##x,_n##y,_n##z,v)), \ 1)) || x==--_n##x; \ I##ccc=I##ncc, I##cnc=I##nnc, \ I##ccn=I##ncn, I##cnn=I##nnn, \ x++, _n##x++ ) #define cimg_for3x3x3(img,x,y,z,v,I) cimg_for3YZ(img,y,z) \ for (int _n##x=1, _p##x=(int)((I##cpp=I##ppp=(img)(0,_p##y,_p##z,v)), \ (I##ccp=I##pcp=(img)(0, y,_p##z,v)), \ (I##cnp=I##pnp=(img)(0,_n##y,_p##z,v)), \ (I##cpc=I##ppc=(img)(0,_p##y, z,v)), \ (I##ccc=I##pcc=(img)(0, y, z,v)), \ (I##cnc=I##pnc=(img)(0,_n##y, z,v)), \ (I##cpn=I##ppn=(img)(0,_p##y,_n##z,v)), \ (I##ccn=I##pcn=(img)(0, y,_n##z,v)), \ (I##cnn=I##pnn=(img)(0,_n##y,_n##z,v))),\ x=_p##x=0; \ (_n##x<(int)((img).width) && ((I##npp=(img)(_n##x,_p##y,_p##z,v)), \ (I##ncp=(img)(_n##x, y,_p##z,v)), \ (I##nnp=(img)(_n##x,_n##y,_p##z,v)), \ (I##npc=(img)(_n##x,_p##y, z,v)), \ (I##ncc=(img)(_n##x, y, z,v)), \ (I##nnc=(img)(_n##x,_n##y, z,v)), \ (I##npn=(img)(_n##x,_p##y,_n##z,v)), \ (I##ncn=(img)(_n##x, y,_n##z,v)), \ (I##nnn=(img)(_n##x,_n##y,_n##z,v)), \ 1)) || x==--_n##x; \ I##ppp=I##cpp, I##pcp=I##ccp, I##pnp=I##cnp, \ I##cpp=I##npp, I##ccp=I##ncp, I##cnp=I##nnp, \ I##ppc=I##cpc, I##pcc=I##ccc, I##pnc=I##cnc, \ I##cpc=I##npc, I##ccc=I##ncc, I##cnc=I##nnc, \ I##ppn=I##cpn, I##pcn=I##ccn, I##pnn=I##cnn, \ I##cpn=I##npn, I##ccn=I##ncn, I##cnn=I##nnn, \ _p##x=x++, _n##x++ ) /* #------------------------------------------------ # # # Definition of the cimg_library:: namespace # # #------------------------------------------------ */ //! Namespace that encompasses all classes and functions of the %CImg library. /** This namespace is defined to avoid class names collisions that could happen with the include of other C++ header files. Anyway, it should not happen very often and you may start most of your programs with \code #include "CImg.h" using namespace cimg_library; \endcode to simplify the declaration of %CImg Library objects variables afterwards. **/ namespace cimg_library { // Define the CImg classes. template struct CImg; template struct CImgList; struct CImgStats; struct CImgDisplay; struct CImgException; namespace cimg { // The bodies of the functions below are defined afterwards inline void info(); inline unsigned int& exception_mode(); inline int dialog(const char *title,const char *msg,const char *button1_txt="OK", const char *button2_txt=0,const char *button3_txt=0, const char *button4_txt=0,const char *button5_txt=0, const char *button6_txt=0,const bool centering = false); template inline void marching_cubes(const tfunc& func, const float isovalue, const float x0,const float y0,const float z0, const float x1,const float y1,const float z1, const float resx,const float resy,const float resz, CImgList& points, CImgList& primitives, const bool invert_faces = false); template inline void marching_squares(const tfunc& func, const float isovalue, const float x0,const float y0, const float x1,const float y1, const float resx,const float resy, CImgList& points, CImgList& primitives); } /* #---------------------------------------------- # # # Definition of the CImgException structures # # #---------------------------------------------- */ // Never use the following macro in your own code ! #define cimg_exception_err(etype,disp_flag) \ if (cimg::exception_mode()>=1) { \ std::va_list ap; \ va_start(ap,format); \ std::vsprintf(message,format,ap); \ va_end(ap); \ if (cimg::exception_mode()>=2 && disp_flag) { \ try { cimg::dialog(etype,message,"Abort"); } \ catch (CImgException&) { std::fprintf(stderr,"\n# %s :\n%s\n\n",etype,message); } \ } else std::fprintf(stderr,"\n# %s :\n%s\n\n",etype,message); \ } \ if (cimg::exception_mode()>=3) cimg_library::cimg::info(); \ //! Class which is thrown when an error occured during a %CImg library function call. /** \section ex1 Overview CImgException is the base class of %CImg exceptions. Exceptions are thrown by the %CImg Library when an error occured in a %CImg library function call. CImgException is seldom thrown itself. Children classes that specify the kind of error encountered are generally used instead. These sub-classes are : - \b CImgInstanceException : Thrown when the instance associated to the called %CImg function is not correctly defined. Generally, this exception is thrown when one tries to process \a empty images. The example below will throw a \a CImgInstanceException. \code CImg img; // Construct an empty image. img.blur(10); // Try to blur the image. \endcode - \b CImgArgumentException : Thrown when one of the arguments given to the called %CImg function is not correct. Generally, this exception is thrown when arguments passed to the function are outside an admissible range of values. The example below will throw a \a CImgArgumentException. \code CImg img(100,100,1,3); // Define a 100x100 color image with float pixels. img = 0; // Try to fill pixels from the 0 pointer (invalid argument to operator=() ). \endcode - \b CImgIOException : Thrown when an error occured when trying to load or save image files. The example below will throw a \a CImgIOException. \code CImg img("file_doesnt_exist.jpg"); // Try to load a file that doesn't exist. \endcode - \b CImgDisplayException : Thrown when an error occured when trying to display an image in a window. This exception is thrown when image display request cannot be satisfied. The parent class CImgException may be thrown itself when errors that cannot be classified in one of the above type occur. It is recommended not to throw CImgExceptions yourself, since there are normally reserved to %CImg Library functions. \b CImgInstanceException, \b CImgArgumentException, \b CImgIOException and \b CImgDisplayException are simple subclasses of CImgException and are thus not detailled more in this reference documentation. \section ex2 Exception handling When an error occurs, the %CImg Library first displays the error in a modal window. Then, it throws an instance of the corresponding exception class, generally leading the program to stop (this is the default behavior). You can bypass this default behavior by handling the exceptions yourself, using a code block try { ... } catch() { ... }. In this case, you can avoid the apparition of the modal window, by defining the environment variable cimg_debug to 0 before including the %CImg header file. The example below shows how to cleanly handle %CImg Library exceptions : \code #define cimg_debug 0 // Disable modal window in CImg exceptions. #define "CImg.h" int main() { try { ...; // Here, do what you want. } catch (CImgInstanceException &e) { std::fprintf(stderr,"CImg Library Error : %s",e.message); // Display your own error message ... // Do what you want now. } } \endcode **/ struct CImgException { char message[1024]; //!< Message associated with the error that thrown the exception. CImgException() { message[0]='\0'; } CImgException(const char *format,...) { cimg_exception_err("CImgException",true); } }; // The \ref CImgInstanceException class is used to throw an exception related // to a non suitable instance encountered in a library function call. struct CImgInstanceException : CImgException { CImgInstanceException(const char *format,...) { cimg_exception_err("CImgInstanceException",true); } }; // The \ref CImgArgumentException class is used to throw an exception related // to invalid arguments encountered in a library function call. struct CImgArgumentException : CImgException { CImgArgumentException(const char *format,...) { cimg_exception_err("CImgArgumentException",true); } }; // The \ref CImgIOException class is used to throw an exception related // to Input/Output file problems encountered in a library function call. struct CImgIOException : CImgException { CImgIOException(const char *format,...) { cimg_exception_err("CImgIOException",true); } }; // The CImgDisplayException class is used to throw an exception related to display problems // encountered in a library function call. struct CImgDisplayException : CImgException { CImgDisplayException(const char *format,...) { cimg_exception_err("CImgDisplayException",false); } }; /* #------------------------------------- # # # Definition of the namespace 'cimg' # # #------------------------------------- */ //! Namespace that encompasses \a low-level functions and variables of the %CImg Library. /** Most of the functions and variables within this namespace are used by the library for low-level processing. Nevertheless, documented variables and functions of this namespace may be used safely in your own source code. \warning Never write using namespace cimg_library::cimg; in your source code, since a lot of functions of the cimg:: namespace have prototypes similar to standard C functions defined in the global namespace ::. **/ namespace cimg { // Define the trait that will be used to determine the best data type to work with. // Considered types are : bool, uchar, char, short, ushort, int, uint, long, ulong, float and double. // Two rules applies there : // - largest of two integer types is an integer type. // - largest of integer/float type is a float type. template struct largest { typedef t type; }; template<> struct largest { typedef unsigned char type; }; template<> struct largest { typedef short type; }; template<> struct largest { typedef char type; }; template<> struct largest { typedef short type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef unsigned long type; }; template<> struct largest { typedef unsigned short type; }; template<> struct largest { typedef unsigned short type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef short type; }; template<> struct largest { typedef short type; }; template<> struct largest { typedef short type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef unsigned long type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef int type; }; template<> struct largest { typedef unsigned int type; }; template<> struct largest { typedef unsigned long type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef float type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template<> struct largest { typedef double type; }; template struct type { static T min() { return (T)-1>0?(T)0:(T)-1<<(8*sizeof(T)-1); } static T max() { return (T)-1>0?(T)-1:~((T)-1<<(8*sizeof(T)-1)); } static bool is_float() { return false; } static const char* id() { static const char *const s = "unknown"; return s; } }; template<> struct type { static bool min() { return false; } static bool max() { return true; } static bool is_float() { return false; } static const char* id() { static const char *const s = "bool"; return s; } }; template<> struct type { static unsigned char min() { return 0; } static unsigned char max() { return (unsigned char)~0U; } static bool is_float() { return false; } static const char* id() { static const char *const s = "unsigned char"; return s; } }; template<> struct type { static char min() { return (char)-1<<(8*sizeof(char)-1); } static char max() { return ~((char)-1<<(8*sizeof(char)-1)); } static bool is_float() { return false; } static const char* id() { static const char *const s = "char"; return s; } }; template<> struct type { static unsigned short min() { return 0; } static unsigned short max() { return (unsigned short)~0U; } static bool is_float() { return false; } static const char* id() { static const char *const s = "unsigned short"; return s; } }; template<> struct type { static short min() { return (short)-1<<(8*sizeof(short)-1); } static short max() { return ~((short)-1<<(8*sizeof(short)-1)); } static bool is_float() { return false; } static const char* id() { static const char *const s = "short"; return s; } }; template<> struct type { static unsigned int min() { return 0; } static unsigned int max() { return (unsigned int)~0U; } static bool is_float() { return false; } static const char* id() { static const char *const s = "unsigned int"; return s; } }; template<> struct type { static int min() { return (int)-1<<(8*sizeof(int)-1); } static int max() { return ~((int)-1<<(8*sizeof(int)-1)); } static bool is_float() { return false; } static const char* id() { static const char *const s = "int"; return s; } }; template<> struct type { static unsigned long min() { return 0; } static unsigned long max() { return (unsigned long)~0UL; } static bool is_float() { return false; } static const char* id() { static const char *const s = "unsigned long"; return s; } }; template<> struct type { static long min() { return (long)-1<<(8*sizeof(long)-1); } static long max() { return ~((long)-1<<(8*sizeof(long)-1)); } static bool is_float() { return false; } static const char* id() { static const char *const s = "long"; return s; } }; template<> struct type { static float min() { return -3.4E38f; } static float max() { return 3.4E38f; } static bool is_float() { return true; } static const char* id() { static const char *const s = "float"; return s; } }; template<> struct type { static double min() { return -1.7E308; } static double max() { return 1.7E308; } static bool is_float() { return true; } static const char* id() { static const char *const s = "double"; return s; } }; // Define internal library variables. #if cimg_display_type==1 struct X11info { volatile unsigned int nb_wins; pthread_mutex_t* mutex; pthread_t* event_thread; CImgDisplay* wins[1024]; Display* display; unsigned int nb_bits; GC* gc; bool blue_first; bool byte_order; bool shm_enabled; #ifdef cimg_use_xrandr XRRScreenSize *resolutions; Rotation curr_rotation; unsigned int curr_resolution; unsigned int nb_resolutions; #endif X11info():nb_wins(0),mutex(0),event_thread(0),display(0), nb_bits(0),gc(0),blue_first(false),byte_order(false),shm_enabled(false) { #ifdef cimg_use_xrandr resolutions = 0; curr_rotation = 0; curr_resolution = nb_resolutions = 0; #endif } }; #if defined(cimg_module) X11info& X11attr(); #elif defined(cimg_main) X11info& X11attr() { static X11info val; return val; } #else inline X11info& X11attr() { static X11info val; return val; } #endif #elif cimg_display_type==2 struct Win32info { HANDLE wait_event; Win32info() { wait_event = CreateEvent(0,FALSE,FALSE,0); } }; #if defined(cimg_module) Win32info& Win32attr(); #elif defined(cimg_main) Win32info& Win32attr() { static Win32info val; return val; } #else inline Win32info& Win32attr() { static Win32info val; return val; } #endif #endif inline unsigned int& exception_mode() { static unsigned int mode=cimg_debug; return mode; } #ifdef cimg_color_terminal const char t_normal[9] = {0x1b,'[','0',';','0',';','0','m','\0'}; const char t_red[11] = {0x1b,'[','4',';','3','1',';','5','9','m','\0'}; const char t_bold[5] = {0x1b,'[','1','m','\0'}; const char t_purple[11] = {0x1b,'[','0',';','3','5',';','5','9','m','\0'}; #else const char t_normal[1] = {'\0'}; const char *const t_red = cimg::t_normal, *const t_bold = cimg::t_normal, *const t_purple = cimg::t_normal; #endif #if cimg_display_type==1 // Keycodes for X11-based graphical systems const unsigned int keyESC = XK_Escape; const unsigned int keyF1 = XK_F1; const unsigned int keyF2 = XK_F2; const unsigned int keyF3 = XK_F3; const unsigned int keyF4 = XK_F4; const unsigned int keyF5 = XK_F5; const unsigned int keyF6 = XK_F6; const unsigned int keyF7 = XK_F7; const unsigned int keyF8 = XK_F8; const unsigned int keyF9 = XK_F9; const unsigned int keyF10 = XK_F10; const unsigned int keyF11 = XK_F11; const unsigned int keyF12 = XK_F12; const unsigned int keyPAUSE = XK_Pause; const unsigned int key1 = XK_1; const unsigned int key2 = XK_2; const unsigned int key3 = XK_3; const unsigned int key4 = XK_4; const unsigned int key5 = XK_5; const unsigned int key6 = XK_6; const unsigned int key7 = XK_7; const unsigned int key8 = XK_8; const unsigned int key9 = XK_9; const unsigned int key0 = XK_0; const unsigned int keyBACKSPACE = XK_BackSpace; const unsigned int keyINSERT = XK_Insert; const unsigned int keyHOME = XK_Home; const unsigned int keyPAGEUP = XK_Page_Up; const unsigned int keyTAB = XK_Tab; const unsigned int keyQ = XK_q; const unsigned int keyW = XK_w; const unsigned int keyE = XK_e; const unsigned int keyR = XK_r; const unsigned int keyT = XK_t; const unsigned int keyY = XK_y; const unsigned int keyU = XK_u; const unsigned int keyI = XK_i; const unsigned int keyO = XK_o; const unsigned int keyP = XK_p; const unsigned int keyDELETE = XK_Delete; const unsigned int keyEND = XK_End; const unsigned int keyPAGEDOWN = XK_Page_Down; const unsigned int keyCAPSLOCK = XK_Caps_Lock; const unsigned int keyA = XK_a; const unsigned int keyS = XK_s; const unsigned int keyD = XK_d; const unsigned int keyF = XK_f; const unsigned int keyG = XK_g; const unsigned int keyH = XK_h; const unsigned int keyJ = XK_j; const unsigned int keyK = XK_k; const unsigned int keyL = XK_l; const unsigned int keyENTER = XK_Return; const unsigned int keySHIFTLEFT = XK_Shift_L; const unsigned int keyZ = XK_z; const unsigned int keyX = XK_x; const unsigned int keyC = XK_c; const unsigned int keyV = XK_v; const unsigned int keyB = XK_b; const unsigned int keyN = XK_n; const unsigned int keyM = XK_m; const unsigned int keySHIFTRIGHT = XK_Shift_R; const unsigned int keyARROWUP = XK_Up; const unsigned int keyCTRLLEFT = XK_Control_L; const unsigned int keyAPPLEFT = XK_Super_L; const unsigned int keySPACE = XK_space; const unsigned int keyALTGR = XK_Alt_R; const unsigned int keyAPPRIGHT = XK_Super_R; const unsigned int keyMENU = XK_Menu; const unsigned int keyCTRLRIGHT = XK_Control_R; const unsigned int keyARROWLEFT = XK_Left; const unsigned int keyARROWDOWN = XK_Down; const unsigned int keyARROWRIGHT = XK_Right; const unsigned int keyPAD0 = XK_KP_0; const unsigned int keyPAD1 = XK_KP_1; const unsigned int keyPAD2 = XK_KP_2; const unsigned int keyPAD3 = XK_KP_3; const unsigned int keyPAD4 = XK_KP_4; const unsigned int keyPAD5 = XK_KP_5; const unsigned int keyPAD6 = XK_KP_6; const unsigned int keyPAD7 = XK_KP_7; const unsigned int keyPAD8 = XK_KP_8; const unsigned int keyPAD9 = XK_KP_9; const unsigned int keyPADADD = XK_KP_Add; const unsigned int keyPADSUB = XK_KP_Subtract; const unsigned int keyPADMUL = XK_KP_Multiply; const unsigned int keyPADDIV = XK_KP_Divide; #elif (cimg_display_type==2 && cimg_OS==2) // Keycodes for Windows-OS const unsigned int keyESC = VK_ESCAPE; const unsigned int keyF1 = VK_F1; const unsigned int keyF2 = VK_F2; const unsigned int keyF3 = VK_F3; const unsigned int keyF4 = VK_F4; const unsigned int keyF5 = VK_F5; const unsigned int keyF6 = VK_F6; const unsigned int keyF7 = VK_F7; const unsigned int keyF8 = VK_F8; const unsigned int keyF9 = VK_F9; const unsigned int keyF10 = VK_F10; const unsigned int keyF11 = VK_F11; const unsigned int keyF12 = VK_F12; const unsigned int keyPAUSE = VK_PAUSE; const unsigned int key1 = '1'; const unsigned int key2 = '2'; const unsigned int key3 = '3'; const unsigned int key4 = '4'; const unsigned int key5 = '5'; const unsigned int key6 = '6'; const unsigned int key7 = '7'; const unsigned int key8 = '8'; const unsigned int key9 = '9'; const unsigned int key0 = '0'; const unsigned int keyBACKSPACE = VK_BACK; const unsigned int keyINSERT = VK_INSERT; const unsigned int keyHOME = VK_HOME; const unsigned int keyPAGEUP = VK_PRIOR; const unsigned int keyTAB = VK_TAB; const unsigned int keyQ = 'Q'; const unsigned int keyW = 'W'; const unsigned int keyE = 'E'; const unsigned int keyR = 'R'; const unsigned int keyT = 'T'; const unsigned int keyY = 'Y'; const unsigned int keyU = 'U'; const unsigned int keyI = 'I'; const unsigned int keyO = 'O'; const unsigned int keyP = 'P'; const unsigned int keyDELETE = VK_DELETE; const unsigned int keyEND = VK_END; const unsigned int keyPAGEDOWN = VK_NEXT; const unsigned int keyCAPSLOCK = VK_CAPITAL; const unsigned int keyA = 'A'; const unsigned int keyS = 'S'; const unsigned int keyD = 'D'; const unsigned int keyF = 'F'; const unsigned int keyG = 'G'; const unsigned int keyH = 'H'; const unsigned int keyJ = 'J'; const unsigned int keyK = 'K'; const unsigned int keyL = 'L'; const unsigned int keyENTER = VK_RETURN; const unsigned int keySHIFTLEFT = VK_SHIFT; const unsigned int keyZ = 'Z'; const unsigned int keyX = 'X'; const unsigned int keyC = 'C'; const unsigned int keyV = 'V'; const unsigned int keyB = 'B'; const unsigned int keyN = 'N'; const unsigned int keyM = 'M'; const unsigned int keySHIFTRIGHT = VK_SHIFT; const unsigned int keyARROWUP = VK_UP; const unsigned int keyCTRLLEFT = VK_CONTROL; const unsigned int keyAPPLEFT = VK_LWIN; const unsigned int keySPACE = VK_SPACE; const unsigned int keyALTGR = VK_CONTROL; const unsigned int keyAPPRIGHT = VK_RWIN; const unsigned int keyMENU = VK_APPS; const unsigned int keyCTRLRIGHT = VK_CONTROL; const unsigned int keyARROWLEFT = VK_LEFT; const unsigned int keyARROWDOWN = VK_DOWN; const unsigned int keyARROWRIGHT = VK_RIGHT; const unsigned int keyPAD0 = 0x60; const unsigned int keyPAD1 = 0x61; const unsigned int keyPAD2 = 0x62; const unsigned int keyPAD3 = 0x63; const unsigned int keyPAD4 = 0x64; const unsigned int keyPAD5 = 0x65; const unsigned int keyPAD6 = 0x66; const unsigned int keyPAD7 = 0x67; const unsigned int keyPAD8 = 0x68; const unsigned int keyPAD9 = 0x69; const unsigned int keyPADADD = VK_ADD; const unsigned int keyPADSUB = VK_SUBTRACT; const unsigned int keyPADMUL = VK_MULTIPLY; const unsigned int keyPADDIV = VK_DIVIDE; #else // Define unknow keycodes when no display const unsigned int keyESC = 1U; const unsigned int keyF1 = 2U; const unsigned int keyF2 = 3U; const unsigned int keyF3 = 4U; const unsigned int keyF4 = 5U; const unsigned int keyF5 = 6U; const unsigned int keyF6 = 7U; const unsigned int keyF7 = 8U; const unsigned int keyF8 = 9U; const unsigned int keyF9 = 10U; const unsigned int keyF10 = 11U; const unsigned int keyF11 = 12U; const unsigned int keyF12 = 13U; const unsigned int keyPAUSE = 14U; const unsigned int key1 = 15U; const unsigned int key2 = 16U; const unsigned int key3 = 17U; const unsigned int key4 = 18U; const unsigned int key5 = 19U; const unsigned int key6 = 20U; const unsigned int key7 = 21U; const unsigned int key8 = 22U; const unsigned int key9 = 23U; const unsigned int key0 = 24U; const unsigned int keyBACKSPACE = 25U; const unsigned int keyINSERT = 26U; const unsigned int keyHOME = 27U; const unsigned int keyPAGEUP = 28U; const unsigned int keyTAB = 29U; const unsigned int keyQ = 30U; const unsigned int keyW = 31U; const unsigned int keyE = 32U; const unsigned int keyR = 33U; const unsigned int keyT = 34U; const unsigned int keyY = 35U; const unsigned int keyU = 36U; const unsigned int keyI = 37U; const unsigned int keyO = 38U; const unsigned int keyP = 39U; const unsigned int keyDELETE = 40U; const unsigned int keyEND = 41U; const unsigned int keyPAGEDOWN = 42U; const unsigned int keyCAPSLOCK = 43U; const unsigned int keyA = 44U; const unsigned int keyS = 45U; const unsigned int keyD = 46U; const unsigned int keyF = 47U; const unsigned int keyG = 48U; const unsigned int keyH = 49U; const unsigned int keyJ = 50U; const unsigned int keyK = 51U; const unsigned int keyL = 52U; const unsigned int keyENTER = 53U; const unsigned int keySHIFTLEFT = 54U; const unsigned int keyZ = 55U; const unsigned int keyX = 56U; const unsigned int keyC = 57U; const unsigned int keyV = 58U; const unsigned int keyB = 59U; const unsigned int keyN = 60U; const unsigned int keyM = 61U; const unsigned int keySHIFTRIGHT = 62U; const unsigned int keyARROWUP = 63U; const unsigned int keyCTRLLEFT = 64U; const unsigned int keyAPPLEFT = 65U; const unsigned int keySPACE = 66U; const unsigned int keyALTGR = 67U; const unsigned int keyAPPRIGHT = 68U; const unsigned int keyMENU = 69U; const unsigned int keyCTRLRIGHT = 70U; const unsigned int keyARROWLEFT = 71U; const unsigned int keyARROWDOWN = 72U; const unsigned int keyARROWRIGHT = 73U; const unsigned int keyPAD0 = 74U; const unsigned int keyPAD1 = 75U; const unsigned int keyPAD2 = 76U; const unsigned int keyPAD3 = 77U; const unsigned int keyPAD4 = 78U; const unsigned int keyPAD5 = 79U; const unsigned int keyPAD6 = 80U; const unsigned int keyPAD7 = 81U; const unsigned int keyPAD8 = 82U; const unsigned int keyPAD9 = 83U; const unsigned int keyPADADD = 84U; const unsigned int keyPADSUB = 85U; const unsigned int keyPADMUL = 86U; const unsigned int keyPADDIV = 87U; #endif #ifdef PI #undef PI #endif const double PI = 3.14159265358979323846; //!< Definition of the mathematical constant PI // Definition of a 7x11 font, used to return a default font for drawing text. const unsigned int font7x11[7*11*256/32] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x90,0x0,0x7f0000,0x40000,0x0,0x0,0x4010c0a4,0x82000040,0x11848402,0x18480050,0x80430292,0x8023,0x9008000, 0x40218140,0x4000040,0x21800402,0x18000051,0x1060500,0x8083,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24002,0x4031,0x80000000,0x10000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x81c0400,0x40020000,0x80070080,0x40440e00,0x0,0x0,0x1,0x88180000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x200000,0x0,0x0,0x80000,0x0,0x0,0x20212140,0x5000020,0x22400204,0x240000a0,0x40848500,0x4044,0x80010038,0x20424285,0xa000020, 0x42428204,0x2428e0a0,0x82090a14,0x4104,0x85022014,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10240a7,0x88484040,0x40800000,0x270c3,0x87811e0e, 0x7c70e000,0x78,0x3c23c1ef,0x1f3e1e89,0xf1c44819,0xa23cf0f3,0xc3cff120,0xc18307f4,0x4040400,0x20000,0x80080080,0x40200,0x0, 0x40000,0x2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8188,0x50603800,0xf3c00000,0x1c004003,0xc700003e,0x18180,0xc993880,0x10204081, 0x2071ef9,0xf3e7cf9f,0x3e7c7911,0xe3c78f1e,0x7d1224,0x48906048,0x0,0x4000000,0x0,0x9000,0x0,0x0,0x2000,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x10240aa,0x14944080,0x23610000,0x68940,0x40831010,0x8891306,0x802044,0x44522208,0x90202088,0x40448819,0xb242890a,0x24011111, 0x49448814,0x4040a00,0xe2c3c7,0x8e3f3cb9,0xc1c44216,0xee38b0f2,0xe78f9120,0xc18507e2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x101c207,0x88a04001,0x9c00000,0x2200a041,0x8200113a,0x8240,0x50a3110,0x2850a142,0x850c2081,0x2040204,0x8104592,0x142850a1, 0x42cd1224,0x4888bc48,0x70e1c387,0xe3b3c70,0xe1c38e1c,0x38707171,0xc3870e1c,0x10791224,0x48906c41,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x10003ee,0x15140080,0x21810000,0x48840,0x40851020,0x8911306,0x31fd804,0x9c522408,0x90204088,0x4045081a,0xba42890a,0x24011111, 0x49285024,0x2041b00,0x132408,0x910844c8,0x4044821b,0x7244c913,0x24041111,0x49488822,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x28204,0x85006001,0x6a414000,0x3a004043,0xc700113a,0x8245,0x50a3a00,0x2850a142,0x850c4081,0x2040204,0x81045d2,0x142850a1, 0x24951224,0x48852250,0x8102040,0x81054089,0x12244204,0x8108992,0x24489122,0x991224,0x4888b222,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1000143,0xa988080,0x2147c01f,0x88840,0x83091c2c,0x1070f000,0xc000608,0xa48bc408,0x9e3c46f8,0x40460816,0xaa42f10b,0xc3811111, 0x35102044,0x1041100,0xf22408,0x9f084488,0x40470212,0x62448912,0x6041111,0x55308846,0x8061c80,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1028704,0x8f805801,0x4be28fdf,0x220001f0,0x111a,0x60000182,0x82c5c710,0x44891224,0x489640f1,0xe3c78204,0x810e552,0x142850a1, 0x18a51224,0x48822250,0x78f1e3c7,0x8f1f40f9,0xf3e7c204,0x8108912,0x24489122,0x7ea91224,0x4888a222,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x10007e2,0x85648080,0x20010000,0x88841,0x8f8232,0x20881000,0xc1fc610,0xbefa2408,0x90204288,0x40450816,0xa642810a,0x4041110a, 0x36282084,0x1042080,0x1122408,0x90084488,0x40450212,0x62448912,0x184110a,0x55305082,0x8042700,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1028207,0x82004801,0x68050040,0x1c000040,0x110a,0x60000001,0x45484d10,0x7cf9f3e7,0xcf944081,0x2040204,0x8104532,0x142850a1, 0x18a51224,0x48822248,0x89122448,0x91244081,0x2040204,0x8108912,0x24489122,0xc91224,0x48852214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x282, 0x89630080,0x20010c00,0x30108842,0x810222,0x20882306,0x3001800,0x408a2208,0x90202288,0x40448814,0xa642810a,0x2041110a,0x26442104, 0x840000,0x1122408,0x90084488,0x40448212,0x62448912,0x84130a,0x36485102,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x101c208,0x4f802801, 0x8028040,0x40,0x130a,0x2,0x85e897a0,0x44891224,0x489c2081,0x2040204,0x8104532,0x142850a1,0x24cd1224,0x48823c44,0x89122448, 0x91244081,0x2040204,0x8108912,0x24489122,0xc93264,0xc9852214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100028f,0x109f0080,0x20010c00, 0x303071f3,0xc7011c1c,0x4071c306,0x802010,0x3907c1ef,0x1f201e89,0xf3844f90,0xa23c80f2,0x17810e04,0x228223f4,0x840000,0xfbc3c7, 0x8f083c88,0x40444212,0x6238f0f2,0x7039d04,0x228423e2,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1008780,0x2201800,0xf0014000,0x1f0, 0x1d0a,0x5,0x851e140,0x83060c18,0x30671ef9,0xf3e7cf9f,0x3e7c7911,0xe3c78f1e,0x42f8e1c3,0x8702205c,0x7cf9f3e7,0xcf9b3c78,0xf1e3c204, 0x8107111,0xc3870e1c,0x10f1d3a7,0x4e823c08,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x40,0x40000400,0x200000,0x0,0x2,0x0,0x0,0x0,0x0,0x18, 0x0,0x4,0x44007f,0x0,0x400,0x400000,0x8010,0x0,0x6002,0x8040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x200800,0x0,0x0,0x100a, 0x400000,0x44,0x0,0x400,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x62018,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x31,0x80000800, 0x400000,0x0,0x4,0x0,0x0,0x0,0x0,0xc,0x0,0x7,0x3c0000,0x0,0x3800,0x3800000,0x8010,0x0,0x1c001,0x881c0000,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x207000,0x0,0x0,0x100a,0xc00000,0x3c,0x0,0xc00,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x0,0x1c2070 }; // Definition of a 10x13 font (used in dialog boxes). const unsigned int font10x13[256*10*13/32] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80100c0, 0x68000300,0x801,0xc00010,0x100c000,0x68100,0x100c0680,0x2,0x403000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc,0x0,0x0,0x0,0x0,0x0,0x4020120, 0x58120480,0x402,0x1205008,0x2012050,0x58080,0x20120581,0x40000001,0x804812,0x2000000,0x0,0x300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x140,0x80000,0x200402,0x800000,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x7010,0x7000000,0x8000200,0x20000,0xc0002000,0x8008,0x0,0x0,0x0,0x0,0x808,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x80000000,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x480,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x80100c0,0x68000480,0x1001, 0xc00010,0x1018000,0x68100,0x100c0680,0x4,0x403000,0x1020000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20140,0x28081883,0x200801, 0x2a00000,0x10,0x1c0201c0,0x70040f80,0xc0f81c07,0x0,0x70,0x3e0303c0,0x3c3c0f83,0xe03c2107,0xe08810,0x18c31070,0x3c0703c0, 0x783e0842,0x22222208,0x83e04010,0x1008000,0x4000200,0x20001,0x2002,0x408008,0x0,0x0,0x100000,0x0,0x1008,0x2000000,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20080,0x38000880,0x8078140f,0x81c00000,0x3e000,0xc020180,0x60080001,0xe0000002,0xc00042,0x108e2010, 0xc0300c0,0x300c0303,0xf83c3e0f,0x83e0f81c,0x701c070,0x3c0c41c0,0x701c0701,0xc0001d08,0x42108421,0x8820088,0x4020120,0x58140480, 0x802,0x1205008,0x3014050,0xc058080,0x20120581,0x40000002,0x804814,0x2020050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20140, 0x281e2484,0x80200801,0x1c02000,0x10,0x22060220,0x880c0801,0x82208,0x80000001,0x20008,0x41030220,0x40220802,0x402102,0x209010, 0x18c31088,0x22088220,0x80080842,0x22222208,0x80204010,0x1014000,0x200,0x20001,0x2000,0x8008,0x0,0x0,0x100000,0x0,0x1008, 0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x40000500,0x80800010,0x40200000,0x41000,0x12020040,0x10000003,0xa0000006, 0x12000c4,0x31014000,0xc0300c0,0x300c0302,0x80402008,0x2008008,0x2008020,0x220c4220,0x88220882,0x20002208,0x42108421,0x8820088, 0x0,0x300,0x0,0x0,0x0,0x14000000,0x0,0x200200,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0xfc282504,0x80001000, 0x82a02000,0x20,0x22020020,0x8140802,0x102208,0x80801006,0x18008,0x9c848220,0x80210802,0x802102,0x20a010,0x15429104,0x22104220, 0x80080842,0x22221405,0x404008,0x1022000,0x703c0,0x381e0701,0xc0783c02,0xc09008,0x1d83c070,0x3c078140,0x381c0882,0x21242208, 0x81e01008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x201e0,0x40220500,0x80800027,0x20e02800,0x9c800,0x12020040, 0x20000883,0xa0200002,0x120a044,0x11064010,0x12048120,0x48120484,0x80802008,0x2008008,0x2008020,0x210a4411,0x4411044,0x10884508, 0x42108421,0x503c0b0,0x1c0701c0,0x701c0707,0x70381c07,0x1c07008,0x2008020,0x20f01c0,0x701c0701,0xc0201c08,0x82208822,0x883c088, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x50281903,0x20001000,0x80802000,0x20,0x22020040,0x30240f03,0xc0101c08,0x80801018, 0x1fc06010,0xa48483c0,0x80210f03,0xe0803f02,0x20c010,0x15429104,0x22104220,0x70080841,0x41540805,0x804008,0x1041000,0x8220, 0x40220881,0x882202,0x40a008,0x12422088,0x22088180,0x40100882,0x21241408,0x80201008,0x2031000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x20280,0x401c0200,0x700028,0x21205000,0x92800,0xc1fc080,0x10000883,0xa0200002,0x1205049,0x12c19010,0x12048120,0x48120484, 0xf0803c0f,0x3c0f008,0x2008020,0x790a4411,0x4411044,0x10504908,0x42108421,0x5022088,0x2008020,0x8020080,0x88402208,0x82208808, 0x2008020,0x1e088220,0x88220882,0x20002608,0x82208822,0x8822088,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x501c0264, 0xa0001000,0x8001fc00,0x7000020,0x22020080,0x83e0082,0x20202207,0x80000020,0x1020,0xa4848220,0x80210802,0x9c2102,0x20c010, 0x12425104,0x3c1043c0,0x8080841,0x41540802,0x804008,0x1000000,0x78220,0x40220f81,0x882202,0x40c008,0x12422088,0x22088100, 0x60100881,0x41540805,0x406008,0x1849000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20280,0xf0140200,0x880028,0x20e0a03f,0x709c800, 0x201c0,0x60000881,0xa0000007,0xc0284b,0x122eb020,0x12048120,0x48120487,0x80802008,0x2008008,0x2008020,0x21094411,0x4411044, 0x10204908,0x42108421,0x2022088,0x1e0781e0,0x781e0787,0xf8403e0f,0x83e0f808,0x2008020,0x22088220,0x88220882,0x21fc2a08,0x82208822, 0x5022050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0xf80a0294,0x40001000,0x80002000,0x20,0x22020100,0x8040082,0x20202200, 0x80000018,0x1fc06020,0xa48fc220,0x80210802,0x842102,0x20a010,0x12425104,0x20104240,0x8080841,0x41541402,0x1004008,0x1000000, 0x88220,0x40220801,0x882202,0x40a008,0x12422088,0x22088100,0x18100881,0x41540805,0x801008,0x2046000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x20280,0x401c0f80,0x80880028,0x20005001,0x94800,0x20000,0x880,0xa0000000,0x5015,0x4215040,0x3f0fc3f0,0xfc3f0fc8, 0x80802008,0x2008008,0x2008020,0x21094411,0x4411044,0x10505108,0x42108421,0x203c088,0x22088220,0x88220888,0x80402008,0x2008008, 0x2008020,0x22088220,0x88220882,0x20002a08,0x82208822,0x5022050,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa00a0494,0x60001000, 0x80002004,0x8020,0x22020200,0x88040882,0x20402201,0x801006,0x18000,0x9f084220,0x40220802,0x442102,0x209010,0x10423088,0x20088220, 0x8080840,0x80882202,0x2004008,0x1000000,0x88220,0x40220881,0x882202,0x409008,0x12422088,0x22088100,0x8100880,0x80881402, 0x1001008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20280,0x40220200,0x80700027,0x20002801,0x92800,0x1fc000,0x980, 0xa0000000,0xa017,0x84417840,0x21084210,0x84210848,0x80402008,0x2008008,0x2008020,0x2208c220,0x88220882,0x20882208,0x42108421, 0x2020088,0x22088220,0x88220888,0xc8402208,0x82208808,0x2008020,0x22088220,0x88220882,0x20203208,0x82208822,0x2022020,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0xa03c0463,0x90000801,0x2004,0x8040,0x1c0703e0,0x70040701,0xc0401c06,0x801001,0x20020, 0x400843c0,0x3c3c0f82,0x3c2107,0x1c0881e,0x10423070,0x20070210,0xf0080780,0x80882202,0x3e04004,0x1000000,0x783c0,0x381e0701, 0x782202,0x408808,0x12422070,0x3c078100,0x700c0780,0x80882202,0x1e01008,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x201e0, 0xf8000200,0x80080010,0x40000001,0x41000,0x0,0xe80,0xa0000000,0x21,0x8e21038,0x21084210,0x84210848,0xf83c3e0f,0x83e0f81c, 0x701c070,0x3c08c1c0,0x701c0701,0xc0005c07,0x81e0781e,0x20200b0,0x1e0781e0,0x781e0787,0x30381c07,0x1c07008,0x2008020,0x1c0881c0, 0x701c0701,0xc0201c07,0x81e0781e,0x203c020,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x801,0x4,0x40,0x0,0x0,0x0,0x1000, 0x0,0x3c000000,0x0,0x0,0x0,0x0,0x10000,0x0,0x0,0x4004,0x1000000,0x0,0x0,0x80000,0x400000,0x0,0x20008000,0x0,0x4,0x1008,0x2000000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x8008000f,0x80000000,0x3e000,0x0,0x800,0xa0000400,0x0,0x0,0x0,0x0,0x80000,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x0,0x0,0x0,0x0,0x2000,0x0,0x4020040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000, 0x402,0x8,0x40,0x0,0x0,0x0,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x0,0x7004,0x70000fc,0x0,0x0,0x700000,0x800000,0x0,0x20008000, 0x0,0x4,0x808,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x80f00000,0x0,0x0,0x0,0x800,0xa0001800,0x0,0x0,0x0,0x0, 0x300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x4020040 }; // Definition of a 8x17 font const unsigned int font8x17[8*17*256/32] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x2400,0x2400,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20081834,0x1c0000,0x20081800,0x20081800,0x342008, 0x18340000,0x200818,0x80000,0x0,0x180000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4200000,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x380000,0x4000,0x2000c00,0x40100840,0x70000000,0x0,0x0,0x1c,0x10700000,0x7,0x0, 0x1800,0x1800,0x0,0x0,0x0,0x14,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1010242c,0x14140000,0x10102414,0x10102414,0x2c1010,0x242c1400, 0x101024,0x14100038,0x0,0x240000,0x0,0x0,0x30000000,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12,0x0,0x8100000,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x80000,0x10004000,0x2001000,0x40000040,0x10000000,0x0,0x0,0x10,0x10100000,0x4, 0x0,0x18000000,0x0,0x0,0x0,0x34002400,0x2400,0x0,0x0,0x0,0x3c,0x0,0x8000000,0x0,0x60607800,0x0,0x140000,0x0,0x0,0x0,0x0,0x0, 0x44,0x10081834,0x240000,0x10081800,0x10081800,0x1c341008,0x18340000,0x100818,0x84000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102812, 0x8601c10,0x8100800,0x2,0x1c383e3e,0x67e1e7f,0x3e3c0000,0x38,0x1e087e1e,0x7c7f7f1e,0x417c1c42,0x4063611c,0x7e1c7e3e,0xfe414181, 0x63827f10,0x40081000,0x8004000,0x2001000,0x40000040,0x10000000,0x0,0x10000000,0x10,0x10100000,0x3c000008,0x0,0x24003e00, 0x3f007f00,0x0,0x0,0x2ce91800,0x1882,0x10101c,0xc2103c,0x143c3c00,0x3c00,0x18003c3c,0x10001f00,0x181c00,0x20200810,0x8080808, 0x8083e1e,0x7f7f7f7f,0x7c7c7c7c,0x7c611c1c,0x1c1c1c00,0x1e414141,0x41824044,0x810242c,0x14180000,0x8102414,0x8102414,0x382c0810, 0x242c1400,0x81024,0x14104014,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102816,0x3e902010,0x10084910,0x4,0x22084343,0xa402102,0x41620000, 0x44,0x33144121,0x42404021,0x41100444,0x40636122,0x43224361,0x10416381,0x22440310,0x20082800,0x4000,0x2001000,0x40000040, 0x10000000,0x0,0x10000000,0x10,0x10100000,0x24000008,0x0,0x606100,0x68000300,0x8106c,0x34000000,0x4f0000,0x44,0x101020,0x441040, 0x420200,0x4200,0x24000404,0x7d00,0x82200,0x20203010,0x14141414,0x14082821,0x40404040,0x10101010,0x42612222,0x22222200,0x23414141, 0x41447e48,0x0,0x0,0x0,0x0,0x4000000,0x18,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10287f,0x49902010,0x10083e10,0x4,0x41080101, 0x1a404002,0x41411818,0x1004004,0x21144140,0x41404040,0x41100448,0x40555141,0x41414140,0x10412281,0x14280610,0x20084400,0x1c7c1c, 0x3e3c7c3a,0x5c703844,0x107f5c3c,0x7c3e3c3c,0x7e424281,0x66427e10,0x10100000,0x40100008,0x1010,0xa04000,0x48100610,0x100c3024, 0x24000000,0x4f3c00,0x2c107e28,0x3820,0x42281060,0x9d1e12,0xbd00,0x24100818,0x427d00,0x82248,0x20200800,0x14141414,0x14142840, 0x40404040,0x10101010,0x41514141,0x41414142,0x43414141,0x41284350,0x1c1c1c1c,0x1c1c6c1c,0x3c3c3c3c,0x70707070,0x3c5c3c3c, 0x3c3c3c18,0x3e424242,0x42427c42,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x102824,0x48623010,0x10081c10,0x8,0x41080103,0x127c5e04, 0x41411818,0xe7f3808,0x4f144140,0x41404040,0x41100450,0x40555141,0x41414160,0x1041225a,0x1c280410,0x1008c600,0x226622,0x66661066, 0x62100848,0x10496266,0x66663242,0x10426681,0x24220260,0x100c0000,0xf8280008,0x1010,0x606000,0x48280428,0x28042014,0x48000000, 0x494200,0x52280228,0x105420,0x3cee1058,0xa12236,0xa500,0x18101004,0x427d00,0x8226c,0x76767e10,0x14141414,0x14142840,0x40404040, 0x10101010,0x41514141,0x41414124,0x45414141,0x41284150,0x22222222,0x22221222,0x66666666,0x10101010,0x66626666,0x66666600, 0x66424242,0x42226622,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100024,0x381c4900,0x10086bfe,0x8,0x4908021c,0x22036304,0x3e630000, 0x70000710,0x51227e40,0x417f7f43,0x7f100470,0x40554941,0x43417e3e,0x1041225a,0x8100810,0x10080000,0x24240,0x42421042,0x42100850, 0x10494242,0x42422040,0x1042245a,0x18240410,0x10103900,0x407c003e,0x1818,0x1c3e10,0x4f7c087c,0x7c002010,0x48000000,0x4008, 0x527c0410,0x105078,0x2410104c,0xa13e6c,0x7f00b900,0xfe3c3c,0x421d18,0x1c1c36,0x38383810,0x22222222,0x22144e40,0x7f7f7f7f, 0x10101010,0xf1494141,0x41414118,0x49414141,0x4110435c,0x2020202,0x2021240,0x42424242,0x10101010,0x42424242,0x424242ff,0x4e424242, 0x42244224,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000fe,0xe664d00,0x10080810,0x380010,0x41080c03,0x42014108,0x633d0000,0x70000710, 0x51224140,0x41404041,0x41100448,0x40494541,0x7e414203,0x1041145a,0x14101010,0x10080000,0x3e4240,0x427e1042,0x42100870,0x10494242, 0x4242203c,0x1042245a,0x18241810,0x10104600,0xf8f60008,0x1010,0x600320,0x48f610f6,0xf6000000,0x187eff,0x3c04,0x5ef61810,0x105020, 0x24fe0064,0x9d006c,0x138ad00,0x100000,0x420518,0x36,0xc0c0c020,0x22222222,0x22224840,0x40404040,0x10101010,0x41454141,0x41414118, 0x51414141,0x41107e46,0x3e3e3e3e,0x3e3e7e40,0x7e7e7e7e,0x10101010,0x42424242,0x42424200,0x5a424242,0x42244224,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x28,0x9094500,0x10080010,0x10,0x41081801,0x7f014118,0x41010000,0xe7f3800,0x513e4140,0x41404041,0x41100444, 0x40414541,0x40414101,0x10411466,0x36103010,0x8080000,0x424240,0x42401042,0x42100848,0x10494242,0x42422002,0x10423c5a,0x18142010, 0x10100000,0x407c0010,0x1010,0x260140,0x487c307c,0x7c000000,0x180000,0x202,0x507c2010,0x105020,0x3c10003c,0x423e36,0x1004200, 0x100000,0x420500,0x3e6c,0x41e0440,0x3e3e3e3e,0x3e3e7840,0x40404040,0x10101010,0x41454141,0x41414124,0x61414141,0x41104042, 0x42424242,0x42425040,0x40404040,0x10101010,0x42424242,0x42424218,0x72424242,0x42144214,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100048, 0x49096200,0x8100010,0x18001810,0x22082043,0x2432310,0x61421818,0x1004010,0x4f634121,0x42404021,0x41104444,0x40414322,0x40234143, 0x10411466,0x22106010,0x8080000,0x466622,0x66621066,0x42100844,0x10494266,0x66662042,0x10461824,0x24184010,0x10100000,0x24381010, 0x34001018,0xda4320,0x68386038,0x38000000,0x0,0x4204,0x50384010,0x105420,0x4210100c,0x3c0012,0x3c00,0x0,0x460500,0x48,0xc020c44, 0x63636363,0x63228821,0x40404040,0x10101010,0x42432222,0x22222242,0x62414141,0x41104042,0x46464646,0x46465022,0x62626262, 0x10101010,0x66426666,0x66666618,0x66464646,0x46186618,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100048,0x3e063d00,0x8100000,0x18001820, 0x1c3e7f3e,0x23c1e20,0x3e3c1818,0x10,0x20417e1e,0x7c7f401e,0x417c3842,0x7f41431c,0x401e40be,0x103e0866,0x41107f10,0x4080000, 0x3a5c1c,0x3a3c103a,0x427c0842,0xe49423c,0x7c3e203c,0xe3a1824,0x66087e10,0x10100000,0x3c103010,0x245a1010,0x5a3e10,0x3f107f10, 0x10000000,0x0,0x3c08,0x2e107e10,0x1038fc,0x101004,0x0,0x0,0xfe0000,0x7f0500,0x0,0x14041438,0x41414141,0x41418e1e,0x7f7f7f7f, 0x7c7c7c7c,0x7c431c1c,0x1c1c1c00,0xbc3e3e3e,0x3e10405c,0x3a3a3a3a,0x3a3a6e1c,0x3c3c3c3c,0x7c7c7c7c,0x3c423c3c,0x3c3c3c00, 0x7c3a3a3a,0x3a087c08,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x4200000,0x10000020,0x0,0x0,0x10,0x0,0x30000000,0x0, 0x0,0x0,0x60000,0x0,0x1c,0x4380000,0x0,0x2,0x800,0x0,0x40020000,0x0,0x8000c,0x10600000,0x2010,0x48000000,0x240000,0x0,0x0, 0x0,0x0,0x0,0x1000,0x1078,0x0,0x0,0x0,0x400500,0x0,0x1e081e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x84008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x20000040,0x0,0x0,0x20,0x0,0x1e000000,0x0,0x0,0x0,0x20000,0x0, 0x0,0x2000000,0x0,0x26,0x800,0x0,0x40020000,0x0,0x100000,0x10000000,0x2030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x1000,0x0, 0x0,0x0,0x400000,0x8000000,0x41e0400,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x104010,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe,0x0,0x1c,0x7000,0x0,0x40020000,0x0,0x300000, 0x0,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x400000,0x38000000,0x0,0x0,0x1c,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1c,0x0,0x0,0x0,0x0,0x0,0x304030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 }; // Definition of a 10x19 font const unsigned int font10x19[10*19*256/32] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3600000,0x36000,0x0,0x0,0x0,0x0,0x6c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x180181c0,0xe81b0300,0x1801,0x81c06c18,0x181c06c,0xe8180,0x181c0e81,0xb0000006,0x60701b,0x1800000,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x1c000,0x0,0x0,0x0,0x0,0x6c,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0xc030360,0xb81b0480,0xc03,0x3606c0c,0x303606c,0xb80c0,0x30360b81,0xb0000003,0xc0d81b,0x3000000,0x0, 0x300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x2200000, 0x22000,0x0,0x0,0x0,0x0,0x0,0x0,0x30000,0x0,0xe0,0x38078000,0x0,0x480,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000c080,0x480,0x3000, 0xc0800030,0xc08000,0x300,0xc080000,0xc,0x302000,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x41c01,0xe020060c, 0x800000,0x4,0x1e0703e0,0xf8060fc1,0xe1fe1e07,0x80000000,0x78,0x307e0,0x3c7c1fe7,0xf83c408f,0x80f10440,0x18660878,0x7e0787e0, 0x78ff9024,0xa0140a0,0x27f83840,0x700e000,0x18000400,0x8000,0x70004002,0x410078,0x0,0x0,0x0,0x0,0x1808,0xc000000,0xf000000, 0xe000000,0x1400,0x1e0001f,0x8007f800,0x0,0x0,0x3a3b,0x61400000,0x14202,0x20000,0x38002020,0x3c1b00,0x3e00000,0xf8,0x1c0001c0, 0x78060001,0xf800000e,0x1e00020,0x8004020,0xc0300c0,0x300c0301,0xf83c7f9f,0xe7f9fe3e,0xf83e0f8,0x7c1821e0,0x781e0781,0xe0001f10, 0x24090240,0xa02400f8,0x18018140,0xe81b0480,0x1801,0x81406c18,0x181406c,0x190e8180,0x18140e81,0xb0000006,0x60501b,0x184006c, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x26042202,0x200c06,0x800000,0x8,0x210d0611,0x40e0803,0x10026188,0x40000000, 0x8c,0xf030418,0xc6431004,0xc64082,0x110840,0x18660884,0x41084410,0x8c081024,0xa012110,0x40082020,0x101b000,0xc000400,0x8000, 0x80004002,0x410008,0x0,0x0,0x100000,0x0,0x2008,0x2000000,0x18800000,0x10000000,0x2200,0x2300024,0x800,0x0,0x0,0x2e13,0x60800000, 0x8104,0x20040,0x64001040,0x80401b07,0x80100000,0x1e000,0x22000020,0x40c0003,0xc8000002,0x3300020,0x8004020,0xc0300c0,0x300c0301, 0x40c64010,0x4010008,0x2008020,0x43182210,0x84210842,0x10002190,0x24090240,0x9044018c,0xc030220,0xb81b0300,0xc03,0x2206c0c, 0x302206c,0x1e0b80c0,0x30220b81,0xb0000003,0xc0881b,0x304006c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x241f2202, 0x200802,0x4900000,0x8,0x21010408,0x20a0802,0x44090,0x20000000,0x4,0x11878408,0x80411004,0x804082,0x111040,0x1ce50986,0x40986409, 0x81022,0x12012108,0x80102020,0x1031800,0x400,0x8000,0x80004000,0x10008,0x0,0x0,0x100000,0x0,0x2008,0x2000000,0x10000000, 0x10000000,0x18,0x4000044,0x1000,0x30180,0xd81b0000,0x13,0xe0000000,0x88,0x40,0x400018c0,0x80400018,0x61f00000,0x61800,0x22020020, 0x4000007,0xc8000002,0x2100020,0x8038000,0x1e0781e0,0x781e0301,0x40804010,0x4010008,0x2008020,0x41142619,0x86619866,0x18002190, 0x24090240,0x8887e104,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20120,0x2434a202, 0x200802,0x3e00000,0x10,0x40810008,0x21a0804,0x44090,0x20000000,0x80040004,0x20848409,0x409004,0x1004082,0x112040,0x14a50902, 0x40902409,0x81022,0x11321208,0x80202010,0x1060c00,0x7c5e0,0x781e8783,0xf07a5f0e,0x1c10808,0xfc5f078,0x5e07a170,0x7c7e1024, 0xa016190,0x27f82008,0x2000000,0x20000000,0x10000000,0x80200024,0x4000044,0x2000,0x18180,0xc8320000,0x12,0xa1f00037,0x7f888, 0x1e0,0x40410880,0x80600017,0xa2100000,0x5e800,0x22020040,0x38001027,0xc8000002,0x2100020,0x8004020,0x12048120,0x48120482, 0x41004010,0x4010008,0x2008020,0x40942409,0x2409024,0x9044390,0x24090240,0x88841918,0x1f07c1f0,0x7c1f07c3,0x70781e07,0x81e07838, 0xe0380e0,0x1f17c1e0,0x781e0781,0xe0001f90,0x24090240,0x9025e102,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0xff241c41, 0x1001,0x1c02000,0x10,0x40810008,0x6120f85,0xe0086190,0x20c03007,0x8007800c,0x27848419,0x409004,0x1004082,0x114040,0x14a48902, 0x40902409,0x81022,0x11321205,0x602010,0x1000000,0x86610,0x84218840,0x80866182,0x411008,0x9261884,0x61086189,0x82101022,0x12012108, 0x40082008,0x2000000,0x20030000,0x20000000,0x80200024,0x4000044,0x3006030,0xc018100,0x4c260000,0x12,0x26080048,0x83000850, 0x20250,0x403e0500,0x8078002c,0x12302200,0x92400,0x1c0200c0,0x4001027,0xc8000002,0x3308820,0x8004020,0x12048120,0x48120482, 0x41004010,0x4010008,0x2008020,0x40922409,0x2409024,0x8884690,0x24090240,0x85040920,0x21886218,0x86218860,0x88842108,0x42108408, 0x2008020,0x21186210,0x84210842,0x10302190,0x24090240,0x88461084,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x4c240182, 0x80001001,0x6b02000,0x20,0x4c810010,0x78220846,0x10081e10,0x20c0301c,0x1fe0e018,0x4d8487e1,0x409fe7,0xf9007f82,0x11a040, 0x13248902,0x41102418,0xe0081022,0x11320c05,0x402008,0x1000000,0x2409,0x409020,0x81024082,0x412008,0x9240902,0x40902101,0x101022, 0x11321208,0x40102008,0x2000000,0x7e0c8000,0xfc000003,0xf0fc0018,0x43802047,0x8c8040c8,0x32008300,0x44240000,0x0,0x4000048, 0x8c801050,0x20440,0x40221dc0,0x808c0028,0x11d0667f,0x8009c400,0x1fc180,0x4001023,0xc8300002,0x1e0ccfb,0x3ec7b020,0x12048120, 0x48120482,0x79007f9f,0xe7f9fe08,0x2008020,0xf0922409,0x2409024,0x8504490,0x24090240,0x85040920,0x802008,0x2008020,0x89004090, 0x24090208,0x2008020,0x40902409,0x2409024,0x8304390,0x24090240,0x88440884,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000, 0x481c0606,0xc8001001,0x802000,0x20,0x4c810020,0x4220024,0x8102108,0x60000070,0x3820,0x48884419,0x409004,0x10e4082,0x112040, 0x13244902,0x7e1027e0,0x3c081021,0x21320c02,0x802008,0x1000000,0x7e409,0x409020,0x81024082,0x414008,0x9240902,0x40902101, 0x80101022,0x11320c08,0x40202008,0x2038800,0x200bc000,0x20000000,0x80200003,0x80f04044,0xbc080bc,0x2f000200,0x0,0x0,0x6001048, 0x8bc02020,0x20441,0xf8220200,0x80820028,0x1000cc00,0x80094400,0x201e0,0x78001021,0xc830000f,0x8000663c,0xf03c0c0,0x21084210, 0x84210846,0x41004010,0x4010008,0x2008020,0x40912409,0x2409024,0x8204890,0x24090240,0x82040930,0x1f87e1f8,0x7e1f87e0,0x89004090, 0x24090208,0x2008020,0x40902409,0x2409024,0x8004690,0x24090240,0x88440884,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000, 0x480719c4,0x48001001,0x81fc00,0x7800020,0x40810040,0x2420024,0x8104087,0xa0000070,0x3820,0x48884409,0x409004,0x1024082,0x111040, 0x13244902,0x40102410,0x2081021,0x214a1202,0x1802008,0x1000000,0x182409,0x409fe0,0x81024082,0x41a008,0x9240902,0x40902100, 0xf8101021,0x214a0c04,0x80c0c008,0x1847000,0x7c1ee000,0x20000000,0x8020000c,0x8c044,0x1ee181ee,0x7b800000,0x707,0xf3ff0000, 0x3e0084f,0x9ee0c020,0x20440,0x40221fc0,0xc2002c,0x13f11000,0x87892400,0x20000,0x1020,0x48000000,0x3f011c6,0x31cc6180,0x21084210, 0x84210844,0x41004010,0x4010008,0x2008020,0x40912409,0x2409024,0x8505090,0x24090240,0x8204191c,0x60982609,0x82609823,0xf9007f9f, 0xe7f9fe08,0x2008020,0x40902409,0x2409024,0x9fe4c90,0x24090240,0x84840848,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xfe048224, 0x28001001,0x2000,0x40,0x40810080,0x27f8024,0x8104080,0x2000001c,0x1fe0e020,0x488fc409,0x409004,0x1024082,0x110840,0x10242902, 0x40102408,0x2081021,0x214a1202,0x1002004,0x1000000,0x102409,0x409000,0x81024082,0x411008,0x9240902,0x40902100,0x6101021, 0x214a0c04,0x81002008,0x2000000,0x201dc000,0x20000000,0x80200000,0x98044,0x1dc101dc,0x77000000,0x700,0x0,0x180448,0x1dc10020, 0x20440,0x403e0200,0x620017,0xa000cc00,0x80052800,0x20000,0x1020,0x48000000,0x6606,0x206100,0x3f0fc3f0,0xfc3f0fc7,0xc1004010, 0x4010008,0x2008020,0x4090a409,0x2409024,0x8886090,0x24090240,0x8207e106,0x40902409,0x2409024,0x81004010,0x4010008,0x2008020, 0x40902409,0x2409024,0x8005890,0x24090240,0x84840848,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x98048224,0x30001001,0x2000, 0x40,0x21010100,0x2020024,0x8204080,0x40000007,0x80078000,0x48884408,0x80411004,0x824082,0x110840,0x10242986,0x40086409,0x2081021, 0xe14a2102,0x2002004,0x1000000,0x106409,0x409000,0x81024082,0x410808,0x9240902,0x40902100,0x2101021,0x214a1202,0x82002008, 0x2000000,0x300f8000,0x20000000,0x80fc001d,0xe4088044,0xf8200f8,0x3e000000,0x300,0x0,0x80c48,0xf820020,0x20640,0x40410200, 0x803c0018,0x60006600,0x61800,0x0,0x1020,0x48000000,0xcc0a,0x20a100,0x21084210,0x84210844,0x40804010,0x4010008,0x2008020, 0x4110a619,0x86619866,0x19046110,0x24090240,0x82040102,0x41906419,0x6419064,0x81004010,0x4010008,0x2008020,0x40902409,0x2409024, 0x8307090,0x24090240,0x82840828,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x90248222,0x30000802,0x200c,0xc080,0x21010301, 0x4021042,0x10202108,0xc0c03000,0x80040020,0x4d902418,0xc6431004,0xc24082,0x6210440,0x10241884,0x40084409,0x86080840,0xc0842102, 0x4002002,0x1000000,0x18e610,0x84218820,0x80864082,0x410408,0x9240884,0x61086101,0x6101860,0xc0842103,0x4002008,0x2000000, 0x10850180,0x20330000,0x80200013,0x26184024,0x5040050,0x14000000,0x0,0x0,0x4180848,0x85040020,0x20350,0x40000200,0x800c0007, 0x80002200,0x1e000,0x0,0x1860,0x48000000,0x880a,0x40a188,0x40902409,0x2409028,0x40c64010,0x4010008,0x2008020,0x43106210,0x84210842, 0x10006108,0x42108421,0x2040102,0x6398e639,0x8e6398e4,0x88842088,0x22088208,0x2008020,0x21102210,0x84210842,0x10306118,0x66198661, 0x83061030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20001,0x901f01c1,0xe8000802,0xc,0xc080,0x1e07c7f8,0xf8020f81,0xe0401e07, 0x80c03000,0x20,0x279027e0,0x3c7c1fe4,0x3c408f,0x83c1027f,0x90241878,0x4007c404,0xf8080780,0xc0844082,0x7f82002,0x1000000, 0xfa5e0,0x781e87c0,0x807a409f,0xc0410207,0x9240878,0x5e07a100,0xf80e0fa0,0xc0846183,0x7f82008,0x2000000,0xf020100,0x40321360, 0x80200014,0xa3e0201f,0x8207f820,0x8000000,0x0,0x0,0x3e01037,0x207f820,0x201e1,0xfc000200,0x80040000,0x0,0x0,0x1fc000,0x17b0, 0x48000000,0x12,0xc120f0,0x40902409,0x2409028,0x783c7f9f,0xe7f9fe3e,0xf83e0f8,0x7c1061e0,0x781e0781,0xe000be07,0x81e0781e, 0x204017c,0x3e8fa3e8,0xfa3e8fa3,0x70781f07,0xc1f07c7f,0x1fc7f1fc,0x1e1021e0,0x781e0781,0xe0007e0f,0xa3e8fa3e,0x8305e030,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0xc06,0xc,0x100,0x0,0x0,0x0,0x3000,0x0,0x20000000,0x0,0x0,0x0,0x0,0xc000, 0x0,0x0,0x2001,0x1000000,0x0,0x0,0x20000,0x400000,0x0,0x40002000,0x0,0x1,0x2008,0x2000000,0x100,0x40240000,0x80200008,0x40000000, 0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x80040000,0x0,0x0,0x0,0x1000,0x48000000,0x1f,0x181f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1040010,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x60c,0x18,0x0, 0x0,0x0,0x0,0x6000,0x0,0x10000000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x3800,0x7000000,0x0,0x0,0x840000,0x400000,0x0,0x40002000, 0x0,0x2,0x2008,0x2000000,0x200,0x40440000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x80780000,0x0,0x0,0x0,0x1000,0x48000400, 0x2,0x1e02000,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x2040020,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x4000,0x0,0xf000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x780000,0x3800000,0x0,0x40002000,0x0,0xe,0x1808,0xc000000,0x3,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000, 0x0,0x0,0x0,0x1000,0x1c00,0x0,0x0,0x0,0x0,0x380000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x380000,0x0,0x0,0x0,0x0,0x0,0x0,0xe0400e0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3fc, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 }; // Definition of a 12x24 font const unsigned int font12x24[12*24*256/32] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x19,0x80000000,0x198000,0x0,0x0,0x0,0x0, 0x0,0x198,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc001806,0xc81980,0x60000000,0xc001806,0x1980c00,0x18060198,0xc80c, 0x180600,0xc8198000,0xc001,0x80601980,0x18000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x0,0xf0000,0x0,0x0,0x0,0x0,0x0,0x198,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x600300f,0x1301980,0x90000000,0x600300f,0x1980600,0x300f0198,0x13006,0x300f01,0x30198000,0x6003, 0xf01980,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x0,0x60000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7007,0x3c0000,0x3006019, 0x80000000,0x90000000,0x3006019,0x80000300,0x60198000,0x3,0x601980,0x0,0x3006,0x1980000,0x60000000,0x0,0x0,0xe0000000,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000000, 0x0,0x0,0x0,0x0,0x0,0xc800019,0x80000000,0x198000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x1001,0x420000,0x0,0x0,0x90000000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000c06,0xc80001,0x10000000,0x18000c06,0x1800,0xc060000,0xc818,0xc0600,0xc8000000, 0x18000,0xc0600000,0xc000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80660207,0x800f8060,0x300c004,0x0,0x6, 0xe00703f,0x3f00383,0xf80f07fc,0x1f01f000,0x0,0xf8,0x607f,0x7c7e07,0xfe7fe0f8,0x6063fc1f,0x86066007,0xe7060f0,0x7f80f07f, 0x81f8fff6,0x6606c03,0x70ee077f,0xe0786000,0xf0070000,0xc000060,0xc0,0x3e000,0x60006003,0x600fc00,0x0,0x0,0x0,0x0,0x0,0x3c0603, 0xc0000000,0x7800000,0xf0000,0x0,0xf00001f,0x80001fe0,0x7fe000,0x0,0x0,0x0,0x168fe609,0x0,0x90e07,0x6000,0x3c000e,0x70000f8, 0x1980001f,0x0,0x1f8,0xf00000f,0xf00180,0xfe000,0xe00e,0x1001,0x20060,0x6006006,0x600600,0x600fe07c,0x7fe7fe7f,0xe7fe3fc3, 0xfc3fc3fc,0x7e07060f,0xf00f00,0xf00f0000,0xf360660,0x6606606e,0x76001e0,0xc00180f,0x1681981,0x10000000,0xc00180f,0x1980c00, 0x180f0198,0x3801680c,0x180f01,0x68198000,0xc001,0x80f01980,0x18600198,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019, 0x8044020c,0xc01f8060,0x2004004,0x0,0xc,0x3f81f07f,0x87f80383,0xf81f87fc,0x3f83f800,0x0,0x1fc,0x780607f,0x81fe7f87,0xfe7fe1fc, 0x6063fc1f,0x860c6007,0xe7061f8,0x7fc1f87f,0xc3fcfff6,0x6606c03,0x30c6067f,0xe0783000,0xf00d8000,0x6000060,0xc0,0x7e000,0x60006003, 0x600fc00,0x0,0x0,0xc00,0x0,0x0,0x7c0603,0xe0000000,0xfc00000,0x1f0000,0x0,0x900003f,0xc0003fe0,0x7fe000,0x0,0x0,0x0,0x1302660f, 0x0,0xf0606,0x6004,0x7e0006,0x60601f8,0x19800001,0x80000000,0x1f8,0x19800010,0x81080300,0x3f2000,0x2011,0x1001,0x1c0060,0x6006006, 0x600600,0x601fe1fe,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7f87061f,0x81f81f81,0xf81f8000,0x3fa60660,0x66066066,0x66003f0,0x6003009, 0x1301981,0x10000000,0x6003009,0x1980600,0x30090198,0x1f013006,0x300901,0x30198000,0x6003,0x901980,0x30600198,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80cc0f8c,0xc0180060,0x6006044,0x40000000,0xc,0x3181b041,0xc41c0783,0x388018, 0x71c71800,0x0,0x106,0x18c0f061,0xc38261c6,0x600384,0x60606001,0x86186007,0xe78630c,0x60e30c60,0xe7040606,0x630cc03,0x39c30c00, 0xc0603000,0x3018c000,0x3000060,0xc0,0x60000,0x60000000,0x6000c00,0x0,0x0,0xc00,0x0,0x0,0x600600,0x60000000,0x18400000,0x180000, 0x0,0x19800070,0x40003600,0xc000,0x0,0x0,0x0,0x25a06,0x0,0x6030c,0x4,0xe20007,0xe060180,0xf000,0x80000000,0xf0000,0x10800000, 0x80080600,0x7f2000,0x2020,0x80001001,0x20000,0xf00f00f,0xf00f00,0x601b0382,0x60060060,0x6000600,0x60060060,0x61c78630,0xc30c30c3, 0xc30c000,0x30e60660,0x66066063,0xc600738,0x3006019,0x80000000,0xe0000000,0x3006019,0x80000300,0x60198000,0x3e000003,0x601980, 0x0,0x3006,0x1980000,0x60600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x80cc1fcc,0xc0180060,0x6006035,0x80000000, 0x18,0x71c03000,0xc00c0583,0x300018,0x60c60c00,0x0,0x6,0x3060f060,0xc30060c6,0x600300,0x60606001,0x86306007,0x9e78670e,0x60670e60, 0x66000606,0x630c606,0x19830c01,0xc0601800,0x30306000,0x60,0xc0,0x60000,0x60000000,0x6000c00,0x0,0x0,0xc00,0x0,0x0,0x600600, 0x60000000,0x18000000,0x300000,0x0,0x78060,0x6600,0x1c000,0x300c,0x39819c0,0x0,0x25a00,0x0,0x30c,0x4,0xc00003,0xc060180,0x30c1f, 0x80000000,0x30c000,0x10800001,0x80700000,0x7f2000,0x2020,0x80001001,0x20060,0xf00f00f,0xf00f00,0xf01b0300,0x60060060,0x6000600, 0x60060060,0x60c78670,0xe70e70e7,0xe70e000,0x70c60660,0x66066063,0xc7f8618,0x0,0x0,0x0,0x0,0x0,0x0,0x7000000,0x0,0x0,0x0, 0x0,0x600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6019,0x87ff3a4c,0xc0180060,0x400600e,0x600000,0x18,0x60c03000, 0xc00c0d83,0x700018,0x60c60c00,0x20,0x400006,0x3060f060,0xc6006066,0x600600,0x60606001,0x86606006,0x966c6606,0x60660660,0x66000606, 0x630c666,0xf019801,0x80601800,0x30603000,0x1f06f,0xf01ec0,0xf03fe1ec,0x6703e01f,0x61c0c06,0xdc6701f0,0x6f01ec0c,0xe1f87fc6, 0xc60cc03,0x71c60c7f,0xc0600600,0x60000000,0x30000000,0x300000,0x40040,0x88060,0x6600,0x18000,0x300c,0x1981980,0x0,0x2421f, 0x80003ce0,0x7fc198,0x601f,0xc02021,0x980600c0,0x40230,0x80000000,0x402000,0x19806003,0x80006,0xc7f2000,0x2020,0x80001001, 0x420060,0xf00f00f,0xf00f00,0xf01b0600,0x60060060,0x6000600,0x60060060,0x6066c660,0x66066066,0x6606208,0x60e60660,0x66066061, 0x987fc670,0x1f01f01f,0x1f01f01,0xf039c0f0,0xf00f00f,0xf03e03,0xe03e03e0,0x1f06701f,0x1f01f01,0xf01f0060,0x1e660c60,0xc60c60c6, 0xc6f060c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x7ff3207,0x8c0c0000,0xc00300e,0x600000,0x30,0x60c03000, 0xc01c0983,0xf0600030,0x31860c06,0x6001e0,0x78000e,0x23e1f861,0xc6006066,0x600600,0x60606001,0x86c06006,0x966c6606,0x60660660, 0xe7000606,0x630c666,0xf01f803,0x600c00,0x30000000,0x3f87f,0x83f83fc3,0xf83fe3fc,0x7f83e01f,0x6380c07,0xfe7f83f8,0x7f83fc0d, 0xf3fc7fc6,0xc71cc03,0x3183187f,0xc0600600,0x60000000,0xff806000,0x300000,0x40040,0x88070,0x6600,0x60030060,0x6001818,0x1883180, 0x0,0x2423f,0xc0007ff0,0x607fc1f8,0x603f,0x80c01fc1,0xf80601e0,0x5f220,0x80420000,0x5f2000,0xf006006,0x80006,0xc7f2000,0x2020, 0x82107c07,0xc03c0060,0x1f81f81f,0x81f81f80,0xf03b0600,0x60060060,0x6000600,0x60060060,0x6066c660,0x66066066,0x660671c,0x61660660, 0x66066061,0xf860e6c0,0x3f83f83f,0x83f83f83,0xf87fe3f8,0x3f83f83f,0x83f83e03,0xe03e03e0,0x3f87f83f,0x83f83f83,0xf83f8060, 0x3fc60c60,0xc60c60c3,0x187f8318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x883200,0x300c0000,0xc003035,0x80600000, 0x30,0x66c03001,0xc0f81983,0xf86f0030,0x1f071c06,0x600787,0xfe1e001c,0x6261987f,0x86006067,0xfe7fc600,0x7fe06001,0x87c06006, 0xf6646606,0x60e6067f,0xc3e00606,0x61986f6,0x600f007,0x600c00,0x30000000,0x21c71,0x830831c3,0x1c06031c,0x71c06003,0x6700c06, 0x6671c318,0x71831c0f,0x16040c06,0xc318606,0x1b031803,0x80600600,0x60000000,0x30009000,0x300000,0x40040,0x7003e,0x67e0,0x90070090, 0x9001818,0x8c3100,0x0,0x60,0x4000e730,0x900380f0,0x6034,0x80c018c7,0xfe060338,0xb0121,0x80c60000,0x909000,0x6008,0x1080006, 0xc3f2000,0x2011,0x3180060,0x60060e0,0x19819819,0x81981981,0x9833c600,0x7fe7fe7f,0xe7fe0600,0x60060060,0x60664660,0x66066066, 0x66063b8,0x62660660,0x66066060,0xf06066c0,0x21c21c21,0xc21c21c2,0x1c466308,0x31c31c31,0xc31c0600,0x60060060,0x31871c31,0x83183183, 0x18318000,0x71860c60,0xc60c60c3,0x18718318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x1981a00,0xe03e0000,0xc003044, 0x40600000,0x60,0x66c03001,0x80f03182,0x1c7f8030,0x3f83fc06,0x601e07,0xfe078038,0x6661987f,0x86006067,0xfe7fc61e,0x7fe06001, 0x87e06006,0x66666606,0x7fc6067f,0x81f80606,0x61986f6,0x6006006,0x600600,0x30000000,0xc60,0xc60060c6,0xc06060c,0x60c06003, 0x6e00c06,0x6660c60c,0x60c60c0e,0x6000c06,0xc318666,0x1f031803,0x600600,0x603c2000,0x30016800,0x1fe0000,0x1f81f8,0x1c1f,0x804067e1, 0x68060168,0x16800810,0xc42300,0x0,0x60,0x20c331,0x68030060,0x6064,0x3fc1040,0xf006031c,0xa011e,0x818c7fe0,0x909000,0x7fe1f, 0x80f00006,0xc0f2060,0xf80e,0x18c0780,0x780781c0,0x19819819,0x81981981,0x9833c600,0x7fe7fe7f,0xe7fe0600,0x60060060,0xfc666660, 0x66066066,0x66061f0,0x66660660,0x66066060,0x606066e0,0xc00c00,0xc00c00c0,0xc066600,0x60c60c60,0xc60c0600,0x60060060,0x60c60c60, 0xc60c60c6,0xc60c000,0x61c60c60,0xc60c60c3,0x1860c318,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x1980f81,0x80373000, 0xc003004,0x7fe0001,0xf0000060,0x60c03003,0x183180,0xc71c060,0x3181ec00,0x7000,0xe070,0x66619860,0xc6006066,0x60061e,0x60606001, 0x87606006,0x66626606,0x7f860661,0xc01c0606,0x6198696,0xf00600e,0x600600,0x30000000,0x1fc60,0xc60060c7,0xfc06060c,0x60c06003, 0x7c00c06,0x6660c60c,0x60c60c0c,0x7f00c06,0xc3b8666,0xe01b007,0x3c00600,0x3c7fe000,0xff03ec00,0x1fe0000,0x40040,0xe001,0xc0806603, 0xec0e03ec,0x3ec00010,0x0,0x60000000,0x7f,0x10c3f3,0xec070060,0x6064,0x3fc1040,0x6000030c,0xa0100,0x3187fe1,0xf09f1000,0x7fe00, 0x6,0xc012060,0x0,0xc63c03,0xc03c0380,0x19819819,0x81981981,0x98330600,0x60060060,0x6000600,0x60060060,0xfc662660,0x66066066, 0x66060e0,0x6c660660,0x66066060,0x6060e630,0x1fc1fc1f,0xc1fc1fc1,0xfc3fe600,0x7fc7fc7f,0xc7fc0600,0x60060060,0x60c60c60,0xc60c60c6, 0xc60c7fe,0x62c60c60,0xc60c60c1,0xb060c1b0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0xffe02c6,0x3c633000,0xc003004, 0x7fe0001,0xf00000c0,0x60c03006,0xc6180,0xc60c060,0x60c00c00,0x7000,0xe060,0x66639c60,0x66006066,0x600606,0x60606001,0x86306006, 0x66636606,0x60060660,0xc0060606,0x61f8696,0xf00600c,0x600300,0x30000000,0x3fc60,0xc60060c7,0xfc06060c,0x60c06003,0x7c00c06, 0x6660c60c,0x60c60c0c,0x1f80c06,0xc1b0666,0xe01b00e,0x3c00600,0x3c43c000,0x3007de00,0x600000,0x40040,0x30000,0x61006607,0xde0c07de, 0x7de00000,0x0,0xf07fefff,0x1f,0x8008c3f7,0xde0e0060,0x6064,0xc01047,0xfe00018c,0xb013f,0x86300061,0xf0911000,0x6000,0x6, 0xc012060,0x3f,0x8063c0cc,0x3cc0c700,0x39c39c39,0xc39c39c1,0x98630600,0x60060060,0x6000600,0x60060060,0x60663660,0x66066066, 0x66061f0,0x78660660,0x66066060,0x607fc618,0x3fc3fc3f,0xc3fc3fc3,0xfc7fe600,0x7fc7fc7f,0xc7fc0600,0x60060060,0x60c60c60,0xc60c60c6, 0xc60c7fe,0x64c60c60,0xc60c60c1,0xb060c1b0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0xffe0260,0x6661b000,0xc003000, 0x600000,0xc0,0x60c0300c,0xc7fe0,0xc60c060,0x60c01c00,0x1e07,0xfe078060,0x6663fc60,0x66006066,0x600606,0x60606001,0x86386006, 0x6636606,0x60060660,0xe0060606,0x60f039c,0x1b806018,0x600300,0x30000000,0x70c60,0xc60060c6,0x6060c,0x60c06003,0x7600c06, 0x6660c60c,0x60c60c0c,0x1c0c06,0xc1b03fc,0xe01f01c,0xe00600,0x70000000,0x3007fc00,0x600000,0x40040,0x0,0x62006607,0xfc1807fc, 0x7fc00000,0x0,0xf0000000,0x1,0xc004c307,0xfc1c0060,0x6064,0xc018c0,0x600000d8,0x5f200,0x3180060,0x50a000,0x6000,0x6,0xc012000, 0x0,0xc601c0,0x4201c600,0x3fc3fc3f,0xc3fc3fc3,0xfc7f0600,0x60060060,0x6000600,0x60060060,0x60663660,0x66066066,0x66063b8, 0x70660660,0x66066060,0x607f860c,0x70c70c70,0xc70c70c7,0xcc60600,0x60060060,0x6000600,0x60060060,0x60c60c60,0xc60c60c6,0xc60c000, 0x68c60c60,0xc60c60c1,0xf060c1f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3300260,0x6661e000,0xc003000,0x600000, 0x180,0x71c03018,0xc7fe0,0xc60c0c0,0x60c01800,0x787,0xfe1e0060,0x6663fc60,0x630060c6,0x600306,0x60606001,0x86186006,0x661e70e, 0x60070c60,0x60060606,0x60f039c,0x19806038,0x600180,0x30000000,0x60c60,0xc60060c6,0x6060c,0x60c06003,0x6700c06,0x6660c60c, 0x60c60c0c,0xc0c06,0xc1b039c,0x1f00e018,0x600600,0x60000000,0x1803f800,0x600000,0x40040,0x39e00,0x63006603,0xf83803f8,0x3f800000, 0x0,0x60000000,0x0,0xc00cc303,0xf8180060,0x6064,0xc01fc0,0x60060070,0x40200,0x18c0060,0x402000,0x6000,0x6,0xc012000,0x0,0x18c0140, 0x2014600,0x3fc3fc3f,0xc3fc3fc3,0xfc7f0300,0x60060060,0x6000600,0x60060060,0x60c61e70,0xe70e70e7,0xe70e71c,0x60e60660,0x66066060, 0x6060060c,0x60c60c60,0xc60c60c6,0xcc60600,0x60060060,0x6000600,0x60060060,0x60c60c60,0xc60c60c6,0xc60c000,0x70c60c60,0xc60c60c0, 0xe060c0e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x33022e0,0x6670c000,0xc003000,0x600600,0x60180,0x31803030, 0x41c0184,0x1831c0c0,0x71c23806,0x6001e0,0x780000,0x62630c60,0xe38261c6,0x600386,0x60606043,0x860c6006,0x661e30c,0x60030c60, 0x740e0607,0xe0f039c,0x31c06030,0x600180,0x30000000,0x61c71,0x830831c3,0x406031c,0x60c06003,0x6300c06,0x6660c318,0x71831c0c, 0x41c0c07,0x1c0e039c,0x1b00e030,0x600600,0x60000000,0x1c41b00e,0x601cc0,0x401f8,0x45240,0xe1803601,0xb03001b0,0x1b000000, 0x0,0x0,0x41,0xc008e711,0xb0300060,0x6034,0x80c02020,0x60060030,0x30c00,0xc60000,0x30c000,0x0,0x7,0x1c012000,0x0,0x3180240, 0x6024608,0x30c30c30,0xc30c30c3,0xc630382,0x60060060,0x6000600,0x60060060,0x61c61e30,0xc30c30c3,0xc30c208,0x70c70e70,0xe70e70e0, 0x6060068c,0x61c61c61,0xc61c61c6,0x1cc62308,0x30430430,0x43040600,0x60060060,0x31860c31,0x83183183,0x18318060,0x31c71c71, 0xc71c71c0,0xe07180e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x2203fc0,0x663f6000,0x6006000,0x600600,0x60300, 0x3f81fe7f,0xc7f80187,0xf83f80c0,0x3f83f006,0x600020,0x400060,0x33e6067f,0xc1fe7f87,0xfe6001fe,0x6063fc7f,0x60e7fe6,0x660e3f8, 0x6001f860,0x37fc0603,0xfc06030c,0x30c0607f,0xe06000c0,0x30000000,0x7fc7f,0x83f83fc3,0xfc0603fc,0x60c7fe03,0x61807c6,0x6660c3f8, 0x7f83fc0c,0x7f80fc3,0xfc0e039c,0x3180607f,0xc0600600,0x60000000,0xfc0e00c,0x601986,0x66040040,0x4527f,0xc0803fe0,0xe07fe0e0, 0xe000000,0x0,0x0,0x7f,0x80107ff0,0xe07fc060,0x603f,0x83fe0000,0x60060018,0xf000,0x420000,0xf0000,0x7fe00,0x7,0xfe012000, 0x0,0x2100640,0xc0643f8,0x60660660,0x66066067,0xec3e1fe,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7f860e3f,0x83f83f83,0xf83f8000, 0x5fc3fc3f,0xc3fc3fc0,0x606006fc,0x7fc7fc7f,0xc7fc7fc7,0xfcffe3f8,0x3fc3fc3f,0xc3fc7fe7,0xfe7fe7fe,0x3f860c3f,0x83f83f83, 0xf83f8060,0x7f83fc3f,0xc3fc3fc0,0x607f8060,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x2201f80,0x3c1e7000,0x6006000, 0x600,0x60300,0xe01fe7f,0xc3f00183,0xe01f0180,0x1f01e006,0x600000,0x60,0x3006067f,0x807c7e07,0xfe6000f8,0x6063fc3e,0x6067fe6, 0x660e0f0,0x6000f060,0x3bf80601,0xf806030c,0x60e0607f,0xe06000c0,0x30000000,0x1ec6f,0xf01ec0,0xf80601ec,0x60c7fe03,0x61c03c6, 0x6660c1f0,0x6f01ec0c,0x3f007c1,0xcc0e030c,0x71c0c07f,0xc0600600,0x60000000,0x7804018,0xe01186,0x66040040,0x39e3f,0x80401fe0, 0x407fe040,0x4000000,0x0,0x0,0x3f,0x203ce0,0x407fc060,0x601f,0x3fe0000,0x60060018,0x0,0x0,0x0,0x7fe00,0x6,0xe6012000,0x0, 0x7e0,0x1807e1f0,0x60660660,0x66066066,0x6c3e07c,0x7fe7fe7f,0xe7fe3fc3,0xfc3fc3fc,0x7e060e0f,0xf00f00,0xf00f0000,0x8f01f81f, 0x81f81f80,0x60600670,0x1ec1ec1e,0xc1ec1ec1,0xec79c0f0,0xf80f80f,0x80f87fe7,0xfe7fe7fe,0x1f060c1f,0x1f01f01,0xf01f0000,0x4f01cc1c, 0xc1cc1cc0,0xc06f00c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x6006000,0x600,0x600,0x0,0x0,0x0,0x0, 0x600000,0x0,0x18000000,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x600060,0x30000000,0x0,0x0,0xc,0x3,0x0,0x0,0x60000c00,0x0, 0x0,0xc000,0x600600,0x60000000,0x18,0xc03100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x601f8,0x0,0x0,0x0,0x0,0x6, 0x12000,0x2000000,0x40,0x20004000,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0xc06000c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x2004000,0xc00,0x0,0x0,0x0,0x0,0x0,0xc00000, 0x0,0x1c000000,0x0,0x0,0x0,0x0,0x0,0xc00,0x0,0x0,0x0,0x780000,0xf0000000,0x0,0x0,0x21c,0x3,0x0,0x0,0x60000c00,0x0,0x0,0xc000, 0x7c0603,0xe0000000,0x10,0xc02300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x601f0,0x0,0x0,0x0,0x0,0x6,0x12000,0x1000000, 0x40,0x7e004000,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc06000c0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x300c000,0xc00,0x0,0x0,0x0,0x0,0x0,0xc00000,0x0,0x7800000,0x0, 0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x780000,0xf0000000,0x0,0x0,0x3f8,0x3e,0x0,0x0,0x60000c00,0x0,0x0,0x38000,0x3c0603,0xc0000000, 0x10,0xfc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x60000,0x0,0x0,0x0,0x0,0x6,0x0,0x1000000,0x0,0x0,0x0,0x0, 0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x80600380,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffc,0x0, 0x0,0x1f0,0x3c,0x0,0x0,0x60000c00,0x0,0x0,0x38000,0x600,0x0,0x0,0xf000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x6,0x0,0xe000000,0x0,0x0,0x0,0x0,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x3,0x80600380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 }; // Definition of a 16x32 font const unsigned int font16x32[16*32*256/32] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc300000,0x0,0xc300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x70000e0,0x3c00730,0xe7001c0,0x0,0x70000e0,0x3c00e70,0x70000e0,0x3c00e70,0x730,0x70000e0,0x3c00730, 0xe700000,0x700,0xe003c0,0xe7000e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x6600000,0x0,0x6600000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x18001c0,0x6600ff0,0xe7003e0,0x0,0x18001c0,0x6600e70,0x18001c0,0x6600e70,0xff0,0x18001c0,0x6600ff0,0xe700000,0x180, 0x1c00660,0xe7001c0,0x0,0x0,0x0,0x380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000, 0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00380, 0xc300ce0,0xe700630,0x0,0x1c00380,0xc300e70,0x1c00380,0xc300e70,0xce0,0x1c00380,0xc300ce0,0xe700000,0x1c0,0x3800c30,0xe700380, 0x0,0x0,0x0,0x7c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0xc300000,0x0,0xc300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x700000,0x0,0x0,0x0,0x7c007c00,0x3e000000, 0x0,0x0,0x630,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe000070,0x1800000,0xc60,0x0,0xe000070,0x1800000,0xe000070, 0x1800000,0x0,0xe000070,0x1800000,0x0,0xe00,0x700180,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x800000,0x0,0x600600,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x3f0,0xfc0,0x0,0x7000000,0x38000000,0x1c0000,0xfc0000,0x380001c0,0xe01c00,0x7f800000,0x0,0x0,0x0,0x0,0x0,0x0,0x7c, 0x1801f00,0x0,0x0,0x1c,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7300000,0x6600000,0x0,0x6600000,0x0,0x0,0x0,0x0,0xe700000, 0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0x0,0xc000c00,0x43800000,0x0,0x0,0x630,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xf80,0x70000e0,0x3c00730,0xe700c60,0x0,0x70000e0,0x3c00e70,0x70000e0,0x3c00e70,0xe000730,0x70000e0,0x3c00730,0xe700000,0x700, 0xe003c0,0xe7000e0,0x38000e70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300000,0x803c00,0x7c00180, 0xc00300,0x1000000,0x0,0x1c,0x3c007c0,0xfc007e0,0xe01ff8,0x3f03ffc,0x7e007c0,0x0,0x0,0x7c0,0x1c0,0x7f8003f0,0x7f007ff8,0x7ff803f0, 0x70381ffc,0xff0700e,0x7000783c,0x783807c0,0x7fc007c0,0x7fc00fc0,0x7fff7038,0x700ee007,0x780f780f,0x7ffc03f0,0x70000fc0,0x3c00000, 0x3000000,0x38000000,0x1c0000,0x1fc0000,0x380001c0,0xe01c00,0x7f800000,0x0,0x0,0x0,0x0,0x0,0x0,0xfc,0x1801f80,0x0,0x1f80000, 0x7e,0x0,0x0,0x2400000,0xfc00000,0x7ff0000,0x7ffc0000,0x0,0x0,0x0,0x0,0xf30fb0c,0x2400000,0x0,0x240780f,0x1c0,0xfc,0x780f, 0x18003f0,0xe700000,0x7c00000,0x0,0xff0,0x3c00000,0x78007c0,0xc00000,0xff80000,0xf80,0x7c00000,0xc000c00,0x18001c0,0x1c001c0, 0x1c001c0,0x1c003e0,0x7fe03f0,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc,0x7f007838,0x7c007c0,0x7c007c0,0x7c00000,0x7c67038, 0x70387038,0x7038780f,0x70001fe0,0x30000c0,0x2400f30,0xe700c60,0x0,0x30000c0,0x2400e70,0x30000c0,0x2400e70,0xf700f30,0x30000c0, 0x2400f30,0xe700000,0x300,0xc00240,0xe7000c0,0x38000e70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0, 0x630018c,0x807e00,0xfe00180,0xc00300,0x1000000,0x0,0x38,0xff01fc0,0x3ff01ff0,0x1e01ff8,0x7f83ffc,0x1ff80ff0,0x0,0x0,0xff0, 0x1f003e0,0x7fe00ff8,0x7fc07ff8,0x7ff80ff8,0x70381ffc,0xff0701c,0x7000783c,0x78381ff0,0x7fe01ff0,0x7fe01ff0,0x7fff7038,0x781ee007, 0x3c1e380e,0x7ffc0380,0x380001c0,0x3c00000,0x1800000,0x38000000,0x1c0000,0x3c00000,0x380001c0,0xe01c00,0x3800000,0x0,0x0, 0x0,0x7000000,0x0,0x0,0x1e0,0x18003c0,0x0,0x3fc0000,0x70,0x0,0x0,0x6600000,0x1ff00000,0x1fff0000,0x7ffc0000,0x0,0x0,0x0,0x0, 0xcf0239c,0x3c00000,0x0,0x3c0380e,0x1c0,0x2001fe,0x380e,0x18007f8,0xe700000,0x8600000,0x0,0xff0,0x7e00000,0x8c00870,0x1800000, 0x1ff80000,0x180,0xc600000,0xc000c00,0x38001c0,0x3e003e0,0x3e003e0,0x3e001c0,0x7fe0ff8,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc, 0x7fc07838,0x1ff01ff0,0x1ff01ff0,0x1ff00000,0x1fec7038,0x70387038,0x7038380e,0x70003ce0,0x1800180,0x6600cf0,0xe7007c0,0x0, 0x1800180,0x6600e70,0x1800180,0x6600e70,0x7c00cf0,0x1800180,0x6600cf0,0xe700000,0x180,0x1800660,0xe700180,0x38000e70,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630030c,0x3f0e700,0x1e200180,0x1800180,0x21100000,0x0, 0x38,0x1e7819c0,0x38781038,0x1e01c00,0xf080038,0x1c381c38,0x0,0x0,0x1878,0x7fc03e0,0x70e01e18,0x70e07000,0x70001e18,0x703801c0, 0x707038,0x70007c7c,0x7c381c70,0x70701c70,0x70703830,0x1c07038,0x381ce007,0x1c1c3c1e,0x3c0380,0x380001c0,0x7e00000,0xc00000, 0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0,0x0,0x70c0000,0xe0, 0x0,0x0,0xc300000,0x38300000,0x3c700000,0x3c0000,0x0,0x0,0x0,0x0,0xce022f4,0x1800000,0x0,0x1803c1e,0x1c0,0x2003c2,0x3c1e, 0x1800e08,0x7e0,0x300000,0x0,0x7e00000,0xe700000,0x600030,0x3000000,0x3f980000,0x180,0x18200000,0xc000c00,0x1e0001c0,0x3e003e0, 0x3e003e0,0x3e003e0,0xfe01e18,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70e07c38,0x1c701c70,0x1c701c70,0x1c700000,0x3c787038, 0x70387038,0x70383c1e,0x70003870,0xc00300,0xc300ce0,0x380,0x0,0xc00300,0xc300000,0xc00300,0xc300000,0xfc00ce0,0xc00300,0xc300ce0, 0x0,0xc0,0x3000c30,0x300,0x38000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630031c,0xff8c300, 0x1c000180,0x1800180,0x39380000,0x0,0x70,0x1c3801c0,0x203c001c,0x3e01c00,0x1c000038,0x381c3838,0x0,0x0,0x1038,0xe0e03e0,0x70703c08, 0x70707000,0x70003808,0x703801c0,0x707070,0x70007c7c,0x7c383838,0x70383838,0x70387010,0x1c07038,0x381c700e,0x1e3c1c1c,0x780380, 0x1c0001c0,0xe700000,0x0,0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0, 0x0,0xe000000,0xe0,0x0,0x1000100,0x3800,0x70100000,0x38700000,0x780000,0x1c0,0x7801ce0,0xe380000,0x0,0x2264,0x0,0x0,0x1c1c, 0x0,0x200780,0x1c1c,0x1800c00,0x1818,0x7f00000,0x0,0x18180000,0xc300000,0x600070,0x0,0x7f980000,0x180,0x18300000,0xc000c00, 0x3000000,0x3e003e0,0x3e003e0,0x3e003e0,0xee03c08,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70707c38,0x38383838,0x38383838, 0x38380000,0x38387038,0x70387038,0x70381c1c,0x7fc03870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xbc00000,0x0,0x0,0x0,0x0,0x0,0x0, 0x38000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300318,0xe88c300,0x1c000180,0x38001c0, 0xfe00180,0x0,0x70,0x1c3801c0,0x1c001c,0x6e01c00,0x1c000078,0x381c3818,0x0,0x40000,0x40000038,0x1c0607e0,0x70703800,0x70707000, 0x70003800,0x703801c0,0x7070e0,0x70007c7c,0x7c383838,0x70383838,0x70387000,0x1c07038,0x381c700e,0xf780e38,0x700380,0x1c0001c0, 0x1c380000,0x0,0x38000000,0x1c0000,0x3800000,0x38000000,0x1c00,0x3800000,0x0,0x0,0x0,0x7000000,0x0,0x0,0x1c0,0x18001c0,0x0, 0xe000000,0xe0,0x0,0x1000100,0x4400,0x70000000,0x38700000,0x700000,0xe0,0x7001c70,0xe380000,0x0,0x2264,0x0,0x0,0xe38,0x0, 0x200700,0xe38,0x1800c00,0x300c,0xc300000,0x0,0x300c0000,0xc300180,0x6003c0,0x0,0x7f980000,0x180,0x18300000,0xc000c00,0x1800000, 0x7e007e0,0x7e007e0,0x7e003e0,0xee03800,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70707c38,0x38383838,0x38383838,0x38380000, 0x38387038,0x70387038,0x70380e38,0x7ff039f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e00000,0x0,0x0,0x0,0x40000,0x0,0x0,0x38000000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6300318,0x1c80e700,0x1c000180,0x38001c0,0x3800180, 0x0,0xe0,0x381c01c0,0x1c001c,0x6e01c00,0x38000070,0x381c381c,0x0,0x3c0000,0x78000078,0x38030770,0x70707800,0x70387000,0x70007000, 0x703801c0,0x7071c0,0x7000745c,0x7638701c,0x7038701c,0x70387000,0x1c07038,0x1c38718e,0x7700f78,0xf00380,0xe0001c0,0x381c0000, 0x7e0,0x39e003e0,0x79c03f0,0x3ffc079c,0x39e01fc0,0xfe01c1e,0x3807778,0x39e007e0,0x39e0079c,0x73c07e0,0x7ff83838,0x701ce007, 0x783c701c,0x1ffc01c0,0x18001c0,0x0,0x1c000100,0xe0,0x0,0x1000100,0x4200,0x70000000,0x70700100,0xf00100,0x10000e0,0x7000c70, 0xc700000,0x0,0x2204,0x7e00000,0x1e380100,0x1ffc0f78,0x0,0xf80700,0xf78,0x1800e00,0x63e6,0x18300000,0x0,0x6fe60000,0xe700180, 0xc00060,0x3838,0x7f980000,0x180,0x18300000,0xc000c00,0x18001c0,0x7700770,0x7700770,0x77007f0,0xee07800,0x70007000,0x70007000, 0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c1008,0x707c7038,0x70387038,0x70380f78,0x707039c0,0x7e007e0,0x7e007e0, 0x7e007e0,0x1f3c03e0,0x3f003f0,0x3f003f0,0x1fc01fc0,0x1fc01fc0,0x7f039e0,0x7e007e0,0x7e007e0,0x7e00380,0x7ce3838,0x38383838, 0x3838701c,0x39e0701c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x6307fff,0x1c807e0c,0xe000180, 0x30000c0,0x3800180,0x0,0xe0,0x381c01c0,0x1c001c,0xce01fe0,0x38000070,0x381c381c,0x3800380,0xfc0000,0x7e0000f0,0x30030770, 0x70707000,0x70387000,0x70007000,0x703801c0,0x707380,0x700076dc,0x7638701c,0x7038701c,0x70387800,0x1c07038,0x1c3873ce,0x7f00770, 0xe00380,0xe0001c0,0x700e0000,0x1ff8,0x3ff00ff0,0xffc0ff8,0x3ffc0ffc,0x3bf01fc0,0xfe01c3c,0x3807f78,0x3bf00ff0,0x3ff00ffc, 0x77e0ff0,0x7ff83838,0x3838e007,0x3c783838,0x1ffc01c0,0x18001c0,0x0,0x7ff00380,0x1e0,0x0,0x1000100,0x4200,0x78000000,0x70700380, 0xe00380,0x3800060,0xe000e30,0x1c600000,0x0,0x2204,0xff00000,0x7f7c0380,0x1ffc0770,0x1c0,0x3fc0700,0x18040770,0x1800780,0x4e12, 0x18300104,0x0,0x4c320000,0x7e00180,0x1c00030,0x3838,0x7f980000,0x180,0x18302080,0xc000c00,0x18001c0,0x7700770,0x7700770, 0x7700770,0x1ee07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c381c,0x705c7038,0x70387038, 0x70380770,0x70383b80,0x1ff81ff8,0x1ff81ff8,0x1ff81ff8,0x3fbe0ff0,0xff80ff8,0xff80ff8,0x1fc01fc0,0x1fc01fc0,0xff83bf0,0xff00ff0, 0xff00ff0,0xff00380,0xffc3838,0x38383838,0x38383838,0x3ff03838,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x1c0,0x7fff,0x1c803c38,0xf000000,0x70000e0,0xfe00180,0x0,0x1c0,0x381c01c0,0x3c0078,0xce01ff0,0x39e000f0,0x1c38381c,0x3800380, 0x3e07ffc,0xf8001f0,0x307b0770,0x70e07000,0x70387000,0x70007000,0x703801c0,0x707700,0x700076dc,0x7638701c,0x7038701c,0x70387e00, 0x1c07038,0x1c3873ce,0x3e007f0,0x1e00380,0x70001c0,0x0,0x1038,0x3c381e18,0x1c7c1e3c,0x3801e3c,0x3c7801c0,0xe01c78,0x380739c, 0x3c781c38,0x3c381c3c,0x7c21e10,0x7003838,0x3838700e,0x1ef03838,0x3c01c0,0x18001c0,0x0,0x7fe007c0,0x1c0,0x0,0x1000100,0x6400, 0x7e000000,0x707007c0,0x1e007c0,0x7c00070,0xe000638,0x18600000,0x0,0x0,0x1e100000,0x73ce07c0,0x3c07f0,0x1c0,0x7240700,0x1ddc3ffe, 0x1800de0,0x8c01,0x1870030c,0x0,0x8c310000,0x3c00180,0x3800030,0x3838,0x7f980000,0x180,0x183030c0,0xc000c00,0x430001c0,0x7700770, 0x7700770,0x7700770,0x1ce07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x70387638,0x701c701c,0x701c701c,0x701c1c38,0x70dc7038, 0x70387038,0x703807f0,0x70383b80,0x10381038,0x10381038,0x10381038,0x21e71e18,0x1e3c1e3c,0x1e3c1e3c,0x1c001c0,0x1c001c0,0x1e383c78, 0x1c381c38,0x1c381c38,0x1c380380,0x1c383838,0x38383838,0x38383838,0x3c383838,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x1c0,0x630,0x1e8000e0,0x1f000000,0x70000e0,0x39380180,0x0,0x1c0,0x3b9c01c0,0x3c07f0,0x18e01078,0x3bf800e0, 0x7e0383c,0x3800380,0x1f807ffc,0x3f001c0,0x61ff0e38,0x7fc07000,0x70387ff0,0x7ff07000,0x7ff801c0,0x707f00,0x7000729c,0x7338701c, 0x7070701c,0x70703fc0,0x1c07038,0x1e7873ce,0x1c003e0,0x3c00380,0x70001c0,0x0,0x1c,0x3c381c00,0x1c3c1c1c,0x3801c3c,0x383801c0, 0xe01cf0,0x380739c,0x38381c38,0x3c381c3c,0x7801c00,0x7003838,0x3838700e,0xfe03c78,0x7801c0,0x18001c0,0x0,0x1c000c20,0xff8, 0x0,0x1ff01ff0,0x3818,0x3fc00100,0x707e0c20,0x3c00c20,0xc200030,0xc000618,0x18c00000,0x0,0x0,0x1c000080,0xe1ce0c20,0x7803e0, 0x1c0,0xe200700,0xff83ffe,0x1801878,0x9801,0x1cf0071c,0x7ffc0000,0x8c310000,0x7ffe,0x7000030,0x3838,0x3f980380,0x180,0xc6038e0, 0x7f9c7f9c,0x3e1c01c0,0xe380e38,0xe380e38,0xe380f78,0x1cfc7000,0x7ff07ff0,0x7ff07ff0,0x1c001c0,0x1c001c0,0xfe387338,0x701c701c, 0x701c701c,0x701c0e70,0x719c7038,0x70387038,0x703803e0,0x70383b80,0x1c001c,0x1c001c,0x1c001c,0xe71c00,0x1c1c1c1c,0x1c1c1c1c, 0x1c001c0,0x1c001c0,0x1c383838,0x1c381c38,0x1c381c38,0x1c380000,0x3c383838,0x38383838,0x38383c78,0x3c383c78,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x630,0xf800380,0x3f830000,0x70000e0,0x31080180,0x0,0x380,0x3b9c01c0, 0x7807e0,0x38e00038,0x3c3800e0,0xff01c3c,0x3800380,0x7c000000,0x7c03c0,0x61870e38,0x7fc07000,0x70387ff0,0x7ff070fc,0x7ff801c0, 0x707f80,0x7000739c,0x7338701c,0x7ff0701c,0x7fe00ff0,0x1c07038,0xe7073ce,0x1c003e0,0x3800380,0x38001c0,0x0,0x1c,0x381c3800, 0x381c380e,0x380381c,0x383801c0,0xe01de0,0x380739c,0x3838381c,0x381c381c,0x7001e00,0x7003838,0x1c70718e,0x7e01c70,0xf00380, 0x18001e0,0x1e000000,0x1c001bb0,0xff8,0x0,0x1000100,0xe0,0xff00300,0x707e1bb0,0x3801bb0,0x1bb00010,0x8000308,0x30c00000,0x0, 0x0,0x1e0000c0,0xe1ce1bb0,0xf003e0,0x1c0,0x1c203ff8,0x63003e0,0x180181c,0x9801,0xfb00e38,0x7ffc0000,0x8fc10000,0x7ffe,0xe000860, 0x3838,0x1f980380,0x180,0x7c01c70,0x1f001f0,0x1f003c0,0xe380e38,0xe380e38,0xe380e38,0x1cfc7000,0x7ff07ff0,0x7ff07ff0,0x1c001c0, 0x1c001c0,0xfe387338,0x701c701c,0x701c701c,0x701c07e0,0x731c7038,0x70387038,0x703803e0,0x70383980,0x1c001c,0x1c001c,0x1c001c, 0xe73800,0x380e380e,0x380e380e,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x387c3838,0x38383838,0x38381c70, 0x381c1c70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xc30,0x7f00e00,0x33c30000,0x70000e0,0x1007ffe, 0x0,0x380,0x3b9c01c0,0xf00078,0x30e0001c,0x3c1c01c0,0x1c381fdc,0x0,0x70000000,0x1c0380,0x63030e38,0x70707000,0x70387000,0x700070fc, 0x703801c0,0x707b80,0x7000739c,0x7338701c,0x7fc0701c,0x7fc001f0,0x1c07038,0xe703e5c,0x3e001c0,0x7800380,0x38001c0,0x0,0x7fc, 0x381c3800,0x381c380e,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x7001fc0,0x7003838,0x1c70718e,0x7c01c70, 0xe01f00,0x180007c,0x7f8c0000,0x7fc03fb8,0x1c0,0x0,0x1000100,0x700,0x1f00600,0x70703fb8,0x7803fb8,0x3fb80000,0x8000000,0x180, 0x0,0x0,0x1fc00060,0xe1ce3fb8,0xe001c0,0x1c0,0x1c203ff8,0xc1801c0,0x180c,0x9801,0x1c70,0xc0000,0x8cc10000,0x180,0xfe007c0, 0x3838,0x7980380,0xff0,0xe38,0x3e003e00,0x3e000380,0xe380e38,0xe380e38,0xe380e38,0x38e07000,0x70007000,0x70007000,0x1c001c0, 0x1c001c0,0x70387338,0x701c701c,0x701c701c,0x701c03c0,0x731c7038,0x70387038,0x703801c0,0x703838e0,0x7fc07fc,0x7fc07fc,0x7fc07fc, 0xe73800,0x380e380e,0x380e380e,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c7ffc,0x38dc3838,0x38383838,0x38381c70, 0x381c1c70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xc60,0xf83878,0x71e30000,0x70000e0,0x1007ffe, 0x7f0,0x380,0x381c01c0,0x1e0003c,0x60e0001c,0x381c01c0,0x381c079c,0x0,0x7c000000,0x7c0380,0x63031c1c,0x70307000,0x70387000, 0x7000701c,0x703801c0,0x7071c0,0x7000739c,0x71b8701c,0x7000701c,0x71e00078,0x1c07038,0xe703e7c,0x7e001c0,0xf000380,0x38001c0, 0x0,0x1ffc,0x381c3800,0x381c3ffe,0x380381c,0x383801c0,0xe01fc0,0x380739c,0x3838381c,0x381c381c,0x7000ff0,0x7003838,0x1ef03bdc, 0x3800ee0,0x1e01f00,0x180007c,0x61fc0000,0x7fc07f3c,0x1c0,0x0,0x1000100,0x1800,0x780c00,0x70707f3c,0xf007f3c,0x7f3c0000,0x0, 0x3c0,0x3ffcffff,0x0,0xff00030,0xe1fe7f3c,0x1e001c0,0x1c0,0x1c200700,0xc183ffe,0xe0c,0x9801,0x1ff038e0,0xc07f0,0x8c610000, 0x180,0x0,0x3838,0x1980380,0x0,0x1ff0071c,0xe000e000,0xe0000f80,0x1c1c1c1c,0x1c1c1c1c,0x1c1c1e38,0x38e07000,0x70007000,0x70007000, 0x1c001c0,0x1c001c0,0x703871b8,0x701c701c,0x701c701c,0x701c03c0,0x761c7038,0x70387038,0x703801c0,0x70703870,0x1ffc1ffc,0x1ffc1ffc, 0x1ffc1ffc,0xfff3800,0x3ffe3ffe,0x3ffe3ffe,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c7ffc,0x389c3838,0x38383838, 0x38380ee0,0x381c0ee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0xfffc,0xbc60fc,0x70e30000,0x70000e0, 0x180,0x7f0,0x700,0x381c01c0,0x3e0001c,0x7ffc001c,0x381c03c0,0x381c001c,0x0,0x1f807ffc,0x3f00380,0x63031ffc,0x70387000,0x70387000, 0x7000701c,0x703801c0,0x7071e0,0x7000701c,0x71b8701c,0x7000701c,0x70f00038,0x1c07038,0x7e03e7c,0x77001c0,0xe000380,0x1c001c0, 0x0,0x3c1c,0x381c3800,0x381c3ffe,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x70003f8,0x7003838,0xee03bdc, 0x3c00ee0,0x3c00380,0x18000e0,0xf00000,0x1c007e7c,0x3c0,0x0,0x1000100,0x0,0x381800,0x70707e7c,0xe007e7c,0x7e7c0000,0x0,0x7c0, 0x0,0x0,0x3f80018,0xe1fe7e7c,0x3c001c0,0x1c0,0x1c200700,0xc183ffe,0xf0c,0x8c01,0x38e0,0xc07f0,0x8c710000,0x180,0x0,0x3838, 0x1980000,0x0,0x71c,0x7000f0,0x700f00,0x1ffc1ffc,0x1ffc1ffc,0x1ffc1ffc,0x3fe07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0, 0x703871b8,0x701c701c,0x701c701c,0x701c07e0,0x7c1c7038,0x70387038,0x703801c0,0x7ff03838,0x3c1c3c1c,0x3c1c3c1c,0x3c1c3c1c, 0x3fff3800,0x3ffe3ffe,0x3ffe3ffe,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x391c3838,0x38383838,0x38380ee0, 0x381c0ee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfffc,0x9c01ce,0x70f60000,0x70000e0,0x180, 0x0,0x700,0x381c01c0,0x780001c,0x7ffc001c,0x381c0380,0x381c003c,0x0,0x3e07ffc,0xf800380,0x63031ffc,0x70387000,0x70387000, 0x7000701c,0x703801c0,0x7070f0,0x7000701c,0x71b8701c,0x7000701c,0x70700038,0x1c07038,0x7e03e7c,0xf7801c0,0x1e000380,0x1c001c0, 0x0,0x381c,0x381c3800,0x381c3800,0x380381c,0x383801c0,0xe01fe0,0x380739c,0x3838381c,0x381c381c,0x7000078,0x7003838,0xee03a5c, 0x7c00fe0,0x78001c0,0x18001c0,0x0,0x1c003ef8,0x380,0x0,0x1000100,0x810,0x383000,0x70703ef8,0x1e003ef8,0x3ef80000,0x0,0x7c0, 0x0,0x0,0x78000c,0xe1c03ef8,0x78001c0,0x1c0,0x1c200700,0x63001c0,0x18003f8,0x4e12,0x1c70,0xc0000,0x4c320000,0x180,0x0,0x3838, 0x1980000,0x0,0xe38,0x700118,0x701e00,0x1ffc1ffc,0x1ffc1ffc,0x1ffc1ffc,0x7fe07000,0x70007000,0x70007000,0x1c001c0,0x1c001c0, 0x703871b8,0x701c701c,0x701c701c,0x701c0e70,0x7c1c7038,0x70387038,0x703801c0,0x7fc0381c,0x381c381c,0x381c381c,0x381c381c, 0x78e03800,0x38003800,0x38003800,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0000,0x3b1c3838,0x38383838,0x38380fe0, 0x381c0fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1860,0x9c0186,0x707e0000,0x30000c0,0x180, 0x0,0xe00,0x183801c0,0xf00001c,0xe0001c,0x181c0380,0x381c0038,0x0,0xfc0000,0x7e000000,0x61873c1e,0x70383800,0x70707000,0x7000381c, 0x703801c0,0x707070,0x7000701c,0x70f83838,0x70003838,0x70780038,0x1c07038,0x7e03c3c,0xe3801c0,0x1c000380,0xe001c0,0x0,0x381c, 0x381c3800,0x381c3800,0x380381c,0x383801c0,0xe01ef0,0x380739c,0x3838381c,0x381c381c,0x7000038,0x7003838,0xfe03e7c,0xfe007c0, 0x70001c0,0x18001c0,0x0,0xe001ff0,0x380,0x0,0x1000100,0x162c,0x381800,0x30701ff0,0x1c001ff0,0x1ff00000,0x0,0x3c0,0x0,0x0, 0x380018,0xe1c01ff0,0x70001c0,0x1c0,0x1c200700,0xff801c0,0x18000f0,0x63e6,0xe38,0x0,0x6c3e0000,0x0,0x0,0x3838,0x1980000,0x0, 0x1c70,0xf0000c,0xf01c00,0x3c1e3c1e,0x3c1e3c1e,0x3c1e3c1c,0x70e03800,0x70007000,0x70007000,0x1c001c0,0x1c001c0,0x707070f8, 0x38383838,0x38383838,0x38381c38,0x38387038,0x70387038,0x703801c0,0x7000381c,0x381c381c,0x381c381c,0x381c381c,0x70e03800, 0x38003800,0x38003800,0x1c001c0,0x1c001c0,0x381c3838,0x381c381c,0x381c381c,0x381c0380,0x3e1c3838,0x38383838,0x383807c0,0x381c07c0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18c0,0x9c0186,0x783c0000,0x38001c0,0x180,0x3800000, 0x3800e00,0x1c3801c0,0x1e00003c,0xe00038,0x1c1c0780,0x381c0038,0x3800380,0x3c0000,0x78000000,0x61ff380e,0x70383808,0x70707000, 0x7000381c,0x703801c0,0x40707078,0x7000701c,0x70f83838,0x70003838,0x70384038,0x1c07038,0x7e03c3c,0x1e3c01c0,0x3c000380,0xe001c0, 0x0,0x383c,0x3c381c00,0x1c3c1c00,0x3801c3c,0x383801c0,0xe01c78,0x380739c,0x38381c38,0x3c381c3c,0x7000038,0x7003878,0x7c01e78, 0x1ef007c0,0xf0001c0,0x18001c0,0x0,0xe000ee0,0x7800380,0xe380000,0x1001ff0,0x2242,0x40380c00,0x38700ee0,0x3c000ee0,0xee00000, 0x0,0x0,0x0,0x0,0x380030,0xe1c00ee0,0xf0001c0,0x1c0,0xe200700,0xdd801c0,0x1800038,0x300c,0x71c,0x0,0x300c0000,0x0,0x0,0x3838, 0x1980000,0x0,0x38e0,0xb0000c,0xb01c08,0x380e380e,0x380e380e,0x380e380e,0x70e03808,0x70007000,0x70007000,0x1c001c0,0x1c001c0, 0x707070f8,0x38383838,0x38383838,0x3838381c,0x38387038,0x70387038,0x703801c0,0x7000381c,0x383c383c,0x383c383c,0x383c383c, 0x70e01c00,0x1c001c00,0x1c001c00,0x1c001c0,0x1c001c0,0x1c383838,0x1c381c38,0x1c381c38,0x1c380380,0x1c383878,0x38783878,0x387807c0, 0x3c3807c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x18c0,0x10b801ce,0x3c3e0000,0x38001c0,0x180, 0x3800000,0x3801c00,0x1e7801c0,0x3c002078,0xe02078,0x1c380700,0x1c3810f0,0x3800380,0x40000,0x40000380,0x307b380e,0x70701e18, 0x70e07000,0x70001c1c,0x703801c0,0x60e0703c,0x7000701c,0x70f83c78,0x70003c70,0x703c70f0,0x1c03870,0x3c01c3c,0x3c1c01c0,0x78000380, 0x7001c0,0x0,0x3c7c,0x3c381e18,0x1c7c1e0c,0x3801c3c,0x383801c0,0xe01c38,0x3c0739c,0x38381c38,0x3c381c3c,0x7001078,0x7803c78, 0x7c01c38,0x1c780380,0x1e0001c0,0x18001c0,0x0,0x70c06c0,0x7000380,0xe300000,0x1000100,0x2142,0x70f00600,0x3c7006c0,0x780006c0, 0x6c00000,0x0,0x0,0x0,0x0,0x10780060,0x73e206c0,0x1e0001c0,0x1c0,0x7240700,0x180c01c0,0x1800018,0x1818,0x30c,0x0,0x18180000, 0x0,0x0,0x3c78,0x1980000,0x0,0x30c0,0x130000c,0x1301c18,0x380e380e,0x380e380e,0x380e380e,0x70e01e18,0x70007000,0x70007000, 0x1c001c0,0x1c001c0,0x70e070f8,0x3c783c78,0x3c783c78,0x3c781008,0x7c783870,0x38703870,0x387001c0,0x70003a3c,0x3c7c3c7c,0x3c7c3c7c, 0x3c7c3c7c,0x79f11e18,0x1e0c1e0c,0x1e0c1e0c,0x1c001c0,0x1c001c0,0x1c783838,0x1c381c38,0x1c381c38,0x1c380380,0x1c383c78,0x3c783c78, 0x3c780380,0x3c380380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x38c0,0x1ff800fc,0x1fee0000, 0x1800180,0x180,0x3800000,0x3801c00,0xff01ffc,0x3ffc3ff0,0xe03ff0,0xff00700,0x1ff81fe0,0x3800380,0x0,0x380,0x3000780f,0x7ff00ff8, 0x7fc07ff8,0x70000ffc,0x70381ffc,0x7fe0701c,0x7ff8701c,0x70781ff0,0x70001ff0,0x701c7ff0,0x1c01fe0,0x3c01c38,0x380e01c0,0x7ffc0380, 0x7001c0,0x0,0x1fdc,0x3ff00ff0,0xffc0ffc,0x3800fdc,0x38383ffe,0xe01c3c,0x1fc739c,0x38380ff0,0x3ff00ffc,0x7001ff0,0x3f81fb8, 0x7c01c38,0x3c3c0380,0x1ffc01c0,0x18001c0,0x0,0x3fc0380,0x7000380,0xc70718c,0x1000100,0x2244,0x7ff00200,0x1fff0380,0x7ffc0380, 0x3800000,0x0,0x0,0x0,0x0,0x1ff000c0,0x7f7e0380,0x1ffc01c0,0x1c0,0x3fc3ffe,0x1c0,0x1800018,0x7e0,0x104,0x0,0x7e00000,0x7ffe, 0x0,0x3fde,0x1980000,0x0,0x2080,0x3300018,0x3300ff0,0x780f780f,0x780f780f,0x780f780e,0xf0fe0ff8,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc, 0x1ffc1ffc,0x7fc07078,0x1ff01ff0,0x1ff01ff0,0x1ff00000,0x7ff01fe0,0x1fe01fe0,0x1fe001c0,0x70003bf8,0x1fdc1fdc,0x1fdc1fdc, 0x1fdc1fdc,0x3fbf0ff0,0xffc0ffc,0xffc0ffc,0x3ffe3ffe,0x3ffe3ffe,0xff03838,0xff00ff0,0xff00ff0,0xff00000,0x3ff01fb8,0x1fb81fb8, 0x1fb80380,0x3ff00380,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x31c0,0x7e00078,0x7cf0000,0x1800180, 0x0,0x3800000,0x3803800,0x3c01ffc,0x3ffc0fe0,0xe01fc0,0x3e00e00,0x7e00f80,0x3800380,0x0,0x380,0x18007007,0x7fc003f0,0x7f007ff8, 0x700003f0,0x70381ffc,0x3f80701e,0x7ff8701c,0x707807c0,0x700007c0,0x701e1fc0,0x1c00fc0,0x3c01818,0x780f01c0,0x7ffc0380,0x3801c0, 0x0,0xf9c,0x39e003e0,0x79c03f0,0x380079c,0x38383ffe,0xe01c1e,0x7c739c,0x383807e0,0x39e0079c,0x7000fc0,0x1f80f38,0x3801c38, 0x781e0380,0x1ffc01c0,0x18001c0,0x0,0x1f80100,0xe000700,0x1c60718c,0x1000100,0x1e3c,0x1fc00100,0x7ff0100,0x7ffc0100,0x1000000, 0x0,0x0,0x0,0x0,0xfc00080,0x3e3c0100,0x1ffc01c0,0x1c0,0xf83ffe,0x1c0,0x1800838,0x0,0x0,0x0,0x0,0x7ffe,0x0,0x3b9e,0x1980000, 0x0,0x0,0x2300038,0x23003e0,0x70077007,0x70077007,0x70077007,0xe0fe03f0,0x7ff87ff8,0x7ff87ff8,0x1ffc1ffc,0x1ffc1ffc,0x7f007078, 0x7c007c0,0x7c007c0,0x7c00000,0xc7c00fc0,0xfc00fc0,0xfc001c0,0x700039f0,0xf9c0f9c,0xf9c0f9c,0xf9c0f9c,0x1f1e03e0,0x3f003f0, 0x3f003f0,0x3ffe3ffe,0x3ffe3ffe,0x7e03838,0x7e007e0,0x7e007e0,0x7e00000,0x63e00f38,0xf380f38,0xf380380,0x39e00380,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0xc00300,0x0,0x3000000,0x3800,0x0,0x0,0x0,0x0, 0x0,0x300,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe0,0x0,0x0,0x0,0x0,0x380,0x3801c0,0x0,0x0,0x0,0x0,0x1c,0x0,0xe00000, 0x0,0x0,0x3800001c,0x0,0x0,0x0,0x700,0x1c0,0x18001c0,0x0,0x0,0xe000700,0x18600000,0x1000100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800ff0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0x1800000,0x0,0x6300070,0x6300000,0x0, 0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000000, 0x0,0x700,0x38000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0xc00300,0x0,0x7000000, 0x7000,0x0,0x0,0x0,0x0,0x0,0x700,0x0,0x0,0xf040000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0x0,0x0,0x0,0x0,0x3f0,0x1c0fc0,0x0,0x0, 0x0,0x0,0x1c,0x0,0xe00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0x700,0x1e0,0x18003c0,0x0,0x0,0xc000700,0x18c00000,0x1000000,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x18007e0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0xc00000, 0x0,0x7f800e0,0x7f80000,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x700,0x38000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000, 0x0,0x600600,0x0,0x6000000,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x7fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0, 0x3f0,0xfc0,0x0,0x0,0x0,0x0,0x838,0x0,0x1e00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0xf00,0xfc,0x1801f80,0x0,0x0,0x8008e00,0x30c00000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x1980000,0xc00000, 0x0,0x3001c0,0x300000,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0xf00,0x38000f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0xff0,0x0,0x1fc00000,0x0,0x0,0x3800001c,0x0,0x0,0x0,0x3e00,0x7c,0x1801f00,0x0,0x0,0x800fe00,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x1800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x7c00000,0x0,0x3001fc,0x300000, 0x0,0x0,0x0,0x3e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x3e00,0x38003e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff8,0x0,0x0,0x0,0x7e0,0x0,0x1f000000, 0x0,0x0,0x3800001c,0x0,0x0,0x0,0x3c00,0x0,0x1800000,0x0,0x0,0x7800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x7800000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00,0x38003c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0 }; // Definition of a 19x38 font const unsigned int font19x38[19*38*256/32] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c380000,0x0,0x1c380,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800007,0x3c003,0x86000000, 0x1e00000,0x3,0x80000700,0x3c00000,0x380000,0x70003c00,0x0,0xe1800e,0x1c00,0xf000e18,0x0,0x0,0x700000e0,0x780000,0x7000,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe700000,0x0,0xe700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0000e,0x7e003,0xe60071c0,0x7f80000,0x1,0xc0000e00,0x7e0038e,0x1c0000, 0xe0007e00,0x38e00000,0xf98007,0x3800,0x1f800f98,0x1c70000,0x0,0x380001c0,0xfc0071,0xc000e000,0x0,0x0,0x0,0x0,0x3e00000,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x7e00000,0x0,0x7e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe0001c,0xe7006,0x7c0071c0,0xe180000,0x0,0xe0001c00,0xe70038e,0xe0001,0xc000e700,0x38e00000, 0x19f0003,0x80007000,0x39c019f0,0x1c70000,0x0,0x1c000380,0x1ce0071,0xc001c000,0x0,0x0,0x0,0x0,0x7f00000,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000, 0x0,0x3c00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x700038,0x1c3806,0x3c0071c0,0xc0c0000,0x0,0x70003800,0x1c38038e,0x70003,0x8001c380,0x38e00000,0x18f0001,0xc000e000, 0x70e018f0,0x1c70000,0x0,0xe000700,0x3870071,0xc0038000,0x0,0x0,0x0,0x0,0xe380000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60000000,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c38,0x0,0x1,0xc3800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0xc0c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe000003,0x80018000,0x0,0xc180000, 0xe,0x380,0x1800000,0xe00000,0x38001800,0x0,0x38,0xe00,0x6000000,0x0,0x1,0xc0000070,0x300000,0x3800,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7000000,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78c00,0xc30, 0x0,0x0,0xc3000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800000,0x0,0x0,0x0,0xe0,0x1c000f,0xc0000000,0x0,0x0, 0x0,0xc0c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7000007,0x3c003,0xc6000000,0xc180000,0x7,0x700, 0x3c00000,0x700000,0x70003c00,0x0,0xf1801c,0x1c00,0xf000f18,0x0,0x0,0xe00000e0,0x780000,0x7000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x1c007000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe0000,0xfe000,0x0,0x3800000,0x700000,0x38, 0x7,0xe000001c,0x1c00,0x1c00700,0x7fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf800e,0x3e0000,0x0,0x0,0x0,0x1e00000,0x0,0x1, 0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7cc00,0x660,0x0,0x0,0x66000000,0x0,0x0,0x0,0x0,0x7,0x1c000000,0x0,0x0,0x0,0x3fe00000, 0x0,0x0,0x7000000,0x0,0x0,0x0,0x3e0,0x7c001f,0xe0000000,0x0,0x0,0x0,0xe1c0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x1f80,0x380000e,0x7e007,0xe60071c0,0xc180000,0x3,0x80000e00,0x7e0038e,0x380000,0xe0007e00,0x38e00f00,0x1f9800e, 0x3800,0x1f801f98,0x1c70000,0x0,0x700001c0,0xfc0071,0xc000e007,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0x61c00600,0x1e00007e,0x70000,0x18003000,0x1800000,0x0,0x0,0x1c01f0,0x7e003f,0xc003f800, 0x1e03ffc,0x7f01ff,0xfc03f000,0x7e000000,0x0,0x0,0xfc0,0x1e,0x7fe000,0x7e03fe00,0x3fff07ff,0xe007e038,0x383ffe0,0xff81c01, 0xe1c000f8,0xf8f00e0,0xfc01ffc,0x3f00ff,0xc000fe07,0xfffc7007,0x1c007700,0x73c01ef,0x78ffff,0xfe0380,0xfe000,0x38000000,0x1800000, 0x700000,0x38,0x1f,0xe000001c,0x1c00,0x1c00700,0x7fc0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x3f800e,0x3f8000,0x0,0xfc0000, 0x0,0x7f00000,0x0,0x1,0x98000000,0x7f00000,0x3ffe00,0xffff0,0x0,0x0,0x0,0x0,0x0,0xcf81f,0xee3807e0,0x0,0x0,0x7e03c01e,0x1c, 0x0,0x1f800000,0xf0078038,0xfc007,0x1c000000,0xfe00000,0x0,0x0,0x3fe000f0,0xf,0xc001f800,0x6000000,0xffc000,0x0,0x1c0007e0, 0x360,0x6c0010,0x70000700,0xf0001e,0x3c000,0x78000f00,0x7f800ff,0xf007e01f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83fc0, 0x7807007,0xe000fc00,0x1f8003f0,0x7e0000,0x1f867,0x70e00e,0x1c01c380,0x38f00787,0x3fe0,0x180000c,0x66006,0x7c0071c0,0xe380000, 0x1,0x80000c00,0x660038e,0x180000,0xc0006600,0x38e0078e,0x19f0006,0x3000,0x198019f0,0x1c70000,0x0,0x30000180,0xcc0071,0xc000c007, 0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0x61800600,0x7f8001ff,0x70000, 0x38003800,0x1800000,0x0,0x0,0x3807fc,0x1fe00ff,0xf00ffe00,0x3e03ffc,0xff81ff,0xfc07fc01,0xff800000,0x0,0x0,0x3fe0,0xfe001e, 0x7ff801,0xff83ff80,0x3fff07ff,0xe01ff838,0x383ffe0,0xff81c03,0xc1c000f8,0xf8f80e0,0x3ff01fff,0xffc0ff,0xf003ff87,0xfffc7007, 0x1e00f700,0x71c03c7,0x70ffff,0xfe01c0,0xfe000,0x7c000000,0xc00000,0x700000,0x38,0x3f,0xe000001c,0x1c00,0x1c00700,0x7fc0000, 0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x3f800e,0x3f8000,0x0,0x3fe0000,0x0,0xff00000,0x0,0x3,0xc000000,0x1ffc0000,0xfffe00, 0xffff0,0x0,0x0,0x0,0x0,0x0,0xc781f,0xee3803c0,0x0,0x0,0x3c01c01c,0x1c,0xc000,0x7fc00000,0x70070038,0x3fe007,0x1c000000,0x1ff80000, 0x0,0x0,0x3fe003fc,0x1f,0xe003fc00,0xc000000,0x3ffc000,0x0,0x7c000ff0,0x60,0xc0000,0x30000700,0xf0001e,0x3c000,0x78000f00, 0x3f000ff,0xf01ff81f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ff8,0x7c0701f,0xf803ff00,0x7fe00ffc,0x1ff8000,0x7fe67, 0x70e00e,0x1c01c380,0x38700707,0x7ff0,0xc00018,0xc3006,0x3c0071c0,0x7f00000,0x0,0xc0001800,0xc30038e,0xc0001,0x8000c300,0x38e003fc, 0x18f0003,0x6000,0x30c018f0,0x1c70000,0x0,0x18000300,0x1860071,0xc0018007,0x38e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xe1801fc0,0x618001ff,0x70000,0x30001800,0x21840000,0x0,0x0,0x380ffe,0x1fe00ff, 0xfc0fff00,0x3e03ffc,0x1ff81ff,0xfc0ffe03,0xffc00000,0x0,0x0,0x7ff0,0x3ff803f,0x7ffc03,0xffc3ffc0,0x3fff07ff,0xe03ffc38,0x383ffe0, 0xff81c07,0x81c000f8,0xf8f80e0,0x7ff81fff,0x81ffe0ff,0xf80fff87,0xfffc7007,0xe00e700,0x70e0387,0x80f0ffff,0xe001c0,0xe000, 0xfe000000,0xe00000,0x700000,0x38,0x3c,0x1c,0x1c00,0x1c00700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x78000e,0x3c000, 0x0,0x7ff0000,0x0,0xf100000,0x0,0x7,0xe000000,0x7ffc0000,0x1fffe00,0xffff0,0x0,0x0,0x0,0x0,0x0,0x3,0xf780180,0x0,0x0,0x1801e03c, 0x1c,0xc000,0xffc00000,0x780f0038,0x786000,0x7f00,0x18380000,0x0,0xfe00,0x30c,0x10,0x70020e00,0x1c000000,0x7f8c000,0x0,0x6c001c38, 0x60,0xc0000,0x70000700,0x1f8003f,0x7e000,0xfc001f80,0x3f000ff,0xf03ffc1f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ffc, 0x7c0703f,0xfc07ff80,0xfff01ffe,0x3ffc000,0xffec7,0x70e00e,0x1c01c380,0x38780f07,0xf070,0xe00038,0x1c3800,0x0,0x3e00000,0x0, 0xe0003800,0x1c380000,0xe0003,0x8001c380,0x3e0,0x3,0x8000e000,0x70e00000,0x0,0x0,0x1c000700,0x3870000,0x38007,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xe3807ff0,0xc0c003c1,0x70000,0x70001c00, 0x718e0000,0x0,0x0,0x700f1e,0x1ce00c0,0x3c0c0f80,0x7e03800,0x3e08000,0x381e0f03,0xc1e00000,0x0,0x0,0x7078,0x783c03f,0x701e07, 0xc1c383e0,0x38000700,0x7c1c38,0x3801c00,0x381c0f,0x1c000fc,0x1f8f80e0,0x78781c07,0x81e1e0e0,0x780f0180,0xe007007,0xe00e380, 0xe0f0783,0x80e0000e,0xe000e0,0xe001,0xef000000,0x0,0x700000,0x38,0x38,0x1c,0x0,0x700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000, 0x0,0x0,0x0,0x70000e,0x1c000,0x0,0xf830000,0x0,0x1e000000,0x0,0x0,0x10000,0x780c0000,0x3e38000,0xe0,0x0,0x0,0x0,0x0,0x0,0x3, 0xd580000,0x0,0x0,0xe038,0x1c,0xc000,0xf0400000,0x380e0038,0x702000,0x1ffc0,0xc0000,0x0,0x3ff80,0x606,0x0,0x30000600,0x0, 0x7f8c000,0x0,0xc001818,0x60,0xc0003,0xe0000700,0x1f8003f,0x7e000,0xfc001f80,0x73801ee,0x7c1c1c,0x38000,0x70000e00,0xe0001, 0xc0003800,0x700383e,0x7c0703c,0x3c078780,0xf0f01e1e,0x3c3c000,0xf0f87,0x70e00e,0x1c01c380,0x38380e07,0xe038,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0xff0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x1c,0x1c7000,0xc380fff0,0xc0c00380,0x70000,0x70001c00,0x3dbc0070,0x0,0x0,0x701e0f,0xe0000,0x1e000380, 0x6e03800,0x7800000,0x781c0707,0x80e00000,0x0,0x0,0x4038,0xe00c03f,0x700e07,0x4380f0,0x38000700,0x700438,0x3801c00,0x381c0e, 0x1c000ec,0x1b8fc0e0,0xf03c1c03,0xc3c0f0e0,0x3c1e0000,0xe007007,0xe00e380,0xe070703,0xc1e0001e,0xe000e0,0xe001,0xc7000000, 0x0,0x700000,0x38,0x38,0x1c,0x0,0x700,0x1c0000,0x0,0x0,0x0,0x0,0x1c000000,0x0,0x0,0x0,0x70000e,0x1c000,0x0,0xe010000,0x0, 0x1c000000,0x10,0x20000,0x6c000,0xf0000000,0x3838000,0x1e0,0x0,0xf000f,0xf1e00,0x78f00000,0x0,0x3,0xdd80000,0x0,0x0,0xf078, 0x0,0xc001,0xe0000000,0x1c1c0038,0x700000,0x3c1e0,0xc0000,0x0,0x783c0,0x606,0x0,0x30000e00,0x0,0xff8c000,0x0,0xc00300c,0x60, 0xc0003,0xe0000000,0x1f8003f,0x7e000,0xfc001f80,0x73801ce,0x70041c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700380f,0x7e07078, 0x1e0f03c1,0xe0783c0f,0x781e000,0x1c0787,0x70e00e,0x1c01c380,0x383c1e07,0xff00e038,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x878, 0x0,0x0,0x0,0x7,0x80000080,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c, 0x1c7000,0xc301e630,0xc0c00380,0x70000,0xe0000e00,0xff00070,0x0,0x0,0xe01c07,0xe0000,0xe000380,0xce03800,0x7000000,0x701c0707, 0x600000,0x0,0x4000010,0x38,0x1c00e07f,0x80700e0e,0x38070,0x38000700,0xe00038,0x3801c00,0x381c1c,0x1c000ec,0x1b8ec0e0,0xe01c1c01, 0xc38070e0,0x1c1c0000,0xe007007,0x701c380,0xe078e01,0xc1c0003c,0xe00070,0xe003,0x83800000,0x7f,0x71f000,0x3e003e38,0x3f007ff, 0xe01f1c1c,0x7801fc00,0x3fc00701,0xe01c0077,0x8f071e00,0xf801c7c,0x7c700e,0x3e01fc03,0xfff8380e,0xe007700,0x73c0787,0x387ffc, 0x70000e,0x1c000,0x0,0xe000000,0x0,0x1c000000,0x10,0x20000,0xc2000,0xe0000000,0x3838000,0x3c0,0x0,0xf000f,0x78e00,0x70e00000, 0x0,0x3,0xc980fe0,0x1f0,0xf8000007,0xffc07070,0x0,0x3f801,0xc0000000,0x1e3c0038,0x700000,0x70070,0x7fc0000,0x0,0xe00e0,0x606, 0x1c0000,0x70007c00,0x380e,0xff8c000,0x0,0xc00300c,0x60,0xc0000,0x70000000,0x3fc007f,0x800ff001,0xfe003fc0,0x73801ce,0xe0001c, 0x38000,0x70000e00,0xe0001,0xc0003800,0x7003807,0x7607070,0xe0e01c1,0xc0383807,0x700e000,0x1c0387,0x70e00e,0x1c01c380,0x381c1c07, 0xffc0e0f8,0x3f8007f,0xfe001,0xfc003f80,0x7f007e3,0xe003e001,0xf8003f00,0x7e000fc,0xfe001f,0xc003f800,0x7f00003c,0x38f0007, 0xc000f800,0x1f0003e0,0x7c0007,0x8003f0c3,0x80e0701c,0xe0381c0,0x70700387,0x1f01c00e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c701f,0xfff1c600,0xc0c00380,0x70000,0xe0000e00,0x3c00070,0x0,0x0,0xe03c07, 0x800e0000,0xe000380,0x1ce03800,0x7000000,0x701c0707,0x7003c0,0x780000,0x3c00001e,0x38,0x18006073,0x80700e0e,0x38070,0x38000700, 0xe00038,0x3801c00,0x381c38,0x1c000ee,0x3b8ee0e1,0xe01e1c01,0xc78078e0,0x1c1c0000,0xe007007,0x701c387,0xe03de00,0xe3800038, 0xe00070,0xe007,0x1c00000,0x1ff,0xc077f801,0xff807fb8,0xff807ff,0xe03fdc1d,0xfc01fc00,0x3fc00703,0xc01c007f,0xdf877f00,0x3fe01dfe, 0xff700e,0xff07ff03,0xfff8380e,0x700f700,0x71e0f03,0x80707ffc,0x70000e,0x1c000,0x0,0x1c000008,0x0,0x1c000000,0x10,0x20000, 0x82000,0xe0000000,0x7038000,0x80000380,0x2000040,0x7000e,0x38700,0xf1e00000,0x0,0x3,0xc183ff8,0x3fd,0xfc008007,0xffc038e0, 0x0,0xffc01,0xc0008008,0xe380038,0x380000,0xe3e38,0x1ffc0040,0x80000000,0x1cfc70,0x606,0x1c0000,0xe0007c00,0x380e,0xff8c000, 0x0,0xc00300c,0x8100060,0xc0000,0x30000700,0x39c0073,0x800e7001,0xce0039c0,0x73801ce,0xe0001c,0x38000,0x70000e00,0xe0001, 0xc0003800,0x7003807,0x77070f0,0xf1e01e3,0xc03c7807,0x8f00f080,0x83c0787,0x70e00e,0x1c01c380,0x380e3807,0xffe0e1c0,0xffe01ff, 0xc03ff807,0xff00ffe0,0x1ffc0ff7,0xf01ff807,0xfc00ff80,0x1ff003fe,0xfe001f,0xc003f800,0x7f0003fc,0x3bf801f,0xf003fe00,0x7fc00ff8, 0x1ff0007,0x8007fd83,0x80e0701c,0xe0381c0,0x70380707,0x7f80e01c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1c,0x1c701f,0xfff1c600,0x618081c0,0x70000,0xe0000e00,0x3c00070,0x0,0x0,0xe03803,0x800e0000,0xe000380,0x18e03800, 0xf000000,0xf01c0707,0x7003c0,0x780000,0xfc00001f,0x80000078,0x301e6073,0x80700e1c,0x38038,0x38000700,0x1c00038,0x3801c00, 0x381c70,0x1c000e6,0x338ee0e1,0xc00e1c01,0xc70038e0,0x1c1c0000,0xe007007,0x701c387,0xe01dc00,0xf7800078,0xe00070,0xe00e,0xe00000, 0x3ff,0xe07ffc03,0xffc0fff8,0x1ffc07ff,0xe07ffc1d,0xfe01fc00,0x3fc00707,0x801c007f,0xdf877f80,0x7ff01fff,0x1fff00e,0xff07ff03, 0xfff8380e,0x700e380,0xe0e0e03,0x80707ffc,0x70000e,0x1c000,0x0,0x7ffc001c,0x0,0x1c000000,0x10,0x20000,0x82000,0xe0000000, 0x7038001,0xc0000780,0x70000e0,0x3800e,0x38700,0xe1c00000,0x0,0x3,0xc183ff8,0x7ff,0xfc01c007,0xffc03de0,0x0,0x1ffc01,0xc001c01c, 0xf780038,0x3c0000,0xcff18,0x380c00c1,0x80000000,0x18fe30,0x30c,0x1c0001,0xc0000e00,0x380e,0xff8c000,0x0,0xc00300c,0xc180060, 0xc0000,0x30000700,0x39c0073,0x800e7001,0xce0039c0,0xe1c038e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x877070e0, 0x71c00e3,0x801c7003,0x8e0071c0,0x1c380fc7,0x70e00e,0x1c01c380,0x380f7807,0x1e0e380,0x1fff03ff,0xe07ffc0f,0xff81fff0,0x3ffe0fff, 0xf03ffc0f,0xfe01ffc0,0x3ff807ff,0xfe001f,0xc003f800,0x7f0007fe,0x3bfc03f,0xf807ff00,0xffe01ffc,0x3ff8007,0x800fff83,0x80e0701c, 0xe0381c0,0x70380707,0xffc0e01c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1c701f, 0xfff1c600,0x7f8381e0,0x70000,0xc0000600,0xff00070,0x0,0x0,0x1c03803,0x800e0000,0xe000f00,0x38e03fe0,0xe000000,0xe00e0e07, 0x7003c0,0x780007,0xf0ffff87,0xf00000f0,0x307fe0f3,0xc0703c1c,0x38038,0x38000700,0x1c00038,0x3801c00,0x381ce0,0x1c000e6,0x338e70e1, 0xc00e1c01,0xc70038e0,0x3c1e0000,0xe007007,0x783c38f,0x8e01fc00,0x770000f0,0xe00038,0xe01c,0x700000,0x381,0xe07c1e07,0xc0c1e0f8, 0x3c1e0038,0xf07c1f,0xe001c00,0x1c0070f,0x1c0079,0xf3c7c380,0xf0781f07,0x83c1f00f,0xc10f0300,0x1c00380e,0x700e380,0xe0f1e03, 0xc0f00078,0x70000e,0x1c000,0x0,0xfff8003e,0x0,0x3c000000,0x10,0x20000,0xc6000,0xf0000000,0x7038003,0xe0000f00,0xf8001f0, 0x3801c,0x18300,0xe1800000,0x0,0x3,0xc187818,0x70f,0x9e03e000,0x7801dc0,0x1c,0x3cc401,0xc000efb8,0x7f7f0038,0x3f0000,0x1ce11c, 0x300c01c3,0x80000000,0x38c638,0x3fc,0x1c0003,0x80000600,0x380e,0xff8c000,0x0,0xc00300c,0xe1c0060,0xc0010,0x70000700,0x79e00f3, 0xc01e7803,0xcf0079e0,0xe1c038e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x873870e0,0x71c00e3,0x801c7003, 0x8e0070e0,0x38381dc7,0x70e00e,0x1c01c380,0x38077007,0xf0e700,0x1c0f0381,0xe0703c0e,0x781c0f0,0x381e083e,0x787c0c1e,0xf03c1e0, 0x783c0f07,0x800e0001,0xc0003800,0x7000fff,0x3e1c078,0x3c0f0781,0xe0f03c1e,0x783c000,0x1e0f03,0x80e0701c,0xe0381c0,0x70380f07, 0xc1e0e03c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x1,0x8701c600,0x1e0f01e0,0x1, 0xc0000700,0x3dbc0070,0x0,0x0,0x1c03803,0x800e0000,0x1e01fe00,0x70e03ff8,0xe3e0001,0xe007fc07,0x80f003c0,0x78001f,0xc0ffff81, 0xfc0001e0,0x30e1e0e1,0xc07ff81c,0x38038,0x3ffe07ff,0xc1c0003f,0xff801c00,0x381de0,0x1c000e7,0x738e70e1,0xc00e1c03,0xc70038e0, 0x780f8000,0xe007007,0x383838d,0x8e00f800,0x7f0000e0,0xe00038,0xe000,0x0,0x200,0xf0780e07,0x8041c078,0x380e0038,0xe03c1e, 0xf001c00,0x1c0071e,0x1c0070,0xe1c783c0,0xe0381e03,0x8380f00f,0xe0000,0x1c00380e,0x381c380,0xe07bc01,0xc0e00078,0x70000e, 0x1c000,0x0,0x1c000061,0x0,0x38000000,0x10,0x20000,0x7c000,0x7c000000,0x703fc06,0x10000e00,0x18400308,0x1801c,0x1c381,0xc3800000, 0x0,0x0,0x7000,0xe0f,0xe061000,0x7801fc0,0x1c,0x38c001,0xc0007ff0,0x7fff0038,0x77c000,0x19c00c,0x301c0387,0x0,0x30c618,0xf0, 0x1c0007,0x600,0x380e,0x7f8c007,0x80000000,0xc001818,0x70e03fc,0x387f871f,0xe0e00700,0x70e00e1,0xc01c3803,0x870070e0,0xe1c038f, 0xe1c0001f,0xff03ffe0,0x7ffc0fff,0x800e0001,0xc0003800,0x7003803,0x873870e0,0x71c00e3,0x801c7003,0x8e007070,0x703839c7,0x70e00e, 0x1c01c380,0x3807f007,0x70e700,0x10078200,0xf0401e08,0x3c10078,0x200f001c,0x3878041c,0x70380e0,0x701c0e03,0x800e0001,0xc0003800, 0x7001e0f,0x3c1e070,0x1c0e0381,0xc070380e,0x701c000,0x1c0f03,0x80e0701c,0xe0381c0,0x701c0e07,0x80e07038,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0x8600e600,0x7803f0,0x1,0xc0000700,0x718e0070,0x0,0x0,0x38038c3, 0x800e0000,0x3c01f800,0x60e03ffc,0xeff8001,0xc001f003,0xc1f003c0,0x7800fe,0xffff80,0x3f8003c0,0x60c0e0e1,0xc07fe01c,0x38038, 0x3ffe07ff,0xc1c07e3f,0xff801c00,0x381fe0,0x1c000e3,0x638e30e1,0xc00e1c07,0x870038ff,0xf00ff800,0xe007007,0x38381cd,0x9c007000, 0x3e0001e0,0xe0001c,0xe000,0x0,0x0,0x70780f0f,0x3c078,0x70070038,0x1e03c1c,0x7001c00,0x1c0073c,0x1c0070,0xe1c701c1,0xe03c1e03, 0xc780f00f,0xe0000,0x1c00380e,0x381c387,0xe03f801,0xc0e000f0,0x70000e,0x1c007,0xe0100000,0x1c0000cd,0x80000003,0xffc00000, 0x3ff,0x807ff000,0xe0,0x7fc00060,0x703fc0c,0xd8001e00,0x3360066c,0x1c018,0xc181,0x83000000,0x0,0x0,0x7000,0x300e07,0xe0cd800, 0xf000f80,0x1c,0x78c00f,0xff0038e0,0x3e00038,0xe1e000,0x19800c,0x383c070e,0x7fffc00,0x30fc18,0x0,0xffff80e,0x20e00,0x380e, 0x7f8c007,0x80000000,0xc001c38,0x38703ff,0xf87fff0f,0xcfe00f00,0x70e00e1,0xc01c3803,0x870070e0,0x1e1e078f,0xe1c0001f,0xff03ffe0, 0x7ffc0fff,0x800e0001,0xc0003800,0x700ff83,0x871870e0,0x71c00e3,0x801c7003,0x8e007038,0xe03871c7,0x70e00e,0x1c01c380,0x3803e007, 0x70e700,0x38000,0x70000e00,0x1c00038,0x7001c,0x38f00038,0x3870070,0xe00e1c01,0xc00e0001,0xc0003800,0x7001c07,0x380e0f0,0x1e1e03c3, 0xc078780f,0xf01e000,0x3c0f03,0x80e0701c,0xe0381c0,0x701c0e07,0x80f07038,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0x8600ff00,0x1e00778,0x38000001,0xc0000700,0x21843fff,0xe0000000,0x0,0x38039e3,0x800e0000, 0x7c01fe00,0xe0e0203e,0xeffc001,0xc00ffe03,0xff700000,0x7f0,0x0,0x7f00380,0x618060e1,0xc07ffc1c,0x38038,0x3ffe07ff,0xc1c07e3f, 0xff801c00,0x381ff0,0x1c000e3,0x638e38e1,0xc00e1fff,0x870038ff,0xc003fe00,0xe007007,0x38381cd,0x9c00f800,0x3e0003c0,0xe0001c, 0xe000,0x0,0x0,0x7070070e,0x38038,0x70070038,0x1c01c1c,0x7001c00,0x1c00778,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0xfc000, 0x1c00380e,0x381c3c7,0x1e01f001,0xe1e001e0,0xf0000e,0x1e01f,0xf8300000,0x1c00019c,0xc0000003,0xffc00000,0x10,0x20000,0x700, 0x1ff000c0,0x703fc19,0xcc003c00,0x67300ce6,0xc038,0xc181,0x83000000,0x0,0x0,0x7e00,0x180e07,0xe19cc00,0x1e000f80,0x1c,0x70c00f, 0xff007070,0x3e00038,0xe0f000,0x19800c,0x1fec0e1c,0x7fffc00,0x30f818,0x0,0xffff81f,0xf003fc00,0x380e,0x3f8c007,0x80000000, 0x7f800ff0,0x1c3803f,0xe007fc00,0xff800e00,0x70e00e1,0xc01c3803,0x870070e0,0x1c0e070f,0xe1c0001f,0xff03ffe0,0x7ffc0fff,0x800e0001, 0xc0003800,0x700ff83,0x871c70e0,0x71c00e3,0x801c7003,0x8e00701d,0xc038e1c7,0x70e00e,0x1c01c380,0x3803e007,0x70e3c0,0x38000, 0x70000e00,0x1c00038,0x7001c,0x38e00038,0x3870070,0xe00e1c01,0xc00e0001,0xc0003800,0x7003c07,0x8380e0e0,0xe1c01c3,0x80387007, 0xe00e1ff,0xfe381b83,0x80e0701c,0xe0381c0,0x701e1e07,0x707878,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1c,0x3,0xe007fe0,0x7800e3c,0x38000001,0xc0000700,0x1803fff,0xe0000000,0x0,0x70039c3,0x800e0000,0xf8000f80, 0xc0e0000e,0xf83c003,0xc01e0f01,0xff700000,0x7c0,0x0,0x1f00780,0x618061c0,0xe0701e1c,0x38038,0x38000700,0x1c07e38,0x3801c00, 0x381e78,0x1c000e3,0xe38e18e1,0xc00e1fff,0x70038ff,0xe0007f80,0xe007007,0x1c701dd,0x9c00f800,0x1c000780,0xe0000e,0xe000,0x0, 0x7f,0xf070070e,0x38038,0x7fff0038,0x1c01c1c,0x7001c00,0x1c007f8,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x7fc00,0x1c00380e, 0x1c381c7,0x1c01f000,0xe1c001c0,0xfe0000e,0xfe1f,0xfff00000,0x7ff003fc,0xe0000003,0xffc00000,0x10,0x20000,0x3800,0x3fc0180, 0x703803f,0xce007800,0xff381fe7,0x30,0x0,0xc0,0x0,0x0,0x3fe0,0xc0e07,0xfe3fce00,0x1c000700,0x1c,0x70c00f,0xff006030,0x1c00000, 0xe07800,0x19800c,0xfcc1c38,0x7fffc00,0x30d818,0x0,0xffff81f,0xf001f800,0x380e,0xf8c007,0x80000000,0x7f8007e0,0xe1c3fe,0x7fc00f, 0xf8001e00,0xe0701c0,0xe0381c07,0x380e070,0x1c0e070e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700ff83,0x870c70e0, 0x71c00e3,0x801c7003,0x8e00700f,0x8038c1c7,0x70e00e,0x1c01c380,0x3801c007,0xf0e3e0,0x3ff807f,0xf00ffe01,0xffc03ff8,0x7ff03ff, 0xf8e0003f,0xff87fff0,0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e1ff,0xfe383383,0x80e0701c, 0xe0381c0,0x700e1c07,0x703870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x3,0xc000ff0, 0x3c1e1c1c,0x38000001,0xc0000700,0x1803fff,0xe0000007,0xf8000000,0x7003803,0x800e0001,0xf0000381,0xc0e00007,0xf01e003,0x801c0700, 0x7c700000,0x7c0,0x0,0x1f00700,0x618061c0,0xe0700e1c,0x38038,0x38000700,0x1c00e38,0x3801c00,0x381e38,0x1c000e1,0xc38e1ce1, 0xc00e1ffc,0x70038e0,0xf0000780,0xe007007,0x1c701dd,0xdc01fc00,0x1c000780,0xe0000e,0xe000,0x0,0x1ff,0xf070070e,0x38038,0x7fff0038, 0x1c01c1c,0x7001c00,0x1c007f8,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x3ff00,0x1c00380e,0x1c381cd,0x9c00e000,0xe1c003c0, 0xf80000e,0x3e18,0x3ff00000,0xffe007fd,0xf0000000,0x38000000,0x10,0x20000,0x1c000,0x3c0300,0x703807f,0xdf007801,0xff7c3fef, 0x80000000,0x0,0x3e0,0x7ffe7ff,0xff000000,0x1ff8,0x60e07,0xfe7fdf00,0x3c000700,0x1c,0x70c001,0xc0006030,0x7fff0000,0xf03800, 0x19800c,0x1c38,0x1c07,0xf830cc18,0x0,0x1c0000,0x0,0x380e,0x18c007,0x80000000,0x0,0xe1cfe0,0x1fc003f,0x80003c00,0xe0701c0, 0xe0381c07,0x380e070,0x1c0e070e,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x870e70e0,0x71c00e3,0x801c7003, 0x8e007007,0x3981c7,0x70e00e,0x1c01c380,0x3801c007,0x1e0e0f8,0xfff81ff,0xf03ffe07,0xffc0fff8,0x1fff07ff,0xf8e0003f,0xff87fff0, 0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e1ff,0xfe386383,0x80e0701c,0xe0381c0,0x700e1c07, 0x703870,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x7f,0xffc00678,0x707f9c1e,0x38000001, 0xc0000700,0x70,0x7,0xf8000000,0xe003803,0x800e0003,0xe00001c3,0x80e00007,0xe00e007,0x80380380,0x700000,0x7f0,0x0,0x7f00700, 0x618061ff,0xe070071c,0x38038,0x38000700,0x1c00e38,0x3801c00,0x381c3c,0x1c000e1,0xc38e1ce1,0xc00e1c00,0x70038e0,0x700003c0, 0xe007007,0x1c701d8,0xdc03dc00,0x1c000f00,0xe00007,0xe000,0x0,0x3ff,0xf070070e,0x38038,0x7fff0038,0x1c01c1c,0x7001c00,0x1c007fc, 0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x3f00,0x1c00380e,0x1c381cd,0x9c01f000,0x73800780,0xfe0000e,0xfe10,0x7c00000,0x1c000ffb, 0xf8000000,0x38000000,0x10,0x20000,0x20000,0x1e0700,0x70380ff,0xbf80f003,0xfefe7fdf,0xc0000000,0x0,0x3f0,0x7ffe7ff,0xff000000, 0x1f8,0x30e07,0xfeffbf80,0x78000700,0x1c,0x70c001,0xc0006030,0x7fff0000,0x783800,0x1ce11c,0xe1c,0x1c07,0xf838ce38,0x0,0x1c0000, 0x0,0x380e,0x18c000,0x0,0x0,0x1c38c00,0x1800030,0x7800,0xfff01ff,0xe03ffc07,0xff80fff0,0x3fff0ffe,0x1c0001c,0x38000,0x70000e00, 0xe0001,0xc0003800,0x7003803,0x870e70e0,0x71c00e3,0x801c7003,0x8e00700f,0x803b81c7,0x70e00e,0x1c01c380,0x3801c007,0xffe0e03c, 0x1fff83ff,0xf07ffe0f,0xffc1fff8,0x3fff0fff,0xf8e0003f,0xff87fff0,0xfffe1fff,0xc00e0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3, 0x80387007,0xe00e000,0x38c383,0x80e0701c,0xe0381c0,0x70073807,0x701ce0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xffc0063c,0x40619c0f,0x30000001,0xc0000700,0x70,0x7,0xf8000000,0xe003803,0x800e0007,0xc00001c3, 0xfffc0007,0xe00e007,0x380380,0xf00000,0xfe,0xffff80,0x3f800700,0x618063ff,0xf070071c,0x38038,0x38000700,0x1c00e38,0x3801c00, 0x381c1e,0x1c000e0,0x38e0ee1,0xc00e1c00,0x70038e0,0x380001c0,0xe007007,0x1ef01d8,0xdc038e00,0x1c001e00,0xe00007,0xe000,0x0, 0x7c0,0x7070070e,0x38038,0x70000038,0x1c01c1c,0x7001c00,0x1c0079e,0x1c0070,0xe1c701c1,0xc01c1c01,0xc700700e,0x780,0x1c00380e, 0xe701cd,0x9c01f000,0x73800f00,0xe0000e,0xe000,0x0,0x1c0007f7,0xf0000000,0x70000000,0x10,0x20000,0x0,0xe0e00,0x703807f,0x7f01e001, 0xfdfc3fbf,0x80000000,0x0,0x7f0,0x0,0x0,0x3c,0x18e07,0x7f7f00,0xf0000700,0x1c,0x70c001,0xc0007070,0x1c00000,0x3e7000,0xcff18, 0x3ffc070e,0x1c07,0xf818c630,0x0,0x1c0000,0x0,0x380e,0x18c000,0x0,0x3ffc,0x3870000,0xe000fc00,0x380f000,0x1fff83ff,0xf07ffe0f, 0xffc1fff8,0x3fff0ffe,0x1c0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003803,0x870770e0,0x71c00e3,0x801c7003,0x8e00701d, 0xc03f01c7,0x70e00e,0x1c01c380,0x3801c007,0xffc0e01c,0x3e0387c0,0x70f80e1f,0x1c3e038,0x7c071e1c,0xe00038,0x70000,0xe0001c00, 0xe0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e000,0x398383,0x80e0701c,0xe0381c0,0x70073807,0x701ce0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xffc0061c,0xc0dc07,0xf0000001,0xc0000700, 0x70,0x0,0x0,0x1c003c07,0x800e000f,0x1c3,0xfffc0007,0xe00e007,0x380380,0xe00000,0x1f,0xc0ffff81,0xfc000700,0x618063ff,0xf070070e, 0x38070,0x38000700,0xe00e38,0x3801c00,0x381c0e,0x1c000e0,0x38e0ee1,0xe01e1c00,0x78078e0,0x380001c0,0xe007007,0xee01f8,0xfc078f00, 0x1c001c00,0xe00003,0x8000e000,0x0,0x700,0x7070070e,0x38038,0x70000038,0x1c01c1c,0x7001c00,0x1c0070e,0x1c0070,0xe1c701c1, 0xc01c1c01,0xc700700e,0x380,0x1c00380e,0xe700ed,0xb803f800,0x77800f00,0x70000e,0x1c000,0x0,0xe0003f7,0xe0000000,0x70000000, 0x10,0x20000,0x1c0e0,0xe1c00,0x703803f,0x7e01c000,0xfdf81fbf,0x0,0x0,0x3f0,0x0,0x0,0x1c,0x1ce07,0x3f7e00,0xf0000700,0x1c, 0x70c001,0xc00038e0,0x1c00038,0xf7000,0xe3e38,0x3ffc0387,0x1c00,0x1cc770,0x0,0x1c0000,0x0,0x380e,0x18c000,0x0,0x3ffc,0x70e0001, 0xe001fe00,0x780e000,0x1fff83ff,0xf07ffe0f,0xffc1fff8,0x3fff0ffe,0xe0001c,0x38000,0x70000e00,0xe0001,0xc0003800,0x7003807, 0x70770f0,0xf1e01e3,0xc03c7807,0x8f00f038,0xe03e03c7,0x70e00e,0x1c01c380,0x3801c007,0xff00e00e,0x38038700,0x70e00e1c,0x1c38038, 0x70071c1c,0xe00038,0x70000,0xe0001c00,0xe0001,0xc0003800,0x7003803,0x8380e0e0,0xe1c01c3,0x80387007,0xe00e000,0x3b0383,0x80e0701c, 0xe0381c0,0x70077807,0x701de0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x1c00061c, 0xc0de03,0xe0000001,0xc0000700,0x70,0x0,0x0,0x1c001c07,0xe001e,0x1c3,0xfffc0007,0x600e00e,0x380380,0xe00000,0x7,0xf0ffff87, 0xf0000000,0x60c0e380,0x7070070e,0x38070,0x38000700,0xe00e38,0x3801c00,0x381c0f,0x1c000e0,0x38e06e0,0xe01c1c00,0x38070e0, 0x1c0001c0,0xe007007,0xee00f8,0xf80f0700,0x1c003c00,0xe00003,0x8000e000,0x0,0x700,0x70780f0f,0x3c078,0x70000038,0x1e03c1c, 0x7001c00,0x1c0070f,0x1c0070,0xe1c701c1,0xe03c1e03,0xc780f00e,0x380,0x1c00380e,0xe700f8,0xf807bc00,0x3f001e00,0x70000e,0x1c000, 0x0,0xe0001ff,0xc0000000,0x70000000,0x10,0x20000,0x33110,0xe0e00,0x383801f,0xfc03c000,0x7ff00ffe,0x0,0x0,0x3e0,0x0,0x0,0x1c, 0x38e07,0x1ffc01,0xe0000700,0x1c,0x78c001,0xc0007ff0,0x1c00038,0x7c000,0x70070,0x1c3,0x80001c00,0xe00e0,0x0,0x1c0000,0x0, 0x380e,0x18c000,0x0,0x0,0xe1c0001,0xe0010700,0x780e000,0x1c038380,0x70700e0e,0x1c1c038,0x78070e0e,0xe0001c,0x38000,0x70000e00, 0xe0001,0xc0003800,0x7003807,0x7037070,0xe0e01c1,0xc0383807,0x700e070,0x701c0387,0x70e00e,0x1c01c380,0x3801c007,0xe00e,0x38038700, 0x70e00e1c,0x1c38038,0x70071c1c,0xf00038,0x70000,0xe0001c00,0xe0001,0xc0003800,0x7003c07,0x8380e0f0,0x1e1e03c3,0xc078780f, 0xf01e007,0x803e0783,0x80e0701c,0xe0381c0,0x7003f007,0x80f00fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x6,0x1800061c,0xc0de01,0xc0000000,0xc0000e00,0x70,0xf0000,0x3c00,0x38001c0f,0xe003c,0x3c0,0xe0000e,0x701e00e, 0x3c0780,0x1e003c0,0x780000,0xfc00001f,0x80000000,0x60e1e780,0x78700f07,0x4380f0,0x38000700,0xf00e38,0x3801c00,0xc0781c07, 0x81c000e0,0x38e07e0,0xe03c1c00,0x380f0e0,0x1e0003c0,0xe00780f,0xee00f0,0x780e0780,0x1c007800,0xe00001,0xc000e000,0x0,0x700, 0xf0780e07,0x8041c078,0x38020038,0xe03c1c,0x7001c00,0x1c00707,0x801c0070,0xe1c701c0,0xe0381e03,0x8380f00e,0x80380,0x1c003c1e, 0x7e00f8,0xf80f1e00,0x3f003c00,0x70000e,0x1c000,0x0,0xf0100f7,0x80078000,0x700078f0,0x10,0x7ff000,0x61208,0x1e0700,0x383800f, 0x78078000,0x3de007bc,0x0,0x0,0x0,0x0,0x0,0x401c,0x70e0f,0xf7803,0xc0000700,0x1c,0x38c001,0xc000efb8,0x1c00038,0x1e000,0x3c1e0, 0xc1,0x80000000,0x783c0,0x0,0x0,0x0,0x3c1e,0x18c000,0x0,0x0,0xc180003,0x60000300,0xd80e010,0x3c03c780,0x78f00f1e,0x1e3c03c, 0x70039c0e,0x70041c,0x38000,0x70000e00,0xe0001,0xc0003800,0x700380f,0x703f070,0x1e0e03c1,0xc078380f,0x701e0e0,0x381c0787, 0x80f0f01e,0x1e03c3c0,0x7801c007,0xe00e,0x38078700,0xf0e01e1c,0x3c38078,0x700f1c1c,0x78041c,0x1038020,0x70040e00,0x800e0001, 0xc0003800,0x7001c07,0x380e070,0x1c0e0381,0xc070380e,0x701c007,0x801e0703,0xc1e0783c,0xf0781e0,0xf003f007,0x80e00fc0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xe,0x1801867c,0xc0cf83,0xe0000000,0xe0000e00, 0x70,0xf0000,0x3c00,0x38000f1e,0xe0070,0x180780,0xe0603e,0x783c01e,0x1e0f01,0x7c003c0,0x780000,0x3c00001e,0x700,0x307fe700, 0x38701e07,0xc1c383e0,0x38000700,0x7c1e38,0x3801c00,0xe0f01c03,0x81c000e0,0x38e03e0,0x78781c00,0x1e1e0e0,0xe180780,0xe003c1e, 0x7c00f0,0x781e03c0,0x1c007000,0xe00001,0xc000e000,0x0,0x783,0xf07c1e07,0xc0c1e0f8,0x3e0e0038,0xf07c1c,0x7001c00,0x1c00703, 0xc01e0070,0xe1c701c0,0xf0781f07,0x83c1f00e,0xe0f80,0x1e003c3e,0x7e00f8,0xf80e0e00,0x3f003800,0x70000e,0x1c000,0x0,0x7830077, 0xf0000,0x700078f0,0x10,0x20000,0x41208,0xc03c0380,0x3c38007,0x70070000,0x1dc003b8,0x0,0x0,0x0,0x0,0x0,0x707c,0x6070f,0x86077003, 0x80000700,0x1c,0x3ec401,0xc001c01c,0x1c00038,0xf000,0x1ffc0,0x40,0x80000000,0x3ff80,0x0,0x0,0x0,0x3e3e,0x18c000,0x0,0x0, 0x8100006,0x60000300,0x1980f070,0x3801c700,0x38e0071c,0xe3801c,0x70039c0e,0x7c1c1c,0x38000,0x70000e00,0xe0001,0xc0003800, 0x700383e,0x701f03c,0x3c078780,0xf0f01e1e,0x3c3c1c0,0x1c3f0f03,0xc1e0783c,0xf0781e0,0xf001c007,0xe81e,0x3c1f8783,0xf0f07e1e, 0xfc3c1f8,0x783f1e3e,0x187c0c1f,0x703e0e0,0x7c1c0f83,0x800e0001,0xc0003800,0x7001e0f,0x380e078,0x3c0f0781,0xe0f03c1e,0x783c007, 0x801e0f03,0xc3e0787c,0xf0f81e1,0xf003f007,0xc1e00fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x1c,0xe,0x3801fff8,0x6187ff,0xe0000000,0xe0000e00,0x70,0xf0000,0x3c00,0x38000ffe,0x1fff0ff,0xfe1fff80,0xe07ffc,0x3ffc01c, 0x1fff01,0xff8003c0,0x780000,0x4000010,0x700,0x301e6700,0x387ffe03,0xffc3ffc0,0x3fff0700,0x3ffe38,0x383ffe0,0xfff01c03,0xc1fff8e0, 0x38e03e0,0x7ff81c00,0x1ffe0e0,0xf1fff80,0xe003ffe,0x7c00f0,0x781c01c0,0x1c00ffff,0xe00001,0xc000e000,0x0,0x3ff,0x707ffc03, 0xffc0fff8,0x1ffe0038,0x7ffc1c,0x707fff0,0x1c00701,0xc00ff070,0xe1c701c0,0x7ff01fff,0x1fff00e,0xfff00,0xff81fee,0x7e00f0, 0x781e0f00,0x1e007ffc,0x70000e,0x1c000,0x0,0x3ff003e,0xf0000,0xe00070e0,0x60830010,0x20000,0x41208,0xfffc01c0,0x1fffe03,0xe00ffff0, 0xf8001f0,0x0,0x0,0x0,0x0,0x0,0x7ff8,0xc07fd,0xfe03e007,0xffc00700,0x1c,0x1ffc1f,0xffc08008,0x1c00038,0x7000,0x7f00,0x0,0x0, 0xfe00,0x0,0xffff800,0x0,0x3ff7,0x8018c000,0x0,0x0,0x6,0x60000700,0x19807ff0,0x3801c700,0x38e0071c,0xe3801c,0x70039c0f,0xf03ffc1f, 0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ffc,0x701f03f,0xfc07ff80,0xfff01ffe,0x3ffc080,0x83fff03,0xffe07ffc,0xfff81ff, 0xf001c007,0xeffc,0x1ffb83ff,0x707fee0f,0xfdc1ffb8,0x3ff70ff7,0xf83ffc0f,0xff01ffe0,0x3ffc07ff,0x83fff87f,0xff0fffe1,0xfffc0ffe, 0x380e03f,0xf807ff00,0xffe01ffc,0x3ff8007,0x803ffe01,0xfee03fdc,0x7fb80ff,0x7001e007,0xffc00780,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xc,0x3801fff0,0x7f83fe,0x70000000,0xe0000e00,0x0,0xf0000,0x3c00,0x700007fc, 0x1fff0ff,0xfe1ffe00,0xe07ff8,0x1ff801c,0xffe01,0xff0003c0,0x780000,0x0,0x700,0x38000f00,0x3c7ffc01,0xff83ff80,0x3fff0700, 0x1ffc38,0x383ffe0,0x7fe01c01,0xe1fff8e0,0x38e03e0,0x3ff01c00,0xffc0e0,0x71fff00,0xe001ffc,0x7c00f0,0x783c01e0,0x1c00ffff, 0xe00000,0xe000e000,0x0,0x1ff,0x7077f801,0xff807fb8,0xffc0038,0x3fdc1c,0x707fff0,0x1c00701,0xe007f070,0xe1c701c0,0x3fe01dfe, 0xff700e,0x7fe00,0xff80fee,0x3c0070,0x703c0780,0x1e007ffc,0x70000e,0x1c000,0x0,0x1fe001c,0xe0000,0xe000e1c0,0x71c78010,0x20000, 0x21318,0xfff800c0,0xfffe01,0xc00ffff0,0x70000e0,0x0,0x0,0x0,0x0,0x0,0x3ff0,0x1803fd,0xfe01c007,0xffc00700,0x1c,0xffc1f,0xffc00000, 0x1c00038,0x7000,0x0,0x0,0x0,0x0,0x0,0xffff800,0x0,0x3ff7,0x8018c000,0x0,0x0,0xc,0x60000e00,0x31803fe0,0x7801ef00,0x3de007bc, 0xf7801e,0xf003fc0f,0xf01ff81f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83ff8,0x701f01f,0xf803ff00,0x7fe00ffc,0x1ff8000, 0x67fe01,0xffc03ff8,0x7ff00ff,0xe001c007,0xeff8,0xffb81ff,0x703fee07,0xfdc0ffb8,0x1ff70ff7,0xf81ff807,0xfe00ffc0,0x1ff803ff, 0x3fff87f,0xff0fffe1,0xfffc07fc,0x380e01f,0xf003fe00,0x7fc00ff8,0x1ff0000,0x37fc00,0xfee01fdc,0x3fb807f,0x7001e007,0x7f800780, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xc,0x30007fc0,0x1e00f8,0x78000000,0x70001c00, 0x0,0xe0000,0x3c00,0x700001f0,0x1fff0ff,0xfe07f800,0xe01fe0,0x7e0038,0x3f800,0xfc0003c0,0x700000,0x0,0x700,0x18000e00,0x1c7ff000, 0x7e03fe00,0x3fff0700,0x7f038,0x383ffe0,0x1f801c00,0xf1fff8e0,0x38e01e0,0xfc01c00,0x3f80e0,0x787fc00,0xe0007f0,0x7c00f0,0x387800f0, 0x1c00ffff,0xe00000,0xe000e000,0x0,0xfc,0x7071f000,0x3f003e38,0x3f00038,0x1f1c1c,0x707fff0,0x1c00700,0xf003f070,0xe1c701c0, 0x1f801c7c,0x7c700e,0x1f800,0x3f8078e,0x3c0070,0x707803c0,0x1c007ffc,0x70000e,0x1c000,0x0,0x7c0008,0x1e0000,0xe000e1c0,0x71c30010, 0x20000,0x1e1f0,0x3fe00020,0x3ffe00,0x800ffff0,0x2000040,0x0,0x0,0x0,0x0,0x0,0xfc0,0x3001f0,0x78008007,0xffc00700,0x1c,0x3f81f, 0xffc00000,0x1c00038,0x407000,0x0,0x0,0x0,0x0,0x0,0xffff800,0x0,0x39c7,0x18c000,0x0,0x0,0x18,0x60001c00,0x61801f80,0x7000ee00, 0x1dc003b8,0x77000e,0xe001f80f,0xf007e01f,0xff83fff0,0x7ffe0fff,0xc1fff03f,0xfe07ffc0,0xfff83fc0,0x700f007,0xe000fc00,0x1f8003f0, 0x7e0000,0xe1f800,0x7f000fe0,0x1fc003f,0x8001c007,0xe7f0,0x7e380fc,0x701f8e03,0xf1c07e38,0xfc703c1,0xe003f001,0xf8003f00, 0x7e000fc,0x3fff87f,0xff0fffe1,0xfffc03f8,0x380e00f,0xc001f800,0x3f0007e0,0xfc0000,0x61f800,0x78e00f1c,0x1e3803c,0x7001c007, 0x1f000700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x70001c00,0x0, 0x1c0000,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0xc000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0, 0x0,0x0,0x0,0x0,0xe00000,0x7000e000,0x0,0x0,0x0,0x0,0x0,0x1c00,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x1c000000, 0x70000e,0x1c000,0x0,0x0,0x1c0000,0xe000c180,0x10,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000, 0x0,0x38,0x70e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x2000,0x0,0x1f,0xf8003800,0x7fe00000,0x0,0x0,0x0,0x0,0x4000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000, 0x0,0x0,0x1c007,0x700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x30001800, 0x0,0x1c0000,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xe00000,0x0,0x0,0xe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e000, 0x0,0x0,0x0,0x0,0x0,0xe00000,0x7000e000,0x0,0x0,0x0,0x0,0x0,0x1c00,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x1c000000, 0x70000e,0x1c000,0x0,0x0,0x1c0001,0xe001c380,0x10,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000, 0x0,0x38,0x7fe000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x3000,0x0,0x1f,0xf8007000,0x7fe00000,0x0,0x0,0x0,0x0,0x6000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x1c007,0x700,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x38003800, 0x0,0x380000,0x1,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00000,0x0,0x0,0x3c18000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf000, 0x0,0x0,0x0,0x0,0x0,0xfe0000,0x380fe000,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x1c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x38000000, 0x78000e,0x3c000,0x0,0x0,0x180001,0xc0018300,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0, 0x38,0x1f8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x18c000,0x1800,0x0,0x0,0x6000e000,0x1800000,0x0,0x0,0x0,0x0,0x3000,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x38007,0xe00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x18003000, 0x0,0x300000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800000,0x0,0x0,0x1ff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0, 0x0,0x0,0x0,0xfe0000,0xfe000,0x0,0x0,0x0,0x0,0x0,0x607800,0x0,0x3c00000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x0,0x78000000, 0x3f800e,0x3f8000,0x0,0x0,0x300043,0xc0018200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000, 0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x11800,0x0,0x0,0x6001ff00,0x1800000,0x0,0x0,0x0,0x0,0x23000,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x23000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78007, 0x1e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x600,0x0,0x0,0x1c007000,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe0000, 0xfe000,0x0,0x0,0x0,0x0,0x0,0x7ff000,0x0,0x7f800000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xf8000000,0x3f800e,0x3f8000,0x0, 0x0,0x10007f,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x38,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x3800,0x0,0x1f800,0x0,0x0,0x6001ff00,0x1800000,0x0,0x0,0x0,0x0,0x3f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f8007,0xfe00,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x7fe000,0x0, 0x7f000000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xf0000000,0xf800e,0x3e0000,0x0,0x0,0x7f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3800,0x0,0x1f000,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x3f0007,0xfc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x1fc000,0x0,0x7e000000,0x0,0x0,0x1c00,0x7000,0x0,0x0,0x0,0x3,0xc0000000,0xe,0x0, 0x0,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x3800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0007,0xf000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 }; // Definition of a 29x57 font const unsigned int font29x57[29*57*256/32] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x781e00,0x0,0x0,0x7,0x81e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c0000,0xf8000,0x7e00000,0x0,0x7, 0xc0000000,0x0,0x7c00,0xf80,0x7e000,0x0,0x7c00000,0xf80000,0x7e000000,0x0,0x0,0x1f00,0x3e0,0x1f800,0x0,0x0,0x0,0x3,0xe0000000, 0x7c00003f,0x0,0xf8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x3c3c00,0x0,0x0,0x3,0xc3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e0000, 0x1f0000,0x7e00000,0xf838001f,0xf80001f,0xf0000000,0x0,0x3e00,0x1f00,0x7e000,0x3e1f000,0x3e00000,0x1f00000,0x7e00003e,0x1f000000, 0x3e0,0xe0000f80,0x7c0,0x1f800,0x3e0e00,0x7c3e000,0x0,0x1,0xf0000000,0xf800003f,0x1f0f,0x800001f0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e7800,0x0,0x0, 0x1,0xe7800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e0000,0x1e0000,0xff00001,0xfe38001f,0xf80003f, 0xf8000000,0x0,0x1e00,0x1e00,0xff000,0x3e1f000,0x1e00000,0x1e00000,0xff00003e,0x1f000000,0x7f8,0xe0000780,0x780,0x3fc00,0x7f8e00, 0x7c3e000,0x0,0x0,0xf0000000,0xf000007f,0x80001f0f,0x800001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xef000,0x0,0x0,0x0,0xef000000,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000,0x3c0000,0x1e780003,0xfff8001f,0xf80003c,0x78000000,0x0,0xf00,0x3c00,0x1e7800, 0x3e1f000,0xf00000,0x3c00001,0xe780003e,0x1f000000,0xfff,0xe00003c0,0xf00,0x79e00,0xfffe00,0x7c3e000,0x0,0x0,0x78000001,0xe00000f3, 0xc0001f0f,0x800003c0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e000,0x0,0x0,0x0,0x7e000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x78000,0x780000,0x3c3c0003,0x8ff0001f,0xf800078,0x3c000000,0x0,0x780,0x7800,0x3c3c00,0x3e1f000,0x780000,0x7800003,0xc3c0003e, 0x1f000000,0xe3f,0xc00001e0,0x1e00,0xf0f00,0xe3fc00,0x7c3e000,0x0,0x0,0x3c000003,0xc00001e1,0xe0001f0f,0x80000780,0x0,0x0, 0x0,0x0,0x0,0x0,0x1f,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x7e000,0x0,0x0,0x0,0x7e000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc00,0x7e000,0xfe000,0x0,0x3c000,0xf00000,0x781e0003, 0x83e0001f,0xf800070,0x1c000000,0x0,0x3c0,0xf000,0x781e00,0x3e1f000,0x3c0000,0xf000007,0x81e0003e,0x1f000000,0xe0f,0x800000f0, 0x3c00,0x1e0780,0xe0f800,0x7c3e000,0x0,0x0,0x1e000007,0x800003c0,0xf0001f0f,0x80000f00,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf8000000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3fc00,0x1fe000,0x3ff800,0x0,0x0,0x0,0x0,0x0,0x70,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x78000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x78,0xf000000,0x0,0x0,0x780f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c0, 0x0,0x0,0x0,0x0,0x0,0x0,0x3fc00,0x1fe000,0x3ffc00,0x0,0x0,0x0,0x0,0x0,0x70,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00000,0x3e000,0x3e00000,0x0,0x78,0x3c000000,0x0,0x1f000,0x3e0, 0x3e000,0x0,0x1f000000,0x3e0000,0x3e000000,0x0,0x0,0x7c00,0xf8,0xf800,0x0,0x0,0x0,0xf,0x80000000,0x1f00001f,0x0,0x3e,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x781c0000,0x38,0xe000000,0x0,0x0,0x380e0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x0,0x0,0x0,0x0,0x0,0x0,0x39c00,0x1ce000,0x303e00, 0x0,0x0,0x0,0x0,0x0,0x78,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0, 0x0,0x0,0xf80000,0x7c000,0x3e00000,0xf0380000,0x70,0x1c000000,0x0,0xf800,0x7c0,0x3e000,0x0,0xf800000,0x7c0000,0x3e000000, 0x0,0x3c0,0xe0003e00,0x1f0,0xf800,0x3c0e00,0x0,0x0,0x7,0xc0000000,0x3e00001f,0x0,0x7c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0xff,0x0, 0xf8,0xf8000,0x1c000,0x0,0x0,0x0,0x0,0x1f,0xc0000000,0x1ff8,0xff00,0x0,0x0,0x3fe000,0x0,0x1fc00001,0xfe000000,0x0,0x0,0x0, 0x0,0x7f800,0x0,0x0,0x0,0xff00000,0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xf8000000,0xfe,0x0,0x7f80,0x0,0x0,0x0,0x0,0x0, 0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x780000,0x1,0xe0000000,0x0,0x780000,0x3,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc0000f0,0x3f000,0x0,0x0,0x3fc00,0x0,0x0,0x1fc000,0x0,0x0,0x0,0x1fc0, 0x0,0xff000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe1c0000,0x1c,0x1c000000,0x0,0x0,0x1c1c0,0x0,0x0,0x0,0x0,0x1fe0000, 0x0,0x0,0x1ff,0x1f0f8,0x0,0xff000,0x0,0x0,0x0,0x3f,0xff00000f,0x80000000,0xfe0,0x3f80,0xf00,0x0,0x0,0x0,0x1,0xf8000003,0xe0000000, 0x1c00,0xe000,0xe00,0x0,0x0,0x0,0x0,0x0,0x3c,0x78000000,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f0,0x3f80,0x1fc00,0xfe000, 0x7f0000,0x0,0x1fc07000,0x0,0x0,0x0,0x0,0x0,0x3f800,0x780000,0x78000,0x7f00001,0xfc38001f,0xf800070,0x1c000000,0x0,0x7800, 0x780,0x7f000,0x3e1f000,0x7800000,0x780000,0x7f00003e,0x1f0003f0,0x7f0,0xe0001e00,0x1e0,0x1fc00,0x7f0e00,0x7c3e000,0x0,0x3, 0xc0000000,0x3c00003f,0x80001f0f,0x80000078,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x1e078000,0x30000000,0x3ff,0xc00001e0,0xf0, 0x78000,0x1c000,0x0,0x0,0x0,0x0,0x1e0007f,0xf000007e,0x1ffff,0x7ffe0,0x1f80,0x3ffff80,0xfff803,0xfffff800,0xfff80007,0xff800000, 0x0,0x0,0x0,0x0,0x1ffe00,0x0,0xfe0003,0xfff80000,0x3ffe01ff,0xe00003ff,0xffe01fff,0xff0003ff,0xe01e0007,0x803ffff0,0xfff80, 0x3c000fc0,0x7800001f,0x8003f07e,0x1e000f,0xfe0007ff,0xf00003ff,0x8007ffe0,0x1fff8,0x7fffffe,0xf0003c1,0xe000079e,0xf1f,0x1f3e0, 0x1f01ff,0xfff8003f,0xf003c000,0x7fe0,0x3f00,0x0,0x3c0000,0x1,0xe0000000,0x0,0x780000,0xf,0xfe000000,0x78000,0x3c00,0xf000, 0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xfc0000f0,0x3fe00,0x0,0x0,0xfff00,0x0,0x0,0x3fe000, 0x0,0x0,0x0,0x1dc0,0x0,0x3fff00,0x0,0x3ffff80,0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff1c07ff,0x3c0f001e,0x3c000000, 0x0,0x0,0x1e3c0,0xf80007c,0x0,0x780000,0x0,0xfff8000,0x3e00,0x1f00000,0x7ff,0xc001f0f8,0x0,0x3ffc00,0x0,0x0,0x0,0x3f,0xff00003f, 0xe0000000,0x3ff8,0xffe0,0x1e00,0x0,0xfffc00,0x0,0x7,0xf800000f,0xf8000000,0x1c00,0xe000,0xe00,0xf000,0x1fc000,0xfe0000,0x7f00000, 0x3f800001,0xfc00003f,0xf80000ff,0xffc003ff,0xe007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01ffc, 0xfc00,0x3c001ffc,0xffe0,0x7ff00,0x3ff800,0x1ffc000,0x0,0x7ff8f0f0,0x3c0780,0x1e03c00,0xf01e000,0x783e0001,0xf01e0000,0xffe00, 0x3c0000,0xf0000,0x7700001,0xfe38001f,0xf800070,0x1c000000,0x0,0x3c00,0xf00,0x77000,0x3e1f000,0x3c00000,0xf00000,0x7700003e, 0x1f0000f8,0xc0007f8,0xe0000f00,0x3c0,0x1dc00,0x7f8e00,0x7c3e000,0x0,0x1,0xe0000000,0x7800003b,0x80001f0f,0x800000f0,0x1e0000, 0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x780000,0x3c1e0000,0x1e070000,0x300001f0,0x7ff,0xc00001e0,0x1e0,0x7c000,0x1c000,0x0,0x0,0x0,0x0,0x3c000ff,0xf80007fe, 0x3ffff,0x801ffff8,0x1f80,0x3ffff80,0x3fff803,0xfffff801,0xfffc000f,0xffc00000,0x0,0x0,0x0,0x0,0x7fff80,0x0,0xfe0003,0xffff0000, 0xffff01ff,0xfc0003ff,0xffe01fff,0xff000fff,0xf01e0007,0x803ffff0,0xfff80,0x3c001f80,0x7800001f,0xc007f07e,0x1e001f,0xff0007ff, 0xfc0007ff,0xc007fffc,0x3fffc,0x7fffffe,0xf0003c1,0xf0000f9e,0xf0f,0x8003e1e0,0x1e01ff,0xfff8003f,0xf001e000,0x7fe0,0x3f00, 0x0,0x1e0000,0x1,0xe0000000,0x0,0x780000,0x1f,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x1fff80,0x0,0x0,0xffe000,0x0,0x0,0x0,0x3de0,0x0,0x7fff80,0x0,0xfffff80, 0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe7bc07ff,0x3e1f000f,0x78000000,0x0,0x0,0xf780,0x7800078,0x0,0x780000,0x180000, 0x1fff8000,0x1e00,0x1e0003c,0xfff,0xc001f0f8,0x0,0x7ffe00,0x0,0x0,0x0,0x3f,0xff00007f,0xf0000000,0x3ffc,0xfff0,0x3c00,0x0, 0x7fffc00,0x0,0x7,0xf800003f,0xfe000000,0x1c00,0xe000,0xe00,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00001f,0xe00001ff, 0xffc00fff,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xc000fc00,0x3c003ffe,0x1fff0, 0xfff80,0x7ffc00,0x3ffe000,0x0,0xfffce0f0,0x3c0780,0x1e03c00,0xf01e000,0x781e0001,0xe01e0000,0x3fff00,0x1e0000,0x1e0000,0xf780003, 0xcf78001f,0xf800078,0x3c000000,0x0,0x1e00,0x1e00,0xf7800,0x3e1f000,0x1e00000,0x1e00000,0xf780003e,0x1f0000fc,0x7c000f3d, 0xe0000780,0x780,0x3de00,0xf3de00,0x7c3e000,0x0,0x0,0xf0000000,0xf000007b,0xc0001f0f,0x800001e0,0x1e0000,0x3e1f00,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000, 0x3c1e0000,0x1e0f0000,0x300007fc,0xfff,0xc00001e0,0x1e0,0x3c000,0x1c000,0x0,0x0,0x0,0x0,0x3c001ff,0xfc001ffe,0x3ffff,0xc01ffffc, 0x3f80,0x3ffff80,0x7fff803,0xfffff803,0xfffe001f,0xffe00000,0x0,0x0,0x0,0x0,0xffff80,0x7f800,0xfe0003,0xffff8001,0xffff01ff, 0xff0003ff,0xffe01fff,0xff001fff,0xf01e0007,0x803ffff0,0xfff80,0x3c003f00,0x7800001f,0xc007f07f,0x1e003f,0xff8007ff,0xff000fff, 0xe007ffff,0x7fffc,0x7fffffe,0xf0003c0,0xf0000f1e,0xf07,0x8003c1f0,0x3e01ff,0xfff8003f,0xf001e000,0x7fe0,0x7f80,0x0,0xe0000, 0x1,0xe0000000,0x0,0x780000,0x1f,0xfe000000,0x78000,0x3c00,0xf000,0x7800003,0xffe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0, 0x0,0x0,0x0,0x0,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x3fff80,0x0,0x0,0xffe000,0x0,0x0,0x0,0x78f0,0x0,0xffff80,0x0,0x3fffff80,0x1f, 0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xc7f80070,0x3e1f0007,0x70000000,0x0,0x0,0x7700,0x7c000f8,0x0,0x780000,0x180000, 0x3fff8000,0x1f00,0x3e0003c,0x1f03,0xc001f0f8,0x0,0x703f00,0x0,0x0,0x0,0x3f,0xff0000f0,0xf8000000,0x303e,0xc0f8,0x7800,0x0, 0xffffc00,0x0,0x7,0x3800003e,0x3e000000,0x1c00,0xe000,0x3c00,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00000f,0xe00001ff, 0xffc01fff,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf000fe00,0x3c007fff,0x3fff8, 0x1fffc0,0xfffe00,0x7fff000,0x1,0xffffc0f0,0x3c0780,0x1e03c00,0xf01e000,0x781f0003,0xe01e0000,0x3fff80,0xe0000,0x3c0000,0x1e3c0003, 0x8ff0001f,0xf80003c,0x78000000,0x0,0xe00,0x3c00,0x1e3c00,0x3e1f000,0xe00000,0x3c00001,0xe3c0003e,0x1f00007f,0xf8000e3f,0xc0000380, 0xf00,0x78f00,0xe3fc00,0x7c3e000,0x0,0x0,0x70000001,0xe00000f1,0xe0001f0f,0x800003c0,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c0f0000, 0x30000ffe,0xf80,0xc00001e0,0x3c0,0x1e000,0x101c040,0x0,0x0,0x0,0x0,0x78003f0,0x7e001ffe,0x3f807,0xe01f00fe,0x3f80,0x3ffff80, 0x7e01803,0xfffff007,0xe03f003f,0x3f00000,0x0,0x0,0x0,0x0,0xfc0fc0,0x3ffe00,0xfe0003,0xffffc003,0xf81f01ff,0xff8003ff,0xffe01fff, 0xff003f01,0xf01e0007,0x803ffff0,0xfff80,0x3c007e00,0x7800001f,0xc007f07f,0x1e007e,0xfc007ff,0xff801f83,0xf007ffff,0x800fc07c, 0x7fffffe,0xf0003c0,0xf0000f0f,0x1e07,0xc007c0f8,0x7c01ff,0xfff8003c,0xf000,0x1e0,0xffc0,0x0,0xf0000,0x1,0xe0000000,0x0,0x780000, 0x3e,0x0,0x78000,0x3c00,0xf000,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1f,0x800000f0,0x1f80, 0x0,0x0,0x7e0780,0x0,0x0,0x1f82000,0x0,0x0,0x0,0x7070,0x0,0x1f80f80,0x0,0x7fffff80,0x1f,0xffff8000,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x1,0xc3f80070,0x3f3f0007,0xf0000000,0x0,0x0,0x7f00,0x3e001f0,0x0,0x780000,0x180000,0x7f018000,0xf80,0x7c0003c,0x3e00, 0x4001f0f8,0xfe00,0x400f00,0x0,0x0,0x0,0x7f000000,0xe0,0x38000000,0x1e,0x38,0x7800,0x0,0x1ffe1c00,0x0,0x0,0x38000078,0xf000000, 0x1c00,0xe000,0x7f800,0xf000,0x1fc000,0xfe0000,0x7f00000,0x3f800001,0xfc00001f,0xf00001ff,0xffc03f81,0xf007ffff,0xc03ffffe, 0x1fffff0,0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf800fe00,0x3c00fc1f,0x8007e0fc,0x3f07e0,0x1f83f00,0xfc1f800, 0x3,0xf07fc0f0,0x3c0780,0x1e03c00,0xf01e000,0x780f8007,0xc01e0000,0x7e0fc0,0xf0000,0x3c0000,0x1c1c0003,0x87f0001f,0xf80003f, 0xf8000000,0x0,0xf00,0x3c00,0x1c1c00,0x3e1f000,0xf00000,0x3c00001,0xc1c0003e,0x1f00003f,0xc0000e1f,0xc00003c0,0xf00,0x70700, 0xe1fc00,0x7c3e000,0x0,0x0,0x78000001,0xe00000e0,0xe0001f0f,0x800003c0,0x1e0000,0x3e1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c0f0001,0xff801e0f, 0x1f00,0x1e0,0x3c0,0x1e000,0x3c1c1e0,0x0,0x0,0x0,0x0,0x78007c0,0x1f001f9e,0x3c001,0xf010003e,0x7780,0x3c00000,0xf800000,0xf007, 0xc01f007c,0x1f80000,0x0,0x0,0x0,0x0,0xe003e0,0x7fff00,0x1ef0003,0xc007e007,0xc00301e0,0x1fc003c0,0x1e00,0x7c00,0x301e0007, 0x80007800,0x780,0x3c00fc00,0x7800001f,0xe00ff07f,0x1e00f8,0x3e00780,0x1fc03e00,0xf807801f,0xc01f001c,0xf000,0xf0003c0,0xf0000f0f, 0x1e03,0xc00f8078,0x780000,0xf0003c,0xf000,0x1e0,0x1f3e0,0x0,0x78000,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0, 0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1f,0xf0,0xf80,0x0,0x0,0xf80180,0x0,0x0,0x1e00000, 0x0,0x0,0x0,0xe038,0x0,0x3e00380,0x0,0xfe0f0000,0x0,0xf0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xc0f00070,0x3b370003,0xe0000000, 0x0,0x0,0x3e00,0x1e001e0,0x0,0x780000,0x180000,0x7c000000,0x780,0x780003c,0x3c00,0x0,0x7ffc0,0x780,0x0,0x0,0x3,0xffe00000, 0x1c0,0x3c000000,0xe,0x38,0xf000,0x0,0x3ffe1c00,0x0,0x0,0x38000078,0xf000000,0x1c00,0xe000,0x7f000,0xf000,0x3de000,0x1ef0000, 0xf780000,0x7bc00003,0xde00001e,0xf00003e7,0x80007c00,0x30078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001, 0xe0001e03,0xfc00fe00,0x3c01f007,0xc00f803e,0x7c01f0,0x3e00f80,0x1f007c00,0x7,0xc01f80f0,0x3c0780,0x1e03c00,0xf01e000,0x78078007, 0x801e0000,0x7803c0,0x78000,0x780000,0x380e0003,0x81e00000,0x1f,0xf0000000,0x0,0x780,0x7800,0x380e00,0x0,0x780000,0x7800003, 0x80e00000,0x1ff,0x80000e07,0x800001e0,0x1e00,0xe0380,0xe07800,0x0,0x0,0x0,0x3c000003,0xc00001c0,0x70000000,0x780,0x1e0000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x780000,0x3c1e0000,0x3c0e0007,0xfff01c07,0x1e00,0x1e0,0x780,0xf000,0x3e1c3e0,0x0,0x0,0x0,0x0,0xf0007c0,0x1f00181e,0x20000, 0xf000001f,0xf780,0x3c00000,0x1f000000,0x1f00f,0x800f8078,0xf80000,0x0,0x0,0x0,0x0,0x8003e0,0x1fc0f80,0x1ef0003,0xc001e007, 0x800101e0,0x7e003c0,0x1e00,0x7800,0x101e0007,0x80007800,0x780,0x3c00f800,0x7800001e,0xe00ef07f,0x801e00f0,0x1e00780,0x7c03c00, 0x78078007,0xc01e0004,0xf000,0xf0003c0,0x78001e0f,0x1e03,0xe00f807c,0xf80000,0x1f0003c,0x7800,0x1e0,0x3e1f0,0x0,0x3c000,0x1, 0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0, 0x1e,0xf0,0x780,0x0,0x0,0x1f00080,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x1e03c,0x0,0x3c00080,0x0,0xf80f0000,0x0,0x1f0000,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x70,0x3bf70003,0xe0000000,0x0,0x0,0x3e00,0x1f003e0,0x0,0x780000,0x180000,0x78000000,0x7c0,0xf80003c, 0x3c00,0x0,0x1f01f0,0x780,0x0,0x0,0xf,0x80f80000,0x1c0,0x1c000000,0xe,0x38,0x1e000,0x0,0x7ffe1c00,0x0,0x0,0x380000f0,0x7800000, 0x1c00,0xe000,0x7fc00,0xf000,0x3de000,0x1ef0000,0xf780000,0x7bc00003,0xde00001e,0xf00003c7,0x80007800,0x10078000,0x3c0000, 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x7e00ff00,0x3c01e003,0xc00f001e,0x7800f0,0x3c00780,0x1e003c00, 0x7,0x800f00f0,0x3c0780,0x1e03c00,0xf01e000,0x7807c00f,0x801e0000,0xf803c0,0x3c000,0xf00000,0x780f0000,0x0,0x7,0xc0000000, 0x0,0x3c0,0xf000,0x780f00,0x0,0x3c0000,0xf000007,0x80f00000,0x7ff,0xc0000000,0xf0,0x3c00,0x1e03c0,0x0,0x0,0x0,0x0,0x1e000007, 0x800003c0,0x78000000,0xf00,0x1e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x3c1e001f,0xfff03803,0x80001e00,0x1e0,0x780,0xf000,0xf9cf80, 0x0,0x0,0x0,0x0,0xf000780,0xf00001e,0x0,0xf800000f,0xe780,0x3c00000,0x1e000000,0x1e00f,0x78078,0x7c0000,0x0,0x0,0x0,0x0,0x1e0, 0x3f003c0,0x1ef0003,0xc000f00f,0x800001e0,0x1f003c0,0x1e00,0xf000,0x1e0007,0x80007800,0x780,0x3c01f000,0x7800001e,0xe00ef07f, 0x801e01f0,0x1e00780,0x3c07c00,0x78078003,0xc03e0000,0xf000,0xf0003c0,0x78001e0f,0x1e01,0xf01f003c,0xf00000,0x3e0003c,0x7800, 0x1e0,0x7c0f8,0x0,0x0,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x3c000, 0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x1e00000,0x0,0x0,0x3c00000,0x0,0x8,0x40,0x0,0x7e0000,0x7c00000,0x1,0xf00f0000, 0x0,0x3e0000,0x0,0x3f,0xfc0,0xfc3f0,0xfc3f0,0x0,0x0,0x0,0x70,0x39e70000,0x0,0x0,0x0,0x0,0xf003c0,0x0,0x0,0x180000,0xf8000000, 0x3c0,0xf00003c,0x3c00,0x0,0x3c0078,0x7ff80,0x0,0x0,0x1e,0x3c0000,0x1c0,0x1c000000,0xe,0xf0,0x0,0x0,0x7ffe1c00,0x0,0x0,0x380000f0, 0x7800000,0x1c00,0xe000,0x3c00,0x0,0x3de000,0x1ef0000,0xf780000,0x7bc00003,0xde00001e,0xf00003c7,0x8000f800,0x78000,0x3c0000, 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x1f00ff00,0x3c03e003,0xc01f001e,0xf800f0,0x7c00780,0x3e003c00, 0xf,0x800f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7803c00f,0x1fffc0,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x307,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000,0x781e003f,0xfff03803, 0x80001e00,0x1e0,0xf80,0xf000,0x3dde00,0x0,0x0,0x0,0x0,0xf000f00,0x780001e,0x0,0x7800000f,0x1e780,0x3c00000,0x3e000000,0x3e00f, 0x780f0,0x7c0000,0x0,0x0,0x0,0x0,0x1e0,0x7c001e0,0x3ef8003,0xc000f00f,0x1e0,0xf003c0,0x1e00,0xf000,0x1e0007,0x80007800,0x780, 0x3c03e000,0x7800001e,0xf01ef07b,0xc01e01e0,0xf00780,0x3e07800,0x3c078003,0xe03c0000,0xf000,0xf0003c0,0x78001e0f,0x1e00,0xf01e003e, 0x1f00000,0x3c0003c,0x7800,0x1e0,0x78078,0x0,0x0,0x1,0xe0000000,0x0,0x780000,0x3c,0x0,0x78000,0x0,0x0,0x7800000,0x1e00000, 0x0,0x0,0x0,0x0,0x0,0x0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x1e00000,0x0,0x0,0x3c00000,0x0,0x18,0xc0,0x0, 0xe70000,0x7800000,0x1,0xe00f0000,0x0,0x3c0000,0x0,0x3f,0xfc0,0xfc1f0,0x1f83f0,0x0,0x0,0x0,0x70,0x39e70000,0x0,0x0,0x0,0x0, 0xf807c0,0x0,0x0,0x180000,0xf0000000,0x3e0,0x1f00003c,0x3e00,0x0,0x70001c,0x3fff80,0x0,0x0,0x38,0xe0000,0x1c0,0x1c000078, 0x1c,0x1fe0,0x0,0x0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800000,0x1c00,0xe000,0xe00,0x0,0x7df000,0x3ef8000,0x1f7c0000,0xfbe00007, 0xdf00003c,0x780003c7,0x8000f000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf00f780, 0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0xf,0xf80f0,0x3c0780,0x1e03c00,0xf01e000,0x7803e01f,0x1ffff8,0xf001e0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0xc000,0x0,0x0,0x0,0x0,0x1e0000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x780000,0x3c1e0000,0x781e003e,0x30703803,0x80001e00,0x1e0,0xf00,0x7800,0xff800,0x1e0000,0x0,0x0,0x0,0x1e000f00,0x780001e, 0x0,0x7800000f,0x3c780,0x3c00000,0x3c000000,0x3c00f,0x780f0,0x3c0000,0x0,0x0,0x2000000,0x800000,0x1e0,0x78000e0,0x3c78003, 0xc000f01e,0x1e0,0xf803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c07c000,0x7800001e,0x701cf07b,0xc01e01e0,0xf00780,0x1e07800, 0x3c078001,0xe03c0000,0xf000,0xf0003c0,0x7c003e0f,0x1e00,0xf83e001e,0x1e00000,0x7c0003c,0x3c00,0x1e0,0xf807c,0x0,0x0,0x1fe0001, 0xe1fc0000,0x7f00003,0xf8780007,0xf000003c,0x7f0,0x783f0,0x0,0x0,0x7800000,0x1e00000,0x3e0f8000,0xfc00007,0xf8000007,0xf00001fc, 0xf,0xc0003fc0,0x3c000,0x0,0x0,0x0,0x0,0x0,0x1e,0xf0,0x780,0x0,0x0,0x3c00000,0x0,0x0,0x3c00000,0x0,0x18,0xc0,0x0,0x1818000, 0x7800000,0x1,0xe00f0000,0x0,0x7c0000,0x0,0x1f,0x80001f80,0x7c1f8,0x1f83e0,0x0,0x0,0x0,0x70,0x38c70007,0xf8000000,0x7f03, 0xf0000000,0x0,0x780780,0x0,0x0,0xfe0000,0xf0000000,0x1e0,0x1e00003c,0x3f00,0x0,0xe07f0e,0x7fff80,0x0,0x0,0x70,0x70000,0x1c0, 0x1c000078,0x3c,0x1fc0,0x0,0x0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800000,0x1c00,0xe000,0xe00,0x0,0x78f000,0x3c78000,0x1e3c0000, 0xf1e00007,0x8f00003c,0x78000787,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00, 0xf80f780,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0xf,0x1f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7801e01e,0x1ffffc, 0xf007e0,0x3fc000,0x1fe0000,0xff00000,0x7f800003,0xfc00001f,0xe0000fc0,0xfc00007f,0xfe0,0x7f00,0x3f800,0x1fc000,0x0,0x0,0x0, 0x1,0xf000001f,0x80000ff0,0x7f80,0x3fc00,0x1fe000,0xff0000,0x1f80000,0x1fc1e000,0x0,0x0,0x0,0x0,0x1e1fc0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e0000, 0x781c007c,0x30003803,0x80001f00,0x1e0,0xf00,0x7800,0x7f000,0x1e0000,0x0,0x0,0x0,0x1e000f00,0x780001e,0x0,0x7800000f,0x3c780, 0x3c00000,0x3c000000,0x3c00f,0x780f0,0x3c0000,0x0,0x0,0x1e000000,0xf00000,0x3e0,0xf0000e0,0x3c78003,0xc000f01e,0x1e0,0x7803c0, 0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c0f8000,0x7800001e,0x701cf079,0xe01e01e0,0xf00780,0x1e07800,0x3c078001,0xe03c0000, 0xf000,0xf0003c0,0x3c003c0f,0x3e00,0x787c001f,0x3e00000,0xf80003c,0x3c00,0x1e0,0x1f003e,0x0,0x0,0x1fffc001,0xe7ff0000,0x3ffe000f, 0xfe78003f,0xfc001fff,0xfe001ffc,0xf0078ffc,0x1ffc00,0x7ff000,0x7800f80,0x1e0000f,0x7f1fc01e,0x3ff0001f,0xfe00079f,0xfc0007ff, 0x3c003c7f,0xf001fff8,0x1fffff0,0x3c003c0,0xf0000f1e,0xf1f,0x7c1f0,0x1f00ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x3c00000,0x100000, 0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1818000,0x7800000,0x1,0xe00f0000,0x1000000,0xf80000,0x40000002,0xf,0x80001f00,0x7e0f8,0x1f07c0, 0x0,0x0,0x0,0x70,0x38c7003f,0xff000000,0xff8f,0xf8000100,0xffffe,0x7c0f80,0x0,0x0,0x3ffc000,0xf0000020,0x1001f0,0x3c00003c, 0x1f80,0x0,0x1c3ffc7,0x7c0780,0x0,0x0,0xe3,0xff038000,0xe0,0x38000078,0x78,0x1ff0,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x380000f0, 0x7800000,0x1c00,0xe000,0xe00,0xf000,0x78f000,0x3c78000,0x1e3c0000,0xf1e00007,0x8f00003c,0x78000787,0x8001e000,0x78000,0x3c0000, 0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00, 0x4000200f,0x3f80f0,0x3c0780,0x1e03c00,0xf01e000,0x7801f03e,0x1ffffe,0xf01fe0,0x3fff800,0x1fffc000,0xfffe0007,0xfff0003f, 0xff8001ff,0xfc003ff3,0xfe0003ff,0xe0007ff8,0x3ffc0,0x1ffe00,0xfff000,0x3ff80001,0xffc0000f,0xfe00007f,0xf000003f,0xf8003c7f, 0xe0003ffc,0x1ffe0,0xfff00,0x7ff800,0x3ffc000,0x1f80000,0xfff1c03c,0x3c01e0,0x1e00f00,0xf007800,0x781f0001,0xf01e7ff0,0x7c0007c, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000, 0x3c1e003f,0xfffff078,0x30003803,0x80000f00,0x1e0,0x1f00,0x7800,0x7f000,0x1e0000,0x0,0x0,0x0,0x3c000f00,0x780001e,0x0,0x7800000f, 0x78780,0x3c00000,0x3c000000,0x7c00f,0x780f0,0x3c0007,0xe000003f,0x0,0xfe000000,0xfe0000,0x3c0,0x1f000070,0x7c7c003,0xc000f01e, 0x1e0,0x7803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c1f0000,0x7800001e,0x783cf079,0xe01e03c0,0xf00780,0x1e0f000,0x3c078001, 0xe03c0000,0xf000,0xf0003c0,0x3c003c07,0x81f03c00,0x7c7c000f,0x87c00000,0xf00003c,0x1e00,0x1e0,0x3e001f,0x0,0x0,0x3fffe001, 0xefff8000,0x7fff001f,0xff78007f,0xfe001fff,0xfe003ffe,0xf0079ffe,0x1ffc00,0x7ff000,0x7801f00,0x1e0000f,0xffbfe01e,0x7ff8003f, 0xff0007bf,0xfe000fff,0xbc003cff,0xf803fffc,0x1fffff0,0x3c003c0,0x78001e1e,0xf0f,0x800f80f0,0x1e00ff,0xffe0001e,0xf0,0x780, 0x0,0x0,0x3c00000,0x380000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1008000,0x7800000,0x3,0xe00f0000,0x3800000,0xf00000,0xe0000007, 0xf,0x80001f00,0x3e0f8,0x1e07c0,0x0,0x0,0x0,0x70,0x3807007f,0xff800000,0x1ffdf,0xfc000380,0xffffe,0x3e1f00,0x0,0x0,0xfffe000, 0xf0000030,0x3800f8,0x7c00003c,0xfc0,0x0,0x18780c3,0xf00780,0x80100,0x0,0xc3,0xffc18000,0xf0,0x78000078,0xf0,0xf0,0x0,0x3c003c0, 0xfffe1c00,0x0,0x0,0x380000f0,0x7800801,0x1c00,0xe000,0x1e00,0xf000,0xf8f800,0x7c7c000,0x3e3e0001,0xf1f0000f,0x8f80007c,0x7c000787, 0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c078001,0xe03c000f, 0x1e00078,0xf0003c0,0x78001e00,0xe000701f,0x3fc0f0,0x3c0780,0x1e03c00,0xf01e000,0x7800f87c,0x1e007f,0xf07e00,0x7fffc00,0x3fffe001, 0xffff000f,0xfff8007f,0xffc003ff,0xfe007ff7,0xff0007ff,0xf000fffc,0x7ffe0,0x3fff00,0x1fff800,0x3ff80001,0xffc0000f,0xfe00007f, 0xf00000ff,0xf8003cff,0xf0007ffe,0x3fff0,0x1fff80,0xfffc00,0x7ffe000,0x1f80001,0xfffb803c,0x3c01e0,0x1e00f00,0xf007800,0x780f0001, 0xe01efff8,0x3c00078,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x780000,0x3c1e003f,0xfffff078,0x30001c07,0xf80,0x1e0,0x1e00,0x3c00,0xff800,0x1e0000,0x0,0x0,0x0,0x3c001e00, 0x3c0001e,0x0,0x7800001e,0x70780,0x3c00000,0x78000000,0x78007,0x800f00f0,0x3e0007,0xe000003f,0x3,0xfe000000,0xff8000,0x7c0, 0x1e000070,0x783c003,0xc001f01e,0x1e0,0x7803c0,0x1e00,0x1e000,0x1e0007,0x80007800,0x780,0x3c3e0000,0x7800001e,0x3838f079, 0xe01e03c0,0x780780,0x1e0f000,0x1e078001,0xe03c0000,0xf000,0xf0003c0,0x3c007c07,0x81f03c00,0x3ef80007,0x87800000,0x1f00003c, 0x1e00,0x1e0,0x7c000f,0x80000000,0x0,0x3ffff001,0xffffc000,0xffff003f,0xff7800ff,0xff001fff,0xfe007ffe,0xf007bffe,0x1ffc00, 0x7ff000,0x7803e00,0x1e0000f,0xffffe01e,0xfff8007f,0xff8007ff,0xff001fff,0xbc003dff,0xf807fffc,0x1fffff0,0x3c003c0,0x78001e0f, 0x1e07,0xc01f00f0,0x1e00ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x7c00000,0x7c0000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1018000,0x7800000, 0x3,0xc00f0000,0x7c00000,0x1f00001,0xf000000f,0x80000007,0xc0003e00,0x1e07c,0x3e0780,0x0,0x0,0x0,0x70,0x380700ff,0xff800000, 0x3ffff,0xfe0007c0,0xffffe,0x1e1e00,0x0,0x780000,0x1fffe000,0xf0000078,0x7c0078,0x7800003c,0xff0,0x0,0x38e0003,0x80f00780, 0x180300,0x0,0x1c3,0x81e1c000,0x7f,0xf0000078,0x1e0,0x38,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x380000f0,0x7800c01,0x80001c00, 0xe000,0x603e00,0xf000,0xf07800,0x783c000,0x3c1e0001,0xe0f0000f,0x7800078,0x3c000f87,0x8001e000,0x78000,0x3c0000,0x1e00000, 0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f3c0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f01,0xf000f81e, 0x7bc0f0,0x3c0780,0x1e03c00,0xf01e000,0x78007878,0x1e001f,0xf0f800,0x7fffe00,0x3ffff001,0xffff800f,0xfffc007f,0xffe003ff, 0xff007fff,0xff800fff,0xf001fffe,0xffff0,0x7fff80,0x3fffc00,0x3ff80001,0xffc0000f,0xfe00007f,0xf00001ff,0xfc003dff,0xf000ffff, 0x7fff8,0x3fffc0,0x1fffe00,0xffff000,0x1f80003,0xffff803c,0x3c01e0,0x1e00f00,0xf007800,0x780f0001,0xe01ffffc,0x3c00078,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000, 0x3c1e003f,0xfffff078,0x30001e0f,0x300780,0x1e0,0x1e00,0x3c00,0x3dde00,0x1e0000,0x0,0x0,0x0,0x78001e00,0x3c0001e,0x0,0xf800003e, 0xf0780,0x3dfc000,0x783f8000,0xf8007,0xc01f00f0,0x3e0007,0xe000003f,0x1f,0xfc000000,0x7ff000,0xf80,0x3e007c70,0x783c003,0xc001e03c, 0x1e0,0x3c03c0,0x1e00,0x3c000,0x1e0007,0x80007800,0x780,0x3c7c0000,0x7800001e,0x3878f078,0xf01e03c0,0x780780,0x1e0f000,0x1e078001, 0xe03e0000,0xf000,0xf0003c0,0x1e007807,0x83f03c00,0x3ef00007,0xcf800000,0x3e00003c,0xf00,0x1e0,0xf80007,0xc0000000,0x0,0x3e01f801, 0xfe07e001,0xf80f007e,0x7f801f8,0x1f801fff,0xfe00fc0f,0xf007f83f,0x1ffc00,0x7ff000,0x7807c00,0x1e0000f,0x87e1e01f,0xe0fc00fc, 0xfc007f8,0x1f803f03,0xfc003df0,0x3807e03c,0x1fffff0,0x3c003c0,0x78003e0f,0x1e03,0xe03e00f8,0x3e00ff,0xffe0001e,0xf0,0x780, 0x0,0x0,0x7800000,0xfe0000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0x1818000,0x7c00000,0x3,0xc00f0000,0xfe00000,0x3e00003,0xf800001f, 0xc0000007,0xc0003e00,0x1e03c,0x3c0f80,0x0,0x0,0x0,0x70,0x380700fc,0x7800000,0x7c1fe,0x3e000fe0,0xffffe,0x1f3e00,0x0,0x780000, 0x3f98e000,0xf000003c,0xfcf8007c,0xf800003c,0x3ffc,0x0,0x31c0001,0x80f00f80,0x380700,0x0,0x183,0x80e0c000,0x3f,0xe0000078, 0x3c0,0x38,0x0,0x3c003c0,0xfffe1c00,0x0,0x0,0x38000078,0xf000e01,0xc003ffe0,0x1fff00,0x7ffc00,0xf000,0xf07800,0x783c000,0x3c1e0001, 0xe0f0000f,0x7800078,0x3c000f07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00, 0x3c0f1e0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf801f01e,0xf3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78007cf8, 0x1e000f,0x80f0f000,0x7c03f00,0x3e01f801,0xf00fc00f,0x807e007c,0x3f003e0,0x1f80707f,0x8f801f80,0xf003f03f,0x1f81f8,0xfc0fc0, 0x7e07e00,0x3ff80001,0xffc0000f,0xfe00007f,0xf00003ff,0xfc003fc1,0xf801f81f,0x800fc0fc,0x7e07e0,0x3f03f00,0x1f81f800,0x1f80007, 0xe07f003c,0x3c01e0,0x1e00f00,0xf007800,0x780f8003,0xe01fe07e,0x3e000f8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3f,0xfffff078,0x30000ffe,0x1f007c0,0x0,0x1e00, 0x3c00,0xf9cf80,0x1e0000,0x0,0x0,0x0,0x78001e00,0x3c0001e,0x0,0xf00000fc,0x1e0780,0x3fff800,0x78ffe000,0xf0003,0xe03e00f0, 0x3e0007,0xe000003f,0x7f,0xe01fffff,0xf00ffc00,0x1f80,0x3c01ff70,0x783c003,0xc007e03c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x1e0007, 0x80007800,0x780,0x3cfc0000,0x7800001e,0x3c78f078,0xf01e03c0,0x780780,0x3e0f000,0x1e078003,0xc01f0000,0xf000,0xf0003c0,0x1e007807, 0x83f83c00,0x1ff00003,0xcf000000,0x3e00003c,0xf00,0x1e0,0x0,0x0,0x0,0x20007801,0xfc03e003,0xe003007c,0x3f803e0,0x7c0003c, 0xf807,0xf007e00f,0x3c00,0xf000,0x780f800,0x1e0000f,0x87e1f01f,0x803c00f8,0x7c007f0,0xf803e01,0xfc003f80,0x80f8004,0x3c000, 0x3c003c0,0x3c003c0f,0x1e03,0xe03e0078,0x3c0000,0x7c0001e,0xf0,0x780,0x0,0x0,0x3ffff800,0x1ff0000,0x0,0x7800000,0x0,0x18, 0xc0,0x0,0x1818000,0x3e00000,0x3,0xc00f0000,0x1ff00000,0x3e00007,0xfc00003f,0xe0000003,0xc0003c00,0xf03c,0x3c0f00,0x0,0x0, 0x0,0x70,0x380701f0,0x800000,0x780fc,0x1e001ff0,0x7c,0xf3c00,0x0,0x780000,0x7e182000,0xf000001f,0xfff00ffc,0xffc0003c,0x3cfe, 0x0,0x31c0001,0x80f01f80,0x780f00,0x0,0x183,0x80e0c000,0xf,0x80000078,0x780,0x38,0x0,0x3c003c0,0x7ffe1c00,0x0,0x0,0x38000078, 0xf000f01,0xe003ffe0,0x1fff00,0x7ff800,0xf000,0xf07800,0x783c000,0x3c1e0001,0xe0f0000f,0x78000f8,0x3e000f07,0x8003c000,0x78000, 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f1e0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0, 0x78000f00,0x7c03e01e,0x1e3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78003cf0,0x1e0007,0x80f1e000,0x4000f00,0x20007801,0x3c008, 0x1e0040,0xf00200,0x780403f,0x7803e00,0x3007c00f,0x803e007c,0x1f003e0,0xf801f00,0x780000,0x3c00000,0x1e000000,0xf00007f0, 0x3e003f00,0x7801f00f,0x800f807c,0x7c03e0,0x3e01f00,0x1f00f800,0x1f80007,0xc03e003c,0x3c01e0,0x1e00f00,0xf007800,0x78078003, 0xc01fc03e,0x1e000f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x780000,0x0,0xf078007c,0x300007fc,0x7e00fe0,0x0,0x1e00,0x3c00,0x3e1c3e0,0x1e0000,0x0,0x0,0x0,0xf0001e00, 0x3c0001e,0x1,0xf000fff8,0x1e0780,0x3fffe00,0x79fff000,0x1f0001,0xfffc00f0,0x7e0007,0xe000003f,0x3ff,0x801fffff,0xf003ff80, 0x3f00,0x3c03fff0,0xf01e003,0xffffc03c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000,0x1fffff,0x80007800,0x780,0x3df80000,0x7800001e, 0x1c70f078,0x781e03c0,0x780780,0x3c0f000,0x1e078007,0xc01f8000,0xf000,0xf0003c0,0x1e007807,0x83f83c00,0xfe00003,0xff000000, 0x7c00003c,0x780,0x1e0,0x0,0x0,0x0,0x7c01,0xf801f007,0xc00100f8,0x1f803c0,0x3c0003c,0x1f003,0xf007c00f,0x80003c00,0xf000, 0x783f000,0x1e0000f,0x3c0f01f,0x3e01f0,0x3e007e0,0x7c07c00,0xfc003f00,0xf0000,0x3c000,0x3c003c0,0x3c003c0f,0x1e01,0xf07c007c, 0x7c0000,0xfc0001e,0xf0,0x780,0x0,0x0,0x3ffff000,0x3838000,0x0,0x7800000,0x0,0x18,0xc0,0x0,0xff0000,0x3f00000,0x3,0xc00fff00, 0x38380000,0x7c0000e,0xe000070,0x70000001,0xe0003c00,0xf01e,0x780e00,0x0,0x0,0x0,0x0,0x1e0,0x0,0x780f8,0xf003838,0xfc,0xffc00, 0x0,0x780000,0x7c180000,0xf000000f,0xffe00fff,0xffc0003c,0x783f,0x80000000,0x6380000,0xc0f83f80,0xf81f00,0x0,0x303,0x80e06000, 0x0,0x78,0xf00,0x78,0x0,0x3c003c0,0x7ffe1c00,0x0,0x0,0x3800003c,0x3e000f81,0xf003ffe0,0x1fff00,0x1fc000,0xf000,0x1e03c00, 0xf01e000,0x780f0003,0xc078001e,0x3c000f0,0x1e000f07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000, 0x3c000001,0xe0001e00,0x3c0f0f0,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x3e07c01e,0x1e3c0f0,0x3c0780,0x1e03c00, 0xf01e000,0x78003ff0,0x1e0007,0x80f1e000,0xf80,0x7c00,0x3e000,0x1f0000,0xf80000,0x7c0001e,0x3c07c00,0x10078007,0x803c003c, 0x1e001e0,0xf000f00,0x780000,0x3c00000,0x1e000000,0xf00007c0,0x1e003e00,0x7c03e007,0xc01f003e,0xf801f0,0x7c00f80,0x3e007c00, 0xf,0x801f003c,0x3c01e0,0x1e00f00,0xf007800,0x7807c007,0xc01f801f,0x1f001f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x0,0xe078003c,0x300001f0,0x3f801ff0,0x0, 0x3c00,0x1e00,0x3c1c1e0,0x1e0000,0x0,0x0,0x0,0xf0001e0f,0x3c0001e,0x3,0xe000fff0,0x3c0780,0x3ffff00,0x7bfff800,0x1e0000,0x7ff00078, 0x7e0007,0xe000003f,0x1ffc,0x1fffff,0xf0007ff0,0x7e00,0x3c07c3f0,0xf01e003,0xffff003c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000, 0x1fffff,0x80007800,0x780,0x3ffc0000,0x7800001e,0x1ef0f078,0x781e03c0,0x780780,0x7c0f000,0x1e07801f,0x800ff000,0xf000,0xf0003c0, 0xf00f807,0x83b83c00,0xfc00001,0xfe000000,0xf800003c,0x780,0x1e0,0x0,0x0,0x0,0x3c01,0xf000f007,0xc00000f0,0xf80780,0x3c0003c, 0x1e001,0xf007c007,0x80003c00,0xf000,0x787e000,0x1e0000f,0x3c0f01f,0x1e01e0,0x1e007c0,0x3c07800,0x7c003f00,0xf0000,0x3c000, 0x3c003c0,0x3e007c07,0x80003c00,0xf8f8003c,0x780000,0xf80001e,0xf0,0x780,0x0,0x0,0x7ffff000,0x601c000,0x3,0xffff0000,0x0, 0xfff,0xf8007fff,0xc0000000,0x7e003c,0x1fe0000,0xc0003,0xc00fff00,0x601c0000,0xf800018,0x70000c0,0x38000001,0xe0007800,0x701e, 0x701e00,0x0,0x0,0x0,0x0,0x1e0,0x6,0x700f8,0xf00601c,0xf8,0x7f800,0x0,0x780000,0xf8180000,0xf000000f,0x87c00fff,0xffc0003c, 0xf01f,0xc0000000,0x6380000,0xc07ff780,0x1f03e03,0xfffffe00,0x303,0x81c06000,0x0,0x1ffff,0xfe001e00,0x180f8,0x0,0x3c003c0, 0x3ffe1c00,0x3f00000,0x0,0x3800003f,0xfe0007c0,0xf8000000,0x18000000,0xc0000006,0x1f000,0x1e03c00,0xf01e000,0x780f0003,0xc078001e, 0x3c000f0,0x1e001f07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8,0x3c0f0f0, 0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x1f0f801e,0x3c3c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78001fe0,0x1e0007, 0x80f1e000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c07c00,0xf0007,0x8078003c,0x3c001e0,0x1e000f00,0x780000,0x3c00000, 0x1e000000,0xf0000f80,0x1f003e00,0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0xf,0x3f003c,0x3c01e0,0x1e00f00,0xf007800, 0x7803c007,0x801f000f,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe078003f,0xb0000000,0xfc003cf0,0x0,0x3c00,0x1e00,0x101c040,0x1e0000,0x0,0x0,0x1, 0xe0001e1f,0x83c0001e,0x7,0xe000fff0,0x3c0780,0x3c03f80,0x7fc0fc00,0x1e0000,0xfff80078,0xfe0007,0xe000003f,0x7fe0,0x1fffff, 0xf0000ffc,0xfc00,0x780f81f0,0xf01e003,0xffff003c,0x1e0,0x3c03ff,0xffc01fff,0xfe03c000,0x1fffff,0x80007800,0x780,0x3ffc0000, 0x7800001e,0x1ef0f078,0x3c1e03c0,0x780780,0x1fc0f000,0x1e07ffff,0x7ff00,0xf000,0xf0003c0,0xf00f007,0xc3b87c00,0x7c00001,0xfe000000, 0xf800003c,0x3c0,0x1e0,0x0,0x0,0x0,0x3c01,0xf000f007,0x800000f0,0xf80780,0x1e0003c,0x1e001,0xf0078007,0x80003c00,0xf000,0x78fc000, 0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0,0x3c07800,0x7c003e00,0xf0000,0x3c000,0x3c003c0,0x1e007807,0x80003c00,0x7df0003c,0x780000, 0x1f00001e,0xf0,0x780,0x0,0x0,0x7800000,0xe7ce000,0x3,0xffff0000,0x0,0xfff,0xf8007fff,0xc0000000,0x1f0,0xffe000,0x1c0003, 0xc00fff00,0xe7ce0000,0xf800039,0xf38001cf,0x9c000000,0xe0007800,0x780e,0x701c00,0x0,0x0,0x0,0x0,0x1e0,0x7,0xf0078,0xf00e7ce, 0x1f0,0x7f800,0x0,0x780000,0xf0180000,0xf000000e,0x1c0001f,0xe000003c,0xf007,0xe0000000,0x6380000,0xc03fe780,0x3e07c03,0xfffffe00, 0x303,0xffc06000,0x0,0x1ffff,0xfe003ffe,0x1fff0,0x0,0x3c003c0,0x1ffe1c00,0x3f00000,0x7,0xffc0001f,0xfc0003e0,0x7c000001,0xfc00000f, 0xe000007f,0x1e000,0x1e03c00,0xf01e000,0x780f0003,0xc078001e,0x3c000f0,0x1e001e07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0, 0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8,0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf9f001e, 0x783c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78001fe0,0x1e0007,0x80f1e000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c07800, 0xf0003,0xc078001e,0x3c000f0,0x1e000780,0x780000,0x3c00000,0x1e000000,0xf0000f00,0xf003c00,0x3c03c003,0xc01e001e,0xf000f0, 0x7800780,0x3c003c00,0xf,0x7f003c,0x3c01e0,0x1e00f00,0xf007800,0x7803c007,0x801f000f,0xf001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe070001f,0xf8000007, 0xf0007cf8,0x7800000,0x3c00,0x1e00,0x1c000,0x1e0000,0x0,0x0,0x1,0xe0001e1f,0x83c0001e,0xf,0xc000fff8,0x780780,0x2000f80,0x7f803e00, 0x3e0003,0xfffe007c,0x1fe0000,0x0,0x3ff00,0x0,0x1ff,0x8001f000,0x780f00f0,0x1f00f003,0xffffc03c,0x1e0,0x3c03ff,0xffc01fff, 0xfe03c00f,0xf81fffff,0x80007800,0x780,0x3ffe0000,0x7800001e,0xee0f078,0x3c1e03c0,0x7807ff,0xff80f000,0x1e07fffe,0x3ffe0, 0xf000,0xf0003c0,0xf00f003,0xc7bc7800,0xfc00000,0xfc000001,0xf000003c,0x3c0,0x1e0,0x0,0x0,0x0,0x3c01,0xe000f80f,0x800001e0, 0xf80f00,0x1e0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x79f8000,0x1e0000f,0x3c0f01e,0x1e03c0,0x1f00780,0x3e0f000,0x7c003e00, 0xf0000,0x3c000,0x3c003c0,0x1e007807,0x81e03c00,0x7df0003e,0xf80000,0x3e00003e,0xf0,0x7c0,0xfc000,0x80000000,0x7800000,0x1e7cf000, 0x3,0xffff0000,0x0,0x18,0xc0,0x0,0xf80,0x7ffc00,0x380003,0xc00fff01,0xe7cf0000,0x1f000079,0xf3c003cf,0x9e000000,0xe0007000, 0x380e,0xe01c00,0x0,0x0,0x0,0x0,0x1e0,0x3,0x800f0078,0xf01e7cf,0x3e0,0x3f000,0x0,0x780000,0xf018001f,0xfff8001e,0x1e0000f, 0xc000003c,0xf003,0xe0000000,0x6380000,0xc00fc780,0x7c0f803,0xfffffe00,0x303,0xfe006000,0x0,0x1ffff,0xfe003ffe,0x1ffe0,0x0, 0x3c003c0,0xffe1c00,0x3f00000,0x7,0xffc00007,0xf00001f0,0x3e00001f,0xfc0000ff,0xe00007ff,0x3e000,0x3e01e00,0x1f00f000,0xf8078007, 0xc03c003e,0x1e001e0,0xf001e07,0xff83c000,0x7ffff,0x803ffffc,0x1ffffe0,0xfffff00,0xf00000,0x7800000,0x3c000001,0xe000fff8, 0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x7fe001e,0xf03c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000fc0, 0x1e0007,0x80f1f000,0x780,0x3c00,0x1e000,0xf0000,0x780000,0x3c0001e,0x3c0f800,0x1e0003,0xc0f0001e,0x78000f0,0x3c000780,0x780000, 0x3c00000,0x1e000000,0xf0000f00,0xf003c00,0x3c078003,0xe03c001f,0x1e000f8,0xf0007c0,0x78003e00,0x1e,0xf7803c,0x3c01e0,0x1e00f00, 0xf007800,0x7803e00f,0x801e000f,0x80f803e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1,0xe0f0000f,0xff00001f,0x8000f87c,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80, 0x0,0x0,0x3,0xc0001e1f,0x83c0001e,0x1f,0x800000fe,0xf00780,0x7c0,0x7f001e00,0x3c0007,0xe03f003f,0x3fe0000,0x0,0x3fc00,0x0, 0x7f,0x8001e000,0x781f00f0,0x1e00f003,0xc007e03c,0x1e0,0x3c03c0,0x1e00,0x3c00f,0xf81e0007,0x80007800,0x780,0x3f9f0000,0x7800001e, 0xfe0f078,0x3c1e03c0,0x7807ff,0xff00f000,0x1e07fff8,0xfff8,0xf000,0xf0003c0,0xf81f003,0xc7bc7800,0xfe00000,0x78000003,0xe000003c, 0x1e0,0x1e0,0x0,0x0,0x0,0x1fffc01,0xe000780f,0x1e0,0x780f00,0x1e0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7bf0000,0x1e0000f, 0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xf8000,0x3c000,0x3c003c0,0x1f00f807,0x81f03c00,0x3fe0001e,0xf00000,0x7c00007c, 0xf0,0x3e0,0x3ff801,0x80000000,0x7800000,0x3cfcf800,0x3,0xffff0000,0x0,0x18,0xc0,0x0,0x7c00,0x1fff00,0x700003,0xc00f0003, 0xcfcf8000,0x3e0000f3,0xf3e0079f,0x9f000000,0xf000,0x1000,0x0,0x0,0x0,0x0,0x0,0x1f0,0x1,0xc00f0078,0xf03cfcf,0x800007c0,0x1e000, 0x0,0x780001,0xe018001f,0xfff8001c,0xe00007,0x8000003c,0xf001,0xf0000000,0x6380000,0xc0000000,0xf81f003,0xfffffe00,0x303, 0x87006000,0x0,0x1ffff,0xfe003ffe,0x7f00,0x0,0x3c003c0,0x3fe1c00,0x3f00000,0x7,0xffc00000,0xf8,0x1f0001ff,0xf0000fff,0x80007ffc, 0xfc000,0x3c01e00,0x1e00f000,0xf0078007,0x803c003c,0x1e001e0,0xf001e07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000, 0x7800000,0x3c000001,0xe000fff8,0x3c0f078,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x3fc001e,0x1e03c0f0,0x3c0780, 0x1e03c00,0xf01e000,0x78000780,0x1e0007,0x80f0fc00,0x3fff80,0x1fffc00,0xfffe000,0x7fff0003,0xfff8001f,0xffc0001e,0x3c0f000, 0x1e0003,0xc0f0001e,0x78000f0,0x3c000780,0x780000,0x3c00000,0x1e000000,0xf0001e00,0xf803c00,0x3c078001,0xe03c000f,0x1e00078, 0xf0003c0,0x78001e07,0xfffffe1e,0x1e7803c,0x3c01e0,0x1e00f00,0xf007800,0x7801e00f,0x1e0007,0x807803c0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x3,0xc0f00007, 0xffc0007e,0xf03e,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80,0x0,0x0,0x3,0xc0001e1f,0x83c0001e,0x3f,0x3e,0xf00780,0x3c0,0x7e001e00, 0x7c000f,0x800f001f,0xffde0000,0x0,0x3e000,0x0,0xf,0x8003e000,0x781e0070,0x1e00f003,0xc001f03c,0x1e0,0x3c03c0,0x1e00,0x3c00f, 0xf81e0007,0x80007800,0x780,0x3f1f0000,0x7800001e,0x7c0f078,0x1e1e03c0,0x7807ff,0xfc00f000,0x1e07fffe,0xffc,0xf000,0xf0003c0, 0x781e003,0xc71c7800,0x1ff00000,0x78000003,0xe000003c,0x1e0,0x1e0,0x0,0x0,0x0,0xffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c, 0x3c000,0xf0078007,0x80003c00,0xf000,0x7ff0000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x7f000,0x3c000, 0x3c003c0,0xf00f007,0xc1f07c00,0x1fc0001f,0x1f00000,0xfc000ff8,0xf0,0x1ff,0xfffe07,0x80000000,0x7800000,0x7ffcfc00,0x0,0xf000000, 0x0,0x18,0xc0,0x0,0x3e000,0x1ff80,0xe00003,0xc00f0007,0xffcfc000,0x3e0001ff,0xf3f00fff,0x9f800000,0x6000,0x0,0x0,0x7c000, 0x0,0x0,0x0,0xfe,0x0,0xe00f007f,0xff07ffcf,0xc0000fc0,0x1e000,0x0,0x780001,0xe018001f,0xfff8001c,0xe00007,0x80000000,0xf800, 0xf0000000,0x6380000,0xc0000000,0x1f03c000,0x1e00,0x303,0x83806000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xfe1c00,0x3f00000,0x0, 0x0,0x3c,0xf801fff,0xfff8,0x7ffc0,0x1f8000,0x3c01e00,0x1e00f000,0xf0078007,0x803c003c,0x1e001e0,0xf003c07,0x8003c000,0x78000, 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f03c,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0, 0x78000f00,0x1f8001e,0x1e03c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e000f,0x80f0ff00,0x1ffff80,0xffffc00,0x7fffe003, 0xffff001f,0xfff800ff,0xffc007ff,0xffc0f000,0x1fffff,0xc0fffffe,0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00, 0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07,0xfffffe1e,0x3c7803c,0x3c01e0,0x1e00f00,0xf007800,0x7801f01f, 0x1e0007,0x807c07c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x780000,0x3,0xc0f00000,0xfff003f0,0x1f00f03e,0x7800000,0x3c00,0x1e00,0x1c000,0x7fffff80,0x0,0x7ff80000,0x3, 0xc0001e0f,0x3c0001e,0x7e,0x1f,0x1e00780,0x3e0,0x7e000f00,0x78000f,0x7800f,0xff9e0000,0x0,0x3fc00,0x0,0x7f,0x8003c000,0x781e0070, 0x3e00f803,0xc000f03c,0x1e0,0x3c03c0,0x1e00,0x3c00f,0xf81e0007,0x80007800,0x780,0x3e0f8000,0x7800001e,0x7c0f078,0x1e1e03c0, 0x7807ff,0xf000f000,0x1e07807f,0xfe,0xf000,0xf0003c0,0x781e003,0xc71c7800,0x3ef00000,0x78000007,0xc000003c,0x1e0,0x1e0,0x0, 0x0,0x0,0x1ffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7ff0000,0x1e0000f,0x3c0f01e, 0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x7ff80,0x3c000,0x3c003c0,0xf00f003,0xc1f07800,0x1fc0000f,0x1e00000,0xf8000ff0,0xf0, 0xff,0xffffff,0x80000000,0x3fffc000,0xfff9fe00,0x0,0xf000000,0x0,0x18,0xc0,0x0,0x1f0000,0x1fc0,0x1c00003,0xc00f000f,0xff9fe000, 0x7c0003ff,0xe7f81fff,0x3fc00000,0x0,0x0,0x0,0xfe000,0x1ffffc0f,0xfffffc00,0x0,0xff,0xf0000000,0x700f007f,0xff0fff9f,0xe0000f80, 0x1e000,0x0,0x780001,0xe018001f,0xfff8001c,0xe00fff,0xffc00000,0xf800,0xf0000000,0x6380000,0xc0ffff80,0x3e078000,0x1e00,0x7ff80303, 0x83c06000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x3f00000,0x0,0x7f,0xff00001e,0x7c1fff0,0xfff80,0x7ffc00,0x3f0000,0x7c01f00, 0x3e00f801,0xf007c00f,0x803e007c,0x1f003e0,0xf803c07,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001, 0xe0001e00,0x3c0f03c,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x1f8001e,0x3c03c0f0,0x3c0780,0x1e03c00,0xf01e000, 0x78000780,0x1e001f,0xf07f80,0x3ffff80,0x1ffffc00,0xffffe007,0xffff003f,0xfff801ff,0xffc03fff,0xffc0f000,0x1fffff,0xc0fffffe, 0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07, 0xfffffe1e,0x787803c,0x3c01e0,0x1e00f00,0xf007800,0x7800f01e,0x1e0007,0x803c0780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x3ff80fc0,0x7fc1e01f, 0x7800000,0x3c00,0x1e00,0x0,0x7fffff80,0x0,0x7ff80000,0x7,0x80001e00,0x3c0001e,0xfc,0xf,0x1e00780,0x1e0,0x7c000f00,0x78000f, 0x78007,0xff1e0000,0x0,0x3ff00,0x0,0x1ff,0x8003c000,0x781e0070,0x3c007803,0xc000f03c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x781e0007, 0x80007800,0x780,0x3c07c000,0x7800001e,0x7c0f078,0xf1e03c0,0x780780,0xf000,0x1e07801f,0x3e,0xf000,0xf0003c0,0x781e003,0xcf1c7800, 0x3cf80000,0x7800000f,0x8000003c,0xf0,0x1e0,0x0,0x0,0x0,0x3ffffc01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007, 0x80003c00,0xf000,0x7ff8000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x3fff0,0x3c000,0x3c003c0,0xf81f003, 0xc3b87800,0xf80000f,0x1e00001,0xf0000ff0,0xf0,0xff,0xf03fff,0x80000000,0x3fff8001,0xfff1ff00,0x0,0xf000000,0x0,0x18,0xc0, 0x0,0x380000,0x7c0,0x3c00003,0xc00f001f,0xff1ff000,0xf80007ff,0xc7fc3ffe,0x3fe00000,0x0,0x0,0x0,0x1ff000,0x7ffffe1f,0xffffff00, 0x0,0x7f,0xfe000000,0x780f007f,0xff1fff1f,0xf0001f00,0x1e000,0x0,0x780001,0xe0180000,0xf000001c,0xe00fff,0xffc00000,0x7c00, 0xf0000000,0x31c0001,0x80ffff80,0x3e078000,0x1e00,0x7ff80183,0x81c0c000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x3f00000, 0x0,0x7f,0xff00001e,0x7c7ff03,0xc03ff8fe,0x1ffc0f0,0x7e0000,0x7800f00,0x3c007801,0xe003c00f,0x1e0078,0xf003c0,0x7803c07,0x8003c000, 0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x3c0f01e,0x3c078000,0xf03c0007,0x81e0003c, 0xf0001e0,0x78000f00,0x3fc001e,0x7803c0f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e007f,0xf03fe0,0x7ffff80,0x3ffffc01, 0xffffe00f,0xffff007f,0xfff803ff,0xffc07fff,0xffc0f000,0x1fffff,0xc0fffffe,0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000, 0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e07,0xfffffe1e,0x707803c,0x3c01e0,0x1e00f00,0xf007800, 0x7800f01e,0x1e0007,0x803c0780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x30f81f00,0xffe1e00f,0x87800000,0x3c00,0x1e00,0x0,0x1e0000,0x0,0x7ff80000, 0x7,0x80001e00,0x3c0001e,0x1f8,0x7,0x83c00780,0x1e0,0x7c000f00,0xf8001e,0x3c001,0xfc1e0000,0x0,0x7fe0,0x0,0xffc,0x3c000,0x781e0070, 0x3ffff803,0xc000783c,0x1e0,0x3c03c0,0x1e00,0x3c000,0x781e0007,0x80007800,0x780,0x3c07c000,0x7800001e,0x380f078,0xf1e03c0, 0x780780,0xf000,0x1e07800f,0x8000001e,0xf000,0xf0003c0,0x3c3c003,0xcf1e7800,0x7c780000,0x7800000f,0x8000003c,0xf0,0x1e0,0x0, 0x0,0x0,0x7f003c01,0xe000780f,0x1e0,0x780fff,0xffe0003c,0x3c000,0xf0078007,0x80003c00,0xf000,0x7f7c000,0x1e0000f,0x3c0f01e, 0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xfff8,0x3c000,0x3c003c0,0x781e003,0xc3b87800,0x1fc00007,0x83e00003,0xe0000ff8,0xf0, 0x1ff,0xc007fe,0x0,0x7fff8001,0xffe3ff00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x3c0,0x7800003,0xc00f001f,0xfe3ff000,0xf80007ff, 0x8ffc3ffc,0x7fe00000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x1f,0xff000000,0x3c0f007f,0xff1ffe3f,0xf0003e00,0x1e000,0x0,0x780001, 0xe0180000,0xf000001e,0x1e00fff,0xffc00000,0x3f00,0xf0000000,0x31c0001,0x80ffff80,0x1f03c000,0x1e00,0x7ff80183,0x81c0c000, 0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x7f,0xff00003c,0xf87f007,0xc03f83ff,0x81fc01f0,0x7c0000,0x7ffff00,0x3ffff801, 0xffffc00f,0xfffe007f,0xfff003ff,0xff807fff,0x8003c000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001, 0xe0001e00,0x3c0f01e,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0x7fe001e,0xf003c0f0,0x3c0780,0x1e03c00,0xf01e000, 0x78000780,0x1ffffe,0xf00ff0,0xfe00780,0x7f003c03,0xf801e01f,0xc00f00fe,0x7807f0,0x3c0ffff,0xffc0f000,0x1fffff,0xc0fffffe, 0x7fffff0,0x3fffff80,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00, 0x1e,0xf07803c,0x3c01e0,0x1e00f00,0xf007800,0x7800783e,0x1e0007,0x801e0f80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1ff,0xffff8000,0x307c0801,0xe1f1e00f,0x87000000, 0x3c00,0x1e00,0x0,0x1e0000,0x0,0x7ff80000,0xf,0x1e00,0x3c0001e,0x3f0,0x7,0x83fffffc,0x1e0,0x7c000f00,0xf0001e,0x3c000,0x3e0000, 0x0,0x1ffc,0x1fffff,0xf0007ff0,0x3c000,0x781e0070,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x3c000,0x781e0007,0x80007800, 0x780,0x3c03e000,0x7800001e,0xf078,0x79e03c0,0x780780,0xf000,0x1e078007,0x8000000f,0xf000,0xf0003c0,0x3c3c001,0xee0ef000, 0xf87c0000,0x7800001f,0x3c,0x78,0x1e0,0x0,0x0,0x0,0x7c003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007,0x80003c00, 0xf000,0x7e3e000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x1ffc,0x3c000,0x3c003c0,0x781e003,0xe3b8f800, 0x1fc00007,0x83c00007,0xc00000fc,0xf0,0x3e0,0x8001f8,0x0,0x7800000,0xffc7fe00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x1e0, 0xf000003,0xc00f000f,0xfc7fe001,0xf00003ff,0x1ff81ff8,0xffc00000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x3,0xff800000,0x1e0f0078, 0xffc7f,0xe0007c00,0x1e000,0x0,0x780001,0xe0180000,0xf000000e,0x1c00007,0x80000000,0x1f81,0xe0000000,0x38e0003,0x80000000, 0xf81f000,0x1e00,0x7ff801c3,0x80e1c000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0xf8,0x1f070007,0xc03803ff,0xc1c001f0, 0xf80000,0xfffff00,0x7ffff803,0xffffc01f,0xfffe00ff,0xfff007ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000, 0xf00000,0x7800000,0x3c000001,0xe0001e00,0x780f00f,0x3c078000,0xf03c0007,0x81e0003c,0xf0001e0,0x78000f00,0xf9f001e,0xf003c0f0, 0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1ffffc,0xf003f8,0xf800780,0x7c003c03,0xe001e01f,0xf00f8,0x7807c0,0x3c0fc1e,0xf000, 0x1e0000,0xf00000,0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078, 0xf0003c0,0x78001e00,0x1e,0x1e07803c,0x3c01e0,0x1e00f00,0xf007800,0x7800783c,0x1e0007,0x801e0f00,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xffff8000,0x303c0001, 0xc071e007,0xcf000000,0x3c00,0x1e00,0x0,0x1e0000,0x0,0x0,0xf,0xf00,0x780001e,0x7e0,0x7,0x83fffffc,0x1e0,0x7c000f00,0x1f0001e, 0x3c000,0x3c0000,0x0,0x3ff,0x801fffff,0xf003ff80,0x3c000,0x781e0070,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x1e000,0x781e0007, 0x80007800,0x780,0x3c01f000,0x7800001e,0xf078,0x79e03c0,0xf00780,0xf000,0x3e078007,0xc000000f,0xf000,0xf0003c0,0x3c3c001, 0xee0ef000,0xf03e0000,0x7800003e,0x3c,0x78,0x1e0,0x0,0x0,0x0,0xf8003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007, 0x80003c00,0xf000,0x7c3e000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0xfc,0x3c000,0x3c003c0,0x3c3e001,0xe7b8f000, 0x3fe00007,0xc7c0000f,0xc000003e,0xf0,0x7c0,0x0,0x0,0x7c00000,0x7fcffc00,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x0,0x1e0,0x1e000003, 0xc00f0007,0xfcffc003,0xe00001ff,0x3ff00ff9,0xff800000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x0,0x1f800000,0xf0f0078,0x7fcff, 0xc000fc00,0x1e000,0x0,0x780001,0xe0180000,0xf000000f,0x87c00007,0x80000000,0xfe3,0xe0000000,0x18780c3,0x0,0x7c0f800,0x1e00, 0xc3,0x80e18000,0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0x1f0,0x3e00000f,0xc0000303,0xe00003f0,0xf00000,0xfffff80, 0x7ffffc03,0xffffe01f,0xffff00ff,0xfff807ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000, 0x3c000001,0xe0001e00,0x780f00f,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,0x1f0f801f,0xe00780f0,0x3c0780,0x1e03c00, 0xf01e000,0x78000780,0x1ffff8,0xf000f8,0x1f000780,0xf8003c07,0xc001e03e,0xf01f0,0x780f80,0x3c1f01e,0xf000,0x1e0000,0xf00000, 0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00, 0x1e,0x3c07803c,0x3c01e0,0x1e00f00,0xf007800,0x78007c7c,0x1e0007,0x801f1f00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x81c00000,0x303c0003,0x8039e003,0xef000000, 0x3c00,0x1e00,0x0,0x1e0000,0x0,0x0,0x1e,0xf00,0x780001e,0xfc0,0x7,0x83fffffc,0x1e0,0x3c000f00,0x1e0001e,0x3c000,0x3c0000, 0x0,0x7f,0xe01fffff,0xf00ffc00,0x3c000,0x781f00f0,0x7ffffc03,0xc000781e,0x1e0,0x7803c0,0x1e00,0x1e000,0x781e0007,0x80007800, 0x780,0x3c01f000,0x7800001e,0xf078,0x7de01e0,0xf00780,0x7800,0x3c078003,0xc000000f,0xf000,0xf0003c0,0x3e7c001,0xee0ef001, 0xf01e0000,0x7800003e,0x3c,0x3c,0x1e0,0x0,0x0,0x0,0xf0003c01,0xe000780f,0x1e0,0x780f00,0x3c,0x3c000,0xf0078007,0x80003c00, 0xf000,0x781f000,0x1e0000f,0x3c0f01e,0x1e03c0,0xf00780,0x1e0f000,0x3c003c00,0x3e,0x3c000,0x3c003c0,0x3c3c001,0xe71cf000,0x7df00003, 0xc780000f,0x8000003e,0xf0,0x780,0x0,0x0,0x3c00000,0x3fcff800,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x1f00fc,0x1e0,0x1e000001, 0xe00f0003,0xfcff8003,0xe00000ff,0x3fe007f9,0xff000000,0x0,0x0,0x0,0x1ff000,0x0,0x0,0x0,0x0,0x7c00000,0xf0f0078,0x3fcff,0x8000f800, 0x1e000,0x0,0x780001,0xe0180000,0xf000001f,0xffe00007,0x8000003c,0x7ff,0xc0000000,0x1c3ffc7,0x0,0x3e07c00,0x1e00,0xe3,0x80738000, 0x0,0x78,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0x3e0,0x7c00001d,0xc0000001,0xe0000770,0x1f00000,0xfffff80,0x7ffffc03, 0xffffe01f,0xffff00ff,0xfff807ff,0xffc07fff,0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001, 0xe0001e00,0x780f00f,0x3c03c001,0xe01e000f,0xf00078,0x78003c0,0x3c001e00,0x3e07c01f,0xc00780f0,0x3c0780,0x1e03c00,0xf01e000, 0x78000780,0x1fffc0,0xf0007c,0x1e000780,0xf0003c07,0x8001e03c,0xf01e0,0x780f00,0x3c1e01e,0xf000,0x1e0000,0xf00000,0x7800000, 0x3c000000,0x780000,0x3c00000,0x1e000000,0xf0001e00,0x7803c00,0x3c078001,0xe03c000f,0x1e00078,0xf0003c0,0x78001e00,0x1e,0x7807803c, 0x3c01e0,0x1e00f00,0xf007800,0x78003c78,0x1e0007,0x800f1e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x83c00000,0x303c0003,0x8039e001,0xee000000,0x1e00,0x3c00, 0x0,0x1e0000,0x0,0x0,0x1e,0xf00,0x780001e,0x1f80,0x7,0x83fffffc,0x1e0,0x3c000f00,0x1e0001e,0x3c000,0x3c0000,0x0,0x1f,0xfc1fffff, 0xf07ff000,0x0,0x780f00f0,0x78003c03,0xc000781e,0x1e0,0xf803c0,0x1e00,0x1e000,0x781e0007,0x80007800,0x780,0x3c00f800,0x7800001e, 0xf078,0x3de01e0,0xf00780,0x7800,0x3c078003,0xe000000f,0xf000,0xf0003c0,0x1e78001,0xfe0ff003,0xe01f0000,0x7800007c,0x3c,0x3c, 0x1e0,0x0,0x0,0x0,0xf0007c01,0xe000f80f,0x800001e0,0xf80f00,0x3c,0x1e001,0xf0078007,0x80003c00,0xf000,0x780f800,0x1e0000f, 0x3c0f01e,0x1e03c0,0x1f00780,0x3e0f000,0x7c003c00,0x1e,0x3c000,0x3c003c0,0x3c3c001,0xe71cf000,0xf8f80003,0xe780001f,0x1e, 0xf0,0x780,0x0,0x0,0x3c00000,0x1ffff000,0x0,0x1e000000,0x0,0x18,0xc0,0x0,0x3bc1de,0x1e0,0xf000001,0xe00f0001,0xffff0007,0xc000007f, 0xffc003ff,0xfe000000,0x0,0x0,0x0,0xfe000,0x0,0x0,0x0,0x0,0x3c00000,0x1e0f0078,0x1ffff,0x1f000,0x1e000,0x0,0x780000,0xf0180000, 0xf000001f,0xfff00007,0x8000003c,0x1ff,0x80000000,0xe0ff0e,0x0,0x1f03e00,0x1e00,0x70,0x70000,0x0,0x78,0x0,0x0,0x0,0x3c003c0, 0xe1c00,0x0,0x0,0x0,0x7c0,0xf8000019,0xc0000000,0xe0000670,0x1e00000,0xf000780,0x78003c03,0xc001e01e,0xf00f0,0x780780,0x3c0f807, 0x8001e000,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf80f007,0xbc03c001,0xe01e000f, 0xf00078,0x78003c0,0x3c001e00,0x7c03e00f,0x800780f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80, 0xf0007c07,0x8003e03c,0x1f01e0,0xf80f00,0x7c1e01e,0xf800,0x1e0000,0xf00000,0x7800000,0x3c000000,0x780000,0x3c00000,0x1e000000, 0xf0001e00,0x7803c00,0x3c078003,0xe03c001f,0x1e000f8,0xf0007c0,0x78003e00,0x1f8001f,0xf00f803c,0x3c01e0,0x1e00f00,0xf007800, 0x78003e78,0x1e000f,0x800f9e00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x3c00000,0x303c0003,0x8039f001,0xfe000000,0x1e00,0x3c00,0x0,0x1e0000,0x0,0x0,0x3c,0xf00, 0x780001e,0x3f00,0x7,0x80000780,0x3e0,0x3e000f00,0x3c0001e,0x3c000,0x7c0000,0x0,0x3,0xfe000000,0xff8000,0x0,0x3c0f81f0,0xf0001e03, 0xc000780f,0x1e0,0xf003c0,0x1e00,0xf000,0x781e0007,0x80007800,0x780,0x3c007c00,0x7800001e,0xf078,0x3de01e0,0xf00780,0x7800, 0x3c078001,0xe000000f,0xf000,0xf0003c0,0x1e78001,0xfc07f003,0xe00f0000,0x78000078,0x3c,0x1e,0x1e0,0x0,0x0,0x0,0xf0007c01, 0xf000f007,0x800000f0,0xf80780,0x3c,0x1e001,0xf0078007,0x80003c00,0xf000,0x7807c00,0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0, 0x3c07800,0x7c003c00,0x1e,0x3c000,0x3c007c0,0x1e78001,0xe71df000,0xf8f80001,0xef80003e,0x1e,0xf0,0x780,0x0,0x0,0x3c00000, 0xfffe000,0x0,0x3e000000,0x0,0x18,0x7fff,0xc0000000,0x60c306,0x1e0,0x7800001,0xe00f0000,0xfffe0007,0x8000003f,0xff8001ff, 0xfc000000,0x0,0x0,0x0,0x7c000,0x0,0x0,0x0,0x0,0x3c00000,0x3c0f0078,0xfffe,0x3e000,0x1e000,0x0,0x780000,0xf0180000,0xf000003c, 0xfcf80007,0x8000003c,0x7f,0x0,0x70001c,0x0,0xf81f00,0x0,0x38,0xe0000,0x0,0x0,0x0,0x0,0x0,0x3c003c0,0xe1c00,0x0,0x0,0x0,0xf81, 0xf0000039,0xc0000000,0xe0000e70,0x1e00000,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007,0x8000f000,0x78000, 0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0xf00f007,0xbc03c001,0xe01e000f,0xf00078,0x78003c0, 0x3c001e00,0xf801f00f,0x800780f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80,0xf0007c07,0x8003e03c, 0x1f01e0,0xf80f00,0x7c1e01e,0x7800,0xf0000,0x780000,0x3c00000,0x1e000000,0x780000,0x3c00000,0x1e000000,0xf0000f00,0xf003c00, 0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0x1f8000f,0xe00f003c,0x7c01e0,0x3e00f00,0x1f007800,0xf8001ef8,0x1f000f, 0x7be00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0xf,0x3c00000,0x307c0003,0x8038f000,0xfc000000,0x1e00,0x3c00,0x0,0x1e0000,0xfc0000,0x0,0x7e00003c,0x780,0xf00001e, 0x7e00,0xf,0x80000780,0x3c0,0x3e001e00,0x3c0001f,0x7c000,0x780007,0xe000003f,0x0,0xfe000000,0xfe0000,0x0,0x3c07c3f0,0xf0001e03, 0xc000f80f,0x800001e0,0x1f003c0,0x1e00,0xf000,0x781e0007,0x80007800,0x4000f80,0x3c003c00,0x7800001e,0xf078,0x1fe01f0,0x1f00780, 0x7c00,0x7c078001,0xf000001f,0xf000,0xf0003c0,0x1e78001,0xfc07f007,0xc00f8000,0x780000f8,0x3c,0x1e,0x1e0,0x0,0x0,0x0,0xf0007c01, 0xf000f007,0xc00000f0,0xf80780,0x3c,0x1f003,0xf0078007,0x80003c00,0xf000,0x7807c00,0x1e0000f,0x3c0f01e,0x1e01e0,0x1e007c0, 0x3c07800,0x7c003c00,0x1e,0x3c000,0x3c007c0,0x1e78000,0xfe0fe001,0xf07c0001,0xef00007c,0x1e,0xf0,0x780,0x0,0x0,0x1e00000, 0x7cfc000,0xfc00000,0x3c00000f,0xc3f00000,0x18,0x7fff,0xc0000000,0x406303,0x3e0,0x3c00001,0xf00f0000,0x7cfc000f,0x8000001f, 0x3f0000f9,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x780700f8,0x7cfc,0x7c000,0x1e000,0x0,0x780000,0xf8180000, 0xf0000070,0x3c0007,0x8000003c,0x3f,0x80000000,0x3c0078,0x0,0x780f00,0x0,0x1e,0x3c0000,0x0,0x0,0x0,0x0,0x0,0x3e007c0,0xe1c00, 0x0,0x0,0x0,0xf01,0xe0000071,0xc0000000,0xe0001c70,0x1e00000,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007, 0x8000f800,0x78000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x1f00f003,0xfc03e003,0xe01f001f, 0xf800f8,0x7c007c0,0x3e003e01,0xf000f80f,0xf00f0,0x3c0780,0x1e03c00,0xf01e000,0x78000780,0x1e0000,0xf0003c,0x1e000f80,0xf0007c07, 0x8003e03c,0x1f01e0,0xf80f00,0x7c1e01e,0x7c00,0xf0000,0x780000,0x3c00000,0x1e000000,0x780000,0x3c00000,0x1e000000,0xf0000f00, 0xf003c00,0x3c03c003,0xc01e001e,0xf000f0,0x7800780,0x3c003c00,0x1f8000f,0xc00f003c,0x7c01e0,0x3e00f00,0x1f007800,0xf8001ef0, 0x1f000f,0x7bc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x780000,0xf,0x3800040,0x30780003,0x8038f800,0x78000000,0x1e00,0x3c00,0x0,0x1e0000,0xfc0000,0x0,0x7e000078, 0x780,0x1f00001e,0xfc00,0x20001f,0x780,0x80007c0,0x1f001e00,0x7c0000f,0x78000,0xf80007,0xe000003f,0x0,0x1e000000,0xf00000, 0x3c000,0x3c03fff0,0xf0001e03,0xc001f007,0x800101e0,0x7e003c0,0x1e00,0x7800,0x781e0007,0x80007800,0x6000f00,0x3c003e00,0x7800001e, 0xf078,0x1fe00f0,0x1e00780,0x3c00,0x78078000,0xf020001e,0xf000,0x7800780,0xff0001,0xfc07f00f,0x8007c000,0x780001f0,0x3c,0xf, 0x1e0,0x0,0x0,0x0,0xf800fc01,0xf801f007,0xc00100f8,0x1f807c0,0x40003c,0xf807,0xf0078007,0x80003c00,0xf000,0x7803e00,0x1f0000f, 0x3c0f01e,0x1e01f0,0x3e007e0,0x7c07c00,0xfc003c00,0x1e,0x3e000,0x3e007c0,0x1ff8000,0xfe0fe003,0xe03e0001,0xff0000fc,0x1e, 0xf0,0x780,0x0,0x0,0x1f00080,0x3cf8000,0xfc00000,0x3c00001f,0x83f00000,0x18,0xc0,0x0,0xc06203,0x40003c0,0x1c00000,0xf80f0000, 0x3cf8001f,0xf,0x3e000079,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x700780fc,0x3cf8,0xfc000,0x1e000,0x0,0x780000, 0x7c180000,0xf0000020,0x100007,0x8000003c,0xf,0x80000000,0x1f01f0,0x0,0x380700,0x0,0xf,0x80f80000,0x0,0x0,0x0,0x0,0x0,0x3e007c0, 0xe1c00,0x0,0x0,0x0,0xe01,0xc0000071,0xc0000001,0xc0001c70,0x1e00040,0x1e0003c0,0xf0001e07,0x8000f03c,0x781e0,0x3c0f00,0x1e0f007, 0x80007800,0x10078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e00,0x7e00f003,0xfc01e003,0xc00f001e, 0x7800f0,0x3c00780,0x1e003c00,0xe000700f,0x800f0078,0x7803c0,0x3c01e00,0x1e00f000,0xf0000780,0x1e0000,0xf0003c,0x1f001f80, 0xf800fc07,0xc007e03e,0x3f01f0,0x1f80f80,0xfc1e01f,0x7c00,0x100f8000,0x807c0004,0x3e00020,0x1f000100,0x780000,0x3c00000,0x1e000000, 0xf0000f80,0x1f003c00,0x3c03e007,0xc01f003e,0xf801f0,0x7c00f80,0x3e007c00,0x1f8000f,0x801f003e,0x7c01f0,0x3e00f80,0x1f007c00, 0xf8001ff0,0x1f801f,0x7fc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0xf,0x7800078,0x31f80001,0xc070fc00,0xfc000000,0x1e00,0x7c00,0x0,0x1e0000,0xfc0000,0x0,0x7e000078, 0x7c0,0x1f00001e,0x1f000,0x38003f,0x780,0xe000f80,0x1f803e00,0x780000f,0x800f8000,0x1f00007,0xe000003f,0x0,0x2000000,0x800000, 0x3c000,0x3e01ff71,0xf0001f03,0xc007f007,0xc00301e0,0x1fc003c0,0x1e00,0x7c00,0x781e0007,0x80007800,0x7801f00,0x3c001f00,0x7800001e, 0xf078,0xfe00f8,0x3e00780,0x3e00,0xf8078000,0xf838003e,0xf000,0x7c00f80,0xff0000,0xfc07e00f,0x8003c000,0x780001e0,0x3c,0xf, 0x1e0,0x0,0x0,0x0,0xf801fc01,0xfc03e003,0xe003007c,0x3f803e0,0x1c0003c,0xfc0f,0xf0078007,0x80003c00,0xf000,0x7801f00,0xf8000f, 0x3c0f01e,0x1e00f8,0x7c007f0,0xf803e01,0xfc003c00,0x8003e,0x1f000,0x1e00fc0,0xff0000,0xfe0fe007,0xc01f0000,0xfe0000f8,0x1e, 0xf0,0x780,0x0,0x0,0xf80180,0x1cf0000,0x1f800000,0x3c00001f,0x83e00000,0x18,0xc0,0x0,0xc06203,0x70007c0,0xe00000,0x7e0f0000, 0x1cf0001e,0x7,0x3c000039,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100,0x7c00000,0xe00780fc,0x2001cf0,0xf8000,0x1e000,0x0, 0x780000,0x7e182000,0xf0000000,0x7,0x8000003c,0x7,0xc0000000,0x7ffc0,0x0,0x180300,0x0,0x3,0xffe00000,0x0,0x0,0x0,0x0,0x0, 0x3f00fc0,0xe1c00,0x0,0x0,0x0,0xc01,0x800000e1,0xc0000003,0xc0003870,0x1f001c0,0x3e0003e1,0xf0001f0f,0x8000f87c,0x7c3e0,0x3e1f00, 0x1f1e007,0x80007c00,0x30078000,0x3c0000,0x1e00000,0xf000000,0xf00000,0x7800000,0x3c000001,0xe0001e03,0xfc00f001,0xfc01f007, 0xc00f803e,0x7c01f0,0x3e00f80,0x1f007c00,0x4000201f,0xc01f007c,0xf803e0,0x7c01f00,0x3e00f801,0xf0000780,0x1e0000,0xf0007c, 0x1f003f80,0xf801fc07,0xc00fe03e,0x7f01f0,0x3f80f80,0x1fc1f03f,0x803e00,0x3007c003,0x803e001c,0x1f000e0,0xf800700,0x780000, 0x3c00000,0x1e000000,0xf00007c0,0x3e003c00,0x3c01f00f,0x800f807c,0x7c03e0,0x3e01f00,0x1f00f800,0x1f80007,0xc03e001e,0xfc00f0, 0x7e00780,0x3f003c01,0xf8000fe0,0x1fc03e,0x3f800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x780007f,0xfff00001,0xe0f07f03,0xfe000000,0xf00,0x7800,0x0, 0x1e0000,0xfc0000,0x0,0x7e0000f0,0x3f0,0x7e000fff,0xfc03ffff,0xf83f00fe,0x780,0xfc03f80,0xfc0fc00,0xf800007,0xe03f0018,0x7e00007, 0xe000003f,0x0,0x0,0x0,0x3c000,0x1e007c71,0xe0000f03,0xffffe003,0xf01f01ff,0xff8003ff,0xffe01e00,0x3f01,0xf81e0007,0x803ffff0, 0x7e03f00,0x3c000f00,0x7ffffe1e,0xf078,0xfe007e,0xfc00780,0x1f83,0xf0078000,0x783f00fe,0xf000,0x3f03f00,0xff0000,0xfc07e01f, 0x3e000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x7e07fc01,0xfe07e001,0xf80f007e,0x7f801f8,0xfc0003c,0x7ffe,0xf0078007, 0x807ffffe,0xf000,0x7801f00,0xfff00f,0x3c0f01e,0x1e00fc,0xfc007f8,0x1f803f03,0xfc003c00,0xf80fc,0x1fff0,0x1f83fc0,0xff0000, 0xfc07e007,0xc01f0000,0xfe0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0xfe0780,0xfe0000,0x1f000000,0x3c00001f,0x7c00e03,0x81c00018, 0xc0,0x0,0x406203,0x7e01fc0,0x700000,0x7fffff80,0xfe0003f,0xffffc003,0xf800001f,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f0, 0x1f800001,0xc007c1fe,0x6000fe0,0x1ffffe,0x1e000,0x0,0x780000,0x3f98e03f,0xffff8000,0x7,0x8000003c,0x7,0xc0000000,0xfe00, 0x0,0x80100,0x0,0x0,0x7f000000,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3f83fe8,0xe1c00,0x0,0x0,0x0,0x801,0xc1,0xc0000007,0x80003070, 0xfc0fc0,0x3c0001e1,0xe0000f0f,0x7878,0x3c3c0,0x1e1e00,0xf1e007,0xffc03f01,0xf007ffff,0xc03ffffe,0x1fffff0,0xfffff80,0x7fffe003, 0xffff001f,0xfff800ff,0xffc01fff,0xf800f001,0xfc00fc1f,0x8007e0fc,0x3f07e0,0x1f83f00,0xfc1f800,0x1f,0xf07e003f,0x3f001f8, 0x1f800fc0,0xfc007e07,0xe0000780,0x1e0000,0xf301f8,0xfc0ff80,0x7e07fc03,0xf03fe01f,0x81ff00fc,0xff807e0,0x7fc0f87f,0x81801f80, 0xf003f01f,0x801f80fc,0xfc07e0,0x7e03f00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff807e0,0x7e003c00,0x3c01f81f,0x800fc0fc,0x7e07e0, 0x3f03f00,0x1f81f800,0x1f8000f,0xe07e001f,0x83fc00fc,0x1fe007e0,0xff003f07,0xf8000fe0,0x1fe07e,0x3f800,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x780007f, 0xffe00000,0xffe03fff,0xdf000000,0xf00,0x7800,0x0,0x0,0xfc0000,0x0,0x7e0000f0,0x1ff,0xfc000fff,0xfc03ffff,0xf83ffffc,0x780, 0xfffff00,0x7fff800,0xf000007,0xffff001f,0xffe00007,0xe000003f,0x0,0x0,0x0,0x3c000,0x1e000001,0xe0000f03,0xffffc001,0xffff01ff, 0xff0003ff,0xffe01e00,0x1fff,0xf81e0007,0x803ffff0,0x7fffe00,0x3c000f80,0x7ffffe1e,0xf078,0xfe003f,0xff800780,0xfff,0xf0078000, 0x7c3ffffc,0xf000,0x3ffff00,0xff0000,0xf803e01e,0x1e000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x7fffbc01,0xffffc000, 0xffff003f,0xfff800ff,0xffc0003c,0x3ffe,0xf0078007,0x807ffffe,0xf000,0x7800f80,0x7ff00f,0x3c0f01e,0x1e007f,0xff8007ff,0xff001fff, 0xbc003c00,0xffffc,0x1fff0,0x1fffbc0,0xff0000,0x7c07c00f,0x800f8000,0x7e0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x7fff80,0x7c0000, 0x1f000000,0x3c00001e,0x7c00f07,0xc1e00018,0xc0,0x0,0x60e303,0x7ffff80,0x380000,0x3fffff80,0x7c0003f,0xffffc001,0xf000000f, 0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xff800003,0x8003ffff,0xfe0007c0,0x1ffffe,0x1e000,0x0,0x780000,0x1fffe03f,0xffff8000, 0x7,0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3fffdf8,0xe1c00,0x0,0x0,0x0,0x0,0x1c1, 0xc000000f,0x7070,0x7fffc0,0x3c0001e1,0xe0000f0f,0x7878,0x3c3c0,0x1e1e00,0xf1e007,0xffc01fff,0xf007ffff,0xc03ffffe,0x1fffff0, 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xf000f001,0xfc007fff,0x3fff8,0x1fffc0,0xfffe00,0x7fff000,0x3b,0xfffc003f, 0xfff001ff,0xff800fff,0xfc007fff,0xe0000780,0x1e0000,0xf3fff8,0xffff780,0x7fffbc03,0xfffde01f,0xffef00ff,0xff7807ff,0xfbc0ffff, 0xff800fff,0xf001ffff,0x800ffffc,0x7fffe0,0x3ffff00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff803ff,0xfc003c00,0x3c00ffff,0x7fff8, 0x3fffc0,0x1fffe00,0xffff000,0x1f,0xfffc001f,0xffbc00ff,0xfde007ff,0xef003fff,0x780007e0,0x1ffffc,0x1f800,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0x700003f, 0xffc00000,0x7fc01fff,0x9f800000,0xf80,0xf800,0x0,0x0,0xfc0000,0x0,0x7e0000f0,0xff,0xf8000fff,0xfc03ffff,0xf83ffff8,0x780, 0xffffe00,0x7fff000,0xf000003,0xfffe001f,0xffc00007,0xe000003f,0x0,0x0,0x0,0x3c000,0xf000003,0xe0000f83,0xffff0000,0xffff01ff, 0xfc0003ff,0xffe01e00,0xfff,0xf01e0007,0x803ffff0,0x7fffc00,0x3c0007c0,0x7ffffe1e,0xf078,0x7e003f,0xff000780,0x7ff,0xe0078000, 0x3c3ffff8,0xf000,0x1fffe00,0x7e0000,0xf803e03e,0x1f000,0x780003ff,0xfffc003c,0x7,0x800001e0,0x0,0x0,0x0,0x3fff3c01,0xefff8000, 0x7ffe001f,0xff78007f,0xff80003c,0x1ffc,0xf0078007,0x807ffffe,0xf000,0x78007c0,0x3ff00f,0x3c0f01e,0x1e003f,0xff0007bf,0xfe000fff, 0xbc003c00,0xffff8,0xfff0,0xfff3c0,0x7e0000,0x7c07c01f,0x7c000,0x7c0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0x3fff80,0x380000, 0x3e000000,0x7c00003e,0x7801f07,0xc1e00018,0xc0,0x0,0x39c1ce,0x7ffff00,0x1c0000,0xfffff80,0x380003f,0xffffc000,0xe0000007, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0xff000007,0x1ffcf,0xfe000380,0x1ffffe,0x1e000,0x0,0x780000,0xfffe03f,0xffff8000,0x7, 0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3dffdf8,0xe1c00,0x0,0x0,0x0,0x0,0x381, 0xc000001e,0xe070,0x7fff80,0x7c0001f3,0xe0000f9f,0x7cf8,0x3e7c0,0x1f3e00,0xfbe007,0xffc00fff,0xf007ffff,0xc03ffffe,0x1fffff0, 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01fff,0xc000f000,0xfc007ffe,0x3fff0,0x1fff80,0xfffc00,0x7ffe000,0x79,0xfff8001f, 0xffe000ff,0xff0007ff,0xf8003fff,0xc0000780,0x1e0000,0xf3fff0,0x7ffe780,0x3fff3c01,0xfff9e00f,0xffcf007f,0xfe7803ff,0xf3c07ff3, 0xff8007ff,0xe000ffff,0x7fff8,0x3fffc0,0x1fffe00,0xfffffc07,0xffffe03f,0xffff01ff,0xfff801ff,0xf8003c00,0x3c007ffe,0x3fff0, 0x1fff80,0xfffc00,0x7ffe000,0x1d,0xfff8000f,0xff3c007f,0xf9e003ff,0xcf001ffe,0x780007c0,0x1efff8,0x1f000,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780000,0x1e,0xf000003, 0xfe000000,0x1f000fff,0xfc00000,0x780,0xf000,0x0,0x0,0xf80000,0x0,0x7e0001e0,0x7f,0xf0000fff,0xfc03ffff,0xf81ffff0,0x780, 0x7fff800,0x1ffe000,0x1f000000,0xfff8001f,0xff000007,0xe000003e,0x0,0x0,0x0,0x3c000,0xf800003,0xc0000783,0xfff80000,0x3ffe01ff, 0xe00003ff,0xffe01e00,0x7ff,0xc01e0007,0x803ffff0,0x3fff800,0x3c0003c0,0x7ffffe1e,0xf078,0x7e000f,0xfe000780,0x3ff,0xc0078000, 0x3e1fffe0,0xf000,0x7ff800,0x7e0000,0xf803e07c,0xf800,0x780003ff,0xfffc003c,0x3,0xc00001e0,0x0,0x0,0x0,0xffe3c01,0xe7ff0000, 0x3ffc000f,0xfe78003f,0xfe00003c,0x7f0,0xf0078007,0x807ffffe,0xf000,0x78003e0,0xff00f,0x3c0f01e,0x1e001f,0xfe00079f,0xfc0007ff, 0x3c003c00,0x7ffe0,0x1ff0,0x7fe3c0,0x7e0000,0x7c07c03e,0x3e000,0x7c0001ff,0xffe0001e,0xf0,0x780,0x0,0x0,0xfff00,0x100000, 0x3e000000,0x7800003c,0xf800f07,0xc1e00018,0xc0,0x0,0x1f80fc,0x3fffc00,0xc0000,0x3ffff80,0x100003f,0xffffc000,0x40000002, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xfc000006,0xff87,0xfc000100,0x1ffffe,0x1e000,0x0,0x780000,0x3ffc03f,0xffff8000,0x7, 0x8000003c,0x3,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffff,0xfe000000,0x0,0x0,0x3dff9f8,0xe1c00,0x0,0x0,0x0,0x0,0x3ff, 0xf800003c,0xfffe,0x1ffe00,0x780000f3,0xc000079e,0x3cf0,0x1e780,0xf3c00,0x7bc007,0xffc003ff,0xe007ffff,0xc03ffffe,0x1fffff0, 0xfffff80,0x7fffe003,0xffff001f,0xfff800ff,0xffc01ffc,0xf000,0xfc001ffc,0xffe0,0x7ff00,0x3ff800,0x1ffc000,0x70,0xfff00007, 0xff80003f,0xfc0001ff,0xe0000fff,0x780,0x1e0000,0xf3ffe0,0x1ffc780,0xffe3c00,0x7ff1e003,0xff8f001f,0xfc7800ff,0xe3c03fe1, 0xff0003ff,0xc0007ffc,0x3ffe0,0x1fff00,0xfff800,0xfffffc07,0xffffe03f,0xffff01ff,0xfff800ff,0xf0003c00,0x3c003ffc,0x1ffe0, 0xfff00,0x7ff800,0x3ffc000,0x38,0xfff00007,0xfe3c003f,0xf1e001ff,0x8f000ffc,0x780007c0,0x1e7ff0,0x1f000,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000, 0x1fc,0x0,0x780,0xf000,0x0,0x0,0x1f80000,0x0,0x1e0,0x1f,0xc0000000,0x0,0x1ff80,0x0,0xffc000,0x7f8000,0x0,0x3fe00007,0xfc000000, 0x7e,0x0,0x0,0x0,0x0,0x7c00000,0x0,0x0,0xff00000,0x0,0x0,0xfe,0x0,0x0,0x3fc000,0x0,0x0,0x0,0x3,0xf8000000,0xff,0xc0000000, 0x1ff00,0x0,0x1fe000,0x0,0x0,0x0,0x0,0x3c,0x3,0xc00001e0,0x0,0x0,0x0,0x3f80000,0x1fc0000,0x7f00003,0xf8000007,0xf0000000, 0x0,0xf0000000,0x0,0xf000,0x0,0x0,0x0,0x7,0xf8000787,0xf00001fc,0x3c000000,0x7f80,0x0,0x1f8000,0x0,0x0,0x0,0x7c000000,0x1e, 0xf0,0x780,0x0,0x0,0x3fc00,0x0,0x3c000000,0x7800003c,0xf000601,0xc00018,0xc0,0x0,0x0,0x3fe000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0xf,0xf0000000,0x7e03,0xf0000000,0x0,0x0,0x0,0x0,0xfe0000,0x0,0x0,0x3c,0x2007,0x80000000,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c7e0f0,0xe1c00,0x0,0x3800000,0x0,0x0,0x3ff,0xf8000078,0xfffe,0x7f800,0x0,0x0,0x0,0x0, 0x0,0x0,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f0,0x3f80,0x1fc00,0xfe000,0x7f0000,0x70,0x3fc00001,0xfe00000f,0xf000007f, 0x800003fc,0x0,0x0,0xff00,0x7f0000,0x3f80000,0x1fc00000,0xfe000007,0xf000003f,0x80001f80,0xfc00007f,0xfe0,0x7f00,0x3f800, 0x1fc000,0x0,0x0,0x0,0x3f,0xc0000000,0xff0,0x7f80,0x3fc00,0x1fe000,0xff0000,0x78,0x3fc00001,0xf800000f,0xc000007e,0x3f0,0x7c0, 0x1e1fc0,0x1f000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x3c0,0x1e000,0x0,0x0,0x1f00000,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0x3e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0xe0000000,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x3c,0x1,0xe00001e0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000, 0x0,0x0,0x0,0x0,0x0,0x0,0x78000000,0x1e,0xf0,0x780,0x0,0x0,0x0,0x0,0x3c000000,0x78000078,0xf000000,0x18,0xc0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3c0f,0x80000000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0x1800000,0x0,0x0,0x3ff,0xf80000f0,0xfffe,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,0x780,0x1e0000,0x1e000,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000, 0x0,0x0,0x3c0,0x1e000,0x0,0x0,0x1f00000,0x0,0x3c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0x1f80000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x1,0xe00001e0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe0000000,0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0xf8000000, 0x1f,0xf0,0xf80,0x0,0x0,0x0,0x0,0x78000000,0xf8000078,0x1e000000,0x8,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x3c00000,0xe1c00,0x0,0x1c00000,0x0,0x0,0x1,0xc00001e0,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80,0x1e0000,0x3e000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x1e0,0x3c000,0x0,0x0,0x1f00000, 0x0,0x780,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7c,0x0,0x0,0x0,0x0,0xfe0100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0xf0007fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xe0000000, 0x0,0xf000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x1f,0x800000f0,0x1f80,0x0,0x0,0x0,0x0, 0x78000000,0xf0000070,0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x3ffe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0xe00000, 0x0,0x0,0x1,0xc00003ff,0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0xf00,0x1e0000,0x3c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x1e0,0x7c000,0x0,0x0,0x1e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x78,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78000000, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4003,0xe0000000,0x0,0x1f000,0x0,0x0, 0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x1,0xf0000000,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x0,0x0,0x70000001,0xf00000e0, 0x1c000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000, 0x0,0x0,0x3c,0xff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0xe1c00,0x0,0xe00000,0x0,0x0,0x1,0xc00003ff, 0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f00,0x1e0000, 0x7c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0xf0,0x78000,0x0,0x0,0x3e00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf8,0x0, 0x0,0x0,0x0,0x1fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f, 0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780f,0xc0000000,0x0,0x3e000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0, 0x0,0x0,0x0,0x0,0x3,0xe0000000,0xf,0xfc0000f0,0x3ff00,0x0,0x0,0x0,0x0,0xf0000103,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x21e00000,0x0,0x0,0x1,0xc00003ff,0xe0000070,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10f, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10f,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e00,0x1e0000,0xf8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0, 0xf8,0xf8000,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x1fe00,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xf0000000,0x7fe0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x7fff,0xc0000000,0x0,0x3ffe000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7f,0xe0000000,0x7,0xfc0000f0, 0x3fe00,0x0,0x0,0x0,0x0,0x600001ff,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180000,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0, 0x3fe00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x7fe00,0x1e0000,0x1ff8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff,0x80000000,0x0,0x3ffc000,0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0, 0x0,0x0,0x0,0x0,0x7f,0xc0000000,0x0,0xfc0000f0,0x3f000,0x0,0x0,0x0,0x0,0x1ff,0xc0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x3fc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fe,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fe,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fc00,0x1e0000,0x1ff0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x3ffe,0x0,0x0,0x3ff8000,0x0,0x0,0x0, 0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7f,0x80000000,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x1ff,0x80000000,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x3f800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fc,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fc,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f800,0x1e0000,0x1fe0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f8,0x0,0x0,0x3fe0000, 0x0,0x0,0x0,0x0,0x780,0x0,0x3c000000,0x0,0x0,0x0,0x0,0x0,0x7e,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0xfe,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e000,0x1e0000,0x1f80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fffffe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 }; // Definition of a 40x38 'danger' color logo const unsigned char logo40x38[4576] = { 177,200,200,200,3,123,123,0,36,200,200,200,1,123,123,0,2,255,255,0,1,189,189,189,1,0,0,0,34,200,200,200, 1,123,123,0,4,255,255,0,1,189,189,189,1,0,0,0,1,123,123,123,32,200,200,200,1,123,123,0,5,255,255,0,1,0,0, 0,2,123,123,123,30,200,200,200,1,123,123,0,6,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,29,200,200,200, 1,123,123,0,7,255,255,0,1,0,0,0,2,123,123,123,28,200,200,200,1,123,123,0,8,255,255,0,1,189,189,189,1,0,0,0, 2,123,123,123,27,200,200,200,1,123,123,0,9,255,255,0,1,0,0,0,2,123,123,123,26,200,200,200,1,123,123,0,10,255, 255,0,1,189,189,189,1,0,0,0,2,123,123,123,25,200,200,200,1,123,123,0,3,255,255,0,1,189,189,189,3,0,0,0,1,189, 189,189,3,255,255,0,1,0,0,0,2,123,123,123,24,200,200,200,1,123,123,0,4,255,255,0,5,0,0,0,3,255,255,0,1,189, 189,189,1,0,0,0,2,123,123,123,23,200,200,200,1,123,123,0,4,255,255,0,5,0,0,0,4,255,255,0,1,0,0,0,2,123,123,123, 22,200,200,200,1,123,123,0,5,255,255,0,5,0,0,0,4,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,21,200,200,200, 1,123,123,0,5,255,255,0,5,0,0,0,5,255,255,0,1,0,0,0,2,123,123,123,20,200,200,200,1,123,123,0,6,255,255,0,5,0,0, 0,5,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,19,200,200,200,1,123,123,0,6,255,255,0,1,123,123,0,3,0,0,0,1, 123,123,0,6,255,255,0,1,0,0,0,2,123,123,123,18,200,200,200,1,123,123,0,7,255,255,0,1,189,189,189,3,0,0,0,1,189, 189,189,6,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,17,200,200,200,1,123,123,0,8,255,255,0,3,0,0,0,8,255,255, 0,1,0,0,0,2,123,123,123,16,200,200,200,1,123,123,0,9,255,255,0,1,123,123,0,1,0,0,0,1,123,123,0,8,255,255,0,1,189, 189,189,1,0,0,0,2,123,123,123,15,200,200,200,1,123,123,0,9,255,255,0,1,189,189,189,1,0,0,0,1,189,189,189,9,255,255, 0,1,0,0,0,2,123,123,123,14,200,200,200,1,123,123,0,11,255,255,0,1,0,0,0,10,255,255,0,1,189,189,189,1,0,0,0,2,123, 123,123,13,200,200,200,1,123,123,0,23,255,255,0,1,0,0,0,2,123,123,123,12,200,200,200,1,123,123,0,11,255,255,0,1,189, 189,189,2,0,0,0,1,189,189,189,9,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,11,200,200,200,1,123,123,0,11,255,255, 0,4,0,0,0,10,255,255,0,1,0,0,0,2,123,123,123,10,200,200,200,1,123,123,0,12,255,255,0,4,0,0,0,10,255,255,0,1,189,189, 189,1,0,0,0,2,123,123,123,9,200,200,200,1,123,123,0,12,255,255,0,1,189,189,189,2,0,0,0,1,189,189,189,11,255,255,0,1, 0,0,0,2,123,123,123,9,200,200,200,1,123,123,0,27,255,255,0,1,0,0,0,3,123,123,123,8,200,200,200,1,123,123,0,26,255, 255,0,1,189,189,189,1,0,0,0,3,123,123,123,9,200,200,200,1,123,123,0,24,255,255,0,1,189,189,189,1,0,0,0,4,123,123, 123,10,200,200,200,1,123,123,0,24,0,0,0,5,123,123,123,12,200,200,200,27,123,123,123,14,200,200,200,25,123,123,123,86, 200,200,200,91,49,124,118,124,71,32,124,95,49,56,114,52,82,121,0}; // Display a warning message if parameter 'cond' is true. inline void warn(const bool cond, const char *format,...) { if (cimg::exception_mode()>=1 && cond) { std::va_list ap; va_start(ap,format); std::fprintf(stderr,"\n "); std::vfprintf(stderr,format,ap); std::fputc('\n',stderr); va_end(ap); } } inline int xln(const int x) { return x>0?(int)(1+std::log10((double)x)):1; } inline char uncase(const char x) { return (char)((x<'A'||x>'Z')?x:x-'A'+'a'); } inline float atof(const char *str) { float x=0,y=1; if (!str) return 0; else { std::sscanf(str,"%g/%g",&x,&y); return x/y; } } inline int strlen(const char *s) { if (s) { int k; for (k=0; s[k]; k++) ; return k; } return -1; } inline int strncmp(const char *s1,const char *s2,const int l) { if (s1 && s2) { int n=0; for (int k=0; k=0 && s[l]!=c; l--) ; return l; } return -1; } inline const char* basename(const char *s) { return (cimg_OS!=2)?(s?s+1+cimg::strfind(s,'/'):0):(s?s+1+cimg::strfind(s,'\\'):0); } inline void system(const char *command, const char *module_name=0) { #if cimg_OS==2 PROCESS_INFORMATION pi; STARTUPINFO si; std::memset(&pi, 0, sizeof(PROCESS_INFORMATION)); std::memset(&si, 0, sizeof(STARTUPINFO)); GetStartupInfo(&si); si.cb = sizeof(si); si.wShowWindow = SW_HIDE; si.dwFlags |= SW_HIDE; const BOOL res = CreateProcess((LPCTSTR)module_name,(LPTSTR)command,0,0,FALSE,0,0,0,&si,&pi); if (res) { WaitForSingleObject(pi.hProcess, INFINITE); CloseHandle(pi.hThread); CloseHandle(pi.hProcess); } else #endif std::system(command); command=module_name=0; } //! Return path of the ImageMagick's \c convert tool. /** If you have installed the ImageMagick package in a standard directory, this function should return the correct path of the \c convert tool used by the %CImg Library to load and save compressed image formats. Conversely, if the \c convert executable is not auto-detected by the function, you can define the macro \c cimg_imagemagick_path with the correct path of the \c convert executable, before including CImg.h in your program : \code #define cimg_imagemagick_path "/users/thatsme/local/bin/convert" #include "CImg.h" int main() { CImg<> img("my_image.jpg"); // Read a JPEG image file. return 0; } \endcode Note that non compressed image formats can be read without installing ImageMagick. \sa temporary_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick(). **/ inline const char* imagemagick_path() { static char *st_imagemagick_path = 0; if (!st_imagemagick_path) { st_imagemagick_path = new char[1024]; bool path_found = false; std::FILE *file = 0; #ifdef cimg_imagemagick_path std::strcpy(st_imagemagick_path,cimg_imagemagick_path); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } #endif #if cimg_OS==2 if (!path_found) { std::sprintf(st_imagemagick_path,".\\convert.exe"); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } } { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u-Q\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"C:\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u-Q\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"C:\\PROGRA~1\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u-Q\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"D:\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u-Q\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u-Q\\VISUA~1\\BIN\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_imagemagick_path,"D:\\PROGRA~1\\IMAGEM~1.%u\\VISUA~1\\BIN\\convert.exe",k); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} if (!path_found) std::strcpy(st_imagemagick_path,"convert.exe"); #else if (!path_found) { std::sprintf(st_imagemagick_path,"./convert"); if ((file=std::fopen(st_imagemagick_path,"r"))!=0) { std::fclose(file); path_found = true; } } if (!path_found) std::strcpy(st_imagemagick_path,"convert"); #endif } return st_imagemagick_path; } //! Return path of the GraphicsMagick's \c gm tool. /** If you have installed the GraphicsMagick package in a standard directory, this function should return the correct path of the \c gm tool used by the %CImg Library to load and save compressed image formats. Conversely, if the \c gm executable is not auto-detected by the function, you can define the macro \c cimg_graphicsmagick_path with the correct path of the \c gm executable, before including CImg.h in your program : \code #define cimg_graphicsmagick_path "/users/thatsme/local/bin/gm" #include "CImg.h" int main() { CImg<> img("my_image.jpg"); // Read a JPEG image file. return 0; } \endcode Note that non compressed image formats can be read without installing ImageMagick. \sa temporary_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick(). **/ inline const char* graphicsmagick_path() { static char *st_graphicsmagick_path = 0; if (!st_graphicsmagick_path) { st_graphicsmagick_path = new char[1024]; bool path_found = false; std::FILE *file = 0; #ifdef cimg_graphicsmagick_path std::strcpy(st_graphicsmagick_path,cimg_graphicsmagick_path); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } #endif #if cimg_OS==2 if (!path_found) { std::sprintf(st_graphicsmagick_path,".\\gm.exe"); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } } { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u-Q\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"C:\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u-Q\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"C:\\PROGRA~1\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u-Q\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"D:\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u-Q\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u-Q\\VISUA~1\\BIN\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} { for (unsigned int k=0; k<=9 && !path_found; k++) { std::sprintf(st_graphicsmagick_path,"D:\\PROGRA~1\\GRAPHI~1.%u\\VISUA~1\\BIN\\gm.exe",k); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } }} if (!path_found) std::strcpy(st_graphicsmagick_path,"gm.exe"); #else if (!path_found) { std::sprintf(st_graphicsmagick_path,"./gm"); if ((file=std::fopen(st_graphicsmagick_path,"r"))!=0) { std::fclose(file); path_found = true; } } if (!path_found) std::strcpy(st_graphicsmagick_path,"gm"); #endif } return st_graphicsmagick_path; } //! Return path of the \c XMedcon tool. /** If you have installed the XMedcon package in a standard directory, this function should return the correct path of the \c medcon tool used by the %CIg Library to load DICOM image formats. Conversely, if the \c medcon executable is not auto-detected by the function, you can define the macro \c cimg_medcon_path with the correct path of the \c medcon executable, before including CImg.h in your program : \code #define cimg_medcon_path "/users/thatsme/local/bin/medcon" #include "CImg.h" int main() { CImg<> img("my_image.dcm"); // Read a DICOM image file. return 0; } \endcode Note that \c medcon is only needed if you want to read DICOM image formats. \sa temporary_path(), get_load_dicom(), load_dicom(). **/ inline const char* medcon_path() { static char *st_medcon_path = 0; if (!st_medcon_path) { st_medcon_path = new char[1024]; bool path_found = false; std::FILE *file = 0; #ifdef cimg_medcon_path std::strcpy(st_medcon_path,cimg_medcon_path); if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; } #endif #if cimg_OS==2 if (!path_found) { std::sprintf(st_medcon_path,".\\medcon.bat"); if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; } } if (!path_found) { std::sprintf(st_medcon_path,"C:\\PROGRA~1\\XMedCon\\bin\\medcon.bat"); if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; } } if (!path_found) { std::sprintf(st_medcon_path,"D:\\PROGRA~1\\XMedCon\\bin\\medcon.bat"); if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; } } if (!path_found) std::strcpy(st_medcon_path,"medcon.bat"); #else if (!path_found) { std::sprintf(st_medcon_path,"./medcon"); if ((file=std::fopen(st_medcon_path,"r"))!=0) { std::fclose(file); path_found = true; } } if (!path_found) std::strcpy(st_medcon_path,"medcon"); #endif } return st_medcon_path; } //! Return path to store temporary files. /** If you are running on a standard Unix or Windows system, this function should return a correct path where temporary files can be stored. If such a path is not auto-detected by this function, you can define the macro \c cimg_temporary_path with a correct path, before including CImg.h in your program : \code #define cimg_temporary_path "/users/thatsme/tmp" #include "CImg.h" int main() { CImg<> img("my_image.jpg"); // Read a JPEG image file (using the defined temporay path). return 0; } \endcode A temporary path is necessary to load and save compressed image formats, using \c convert or \c medcon. \sa imagemagick_path(), get_load_imagemagick(), load_imagemagick(), save_imagemagick(), get_load_dicom(), load_dicom(). **/ inline const char* temporary_path() { #define cimg_test_temporary_path(p) \ if (!path_found) { \ std::sprintf(st_temporary_path,p); \ std::sprintf(tmp,"%s%s%s",st_temporary_path,cimg_OS==2?"\\":"/",filetmp); \ if ((file=std::fopen(tmp,"wb"))!=0) { std::fclose(file); std::remove(tmp); path_found = true; } \ } static char *st_temporary_path = 0; if (!st_temporary_path) { st_temporary_path = new char[1024]; bool path_found = false; char tmp[1024], filetmp[512]; std::FILE *file = 0; std::sprintf(filetmp,"CImg%.4d.tmp",std::rand()%10000); #ifdef cimg_temporary_path cimg_test_temporary_path(cimg_temporary_path); #endif #if cimg_OS==2 cimg_test_temporary_path("C:\\WINNT\\Temp"); cimg_test_temporary_path("C:\\WINDOWS\\Temp"); cimg_test_temporary_path("C:\\Temp"); cimg_test_temporary_path("C:"); cimg_test_temporary_path("D:\\WINNT\\Temp"); cimg_test_temporary_path("D:\\WINDOWS\\Temp"); cimg_test_temporary_path("D:\\Temp"); cimg_test_temporary_path("D:"); #else cimg_test_temporary_path("/tmp"); cimg_test_temporary_path("/var/tmp"); #endif if (!path_found) { st_temporary_path[0]='\0'; std::strcpy(tmp,filetmp); if ((file=std::fopen(tmp,"wb"))!=0) { std::fclose(file); std::remove(tmp); path_found = true; } } if (!path_found) throw CImgIOException("cimg::temporary_path() : Unable to find a temporary path accessible for writing\n" "you have to set the macro 'cimg_temporary_path' to a valid path where you have writing access :\n" "#define cimg_temporary_path \"path\" (before including 'CImg.h')"); } return st_temporary_path; } inline const char *filename_split(const char *const filename, char *const body=0) { if (!filename) { if (body) body[0]='\0'; return 0; } int l = cimg::strfind(filename,'.'); if (l>=0) { if (body) { std::strncpy(body,filename,l); body[l]='\0'; }} else { if (body) std::strcpy(body,filename); l=(int)std::strlen(filename)-1; } return filename+l+1; } inline char* filename_number(const char *const filename, const int number, const unsigned int n, char *const string) { if (!filename) { if (string) string[0]='\0'; return 0; } char format[1024],body[1024]; const char *ext = cimg::filename_split(filename,body); if (n>0) std::sprintf(format,"%s_%%.%ud.%s",body,n,ext); else std::sprintf(format,"%s_%%d.%s",body,ext); std::sprintf(string,format,number); return string; } inline std::FILE *fopen(const char *const path,const char *const mode) { if(!path || !mode) throw CImgArgumentException("cimg::fopen() : File '%s' cannot be opened with mode '%s'.", path?path:"(null)",mode?mode:"(null)"); if (path[0]=='-') return (mode[0]=='r')?stdin:stdout; std::FILE *dest = std::fopen(path,mode); if (!dest) throw CImgIOException("cimg::fopen() : File '%s' cannot be opened%s", path,mode[0]=='r'?" for reading.":(mode[0]=='w'?" for writing.":"."),path); return dest; } inline int fclose(std::FILE *file) { warn(!file,"cimg::fclose() : Can't close (null) file"); if (!file || file==stdin || file==stdout) return 0; const int errn=std::fclose(file); warn(errn!=0,"cimg::fclose() : Error %d during file closing",errn); return errn; } template inline int fread(T *const ptr, const unsigned int nmemb, std::FILE *stream) { if (!ptr || nmemb<=0 || !stream) throw CImgArgumentException("cimg::fread() : Can't read %u x %u bytes of file pointer '%p' in buffer '%p'", nmemb,sizeof(T),stream,ptr); const unsigned long wlimitT = 63*1024*1024, wlimit = wlimitT/sizeof(T); unsigned int toread=nmemb, alread=0, ltoread=0, lalread=0; do { ltoread = (toread*sizeof(T))0); cimg::warn(toread>0,"cimg::fread() : File reading problems, only %u/%u elements read",alread,nmemb); return alread; } template inline int fwrite(const T *ptr, const unsigned int nmemb, std::FILE *stream) { if (!ptr || !stream) throw CImgArgumentException("cimg::fwrite() : Can't write %u x %u bytes of file pointer '%p' from buffer '%p'", nmemb,sizeof(T),stream,ptr); if (nmemb<=0) return 0; const unsigned long wlimitT = 63*1024*1024, wlimit = wlimitT/sizeof(T); unsigned int towrite=nmemb, alwrite=0, ltowrite=0, lalwrite=0; do { ltowrite = (towrite*sizeof(T))0); cimg::warn(towrite>0,"cimg::fwrite() : File writing problems, only %u/%u elements written",alwrite,nmemb); return alwrite; } // Exchange the values of variables \p a and \p b template inline void swap(T& a,T& b) { T t=a; a=b; b=t; } template inline void swap(T1& a1,T1& b1,T2& a2,T2& b2) { cimg::swap(a1,b1); cimg::swap(a2,b2); } template inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3) { cimg::swap(a1,b1,a2,b2); cimg::swap(a3,b3); } template inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4) { cimg::swap(a1,b1,a2,b2,a3,b3); cimg::swap(a4,b4); } template inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4,T5& a5,T5& b5) { cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4); cimg::swap(a5,b5); } template inline void swap(T1& a1,T1& b1,T2& a2,T2& b2,T3& a3,T3& b3,T4& a4,T4& b4,T5& a5,T5& b5,T6& a6,T6& b6) { cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4,a5,b5); cimg::swap(a6,b6); } template inline void endian_swap(T* const buffer, const unsigned int size) { switch (sizeof(T)) { case 1: break; case 2: { for (unsigned short *ptr = (unsigned short*)buffer+size; ptr>(unsigned short*)buffer;) { const unsigned short val = *(--ptr); *ptr = (val>>8)|((val<<8)); } } break; case 4: { for (unsigned int *ptr = (unsigned int*)buffer+size; ptr>(unsigned int*)buffer;) { const unsigned int val = *(--ptr); *ptr = (val>>24)|((val>>8)&0xff00)|((val<<8)&0xff0000)|(val<<24); } } break; default: { for (T* ptr = buffer+size; ptr>buffer; --ptr) { unsigned char *pb=(unsigned char*)(--ptr), *pe=pb+sizeof(T); for (int i=0; i<(int)sizeof(T)/2; i++) cimg::swap(*(pb++),*(--pe)); } break; } } } template inline T& endian_swap(T& a) { endian_swap(&a,1); return a; } inline const char* option(const char *const name, const int argc, char **argv, const char *defaut, const char *const usage=0) { static bool first=true, visu=false; const char *res = 0; if (first) { first=false; visu = (cimg::option("-h",argc,argv,(char*)0)!=0); visu |= (cimg::option("-help",argc,argv,(char*)0)!=0); visu |= (cimg::option("--help",argc,argv,(char*)0)!=0); } if (!name && visu) { if (usage) { std::fprintf(stderr,"\n %s%s%s",cimg::t_red,cimg::basename(argv[0]),cimg::t_normal); std::fprintf(stderr," : %s",usage); std::fprintf(stderr," (%s, %s)\n\n",__DATE__,__TIME__); } if (defaut) std::fprintf(stderr,"%s\n",defaut); } if (name) { if (argc>0) { int k=0; while (k CPU endianness : %s%s Endian%s\n", cimg::t_bold, cimg::endian()?"Big":"Little", cimg::t_normal); std::fprintf(stderr," > Operating System : %s%-13s%s %s('cimg_OS'=%d)%s\n", cimg::t_bold, cimg_OS==1?"Unix":(cimg_OS==2?"Windows":"Unknow"), cimg::t_normal,cimg::t_purple, cimg_OS, cimg::t_normal); #ifdef cimg_use_visualcpp6 std::fprintf(stderr," > Using Visual C++ 6.0 : %s%-13s%s %s('cimg_use_visual_cpp6' defined)%s\n", cimg::t_bold,"Yes",cimg::t_normal,cimg::t_purple,cimg::t_normal); #endif std::fprintf(stderr," > Display type : %s%-13s%s %s('cimg_display_type'=%d)%s\n", cimg::t_bold, cimg_display_type==0?"No display":(cimg_display_type==1?"X11":(cimg_display_type==2?"Windows GDI":"Unknow")), cimg::t_normal,cimg::t_purple, cimg_display_type, cimg::t_normal); std::fprintf(stderr," > Color terminal : %s%-13s%s %s('cimg_color_terminal' %s)%s\n", cimg::t_bold, #ifdef cimg_color_terminal "Yes",cimg::t_normal,cimg::t_purple,"defined", #else "No",cimg::t_normal,cimg::t_purple,"undefined", #endif cimg::t_normal); std::fprintf(stderr," > Debug messages : %s%-13s%s %s('cimg_debug'=%d)%s\n", cimg::t_bold, cimg_debug==0?"No":(cimg_debug==1 || cimg_debug==2?"Yes":(cimg_debug==3?"Yes+":"Unknown")), cimg::t_normal,cimg::t_purple, cimg_debug, cimg::t_normal); #if cimg_display_type==1 std::fprintf(stderr," > Using XShm for X11 : %s%-13s%s %s('cimg_use_xshm' %s)%s\n", cimg::t_bold, #ifdef cimg_use_xshm "Yes",cimg::t_normal,cimg::t_purple,"defined", #else "No",cimg::t_normal,cimg::t_purple,"undefined", #endif cimg::t_normal); std::fprintf(stderr," > Using XRand for X11 : %s%-13s%s %s('cimg_use_xrandr' %s)%s\n", cimg::t_bold, #ifdef cimg_use_xrandr "Yes",cimg::t_normal,cimg::t_purple,"defined", #else "No",cimg::t_normal,cimg::t_purple,"undefined", #endif cimg::t_normal); #endif std::fprintf(stderr," > Using PNG library : %s%-13s%s %s('cimg_use_png' %s)%s\n", cimg::t_bold, #ifdef cimg_use_png "Yes",cimg::t_normal,cimg::t_purple,"defined", #else "No",cimg::t_normal,cimg::t_purple,"undefined", #endif cimg::t_normal); std::fprintf(stderr," > Using JPEG library : %s%-13s%s %s('cimg_use_jpeg' %s)%s\n", cimg::t_bold, #ifdef cimg_use_jpeg "Yes",cimg::t_normal,cimg::t_purple,"defined", #else "No",cimg::t_normal,cimg::t_purple,"undefined", #endif cimg::t_normal); std::fprintf(stderr," > Using TIFF library : %s%-13s%s %s('cimg_use_tiff' %s)%s\n", cimg::t_bold, #ifdef cimg_use_tiff "Yes",cimg::t_normal,cimg::t_purple,"defined", #else "No",cimg::t_normal,cimg::t_purple,"undefined", #endif cimg::t_normal); std::fprintf(stderr," > Using Magick++ library : %s%-13s%s %s('cimg_use_magick' %s)%s\n", cimg::t_bold, #ifdef cimg_use_magick "Yes",cimg::t_normal,cimg::t_purple,"defined", #else "No",cimg::t_normal,cimg::t_purple,"undefined", #endif cimg::t_normal); std::fprintf(stderr," > Using FFTW3 library : %s%-13s%s %s('cimg_use_fftw3' %s)%s\n", cimg::t_bold, #ifdef cimg_use_fftw3 "Yes",cimg::t_normal,cimg::t_purple,"defined", #else "No",cimg::t_normal,cimg::t_purple,"undefined", #endif cimg::t_normal); std::sprintf(tmp,"\"%.1020s\"",cimg::imagemagick_path()); std::fprintf(stderr," > Path of ImageMagick : %s%-13s%s %s('cimg_imagemagick_path'%s)%s\n", cimg::t_bold, tmp, cimg::t_normal, #ifdef cimg_imagemagick_path cimg::t_purple,"=\""cimg_imagemagick_path"\"", #else cimg::t_purple," undefined", #endif cimg::t_normal); std::sprintf(tmp,"\"%.1020s\"",cimg::graphicsmagick_path()); std::fprintf(stderr," > Path of GraphicsMagick : %s%-13s%s %s('cimg_graphicsmagick_path'%s)%s\n", cimg::t_bold, tmp, cimg::t_normal, #ifdef cimg_graphicsmagick_path cimg::t_purple,"=\""cimg_graphicsmagick_path"\"", #else cimg::t_purple," undefined", #endif cimg::t_normal); std::sprintf(tmp,"\"%.1020s\"",cimg::medcon_path()); std::fprintf(stderr," > Path of 'medcon' : %s%-13s%s %s('cimg_medcon_path'%s)%s\n", cimg::t_bold, tmp, cimg::t_normal, #ifdef cimg_medcon_path cimg::t_purple,"=\""cimg_medcon_path"\"", #else cimg::t_purple," undefined", #endif cimg::t_normal); std::sprintf(tmp,"\"%.1020s\"",cimg::temporary_path()); std::fprintf(stderr," > Temporary path : %s%-13s%s %s('cimg_temporary_path'%s)%s\n", cimg::t_bold, tmp, cimg::t_normal, #ifdef cimg_temporary_path cimg::t_purple,"=\""cimg_temporary_path"\"", #else cimg::t_purple," undefined", #endif cimg::t_normal); std::fprintf(stderr,"\n"); } //! Get the value of a system timer with a millisecond precision. inline unsigned long time() { #if cimg_OS==1 struct timeval st_time; gettimeofday(&st_time,0); return (unsigned long)(st_time.tv_usec/1000 + st_time.tv_sec*1000); #elif cimg_OS==2 static SYSTEMTIME st_time; GetSystemTime(&st_time); return (unsigned long)(st_time.wMilliseconds + 1000*(st_time.wSecond + 60*(st_time.wMinute + 60*st_time.wHour))); #else return 0; #endif } //! Sleep for a certain numbers of milliseconds. /** This function frees the CPU ressources during the sleeping time. It may be used to temporize your program properly, without wasting CPU time. \sa wait(), time(). **/ inline void sleep(const unsigned int milliseconds) { #if cimg_OS==1 struct timespec tv; tv.tv_sec = milliseconds/1000; tv.tv_nsec = (milliseconds%1000)*1000000; nanosleep(&tv,0); #elif cimg_OS==2 Sleep(milliseconds); #endif } inline unsigned int wait(const unsigned int milliseconds, unsigned long& timer) { if (!timer) timer = cimg::time(); const unsigned long current_time = cimg::time(); if (current_time>=timer+milliseconds) { timer = current_time; return 0; } const unsigned long time_diff = timer + milliseconds - current_time; timer = current_time + time_diff; cimg::sleep(time_diff); return (unsigned int)time_diff; } //! Wait for a certain number of milliseconds since the last call. /** This function is equivalent to sleep() but the waiting time is computed with regard to the last call of wait(). It may be used to temporize your program properly. \sa sleep(), time(). **/ inline unsigned int wait(const unsigned int milliseconds) { static unsigned long timer = 0; if (!timer) timer = cimg::time(); return wait(milliseconds,timer); } template inline const T rol(const T& a, const unsigned int n=1) { return (T)((a<>((sizeof(T)<<3)-n))); } template inline const T ror(const T& a, const unsigned int n=1) { return (T)((a>>n)|(a<<((sizeof(T)<<3)-n))); } //! Return the absolute value of \p a template inline T abs(const T a) { return a>=0?a:-a; } inline bool abs(const bool a) { return a; } inline unsigned char abs(const unsigned char a) { return a; } inline unsigned short abs(const unsigned short a) { return a; } inline unsigned int abs(const unsigned int a) { return a; } inline unsigned long abs(const unsigned long a) { return a; } inline double abs(const double a) { return std::fabs(a); } inline float abs(const float a) { return (float)std::fabs((double)a); } inline int abs(const int a) { return std::abs(a); } //! Return the minimum between \p a and \p b. template inline const T min(const T a,const T b) { return a<=b?a:b; } //! Return the minimum between \p a,\p b and \a c. template inline const T min(const T a,const T b,const T c) { return cimg::min(cimg::min(a,b),c); } //! Return the minimum between \p a,\p b,\p c and \p d. template inline const T min(const T a,const T b,const T c,const T d) { return cimg::min(cimg::min(a,b,c),d); } //! Return the maximum between \p a and \p b. template inline const T max(const T a,const T b) { return a>=b?a:b; } //! Return the maximum between \p a,\p b and \p c. template inline const T max(const T a,const T b,const T c) { return cimg::max(cimg::max(a,b),c); } //! Return the maximum between \p a,\p b,\p c and \p d. template inline const T max(const T a,const T b,const T c,const T d) { return cimg::max(cimg::max(a,b,c),d); } //! Return the sign of \p x. template inline T sign(const T x) { return (x<0)?(T)(-1):(x==0?(T)0:(T)1); } //! Return the nearest power of 2 higher than \p x. template inline unsigned long nearest_pow2(const T& x) { unsigned long i=1; while (x>i) i<<=1; return i; } //! Return \p x modulo \p m (generic modulo). /** This modulo function accepts negative and floating-points modulo numbers \p m. **/ inline double mod(const double x, const double m) { return x-m*std::floor(x/m); } inline float mod(const float x, const float m) { return (float)(x-m*std::floor((double)x/m)); } inline int mod(const int x, const int m) { return x>=0?x%m:(x%m?m+x%m:0); } //! Return minmod(\p a,\p b). /** The operator minmod(\p a,\p b) is defined to be : - minmod(\p a,\p b) = min(\p a,\p b), if (\p a * \p b)>0. - minmod(\p a,\p b) = 0, if (\p a * \p b)<=0 **/ template inline T minmod(const T& a,const T& b) { return a*b<=0?0:(a>0?(aabsb) { const double tmp = absb/absa; return absa*std::sqrt(1.0+tmp*tmp); } else { const double tmp = absa/absb; return (absb==0?0:absb*std::sqrt(1.0+tmp*tmp)); } } // End of the 'cimg' namespace } /* #---------------------------------------- # # # # Definition of the CImgStats structure # # # #---------------------------------------- */ //! Class used to compute basic statistics on pixel values of a \ref CImg image. /** Constructing a CImgStats instance from an image CImg or a list CImgList will compute the minimum, maximum and average pixel values of the input object. Optionally, the variance of the pixel values can be computed. Coordinates of the pixels whose values are minimum and maximum are also stored. The example below shows how to use CImgStats objects to retrieve simple statistics of an image : \code const CImg img("my_image.jpg"); // Read JPEG image file. const CImgStats stats(img); // Compute basic statistics on the image. stats.print("My statistics"); // Display statistics. std::printf("Max-Min = %lf",stats.max-stats.min); // Compute the difference between extremum values. \endcode Note that statistics are computed by considering the set of \a scalar values of the image pixels. No vector-valued statistics are computed. **/ struct CImgStats { double min; //!< Minimum of the pixel values. double max; //!< Maximum of the pixel values. double mean; //!< Mean of the pixel values. double variance; //!< Variance of the pixel values. int xmin; //!< X-coordinate of the pixel with minimum value. int ymin; //!< Y-coordinate of the pixel with minimum value. int zmin; //!< Z-coordinate of the pixel with minimum value. int vmin; //!< V-coordinate of the pixel with minimum value. int lmin; //!< Image number (for a list) containing the minimum pixel. int xmax; //!< X-coordinate of the pixel with maximum value. int ymax; //!< Y-coordinate of the pixel with maximum value. int zmax; //!< Z-coordinate of the pixel with maximum value. int vmax; //!< V-coordinate of the pixel with maximum value. int lmax; //!< Image number (for a list) containing the maximum pixel. #ifdef cimgstats_plugin #include cimgstats_plugin #endif //! Default constructor. CImgStats():min(0),max(0),mean(0),variance(0),xmin(-1),ymin(-1),zmin(-1),vmin(-1),lmin(-1), xmax(-1),ymax(-1),zmax(-1),vmax(-1),lmax(-1) {} //! In-place version of the default constructor CImgStats& assign() { min = max = mean = variance = 0; xmin = ymin = zmin = vmin = lmin = xmax = ymax = zmax = vmax = lmax = -1; return *this; } //! Copy constructor. CImgStats(const CImgStats& stats) { assign(stats); }; //! In-place version of the copy constructor. CImgStats& assign(const CImgStats& stats) { min = stats.min; max = stats.max; mean = stats.mean; variance = stats.variance; xmin = stats.xmin; ymin = stats.ymin; zmin = stats.zmin; vmin = stats.vmin; lmin = stats.lmin; xmax = stats.xmax; ymax = stats.ymax; zmax = stats.zmax; vmax = stats.vmax; lmax = stats.lmax; return *this; } //! Constructor that computes statistics of an input image \p img. /** \param img The input image. \param compute_variance If true, the \c variance field is computed, else it is set to 0. **/ template CImgStats(const CImg& img, const bool compute_variance=true) { assign(img,compute_variance); } //! In-place version of the previous constructor. template CImgStats& assign(const CImg& img, const bool compute_variance=true) { if (img.is_empty()) throw CImgArgumentException("CImgStats::CImgStats() : Specified input image (%u,%u,%u,%u,%p) is empty.", img.width,img.height,img.depth,img.dim,img.data); mean = variance = 0; lmin = lmax = -1; T pmin=img[0], pmax=pmin, *ptrmin=img.data, *ptrmax=ptrmin; cimg_for(img,ptr,T) { const T& a=*ptr; mean+=(double)a; if (apmax) { pmax=a; ptrmax = ptr; } } mean/=img.size(); min=(double)pmin; max=(double)pmax; unsigned long offmin = (unsigned long)(ptrmin-img.data), offmax = (unsigned long)(ptrmax-img.data); const unsigned long whz = img.width*img.height*img.depth, wh = img.width*img.height; vmin = offmin/whz; offmin%=whz; zmin = offmin/wh; offmin%=wh; ymin = offmin/img.width; xmin = offmin%img.width; vmax = offmax/whz; offmax%=whz; zmax = offmax/wh; offmax%=wh; ymax = offmax/img.width; xmax = offmax%img.width; if (compute_variance) { cimg_for(img,ptr,T) { const double tmpf=(*ptr)-mean; variance+=tmpf*tmpf; } const unsigned int siz = img.size(); if (siz>1) variance/=(siz-1); else variance=0; } return *this; } //! Constructor that computes statistics of an input image list \p list. /** \param list The input list of images. \param compute_variance If true, the \c variance field is computed, else it is set to 0. **/ template CImgStats(const CImgList& list, const bool compute_variance=true) { assign(list,compute_variance); } //! In-place version of the previous constructor. template CImgStats& assign(const CImgList& list,const bool compute_variance=true) { if (list.is_empty()) throw CImgArgumentException("CImgStats::CImgStats() : Specified input list (%u,%p) is empty.", list.size,list.data); mean = variance = lmin = lmax = 0; T pmin = list[0][0], pmax = pmin, *ptrmin = list[0].data, *ptrmax = ptrmin; int psize = 0; cimglist_for(list,l) { cimg_for(list[l],ptr,T) { const T& a=*ptr; mean+=(double)a; if (apmax) { pmax=a; ptrmax = ptr; lmax = l; } } psize+=list[l].size(); } mean/=psize; min=(double)pmin; max=(double)pmax; const CImg &imin = list[lmin], &imax = list[lmax]; unsigned long offmin = (ptrmin-imin.data), offmax = (ptrmax-imax.data); const unsigned long whz1 = imin.width*imin.height*imin.depth, wh1 = imin.width*imin.height; vmin = offmin/whz1; offmin%=whz1; zmin = offmin/wh1; offmin%=wh1; ymin = offmin/imin.width; xmin = offmin%imin.width; const unsigned long whz2 = imax.width*imax.height*imax.depth, wh2 = imax.width*imax.height; vmax = offmax/whz2; offmax%=whz2; zmax = offmax/wh2; offmax%=wh2; ymax = offmax/imax.width; xmax = offmax%imax.width; if (compute_variance) { cimglist_for(list,l) cimg_for(list[l],ptr,T) { const double tmpf=(*ptr)-mean; variance+=tmpf*tmpf; } if (psize>1) variance/=(psize-1); else variance=0; } return *this; } //! Assignement operator. CImgStats& operator=(const CImgStats& stats) { return assign(stats); } //! Return true if the current instance contains valid statistics bool is_empty() const { return (xmin>=0 && ymin>=0 && zmin>=0 && vmin>=0 && xmax>=0 && ymax>=0 && zmax>=0 && vmax>=0); } //! Print the current statistics. /** Printing is done on the standart error output. **/ const CImgStats& print(const char* title=0) const { if (lmin>=0 && lmax>=0) std::fprintf(stderr,"%-8s(this=%p) : { min=%g, mean=%g [var=%g], max=%g, " "pmin=[%d](%d,%d,%d,%d), pmax=[%d](%d,%d,%d,%d) }\n", title?title:"CImgStats",(void*)this,min,mean,variance,max, lmin,xmin,ymin,zmin,vmin,lmax,xmax,ymax,zmax,vmax); else std::fprintf(stderr,"%-8s(this=%p) : { min=%g, mean=%g [var=%g], max=%g, " "pmin=(%d,%d,%d,%d), pmax=(%d,%d,%d,%d) }\n", title?title:"CImgStats",(void*)this,min,mean,variance,max, xmin,ymin,zmin,vmin,xmax,ymax,zmax,vmax); return *this; } }; /* #------------------------------------------- # # # # Definition of the CImgDisplay structure # # # #------------------------------------------- */ //! This class represents a window which can display \ref CImg images and handles mouse and keyboard events. /** Creating a \c CImgDisplay instance opens a window that can be used to display a \c CImg image of a \c CImgList image list inside. When a display is created, associated window events (such as mouse motion, keyboard and window size changes) are handled and can be easily detected by testing specific \c CImgDisplay data fields. See \ref cimg_displays for a complete tutorial on using the \c CImgDisplay class. **/ struct CImgDisplay { //! Width of the display unsigned int width; //! Height of the display unsigned int height; //! Normalization type used for the display unsigned int normalization; //! Range of events detected by the display unsigned int events; //! Fullscreen state of the display bool is_fullscreen; //! Display title char* title; //! X-pos of the display on the screen volatile int window_x; //! Y-pos of the display on the screen volatile int window_y; //! Width of the underlying window volatile unsigned int window_width; //! Height of the underlying window volatile unsigned int window_height; //! X-coordinate of the mouse pointer on the display volatile int mouse_x; //! Y-coordinate of the mouse pointer on the display volatile int mouse_y; //! Button state of the mouse volatile unsigned int buttons[256]; volatile unsigned int& button; //! Wheel state of the mouse volatile int wheel; //! Key value if pressed volatile unsigned int& key; volatile unsigned int keys[256]; //! Key value if released volatile unsigned int& released_key; volatile unsigned int released_keys[256]; //! Closed state of the window volatile bool is_closed; //! Resized state of the window volatile bool is_resized; //! Moved state of the window volatile bool is_moved; //! Event state of the window volatile bool is_event; float fps_fps, min, max; unsigned long timer, fps_frames, fps_timer; #ifdef cimgdisplay_plugin #include cimgdisplay_plugin #endif //! Create a display window with a specified size \p pwidth x \p height. /** \param dimw : Width of the display window. \param dimh : Height of the display window. \param title : Title of the display window. \param normalization_type : Normalization type of the display window (see CImgDisplay::normalize). \param events_type : Type of events handled by the display window. \param fullscreen_flag : Fullscreen mode. \param closed_flag : Initially visible mode. A black image will be initially displayed in the display window. **/ CImgDisplay(const unsigned int dimw, const unsigned int dimh, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false): width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0), window_x(0),window_y(0),window_width(0),window_height(0), mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys), is_closed(true),is_resized(false),is_moved(false),is_event(false), min(0),max(0) { assign(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag); } //! Create a display window from an image. /** \param img : Image that will be used to create the display window. \param title : Title of the display window \param normalization_type : Normalization type of the display window. \param events_type : Type of events handled by the display window. \param fullscreen_flag : Fullscreen mode. \param closed_flag : Initially visible mode. **/ template CImgDisplay(const CImg& img, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false): width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0), window_x(0),window_y(0),window_width(0),window_height(0), mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys), is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) { assign(img,title,normalization_type,events_type,fullscreen_flag,closed_flag); } //! Create a display window from an image list. /** \param list : The list of images to display. \param title : Title of the display window \param normalization_type : Normalization type of the display window. \param events_type : Type of events handled by the display window. \param fullscreen_flag : Fullscreen mode. \param closed_flag : Initially visible mode. **/ template CImgDisplay(const CImgList& list,const char *title=0, const unsigned int normalization_type=3,const unsigned int events_type=3, const bool fullscreen_flag=false,const bool closed_flag=false): width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0), window_x(0),window_y(0),window_width(0),window_height(0), mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys), is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) { assign(list,title,normalization_type,events_type,fullscreen_flag,closed_flag); } //! Create a display window by copying another one. /** \param win : Display window to copy. \param title : Title of the new display window. **/ CImgDisplay(const CImgDisplay& disp): width(0),height(0),normalization(0),events(0),is_fullscreen(false),title(0), window_x(0),window_y(0),window_width(0),window_height(0), mouse_x(0),mouse_y(0),button(*buttons),wheel(0),key(*keys),released_key(*released_keys), is_closed(true),is_resized(false),is_moved(false),is_event(false),min(0),max(0) { assign(disp); } //! Destructor ~CImgDisplay() { _assign(); } //! Assignement operator CImgDisplay& operator=(const CImgDisplay& disp) { return assign(disp); } //! Return display width int dimx() const { return (int)width; } //! Return display height int dimy() const { return (int)height; } //! Return display window width int window_dimx() const { return (int)window_width; } //! Return display window height int window_dimy() const { return (int)window_height; } //! Return X-coordinate of the window int window_posx() const { return window_x; } //! Return Y-coordinate of the window int window_posy() const { return window_y; } //! Synchronized waiting function. Same as cimg::wait(). /** \see cimg::wait() **/ CImgDisplay& wait(const unsigned int milliseconds) { cimg::wait(milliseconds, timer); return *this; } //! Wait for an event occuring on the current display CImgDisplay& wait() { wait(*this); return *this; } //! Wait for any event occuring on the display \c disp1 static void wait(CImgDisplay& disp1) { disp1.is_event = 0; while (!disp1.is_event) wait_all(); } //! Wait for any event occuring either on the display \c disp1 or \c disp2 static void wait(CImgDisplay& disp1, CImgDisplay& disp2) { disp1.is_event = disp2.is_event = 0; while (!disp1.is_event && !disp2.is_event) wait_all(); } //! Wait for any event occuring either on the display \c disp1, \c disp2 or \c disp3 static void wait(CImgDisplay& disp1, CImgDisplay& disp2, CImgDisplay& disp3) { disp1.is_event = disp2.is_event = disp3.is_event = 0; while (!disp1.is_event && !disp2.is_event && !disp3.is_event) wait_all(); } //! Wait for any event occuring either on the display \c disp1, \c disp2, \c disp3 or \c disp4 static void wait(CImgDisplay& disp1, CImgDisplay& disp2, CImgDisplay& disp3, CImgDisplay& disp4) { disp1.is_event = disp2.is_event = disp3.is_event = disp4.is_event = 0; while (!disp1.is_event && !disp2.is_event && !disp3.is_event && !disp4.is_event) wait_all(); } //! Return the frame per second rate float frames_per_second() { if (!fps_timer) fps_timer = cimg::time(); const float delta = (cimg::time()-fps_timer)/1000.0f; fps_frames++; if (delta>=1.0f) { fps_fps = fps_frames/delta; fps_frames = 0; fps_timer = cimg::time(); } return fps_fps; } //! Display an image list CImgList into a display window. /** First, all images of the list are appended into a single image used for visualization, then this image is displayed in the current display window. \param list : The list of images to display. \param axe : The axe used to append the image for visualization. Can be 'x' (default),'y','z' or 'v'. \param align : Defines the relative alignment of images when displaying images of different sizes. Can be '\p c' (centered, which is the default), '\p p' (top alignment) and '\p n' (bottom aligment). \see CImg::get_append() **/ template CImgDisplay& display(const CImgList& list,const char axe='x',const char align='c') { return display(list.get_append(axe,align)); } //! Display an image CImg into a display window. template CImgDisplay& operator<<(const CImg& img) { return display(img); } //! Display an image CImg into a display window. template CImgDisplay& operator<<(const CImgList& list) { return display(list); } //! Resize a display window with the size of an image. /** \param img : Input image. \p image.width and \p image.height give the new dimensions of the display window. \param redraw : If \p true (default), the current displayed image in the display window will be bloc-interpolated to fit the new dimensions. If \p false, a black image will be drawn in the resized window. \see CImgDisplay::is_resized, CImgDisplay::resizedimx(), CImgDisplay::resizedimy() **/ template CImgDisplay& resize(const CImg& img, const bool redraw=true) { return resize(img.width,img.height,redraw); } //! Resize a display window using the size of the given display \p disp CImgDisplay& resize(const CImgDisplay& disp, const bool redraw=true) { return resize(disp.width,disp.height,redraw); } //! Resize a display window in its current size. CImgDisplay& resize(const bool redraw=true) { resize(window_width,window_height,redraw); return *this; } //! Display a 3d object template CImgDisplay& display_object3d(const tp& points, const CImgList& primitives, const CImgList& colors, const to& opacities, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const bool display_axes = true, float *const pose_matrix=0) { CImg(width,height,1,3,0).display_object3d(points,primitives,colors,opacities,*this, centering,render_static,render_motion, double_sided,focale,ambiant_light,display_axes,pose_matrix); return *this; } //! Display a 3D object. template CImgDisplay& display_object3d(const tp& points, const CImgList& primitives, const CImgList& colors, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const float opacity=1.0f, const bool display_axes = true, float *const pose_matrix=0) { typedef typename cimg::largest::type to; CImg(width,height,1,3,0).display_object3d(points,primitives,colors, CImg(primitives.size)=(to)opacity,*this, centering,render_static,render_motion, double_sided,focale,ambiant_light,display_axes,pose_matrix); return *this; } //! Toggle fullscreen mode CImgDisplay& toggle_fullscreen() { return assign(width,height,title,normalization,events,!is_fullscreen,is_closed); } // Inner routine used for fast resizing of buffer to display size. template static void _render_resize(const T *ptrs, const unsigned int ws, const unsigned int hs, t *ptrd, const unsigned int wd, const unsigned int hd) { unsigned int *const offx = new unsigned int[wd], *const offy = new unsigned int[hd+1], *poffx, *poffy; float s, curr, old; s = (float)ws/wd; poffx = offx; curr=0; for (unsigned int x=0; x CImgDisplay& assign(const CImg& img, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) { fps_timer = 0*(unsigned long)(img.width + title + normalization_type + events_type + (int)fullscreen_flag + (int)closed_flag); return assign(0,0); } //! In-place version of the previous constructor template CImgDisplay& assign(const CImgList& list, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) { fps_timer = 0*(unsigned long)(list.size + title + normalization_type + events_type + (int)fullscreen_flag + (int)closed_flag); return assign(0,0); } //! In-place version of the previous constructor CImgDisplay& assign(const CImgDisplay &disp) { return assign(disp.width,disp.height); } // In-place version of the destructor (should not be used by the user). CImgDisplay& _assign() { return *this; } //! Display an image in a window. template CImgDisplay& display(const CImg& img) { fps_timer = 0*img.width; return *this; } //! Resize window CImgDisplay& resize(const int width, const int height, const bool redraw=true) { fps_timer = 0*width*height*(int)redraw; return *this; } //! Move window CImgDisplay& move(const int posx, const int posy) { fps_timer = 0*posx*posy; return *this; } //! Move mouse pointer to a specific location CImgDisplay& set_mouse(const int posx, const int posy) { fps_timer = 0*posx*posy; return *this; } //! Hide mouse pointer CImgDisplay& hide_mouse() { return *this; } //! Show mouse pointer CImgDisplay& show_mouse() { return *this; } //! Wait for a window event in any CImg window static void wait_all() {} //! Show a closed display CImgDisplay& show() { return *this; } //! Close a visible display CImgDisplay& close() { return *this; } //! Set the window title CImgDisplay& set_title(const char *format,...) { fps_timer = 0*(unsigned long)format; return *this; } //! Re-paint image content in window CImgDisplay& paint() { return *this; } //! Render image buffer into GDI native image format template CImgDisplay& render(const CImg& img) { fps_timer = 0*img.width; return *this; } // X11-based display //------------------- #elif cimg_display_type==1 void *data; Window window; Window background_window; XImage *image; Colormap colormap; Atom wm_delete_window, wm_delete_protocol; #ifdef cimg_use_xshm XShmSegmentInfo *shminfo; #endif static int screen_dimx() { int res = 0; if (!cimg::X11attr().display) { Display *disp = XOpenDisplay((std::getenv("DISPLAY") ? std::getenv("DISPLAY") : ":0.0")); if (!disp) throw CImgDisplayException("CImgDisplay::screen_dimx() : Can't open X11 display"); res = DisplayWidth(disp,DefaultScreen(disp)); XCloseDisplay(disp); } else { #ifdef cimg_use_xrandr if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution) res = cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].width; else #endif res = DisplayWidth(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)); } return res; } static int screen_dimy() { int res = 0; if (!cimg::X11attr().display) { Display *disp = XOpenDisplay((std::getenv("DISPLAY") ? std::getenv("DISPLAY") : ":0.0")); if (!disp) throw CImgDisplayException("CImgDisplay::screen_dimy() : Can't open X11 display"); res = DisplayHeight(disp,DefaultScreen(disp)); XCloseDisplay(disp); } else { #ifdef cimg_use_xrandr if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution) res = cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].height; else #endif res = DisplayHeight(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)); } return res; } CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) { if (!dimw || !dimh) throw CImgArgumentException("CImgDisplay::assign() : Specified window size (%u,%u) is not valid.",dimw,dimh); assign_lowlevel(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag); min = max = 0; std::memset(data,0,(cimg::X11attr().nb_bits==8?sizeof(unsigned char): (cimg::X11attr().nb_bits==16?sizeof(unsigned short):sizeof(unsigned int)))*width*height); return paint(); } template CImgDisplay& assign(const CImg& img, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) { if (img.is_empty()) throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input image (%u,%u,%u,%u,%p) is empty.", img.width,img.height,img.depth,img.dim,img.data); CImg tmp; const CImg& nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2)); assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag); if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; } return render(nimg).paint(); } template CImgDisplay& assign(const CImgList& list, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) { if (list.is_empty()) throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input list (%u,%p) is empty.", list.size,list.data); CImg tmp; const CImg img = list.get_append('x'), &nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2)); assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag); if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; } return render(nimg).paint(); } CImgDisplay& assign(const CImgDisplay& win) { assign_lowlevel(win.width,win.height,win.title,win.normalization,win.events,win.is_fullscreen,win.is_closed); std::memcpy(data,win.data,(cimg::X11attr().nb_bits==8?sizeof(unsigned char): cimg::X11attr().nb_bits==16?sizeof(unsigned short): sizeof(unsigned int))*width*height); return paint(); } CImgDisplay& _assign() { if (width && height) { pthread_mutex_lock(cimg::X11attr().mutex); // Remove display window from event thread list unsigned int i; for (i=0; ishmaddr); shmctl(shminfo->shmid,IPC_RMID,0); delete shminfo; shminfo = 0; } else #endif XDestroyImage(image); data = 0; image = 0; if (cimg::X11attr().nb_bits==8) XFreeColormap(cimg::X11attr().display,colormap); colormap = 0; XSync(cimg::X11attr().display, False); // Reset display variables if (title) delete[] title; width = height = normalization = events = 0; is_fullscreen = is_resized = is_moved = is_event = false; is_closed = true; title = 0; window_x = window_y = window_width = window_height = mouse_x = mouse_y = wheel = 0; std::memset((void*)buttons,0,256*sizeof(unsigned int)); std::memset((void*)keys,0,256*sizeof(unsigned int)); std::memset((void*)released_keys,0,256*sizeof(unsigned int)); min = max = 0; // End event thread and close display if necessary if (!cimg::X11attr().nb_wins) { // Kill event thread pthread_cancel(*cimg::X11attr().event_thread); pthread_mutex_unlock(cimg::X11attr().mutex); pthread_join(*cimg::X11attr().event_thread,0); delete cimg::X11attr().event_thread; cimg::X11attr().event_thread = 0; pthread_mutex_destroy(cimg::X11attr().mutex); delete cimg::X11attr().mutex; cimg::X11attr().mutex = 0; XSync(cimg::X11attr().display, False); XCloseDisplay(cimg::X11attr().display); cimg::X11attr().display=0; delete cimg::X11attr().gc; cimg::X11attr().gc = 0; } else pthread_mutex_unlock(cimg::X11attr().mutex); } return *this; } template CImgDisplay& display(const CImg& img) { return render(img).paint(false); } CImgDisplay& resize(const int nwidth, const int nheight, const bool redraw=true) { if (!(nwidth && nheight)) throw CImgArgumentException("CImgDisplay::resize() : Specified window size (%d,%d) is not valid.", nwidth,nheight); const unsigned int tmpdimx=(nwidth>0)?nwidth:(-nwidth*width/100), tmpdimy=(nheight>0)?nheight:(-nheight*height/100), dimx = tmpdimx?tmpdimx:1, dimy = tmpdimy?tmpdimy:1; const bool is_disp_different = (width!=dimx || height!=dimy), is_win_different = (window_width!=dimx || window_height!=dimy); if (is_disp_different || is_win_different) { pthread_mutex_lock(cimg::X11attr().mutex); XResizeWindow(cimg::X11attr().display,window,dimx,dimy); window_width = dimx; window_height = dimy; is_resized = false; if (is_disp_different) { switch (cimg::X11attr().nb_bits) { case 8: { unsigned char foo=0; _resize(foo,dimx,dimy,redraw); } break; case 16: { unsigned short foo=0; _resize(foo,dimx,dimy,redraw); } break; default: { unsigned int foo=0; _resize(foo,dimx,dimy,redraw); } break; } width = dimx; height = dimy; } pthread_mutex_unlock(cimg::X11attr().mutex); if (is_fullscreen) move((screen_dimx()-width)/2,(screen_dimy()-height)/2); if (redraw) return paint(); } return *this; } CImgDisplay& move(const int posx, const int posy) { show(); pthread_mutex_lock(cimg::X11attr().mutex); XMoveWindow(cimg::X11attr().display,window,posx,posy); is_moved = false; window_x = posx; window_y = posy; pthread_mutex_unlock(cimg::X11attr().mutex); return paint(); } CImgDisplay& set_mouse(const int posx, const int posy) { if (!is_closed && posx>=0 && posy>=0) { pthread_mutex_lock(cimg::X11attr().mutex); XWarpPointer(cimg::X11attr().display,None,window,0,0,0,0,posx,posy); is_moved = false; mouse_x = posx; mouse_y = posy; XSync(cimg::X11attr().display, False); pthread_mutex_unlock(cimg::X11attr().mutex); } return *this; } CImgDisplay& hide_mouse() { pthread_mutex_lock(cimg::X11attr().mutex); const char pix_data[8] = { 0 }; XColor col; col.red = col.green = col.blue = 0; Pixmap pix = XCreateBitmapFromData(cimg::X11attr().display,window,pix_data,8,8); Cursor cur = XCreatePixmapCursor(cimg::X11attr().display,pix,pix,&col,&col,0,0); XFreePixmap(cimg::X11attr().display,pix); XDefineCursor(cimg::X11attr().display,window,cur); pthread_mutex_unlock(cimg::X11attr().mutex); return *this; } CImgDisplay& show_mouse() { pthread_mutex_lock(cimg::X11attr().mutex); XDefineCursor(cimg::X11attr().display,window,None); pthread_mutex_unlock(cimg::X11attr().mutex); return *this; } static void wait_all() { pthread_mutex_lock(cimg::X11attr().mutex); bool flag = true; XEvent event; while (flag) { for (unsigned int i=0; iis_event = false; const unsigned int xevent_type = (cimg::X11attr().wins[i]->events)&3; const unsigned int emask = ((xevent_type>=1)?ExposureMask|StructureNotifyMask:0)| ((xevent_type>=2)?ButtonPressMask|KeyPressMask|PointerMotionMask|LeaveWindowMask:0)| ((xevent_type>=3)?ButtonReleaseMask|KeyReleaseMask:0); XSelectInput(cimg::X11attr().display,cimg::X11attr().wins[i]->window,emask); } XNextEvent(cimg::X11attr().display, &event); for (unsigned int i=0; iis_closed && event.xany.window==cimg::X11attr().wins[i]->window) { cimg::X11attr().wins[i]->_handle_events(&event); if (cimg::X11attr().wins[i]->is_event) flag = false; } } pthread_mutex_unlock(cimg::X11attr().mutex); } CImgDisplay& show() { if (is_closed) { pthread_mutex_lock(cimg::X11attr().mutex); if (is_fullscreen) _init_fullscreen(); _map_window(); is_closed = false; pthread_mutex_unlock(cimg::X11attr().mutex); } return paint(); } CImgDisplay& close() { if (!is_closed) { pthread_mutex_lock(cimg::X11attr().mutex); if (is_fullscreen) _desinit_fullscreen(); XUnmapWindow(cimg::X11attr().display,window); window_x = window_y = -1; is_closed = true; pthread_mutex_unlock(cimg::X11attr().mutex); } return *this; } CImgDisplay& set_title(const char *format,...) { char tmp[1024]={0}; va_list ap; va_start(ap, format); std::vsprintf(tmp,format,ap); va_end(ap); if (title) delete[] title; const int s = cimg::strlen(tmp)+1; title = new char[s]; std::memcpy(title,tmp,s*sizeof(char)); pthread_mutex_lock(cimg::X11attr().mutex); XStoreName(cimg::X11attr().display,window,tmp); pthread_mutex_unlock(cimg::X11attr().mutex); return *this; } CImgDisplay& paint(const bool wait_expose=true) { pthread_mutex_lock(cimg::X11attr().mutex); _paint(wait_expose); pthread_mutex_unlock(cimg::X11attr().mutex); return *this; } template CImgDisplay& render(const CImg& img, const bool flag8=false) { if (img.is_empty()) throw CImgArgumentException("CImgDisplay::_render_image() : Specified input image (%u,%u,%u,%u,%p) is empty.", img.width,img.height,img.depth,img.dim,img.data); if (img.depth!=1) return render(img.get_projections2d(img.width/2,img.height/2,img.depth/2)); if (cimg::X11attr().nb_bits==8 && (img.width!=width || img.height!=height)) return render(img.get_resize(width,height,1,-100,1)); if (cimg::X11attr().nb_bits==8 && !flag8 && img.dim==3) return render(img.get_RGBtoLUT(true),true); const unsigned int xymax = img.width*img.height; const T *data1 = img.ptr(), *data2 = (img.dim>=2)?img.ptr(0,0,0,1):data1, *data3 = (img.dim>=3)?img.ptr(0,0,0,2):data1; if (cimg::X11attr().blue_first) cimg::swap(data1,data3); pthread_mutex_lock(cimg::X11attr().mutex); if (!normalization || (normalization==3 && cimg::type::id()==cimg::type::id())) { min = max = 0; switch (cimg::X11attr().nb_bits) { case 8: { _set_colormap(colormap,img.dim); unsigned char *const ndata = (img.width==width && img.height==height)?(unsigned char*)data:new unsigned char[img.width*img.height]; unsigned char *ptrd = (unsigned char*)ndata; switch (img.dim) { case 1: for (unsigned int xy=0; xy>4); } break; default: for (unsigned int xy=0; xy>5)<<2) | (B>>6); } break; } if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned char*)data,width,height); delete[] ndata; } } break; case 16: { unsigned short *const ndata = (img.width==width && img.height==height)?(unsigned short*)data:new unsigned short[img.width*img.height]; unsigned char *ptrd = (unsigned char*)ndata; const unsigned int M = 248; if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy>2; *(ptrd++) = (unsigned char)*(data1++)&M | (G>>3); *(ptrd++) = (G<<5) | ((unsigned char)*(data3++)>>3); } else for (unsigned int xy=0; xy>2; *(ptrd++) = (G<<5) | ((unsigned char)*(data3++)>>3); *(ptrd++) = (unsigned char)*(data1++)&M | (G>>3); } if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned short*)data,width,height); delete[] ndata; } } break; default: { unsigned int *const ndata = (img.width==width && img.height==height)?(unsigned int*)data:new unsigned int[img.width*img.height]; unsigned char *ptrd = (unsigned char*)ndata; if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy::is_float()) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; } else { min = (float)cimg::type::min(); max = (float)cimg::type::max(); } } else if ((min>max) || normalization==1) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; } const float delta = max-min, mm = delta?delta:1.0f; switch (cimg::X11attr().nb_bits) { case 8: { _set_colormap(colormap,img.dim); unsigned char *const ndata = (img.width==width && img.height==height)?(unsigned char*)data:new unsigned char[img.width*img.height]; unsigned char *ptrd = (unsigned char*)ndata; switch (img.dim) { case 1: for (unsigned int xy=0; xy>4); } break; default: for (unsigned int xy=0; xy>5)<<2) | (B>>6); } break; } if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned char*)data,width,height); delete[] ndata; } } break; case 16: { unsigned short *const ndata = (img.width==width && img.height==height)?(unsigned short*)data:new unsigned short[img.width*img.height]; unsigned char *ptrd = (unsigned char*)ndata; const unsigned int M = 248; if (cimg::X11attr().byte_order) for (unsigned int xy=0; xy>2; *(ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm)&M | (G>>3); *(ptrd++) = (G<<5) | ((unsigned char)(255*(*(data3++)-min)/mm)>>3); } else for (unsigned int xy=0; xy>2; *(ptrd++) = (G<<5) | ((unsigned char)(255*(*(data3++)-min)/mm)>>3); *(ptrd++) = (unsigned char)(255*(*(data1++)-min)/mm)&M | (G>>3); } if (ndata!=data) { _render_resize(ndata,img.width,img.height,(unsigned short*)data,width,height); delete[] ndata; } } break; default: { unsigned int *const ndata = (img.width==width && img.height==height)?(unsigned int*)data:new unsigned int[img.width*img.height]; unsigned char *ptrd = (unsigned char*)ndata; if (cimg::X11attr().byte_order) for (unsigned int xy=0; xyred_maskblue_mask) cimg::X11attr().blue_first = true; cimg::X11attr().byte_order = ImageByteOrder(cimg::X11attr().display); pthread_mutex_lock(cimg::X11attr().mutex); cimg::X11attr().event_thread = new pthread_t; pthread_create(cimg::X11attr().event_thread,0,_events_thread,0); } else pthread_mutex_lock(cimg::X11attr().mutex); // Set display variables width = dimw; height = dimh; normalization = normalization_type%4; events = events_type%4; is_fullscreen = fullscreen_flag; title = tmp_title; window_x = window_y = wheel = 0; mouse_x = mouse_y = -1; std::memset((void*)buttons,0,256*sizeof(unsigned int)); std::memset((void*)keys,0,256*sizeof(unsigned int)); std::memset((void*)released_keys,0,256*sizeof(unsigned int)); is_resized = is_moved = is_event = false; is_closed = closed_flag; fps_timer = fps_frames = timer = 0; fps_fps = 0; // Create X11 window and palette (if 8bits display) if (is_fullscreen) { _init_fullscreen(); const unsigned int sx = screen_dimx(), sy = screen_dimy(); XSetWindowAttributes winattr; winattr.override_redirect = True; window = XCreateWindow(cimg::X11attr().display, RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)), (sx-width)/2,(sy-height)/2, width,height,0,0,InputOutput,CopyFromParent,CWOverrideRedirect,&winattr); } else window = XCreateSimpleWindow(cimg::X11attr().display, RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)), 0,0,width,height,2,0,0x0L); XStoreName(cimg::X11attr().display,window,title?title:" "); if (cimg::X11attr().nb_bits==8) { colormap = XCreateColormap(cimg::X11attr().display,window,DefaultVisual(cimg::X11attr().display, DefaultScreen(cimg::X11attr().display)),AllocAll); _set_colormap(colormap,3); XSetWindowColormap(cimg::X11attr().display,window,colormap); } window_width = width; window_height = height; // Create XImage const unsigned int bufsize = width*height*(cimg::X11attr().nb_bits==8?1:(cimg::X11attr().nb_bits==16?2:4)); #ifdef cimg_use_xshm shminfo = 0; if (XShmQueryExtension(cimg::X11attr().display)) { shminfo = new XShmSegmentInfo; image = XShmCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)), cimg::X11attr().nb_bits,ZPixmap,0,shminfo,width,height); if (!image) { delete shminfo; shminfo = 0; } else { shminfo->shmid = shmget(IPC_PRIVATE, bufsize, IPC_CREAT | 0777); if (shminfo->shmid==-1) { XDestroyImage(image); delete shminfo; shminfo = 0; } else { shminfo->shmaddr = image->data = (char*)(data = shmat(shminfo->shmid,0,0)); if (shminfo->shmaddr==(char*)-1) { XDestroyImage(image); shmctl(shminfo->shmid,IPC_RMID,0); delete shminfo; shminfo = 0; } shminfo->readOnly = False; cimg::X11attr().shm_enabled = true; XErrorHandler oldXErrorHandler = XSetErrorHandler(_assign_lowlevel_xshm); XShmAttach(cimg::X11attr().display, shminfo); XSync(cimg::X11attr().display, False); XSetErrorHandler(oldXErrorHandler); if (!cimg::X11attr().shm_enabled) { XDestroyImage(image); shmdt(shminfo->shmaddr); shmctl(shminfo->shmid,IPC_RMID,0); delete shminfo; shminfo = 0; } } } } if (!shminfo) #endif { data = std::malloc(bufsize); image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)), cimg::X11attr().nb_bits,ZPixmap,0,(char*)data,width,height,8,0); } if (!is_closed) _map_window(); else { window_x = window_y = cimg::type::min(); } if (events) { wm_delete_window = XInternAtom(cimg::X11attr().display, "WM_DELETE_WINDOW", False); wm_delete_protocol = XInternAtom(cimg::X11attr().display, "WM_PROTOCOLS", False); XSetWMProtocols(cimg::X11attr().display, window, &wm_delete_window, 1); if (is_fullscreen) XGrabKeyboard(cimg::X11attr().display, window, True, GrabModeAsync, GrabModeAsync, CurrentTime); } cimg::X11attr().wins[cimg::X11attr().nb_wins++]=this; pthread_mutex_unlock(cimg::X11attr().mutex); } void _map_window() { XWindowAttributes attr; XEvent event; XSelectInput(cimg::X11attr().display,window,ExposureMask | StructureNotifyMask); bool exposed = false, mapped = false; XMapRaised(cimg::X11attr().display,window); XSync(cimg::X11attr().display,False); do { XWindowEvent(cimg::X11attr().display,window,StructureNotifyMask | ExposureMask,&event); switch (event.type) { case MapNotify: mapped = true; break; case Expose: exposed = true; break; default: XSync(cimg::X11attr().display, False); cimg::sleep(10); } } while (!(exposed && mapped)); do { XGetWindowAttributes(cimg::X11attr().display, window, &attr); if (attr.map_state!=IsViewable) { XSync(cimg::X11attr().display,False); cimg::sleep(10); } } while (attr.map_state != IsViewable); window_x = attr.x; window_y = attr.y; } void _set_colormap(Colormap& colormap, const unsigned int dim) { XColor palette[256]; switch (dim) { case 1: // palette for greyscale images for (unsigned int index=0; index<256; index++) { palette[index].pixel = index; palette[index].red = palette[index].green = palette[index].blue = index<<8; palette[index].flags = DoRed | DoGreen | DoBlue; } break; case 2: // palette for RG images for (unsigned int index=0, r=8; r<256; r+=16) for (unsigned int g=8; g<256; g+=16) { palette[index].pixel = index; palette[index].red = palette[index].blue = r<<8; palette[index].green = g<<8; palette[index++].flags = DoRed | DoGreen | DoBlue; } break; default: // palette for RGB images for (unsigned int index=0, r=16; r<256; r+=32) for (unsigned int g=16; g<256; g+=32) for (unsigned int b=32; b<256; b+=64) { palette[index].pixel = index; palette[index].red = r<<8; palette[index].green = g<<8; palette[index].blue = b<<8; palette[index++].flags = DoRed | DoGreen | DoBlue; } break; } XStoreColors(cimg::X11attr().display,colormap,palette,256); } void _paint(const bool wait_expose=true) { if (!is_closed) { if (wait_expose) { static XEvent event; event.xexpose.type = Expose; event.xexpose.serial = 0; event.xexpose.send_event = True; event.xexpose.display = cimg::X11attr().display; event.xexpose.window = window; event.xexpose.x = 0; event.xexpose.y = 0; event.xexpose.width = (int)width; event.xexpose.height = (int)height; event.xexpose.count = 0; XSendEvent(cimg::X11attr().display, window, False, 0, &event); } else { #if cimg_use_xshm if (shminfo) XShmPutImage(cimg::X11attr().display,window,*cimg::X11attr().gc,image,0,0,0,0,width,height,False); else #endif XPutImage(cimg::X11attr().display,window,*cimg::X11attr().gc,image,0,0,0,0,width,height); XSync(cimg::X11attr().display, False); } } } template void _resize(T foo, const unsigned int ndimx, const unsigned int ndimy, const bool redraw) { foo = 0; #ifdef cimg_use_xshm if (shminfo) { XShmSegmentInfo *nshminfo = new XShmSegmentInfo; XImage *nimage = XShmCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)), cimg::X11attr().nb_bits,ZPixmap,0,nshminfo,ndimx,ndimy); nshminfo->shmid = shmget(IPC_PRIVATE, ndimx*ndimy*sizeof(T), IPC_CREAT | 0777); nshminfo->shmaddr = nimage->data = (char*)shmat(nshminfo->shmid,0,0); nshminfo->readOnly = False; XShmAttach(cimg::X11attr().display, nshminfo); XSync(cimg::X11attr().display, False); T *const ndata = (T*)nimage->data; if (redraw) _render_resize((T*)data,width,height,ndata,ndimx,ndimy); else std::memset(ndata,0,sizeof(T)*ndimx*ndimy); XShmDetach(cimg::X11attr().display, shminfo); XDestroyImage(image); shmdt(shminfo->shmaddr); shmctl(shminfo->shmid,IPC_RMID,0); delete shminfo; shminfo = nshminfo; image = nimage; data = (void*)ndata; } else #endif { T *ndata = (T*)std::malloc(ndimx*ndimy*sizeof(T)); if (redraw) _render_resize((T*)data,width,height,ndata,ndimx,ndimy); else std::memset(ndata,0,sizeof(T)*ndimx*ndimy); data = (void*)ndata; XDestroyImage(image); image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)), cimg::X11attr().nb_bits,ZPixmap,0,(char*)data,ndimx,ndimy,8,0); } } void _init_fullscreen() { background_window = 0; if (is_fullscreen && !is_closed) { #ifdef cimg_use_xrandr int foo; if (XRRQueryExtension(cimg::X11attr().display,&foo,&foo)) { XRRRotations(cimg::X11attr().display, DefaultScreen(cimg::X11attr().display), &cimg::X11attr().curr_rotation); if (!cimg::X11attr().resolutions) { cimg::X11attr().resolutions = XRRSizes(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display),&foo); cimg::X11attr().nb_resolutions = (unsigned int)foo; } if (cimg::X11attr().resolutions) { cimg::X11attr().curr_resolution = 0; for (unsigned int i=0; i=width && nh>=height && nw<=(unsigned int)(cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].width) && nh<=(unsigned int)(cimg::X11attr().resolutions[cimg::X11attr().curr_resolution].height)) cimg::X11attr().curr_resolution = i; } if (cimg::X11attr().curr_resolution>0) { XRRScreenConfiguration *config = XRRGetScreenInfo(cimg::X11attr().display, DefaultRootWindow(cimg::X11attr().display)); XRRSetScreenConfig(cimg::X11attr().display, config, DefaultRootWindow(cimg::X11attr().display), cimg::X11attr().curr_resolution, cimg::X11attr().curr_rotation, CurrentTime); XRRFreeScreenConfigInfo(config); XSync(cimg::X11attr().display, False); } } } cimg::warn(!cimg::X11attr().resolutions,"CImgDisplay::_create_window() : Xrandr extension is not supported by the X server."); #endif const unsigned int sx = screen_dimx(), sy = screen_dimy(); XSetWindowAttributes winattr; winattr.override_redirect = True; if (sx!=width || sy!=height) { background_window = XCreateWindow(cimg::X11attr().display, RootWindow(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)),0,0, sx,sy,0,0,InputOutput,CopyFromParent,CWOverrideRedirect,&winattr); const unsigned int bufsize = sx*sy*(cimg::X11attr().nb_bits==8?1:(cimg::X11attr().nb_bits==16?2:4)); void *background_data = std::malloc(bufsize); std::memset(background_data,0,bufsize); XImage *background_image = XCreateImage(cimg::X11attr().display,DefaultVisual(cimg::X11attr().display,DefaultScreen(cimg::X11attr().display)), cimg::X11attr().nb_bits,ZPixmap,0,(char*)background_data,sx,sy,8,0); XEvent event; XSelectInput(cimg::X11attr().display,background_window,StructureNotifyMask); XMapRaised(cimg::X11attr().display,background_window); do XWindowEvent(cimg::X11attr().display,background_window,StructureNotifyMask,&event); while (event.type!=MapNotify); XPutImage(cimg::X11attr().display,background_window,*cimg::X11attr().gc,background_image,0,0,0,0,sx,sy); XWindowAttributes attr; XGetWindowAttributes(cimg::X11attr().display, background_window, &attr); while (attr.map_state != IsViewable) XSync(cimg::X11attr().display, False); XDestroyImage(background_image); } } } void _desinit_fullscreen() { if (is_fullscreen) { XUngrabKeyboard(cimg::X11attr().display,CurrentTime); #if cimg_use_xrandr if (cimg::X11attr().resolutions && cimg::X11attr().curr_resolution) { XRRScreenConfiguration *config = XRRGetScreenInfo(cimg::X11attr().display, DefaultRootWindow(cimg::X11attr().display)); XRRSetScreenConfig(cimg::X11attr().display, config, DefaultRootWindow(cimg::X11attr().display), 0, cimg::X11attr().curr_rotation, CurrentTime); XRRFreeScreenConfigInfo(config); XSync(cimg::X11attr().display, False); cimg::X11attr().curr_resolution = 0; } #endif if (background_window) XDestroyWindow(cimg::X11attr().display,background_window); background_window = 0; is_fullscreen = false; } } void _handle_events(const XEvent *const pevent) { XEvent event=*pevent; switch (event.type) { case ClientMessage: if ((int)event.xclient.message_type==(int)wm_delete_protocol && (int)event.xclient.data.l[0]==(int)wm_delete_window) { XUnmapWindow(cimg::X11attr().display,window); mouse_x = mouse_y = -1; std::memmove((void*)(buttons+1),(void*)buttons,255); std::memmove((void*)(keys+1),(void*)keys,255); if (key) { std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = key; } key = button = 0; is_closed = is_event = true; } break; case ConfigureNotify: { while (XCheckWindowEvent(cimg::X11attr().display,window,StructureNotifyMask,&event)); const unsigned int nw = event.xconfigure.width, nh = event.xconfigure.height; const int nx = event.xconfigure.x, ny = event.xconfigure.y; if (nw && nh && (nw!=window_width || nh!=window_height)) { window_width = nw; window_height = nh; mouse_x = mouse_y = -1; XResizeWindow(cimg::X11attr().display,window,window_width,window_height); is_resized = is_event = true; } if (nx!=window_x || ny!=window_y) { window_x = nx; window_y = ny; is_moved = is_event = true; } } break; case Expose: { while (XCheckWindowEvent(cimg::X11attr().display,window,ExposureMask,&event)); _paint(false); if (is_fullscreen) { XWindowAttributes attr; XGetWindowAttributes(cimg::X11attr().display, window, &attr); while (attr.map_state != IsViewable) XSync(cimg::X11attr().display, False); XSetInputFocus(cimg::X11attr().display, window, RevertToParent, CurrentTime); } } break; case ButtonPress: { do { switch (event.xbutton.button) { case 1: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=1; is_event = true; break; case 2: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=4; is_event = true; break; case 3: std::memmove((void*)(buttons+1),(void*)buttons,255); button|=2; is_event = true; break; default: break; } } while (XCheckWindowEvent(cimg::X11attr().display,window,ButtonPressMask,&event)); } break; case ButtonRelease: { do { switch (event.xbutton.button) { case 1: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~1U; is_event = true; break; case 2: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~4U; is_event = true; break; case 3: std::memmove((void*)(buttons+1),(void*)buttons,255); button&=~2U; is_event = true; break; case 4: wheel++; is_event = true; break; case 5: wheel--; is_event = true; break; default: break; } } while (XCheckWindowEvent(cimg::X11attr().display,window,ButtonReleaseMask,&event)); } break; case KeyPress: { char tmp; KeySym ksym; XLookupString(&event.xkey,&tmp,1,&ksym,0); std::memmove((void*)(keys+1),(void*)keys,255); key = (unsigned int)ksym; std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = 0; is_event = true; } break; case KeyRelease: { char tmp; KeySym ksym; XLookupString(&event.xkey,&tmp,1,&ksym,0); std::memmove((void*)(keys+1),(void*)keys,255); key = 0; std::memmove((void*)(released_keys+1),(void*)released_keys,255); released_key = (unsigned int)ksym; is_event = true; } break; case LeaveNotify: while (XCheckWindowEvent(cimg::X11attr().display,window,LeaveWindowMask,&event)); mouse_x = mouse_y =-1; is_event = true; break; case MotionNotify: while (XCheckWindowEvent(cimg::X11attr().display,window,PointerMotionMask,&event)); mouse_x = event.xmotion.x; mouse_y = event.xmotion.y; if (mouse_x<0 || mouse_y<0 || mouse_x>=dimx() || mouse_y>=dimy()) mouse_x = mouse_y = -1; is_event = true; break; } } static void* _events_thread(void *arg) { arg = 0; XEvent event; pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,0); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0); for (;;) { pthread_mutex_lock(cimg::X11attr().mutex); for (unsigned int i=0; ievents)&3; const unsigned int emask = ((xevent_type>=1)?ExposureMask|StructureNotifyMask:0)| ((xevent_type>=2)?ButtonPressMask|KeyPressMask|PointerMotionMask|LeaveWindowMask:0)| ((xevent_type>=3)?ButtonReleaseMask|KeyReleaseMask:0); XSelectInput(cimg::X11attr().display,cimg::X11attr().wins[i]->window,emask); } bool event_flag = XCheckTypedEvent(cimg::X11attr().display, ClientMessage, &event); if (!event_flag) event_flag = XCheckMaskEvent(cimg::X11attr().display, ExposureMask|StructureNotifyMask|ButtonPressMask| KeyPressMask|PointerMotionMask|LeaveWindowMask|ButtonReleaseMask| KeyReleaseMask,&event); if (event_flag) { for (unsigned int i=0; iis_closed && event.xany.window==cimg::X11attr().wins[i]->window) cimg::X11attr().wins[i]->_handle_events(&event); } pthread_mutex_unlock(cimg::X11attr().mutex); pthread_testcancel(); cimg::sleep(7); } return 0; } // Windows-based display //----------------------- #elif cimg_display_type==2 CLIENTCREATESTRUCT ccs; BITMAPINFO bmi; unsigned int *data; DEVMODE curr_mode; HWND window; HWND background_window; HDC hdc; HANDLE thread; HANDLE created; HANDLE mutex; bool visible_cursor; static int screen_dimx() { DEVMODE mode; mode.dmSize = sizeof(DEVMODE); mode.dmDriverExtra = 0; EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&mode); return mode.dmPelsWidth; } static int screen_dimy() { DEVMODE mode; mode.dmSize = sizeof(DEVMODE); mode.dmDriverExtra = 0; EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&mode); return mode.dmPelsHeight; } CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) { if (!dimw || !dimh) throw CImgArgumentException("CImgDisplay::assign() : Specified window size (%u,%u) is not valid.",dimw,dimh); assign_lowlevel(dimw,dimh,title,normalization_type,events_type,fullscreen_flag,closed_flag); min = max = 0; std::memset(data,0,sizeof(unsigned int)*width*height); return paint(); } template CImgDisplay& assign(const CImg& img, const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) { if (img.is_empty()) throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input image (%u,%u,%u,%u,%p) is empty.", img.width,img.height,img.depth,img.dim,img.data); CImg tmp; const CImg& nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2)); assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag); if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; } return display(nimg); } template CImgDisplay& assign(const CImgList& list,const char *title=0, const unsigned int normalization_type=3, const unsigned int events_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) { if (list.is_empty()) throw CImgArgumentException("CImgDisplay::CImgDisplay() : Specified input list (%u,%p) is empty.", list.size,list.data); CImg tmp; const CImg img = list.get_append('x'), &nimg = (img.depth==1)?img:(tmp=img.get_projections2d(img.width/2,img.height/2,img.depth/2)); assign_lowlevel(nimg.width,nimg.height,title,normalization_type,events_type,fullscreen_flag,closed_flag); if (normalization==2) { const CImgStats st(nimg,false); min = (float)st.min; max = (float)st.max; } return display(nimg); } CImgDisplay& assign(const CImgDisplay& win) { assign_lowlevel(win.width,win.height,win.title,win.normalization,win.events,win.is_fullscreen,win.is_closed); std::memcpy(data,win.data,sizeof(unsigned int)*width*height); return paint(); } CImgDisplay& _assign() { DestroyWindow(window); if (events) TerminateThread(thread,0); if (data) delete[] data; if (title) delete[] title; if (is_fullscreen) _desinit_fullscreen(); width = height = normalization = events = 0; is_fullscreen = is_resized = is_moved = is_event = false; is_closed = true; title = 0; window_x = window_y = window_width = window_height = mouse_x = mouse_y = wheel = 0; std::memset((void*)buttons,0,256*sizeof(unsigned int)); std::memset((void*)keys,0,256*sizeof(unsigned int)); std::memset((void*)released_keys,0,256*sizeof(unsigned int)); min = max = 0; return *this; } template CImgDisplay& display(const CImg& img) { return render(img).paint(); } CImgDisplay& resize(const int nwidth, const int nheight, const bool redraw=true) { if (!(nwidth && nheight)) throw CImgArgumentException("CImgDisplay::resize() : Specified window size (%d,%d) is not valid.", nwidth,nheight); const unsigned int tmpdimx=(nwidth>0)?nwidth:(-nwidth*width/100), tmpdimy=(nheight>0)?nheight:(-nheight*height/100), dimx = tmpdimx?tmpdimx:1, dimy = tmpdimy?tmpdimy:1; const bool is_disp_different = (width!=dimx || height!=dimy), is_win_different = (window_width!=dimx || window_height!=dimy); if (is_disp_different || is_win_different) { RECT rect; rect.left=rect.top=0; rect.right = dimx-1; rect.bottom = dimy-1; AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false); const int cwidth = rect.right-rect.left+1, cheight = rect.bottom-rect.top+1; SetWindowPos(window,0,0,0,cwidth,cheight,SWP_NOMOVE | SWP_NOZORDER | SWP_NOCOPYBITS); window_width = dimx; window_height = dimy; is_resized = false; if (is_disp_different) { unsigned int *ndata = new unsigned int[dimx*dimy]; if (redraw) _render_resize(data,width,height,ndata,dimx,dimy); else std::memset(ndata,0x80,sizeof(unsigned int)*dimx*dimy); delete[] data; data = ndata; bmi.bmiHeader.biWidth = dimx; bmi.bmiHeader.biHeight = -(int)dimy; width = dimx; height = dimy; } if (is_fullscreen) move((screen_dimx()-width)/2,(screen_dimy()-height)/2); if (redraw) return paint(); } return *this; } CImgDisplay& move(const int posx,const int posy) { if (!is_fullscreen) { RECT rect; rect.left=rect.top=0; rect.right=window_width-1; rect.bottom=window_height-1; AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false); const int border1 = (rect.right-rect.left+1-width)/2, border2 = rect.bottom-rect.top+1-height-border1; SetWindowPos(window,0,posx-border1,posy-border2,0,0,SWP_NOSIZE | SWP_NOZORDER); } else SetWindowPos(window,0,posx,posy,0,0,SWP_NOSIZE | SWP_NOZORDER); window_x = posx; window_y = posy; is_moved = false; return show(); } // Internal routine to retrieve the position of the current window. CImgDisplay& _update_window_pos() { if (!is_closed) { RECT rect; rect.left = rect.top = 0; rect.right = width-1; rect.bottom = height-1; AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false); const int border1 = (rect.right-rect.left+1-width)/2, border2 = rect.bottom-rect.top+1-height-border1; GetWindowRect(window,&rect); window_x = rect.left + border1; window_y = rect.top + border2; } else window_x = window_y = -1; return *this; } CImgDisplay& set_mouse(const int posx, const int posy) { if (!is_closed && posx>=0 && posy>=0) { _update_window_pos(); SetCursorPos(window_x+posx,window_y+posy); mouse_x = posx; mouse_y = posy; } return *this; } CImgDisplay& hide_mouse() { visible_cursor = false; ShowCursor(FALSE); SendMessage(window,WM_SETCURSOR,0,0); return *this; } CImgDisplay& show_mouse() { visible_cursor = true; ShowCursor(TRUE); SendMessage(window,WM_SETCURSOR,0,0); return *this; } static void wait_all() { WaitForSingleObject(cimg::Win32attr().wait_event,INFINITE); } CImgDisplay& show() { if (is_closed) { is_closed = false; if (is_fullscreen) _init_fullscreen(); ShowWindow(window,SW_SHOW); _update_window_pos(); } return paint(); } CImgDisplay& close() { if (!is_closed && !is_fullscreen) { if (is_fullscreen) _desinit_fullscreen(); ShowWindow(window,SW_HIDE); is_closed = true; window_x = window_y = 0; } return *this; } CImgDisplay& set_title(const char *format,...) { char tmp[1024]={0}; va_list ap; va_start(ap, format); std::vsprintf(tmp,format,ap); va_end(ap); if (title) delete[] title; const int s = cimg::strlen(tmp)+1; title = new char[s]; std::memcpy(title,tmp,s*sizeof(char)); SetWindowTextA(window, tmp); return *this; } CImgDisplay& paint() { if (!is_closed) { WaitForSingleObject(mutex,INFINITE); SetDIBitsToDevice(hdc,0,0,width,height,0,0,0,height,data,&bmi,DIB_RGB_COLORS); ReleaseMutex(mutex); } return *this; } template CImgDisplay& render(const CImg& img) { if (img.is_empty()) throw CImgArgumentException("CImgDisplay::_render_image() : Specified input image (%u,%u,%u,%u,%p) is empty.", img.width,img.height,img.depth,img.dim,img.data); if (img.depth!=1) return render(img.get_projections2d(img.width/2,img.height/2,img.depth/2)); const T *data1 = img.ptr(), *data2 = (img.dim>=2)?img.ptr(0,0,0,1):data1, *data3 = (img.dim>=3)?img.ptr(0,0,0,2):data1; WaitForSingleObject(mutex,INFINITE); unsigned int *const ndata = (img.width==width && img.height==height)?data:new unsigned int[img.width*img.height], *ptrd = ndata; if (!normalization || (normalization==3 && cimg::type::id()==cimg::type::id())) { min = max = 0; for (unsigned int xy = img.width*img.height; xy>0; xy--) *(ptrd++) = ((unsigned char)*(data1++)<<16) | ((unsigned char)*(data2++)<<8) | (unsigned char)*(data3++); } else { if (normalization==3) { if (cimg::type::is_float()) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; } else { min = (float)cimg::type::min(); max = (float)cimg::type::max(); } } else if ((min>max) || normalization==1) { const CImgStats st(img,false); min = (float)st.min; max = (float)st.max; } const float delta = max-min, mm = delta?delta:1.0f; for (unsigned int xy = img.width*img.height; xy>0; xy--) { const unsigned char R = (unsigned char)(255*(*(data1++)-min)/mm), G = (unsigned char)(255*(*(data2++)-min)/mm), B = (unsigned char)(255*(*(data3++)-min)/mm); *(ptrd++) = (R<<16) | (G<<8) | (B); } } if (ndata!=data) { _render_resize(ndata,img.width,img.height,data,width,height); delete[] ndata; } ReleaseMutex(mutex); return *this; } CImgDisplay& assign_lowlevel(const unsigned int dimw,const unsigned int dimh,const char *ptitle=0, const unsigned int normalization_type=3,const unsigned int events_type=3, const bool fullscreen_flag=false,const bool closed_flag=false) { // Allocate space for window title const int s = cimg::strlen(ptitle)+1; char *tmp_title = s?new char[s]:0; if (s) std::memcpy(tmp_title,ptitle,s*sizeof(char)); // Destroy previous window if existing if (width && height) _assign(); // Set display variables width = dimw; height = dimh; normalization = normalization_type%4; events = events_type%4; is_fullscreen = fullscreen_flag; title = tmp_title; window_x = window_y = wheel = 0; mouse_x = mouse_y = -1; std::memset((void*)buttons,0,256*sizeof(unsigned int)); std::memset((void*)keys,0,256*sizeof(unsigned int)); std::memset((void*)released_keys,0,256*sizeof(unsigned int)); is_resized = is_moved = is_event = false; is_closed = closed_flag; fps_timer = fps_frames = timer = 0; fps_fps = 0; visible_cursor = true; if (is_fullscreen) _init_fullscreen(); // Create event thread void *arg = (void*)(new void*[2]); ((void**)arg)[0]=(void*)this; ((void**)arg)[1]=(void*)title; if (events) { unsigned long ThreadID = 0; mutex = CreateMutex(0,FALSE,0); created = CreateEvent(0,FALSE,FALSE,0); thread = CreateThread(0,0,_events_thread,arg,0,&ThreadID); WaitForSingleObject(created,INFINITE); } else _events_thread(arg); return *this; } static LRESULT APIENTRY _handle_events(HWND window,UINT msg,WPARAM wParam,LPARAM lParam) { #ifdef _WIN64 CImgDisplay* disp = (CImgDisplay*)GetWindowLongPtr(window,GWLP_USERDATA); #else CImgDisplay* disp = (CImgDisplay*)GetWindowLong(window,GWL_USERDATA); #endif MSG st_msg; switch(msg) { case WM_CLOSE: disp->mouse_x = disp->mouse_y = -1; disp->window_x = disp->window_y = 0; std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255); std::memmove((void*)(disp->keys+1),(void*)disp->keys,255); if (disp->key) { std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255); disp->released_key = disp->key; } disp->key = disp->button = 0; disp->is_closed=true; ReleaseMutex(disp->mutex); ShowWindow(disp->window,SW_HIDE); disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); return 0; case WM_SIZE: { while (PeekMessage(&st_msg,window,WM_SIZE,WM_SIZE,PM_REMOVE)); WaitForSingleObject(disp->mutex,INFINITE); const unsigned int nw = LOWORD(lParam),nh = HIWORD(lParam); if (nw && nh && (nw!=disp->width || nh!=disp->height)) { disp->window_width = nw; disp->window_height = nh; disp->mouse_x = disp->mouse_y = -1; disp->is_resized = disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); } ReleaseMutex(disp->mutex); } break; case WM_MOVE: { while (PeekMessage(&st_msg,window,WM_SIZE,WM_SIZE,PM_REMOVE)); WaitForSingleObject(disp->mutex,INFINITE); const int nx = (int)(short)(LOWORD(lParam)), ny = (int)(short)(HIWORD(lParam)); if (nx!=disp->window_x || ny!=disp->window_y) { disp->window_x = nx; disp->window_y = ny; disp->is_moved = disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); } ReleaseMutex(disp->mutex); } break; case WM_PAINT: disp->paint(); break; } if (disp->events>=2) switch(msg) { case WM_KEYDOWN: std::memmove((void*)(disp->keys+1),(void*)disp->keys,255); disp->key = (int)wParam; std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255); disp->released_key = 0; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); break; case WM_MOUSEMOVE: { while (PeekMessage(&st_msg,window,WM_MOUSEMOVE,WM_MOUSEMOVE,PM_REMOVE)); disp->mouse_x = LOWORD(lParam); disp->mouse_y = HIWORD(lParam); if (disp->mouse_x<0 || disp->mouse_y<0 || disp->mouse_x>=disp->dimx() || disp->mouse_y>=disp->dimy()) disp->mouse_x=disp->mouse_y=-1; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); } break; case WM_LBUTTONDOWN: std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255); disp->button|=1U; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); break; case WM_RBUTTONDOWN: std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255); disp->button|=2U; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); break; case WM_MBUTTONDOWN: std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255); disp->button|=4U; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); break; case 0x020A: // WM_MOUSEWHEEL: disp->wheel+=(int)((short)HIWORD(wParam))/120; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); } if (disp->events>=3) switch(msg) { case WM_KEYUP: std::memmove((void*)(disp->keys+1),(void*)disp->keys,255); disp->key = 0; std::memmove((void*)(disp->released_keys+1),(void*)disp->released_keys,255); disp->released_key = (int)wParam; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); break; case WM_LBUTTONUP: std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255); disp->button&=~1U; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); break; case WM_RBUTTONUP: std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255); disp->button&=~2U; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); break; case WM_MBUTTONUP: std::memmove((void*)(disp->buttons+1),(void*)disp->buttons,255); disp->button&=~4U; disp->is_event = true; SetEvent(cimg::Win32attr().wait_event); break; case WM_SETCURSOR: if (disp->visible_cursor) ShowCursor(TRUE); else ShowCursor(FALSE); break; } return DefWindowProc(window,msg,wParam,lParam); } static DWORD WINAPI _events_thread(void* arg) { CImgDisplay *disp = (CImgDisplay*)(((void**)arg)[0]); const char *title = (const char*)(((void**)arg)[1]); MSG msg; delete[] (void**)arg; disp->bmi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER); disp->bmi.bmiHeader.biWidth=disp->width; disp->bmi.bmiHeader.biHeight=-(int)disp->height; disp->bmi.bmiHeader.biPlanes=1; disp->bmi.bmiHeader.biBitCount=32; disp->bmi.bmiHeader.biCompression=BI_RGB; disp->bmi.bmiHeader.biSizeImage=0; disp->bmi.bmiHeader.biXPelsPerMeter=1; disp->bmi.bmiHeader.biYPelsPerMeter=1; disp->bmi.bmiHeader.biClrUsed=0; disp->bmi.bmiHeader.biClrImportant=0; disp->data = new unsigned int[disp->width*disp->height]; if (!disp->is_fullscreen) { // Normal window RECT rect; rect.left=rect.top=0; rect.right=disp->width-1; rect.bottom=disp->height-1; AdjustWindowRect(&rect,WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,false); const int border1 = (rect.right-rect.left+1-disp->width)/2, border2 = rect.bottom-rect.top+1-disp->height-border1; disp->window = CreateWindowA("MDICLIENT",title?title:" ", WS_OVERLAPPEDWINDOW | (disp->is_closed?0:WS_VISIBLE), CW_USEDEFAULT,CW_USEDEFAULT, disp->width + 2*border1, disp->height + border1 + border2, 0,0,0,&(disp->ccs)); if (!disp->is_closed) { GetWindowRect(disp->window,&rect); disp->window_x = rect.left + border1; disp->window_y = rect.top + border2; } else disp->window_x = disp->window_y = 0; } else { // Fullscreen window const unsigned int sx = screen_dimx(), sy = screen_dimy(); disp->window = CreateWindowA("MDICLIENT",title?title:" ", WS_POPUP | (disp->is_closed?0:WS_VISIBLE), (sx-disp->width)/2, (sy-disp->height)/2, disp->width,disp->height,0,0,0,&(disp->ccs)); disp->window_x = disp->window_y = 0; } SetForegroundWindow(disp->window); disp->hdc = GetDC(disp->window); disp->window_width = disp->width; disp->window_height = disp->height; disp->mouse_x = disp->mouse_y = -1; disp->wheel = 0; std::memset((void*)disp->buttons,0,256*sizeof(unsigned int)); std::memset((void*)disp->keys,0,256*sizeof(unsigned int)); std::memset((void*)disp->released_keys,0,256*sizeof(unsigned int)); disp->is_resized = disp->is_moved = disp->is_event = false; if (disp->events) { #ifdef _WIN64 SetWindowLongPtr(disp->window,GWLP_USERDATA,(LONG_PTR)disp); SetWindowLongPtr(disp->window,GWLP_WNDPROC,(LONG_PTR)_handle_events); #else SetWindowLong(disp->window,GWL_USERDATA,(LONG)disp); SetWindowLong(disp->window,GWL_WNDPROC,(LONG)_handle_events); #endif SetEvent(disp->created); while( GetMessage(&msg,0,0,0) ) DispatchMessage( &msg ); } return 0; } void _init_fullscreen() { background_window = 0; if (is_fullscreen && !is_closed) { DEVMODE mode; unsigned int imode=0, ibest=0, bestbpp=0, bw=~0U, bh=~0U; for (mode.dmSize = sizeof(DEVMODE), mode.dmDriverExtra = 0; EnumDisplaySettings(0,imode,&mode); imode++) { const unsigned int nw = mode.dmPelsWidth, nh = mode.dmPelsHeight; if (nw>=width && nh>=height && mode.dmBitsPerPel>=bestbpp && nw<=bw && nh<=bh) { bestbpp = mode.dmBitsPerPel; ibest = imode; bw = nw; bh = nh; } } if (bestbpp) { curr_mode.dmSize = sizeof(DEVMODE); curr_mode.dmDriverExtra = 0; EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&curr_mode); EnumDisplaySettings(0,ibest,&mode); ChangeDisplaySettings(&mode,0); } else curr_mode.dmSize = 0; const unsigned int sx = screen_dimx(), sy = screen_dimy(); if (sx!=width || sy!=height) { CLIENTCREATESTRUCT background_ccs; background_window = CreateWindowA("MDICLIENT"," ",WS_POPUP | WS_VISIBLE, 0,0,sx,sy,0,0,0,&background_ccs); SetForegroundWindow(background_window); } } else curr_mode.dmSize = 0; } void _desinit_fullscreen() { if (is_fullscreen) { if (background_window) DestroyWindow(background_window); background_window = 0; if (curr_mode.dmSize) ChangeDisplaySettings(&curr_mode,0); is_fullscreen = false; } } #endif }; /* #-------------------------------------- # # # # Definition of the CImg structure # # # #-------------------------------------- */ //! Class representing an image (up to 4 dimensions wide), each pixel being of type \c T. /** This is the main class of the %CImg Library. It declares and constructs an image, allows access to its pixel values, and is able to perform various image operations. \par Image representation A %CImg image is defined as an instance of the container \ref CImg, which contains a regular grid of pixels, each pixel value being of type \c T. The image grid can have up to 4 dimensions : width, height, depth and number of channels. Usually, the three first dimensions are used to describe spatial coordinates (x,y,z), while the number of channels is rather used as a vector-valued dimension (it may describe the R,G,B color channels for instance). If you need a fifth dimension, you can use image lists \ref CImgList rather than simple images \ref CImg. Thus, the \ref CImg class is able to represent volumetric images of vector-valued pixels, as well as images with less dimensions (1D scalar signal, 2D color images, ...). Most member functions of the class CImg are designed to handle this maximum case of (3+1) dimensions. Concerning the pixel value type \c T : fully supported template types are the basic C++ types : unsigned char, char, short, unsigned int, int, unsigned long, long, float, double, ... . Typically, fast image display can be done using CImg images, while complex image processing algorithms may be rather coded using CImg or CImg images that have floating-point pixel values. The default value for the template T is \c float. Using your own template types may be possible. However, you will certainly have to define the complete set of arithmetic and logical operators for your class. \par Image structure The \ref CImg<\c T> structure contains \a five fields : - \ref width defines the number of \a columns of the image (size along the X-axis). - \ref height defines the number of \a rows of the image (size along the Y-axis). - \ref depth defines the number of \a slices of the image (size along the Z-axis). - \ref dim defines the number of \a channels of the image (size along the V-axis). - \ref data defines a \a pointer to the \a pixel \a data (of type \c T). You can access these fields publicly although it is recommended to use the dedicated functions dimx(), dimy(), dimz(), dimv() and ptr() to do so. Image dimensions are not limited to a specific range (as long as you got enough available memory). A value of \e 1 usually means that the corresponding dimension is \a flat. If one of the dimensions is \e 0, or if the data pointer is null, the image is considered as \e empty. Empty images should not contain any pixel data and thus, will not be processed by CImg member functions (a CImgInstanceException will be thrown instead). Pixel data are stored in memory, in a non interlaced mode (See \ref cimg_storage). \par Image declaration and construction Declaring an image can be done by using one of the several available constructors. Here is a list of the most used : - Construct images from arbitrary dimensions : - CImg img; declares an empty image. - CImg img(128,128); declares a 128x128 greyscale image with \c unsigned \c char pixel values. - CImg img(3,3); declares a 3x3 matrix with \c double coefficients. - CImg img(256,256,1,3); declares a 256x256x1x3 (color) image (colors are stored as an image with three channels). - CImg img(128,128,128); declares a 128x128x128 volumetric and greyscale image (with \c double pixel values). - CImg<> img(128,128,128,3); declares a 128x128x128 volumetric color image (with \c float pixels, which is the default value of the template parameter \c T). - \b Note : images pixels are not automatically initialized to 0. You may use the function \ref fill() to do it, or use the specific constructor taking 5 parameters like this : CImg<> img(128,128,128,3,0); declares a 128x128x128 volumetric color image with all pixel values to 0. - Construct images from filenames : - CImg img("image.jpg"); reads a JPEG color image from the file "image.jpg". - CImg img("analyze.hdr"); reads a volumetric image (ANALYZE7.5 format) from the file "analyze.hdr". - \b Note : You need to install ImageMagick to be able to read common compressed image formats (JPG,PNG,...) (See \ref cimg_files_io). - Construct images from C-style arrays : - CImg img(data_buffer,256,256); constructs a 256x256 greyscale image from a \c int* buffer \c data_buffer (of size 256x256=65536). - CImg img(data_buffer,256,256,1,3,false); constructs a 256x256 color image from a \c unsigned \c char* buffer \c data_buffer (where R,G,B channels follow each others). - CImg img(data_buffer,256,256,1,3,true); constructs a 256x256 color image from a \c unsigned \c char* buffer \c data_buffer (where R,G,B channels are multiplexed). The complete list of constructors can be found here. \par Most useful functions The \ref CImg class contains a lot of functions that operates on images. Some of the most useful are : - operator()(), operator[]() : allows to access or write pixel values. - display() : displays the image in a new window. \sa CImgList, CImgStats, CImgDisplay, CImgException. **/ template struct CImg { //! Variable representing the width of the instance image (i.e. dimensions along the X-axis). /** \remark - Prefer using the function CImg::dimx() to get information about the width of an image. - Use function CImg::resize() to set a new width for an image. Setting directly the variable \c width would probably result in a library crash. - Empty images have \c width defined to \c 0. **/ unsigned int width; //! Variable representing the height of the instance image (i.e. dimensions along the Y-axis). /** \remark - Prefer using the function CImg::dimy() to get information about the height of an image. - Use function CImg::resize() to set a new height for an image. Setting directly the variable \c height would probably result in a library crash. - 1D signals have \c height defined to \c 1. - Empty images have \c height defined to \c 0. **/ unsigned int height; //! Variable representing the depth of the instance image (i.e. dimensions along the Z-axis). /** \remark - Prefer using the function CImg::dimz() to get information about the depth of an image. - Use function CImg::resize() to set a new depth for an image. Setting directly the variable \c depth would probably result in a library crash. - Classical 2D images have \c depth defined to \c 1. - Empty images have \c depth defined to \c 0. **/ unsigned int depth; //! Variable representing the number of channels of the instance image (i.e. dimensions along the V-axis). /** \remark - Prefer using the function CImg::dimv() to get information about the depth of an image. - Use function CImg::resize() to set a new vector dimension for an image. Setting directly the variable \c dim would probably result in a library crash. - Scalar-valued images (one value per pixel) have \c dim defined to \c 1. - Empty images have \c depth defined to \c 0. **/ unsigned int dim; //! Variable telling if pixel buffer of the instance image is shared with another one. bool is_shared; //! Pointer to the first pixel of the pixel buffer. T *data; //! Iterator type for CImg. /** \remark - An \p iterator is a T* pointer (address of a pixel value in the pixel buffer). - Iterators are not directly used in %CImg functions, they have been introduced for compatibility with the STL. **/ typedef T* iterator; //! Const iterator type for CImg. /** \remark - A \p const_iterator is a const T* pointer (address of a pixel value in the pixel buffer). - Iterators are not directly used in %CImg functions, they have been introduced for compatibility with the STL. **/ typedef const T* const_iterator; //! Get value type typedef T value_type; //@} //--------------------------- // //! \name Plugins //@{ //--------------------------- #ifdef cimg_plugin #include cimg_plugin #endif //@} //-------------------------------------- // //! \name Constructors-Destructor-Copy //@{ //-------------------------------------- //! Default constructor. /** The default constructor creates an empty instance image. \remark - An empty image does not contain any data and has all of its dimensions \ref width, \ref height, \ref depth, \ref dim set to 0 as well as its pointer to the pixel buffer \ref data. - An empty image is non-shared. \see ~CImg(), assign(), is_empty(). **/ CImg(): width(0),height(0),depth(0),dim(0),is_shared(false),data(0) {} //! Destructor. /** The destructor destroys the instance image. \remark - Destructing an empty or shared image does nothing. - Otherwise, all memory used to store the pixel data of the instance image is freed. - When destroying a non-shared image, be sure that every shared instances of the same image are also destroyed to avoid further access to desallocated memory buffers. \see CImg(), assign(), is_empty(). **/ ~CImg() { if (data && !is_shared) delete[] data; } //! In-place version of the default constructor. /** This function replaces the instance image by an empty image. \remark - Memory used by the previous content of the instance image is freed if necessary. - If the instance image was initially shared, it is replaced by a (non-shared) empty image. - This function is useful to free memory used by an image that is not of use, but which has been created in the current code scope (i.e. not destroyed yet). \see ~CImg(), assign(), is_empty(). **/ CImg& assign() { if (data && !is_shared) delete[] data; width = height = depth = dim = 0; is_shared = false; data = 0; return *this; } //! In-place version of the default constructor. /** This function is strictly equivalent to \ref assign() and has been introduced for having a STL-compliant function name. \see assign(). **/ CImg& clear() { return assign(); } //! Default copy constructor. /** The default copy constructor creates a new instance image having same dimensions (\ref width, \ref height, \ref depth, \ref dim) and same pixel values as the input image \p img. \param img The input image to copy. \remark - If the input image \p img is non-shared or have a different template type \p t != \p T, the default copy constructor allocates a new pixel buffer and copy the pixel data of \p img into it. In this case, the pointers \ref data to the pixel buffers of the two images are different and the resulting instance image is non-shared. - If the input image \p img is shared and has the same template type \p t == \p T, the default copy constructor does not allocate a new pixel buffer and the resulting instance image shares its pixel buffer with the input image \p img, which means that modifying pixels of \p img also modifies the created instance image. - Copying an image having a different template type \p t != \p T performs a crude static cast conversion of each pixel value from type \p t to type \p T. - Copying an image having the same template type \p t == \p T is significantly faster. \see assign(const CImg< t >&), CImg(const CImg< t >&,const bool). **/ template CImg(const CImg& img):is_shared(false) { const unsigned int siz = img.size(); if (img.data && siz) { width = img.width; height = img.height; depth = img.depth; dim = img.dim; data = new T[siz]; const t *ptrs = img.data+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs); } else { width = height = depth = dim = 0; data = 0; } } CImg(const CImg& img) { const unsigned int siz = img.size(); if (img.data && siz) { width = img.width; height = img.height; depth = img.depth; dim = img.dim; is_shared = img.is_shared; if (is_shared) data = const_cast(img.data); else { data = new T[siz]; std::memcpy(data,img.data,siz*sizeof(T)); } } else { width = height = depth = dim = 0; is_shared = false; data = 0; } } //! In-place version of the default copy constructor. /** This function assigns a copy of the input image \p img to the current instance image. \param img The input image to copy. \remark - If the instance image is not shared, the content of the input image \p img is copied into a new buffer becoming the new pixel buffer of the instance image, while the old pixel buffer is freed if necessary. - If the instance image is shared, the content of the input image \p img is copied into the current (shared) pixel buffer of the instance image, modifying then the image referenced by the shared instance image. The instance image still remains shared. \see CImg(const CImg< t >&), operator=(const CImg< t >&). **/ template CImg& assign(const CImg& img) { return assign(img.data,img.width,img.height,img.depth,img.dim); } //! Advanced copy constructor. /** The advanced copy constructor - as the default constructor CImg(const CImg< t >&) - creates a new instance image having same dimensions \ref width, \ref height, \ref depth, \ref dim and same pixel values as the input image \p img. But it also decides if the created instance image shares its memory with the input image \p img (if the input parameter \p shared is set to \p true) or not (if the input parameter \p shared is set to \p false). \param img The input image to copy. \param shared Boolean flag that decides if the copy is shared on non-shared. \remark - It is not possible to create a shared copy if the input image \p img is empty or has a different pixel type \p t != \p T. - If a non-shared copy of the input image \p img is created, a new memory buffer is allocated for pixel data. - If a shared copy of the input image \p img is created, no extra memory is allocated and the pixel buffer of the instance image is the same as the one used by the input image \p img. \see CImg(const CImg< t >&), assign(const CImg< t >&,const bool). **/ template CImg(const CImg& img, const bool shared):is_shared(false) { if (shared) throw CImgArgumentException("CImg<%s>::CImg() : Cannot construct a shared copy from a CImg<%s> image " "(different pixel types).",pixel_type(),CImg::pixel_type()); const unsigned int siz = img.size(); if (img.data && siz) { width = img.width; height = img.height; depth = img.depth; dim = img.dim; data = new T[siz]; const t *ptrs = img.data+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs); } else { width = height = depth = dim = 0; data = 0; } } CImg(const CImg& img, const bool shared) { const unsigned int siz = img.size(); if (img.data && siz) { width = img.width; height = img.height; depth = img.depth; dim = img.dim; is_shared = shared; if (is_shared) data = const_cast(img.data); else { data = new T[siz]; std::memcpy(data,img.data,siz*sizeof(T)); } } else { width = height = depth = dim = 0; is_shared = false; data = 0; } } //! In-place version of the advanced constructor. /** This function - as the simpler function assign(const CImg< t >&) - assigns a copy of the input image \p img to the current instance image. But it also decides if the copy is shared (if the input parameter \p shared is set to \true) or non-shared (if the input parameter \p shared is set to false). \param img The input image to copy. \param shared Boolean flag that decides if the copy is shared or non-shared. \remark - It is not possible to assign a shared copy if the input image \p img is empty or has a different pixel type \p t != \p T. - If a non-shared copy of the input image \p img is assigned, a new memory buffer is allocated for pixel data. - If a shared copy of the input image \p img is assigned, no extra memory is allocated and the pixel buffer of the instance image is the same as the one used by the input image \p img. \see CImg(const CImg< t >&,const bool), assign(const CImg< t >&). **/ template CImg& assign(const CImg& img, const bool shared) { return assign(img.data,img.width,img.height,img.depth,img.dim,shared); } //! Constructs a new image with given size (\p dx,\p dy,\p dz,\p dv). /** This constructors create an instance image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T. \param dx Desired size along the X-axis, i.e. the \ref width of the image. \param dy Desired size along the Y-axis, i.e. the \ref height of the image. \param dz Desired size along the Z-axis, i.e. the \ref depth of the image. \param dv Desired size along the V-axis, i.e. the number of image channels \ref dim. \remark - If one of the input dimension \p dx,\p dy,\p dz or \p dv is set to 0, the created image is empty and all has its dimensions set to 0. No memory for pixel data is then allocated. - This constructor creates only non-shared images. - Image pixels allocated by this constructor are \b not \b initialized. Use the constructor CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&) to get an image of desired size with pixels set to a particular value. \see assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int), CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&). **/ explicit CImg(const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1): is_shared(false) { const unsigned int siz = dx*dy*dz*dv; if (siz) { width = dx; height = dy; depth = dz; dim = dv; data = new T[siz]; } else { width = height = depth = dim = 0; data = 0; } } //! In-place version of the previous constructor. /** This function replaces the instance image by a new image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T. \param dx Desired size along the X-axis, i.e. the \ref width of the image. \param dy Desired size along the Y-axis, i.e. the \ref height of the image. \param dz Desired size along the Z-axis, i.e. the \ref depth of the image. \param dv Desired size along the V-axis, i.e. the number of image channels \p dim. - If one of the input dimension \p dx,\p dy,\p dz or \p dv is set to 0, the instance image becomes empty and all has its dimensions set to 0. No memory for pixel data is then allocated. - Memory buffer used to store previous pixel values is freed if necessary. - If the instance image is shared, this constructor actually does nothing more than verifying that new and old image dimensions fit. - Image pixels allocated by this function are \b not \b initialized. Use the function assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T&) to assign an image of desired size with pixels set to a particular value. \see CImg(), assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int). **/ CImg& assign(const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1) { const unsigned long siz = dx*dy*dz*dv, curr_siz = size(); if (is_shared) { if (siz!=curr_siz) throw CImgArgumentException("CImg<%s>::assign() : Cannot assign image (%u,%u,%u,%u) to shared instance image (%u,%u,%u,%u,%p).", pixel_type(),dx,dy,dz,dv,width,height,depth,dim,data); } else { if (siz) { if (siz!=curr_siz) { if (data) delete[] data; data = new T[siz]; } width = dx; height = dy; depth = dz; dim = dv; } else { if (data) delete[] data; width = height = depth = dim = 0; data = 0; } } return *this; } //! Construct an image with given size (\p dx,\p dy,\p dz,\p dv) and with pixel having a default value \p val. /** This constructor creates an instance image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T and sets all pixel values of the created instance image to \p val. \param dx Desired size along the X-axis, i.e. the \ref width of the image. \param dy Desired size along the Y-axis, i.e. the \ref height of the image. \param dz Desired size along the Z-axis, i.e. the \ref depth of the image. \param dv Desired size along the V-axis, i.e. the number of image channels \p dim. \param val Default value for image pixels. \remark - This constructor has the same properties as CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int). \see CImg(const unsigned int,const unsigned int,const unsigned int,const unsigned int). **/ CImg(const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const T& val): is_shared(false) { const unsigned int siz = dx*dy*dz*dv; if (siz) { width = dx; height = dy; depth = dz; dim = dv; data = new T[siz]; fill(val); } else { width = height = depth = dim = 0; data = 0; } } //! In-place version of the previous constructor. /** This function replaces the instance image by a new image of size (\p dx,\p dy,\p dz,\p dv) with pixels of type \p T and sets all pixel values of the instance image to \p val. \param dx Desired size along the X-axis, i.e. the \ref width of the image. \param dy Desired size along the Y-axis, i.e. the \ref height of the image. \param dz Desired size along the Z-axis, i.e. the \ref depth of the image. \param dv Desired size along the V-axis, i.e. the number of image channels \p dim. \param val Default value for image pixels. \remark - This function has the same properties as assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int). \see assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int). **/ CImg& assign(const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const T& val) { return assign(dx,dy,dz,dv).fill(val); } //! Construct an image from an image file. /** This constructor creates an instance image by reading it from a file. \param filename Filename of the image file. \remark - The image format is deduced from the filename only by looking for the filename extension i.e. without analyzing the file itself. - Recognized image formats depend on the tools installed on your system or the external libraries you use to link your code with. More informations on this topic can be found in cimg_files_io. - If the filename is not found, a CImgIOException is thrown by this constructor. \see assign(const char *const), load(const char *const) **/ CImg(const char *const filename):width(0),height(0),depth(0),dim(0),is_shared(false),data(0) { assign(filename); } //! In-place version of the previous constructor. /** This function replaces the instance image by the one that have been read from the given file. \param filename Filename of the image file. - The image format is deduced from the filename only by looking for the filename extension i.e. without analyzing the file itself. - Recognized image formats depend on the tools installed on your system or the external libraries you use to link your code with. More informations on this topic can be found in cimg_files_io. - If the filename is not found, a CImgIOException is thrown by this constructor. **/ CImg& assign(const char *const filename) { return load(filename); } //! Construct an image from raw memory buffer. /** This constructor creates an instance image of size (\p dx,\p dy,\p dz,\p dv) and fill its pixel buffer by copying data values from the input raw pixel buffer \p data_buffer. **/ template CImg(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1, const bool shared=false):is_shared(false) { if (shared) throw CImgArgumentException("CImg<%s>::CImg() : Cannot construct a shared copy from a (%s*) buffer " "(different pixel types).",pixel_type(),CImg::pixel_type()); const unsigned int siz = dx*dy*dz*dv; if (data_buffer && siz) { width = dx; height = dy; depth = dz; dim = dv; data = new T[siz]; const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs); } else { width = height = depth = dim = 0; data = 0; } } #ifdef cimg_use_visualcpp6 CImg(const T *const data_buffer, const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const bool shared) { #else CImg(const T *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1, const bool shared=false) { #endif const unsigned int siz = dx*dy*dz*dv; if (data_buffer && siz) { width = dx; height = dy; depth = dz; dim = dv; is_shared = shared; if (is_shared) data = const_cast(data_buffer); else { data = new T[siz]; std::memcpy(data,data_buffer,siz*sizeof(T)); } } else { width = height = depth = dim = 0; is_shared = false; data = 0; } } template CImg(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1) { } //! In-place version of the previous constructor. #ifdef cimg_use_visualcpp6 template CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv) { #else template CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1) { #endif assign(dx,dy,dz,dv); const unsigned int siz = dx*dy*dz*dv; if (data_buffer && siz) { const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs); } else { width = height = depth = dim = 0; is_shared = false; data = 0; } return *this; } CImg& assign(const T *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1) { assign(dx,dy,dz,dv); const unsigned int siz = dx*dy*dz*dv; if (data_buffer && siz) std::memcpy(data,data_buffer,siz*sizeof(T)); else { width = height = depth = dim = 0; is_shared = false; data = 0; } return *this; } //! In-place version of the previous constructor, allowing to force the shared state of the instance image. template CImg& assign(const t *const data_buffer, const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const bool shared) { if (shared) throw CImgArgumentException("CImg<%s>::assign() : Cannot define a shared copy from a CImg<%s> image " "(different pixel types).",pixel_type(),CImg::pixel_type()); if (data && !is_shared) delete[] data; is_shared = false; const unsigned int siz = dx*dy*dz*dv; if (data_buffer && siz) { width = dx; height = dy; depth = dz; dim = dv; data = new T[siz]; const t *ptrs = data_buffer+siz; cimg_for(*this,ptrd,T) *ptrd = (T)*(--ptrs); } else { width = height = depth = dim = 0; data = 0; } return *this; } CImg& assign(const T *const data_buffer, const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv, const bool shared) { if (data && !is_shared) delete[] data; const unsigned int siz = dx*dy*dz*dv; if (data_buffer && siz) { width = dx; height = dy; depth = dz; dim = dv; is_shared = shared; if (is_shared) data = const_cast(data_buffer); else { data = new T[siz]; std::memcpy(data,data_buffer,siz*sizeof(T)); } } else { width = height = depth = dim = 0; is_shared = false; data = 0; } return *this; } // INNER ROUTINE : Swap fields of an image (use it carefully!) // If one of the image is shared, its content is replaced by the non-shared image (which remains unchanged). CImg& swap(CImg& img) { if (img.is_shared==is_shared) { cimg::swap(width,img.width); cimg::swap(height,img.height); cimg::swap(depth,img.depth); cimg::swap(dim,img.dim); cimg::swap(data,img.data); } else { if (img.is_shared) img.assign(*this); else assign(img); } return img; } //@} //------------------------------------- // //! \name Image Informations //@{ //------------------------------------- //! Return the type of the pixel values. /** \return a string describing the type of the image pixels (template parameter \p T). - The string returned may contains spaces ("unsigned char"). - If the template parameter T does not correspond to a registered type, the string "unknown" is returned. **/ static const char* pixel_type() { return cimg::type::id(); } //! Return the total number of pixel values in an image. /** - Equivalent to : dimx() * dimy() * dimz() * dimv(). \par example: \code CImg<> img(100,100,1,3); if (img.size()==100*100*3) std::fprintf(stderr,"This statement is true"); \endcode \sa dimx(), dimy(), dimz(), dimv() **/ unsigned long size() const { return width*height*depth*dim; } //! Return the number of columns of the instance image (size along the X-axis, i.e image width). /** \sa width, dimy(), dimz(), dimv(), size(). **/ int dimx() const { return (int)width; } //! Return the number of rows of the instance image (size along the Y-axis, i.e image height). /** \sa height, dimx(), dimz(), dimv(), size(). **/ int dimy() const { return (int)height; } //! Return the number of slices of the instance image (size along the Z-axis). /** \sa depth, dimx(), dimy(), dimv(), size(). **/ int dimz() const { return (int)depth; } //! Return the number of vector channels of the instance image (size along the V-axis). /** \sa dim, dimx(), dimy(), dimz(), size(). **/ int dimv() const { return (int)dim; } //! Return \c true if images \c (*this) and \c img have same width. template bool is_sameX(const CImg& img) const { return (width==img.width); } //! Return \c true if images \c (*this) and the display \c disp have same width. bool is_sameX(const CImgDisplay& disp) const { return (width==disp.width); } //! Return \c true if images \c (*this) and \c img have same height. template bool is_sameY(const CImg& img) const { return (height==img.height); } //! Return \c true if images \c (*this) and the display \c disp have same height. bool is_sameY(const CImgDisplay& disp) const { return (height==disp.height); } //! Return \c true if images \c (*this) and \c img have same depth. template bool is_sameZ(const CImg& img) const { return (depth==img.depth); } //! Return \c true if images \c (*this) and \c img have same dim. template bool is_sameV(const CImg& img) const { return (dim==img.dim); } //! Return \c true if images have same width and same height. template bool is_sameXY(const CImg& img) const { return (is_sameX(img) && is_sameY(img)); } //! Return \c true if image \c (*this) and the display \c disp have same width and same height. bool is_sameXY(const CImgDisplay& disp) const { return (is_sameX(disp) && is_sameY(disp)); } //! Return \c true if images have same width, same height and same depth. template bool is_sameXYZ(const CImg& img) const { return (is_sameXY(img) && is_sameZ(img)); } //! Return \c true if images \c (*this) and \c img have same width, same height, same depth and same number of channels. template bool is_sameXYZV(const CImg& img) const { return (is_sameXYZ(img) && is_sameV(img)); } //! Return \c true if pixel (x,y,z,v) is inside the image boundaries. bool contains(const int x, const int y=0, const int z=0, const int v=0) const { return data && x>=0 && x<(int)width && y>=0 && y<(int)height && z>=0 && z<(int)depth && v>=0 && v<(int)dim; } //! Return \c true if current image is empty. bool is_empty() const { return !(data && width && height && depth && dim); } //! Return the offset of the pixel coordinates (\p x,\p y,\p z,\p v) with respect to the data pointer \c data. /** \param x X-coordinate of the pixel. \param y Y-coordinate of the pixel. \param z Z-coordinate of the pixel. \param v V-coordinate of the pixel. - No checking is done on the validity of the given coordinates. \par example: \code CImg img(100,100,1,3,0); // Define a 100x100 color image with float-valued black pixels. long off = img.offset(10,10,0,2); // Get the offset of the blue value of the pixel located at (10,10). float val = img[off]; // Get the blue value of the pixel. \endcode \sa ptr(), operator()(), operator[](), cimg_storage. **/ long offset(const int x=0, const int y=0, const int z=0, const int v=0) const { return x + y*width + z*width*height + v*width*height*depth; } //! Return a pointer to the pixel value located at (\p x,\p y,\p z,\p v). /** \param x X-coordinate of the pixel. \param y Y-coordinate of the pixel. \param z Z-coordinate of the pixel. \param v V-coordinate of the pixel. - When called without parameters, ptr() returns a pointer to the begining of the pixel buffer. - If the macro \c cimg_debug == 3, boundary checking is performed and warning messages may appear if given coordinates are outside the image range (but function performances decrease). \par example: \code CImg img(100,100,1,1,0); // Define a 100x100 greyscale image with float-valued pixels. float *ptr = ptr(10,10); // Get a pointer to the pixel located at (10,10). float val = *ptr; // Get the pixel value. \endcode \sa data, offset(), operator()(), operator[](), cimg_storage, cimg_environment. **/ T* ptr(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) { const long off = offset(x,y,z,v); #if cimg_debug>=3 if (off<0 || off>=(long)size()) { cimg::warn(true,"CImg<%s>::ptr() : Asked for a pointer at coordinates (%u,%u,%u,%u) (offset=%u), " "outside image range (%u,%u,%u,%u) (size=%u)", pixel_type(),x,y,z,v,off,width,height,depth,dim,size()); return data; } #endif return data+off; } const T* ptr(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const { const long off = offset(x,y,z,v); #if cimg_debug>=3 if (off<0 || off>=(long)size()) { cimg::warn(true,"CImg<%s>::ptr() : Trying to get a pointer at (%u,%u,%u,%u) (offset=%d) which is" "outside the data of the image (%u,%u,%u,%u) (size=%u)", pixel_type(),x,y,z,v,off,width,height,depth,dim,size()); return data; } #endif return data+off; } //! Return an iterator to the first image pixel iterator begin() { return data; } const_iterator begin() const { return data; } //! Return an iterator to the last image pixel iterator end() { return data + size(); } const_iterator end() const { return data + size(); } //! Fast access to pixel value for reading or writing. /** \param x X-coordinate of the pixel. \param y Y-coordinate of the pixel. \param z Z-coordinate of the pixel. \param v V-coordinate of the pixel. - If one image dimension is equal to 1, it can be omitted in the coordinate list (see example below). - If the macro \c cimg_debug == 3, boundary checking is performed and warning messages may appear (but function performances decrease). \par example: \code CImg img(100,100,1,3,0); // Define a 100x100 color image with float-valued black pixels. const float valR = img(10,10,0,0); // Read the red component at coordinates (10,10). const float valG = img(10,10,0,1); // Read the green component at coordinates (10,10) const float valB = img(10,10,2); // Read the blue component at coordinates (10,10) (Z-coordinate omitted here). const float avg = (valR + valG + valB)/3; // Compute average pixel value. img(10,10,0) = img(10,10,1) = img(10,10,2) = avg; // Replace the pixel (10,10) by the average grey value. \endcode \sa operator[](), ptr(), offset(), cimg_storage, cimg_environment. **/ T& operator()(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) { const long off = offset(x,y,z,v); #if cimg_debug>=3 if (!data || off>=(long)size()) { cimg::warn(true,"CImg<%s>::operator() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) " "outside the image range (%u,%u,%u,%u) (size=%u)", pixel_type(),x,y,z,v,off,width,height,depth,dim,size()); return *data; } #endif return data[off]; } const T& operator()(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const { const long off = offset(x,y,z,v); #if cimg_debug>=3 if (!data || off>=(long)size()) { cimg::warn(true,"CImg<%s>::operator() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) " "outside the image range (%u,%u,%u,%u) (size=%u)", pixel_type(),x,y,z,v,off,width,height,depth,dim,size()); return *data; } #endif return data[off]; } //! Return pixel value at a given position. Equivalent to operator(). T& at(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) { const long off = offset(x,y,z,v); if (!data || off>=(long)size()) throw CImgArgumentException("CImg<%s>::at() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) " "outside the image range (%u,%u,%u,%u) (size=%u)", pixel_type(),x,y,z,v,off,width,height,depth,dim,size()); return data[off]; } const T& at(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const { const long off = offset(x,y,z,v); if (!data || off>=(long)size()) throw CImgArgumentException("CImg<%s>::at() : Pixel access requested at (%u,%u,%u,%u) (offset=%d) " "outside the image range (%u,%u,%u,%u) (size=%u)", pixel_type(),x,y,z,v,off,width,height,depth,dim,size()); return data[off]; } //! Fast access to pixel value for reading or writing, using an offset to the image pixel. /** \param off Offset of the pixel according to the begining of the pixel buffer, given by ptr(). - If the macro \c cimg_debug==3, boundary checking is performed and warning messages may appear (but function performances decrease). - As pixel values are aligned in memory, this operator can sometime useful to access values easier than with operator()() (see example below). \par example: \code CImg vec(1,10); // Define a vector of float values (10 lines, 1 row). const float val1 = vec(0,4); // Get the fifth element using operator()(). const float val2 = vec[4]; // Get the fifth element using operator[]. Here, val2==val1. \endcode \sa operator()(), ptr(), offset(), cimg_storage, cimg_environment. **/ T& operator[](const unsigned long off) { return operator()(off); } const T& operator[](const unsigned long off) const { return operator()(off); } //! Return a reference to the last image value T& back() { return operator()(size()-1); } const T& back() const { return operator()(size()-1); } //! Return a reference to the first image value T& front() { return *data; } const T& front() const { return *data; } //! Read a pixel value with Dirichlet or Neumann boundary conditions. /** \param x X-coordinate of the pixel. \param y Y-coordinate of the pixel. \param z Z-coordinate of the pixel. \param v V-coordinate of the pixel. \param out_val Desired value if pixel coordinates are outside the image range (optional parameter). - This function allows to read pixel values with boundary checking on all coordinates. - If given coordinates are outside the image range and the parameter out_val is specified, the value \c out_val is returned. - If given coordinates are outside the image range and the parameter out_val is not specified, the closest pixel value is returned. \par example: \code CImg img(100,100,1,1,128); // Define a 100x100 images with all pixel values equal to 128. const float val1 = img.pix4d(10,10,0,0,0); // Equivalent to val1=img(10,10) (but slower). const float val2 = img.pix4d(-4,5,0,0,0); // Return 0, since coordinates are outside the image range. const float val3 = img.pix4d(10,10,5,0,64); // Return 64, since coordinates are outside the image range. \endcode \sa operator()(), linear_pix4d(), cubic_pix2d(). **/ T pix4d(const int x, const int y, const int z, const int v, const T& out_val) const { return (x<0 || y<0 || z<0 || v<0 || x>=dimx() || y>=dimy() || z>=dimz() || v>=dimv())?out_val:(*this)(x,y,z,v); } T pix4d(const int x, const int y, const int z, const int v) const { return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y), z<0?0:(z>=dimz()?dimz()-1:z), v<0?0:(v>=dimv()?dimv()-1:v)); } //! Read a pixel value with Dirichlet or Neumann boundary conditions for the three first coordinates (\c x,\c y,\c z). T pix3d(const int x, const int y, const int z, const int v, const T& out_val) const { return (x<0 || y<0 || z<0 || x>=dimx() || y>=dimy() || z>=dimz())?out_val:(*this)(x,y,z,v); } const T& pix3d(const int x, const int y, const int z, const int v=0) const { return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y), z<0?0:(z>=dimz()?dimz()-1:z),v); } //! Read a pixel value with Dirichlet or Neumann boundary conditions for the two first coordinates (\c x,\c y). T pix2d(const int x, const int y, const int z, const int v, const T& out_val) const { return (x<0 || y<0 || x>=dimx() || y>=dimy())?out_val:(*this)(x,y,z,v); } const T& pix2d(const int x,const int y,const int z=0,const int v=0) const { return (*this)(x<0?0:(x>=dimx()?dimx()-1:x), y<0?0:(y>=dimy()?dimy()-1:y),z,v); } //! Read a pixel value with Dirichlet or Neumann boundary conditions for the first coordinate \c x. T pix1d(const int x, const int y, const int z, const int v, const T& out_val) const { return (x<0 || x>=dimx())?out_val:(*this)(x,y,z,v); } const T& pix1d(const int x, const int y=0, const int z=0, const int v=0) const { return (*this)(x<0?0:(x>=dimx()?dimx()-1:x),y,z,v); } //! Read a pixel value using linear interpolation. /** \param ffx X-coordinate of the pixel (float-valued). \param ffy Y-coordinate of the pixel (float-valued). \param ffz Z-coordinate of the pixel (float-valued). \param ffv V-coordinate of the pixel (float-valued). \param out_val Out-of-border pixel value - This function allows to read pixel values with boundary checking on all coordinates. - If given coordinates are outside the image range, the value of the nearest pixel inside the image is returned (Neumann boundary conditions). - If given coordinates are float-valued, a linear interpolation is performed in order to compute the returned value. \par example: \code CImg img(2,2); // Define a greyscale 2x2 image. img(0,0) = 0; // Fill image with specified pixel values. img(1,0) = 1; img(0,1) = 2; img(1,1) = 3; const double val = img.linear_pix4d(0.5,0.5); // Return val=1.5, which is the average intensity of the four pixels values. \endcode \sa operator()(), linear_pix3d(), linear_pix2d(), linear_pix1d(), cubic_pix2d(). **/ typename cimg::largest::type linear_pix4d(const float fx,const float fy,const float fz,const float fv, const T& out_val) const { const int x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1), z = (int)fz-(fz>=0?0:1), v = (int)fv-(fv>=0?0:1), nx = x+1, ny = y+1, nz = z+1, nv = v+1; const float dx = fx-x, dy = fy-y, dz = fz-z, dv = fv-v; const T Icccc = pix4d(x,y,z,v,out_val), Inccc = pix4d(nx,y,z,v,out_val), Icncc = pix4d(x,ny,z,v,out_val), Inncc = pix4d(nx,ny,z,v,out_val), Iccnc = pix4d(x,y,nz,v,out_val), Incnc = pix4d(nx,y,nz,v,out_val), Icnnc = pix4d(x,ny,nz,v,out_val), Innnc = pix4d(nx,ny,nz,v,out_val), Icccn = pix4d(x,y,z,nv,out_val), Inccn = pix4d(nx,y,z,nv,out_val), Icncn = pix4d(x,ny,z,nv,out_val), Inncn = pix4d(nx,ny,z,nv,out_val), Iccnn = pix4d(x,y,nz,nv,out_val), Incnn = pix4d(nx,y,nz,nv,out_val), Icnnn = pix4d(x,ny,nz,nv,out_val), Innnn = pix4d(nx,ny,nz,nv,out_val); return Icccc + dx*(Inccc-Icccc + dy*(Icccc+Inncc-Icncc-Inccc + dz*(Iccnc+Innnc+Icncc+Inccc-Icnnc-Incnc-Icccc-Inncc + dv*(Iccnn+Innnn+Icncn+Inccn+Icnnc+Incnc+Icccc+Inncc-Icnnn-Incnn-Icccn-Inncn-Iccnc-Innnc-Icncc-Inccc)) + dv*(Icccn+Inncn+Icncc+Inccc-Icncn-Inccn-Icccc-Inncc)) + dz*(Icccc+Incnc-Iccnc-Inccc + dv*(Icccn+Incnn+Iccnc+Inccc-Iccnn-Inccn-Icccc-Incnc)) + dv*(Icccc+Inccn-Inccc-Icccn)) + dy*(Icncc-Icccc + dz*(Icccc+Icnnc-Iccnc-Icncc + dv*(Icccn+Icnnn+Iccnc+Icncc-Iccnn-Icncn-Icccc-Icnnc)) + dv*(Icccc+Icncn-Icncc-Icccn)) + dz*(Iccnc-Icccc + dv*(Icccc+Iccnn-Iccnc-Icccn)) + dv*(Icccn-Icccc); } typename cimg::largest::type linear_pix4d(const float ffx,const float ffy=0,const float ffz=0,const float ffv=0) const { const float fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy), fz = ffz<0?0:(ffz>depth-1?depth-1:ffz), fv = ffv<0?0:(ffv>dim-1?dim-1:ffv); const unsigned int x = (unsigned int)fx, y = (unsigned int)fy, z = (unsigned int)fz, v = (unsigned int)fv; const float dx = fx-x, dy = fy-y, dz = fz-z, dv = fv-v; const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y, nz = dz>0?z+1:z, nv = dv>0?v+1:v; const T &Icccc = (*this)(x,y,z,v), &Inccc = (*this)(nx,y,z,v), &Icncc = (*this)(x,ny,z,v), &Inncc = (*this)(nx,ny,z,v), &Iccnc = (*this)(x,y,nz,v), &Incnc = (*this)(nx,y,nz,v), &Icnnc = (*this)(x,ny,nz,v), &Innnc = (*this)(nx,ny,nz,v), &Icccn = (*this)(x,y,z,nv), &Inccn = (*this)(nx,y,z,nv), &Icncn = (*this)(x,ny,z,nv), &Inncn = (*this)(nx,ny,z,nv), &Iccnn = (*this)(x,y,nz,nv), &Incnn = (*this)(nx,y,nz,nv), &Icnnn = (*this)(x,ny,nz,nv), &Innnn = (*this)(nx,ny,nz,nv); return Icccc + dx*(Inccc-Icccc + dy*(Icccc+Inncc-Icncc-Inccc + dz*(Iccnc+Innnc+Icncc+Inccc-Icnnc-Incnc-Icccc-Inncc + dv*(Iccnn+Innnn+Icncn+Inccn+Icnnc+Incnc+Icccc+Inncc-Icnnn-Incnn-Icccn-Inncn-Iccnc-Innnc-Icncc-Inccc)) + dv*(Icccn+Inncn+Icncc+Inccc-Icncn-Inccn-Icccc-Inncc)) + dz*(Icccc+Incnc-Iccnc-Inccc + dv*(Icccn+Incnn+Iccnc+Inccc-Iccnn-Inccn-Icccc-Incnc)) + dv*(Icccc+Inccn-Inccc-Icccn)) + dy*(Icncc-Icccc + dz*(Icccc+Icnnc-Iccnc-Icncc + dv*(Icccn+Icnnn+Iccnc+Icncc-Iccnn-Icncn-Icccc-Icnnc)) + dv*(Icccc+Icncn-Icncc-Icccn)) + dz*(Iccnc-Icccc + dv*(Icccc+Iccnn-Iccnc-Icccn)) + dv*(Icccn-Icccc); } //! Read a pixel value using linear interpolation for the three first coordinates (\c cx,\c cy,\c cz). /** - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the three first coordinates. \sa operator()(), linear_pix4d(), linear_pix2d(), linear_pix1d(), linear_pix3d(), cubic_pix2d(). **/ typename cimg::largest::type linear_pix3d(const float fx,const float fy,const float fz,const int v, const T& out_val) const { const int x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1), z = (int)fz-(fz>=0?0:1), nx = x+1, ny = y+1, nz = z+1; const float dx = fx-x, dy = fy-y, dz = fz-z; const T Iccc = pix3d(x,y,z,v,out_val), Incc = pix3d(nx,y,z,v,out_val), Icnc = pix3d(x,ny,z,v,out_val), Innc = pix3d(nx,ny,z,v,out_val), Iccn = pix3d(x,y,nz,v,out_val), Incn = pix3d(nx,y,nz,v,out_val), Icnn = pix3d(x,ny,nz,v,out_val), Innn = pix3d(nx,ny,nz,v,out_val); return Iccc + dx*(Incc-Iccc + dy*(Iccc+Innc-Icnc-Incc + dz*(Iccn+Innn+Icnc+Incc-Icnn-Incn-Iccc-Innc)) + dz*(Iccc+Incn-Iccn-Incc)) + dy*(Icnc-Iccc + dz*(Iccc+Icnn-Iccn-Icnc)) + dz*(Iccn-Iccc); } typename cimg::largest::type linear_pix3d(const float ffx,const float ffy=0,const float ffz=0,const int v=0) const { const float fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy), fz = ffz<0?0:(ffz>depth-1?depth-1:ffz); const unsigned int x = (unsigned int)fx, y = (unsigned int)fy, z = (unsigned int)fz; const float dx = fx-x, dy = fy-y, dz = fz-z; const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y, nz = dz>0?z+1:z; const T &Iccc = (*this)(x,y,z,v), &Incc = (*this)(nx,y,z,v), &Icnc = (*this)(x,ny,z,v), &Innc = (*this)(nx,ny,z,v), &Iccn = (*this)(x,y,nz,v), &Incn = (*this)(nx,y,nz,v), &Icnn = (*this)(x,ny,nz,v), &Innn = (*this)(nx,ny,nz,v); return Iccc + dx*(Incc-Iccc + dy*(Iccc+Innc-Icnc-Incc + dz*(Iccn+Innn+Icnc+Incc-Icnn-Incn-Iccc-Innc)) + dz*(Iccc+Incn-Iccn-Incc)) + dy*(Icnc-Iccc + dz*(Iccc+Icnn-Iccn-Icnc)) + dz*(Iccn-Iccc); } //! Read a pixel value using linear interpolation for the two first coordinates (\c cx,\c cy). /** - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the two first coordinates. \sa operator()(), linear_pix4d(), linear_pix3d(), linear_pix1d(), linear_pix2d(), cubic_pix2d(). **/ typename cimg::largest::type linear_pix2d(const float fx, const float fy, const int z, const int v, const T& out_val) const { const int x = (int)fx-(fx>0?0:1), y = (int)fy-(fy>0?0:1), nx = x+1, ny = y+1; const float dx = fx-x, dy = fy-y; const T Icc = pix2d(x,y,z,v,out_val), Inc = pix2d(nx,y,z,v,out_val), Icn = pix2d(x,ny,z,v,out_val), Inn = pix2d(nx,ny,z,v,out_val); return Icc + dx*(Inc-Icc + dy*(Icc+Inn-Icn-Inc)) + dy*(Icn-Icc); } typename cimg::largest::type linear_pix2d(const float ffx, const float ffy=0, const int z=0, const int v=0) const { const float fx = ffx<0?0:(ffx>width-1?width-1:ffx), fy = ffy<0?0:(ffy>height-1?height-1:ffy); const unsigned int x = (unsigned int)fx, y = (unsigned int)fy; const float dx = fx-x, dy = fy-y; const unsigned int nx = dx>0?x+1:x, ny = dy>0?y+1:y; const T &Icc = (*this)(x,y,z,v), &Inc = (*this)(nx,y,z,v), &Icn = (*this)(x,ny,z,v), &Inn = (*this)(nx,ny,z,v); return Icc + dx*(Inc-Icc + dy*(Icc+Inn-Icn-Inc)) + dy*(Icn-Icc); } //! Read a pixel value using linear interpolation for the first coordinate \c cx. /** - Same as linear_pix4d(), except that linear interpolation and boundary checking is performed only on the first coordinate. \sa operator()(), linear_pix4d(), linear_pix3d(), linear_pix2d(), linear_pix1d(), cubic_pix1d(). **/ typename cimg::largest::type linear_pix1d(const float fx,const int y,const int z,const int v, const T& out_val) const { const int x = (int)fx-(fx>0?0:1), nx = x+1; const float dx = fx-x; const T Ic = pix1d(x,y,z,v,out_val), In = pix2d(nx,y,z,v,out_val); return Ic + dx*(In-Ic); } typename cimg::largest::type linear_pix1d(const float ffx,const int y=0,const int z=0,const int v=0) const { const float fx = ffx<0?0:(ffx>width-1?width-1:ffx); const unsigned int x = (unsigned int)fx; const float dx = fx-x; const unsigned int nx = dx>0?x+1:x; const T &Ic = (*this)(x,y,z,v), &In = (*this)(nx,y,z,v); return Ic + dx*(In-Ic); } // This function is used as a subroutine for cubic interpolation static float _cubic_R(const float x) { const float xp2 = x+2, xp1 = x+1, xm1 = x-1, nxp2 = xp2>0?xp2:0, nxp1 = xp1>0?xp1:0, nx = x>0?x:0, nxm1 = xm1>0?xm1:0; return (nxp2*nxp2*nxp2 - 4*nxp1*nxp1*nxp1 + 6*nx*nx*nx - 4*nxm1*nxm1*nxm1)/6.0f; } //! Read a pixel value using cubic interpolation for the first coordinate \c cx. /** - Same as cubic_pix2d(), except that cubic interpolation and boundary checking is performed only on the first coordinate. \sa operator()(), cubic_pix2d(), linear_pix1d(). **/ typename cimg::largest::type cubic_pix1d(const float fx, const int y, const int z, const int v, const T& out_val) const { const int x = (int)fx-(fx>=0?0:1), px = x-1, nx = x+1, ax = nx+1; const float dx = fx-x; const T a = pix2d(px,y,z,v,out_val), b = pix2d(x,y,z,v,out_val), c = pix2d(nx,y,z,v,out_val), d = pix2d(ax,y,z,v,out_val); const float Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx); return Rxp*a + Rxc*b + Rxn*c + Rxa*d; } typename cimg::largest::type cubic_pix1d(const float pfx, const int y=0, const int z=0, const int v=0) const { const float fx = pfx<0?0:(pfx>width-1?width-1:pfx); const unsigned int x = (unsigned int)fx, px = (int)x-1>=0?x-1:0, nx = x+1::type cubic_pix2d(const float fx, const float fy, const int z, const int v, const T& out_val) const { const int x = (int)fx-(fx>=0?0:1), y = (int)fy-(fy>=0?0:1), px = x-1, nx = x+1, ax = nx+1, py = y-1, ny = y+1, ay = ny+1; const float dx = fx-x, dy = fy-y; const T a = pix2d(px,py,z,v,out_val), b = pix2d(x,py,z,v,out_val), c = pix2d(nx,py,z,v,out_val), d = pix2d(ax,py,z,v,out_val), e = pix2d(px, y,z,v,out_val), f = pix2d(x, y,z,v,out_val), g = pix2d(nx, y,z,v,out_val), h = pix2d(ax, y,z,v,out_val), i = pix2d(px,ny,z,v,out_val), j = pix2d(x,ny,z,v,out_val), k = pix2d(nx,ny,z,v,out_val), l = pix2d(ax,ny,z,v,out_val), m = pix2d(px,ay,z,v,out_val), n = pix2d(x,ay,z,v,out_val), o = pix2d(nx,ay,z,v,out_val), p = pix2d(ax,ay,z,v,out_val); const float Rxp = _cubic_R(-1-dx), Rxc = _cubic_R(dx), Rxn = _cubic_R(1-dx), Rxa = _cubic_R(2-dx), Ryp = _cubic_R(dy+1), Ryc = _cubic_R(dy), Ryn = _cubic_R(dy-1), Rya = _cubic_R(dy-2); return Rxp*Ryp*a + Rxc*Ryp*b + Rxn*Ryp*c + Rxa*Ryp*d + Rxp*Ryc*e + Rxc*Ryc*f + Rxn*Ryc*g + Rxa*Ryc*h + Rxp*Ryn*i + Rxc*Ryn*j + Rxn*Ryn*k + Rxa*Ryn*l + Rxp*Rya*m + Rxc*Rya*n + Rxn*Rya*o + Rxa*Rya*p; } typename cimg::largest::type cubic_pix2d(const float pfx, const float pfy=0, const int z=0, const int v=0) const { const float fx = pfx<0?0:(pfx>width-1?width-1:pfx), fy = pfy<0?0:(pfy>height-1?height-1:pfy); const unsigned int x = (unsigned int)fx, px = (int)x-1>=0?x-1:0, nx = x+1=0?y-1:0, ny = y+1 img("foo.jpg"); // Load image from a JPEG file. img.print("Image : foo.jpg",1); // Print image informations and statistics. \endcode \sa CImgStats **/ const CImg& print(const char *title=0, const unsigned int print_flag=1) const { std::fprintf(stderr,"%-8s(this=%p): { size=(%u,%u,%u,%u), data=(%s*)%p (%s)", title?title:"CImg",(void*)this, width,height,depth,dim,pixel_type(),(void*)data, is_shared?"shared":"not shared"); if (is_empty()) { std::fprintf(stderr,", [Undefined pixel data] }\n"); return *this; } if (print_flag>=1) { const CImgStats st(*this); std::fprintf(stderr,", min=%g, mean=%g [var=%g], max=%g, pmin=(%d,%d,%d,%d), pmax=(%d,%d,%d,%d)", st.min,st.mean,st.variance,st.max,st.xmin,st.ymin,st.zmin,st.vmin,st.xmax,st.ymax,st.zmax,st.vmax); } if (print_flag>=2 || size()<=16) { std::fprintf(stderr," }\n%s = [ ",title?title:"data"); cimg_forXYZV(*this,x,y,z,k) std::fprintf(stderr,"%g%s",(double)(*this)(x,y,z,k), ((x+1)*(y+1)*(z+1)*(k+1)==(int)size()?" ]\n":(((x+1)%width==0)?" ; ":" "))); } else std::fprintf(stderr," }\n"); return *this; } //! Display informations about the image on the standart output. const CImg& print(const unsigned int print_flag) const { return print(0,print_flag); } //@} //------------------------------------------ // //! \name Arithmetic and Boolean Operators //@{ //------------------------------------------ //! Assignement operator. /** This operator assigns a copy of the input image \p img to the current instance image. \param img The input image to copy. \remark - This operator is strictly equivalent to the function assign(const CImg< t >&) and has exactly the same properties. \see assign(const CImg< t >&). **/ template CImg& operator=(const CImg& img) { return assign(img); } CImg& operator=(const CImg& img) { return assign(img); } //! Assign values of a C-array to the instance image. /** \param buf Pointer to a C-style array having a size of (at least) this->size(). - Replace pixel values by the content of the array \c buf. - Warning : the value types in the array and in the image must be the same. \par example: \code float tab[4*4] = { 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16 }; // Define a 4x4 matrix in C-style. CImg matrice(4,4); // Define a 4x4 greyscale image. matrice = tab; // Fill the image by the values in tab. \endcode **/ CImg& operator=(const T *buf) { if (buf) std::memcpy(data,buf,size()*sizeof(T)); else assign(); return *this; } //! Assign a value to each image pixel of the instance image. CImg& operator=(const T& val) { return fill(val); } //! Operator+ /** \remark - This operator can be used to get a non-shared copy of an image. **/ CImg operator+() const { return CImg(*this,false); } //! Operator+=; #ifdef cimg_use_visualcpp6 CImg& operator+=(const T& val) { #else template CImg& operator+=(const t& val) { #endif cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)+val); return *this; } //! Operator+= template CImg& operator+=(const CImg& img) { const unsigned int smin = cimg::min(size(),img.size()); t *ptrs = img.data+smin; for (T *ptrd = data+smin; ptrd>data; --ptrd, (*ptrd)=(T)((*ptrd)+(*(--ptrs)))); return *this; } //! Operator++; CImg& operator++() { cimg_for(*this,ptr,T) (*ptr)++; return *this; } //! Operator-. CImg operator-() const { return CImg(width,height,depth,dim,0)-=*this; } //! Operator-=. #ifdef cimg_use_visualcpp6 CImg& operator-=(const T& val) { #else template CImg& operator-=(const t& val) { #endif cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)-val); return *this; } //! Operator-=. template CImg& operator-=(const CImg& img) { const unsigned int smin = cimg::min(size(),img.size()); t *ptrs = img.data+smin; for (T *ptrd = data+smin; ptrd>data; --ptrd, (*ptrd)=(T)((*ptrd)-(*(--ptrs)))); return *this; } //! Operator--. CImg& operator--() { cimg_for(*this,ptr,T) (*ptr)--; return *this; } //! Operator*=. #ifdef cimg_use_visualcpp6 CImg& operator*=(const double val) { #else template CImg& operator*=(const t& val) { #endif cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)*val); return *this; } //! Operator*=. template CImg& operator*=(const CImg& img) { return ((*this)*img).swap(*this); } //! Operator/=. #ifdef cimg_use_visualcpp6 CImg& operator/=(const double val) { #else template CImg& operator/=(const t& val) { #endif cimg_for(*this,ptr,T) (*ptr)=(T)((*ptr)/val); return *this; } //! Operator/=. template CImg& operator/=(const CImg& img) { return assign(*this*img.get_inverse()); } //! Modulo. CImg operator%(const CImg& img) const { return (+*this)%=img; } //! Modulo. CImg operator%(const T& val) const { return (+*this)%=val; } //! In-place modulo. CImg& operator%=(const T& val) { cimg_for(*this,ptr,T) (*ptr)%=val; return *this; } //! In-place modulo. CImg& operator%=(const CImg& img) { const unsigned int smin = cimg::min(size(),img.size()); for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)%=*(--ptrs)); return *this; } //! Bitwise AND. CImg operator&(const CImg& img) const { return (+*this)&=img; } //! Bitwise AND. CImg operator&(const T& val) const { return (+*this)&=val; } //! In-place bitwise AND. CImg& operator&=(const CImg& img) { const unsigned int smin = cimg::min(size(),img.size()); for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)&=*(--ptrs)); return *this; } //! In-place bitwise AND. CImg& operator&=(const T& val) { cimg_for(*this,ptr,T) (*ptr)&=val; return *this; } //! Bitwise OR. CImg operator|(const CImg& img) const { return (+*this)|=img; } //! Bitwise OR. CImg operator|(const T& val) const { return (+*this)|=val; } //! In-place bitwise OR. CImg& operator|=(const CImg& img) { const unsigned int smin = cimg::min(size(),img.size()); for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)|=*(--ptrs)); return *this; } //! In-place bitwise OR. CImg& operator|=(const T& val) { cimg_for(*this,ptr,T) (*ptr)|=val; return *this; } //! Bitwise XOR. CImg operator^(const CImg& img) const { return (+*this)^=img; } //! Bitwise XOR. CImg operator^(const T& val) const { return (+*this)^=val; } //! In-place bitwise XOR. CImg& operator^=(const CImg& img) { const unsigned int smin = cimg::min(size(),img.size()); for (T *ptrs=img.data+smin, *ptrd=data+smin; ptrd>data; *(--ptrd)^=*(--ptrs)); return *this; } //! In-place bitwise XOR. CImg& operator^=(const T& val) { cimg_for(*this,ptr,T) (*ptr)^=val; return *this; } //! Boolean NOT. CImg operator!() const { CImg res(width,height,depth,dim); const T *ptrs = end(); cimg_for(res,ptrd,T) *ptrd=!(*(--ptrs)); return res; } //! Bitwise NOT. CImg operator~() const { CImg res(width,height,depth,dim); const T *ptrs = end(); cimg_for(res,ptrd,T) *ptrd=~(*(--ptrs)); return res; } //! Bitwise shift CImg& operator<<=(const unsigned int n) { cimg_for(*this,ptr,T) (*ptr)<<=n; return *this; } //! Bitwise shift CImg operator<<(const unsigned int n) const { return (+*this)<<=n; } //! Bitwise shift CImg& operator>>=(const unsigned int n) { cimg_for(*this,ptr,T) (*ptr)>>=n; return *this; } //! Bitwise shift CImg operator>>(const unsigned int n) const { return (+*this)>>=n; } //! Boolean equality. template bool operator==(const CImg& img) const { const unsigned int siz = size(); bool vequal = true; if (siz!=img.size()) return false; t *ptrs=img.data+siz; for (T *ptrd=data+siz; vequal && ptrd>data; vequal=vequal&&((*(--ptrd))==(*(--ptrs)))); return vequal; } //! Boolean difference. template bool operator!=(const CImg& img) const { return !((*this)==img); } //! Get a new list template CImgList::type> operator<<(const CImg& img) const { typedef typename cimg::largest::type restype; return CImgList(*this,img); } //@} //--------------------------------------- // //! \name Usual Mathematics //@{ //--------------------------------------- //! Apply a R->R function on all image value. template CImg& apply(td (*func)(ts)) { cimg_for(*this,ptr,T) *ptr = (T)func(*ptr); return *this; } //! Return an image where each pixel value is equal to func(x). template CImg::type> get_apply(td (*func)(ts)) { typedef typename cimg::largest::type restype; return CImg(*this,false).apply(func); } //! In-place pointwise multiplication between \c *this and \c img. /** This is the in-place version of get_mul(). \sa get_mul(). **/ template CImg& mul(const CImg& img) { t *ptrs = img.data; T *ptrf = data + cimg::min(size(),img.size()); for (T* ptrd = data; ptrd CImg::type> get_mul(const CImg& img) const { typedef typename cimg::largest::type restype; return CImg(*this,false).mul(img); } //! Replace the image by the pointwise division between \p *this and \p img. /** This is the in-place version of get_div(). \see get_div(). **/ template CImg& div(const CImg& img) { t *ptrs = img.data; T *ptrf = data + cimg::min(size(),img.size()); for (T* ptrd = data; ptrd CImg::type> get_div(const CImg& img) const { typedef typename cimg::largest::type restype; return CImg(*this,false).div(img); } //! Replace the image by the pointwise max operator between \p *this and \p img /** This is the in-place version of get_max(). \see get_max(). **/ template CImg& max(const CImg& img) { t *ptrs = img.data; T *ptrf = data + cimg::min(size(),img.size()); for (T* ptrd = data; ptrd CImg::type> get_max(const CImg& img) const { typedef typename cimg::largest::type restype; return CImg(*this,false).max(img); } //! Replace the image by the pointwise max operator between \p *this and \p val /** This is the in-place version of get_max(). \see get_max(). **/ #ifdef cimg_use_visualcpp6 CImg& max(const T val) { #else CImg& max(const T& val) { #endif cimg_for(*this,ptr,T) (*ptr)=cimg::max(*ptr,val); return *this; } //! Return the image corresponding to the max value for each pixel. /** \param val = second argument of the max operator (the first one is *this). \see max(), min(), get_min() **/ #ifdef cimg_use_visualcpp6 CImg get_max(const T val) const { #else CImg get_max(const T& val) const { #endif return (+*this).max(val); } //! Replace the image by the pointwise min operator between \p *this and \p img /** This is the in-place version of get_min(). \see get_min(). **/ template CImg& min(const CImg& img) { t *ptrs = img.data; T *ptrf = data + cimg::min(size(),img.size()); for (T* ptrd = data; ptrd CImg::type> get_min(const CImg& img) const { typedef typename cimg::largest::type restype; return CImg(*this,false).min(img); } //! Replace the image by the pointwise min operator between \p *this and \p val /** This is the in-place version of get_min(). \see get_min(). **/ #ifdef cimg_use_visualcpp6 CImg& min(const T val) { #else CImg& min(const T& val) { #endif cimg_for(*this,ptr,T) (*ptr)=cimg::min(*ptr,val); return *this; } //! Return the image corresponding to the min value for each pixel. /** \param val = second argument of the min operator (the first one is *this). \see min(), max(), get_max() **/ #ifdef cimg_use_visualcpp6 CImg get_min(const T val) const { #else CImg get_min(const T& val) const { #endif return (+*this).min(val); } //! Replace each image pixel by its square root. /** \see get_sqrt() **/ CImg& sqrt() { cimg_for(*this,ptr,T) (*ptr)=(T)std::sqrt((double)(*ptr)); return *this; } //! Return the image of the square root of the pixel values. /** \see sqrt() **/ CImg::type> get_sqrt() const { typedef typename cimg::largest::type restype; return CImg(*this,false).sqrt(); } //! Replace each image pixel by its exponential. CImg& exp() { cimg_for(*this,ptr,T) (*ptr)=(T)std::exp((double)(*ptr)); return *this; } //! Return the image of the exponential of the pixel values. CImg::type> get_exp() const { typedef typename cimg::largest::type restype; return CImg(*this,false).exp(); } //! Replace each image pixel by its log. /** \see get_log(), log10(), get_log10() **/ CImg& log() { cimg_for(*this,ptr,T) (*ptr)=(T)std::log((double)(*ptr)); return *this; } //! Return the image of the log of the pixel values. /** \see log(), log10(), get_log10() **/ CImg::type> get_log() const { typedef typename cimg::largest::type restype; return CImg(*this,false).log(); } //! Replace each image pixel by its log10. /** \see get_log10(), log(), get_log() **/ CImg& log10() { cimg_for(*this,ptr,T) (*ptr)=(T)std::log10((double)(*ptr)); return *this; } //! Return the image of the log10 of the pixel values. /** \see log10(), log(), get_log() **/ CImg::type> get_log10() const { typedef typename cimg::largest::type restype; return CImg(*this,false).log10(); } //! Replace each image pixel by its power by \p p. /** \param p = power \see get_pow(), sqrt(), get_sqrt() **/ CImg& pow(const double p) { if (p==0) return fill(1); if (p==1) return *this; if (p==2) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val; } return *this; } if (p==3) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val*val; } return *this; } if (p==4) { cimg_for(*this,ptr,T) { const T& val = *ptr; *ptr=val*val*val*val; } return *this; } cimg_for(*this,ptr,T) (*ptr)=(T)std::pow((double)(*ptr),p); return *this; } //! Return the image of the square root of the pixel values. /** \param p = power \see pow(), sqrt(), get_sqrt() **/ CImg::type> get_pow(const double p) const { typedef typename cimg::largest::type restype; return CImg(*this,false).pow(p); } //! Return each image pixel (*this)(x,y,z,k) by its power by \p img(x,y,z,k) /** In-place version **/ template CImg& pow(const CImg& img) { t *ptrs = img.data; T *ptrf = data + cimg::min(size(),img.size()); for (T* ptrd = data; ptrd CImg::type> get_pow(const CImg& img) const { typedef typename cimg::largest::type restype; return CImg(*this,false).pow(img); } //! Replace each pixel value by its absolute value. /** \see get_abs() **/ CImg& abs() { cimg_for(*this,ptr,T) (*ptr)=cimg::abs(*ptr); return *this; } //! Return the image of the absolute value of the pixel values. /** \see abs() **/ CImg::type> get_abs() const { typedef typename cimg::largest::type restype; return CImg(*this,false).abs(); } //! Replace each image pixel by its cosinus. /** \see get_cos(), sin(), get_sin(), tan(), get_tan() **/ CImg& cos() { cimg_for(*this,ptr,T) (*ptr)=(T)std::cos((double)(*ptr)); return *this; } //! Return the image of the cosinus of the pixel values. /** \see cos(), sin(), get_sin(), tan(), get_tan() **/ CImg::type> get_cos() const { typedef typename cimg::largest::type restype; return CImg(*this,false).cos(); } //! Replace each image pixel by its sinus. /** \see get_sin(), cos(), get_cos(), tan(), get_tan() **/ CImg& sin() { cimg_for(*this,ptr,T) (*ptr)=(T)std::sin((double)(*ptr)); return *this; } //! Return the image of the sinus of the pixel values. /** \see sin(), cos(), get_cos(), tan(), get_tan() **/ CImg::type> get_sin() const { typedef typename cimg::largest::type restype; return CImg(*this,false).sin(); } //! Replace each image pixel by its tangent. /** \see get_tan(), cos(), get_cos(), sin(), get_sin() **/ CImg& tan() { cimg_for(*this,ptr,T) (*ptr)=(T)std::tan((double)(*ptr)); return *this; } //! Return the image of the tangent of the pixel values. /** \see tan(), cos(), get_cos(), sin(), get_sin() **/ CImg::type> get_tan() const { typedef typename cimg::largest::type restype; return CImg(*this,false).tan(); } //! Replace each image pixel by its arc-cosinus. CImg& acos() { cimg_for(*this,ptr,T) (*ptr)=(T)std::acos((double)(*ptr)); return *this; } //! Return the image of the arc-cosinus of the pixel values. CImg::type> get_acos() const { typedef typename cimg::largest::type restype; return CImg(*this,false).acos(); } //! Replace each image pixel by its arc-sinus. CImg& asin() { cimg_for(*this,ptr,T) (*ptr)=(T)std::asin((double)(*ptr)); return *this; } //! Return the image of the arc-sinus of the pixel values. CImg::type> get_asin() const { typedef typename cimg::largest::type restype; return CImg(*this,false).asin(); } //! Replace each image pixel by its arc-tangent. CImg& atan() { cimg_for(*this,ptr,T) (*ptr)=(T)std::atan((double)(*ptr)); return *this; } //! Return the image of the arc-tangent of the pixel values. CImg::type> get_atan() const { typedef typename cimg::largest::type restype; return CImg(*this,false).atan(); } //! Return the MSE (Mean-Squared Error) between two images. template double MSE(const CImg& img) const { if (img.size()!=size()) throw CImgArgumentException("CImg<%s>::MSE() : Instance image (%u,%u,%u,%u) and given image (%u,%u,%u,%u) have different dimensions.", pixel_type(),width,height,depth,dim,img.width,img.height,img.depth,img.dim); double vMSE = 0; const t* ptr2 = img.end(); cimg_for(*this,ptr1,T) { const double diff = (double)*ptr1 - (double)*(--ptr2); vMSE += diff*diff; } vMSE/=img.size(); return vMSE; } //! Return the PSNR between two images. template double PSNR(const CImg& img, const double valmax=255.0) const { const double vMSE = std::sqrt(MSE(img)); return (vMSE!=0)?(20*std::log10(valmax/vMSE)):(cimg::type::max()); } //@} //----------------------------------- // //! \name Usual Image Transformations //@{ //----------------------------------- //! Fill an image by a value \p val. /** \param val = fill value \note All pixel values of the instance image will be initialized by \p val. \see operator=(). **/ CImg& fill(const T& val) { if (!is_empty()) { if (val!=0 && sizeof(T)!=1) cimg_for(*this,ptr,T) *ptr=val; else std::memset(data,(int)val,size()*sizeof(T)); } return *this; } CImg get_fill(const T& val) const { return (+*this).fill(val); } //! Fill sequentially all pixel values with values \a val0 and \a val1 respectively. /** \param val0 = fill value 1 \param val1 = fill value 2 **/ CImg& fill(const T& val0,const T& val1) { if (!is_empty()) { T *ptr, *ptr_end = end()-1; for (ptr=data; ptrb)?b:*ptr); return *this; } //! Return the image of cutted values. /** \param a = minimum pixel value after cut. \param b = maximum pixel value after cut. \see cut(), normalize(), get_normalize(). **/ CImg get_cut(const T& a, const T& b) const { return (+*this).cut(a,b); } //! Quantize pixel values into \n levels. /** \param n = number of quantification levels \see get_quantize(). **/ CImg& quantize(const unsigned int n=256) { if (!is_empty()) { if (!n) throw CImgArgumentException("CImg<%s>::quantize() : Cannot quantize image to 0 values.", pixel_type()); const CImgStats st(*this,false); const double range = st.max-st.min; if (range>0) cimg_for(*this,ptr,T) { const unsigned int val = (unsigned int)((*ptr-st.min)*n/range); *ptr = (T)(st.min + cimg::min(val,n-1)*range); } } return *this; } //! Return a quantified image, with \n levels. /** \param n = number of quantification levels \see quantize(). **/ CImg get_quantize(const unsigned int n=256) const { return (+*this).quantize(n); } //! Threshold the image. /** \param thres = threshold \see get_threshold(). **/ CImg& threshold(const T& thres) { if (!is_empty()) cimg_for(*this,ptr,T) *ptr = *ptr<=thres?(T)0:(T)1; return *this; } //! Return a thresholded image. /** \param thres = threshold. \see threshold(). **/ CImg get_threshold(const T& thres) const { return (+*this).threshold(thres); } //! Return a rotated image. /** \param angle = rotation angle (in degrees). \param cond = rotation type. can be : - 0 = zero-value at borders - 1 = repeat image at borders - 2 = zero-value at borders and linear interpolation \note Returned image will probably have a different size than the instance image *this. \see rotate() **/ CImg get_rotate(const float angle, const unsigned int cond=3) const { if (is_empty()) return CImg(); CImg dest; const float nangle = cimg::mod(angle,360.0f), rad = (float)((nangle*cimg::PI)/180.0), ca=(float)std::cos(rad), sa=(float)std::sin(rad); if (cond!=1 && cimg::mod(nangle,90.0f)==0) { // optimized version for orthogonal angles const int wm1 = dimx()-1, hm1 = dimy()-1; const int iangle = (int)nangle/90; switch (iangle) { case 1: { dest.assign(height,width,depth,dim); cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(y,hm1-x,z,v); } break; case 2: { dest.assign(width,height,depth,dim); cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(wm1-x,hm1-y,z,v); } break; case 3: { dest.assign(height,width,depth,dim); cimg_forXYZV(dest,x,y,z,v) dest(x,y,z,v) = (*this)(wm1-y,x,z,v); } break; default: return *this; } } else { // generic version const float ux = (float)(cimg::abs(width*ca)), uy = (float)(cimg::abs(width*sa)), vx = (float)(cimg::abs(height*sa)), vy = (float)(cimg::abs(height*ca)), w2 = 0.5f*width, h2 = 0.5f*height, dw2 = 0.5f*(ux+vx), dh2 = 0.5f*(uy+vy); dest.assign((int)(ux+vx), (int)(uy+vy),depth,dim); switch (cond) { case 0: { cimg_forXY(dest,x,y) cimg_forZV(*this,z,v) dest(x,y,z,v) = pix2d((int)(w2 + (x-dw2)*ca + (y-dh2)*sa),(int)(h2 - (x-dw2)*sa + (y-dh2)*ca),z,v,0); } break; case 1: { cimg_forXY(dest,x,y) cimg_forZV(*this,z,v) dest(x,y,z,v) = (*this)(cimg::mod((int)(w2 + (x-dw2)*ca + (y-dh2)*sa),width), cimg::mod((int)(h2 - (x-dw2)*sa + (y-dh2)*ca),height),z,v); } break; case 2: { cimg_forXY(dest,x,y) { const float X = w2 + (x-dw2)*ca + (y-dh2)*sa, Y = h2 - (x-dw2)*sa + (y-dh2)*ca; cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)linear_pix2d(X,Y,z,v,0); } } break; default: { cimg_forXY(dest,x,y) { const float X = w2 + (x-dw2)*ca + (y-dh2)*sa, Y = h2 - (x-dw2)*sa + (y-dh2)*ca; cimg_forZV(*this,z,v) dest(x,y,z,v) = (T)cubic_pix2d(X,Y,z,v,0); } } break; } } return dest; } //! Rotate the image /** \param angle = rotation angle (in degrees). \param cond = rotation type. can be : - 0 = zero-value at borders - 1 = repeat image at borders - 2 = zero-value at borders and linear interpolation \see get_rotate() **/ CImg& rotate(const float angle,const unsigned int cond=3) { return get_rotate(angle,cond).swap(*this); } //! Return a rotated image around the point (\c cx,\c cy). /** \param angle = rotation angle (in degrees). \param cx = X-coordinate of the rotation center. \param cy = Y-coordinate of the rotation center. \param zoom = zoom. \param cond = rotation type. can be : - 0 = zero-value at borders - 1 = repeat image at borders - 2 = zero-value at borders and linear interpolation \see rotate() **/ CImg get_rotate(const float angle,const float cx,const float cy,const float zoom=1,const unsigned int cond=3) const { if (is_empty()) return CImg(); CImg dest(width,height,depth,dim); const float nangle = cimg::mod(angle,360.0f), rad = (float)((nangle*cimg::PI)/180.0), ca=(float)std::cos(rad)/zoom, sa=(float)std::sin(rad)/zoom; if (cond!=1 && zoom==1 && cimg::mod(nangle,90.0f)==0) { // optimized version for orthogonal angles const int iangle = (int)nangle/90; switch (iangle) { case 1: { dest.fill(0); const unsigned int xmin = cimg::max(0,(dimx()-dimy())/2), xmax = cimg::min(width,xmin+height), ymin = cimg::max(0,(dimy()-dimx())/2), ymax = cimg::min(height,ymin+width), xoff = xmin + cimg::min(0,(dimx()-dimy())/2), yoff = ymin + cimg::min(0,(dimy()-dimx())/2); cimg_forZV(dest,z,v) for (unsigned int y=ymin; y(); const unsigned int tdx = pdx<0?-pdx*width/100:pdx, tdy = pdy<0?-pdy*height/100:pdy, tdz = pdz<0?-pdz*depth/100:pdz, tdv = pdv<0?-pdv*dim/100:pdv, dx = tdx?tdx:1, dy = tdy?tdy:1, dz = tdz?tdz:1, dv = tdv?tdv:1; if (is_empty()) return CImg(dx,dy,dz,dv,0); if (width==dx && height==dy && depth==dz && dim==dv) return *this; CImg res; switch (interp) { case 0: // Zero filling res.assign(dx,dy,dz,dv,0).draw_image(*this,0,0,0,0); break; case 1: { // Nearest-neighbor interpolation res.assign(dx,dy,dz,dv); unsigned int *const offx = new unsigned int[dx], *const offy = new unsigned int[dy+1], *const offz = new unsigned int[dz+1], *const offv = new unsigned int[dv+1], *poffx, *poffy, *poffz, *poffv, curr, old; const unsigned int wh = width*height, whd = width*height*depth, rwh = dx*dy, rwhd = dx*dy*dz; poffx = offx; curr=0; { cimg_forX(res,x) { old=curr; curr=(x+1)*width/dx; *(poffx++) = (unsigned int)curr-(unsigned int)old; }} poffy = offy; curr=0; { cimg_forY(res,y) { old=curr; curr=(y+1)*height/dy; *(poffy++) = width*((unsigned int)curr-(unsigned int)old); }} *poffy=0; poffz = offz; curr=0; { cimg_forZ(res,z) { old=curr; curr=(z+1)*depth/dz; *(poffz++) = wh*((unsigned int)curr-(unsigned int)old); }} *poffz=0; poffv = offv; curr=0; { cimg_forV(res,k) { old=curr; curr=(k+1)*dim/dv; *(poffv++) = whd*((unsigned int)curr-(unsigned int)old); }} *poffv=0; T *ptrd = res.ptr(); const T* ptrv = ptr(); poffv = offv; for (unsigned int k=0; k1 && border_condition<0); const float sx = bborder?(dx>0?(width-1.0f)/(dx-1) :0):(float)width/dx, sy = bborder?(dy>0?(height-1.0f)/(dy-1):0):(float)height/dy, sz = bborder?(dz>0?(depth-1.0f)/(dz-1) :0):(float)depth/dz, sv = bborder?(dv>0?(dim-1.0f)/(dv-1) :0):(float)dim/dv; unsigned int *const off = new unsigned int[dimmax], *poff; float *const foff = new float[dimmax], *pfoff, old, curr; CImg resx, resy, resz, resv; T *ptrd; if (dx!=width) { if (width==1) resx = get_resize(dx,height,depth,dim,1,0); else { resx.assign(dx,height,depth,dim); curr = old = 0; poff = off; pfoff = foff; cimg_forX(resx,x) { *(pfoff++) = curr-(unsigned int)curr; old = curr; curr+=sx; *(poff++) = (unsigned int)curr-(unsigned int)old; } ptrd = resx.ptr(); const T *ptrs0 = ptr(); cimg_forYZV(resx,y,z,k) { poff = off; pfoff = foff; const T *ptrs = ptrs0, *const ptrsmax = ptrs0 + (width-1); cimg_forX(resx,x) { const float alpha = *(pfoff++); const T val1 = *ptrs, val2 = ptrs1 && border_condition<0); const float sx = bborder?(dx>0?(width-1.0f)/(dx-1) :0):(float)width/dx, sy = bborder?(dy>0?(height-1.0f)/(dy-1):0):(float)height/dy, sz = bborder?(dz>0?(depth-1.0f)/(dz-1) :0):(float)depth/dz, sv = bborder?(dv>0?(dim-1.0f)/(dv-1) :0):(float)dim/dv; res.assign(dx,dy,dz,dv); float cx, cy, cz, ck = 0; cimg_forV(res,k) { cz = 0; cimg_forZ(res,z) { cy = 0; cimg_forY(res,y) { cx = 0; cimg_forX(res,x) { res(x,y,z,k) = (T)(border_condition?cubic_pix2d(cx,cy,(int)cz,(int)ck):cubic_pix2d(cx,cy,(int)cz,(int)ck,0)); cx+=sx; } cy+=sy; } cz+=sz; } ck+=sv; } } break; } return res; } //! Return a resized image. /** \param src = Image giving the geometry of the resize. \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). - 2 = mosaic : image is repeated if necessary. - 3 = linear interpolation. - 4 = grid interpolation. - 5 = bi-cubic interpolation. \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100). **/ template CImg get_resize(const CImg& src, const unsigned int interp=1, const int border_condition=-1) const { return get_resize(src.width,src.height,src.depth,src.dim,interp,border_condition); } //! Return a resized image. /** \param disp = Display giving the geometry of the resize. \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). - 2 = mosaic : image is repeated if necessary. - 3 = linear interpolation. - 4 = grid interpolation. - 5 = bi-cubic interpolation. \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100). **/ CImg get_resize(const CImgDisplay& disp,const unsigned int interp=1, const int border_condition=-1) const { return get_resize(disp.width,disp.height,depth,dim,interp,border_condition); } //! Resize the image. /** \param pdx = Number of columns (new size along the X-axis). \param pdy = Number of rows (new size along the Y-axis). \param pdz = Number of slices (new size along the Z-axis). \param pdv = Number of vector-channels (new size along the V-axis). \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). - 2 = mosaic : image is repeated if necessary. - 3 = linear interpolation. - 4 = grid interpolation. - 5 = bi-cubic interpolation. \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100). **/ CImg& resize(const int pdx=-100, const int pdy=-100, const int pdz=-100, const int pdv=-100, const unsigned int interp=1, const int border_condition=-1) { if (!pdx || !pdy || !pdz || !pdv) return assign(); const unsigned int dx = pdx<0?-pdx*width/100:pdx, dy = pdy<0?-pdy*height/100:pdy, dz = pdz<0?-pdz*depth/100:pdz, dv = pdv<0?-pdv*dim/100:pdv; if (width==dx && height==dy && depth==dz && dim==dv) return *this; return get_resize(dx,dy,dz,dv,interp,border_condition).swap(*this); } //! Resize the image. /** \param src = Image giving the geometry of the resize. \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). - 2 = mosaic : image is repeated if necessary. - 3 = linear interpolation. - 4 = grid interpolation. - 5 = bi-cubic interpolation. \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100). **/ template CImg& resize(const CImg& src, const unsigned int interp=1, const int border_condition=-1) { return resize(src.width,src.height,src.depth,src.dim,interp,border_condition); } //! Resize the image /** \param disp = Display giving the geometry of the resize. \param interp = Resizing type : - 0 = no interpolation : additionnal space is filled with 0. - 1 = bloc interpolation (nearest point). - 2 = mosaic : image is repeated if necessary. - 3 = linear interpolation. - 4 = grid interpolation. - 5 = bi-cubic interpolation. \note If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100). **/ CImg& resize(const CImgDisplay& disp, const unsigned int interp=1, const int border_condition=-1) { return resize(disp.width,disp.height,depth,dim,interp,border_condition); } //! Return an half-resized image, using a special filter. /** \see resize_halfXY(), resize(), get_resize(). **/ CImg get_resize_halfXY() const { typedef typename cimg::largest::type ftype; if (is_empty()) return CImg(); CImg mask = CImg::matrix(0.07842776544f, 0.1231940459f, 0.07842776544f, 0.1231940459f, 0.1935127547f, 0.1231940459f, 0.07842776544f, 0.1231940459f, 0.07842776544f); CImg_3x3(I,ftype); CImg dest(width/2,height/2,depth,dim); cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) if (x%2 && y%2) dest(x/2,y/2,z,k) = (T)cimg_conv3x3(I,mask); return dest; } //! Half-resize the image, using a special filter /** \see get_resize_halfXY(), resize(), get_resize(). **/ CImg& resize_halfXY() { return get_resize_halfXY().swap(*this); } //! Return a square region of the image, as a new image /** \param x0 = X-coordinate of the upper-left crop rectangle corner. \param y0 = Y-coordinate of the upper-left crop rectangle corner. \param z0 = Z-coordinate of the upper-left crop rectangle corner. \param v0 = V-coordinate of the upper-left crop rectangle corner. \param x1 = X-coordinate of the lower-right crop rectangle corner. \param y1 = Y-coordinate of the lower-right crop rectangle corner. \param z1 = Z-coordinate of the lower-right crop rectangle corner. \param v1 = V-coordinate of the lower-right crop rectangle corner. \param border_condition = Dirichlet (false) or Neumann border conditions. \see crop() **/ CImg get_crop(const unsigned int x0,const unsigned int y0,const unsigned int z0,const unsigned int v0, const unsigned int x1,const unsigned int y1,const unsigned int z1,const unsigned int v1, const bool border_condition = false) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::get_crop() : Instance image (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); const unsigned int dx=x1-x0+1, dy=y1-y0+1, dz=z1-z0+1, dv=v1-v0+1; CImg dest(dx,dy,dz,dv); if (x0>=width || x1>=width || y0>=height || y1>=height || z0>=depth || z1>=depth || v0>=dim || v1>=dim || x1end || beg>=size() || end>=size()) throw CImgArgumentException("CImg<%s>::get_shared_points() : Cannot return a shared-memory subset (%u->%u,%u,%u,%u) from " "a (%u,%u,%u,%u) image.",pixel_type(),x0,x1,y0,z0,v0,width,height,depth,dim); return CImg(data+beg,x1-x0+1,1,1,1,true); } //! Get a shared-memory image referencing a set of points of the instance image (const version). const CImg get_shared_points(const unsigned int x0, const unsigned int x1, const unsigned int y0=0, const unsigned int z0=0, const unsigned int v0=0) const { const unsigned long beg = offset(x0,y0,z0,v0), end = offset(x1,y0,z0,v0); if (beg>end || beg>=size() || end>=size()) throw CImgArgumentException("CImg<%s>::get_shared_points() : Cannot return a shared-memory subset (%u->%u,%u,%u,%u) from " "a (%u,%u,%u,%u) image.",pixel_type(),x0,x1,y0,z0,v0,width,height,depth,dim); return CImg(data+beg,x1-x0+1,1,1,1,true); } //! Return a shared-memory image referencing a set of lines of the instance image. CImg get_shared_lines(const unsigned int y0, const unsigned int y1, const unsigned int z0=0, const unsigned int v0=0) { const unsigned long beg = offset(0,y0,z0,v0), end = offset(0,y1,z0,v0); if (beg>end || beg>=size() || end>=size()) throw CImgArgumentException("CImg<%s>::get_shared_lines() : Cannot return a shared-memory subset (0->%u,%u->%u,%u,%u) from " "a (%u,%u,%u,%u) image.",pixel_type(),width-1,y0,y1,z0,v0,width,height,depth,dim); return CImg(data+beg,width,y1-y0+1,1,1,true); } //! Return a shared-memory image referencing a set of lines of the instance image (const version). const CImg get_shared_lines(const unsigned int y0, const unsigned int y1, const unsigned int z0=0, const unsigned int v0=0) const { const unsigned long beg = offset(0,y0,z0,v0), end = offset(0,y1,z0,v0); if (beg>end || beg>=size() || end>=size()) throw CImgArgumentException("CImg<%s>::get_shared_lines() : Cannot return a shared-memory subset (0->%u,%u->%u,%u,%u) from " "a (%u,%u,%u,%u) image.",pixel_type(),width-1,y0,y1,z0,v0,width,height,depth,dim); return CImg(data+beg,width,y1-y0+1,1,1,true); } //! Return a shared-memory image referencing one particular line (y0,z0,v0) of the instance image. CImg get_shared_line(const unsigned int y0, const unsigned int z0=0, const unsigned int v0=0) { return get_shared_lines(y0,y0,z0,v0); } //! Return a shared-memory image referencing one particular line (y0,z0,v0) of the instance image (const version). const CImg get_shared_line(const unsigned int y0,const unsigned int z0=0,const unsigned int v0=0) const { return get_shared_lines(y0,y0,z0,v0); } //! Return a shared memory image referencing a set of planes (z0->z1,v0) of the instance image. CImg get_shared_planes(const unsigned int z0, const unsigned int z1, const unsigned int v0=0) { const unsigned long beg = offset(0,0,z0,v0), end = offset(0,0,z1,v0); if (beg>end || beg>=size() || end>=size()) throw CImgArgumentException("CImg<%s>::get_shared_planes() : Cannot return a shared-memory subset (0->%u,0->%u,%u->%u,%u) from " "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,z0,z1,v0,width,height,depth,dim); return CImg(data+beg,width,height,z1-z0+1,1,true); } //! Return a shared-memory image referencing a set of planes (z0->z1,v0) of the instance image (const version). const CImg get_shared_planes(const unsigned int z0, const unsigned int z1, const unsigned int v0=0) const { const unsigned long beg = offset(0,0,z0,v0), end = offset(0,0,z1,v0); if (beg>end || beg>=size() || end>=size()) throw CImgArgumentException("CImg<%s>::get_shared_planes() : Cannot return a shared-memory subset (0->%u,0->%u,%u->%u,%u) from " "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,z0,z1,v0,width,height,depth,dim); return CImg(data+beg,width,height,z1-z0+1,1,true); } //! Return a shared-memory image referencing one plane (z0,v0) of the instance image. CImg get_shared_plane(const unsigned int z0, const unsigned int v0=0) { return get_shared_planes(z0,z0,v0); } //! Return a shared-memory image referencing one plane (z0,v0) of the instance image (const version). const CImg get_shared_plane(const unsigned int z0, const unsigned int v0=0) const { return get_shared_planes(z0,z0,v0); } //! Return a shared-memory image referencing a set of channels (v0->v1) of the instance image. CImg get_shared_channels(const unsigned int v0, const unsigned int v1) { const unsigned long beg = offset(0,0,0,v0), end = offset(0,0,0,v1); if (beg>end || beg>=size() || end>=size()) throw CImgArgumentException("CImg<%s>::get_shared_channels() : Cannot return a shared-memory subset (0->%u,0->%u,0->%u,%u->%u) from " "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,depth-1,v0,v1,width,height,depth,dim); return CImg(data+beg,width,height,depth,v1-v0+1,true); } //! Return a shared-memory image referencing a set of channels (v0->v1) of the instance image (const version). const CImg get_shared_channels(const unsigned int v0, const unsigned int v1) const { const unsigned long beg = offset(0,0,0,v0), end = offset(0,0,0,v1); if (beg>end || beg>=size() || end>=size()) throw CImgArgumentException("CImg<%s>::get_shared_channels() : Cannot return a shared-memory subset (0->%u,0->%u,0->%u,%u->%u) from " "a (%u,%u,%u,%u) image.",pixel_type(),width-1,height-1,depth-1,v0,v1,width,height,depth,dim); return CImg(data+beg,width,height,depth,v1-v0+1,true); } //! Return a shared-memory image referencing one channel v0 of the instance image. CImg get_shared_channel(const unsigned int v0) { return get_shared_channels(v0,v0); } //! Return a shared-memory image referencing one channel v0 of the instance image (const version). const CImg get_shared_channel(const unsigned int v0) const { return get_shared_channels(v0,v0); } //! Return a shared version of the instance image. CImg get_shared() { return CImg(data,width,height,depth,dim,true); } //! Return a shared version of the instance image (const version). const CImg get_shared() const { return CImg(data,width,height,depth,dim,true); } //! Mirror an image along the specified axis. /** This is the in-place version of get_mirror(). \sa get_mirror(). **/ CImg& mirror(const char axe='x') { if (!is_empty()) { T *pf,*pb,*buf=0; switch (cimg::uncase(axe)) { case 'x': { pf = ptr(); pb = ptr(width-1); for (unsigned int yzv=0; yzv::mirror() : unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe); } if (buf) delete[] buf; } return *this; } //! Get a mirrored version of the image, along the specified axis. /** \param axe Axe used to mirror the image. Can be \c 'x', \c 'y', \c 'z' or \c 'v'. \sa mirror(). **/ CImg get_mirror(const char axe='x') { return (+*this).mirror(axe); } //! Translate the image /** This is the in-place version of get_translate(). \sa get_translate(). **/ CImg& translate(const int deltax,const int deltay=0,const int deltaz=0,const int deltav=0,const int border_condition=0) { if (!is_empty()) { if (deltax) // Translate along X-axis switch (border_condition) { case 0: if (cimg::abs(deltax)>=(int)width) return fill(0); if (deltax>0) cimg_forYZV(*this,y,z,k) { std::memmove(ptr(0,y,z,k),ptr(deltax,y,z,k),(width-deltax)*sizeof(T)); std::memset(ptr(width-deltax,y,z,k),0,deltax*sizeof(T)); } else cimg_forYZV(*this,y,z,k) { std::memmove(ptr(-deltax,y,z,k),ptr(0,y,z,k),(width+deltax)*sizeof(T)); std::memset(ptr(0,y,z,k),0,-deltax*sizeof(T)); } break; case 1: if (deltax>0) { const int ndeltax = (deltax>=(int)width)?width-1:deltax; if (!ndeltax) return *this; cimg_forYZV(*this,y,z,k) { std::memmove(ptr(0,y,z,k),ptr(ndeltax,y,z,k),(width-ndeltax)*sizeof(T)); T *ptrd = ptr(width-1,y,z,k); const T &val = *ptrd; for (int l=0; l=(int)width)?width-1:-deltax; if (!ndeltax) return *this; cimg_forYZV(*this,y,z,k) { std::memmove(ptr(ndeltax,y,z,k),ptr(0,y,z,k),(width-ndeltax)*sizeof(T)); T *ptrd = ptr(0,y,z,k); const T &val = *ptrd; for (int l=0; l0) cimg_forYZV(*this,y,z,k) { std::memcpy(buf,ptr(0,y,z,k),ndeltax*sizeof(T)); std::memmove(ptr(0,y,z,k),ptr(ndeltax,y,z,k),(width-ndeltax)*sizeof(T)); std::memcpy(ptr(width-ndeltax,y,z,k),buf,ndeltax*sizeof(T)); } else cimg_forYZV(*this,y,z,k) { std::memcpy(buf,ptr(width+ndeltax,y,z,k),-ndeltax*sizeof(T)); std::memmove(ptr(-ndeltax,y,z,k),ptr(0,y,z,k),(width+ndeltax)*sizeof(T)); std::memcpy(ptr(0,y,z,k),buf,-ndeltax*sizeof(T)); } delete[] buf; } break; } if (deltay) // Translate along Y-axis switch (border_condition) { case 0: if (cimg::abs(deltay)>=(int)height) return fill(0); if (deltay>0) cimg_forZV(*this,z,k) { std::memmove(ptr(0,0,z,k),ptr(0,deltay,z,k),width*(height-deltay)*sizeof(T)); std::memset(ptr(0,height-deltay,z,k),0,width*deltay*sizeof(T)); } else cimg_forZV(*this,z,k) { std::memmove(ptr(0,-deltay,z,k),ptr(0,0,z,k),width*(height+deltay)*sizeof(T)); std::memset(ptr(0,0,z,k),0,-deltay*width*sizeof(T)); } break; case 1: if (deltay>0) { const int ndeltay = (deltay>=(int)height)?height-1:deltay; if (!ndeltay) return *this; cimg_forZV(*this,z,k) { std::memmove(ptr(0,0,z,k),ptr(0,ndeltay,z,k),width*(height-ndeltay)*sizeof(T)); T *ptrd = ptr(0,height-ndeltay,z,k), *ptrs = ptr(0,height-1,z,k); for (int l=0; l=(int)height)?height-1:-deltay; if (!ndeltay) return *this; cimg_forZV(*this,z,k) { std::memmove(ptr(0,ndeltay,z,k),ptr(0,0,z,k),width*(height-ndeltay)*sizeof(T)); T *ptrd = ptr(0,1,z,k), *ptrs = ptr(0,0,z,k); for (int l=0; l0) cimg_forZV(*this,z,k) { std::memcpy(buf,ptr(0,0,z,k),width*ndeltay*sizeof(T)); std::memmove(ptr(0,0,z,k),ptr(0,ndeltay,z,k),width*(height-ndeltay)*sizeof(T)); std::memcpy(ptr(0,height-ndeltay,z,k),buf,width*ndeltay*sizeof(T)); } else cimg_forZV(*this,z,k) { std::memcpy(buf,ptr(0,height+ndeltay,z,k),-ndeltay*width*sizeof(T)); std::memmove(ptr(0,-ndeltay,z,k),ptr(0,0,z,k),width*(height+ndeltay)*sizeof(T)); std::memcpy(ptr(0,0,z,k),buf,-ndeltay*width*sizeof(T)); } delete[] buf; } break; } if (deltaz) // Translate along Z-axis switch (border_condition) { case 0: if (cimg::abs(deltaz)>=(int)depth) return fill(0); if (deltaz>0) cimg_forV(*this,k) { std::memmove(ptr(0,0,0,k),ptr(0,0,deltaz,k),width*height*(depth-deltaz)*sizeof(T)); std::memset(ptr(0,0,depth-deltaz,k),0,width*height*deltaz*sizeof(T)); } else cimg_forV(*this,k) { std::memmove(ptr(0,0,-deltaz,k),ptr(0,0,0,k),width*height*(depth+deltaz)*sizeof(T)); std::memset(ptr(0,0,0,k),0,-deltaz*width*height*sizeof(T)); } break; case 1: if (deltaz>0) { const int ndeltaz = (deltaz>=(int)depth)?depth-1:deltaz; if (!ndeltaz) return *this; cimg_forV(*this,k) { std::memmove(ptr(0,0,0,k),ptr(0,0,ndeltaz,k),width*height*(depth-ndeltaz)*sizeof(T)); T *ptrd = ptr(0,0,depth-ndeltaz,k), *ptrs = ptr(0,0,depth-1,k); for (int l=0; l=(int)depth)?depth-1:-deltaz; if (!ndeltaz) return *this; cimg_forV(*this,k) { std::memmove(ptr(0,0,ndeltaz,k),ptr(0,0,0,k),width*height*(depth-ndeltaz)*sizeof(T)); T *ptrd = ptr(0,0,1,k), *ptrs = ptr(0,0,0,k); for (int l=0; l0) cimg_forV(*this,k) { std::memcpy(buf,ptr(0,0,0,k),width*height*ndeltaz*sizeof(T)); std::memmove(ptr(0,0,0,k),ptr(0,0,ndeltaz,k),width*height*(depth-ndeltaz)*sizeof(T)); std::memcpy(ptr(0,0,depth-ndeltaz,k),buf,width*height*ndeltaz*sizeof(T)); } else cimg_forV(*this,k) { std::memcpy(buf,ptr(0,0,depth+ndeltaz,k),-ndeltaz*width*height*sizeof(T)); std::memmove(ptr(0,0,-ndeltaz,k),ptr(0,0,0,k),width*height*(depth+ndeltaz)*sizeof(T)); std::memcpy(ptr(0,0,0,k),buf,-ndeltaz*width*height*sizeof(T)); } delete[] buf; } break; } if (deltav) // Translate along V-axis switch (border_condition) { case 0: if (cimg::abs(deltav)>=(int)dim) return fill(0); if (deltav>0) { std::memmove(data,ptr(0,0,0,deltav),width*height*depth*(dim-deltav)*sizeof(T)); std::memset(ptr(0,0,0,dim-deltav),0,width*height*depth*deltav*sizeof(T)); } else cimg_forV(*this,k) { std::memmove(ptr(0,0,0,-deltav),data,width*height*depth*(dim+deltav)*sizeof(T)); std::memset(data,0,-deltav*width*height*depth*sizeof(T)); } break; case 1: if (deltav>0) { const int ndeltav = (deltav>=(int)dim)?dim-1:deltav; if (!ndeltav) return *this; std::memmove(data,ptr(0,0,0,ndeltav),width*height*depth*(dim-ndeltav)*sizeof(T)); T *ptrd = ptr(0,0,0,dim-ndeltav), *ptrs = ptr(0,0,0,dim-1); for (int l=0; l=(int)dim)?dim-1:-deltav; if (!ndeltav) return *this; std::memmove(ptr(0,0,0,ndeltav),data,width*height*depth*(dim-ndeltav)*sizeof(T)); T *ptrd = ptr(0,0,0,1); for (int l=0; l0) { std::memcpy(buf,data,width*height*depth*ndeltav*sizeof(T)); std::memmove(data,ptr(0,0,0,ndeltav),width*height*depth*(dim-ndeltav)*sizeof(T)); std::memcpy(ptr(0,0,0,dim-ndeltav),buf,width*height*depth*ndeltav*sizeof(T)); } else { std::memcpy(buf,ptr(0,0,0,dim+ndeltav),-ndeltav*width*height*depth*sizeof(T)); std::memmove(ptr(0,0,0,-ndeltav),data,width*height*depth*(dim+ndeltav)*sizeof(T)); std::memcpy(data,buf,-ndeltav*width*height*depth*sizeof(T)); } delete[] buf; } break; } } return *this; } //! Return a translated image. /** \param deltax Amount of displacement along the X-axis. \param deltay Amount of displacement along the Y-axis. \param deltaz Amount of displacement along the Z-axis. \param deltav Amount of displacement along the V-axis. \param border_condition Border condition. - \c border_condition can be : - 0 : Zero border condition (Dirichlet). - 1 : Nearest neighbors (Neumann). - 2 : Repeat Pattern (Fourier style). **/ CImg get_translate(const int deltax,const int deltay=0,const int deltaz=0,const int deltav=0, const int border_condition=0) const { return (+*this).translate(deltax,deltay,deltaz,deltav,border_condition); } //! Return a 2D representation of a 3D image, with three slices. CImg get_projections2d(const unsigned int px0,const unsigned int py0,const unsigned int pz0) const { if (is_empty()) return CImg(); const unsigned int x0=(px0>=width)?width-1:px0, y0=(py0>=height)?height-1:py0, z0=(pz0>=depth)?depth-1:pz0; CImg res(width+depth,height+depth,1,dim); res.fill((*this)[0]); { cimg_forXYV(*this,x,y,k) res(x,y,0,k) = (*this)(x,y,z0,k); } { cimg_forYZV(*this,y,z,k) res(width+z,y,0,k) = (*this)(x0,y,z,k); } { cimg_forXZV(*this,x,z,k) res(x,height+z,0,k) = (*this)(x,y0,z,k); } return res; } //! Return the image histogram. /** The histogram H of an image I is a 1D-function where H(x) is the number of occurences of the value x in I. \param nblevels = Number of different levels of the computed histogram. For classical images, this value is 256 (default value). You should specify more levels if you are working with CImg or images with high range of pixel values. \param val_min = Minimum value considered for the histogram computation. All pixel values lower than val_min won't be counted. \param val_max = Maximum value considered for the histogram computation. All pixel values higher than val_max won't be counted. \note If val_min==val_max==0 (default values), the function first estimates the minimum and maximum pixel values of the current image, then uses these values for the histogram computation. \result The histogram is returned as a 1D CImg image H, having a size of (nblevels,1,1,1) such that H(0) and H(nblevels-1) are respectively equal to the number of occurences of the values val_min and val_max in I. \note Histogram computation always returns a 1D function. Histogram of multi-valued (such as color) images are not multi-dimensional. \see get_equalize_histogram(), equalize_histogram() **/ CImg get_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) const { if (is_empty()) return CImg(); if (nblevels<1) throw CImgArgumentException("CImg<%s>::get_histogram() : Can't compute an histogram with %u levels", pixel_type(),nblevels); T vmin=val_min, vmax=val_max; CImg res(nblevels,1,1,1,0); if (vmin==vmax && vmin==0) { const CImgStats st(*this,false); vmin = (T)st.min; vmax = (T)st.max; } cimg_for(*this,ptr,T) { const int pos = (int)((*ptr-vmin)*(nblevels-1)/(vmax-vmin)); if (pos>=0 && pos<(int)nblevels) res[pos]++; } return res; } //! Equalize the image histogram /** This is the in-place version of \ref get_equalize_histogram() **/ CImg& equalize_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) { if (!is_empty()) { T vmin=val_min, vmax=val_max; if (vmin==vmax && vmin==0) { const CImgStats st(*this,false); vmin = (T)st.min; vmax = (T)st.max; } CImg hist = get_histogram(nblevels,vmin,vmax); float cumul=0; cimg_forX(hist,pos) { cumul+=hist[pos]; hist[pos]=cumul; } cimg_for(*this,ptr,T) { const int pos = (unsigned int)((*ptr-vmin)*(nblevels-1)/(vmax-vmin)); if (pos>=0 && pos<(int)nblevels) *ptr = (T)(vmin + (vmax-vmin)*hist[pos]/size()); } } return *this; } //! Return the histogram-equalized version of the current image. /** The histogram equalization is a classical image processing algorithm that enhances the image contrast by expanding its histogram. \param nblevels = Number of different levels of the computed histogram. For classical images, this value is 256 (default value). You should specify more levels if you are working with CImg or images with high range of pixel values. \param val_min = Minimum value considered for the histogram computation. All pixel values lower than val_min won't be changed. \param val_max = Maximum value considered for the histogram computation. All pixel values higher than val_max won't be changed. \note If val_min==val_max==0 (default values), the function acts on all pixel values of the image. \return A new image with same size is returned, where pixels have been equalized. \see get_histogram(), equalize_histogram() **/ CImg get_equalize_histogram(const unsigned int nblevels=256,const T val_min=(T)0,const T val_max=(T)0) const { return (+*this).equalize_histogram(nblevels,val_min,val_max); } //! Return the scalar image of vector norms. /** When dealing with vector-valued images (i.e images with dimv()>1), this function computes the L1,L2 or Linf norm of each vector-valued pixel. \param norm_type = Type of the norm being computed (1 = L1, 2 = L2, -1 = Linf). \return A scalar-valued image CImg with size (dimx(),dimy(),dimz(),1), where each pixel is the norm of the corresponding pixels in the original vector-valued image. \see get_orientation_pointwise, orientation_pointwise, norm_pointwise. **/ CImg::type> get_norm_pointwise(int norm_type=2) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImg(); CImg res(width,height,depth); switch(norm_type) { case -1: { // Linf norm cimg_forXYZ(*this,x,y,z) { restype n=0; cimg_forV(*this,v) { const restype tmp = (restype)cimg::abs((*this)(x,y,z,v)); if (tmp>n) n=tmp; res(x,y,z) = n; } } } break; case 1: { // L1 norm cimg_forXYZ(*this,x,y,z) { restype n=0; cimg_forV(*this,v) n+=cimg::abs((*this)(x,y,z,v)); res(x,y,z) = n; } } break; default: { // L2 norm cimg_forXYZ(*this,x,y,z) { restype n=0; cimg_forV(*this,v) n+=(*this)(x,y,z,v)*(*this)(x,y,z,v); res(x,y,z) = (restype)std::sqrt((double)n); } } break; } return res; } //! Replace each pixel value with its vector norm. /** This is the in-place version of \ref get_norm_pointwise(). \note Be careful when using this function on CImg with T=char, unsigned char,unsigned int or int. The vector norm is usually a floating point value, and a rough cast will be done here. **/ CImg& norm_pointwise() { return CImg(get_norm_pointwise()).swap(*this); } //! Return the image of normalized vectors /** When dealing with vector-valued images (i.e images with dimv()>1), this function return the image of normalized vectors (unit vectors). Null vectors are unchanged. The L2-norm is computed for the normalization. \return A new vector-valued image with same size, where each vector-valued pixels have been normalized. \see get_norm_pointwise, norm_pointwise, orientation_pointwise. **/ CImg::type> get_orientation_pointwise() const { typedef typename cimg::largest::type restype; if (is_empty()) return CImg(); return CImg(*this,false).orientation_pointwise(); } //! Replace each pixel value by its normalized vector /** This is the in-place version of \ref get_orientation_pointwise() **/ CImg& orientation_pointwise() { cimg_forXYZ(*this,x,y,z) { float n = 0.0f; cimg_forV(*this,v) n+=(float)((*this)(x,y,z,v)*(*this)(x,y,z,v)); n = (float)std::sqrt(n); if (n>0) cimg_forV(*this,v) (*this)(x,y,z,v)=(T)((*this)(x,y,z,v)/n); else cimg_forV(*this,v) (*this)(x,y,z,v)=0; } return *this; } //! Split image into a list CImgList<>. CImgList get_split(const char axe='x', const unsigned int nb=0) const { if (is_empty()) return CImgList(); CImgList res; switch (cimg::uncase(axe)) { case 'x': { if (nb>width) throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'x' into %u images.", pixel_type(),width,height,depth,dim,data,nb); res.assign(nb?nb:width); const unsigned int delta = width/res.size + ((width%res.size)?1:0); unsigned int l,x; for (l=0, x=0; lheight) throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'y' into %u images.", pixel_type(),width,height,depth,dim,data,nb); res.assign(nb?nb:height); const unsigned int delta = height/res.size + ((height%res.size)?1:0); unsigned int l,x; for (l=0, x=0; ldepth) throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'z' into %u images.", pixel_type(),width,height,depth,dim,data,nb); res.assign(nb?nb:depth); const unsigned int delta = depth/res.size + ((depth%res.size)?1:0); unsigned int l,x; for (l=0, x=0; ldim) throw CImgArgumentException("CImg<%s>::get_split() : Cannot split instance image (%u,%u,%u,%u,%p) along 'v' into %u images.", pixel_type(),width,height,depth,dim,data,nb); res.assign(nb?nb:dim); const unsigned int delta = dim/res.size + ((dim%res.size)?1:0); unsigned int l,x; for (l=0, x=0; l::get_split() : Unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe); break; } return res; } //! Append an image to another one CImg get_append(const CImg& img, const char axis='x', const char align='c') const { if (img.is_empty()) return *this; if (is_empty()) return img; CImgList temp(2); temp[0].width = width; temp[0].height = height; temp[0].depth = depth; temp[0].dim = dim; temp[0].data = data; temp[1].width = img.width; temp[1].height = img.height; temp[1].depth = img.depth; temp[1].dim = img.dim; temp[1].data = img.data; const CImg res = temp.get_append(axis,align); temp[0].width = temp[0].height = temp[0].depth = temp[0].dim = 0; temp[0].data = 0; temp[1].width = temp[1].height = temp[1].depth = temp[1].dim = 0; temp[1].data = 0; return res; } //! Append an image to another one (in-place version) CImg& append(const CImg& img, const char axis='x', const char align='c') { if (img.is_empty()) return *this; if (is_empty()) return (*this=img); return get_append(img,axis,align).swap(*this); } //! Return a list of images, corresponding to the XY-gradients of an image. /** \param scheme = Numerical scheme used for the gradient computation : - -1 = Backward finite differences - 0 = Centered finite differences - 1 = Forward finite differences - 2 = Using Sobel masks - 3 = Using rotation invariant masks - 4 = Using Deriche recusrsive filter. **/ CImgList::type> get_gradientXY(const int scheme=0) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImgList(2); CImgList res(2,width,height,depth,dim); switch(scheme) { case -1: { // backward finite differences CImg_3x3(I,restype); cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = Icc-Ipc; res[1](x,y,z,k) = Icc-Icp; } } break; case 1: { // forward finite differences CImg_2x2(I,restype); cimg_forZV(*this,z,k) cimg_for2x2(*this,x,y,z,k,I) { res[0](x,y,0,k) = Inc-Icc; res[1](x,y,z,k) = Icn-Icc; } } break; case 2: { // using Sobel mask CImg_3x3(I,restype); const float a = 1, b = 2; cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = -a*Ipp-b*Ipc-a*Ipn+a*Inp+b*Inc+a*Inn; res[1](x,y,z,k) = -a*Ipp-b*Icp-a*Inp+a*Ipn+b*Icn+a*Inn; } } break; case 3: { // using rotation invariant mask CImg_3x3(I,restype); const float a = (float)(0.25*(2-std::sqrt(2.0))), b = (float)(0.5f*(std::sqrt(2.0)-1)); cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = -a*Ipp-b*Ipc-a*Ipn+a*Inp+b*Inc+a*Inn; res[1](x,y,z,k) = -a*Ipp-b*Icp-a*Inp+a*Ipn+b*Icn+a*Inn; } } break; case 4: { // using Deriche filter with low standard variation res[0] = get_deriche(0,1,'x'); res[1] = get_deriche(0,1,'y'); } break; default: { // central finite differences CImg_3x3(I,restype); cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = 0.5f*(Inc-Ipc); res[1](x,y,z,k) = 0.5f*(Icn-Icp); } } break; } return res; } //! Return a list of images, corresponding to the XYZ-gradients of an image. /** \see get_gradientXY(). **/ CImgList::type> get_gradientXYZ(const int scheme=0) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImgList(3); CImgList res(3,width,height,depth,dim); CImg_3x3x3(I,restype); switch(scheme) { case -1: { // backward finite differences cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = Iccc-Ipcc; res[1](x,y,z,k) = Iccc-Icpc; res[2](x,y,z,k) = Iccc-Iccp; } } break; case 1: { // forward finite differences cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = Incc-Iccc; res[1](x,y,z,k) = Icnc-Iccc; res[2](x,y,z,k) = Iccn-Iccc; } } break; case 4: { // using Deriche filter with low standard variation res[0] = get_deriche(0,1,'x'); res[1] = get_deriche(0,1,'y'); res[2] = get_deriche(0,1,'z'); } break; default: { // central finite differences cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) { res[0](x,y,z,k) = 0.5f*(Incc-Ipcc); res[1](x,y,z,k) = 0.5f*(Icnc-Icpc); res[2](x,y,z,k) = 0.5f*(Iccn-Iccp); } } break; } return res; } //! Return the 2D structure tensor field of an image CImg::type> get_structure_tensorXY(const int scheme=1) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImg(); CImg res(width,height,depth,3,0); CImg_3x3(I,restype); switch (scheme) { case 0: { // classical central finite differences cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,0,k,I) { const restype ix = 0.5f*(Inc-Ipc), iy = 0.5f*(Icn-Icp); res(x,y,z,0)+=ix*ix; res(x,y,z,1)+=ix*iy; res(x,y,z,2)+=iy*iy; } } break; default: { // Precise forward/backward finite differences cimg_forZV(*this,z,k) cimg_for3x3(*this,x,y,0,k,I) { const restype ixf = Inc-Icc, ixb = Icc-Ipc, iyf = Icn-Icc, iyb = Icc-Icp; res(x,y,z,0) += 0.5f*(ixf*ixf+ixb*ixb); res(x,y,z,1) += 0.25f*(ixf*iyf+ixf*iyb+ixb*iyf+ixb*iyb); res(x,y,z,2) += 0.5f*(iyf*iyf+iyb*iyb); } } break; } return res; } //! In-place version of the previous function CImg& structure_tensorXY(const int scheme=1) { return get_structure_tensorXY(scheme).swap(*this); } //! Return the 3D structure tensor field of an image CImg::type> get_structure_tensorXYZ(const int scheme=1) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImg(); CImg res(width,height,depth,6,0); CImg_3x3x3(I,restype); switch (scheme) { case 0: { // classical central finite differences cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) { const restype ix = 0.5f*(Incc-Ipcc), iy = 0.5f*(Icnc-Icpc), iz = 0.5f*(Iccn-Iccp); res(x,y,z,0)+=ix*ix; res(x,y,z,1)+=ix*iy; res(x,y,z,2)+=ix*iz; res(x,y,z,3)+=iy*iy; res(x,y,z,4)+=iy*iz; res(x,y,z,5)+=iz*iz; } } break; default: { // Precise forward/backward finite differences cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) { const restype ixf = Incc-Iccc, ixb = Iccc-Ipcc, iyf = Icnc-Iccc, iyb = Iccc-Icpc, izf = Iccn-Iccc, izb = Iccc-Iccp; res(x,y,z,0) += 0.5f*(ixf*ixf + ixb*ixb); res(x,y,z,1) += 0.25f*(ixf*iyf + ixf*iyb + ixb*iyf + ixb*iyb); res(x,y,z,2) += 0.25f*(ixf*izf + ixf*izb + ixb*izf + ixb*izb); res(x,y,z,3) += 0.5f*(iyf*iyf + iyb*iyb); res(x,y,z,4) += 0.25f*(iyf*izf + iyf*izb + iyb*izf + iyb*izb); res(x,y,z,5) += 0.5f*(izf*izf + izb*izb); } } break; } return res; } //! In-place version of the previous function CImg& structure_tensorXYZ(const int scheme=1) { return get_structure_tensorXYZ(scheme).swap(*this); } //@} //------------------------------------- // //! \name Meshes and Triangulations //@{ //------------------------------------- struct _marching_squares_func { const CImg& ref; _marching_squares_func(const CImg& pref):ref(pref) {} float operator()(const float x, const float y) const { return (float)ref((int)x,(int)y); } }; struct _marching_cubes_func { const CImg& ref; _marching_cubes_func(const CImg& pref):ref(pref) {} float operator()(const float x, const float y, const float z) const { return (float)ref((int)x,(int)y,(int)z); } }; struct _marching_squares_func_float { const CImg& ref; _marching_squares_func_float(const CImg& pref):ref(pref) {} float operator()(const float x, const float y) const { return (float)ref.linear_pix2d(x,y); } }; struct _marching_cubes_func_float { const CImg& ref; _marching_cubes_func_float(const CImg& pref):ref(pref) {} float operator()(const float x, const float y, const float z) const { return (float)ref.linear_pix3d(x,y,z); } }; //! Get a vectorization of an implicit function defined by the instance image. template const CImg& marching_squares(const float isovalue,CImgList& points, CImgList& primitives) const { if (height<=1 || depth>1 || dim>1) throw CImgInstanceException("CImg<%s>::marching_squares() : Instance image (%u,%u,%u,%u,%p) is not a 2D scalar image.", pixel_type(),width,height,depth,dim,data); const _marching_squares_func func(*this); cimg::marching_squares(func,isovalue,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,1.0f,1.0f,points,primitives); return *this; } //! Get a vectorization of an implicit function defined by the instance image. /** This version allows to specify the marching squares resolution along x,y, and z. **/ template const CImg& marching_squares(const float isovalue, const float resx, const float resy, CImgList& points, CImgList& primitives) const { if (height<=1 || depth>1 || dim>1) throw CImgInstanceException("CImg<%s>::marching_squares() : Instance image (%u,%u,%u,%u,%p) is not a 2D scalar image.", pixel_type(),width,height,depth,dim,data); const _marching_squares_func_float func(*this); cimg::marching_squares(func,isovalue,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,resx,resy,points,primitives); return *this; } //! Get a triangulation of an implicit function defined by the instance image template const CImg& marching_cubes(const float isovalue,CImgList& points, CImgList& primitives, const bool invert_faces = false) const { if (depth<=1 || dim>1) throw CImgInstanceException("CImg<%s>::marching_cubes() : Instance image (%u,%u,%u,%u,%p) is not a 3D scalar image.", pixel_type(),width,height,depth,dim,data); const _marching_cubes_func func(*this); cimg::marching_cubes(func,isovalue,0.0f,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,dimz()-1.0f, 1.0f,1.0f,1.0f,points,primitives,invert_faces); return *this; } //! Get a triangulation of an implicit function defined by the instance image /** This version allows to specify the marching cube resolution along x,y and z. **/ template const CImg& marching_cubes(const float isovalue, const float resx, const float resy, const float resz, CImgList& points, CImgList& primitives, const bool invert_faces = false) const { if (depth<=1 || dim>1) throw CImgInstanceException("CImg<%s>::marching_cubes() : Instance image (%u,%u,%u,%u,%p) is not a 3D scalar image.", pixel_type(),width,height,depth,dim,data); const _marching_cubes_func_float func(*this); cimg::marching_cubes(func,isovalue,0.0f,0.0f,0.0f,dimx()-1.0f,dimy()-1.0f,dimz()-1.0f, resx,resy,resz,points,primitives,invert_faces); return *this; } //@} //---------------------------- // //! \name Color conversions //@{ //---------------------------- //! Return the default 256 colors palette. /** The default color palette is used by %CImg when displaying images on 256 colors displays. It consists in the quantification of the (R,G,B) color space using 3:3:2 bits for color coding (i.e 8 levels for the Red and Green and 4 levels for the Blue). \return A 256x1x1x3 color image defining the palette entries. **/ static CImg get_default_LUT8() { static CImg palette; if (!palette.data) { palette.assign(256,1,1,3); for (unsigned int index=0, r=16; r<256; r+=32) for (unsigned int g=16; g<256; g+=32) for (unsigned int b=32; b<256; b+=64) { palette(index,0) = r; palette(index,1) = g; palette(index++,2) = b; } } return palette; } //! Convert color pixels from (R,G,B) to match a specified palette. /** This function return a (R,G,B) image where colored pixels are constrained to match entries of the specified color \c palette. \param palette User-defined palette that will constraint the color conversion. \param dithering Enable/Disable Floyd-Steinberg dithering. \param indexing If \c true, each resulting image pixel is an index to the given color palette. Otherwise, (R,G,B) values of the palette are copied instead. **/ template CImg get_RGBtoLUT(const CImg& palette, const bool dithering=true,const bool indexing=false) const { if (is_empty()) return CImg(); if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoLUT() : Input image dimension is dim=%u, " "should be a (R,G,B) image.",pixel_type(),dim); if (palette.data && palette.dim!=3) throw CImgArgumentException("CImg<%s>::RGBtoLUT() : Given palette dimension is dim=%u, " "should be a (R,G,B) palette",pixel_type(),palette.dim); CImg res(width,height,depth,indexing?1:3), pal = palette.data?palette:CImg::get_default_LUT8(); float *line1 = new float[3*width], *line2 = new float[3*width], *pline1 = line1, *pline2 = line2; cimg_forZ(*this,z) { float *ptr=pline2; cimg_forX(*this,x) { *(ptr++)=(*this)(x,0,z,0); *(ptr++)=(*this)(x,0,z,1); *(ptr++)=(*this)(x,0,z,2); } cimg_forY(*this,y) { cimg::swap(pline1,pline2); if (y255?255:R); G = G<0?0:(G>255?255:G); B = B<0?0:(B>255?255:B); int best_index = 0; t Rbest=0,Gbest=0,Bbest=0; if (palette.data) { // find best match in given color palette float min = cimg::type::max(); cimg_forX(palette,off) { const t Rp = palette(off,0), Gp = palette(off,1), Bp = palette(off,2); const float error = (float)((Rp-R)*(Rp-R) + (Gp-G)*(Gp-G) + (Bp-B)*(Bp-B)); if (error>3) | ((unsigned char)Bbest>>6); } if (indexing) res(x,y,z) = best_index; else { res(x,y,z,0) = Rbest; res(x,y,z,1) = Gbest; res(x,y,z,2) = Bbest; } if (dithering) { // apply dithering to neighborhood pixels if needed const float dR = (float)(R-Rbest), dG = (float)(G-Gbest), dB = (float)(B-Bbest); if (x0) { *(--ptr2)+= dB*3/16; *(--ptr2)+= dG*3/16; *(--ptr2)+= dR*3/16; ptr2+=3; } if (x get_RGBtoLUT(const bool dithering=true, const bool indexing=false) const { CImg foo; return get_RGBtoLUT(foo,dithering,indexing); } //! Convert color pixels from (R,G,B) to match the specified color palette. /** This is the in-place version of get_RGBtoLUT(). **/ CImg& RGBtoLUT(const CImg& palette,const bool dithering=true,const bool indexing=false) { return get_RGBtoLUT(palette,dithering,indexing).swap(*this); } //! Convert color pixels from (R,G,B) to match the specified color palette. /** This is the in-place version of get_RGBtoLUT(). **/ CImg& RGBtoLUT(const bool dithering=true,const bool indexing=false) { CImg foo; return get_RGBtoLUT(foo,dithering,indexing).swap(*this); } //! Convert an indexed image to a (R,G,B) image using the specified color palette. template CImg get_LUTtoRGB(const CImg& palette) const { if (is_empty()) return CImg(); if (dim!=1) throw CImgInstanceException("CImg<%s>::LUTtoRGB() : Input image dimension is dim=%u, " "should be a LUT image",pixel_type(),dim); if (palette.data && palette.dim!=3) throw CImgArgumentException("CImg<%s>::LUTtoRGB() : Given palette dimension is dim=%u, " "should be a (R,G,B) palette",pixel_type(),palette.dim); CImg res(width,height,depth,3); CImg pal = palette.data?palette:get_default_LUT8(); cimg_forXYZ(*this,x,y,z) { const unsigned int index = (unsigned int)(*this)(x,y,z); res(x,y,z,0) = pal(index,0); res(x,y,z,1) = pal(index,1); res(x,y,z,2) = pal(index,2); } return res; } //! Convert an indexed image (with the default palette) to a (R,G,B) image. CImg get_LUTtoRGB() const { CImg foo; return get_LUTtoRGB(foo); } //! In-place version of get_LUTtoRGB(). CImg& LUTtoRGB(const CImg& palette) { return get_LUTtoRGB(palette).swap(*this); } //! In-place version of get_LUTroRGB(). CImg& LUTtoRGB() { CImg foo; return get_LUTtoRGB(foo).swap(*this); } //! Convert color pixels from (R,G,B) to (H,S,V). CImg& RGBtoHSV() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoHSV() : Input image dimension is dim=%u, " "should be a (R,G,B) image.",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const float R = (float)((*this)(x,y,z,0)/255.0f), G = (float)((*this)(x,y,z,1)/255.0f), B = (float)((*this)(x,y,z,2)/255.0f); const float m = cimg::min(R,G,B), v = cimg::max(R,G,B); float h,s; if (v==m) { h=-1; s=0; } else { const float f = (R==m)?(G-B):((G==m)?(B-R):(R-G)), i = (R==m)?3.0f:((G==m)?5.0f:1.0f); h = (i-f/(v-m)); s = (v-m)/v; if (h>=6.0f) h-=6.0f; h*=(float)cimg::PI/3.0f; } (*this)(x,y,z,0) = (T)h; (*this)(x,y,z,1) = (T)s; (*this)(x,y,z,2) = (T)v; } } return *this; } //! Convert color pixels from (H,S,V) to (R,G,B). CImg& HSVtoRGB() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::HSVtoRGB() : Input image dimension is dim=%u, " "should be a (H,S,V) image",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { float H = (float)((*this)(x,y,z,0)), S = (float)((*this)(x,y,z,1)), V = (float)((*this)(x,y,z,2)); float R=0,G=0,B=0; if (H<0) R=G=B=V; else { H/=(float)cimg::PI/3.0f; const int i = (int)std::floor(H); const float f = (i&1)?(H-i):(1.0f-H+i), m = V*(1.0f-S), n = V*(1.0f-S*f); switch(i) { case 6: case 0: R=V; G=n; B=m; break; case 1: R=n; G=V; B=m; break; case 2: R=m; G=V; B=n; break; case 3: R=m; G=n; B=V; break; case 4: R=n; G=m; B=V; break; case 5: R=V; G=m; B=n; break; } } (*this)(x,y,z,0) = (T)(R*255.0f); (*this)(x,y,z,1) = (T)(G*255.0f); (*this)(x,y,z,2) = (T)(B*255.0f); } } return *this; } //! Convert color pixels from (R,G,B) to (Y,Cb,Cr)_8 (Thanks to Chen Wang). CImg& RGBtoYCbCr() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoYCbCr() : Input image dimension is dim=%u, " "should be a (R,G,B) image (dim=3)",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const int R = (int)((*this)(x,y,z,0)), G = (int)((*this)(x,y,z,1)), B = (int)((*this)(x,y,z,2)); const int Y = ((66*R+129*G+25*B+128)>>8) + 16, Cb = ((-38*R-74*G+112*B+128)>>8) + 128, Cr = ((112*R-94*G-18*B+128)>>8) + 128; (*this)(x,y,z,0) = (T)(Y<0?0:(Y>255?255:Y)); (*this)(x,y,z,1) = (T)(Cb<0?0:(Cb>255?255:Cb)); (*this)(x,y,z,2) = (T)(Cr<0?0:(Cr>255?255:Cr)); } } return *this; } //! Convert color pixels from (Y,Cb,Cr)_8 to (R,G,B). CImg& YCbCrtoRGB() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::YCbCrtoRGB() : Input image dimension is dim=%u, " "should be a (Y,Cb,Cr)_8 image (dim=3)",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const int Y = (int)((*this)(x, y, z, 0)-16), Cb = (int)((*this)(x, y, z, 1)-128), Cr = (int)((*this)(x, y, z, 2)-128); const int R = ((298*Y + 409*Cr + 128) >> 8 ), G = ((298*Y - 100*Cb - 208*Cr + 128) >> 8 ), B = ((298*Y + 516*Cb + 128) >> 8 ); (*this)(x,y,z,0) = (T)(R<0?0:(R>255?255:R)); (*this)(x,y,z,1) = (T)(G<0?0:(G>255?255:G)); (*this)(x,y,z,2) = (T)(B<0?0:(B>255?255:B)); } } return *this; } //! Convert color pixels from (R,G,B) to (Y,U,V). CImg& RGBtoYUV() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoYUV() : Input image dimension is dim=%u, " "should be a (R,G,B) image (dim=3)",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const float R = (*this)(x,y,z,0)/255.0f, G = (*this)(x,y,z,1)/255.0f, B = (*this)(x,y,z,2)/255.0f, Y = (T)(0.299*R + 0.587*G + 0.114*B); (*this)(x,y,z,0) = Y; (*this)(x,y,z,1) = (T)(0.492*(B-Y)); (*this)(x,y,z,2) = (T)(0.877*(R-Y)); } } return *this; } //! Convert color pixels from (Y,U,V) to (R,G,B). CImg& YUVtoRGB() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::YUVtoRGB() : Input image dimension is dim=%u, " "should be a (Y,U,V) image (dim=3)",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const T Y = (*this)(x,y,z,0), U = (*this)(x,y,z,1), V = (*this)(x,y,z,2); (*this)(x,y,z,0) = (T)((Y + 1.140*V)*255.0f); (*this)(x,y,z,1) = (T)((Y - 0.395*U - 0.581*V)*255.0f); (*this)(x,y,z,2) = (T)((Y + 2.032*U)*255.0f); } } return *this; } //! Convert color pixels from (R,G,B) to (X,Y,Z)_709. CImg& RGBtoXYZ() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::RGBtoXYZ() : Input image dimension is dim=%u, " "should be a (R,G,B) image (dim=3)",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const float R = (float)((*this)(x,y,z,0)/255.0f), G = (float)((*this)(x,y,z,1)/255.0f), B = (float)((*this)(x,y,z,2)/255.0f); (*this)(x,y,z,0) = (T)(0.412453*R + 0.357580*G + 0.180423*B); (*this)(x,y,z,1) = (T)(0.212671*R + 0.715160*G + 0.072169*B); (*this)(x,y,z,2) = (T)(0.019334*R + 0.119193*G + 0.950227*B); } } return *this; } //! Convert (X,Y,Z)_709 pixels of a color image into the (R,G,B) color space. CImg& XYZtoRGB() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoRGB() : Input image dimension is dim=%u, " "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const float X = (float)(255.0f*(*this)(x,y,z,0)), Y = (float)(255.0f*(*this)(x,y,z,1)), Z = (float)(255.0f*(*this)(x,y,z,2)); (*this)(x,y,z,0) = (T)(3.240479*X - 1.537150*Y - 0.498535*Z); (*this)(x,y,z,1) = (T)(-0.969256*X + 1.875992*Y + 0.041556*Z); (*this)(x,y,z,2) = (T)(0.055648*X - 0.204043*Y + 1.057311*Z); } } return *this; } //! Convert (X,Y,Z)_709 pixels of a color image into the (L*,a*,b*) color space. #define cimg_Labf(x) ((x)>=0.008856?(std::pow(x,1/3.0)):(7.787*(x)+16.0/116.0)) #define cimg_Labfi(x) ((x)>=0.206893?((x)*(x)*(x)):(((x)-16.0/116.0)/7.787)) CImg& XYZtoLab() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoLab() : Input image dimension is dim=%u, " "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim); const double Xn = 0.412453 + 0.357580 + 0.180423, Yn = 0.212671 + 0.715160 + 0.072169, Zn = 0.019334 + 0.119193 + 0.950227; cimg_forXYZ(*this,x,y,z) { const T X = (*this)(x,y,z,0), Y = (*this)(x,y,z,1), Z = (*this)(x,y,z,2); const double XXn = X/Xn, YYn = Y/Yn, ZZn = Z/Zn, fX = cimg_Labf(XXn), fY = cimg_Labf(YYn), fZ = cimg_Labf(ZZn); (*this)(x,y,z,0) = (T)(116*fY-16); (*this)(x,y,z,1) = (T)(500*(fX-fY)); (*this)(x,y,z,2) = (T)(200*(fY-fZ)); } } return *this; } //! Convert (L,a,b) pixels of a color image into the (X,Y,Z) color space. CImg& LabtoXYZ() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::LabtoXYZ() : Input image dimension is dim=%u, " "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim); const double Xn = 0.412453 + 0.357580 + 0.180423, Yn = 0.212671 + 0.715160 + 0.072169, Zn = 0.019334 + 0.119193 + 0.950227; cimg_forXYZ(*this,x,y,z) { const T L = (*this)(x,y,z,0), a = (*this)(x,y,z,1), b = (*this)(x,y,z,2); const double cY = (L+16)/116.0, Y = Yn*cimg_Labfi(cY), pY = std::pow(Y/Yn,1.0/3), cX = a/500+pY, X = Xn*cX*cX*cX, cZ = pY-b/200, Z = Zn*cZ*cZ*cZ; (*this)(x,y,z,0) = (T)(X); (*this)(x,y,z,1) = (T)(Y); (*this)(x,y,z,2) = (T)(Z); } } return *this; } //! Convert (X,Y,Z)_709 pixels of a color image into the (x,y,Y) color space. CImg& XYZtoxyY() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::XYZtoxyY() : Input image dimension is dim=%u, " "should be a (X,Y,Z) image (dim=3)",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const T X = (*this)(x,y,z,0), Y = (*this)(x,y,z,1), Z = (*this)(x,y,z,2), sum = (X+Y+Z), nsum = sum>0?sum:1; (*this)(x,y,z,0) = X/nsum; (*this)(x,y,z,1) = Y/nsum; (*this)(x,y,z,2) = Y; } } return *this; } //! Convert (x,y,Y) pixels of a color image into the (X,Y,Z)_709 color space. CImg& xyYtoXYZ() { if (!is_empty()) { if (dim!=3) throw CImgInstanceException("CImg<%s>::xyYtoXYZ() : Input image dimension is dim=%u, " "should be a (x,y,Y) image (dim=3)",pixel_type(),dim); cimg_forXYZ(*this,x,y,z) { const T px = (*this)(x,y,z,0), py = (*this)(x,y,z,1), Y = (*this)(x,y,z,2), ny = py>0?py:1; (*this)(x,y,z,0) = (T)(px*Y/ny); (*this)(x,y,z,1) = Y; (*this)(x,y,z,2) = (T)((1-px-py)*Y/ny); } } return *this; } //! In-place version of get_RGBtoLab(). CImg& RGBtoLab() { return RGBtoXYZ().XYZtoLab(); } //! In-place version of get_LabtoRGb(). CImg& LabtoRGB() { return LabtoXYZ().XYZtoRGB(); } //! In-place version of get_RGBtoxyY(). CImg& RGBtoxyY() { return RGBtoXYZ().XYZtoxyY(); } //! In-place version of get_xyYtoRGB(). CImg& xyYtoRGB() { return xyYtoXYZ().XYZtoRGB(); } //! Convert a (R,G,B) image to a (H,S,V) one. CImg get_RGBtoHSV() const { return (+*this).RGBtoHSV(); } //! Convert a (H,S,V) image to a (R,G,B) one. CImg get_HSVtoRGB() const { return (+*this).HSVtoRGB(); } //! Convert a (R,G,B) image to a (Y,Cb,Cr) one. CImg get_RGBtoYCbCr() const { return (+*this).RGBtoYCbCr(); } //! Convert a (Y,Cb,Cr) image to a (R,G,B) one. CImg get_YCbCrtoRGB() const { return (+*this).YCbCrtoRGB(); } //! Convert a (R,G,B) image into a (Y,U,V) one. CImg::type> get_RGBtoYUV() const { typedef typename cimg::largest::type restype; return CImg(*this,false).RGBtoYUV(); } //! Convert a (Y,U,V) image into a (R,G,B) one. CImg get_YUVtoRGB() const { return (+*this).YUVtoRGB(); } //! Convert a (R,G,B) image to a (X,Y,Z) one. CImg::type> get_RGBtoXYZ() const { typedef typename cimg::largest::type restype; return CImg(*this,false).RGBtoXYZ(); } //! Convert a (X,Y,Z) image to a (R,G,B) one. CImg get_XYZtoRGB() const { return (+*this).XYZtoRGB(); } //! Convert a (X,Y,Z) image to a (L,a,b) one. CImg get_XYZtoLab() const { return (+*this).XYZtoLab(); } //! Convert a (L,a,b) image to a (X,Y,Z) one. CImg get_LabtoXYZ() const { return (+*this).LabtoXYZ(); } //! Convert a (X,Y,Z) image to a (x,y,Y) one. CImg get_XYZtoxyY() const { return (+*this).XYZtoxyY(); } //! Convert a (x,y,Y) image to a (X,Y,Z) one. CImg get_xyYtoXYZ() const { return (+*this).xyYtoXYZ(); } //! Convert a (R,G,B) image to a (L,a,b) one. CImg get_RGBtoLab() const { return (+*this).RGBtoLab(); } //! Convert a (L,a,b) image to a (R,G,B) one. CImg get_LabtoRGB() const { return (+*this).LabtoRGB(); } //! Convert a (R,G,B) image to a (x,y,Y) one. CImg get_RGBtoxyY() const { return (+*this).RGBtoxyY(); } //! Convert a (x,y,Y) image to a (R,G,B) one. CImg get_xyYtoRGB() const { return (+*this).xyYtoRGB(); } //@} //------------------- // //! \name Drawing //@{ //------------------- // Should be used only by member functions. Not an user-friendly function. // Pre-requisites : x0=0) { if (opacity>=1) { int off = whz-dx-1; if (sizeof(T)!=1) cimg_forV(*this,k) { const T val = (T)(*(col++)*brightness); for (int x=dx; x>=0; x--) *(ptrd++)=val; ptrd+=off; } else cimg_forV(*this,k) { std::memset(ptrd,(int)(*(col++)*brightness),dx+1); ptrd+=whz; } col-=dim; } else { int off = whz-dx-1; cimg_forV(*this,k) { const T val = (T)(*(col++)*brightness); for (int x=dx; x>=0; x--) { *ptrd = (T)(val*nopacity + *ptrd*copacity); ptrd++; } ptrd+=off; } col-=dim; } } } return *this; } CImg& draw_scanline(const T *const color,const float opacity=1) { return draw_scanline(0,0,0,color,opacity,1.0f,true); } //! Draw a colored point in the instance image, at coordinates (\c x0,\c y0,\c z0). /** \param x0 = X-coordinate of the vector-valued pixel to plot. \param y0 = Y-coordinate of the vector-valued pixel to plot. \param z0 = Z-coordinate of the vector-valued pixel to plot. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing. \note Clipping is supported. **/ CImg& draw_point(const int x0,const int y0,const int z0, const T *const color,const float opacity=1) { if (!is_empty()) { if (!color) throw CImgArgumentException("CImg<%s>::draw_point() : Specified color is (null)",pixel_type()); if (x0>=0 && y0>=0 && z0>=0 && x0=1) cimg_forV(*this,k) { *ptrd = *(col++); ptrd+=whz; } else cimg_forV(*this,k) { *ptrd=(T)(*(col++)*nopacity + *ptrd*copacity); ptrd+=whz; } } } return *this; } //! Draw a colored point in the instance image, at coordinates (\c x0,\c y0). /** \param x0 = X-coordinate of the vector-valued pixel to plot. \param y0 = Y-coordinate of the vector-valued pixel to plot. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing. \note Clipping is supported. **/ CImg& draw_point(const int x0,const int y0,const T *const color,const float opacity=1) { return draw_point(x0,y0,0,color,opacity); } //! Draw a 2D colored line in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1). /** \param x0 = X-coordinate of the starting point of the line. \param y0 = Y-coordinate of the starting point of the line. \param x1 = X-coordinate of the ending point of the line. \param y1 = Y-coordinate of the ending point of the line. \param color = array of dimv() values of type \c T, defining the drawing color. \param pattern = An integer whose bits describes the line pattern. \param opacity = opacity of the drawing. \note Clipping is supported. **/ CImg& draw_line(const int x0,const int y0,const int x1,const int y1, const T *const color,const unsigned int pattern=~0L,const float opacity=1) { if (!is_empty()) { if (!color) throw CImgArgumentException("CImg<%s>::draw_line() : Specified color is (null)",pixel_type()); const T* col=color; int nx0 = x0, nx1 = x1, ny0 = y0, ny1 = y1; if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1); if (nx1<0 || nx0>=dimx()) return *this; if (nx0<0) { ny0-=nx0*(ny1-ny0)/(nx1-nx0); nx0=0; } if (nx1>=dimx()) { ny1+=(nx1-dimx())*(ny0-ny1)/(nx1-nx0); nx1=dimx()-1;} if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1); if (ny1<0 || ny0>=dimy()) return *this; if (ny0<0) { nx0-=ny0*(nx1-nx0)/(ny1-ny0); ny0=0; } if (ny1>=dimy()) { nx1+=(ny1-dimy())*(nx0-nx1)/(ny1-ny0); ny1=dimy()-1;} const bool steep = (ny1-ny0)>cimg::abs(nx1-nx0); if (steep) cimg::swap(nx0,ny0,nx1,ny1); if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1); const int dx = nx1-nx0, dy = cimg::abs(ny1-ny0), offx = steep?width:1, offy = (ny0=1) cimg_forV(*this,k) { unsigned int hatch=1; T *ptrd = steep?ptr(ny0,nx0,0,k):ptr(nx0,ny0,0,k); const T c = *(col++); for (int error=0, x=nx0; x<=nx1; x++) { if (!(~pattern) || (~pattern && pattern&hatch)) *ptrd=c; ptrd+=offx; if (((error+=dy)<<1)>=dx) { ptrd+=offy; error-=dx; } if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1)); } } else { const float nopacity = cimg::abs(opacity), copacity=1-cimg::max(opacity,0.0f); cimg_forV(*this,k) { unsigned int hatch=1; T *ptrd = steep?ptr(ny0,nx0,0,k):ptr(nx0,ny0,0,k); const T c = *(col++); for (int error=0, x=nx0; x<=nx1; x++) { if (!(~pattern) || (~pattern && pattern&hatch)) *ptrd = (T)(c*nopacity + copacity*(*ptrd)); ptrd+=offx; if (((error+=dy)<<1)>=dx) { ptrd+=offy; error-=dx; } if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1)); } } } } return *this; } //! Draw a 3D colored line in the instance image, at coordinates (\c x0,\c y0,\c z0)-(\c x1,\c y1,\c z1). /** \param x0 = X-coordinate of the starting point of the line. \param y0 = Y-coordinate of the starting point of the line. \param z0 = Z-coordinate of the starting point of the line. \param x1 = X-coordinate of the ending point of the line. \param y1 = Y-coordinate of the ending point of the line. \param z1 = Z-coordinate of the ending point of the line. \param color = array of dimv() values of type \c T, defining the drawing color. \param pattern = An integer whose bits describes the line pattern. \param opacity = opacity of the drawing. \note Clipping is supported. **/ CImg& draw_line(const int x0, const int y0, const int z0, const int x1, const int y1, const int z1, const T *const color, const unsigned int pattern=~0L, const float opacity=1) { if (!is_empty()) { if (!color) throw CImgArgumentException("CImg<%s>::draw_line() : Specified color is (null)",pixel_type()); const T* col=color; unsigned int hatch=1; int nx0 = x0, ny0 = y0, nz0 = z0, nx1 = x1, ny1 = y1, nz1 = z1; if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1); if (nx1<0 || nx0>=dimx()) return *this; if (nx0<0) { const int D=1+nx1-nx0; ny0-=nx0*(1+ny1-ny0)/D; nz0-=nx0*(1+nz1-nz0)/D; nx0=0; } if (nx1>=dimx()) { const int d=nx1-dimx(), D=1+nx1-nx0; ny1+=d*(1+ny0-ny1)/D; nz1+=d*(1+nz0-nz1)/D; nx1=dimx()-1;} if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1); if (ny1<0 || ny0>=dimy()) return *this; if (ny0<0) { const int D=1+ny1-ny0; nx0-=ny0*(1+nx1-nx0)/D; nz0-=ny0*(1+nz1-nz0)/D; ny0=0; } if (ny1>=dimy()) { const int d=ny1-dimy(), D=1+ny1-ny0; nx1+=d*(1+nx0-nx1)/D; nz1+=d*(1+nz0-nz1)/D; ny1=dimy()-1;} if (nz0>nz1) cimg::swap(nx0,nx1,ny0,ny1,nz0,nz1); if (nz1<0 || nz0>=dimz()) return *this; if (nz0<0) { const int D=1+nz1-nz0; nx0-=nz0*(1+nx1-nx0)/D; ny0-=nz0*(1+ny1-ny0)/D; nz0=0; } if (nz1>=dimz()) { const int d=nz1-dimz(), D=1+nz1-nz0; nx1+=d*(1+nx0-nx1)/D; ny1+=d*(1+ny0-ny1)/D; nz1=dimz()-1;} const unsigned int dmax = cimg::max(cimg::abs(nx1-nx0),cimg::abs(ny1-ny0),nz1-nz0), whz = width*height*depth; const float px = (nx1-nx0)/(float)dmax, py = (ny1-ny0)/(float)dmax, pz = (nz1-nz0)/(float)dmax; float x = (float)nx0, y = (float)ny0, z = (float)nz0; if (opacity>=1) for (unsigned int t=0; t<=dmax; t++) { if (!(~pattern) || (~pattern && pattern&hatch)) { T* ptrd = ptr((unsigned int)x,(unsigned int)y,(unsigned int)z,0); cimg_forV(*this,k) { *ptrd=*(col++); ptrd+=whz; } col-=dim; } x+=px; y+=py; z+=pz; if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1)); } else { const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); for (unsigned int t=0; t<=dmax; t++) { if (!(~pattern) || (~pattern && pattern&hatch)) { T* ptrd = ptr((unsigned int)x,(unsigned int)y,(unsigned int)z,0); cimg_forV(*this,k) { *ptrd = (T)(*(col++)*nopacity + copacity*(*ptrd)); ptrd+=whz; } col-=dim; } x+=px; y+=py; z+=pz; if (pattern) hatch=(hatch<<1)+(hatch>>(sizeof(unsigned int)*8-1)); } } } return *this; } //! Draw a 2D textured line in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1). /** \param x0 = X-coordinate of the starting point of the line. \param y0 = Y-coordinate of the starting point of the line. \param x1 = X-coordinate of the ending point of the line. \param y1 = Y-coordinate of the ending point of the line. \param texture = a colored texture image used to draw the line color. \param tx0 = X-coordinate of the starting point of the texture. \param ty0 = Y-coordinate of the starting point of the texture. \param tx1 = X-coordinate of the ending point of the texture. \param ty1 = Y-coordinate of the ending point of the texture. \param opacity = opacity of the drawing. \note Clipping is supported, but texture coordinates do not support clipping. **/ template CImg& draw_line(const int x0,const int y0,const int x1,const int y1, const CImg& texture, const int tx0,const int ty0,const int tx1,const int ty1, const float opacity=1) { if (!is_empty()) { if (texture.is_empty() || texture.dim::draw_line() : specified texture (%u,%u,%u,%u,%p) has wrong dimensions.", pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data); int nx0=x0, ny0=y0, nx1=x1, ny1=y1, ntx0=tx0, nty0=ty0, ntx1=tx1, nty1=ty1; if (nx0>nx1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1); if (nx1<0 || nx0>=dimx()) return *this; if (nx0<0) { const int D=nx1-nx0; ny0-=nx0*(ny1-ny0)/D; ntx0-=nx0*(ntx1-ntx0)/D; nty0-=nx0*(nty1-nty0)/D; nx0=0; } if (nx1>=dimx()) { const int d=nx1-dimx(),D=nx1-nx0; ny1+=d*(ny0-ny1)/D; ntx1+=d*(ntx0-ntx1)/D; nty1+=d*(nty0-nty1)/D; nx1=dimx()-1; } if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1); if (ny1<0 || ny0>=dimy()) return *this; if (ny0<0) { const int D=ny1-ny0; nx0-=ny0*(nx1-nx0)/D; ntx0-=ny0*(ntx1-ntx0)/D; nty0-=ny0*(nty1-nty0)/D; ny0=0; } if (ny1>=dimy()) { const int d=ny1-dimy(),D=ny1-ny0; nx1+=d*(nx0-nx1)/D; ntx1+=d*(ntx0-ntx1)/D; nty1+=d*(nty0-nty1)/D; ny1=dimy()-1; } const unsigned int dmax = (unsigned int)cimg::max(cimg::abs(nx1-nx0),ny1-ny0), whz = width*height*depth, twhz = texture.width*texture.height*texture.depth; const float px = dmax?(nx1-nx0)/(float)dmax:0, py = dmax?(ny1-ny0)/(float)dmax:0, tpx = dmax?(ntx1-ntx0)/(float)dmax:0, tpy = dmax?(nty1-nty0)/(float)dmax:0; float x = (float)nx0, y = (float)ny0, tx = (float)ntx0, ty = (float)nty0; if (opacity>=1) for (unsigned int tt=0; tt<=dmax; tt++) { T *ptrd = ptr((unsigned int)x,(unsigned int)y,0,0); const t *ptrs = texture.ptr((unsigned int)tx,(unsigned int)ty,0,0); cimg_forV(*this,k) { *ptrd = (T)*ptrs; ptrd+=whz; ptrs+=twhz; } x+=px; y+=py; tx+=tpx; ty+=tpy; } else { const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); for (unsigned int tt=0; tt<=dmax; tt++) { T *ptrd = ptr((unsigned int)x,(unsigned int)y,0,0); const t *ptrs = texture.ptr((unsigned int)tx,(unsigned int)ty,0,0); cimg_forV(*this,k) { *ptrd = (T)(nopacity*(*ptrs) + copacity*(*ptrd)); ptrd+=whz; ptrs+=twhz; } x+=px; y+=py; tx+=tpx; ty+=tpy; } } } return *this; } //! Draw a 2D colored arrow in the instance image, at coordinates (\c x0,\c y0)->(\c x1,\c y1). /** \param x0 = X-coordinate of the starting point of the arrow (tail). \param y0 = Y-coordinate of the starting point of the arrow (tail). \param x1 = X-coordinate of the ending point of the arrow (head). \param y1 = Y-coordinate of the ending point of the arrow (head). \param color = array of dimv() values of type \c T, defining the drawing color. \param angle = aperture angle of the arrow head \param length = length of the arrow head. If <0, described as a percentage of the arrow length. \param pattern = An integer whose bits describes the line pattern. \param opacity = opacity of the drawing. \note Clipping is supported. **/ CImg& draw_arrow(const int x0,const int y0,const int x1,const int y1, const T *const color, const float angle=30,const float length=-10,const unsigned int pattern=~0L,const float opacity=1) { if (!is_empty()) { const float u = (float)(x0-x1), v = (float)(y0-y1), sq = u*u+v*v, deg = (float)(angle*cimg::PI/180), ang = (sq>0)?(float)std::atan2(v,u):0.0f, l = (length>=0)?length:-length*(float)std::sqrt(sq)/100; if (sq>0) { const double cl = std::cos(ang-deg), sl = std::sin(ang-deg), cr = std::cos(ang+deg), sr = std::sin(ang+deg); const int xl = x1+(int)(l*cl), yl = y1+(int)(l*sl), xr = x1+(int)(l*cr), yr = y1+(int)(l*sr), xc = x1+(int)((l+1)*(cl+cr))/2, yc = y1+(int)((l+1)*(sl+sr))/2; draw_line(x0,y0,xc,yc,color,pattern,opacity).draw_triangle(x1,y1,xl,yl,xr,yr,color,opacity); } else draw_point(x0,y0,color,opacity); } return *this; } //! Draw a sprite image in the instance image, at coordinates (\c x0,\c y0,\c z0,\c v0). /** \param sprite = sprite image. \param x0 = X-coordinate of the sprite position in the instance image. \param y0 = Y-coordinate of the sprite position in the instance image. \param z0 = Z-coordinate of the sprite position in the instance image. \param v0 = V-coordinate of the sprite position in the instance image. \param opacity = opacity of the drawing. \note Clipping is supported. **/ template CImg& draw_image(const CImg& sprite, const int x0=0,const int y0=0,const int z0=0,const int v0=0,const float opacity=1) { if (!is_empty()) { if (sprite.is_empty()) throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.", pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data); const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0); const int lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0), lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0), lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0), lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0); const t *ptrs = sprite.ptr()-(bx?x0:0)-(by?y0*sprite.dimx():0)+(bz?z0*sprite.dimx()*sprite.dimy():0)+ (bv?v0*sprite.dimx()*sprite.dimy()*sprite.dimz():0); const unsigned int offX = width-lX, soffX = sprite.width-lX, offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY), offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ); const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0); if (lX>0 && lY>0 && lZ>0 && lV>0) for (int v=0; v=1) for (int x=0; x::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.", pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data); if (this==&sprite) return draw_image(CImg(sprite),x0,y0,z0,v0,opacity); const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0); const int lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0), lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0), lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0), lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0); const T *ptrs = sprite.ptr()-(bx?x0:0)-(by?y0*sprite.dimx():0)+(bz?z0*sprite.dimx()*sprite.dimy():0)+ (bv?v0*sprite.dimx()*sprite.dimy()*sprite.dimz():0); const unsigned int offX = width-lX, soffX = sprite.width-lX, offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY), offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ), slX = lX*sizeof(T); const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0); if (lX>0 && lY>0 && lZ>0 && lV>0) for (int v=0; v=1) for (int y=0; y CImg& draw_image(const CImg& sprite, const CImg& mask, const int x0=0, const int y0=0, const int z0=0, const int v0=0, const tm mask_valmax='\1', const float opacity=1) { if (!is_empty()) { if (sprite.is_empty()) throw CImgArgumentException("CImg<%s>::draw_image() : Specified sprite image (%u,%u,%u,%u,%p) is empty.", pixel_type(),sprite.width,sprite.height,sprite.depth,sprite.dim,sprite.data); if (mask.is_empty()) throw CImgArgumentException("CImg<%s>::draw_image() : Specified mask image (%u,%u,%u,%u,%p) is empty.", pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); if ((void*)this==(void*)&sprite) return draw_image(CImg(sprite),mask,x0,y0,z0,v0); if(mask.width!=sprite.width || mask.height!=sprite.height || mask.depth!=sprite.depth) throw CImgArgumentException("CImg<%s>::draw_image() : Mask dimension is (%u,%u,%u,%u), while sprite is (%u,%u,%u,%u)", pixel_type(),mask.width,mask.height,mask.depth,mask.dim,sprite.width,sprite.height,sprite.depth,sprite.dim); const bool bx=(x0<0), by=(y0<0), bz=(z0<0), bv=(v0<0); const int lX = sprite.dimx() - (x0+sprite.dimx()>dimx()?x0+sprite.dimx()-dimx():0) + (bx?x0:0), lY = sprite.dimy() - (y0+sprite.dimy()>dimy()?y0+sprite.dimy()-dimy():0) + (by?y0:0), lZ = sprite.dimz() - (z0+sprite.dimz()>dimz()?z0+sprite.dimz()-dimz():0) + (bz?z0:0), lV = sprite.dimv() - (v0+sprite.dimv()>dimv()?v0+sprite.dimv()-dimv():0) + (bv?v0:0); const int coff = -(bx?x0:0)-(by?y0*mask.dimx():0)-(bz?z0*mask.dimx()*mask.dimy():0)- (bv?v0*mask.dimx()*mask.dimy()*mask.dimz():0), ssize = mask.dimx()*mask.dimy()*mask.dimz(); const ti *ptrs = sprite.ptr() + coff; const tm *ptrm = mask.ptr() + coff; const unsigned int offX = width-lX, soffX = sprite.width-lX, offY = width*(height-lY), soffY = sprite.width*(sprite.height-lY), offZ = width*height*(depth-lZ), soffZ = sprite.width*sprite.height*(sprite.depth-lZ); T *ptrd = ptr(x0<0?0:x0,y0<0?0:y0,z0<0?0:z0,v0<0?0:v0); if (lX>0 && lY>0 && lZ>0 && lV>0) for (int v=0; v=dimx()?dimx()-1-nx1:0) + (nx0<0?nx0:0), lY = (1+ny1-ny0) + (ny1>=dimy()?dimy()-1-ny1:0) + (ny0<0?ny0:0), lZ = (1+nz1-nz0) + (nz1>=dimz()?dimz()-1-nz1:0) + (nz0<0?nz0:0), lV = (1+nv1-nv0) + (nv1>=dimv()?dimv()-1-nv1:0) + (nv0<0?nv0:0); const unsigned int offX = width-lX, offY = width*(height-lY), offZ = width*height*(depth-lZ); const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); T *ptrd = ptr(nx0<0?0:nx0,ny0<0?0:ny0,nz0<0?0:nz0,nv0<0?0:nv0); if (lX>0 && lY>0 && lZ>0 && lV>0) for (int v=0; v=1) { if (sizeof(T)!=1) { for (int x=0; x::draw_rectangle : specified color is (null)",pixel_type()); cimg_forV(*this,k) draw_rectangle(x0,y0,z0,k,x1,y1,z1,k,color[k],opacity); return *this; } //! Draw a 2D filled colored rectangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1). /** \param x0 = X-coordinate of the upper-left rectangle corner in the instance image. \param y0 = Y-coordinate of the upper-left rectangle corner in the instance image. \param x1 = X-coordinate of the lower-right rectangle corner in the instance image. \param y1 = Y-coordinate of the lower-right rectangle corner in the instance image. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing. \note Clipping is supported. **/ CImg& draw_rectangle(const int x0,const int y0,const int x1,const int y1, const T *const color,const float opacity=1) { draw_rectangle(x0,y0,0,x1,y1,depth-1,color,opacity); return *this; } //! Draw a 2D filled colored triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2). /** \param x0 = X-coordinate of the first corner in the instance image. \param y0 = Y-coordinate of the first corner in the instance image. \param x1 = X-coordinate of the second corner in the instance image. \param y1 = Y-coordinate of the second corner in the instance image. \param x2 = X-coordinate of the third corner in the instance image. \param y2 = Y-coordinate of the third corner in the instance image. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing (<1) \param brightness = brightness of the drawing (in [0,1]) \note Clipping is supported. **/ CImg& draw_triangle(const int x0,const int y0, const int x1,const int y1, const int x2,const int y2, const T *const color, const float opacity=1, const float brightness=1) { draw_scanline(color,opacity); int nx0 = x0, ny0 = y0, nx1 = x1, ny1 = y1, nx2 = x2, ny2 = y2; if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1); if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2); if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2); if (ny0>=dimy() || ny2<0) return *this; const float p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0), p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0), p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1); float xleft = (float)nx0, xright = xleft, pleft = (p1dimy()?height:ny1; for (int y=ny0<0?0:ny0; y=dimy()?height-1:ny2; for (int yy=ny1<0?0:ny1; yy<=yb; yy++) { draw_scanline((int)xleft,(int)xright,yy,color,opacity,brightness); xleft+=pleft; xright+=pright; } return *this; } //! Draw a 2D Gouraud-filled triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2). /** \param x0 = X-coordinate of the first corner in the instance image. \param y0 = Y-coordinate of the first corner in the instance image. \param x1 = X-coordinate of the second corner in the instance image. \param y1 = Y-coordinate of the second corner in the instance image. \param x2 = X-coordinate of the third corner in the instance image. \param y2 = Y-coordinate of the third corner in the instance image. \param color = array of dimv() values of type \c T, defining the global drawing color. \param c0 = brightness of the first corner. \param c1 = brightness of the second corner. \param c2 = brightness of the third corner. \param opacity = opacity of the drawing. \note Clipping is supported. **/ CImg& draw_triangle(const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const T *const color, const float c0, const float c1, const float c2, const float opacity=1) { if (!is_empty()) { int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,whz=width*height*depth; float nc0=c0,nc1=c1,nc2=c2; if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nc0,nc1); if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,nc0,nc2); if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,nc1,nc2); if (ny0>=dimy() || ny2<0) return *this; const float p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0), p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0), p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1), cp1 = (ny1-ny0)?(nc1-nc0)/(float)(ny1-ny0):0, cp2 = (ny2-ny0)?(nc2-nc0)/(float)(ny2-ny0):0, cp3 = (ny2-ny1)?(nc2-nc1)/(float)(ny2-ny1):0; const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); float pleft,pright,cpleft,cpright,xleft=(float)nx0,xright=xleft,cleft=nc0,cright=cleft; if (p1=0)?cleft:(cleft-xleft*cp); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { const T col = color[k]; float c=ci; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*col); c+=cp; } ptrd+=offx; } else cimg_forV(*this,k) { const T col = color[k]; float c=ci; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*col+copacity*(*ptrd)); ptrd++; c+=cp; } ptrd+=offx; } } xleft+=pleft; xright+=pright; cleft+=cpleft; cright+=cpright; } if (p1=dimy()?(height-1):ny2; for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) { const int dx = (int)xright-(int)xleft; const float cp = dx?(cright-cleft)/dx:0, ci = (xleft>=0)?cleft:(cleft-xleft*cp); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { const T col = color[k]; float c=ci; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*col); c+=cp; } ptrd+=offx; } else cimg_forV(*this,k) { const T col = color[k]; float c=ci; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*col+copacity*(*ptrd)); ptrd++; c+=cp; } ptrd+=offx; } } xleft+=pleft; xright+=pright; cleft+=cpleft; cright+=cpright; } } return *this; } //! Draw a 2D phong-shaded triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2). /** \param x0 = X-coordinate of the first corner in the instance image. \param y0 = Y-coordinate of the first corner in the instance image. \param x1 = X-coordinate of the second corner in the instance image. \param y1 = Y-coordinate of the second corner in the instance image. \param x2 = X-coordinate of the third corner in the instance image. \param y2 = Y-coordinate of the third corner in the instance image. \param color = array of dimv() values of type \c T, defining the global drawing color. \param light = light image. \param lx0 = X-coordinate of the first corner in the light image. \param ly0 = Y-coordinate of the first corner in the light image. \param lx1 = X-coordinate of the second corner in the light image. \param ly1 = Y-coordinate of the second corner in the light image. \param lx2 = X-coordinate of the third corner in the light image. \param ly2 = Y-coordinate of the third corner in the light image. \param opacity = opacity of the drawing. \note Clipping is supported, but texture coordinates do not support clipping. **/ template CImg& draw_triangle(const int x0,const int y0, const int x1,const int y1, const int x2,const int y2, const T *const color, const CImg& light, const int lx0,const int ly0, const int lx1,const int ly1, const int lx2,const int ly2, const float opacity=1.0f) { if (!is_empty()) { if (light.is_empty()) throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified light texture (%u,%u,%u,%u,%p) is empty.", pixel_type(),light.width,light.height,light.depth,light.dim,light.data); int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,nlx0=lx0,nly0=ly0,nlx1=lx1,nly1=ly1,nlx2=lx2,nly2=ly2,whz=width*height*depth; if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,nlx0,nlx1,nly0,nly1); if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,nlx0,nlx2,nly0,nly2); if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,nlx1,nlx2,nly1,nly2); if (ny0>=dimy() || ny2<0) return *this; const float p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0), p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0), p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1), lpx1 = (ny1-ny0)?(nlx1-nlx0)/(float)(ny1-ny0):0, lpy1 = (ny1-ny0)?(nly1-nly0)/(float)(ny1-ny0):0, lpx2 = (ny2-ny0)?(nlx2-nlx0)/(float)(ny2-ny0):0, lpy2 = (ny2-ny0)?(nly2-nly0)/(float)(ny2-ny0):0, lpx3 = (ny2-ny1)?(nlx2-nlx1)/(float)(ny2-ny1):0, lpy3 = (ny2-ny1)?(nly2-nly1)/(float)(ny2-ny1):0; const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); float pleft,pright,lpxleft,lpyleft,lpxright,lpyright, xleft=(float)nx0,xright=xleft,lxleft=(float)nlx0,lyleft=(float)nly0,lxright=lxleft,lyright=lyleft; if (p1=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)), lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy)); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { float lx=lxi, ly=lyi; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*color[k]); lx+=lpx; ly+=lpy; } ptrd+=offx; } else cimg_forV(*this,k) { float lx=lxi, ly=lyi; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*color[k]+copacity*(*ptrd)); ptrd++; lx+=lpx; ly+=lpy; } ptrd+=offx; } } xleft+=pleft; xright+=pright; lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright; } if (p1=dimy()?(height-1):ny2; for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) { const int dx = (int)xright-(int)xleft; const float lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0, lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0, lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)), lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy)); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { float lx=lxi, ly=lyi; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*color[k]); lx+=lpx; ly+=lpy; } ptrd+=offx; } else cimg_forV(*this,k) { float lx=lxi, ly=lyi; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*color[k]+copacity*(*ptrd)); ptrd++; lx+=lpx; ly+=lpy; } ptrd+=offx; } } xleft+=pleft; xright+=pright; lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright; } } return *this; } //! Draw a 2D textured triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2). /** \param x0 = X-coordinate of the first corner in the instance image. \param y0 = Y-coordinate of the first corner in the instance image. \param x1 = X-coordinate of the second corner in the instance image. \param y1 = Y-coordinate of the second corner in the instance image. \param x2 = X-coordinate of the third corner in the instance image. \param y2 = Y-coordinate of the third corner in the instance image. \param texture = texture image used to fill the triangle. \param tx0 = X-coordinate of the first corner in the texture image. \param ty0 = Y-coordinate of the first corner in the texture image. \param tx1 = X-coordinate of the second corner in the texture image. \param ty1 = Y-coordinate of the second corner in the texture image. \param tx2 = X-coordinate of the third corner in the texture image. \param ty2 = Y-coordinate of the third corner in the texture image. \param opacity = opacity of the drawing. \param brightness = brightness of the drawing. \note Clipping is supported, but texture coordinates do not support clipping. **/ template CImg& draw_triangle(const int x0,const int y0, const int x1,const int y1, const int x2,const int y2, const CImg& texture, const int tx0,const int ty0, const int tx1,const int ty1, const int tx2,const int ty2, const float opacity=1.0f, const float brightness=1.0f) { if (!is_empty()) { if (texture.is_empty()) throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.", pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data); int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2,whz=width*height*depth; if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1); if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2); if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2); if (ny0>=dimy() || ny2<0) return *this; const float p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0), p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0), p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1), tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0, tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0, tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0, tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0, tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0, tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0; const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); float pleft,pright,tpxleft,tpyleft,tpxright,tpyright, xleft=(float)nx0,xright=xleft,txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft; if (p1=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)), tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { float tx=txi, ty=tyi; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; } ptrd+=offx; } else cimg_forV(*this,k) { float tx=txi, ty=tyi; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; } ptrd+=offx; } } xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; } if (p1=dimy()?(height-1):ny2; for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) { const int dx = (int)xright-(int)xleft; const float tpx = dx?((int)txright-(int)txleft)/(float)dx:0, tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0, txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)), tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { float tx=txi, ty=tyi; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; } ptrd+=offx; } else cimg_forV(*this,k) { float tx=txi, ty=tyi; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*brightness*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; } ptrd+=offx; } } xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; } } return *this; } //! Draw a 2D textured triangle with Gouraud-Shading in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2). /** \param x0 = X-coordinate of the first corner in the instance image. \param y0 = Y-coordinate of the first corner in the instance image. \param x1 = X-coordinate of the second corner in the instance image. \param y1 = Y-coordinate of the second corner in the instance image. \param x2 = X-coordinate of the third corner in the instance image. \param y2 = Y-coordinate of the third corner in the instance image. \param texture = texture image used to fill the triangle. \param tx0 = X-coordinate of the first corner in the texture image. \param ty0 = Y-coordinate of the first corner in the texture image. \param tx1 = X-coordinate of the second corner in the texture image. \param ty1 = Y-coordinate of the second corner in the texture image. \param tx2 = X-coordinate of the third corner in the texture image. \param ty2 = Y-coordinate of the third corner in the texture image. \param c0 = brightness value of the first corner. \param c1 = brightness value of the second corner. \param c2 = brightness value of the third corner. \param opacity = opacity of the drawing. \note Clipping is supported, but texture coordinates do not support clipping. **/ template CImg& draw_triangle(const int x0,const int y0, const int x1,const int y1, const int x2,const int y2, const CImg& texture, const int tx0,const int ty0, const int tx1,const int ty1, const int tx2,const int ty2, const float c0,const float c1,const float c2, const float opacity=1) { if (!is_empty()) { if (texture.is_empty()) throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.", pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data); int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2,ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2,whz=width*height*depth; float nc0=c0,nc1=c1,nc2=c2; if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1,nc0,nc1); if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2,nc0,nc2); if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2,nc1,nc2); if (ny0>=dimy() || ny2<0) return *this; const float p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0), p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0), p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1), tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0, tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0, tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0, tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0, tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0, tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0, cp1 = (ny1-ny0)?(nc1-nc0)/(float)(ny1-ny0):0, cp2 = (ny2-ny0)?(nc2-nc0)/(float)(ny2-ny0):0, cp3 = (ny2-ny1)?(nc2-nc1)/(float)(ny2-ny1):0; const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); float pleft,pright,tpxleft,tpyleft,tpxright,tpyright,cpleft,cpright, xleft=(float)nx0,xright=xleft,txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft,cleft=nc0,cright=cleft; if (p1=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)), tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)), ci = (xleft>=0)?cleft:(cleft-xleft*cp); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { float tx=txi, ty=tyi, c=ci; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; c+=cp; } ptrd+=offx; } else cimg_forV(*this,k) { float tx=txi, ty=tyi, c=ci; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; c+=cp; } ptrd+=offx; } } xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; cleft+=cpleft; cright+=cpright; } if (p1=dimy()?(height-1):ny2; for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) { const int dx = (int)xright-(int)xleft; const float tpx = dx?((int)txright-(int)txleft)/(float)dx:0, tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0, cp = dx?(cright-cleft)/dx:0, txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)), tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)), ci = (xleft>=0)?cleft:(cleft-xleft*cp); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { float tx=txi, ty=tyi, c=ci; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(c*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; c+=cp; } ptrd+=offx; } else cimg_forV(*this,k) { float tx=txi, ty=tyi, c=ci; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*c*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; c+=ci; } ptrd+=offx; } } xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; cleft+=cpleft; cright+=cpright; } } return *this; } //! Draw a phong-shaded 2D textured triangle in the instance image, at coordinates (\c x0,\c y0)-(\c x1,\c y1)-(\c x2,\c y2). /** \param x0 = X-coordinate of the first corner in the instance image. \param y0 = Y-coordinate of the first corner in the instance image. \param x1 = X-coordinate of the second corner in the instance image. \param y1 = Y-coordinate of the second corner in the instance image. \param x2 = X-coordinate of the third corner in the instance image. \param y2 = Y-coordinate of the third corner in the instance image. \param texture = texture image used to fill the triangle. \param tx0 = X-coordinate of the first corner in the texture image. \param ty0 = Y-coordinate of the first corner in the texture image. \param tx1 = X-coordinate of the second corner in the texture image. \param ty1 = Y-coordinate of the second corner in the texture image. \param tx2 = X-coordinate of the third corner in the texture image. \param ty2 = Y-coordinate of the third corner in the texture image. \param light = light image. \param lx0 = X-coordinate of the first corner in the light image. \param ly0 = Y-coordinate of the first corner in the light image. \param lx1 = X-coordinate of the second corner in the light image. \param ly1 = Y-coordinate of the second corner in the light image. \param lx2 = X-coordinate of the third corner in the light image. \param ly2 = Y-coordinate of the third corner in the light image. \param opacity = opacity of the drawing. \note Clipping is supported, but texture coordinates do not support clipping. **/ template CImg& draw_triangle(const int x0,const int y0, const int x1,const int y1, const int x2,const int y2, const CImg& texture, const int tx0,const int ty0, const int tx1,const int ty1, const int tx2,const int ty2, const CImg& light, const int lx0,const int ly0, const int lx1,const int ly1, const int lx2,const int ly2, const float opacity=1.0f) { if (!is_empty()) { if (texture.is_empty()) throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified texture (%u,%u,%u,%u,%p) is empty.", pixel_type(),texture.width,texture.height,texture.depth,texture.dim,texture.data); if (light.is_empty()) throw CImgArgumentException("CImg<%s>::draw_triangle() : Specified light (%u,%u,%u,%u,%p) is empty.", pixel_type(),light.width,light.height,light.depth,light.dim,light.data); int nx0=x0,ny0=y0,nx1=x1,ny1=y1,nx2=x2,ny2=y2, ntx0=tx0,nty0=ty0,ntx1=tx1,nty1=ty1,ntx2=tx2,nty2=ty2, nlx0=lx0,nly0=ly0,nlx1=lx1,nly1=ly1,nlx2=lx2,nly2=ly2, whz=width*height*depth; if (ny0>ny1) cimg::swap(nx0,nx1,ny0,ny1,ntx0,ntx1,nty0,nty1,nlx0,nlx1,nly0,nly1); if (ny0>ny2) cimg::swap(nx0,nx2,ny0,ny2,ntx0,ntx2,nty0,nty2,nlx0,nlx2,nly0,nly2); if (ny1>ny2) cimg::swap(nx1,nx2,ny1,ny2,ntx1,ntx2,nty1,nty2,nlx1,nlx2,nly1,nly2); if (ny0>=dimy() || ny2<0) return *this; const float p1 = (ny1-ny0)?(nx1-nx0)/(float)(ny1-ny0):(nx1-nx0), p2 = (ny2-ny0)?(nx2-nx0)/(float)(ny2-ny0):(nx2-nx0), p3 = (ny2-ny1)?(nx2-nx1)/(float)(ny2-ny1):(nx2-nx1), tpx1 = (ny1-ny0)?(ntx1-ntx0)/(float)(ny1-ny0):0, tpy1 = (ny1-ny0)?(nty1-nty0)/(float)(ny1-ny0):0, tpx2 = (ny2-ny0)?(ntx2-ntx0)/(float)(ny2-ny0):0, tpy2 = (ny2-ny0)?(nty2-nty0)/(float)(ny2-ny0):0, tpx3 = (ny2-ny1)?(ntx2-ntx1)/(float)(ny2-ny1):0, tpy3 = (ny2-ny1)?(nty2-nty1)/(float)(ny2-ny1):0, lpx1 = (ny1-ny0)?(nlx1-nlx0)/(float)(ny1-ny0):0, lpy1 = (ny1-ny0)?(nly1-nly0)/(float)(ny1-ny0):0, lpx2 = (ny2-ny0)?(nlx2-nlx0)/(float)(ny2-ny0):0, lpy2 = (ny2-ny0)?(nly2-nly0)/(float)(ny2-ny0):0, lpx3 = (ny2-ny1)?(nlx2-nlx1)/(float)(ny2-ny1):0, lpy3 = (ny2-ny1)?(nly2-nly1)/(float)(ny2-ny1):0; const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); float pleft,pright,tpxleft,tpyleft,tpxright,tpyright,lpxleft,lpyleft,lpxright,lpyright, xleft=(float)nx0,xright=xleft, txleft=(float)ntx0,tyleft=(float)nty0,txright=txleft,tyright=tyleft, lxleft=(float)nlx0,lyleft=(float)nly0,lxright=lxleft,lyright=lyleft; if (p1=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)), tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)), lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0, lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0, lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)), lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy)); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { float tx=txi, ty=tyi, lx=lxi, ly=lyi; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy; } ptrd+=offx; } else cimg_forV(*this,k) { float tx=txi, ty=tyi, lx=lxi, ly=lyi; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy; } ptrd+=offx; } } xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright; } if (p1=dimy()?(height-1):ny2; for (int yy=(ny1<0?0:ny1); yy<=yb; yy++) { const int dx = (int)xright-(int)xleft; const float tpx = dx?((int)txright-(int)txleft)/(float)dx:0, tpy = dx?((int)tyright-(int)tyleft)/(float)dx:0, txi = (float)((xleft>=0)?(int)txleft:(int)(txleft-(int)xleft*tpx)), tyi = (float)((xleft>=0)?(int)tyleft:(int)(tyleft-(int)xleft*tpy)), lpx = dx?((int)lxright-(int)lxleft)/(float)dx:0, lpy = dx?((int)lyright-(int)lyleft)/(float)dx:0, lxi = (float)((xleft>=0)?(int)lxleft:(int)(lxleft-(int)xleft*lpx)), lyi = (float)((xleft>=0)?(int)lyleft:(int)(lyleft-(int)xleft*lpy)); const int xmin=(xleft>=0)?(int)xleft:0, xmax=(xright=1) cimg_forV(*this,k) { float tx=txi, ty=tyi, lx=lxi, ly=lyi; for (int x=xmin; x<=xmax; x++) { *(ptrd++)=(T)(light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k)); tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy; } ptrd+=offx; } else cimg_forV(*this,k) { float tx=txi, ty=tyi, lx=lxi, ly=lyi; for (int x=xmin; x<=xmax; x++) { *ptrd=(T)(nopacity*light((unsigned int)lx,(unsigned int)ly)*texture((unsigned int)tx,(unsigned int)ty,0,k)+copacity*(*ptrd)); ptrd++; tx+=tpx; ty+=tpy; lx+=lpx; ly+=lpy; } ptrd+=offx; } } xleft+=pleft; xright+=pright; txleft+=tpxleft; tyleft+=tpyleft; txright+=tpxright; tyright+=tpyright; lxleft+=lpxleft; lyleft+=lpyleft; lxright+=lpxright; lyright+=lpyright; } } return *this; } //! Draw an ellipse on the instance image /** \param x0 = X-coordinate of the ellipse center. \param y0 = Y-coordinate of the ellipse center. \param r1 = First radius of the ellipse. \param r2 = Second radius of the ellipse. \param ru = X-coordinate of the orientation vector related to the first radius. \param rv = Y-coordinate of the orientation vector related to the first radius. \param color = array of dimv() values of type \c T, defining the drawing color. \param pattern = If zero, the ellipse is filled, else pattern is an integer whose bits describe the outline pattern. \param opacity = opacity of the drawing. **/ CImg& draw_ellipse(const int x0,const int y0,const float r1,const float r2,const float ru,const float rv, const T *const color,const unsigned int pattern=0L, const float opacity=1) { if (!is_empty()) { draw_scanline(color,opacity); if (!color) throw CImgArgumentException("CImg<%s>::draw_ellipse : Specified color is (null).",pixel_type()); unsigned int hatch=1; const float nr1 = cimg::abs(r1), nr2 = cimg::abs(r2), norm = (float)std::sqrt(ru*ru+rv*rv), u = norm>0?ru/norm:1, v = norm>0?rv/norm:0, rmax = cimg::max(nr1,nr2), l1 = (float)std::pow(rmax/(nr1>0?nr1:1e-6),2), l2 = (float)std::pow(rmax/(nr2>0?nr2:1e-6),2), a = l1*u*u + l2*v*v, b = u*v*(l1-l2), c = l1*v*v + l2*u*u; const int yb = (int)std::sqrt(a*rmax*rmax/(a*c-b*b)), ymin = (y0-yb<0)?0:(y0-yb), ymax = (1+y0+yb>=dimy())?height-1:(1+y0+yb); int oxmin=0, oxmax=0; bool first_line = true; for (int y=ymin; y0?std::sqrt(delta):0)), fxmin = x0-(b*Y+sdelta)/a, fxmax = x0-(b*Y-sdelta)/a; const int xmin = (int)fxmin, xmax = (int)fxmax; if (!pattern) draw_scanline(xmin,xmax,y,color,opacity); else { if (!(~pattern) || (~pattern && pattern&hatch)) { if (first_line) { draw_scanline(xmin,xmax,y,color,opacity); first_line = false; } else { if (xmin>(sizeof(unsigned int)*8-1)); } } return *this; } //! Draw an ellipse on the instance image /** \param x0 = X-coordinate of the ellipse center. \param y0 = Y-coordinate of the ellipse center. \param tensor = Diffusion tensor describing the ellipse. \param color = array of dimv() values of type \c T, defining the drawing color. \param pattern = If zero, the ellipse is filled, else pattern is an integer whose bits describe the outline pattern. \param opacity = opacity of the drawing. **/ template CImg& draw_ellipse(const int x0,const int y0,const CImg &tensor, const T *color,const unsigned int pattern=0L,const float opacity=1) { CImgList eig = tensor.get_symmetric_eigen(); const CImg &val = eig[0], &vec = eig[1]; return draw_ellipse(x0,y0,val(0),val(1),vec(0,0),vec(0,1),color,pattern,opacity); } //! Draw a circle on the instance image /** \param x0 = X-coordinate of the circle center. \param y0 = Y-coordinate of the circle center. \param r = radius of the circle. \param color = an array of dimv() values of type \c T, defining the drawing color. \param pattern = If zero, the circle is filled, else pattern is an integer whose bits describe the outline pattern. \param opacity = opacity of the drawing. **/ CImg& draw_circle(const int x0,const int y0,float r,const T *const color,const unsigned int pattern=0L,const float opacity=1) { return draw_ellipse(x0,y0,r,r,1,0,color,pattern,opacity); } //! Draw a text into the instance image. /** \param text = a C-string containing the text to display. \param x0 = X-coordinate of the text in the instance image. \param y0 = Y-coordinate of the text in the instance image. \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent'). \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent'). \param font = List of font characters used for the drawing. \param opacity = opacity of the drawing. \note Clipping is supported. \see get_font(). **/ template CImg& draw_text(const char *const text, const int x0,const int y0, const T *const fgcolor,const T *const bgcolor, const CImgList& font,const float opacity=1) { if (!text) throw CImgArgumentException("CImg<%s>::draw_text() : Specified input string is (null).",pixel_type()); if (font.is_empty()) throw CImgArgumentException("CImg<%s>::draw_text() : Specified font (%u,%p) is empty.", pixel_type(),font.size,font.data); if (is_empty()) { // If needed, pre-compute needed size of the image int x=0, y=0, w=0; for (int i=0; iw) w=x; x=0; break; case '\t': x+=4*font[' '].width; break; default: if (cw) w=x; y+=font[' '].height; } assign(x0+w,y0+y,1,font[' '].dim,0); if (bgcolor) cimg_forV(*this,k) get_shared_channel(k).fill(bgcolor[k]); } int x = x0, y = y0; CImg letter; for (int i=0; i=512) draw_image(letter,mask,x,y,0,0,(T)1,opacity); else draw_image(letter,x,y,0,0,opacity); x+=letter.width; } break; } } return *this; } //! Draw a text into the instance image. /** \param text = a C-string containing the text to display. \param x0 = X-coordinate of the text in the instance image. \param y0 = Y-coordinate of the text in the instance image. \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent'). \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent'). \param font_size = Height of the desired font (11,13,24,38 or 57) \param opacity = opacity of the drawing. \note Clipping is supported. \see get_font(). **/ CImg& draw_text(const char *const text, const int x0,const int y0, const T *const fgcolor,const T *const bgcolor=0, const unsigned int font_size=11,const float opacity=1.0f) { return draw_text(text,x0,y0,fgcolor,bgcolor,CImgList::get_font(font_size),opacity); } //! Draw a text into the instance image. /** \param x0 = X-coordinate of the text in the instance image. \param y0 = Y-coordinate of the text in the instance image. \param fgcolor = an array of dimv() values of type \c T, defining the foreground color (0 means 'transparent'). \param bgcolor = an array of dimv() values of type \c T, defining the background color (0 means 'transparent'). \param opacity = opacity of the drawing. \param format = a 'printf'-style format, followed by arguments. \note Clipping is supported. **/ CImg& draw_text(const int x0,const int y0, const T *const fgcolor,const T *const bgcolor, const unsigned int font_size, const float opacity,const char *format,...) { char tmp[2048]={0}; std::va_list ap; va_start(ap,format); std::vsprintf(tmp,format,ap); va_end(ap); return draw_text(tmp,x0,y0,fgcolor,bgcolor,font_size,opacity); } template CImg& draw_text(const int x0,const int y0, const T *const fgcolor,const T *const bgcolor, const CImgList& font, const float opacity, const char *format,...) { char tmp[2048]={0}; std::va_list ap; va_start(ap,format); std::vsprintf(tmp,format,ap); va_end(ap); return draw_text(tmp,x0,y0,fgcolor,bgcolor,font,opacity); } //! Draw a vector field in the instance image. /** \param flow = a 2d image of 2d vectors used as input data. \param color = an array of dimv() values of type \c T, defining the drawing color. \param sampling = length (in pixels) between each arrow. \param factor = length factor of each arrow (if <0, computed as a percentage of the maximum length). \param quiver_type = type of plot. Can be 0 (arrows) or 1 (segments). \param opacity = opacity of the drawing. \note Clipping is supported. **/ template CImg& draw_quiver(const CImg& flow, const T *const color, const unsigned int sampling=25, const float factor=-20, const int quiver_type=0, const float opacity=1) { if (!is_empty()) { if (flow.is_empty() || flow.dim!=2) throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified flow (%u,%u,%u,%u,%p) has wrong dimensions.", pixel_type(),flow.width,flow.height,flow.depth,flow.dim,flow.data); if (!color) throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified color is (null)", pixel_type()); if (sampling<=0) throw CImgArgumentException("CImg<%s>::draw_quiver() : Incorrect sampling value = %g", pixel_type(),sampling); float vmax,fact; if (factor<=0) { const CImgStats st(flow.get_norm_pointwise(2),false); vmax = (float)cimg::max(cimg::abs(st.min),cimg::abs(st.max)); fact = -factor; } else { fact = factor; vmax = 1; } for (unsigned int y=sampling/2; y CImg& draw_quiver(const CImg& flow, const CImg& color, const unsigned int sampling=25, const float factor=-20, const int quiver_type=0, const float opacity=1) { if (!is_empty()) { if (flow.is_empty() || flow.dim!=2) throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified flow (%u,%u,%u,%u,%p) has wrong dimensions.", pixel_type(),flow.width,flow.height,flow.depth,flow.dim,flow.data); if (color.is_empty() || color.width!=flow.width || color.height!=flow.height) throw CImgArgumentException("CImg<%s>::draw_quiver() : Specified color (%u,%u,%u,%u,%p) has wrong dimensions.", pixel_type(),color.width,color.height,color.depth,color.dim,color.data); if (sampling<=0) throw CImgArgumentException("CImg<%s>::draw_quiver() : Incorrect sampling value = %g",pixel_type(),sampling); float vmax,fact; if (factor<=0) { const CImgStats st(flow.get_norm_pointwise(2),false); vmax = (float)cimg::max(cimg::abs(st.min),cimg::abs(st.max)); fact = -factor; } else { fact = factor; vmax = 1; } for (unsigned int y=sampling/2; y CImg& draw_graph(const CImg& data, const T *const color, const unsigned int gtype=0, const double ymin=0, const double ymax=0, const float opacity=1) { if (!is_empty()) { if (!color) throw CImgArgumentException("CImg<%s>::draw_graph() : Specified color is (null)",pixel_type()); T *color1 = new T[dim], *color2 = new T[dim]; cimg_forV(*this,k) { color1[k]=(T)(color[k]*0.6f); color2[k]=(T)(color[k]*0.3f); } CImgStats st; if (ymin==ymax) { st = CImgStats(data,false); cimg::swap(st.min,st.max); } else { st.min = ymin; st.max = ymax; } if (st.min==st.max) { st.min--; st.max++; } const float ca = height>1?(float)(st.max-st.min)/(height-1):0, cb = (float)st.min; const int Y0 = (int)(-cb/ca); int pY=0; cimg_foroff(data,off) { const int Y = (int)((data[off]-cb)/ca); switch (gtype) { case 0: // plot with segments if (off>0) draw_line((int)((off-1)*width/data.size()),pY,(int)(off*width/data.size()),Y,color,~0L,opacity); break; case 1: { // plot with bars const unsigned int X = off*width/data.size(), nX = (off+1)*width/data.size()-1; draw_rectangle(X,(int)Y0,nX,Y,color1,opacity); draw_line(X,Y,X,(int)Y0,color2,~0L,opacity); draw_line(X,(int)Y0,nX,(int)Y0,Y<=Y0?color2:color,~0L,opacity); draw_line(nX,Y,nX,(int)Y0,color,~0L,opacity); draw_line(X,Y,nX,Y,Y<=Y0?color:color2,~0L,opacity); } break; } pY=Y; } if (gtype==2) { // plot with cubic interpolation const CImg ndata = data.get_shared_points(0,data.size()-1); cimg_forX(*this,x) { const int Y = (int)((ndata.cubic_pix1d((float)x*ndata.width/width)-cb)/ca); if (x>0) draw_line(x,pY,x+1,Y,color,~0L,opacity); pY=Y; } } delete[] color1; delete[] color2; } return *this; } //! Draw a labelled horizontal axis on the instance image. /** \param x0 = lower bound of the x-range. \param x1 = upper bound of the x-range. \param y = Y-coordinate of the horizontal axis in the instance image. \param color = an array of dimv() values of type \c T, defining the drawing color. \param precision = precision of the labels. \param grid_pattern = pattern of the grid \param opacity = opacity of the drawing. \note if \c precision==0, precision of the labels is automatically computed. \see draw_graph(). **/ template CImg& draw_axis(const CImg& xvalues, const int y, const T *const color, const int precision=-1, const float opacity=1.0f) { if (!is_empty()) { int siz = (int)xvalues.size()-1; if (siz<=0) draw_line(0,y,width-1,y,color,~0L,opacity); else { if (xvalues[0]=0) std::sprintf(txt,"%.*g",precision,(double)xvalues(x)); else std::sprintf(txt,"%g",(double)xvalues(x)); const int xi=(int)(x*(width-1)/siz), xt = xi-(int)std::strlen(txt)*3; draw_point(xi,y-1,color,opacity).draw_point(xi,y+1,color,opacity). draw_text(txt,xt<0?0:xt,yt,color,0,11,opacity); } } } return *this; } //! Draw a labelled vertical axis on the instance image. template CImg& draw_axis(const int x, const CImg& yvalues, const T *const color, const int precision=-1, const float opacity=1.0f) { if (!is_empty()) { int siz = (int)yvalues.size()-1; if (siz<=0) draw_line(x,0,x,height-1,color,~0L,opacity); else { if (yvalues[0]=0) std::sprintf(txt,"%.*g",precision,(double)yvalues(y)); else std::sprintf(txt,"%g",(double)yvalues(y)); const int yi = (int)(y*(height-1)/siz), tmp = yi-5, nyi = tmp<0?0:(tmp>=(int)height-11?(int)height-11:tmp), xt = x-(int)std::strlen(txt)*7; draw_point(x-1,yi,color,opacity).draw_point(x+1,yi,color,opacity); if (xt>0) draw_text(txt,xt,nyi,color,0,11,opacity); else draw_text(txt,x+3,nyi,color,0,11,opacity); } } } return *this; } //! Draw a labelled horizontal+vertical axis on the instance image. template CImg& draw_axis(const CImg& xvalues, const CImg& yvalues, const T *const color, const int precisionx=-1, const int precisiony=-1, const float opacity=1.0f) { if (!is_empty()) { const CImg nxvalues(xvalues.data,xvalues.size(),1,1,1,true); const int sizx = (int)xvalues.size()-1, wm1 = (int)(width)-1; if (sizx>0) { float ox = (float)nxvalues[0]; for (unsigned int x=1; x nyvalues(yvalues.data,yvalues.size(),1,1,1,true); const int sizy = (int)yvalues.size()-1, hm1 = (int)(height)-1; if (sizy>0) { float oy = (float)nyvalues[0]; for (unsigned int y=1; y CImg& draw_axis(const tx& x0, const tx& x1, const ty& y0, const ty& y1, const T *const color, const int subdivisionx=-60, const int subdivisiony=-60, const int precisionx=-1, const int precisiony=-1, const float opacity=1.0f) { return draw_axis(CImg::sequence(subdivisionx>0?subdivisionx:1-(int)width/subdivisionx,x0,x1), CImg::sequence(subdivisiony>0?subdivisiony:1-(int)height/subdivisiony,y0,y1), color,precisionx,precisiony,opacity); } //! Draw grid on the instance image template CImg& draw_grid(const CImg& xvalues, const CImg& yvalues, const T *const color, const unsigned int patternx=~0U, const unsigned int patterny=~0U, const float opacity=1.0f) { if (!is_empty()) { if (!xvalues.is_empty()) cimg_foroff(xvalues,x) { const int xi = (int)xvalues[x]; if (xi>=0 && xi<(int)width) draw_line(xi,0,xi,height-1,color,patternx,opacity); } if (!yvalues.is_empty()) cimg_foroff(yvalues,y) { const int yi = (int)yvalues[y]; if (yi>=0 && yi<(int)height) draw_line(0,yi,width-1,yi,color,patterny,opacity); } } return *this; } //! Draw grid on the instance image CImg& draw_grid(const float deltax, const float deltay, const float offsetx, const float offsety, const T *const color, const unsigned int patternx=~0U, const unsigned int patterny=~0U, const bool invertx=false, const bool inverty=false, const float opacity=1.0f) { CImg seqx, seqy; if (deltax!=0) { const float dx = deltax>0?deltax:width*-deltax/100; const unsigned int nx = (unsigned int)(width/dx); seqx = CImg::sequence(1+nx,0,(unsigned int)(dx*nx)); if (offsetx) cimg_foroff(seqx,x) seqx(x) = (unsigned int)cimg::mod(seqx(x)+offsetx,(float)width); if (invertx) cimg_foroff(seqx,x) seqx(x) = width-1-seqx(x); } if (deltay!=0) { const float dy = deltay>0?deltay:height*-deltay/100; const unsigned int ny = (unsigned int)(height/dy); seqy = CImg::sequence(1+ny,0,(unsigned int)(dy*ny)); if (offsety) cimg_foroff(seqy,y) seqy(y) = (unsigned int)cimg::mod(seqy(y)+offsety,(float)height); if (inverty) cimg_foroff(seqy,y) seqy(y) = height-1-seqy(y); } return draw_grid(seqx,seqy,color,patternx,patterny,opacity); } // INNER CLASS used by function CImg<>::draw_fill() template struct _draw_fill { const T1 *const color; const float sigma,opacity; const CImg value; CImg region; _draw_fill(const CImg& img,const int x,const int y,const int z, const T *const pcolor,const float psigma,const float popacity): color(pcolor),sigma(psigma),opacity(popacity), value(img.get_vector_at(x,y,z)), region(CImg(img.width,img.height,img.depth,1,(T2)false)) { } _draw_fill& operator=(const _draw_fill& d) { color = d.color; sigma = d.sigma; opacity = d.opacity; value = d.value; region = d.region; return *this; } bool comp(const CImg& A,const CImg& B) const { bool res=true; const T *pA=A.data+A.size(); for (const T *pB=B.data+B.size(); res && pA>A.data; res=(cimg::abs(*(--pA)-(*(--pB)))<=sigma) ); return res; } void fill(CImg& img,const int x,const int y,const int z) { if (x<0 || x>=img.dimx() || y<0 || y>=img.dimy() || z<0 || z>=img.dimz()) return; if (!region(x,y,z) && comp(value,img.get_vector_at(x,y,z))) { const T *col=color; const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); int xmin,xmax; if (opacity>=1) cimg_forV(img,k) img(x,y,z,k)=*(col++); else cimg_forV(img,k) img(x,y,z,k)=(T1)(*(col++)*opacity+copacity*img(x,y,z,k)); col-=img.dim; region(x,y,z) = (T2)true; for (xmin=x-1; xmin>=0 && comp(value,img.get_vector_at(xmin,y,z)); xmin--) { if (opacity>=1) cimg_forV(img,k) img(xmin,y,z,k) = *(col++); else cimg_forV(img,k) img(xmin,y,z,k)=(T1)(*(col++)*nopacity+copacity*img(xmin,y,z,k)); col-=img.dim; region(xmin,y,z)=(T2)true; } for (xmax=x+1; xmax=1) cimg_forV(img,k) img(xmax,y,z,k) = *(col++); else cimg_forV(img,k) img(xmax,y,z,k)=(T1)(*(col++)*nopacity+copacity*img(xmax,y,z,k)); col-=img.dim; region(xmax,y,z)=(T2)true; } xmin++; xmax--; for (; xmin<=xmax; xmin++) { fill(img,xmin,y-1,z); fill(img,xmin,y+1,z); fill(img,xmin,y,z-1); fill(img,xmin,y,z+1); } } } }; //! Draw a 3D filled region starting from a point (\c x,\c y,\ z) in the instance image. /** \param x = X-coordinate of the starting point of the region to fill. \param y = Y-coordinate of the starting point of the region to fill. \param z = Z-coordinate of the starting point of the region to fill. \param color = an array of dimv() values of type \c T, defining the drawing color. \param region = image that will contain the mask of the filled region mask, as an output. \param sigma = tolerance concerning neighborhood values. \param opacity = opacity of the drawing. \return \p region is initialized with the binary mask of the filled region. **/ template CImg& draw_fill(const int x,const int y,const int z, const T *const color, CImg& region,const float sigma=0, const float opacity=1) { _draw_fill F(*this,x,y,z,color,sigma,opacity); F.fill(*this,x,y,z); region = F.region; return *this; } //! Draw a 3D filled region starting from a point (\c x,\c y,\ z) in the instance image. /** \param x = X-coordinate of the starting point of the region to fill. \param y = Y-coordinate of the starting point of the region to fill. \param z = Z-coordinate of the starting point of the region to fill. \param color = an array of dimv() values of type \c T, defining the drawing color. \param sigma = tolerance concerning neighborhood values. \param opacity = opacity of the drawing. **/ CImg& draw_fill(const int x,const int y,const int z,const T *const color,const float sigma=0,const float opacity=1) { CImg tmp; return draw_fill(x,y,z,color,tmp,sigma,opacity); } //! Draw a 2D filled region starting from a point (\c x,\c y) in the instance image. /** \param x = X-coordinate of the starting point of the region to fill. \param y = Y-coordinate of the starting point of the region to fill. \param color = an array of dimv() values of type \c T, defining the drawing color. \param sigma = tolerance concerning neighborhood values. \param opacity = opacity of the drawing. **/ CImg& draw_fill(const int x,const int y,const T *const color,const float sigma=0,const float opacity=1) { CImg tmp; return draw_fill(x,y,0,color,tmp,sigma,opacity); } //! Draw a plasma square in the instance image. /** \param x0 = X-coordinate of the upper-left corner of the plasma. \param y0 = Y-coordinate of the upper-left corner of the plasma. \param x1 = X-coordinate of the lower-right corner of the plasma. \param y1 = Y-coordinate of the lower-right corner of the plasma. \param alpha = Alpha-parameter of the plasma. \param beta = Beta-parameter of the plasma. \param opacity = opacity of the drawing. **/ CImg& draw_plasma(const int x0, const int y0, const int x1, const int y1, const double alpha=1.0, const double beta=1.0, const float opacity=1) { if (!is_empty()) { int nx0=x0,nx1=x1,ny0=y0,ny1=y1; if (nx1=dimx()) nx1=width-1; if (ny0<0) ny0=0; if (ny1>=dimy()) ny1=height-1; const int xc = (nx0+nx1)/2, yc = (ny0+ny1)/2, dx=(xc-nx0), dy=(yc-ny0); const double dc = std::sqrt((double)(dx*dx+dy*dy))*alpha + beta; float val = 0; cimg_forV(*this,k) { if (opacity>=1) { (*this)(xc,ny0,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k))); (*this)(xc,ny1,0,k) = (T)(0.5f*((*this)(nx0,ny1,0,k)+(*this)(nx1,ny1,0,k))); (*this)(nx0,yc,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx0,ny1,0,k))); (*this)(nx1,yc,0,k) = (T)(0.5f*((*this)(nx1,ny0,0,k)+(*this)(nx1,ny1,0,k))); do { val = (float)(0.25f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k) + (*this)(nx1,ny1,0,k)+(*this)(nx0,ny1,0,k)) + dc*cimg::grand()); } while (val<(float)cimg::type::min() || val>(float)cimg::type::max()); (*this)(xc,yc,0,k) = (T)val; } else { const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); (*this)(xc,ny0,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k))*nopacity + copacity*(*this)(xc,ny0,0,k)); (*this)(xc,ny1,0,k) = (T)(0.5f*((*this)(nx0,ny1,0,k)+(*this)(nx1,ny1,0,k))*nopacity + copacity*(*this)(xc,ny1,0,k)); (*this)(nx0,yc,0,k) = (T)(0.5f*((*this)(nx0,ny0,0,k)+(*this)(nx0,ny1,0,k))*nopacity + copacity*(*this)(nx0,yc,0,k)); (*this)(nx1,yc,0,k) = (T)(0.5f*((*this)(nx1,ny0,0,k)+(*this)(nx1,ny1,0,k))*nopacity + copacity*(*this)(nx1,yc,0,k)); do { val = (float)(0.25f*(((*this)(nx0,ny0,0,k)+(*this)(nx1,ny0,0,k) + (*this)(nx1,ny1,0,k)+(*this)(nx0,ny1,0,k)) + dc*cimg::grand())*nopacity + copacity*(*this)(xc,yc,0,k)); } while (val<(float)cimg::type::min() || val>(float)cimg::type::max()); (*this)(xc,yc,0,k) = (T)val; } } if (xc!=nx0 || yc!=ny0) { draw_plasma(nx0,ny0,xc,yc,alpha,beta,opacity); draw_plasma(xc,ny0,nx1,yc,alpha,beta,opacity); draw_plasma(nx0,yc,xc,ny1,alpha,beta,opacity); draw_plasma(xc,yc,nx1,ny1,alpha,beta,opacity); } } return *this; } //! Draw a plasma in the instance image. /** \param alpha = Alpha-parameter of the plasma. \param beta = Beta-parameter of the plasma. \param opacity = opacity of the drawing. **/ CImg& draw_plasma(const double alpha=1.0,const double beta=1.0,const float opacity=1) { return draw_plasma(0,0,width-1,height-1,alpha,beta,opacity); } //! Draw a 1D gaussian function in the instance image. /** \param xc = X-coordinate of the gaussian center. \param sigma = Standard variation of the gaussian distribution. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing. **/ CImg& draw_gaussian(const float xc,const double sigma,const T *const color,const float opacity=1) { if (!is_empty()) { if (!color) throw CImgArgumentException("CImg<%s>::draw_gaussian() : Specified color is (null)",pixel_type()); const double sigma2 = 2*sigma*sigma; const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); const unsigned int whz = width*height*depth; const T *col = color; cimg_forX(*this,x) { const float dx = (x-xc); const double val = std::exp( -dx*dx/sigma2 ); T *ptrd = ptr(x,0,0,0); if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; } else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; } col-=dim; } } return *this; } //! Draw an anisotropic 2D gaussian function in the instance image. /** \param xc = X-coordinate of the gaussian center. \param yc = Y-coordinate of the gaussian center. \param tensor = 2x2 covariance matrix. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing. **/ template CImg& draw_gaussian(const float xc,const float yc,const CImg& tensor, const T *const color,const float opacity=1) { if (!is_empty()) { if (tensor.width!=2 || tensor.height!=2 || tensor.depth!=1 || tensor.dim!=1) throw CImgArgumentException("CImg<%s>::draw_gaussian() : Tensor parameter (%u,%u,%u,%u,%p) is not a 2x2 matrix.", pixel_type(),tensor.width,tensor.height,tensor.depth,tensor.dim,tensor.data); if (!color) throw CImgArgumentException("CImg<%s>::draw_gaussian() : Specified color is (null)",pixel_type()); const CImg invT = tensor.get_inverse(), invT2 = (invT*invT)/(-2.0); const t &a=invT2(0,0), &b=2*invT2(1,0), &c=invT2(1,1); const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); const unsigned int whz = width*height*depth; const T *col = color; float dy = -yc; cimg_forY(*this,y) { float dx = -xc; cimg_forX(*this,x) { const float val = (float)std::exp(a*dx*dx + b*dx*dy + c*dy*dy); T *ptrd = ptr(x,y,0,0); if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; } else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; } col-=dim; dx++; } dy++; } } return *this; } //! Draw an isotropic 2D gaussian function in the instance image /** \param xc = X-coordinate of the gaussian center. \param yc = Y-coordinate of the gaussian center. \param sigma = standard variation of the gaussian distribution. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing. **/ CImg& draw_gaussian(const float xc,const float yc,const float sigma,const T *const color,const float opacity=1) { return draw_gaussian(xc,yc,CImg::diagonal(sigma,sigma),color,opacity); } //! Draw an anisotropic 3D gaussian function in the instance image. /** \param xc = X-coordinate of the gaussian center. \param yc = Y-coordinate of the gaussian center. \param zc = Z-coordinate of the gaussian center. \param tensor = 3x3 covariance matrix. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing. **/ template CImg& draw_gaussian(const float xc,const float yc,const float zc,const CImg& tensor, const T *const color,const float opacity=1) { if (!is_empty()) { if (tensor.width!=3 || tensor.height!=3 || tensor.depth!=1 || tensor.dim!=1) throw CImgArgumentException("CImg<%s>::draw_gaussian() : Tensor parameter (%u,%u,%u,%u,%p) is not a 3x3 matrix.", pixel_type(),tensor.width,tensor.height,tensor.depth,tensor.dim,tensor.data); const CImg invT = tensor.get_inverse(), invT2 = (invT*invT)/(-2.0); const t a=invT(0,0), b=2*invT(1,0), c=2*invT(2,0), d=invT(1,1), e=2*invT(2,1), f=invT(2,2); const float nopacity = cimg::abs(opacity), copacity = 1-cimg::max(opacity,0.0f); const unsigned int whz = width*height*depth; const T *col = color; cimg_forXYZ(*this,x,y,z) { const float dx = (x-xc), dy = (y-yc), dz = (z-zc); const double val = std::exp(a*dx*dx + b*dx*dy + c*dx*dz + d*dy*dy + e*dy*dz + f*dz*dz); T *ptrd = ptr(x,y,z,0); if (opacity>=1) cimg_forV(*this,k) { *ptrd = (T)(val*(*col++)); ptrd+=whz; } else cimg_forV(*this,k) { *ptrd = (T)(nopacity*val*(*col++) + copacity*(*ptrd)); ptrd+=whz; } col-=dim; } } return *this; } //! Draw an isotropic 3D gaussian function in the instance image /** \param xc = X-coordinate of the gaussian center. \param yc = Y-coordinate of the gaussian center. \param zc = Z-coordinate of the gaussian center. \param sigma = standard variation of the gaussian distribution. \param color = array of dimv() values of type \c T, defining the drawing color. \param opacity = opacity of the drawing. **/ CImg& draw_gaussian(const float xc,const float yc,const float zc, const double sigma,const T *const color,const float opacity=1) { return draw_gaussian(xc,yc,zc,CImg::diagonal(sigma,sigma,sigma),color,opacity); } //! Draw a 3D object in the instance image /** \param X = X-coordinate of the 3d object position \param Y = Y-coordinate of the 3d object position \param Z = Z-coordinate of the 3d object position \param points = Image N*3 describing 3D point coordinates \param primitives = List of P primitives \param colors = List of P color (or textures) \param opacities = Image of P opacities \param render_type = Render type (0=Points, 1=Lines, 2=Faces (no light), 3=Faces (flat), 4=Faces(Gouraud) \param double_sided = Tell if object faces have two sides or are oriented. \param focale = length of the focale \param lightx = X-coordinate of the light \param lighty = Y-coordinate of the light \param lightz = Z-coordinate of the light \param ambiant_light = Brightness (between 0..1) of the ambiant light **/ template CImg& draw_object3d(const float X, const float Y, const float Z, const CImg& points, const CImgList& primitives, const CImgList& colors, const CImgList& opacities, const unsigned int render_type=4, const bool double_sided=false, const float focale=500, const float lightx=0, const float lighty=0, const float lightz=-5000, const float ambiant_light = 0.05f) { static CImg light_texture; if (is_empty() || points.is_empty() || primitives.is_empty()) return *this; if (colors.is_empty() || opacities.is_empty()) throw CImgArgumentException("CImg<%s>::draw_object3d() : Undefined colors or opacities",pixel_type()); if (points.height<3) return draw_object3d(X,Y,Z,points.get_resize(-100,3,1,1,0),primitives,colors,opacities, render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light); // Create light texture for phong-like rendering if (render_type==5) { if (colors.size>primitives.size) light_texture = colors[primitives.size]; else { static float olightx=0, olighty=0, olightz=0, oambiant_light=0; if (light_texture.is_empty() || lightx!=olightx || lighty!=olighty || lightz!=olightz || ambiant_light!=oambiant_light) { light_texture.assign(512,512); const float white[1]={ 1.0f }, dlx = lightx-X, dly = lighty-Y, dlz = lightz-Z, nl = (float)std::sqrt(dlx*dlx+dly*dly+dlz*dlz), nlx = light_texture.width/2*(1+dlx/nl), nly = light_texture.height/2*(1+dly/nl); (light_texture.draw_gaussian(nlx,nly,light_texture.width/3.0f,white)+=ambiant_light).cut(0.0f,1.0f); olightx = lightx; olighty = lighty; olightz = lightz; oambiant_light = ambiant_light; } } } // Compute 3D to 2D projection CImg projections(points.width,2); cimg_forX(points,l) { const float x = (float)points(l,0), y = (float)points(l,1), z = (float)points(l,2); const float projectedz = z + Z + focale; projections(l,1) = Y + focale*y/projectedz; projections(l,0) = X + focale*x/projectedz; } // Compute and sort visible primitives CImg visibles(primitives.size); CImg zrange(primitives.size); unsigned int nb_visibles = 0; const float zmin = -focale+1.5f; { cimglist_for(primitives,l) { const CImg& primitive = primitives[l]; switch (primitive.size()) { case 1: { // Point const unsigned int i0 = (unsigned int)primitive(0); const float x0 = projections(i0,0), y0 = projections(i0,1), z0 = (float)(Z+points(i0,2)); if (z0>zmin && x0>=0 && x0=0 && y0zmin && z1>zmin && xM>=0 && xm=0 && ymxM) xM = x2; if (y0yM) yM = y2; if (z0>zmin && z1>zmin && z2>zmin && xM>=0 && xm=0 && ymxM) xM = x2; if (x3xM) xM = x3; if (y0yM) yM = y2; if (y3yM) yM = y3; if (z0>zmin && z1>zmin && z2>zmin && z3>zmin && xM>=0 && xm=0 && ym::draw_object3d() : Primitive %u is invalid (size = %u, can be 1,2,3,4,6,9 or 12)", pixel_type(),l,primitive.size()); }} } if (nb_visibles<=0) return *this; CImg permutations; CImg(zrange.data,nb_visibles,1,1,1,true).sort(permutations,false); // Compute light properties CImg lightprops; switch (render_type) { case 3: { // Flat Shading lightprops.assign(nb_visibles); cimg_forX(lightprops,l) { const CImg& primitive = primitives(visibles(permutations(l))); const unsigned int psize = primitive.size(); if (psize==3 || psize==4 || psize==9 || psize==12) { const unsigned int i0 = (unsigned int)primitive(0), i1 = (unsigned int)primitive(1), i2 = (unsigned int)primitive(2); const float x0 = (float)points(i0,0), y0 = (float)points(i0,1), z0 = (float)points(i0,2), x1 = (float)points(i1,0), y1 = (float)points(i1,1), z1 = (float)points(i1,2), x2 = (float)points(i2,0), y2 = (float)points(i2,1), z2 = (float)points(i2,2), dx1 = x1-x0, dy1 = y1-y0, dz1 = z1-z0, dx2 = x2-x0, dy2 = y2-y0, dz2 = z2-z0, nx = dy1*dz2-dz1*dy2, ny = dz1*dx2-dx1*dz2, nz = dx1*dy2-dy1*dx2, norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz), lx = X+(x0+x1+x2)/3-lightx, ly = Y+(y0+y1+y2)/3-lighty, lz = Z+(z0+z1+z2)/3-lightz, nl = (float)std::sqrt(1e-5f+lx*lx+ly*ly+lz*lz), factor = (-lx*nx-ly*ny-lz*nz)/(norm*nl), nfactor = double_sided?cimg::abs(factor):cimg::max(factor,0.0f); lightprops[l] = cimg::min(nfactor+ambiant_light,1.0f); } else lightprops[l] = 1.0f; } } break; case 4: // Gouraud Shading case 5: { // Phong-Shading CImg points_normals(points.width,3,1,1,0); cimglist_for(primitives,l) { const CImg& primitive = primitives[l]; const unsigned int psize = primitive.size(); const bool triangle_flag = (psize==3) || (psize==9), rectangle_flag = (psize==4) || (psize==12); if (triangle_flag || rectangle_flag) { const unsigned int i0 = (unsigned int)primitive(0), i1 = (unsigned int)primitive(1), i2 = (unsigned int)primitive(2), i3 = rectangle_flag?(unsigned int)primitive(3):0; const float x0 = (float)points(i0,0), y0 = (float)points(i0,1), z0 = (float)points(i0,2), x1 = (float)points(i1,0), y1 = (float)points(i1,1), z1 = (float)points(i1,2), x2 = (float)points(i2,0), y2 = (float)points(i2,1), z2 = (float)points(i2,2), dx1 = x1-x0, dy1 = y1-y0, dz1 = z1-z0, dx2 = x2-x0, dy2 = y2-y0, dz2 = z2-z0, nx = dy1*dz2-dz1*dy2, ny = dz1*dx2-dx1*dz2, nz = dx1*dy2-dy1*dx2, norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz), nnx = nx/norm, nny = ny/norm, nnz = nz/norm; points_normals(i0,0)+=nnx; points_normals(i0,1)+=nny; points_normals(i0,2)+=nnz; points_normals(i1,0)+=nnx; points_normals(i1,1)+=nny; points_normals(i1,2)+=nnz; points_normals(i2,0)+=nnx; points_normals(i2,1)+=nny; points_normals(i2,2)+=nnz; if (rectangle_flag) { points_normals(i3,0)+=nnx; points_normals(i3,1)+=nny; points_normals(i3,2)+=nnz; } } } if (render_type==4) { lightprops.assign(points.width); cimg_forX(points,ll) { const float nx = points_normals(ll,0), ny = points_normals(ll,1), nz = points_normals(ll,2), norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz), lx = (float)(X+points(ll,0)-lightx), ly = (float)(Y+points(ll,1)-lighty), lz = (float)(Z+points(ll,2)-lightz), nl = (float)std::sqrt(1e-5f+lx*lx+ly*ly+lz*lz), factor = (-lx*nx-ly*ny-lz*nz)/(norm*nl), nfactor = double_sided?cimg::abs(factor):cimg::max(factor,0.0f); lightprops[ll] = cimg::min(nfactor+ambiant_light,1.0f); } } else { lightprops.assign(points.width,2); cimg_forX(points,ll) { const float nx = points_normals(ll,0), ny = points_normals(ll,1), nz = points_normals(ll,2), norm = (float)std::sqrt(1e-5f+nx*nx+ny*ny+nz*nz), nnx = nx/norm, nny = ny/norm; lightprops(ll,0) = (light_texture.width/2-1)*(1+nnx); lightprops(ll,1) = (light_texture.height/2-1)*(1+nny); } } } break; } // Draw visible primitives const unsigned int opacsize = opacities.size; { for (unsigned int l=0; l& primitive = primitives[n_primitive]; const CImg& color = colors[n_primitive%colors.size]; const CImg& opacity = opacities[n_primitive%opacsize]; const float opac = opacity.size()?(float)opacity(0):1.0f; switch (primitive.size()) { case 1: { // colored point or sprite const unsigned int n0 = (unsigned int)primitive[0]; const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1); if (color.size()==dim) draw_point(x0,y0,color.ptr(),opac); else { const float z = Z + points(n0,2); const int factor = (int)(focale*100/(z+focale)); const int sw = color.width*factor/200, sh = color.height*factor/200; if (x0+sw>=0 && x0-sw<(int)width && y0+sh>=0 && y0-sh<(int)height) { const CImg sprite = color.get_resize(-factor,-factor,1,-100,render_type<=3?1:3); if (opacity.width==color.width && opacity.height==color.height) draw_image(sprite,opacity.get_resize(sprite.width,sprite.height,1,sprite.dim,1),x0-sw,y0-sh,0,0); else draw_image(sprite,x0-sw,y0-sh,0,0,opac); } } } break; case 2: { // colored line const unsigned int n0 = (unsigned int)primitive[0], n1 = (unsigned int)primitive[1]; const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1), x1 = (int)projections(n1,0), y1 = (int)projections(n1,1); if (render_type) draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac); else draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac); } break; case 6: { // textured line const unsigned int n0 = (unsigned int)primitive[0], n1 = (unsigned int)primitive[1], tx0 = (unsigned int)primitive[2], ty0 = (unsigned int)primitive[3], tx1 = (unsigned int)primitive[4], ty1 = (unsigned int)primitive[5]; const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1), x1 = (int)projections(n1,0), y1 = (int)projections(n1,1); if (render_type) draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac); else draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac). draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac); } break; case 3: { // colored triangle const unsigned int n0 = (unsigned int)primitive[0], n1 = (unsigned int)primitive[1], n2 = (unsigned int)primitive[2]; const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1), x1 = (int)projections(n1,0), y1 = (int)projections(n1,1), x2 = (int)projections(n2,0), y2 = (int)projections(n2,1); switch(render_type) { case 0: draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac).draw_point(x2,y2,color.ptr(),opac); break; case 1: draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac).draw_line(x0,y0,x2,y2,color.ptr(),~0L,opac). draw_line(x1,y1,x2,y2,color.ptr(),~0L,opac); break; case 2: draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac); break; case 3: draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac,lightprops(l)); break; case 4: draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),lightprops(n0),lightprops(n1),lightprops(n2),opac); break; case 5: draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),light_texture, (unsigned int)lightprops(n0,0), (unsigned int)lightprops(n0,1), (unsigned int)lightprops(n1,0), (unsigned int)lightprops(n1,1), (unsigned int)lightprops(n2,0), (unsigned int)lightprops(n2,1), opac); break; } } break; case 4: { // colored rectangle const unsigned int n0 = (unsigned int)primitive[0], n1 = (unsigned int)primitive[1], n2 = (unsigned int)primitive[2], n3 = (unsigned int)primitive[3]; const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1), x1 = (int)projections(n1,0), y1 = (int)projections(n1,1), x2 = (int)projections(n2,0), y2 = (int)projections(n2,1), x3 = (int)projections(n3,0), y3 = (int)projections(n3,1); switch(render_type) { case 0: draw_point(x0,y0,color.ptr(),opac).draw_point(x1,y1,color.ptr(),opac). draw_point(x2,y2,color.ptr(),opac).draw_point(x3,y3,color.ptr(),opac); break; case 1: draw_line(x0,y0,x1,y1,color.ptr(),~0L,opac).draw_line(x1,y1,x2,y2,color.ptr(),~0L,opac). draw_line(x2,y2,x3,y3,color.ptr(),~0L,opac).draw_line(x3,y3,x0,y0,color.ptr(),~0L,opac); break; case 2: draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac).draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),opac); break; case 3: draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),opac,lightprops(l)). draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),opac,lightprops(l)); break; case 4: { const float lightprop0 = lightprops(n0), lightprop1 = lightprops(n1), lightprop2 = lightprops(n2), lightprop3 = lightprops(n3); draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),lightprop0,lightprop1,lightprop2,opac). draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),lightprop0,lightprop2,lightprop3,opac); } break; case 5: { const unsigned int lx0 = (unsigned int)lightprops(n0,0), ly0 = (unsigned int)lightprops(n0,1), lx1 = (unsigned int)lightprops(n1,0), ly1 = (unsigned int)lightprops(n1,1), lx2 = (unsigned int)lightprops(n2,0), ly2 = (unsigned int)lightprops(n2,1), lx3 = (unsigned int)lightprops(n3,0), ly3 = (unsigned int)lightprops(n3,1); draw_triangle(x0,y0,x1,y1,x2,y2,color.ptr(),light_texture,lx0,ly0,lx1,ly1,lx2,ly2,opac). draw_triangle(x0,y0,x2,y2,x3,y3,color.ptr(),light_texture,lx0,ly0,lx2,ly2,lx3,ly3,opac); } break; } } break; case 9: { // Textured triangle const unsigned int n0 = (unsigned int)primitive[0], n1 = (unsigned int)primitive[1], n2 = (unsigned int)primitive[2], tx0 = (unsigned int)primitive[3], ty0 = (unsigned int)primitive[4], tx1 = (unsigned int)primitive[5], ty1 = (unsigned int)primitive[6], tx2 = (unsigned int)primitive[7], ty2 = (unsigned int)primitive[8]; const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1), x1 = (int)projections(n1,0), y1 = (int)projections(n1,1), x2 = (int)projections(n2,0), y2 = (int)projections(n2,1); switch(render_type) { case 0: draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac). draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac). draw_point(x2,y2,color.get_vector_at(tx2,ty2).ptr(),opac); break; case 1: draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac). draw_line(x0,y0,x2,y2,color,tx0,ty0,tx2,ty2,opac). draw_line(x1,y1,x2,y2,color,tx1,ty1,tx2,ty2,opac); break; case 2: draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac); break; case 3: draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac,lightprops(l)); break; case 4: draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,lightprops(n0),lightprops(n1),lightprops(n2),opac); break; case 5: draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture, (unsigned int)lightprops(n0,0), (unsigned int)lightprops(n0,1), (unsigned int)lightprops(n1,0), (unsigned int)lightprops(n1,1), (unsigned int)lightprops(n2,0), (unsigned int)lightprops(n2,1), opac); break; } } break; case 12: { // Textured rectangle const unsigned int n0 = (unsigned int)primitive[0], n1 = (unsigned int)primitive[1], n2 = (unsigned int)primitive[2], n3 = (unsigned int)primitive[3], tx0 = (unsigned int)primitive[4], ty0 = (unsigned int)primitive[5], tx1 = (unsigned int)primitive[6], ty1 = (unsigned int)primitive[7], tx2 = (unsigned int)primitive[8], ty2 = (unsigned int)primitive[9], tx3 = (unsigned int)primitive[10], ty3 = (unsigned int)primitive[11]; const int x0 = (int)projections(n0,0), y0 = (int)projections(n0,1), x1 = (int)projections(n1,0), y1 = (int)projections(n1,1), x2 = (int)projections(n2,0), y2 = (int)projections(n2,1), x3 = (int)projections(n3,0), y3 = (int)projections(n3,1); switch(render_type) { case 0: draw_point(x0,y0,color.get_vector_at(tx0,ty0).ptr(),opac). draw_point(x1,y1,color.get_vector_at(tx1,ty1).ptr(),opac). draw_point(x2,y2,color.get_vector_at(tx2,ty2).ptr(),opac). draw_point(x3,y3,color.get_vector_at(tx3,ty3).ptr(),opac); break; case 1: draw_line(x0,y0,x1,y1,color,tx0,ty0,tx1,ty1,opac). draw_line(x1,y1,x2,y2,color,tx1,ty1,tx2,ty2,opac). draw_line(x2,y2,x3,y3,color,tx2,ty2,tx3,ty3,opac). draw_line(x3,y3,x0,y0,color,tx3,ty3,tx0,ty0,opac); break; case 2: draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac). draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,opac); break; case 3: draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,opac,lightprops(l)). draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,opac,lightprops(l)); break; case 4: { const float lightprop0 = lightprops(n0), lightprop1 = lightprops(n1), lightprop2 = lightprops(n2), lightprop3 = lightprops(n3); draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,lightprop0,lightprop1,lightprop2,opac). draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx2,ty2,tx3,ty3,lightprop0,lightprop2,lightprop3,opac); } break; case 5: { const unsigned int lx0 = (unsigned int)lightprops(n0,0), ly0 = (unsigned int)lightprops(n0,1), lx1 = (unsigned int)lightprops(n1,0), ly1 = (unsigned int)lightprops(n1,1), lx2 = (unsigned int)lightprops(n2,0), ly2 = (unsigned int)lightprops(n2,1), lx3 = (unsigned int)lightprops(n3,0), ly3 = (unsigned int)lightprops(n3,1); draw_triangle(x0,y0,x1,y1,x2,y2,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture,lx0,ly0,lx1,ly1,lx2,ly2,opac). draw_triangle(x0,y0,x2,y2,x3,y3,color,tx0,ty0,tx1,ty1,tx2,ty2,light_texture,lx0,ly0,lx2,ly2,lx3,ly3,opac); } break; } } break; } } } return *this; } //! Draw a 3D object in the instance image template CImg& draw_object3d(const float X, const float Y, const float Z, const CImgList& points, const CImgList& primitives, const CImgList& colors, const CImgList& opacities, const unsigned int render_type=4, const bool double_sided=false, const float focale=500, const float lightx=0, const float lighty=0, const float lightz=-5000, const float ambiant_light = 0.05f) { if (points.is_empty()) return *this; CImg npoints(points.size,3,1,1,0); tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2); cimg_forX(npoints,l) { const CImg& point = points[l]; const unsigned int siz = point.size(); if (!siz) throw CImgArgumentException("CImg<%s>::draw_object3d() : Given points (size=%u) contains a null element at " "position %u.",pixel_type(),points.size,l); *(ptrZ++) = (siz>2)?point(2):0; *(ptrY++) = (siz>1)?point(1):0; *(ptrX++) = point(0); } return draw_object3d(X,Y,Z,npoints,primitives,colors,opacities, render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light); } //! Draw a 3D object in the instance image template CImg& draw_object3d(const float X, const float Y, const float Z, const CImg& points, const CImgList& primitives, const CImgList& colors, const CImg& opacities, const unsigned int render_type=4, const bool double_sided=false, const float focale=500, const float lightx=0, const float lighty=0, const float lightz=-5000, const float ambiant_light = 0.05f) { CImgList nopacities(opacities.size(),1); cimglist_for(nopacities,l) nopacities(l,0) = opacities(l); return draw_object3d(X,Y,Z,points,primitives,colors,nopacities, render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light); } //! Draw a 3D object in the instance image template CImg& draw_object3d(const float X, const float Y, const float Z, const CImgList& points, const CImgList& primitives, const CImgList& colors, const CImg& opacities, const unsigned int render_type=4, const bool double_sided=false, const float focale=500, const float lightx=0, const float lighty=0, const float lightz=-5000, const float ambiant_light = 0.05f) { CImgList nopacities(opacities.size(),1); { cimglist_for(nopacities,l) nopacities(l,0) = opacities(l); } if (points.is_empty()) return *this; CImg npoints(points.size,3,1,1,0); tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2); cimg_forX(npoints,l) { const CImg& point = points[l]; const unsigned int siz = point.size(); if (!siz) throw CImgArgumentException("CImg<%s>::draw_object3d() : Given points (size=%u) contains a null element at " "position %u.",pixel_type(),points.size,l); *(ptrZ++) = (siz>2)?point(2):0; *(ptrY++) = (siz>1)?point(1):0; *(ptrX++) = point(0); } return draw_object3d(X,Y,Z,npoints,primitives,colors,nopacities, render_type,double_sided,focale,lightx,lighty,lightz,ambiant_light); } //! Draw a 3D object in the instance image template CImg& draw_object3d(const float X, const float Y, const float Z, const tp& points, const CImgList& primitives, const CImgList& colors, const unsigned int render_type=4, const bool double_sided=false, const float focale=500, const float lightx=0, const float lighty=0, const float lightz=-5000, const float ambiant_light = 0.05f, const float opacity=1.0f) { return draw_object3d(X,Y,Z,points,primitives,colors, CImg(primitives.size,1,1,1,opacity), render_type,double_sided,focale,lightx,lighty,lightz, ambiant_light); } //! Rescale and center a 3D object CImg& resize_object3d(const float siz=100, const bool centering=true) { T *ptrx = ptr(0,0), *ptry = ptr(0,1), *ptrz = ptr(0,2); float xm = (float)*(ptrx++), ym = (float)*(ptry++), zm = (float)*(ptrz++), xM = xm, yM = ym, zM = zm; for (unsigned int p=1; pxM) xM = x; if (y>yM) yM = y; if (z>zM) zM = z; } const float cx = 0.5f*(xm+xM), cy = 0.5f*(ym+yM), cz = 0.5f*(zm+zM), delta = cimg::max(xM-xm,yM-ym,zM-zm), ratio = (siz>=0)?(delta<=0?0:(siz/delta)):-siz/100; ptrx = ptr(0,0); ptry = ptr(0,1); ptrz = ptr(0,2); if (centering) cimg_forX(*this,l) { T &x = *(ptrx++), &y = *(ptry++), &z = *(ptrz++); x = (T)((x-cx)*ratio); y = (T)((y-cy)*ratio); z = (T)((z-cz)*ratio); } else cimg_forX(*this,l) { T &x = *(ptrx++), &y = *(ptry++), &z = *(ptrz++); x = (T)(cx+(x-cx)*ratio); y = (T)(cy+(y-cy)*ratio); z = (T)(cz+(z-cz)*ratio); } return *this; } //! Get a rescaled and centered version of the 3D object CImg get_resize_object3d(const float siz=100, const bool centering=true) const { return CImg(*this,false).resize_object3d(siz,centering); } //@} //---------------------------- // //! \name Image Filtering //@{ //---------------------------- //! Return the correlation of the image by a mask. /** The result \p res of the correlation of an image \p img by a mask \p mask is defined to be : res(x,y,z) = sum_{i,j,k} img(x+i,y+j,z+k)*mask(i,j,k) \param mask = the correlation kernel. \param cond = the border condition type (0=zero, 1=dirichlet) \param weighted_correl = enable local normalization. **/ template CImg::type> get_correlate(const CImg& mask,const unsigned int cond=1,const bool weighted_correl=false) const { typedef typename cimg::largest::type restype; typedef typename cimg::largest::type fftype; typedef typename cimg::largest::type ftype; if (is_empty()) return CImg(); if (mask.is_empty() || mask.dim!=1) throw CImgArgumentException("CImg<%s>::get_correlate() : Specified mask (%u,%u,%u,%u,%p) is not scalar.", pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); CImg dest(width,height,depth,dim); if (cond && mask.width==mask.height && ((mask.depth==1 && mask.width<=5) || (mask.depth==mask.width && mask.width<=3))) { // A special optimization is done for 2x2,3x3,4x4,5x5,2x2x2 and 3x3x3 mask (with cond=1) switch (mask.depth) { case 3: { CImg_3x3x3(I,T); if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3x3(I,mask); else cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum3x3x3(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3x3(I,mask)/std::sqrt(norm)):0; } } break; case 2: { CImg_2x2x2(I,T); if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2x2(I,mask); else cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum2x2x2(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2x2(I,mask)/std::sqrt(norm)):0; } } break; default: case 1: switch (mask.width) { case 5: { CImg_5x5(I,T); if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr5x5(I,mask); else cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum5x5(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr5x5(I,mask)/std::sqrt(norm)):0; } } break; case 4: { CImg_4x4(I,T); if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr4x4(I,mask); else cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum4x4(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr4x4(I,mask)/std::sqrt(norm)):0; } } break; case 3: { CImg_3x3(I,T); if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr3x3(I,mask); else cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum3x3(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr3x3(I,mask)/std::sqrt(norm)):0; } } break; case 2: { CImg_2x2(I,T); if (!weighted_correl) cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_corr2x2(I,mask); else cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum2x2(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_corr2x2(I,mask)/std::sqrt(norm)):0; } } break; case 1: dest = mask(0)*(*this); break; } } } else { // Generic version for other masks const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2); cimg_forV(*this,v) if (!weighted_correl) { // Classical correlation for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) val+= pix3d(x+xm,y+ym,z+zm,v)*mask(cxm+xm,cym+ym,czm+zm,0); dest(x,y,z,v)=(restype)val; } else cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) val+= pix3d(x+xm,y+ym,z+zm,v,0)*mask(cxm+xm,cym+ym,czm+zm,0); dest(x,y,z,v)=(restype)val; } } else { // Weighted correlation for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = pix3d(x+xm,y+ym,z+zm,v); val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); norm+=cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0; } else cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = pix3d(x+xm,y+ym,z+zm,v,0); val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); norm+= cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt((double)norm)):0; } } } return dest; } //! Correlate the image by a mask /** This is the in-place version of get_correlate. \see get_correlate **/ template CImg& correlate(const CImg& mask,const unsigned int cond=1,const bool weighted_correl=false) { return get_correlate(mask,cond,weighted_correl).swap(*this); } //! Return the convolution of the image by a mask /** The result \p res of the convolution of an image \p img by a mask \p mask is defined to be : res(x,y,z) = sum_{i,j,k} img(x-i,y-j,z-k)*mask(i,j,k) \param mask = the correlation kernel. \param cond = the border condition type (0=zero, 1=dirichlet) \param weighted_convol = enable local normalization. **/ template CImg::type> get_convolve(const CImg& mask, const unsigned int cond=1, const bool weighted_convol=false) const { typedef typename cimg::largest::type restype; typedef typename cimg::largest::type fftype; typedef typename cimg::largest::type ftype; if (is_empty()) return CImg(); if (mask.is_empty() || mask.dim!=1) throw CImgArgumentException("CImg<%s>::get_convolve() : Specified mask (%u,%u,%u,%u,%p) is not scalar.", pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); CImg dest(width,height,depth,dim); if (cond && mask.width==mask.height && ((mask.depth==1 && mask.width<=5) || (mask.depth==mask.width && mask.width<=3))) { // optimized version switch (mask.depth) { case 3: { CImg_3x3x3(I,T); if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv3x3x3(I,mask); else cimg_forZV(*this,z,v) cimg_for3x3x3(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum3x3x3(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3x3(I,mask)/std::sqrt(norm)):0; } } break; case 2: { CImg_2x2x2(I,T); if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv2x2x2(I,mask); else cimg_forZV(*this,z,v) cimg_for2x2x2(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum2x2x2(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2x2(I,mask)/std::sqrt(norm)):0; } } break; default: case 1: switch (mask.width) { case 5: { CImg_5x5(I,T); if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) dest(x,y,z,v) = cimg_conv5x5(I,mask); else cimg_forZV(*this,z,v) cimg_for5x5(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum5x5(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv5x5(I,mask)/std::sqrt(norm)):0; } } break; case 4: { CImg_4x4(I,T); if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv4x4(I,mask); else cimg_forZV(*this,z,v) cimg_for4x4(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum4x4(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv4x4(I,mask)/std::sqrt(norm)):0; } } break; case 3: { CImg_3x3(I,T); if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv3x3(I,mask); else cimg_forZV(*this,z,v) cimg_for3x3(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum3x3(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv3x3(I,mask)/std::sqrt(norm)):0; } } break; case 2: { CImg_2x2(I,T); if (!weighted_convol) cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) dest(x,y,z,v) = (T)cimg_conv2x2(I,mask); else cimg_forZV(*this,z,v) cimg_for2x2(*this,x,y,z,v,I) { const double norm = (double)cimg_squaresum2x2(I); dest(x,y,z,v) = (norm!=0)?(restype)(cimg_conv2x2(I,mask)/std::sqrt(norm)):0; } } break; case 1: dest = mask(0)*(*this); break; } } } else { // generic version const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2); cimg_forV(*this,v) if (!weighted_convol) { // Classical convolution for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) val+= pix3d(x-xm,y-ym,z-zm,v)*mask(cxm+xm,cym+ym,czm+zm,0); dest(x,y,z,v)=(restype)val; } else cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) val+= pix3d(x-xm,y-ym,z-zm,v,0)*mask(cxm+xm,cym+ym,czm+zm,0); dest(x,y,z,v)=(restype)val; } } else { // Weighted convolution for (int z=czm; z=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { ftype val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = pix3d(x-xm,y-ym,z-zm,v); val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); norm+=cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0; } else cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { double val = 0, norm = 0; for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) { const T cval = pix3d(x-xm,y-ym,z-zm,v,0); val+= cval*mask(cxm+xm,cym+ym,czm+zm,0); norm+= cval*cval; } dest(x,y,z,v)=(norm!=0)?(restype)(val/std::sqrt(norm)):0; } } } return dest; } //! Convolve the image by a mask /** This is the in-place version of get_convolve(). \see get_convolve() **/ template CImg& convolve(const CImg& mask,const unsigned int cond=1,const bool weighted_convol=false) { return get_convolve(mask,cond,weighted_convol).swap(*this); } //! Return the erosion of the image by a structuring element. template CImg::type> get_erode(const CImg& mask, const unsigned int cond=1, const bool weighted_erosion=false) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImg(); if (mask.is_empty() || mask.dim!=1) throw CImgArgumentException("CImg<%s>::get_erosion() : Specified mask (%u,%u,%u,%u,%p) is not a scalar image.", pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); CImg dest(width,height,depth,dim); const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2); cimg_forV(*this,v) if (!weighted_erosion) { // Classical erosion for (int z=czm; z::max(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)(*this)(x+xm,y+ym,z+zm,v),min_val); dest(x,y,z,v)=min_val; } if (cond) cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype min_val = cimg::type::max(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v),min_val); dest(x,y,z,v)=min_val; } else cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype min_val = cimg::type::max(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if (mask(cxm+xm,cym+ym,czm+zm,0)) min_val = cimg::min((restype)pix3d(x+xm,y+ym,z+zm,v,0),min_val); dest(x,y,z,v)=min_val; } } else { // Weighted erosion t mval=0; for (int z=czm; z::max(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)((*this)(x+xm,y+ym,z+zm,v)+mval),min_val); dest(x,y,z,v)=min_val; } if (cond) cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype min_val = cimg::type::max(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v)+mval),min_val); dest(x,y,z,v)=min_val; } else cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype min_val = cimg::type::max(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) min_val = cimg::min((restype)(pix3d(x+xm,y+ym,z+zm,v,0)+mval),min_val); dest(x,y,z,v)=min_val; } } return dest; } //! Erode the image by a structuring element /** This is the in-place version of get_erode(). \see get_erode() **/ template CImg& erode(const CImg& mask,const unsigned int cond=1,const bool weighted_erosion=false) { return get_erode(mask,cond,weighted_erosion).swap(*this); } //! Erode the image by a square structuring element of size n CImg get_erode(const unsigned int n, const unsigned int cond=1) const { static CImg mask; if (mask.width!=n) mask.assign(n,n,1,1,1); const CImg res = get_erode(mask,cond,false); if (n>20) mask.assign(); return res; } //! Erode the image by a square structuring element of size n CImg& erode(const unsigned int n, const unsigned int cond=1) { return get_erode(n,cond).swap(*this); } //! Return the dilatation of the image by a structuring element. template CImg::type> get_dilate(const CImg& mask, const unsigned int cond=1, const bool weighted_dilatation=false) const { typedef typename cimg::largest::type restype; if (is_empty()) return CImg(); if (mask.is_empty() || mask.dim!=1) throw CImgArgumentException("CImg<%s>::get_dilate() : Specified mask (%u,%u,%u,%u,%p) is not a scalar image.", pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data); CImg dest(width,height,depth,dim); const int cxm=mask.width/2, cym=mask.height/2, czm=mask.depth/2, fxm=cxm-1+(mask.width%2), fym=cym-1+(mask.height%2), fzm=czm-1+(mask.depth%2); cimg_forV(*this,v) if (!weighted_dilatation) { // Classical dilatation for (int z=czm; z::min(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)(*this)(x+xm,y+ym,z+zm,v),max_val); dest(x,y,z,v)=max_val; } if (cond) cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype max_val = cimg::type::min(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v),max_val); dest(x,y,z,v)=max_val; } else cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype max_val = cimg::type::min(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if (mask(cxm+xm,cym+ym,czm+zm,0)) max_val = cimg::max((restype)pix3d(x+xm,y+ym,z+zm,v,0),max_val); dest(x,y,z,v)=max_val; } } else { // Weighted dilatation t mval=0; for (int z=czm; z::min(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)((*this)(x+xm,y+ym,z+zm,v)-mval),max_val); dest(x,y,z,v)=max_val; } if (cond) cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype max_val = cimg::type::min(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v)-mval),max_val); dest(x,y,z,v)=max_val; } else cimg_forYZV(*this,y,z,v) for (int x=0; x=dimy()-cym || z=dimz()-czm)?x++:((x=dimx()-cxm)?x++:(x=dimx()-cxm))) { restype max_val = cimg::type::min(); for (int zm=-czm; zm<=fzm; zm++) for (int ym=-cym; ym<=fym; ym++) for (int xm=-cxm; xm<=fxm; xm++) if ((mval=mask(cxm+xm,cym+ym,czm+zm,0))!=0) max_val = cimg::max((restype)(pix3d(x+xm,y+ym,z+zm,v,0)-mval),max_val); dest(x,y,z,v)=max_val; } } return dest; } //! Dilate the image by a structuring element /** This is the in-place version of get_dilate(). \see get_dilate() **/ template CImg& dilate(const CImg& mask,const unsigned int cond=1,const bool weighted_dilatation=false) { return get_dilate(mask,cond,weighted_dilatation).swap(*this); } //! Dilate the image by a square structuring element of size n CImg get_dilate(const unsigned int n, const unsigned int cond=1) const { static CImg mask; if (mask.width!=n) mask.assign(n,n,1,1,1); const CImg res = get_dilate(mask,cond,false); if (n>20) mask.assign(); return res; } //! Dilate the image by a square structuring element of size n CImg& dilate(const unsigned int n, const unsigned int cond=1) { return get_dilate(n,cond).swap(*this); } //! Add noise to the image /** This is the in-place version of get_noise. \see get_noise. **/ CImg& noise(const double sigma=-20, const unsigned int ntype=0) { if (!is_empty()) { double nsigma = sigma, max = (double)cimg::type::max(), min = (double)cimg::type::min(); static bool first_time = true; if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; } CImgStats st; if (nsigma==0) return *this; if (nsigma<0 || ntype==2) st = CImgStats(*this,false); if (nsigma<0) nsigma = -nsigma*(st.max-st.min)/100.0; switch (ntype) { case 0: { // Gaussian noise cimg_for(*this,ptr,T) { double val = *ptr+nsigma*cimg::grand(); if (val>max) val = max; if (valmax) val = max; if (val100.0) *ptr = (T)(unsigned int)((std::sqrt(z) * cimg::grand()) + z); else { unsigned int k = 0; const double y=std::exp(-z); for (double s=1.0; s>=y; k++) s *= cimg::rand(); *ptr=(T)(k-1); } } } } break; case 4: { // Rice noise const double sqrt2 = (double)std::sqrt(2.0); cimg_for(*this,ptr,T) { const double val0 = (double)*ptr/sqrt2, re = val0 + nsigma*cimg::grand(), im = val0 + nsigma*cimg::grand(); double val = std::sqrt(re*re + im*im); if (val>max) val = max; if (val=0; i--) { Y0=a3*I1+a4*I2+b1*Y1+b2*Y2; ima-=offset; \ I2=I1; I1=*ima; *ima=(T)(*(--Y)+Y0); Y2=Y1; Y1=Y0; } \ } //! Apply a deriche filter on the image /** This is the in-place version of get_deriche \see get_deriche. **/ CImg& deriche(const float sigma=1,const int order=0,const char axe='x',const unsigned int cond=1) { if (!is_empty()) { if (sigma<0 || order<0 || order>2) throw CImgArgumentException("CImg<%s>::deriche() : Bad arguments (sigma=%g, order=%d)",pixel_type(),sigma,order); const float alpha=sigma>0?(1.695f/sigma):20,ea=(float)std::exp(alpha),ema=(float)std::exp(-alpha),em2a=ema*ema,b1=2*ema,b2=-em2a; float ek,ekn,parity,a1,a2,a3,a4,g0,sumg1,sumg0; double *Y,Y0,Y1,Y2; int i,offset,nb; T *ima,I1,I2; switch(order) { case 1: // first derivative ek = -(1-ema)*(1-ema)*(1-ema)/(2*(ema+1)*ema); a1 = a4 = 0; a2 = ek*ema; a3 = -ek*ema; parity =-1; if (cond) { sumg1 = (ek*ea) / ((ea-1)*(ea-1)); g0 = 0; sumg0 = g0+sumg1; } else g0 = sumg0 = sumg1 = 0; break; case 2: // second derivative ekn = ( -2*(-1+3*ea-3*ea*ea+ea*ea*ea)/(3*ea+1+3*ea*ea+ea*ea*ea) ); ek = -(em2a-1)/(2*alpha*ema); a1 = ekn; a2 = -ekn*(1+ek*alpha)*ema; a3 = ekn*(1-ek*alpha)*ema; a4 = -ekn*em2a; parity =1; if (cond) { sumg1 = ekn/2; g0 = ekn; sumg0 = g0+sumg1; } else g0=sumg0=sumg1=0; break; default: // smoothing ek = (1-ema)*(1-ema) / (1+2*alpha*ema - em2a); a1 = ek; a2 = ek*ema*(alpha-1); a3 = ek*ema*(alpha+1); a4 = -ek*em2a; parity = 1; if (cond) { sumg1 = ek*(alpha*ea+ea-1) / ((ea-1)*(ea-1)); g0 = ek; sumg0 = g0+sumg1; } else g0=sumg0=sumg1=0; break; } // filter init Y = new double[cimg::max(width,height,depth)]; switch(cimg::uncase(axe)) { case 'x': if (width>1) { offset = 1; nb = width; cimg_forYZV(*this,y,z,k) cimg_deriche_apply(0,y,z,k,nb,offset,T); } break; case 'y': if (height>1) { offset = width; nb = height; cimg_forXZV(*this,x,z,k) cimg_deriche_apply(x,0,z,k,nb,offset,T); } break; case 'z': if (depth>1) { offset = width*height; nb = depth; cimg_forXYV(*this,x,y,k) cimg_deriche_apply(x,y,0,k,nb,offset,T); } break; default: throw CImgArgumentException("CImg<%s>::deriche() : unknow axe '%c', must be 'x','y' or 'z'",pixel_type(),axe); } delete[] Y; } return *this; } //! Return the result of the Deriche filter /** The Canny-Deriche filter is a recursive algorithm allowing to compute blurred derivatives of order 0,1 or 2 of an image. \see blur **/ CImg get_deriche(const float sigma=1,const int order=0,const char axe='x',const unsigned int cond=1) const { return (+*this).deriche(sigma,order,axe,cond); } //! Blur the image with a Deriche filter (anisotropically) /** This is the in-place version of get_blur(). \see get_blur(). **/ CImg& blur(const float sigmax,const float sigmay,const float sigmaz,const unsigned int cond=1) { if (!is_empty()) { if (width>1 && sigmax>0) deriche(sigmax,0,'x',cond); if (height>1 && sigmay>0) deriche(sigmay,0,'y',cond); if (depth>1 && sigmaz>0) deriche(sigmaz,0,'z',cond); } return *this; } //! Blur the image with a Canny-Deriche filter. /** This is the in-place version of get_blur(). **/ CImg& blur(const float sigma,const unsigned int cond=1) { return blur(sigma,sigma,sigma,cond); } //! Return a blurred version of the image, using a Canny-Deriche filter. /** Blur the image with an anisotropic exponential filter (Deriche filter of order 0). **/ CImg get_blur(const float sigmax,const float sigmay,const float sigmaz,const unsigned int cond=1) const { return (+*this).blur(sigmax,sigmay,sigmaz,cond); } //! Return a blurred version of the image, using a Canny-Deriche filter. CImg get_blur(const float sigma,const unsigned int cond=1) const { return (+*this).blur(sigma,cond); } //! Blur an image following a field of diffusion tensors. /** This is the in-place version of get_blur_anisotropic(). **/ template CImg& blur_anisotropic(const CImg& G, const float amplitude=60.0f, const float dl=0.8f,const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true) { #define cimg_valign2d(i,j) \ { ftype &u = W(i,j,0,0), &v = W(i,j,0,1); \ if (u*curru + v*currv<0) { u=-u; v=-v; }} #define cimg_valign3d(i,j,k) \ { ftype &u = W(i,j,k,0), &v = W(i,j,k,1), &w = W(i,j,k,2); \ if (u*curru + v*currv + w*currw<0) { u=-u; v=-v; w=-w; }} // Check arguments and init variables typedef typename cimg::largest::type ftype; if (!is_empty() && amplitude>0) { if (G.is_empty() || (G.dim!=3 && G.dim!=6) || G.width!=width || G.height!=height || G.depth!=depth) throw CImgArgumentException("CImg<%s>::blur_anisotropic() : Specified tensor field (%u,%u,%u,%u) is not valid.", pixel_type(),G.width,G.height,G.depth,G.dim); const float sqrt2amplitude = (float)std::sqrt(2*amplitude); const bool threed = (G.dim>=6); const int dx1 = dimx()-1, dy1 = dimy()-1, dz1 = dimz()-1; CImg dest(width,height,depth,dim,0), W(width,height,depth,threed?4:3), tmp(dim); int N = 0; if (threed) // 3D version of the algorithm for (float phi=(180%(int)da)/2.0f; phi<=180; phi+=da) { const float phir = (float)(phi*cimg::PI/180), datmp = (float)(da/std::cos(phir)), da2 = datmp<1?360.0f:datmp; for (float theta=0; theta<360; (theta+=da2),N++) { const float thetar = (float)(theta*cimg::PI/180), vx = (float)(std::cos(thetar)*std::cos(phir)), vy = (float)(std::sin(thetar)*std::cos(phir)), vz = (float)std::sin(phir); const t *pa = G.ptr(0,0,0,0), *pb = G.ptr(0,0,0,1), *pc = G.ptr(0,0,0,2), *pd = G.ptr(0,0,0,3), *pe = G.ptr(0,0,0,4), *pf = G.ptr(0,0,0,5); ftype *pd0 = W.ptr(0,0,0,0), *pd1 = W.ptr(0,0,0,1), *pd2 = W.ptr(0,0,0,2), *pd3 = W.ptr(0,0,0,3); cimg_forXYZ(G,xg,yg,zg) { const t a = *(pa++), b = *(pb++), c = *(pc++), d = *(pd++), e = *(pe++), f = *(pf++); const float u = (float)(a*vx + b*vy + c*vz), v = (float)(b*vx + d*vy + e*vz), w = (float)(c*vx + e*vy + f*vz), n = (float)std::sqrt(1e-5+u*u+v*v+w*w), dln = dl/n; *(pd0++) = (ftype)(u*dln); *(pd1++) = (ftype)(v*dln); *(pd2++) = (ftype)(w*dln); *(pd3++) = (ftype)n; } cimg_forXYZ(*this,x,y,z) { tmp.fill(0); const float cu = (float)W(x,y,z,0), cv = (float)W(x,y,z,1), cw = (float)W(x,y,z,2), n = (float)W(x,y,z,3), fsigma = (float)(n*sqrt2amplitude), length = gauss_prec*fsigma, fsigma2 = 2*fsigma*fsigma; float S = 0, pu = cu, pv = cv, pw = cw, X = (float)x, Y = (float)y, Z = (float)z; switch (interpolation) { case 0: // Nearest neighbor for (float l=0; l=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) { const int cx = (int)(X+0.5f), cy = (int)(Y+0.5f), cz = (int)(Z+0.5f); float u = (float)W(cx,cy,cz,0), v = (float)W(cx,cy,cz,1), w = (float)W(cx,cy,cz,2); if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; } if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)(*this)(cx,cy,cz,k); S++; } else { const float coef = (float)std::exp(-l*l/fsigma2); cimg_forV(*this,k) tmp[k]+=(ftype)(coef*(*this)(cx,cy,cz,k)); S+=coef; } X+=(pu=u); Y+=(pv=v); Z+=(pw=w); } break; case 1: // Linear interpolation for (float l=0; l=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) { const int cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1, cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1, cz = (int)Z, pz = (cz-1<0)?0:cz-1, nz = (cz+1>dz1)?dz1:cz+1; const float curru = (float)W(cx,cy,cz,0), currv = (float)W(cx,cy,cz,1), currw = (float)W(cx,cy,cz,2); cimg_valign3d(px,py,pz); cimg_valign3d(cx,py,pz); cimg_valign3d(nx,py,pz); cimg_valign3d(px,cy,pz); cimg_valign3d(cx,cy,pz); cimg_valign3d(nx,cy,pz); cimg_valign3d(px,ny,pz); cimg_valign3d(cx,ny,pz); cimg_valign3d(nx,ny,pz); cimg_valign3d(px,py,cz); cimg_valign3d(cx,py,cz); cimg_valign3d(nx,py,cz); cimg_valign3d(px,cy,cz); cimg_valign3d(nx,cy,cz); cimg_valign3d(px,ny,cz); cimg_valign3d(cx,ny,cz); cimg_valign3d(nx,ny,cz); cimg_valign3d(px,py,nz); cimg_valign3d(cx,py,nz); cimg_valign3d(nx,py,nz); cimg_valign3d(px,cy,nz); cimg_valign3d(cx,cy,nz); cimg_valign3d(nx,cy,nz); cimg_valign3d(px,ny,nz); cimg_valign3d(cx,ny,nz); cimg_valign3d(nx,ny,nz); float u = (float)(W.linear_pix3d(X,Y,Z,0)), v = (float)(W.linear_pix3d(X,Y,Z,1)), w = (float)(W.linear_pix3d(X,Y,Z,2)); if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; } if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix3d(X,Y,Z,k); S++; } else { const float coef = (float)std::exp(-l*l/fsigma2); cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix3d(X,Y,Z,k)); S+=coef; } X+=(pu=u); Y+=(pv=v); Z+=(pw=w); } break; default: // 2nd order Runge Kutta for (float l=0; l=0 && X<=dx1 && Y>=0 && Y<=dy1 && Z>=0 && Z<=dz1; l+=dl) { const int cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1, cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1, cz = (int)Z, pz = (cz-1<0)?0:cz-1, nz = (cz+1>dz1)?dz1:cz+1; const float curru = (float)W(cx,cy,cz,0), currv = (float)W(cx,cy,cz,1), currw = (float)W(cx,cy,cz,2); cimg_valign3d(px,py,pz); cimg_valign3d(cx,py,pz); cimg_valign3d(nx,py,pz); cimg_valign3d(px,cy,pz); cimg_valign3d(cx,cy,pz); cimg_valign3d(nx,cy,pz); cimg_valign3d(px,ny,pz); cimg_valign3d(cx,ny,pz); cimg_valign3d(nx,ny,pz); cimg_valign3d(px,py,cz); cimg_valign3d(cx,py,cz); cimg_valign3d(nx,py,cz); cimg_valign3d(px,cy,cz); cimg_valign3d(nx,cy,cz); cimg_valign3d(px,ny,cz); cimg_valign3d(cx,ny,cz); cimg_valign3d(nx,ny,cz); cimg_valign3d(px,py,nz); cimg_valign3d(cx,py,nz); cimg_valign3d(nx,py,nz); cimg_valign3d(px,cy,nz); cimg_valign3d(cx,cy,nz); cimg_valign3d(nx,cy,nz); cimg_valign3d(px,ny,nz); cimg_valign3d(cx,ny,nz); cimg_valign3d(nx,ny,nz); const float u0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,0)), v0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,1)), w0 = (float)(0.5f*W.linear_pix3d(X,Y,Z,2)); float u = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,0)), v = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,1)), w = (float)(W.linear_pix3d(X+u0,Y+v0,Z+w0,2)); if ((pu*u + pv*v + pw*w)<0) { u=-u; v=-v; w=-w; } if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix3d(X,Y,Z,k); S++; } else { const float coef = (float)std::exp(-l*l/fsigma2); cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix3d(X,Y,Z,k)); S+=coef; } X+=(pu=u); Y+=(pv=v); Z+=(pw=w); } break; } if (S>0) cimg_forV(dest,k) dest(x,y,z,k)+=tmp[k]/S; else cimg_forV(dest,k) dest(x,y,z,k)+=(ftype)((*this)(x,y,z,k)); #ifdef cimg_plugin_greycstoration if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++; else return *this; #endif } } } else // 2D version of the algorithm for (float theta=(360%(int)da)/2.0f; theta<360; (theta+=da),N++) { const float thetar = (float)(theta*cimg::PI/180), vx = (float)(std::cos(thetar)), vy = (float)(std::sin(thetar)); const t *pa = G.ptr(0,0,0,0), *pb = G.ptr(0,0,0,1), *pc = G.ptr(0,0,0,2); ftype *pd0 = W.ptr(0,0,0,0), *pd1 = W.ptr(0,0,0,1), *pd2 = W.ptr(0,0,0,2); cimg_forXY(G,xg,yg) { const t a = *(pa++), b = *(pb++), c = *(pc++); const float u = (float)(a*vx + b*vy), v = (float)(b*vx + c*vy), n = (float)std::sqrt(1e-5+u*u+v*v), dln = dl/n; *(pd0++) = (ftype)(u*dln); *(pd1++) = (ftype)(v*dln); *(pd2++) = (ftype)n; } cimg_forXY(*this,x,y) { tmp.fill(0); const float cu = (float)W(x,y,0,0), cv = (float)W(x,y,0,1), n = (float)W(x,y,0,2), fsigma = (float)(n*sqrt2amplitude), length = gauss_prec*fsigma, fsigma2 = 2*fsigma*fsigma; float S = 0, pu = cu, pv = cv, X = (float)x, Y = (float)y; switch (interpolation) { case 0: // Nearest-neighbor interpolation for 2D images for (float l=0; l=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) { const int cx = (int)(X+0.5f), cy = (int)(Y+0.5f); float u = (float)W(cx,cy,0,0), v = (float)W(cx,cy,0,1); if ((pu*u + pv*v)<0) { u=-u; v=-v; } if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)(*this)(cx,cy,0,k); S++; } else { const float coef = (float)std::exp(-l*l/fsigma2); cimg_forV(*this,k) tmp[k]+=(ftype)(coef*(*this)(cx,cy,0,k)); S+=coef; } X+=(pu=u); Y+=(pv=v); } break; case 1: // Linear interpolation for 2D images for (float l=0; l=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) { const int cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1, cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1; const float curru = (float)W(cx,cy,0,0), currv = (float)W(cx,cy,0,1); cimg_valign2d(px,py); cimg_valign2d(cx,py); cimg_valign2d(nx,py); cimg_valign2d(px,cy); cimg_valign2d(nx,cy); cimg_valign2d(px,ny); cimg_valign2d(cx,ny); cimg_valign2d(nx,ny); float u = (float)(W.linear_pix2d(X,Y,0,0)), v = (float)(W.linear_pix2d(X,Y,0,1)); if ((pu*u + pv*v)<0) { u=-u; v=-v; } if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix2d(X,Y,0,k); S++; } else { const float coef = (float)std::exp(-l*l/fsigma2); cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix2d(X,Y,0,k)); S+=coef; } X+=(pu=u); Y+=(pv=v); } break; default: // 2nd-order Runge-kutta interpolation for 2D images for (float l=0; l=0 && X<=dx1 && Y>=0 && Y<=dy1; l+=dl) { const int cx = (int)X, px = (cx-1<0)?0:cx-1, nx = (cx+1>dx1)?dx1:cx+1, cy = (int)Y, py = (cy-1<0)?0:cy-1, ny = (cy+1>dy1)?dy1:cy+1; const float curru = (float)W(cx,cy,0,0), currv = (float)W(cx,cy,0,1); cimg_valign2d(px,py); cimg_valign2d(cx,py); cimg_valign2d(nx,py); cimg_valign2d(px,cy); cimg_valign2d(nx,cy); cimg_valign2d(px,ny); cimg_valign2d(cx,ny); cimg_valign2d(nx,ny); const float u0 = (float)(0.5f*W.linear_pix2d(X,Y,0,0)), v0 = (float)(0.5f*W.linear_pix2d(X,Y,0,1)); float u = (float)(W.linear_pix2d(X+u0,Y+v0,0,0)), v = (float)(W.linear_pix2d(X+u0,Y+v0,0,1)); if ((pu*u + pv*v)<0) { u=-u; v=-v; } if (fast_approx) { cimg_forV(*this,k) tmp[k]+=(ftype)linear_pix2d(X,Y,0,k); S++; } else { const float coef = (float)std::exp(-l*l/fsigma2); cimg_forV(*this,k) tmp[k]+=(ftype)(coef*linear_pix2d(X,Y,0,k)); S+=coef; } X+=(pu=u); Y+=(pv=v); } break; } if (S>0) cimg_forV(dest,k) dest(x,y,0,k)+=tmp[k]/S; else cimg_forV(dest,k) dest(x,y,0,k)+=(ftype)((*this)(x,y,0,k)); #ifdef cimg_plugin_greycstoration if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++; else return *this; #endif } } const ftype *ptrs = dest.data+dest.size(); const T m = cimg::type::min(), M = cimg::type::max(); cimg_for(*this,ptrd,T) { const ftype val = *(--ptrs)/N; *ptrd = valM?M:(T)val); } } return *this; } //! Get a blurred version of an image following a field of diffusion tensors. /** \param G = Field of square roots of diffusion tensors used to drive the smoothing. \param amplitude = amplitude of the smoothing. \param dl = spatial discretization. \param da = angular discretization. \param gauss_prec = precision of the gaussian function. \param interpolation Used interpolation scheme (0 = nearest-neighbor, 1 = linear, 2 = Runge-Kutta) \param fast_approx = Tell to use the fast approximation or not. **/ template CImg get_blur_anisotropic(const CImg& G, const float amplitude=60.0f, const float dl=0.8f,const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true) const { return (+*this).blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx); } //! Blur an image following a field of diffusion tensors. template CImg& blur_anisotropic(const CImg& mask, const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f, const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true, const float geom_factor=1.0f) { if (!is_empty() && amplitude>0) { if (amplitude==0) return *this; if (amplitude<0 || sharpness<0 || anisotropy<0 || anisotropy>1 || alpha<0 || sigma<0 || dl<0 || da<0 || gauss_prec<0) throw CImgArgumentException("CImg<%s>::blur_anisotropic() : Given parameters are amplitude(%g), sharpness(%g), " "anisotropy(%g), alpha(%g), sigma(%g), dl(%g), da(%g), gauss_prec(%g).\n" "Admissible parameters are in the range : amplitude>0, sharpness>0, anisotropy in [0,1], " "alpha>0, sigma>0, dl>0, da>0, gauss_prec>0.", pixel_type(),amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec); const bool threed = (depth>1), no_mask = mask.is_empty(); const float nsharpness = cimg::max(sharpness,1e-5f), power1 = 0.5f*nsharpness, power2 = power1/(1e-7f+1.0f-anisotropy); CImg blurred = CImg(*this,false).blur(alpha); if (geom_factor>0) blurred*=geom_factor; else blurred.normalize(0,-geom_factor); if (threed) { // Field for 3D volumes CImg val(3), vec(3,3), G(blurred.get_structure_tensorXYZ()); if (sigma>0) G.blur(sigma); cimg_forXYZ(*this,x,y,z) { if (no_mask || mask(x,y,z)) { G.get_tensor_at(x,y,z).symmetric_eigen(val,vec); const float l1 = val[2], l2 = val[1], l3 = val[0], ux = vec(0,0), uy = vec(0,1), uz = vec(0,2), vx = vec(1,0), vy = vec(1,1), vz = vec(1,2), wx = vec(2,0), wy = vec(2,1), wz = vec(2,2), n1 = (float)std::pow(1.0f+l1+l2+l3,-power1), n2 = (float)std::pow(1.0f+l1+l2+l3,-power2); G(x,y,z,0) = n1*(ux*ux + vx*vx) + n2*wx*wx; G(x,y,z,1) = n1*(ux*uy + vx*vy) + n2*wx*wy; G(x,y,z,2) = n1*(ux*uz + vx*vz) + n2*wx*wz; G(x,y,z,3) = n1*(uy*uy + vy*vy) + n2*wy*wy; G(x,y,z,4) = n1*(uy*uz + vy*vz) + n2*wy*wz; G(x,y,z,5) = n1*(uz*uz + vz*vz) + n2*wz*wz; } else G(x,y,z,0) = G(x,y,z,1) = G(x,y,z,2) = G(x,y,z,3) = G(x,y,z,4) = G(x,y,z,5) = 0; #ifdef cimg_plugin_greycstoration if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++; else return *this; #endif } blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx); } else { // Field for 2D images CImg val(2), vec(2,2), G(blurred.get_structure_tensorXY()); if (sigma>0) G.blur(sigma); cimg_forXY(*this,x,y) { if (no_mask || mask(x,y)) { G.get_tensor_at(x,y).symmetric_eigen(val,vec); const float l1 = val[1], l2 = val[0], ux = vec(1,0), uy = vec(1,1), vx = vec(0,0), vy = vec(0,1), n1 = (float)std::pow(1.0f+l1+l2,-power1), n2 = (float)std::pow(1.0f+l1+l2,-power2); G(x,y,0,0) = n1*ux*ux + n2*vx*vx; G(x,y,0,1) = n1*ux*uy + n2*vx*vy; G(x,y,0,2) = n1*uy*uy + n2*vy*vy; } else G(x,y,0,0) = G(x,y,0,1) = G(x,y,0,2) = 0; #ifdef cimg_plugin_greycstoration if (!*(greycstoration_params->stop_request)) (*greycstoration_params->counter)++; else return *this; #endif } blur_anisotropic(G,amplitude,dl,da,gauss_prec,interpolation,fast_approx); } } return *this; } //! Blur an image in an anisotropic way. /** \param amplitude = amplitude of the anisotropic blur. \param sharpness = define the contour preservation. \param anisotropy = define the smoothing anisotropy. \param alpha = image pre-blurring (gaussian). \param sigma = regularity of the tensor-valued geometry. \param dl = spatial discretization. \param da = angular discretization. \param gauss_prec = precision of the gaussian function. \param interpolation Used interpolation scheme (0 = nearest-neighbor, 1 = linear, 2 = Runge-Kutta) \param fast_approx = Tell to use the fast approximation or not **/ template CImg get_blur_anisotropic(const CImg& mask, const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f, const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f, const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true, const float geom_factor=1.0f) const { return (+*this).blur_anisotropic(mask,amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor); } //! Blur an image following in an anistropic way. CImg& blur_anisotropic(const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f, const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f,const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true, const float geom_factor=1.0f) { return blur_anisotropic(CImg(),amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor); } //! Blur an image following in an anistropic way. CImg get_blur_anisotropic(const float amplitude, const float sharpness=0.7f, const float anisotropy=0.3f, const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f, const float da=30.0f, const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true, const float geom_factor=1.0f) const { return (+*this).blur_anisotropic(amplitude,sharpness,anisotropy,alpha,sigma,dl,da,gauss_prec,interpolation,fast_approx,geom_factor); } //! Return the Fast Fourier Transform of an image (along a specified axis) CImgList::type> get_FFT(const char axe, const bool inverse=false) const { typedef typename cimg::largest::type restype; return CImgList(*this).FFT(axe,inverse); } //! Return the Fast Fourier Transform on an image CImgList::type> get_FFT(const bool inverse=false) const { typedef typename cimg::largest::type restype; return CImgList(*this).FFT(inverse); } //! Apply a median filter. CImg get_blur_median(const unsigned int n=3) { CImg res(width,height,depth,dim); if (!n || n==1) return *this; const int hl=n/2, hr=hl-1+n%2; if (res.depth!=1) { // 3D median filter CImg vois; cimg_forXYZV(*this,x,y,z,k) { vois = get_crop(x-hl,y-hl,z-hl,k,x+hr,y+hr,z+hr,k); res(x,y,z,k) = vois.median(); } } else { // 2D median filter #define _median_sort(a,b) if ((a)>(b)) cimg::swap(a,b) switch (n) { case 3: { CImg_3x3(I,T); CImg_3x3(J,T); cimg_forV(*this,k) cimg_for3x3(*this,x,y,0,k,I) { cimg_copy3x3(I,J); _median_sort(Jcp, Jnp); _median_sort(Jcc, Jnc); _median_sort(Jcn, Jnn); _median_sort(Jpp, Jcp); _median_sort(Jpc, Jcc); _median_sort(Jpn, Jcn); _median_sort(Jcp, Jnp); _median_sort(Jcc, Jnc); _median_sort(Jcn, Jnn); _median_sort(Jpp, Jpc); _median_sort(Jnc, Jnn); _median_sort(Jcc, Jcn); _median_sort(Jpc, Jpn); _median_sort(Jcp, Jcc); _median_sort(Jnp, Jnc); _median_sort(Jcc, Jcn); _median_sort(Jcc, Jnp); _median_sort(Jpn, Jcc); _median_sort(Jcc, Jnp); res(x,y,0,k) = Jcc; } } break; case 5: { CImg_5x5(I,T); CImg_5x5(J,T); cimg_forV(*this,k) cimg_for5x5(*this,x,y,0,k,I) { cimg_copy5x5(I,J); _median_sort(Jbb, Jpb); _median_sort(Jnb, Jab); _median_sort(Jcb, Jab); _median_sort(Jcb, Jnb); _median_sort(Jpp, Jcp); _median_sort(Jbp, Jcp); _median_sort(Jbp, Jpp); _median_sort(Jap, Jbc); _median_sort(Jnp, Jbc); _median_sort(Jnp, Jap); _median_sort(Jcc, Jnc); _median_sort(Jpc, Jnc); _median_sort(Jpc, Jcc); _median_sort(Jbn, Jpn); _median_sort(Jac, Jpn); _median_sort(Jac, Jbn); _median_sort(Jnn, Jan); _median_sort(Jcn, Jan); _median_sort(Jcn, Jnn); _median_sort(Jpa, Jca); _median_sort(Jba, Jca); _median_sort(Jba, Jpa); _median_sort(Jna, Jaa); _median_sort(Jcb, Jbp); _median_sort(Jnb, Jpp); _median_sort(Jbb, Jpp); _median_sort(Jbb, Jnb); _median_sort(Jab, Jcp); _median_sort(Jpb, Jcp); _median_sort(Jpb, Jab); _median_sort(Jpc, Jac); _median_sort(Jnp, Jac); _median_sort(Jnp, Jpc); _median_sort(Jcc, Jbn); _median_sort(Jap, Jbn); _median_sort(Jap, Jcc); _median_sort(Jnc, Jpn); _median_sort(Jbc, Jpn); _median_sort(Jbc, Jnc); _median_sort(Jba, Jna); _median_sort(Jcn, Jna); _median_sort(Jcn, Jba); _median_sort(Jpa, Jaa); _median_sort(Jnn, Jaa); _median_sort(Jnn, Jpa); _median_sort(Jan, Jca); _median_sort(Jnp, Jcn); _median_sort(Jap, Jnn); _median_sort(Jbb, Jnn); _median_sort(Jbb, Jap); _median_sort(Jbc, Jan); _median_sort(Jpb, Jan); _median_sort(Jpb, Jbc); _median_sort(Jpc, Jba); _median_sort(Jcb, Jba); _median_sort(Jcb, Jpc); _median_sort(Jcc, Jpa); _median_sort(Jnb, Jpa); _median_sort(Jnb, Jcc); _median_sort(Jnc, Jca); _median_sort(Jab, Jca); _median_sort(Jab, Jnc); _median_sort(Jac, Jna); _median_sort(Jbp, Jna); _median_sort(Jbp, Jac); _median_sort(Jbn, Jaa); _median_sort(Jpp, Jaa); _median_sort(Jpp, Jbn); _median_sort(Jcp, Jpn); _median_sort(Jcp, Jan); _median_sort(Jnc, Jpa); _median_sort(Jbn, Jna); _median_sort(Jcp, Jnc); _median_sort(Jcp, Jbn); _median_sort(Jpb, Jap); _median_sort(Jnb, Jpc); _median_sort(Jbp, Jcn); _median_sort(Jpc, Jcn); _median_sort(Jap, Jcn); _median_sort(Jab, Jbc); _median_sort(Jpp, Jcc); _median_sort(Jcp, Jac); _median_sort(Jab, Jpp); _median_sort(Jab, Jcp); _median_sort(Jcc, Jac); _median_sort(Jbc, Jac); _median_sort(Jpp, Jcp); _median_sort(Jbc, Jcc); _median_sort(Jpp, Jbc); _median_sort(Jpp, Jcn); _median_sort(Jcc, Jcn); _median_sort(Jcp, Jcn); _median_sort(Jcp, Jbc); _median_sort(Jcc, Jnn); _median_sort(Jcp, Jcc); _median_sort(Jbc, Jnn); _median_sort(Jcc, Jba); _median_sort(Jbc, Jba); _median_sort(Jbc, Jcc); res(x,y,0,k) = Jcc; } } break; default: { CImg vois; cimg_forXYV(*this,x,y,k) { vois = get_crop(x-hl,y-hl,0,k,x+hr,y+hr,0,k); res(x,y,0,k) = vois.median(); } } break; } } return res; } //! Apply a median filter CImg& blur_median(const unsigned int n=3) { return get_blur_median(n).swap(*this); } //! Sharpen image using anisotropic shock filters CImg& sharpen(const float amplitude=50.0f, const float edge=1.0f, const float alpha=0.0f, const float sigma=0.0f) { if (is_empty()) return *this; const bool threed = (depth>1); const float nedge = 0.5f*edge; typedef typename cimg::largest::type ftype; CImg val, vec, veloc(width,height,depth,dim); if (threed) { CImg G = (alpha>0?get_blur(alpha).get_structure_tensorXYZ():get_structure_tensorXYZ()); if (sigma>0) G.blur(sigma); CImg_3x3x3(I,float); cimg_forXYZ(G,x,y,z) { G.get_tensor_at(x,y,z).symmetric_eigen(val,vec); G(x,y,z,0) = vec(0,0); G(x,y,z,1) = vec(0,1); G(x,y,z,2) = vec(0,2); G(x,y,z,3) = 1.0f-(float)std::pow(1.0f+val[0]+val[1]+val[2],-nedge); } cimg_forV(*this,k) cimg_for3x3x3(*this,x,y,z,k,I) { const float u = G(x,y,z,0), v = G(x,y,z,1), w = G(x,y,z,2), amp = G(x,y,z,3), ixx = Incc+Ipcc-2*Iccc, ixy = 0.25f*(Innc+Ippc-Inpc-Ipnc), ixz = 0.25f*(Incn+Ipcp-Incp-Ipcn), iyy = Icnc+Icpc-2*Iccc, iyz = 0.25f*(Icnn+Icpp-Icnp-Icpn), izz = Iccn+Iccp-2*Iccc, ixf = Incc-Iccc, ixb = Iccc-Ipcc, iyf = Icnc-Iccc, iyb = Iccc-Icpc, izf = Iccn-Iccc, izb = Iccc-Iccp, itt = u*u*ixx + v*v*iyy + w*w*izz + 2*u*v*ixy + 2*u*w*ixz + 2*v*w*iyz, it = u*cimg::minmod(ixf,ixb) + v*cimg::minmod(iyf,iyb) + w*cimg::minmod(izf,izb); veloc(x,y,z,k) = -amp*cimg::sign(itt)*cimg::abs(it); } } else { CImg G = (alpha>0?get_blur(alpha).get_structure_tensorXY():get_structure_tensorXY()); if (sigma>0) G.blur(sigma); CImg_3x3(I,float); cimg_forXY(G,x,y) { G.get_tensor_at(x,y).symmetric_eigen(val,vec); G(x,y,0) = vec(0,0); G(x,y,1) = vec(0,1); G(x,y,2) = 1.0f-(float)std::pow(1.0f+val[0]+val[1],-nedge); } cimg_forV(*this,k) cimg_for3x3(*this,x,y,0,k,I) { const float u = G(x,y,0), v = G(x,y,1), amp = G(x,y,2), ixx = Inc+Ipc-2*Icc, ixy = 0.25f*(Inn+Ipp-Inp-Ipn), iyy = Icn+Icp-2*Icc, ixf = Inc-Icc, ixb = Icc-Ipc, iyf = Icn-Icc, iyb = Icc-Icp, itt = u*u*ixx + v*v*iyy + 2*u*v*ixy, it = u*cimg::minmod(ixf,ixb) + v*cimg::minmod(iyf,iyb); veloc(x,y,k) = -amp*cimg::sign(itt)*cimg::abs(it); } } const CImgStats stats(veloc); const float vmax = (float)cimg::max(cimg::abs(stats.min),cimg::abs(stats.max)); if (vmax!=0) { veloc*=amplitude/vmax; (*this)+=veloc; } return *this; } CImg get_sharpen(const float amplitude=50.0f, const float edge=1.0f, const float alpha=0.0f, const float sigma=0.0f) const { return (+*this).sharpen(amplitude,edge,alpha,sigma); } //@} //----------------------------- // //! \name Matrix and Vectors //@{ //----------------------------- //! Return a vector with specified coefficients static CImg vector(const T& a1) { return CImg(1,1).fill(a1); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2) { return CImg(1,2).fill(a1,a2); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3) { return CImg(1,3).fill(a1,a2,a3); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4) { return CImg(1,4).fill(a1,a2,a3,a4); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5) { return CImg(1,5).fill(a1,a2,a3,a4,a5); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5,const T& a6) { return CImg(1,6).fill(a1,a2,a3,a4,a5,a6); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4, const T& a5,const T& a6,const T& a7) { return CImg(1,7).fill(a1,a2,a3,a4,a5,a6,a7); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4, const T& a5,const T& a6,const T& a7,const T& a8) { return CImg(1,8).fill(a1,a2,a3,a4,a5,a6,a7,a8); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4, const T& a5,const T& a6,const T& a7,const T& a8,const T& a9) { return CImg(1,9).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4, const T& a5,const T& a6,const T& a7,const T& a8, const T& a9,const T& a10) { return CImg(1,10).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4, const T& a5,const T& a6,const T& a7,const T& a8, const T& a9,const T& a10, const T& a11) { return CImg(1,11).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4, const T& a5,const T& a6,const T& a7,const T& a8, const T& a9,const T& a10, const T& a11, const T& a12) { return CImg(1,12).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); } //! Return a vector with specified coefficients static CImg vector(const T& a1,const T& a2,const T& a3,const T& a4, const T& a5,const T& a6,const T& a7,const T& a8, const T& a9,const T& a10, const T& a11, const T& a12, const T& a13) { return CImg(1,13).fill(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); } //! Return a 1x1 square matrix with specified coefficients static CImg matrix(const T& a1) { return vector(a1); } //! Return a 2x2 square matrix with specified coefficients static CImg matrix(const T& a1,const T& a2, const T& a3,const T& a4) { return CImg(2,2).fill(a1,a2, a3,a4); } //! Return a 3x3 square matrix with specified coefficients static CImg matrix(const T& a1,const T& a2,const T& a3, const T& a4,const T& a5,const T& a6, const T& a7,const T& a8,const T& a9) { return CImg(3,3).fill(a1,a2,a3, a4,a5,a6, a7,a8,a9); } //! Return a 4x4 square matrix with specified coefficients static CImg matrix(const T& a1,const T& a2,const T& a3,const T& a4, const T& a5,const T& a6,const T& a7,const T& a8, const T& a9,const T& a10,const T& a11,const T& a12, const T& a13,const T& a14,const T& a15,const T& a16) { return CImg(4,4).fill(a1,a2,a3,a4, a5,a6,a7,a8, a9,a10,a11,a12, a13,a14,a15,a16); } //! Return a 5x5 square matrix with specified coefficients static CImg matrix(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5, const T& a6,const T& a7,const T& a8,const T& a9,const T& a10, const T& a11,const T& a12,const T& a13,const T& a14,const T& a15, const T& a16,const T& a17,const T& a18,const T& a19,const T& a20, const T& a21,const T& a22,const T& a23,const T& a24,const T& a25) { return CImg(5,5).fill(a1,a2,a3,a4,a5, a6,a7,a8,a9,a10, a11,a12,a13,a14,a15, a16,a17,a18,a19,a20, a21,a22,a23,a24,a25); } //! In-place version of get_matrix(). CImg& matrix() { const unsigned int siz = size(); switch (siz) { case 1: break; case 4: width = height = 2; break; case 9: width = height = 3; break; case 16: width = height = 4; break; case 25: width = height = 5; break; case 36: width = height = 6; break; case 49: width = height = 7; break; case 64: width = height = 8; break; case 81: width = height = 9; break; case 100: width = height = 10; break; default: { unsigned int i=11, i2=i*i; while (i2::matrix() : Image size = %u is not a square number",pixel_type(),siz); } break; } return *this; } //! Realign pixel values of the instance image as a square matrix CImg get_matrix() const { return (+*this).matrix(); } //! Return a 1x1 symmetric matrix with specified coefficients static CImg tensor(const T& a1) { return matrix(a1); } //! Return a 2x2 symmetric matrix tensor with specified coefficients static CImg tensor(const T& a1,const T& a2,const T& a3) { return matrix(a1,a2, a2,a3); } //! Return a 3x3 symmetric matrix with specified coefficients static CImg tensor(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5,const T& a6) { return matrix(a1,a2,a3, a2,a4,a5, a3,a5,a6); } CImg get_tensor() const { CImg res; const unsigned int siz = size(); switch (siz) { case 1: break; case 3: res.assign(2,2); res(0,0) = (*this)(0); res(1,0) = res(0,1) = (*this)(1); res(1,1) = (*this)(2); break; case 6: res.assign(3,3); res(0,0) = (*this)(0); res(1,0) = res(0,1) = (*this)(1); res(2,0) = res(0,2) = (*this)(2); res(1,1) = (*this)(3); res(2,1) = res(1,2) = (*this)(4); res(2,2) = (*this)(5); break; default: throw CImgInstanceException("CImg<%s>::get_tensor() : Wrong vector dimension = %u in instance image.", pixel_type(), dim); break; } return res; } //! In-place version of get_tensor(). CImg& tensor() { return get_tensor().swap(*this); } //! Return a 1x1 diagonal matrix with specified coefficients static CImg diagonal(const T& a1) { return matrix(a1); } //! Return a 2x2 diagonal matrix with specified coefficients static CImg diagonal(const T& a1,const T& a2) { return matrix(a1,0, 0,a2); } //! Return a 3x3 diagonal matrix with specified coefficients static CImg diagonal(const T& a1,const T& a2,const T& a3) { return matrix(a1,0,0, 0,a2,0, 0,0,a3); } //! Return a 4x4 diagonal matrix with specified coefficients static CImg diagonal(const T& a1,const T& a2,const T& a3,const T& a4) { return matrix(a1,0,0,0, 0,a2,0,0, 0,0,a3,0, 0,0,0,a4); } //! Return a 5x5 diagonal matrix with specified coefficients static CImg diagonal(const T& a1,const T& a2,const T& a3,const T& a4,const T& a5) { return matrix(a1,0,0,0,0, 0,a2,0,0,0, 0,0,a3,0,0, 0,0,0,a4,0, 0,0,0,0,a5); } //! Unroll all images values into specified axis. CImg& unroll(const char axe='x') { const unsigned int siz = size(); if (siz) switch (axe) { case 'x': width = siz; height=depth=dim=1; break; case 'y': height = siz; width=depth=dim=1; break; case 'z': depth = siz; width=height=dim=1; break; case 'v': dim = siz; width=height=depth=1; break; default: throw CImgArgumentException("CImg<%s>::unroll() : Given axe is '%c' which is not 'x','y','z' or 'v'", pixel_type(),axe); } return *this; } CImg get_unroll(const char axe='x') const { return (+*this).unroll(axe); } CImg& vector() { return unroll('y'); } CImg get_vector() const { return get_unroll('y'); } //! Get a diagonal matrix, whose diagonal coefficients are the coefficients of the input image CImg get_diagonal() const { if (is_empty()) return CImg(); CImg res(size(),size(),1,1,0); cimg_foroff(*this,off) res(off,off)=(*this)(off); return res; } //! Replace a vector by a diagonal matrix containing the original vector coefficients. CImg& diagonal() { return get_diagonal().swap(*this); } //! Return a NxN identity matrix static CImg identity_matrix(const unsigned int N) { CImg res(N,N,1,1,0); cimg_forX(res,x) res(x,x)=1; return res; } CImg& identity_matrix() { return get_identity_matrix(cimg::max(width,height)).swap(*this); } CImg get_identity_matrix() const { return identity_matrix(cimg::max(width,height)); } //! Return a N-numbered sequence vector from \p a0 to \p a1 CImg& sequence(const T& a0, const T& a1) { if (!is_empty()) { const unsigned int siz = size()-1; const float delta = (float)((float)a1-a0); T* ptr = data; cimg_foroff(*this,l) *(ptr++) = (T)(a0 + delta*l/siz); } return *this; } CImg get_sequence(const T& a0, const T& a1) const { return (+*this).sequence(a0,a1); } static CImg sequence(const unsigned int N, const T& a0, const T& a1) { if (N) return CImg(1,N).sequence(a0,a1); return CImg(); } //! Return a 3x3 rotation matrix along the (x,y,z)-axis with an angle w. static CImg rotation_matrix(const float x, const float y, const float z, const float w, const bool quaternion_data=false) { float X,Y,Z,W; if (!quaternion_data) { const float norm = (float)std::sqrt(x*x + y*y + z*z), nx = norm>0?x/norm:0, ny = norm>0?y/norm:0, nz = norm>0?z/norm:1, nw = norm>0?w:0, sina = (float)std::sin(nw/2), cosa = (float)std::cos(nw/2); X = nx*sina; Y = ny*sina; Z = nz*sina; W = cosa; } else { const float norm = (float)std::sqrt(x*x + y*y + z*z + w*w); if (norm>0) { X=x/norm; Y=y/norm; Z=z/norm; W=w/norm; } else { X=Y=Z=0; W=1; } } const float xx=X*X, xy=X*Y, xz=X*Z, xw=X*W, yy=Y*Y, yz=Y*Z, yw=Y*W, zz=Z*Z, zw=Z*W; return CImg::matrix(1-2*(yy+zz), 2*(xy+zw), 2*(xz-yw), 2*(xy-zw), 1-2*(xx+zz), 2*(yz+xw), 2*(xz+yw), 2*(yz-xw), 1-2*(xx+yy)); } //! Return a new image corresponding to the vector located at (\p x,\p y,\p z) of the current vector-valued image. CImg get_vector_at(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0) const { CImg dest(1,dim); cimg_forV(*this,k) dest[k]=(*this)(x,y,z,k); return dest; } //! Return a new image corresponding to the \a square \a matrix located at (\p x,\p y,\p z) of the current vector-valued image. CImg get_matrix_at(const unsigned int x=0, const unsigned int y=0, const unsigned int z=0) const { const int n = (int)std::sqrt((double)dim); CImg dest(n,n); cimg_forV(*this,k) dest[k]=(*this)(x,y,z,k); return dest; } //! Return a new image corresponding to the \a diffusion \a tensor located at (\p x,\p y,\p z) of the current vector-valued image. CImg get_tensor_at(const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) const { if (dim==6) return tensor((*this)(x,y,z,0),(*this)(x,y,z,1),(*this)(x,y,z,2), (*this)(x,y,z,3),(*this)(x,y,z,4),(*this)(x,y,z,5)); if (dim==3) return tensor((*this)(x,y,z,0),(*this)(x,y,z,1),(*this)(x,y,z,2)); return tensor((*this)(x,y,z,0)); } //! Set the image \p vec as the \a vector \a valued pixel located at (\p x,\p y,\p z) of the current vector-valued image. CImg& set_vector_at(const CImg& vec,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) { return draw_point(x,y,z,vec.data,1); } //! Set the image \p vec as the \a square \a matrix-valued pixel located at (\p x,\p y,\p z) of the current vector-valued image. CImg& set_matrix_at(const CImg& mat,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) { return set_vector_at(mat,x,y,z); } //! Set the image \p vec as the \a tensor \a valued pixel located at (\p x,\p y,\p z) of the current vector-valued image. CImg& set_tensor_at(const CImg& ten,const unsigned int x=0,const unsigned int y=0,const unsigned int z=0) { if (ten.height==2) { (*this)(x,y,z,0)=ten[0]; (*this)(x,y,z,1)=ten[1]; (*this)(x,y,z,2)=ten[3]; } else { (*this)(x,y,z,0)=ten[0]; (*this)(x,y,z,1)=ten[1]; (*this)(x,y,z,2)=ten[2]; (*this)(x,y,z,3)=ten[4]; (*this)(x,y,z,4)=ten[5]; (*this)(x,y,z,5)=ten[8]; } return *this; } //! Return the transpose version of the current matrix. CImg get_transpose() const { CImg res(height,width,depth,dim); cimg_forXYZV(*this,x,y,z,v) res(y,x,z,v) = (*this)(x,y,z,v); return res; } //! Replace the current matrix by its transpose. CImg& transpose() { if (width==1) { width=height; height=1; return *this; } if (height==1) { height=width; width=1; return *this; } if (width==height) { cimg_forYZV(*this,y,z,v) for (int x=y; x<(int)width; x++) cimg::swap((*this)(x,y,z,v),(*this)(y,x,z,v)); return *this; } return (*this)=get_transpose(); } //! Inverse the current matrix. CImg& inverse(const bool use_LU=true) { if (!is_empty()) { if (width!=height || depth!=1 || dim!=1) throw CImgInstanceException("CImg<%s>::inverse() : Instance matrix (%u,%u,%u,%u,%p) is not square.", pixel_type(),width,height,depth,dim,data); const double dete = width>3?-1.0:det(); if (dete!=0.0 && width==2) { const double a = data[0], c = data[1], b = data[2], d = data[3]; data[0] = (T)(d/dete); data[1] = (T)(-c/dete); data[2] = (T)(-b/dete), data[3] = (T)(a/dete); } else if (dete!=0.0 && width==3) { const double a = data[0], d = data[1], g = data[2], b = data[3], e = data[4], h = data[5], c = data[6], f = data[7], i = data[8]; data[0] = (T)((i*e-f*h)/dete), data[1] = (T)((g*f-i*d)/dete), data[2] = (T)((d*h-g*e)/dete); data[3] = (T)((h*c-i*b)/dete), data[4] = (T)((i*a-c*g)/dete), data[5] = (T)((g*b-a*h)/dete); data[6] = (T)((b*f-e*c)/dete), data[7] = (T)((d*c-a*f)/dete), data[8] = (T)((a*e-d*b)/dete); } else { if (use_LU) { // LU-based inverse computation CImg A(*this), indx, col(1,width); bool d; A._LU(indx,d); cimg_forX(*this,j) { col.fill(0); col(j)=1; col._solve(A,indx); cimg_forX(*this,i) (*this)(j,i) = col(i); } } else { // SVD-based inverse computation CImg U(width,width),S(1,width),V(width,width); SVD(U,S,V,false); U.transpose(); cimg_forY(S,k) if (S[k]!=0) S[k]=1/S[k]; S.diagonal(); *this = V*S*U; } } } return *this; } //! Return the inverse of the current matrix. CImg::type> get_inverse(const bool use_LU=true) const { typedef typename cimg::largest::type restype; return CImg(*this,false).inverse(use_LU); } //! Return the pseudo-inverse (Moore-Penrose) of the matrix CImg::type> get_pseudoinverse() const { typedef typename cimg::largest::type restype; CImg At = get_transpose(), At2(At); return (((At*=*this).inverse())*=At2); } //! Replace the matrix by its pseudo-inverse CImg& pseudoinverse() { typedef typename cimg::largest::type restype; CImg At = get_transpose(), At2(At); ((At*=*this).inverse())*=At2; return ((*this)=At); } //! Return the trace of the current matrix. double trace() const { if (is_empty()) throw CImgInstanceException("CImg<%s>::trace() : Instance matrix (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); double res=0; cimg_forX(*this,k) res+=(*this)(k,k); return res; } //! Return the kth smallest element of the image // (Adapted from the numerical recipies for CImg) const T kth_smallest(const unsigned int k) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::kth_smallest() : Instance image (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); CImg arr(*this); unsigned long l=0,ir=size()-1; for (;;) { if (ir<=l+1) { if (ir==l+1 && arr[ir]>1; cimg::swap(arr[mid],arr[l+1]); if (arr[l]>arr[ir]) cimg::swap(arr[l],arr[ir]); if (arr[l+1]>arr[ir]) cimg::swap(arr[l+1],arr[ir]); if (arr[l]>arr[l+1]) cimg::swap(arr[l],arr[l+1]); unsigned long i = l+1, j = ir; const T pivot = arr[l+1]; for (;;) { do i++; while (arr[i]pivot); if (j=k) ir=j-1; if (j<=k) l=i; } } return 0; } //! Return the median of the image const T median() const { const unsigned int s = size(); const T res = kth_smallest(s>>1); return (s%2)?res:((res+kth_smallest((s>>1)-1))/2); } //! Return the dot product of the current vector/matrix with the vector/matrix \p img. double dot(const CImg& img) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::dot() : Instance object (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); if (img.is_empty()) throw CImgArgumentException("CImg<%s>::trace() : Specified argument (%u,%u,%u,%u,%p) is empty.", pixel_type(),img.width,img.height,img.depth,img.dim,img.data); const unsigned long nb = cimg::min(size(),img.size()); double res=0; for (unsigned long off=0; off::cross() : Arguments (%u,%u,%u,%u,%p) and (%u,%u,%u,%u,%p) must be both 3d vectors.", pixel_type(),width,height,depth,dim,data,img.width,img.height,img.depth,img.dim,img.data); const T x = (*this)[0], y = (*this)[1], z = (*this)[2]; (*this)[0] = y*img[2]-z*img[1]; (*this)[1] = z*img[0]-x*img[2]; (*this)[2] = x*img[1]-y*img[0]; return *this; } //! Return the cross product between two 3d vectors CImg get_cross(const CImg& img) const { return (+*this).cross(img); } //! Return the determinant of the current matrix. double det() const { if (is_empty() || width!=height || depth!=1 || dim!=1) throw CImgInstanceException("CImg<%s>::det() : Instance matrix (%u,%u,%u,%u,%p) is not square or is empty.", pixel_type(),width,height,depth,dim,data); switch (width) { case 1: return (*this)(0,0); case 2: return (*this)(0,0)*(*this)(1,1)-(*this)(0,1)*(*this)(1,0); case 3: { const double a = data[0], d = data[1], g = data[2], b = data[3], e = data[4], h = data[5], c = data[6], f = data[7], i = data[8]; return i*a*e-a*h*f-i*b*d+b*g*f+c*d*h-c*g*e; } default: { typedef typename cimg::largest::type ftype; CImg lu(*this); CImg indx; bool d; lu._LU(indx,d); double res = d?1.0:-1.0; cimg_forX(lu,i) res*=lu(i,i); return res; } } return 0; } //! Return the norm of the current vector/matrix. \p ntype = norm type (0=L2, 1=L1, -1=Linf). double norm(const int ntype=2) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::norm() : Instance object (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); double res = 0; switch (ntype) { case -1: { cimg_foroff(*this,off) { const double tmp = cimg::abs((double)data[off]); if (tmp>res) res = tmp; } return res; } break; case 1 : { cimg_foroff(*this,off) res+=cimg::abs((double)data[off]); return res; } break; default: { return std::sqrt(dot(*this)); } } return 0; } //! Return the sum of all the pixel values in an image. double sum() const { if (is_empty()) throw CImgInstanceException("CImg<%s>::sum() : Instance object (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); double res=0; cimg_for(*this,ptr,T) res+=*ptr; return res; } //! Compute the SVD of a general matrix. template const CImg& SVD(CImg& U, CImg& S, CImg& V, const bool sorting=true, const unsigned int max_iter=40) const { if (is_empty()) { U.assign(); S.assign(); V.assign(); } else { U = *this; if (S.size() rv1(width); t anorm=0,c,f,g=0,h,s,scale=0; int l=0, nm=0; cimg_forX(U,i) { l = i+1; rv1[i] = scale*g; g = s = scale = 0; if (i=0?-1:1)*std::sqrt(s)); h=f*g-s; U(i,i)=f-g; for (int j=l; j=0?-1:1)*std::sqrt(s)); h = f*g-s; U(l,i) = f-g; { for (int k=l; k=0; i--) { if (i=0; i--) { l = i+1; g = S[i]; for (int j=l; j=0; k--) { for (unsigned int its=0; its=1; l--) { nm = l-1; if ((cimg::abs(rv1[l])+anorm)==anorm) { flag = false; break; } if ((cimg::abs(S[nm])+anorm)==anorm) break; } if (flag) { c = 0; s = 1; for (int i=l; i<=k; i++) { f = s*rv1[i]; rv1[i] = c*rv1[i]; if ((cimg::abs(f)+anorm)==anorm) break; g = S[i]; h = (t)cimg::pythagore(f,g); S[i] = h; h = 1/h; c = g*h; s = -f*h; cimg_forY(U,j) { const t y = U(nm,j), z = U(i,j); U(nm,j) = y*c+z*s; U(i,j) = z*c-y*s; } } } const t& z = S[k]; if (l==k) { if (z<0) { S[k] = -z; cimg_forX(U,j) V(k,j) = -V(k,j); } break; } nm = k-1; t x = S[l], y = S[nm]; g = rv1[nm]; h = rv1[k]; f = ((y-z)*(y+z)+(g-h)*(g+h))/(2*h*y); g = (t)cimg::pythagore(f,1.0); f = ((x-z)*(x+z)+h*((y/(f+ (f>=0?g:-g)))-h))/x; c = s = 1; for (int j=l; j<=nm; j++) { const int i = j+1; g = rv1[i]; h = s*g; g = c*g; t y = S[i]; t z = (t)cimg::pythagore(f,h); rv1[j] = z; c = f/z; s = h/z; f = x*c+g*s; g = g*c-x*s; h = y*s; y*=c; cimg_forX(U,jj) { const t x = V(j,jj), z = V(i,jj); V(j,jj) = x*c+z*s; V(i,jj) = z*c-x*s; } z = (t)cimg::pythagore(f,h); S[j] = z; if (z) { z = 1/z; c = f*z; s = h*z; } f = c*g+s*y; x = c*y-s*g; { cimg_forY(U,jj) { const t y = U(j,jj); z = U(i,jj); U(j,jj) = y*c+z*s; U(i,jj) = z*c-y*s; }} } rv1[l] = 0; rv1[k]=f; S[k]=x; } } if (sorting) { CImg permutations(width); CImg tmp(width); S.sort(permutations,false); cimg_forY(U,k) { cimg_forX(permutations,x) tmp(x) = U(permutations(x),k); std::memcpy(U.ptr(0,k),tmp.data,sizeof(t)*width); } { cimg_forY(V,k) { cimg_forX(permutations,x) tmp(x) = V(permutations(x),k); std::memcpy(V.ptr(0,k),tmp.data,sizeof(t)*width); }} } } return *this; } //! Compute the SVD of a general matrix. template const CImg& SVD(CImgList& USV) const { if (USV.size<3) USV.assign(3); return SVD(USV[0],USV[1],USV[2]); } //! Compute the SVD of a general matrix. CImgList::type> get_SVD(const bool sorting=true) const { typedef typename cimg::largest::type restype; CImgList res(3); SVD(res[0],res[1],res[2],sorting); return res; } // INNER ROUTINE : Compute the LU decomposition of a permuted matrix (c.f. numerical recipies) template CImg& _LU(CImg& indx, bool& d) { typedef typename cimg::largest::type ftype; const int N = dimx(); int imax=0; CImg vv(N); indx.assign(N); d=true; cimg_forX(*this,i) { ftype vmax=0.0; cimg_forX(*this,j) { const ftype tmp = cimg::abs((*this)(j,i)); if (tmp>vmax) vmax = tmp; } if (vmax==0) return fill(0); vv[i] = 1/vmax; } cimg_forX(*this,j) { for (int i=0; i=vmax) { vmax=tmp; imax=i; } }} if (j!=imax) { cimg_forX(*this,k) cimg::swap((*this)(k,imax),(*this)(k,j)); d =!d; vv[imax] = vv[j]; } indx[j] = (t)imax; if ((*this)(j,j)==0) (*this)(j,j)=(T)1e-20; if (j CImg& _solve(const CImg& A, const CImg& indx) { typedef typename cimg::largest::type ftype; const int N = size(); int ii=-1; ftype sum; for (int i=0; i=0) for (int j=ii; j<=i-1; j++) sum-=A(j,i)*(*this)(j); else if (sum!=0) ii=i; (*this)(i)=sum; } { for (int i=N-1; i>=0; i--) { sum = (*this)(i); for (int j=i+1; j::solve() : Instance matrix size is (%u,%u,%u,%u) while " "size of given matrix A is (%u,%u,%u,%u).", pixel_type(),width,height,depth,dim,A.width,A.height,A.depth,A.dim); if (A.width==A.height) { CImg lu(A); CImg indx; bool d; lu._LU(indx,d); _solve(lu,indx); } else assign(A.get_pseudoinverse()*(*this)); return *this; } //! Solve a linear system AX=B where B=*this. CImg::type> get_solve(const CImg& A) const { typedef typename cimg::largest::type restype; return CImg(*this,false).solve(A); } //! Compute the eigenvalues and eigenvectors of a matrix. template const CImg& eigen(CImg& val, CImg &vec) const { if (is_empty()) { val.assign(); vec.assign(); } else { if (width!=height || depth>1 || dim>1) throw CImgInstanceException("CImg<%s>::eigen() : Instance object (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); if (val.size()::eigen() : Complex eigenvalues",pixel_type()); f = std::sqrt(f); const double l1 = 0.5*(e-f), l2 = 0.5*(e+f); const double theta1 = std::atan2(l2-a,b), theta2 = std::atan2(l1-a,b); val[0]=(t)l2; val[1]=(t)l1; vec(0,0) = (t)std::cos(theta1); vec(0,1) = (t)std::sin(theta1); vec(1,0) = (t)std::cos(theta2); vec(1,1) = (t)std::sin(theta2); } break; default: throw CImgInstanceException("CImg<%s>::eigen() : Eigenvalues computation of general matrices is limited" "to 2x2 matrices (given is %ux%u)", pixel_type(),width,height); } } return *this; } //! Return the eigenvalues and eigenvectors of a matrix. CImgList::type> get_eigen() const { typedef typename cimg::largest::type restype; CImgList res(2); eigen(res[0],res[1]); return res; } //! Compute the eigenvalues and eigenvectors of a matrix. template const CImg& eigen(CImgList& eig) const { if (eig.size<2) eig.assign(2); eigen(eig[0],eig[1]); return *this; } //! Compute the eigenvalues and eigenvectors of a symmetric matrix. template const CImg& symmetric_eigen(CImg& val, CImg& vec) const { if (is_empty()) { val.assign(); vec.assign(); } else { if (width!=height || depth>1 || dim>1) throw CImgInstanceException("CImg<%s>::eigen() : Instance object (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); if (val.size() V(width,width); SVD(vec,val,V,false); cimg_forX(vec,x) { // check for negative eigenvalues t scal=0; cimg_forY(vec,y) scal+=vec(x,y)*V(x,y); if (scal<0) val[x]=-val[x]; } CImg permutations(width); // sort eigenvalues in decreasing order CImg tmp(width); val.sort(permutations,false); cimg_forY(vec,k) { cimg_forX(permutations,x) tmp(x) = vec(permutations(x),k); std::memcpy(vec.ptr(0,k),tmp.data,sizeof(t)*width); } } return *this; } //! Compute the eigenvalues and eigenvectors of a symmetric matrix. CImgList::type> get_symmetric_eigen() const { typedef typename cimg::largest::type restype; CImgList res(2); symmetric_eigen(res[0],res[1]); return res; } //! Compute the eigenvalues and eigenvectors of a symmetric matrix. template const CImg& symmetric_eigen(CImgList& eig) const { if (eig.size<2) eig.assign(2); symmetric_eigen(eig[0],eig[1]); return *this; } template CImg& _quicksort(const int min,const int max,CImg& permutations,const bool increasing) { if (min(*this)[mid]) { cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); } if ((*this)[mid]>(*this)[max]) { cimg::swap((*this)[max],(*this)[mid]); cimg::swap(permutations[max],permutations[mid]); } if ((*this)[min]>(*this)[mid]) { cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); } } else { if ((*this)[min]<(*this)[mid]) { cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); } if ((*this)[mid]<(*this)[max]) { cimg::swap((*this)[max],(*this)[mid]); cimg::swap(permutations[max],permutations[mid]); } if ((*this)[min]<(*this)[mid]) { cimg::swap((*this)[min],(*this)[mid]); cimg::swap(permutations[min],permutations[mid]); } } if (max-min>=3) { const T pivot = (*this)[mid]; int i = min, j = max; if (increasing) { do { while ((*this)[i]pivot) j--; if (i<=j) { cimg::swap((*this)[i],(*this)[j]); cimg::swap(permutations[i++],permutations[j--]); } } while (i<=j); } else { do { while ((*this)[i]>pivot) i++; while ((*this)[j] CImg& sort(CImg& permutations,const bool increasing=true) { if (is_empty()) permutations.assign(); else { if (permutations.size()!=size()) permutations.assign(size()); cimg_foroff(permutations,off) permutations[off] = (t)off; _quicksort(0,size()-1,permutations,increasing); } return *this; } //! Sort values of a vector. CImg& sort(const bool increasing=true) { CImg foo; return sort(foo,increasing); } //! Get a sorted version a of vector, with permutations. template CImg get_sort(CImg& permutations,const bool increasing=true) { return (+*this).sort(permutations,increasing); } //! Get a sorted version of a vector. CImg get_sort(const bool increasing=true) { return (+*this).sort(increasing); } //! Get a permutation of the pixels template CImg get_permute(const CImg& permutation) const { if (permutation.size()!=size()) throw CImgArgumentException("CImg<%s>::get_permute() : Instance image (%u,%u,%u,%u,%p) and permutation (%u,%u,%u,%u,%p)" "have different sizes.",pixel_type(), width,height,depth,dim,data, permutation.width,permutation.height,permutation.depth,permutation.dim,permutation.data); CImg res(width,height,depth,dim); const t *p = permutation.ptr(permutation.size()); cimg_for(res,ptr,T) *ptr = (*this)[*(--p)]; return res; } //! In-place version of the previous function template CImg& permute(const CImg& permutation) { return get_permute(permutation).swap(*this); } //@} //------------------- // //! \name Display //@{ //------------------- //! Display an image into a CImgDisplay window. const CImg& display(CImgDisplay& disp) const { disp.display(*this); return *this; } //! Display an image in a window with a title \p title, and wait a 'is_closed' or 'keyboard' event.\n //! Parameters \p min_size and \p max_size set the minimum and maximum dimensions of the display window. //! If negative, they corresponds to a percentage of the original image size. const CImg& display(const char* title, const int min_size=128, const int max_size=1024) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::display() : Instance image (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); CImgDisplay *disp; unsigned int w = width+(depth>1?depth:0), h = height+(depth>1?depth:0), XYZ[3]; print(title); const unsigned int dmin = cimg::min(w,h), minsiz = min_size>=0?min_size:(-min_size)*dmin/100; if (dmin=0?max_size:(-max_size)*dmax/100; if (dmax>maxsiz) { w=w*maxsiz/dmax; w+=(w==0); h=h*maxsiz/dmax; h+=(h==0); } disp = new CImgDisplay(w,h,title,3,3); XYZ[0] = width/2; XYZ[1] = height/2; XYZ[2] = depth/2; while (!disp->is_closed && !disp->key) feature_selection(0,1,*disp,XYZ); delete disp; return *this; } //! Display an image in a window, with a default title. See also \see display() for details on parameters. const CImg& display(const int min_size=128, const int max_size=1024) const { char title[256]={0}; std::sprintf(title,"CImg<%s>",pixel_type()); return display(title,min_size,max_size); } //! High-level interface to select features from images const CImg& feature_selection(int* const selection, const int feature_type, CImgDisplay &disp, unsigned int *const XYZ=0,const unsigned char *const color=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::feature_selection() : Instance image (%u,%u,%u,%u,%p) is empty.", pixel_type(),width,height,depth,dim,data); const unsigned int old_events = disp.events, old_normalization = disp.normalization, hatch = 0x55555555; bool old_is_resized = disp.is_resized; disp.events = 3; disp.normalization = 0; disp.show().key = 0; unsigned char fgcolor[3] = { 255,255,105 }, bgcolor[3] = { 0,0,0 }; if (color) std::memcpy(fgcolor,color,sizeof(unsigned char)*cimg::min(3,dimv())); int area = 0, clicked_area = 0, phase = 0, X0 = (int)((XYZ?XYZ[0]:width/2)%width), Y0 = (int)((XYZ?XYZ[1]:height/2)%height), Z0 = (int)((XYZ?XYZ[2]:depth/2)%depth), X1 =-1, Y1 = -1, Z1 = -1, X = -1, Y = -1, Z = -1, oX = X, oY = Y, oZ = Z; unsigned int old_button = 0, key = 0; bool feature_selected = false, text_down = false; CImg visu, visu0; char text[1024] = { 0 }; while (!key && !disp.is_closed && !feature_selected) { // Handle mouse motion and selection oX = X; oY = Y; oZ = Z; int mx = disp.mouse_x, my = disp.mouse_y; const int mX = mx*(width+(depth>1?depth:0))/disp.width, mY = my*(height+(depth>1?depth:0))/disp.height; area = 0; if (mX=dimy()) { area = 2; X = mX; Z = mY-height; Y = phase?Y1:Y0; } if (mX>=dimx() && mY=2) { switch (clicked_area) { case 1: Z1 = Z; break; case 2: Y1 = Y; break; case 3: X1 = X; break; } } if (disp.button&2) { if (phase) { X1 = X; Y1 = Y; Z1 = Z; } else { X0 = X; Y0 = Y; Z0 = Z; } } if (disp.button&4) { oX = X = X0; oY = Y = Y0; oZ = Z = Z0; phase = 0; visu.assign(); } if (disp.wheel) { switch (area) { case 1: if (phase) Z = (Z1+=disp.wheel); else Z = (Z0+=disp.wheel); break; case 2: if (phase) Y = (Y1+=disp.wheel); else Y = (Y0+=disp.wheel); break; case 3: if (phase) X = (X1+=disp.wheel); else X = (X0+=disp.wheel); break; default: break; } disp.wheel = 0; } if ((disp.button&1)!=old_button) { switch (phase++) { case 0: X0 = X1 = X; Y0 = Y1 = Y; Z0 = Z1 = Z; clicked_area = area; break; case 1: X1 = X; Y1 = Y; Z1 = Z; break; default: break; } old_button = disp.button&1; } if (depth>1 && (X!=oX || Y!=oY || Z!=oZ)) visu0.assign(); } if (phase) { if (!feature_type) feature_selected = phase?true:false; else { if (depth>1) feature_selected = (phase==3)?true:false; else feature_selected = (phase==2)?true:false; } } if (X0<0) X0 = 0; if (X0>=(int)width) X0 = (int)width-1; if (Y0<0) Y0 = 0; if (Y0>=(int)height) Y0 = (int)height-1; if (Z0<0) Z0 = 0; if (Z0>=(int)depth) Z0 = (int)depth-1; if (X1<1) X1 = 0; if (X1>=(int)width) X1 = (int)width-1; if (Y1<0) Y1 = 0; if (Y1>=(int)height) Y1 = (int)height-1; if (Z1<0) Z1 = 0; if (Z1>=(int)depth) Z1 = (int)depth-1; // Draw visualization image on the display if (oX!=X || oY!=Y || oZ!=Z || visu0.is_empty()) { if (visu0.is_empty()) { CImg tmp; if (depth==1) tmp = get_resize(disp.width,disp.height,1,cimg::min(3,dimv())); else tmp = (!phase?get_projections2d(X0,Y0,Z0):get_projections2d(X1,Y1,Z1)).get_resize(disp.width,disp.height,1,cimg::min(3,dimv())); if (old_normalization) { if (old_normalization<3 || cimg::type::is_float()) { if (sizeof(T)>1) visu0.assign(tmp.normalize(0,255)); else visu0.assign(tmp).normalize(0,255); } else { if (cimg::type::id()!=cimg::type::id()) { const float m = cimg::type::min(), M = cimg::type::max(); visu0.assign((CImg(tmp)-=m)*=255.0f/(M-m)); } else visu0.assign(tmp); } } else visu0.assign(tmp); } visu = visu0; const int d=(depth>1)?depth:0; if (phase) switch (feature_type) { case 1: { const int x0=(int)((X0+0.5f)*disp.width/(width+d)), y0=(int)((Y0+0.5f)*disp.height/(height+d)), x1=(int)((X1+0.5f)*disp.width/(width+d)), y1=(int)((Y1+0.5f)*disp.height/(height+d)); visu.draw_arrow(x0,y0,x1,y1,fgcolor,30.0f,5.0f,hatch); if (d) { const int zx0=(int)((width+Z0+0.5f)*disp.width/(width+d)), zx1=(int)((width+Z1+0.5f)*disp.width/(width+d)), zy0=(int)((height+Z0+0.5f)*disp.height/(height+d)), zy1=(int)((height+Z1+0.5f)*disp.height/(height+d)); visu.draw_arrow(zx0,y0,zx1,y1,fgcolor,30.0f,5.0f,hatch).draw_arrow(x0,zy0,x1,zy1,fgcolor,30.0f,5.0f,hatch); } } break; case 2: { const int x0=(X0=visu.dimy()-11) text_down = false; if (!feature_type || !phase) { if (X>=0 && Y>=0 && Z>=0 && X<(int)width && Y<(int)height && Z<(int)depth) { if (depth>1) std::sprintf(text,"Coords (%d,%d,%d)={ ",X,Y,Z); else std::sprintf(text,"Coords (%d,%d)={ ",X,Y); char *ctext = text + cimg::strlen(text), *const ltext = text+512; for (unsigned int k=0; k1) std::sprintf(text,"Vect (%d,%d,%d)-(%d,%d,%d), norm=%g",X0,Y0,Z0,X1,Y1,Z1,norm); else std::sprintf(text,"Vect (%d,%d)-(%d,%d), norm=%g",X0,Y0,X1,Y1,norm); } break; case 2: if (depth>1) std::sprintf(text,"Box (%d,%d,%d)-(%d,%d,%d), Size=(%d,%d,%d)", X01) std::sprintf(text,"Ellipse (%d,%d,%d)-(%d,%d,%d), Radii=(%d,%d,%d)", X0,Y0,Z0,X1,Y1,Z1,1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1),1+cimg::abs(Z0-Z1)); else std::sprintf(text,"Ellipse (%d,%d)-(%d,%d), Radii=(%d,%d)", X0,Y0,X1,Y1,1+cimg::abs(X0-X1),1+cimg::abs(Y0-Y1)); break; } if (phase || (mx>=0 && my>=0)) visu.draw_text(text,0,text_down?visu.dimy()-11:0,fgcolor,bgcolor,11,0.7f); disp.display(visu).wait(25); } else disp.wait(); if (disp.is_resized) { disp.resize(false); old_is_resized = true; disp.is_resized = false; visu0.assign(); } } // Return result if (XYZ) { XYZ[0] = (unsigned int)X0; XYZ[1] = (unsigned int)Y0; XYZ[2] = (unsigned int)Z0; } if (feature_selected) { if (feature_type==2) { if (X0>X1) cimg::swap(X0,X1); if (Y0>Y1) cimg::swap(Y0,Y1); if (Z0>Z1) cimg::swap(Z0,Z1); } if (selection) { if (X1<0 || Y1<0 || Z1<0) X0=Y0=Z0=X1=Y1=Z1=-1; switch(feature_type) { case 1: case 2: selection[3] = X1; selection[4] = Y1; selection[5] = Z1; default: selection[0] = X0; selection[1] = Y0; selection[2] = Z0; } } } else if (selection) selection[0]=selection[1]=selection[2]=selection[3]=selection[4]=selection[5]=-1; disp.button = 0; disp.events = old_events; disp.normalization = old_normalization; disp.is_resized = old_is_resized; disp.key = key; return *this; } //! High-level interface to select features in images const CImg& feature_selection(int *const selection, const int feature_type, unsigned int *const XYZ=0,const unsigned char *const color=0) const { unsigned int w = width + (depth>1?depth:0), h = height + (depth>1?depth:0); const unsigned int dmin = cimg::min(w,h), minsiz = 256; if (dminmaxsiz) { w=w*maxsiz/dmax; h=h*maxsiz/dmax; } CImgDisplay disp(w,h," ",1,3); return feature_selection(selection,feature_type,disp,XYZ,color); } //! High-level interface for displaying a 3d object template const CImg& display_object3d(const CImg& points,const CImgList& primitives, const CImgList& colors, const CImgList& opacities, CImgDisplay& disp, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const bool display_axes=true, float *const pose_matrix=0) const { // Check input arguments if (points.is_empty() || primitives.is_empty() || opacities.is_empty()) throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (%u), primitives (%u) or opacities (%u) are empty.", pixel_type(),points.size()/3,primitives.size,opacities.size); if (is_empty()) return CImg(disp.width,disp.height,1,colors[0].size(),0). display_object3d(points,primitives,colors,opacities,disp,centering, render_static,render_motion,double_sided,focale,ambiant_light); if (points.height<3) return display_object3d(points.get_resize(-100,3,1,1,0),primitives,colors,opacities,disp, centering,render_static,render_motion,double_sided,focale,ambiant_light); // Init 3D objects and compute object statistics CImg pose, rot_mat, centered_points = centering?CImg(points.width,3):CImg(), rotated_points(points.width,3), bbox_points, rotated_bbox_points, axes_points, rotated_axes_points; CImgList bbox_opacities, axes_opacities; CImgList bbox_colors, axes_colors; CImgList bbox_primitives, axes_primitives; float dx=0, dy=0, dz=0, ratio=1; const T valmax = cimg::type::max(); const CImgStats sx(points.get_shared_line(0),false), sy(points.get_shared_line(1),false), sz(points.get_shared_line(2),false); const float xm = (float)sx.min, xM = (float)sx.max, ym = (float)sy.min, yM = (float)sy.max, zm = (float)sz.min, zM = (float)sz.max, delta = cimg::max(xM-xm,yM-ym,zM-zm); if (display_axes) { axes_points.assign(7,3); rotated_axes_points.assign(7,3); axes_opacities.assign(3,1,1,1,1,1.0f); axes_colors.assign(3,dim,1,1,1,valmax); axes_points(0,0) = 0; axes_points(0,1) = 0; axes_points(0,2) = 0; axes_points(1,0) = 20; axes_points(1,1) = 0; axes_points(1,2) = 0; axes_points(2,0) = 0; axes_points(2,1) = 20; axes_points(2,2) = 0; axes_points(3,0) = 0; axes_points(3,1) = 0; axes_points(3,2) = 20; axes_points(4,0) = 22; axes_points(4,1) = -6; axes_points(4,2) = 0; axes_points(5,0) = -6; axes_points(5,1) = 22; axes_points(5,2) = 0; axes_points(6,0) = -6; axes_points(6,1) = -6; axes_points(6,2) = 22; axes_primitives.insert(CImg::vector(0,1)); axes_primitives.insert(CImg::vector(0,2)); axes_primitives.insert(CImg::vector(0,3)); } // Begin user interaction loop CImg visu0(*this), visu; bool init = true, clicked = false, redraw = true; unsigned int key = 0; int x0 = 0, y0 = 0, x1 = 0, y1 = 0; const unsigned int old_events = disp.events; disp.show().button = disp.key = 0; disp.events = 3; while (!disp.is_closed && !key) { // Init object position and scale if necessary if (init) { ratio = delta>0?(2.0f*cimg::min(disp.width,disp.height)/(3.0f*delta)):0; dx = 0.5f*(xM+xm); dy = 0.5f*(yM+ym); dz = 0.5f*(zM+zm); if (centering) { cimg_forX(centered_points,l) { centered_points(l,0) = (float)((points(l,0)-dx)*ratio); centered_points(l,1) = (float)((points(l,1)-dy)*ratio); centered_points(l,2) = (float)((points(l,2)-dz)*ratio); } } if (render_static<0 || render_motion<0) { bbox_colors.assign(12,dim,1,1,1,valmax); bbox_primitives.assign(12,1,2); bbox_points.assign(8,3); rotated_bbox_points.assign(8,3); bbox_points(0,0) = xm; bbox_points(0,1) = ym; bbox_points(0,2) = zm; bbox_points(1,0) = xM; bbox_points(1,1) = ym; bbox_points(1,2) = zm; bbox_points(2,0) = xM; bbox_points(2,1) = yM; bbox_points(2,2) = zm; bbox_points(3,0) = xm; bbox_points(3,1) = yM; bbox_points(3,2) = zm; bbox_points(4,0) = xm; bbox_points(4,1) = ym; bbox_points(4,2) = zM; bbox_points(5,0) = xM; bbox_points(5,1) = ym; bbox_points(5,2) = zM; bbox_points(6,0) = xM; bbox_points(6,1) = yM; bbox_points(6,2) = zM; bbox_points(7,0) = xm; bbox_points(7,1) = yM; bbox_points(7,2) = zM; bbox_primitives[0].fill(0,1); bbox_primitives[1].fill(1,2); bbox_primitives[2].fill(2,3); bbox_primitives[3].fill(3,0); bbox_primitives[4].fill(4,5); bbox_primitives[5].fill(5,6); bbox_primitives[6].fill(6,7); bbox_primitives[7].fill(7,4); bbox_primitives[8].fill(0,4); bbox_primitives[9].fill(1,5); bbox_primitives[10].fill(2,6); bbox_primitives[11].fill(3,7); bbox_opacities.assign(bbox_primitives.size,1,1,1,1,1.0f); } if (pose_matrix) pose = CImg(pose_matrix,4,4,1,1,false); else pose = CImg::identity_matrix(4); init = false; redraw = true; } // Rotate and Draw 3D object if (redraw) { const float r00 = pose(0,0), r10 = pose(1,0), r20 = pose(2,0), r30 = pose(3,0), r01 = pose(0,1), r11 = pose(1,1), r21 = pose(2,1), r31 = pose(3,1), r02 = pose(0,2), r12 = pose(1,2), r22 = pose(2,2), r32 = pose(3,2); if ((clicked && render_motion>=0) || (!clicked && render_static>=0)) { if (centering) cimg_forX(centered_points,l) { const float x = centered_points(l,0), y = centered_points(l,1), z = centered_points(l,2); rotated_points(l,0) = r00*x + r10*y + r20*z + r30; rotated_points(l,1) = r01*x + r11*y + r21*z + r31; rotated_points(l,2) = r02*x + r12*y + r22*z + r32; } else cimg_forX(points,l) { const float x = (float)points(l,0), y = (float)points(l,1), z = (float)points(l,2); rotated_points(l,0) = r00*x + r10*y + r20*z + r30; rotated_points(l,1) = r01*x + r11*y + r21*z + r31; rotated_points(l,2) = r02*x + r12*y + r22*z + r32; } } else { if (!centering) cimg_forX(bbox_points,l) { const float x = bbox_points(l,0), y = bbox_points(l,1), z = bbox_points(l,2); rotated_bbox_points(l,0) = r00*x + r10*y + r20*z + r30; rotated_bbox_points(l,1) = r01*x + r11*y + r21*z + r31; rotated_bbox_points(l,2) = r02*x + r12*y + r22*z + r32; } else cimg_forX(bbox_points,l) { const float x = (bbox_points(l,0)-dx)*ratio, y = (bbox_points(l,1)-dy)*ratio, z = (bbox_points(l,2)-dz)*ratio; rotated_bbox_points(l,0) = r00*x + r10*y + r20*z + r30; rotated_bbox_points(l,1) = r01*x + r11*y + r21*z + r31; rotated_bbox_points(l,2) = r02*x + r12*y + r22*z + r32; } } // Draw object visu = visu0; if ((clicked && render_motion<0) || (!clicked && render_static<0)) visu.draw_object3d(visu.width/2.0f, visu.height/2.0f, 0, rotated_bbox_points,bbox_primitives,bbox_colors,bbox_opacities,1, false,focale,visu.dimx()/2.0f,visu.dimy()/2.0f,-5000.0f,0.2f); else visu.draw_object3d(visu.width/2.0f, visu.height/2.0f, 0, rotated_points,primitives,colors,opacities,clicked?render_motion:render_static, double_sided,focale,visu.dimx()/2.0f,visu.dimy()/2.0f,-5000.0f,ambiant_light); // Draw axes if (display_axes) { const float Xaxes = 25.0f, Yaxes = visu.height-35.0f; cimg_forX(axes_points,l) { const float x = axes_points(l,0), y = axes_points(l,1), z = axes_points(l,2); rotated_axes_points(l,0) = r00*x + r10*y + r20*z; rotated_axes_points(l,1) = r01*x + r11*y + r21*z; rotated_axes_points(l,2) = r02*x + r12*y + r22*z; } axes_opacities(0,0) = (rotated_axes_points(1,2)>0)?0.5f:1.0f; axes_opacities(1,0) = (rotated_axes_points(2,2)>0)?0.5f:1.0f; axes_opacities(2,0) = (rotated_axes_points(3,2)>0)?0.5f:1.0f; visu.draw_object3d(Xaxes, Yaxes, 0, rotated_axes_points,axes_primitives,axes_colors,axes_opacities,1,false,focale,0,0,0,0). draw_text("X",(int)(Xaxes+rotated_axes_points(4,0)), (int)(Yaxes+rotated_axes_points(4,1)), axes_colors[0].ptr(), 0, 11, axes_opacities(0,0)). draw_text("Y",(int)(Xaxes+rotated_axes_points(5,0)), (int)(Yaxes+rotated_axes_points(5,1)), axes_colors[1].ptr(), 0, 11, axes_opacities(1,0)). draw_text("Z",(int)(Xaxes+rotated_axes_points(6,0)), (int)(Yaxes+rotated_axes_points(6,1)), axes_colors[2].ptr(), 0, 11, axes_opacities(2,0)); } visu.display(disp); if (!clicked || render_motion==render_static) redraw = false; } // Handle user interaction if ((disp.button || disp.wheel) && disp.mouse_x>=0 && disp.mouse_y>=0) { redraw = true; if (!clicked) { x0 = x1 = disp.mouse_x; y0 = y1 = disp.mouse_y; if (!disp.wheel) clicked = true; } else { x1 = disp.mouse_x; y1 = disp.mouse_y; } if (disp.button&1) { const float R = 0.4f*cimg::min(disp.width,disp.height), R2 = R*R, u0 = (float)(x0-disp.dimx()/2), v0 = (float)(y0-disp.dimy()/2), u1 = (float)(x1-disp.dimx()/2), v1 = (float)(y1-disp.dimy()/2), n0 = (float)std::sqrt(u0*u0+v0*v0), n1 = (float)std::sqrt(u1*u1+v1*v1), nu0 = n0>R?(u0*R/n0):u0, nv0 = n0>R?(v0*R/n0):v0, nw0 = (float)std::sqrt(cimg::max(0.0f,R2-nu0*nu0-nv0*nv0)), nu1 = n1>R?(u1*R/n1):u1, nv1 = n1>R?(v1*R/n1):v1, nw1 = (float)std::sqrt(cimg::max(0.0f,R2-nu1*nu1-nv1*nv1)), u = nv0*nw1-nw0*nv1, v = nw0*nu1-nu0*nw1, w = nv0*nu1-nu0*nv1, n = (float)std::sqrt(u*u+v*v+w*w), alpha = (float)std::asin(n/R2); rot_mat = CImg::rotation_matrix(u,v,w,alpha); rot_mat *= pose.get_crop(0,0,2,2); pose.draw_image(rot_mat,0,0); x0=x1; y0=y1; } if (disp.button&2) { pose(3,2)+=(y1-y0); x0=x1; y0=y1; } if (disp.wheel) { pose(3,2)-=15*disp.wheel; disp.wheel=0; } if (disp.button&4) { pose(3,0)+=(x1-x0); pose(3,1)+=(y1-y0); x0=x1; y0=y1; } if ((disp.button&1) && (disp.button&2)) { init = true; disp.button = 0; x0 = x1; y0 = y1; pose = CImg::identity_matrix(4); } } else if (clicked) { x0=x1; y0=y1; clicked = false; redraw = true; } key = disp.key; if (key && key!=cimg::keyCTRLLEFT) { if (disp.is_pressed(cimg::keyCTRLLEFT)) { switch (key) { case cimg::keyD: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-200,-200); disp.is_resized = true; break; case cimg::keyC: if (disp.is_fullscreen) disp.toggle_fullscreen(); disp.resize(-50,-50); disp.is_resized = true; break; case cimg::keyF: disp.resize(disp.screen_dimx(),disp.screen_dimy()).toggle_fullscreen().is_resized = true; break; case cimg::keyS: { // Save snapshot static unsigned int snap_number = 0; char filename[32] = {0}; std::FILE *file; do { std::sprintf(filename,"CImg_%.4u.bmp",snap_number++); if ((file=std::fopen(filename,"r"))!=0) std::fclose(file); } while (file); visu.save(filename); } break; } disp.key = key = 0; } } else key = 0; if (disp.is_resized) { disp.resize(false); visu0 = get_resize(disp,1); redraw = true; } } if (pose_matrix) std::memcpy(pose_matrix,pose.data,16*sizeof(float)); disp.events = old_events; disp.button = 0; return *this; } //! High-level interface for displaying a 3d object template const CImg& display_object3d(const CImgList& points,const CImgList& primitives, const CImgList& colors, const CImgList& opacities, CImgDisplay &disp, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const bool display_axes=true, float *const pose_matrix=0) const { CImg npoints(points.size,3,1,1,0); tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2); cimg_forX(npoints,l) { const CImg& point = points[l]; const unsigned int siz = point.size(); if (!siz) throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (size=%u) contains a null element at " "position %u.",pixel_type(),points.size,l); *(ptrZ++) = (siz>2)?point(2):0; *(ptrY++) = (siz>1)?point(1):0; *(ptrX++) = point(0); } return display_object3d(npoints,primitives,colors,opacities,disp,centering, render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix); } //! High-level interface for displaying a 3d object template const CImg& display_object3d(const CImg& points, const CImgList& primitives, const CImgList& colors, const CImg& opacities, CImgDisplay& disp, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const bool display_axes=true, float *const pose_matrix=0) const { CImgList nopacities(opacities.size(),1); cimglist_for(nopacities,l) nopacities(l,0) = opacities(l); return display_object3d(points,primitives,colors,nopacities,disp,centering, render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix); } //! High-level interface for displaying a 3d object template const CImg& display_object3d(const CImgList& points,const CImgList& primitives, const CImgList& colors, const CImg& opacities, CImgDisplay& disp, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const bool display_axes=true, float *const pose_matrix=0) const { CImgList nopacities(opacities.size(),1); cimglist_for(nopacities,l) nopacities(l,0) = opacities(l); if (points.is_empty()) throw CImgArgumentException("CImg<%s>::display_object3d() : Given points are empty.", pixel_type()); CImg npoints(points.size,3,1,1,0); tp *ptrX = npoints.ptr(), *ptrY = npoints.ptr(0,1), *ptrZ = npoints.ptr(0,2); { cimg_forX(npoints,l) { const CImg& point = points[l]; const unsigned int siz = point.size(); if (!siz) throw CImgArgumentException("CImg<%s>::display_object3d() : Given points (size=%u) contains a null element at " "position %u.",pixel_type(),points.size,l); *(ptrZ++) = (siz>2)?point(2):0; *(ptrY++) = (siz>1)?point(1):0; *(ptrX++) = point(0); } } return display_object3d(npoints,primitives,colors,nopacities,disp,centering, render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix); } //! High-level interface for displaying a 3d object template const CImg& display_object3d(const tp& points, const CImgList& primitives, const CImgList& colors, const to& opacities, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const bool display_axes=true, float *const pose_matrix=0) const { CImgDisplay disp(width,height," ",0); return display_object3d(points,primitives,colors,opacities,disp,centering, render_static,render_motion,double_sided,focale,ambiant_light,display_axes,pose_matrix); } //! High-level interface for displaying a 3d object template const CImg& display_object3d(const tp& points, const CImgList& primitives, const CImgList& colors, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const float opacity=1.0f, const bool display_axes=true, float *const pose_matrix=0) const { CImgDisplay disp(width,height," ",0); return display_object3d(points,primitives,colors,CImg::vector(opacity), disp,centering,render_static,render_motion,double_sided, focale,ambiant_light,display_axes,pose_matrix); } //! High-level interface for displaying a 3d object template const CImg& display_object3d(const tp& points, const CImgList& primitives, const CImgList& colors, CImgDisplay &disp, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float ambiant_light=0.05f, const float opacity=1.0f, const bool display_axes=true, float *const pose_matrix=0) const { return display_object3d(points,primitives,colors,CImg::vector(opacity), disp,centering,render_static,render_motion,double_sided, focale,ambiant_light,display_axes,pose_matrix); } //@} //---------------------- // //! \name Input-Output //@{ //---------------------- //! Load an image from a file. /** \param filename = name of the image file to load. \return A CImg instance containing the pixel data defined in the image file. \note The extension of \c filename defines the file format. If no filename extension is provided, CImg::get_load() will try to load a CRAW file (CImg Raw file). **/ static CImg get_load(const char *const filename) { const char *ext = cimg::filename_split(filename); if (!cimg::strncasecmp(ext,"asc",3)) return get_load_ascii(filename); if (!cimg::strncasecmp(ext,"dlm",3) || !cimg::strncasecmp(ext,"txt",3)) return get_load_dlm(filename); if (!cimg::strncasecmp(ext,"inr",3)) return get_load_inr(filename); if (!cimg::strncasecmp(ext,"hdr",3)) return get_load_analyze(filename); if (!cimg::strncasecmp(ext,"par",3) || !cimg::strncasecmp(ext,"rec",3)) return get_load_parrec(filename); if (!cimg::strncasecmp(ext,"pan",3)) return get_load_pandore(filename); if (!cimg::strncasecmp(ext,"bmp",3)) return get_load_bmp(filename); if (!cimg::strncasecmp(ext,"png",3)) return get_load_png(filename); if (!cimg::strncasecmp(ext,"tif",3)) return get_load_tiff(filename); if (!cimg::strncasecmp(ext,"jpg",3) || !cimg::strncasecmp(ext,"jpeg",4)) return get_load_jpeg(filename); if (!cimg::strncasecmp(ext,"ppm",3) || !cimg::strncasecmp(ext,"pgm",3) || !cimg::strncasecmp(ext,"pnm",3)) return get_load_pnm(filename); if (!cimg::strncasecmp(ext,"cimg",4) || ext[0]=='\0') return get_load_cimg(filename); if (!cimg::strncasecmp(ext,"dcm",3) || !cimg::strncasecmp(ext,"dicom",5)) return get_load_dicom(filename); return get_load_other(filename); } //! Load an image from a file /** This is the in-place version of get_load(). **/ CImg& load(const char *const filename) { return get_load(filename).swap(*this); } //! Load an image from an ASCII file. static CImg get_load_ascii(std::FILE *const file, const char *const filename=0) { std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); char line[256] = {0}; std::fscanf(nfile,"%255[^\n]",line); unsigned int off, dx = 0, dy = 1, dz = 1, dv = 1; int err = 1; std::sscanf(line,"%u %u %u %u",&dx,&dy,&dz,&dv); if (!dx || !dy || !dz || !dv) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_ascii() : File '%s' is not a valid .ASC file.\n" "Specified image dimensions are (%u,%u,%u,%u).", pixel_type(),filename?filename:"(FILE*)",dx,dy,dz,dv); } CImg dest(dx,dy,dz,dv); double val; T *ptr = dest.data; for (off=0; off::get_load_ascii() : File '%s', only %u/%u values read.", pixel_type(),filename?filename:"(FILE*)",off,dest.size()); if (!file) cimg::fclose(nfile); return dest; } //! Load an image from an ASCII file. static CImg get_load_ascii(const char *const filename) { return get_load_ascii(0,filename); } //! Load an image from an ASCII file (in-place version). CImg& load_ascii(std::FILE *const file, const char *const filename=0) { return get_load_ascii(file,filename).swap(*this); } //! Load an image from an ASCII file (in-place version). CImg& load_ascii(const char *const filename) { return get_load_ascii(filename).swap(*this); } //! Load an image from a DLM file static CImg get_load_dlm(std::FILE *const file, const char *const filename=0) { std::FILE *const nfile = file?file:cimg::fopen(filename,"r"); CImg dest(256,256); char c, delimiter[256]={0}, tmp[256]; unsigned int cdx=0,dx=0,dy=0; int oerr=0, err; double val; while ((err = std::fscanf(nfile,"%lf%255[^0-9.eE+-]",&val,delimiter))!=EOF) { oerr = err; if (err>0) dest(cdx++,dy) = (T)val; if (cdx>=dest.width) dest.resize(dest.width+256,1,1,1,0); c=0; if (!std::sscanf(delimiter,"%255[^\n]%c",tmp,&c) || c=='\n') { dx = cimg::max(cdx,dx); dy++; if (dy>=dest.height) dest.resize(dest.width,dest.height+256,1,1,0); cdx=0; } } if (cdx && oerr==1) { dx=cdx; dy++; } if (!dx || !dy) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_dlm() : File '%s' is not a valid DLM file.\n" "Specified image dimensions are (%u,%u).", pixel_type(),filename?filename:"(FILE*)",dx,dy); } dest.resize(dx,dy,1,1,0); if (!file) cimg::fclose(nfile); return dest; } //! Load an image from a DLM file static CImg get_load_dlm(const char *const filename=0) { return get_load_dlm(0,filename); } //! Load an image from a DLM file (in-place version). CImg& load_dlm(std::FILE *const file, const char *const filename=0) { return get_load_dlm(file,filename).swap(*this); } //! Load an image from a DLM file (in-place version). CImg& load_dlm(const char *const filename) { return get_load_dlm(filename).swap(*this); } //! Load an image from a PNM file static CImg get_load_pnm(std::FILE *const file, const char *const filename=0) { std::FILE *const nfile=file?file:cimg::fopen(filename,"rb"); unsigned int ppm_type,width,height,colormax=255; char item[1024]={0}; int err; while ((err=std::fscanf(nfile,"%1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile); if(std::sscanf(item," P%u",&ppm_type)!=1) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', PNM header 'P?' not found.", pixel_type(),filename?filename:"(FILE*)"); } while ((err=std::fscanf(nfile," %1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile); if ((err=std::sscanf(item," %u %u %u",&width,&height,&colormax))<2) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', WIDTH and HEIGHT fields are not defined in PNM header.", pixel_type(),filename?filename:"(FILE*)"); } if (err==2) { while ((err=std::fscanf(nfile," %1023[^\n]",item))!=EOF && (item[0]=='#' || !err)) std::fgetc(nfile); cimg::warn(std::sscanf(item,"%u",&colormax)!=1, "CImg<%s>::get_load_pnm() : File '%s', COLORMAX field is not defined in PNM header.", pixel_type(),filename?filename:"(FILE*)"); } std::fgetc(nfile); CImg dest; int rval,gval,bval; switch (ppm_type) { case 2: { // Grey Ascii dest.assign(width,height,1,1); T* rdata = dest.ptr(); cimg_foroff(dest,off) { std::fscanf(nfile,"%d",&rval); *(rdata++)=(T)rval; } } break; case 3: { // Color Ascii dest.assign(width,height,1,3); T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2); cimg_forXY(dest,x,y) { std::fscanf(nfile,"%d %d %d",&rval,&gval,&bval); *(rdata++)=(T)rval; *(gdata++)=(T)gval; *(bdata++)=(T)bval; } } break; case 5: { // Grey Binary if (colormax<256) { // 8 bits CImg raw(width,height,1,1); cimg::fread(raw.data,width*height,nfile); dest=raw; } else { // 16 bits CImg raw(width,height,1,1); cimg::fread(raw.data,width*height,nfile); if (!cimg::endian()) cimg::endian_swap(raw.data,width*height); dest=raw; } } break; case 6: { // Color Binary if (colormax<256) { // 8 bits CImg raw(width,height,1,3); cimg::fread(raw.data,width*height*3,nfile); dest.assign(width,height,1,3); T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2); const unsigned char *ptrs = raw.ptr(); for (unsigned int off = raw.width*raw.height; off; --off) { *(rdata++) = (T)*(ptrs++); *(gdata++) = (T)*(ptrs++); *(bdata++) = (T)*(ptrs++); } } else { // 16 bits CImg raw(width,height,1,3); cimg::fread(raw.data,width*height*3,nfile); if (!cimg::endian()) cimg::endian_swap(raw.data,width*height*3); dest.assign(width,height,1,3); T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2); const unsigned short *ptrs = raw.ptr(); for (unsigned int off = raw.width*raw.height; off; --off) { *(rdata++) = (T)*(ptrs++); *(gdata++) = (T)*(ptrs++); *(bdata++) = (T)*(ptrs++); } } } break; default: if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_pnm() : File '%s', PPM type 'P%d' not supported.", pixel_type(),filename?filename:"(FILE*)",ppm_type); } if (!file) cimg::fclose(nfile); return dest; } //! Load an image from a PNM file. static CImg get_load_pnm(const char *const filename) { return get_load_pnm(0,filename); } //! Load an image from a PNM file (in-place version). CImg& load_pnm(std::FILE *const file, const char *const filename=0) { return get_load_pnm(file,filename).swap(*this); } //! Load an image from a PNM file (in-place version). CImg& load_pnm(const char *const filename) { return get_load_pnm(filename).swap(*this); } //! Load a YUV image sequence file. static CImg get_load_yuv(std::FILE *const file, const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb = false) { return CImgList::get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).get_append('z','c'); } //! Load a YUV image sequence file. static CImg get_load_yuv(const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb = false) { return CImgList::get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).get_append('z','c'); } //! Load a YUV image sequence file (in-place). CImg& load_yuv(std::FILE *const file, const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb = false) { return get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this); } //! Load a YUV image sequence file (in-place). CImg& load_yuv(const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb = false) { return get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this); } //! Load an image from a BMP file. static CImg get_load_bmp(std::FILE *const file, const char *const filename=0) { std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); unsigned char header[64]; cimg::fread(header,54,nfile); if (header[0]!='B' || header[1]!='M') { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_bmp() : File '%s' is not a valid BMP file.", pixel_type(),filename?filename:"(FILE*)"); } // Read header and pixel buffer int file_size = header[0x02] + (header[0x03]<<8) + (header[0x04]<<16) + (header[0x05]<<24), offset = header[0x0A] + (header[0x0B]<<8) + (header[0x0C]<<16) + (header[0x0D]<<24), dx = header[0x12] + (header[0x13]<<8) + (header[0x14]<<16) + (header[0x15]<<24), dy = header[0x16] + (header[0x17]<<8) + (header[0x18]<<16) + (header[0x19]<<24), compression = header[0x1E] + (header[0x1F]<<8) + (header[0x20]<<16) + (header[0x21]<<24), nb_colors = header[0x2E] + (header[0x2F]<<8) + (header[0x30]<<16) + (header[0x31]<<24), bpp = header[0x1C] + (header[0x1D]<<8), *palette = 0; const int dx_bytes = (bpp==1)?(dx/8+(dx%8?1:0)):((bpp==4)?(dx/2+(dx%2?1:0)):(dx*bpp/8)), align = (4-dx_bytes%4)%4, buf_size = cimg::min(cimg::abs(dy)*(dx_bytes+align),file_size-offset); if (bpp<16) { if (!nb_colors) nb_colors=1<0) std::fseek(nfile,xoffset,SEEK_CUR); unsigned char *buffer = new unsigned char[buf_size], *ptrs = buffer; cimg::fread(buffer,buf_size,nfile); if (!file) cimg::fclose(nfile); // Decompress buffer (if necessary) if (compression) { delete[] buffer; if (file) { throw CImgIOException("CImg<%s>::get_load_bmp() : Not able to read a compressed BMP file using a *FILE input",pixel_type()); } else return get_load_other(filename); } // Read pixel data CImg res(dx,cimg::abs(dy),1,3); switch (bpp) { case 1: { // Monochrome for (int y=res.height-1; y>=0; y--) { unsigned char mask = 0x80, val = 0; cimg_forX(res,x) { if (mask==0x80) val = *(ptrs++); const unsigned char *col = (unsigned char*)(palette+(val&mask?1:0)); res(x,y,2) = (T)*(col++); res(x,y,1) = (T)*(col++); res(x,y,0) = (T)*(col++); mask = cimg::ror(mask); } ptrs+=align; } } break; case 4: { // 16 colors for (int y=res.height-1; y>=0; y--) { unsigned char mask = 0xF0, val = 0; cimg_forX(res,x) { if (mask==0xF0) val = *(ptrs++); const unsigned char color = (mask<16)?(val&mask):((val&mask)>>4); unsigned char *col = (unsigned char*)(palette+color); res(x,y,2) = (T)*(col++); res(x,y,1) = (T)*(col++); res(x,y,0) = (T)*(col++); mask = cimg::ror(mask,4); } ptrs+=align; } } break; case 8: { // 256 colors for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) { const unsigned char *col = (unsigned char*)(palette+*(ptrs++)); res(x,y,2) = (T)*(col++); res(x,y,1) = (T)*(col++); res(x,y,0) = (T)*(col++); } ptrs+=align; } } break; case 16: { // 16 bits colors for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) { const unsigned char c1 = *(ptrs++), c2 = *(ptrs++); const unsigned short col = c1+(c2<<8); res(x,y,2) = (T)(col&0x1F); res(x,y,1) = (T)((col>>5)&0x1F); res(x,y,0) = (T)((col>>10)&0x1F); } ptrs+=align; } } break; case 24: { // 24 bits colors for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) { res(x,y,2) = (T)*(ptrs++); res(x,y,1) = (T)*(ptrs++); res(x,y,0) = (T)*(ptrs++); } ptrs+=align; } } break; case 32: { // 32 bits colors for (int y=res.height-1; y>=0; y--) { cimg_forX(res,x) { res(x,y,2) = (T)*(ptrs++); res(x,y,1) = (T)*(ptrs++); res(x,y,0) = (T)*(ptrs++); ptrs++; } ptrs+=align; } } break; } if (palette) delete[] palette; delete[] buffer; if (dy<0) res.mirror('y'); return res; } //! Load an image from a BMP file static CImg get_load_bmp(const char *const filename) { return get_load_bmp(0,filename); } //! Load an image from a BMP file CImg& load_bmp(std::FILE *const file, const char *const filename=0) { return get_load_bmp(file,filename).swap(*this); } //! Load an image from a BMP file CImg& load_bmp(const char *const filename) { return get_load_bmp(filename).swap(*this); } //! Load an image from a PNG file. // Note : Most of this function has been written by Eric Fausett static CImg get_load_png(std::FILE *const file, const char *const filename=0) { #ifndef cimg_use_png if (file) throw CImgIOException("CImg<%s>::get_load_png() : File '(FILE*)' cannot be read without using libpng.",pixel_type()); else return get_load_other(filename); #else // Open file and check for PNG validity std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); unsigned char pngCheck[8]; cimg::fread(pngCheck,8,nfile); if (png_sig_cmp(pngCheck,0,8)) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_png() : File '%s' is not a valid PNG file.", pixel_type(),filename?filename:"(FILE*)"); } // Setup PNG structures for read png_voidp user_error_ptr=0; png_error_ptr user_error_fn=0, user_warning_fn=0; png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, // Verifies libpng version correct user_error_ptr, user_error_fn, user_warning_fn); if(!png_ptr){ if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'png_ptr' data structure.", pixel_type(),filename?filename:"(FILE*)"); } png_infop info_ptr = png_create_info_struct(png_ptr); if(!info_ptr){ if (!file) cimg::fclose(nfile); png_destroy_read_struct(&png_ptr, (png_infopp)0, (png_infopp)0); throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'info_ptr' data structure.", pixel_type(),filename?filename:"(FILE*)"); } png_infop end_info = png_create_info_struct(png_ptr); if(!end_info){ if (!file) cimg::fclose(nfile); png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)0); throw CImgIOException("CImg<%s>::get_load_png() : File '%s', trouble initializing 'end_info' data structure.", pixel_type(),filename?filename:"(FILE*)"); } // Error handling callback for png file reading if (setjmp(png_jmpbuf(png_ptr))){ if (!file) cimg::fclose(nfile); png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0); throw CImgIOException("CImg<%s>::get_load_png() : File '%s', unknown fatal error.", pixel_type(),filename?filename:"(FILE*)"); } png_init_io(png_ptr, nfile); png_set_sig_bytes(png_ptr, 8); // Get PNG Header Info up to data block png_read_info(png_ptr, info_ptr); png_uint_32 width, height; int bit_depth, color_type, interlace_type; png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, int_p_NULL, int_p_NULL); int new_bit_depth = bit_depth; int new_color_type = color_type; // Transforms to unify image data if (new_color_type == PNG_COLOR_TYPE_PALETTE){ png_set_palette_to_rgb(png_ptr); new_color_type -= PNG_COLOR_MASK_PALETTE; new_bit_depth = 8; } if (new_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8){ png_set_gray_1_2_4_to_8(png_ptr); new_bit_depth = 8; } if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); if (new_color_type == PNG_COLOR_TYPE_GRAY || new_color_type == PNG_COLOR_TYPE_GRAY_ALPHA){ png_set_gray_to_rgb(png_ptr); new_color_type |= PNG_COLOR_MASK_COLOR; } if (new_color_type == PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr, 0xffffU, PNG_FILLER_AFTER); png_read_update_info(png_ptr, info_ptr); if (!(new_bit_depth==8 || new_bit_depth==16)) { if (!file) cimg::fclose(nfile); png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0); throw CImgIOException("CImg<%s>::get_load_png() : File '%s', wrong bit coding (bit_depth=%u)", pixel_type(),filename?filename:"(FILE*)",new_bit_depth); } const int byte_depth = new_bit_depth>>3; // Allocate Memory for Image Read png_bytep *imgData = new png_bytep[height]; for (unsigned int row=0; row < height; row++) imgData[row] = new png_byte[byte_depth * 4 * width]; png_read_image(png_ptr, imgData); png_read_end(png_ptr, end_info); // Read pixel data if (!(new_color_type==PNG_COLOR_TYPE_RGB || new_color_type==PNG_COLOR_TYPE_RGB_ALPHA)) { if (!file) cimg::fclose(nfile); png_destroy_read_struct(&png_ptr, &end_info, (png_infopp)0); throw CImgIOException("CImg<%s>::get_load_png() : File '%s', wrong color coding (new_color_type=%u)", pixel_type(),filename?filename:"(FILE*)",new_color_type); } const bool no_alpha_channel = (new_color_type==PNG_COLOR_TYPE_RGB); CImg res(width,height,1,no_alpha_channel?3:4); const unsigned long off = width*height; T *ptr1 = res.data, *ptr2 = ptr1+off, *ptr3 = ptr2+off, *ptr4 = ptr3+off; switch(new_bit_depth){ case 8: { cimg_forY(res,y){ const unsigned char *ptrs = (unsigned char*)imgData[y]; cimg_forX(res,x){ *(ptr1++) = (T)*(ptrs++); *(ptr2++) = (T)*(ptrs++); *(ptr3++) = (T)*(ptrs++); if (no_alpha_channel) ptrs++; else *(ptr4++) = (T)*(ptrs++); } } } break; case 16: { cimg_forY(res,y){ const unsigned short *ptrs = (unsigned short*)(imgData[y]); cimg_forX(res,x){ *(ptr1++) = (T)*(ptrs++); *(ptr2++) = (T)*(ptrs++); *(ptr3++) = (T)*(ptrs++); if (no_alpha_channel) ptrs++; else *(ptr4++) = (T)*(ptrs++); } } } break; } png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); // Deallocate Image Read Memory for (unsigned int n=0; n=3 TIFFSetWarningHandler(0); TIFFSetErrorHandler(0); #endif if (tif) { unsigned int number_of_directories = 0; do number_of_directories++; while (TIFFReadDirectory(tif)); uint16 samplesperpixel, bitspersample; uint32 nx,ny; TIFFGetField(tif,TIFFTAG_IMAGEWIDTH,&nx); TIFFGetField(tif,TIFFTAG_IMAGELENGTH,&ny); TIFFGetField(tif,TIFFTAG_SAMPLESPERPIXEL,&samplesperpixel); if (samplesperpixel!=1 && samplesperpixel!=3 && samplesperpixel!=4) { cimg::warn(true,"CImg<%s>::get_load_tiff() : File '%s', unknow value for tag : TIFFTAG_SAMPLESPERPIXEL, will force it to 1.", pixel_type(),filename?filename:"(FILE*)"); samplesperpixel=1; } TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); TIFFClose(tif); tif = TIFFOpen(filename,"r"); dest.assign(nx,ny,number_of_directories,samplesperpixel); unsigned int dir=0; do { if (bitspersample!=8 || !(samplesperpixel == 1 || samplesperpixel == 3 || samplesperpixel == 4)){ //if !rgba 8bit uint16 photo, config; TIFFGetField(tif,TIFFTAG_PLANARCONFIG,&config); TIFFGetField(tif,TIFFTAG_PHOTOMETRIC,&photo); if (TIFFIsTiled(tif)) { uint32 tw, th; TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); if (config==PLANARCONFIG_CONTIG) { switch(bitspersample){ case 8:{ unsigned char *buf; buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif)); if (buf) { for (unsigned int row = 0; row::get_load_tiff() : File '%s', an error occure while reading a tile.", pixel_type(),filename?filename:"(FILE*)"); } else { unsigned char * ptr = buf; for (unsigned int rr=row;rr::get_load_tiff() : File '%s', an error occure while reading a tile.", pixel_type(),filename?filename:"(FILE*)"); } else { unsigned short * ptr = buf; for (unsigned int rr=row;rr::get_load_tiff() : File '%s', an error occure while reading a tile.", pixel_type(),filename?filename:"(FILE*)"); } else { float * ptr = buf; for (unsigned int rr=row;rr::get_load_tiff() : File '%s', an error occure while reading a tile.", pixel_type(),filename?filename:"(FILE*)"); } else { unsigned char * ptr = buf; for (unsigned int rr=row;rr::get_load_tiff() : File '%s', an error occure while reading a tile.", pixel_type(),filename?filename:"(FILE*)"); } else { unsigned short * ptr = buf; for (unsigned int rr=row;rr::get_load_tiff() : File '%s', an error occure while reading a tile.", pixel_type(),filename?filename:"(FILE*)"); } else { float * ptr = buf; for (unsigned int rr=row;rrny?ny-row:rowsperstrip); tstrip_t strip = TIFFComputeStrip(tif, row, 0); if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) { _TIFFfree(buf); TIFFClose(tif); throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a strip.", pixel_type(),filename?filename:"(FILE*)"); } unsigned char * ptr = buf; for (unsigned int rr=0; rrny?ny-row:rowsperstrip); tstrip_t strip = TIFFComputeStrip(tif, row, 0); if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) { _TIFFfree(buf); TIFFClose(tif); throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.", pixel_type(),filename?filename:"(FILE*)"); } unsigned short * ptr = buf; for (unsigned int rr=0; rrny?ny-row:rowsperstrip); tstrip_t strip = TIFFComputeStrip(tif, row, 0); if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) { _TIFFfree(buf); TIFFClose(tif); throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.", pixel_type(),filename?filename:"(FILE*)"); } float * ptr = buf; for (unsigned int rr=0; rrny?ny-row:rowsperstrip); tstrip_t strip = TIFFComputeStrip(tif, row, vv); if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) { _TIFFfree(buf); TIFFClose(tif); throw CImgException("CImg<%s>::get_load_tiff() : File '%s', an error occure while reading a strip.", pixel_type(),filename?filename:"(FILE*)"); } unsigned char * ptr = buf; for (unsigned int rr=0;rrny?ny-row:rowsperstrip); tstrip_t strip = TIFFComputeStrip(tif, row, vv); if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) { _TIFFfree(buf); TIFFClose(tif); throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.", pixel_type(),filename?filename:"(FILE*)"); } unsigned short * ptr = buf; for (unsigned int rr=0;rrny?ny-row:rowsperstrip); tstrip_t strip = TIFFComputeStrip(tif, row, vv); if ((TIFFReadEncodedStrip(tif,strip,buf,-1))<0) { _TIFFfree(buf); TIFFClose(tif); throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while reading a strip.", pixel_type(),filename?filename:"(FILE*)"); } float * ptr = buf; for (unsigned int rr=0;rr::get_load_tiff() : File '%s', not enough memory for buffer allocation.", pixel_type(),filename?filename:"(FILE*)"); } TIFFReadRGBAImage(tif,nx,ny,raster,0); switch (samplesperpixel){ case 1:{ cimg_forXY(dest,x,y) dest(x,y,dir)=(T)(float)((raster[nx*(ny-1-y)+x]+ 128) / 257); break; } case 3:{ cimg_forXY(dest,x,y) { dest(x,y,dir,0)=(T)(float)TIFFGetR(raster[nx*(ny-1-y)+x]); dest(x,y,dir,1)=(T)(float)TIFFGetG(raster[nx*(ny-1-y)+x]); dest(x,y,dir,2)=(T)(float)TIFFGetB(raster[nx*(ny-1-y)+x]); } break; } case 4:{ cimg_forXY(dest,x,y) { dest(x,y,dir,0)=(T)(float)TIFFGetR(raster[nx*(ny-1-y)+x]); dest(x,y,dir,1)=(T)(float)TIFFGetG(raster[nx*(ny-1-y)+x]); dest(x,y,dir,2)=(T)(float)TIFFGetB(raster[nx*(ny-1-y)+x]); dest(x,y,dir,3)=(T)(float)TIFFGetA(raster[nx*(ny-1-y)+x]); } break; } } _TIFFfree(raster); } dir++; } while (TIFFReadDirectory(tif)); TIFFClose(tif); } else throw CImgException("CImg<%s>::get_load_tiff() : File '%s', error while loading the image.", pixel_type(),filename?filename:"(FILE*)"); return dest; #endif } //! Load an image from a TIFF file CImg& load_tiff(const char *const filename) { return get_load_tiff(filename).swap(*this); } //! Load a file in JPEG format. static CImg get_load_jpeg(std::FILE *const file, const char *const filename=0) { #ifndef cimg_use_jpeg if (file) throw CImgIOException("CImg<%s>::get_load_jpeg() : File '(FILE*)' cannot be read without using libjpeg.", pixel_type()); else return get_load_other(filename); #else struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); cinfo.err = jpeg_std_error(&jerr); jpeg_create_decompress(&cinfo); jpeg_stdio_src(&cinfo,nfile); jpeg_read_header(&cinfo,TRUE); jpeg_start_decompress(&cinfo); if (cinfo.output_components!=1 && cinfo.output_components!=3 && cinfo.output_components!=4) { cimg::warn(true,"CImg<%s>::get_load_jpeg() : Don't know how to read image '%s' with libpeg, trying ImageMagick's convert", pixel_type(),filename?filename:"(unknown)"); if (!file) return get_load_other(filename); else { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_jpeg() : Cannot read JPEG image '%s' using a *FILE input.", pixel_type(),filename?filename:"(FILE*)"); } } const unsigned int row_stride = cinfo.output_width * cinfo.output_components; unsigned char *buf = new unsigned char[cinfo.output_width*cinfo.output_height*cinfo.output_components], *buf2 = buf; JSAMPROW row_pointer[1]; while (cinfo.output_scanline < cinfo.output_height) { row_pointer[0] = &buf[cinfo.output_scanline*row_stride]; jpeg_read_scanlines(&cinfo,row_pointer,1); } jpeg_finish_decompress(&cinfo); jpeg_destroy_decompress(&cinfo); if (!file) cimg::fclose(nfile); CImg dest(cinfo.output_width,cinfo.output_height,1,cinfo.output_components); switch (dest.dim) { case 1: { T *ptr_g = dest.ptr(); cimg_forXY(dest,x,y) *(ptr_g++) = (T)*(buf2++); } break; case 3: { T *ptr_r = dest.ptr(0,0,0,0), *ptr_g = dest.ptr(0,0,0,1), *ptr_b = dest.ptr(0,0,0,2); cimg_forXY(dest,x,y) { *(ptr_r++) = (T)*(buf2++); *(ptr_g++) = (T)*(buf2++); *(ptr_b++) = (T)*(buf2++); } } break; case 4: { T *ptr_r = dest.ptr(0,0,0,0), *ptr_g = dest.ptr(0,0,0,1), *ptr_b = dest.ptr(0,0,0,2), *ptr_a = dest.ptr(0,0,0,3); cimg_forXY(dest,x,y) { *(ptr_r++) = (T)*(buf2++); *(ptr_g++) = (T)*(buf2++); *(ptr_b++) = (T)*(buf2++); *(ptr_a++) = (T)*(buf2++); } } break; } delete[] buf; return dest; #endif } //! Load an image from a JPEG file static CImg get_load_jpeg(const char *const filename) { return get_load_jpeg(0,filename); } //! Load an image from a JPEG file CImg& load_jpeg(std::FILE *const file, const char *const filename=0) { return get_load_jpeg(file,filename).swap(*this); } //! Load an image from a JPEG file CImg& load_jpeg(const char *const filename) { return get_load_jpeg(filename).swap(*this); } //! Load an image using builtin ImageMagick++ Library /** Added April/may 2006 by Christoph Hormann This is experimental code, not much tested, use with care. **/ static CImg get_load_magick(const char *const filename) { CImg dest; #ifdef cimg_use_magick Magick::Image image(filename); const unsigned int width = image.size().width(), height = image.size().height(); switch (image.type()) { case Magick::PaletteMatteType: case Magick::TrueColorMatteType: case Magick::ColorSeparationType: { dest.assign(width,height,1,4); T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2), *adata = dest.ptr(0,0,0,3); Magick::PixelPacket *pixels = image.getPixels(0,0,width,height); for (unsigned int off = width*height; off; --off) { *(rdata++) = (T)(pixels->red); *(gdata++) = (T)(pixels->green); *(bdata++) = (T)(pixels->blue); *(adata++) = (T)(pixels->opacity); pixels++; } } break; case Magick::PaletteType: case Magick::TrueColorType: { dest.assign(width,height,1,3); T *rdata = dest.ptr(0,0,0,0), *gdata = dest.ptr(0,0,0,1), *bdata = dest.ptr(0,0,0,2); Magick::PixelPacket *pixels = image.getPixels(0,0,width,height); for (unsigned int off = width*height; off; --off) { *(rdata++) = (T)(pixels->red); *(gdata++) = (T)(pixels->green); *(bdata++) = (T)(pixels->blue); pixels++; } } break; case Magick::GrayscaleMatteType: { dest.assign(width,height,1,2); T *data = dest.ptr(0,0,0,0), *adata = dest.ptr(0,0,0,1); Magick::PixelPacket *pixels = image.getPixels(0,0,width,height); for (unsigned int off = width*height; off; --off) { *(data++) = (T)(pixels->red); *(adata++) = (T)(pixels->opacity); pixels++; } } break; default: { dest.assign(width,height,1,1); T *data = dest.ptr(0,0,0,0); Magick::PixelPacket *pixels = image.getPixels(0,0,width,height); for (unsigned int off = width*height; off; --off) { *(data++) = (T)(pixels->red); pixels++; } } break; } return dest; #else throw CImgIOException("CImg<%s>::get_load_magick() : File '%s', Magick++ has not been linked during compilation.", pixel_type(),filename?filename:"(null)"); return dest; #endif } //! Load an image using builtin ImageMagick++ Library (in-place version). CImg& load_magick(const char *const filename) { return get_load_magick(filename).swap(*this); } //! Load an image from a RAW file. static CImg get_load_raw(std::FILE *const file, const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int sizez=1, const unsigned int sizev=1, const bool multiplexed=false, const bool endian_swap=false) { CImg res(sizex,sizey,sizez,sizev,0); if (res.is_empty()) return res; std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); if (!multiplexed) { cimg::fread(res.ptr(),res.size(),nfile); if (endian_swap) cimg::endian_swap(res.ptr(),res.size()); } else { CImg buf(1,1,1,sizev); cimg_forXYZ(res,x,y,z) { cimg::fread(buf.ptr(),sizev,nfile); if (endian_swap) cimg::endian_swap(buf.ptr(),sizev); res.set_vector_at(buf,x,y,z); } } if (!file) cimg::fclose(nfile); return res; } //! Load an image from a RAW file. static CImg get_load_raw(const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int sizez=1, const unsigned int sizev=1, const bool multiplexed = false, const bool endian_swap = false) { return get_load_raw(0,filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap); } //! In-place version of get_load_raw() CImg& load_raw(std::FILE *const file, const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int sizez=1, const unsigned int sizev=1, const bool multiplexed = false, const bool endian_swap = false) { return get_load_raw(file,filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap).swap(*this); } //! In-place version of get_load_raw() CImg& load_raw(const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int sizez=1, const unsigned int sizev=1, const bool multiplexed = false, const bool endian_swap = false) { return get_load_raw(filename,sizex,sizey,sizez,sizev,multiplexed,endian_swap).swap(*this); } //! Load an image from a RGBA file. static CImg get_load_rgba(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) { std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); unsigned char *buffer = new unsigned char[dimw*dimh*4]; cimg::fread(buffer,dimw*dimh*4,nfile); if (!file) cimg::fclose(nfile); CImg res(dimw,dimh,1,4); T *pR = res.ptr(0,0,0,0), *pG = res.ptr(0,0,0,1), *pB = res.ptr(0,0,0,2), *pA = res.ptr(0,0,0,3); const unsigned char *ptrs = buffer; for (unsigned int off=res.width*res.height; off>0; --off) { *(pR++) = (T)*(ptrs++); *(pG++) = (T)*(ptrs++); *(pB++) = (T)*(ptrs++); *(pA++) = (T)*(ptrs++); } delete[] buffer; return res; } //! Load an image from a RGBA file. static CImg get_load_rgba(const char *const filename, const unsigned int dimw, const unsigned int dimh) { return get_load_rgba(0,filename,dimw,dimh); } //! In-place version of get_load_rgba() CImg& load_rgba(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) { return get_load_rgba(file, filename,dimw,dimh).swap(*this); } //! In-place version of get_load_rgba() CImg& load_rgba(const char *const filename, const unsigned int dimw, const unsigned int dimh) { return get_load_rgba(filename,dimw,dimh).swap(*this); } //! Load an image from a RGB file. static CImg get_load_rgb(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) { std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); unsigned char *buffer = new unsigned char[dimw*dimh*3]; cimg::fread(buffer,dimw*dimh*3,nfile); if (!file) cimg::fclose(nfile); CImg res(dimw,dimh,1,3); T *pR = res.ptr(0,0,0,0), *pG = res.ptr(0,0,0,1), *pB=res.ptr(0,0,0,2); const unsigned char *ptrs = buffer; for (unsigned int off=res.width*res.height; off>0; --off) { *(pR++) = (T)*(ptrs++); *(pG++) = (T)*(ptrs++); *(pB++) = (T)*(ptrs++); } delete[] buffer; return res; } //! Load an image from a RGB file. static CImg get_load_rgb(const char *const filename, const unsigned int dimw, const unsigned int dimh) { return get_load_rgb(0,filename,dimw,dimh); } //! In-place version of get_load_rgb() CImg& load_rgb(std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh) { return get_load_rgb(file, filename,dimw,dimh).swap(*this); } //! In-place version of get_load_rgb() CImg& load_rgb(const char *const filename, const unsigned int dimw, const unsigned int dimh) { return get_load_rgb(filename,dimw,dimh).swap(*this); } #define cimg_load_inr_case(Tf,sign,pixsize,Ts) \ if (!loaded && fopt[6]==pixsize && fopt[4]==Tf && fopt[5]==sign) { \ Ts *xval, *val = new Ts[fopt[0]*fopt[3]]; \ cimg_forYZ(dest,y,z) { \ cimg::fread(val,fopt[0]*fopt[3],nfile); \ if (fopt[7]!=endian) cimg::endian_swap(val,fopt[0]*fopt[3]); \ xval = val; cimg_forX(dest,x) cimg_forV(dest,k) \ dest(x,y,z,k) = (T)*(xval++); \ } \ delete[] val; \ loaded = true; \ } static void _load_inr(std::FILE *file, int out[8], float *const voxsize=0) { char item[1024],tmp1[64],tmp2[64]; out[0]=out[1]=out[2]=out[3]=out[5]=1; out[4]=out[6]=out[7]=-1; std::fscanf(file,"%63s",item); if(cimg::strncasecmp(item,"#INRIMAGE-4#{",13)!=0) throw CImgIOException("CImg<%s>::get_load_inr() : File does not appear to be a valid INR file.\n" "(INRIMAGE-4 identifier not found)",pixel_type()); while (std::fscanf(file," %63[^\n]%*c",item)!=EOF && cimg::strncmp(item,"##}",3)) { std::sscanf(item," XDIM%*[^0-9]%d",out); std::sscanf(item," YDIM%*[^0-9]%d",out+1); std::sscanf(item," ZDIM%*[^0-9]%d",out+2); std::sscanf(item," VDIM%*[^0-9]%d",out+3); std::sscanf(item," PIXSIZE%*[^0-9]%d",out+6); if (voxsize) { std::sscanf(item," VX%*[^0-9.eE+-]%f",voxsize); std::sscanf(item," VY%*[^0-9.eE+-]%f",voxsize+1); std::sscanf(item," VZ%*[^0-9.eE+-]%f",voxsize+2); } if (std::sscanf(item," CPU%*[ =]%s",tmp1)) out[7]=cimg::strncasecmp(tmp1,"sun",3)?0:1; switch(std::sscanf(item," TYPE%*[ =]%s %s",tmp1,tmp2)) { case 0: break; case 2: out[5] = cimg::strncasecmp(tmp1,"unsigned",8)?1:0; std::strcpy(tmp1,tmp2); case 1: if (!cimg::strncasecmp(tmp1,"int",3) || !cimg::strncasecmp(tmp1,"fixed",5)) out[4]=0; if (!cimg::strncasecmp(tmp1,"float",5) || !cimg::strncasecmp(tmp1,"double",6)) out[4]=1; if (!cimg::strncasecmp(tmp1,"packed",6)) out[4]=2; if (out[4]>=0) break; default: throw CImgIOException("cimg::inr_header_read() : Invalid TYPE '%s'",tmp2); } } if(out[0]<0 || out[1]<0 || out[2]<0 || out[3]<0) throw CImgIOException("CImg<%s>::get_load_inr() : Bad dimensions in .inr file = ( %d , %d , %d , %d )", pixel_type(),out[0],out[1],out[2],out[3]); if(out[4]<0 || out[5]<0) throw CImgIOException("CImg<%s>::get_load_inr() : TYPE is not fully defined",pixel_type()); if(out[6]<0) throw CImgIOException("CImg<%s>::get_load_inr() : PIXSIZE is not fully defined",pixel_type()); if(out[7]<0) throw CImgIOException("CImg<%s>::get_load_inr() : Big/Little Endian coding type is not defined",pixel_type()); } //! Load an image from an INRIMAGE-4 file. static CImg get_load_inr(std::FILE *const file, const char *const filename=0, float *voxsize=0) { std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); int fopt[8], endian=cimg::endian()?1:0; bool loaded = false; if (voxsize) voxsize[0]=voxsize[1]=voxsize[2]=1; _load_inr(nfile,fopt,voxsize); CImg dest(fopt[0],fopt[1],fopt[2],fopt[3]); cimg_load_inr_case(0,0,8, unsigned char); cimg_load_inr_case(0,1,8, char); cimg_load_inr_case(0,0,16,unsigned short); cimg_load_inr_case(0,1,16,short); cimg_load_inr_case(0,0,32,unsigned int); cimg_load_inr_case(0,1,32,int); cimg_load_inr_case(1,0,32,float); cimg_load_inr_case(1,1,32,float); cimg_load_inr_case(1,0,64,double); cimg_load_inr_case(1,1,64,double); if (!loaded) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_inr() : File '%s', cannot read images of the type specified in the file", pixel_type(),filename?filename:"(FILE*)"); } if (!file) cimg::fclose(nfile); return dest; } //! Load an image from an INRIMAGE-4 file. static CImg get_load_inr(const char *const filename, float *const voxsize=0) { return get_load_inr(0,filename,voxsize); } //! In-place version of get_load_inr() CImg& load_inr(std::FILE *const file, const char *const filename=0, float *const voxsize=0) { return get_load_inr(file,filename,voxsize).swap(*this); } //! In-place version of get_load_inr() CImg& load_inr(const char *const filename, float *const voxsize=0) { return get_load_inr(filename,voxsize).swap(*this); } #define cimg_load_pandore_case(nid,nbdim,nwidth,nheight,ndepth,ndim,stype) \ case nid: { \ cimg::fread(dims,nbdim,nfile); \ if (endian) cimg::endian_swap(dims,nbdim); \ dest.assign(nwidth,nheight,ndepth,ndim); \ stype *buffer = new stype[dest.size()]; \ cimg::fread(buffer,dest.size(),nfile); \ if (endian) cimg::endian_swap(buffer,dest.size()); \ T *ptrd = dest.ptr(); \ cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); \ buffer-=dest.size(); \ delete[] buffer; \ } \ break; //! Load an image from a PANDORE-5 file. static CImg get_load_pandore(std::FILE *const file, const char *const filename=0) { std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); typedef unsigned char uchar; /* Don't use these two and they cause warnings. * typedef unsigned short ushort; typedef unsigned int uint; */ typedef unsigned long ulong; CImg dest; char tmp[32]; cimg::fread(tmp,12,nfile); if (cimg::strncasecmp("PANDORE",tmp,7)) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_pandore() : File '%s' is not a valid PANDORE file.\n" "(PANDORE identifier not found).",pixel_type(),filename?filename:"(FILE*)"); } unsigned int imageid,dims[8]; int ptbuf[4]; cimg::fread(&imageid,1,nfile); const bool endian = (imageid>255); if (endian) cimg::endian_swap(imageid); cimg::fread(tmp,20,nfile); switch (imageid) { cimg_load_pandore_case(2,2,dims[1],1,1,1,uchar); cimg_load_pandore_case(3,2,dims[1],1,1,1,long); cimg_load_pandore_case(4,2,dims[1],1,1,1,float); cimg_load_pandore_case(5,3,dims[2],dims[1],1,1,uchar); cimg_load_pandore_case(6,3,dims[2],dims[1],1,1,long); cimg_load_pandore_case(7,3,dims[2],dims[1],1,1,float); cimg_load_pandore_case(8,4,dims[3],dims[2],dims[1],1,uchar); cimg_load_pandore_case(9,4,dims[3],dims[2],dims[1],1,long); cimg_load_pandore_case(10,4,dims[3],dims[2],dims[1],1,float); case 11: { // Region 1D cimg::fread(dims,3,nfile); if (endian) cimg::endian_swap(dims,3); dest.assign(dims[1],1,1,1); if (dims[2]<256) { unsigned char *buffer = new unsigned char[dest.size()]; cimg::fread(buffer,dest.size(),nfile); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } else { if (dims[2]<65536) { unsigned short *buffer = new unsigned short[dest.size()]; cimg::fread(buffer,dest.size(),nfile); if (endian) cimg::endian_swap(buffer,dest.size()); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } else { unsigned int *buffer = new unsigned int[dest.size()]; cimg::fread(buffer,dest.size(),nfile); if (endian) cimg::endian_swap(buffer,dest.size()); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } } } break; case 12: { // Region 2D cimg::fread(dims,4,nfile); if (endian) cimg::endian_swap(dims,4); dest.assign(dims[2],dims[1],1,1); if (dims[3]<256) { unsigned char *buffer = new unsigned char[dest.size()]; cimg::fread(buffer,dest.size(),nfile); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } else { if (dims[3]<65536) { unsigned short *buffer = new unsigned short[dest.size()]; cimg::fread(buffer,dest.size(),nfile); if (endian) cimg::endian_swap(buffer,dest.size()); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } else { unsigned long *buffer = new unsigned long[dest.size()]; cimg::fread(buffer,dest.size(),nfile); if (endian) cimg::endian_swap(buffer,dest.size()); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } } } break; case 13: { // Region 3D cimg::fread(dims,5,nfile); if (endian) cimg::endian_swap(dims,5); dest.assign(dims[3],dims[2],dims[1],1); if (dims[4]<256) { unsigned char *buffer = new unsigned char[dest.size()]; cimg::fread(buffer,dest.size(),nfile); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } else { if (dims[4]<65536) { unsigned short *buffer = new unsigned short[dest.size()]; cimg::fread(buffer,dest.size(),nfile); if (endian) cimg::endian_swap(buffer,dest.size()); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } else { unsigned int *buffer = new unsigned int[dest.size()]; cimg::fread(buffer,dest.size(),nfile); if (endian) cimg::endian_swap(buffer,dest.size()); T *ptrd = dest.ptr(); cimg_foroff(dest,off) *(ptrd++) = (T)*(buffer++); buffer-=dest.size(); delete[] buffer; } } } break; cimg_load_pandore_case(16,4,dims[2],dims[1],1,3,uchar); cimg_load_pandore_case(17,4,dims[2],dims[1],1,3,long); cimg_load_pandore_case(18,4,dims[2],dims[1],1,3,float); cimg_load_pandore_case(19,5,dims[3],dims[2],dims[1],3,uchar); cimg_load_pandore_case(20,5,dims[3],dims[2],dims[1],3,long); cimg_load_pandore_case(21,5,dims[3],dims[2],dims[1],3,float); cimg_load_pandore_case(22,2,dims[1],1,1,dims[0],uchar); cimg_load_pandore_case(23,2,dims[1],1,1,dims[0],long); cimg_load_pandore_case(24,2,dims[1],1,1,dims[0],ulong); cimg_load_pandore_case(25,2,dims[1],1,1,dims[0],float); cimg_load_pandore_case(26,3,dims[2],dims[1],1,dims[0],uchar); cimg_load_pandore_case(27,3,dims[2],dims[1],1,dims[0],long); cimg_load_pandore_case(28,3,dims[2],dims[1],1,dims[0],ulong); cimg_load_pandore_case(29,3,dims[2],dims[1],1,dims[0],float); cimg_load_pandore_case(30,4,dims[3],dims[2],dims[1],dims[0],uchar); cimg_load_pandore_case(31,4,dims[3],dims[2],dims[1],dims[0],long); cimg_load_pandore_case(32,4,dims[3],dims[2],dims[1],dims[0],ulong); cimg_load_pandore_case(33,4,dims[3],dims[2],dims[1],dims[0],float); case 34: // Points 1D cimg::fread(ptbuf,1,nfile); if (endian) cimg::endian_swap(ptbuf,1); dest.assign(1); dest[0]=(T)ptbuf[0]; break; case 35: // Points 2D cimg::fread(ptbuf,2,nfile); if (endian) cimg::endian_swap(ptbuf,2); dest.assign(2); dest[0]=(T)ptbuf[1]; dest[1]=(T)ptbuf[0]; break; case 36: // Points 3D cimg::fread(ptbuf,3,nfile); if (endian) cimg::endian_swap(ptbuf,3); dest.assign(3); dest[0]=(T)ptbuf[2]; dest[1]=(T)ptbuf[1]; dest[2]=(T)ptbuf[0]; break; default: if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::get_load_pandore() : File '%s', cannot read images with ID_type=%u", pixel_type(),filename?filename:"(FILE*)",imageid); } if (!file) cimg::fclose(nfile); return dest; } //! Load an image from a PANDORE-5 file. static CImg get_load_pandore(const char *const filename) { return get_load_pandore(0,filename); } //! In-place version of get_load_pandore() CImg& load_pandore(std::FILE *const file, const char *const filename) { return get_load_pandore(file,filename).swap(*this); } //! In-place version of get_load_pandore() CImg& load_pandore(const char *const filename) { return get_load_pandore(filename).swap(*this); } //! Load an image from an ANALYZE7.5 file static CImg get_load_analyze(const char *const filename, float *const voxsize=0) { // Open header and data files std::FILE *file_header=0, *file=0; char body[1024]; const char *ext = cimg::filename_split(filename,body); if (!cimg::strncasecmp(ext,"hdr",3) || !cimg::strncasecmp(ext,"img",3)) { std::sprintf(body+cimg::strlen(body),".hdr"); file_header = cimg::fopen(body,"rb"); if (!file_header) return CImg(); std::sprintf(body+cimg::strlen(body)-3,"img"); file = cimg::fopen(body,"rb"); if (!file) { cimg::fclose(file_header); return CImg(); } } else throw CImgIOException("CImg<%s>::get_load_analyze() : Filename '%s', not recognized as an Analyze 7.5 file.", pixel_type(),filename); // Read header bool endian = false; unsigned int header_size; cimg::fread(&header_size,1,file_header); if (header_size>=4096) { endian = true; cimg::endian_swap(header_size); } unsigned char *header = new unsigned char[header_size]; cimg::fread(header+4,header_size-4,file_header); cimg::fclose(file_header); if (endian) { cimg::endian_swap((short*)(header+40),5); cimg::endian_swap((short*)(header+70),1); cimg::endian_swap((short*)(header+72),1); cimg::endian_swap((float*)(header+76),4); cimg::endian_swap((float*)(header+112),1); } unsigned short *dim = (unsigned short*)(header+40), dimx=1, dimy=1, dimz=1, dimv=1; cimg::warn(!dim[0],"CImg<%s>::get_load_analyze() : Specified image has zero dimensions.",pixel_type()); cimg::warn(dim[0]>4,"CImg<%s>::get_load_analyze() : Number of image dimension is %d, reading only the 4 first dimensions", pixel_type(),dim[0]); if (dim[0]>=1) dimx = dim[1]; if (dim[0]>=2) dimy = dim[2]; if (dim[0]>=3) dimz = dim[3]; if (dim[0]>=4) dimv = dim[4]; float scalefactor = *(float*)(header+112); if (scalefactor==0) scalefactor=1; const unsigned short datatype = *(short*)(header+70); if (voxsize) { const float *vsize = (float*)(header+76); voxsize[0] = vsize[1]; voxsize[1] = vsize[2]; voxsize[2] = vsize[3]; } delete[] header; // Read pixel data CImg dest(dimx,dimy,dimz,dimv); switch (datatype) { case 2: { unsigned char *buffer = new unsigned char[dimx*dimy*dimz*dimv]; cimg::fread(buffer,dimx*dimy*dimz*dimv,file); cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor); delete[] buffer; } break; case 4: { short *buffer = new short[dimx*dimy*dimz*dimv]; cimg::fread(buffer,dimx*dimy*dimz*dimv,file); if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv); cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor); delete[] buffer; } break; case 8: { int *buffer = new int[dimx*dimy*dimz*dimv]; cimg::fread(buffer,dimx*dimy*dimz*dimv,file); if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv); cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor); delete[] buffer; } break; case 16: { float *buffer = new float[dimx*dimy*dimz*dimv]; cimg::fread(buffer,dimx*dimy*dimz*dimv,file); if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv); cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor); delete[] buffer; } break; case 64: { double *buffer = new double[dimx*dimy*dimz*dimv]; cimg::fread(buffer,dimx*dimy*dimz*dimv,file); if (endian) cimg::endian_swap(buffer,dimx*dimy*dimz*dimv); cimg_foroff(dest,off) dest.data[off] = (T)(buffer[off]*scalefactor); delete[] buffer; } break; default: cimg::fclose(file); throw CImgIOException("CImg<%s>::get_load_analyze() : File '%s, cannot read images width 'datatype = %d'", pixel_type(),filename,datatype); } cimg::fclose(file); return dest; } //! In-place version of get_load_analyze() CImg& load_analyze(const char *const filename, float *const voxsize = 0) { return get_load_analyze(filename,voxsize).swap(*this); } //! Load PAR-REC (Philips) image file static CImg get_load_parrec(const char *const filename, const char axe='v', const char align='p') { return CImgList::get_load_parrec(filename).get_append(axe,align); } //! In-place version of get_load_parrec() CImg& load_parrec(const char *const filename, const char axis='v', const char align='p') { return get_load_parrec(filename,axis,align).swap(*this); } //! Load an image from a CImg RAW file static CImg get_load_cimg(std::FILE *const file, const char *const filename=0, const char axis='v', const char align='p') { return CImgList::get_load_cimg(file,filename).get_append(axis,align); } //! Load an image from a CImg RAW file static CImg get_load_cimg(const char *const filename, const char axis='v', const char align='p') { return get_load_cimg(0,filename,axis,align); } //! In-place version of get_load_cimg() CImg& load_cimg(std::FILE *const file, const char *const filename=0, const char axis='v', const char align='p') { return get_load_cimg(file,filename,axis,align).swap(*this); } //! In-place version of get_load_cimg() CImg& load_cimg(const char *const filename, const char axis='v', const char align='p') { return get_load_cimg(filename,axis,align).swap(*this); } //! Function that loads the image for other file formats that are not natively handled by CImg. //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). static CImg get_load_imagemagick(const char *const filename) { static bool first_time = true; char command[1024], filetmp[512]; if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; } std::FILE *file = 0; do { std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000); if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file); } while (file); std::sprintf(command,"%s \"%s\" %s",cimg::imagemagick_path(),filename,filetmp); cimg::system(command,cimg::imagemagick_path()); if (!(file = std::fopen(filetmp,"rb"))) { cimg::fclose(cimg::fopen(filename,"r")); throw CImgIOException("CImg<%s>::get_load_imagemagick() : Failed to open image '%s'.\n\n" "Path of 'ImageMagick's convert' : \"%s\"\n" "Path of temporary filename : \"%s\"", pixel_type(),filename,cimg::imagemagick_path(),filetmp); } else cimg::fclose(file); const CImg dest = CImg::get_load_pnm(filetmp); std::remove(filetmp); return dest; } //! In-place version of get_load_imagemagick() CImg& load_imagemagick(const char *const filename) { return get_load_imagemagick(filename).swap(*this); } //! Function that loads the image for other file formats that are not natively handled by CImg. //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). static CImg get_load_graphicsmagick(const char *const filename) { static bool first_time = true; char command[1024], filetmp[512]; if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; } std::FILE *file = 0; do { std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000); if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file); } while (file); std::sprintf(command,"%s convert \"%s\" %s",cimg::graphicsmagick_path(),filename,filetmp); cimg::system(command,cimg::graphicsmagick_path()); if (!(file = std::fopen(filetmp,"rb"))) { cimg::fclose(cimg::fopen(filename,"r")); throw CImgIOException("CImg<%s>::get_load_graphicsmagick() : Failed to open image '%s'.\n\n" "Path of 'GraphicsMagick's gm' : \"%s\"\n" "Path of temporary filename : \"%s\"", pixel_type(),filename,cimg::graphicsmagick_path(),filetmp); } else cimg::fclose(file); const CImg dest = CImg::get_load_pnm(filetmp); std::remove(filetmp); return dest; } //! In-place version of get_load_graphicsmagick() CImg& load_graphicsmagick(const char *const filename) { return get_load_graphicsmagick(filename).swap(*this); } //! Function that loads the image for other file formats that are not natively handled by CImg. //! This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). static CImg get_load_other(const char *const filename) { CImg res; const unsigned int odebug = cimg::exception_mode(); cimg::exception_mode() = 0; try { res.load_magick(filename); } catch (CImgException&) { try { res.load_imagemagick(filename); } catch (CImgException&) { try { res.load_graphicsmagick(filename); } catch (CImgException&) { res.assign(); } } } cimg::exception_mode()=odebug; if (res.is_empty()) throw CImgIOException("CImg<%s>::get_load_other() : Failed to open image '%s'.\n" "Check you have either the ImageMagick or GraphicsMagick package installed.", pixel_type(),filename); return res; } //! In-place version of get_load_graphicsmagick() CImg& load_other(const char *const filename) { return get_load_other(filename).swap(*this); } //! Load an image from a Dicom file (need '(X)Medcon' : http://xmedcon.sourceforge.net ) static CImg get_load_dicom(const char *const filename) { static bool first_time = true; char command[1024], filetmp[512], body[512]; if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; } cimg::fclose(cimg::fopen(filename,"r")); std::FILE *file; do { std::sprintf(filetmp,"CImg%.4d.hdr",std::rand()%10000); if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file); } while (file); std::sprintf(command,"%s -w -c anlz -o %s -f %s",cimg::medcon_path(),filetmp,filename); cimg::system(command); cimg::filename_split(filetmp,body); std::sprintf(command,"m000-%s.hdr",body); file = std::fopen(command,"rb"); if (!file) { throw CImgIOException("CImg<%s>::get_load_dicom() : Failed to open image '%s'.\n\n" "Path of 'medcon' : \"%s\"\n" "Path of temporary filename : \"%s\"", pixel_type(),filename,cimg::medcon_path,filetmp); } else cimg::fclose(file); const CImg dest = CImg::get_load_analyze(command); std::remove(command); std::sprintf(command,"m000-%s.img",body); std::remove(command); return dest; } //! In-place version of get_load_dicom() CImg& load_dicom(const char *const filename) { return get_load_dicom(filename).swap(*this); } //! Load OFF files (GeomView 3D object files) template static CImg get_load_off(const char *const filename, CImgList& primitives, CImgList& colors, const bool invert_faces=false) { std::FILE *file=cimg::fopen(filename,"r"); unsigned int nb_points=0, nb_triangles=0; int err; if ((err = std::fscanf(file,"OFF%u%u%*[^\n]",&nb_points,&nb_triangles))!=2) { cimg::fclose(file); throw CImgIOException("CImg<%s>::get_load_off() : File '%s' is not a valid OFF file.",pixel_type(),filename); } // Read points data CImg points(nb_points,3); float X=0,Y=0,Z=0; cimg_forX(points,l) { if ((err = std::fscanf(file,"%f%f%f%*[^\n]",&X,&Y,&Z))!=3) { cimg::fclose(file); throw CImgIOException("CImg<%s>::get_load_off() : File '%s', cannot read point %u.\n",pixel_type(),filename,l); } points(l,0) = (T)X; points(l,1) = (T)Y; points(l,2) = (T)Z; } // Read primitive data primitives.assign(); colors.assign(); bool stopflag = false; while (!stopflag) { unsigned int prim=0, i0=0, i1=0, i2=0, i3=0; char s_colors[256] = {'\0'}; if ((err = std::fscanf(file,"%u",&prim))!=1) stopflag=true; else switch (prim) { case 3: { if ((err = std::fscanf(file,"%u%u%u%255[^\n]",&i0,&i1,&i2,s_colors))<3) stopflag = true; else { float c0=0.5, c1=0.5, c2=0.5; std::sscanf(s_colors,"%f%f%f",&c0,&c1,&c2); if (invert_faces) primitives.insert(CImg::vector(i0,i1,i2)); else primitives.insert(CImg::vector(i0,i2,i1)); colors.insert(CImg::vector((tc)(c0*255),(tc)(c1*255),(tc)(c2*255))); } } break; case 4: { if ((err = std::fscanf(file,"%u%u%u%u%255[^\n]",&i0,&i1,&i2,&i3,s_colors))<4) stopflag = true; else { float c0=0.5, c1=0.5, c2=0.5; std::sscanf(s_colors,"%f%f%f",&c0,&c1,&c2); if (invert_faces) primitives.insert(CImg::vector(i0,i1,i2,i3)); else primitives.insert(CImg::vector(i0,i3,i2,i1)); colors.insert(CImg::vector((tc)(c0*255),(tc)(c1*255),(tc)(c2*255),(tc)(c2*255))); } } break; default: stopflag = true; } } cimg::fclose(file); cimg::warn(primitives.size!=nb_triangles, "CImg<%s>::get_load_off() : File '%s' contained %u triangles instead of %u as claimed in the header.", pixel_type(),filename,primitives.size,nb_triangles); return points; } //! In-place version of get_load_off() template CImg& load_off(const char *const filename, CImgList& primitives, CImgList& colors, const bool invert_faces=false) { return get_load_off(filename,primitives,colors,invert_faces).swap(*this); } //! Save the image as a file. /** The used file format is defined by the file extension in the filename \p filename.\n Parameter \p number can be used to add a 6-digit number to the filename before saving.\n If \p normalize is true, a normalized version of the image (between [0,255]) is saved. **/ const CImg& save(const char *const filename, const int number=-1) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename); if (!filename) throw CImgArgumentException("CImg<%s>::save() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).", pixel_type(),width,height,depth,dim,data); const char *ext = cimg::filename_split(filename); char nfilename[1024]; const char *const fn = (number>=0)?cimg::filename_number(filename,number,6,nfilename):filename; if (!cimg::strncasecmp(ext,"asc",3)) return save_ascii(fn); if (!cimg::strncasecmp(ext,"dlm",3) || !cimg::strncasecmp(ext,"txt",3)) return save_dlm(fn); if (!cimg::strncasecmp(ext,"inr",3)) return save_inr(fn); if (!cimg::strncasecmp(ext,"hdr",3)) return save_analyze(fn); if (!cimg::strncasecmp(ext,"dcm",3)) return save_dicom(fn); if (!cimg::strncasecmp(ext,"pan",3)) return save_pandore(fn); if (!cimg::strncasecmp(ext,"bmp",3)) return save_bmp(fn); if (!cimg::strncasecmp(ext,"png",3)) return save_png(fn); if (!cimg::strncasecmp(ext,"tif",3)) return save_tiff(fn); if (!cimg::strncasecmp(ext,"jpg",3) || !cimg::strncasecmp(ext,"jpeg",4)) return save_jpeg(fn); if (!cimg::strncasecmp(ext,"rgba",4)) return save_rgba(fn); if (!cimg::strncasecmp(ext,"rgb",3)) return save_rgb(fn); if (!cimg::strncasecmp(ext,"raw",3)) return save_raw(fn); if (!cimg::strncasecmp(ext,"cimg",4) || ext[0]=='\0') return save_cimg(fn); if (!cimg::strncasecmp(ext,"pgm",3) || !cimg::strncasecmp(ext,"ppm",3) || !cimg::strncasecmp(ext,"pnm",3)) return save_pnm(fn); if (!cimg::strncasecmp(ext,"yuv",3)) return save_yuv(fn,true); return save_other(fn); } //! Save the image as an ASCII file (ASCII Raw + simple header). const CImg& save_ascii(std::FILE *const file, const char *const filename=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_ascii() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_ascii() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); std::FILE *const nfile = file?file:cimg::fopen(filename,"w"); std::fprintf(nfile,"%u %u %u %u\n",width,height,depth,dim); const T* ptrs = data; cimg_forYZV(*this,y,z,v) { cimg_forX(*this,x) std::fprintf(nfile,"%g ",(double)*(ptrs++)); std::fputc('\n',nfile); } if (!file) cimg::fclose(nfile); return *this; } //! Save the image as an ASCII file (ASCII Raw + simple header). const CImg& save_ascii(const char *const filename) const { return save_ascii(0,filename); } //! Save the image as a DLM file. const CImg& save_dlm(std::FILE *const file, const char *const filename=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); cimg::warn(depth>1, "CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is volumetric. Pixel values along Z will be unrolled (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); cimg::warn(dim>1, "CImg<%s>::save_dlm() : Instance image (%u,%u,%u,%u,%p) is multispectral. Pixel values along V will be unrolled (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); std::FILE *const nfile = file?file:cimg::fopen(filename,"w"); const T* ptrs = data; cimg_forYZV(*this,y,z,v) { cimg_forX(*this,x) std::fprintf(nfile,"%g%s",(double)*(ptrs++),(x==(int)width-1)?"":","); std::fputc('\n',nfile); } if (!file) cimg::fclose(nfile); return *this; } //! Save the image as a DLM file. const CImg& save_dlm(const char *const filename) const { return save_dlm(0,filename); } //! Save the image as a PNM file. const CImg& save_pnm(std::FILE *const file, const char *const filename=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); const CImgStats st(*this,false); cimg::warn(depth>1, "CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); cimg::warn(dim>3, "CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) is multispectral. Only the three first channels will be saved (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); const double stmin = st.min, stmax = st.max; cimg::warn(stmin<0 || stmax>65535,"CImg<%s>::save_pnm() : Instance image (%u,%u,%u,%u,%p) has pixel values in [%g,%g]. Probable type overflow (file '%s').",pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); const T *ptrR = ptr(0,0,0,0), *ptrG = (dim>=2)?ptr(0,0,0,1):ptrR, *ptrB = (dim>=3)?ptr(0,0,0,2):ptrR; const unsigned int buf_size = width*height*(dim==1?1:3); std::fprintf(nfile,"P%c\n# CREATOR: CImg : Original size=%ux%ux%ux%u\n%u %u\n%u\n", (dim==1?'5':'6'),width,height,depth,dim,width,height,(st.max)<256?255:65535); switch(dim) { case 1: { if ((st.max)<256) { // Binary PGM 8 bits unsigned char *ptrd = new unsigned char[buf_size], *xptrd = ptrd; cimg_forXY(*this,x,y) *(xptrd++) = (unsigned char)*(ptrR++); cimg::fwrite(ptrd,buf_size,nfile); delete[] ptrd; } else { // Binary PGM 16 bits unsigned short *ptrd = new unsigned short[buf_size], *xptrd = ptrd; cimg_forXY(*this,x,y) *(xptrd++) = (unsigned short)*(ptrR++); if (!cimg::endian()) cimg::endian_swap(ptrd,buf_size); cimg::fwrite(ptrd,buf_size,nfile); delete[] ptrd; } } break; default: { if ((st.max)<256) { // Binary PPM 8 bits unsigned char *ptrd = new unsigned char[buf_size], *xptrd = ptrd; cimg_forXY(*this,x,y) { *(xptrd++) = (unsigned char)*(ptrR++); *(xptrd++) = (unsigned char)*(ptrG++); *(xptrd++) = (unsigned char)*(ptrB++); } cimg::fwrite(ptrd,buf_size,nfile); delete[] ptrd; } else { // Binary PPM 16 bits unsigned short *ptrd = new unsigned short[buf_size], *xptrd = ptrd; cimg_forXY(*this,x,y) { *(xptrd++) = (unsigned short)*(ptrR++); *(xptrd++) = (unsigned short)*(ptrG++); *(xptrd++) = (unsigned short)*(ptrB++); } if (!cimg::endian()) cimg::endian_swap(ptrd,buf_size); cimg::fwrite(ptrd,buf_size,nfile); delete[] ptrd; } } break; } if (!file) cimg::fclose(nfile); return *this; } //! Save the image as a PNM file. const CImg& save_pnm(const char *const filename) const { return save_pnm(0,filename); } //! Save an image as a Dicom file (need '(X)Medcon' : http://xmedcon.sourceforge.net ) const CImg& save_dicom(const char *const filename) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_dicom() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename); if (!filename) throw CImgArgumentException("CImg<%s>::save_dicom() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).", pixel_type(),width,height,depth,dim,data); static bool first_time = true; char command[1024], filetmp[512], body[512]; if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; } std::FILE *file; do { std::sprintf(filetmp,"CImg%.4d.hdr",std::rand()%10000); if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file); } while (file); save_analyze(filetmp); std::sprintf(command,"%s -w -c dicom -o %s -f %s",cimg::medcon_path(),filename,filetmp); cimg::system(command); std::remove(filetmp); cimg::filename_split(filetmp,body); std::sprintf(filetmp,"%s.img",body); std::remove(filetmp); std::sprintf(command,"m000-%s",filename); file = std::fopen(command,"rb"); if (!file) { cimg::fclose(cimg::fopen(filename,"r")); throw CImgIOException("CImg<%s>::save_dicom() : Failed to save image '%s'.\n\n" "Path of 'medcon' : \"%s\"\n" "Path of temporary filename : \"%s\"", pixel_type(),filename,cimg::medcon_path(),filetmp); } else cimg::fclose(file); std::rename(command,filename); return *this; } //! Save the image as an ANALYZE7.5 file. const CImg& save_analyze(const char *const filename, const float *const voxsize=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_analyze() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename); if (!filename) throw CImgArgumentException("CImg<%s>::save_analyze() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).", pixel_type(),width,height,depth,dim,data); std::FILE *file; char header[348],hname[1024],iname[1024]; const char *ext = cimg::filename_split(filename); short datatype=-1; std::memset(header,0,348); if (!ext[0]) { std::sprintf(hname,"%s.hdr",filename); std::sprintf(iname,"%s.img",filename); } if (!cimg::strncasecmp(ext,"hdr",3)) { std::strcpy(hname,filename); std::strcpy(iname,filename); std::sprintf(iname+cimg::strlen(iname)-3,"img"); } if (!cimg::strncasecmp(ext,"img",3)) { std::strcpy(hname,filename); std::strcpy(iname,filename); std::sprintf(hname+cimg::strlen(iname)-3,"hdr"); } ((int*)(header))[0] = 348; std::sprintf(header+4,"CImg"); std::sprintf(header+14," "); ((short*)(header+36))[0] = 4096; ((char*)(header+38))[0] = 114; ((short*)(header+40))[0] = 4; ((short*)(header+40))[1] = width; ((short*)(header+40))[2] = height; ((short*)(header+40))[3] = depth; ((short*)(header+40))[4] = dim; if (!cimg::strcasecmp(pixel_type(),"bool")) datatype = 2; if (!cimg::strcasecmp(pixel_type(),"unsigned char")) datatype = 2; if (!cimg::strcasecmp(pixel_type(),"char")) datatype = 2; if (!cimg::strcasecmp(pixel_type(),"unsigned short")) datatype = 4; if (!cimg::strcasecmp(pixel_type(),"short")) datatype = 4; if (!cimg::strcasecmp(pixel_type(),"unsigned int")) datatype = 8; if (!cimg::strcasecmp(pixel_type(),"int")) datatype = 8; if (!cimg::strcasecmp(pixel_type(),"unsigned long")) datatype = 8; if (!cimg::strcasecmp(pixel_type(),"long")) datatype = 8; if (!cimg::strcasecmp(pixel_type(),"float")) datatype = 16; if (!cimg::strcasecmp(pixel_type(),"double")) datatype = 64; if (datatype<0) throw CImgIOException("CImg<%s>::save_analyze() : Cannot save image '%s' since pixel type (%s)" "is not handled in Analyze7.5 specifications.\n", pixel_type(),filename,pixel_type()); ((short*)(header+70))[0] = datatype; ((short*)(header+72))[0] = sizeof(T); ((float*)(header+112))[0] = 1; ((float*)(header+76))[0] = 0; if (voxsize) { ((float*)(header+76))[1] = voxsize[0]; ((float*)(header+76))[2] = voxsize[1]; ((float*)(header+76))[3] = voxsize[2]; } else ((float*)(header+76))[1] = ((float*)(header+76))[2] = ((float*)(header+76))[3] = 1; file = cimg::fopen(hname,"wb"); cimg::fwrite(header,348,file); cimg::fclose(file); file = cimg::fopen(iname,"wb"); cimg::fwrite(data,size(),file); cimg::fclose(file); return *this; } //! Save the image as a CImg file (Binary RAW + simple header) const CImg& save_cimg(std::FILE *const file, const char *const filename=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_cimg() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_cimg() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); CImgList tmp(1); tmp[0].width = width; tmp[0].height = height; tmp[0].depth = depth; tmp[0].dim = dim; tmp[0].data = data; tmp.save_cimg(file,filename); tmp[0].width = tmp[0].height = tmp[0].depth = tmp[0].dim = 0; tmp[0].data = 0; return *this; } //! Save the image as a CImg file (Binary RAW + simple header) const CImg& save_cimg(const char *const filename) const { return save_cimg(0,filename); } //! Save the image as a RAW file const CImg& save_raw(std::FILE *const file, const char *const filename=0, const bool multiplexed=false) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_raw() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_raw() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); if (!multiplexed) cimg::fwrite(data,size(),nfile); else { CImg buf(dim); cimg_forXYZ(*this,x,y,z) { cimg_forV(*this,k) buf[k] = (*this)(x,y,z,k); cimg::fwrite(buf.data,dim,nfile); } } if (!file) cimg::fclose(nfile); return *this; } //! Save the image as a RAW file const CImg& save_raw(const char *const filename=0, const bool multiplexed=false) const { return save_raw(0,filename,multiplexed); } //! Save the image using ImageMagick's convert. /** Function that saves the image for other file formats that are not natively handled by CImg, using the tool 'convert' from the ImageMagick package.\n This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). You need to install the ImageMagick package in order to get this function working properly (see http://www.imagemagick.org ). **/ const CImg& save_imagemagick(const char *const filename, const unsigned int quality=100) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_imagemagick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s')", pixel_type(),width,height,depth,dim,data,filename); if (!filename) throw CImgArgumentException("CImg<%s>::save_imagemagick() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).", pixel_type(),width,height,depth,dim,data); static bool first_time = true; char command[512],filetmp[512]; if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; } std::FILE *file; do { if (dim==1) std::sprintf(filetmp,"%s%sCImg%.4d.pgm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000); else std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000); if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file); } while (file); save_pnm(filetmp); std::sprintf(command,"%s -quality %u%% %s \"%s\"",cimg::imagemagick_path(),quality,filetmp,filename); cimg::system(command); file = std::fopen(filename,"rb"); if (!file) throw CImgIOException("CImg<%s>::save_imagemagick() : Failed to save image '%s'.\n\n" "Path of 'convert' : \"%s\"\n" "Path of temporary filename : \"%s\"\n", pixel_type(),filename,cimg::imagemagick_path(),filetmp); if (file) cimg::fclose(file); std::remove(filetmp); return *this; } //! Save the image using GraphicsMagick's gm. /** Function that saves the image for other file formats that are not natively handled by CImg, using the tool 'gm' from the GraphicsMagick package.\n This is the case for all compressed image formats (GIF,PNG,JPG,TIF,...). You need to install the GraphicsMagick package in order to get this function working properly (see http://www.graphicsmagick.org ). **/ const CImg& save_graphicsmagick(const char *const filename, const unsigned int quality=100) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_graphicsmagick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s')", pixel_type(),width,height,depth,dim,data,filename); if (!filename) throw CImgArgumentException("CImg<%s>::save_graphicsmagick() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).", pixel_type(),width,height,depth,dim,data); static bool first_time = true; char command[512],filetmp[512]; if (first_time) { std::srand((unsigned int)::time(0)); first_time = false; } std::FILE *file; do { if (dim==1) std::sprintf(filetmp,"%s%sCImg%.4d.pgm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000); else std::sprintf(filetmp,"%s%sCImg%.4d.ppm",cimg::temporary_path(),cimg_OS==2?"\\":"/",std::rand()%10000); if ((file=std::fopen(filetmp,"rb"))!=0) std::fclose(file); } while (file); save_pnm(filetmp); std::sprintf(command,"%s -quality %u%% %s \"%s\"",cimg::graphicsmagick_path(),quality,filetmp,filename); cimg::system(command); file = std::fopen(filename,"rb"); if (!file) throw CImgIOException("CImg<%s>::save_graphicsmagick() : Failed to save image '%s'.\n\n" "Path of 'gm' : \"%s\"\n" "Path of temporary filename : \"%s\"\n", pixel_type(),filename,cimg::graphicsmagick_path(),filetmp); if (file) cimg::fclose(file); std::remove(filetmp); return *this; } const CImg& save_other(const char *const filename, const unsigned int quality=100) const { const unsigned int odebug = cimg::exception_mode(); bool is_saved = true; cimg::exception_mode() = 0; try { save_magick(filename); } catch (CImgException&) { try { save_imagemagick(filename,quality); } catch (CImgException&) { try { save_graphicsmagick(filename,quality); } catch (CImgException&) { is_saved = false; } } } cimg::exception_mode() = odebug; if (!is_saved) throw CImgIOException("CImg<%s>::save_other() : File '%s' cannot be saved.\n" "Check you have either the ImageMagick or GraphicsMagick package installed.", pixel_type(),filename); return *this; } //! Save the image as an INRIMAGE-4 file. const CImg& save_inr(std::FILE *const file, const char *const filename=0, const float *const voxsize=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_inr() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!filename) throw CImgArgumentException("CImg<%s>::save_inr() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); int inrpixsize=-1; const char *inrtype = "unsigned fixed\nPIXSIZE=8 bits\nSCALE=2**0"; if (!cimg::strcasecmp(pixel_type(),"unsigned char")) { inrtype = "unsigned fixed\nPIXSIZE=8 bits\nSCALE=2**0"; inrpixsize = 1; } if (!cimg::strcasecmp(pixel_type(),"char")) { inrtype = "fixed\nPIXSIZE=8 bits\nSCALE=2**0"; inrpixsize = 1; } if (!cimg::strcasecmp(pixel_type(),"unsigned short")) { inrtype = "unsigned fixed\nPIXSIZE=16 bits\nSCALE=2**0";inrpixsize = 2; } if (!cimg::strcasecmp(pixel_type(),"short")) { inrtype = "fixed\nPIXSIZE=16 bits\nSCALE=2**0"; inrpixsize = 2; } if (!cimg::strcasecmp(pixel_type(),"unsigned int")) { inrtype = "unsigned fixed\nPIXSIZE=32 bits\nSCALE=2**0";inrpixsize = 4; } if (!cimg::strcasecmp(pixel_type(),"int")) { inrtype = "fixed\nPIXSIZE=32 bits\nSCALE=2**0"; inrpixsize = 4; } if (!cimg::strcasecmp(pixel_type(),"float")) { inrtype = "float\nPIXSIZE=32 bits"; inrpixsize = 4; } if (!cimg::strcasecmp(pixel_type(),"double")) { inrtype = "float\nPIXSIZE=64 bits"; inrpixsize = 8; } if (inrpixsize<=0) throw CImgIOException("CImg<%s>::save_inr() : Don't know how to save images of '%s'",pixel_type(),pixel_type()); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); char header[257]; int err = std::sprintf(header,"#INRIMAGE-4#{\nXDIM=%u\nYDIM=%u\nZDIM=%u\nVDIM=%u\n",width,height,depth,dim); if (voxsize) err += std::sprintf(header+err,"VX=%g\nVY=%g\nVZ=%g\n",voxsize[0],voxsize[1],voxsize[2]); err += std::sprintf(header+err,"TYPE=%s\nCPU=%s\n",inrtype,cimg::endian()?"sun":"decm"); std::memset(header+err,'\n',252-err); std::memcpy(header+252,"##}\n",4); cimg::fwrite(header,256,nfile); cimg_forXYZ(*this,x,y,z) cimg_forV(*this,k) cimg::fwrite(&((*this)(x,y,z,k)),1,nfile); if (!file) cimg::fclose(nfile); return *this; } //! Save the image as an INRIMAGE-4 file. const CImg& save_inr(const char *const filename, const float *const voxsize=0) const { return save_inr(0,filename,voxsize); } #define cimg_save_pandore_case(sy,sz,sv,stype,id) \ if (!saved && (sy?(sy==height):true) && (sz?(sz==depth):true) && (sv?(sv==dim):true) && !strcmp(stype,pixel_type())) { \ unsigned int *iheader = (unsigned int*)(header+12); \ nbdims = _save_pandore_header_length((*iheader=id),dims,colorspace); \ cimg::fwrite(header,36,nfile); \ cimg::fwrite(dims,nbdims,nfile); \ if (id==2 || id==5 || id==8 || id==16 || id==19 || id==22 || id==26 || id==30) { \ unsigned char *buffer = new unsigned char[size()]; \ const T *ptrs = ptr(); \ cimg_foroff(*this,off) *(buffer++)=(unsigned char)(*(ptrs++)); \ buffer-=size(); \ cimg::fwrite(buffer,size(),nfile); \ delete[] buffer; \ } \ if (id==3 || id==6 || id==9 || id==17 || id==20 || id==23 || id==27 || id==31) { \ unsigned long *buffer = new unsigned long[size()]; \ const T *ptrs = ptr(); \ cimg_foroff(*this,off) *(buffer++)=(long)(*(ptrs++)); \ buffer-=size(); \ cimg::fwrite(buffer,size(),nfile); \ delete[] buffer; \ } \ if (id==4 || id==7 || id==10 || id==18 || id==21 || id==25 || id==29 || id==33) { \ float *buffer = new float[size()]; \ const T *ptrs = ptr(); \ cimg_foroff(*this,off) *(buffer++)=(float)(*(ptrs++)); \ buffer-=size(); \ cimg::fwrite(buffer,size(),nfile); \ delete[] buffer; \ } \ saved = true; \ } unsigned int _save_pandore_header_length(unsigned int id,unsigned int *dims,const unsigned int colorspace=0) const { unsigned int nbdims=0; if (id==2 || id==3 || id==4) { dims[0]=1; dims[1]=width; nbdims=2; } if (id==5 || id==6 || id==7) { dims[0]=1; dims[1]=height; dims[2]=width; nbdims=3; } if (id==8 || id==9 || id==10) { dims[0]=dim; dims[1]=depth; dims[2]=height; dims[3]=width; nbdims=4; } if (id==16 || id==17 || id==18) { dims[0]=3; dims[1]=height; dims[2]=width; dims[3]=colorspace; nbdims=4; } if (id==19 || id==20 || id==21) { dims[0]=3; dims[1]=depth; dims[2]=height; dims[3]=width; dims[4]=colorspace; nbdims=5; } if (id==22 || id==23 || id==25) { dims[0]=dim; dims[1]=width; nbdims=2; } if (id==26 || id==27 || id==29) { dims[0]=dim; dims[1]=height; dims[2]=width; nbdims=3; } if (id==30 || id==31 || id==33) { dims[0]=dim; dims[1]=depth; dims[2]=height; dims[3]=width; nbdims=4; } return nbdims; } //! Save the image as a PANDORE-5 file. const CImg& save_pandore(std::FILE *const file, const char *const filename=0, const unsigned int colorspace=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_pandore() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_pandore() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); unsigned char header[36] = { 'P','A','N','D','O','R','E','0','4',0,0,0, 0,0,0,0, 'C','I','m','g',0,0,0,0,0, 'N','o',' ','d','a','t','e',0,0,0, 0 }; unsigned int nbdims,dims[5]; bool saved=false; cimg_save_pandore_case(1,1,1,"unsigned char",2); cimg_save_pandore_case(1,1,1,"char",3); cimg_save_pandore_case(1,1,1,"short",3); cimg_save_pandore_case(1,1,1,"unsigned short",3); cimg_save_pandore_case(1,1,1,"unsigned int",3); cimg_save_pandore_case(1,1,1,"int",3); cimg_save_pandore_case(1,1,1,"unsigned long",4); cimg_save_pandore_case(1,1,1,"long",3); cimg_save_pandore_case(1,1,1,"float",4); cimg_save_pandore_case(1,1,1,"double",4); cimg_save_pandore_case(0,1,1,"unsigned char",5); cimg_save_pandore_case(0,1,1,"char",6); cimg_save_pandore_case(0,1,1,"short",6); cimg_save_pandore_case(0,1,1,"unsigned short",6); cimg_save_pandore_case(0,1,1,"unsigned int",6); cimg_save_pandore_case(0,1,1,"int",6); cimg_save_pandore_case(0,1,1,"unsigned long",7); cimg_save_pandore_case(0,1,1,"long",6); cimg_save_pandore_case(0,1,1,"float",7); cimg_save_pandore_case(0,1,1,"double",7); cimg_save_pandore_case(0,0,1,"unsigned char",8); cimg_save_pandore_case(0,0,1,"char",9); cimg_save_pandore_case(0,0,1,"short",9); cimg_save_pandore_case(0,0,1,"unsigned short",9); cimg_save_pandore_case(0,0,1,"unsigned int",9); cimg_save_pandore_case(0,0,1,"int",9); cimg_save_pandore_case(0,0,1,"unsigned long",10); cimg_save_pandore_case(0,0,1,"long",9); cimg_save_pandore_case(0,0,1,"float",10); cimg_save_pandore_case(0,0,1,"double",10); cimg_save_pandore_case(0,1,3,"unsigned char",16); cimg_save_pandore_case(0,1,3,"char",17); cimg_save_pandore_case(0,1,3,"short",17); cimg_save_pandore_case(0,1,3,"unsigned short",17); cimg_save_pandore_case(0,1,3,"unsigned int",17); cimg_save_pandore_case(0,1,3,"int",17); cimg_save_pandore_case(0,1,3,"unsigned long",18); cimg_save_pandore_case(0,1,3,"long",17); cimg_save_pandore_case(0,1,3,"float",18); cimg_save_pandore_case(0,1,3,"double",18); cimg_save_pandore_case(0,0,3,"unsigned char",19); cimg_save_pandore_case(0,0,3,"char",20); cimg_save_pandore_case(0,0,3,"short",20); cimg_save_pandore_case(0,0,3,"unsigned short",20); cimg_save_pandore_case(0,0,3,"unsigned int",20); cimg_save_pandore_case(0,0,3,"int",20); cimg_save_pandore_case(0,0,3,"unsigned long",21); cimg_save_pandore_case(0,0,3,"long",20); cimg_save_pandore_case(0,0,3,"float",21); cimg_save_pandore_case(0,0,3,"double",21); cimg_save_pandore_case(1,1,0,"unsigned char",22); cimg_save_pandore_case(1,1,0,"char",23); cimg_save_pandore_case(1,1,0,"short",23); cimg_save_pandore_case(1,1,0,"unsigned short",23); cimg_save_pandore_case(1,1,0,"unsigned int",23); cimg_save_pandore_case(1,1,0,"int",23); cimg_save_pandore_case(1,1,0,"unsigned long",25); cimg_save_pandore_case(1,1,0,"long",23); cimg_save_pandore_case(1,1,0,"float",25); cimg_save_pandore_case(1,1,0,"double",25); cimg_save_pandore_case(0,1,0,"unsigned char",26); cimg_save_pandore_case(0,1,0,"char",27); cimg_save_pandore_case(0,1,0,"short",27); cimg_save_pandore_case(0,1,0,"unsigned short",27); cimg_save_pandore_case(0,1,0,"unsigned int",27); cimg_save_pandore_case(0,1,0,"int",27); cimg_save_pandore_case(0,1,0,"unsigned long",29); cimg_save_pandore_case(0,1,0,"long",27); cimg_save_pandore_case(0,1,0,"float",29); cimg_save_pandore_case(0,1,0,"double",29); cimg_save_pandore_case(0,0,0,"unsigned char",30); cimg_save_pandore_case(0,0,0,"char",31); cimg_save_pandore_case(0,0,0,"short",31); cimg_save_pandore_case(0,0,0,"unsigned short",31); cimg_save_pandore_case(0,0,0,"unsigned int",31); cimg_save_pandore_case(0,0,0,"int",31); cimg_save_pandore_case(0,0,0,"unsigned long",33); cimg_save_pandore_case(0,0,0,"long",31); cimg_save_pandore_case(0,0,0,"float",33); cimg_save_pandore_case(0,0,0,"double",33); if (!file) cimg::fclose(nfile); return *this; } //! Save the image as a PANDORE-5 file. const CImg& save_pandore(const char *const filename=0, const unsigned int colorspace=0) const { return save_pandore(0,filename,colorspace); } //! Save the image as a YUV video sequence file const CImg& save_yuv(std::FILE *const file, const char *const filename=0, const bool rgb2yuv=true) const { CImgList(*this).save_yuv(file,filename,rgb2yuv); return *this; } //! Save the image as a YUV video sequence file const CImg& save_yuv(const char *const filename, const bool rgb2yuv=true) const { return save_yuv(0,filename,rgb2yuv); } //! Save the image as a BMP file const CImg& save_bmp(std::FILE *const file, const char *const filename=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); cimg::warn(depth>1, "CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); cimg::warn(dim>3, "CImg<%s>::save_bmp() : Instance image (%u,%u,%u,%u,%p) is multispectral. Only the three first channels will be saved (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); unsigned char header[54]={0}, align_buf[4]={0}; const unsigned int align = (4-(3*width)%4)%4, buf_size = (3*width+align)*dimy(), file_size = 54+buf_size; header[0] = 'B'; header[1] = 'M'; header[0x02]=file_size&0xFF; header[0x03]=(file_size>>8)&0xFF; header[0x04]=(file_size>>16)&0xFF; header[0x05]=(file_size>>24)&0xFF; header[0x0A]=0x36; header[0x0E]=0x28; header[0x12]=width&0xFF; header[0x13]=(width>>8)&0xFF; header[0x14]=(width>>16)&0xFF; header[0x15]=(width>>24)&0xFF; header[0x16]=height&0xFF; header[0x17]=(height>>8)&0xFF; header[0x18]=(height>>16)&0xFF; header[0x19]=(height>>24)&0xFF; header[0x1A]=1; header[0x1B]=0; header[0x1C]=24; header[0x1D]=0; header[0x22]=buf_size&0xFF; header[0x23]=(buf_size>>8)&0xFF; header[0x24]=(buf_size>>16)&0xFF; header[0x25]=(buf_size>>24)&0xFF; header[0x27]=0x1; header[0x2B]=0x1; cimg::fwrite(header,54,nfile); const T *pR = ptr(0,height-1,0,0), *pG = (dim>=2)?ptr(0,height-1,0,1):pR, *pB = (dim>=3)?ptr(0,height-1,0,2):pR; cimg_forY(*this,y) { cimg_forX(*this,x) { std::fputc((unsigned char)(*(pB++)),nfile); std::fputc((unsigned char)(*(pG++)),nfile); std::fputc((unsigned char)(*(pR++)),nfile); } cimg::fwrite(align_buf,align,nfile); pR-=2*width; pG-=2*width; pB-=2*width; } if (!file) cimg::fclose(nfile); return *this; } //! Save the image as a BMP file const CImg& save_bmp(const char *const filename) const { return save_bmp(0,filename); } //! Save an image to a PNG file. // Most of this function has been written by Eric Fausett /** \param filename = name of the png image file to save \return *this \note The png format specifies a variety of possible data formats. Grey scale, Grey scale with Alpha, RGB color, RGB color with Alpha, and Palletized color are supported. Per channel bit depths of 1, 2, 4, 8, and 16 are natively supported. The type of file saved depends on the number of channels in the CImg file. If there is 4 or more channels, the image will be saved as an RGB color with Alpha image using the bottom 4 channels. If there are 3 channels, the saved image will be an RGB color image. If 2 channels then the image saved will be Grey scale with Alpha, and if 1 channel will be saved as a Grey scale image. **/ const CImg& save_png(std::FILE *const file, const char *const filename=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!filename) throw CImgArgumentException("CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).", pixel_type(),width,height,depth,dim,data); cimg::warn(depth>1, "CImg<%s>::save_png() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); #ifndef cimg_use_png if (!file) return save_other(filename); else throw CImgIOException("CImg<%s>::save_png() : Cannot save a PNG image in a *FILE output. Use libpng instead.", pixel_type()); #else std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); // Setup PNG structures for write png_voidp user_error_ptr=0; png_error_ptr user_error_fn=0, user_warning_fn=0; png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, user_error_ptr, user_error_fn, user_warning_fn); if(!png_ptr){ if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::save_png() : File '%s', error when initializing 'png_ptr' data structure.", pixel_type(),filename?filename:"(unknown)"); } png_infop info_ptr = png_create_info_struct(png_ptr); if(!info_ptr){ png_destroy_write_struct(&png_ptr,(png_infopp)0); if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::save_png() : File '%s', error when initializing 'info_ptr' data structure.", pixel_type(),filename?filename:"(unknown)"); } if (setjmp(png_jmpbuf(png_ptr))){ png_destroy_write_struct(&png_ptr, &info_ptr); if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::save_png() : File '%s', unknown fatal error.", pixel_type(),filename?filename:"(unknown)"); } png_init_io(png_ptr, nfile); png_uint_32 width = dimx(); png_uint_32 height = dimy(); const CImgStats stats(*this,false); const float vmin = (float)stats.min, vmax = (float)stats.max; const int bit_depth = (vmin<0 || vmax>=256)?16:8; int color_type; switch (dimv()) { case 1: color_type = PNG_COLOR_TYPE_GRAY; break; case 2: color_type = PNG_COLOR_TYPE_GRAY_ALPHA; break; case 3: color_type = PNG_COLOR_TYPE_RGB; break; default: color_type = PNG_COLOR_TYPE_RGB_ALPHA; } const int interlace_type = PNG_INTERLACE_NONE; const int compression_type = PNG_COMPRESSION_TYPE_DEFAULT; const int filter_method = PNG_FILTER_TYPE_DEFAULT; png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, color_type, interlace_type, compression_type, filter_method); png_write_info(png_ptr, info_ptr); const int byte_depth = bit_depth>>3; const int numChan = dimv()>4?4:dimv(); const int pixel_bit_depth_flag = numChan * (bit_depth-1); // Allocate Memory for Image Save and Fill pixel data png_bytep *imgData = new png_byte*[height]; for(unsigned int row=0; row(imgData[y]); cimg_forX(*this,x) *(ptrs++) = (unsigned short)*(pC0++); } } break; case 30: { // Gray w/ Alpha 16-bit const T *pC1 = ptr(0,0,0,1); cimg_forY(*this,y){ unsigned short *ptrs = reinterpret_cast(imgData[y]); cimg_forX(*this,x) { *(ptrs++) = (unsigned short)*(pC0++); *(ptrs++) = (unsigned short)*(pC1++); } } } break; case 45: { // RGB 16-bit const T *pC1 = ptr(0,0,0,1); const T *pC2 = ptr(0,0,0,2); cimg_forY(*this,y) { unsigned short *ptrs = reinterpret_cast(imgData[y]); cimg_forX(*this,x) { *(ptrs++) = (unsigned short)*(pC0++); *(ptrs++) = (unsigned short)*(pC1++); *(ptrs++) = (unsigned short)*(pC2++); } } } break; case 60: { // RGB w/ Alpha 16-bit const T *pC1 = ptr(0,0,0,1); const T *pC2 = ptr(0,0,0,2); const T *pC3 = ptr(0,0,0,3); cimg_forY(*this,y) { unsigned short *ptrs = reinterpret_cast(imgData[y]); cimg_forX(*this,x) { *(ptrs++) = (unsigned short)*(pC0++); *(ptrs++) = (unsigned short)*(pC1++); *(ptrs++) = (unsigned short)*(pC2++); *(ptrs++) = (unsigned short)*(pC3++); } } } break; default: if (!file) cimg::fclose(nfile); throw CImgIOException("CImg<%s>::save_png() : File '%s', unknown fatal error.", pixel_type(),filename?filename:"(unknown)"); break; } png_write_image(png_ptr, imgData); png_write_end(png_ptr, info_ptr); png_destroy_write_struct(&png_ptr, &info_ptr); // Deallocate Image Write Memory for (unsigned int n=0; n::save_tiff() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename); if (!filename) throw CImgArgumentException("CImg<%s>::save_tiff() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).", pixel_type(),width,height,depth,dim,data); #ifdef cimg_use_tiff uint32 rowsperstrip = (uint32) -1; uint16 spp = dimv(), bpp = sizeof(T)*8; uint16 photometric; if (spp==3 || spp==4) photometric = PHOTOMETRIC_RGB; else photometric = PHOTOMETRIC_MINISBLACK; uint16 compression = COMPRESSION_NONE; TIFF *out; out = TIFFOpen(filename,"w"); if (out) { for (unsigned int dir=0; dirheight?height-row:rowsperstrip); tstrip_t strip = TIFFComputeStrip(out, row, 0); tsize_t i = 0; for (unsigned int rr=0; rr::get_save_tiff() : File '%s', an error occure while writing a strip.", pixel_type(),filename?filename:"(FILE*)"); } } _TIFFfree(buf); } TIFFWriteDirectory(out); } TIFFClose(out); } else throw CImgException("CImg<%s>::save_tiff() : File '%s', error while writing tiff file.", pixel_type(),filename); #else return save_other(filename); #endif return *this; } //! Save a file in JPEG format. const CImg& save_jpeg(std::FILE *const file, const char *const filename=0, const unsigned int quality=100) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p), specified filename is (null).", pixel_type(),width,height,depth,dim,data); cimg::warn(depth>1, "CImg<%s>::save_jpeg() : Instance image (%u,%u,%u,%u,%p) is volumetric. Only the first slice will be saved (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); #ifndef cimg_use_jpeg if (!file) return save_other(filename,quality); else throw CImgIOException("CImg<%s>::save_jpeg() : Cannot save a JPEG image in a *FILE output. Use libjpeg instead.", pixel_type()); #else // Fill pixel buffer unsigned char *buf; unsigned int dimbuf=0; J_COLOR_SPACE colortype=JCS_RGB; switch (dim) { case 1: { // Greyscale images unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=1)]; colortype = JCS_GRAYSCALE; const T *ptr_g = ptr(); cimg_forXY(*this,x,y) *(buf2++) = (unsigned char)*(ptr_g++); } break; case 2: case 3: { // RGB images unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=3)]; const T *ptr_r = ptr(0,0,0,0), *ptr_g = ptr(0,0,0,1), *ptr_b = ptr(0,0,0,dim>2?2:0); colortype = JCS_RGB; cimg_forXY(*this,x,y) { *(buf2++) = (unsigned char)*(ptr_r++); *(buf2++) = (unsigned char)*(ptr_g++); *(buf2++) = (unsigned char)*(ptr_b++); } } break; default: { // YCMYK images unsigned char *buf2 = buf = new unsigned char[width*height*(dimbuf=4)]; const T *ptr_r = ptr(0,0,0,0), *ptr_g = ptr(0,0,0,1), *ptr_b = ptr(0,0,0,2), *ptr_a = ptr(0,0,0,3); colortype = JCS_CMYK; cimg_forXY(*this,x,y) { *(buf2++) = (unsigned char)*(ptr_r++); *(buf2++) = (unsigned char)*(ptr_g++); *(buf2++) = (unsigned char)*(ptr_b++); *(buf2++) = (unsigned char)*(ptr_a++); } } break; } // Call libjpeg functions struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; cinfo.err = jpeg_std_error(&jerr); jpeg_create_compress(&cinfo); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); jpeg_stdio_dest(&cinfo,nfile); cinfo.image_width = width; cinfo.image_height = height; cinfo.input_components = dimbuf; cinfo.in_color_space = colortype; jpeg_set_defaults(&cinfo); jpeg_set_quality(&cinfo,quality<100?quality:100,TRUE); jpeg_start_compress(&cinfo,TRUE); const unsigned int row_stride = width*dimbuf; JSAMPROW row_pointer[1]; while (cinfo.next_scanline < cinfo.image_height) { row_pointer[0] = &buf[cinfo.next_scanline*row_stride]; jpeg_write_scanlines(&cinfo,row_pointer,1); } jpeg_finish_compress(&cinfo); delete[] buf; if (!file) cimg::fclose(nfile); jpeg_destroy_compress(&cinfo); return *this; #endif } //! Save a file in JPEG format. const CImg& save_jpeg(const char *const filename, const unsigned int quality=100) const { return save_jpeg(0,filename,quality); } //! Save the image using built-in ImageMagick++ library const CImg& save_magick(const char *const filename) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_magick() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data); if (!filename) throw CImgArgumentException("CImg<%s>::save_magick() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); #ifdef cimg_use_magick Magick::Image image(Magick::Geometry(width,height),"black"); image.type(Magick::TrueColorType); const T *rdata = ptr(0,0,0,0), *gdata = dim>1?ptr(0,0,0,1):rdata, *bdata = dim>2?ptr(0,0,0,2):gdata; cimg_forXY(*this,x,y) image.pixelColor(x,y,Magick::ColorRGB(*(rdata++)/255.0,*(gdata++)/255.0,*(bdata++)/255.0)); image.syncPixels(); image.write(filename); #else throw CImgIOException("CImg<%s>::save_magick() : File '%s', Magick++ library has not been linked.", pixel_type(),filename); #endif return *this; } //! Save the image as a RGBA file const CImg& save_rgba(std::FILE *const file, const char *const filename=0) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); cimg::warn(dim!=4, "CImg<%s>::save_rgba() : Instance image (%u,%u,%u,%u,%p) has not exactly 4 channels (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); const unsigned int wh = width*height; unsigned char *buffer = new unsigned char[4*wh], *nbuffer=buffer; const T *ptr1 = ptr(0,0,0,0), *ptr2 = dim>1?ptr(0,0,0,1):ptr1, *ptr3 = dim>2?ptr(0,0,0,2):ptr1, *ptr4 = dim>3?ptr(0,0,0,3):0; for (unsigned int k=0; k::save_rgb() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_rgb() : Instance image (%u,%u,%u,%u,%p), specified file is (null).", pixel_type(),width,height,depth,dim,data); cimg::warn(dim!=3, "CImg<%s>::save_rgb() : Instance image (%u,%u,%u,%u,%p) has not exactly 3 channels (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); const unsigned int wh = width*height; unsigned char *buffer = new unsigned char[3*wh], *nbuffer=buffer; const T *ptr1 = ptr(0,0,0,0), *ptr2 = dim>1?ptr(0,0,0,1):ptr1, *ptr3 = dim>2?ptr(0,0,0,2):ptr1; for (unsigned int k=0; k res(40,38,1,3); if (first_time) { const unsigned char *ptrs = cimg::logo40x38; T *ptr1 = res.ptr(0,0,0,0), *ptr2 = res.ptr(0,0,0,1), *ptr3 = res.ptr(0,0,0,2); for (unsigned int off = 0; off const CImg& save_off(std::FILE *const file, const char *const filename, const CImgList& primitives, const CImgList& colors, const bool invert_faces=false) const { if (is_empty()) throw CImgInstanceException("CImg<%s>::save_off() : Instance image (%u,%u,%u,%u,%p) is empty (file '%s').", pixel_type(),width,height,depth,dim,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_off() : Specified filename is (null).",pixel_type()); std::FILE *const nfile = file?file:cimg::fopen(filename,"w"); std::fprintf(nfile,"OFF\n%u %u %u\n",width,primitives.size,3*primitives.size); cimg_forX(*this,i) std::fprintf(nfile,"%f %f %f\n",(float)((*this)(i,0)),(float)((*this)(i,1)),(float)((*this)(i,2))); cimglist_for(primitives,l) { const unsigned int prim = primitives[l].size(); switch (prim) { case 3: { if (invert_faces) std::fprintf(nfile,"3 %u %u %u %f %f %f\n", (unsigned int)primitives(l,0),(unsigned int)primitives(l,1),(unsigned int)primitives(l,2), (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f)); else std::fprintf(nfile,"3 %u %u %u %f %f %f\n", (unsigned int)primitives(l,0),(unsigned int)primitives(l,2),(unsigned int)primitives(l,1), (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f)); } break; case 4: { if (invert_faces) std::fprintf(nfile,"4 %u %u %u %u %f %f %f\n", (unsigned int)primitives(l,0),(unsigned int)primitives(l,1),(unsigned int)primitives(l,2),(unsigned int)primitives(l,3), (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f)); else std::fprintf(nfile,"4 %u %u %u %u %f %f %f\n", (unsigned int)primitives(l,0),(unsigned int)primitives(l,3),(unsigned int)primitives(l,2),(unsigned int)primitives(l,1), (float)(colors(l,0)/255.0f),(float)(colors(l,1)/255.0f),(float)(colors(l,2)/255.0f)); } break; } } if (!file) cimg::fclose(nfile); return *this; } //! Save OFF files (GeomView 3D object files) template const CImg& save_off(const char *const filename, const CImgList& primitives, const CImgList& colors, const bool invert_faces=false) const { return save_off(filename,primitives,colors,invert_faces); } }; /* #----------------------------------------- # # # # Definition of the CImgList<> structure # # # #------------------------------------------ */ //! Class representing list of images CImg. template struct CImgList { //! Size of the list (number of elements inside) unsigned int size; //! Allocation size of the list unsigned int allocsize; //! Pointer to the first list element CImg *data; //! Define a CImgList::iterator typedef CImg* iterator; //! Define a CImgList::const_iterator typedef const CImg* const_iterator; //! Get value type typedef T value_type; //@} //--------------------------- // //! \name Plugins //@{ //--------------------------- #ifdef cimglist_plugin #include cimglist_plugin #endif //@} //------------------------------------------ // //! \name Constructors - Destructor - Copy //@{ //------------------------------------------ //! Default constructor CImgList(): size(0),allocsize(0),data(0) {} //! Destructor ~CImgList() { if (data) delete[] data; } //! In-place version of the default constructor and default destructor CImgList& assign() { if (data) delete[] data; size = allocsize = 0; data = 0; return *this; } //! Equivalent to assign() (STL-compliant name) CImgList& clear() { return assign(); } //! Copy constructor template CImgList(const CImgList& list): size(0),allocsize(0),data(0) { assign(list); } CImgList(const CImgList& list): size(0),allocsize(0),data(0) { assign(list); } //! Copy constructor that create a shared object template CImgList(const CImgList& list, const bool shared): size(0),allocsize(0),data(0) { assign(list,shared); } CImgList(const CImgList& list, const bool shared): size(0),allocsize(0),data(0) { assign(list,shared); } //! In-place version of the copy constructor template CImgList& assign(const CImgList& list, const bool shared=false) { assign(list.size); cimglist_for(*this,l) (*this)[l].assign(list[l],shared); return *this; } //! Construct an image list containing n empty images explicit CImgList(const unsigned int n): size(n) { data = new CImg[allocsize=cimg::nearest_pow2(n)]; } //! In-place version of the previous constructor CImgList& assign(const unsigned int n) { if (n) { if (allocsize(n<<2)) { if (data) delete[] data; data = new CImg[allocsize=cimg::nearest_pow2(n)]; } size = n; } else return assign(); return *this; } //! Construct an image list containing n images with specified size CImgList(const unsigned int n, const unsigned int width, const unsigned int height=1, const unsigned int depth=1, const unsigned int dim=1): size(0),allocsize(0),data(0) { assign(n,width,height,depth,dim); } //! In-place version of the previous constructor CImgList& assign(const unsigned int n, const unsigned int width, const unsigned int height=1, const unsigned int depth=1, const unsigned int dim=1) { const unsigned int siz = width*height*depth*dim; if (n && siz) { assign(n); cimglist_for(*this,l) data[l].assign(width,height,depth,dim); } else return assign(); return *this; } //! Construct an image list containing n images with specified size, filled with val CImgList(const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int dim, const T& val): size(0),allocsize(0),data(0) { assign(n,width,height,depth,dim,val); } //! In-place version of the previous constructor CImgList& assign(const unsigned int n,const unsigned int width,const unsigned int height, const unsigned int depth, const unsigned int dim,const T& val) { assign(n,width,height,depth,dim); cimglist_for(*this,l) data[l].fill(val); return *this; } //! Construct a list containing n copies of the image img template CImgList(const unsigned int n, const CImg& img, const bool shared=false): size(0),allocsize(0),data(0) { assign(n,img,shared); } //! In-place version of the previous constructor template CImgList& assign(const unsigned int n, const CImg& img, const bool shared=false) { assign(n); cimglist_for(*this,l) data[l].assign(img,shared); return *this; } //! Construct an image list from one image template explicit CImgList(const CImg& img, const bool shared=false): size(0),allocsize(0),data(0) { assign(img,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img, const bool shared=false) { return assign(1,img,shared); } //! Construct an image list from two images template CImgList(const CImg& img1, const CImg& img2, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const bool shared=false) { assign(2); data[0].assign(img1,shared); data[1].assign(img2,shared); return *this; } //! Construct an image list from three images template CImgList(const CImg& img1, const CImg& img2, const CImg& img3, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,img3,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const CImg& img3, const bool shared=false) { assign(3); data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); return *this; } //! Construct an image list from four images template CImgList(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,img3,img4,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const bool shared=false) { assign(4); data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared); return *this; } //! Construct an image list from five images template CImgList(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,img3,img4,img5,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const bool shared=false) { assign(5); data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared); data[4].assign(img5,shared); return *this; } //! Construct an image list from six images template CImgList(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,img3,img4,img5,img6,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const bool shared=false) { assign(6); data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared); data[4].assign(img5,shared); data[5].assign(img6,shared); return *this; } //! Construct an image list from seven images template CImgList(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const CImg& img7, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,img3,img4,img5,img6,img7,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const CImg& img7, const bool shared=false) { assign(7); data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared); data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); return *this; } //! Construct an image list from eight images template CImgList(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const CImg& img7, const CImg& img8, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,img3,img4,img5,img6,img7,img8,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const CImg& img7, const CImg& img8, const bool shared=false) { assign(8); data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared); data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared); return *this; } //! Construct an image list from nine images template CImgList(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const CImg& img7, const CImg& img8, const CImg& img9, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,img3,img4,img5,img6,img7,img8,img9,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const CImg& img7, const CImg& img8, const CImg& img9, const bool shared=false) { assign(9); data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared); data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared); data[8].assign(img9,shared); return *this; } //! Construct an image list from ten images template CImgList(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const CImg& img7, const CImg& img8, const CImg& img9, const CImg& img10, const bool shared=false): size(0),allocsize(0),data(0) { assign(img1,img2,img3,img4,img5,img6,img7,img8,img9,img10,shared); } //! In-place version of the previous constructor template CImgList& assign(const CImg& img1, const CImg& img2, const CImg& img3, const CImg& img4, const CImg& img5, const CImg& img6, const CImg& img7, const CImg& img8, const CImg& img9, const CImg& img10, const bool shared=false) { assign(10); data[0].assign(img1,shared); data[1].assign(img2,shared); data[2].assign(img3,shared); data[3].assign(img4,shared); data[4].assign(img5,shared); data[5].assign(img6,shared); data[6].assign(img7,shared); data[7].assign(img8,shared); data[8].assign(img9,shared); data[9].assign(img10,shared); return *this; } //! Construct an image list from a filename CImgList(const char *const filename): size(0),allocsize(0),data(0) { assign(filename); } //! In-place version of the previous constructor CImgList& assign(const char *const filename) { return load(filename); } //! Return a string describing the type of the image pixels in the list (template parameter \p T). static const char* pixel_type() { return cimg::type::id(); } //! Return \p true if list is empty bool is_empty() const { return (!data || !size); } //! Return \c true if the list contains an image with indice k bool contains(const int k) const { return data && k CImgList& operator=(const CImgList& list) { return assign(list); } CImgList& operator=(const CImgList& list) { return assign(list); } //! Assignement operator. template CImgList& operator=(const CImg& img) { cimglist_for(*this,l) data[l]=img; return *this; } //! Assignement operator. CImgList& operator=(const T& val) { cimglist_for(*this,l) data[l].fill(val); return *this; } //! Operator+ CImgList operator+() const { return CImgList(*this); } //! Operator+= #ifdef cimg_use_visualcpp6 CImgList& operator+=(const T& val) { #else template CImgList& operator+=(const t& val) { #endif cimglist_for(*this,l) (*this)[l]+=val; return *this; } //! Operator+= template CImgList& operator+=(const CImgList& list) { const unsigned int sizemax = min(size,list.size); for (unsigned int l=0; l res(size); cimglist_for(res,l) res[l].assign(-data[l]); return res; } //! Operator-=. #ifdef cimg_use_visualcpp6 CImgList& operator-=(const T& val) { #else template CImgList& operator-=(const t& val) { #endif cimglist_for(*this,l) (*this)[l]-=val; return *this; } //! Operator-=. template CImgList& operator-=(const CImgList& list) { const unsigned int sizemax = min(size,list.size); for (unsigned int l=0; l CImgList& operator*=(const t& val) { #endif cimglist_for(*this,l) (*this)[l]*=val; return *this; } //! Operator*=. template CImgList& operator*=(const CImgList& list) { const unsigned int N = cimg::min(size,list.size); for (unsigned int l=0; l CImgList& operator/=(const t& val) { #endif cimglist_for(*this,l) (*this)[l]/=val; return *this; } //! Operator/=. template CImgList& operator/=(const CImgList& list) { const unsigned int N = cimg::min(size,list.size); for (unsigned int l=0; l& operator[](const unsigned int pos) { #if cimg_debug>=3 if (pos>=size) { cimg::warn(true,"CImgList<%s>::operator[] : bad list position %u, in a list of %u images",pixel_type(),pos,size); return *data; } #endif return data[pos]; } const CImg& operator[](const unsigned int pos) const { #if cimg_debug>=3 if (pos>=size) { cimg::warn(true,"CImgList<%s>::operator[] : bad list position %u, in a list of %u images",pixel_type(),pos,size); return *data; } #endif return data[pos]; } //! Equivalent to CImgList::operator[] CImg& operator()(const unsigned int pos) { return (*this)[pos]; } const CImg& operator()(const unsigned int pos) const { return (*this)[pos]; } //! Return a reference to (x,y,z,v) pixel of the pos-th image of the list T& operator()(const unsigned int pos, const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) { return (*this)[pos](x,y,z,v); } const T& operator()(const unsigned int pos, const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0) const { return (*this)[pos](x,y,z,v); } //! Equivalent to CImgList::operator[], with boundary checking CImg& at(const unsigned int pos) { if (pos>=size) throw CImgArgumentException("CImgList<%s>::at() : bad list position %u, in a list of %u images", pixel_type(),pos,size); return data[pos]; } const CImg& at(const unsigned int pos) const { if (pos>=size) throw CImgArgumentException("CImgList<%s>::at() : bad list position %u, in a list of %u images", pixel_type(),pos,size); return data[pos]; } //! Returns a reference to last element CImg& back() { return (*this)(size-1); } const CImg& back() const { return (*this)(size-1); } //! Returns a reference to the first element CImg& front() { return *data; } const CImg& front() const { return *data; } //! Returns an iterator to the beginning of the vector. iterator begin() { return data; } const_iterator begin() const { return data; } //! Returns an iterator just past the last element. iterator end() { return data + size; } const_iterator end() const { return data + size; } //! Insert a copy of the image \p img into the current image list, at position \p pos. template CImgList& insert(const CImg& img, const unsigned int pos, const bool shared) { if (pos>size) throw CImgArgumentException("CImgList<%s>::insert() : Cannot insert at position %u into a list with %u elements", pixel_type(),pos,size); if (shared) throw CImgArgumentException("CImgList<%s>::insert(): Cannot insert a shared image CImg<%s> into a CImgList<%s>", pixel_type(),img.pixel_type(),pixel_type()); CImg *new_data = (++size>allocsize)?new CImg[allocsize?(allocsize<<=1):(allocsize=1)]:0; if (!size || !data) { data = new_data; *data = img; } else { if (new_data) { if (pos) std::memcpy(new_data,data,sizeof(CImg)*pos); if (pos!=size-1) std::memcpy(new_data+pos+1,data+pos,sizeof(CImg)*(size-1-pos)); std::memset(data,0,sizeof(CImg)*(size-1)); delete[] data; data = new_data; } else if (pos!=size-1) memmove(data+pos+1,data+pos,sizeof(CImg)*(size-1-pos)); data[pos].width = data[pos].height = data[pos].depth = data[pos].dim = 0; data[pos].data = 0; data[pos] = img; } return *this; } CImgList& insert(const CImg& img, const unsigned int pos, const bool shared) { if (pos>size) throw CImgArgumentException("CImgList<%s>::insert() : Can't insert at position %u into a list with %u elements", pixel_type(),pos,size); CImg *new_data = (++size>allocsize)?new CImg[allocsize?(allocsize<<=1):(allocsize=1)]:0; if (!size || !data) { data = new_data; if (shared && !img.is_empty()) { data->width = img.width; data->height = img.height; data->depth = img.depth; data->dim = img.dim; data->is_shared = true; data->data = img.data; } else *data = img; } else { if (new_data) { if (pos) std::memcpy(new_data,data,sizeof(CImg)*pos); if (pos!=size-1) std::memcpy(new_data+pos+1,data+pos,sizeof(CImg)*(size-1-pos)); std::memset(data,0,sizeof(CImg)*(size-1)); delete[] data; data = new_data; } else if (pos!=size-1) memmove(data+pos+1,data+pos,sizeof(CImg)*(size-1-pos)); if (shared && !img.is_empty()) { data[pos].width = img.width; data[pos].height = img.height; data[pos].depth = img.depth; data[pos].dim = img.dim; data[pos].is_shared = true; data[pos].data = img.data; } else { data[pos].width = data[pos].height = data[pos].depth = data[pos].dim = 0; data[pos].data = 0; data[pos] = img; } } return *this; } template CImgList& insert(const CImg& img, const unsigned int pos) { return insert(img,pos,false); } template CImgList::type> get_insert(const CImg& img, const unsigned int pos, const bool shared=false) const { typedef typename cimg::largest::type restype; return CImgList(*this).insert(img,pos,shared); } //! Insert a copy of the image \p img at the current image list. template CImgList& insert(const CImg& img) { return insert(img,size); } template CImgList::type> get_insert(const CImg& img) const { typedef typename cimg::largest::type restype; return CImgList(*this).insert(img); } //! Insert a copy of the image \p img at the current image list. CImgList& operator<<(const CImg& img) { return insert(img); } //! Insert n copies of the image \p img into the current image list, at position \p pos. template CImgList& insert(const unsigned int n, const CImg& img, const unsigned int pos) { for (unsigned int i=0; i CImgList::type> get_insert(const unsigned int n, const CImg& img, const unsigned int pos) const { typedef typename cimg::largest::type restype; return CImgList(*this).insert(n,img,pos); } //! Insert n copies of the image \p img at the end of the list. template CImgList& insert(const unsigned int n, const CImg& img) { for (unsigned int i=0; i CImgList::type> get_insert(const unsigned int n, const CImg& img) const { typedef typename cimg::largest::type restype; return CImgList(*this).insert(n,img); } //! Insert a copy of the image list \p list into the current image list, starting from position \p pos. template CImgList& insert(const CImgList& list, const unsigned int pos) { cimglist_for(list,l) insert(list[l],pos+l); return *this; } CImgList& insert(const CImgList& list, const unsigned int pos) { if (this!=&list) cimglist_for(list,l) insert(list[l],pos+l); else insert(CImgList(list),pos); return *this; } template CImgList::type> get_insert(const CImgList& list, const unsigned int pos) const { typedef typename cimg::largest::type restype; return CImgList(*this).insert(list,pos); } //! Append a copy of the image list \p list at the current image list. template CImgList& insert(const CImgList& list) { return insert(list,size); } template CImgList::type> get_insert(const CImgList& list) const { typedef typename cimg::largest::type restype; return CImgList(*this).insert(list); } //! Insert a copy of the image list \p list at the current image list. CImgList& operator<<(const CImgList& list) { return insert(list); } //! Insert n copies of the list \p list at position \p pos of the current list. template CImgList& insert(const unsigned int n, const CImgList& list, const unsigned int pos) { for (unsigned int i=0; i CImgList::type> get_insert(const unsigned int n, const CImgList& list, const unsigned int pos) const { typedef typename cimg::largest::type restype; return CImgList(*this).insert(n,list,pos); } //! Insert n copies of the list at the end of the current list template CImgList& insert(const unsigned int n, const CImgList& list) { for (unsigned int i=0; i CImgList::type> get_insert(const unsigned int n, const CImgList& list) const { typedef typename cimg::largest::type restype; return CImgList(*this).insert(n,list); } //! Insert image \p img at the end of the list. template CImgList& push_back(const CImg& img) { return insert(img); } //! Insert image \p img at the front of the list. template CImgList& push_front(const CImg& img) { return insert(img,0); } //! Insert list \p list at the end of the current list. template CImgList& push_back(const CImgList& list) { return insert(list); } //! Insert list \p list at the front of the current list. template CImgList& push_front(const CImgList& list) { return insert(list,0); } //! Insert a shared copy of the image \p img into the current image list, at position \p pos. template CImgList& insert_shared(const CImg& img, const unsigned int pos) { return insert(img,pos,true); } template CImgList get_insert_shared(const CImg& img, const unsigned int pos) const { return CImgList(*this).insert_shared(img,pos); } //! Insert a shared copy of the image \p img at the current image list. template CImgList& insert_shared(const CImg& img) { return insert_shared(img,size); } template CImgList get_insert_shared(const CImg& img) const { return CImgList(*this).insert_shared(img); } //! Insert n shared copies of the image \p img into the current image list, at position \p pos. template CImgList& insert_shared(const unsigned int n, const CImg& img, const unsigned int pos) { for (unsigned int i=0; i CImgList get_insert_shared(const unsigned int n, const CImg& img, const unsigned int pos) const { return CImgList(*this).insert_shared(n,img,pos); } //! Insert n shared copies of the image \p img at the end of the list. template CImgList& insert_shared(const unsigned int n, const CImg& img) { for (unsigned int i=0; i CImgList get_insert_shared(const unsigned int n, const CImg& img) const { return CImgList(*this).insert_shared(n,img); } //! Insert a shared copy of all image of the list \p list into the current image list, starting from position \p pos. template CImgList& insert_shared(const CImgList& list, const unsigned int pos) { if (this!=&list) cimglist_for(list,l) insert_shared(list[l],pos+l); else insert_shared(CImgList(list),pos); return *this; } template CImgList get_insert_shared(const CImgList& list, const unsigned int pos) const { return CImgList(*this).insert_shared(list,pos); } //! Append a shared copy of the image list \p list at the current image list. template CImgList& insert_shared(const CImgList& list) { return insert_shared(list,size); } template CImgList get_insert_shared(const CImgList& list) const { return CImgList(*this).insert_shared(list); } //! Insert n shared copies of the list \p list at position \p pos of the current list. template CImgList& insert_shared(const unsigned int n, const CImgList& list, const unsigned int pos) { for (unsigned int i=0; i CImgList get_insert_shared(const unsigned int n, const CImgList& list, const unsigned int pos) const { return CImgList(*this).insert_shared(n,list,pos); } //! Insert n shared copies of the list \p list at the end of the list template CImgList& insert_shared(const unsigned int n, const CImgList& list) { return insert_shared(n,list,size); } template CImgList get_insert_shared(const unsigned int n, const CImgList& list) const { return CImgList(*this).insert_shared(n,list); } //! Remove the image at position \p pos from the image list. CImgList& remove(const unsigned int pos) { if (pos>=size) cimg::warn(true,"CImgList<%s>::remove() : Cannot remove an image from a list (%p,%u), at position %u.", pixel_type(),data,size,pos); else { data[pos].assign(); if (!(--size)) return assign(); if (size<8 || size>(allocsize>>2)) { // Removing item without reallocation. if (pos!=size) { std::memmove(data+pos,data+pos+1,sizeof(CImg)*(size-pos)); CImg &tmp = data[size]; tmp.width = tmp.height = tmp.depth = tmp.dim = 0; tmp.data = 0; } } else { // Removing item with reallocation. allocsize>>=2; CImg *new_data = new CImg[allocsize]; if (pos) std::memcpy(new_data,data,sizeof(CImg)*pos); if (pos!=size) std::memcpy(new_data+pos,data+pos+1,sizeof(CImg)*(size-pos)); std::memset(data,0,sizeof(CImg)*(size+1)); delete[] data; data = new_data; } } return *this; } CImgList get_remove(const unsigned int pos) const { return CImgList(*this).remove(pos); } //! Remove last element of the list; CImgList& pop_back() { return remove(size-1); } //! Remove last element of the list; CImgList& operator>>(CImg& img) { if (size) { img.swap((*this)[size-1]); return remove(size-1); } cimg::warn(true,"CImgl<%s>::operator>>() : List is empty",pixel_type()); img.assign(); return *this; } //! Remove first element of the list; CImgList& pop_front() { return remove(0); } //! Remove the element pointed by iterator \p iter; CImgList& erase(const iterator iter) { return remove(iter-data); } //! Remove the last image from the image list. CImgList& remove() { if (size) return remove(size-1); else cimg::warn(true,"CImgList<%s>::remove() : List is empty",pixel_type()); return *this; } CImgList get_remove() const { return CImgList(*this).remove(); } //! Reverse list order CImgList& reverse() { for (unsigned int l=0; l(*this).reverse(); } //! Get a sub-list const CImgList get_crop(const unsigned int i0, const unsigned int i1, const bool shared=false) const { if (i0>i1 || i1>=size) throw CImgArgumentException("CImgList<%s>::get_crop() : Cannot get a sub-list (%u->%u) from a list of %u images", pixel_type(),i0,i1,size); CImgList res(i1-i0+1); cimglist_for(res,l) res[l].assign((*this)[i0+l],shared); return res; } //! Replace a list by its sublist CImgList& crop(const unsigned int i0, const unsigned int i1, const bool shared=false) { return get_crop(i0,i1,shared).swap(*this); } //@} //---------------------------- // //! \name Fourier Transforms //@{ //---------------------------- //! Compute the Fast Fourier Transform (along the specified axis). CImgList& FFT(const char axe, const bool inverse=false) { if (is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Instance list (%u,%p) is empty",pixel_type(),size,data); if (data[0].is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Real part (%u,%u,%u,%u,%p) is empty", pixel_type,data[0].width,data[0].height,data[0].depth,data[0].dim,data[0].data); cimg::warn(size>2,"CImgList<%s>::FFT() : Instance list (%u,%p) have more than 2 images",pixel_type(),size,data); if (size==1) insert(CImg(data[0].width,data[0].height,data[0].depth,data[0].dim,0)); CImg &Ir = data[0], &Ii = data[1]; if (Ir.width!=Ii.width || Ir.height!=Ii.height || Ir.depth!=Ii.depth || Ir.dim!=Ii.dim) throw CImgInstanceException("CImgList<%s>::FFT() : Real part (%u,%u,%u,%u,%p) and imaginary part (%u,%u,%u,%u,%p)" "have different dimensions",pixel_type(), Ir.width,Ir.height,Ir.depth,Ir.dim,Ir.data,Ii.width,Ii.height,Ii.depth,Ii.dim,Ii.data); #ifdef cimg_use_fftw3 fftw_complex *data_in; fftw_plan data_plan; switch (cimg::uncase(axe)) { case 'x': { data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.width); data_plan = fftw_plan_dft_1d(Ir.width, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE); cimg_forYZV(Ir,y,z,k) { T *ptrr = Ir.ptr(0,y,z,k), *ptri = Ii.ptr(0,y,z,k); double *ptrd = (double*)data_in; cimg_forX(Ir,x) { *(ptrd++) = (double)*(ptrr++); *(ptrd++) = (double)*(ptri++); } fftw_execute(data_plan); cimg_forX(Ir,x) { *(--ptri) = (T)*(--ptrd); *(--ptrr) = (T)*(--ptrd); } } } break; case 'y': { data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.height); data_plan = fftw_plan_dft_1d(Ir.height, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE); const unsigned int off = Ir.width; cimg_forXZV(Ir,x,z,k) { T *ptrr = Ir.ptr(x,0,z,k), *ptri = Ii.ptr(x,0,z,k); double *ptrd = (double*)data_in; cimg_forY(Ir,y) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; } fftw_execute(data_plan); cimg_forY(Ir,y) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); } } } break; case 'z': { data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.depth); data_plan = fftw_plan_dft_1d(Ir.depth, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE); const unsigned int off = Ir.width*Ir.height; cimg_forXYV(Ir,x,y,k) { T *ptrr = Ir.ptr(x,y,0,k), *ptri = Ii.ptr(x,y,0,k); double *ptrd = (double*)data_in; cimg_forZ(Ir,z) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; } fftw_execute(data_plan); cimg_forZ(Ir,z) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); } } } break; case 'v': { data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.dim); data_plan = fftw_plan_dft_1d(Ir.dim, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE); const unsigned int off = Ir.width*Ir.height*Ir.depth; cimg_forXYZ(Ir,x,y,z) { T *ptrr = Ir.ptr(x,y,z,0), *ptri = Ii.ptr(x,y,z,0); double *ptrd = (double*)data_in; cimg_forV(Ir,k) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=off; ptri+=off; } fftw_execute(data_plan); cimg_forV(Ir,k) { ptrr-=off; ptri-=off; *ptri = (T)*(--ptrd); *ptrr = (T)*(--ptrd); } } } break; } fftw_destroy_plan(data_plan); fftw_free(data_in); #else switch (cimg::uncase(axe)) { case 'x': { // Fourier along X const unsigned int N = Ir.width, N2 = (N>>1); if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image along 'x' is %d != 2^N", pixel_type(),N); for (unsigned int i=0,j=0; ii) cimg_forYZV(Ir,y,z,v) { cimg::swap(Ir(i,y,z,v),Ir(j,y,z,v)); cimg::swap(Ii(i,y,z,v),Ii(j,y,z,v)); if (j=m; j-=m, m=n, n>>=1); } for (unsigned int delta=2; delta<=N; delta<<=1) { const unsigned int delta2 = (delta>>1); for (unsigned int i=0; i>1); if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image(s) along 'y' is %d != 2^N", pixel_type(),N); for (unsigned int i=0,j=0; ii) cimg_forXZV(Ir,x,z,v) { cimg::swap(Ir(x,i,z,v),Ir(x,j,z,v)); cimg::swap(Ii(x,i,z,v),Ii(x,j,z,v)); if (j=m; j-=m, m=n, n>>=1); } for (unsigned int delta=2; delta<=N; delta<<=1) { const unsigned int delta2 = (delta>>1); for (unsigned int i=0; i>1); if (((N-1)&N) && N!=1) throw CImgInstanceException("CImgList<%s>::FFT() : Dimension of instance image(s) along 'z' is %d != 2^N", pixel_type(),N); for (unsigned int i=0,j=0; ii) cimg_forXYV(Ir,x,y,v) { cimg::swap(Ir(x,y,i,v),Ir(x,y,j,v)); cimg::swap(Ii(x,y,i,v),Ii(x,y,j,v)); if (j=m; j-=m, m=n, n>>=1); } for (unsigned int delta=2; delta<=N; delta<<=1) { const unsigned int delta2 = (delta>>1); for (unsigned int i=0; i::FFT() : unknown axe '%c', must be 'x','y' or 'z'"); } #endif return *this; } //! Return the Fast Fourier Transform of a complex image (along a specified axis). CImgList::type> get_FFT(const char axe,const bool inverse=false) const { typedef typename cimg::largest::type restype; return CImgList(*this).FFT(axe,inverse); } //! Compute the Fast Fourier Transform of a complex image. CImgList& FFT(const bool inverse=false) { if (is_empty()) throw CImgInstanceException("CImgList<%s>::FFT() : Instance list (%u,%p) is empty",pixel_type(),size,data); cimg::warn(size>2,"CImgList<%s>::FFT() : Instance list (%u,%p) have more than 2 images",pixel_type(),size,data); if (size==1) insert(CImg(data[0].width,data[0].height,data[0].depth,data[0].dim,0)); CImg &Ir = data[0]; #ifdef cimg_use_fftw3 CImg &Ii = data[1]; fftw_complex *data_in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * Ir.width*Ir.height*Ir.depth); fftw_plan data_plan; const unsigned int w = Ir.width, wh = w*Ir.height, whd = wh*Ir.depth; data_plan = fftw_plan_dft_3d(Ir.width, Ir.height, Ir.depth, data_in, data_in, inverse?FFTW_BACKWARD:FFTW_FORWARD, FFTW_ESTIMATE); cimg_forV(Ir,k) { T *ptrr = Ir.ptr(0,0,0,k), *ptri = Ii.ptr(0,0,0,k); double *ptrd = (double*)data_in; cimg_forX(Ir,x) { cimg_forY(Ir,y) { cimg_forZ(Ir,z) { *(ptrd++) = (double)*ptrr; *(ptrd++) = (double)*ptri; ptrr+=wh; ptri+=wh; } ptrr-=whd-w; ptri-=whd-w; } ptrr-=wh-1; ptri-=wh-1; } fftw_execute(data_plan); ptrd = (double*)data_in; ptrr = Ir.ptr(0,0,0,k), ptri = Ii.ptr(0,0,0,k); cimg_forX(Ir,x) { cimg_forY(Ir,y) { cimg_forZ(Ir,z) { *ptrr = (T)*(ptrd++); *ptri = (T)*(ptrd++); ptrr+=wh; ptri+=wh; } ptrr-=whd-w; ptri-=whd-w; } ptrr-=wh-1; ptri-=wh-1; } } fftw_destroy_plan(data_plan); fftw_free(data_in); #else if (Ir.depth>1) FFT('z',inverse); if (Ir.height>1) FFT('y',inverse); if (Ir.width>1) FFT('x',inverse); #endif return *this; } //! Return the Fast Fourier Transform of a complex image CImgList::type> get_FFT(const bool inverse=false) const { typedef typename cimg::largest::type restype; return CImgList(*this).FFT(inverse); } //@} //---------------------------------- // //! \name Input-Output and Display //@{ //---------------------------------- //! Print informations about the list on the standard output. const CImgList& print(const char* title=0, const unsigned int print_flag=1) const { char tmp[1024]; std::fprintf(stderr,"%-8s(this=%p) : { size=%u, data=%p }\n",title?title:"CImgList", (void*)this,size,(void*)data); if (print_flag>0) cimglist_for(*this,l) { std::sprintf(tmp,"%s[%d]",title?title:"CImgList",l); data[l].print(tmp,print_flag); } return *this; } //! Display informations about the list on the standart output. const CImgList& print(const unsigned int print_flag) const { return print(0,print_flag); } //! Load an image list from a file. static CImgList get_load(const char *const filename) { const char *ext = cimg::filename_split(filename); if (!cimg::strncasecmp(ext,"cimg",4) || !ext[0]) return get_load_cimg(filename); if (!cimg::strncasecmp(ext,"rec",3) || !cimg::strncasecmp(ext,"par",3)) return get_load_parrec(filename); CImgList res(1); res[0].load(filename); return res; } //! In-place version of load(). CImgList& load(const char *const filename) { return get_load(filename).swap(*this); } #define cimg_load_cimg_case(Ts,Tss) \ if (!loaded && !cimg::strcasecmp(Ts,tmp2)) for (unsigned int l=0; l0) { \ Tss *buf = new Tss[w*h*z*k]; cimg::fread(buf,w*h*z*k,nfile); \ if (endian) cimg::endian_swap(buf,w*h*z*k); \ CImg idest(w,h,z,k); \ cimg_foroff(idest,off) idest[off] = (T)(buf[off]); idest.swap(res[l]); \ delete[] buf; \ } \ loaded = true; \ } //! Load an image list from a file (.raw format). static CImgList get_load_cimg(std::FILE *const file, const char *const filename=0) { typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); char tmp[256],tmp2[256]; int i; bool loaded = false; unsigned int n,j,w,h,z,k,err; j=0; while((i=std::fgetc(nfile))!='\n' && i!=EOF && j<256) tmp[j++]=i; tmp[j]='\0'; err=std::sscanf(tmp,"%u%*c%255[A-Za-z ]",&n,tmp2); if (err!=2) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImgList<%s>::get_load_cimg() : File '%s', Unknow CImg RAW header.", pixel_type(),filename?filename:"(FILE*)"); } CImgList res(n); cimg_load_cimg_case("bool",bool); cimg_load_cimg_case("unsigned char",uchar); cimg_load_cimg_case("uchar",uchar); cimg_load_cimg_case("char",char); cimg_load_cimg_case("unsigned short",ushort); cimg_load_cimg_case("ushort",ushort); cimg_load_cimg_case("short",short); cimg_load_cimg_case("unsigned int",uint); cimg_load_cimg_case("uint",uint); cimg_load_cimg_case("int",int); cimg_load_cimg_case("unsigned long",ulong); cimg_load_cimg_case("ulong",ulong); cimg_load_cimg_case("long",long); cimg_load_cimg_case("float",float); cimg_load_cimg_case("double",double); if (!loaded) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImgList<%s>::get_load_cimg() : File '%s', cannot read images of pixels coded as '%s'.", pixel_type(),filename?filename:"(FILE*)",tmp2); } if (!file) cimg::fclose(nfile); return res; } //! Load an image list from a file (.raw format). static CImgList get_load_cimg(const char *const filename) { return get_load_cimg(0,filename); } //! In-place version of get_load_cimg(). CImgList& load_cimg(std::FILE *const file, const char *const filename=0) { return get_load_cimg(file,filename).swap(*this); } //! In-place version of get_load_cimg(). CImgList& load_cimg(const char *const filename) { return get_load_cimg(filename).swap(*this); } //! Load PAR-REC (Philips) image file static CImgList get_load_parrec(const char *const filename) { char body[1024], filenamepar[1024], filenamerec[1024]; const char *ext = cimg::filename_split(filename,body); if (!cimg::strncmp(ext,"par",3)) { std::strcpy(filenamepar,filename); std::sprintf(filenamerec,"%s.rec",body); } if (!cimg::strncmp(ext,"PAR",3)) { std::strcpy(filenamepar,filename); std::sprintf(filenamerec,"%s.REC",body); } if (!cimg::strncmp(ext,"rec",3)) { std::strcpy(filenamerec,filename); std::sprintf(filenamepar,"%s.par",body); } if (!cimg::strncmp(ext,"REC",3)) { std::strcpy(filenamerec,filename); std::sprintf(filenamepar,"%s.PAR",body); } std::FILE *file = cimg::fopen(filenamepar,"r"); // Parse header file CImgList st_slices; CImgList st_global; int err; char line[256]={0}; do { err=std::fscanf(file,"%255[^\n]%*c",line); } while (err!=EOF && (line[0]=='#' || line[0]=='.')); do { unsigned int sn,sizex,sizey,pixsize; float rs,ri,ss; err=std::fscanf(file,"%u%*u%*u%*u%*u%*u%*u%u%*u%u%u%g%g%g%*[^\n]",&sn,&pixsize,&sizex,&sizey,&ri,&rs,&ss); if (err==7) { st_slices.insert(CImg::vector((float)sn,(float)pixsize,(float)sizex,(float)sizey,ri,rs,ss,0)); unsigned int i; for (i=0; i::vector(sizex,sizey,sn)); else { CImg &vec = st_global[i]; if (sizex>vec[0]) vec[0] = sizex; if (sizey>vec[1]) vec[1] = sizey; vec[2] = sn; } st_slices[st_slices.size-1][7] = (float)i; } } while (err==7); // Read data std::FILE *file2 = cimg::fopen(filenamerec,"rb"); CImgList dest; { cimglist_for(st_global,l) { const CImg& vec = st_global[l]; dest.insert(CImg(vec[0],vec[1],vec[2])); }} cimglist_for(st_slices,l) { const CImg& vec = st_slices[l]; const unsigned int sn = (unsigned int)vec[0]-1, pixsize = (unsigned int)vec[1], sizex = (unsigned int)vec[2], sizey = (unsigned int)vec[3], imn = (unsigned int)vec[7]; const float ri = vec[4], rs = vec[5], ss = vec[6]; switch (pixsize) { case 8: { CImg buf(sizex,sizey); cimg::fread(buf.data,sizex*sizey,file2); if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey); CImg& img = dest[imn]; cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss)); } break; case 16: { CImg buf(sizex,sizey); cimg::fread(buf.data,sizex*sizey,file2); if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey); CImg& img = dest[imn]; cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss)); } break; case 32: { CImg buf(sizex,sizey); cimg::fread(buf.data,sizex*sizey,file2); if (cimg::endian()) cimg::endian_swap(buf.data,sizex*sizey); CImg& img = dest[imn]; cimg_forXY(img,x,y) img(x,y,sn) = (T)(( buf(x,y)*rs + ri )/(rs*ss)); } break; default: cimg::fclose(file); cimg::fclose(file2); throw CImgIOException("CImg<%s>::get_load_parrec() : File '%s', cannot handle image with pixsize = %d bits.", pixel_type(),filename,pixsize); break; } } cimg::fclose(file); cimg::fclose(file2); if (!dest.size) throw CImgIOException("CImg<%s>::get_load_parrec() : File '%s' does not appear to be a valid PAR-REC file.", pixel_type(),filename); return dest; } //! In-place version of get_load_parrec(). CImgList& load_parrec(const char *const filename) { return get_load_parrec(filename).swap(*this); } //! Load YUV image sequence. static CImgList get_load_yuv(std::FILE *const file, const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb=false) { if (sizex%2 || sizey%2) throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', image dimensions along X and Y must be even numbers (given are %ux%u)\n", pixel_type(),filename?filename:"(unknown)",sizex,sizey); if (!sizex || !sizey) throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given image sequence size (%u,%u) is invalid", pixel_type(),filename?filename:"(unknown)",sizex,sizey); if (last_frame>0 && first_frame>(unsigned int)last_frame) throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given first frame %u is posterior to last frame %d.", pixel_type(),filename?filename:"(unknown)",first_frame,last_frame); if (!sizex || !sizey) throw CImgArgumentException("CImgList<%s>::get_load_yuv() : File '%s', given frame size (%u,%u) is invalid.", pixel_type(),filename?filename:"(unknown)",sizex,sizey); CImgList res; CImg tmp(sizex,sizey,1,3), UV(sizex/2,sizey/2,1,2); std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); bool stopflag = false; int err; if (first_frame) { err = std::fseek(nfile,first_frame*(sizex*sizey + sizex*sizey/2),SEEK_CUR); if (err) { if (!file) cimg::fclose(nfile); throw CImgIOException("CImgList<%s>::get_load_yuv() : File '%s' doesn't contain frame number %u " "(out of range error).",pixel_type(),filename?filename:"(FILE*)",first_frame); } } unsigned int frame; for (frame = first_frame; !stopflag && (last_frame<0 || frame<=(unsigned int)last_frame); frame++) { tmp.fill(0); // TRY to read the luminance, don't replace by cimg::fread ! err = (int)std::fread((void*)(tmp.ptr()),1,(size_t)(tmp.width*tmp.height),nfile); if (err!=(int)(tmp.width*tmp.height)) { stopflag = true; cimg::warn(err>0,"CImgList<%s>::get_load_yuv() : File '%s' contains incomplete data," " or given image dimensions (%u,%u) are incorrect.", pixel_type(),filename?filename:"(unknown)",sizex,sizey); } else { UV.fill(0); // TRY to read the luminance, don't replace by cimg::fread ! err = (int)std::fread((void*)(UV.ptr()),1,(size_t)(UV.size()),nfile); if (err!=(int)(UV.size())) { stopflag = true; cimg::warn(err>0,"CImgList<%s>::get_load_yuv() : File '%s' contains incomplete data," " or given image dimensions (%u,%u) are incorrect.", pixel_type(),filename?filename:"(unknown)",sizex,sizey); } else { cimg_forXY(UV,x,y) { const int x2=2*x, y2=2*y; tmp(x2,y2,1) = tmp(x2+1,y2,1) = tmp(x2,y2+1,1) = tmp(x2+1,y2+1,1) = UV(x,y,0); tmp(x2,y2,2) = tmp(x2+1,y2,2) = tmp(x2,y2+1,2) = tmp(x2+1,y2+1,2) = UV(x,y,1); } if (yuv2rgb) tmp.YCbCrtoRGB(); res.insert(tmp); } } } cimg::warn(stopflag && last_frame>=0 && frame!=(unsigned int)last_frame, "CImgList<%s>::get_load_yuv() : File '%s', frame %d not reached since only %u frames were found in the file.", pixel_type(),filename?filename:"(unknown)",last_frame,frame-1,filename); if (!file) cimg::fclose(nfile); return res; } //! Load YUV image sequence. static CImgList get_load_yuv(const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb=false) { return get_load_yuv(0,filename,sizex,sizey,first_frame,last_frame,yuv2rgb); } //! In-place version of get_load_yuv(). CImgList& load_yuv(std::FILE *const file, const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb=false) { return get_load_yuv(file,filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this); } //! In-place version of get_load_yuv(). CImgList& load_yuv(const char *const filename, const unsigned int sizex, const unsigned int sizey, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb=false) { return get_load_yuv(filename,sizex,sizey,first_frame,last_frame,yuv2rgb).swap(*this); } //! Load from OFF file format template static CImgList get_load_off(std::FILE *const file, const char *const filename, CImgList& primitives, CImgList& colors, const bool invert_faces=false) { return CImg::get_load_off(file,filename,primitives,colors,invert_faces).get_split('x'); } //! Load from OFF file format template static CImgList get_load_off(const char *const filename, CImgList& primitives, CImgList& colors, const bool invert_faces=false) { return get_load_off(0,filename,primitives,colors,invert_faces); } //! In-place version of get_load_off() template CImgList& load_off(std::FILE *const file, const char *const filename, CImgList& primitives, CImgList& colors, const bool invert_faces=false) { return get_load_off(file,filename,primitives,colors,invert_faces).swap(*this); } //! In-place version of get_load_off() template CImgList& load_off(const char *const filename, CImgList& primitives, CImgList& colors, const bool invert_faces=false) { return get_load_off(filename,primitives,colors,invert_faces).swap(*this); } //! Save an image list into a file. /** Depending on the extension of the given filename, a file format is chosen for the output file. **/ const CImgList& save(const char *const filename) const { if (is_empty()) throw CImgInstanceException("CImgList<%s>::save() : Instance list (%u,%p) is empty (file '%s').", pixel_type(),size,data,filename); if (!filename) throw CImgArgumentException("CImg<%s>::save() : Instance list (%u,%p), specified filename is (null).", pixel_type(),size,data); const char *ext = cimg::filename_split(filename); if (!cimg::strncasecmp(ext,"cimg",4) || !ext[0]) return save_cimg(filename); if (!cimg::strncasecmp(ext,"yuv",3)) return save_yuv(filename,true); if (size==1) data[0].save(filename,-1); else cimglist_for(*this,l) data[l].save(filename,l); return *this; } //! Save an image sequence into a YUV file const CImgList& save_yuv(std::FILE *const file, const char *const filename=0, const bool rgb2yuv=true) const { if (is_empty()) throw CImgInstanceException("CImgList<%s>::save_yuv() : Instance list (%u,%p) is empty (file '%s').", pixel_type(),size,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_yuv() : Instance list (%u,%p), specified file is (null).", pixel_type(),size,data); if ((*this)[0].dimx()%2 || (*this)[0].dimy()%2) throw CImgInstanceException("CImgList<%s>::save_yuv() : Image dimensions must be even numbers (current are %ux%u, file '%s').", pixel_type(),(*this)[0].dimx(),(*this)[0].dimy(),filename?filename:"(unknown)"); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); cimglist_for(*this,l) { CImg YCbCr((*this)[l]); if (rgb2yuv) YCbCr.RGBtoYCbCr(); cimg::fwrite(YCbCr.ptr(),YCbCr.width*YCbCr.height,nfile); cimg::fwrite(YCbCr.get_resize(YCbCr.width/2, YCbCr.height/2,1,3,3).ptr(0,0,0,1), YCbCr.width*YCbCr.height/2,nfile); } if (!file) cimg::fclose(nfile); return *this; } //! Save an image sequence into a YUV file const CImgList& save_yuv(const char *const filename=0, const bool rgb2yuv=true) const { return save_yuv(0,filename,rgb2yuv); } //! Save an image list into a CImg file (RAW binary file + simple header) /** A CImg RAW file is a simple uncompressed binary file that may be used to save list of CImg images. \param filename : name of the output file. \return A reference to the current CImgList instance is returned. **/ const CImgList& save_cimg(std::FILE *const file, const char *const filename=0) const { if (is_empty()) throw CImgInstanceException("CImgList<%s>::save_cimg() : Instance list (%u,%p) is empty (file '%s').", pixel_type(),size,data,filename?filename:"(unknown)"); if (!file && !filename) throw CImgArgumentException("CImg<%s>::save_cimg() : Instance list (%u,%p), specified file is (null).", pixel_type(),size,data); std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); std::fprintf(nfile,"%u %s\n",size,pixel_type()); cimglist_for(*this,l) { const CImg& img = data[l]; std::fprintf(nfile,"%u %u %u %u\n",img.width,img.height,img.depth,img.dim); if (img.data) { if (cimg::endian()) { CImg tmp(img); cimg::endian_swap(tmp.data,tmp.size()); cimg::fwrite(tmp.data,img.width*img.height*img.depth*img.dim,nfile); } else cimg::fwrite(img.data,img.width*img.height*img.depth*img.dim,nfile); } } if (!file) cimg::fclose(nfile); return *this; } //! Save an image list into a CImg file (RAW binary file + simple header) const CImgList& save_cimg(const char *const filename) const { return save_cimg(0,filename); } //! Save an image list into a OFF file. template const CImgList& save_off(std::FILE *const file, const char *const filename, const CImgList& primitives, const CImgList& colors, const bool invert_faces=false) const { get_append('x').save_off(file,filename,primitives,colors,invert_faces); return *this; } //! Save an image list into a OFF file. template const CImgList& save_off(const char *const filename, const CImgList& primitives, const CImgList& colors, const bool invert_faces=false) const { return save_off(filename,primitives,colors,invert_faces); } //! Return a single image which is the concatenation of all images of the current CImgList instance. /** \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'. \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). \return A CImg image corresponding to the concatenation is returned. **/ CImg get_append(const char axe='x',const char align='c') const { if (is_empty()) return CImg(); unsigned int dx=0,dy=0,dz=0,dv=0,pos=0; CImg res; switch(cimg::uncase(axe)) { case 'x': { cimglist_for(*this,l) { const CImg& img = (*this)[l]; dx += img.width; dy = cimg::max(dy,img.height); dz = cimg::max(dz,img.depth); dv = cimg::max(dv,img.dim); } res.assign(dx,dy,dz,dv,0); switch (cimg::uncase(align)) { case 'p' : { cimglist_for(*this,ll) { res.draw_image((*this)[ll],pos,0,0,0); pos+=(*this)[ll].width; }} break; case 'n' : { cimglist_for(*this,ll) { res.draw_image((*this)[ll],pos,dy-(*this)[ll].height,dz-(*this)[ll].depth,dv-(*this)[ll].dim); pos+=(*this)[ll].width; }} break; default : { cimglist_for(*this,ll) { res.draw_image((*this)[ll],pos,(dy-(*this)[ll].height)/2,(dz-(*this)[ll].depth)/2,(dv-(*this)[ll].dim)/2); pos+=(*this)[ll].width; }} break; } } break; case 'y': { cimglist_for(*this,l) { const CImg& img = (*this)[l]; dx = cimg::max(dx,img.width); dy += img.height; dz = cimg::max(dz,img.depth); dv = cimg::max(dv,img.dim); } res.assign(dx,dy,dz,dv,0); switch (cimg::uncase(align)) { case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,pos,0,0); pos+=(*this)[ll].height; }} break; case 'n': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],dx-(*this)[ll].width,pos,dz-(*this)[ll].depth,dv-(*this)[ll].dim); pos+=(*this)[ll].height; }} break; default : { cimglist_for(*this,ll) { res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,pos,(dz-(*this)[ll].depth)/2,(dv-(*this)[ll].dim)/2); pos+=(*this)[ll].height; }} break; } } break; case 'z': { cimglist_for(*this,l) { const CImg& img = (*this)[l]; dx = cimg::max(dx,img.width); dy = cimg::max(dy,img.height); dz += img.depth; dv = cimg::max(dv,img.dim); } res.assign(dx,dy,dz,dv,0); switch (cimg::uncase(align)) { case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,0,pos,0); pos+=(*this)[ll].depth; }} break; case 'n': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],dx-(*this)[ll].width,dy-(*this)[ll].height,pos,dv-(*this)[ll].dim); pos+=(*this)[ll].depth; }} break; case 'c': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,(dy-(*this)[ll].height)/2,pos,(dv-(*this)[ll].dim)/2); pos+=(*this)[ll].depth; }} break; } } break; case 'v': { cimglist_for(*this,l) { const CImg& img = (*this)[l]; dx = cimg::max(dx,img.width); dy = cimg::max(dy,img.height); dz = cimg::max(dz,img.depth); dv += img.dim; } res.assign(dx,dy,dz,dv,0); switch (cimg::uncase(align)) { case 'p': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],0,0,0,pos); pos+=(*this)[ll].dim; }} break; case 'n': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],dx-(*this)[ll].width,dy-(*this)[ll].height,dz-(*this)[ll].depth,pos); pos+=(*this)[ll].dim; }} break; case 'c': { cimglist_for(*this,ll) { res.draw_image((*this)[ll],(dx-(*this)[ll].width)/2,(dy-(*this)[ll].height)/2,(dz-(*this)[ll].depth)/2,pos); pos+=(*this)[ll].dim; }} break; } } break; default: throw CImgArgumentException("CImg<%s>::get_append() : unknow axe '%c', must be 'x','y','z' or 'v'",pixel_type(),axe); } return res; } // Create an auto-cropped font (along the X axis) from a input font \p font. CImgList get_crop_font() const { CImgList res; cimglist_for(*this,l) { const CImg& letter = (*this)[l]; int xmin = letter.width, xmax = 0; cimg_forXY(letter,x,y) if (letter(x,y)) { if (xxmax) xmax=x; } if (xmin>xmax) res.insert(CImg(letter.width,letter.height,1,letter.dim,0)); else res.insert(letter.get_crop(xmin,0,xmax,letter.height-1)); } res[' '].resize(res['f'].width); res[' '+256].resize(res['f'].width); return res; } CImgList& crop_font() { return get_crop_font().swap(*this); } static CImgList get_font(const unsigned int *const font,const unsigned int w,const unsigned int h, const unsigned int paddingx, const unsigned int paddingy, const bool variable_size=true) { CImgList res = CImgList(256,w,h,1,3).insert(CImgList(256,w,h,1,1)); const unsigned int *ptr = font; unsigned int m = 0, val = 0; for (unsigned int y=0; y>=1; if (!m) { m=0x80000000; val = *(ptr++); } CImg& img = res[x/w], &mask = res[x/w+256]; unsigned int xm = x%w; img(xm,y,0) = img(xm,y,1) = img(xm,y,2) = mask(xm,y,0) = (T)((val&m)?1:0); } if (variable_size) res.crop_font(); if (paddingx || paddingy) cimglist_for(res,l) res[l].resize(res[l].dimx()+paddingx, res[l].dimy()+paddingy,1,-100,0); return res; } //! Return a CImg pre-defined font with desired size /** \param font_height = height of the desired font (can be 11,13,24,38 or 57) \param fixed_size = tell if the font has a fixed or variable width. **/ static CImgList get_font(const unsigned int font_width, const bool variable_size=true) { if (font_width<=11) { static CImgList font7x11, nfont7x11; if (!variable_size && font7x11.is_empty()) font7x11 = get_font(cimg::font7x11,7,11,1,0,false); if (variable_size && nfont7x11.is_empty()) nfont7x11 = get_font(cimg::font7x11,7,11,1,0,true); return variable_size?nfont7x11:font7x11; } if (font_width<=13) { static CImgList font10x13, nfont10x13; if (!variable_size && font10x13.is_empty()) font10x13 = get_font(cimg::font10x13,10,13,1,0,false); if (variable_size && nfont10x13.is_empty()) nfont10x13 = get_font(cimg::font10x13,10,13,1,0,true); return variable_size?nfont10x13:font10x13; } if (font_width<=17) { static CImgList font8x17, nfont8x17; if (!variable_size && font8x17.is_empty()) font8x17 = get_font(cimg::font8x17,8,17,1,0,false); if (variable_size && nfont8x17.is_empty()) nfont8x17 = get_font(cimg::font8x17,8,17,1,0,true); return variable_size?nfont8x17:font8x17; } if (font_width<=19) { static CImgList font10x19, nfont10x19; if (!variable_size && font10x19.is_empty()) font10x19 = get_font(cimg::font10x19,10,19,2,0,false); if (variable_size && nfont10x19.is_empty()) nfont10x19 = get_font(cimg::font10x19,10,19,2,0,true); return variable_size?nfont10x19:font10x19; } if (font_width<=24) { static CImgList font12x24, nfont12x24; if (!variable_size && font12x24.is_empty()) font12x24 = get_font(cimg::font12x24,12,24,2,0,false); if (variable_size && nfont12x24.is_empty()) nfont12x24 = get_font(cimg::font12x24,12,24,2,0,true); return variable_size?nfont12x24:font12x24; } if (font_width<=32) { static CImgList font16x32, nfont16x32; if (!variable_size && font16x32.is_empty()) font16x32 = get_font(cimg::font16x32,16,32,2,0,false); if (variable_size && nfont16x32.is_empty()) nfont16x32 = get_font(cimg::font16x32,16,32,2,0,true); return variable_size?nfont16x32:font16x32; } if (font_width<=38) { static CImgList font19x38, nfont19x38; if (!variable_size && font19x38.is_empty()) font19x38 = get_font(cimg::font19x38,19,38,3,0,false); if (variable_size && nfont19x38.is_empty()) nfont19x38 = get_font(cimg::font19x38,19,38,3,0,true); return variable_size?nfont19x38:font19x38; } static CImgList font29x57, nfont29x57; if (!variable_size && font29x57.is_empty()) font29x57 = get_font(cimg::font29x57,29,57,5,0,false); if (variable_size && nfont29x57.is_empty()) nfont29x57 = get_font(cimg::font29x57,29,57,5,0,true); return variable_size?nfont29x57:font29x57; } //! Display the current CImgList instance in an existing CImgDisplay window (by reference). /** This function displays the list images of the current CImgList instance into an existing CImgDisplay window. Images of the list are concatenated in a single temporarly image for visualization purposes. The function returns immediately. \param disp : reference to an existing CImgDisplay instance, where the current image list will be displayed. \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'. \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). \return A reference to the current CImgList instance is returned. **/ const CImgList& display(CImgDisplay& disp, const char axe='x', const char align='c') const { get_append(axe,align).display(disp); return *this; } //! Display the current CImgList instance in a new display window. /** This function opens a new window with a specific title and displays the list images of the current CImgList instance into it. Images of the list are concatenated in a single temporarly image for visualization purposes. The function returns when a key is pressed or the display window is closed by the user. \param title : specify the title of the opening display window. \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'. \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). \param min_size : specify the minimum size of the opening display window. Images having dimensions below this size will be upscaled. \param max_size : specify the maximum size of the opening display window. Images having dimensions above this size will be downscaled. \return A reference to the current CImgList instance is returned. **/ const CImgList& display(const char* title,const char axe='x',const char align='c', const int min_size=128,const int max_size=1024) const { get_append(axe,align).display(title,min_size,max_size); return *this; } //! Display the current CImgList instance in a new display window. /** This function opens a new window and displays the list images of the current CImgList instance into it. Images of the list are concatenated in a single temporarly image for visualization purposes. The function returns when a key is pressed or the display window is closed by the user. \param axe : specify the axe for image concatenation. Can be 'x','y','z' or 'v'. \param align : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom). \param min_size : specify the minimum size of the opening display window. Images having dimensions below this size will be upscaled. \param max_size : specify the maximum size of the opening display window. Images having dimensions above this size will be downscaled. \return A reference to the current CImgList instance is returned. **/ const CImgList& display(const char axe='x',const char align='c', const int min_size=128,const int max_size=1024) const { return display(" ",axe,align,min_size,max_size); } //! Rescale and center 3D object CImgList& resize_object3d(const float siz=100, const bool centering=true) { float xm = (float)((*this)(0,0)), ym = (float)((*this)(0,1)), zm = (float)((*this)(0,2)), xM = xm, yM = ym, zM = zm; for (unsigned int p=1; pxM) xM = x; if (y>yM) yM = y; if (z>zM) zM = z; } const float cx = 0.5f*(xm+xM), cy = 0.5f*(ym+yM), cz = 0.5f*(zm+zM), delta = cimg::max(xM-xm,yM-ym,zM-zm), ratio = (siz>=0)?siz/delta:-siz/100; if (centering) cimglist_for(*this,l) { T &x = (*this)(l,0), &y = (*this)(l,1), &z = (*this)(l,2); x = (T)((x-cx)*ratio); y = (T)((y-cy)*ratio); z = (T)((z-cz)*ratio); } else cimglist_for(*this,l) { T &x = (*this)(l,0), &y = (*this)(l,1), &z = (*this)(l,2); x = (T)(cx+(x-cx)*ratio); y = (T)(cy+(y-cy)*ratio); z = (T)(cz+(z-cz)*ratio); } return *this; } //! Get a rescaled and centered version of the 3D object CImgList get_resize_object3d(const float siz=100, const bool centering=true) const { return CImgList(*this).resize_object3d(siz,centering); } // Swap fields of two CImgList instances. CImgList& swap(CImgList& list) { cimg::swap(size,list.size); cimg::swap(allocsize,list.allocsize); cimg::swap(data,list.data); return list; } }; /* #----------------------------------------- # # # # Complete previously defined functions # # # #------------------------------------------ */ #ifdef cimg_use_visualcpp6 template inline CImg operator+(const CImg& img, const t& val) { return CImg(img,false)+=val; } #else template inline CImg::type> operator+(const CImg& img, const t2& val) { typedef typename cimg::largest::type restype; return CImg(img,false)+=val; } #endif #ifdef cimg_use_visualcpp6 template inline CImg operator+(const t& val, const CImg& img) { return img+val; } #else template inline CImg::type> operator+(const t1& val, const CImg& img) { return img+val; } #endif #ifdef cimg_use_visualcpp6 template inline CImgList operator+(const CImgList& list, const t& val) { return CImgList(list)+=val; } #else template inline CImgList::type> operator+(const CImgList& list, const t2& val) { typedef typename cimg::largest::type restype; return CImgList(list)+=val; } #endif #ifdef cimg_use_visualcpp6 template inline CImgList operator+(const t& val, const CImgList& list) { return list+val; } #else template inline CImgList::type> operator+(const t1& val, const CImgList& list) { return list+val; } #endif template inline CImg::type> operator+(const CImg& img1, const CImg& img2) { typedef typename cimg::largest::type restype; return CImg(img1,false)+=img2; } template inline CImgList::type> operator+(const CImg& img, const CImgList& list) { typedef typename cimg::largest::type restype; return CImgList(list)+=img; } template inline CImgList::type> operator+(const CImgList& list, const CImg& img) { return img+list; } template inline CImgList::type> operator+(const CImgList& list1, const CImgList& list2) { typedef typename cimg::largest::type restype; return CImgList(list1)+=list2; } #ifdef cimg_use_visualcpp6 template inline CImg operator-(const CImg& img, const t& val) { return CImg(img,false)-=val; } #else template inline CImg::type> operator-(const CImg& img, const t2& val) { typedef typename cimg::largest::type restype; return CImg(img,false)-=val; } #endif #ifdef cimg_use_visualcpp6 template inline CImg operator-(const t& val, const CImg& img) { return CImg(img.width,img.height,img.depth,img.dim,val)-=img; } #else template inline CImg::type> operator-(const t1& val, const CImg& img) { typedef typename cimg::largest::type restype; return CImg(img.width,img.height,img.depth,img.dim,(restype)val)-=img; } #endif #ifdef cimg_use_visualcpp6 template inline CImgList operator-(const CImgList& list, const t& val) { return CImgList(list)-=val; } #else template inline CImgList::type> operator-(const CImgList& list, const t2& val) { typedef typename cimg::largest::type restype; return CImgList(list)-=val; } #endif #ifdef cimg_use_visualcpp6 template inline CImgList operator-(const t& val, const CImgList& list) { CImgList res(list.size); cimglist_for(res,l) res[l] = val-list[l]; return res; } #else template inline CImgList::type> operator-(const t1& val, const CImgList& list) { typedef typename cimg::largest::type restype; CImgList res(list.size); cimglist_for(res,l) res[l] = val-list[l]; return res; } #endif template inline CImg::type> operator-(const CImg& img1, const CImg& img2) { typedef typename cimg::largest::type restype; return CImg(img1,false)-=img2; } template inline CImgList::type> operator-(const CImg& img, const CImgList& list) { typedef typename cimg::largest::type restype; CImgList res(list.size); cimglist_for(res,l) res[l] = img-list[l]; return res; } template inline CImgList::type> operator-(const CImgList& list, const CImg& img) { typedef typename cimg::largest::type restype; return CImgList(list)-=img; } template inline CImgList::type> operator-(const CImgList& list1, const CImgList& list2) { typedef typename cimg::largest::type restype; return CImgList(list1)-=list2; } #ifdef cimg_use_visualcpp6 template inline CImg operator*(const CImg& img, const double val) { return CImg(img,false)*=val; } #else template inline CImg::type> operator*(const CImg& img, const t2& val) { typedef typename cimg::largest::type restype; return CImg(img,false)*=val; } #endif #ifdef cimg_use_visualcpp6 template inline CImg operator*(const double val, const CImg& img) { return img*val; } #else template inline CImg::type> operator*(const t1& val, const CImg& img) { return img*val; } #endif #ifdef cimg_use_visualcpp6 template inline CImgList operator*(const CImgList& list, const double val) { return CImgList(list)*=val; } #else template inline CImgList::type> operator*(const CImgList& list, const t2& val) { typedef typename cimg::largest::type restype; return CImgList(list)*=val; } #endif #ifdef cimg_use_visualcpp6 template inline CImgList operator*(const double val, const CImgList& list) { return list*val; } #else template inline CImgList::type> operator*(const t1& val, const CImgList& list) { return list*val; } #endif template inline CImg::type> operator*(const CImg& img1, const CImg& img2) { typedef typename cimg::largest::type restype; if (img1.width!=img2.height) throw CImgArgumentException("operator*() : can't multiply a matrix (%ux%u) by a matrix (%ux%u)", img1.width,img1.height,img2.width,img2.height); CImg res(img2.width,img1.height); restype val; cimg_forXY(res,i,j) { val=0; cimg_forX(img1,k) val+=img1(k,j)*img2(i,k); res(i,j) = val; } return res; } template inline CImgList::type> operator*(const CImg& img, const CImgList& list) { typedef typename cimg::largest::type restype; CImgList res(list.size); cimglist_for(res,l) res[l] = img*list[l]; return res; } template inline CImgList::type> operator*(const CImgList& list, const CImg& img) { typedef typename cimg::largest::type restype; CImgList res(list.size); cimglist_for(res,l) res[l] = list[l]*img; return res; } template inline CImgList::type> operator*(const CImgList& list1, const CImgList& list2) { typedef typename cimg::largest::type restype; CImgList res(cimg::min(list1.size,list2.size)); cimglist_for(res,l) res[l] = list1[l]*list2[l]; return res; } #ifdef cimg_use_visualcpp6 template inline CImg operator/(const CImg& img, const double val) { return CImg(img,false)/=val; } #else template inline CImg::type> operator/(const CImg& img, const t2& val) { typedef typename cimg::largest::type restype; return CImg(img,false)/=val; } #endif #ifdef cimg_use_visualcpp6 template inline CImg operator/(const double val, CImg& img) { return val*img.get_inverse(); } #else template inline CImg::type> operator/(const t1& val, CImg& img) { return val*img.get_inverse(); } #endif #ifdef cimg_use_visualcpp6 template inline CImgList operator/(const CImgList& list, const double val) { return CImgList(list)/=val; } #else template inline CImgList::type> operator/(const CImgList& list, const t2& val) { typedef typename cimg::largest::type restype; return CImgList(list)/=val; } #endif #ifdef cimg_use_visualcpp6 template inline CImgList operator/(const double val, const CImgList& list) { CImgList res(list.size); cimglist_for(res,l) res[l] = val/list[l]; return res; } #else template inline CImgList::type> operator/(const t1& val, const CImgList& list) { typedef typename cimg::largest::type restype; CImgList res(list.size); cimglist_for(res,l) res[l] = val/list[l]; return res; } #endif template inline CImg::type> operator/(const CImg& img1, const CImg& img2) { typedef typename cimg::largest::type restype; return CImg(img1,false)*=img2.get_inverse(); } template inline CImg::type> operator/(const CImg& img, const CImgList& list) { typedef typename cimg::largest::type restype; CImgList res(list.size); cimglist_for(res,l) res[l] = img/list[l]; return res; } template inline CImgList::type> operator/(const CImgList& list, const CImg& img) { typedef typename cimg::largest::type restype; return CImgList(list)/=img; } template inline CImgList::type> operator/(const CImgList& list1, const CImgList& list2) { typedef typename cimg::largest::type restype; return CImgList(list1)/=list2; } namespace cimg { //! Display a dialog box, where a user can click standard buttons. /** Up to 6 buttons can be defined in the dialog window. This function returns when a user clicked one of the button or closed the dialog window. \param title = Title of the dialog window. \param msg = Main message displayed inside the dialog window. \param button1_txt = Label of the 1st button. \param button2_txt = Label of the 2nd button. \param button3_txt = Label of the 3rd button. \param button4_txt = Label of the 4th button. \param button5_txt = Label of the 5th button. \param button6_txt = Label of the 6th button. \param logo = Logo image displayed at the left of the main message. This parameter is optional. \param centering = Tell to center the dialog window on the screen. \return The button number (from 0 to 5), or -1 if the dialog window has been closed by the user. \note If a button text is set to 0, then the corresponding button (and the followings) won't appear in the dialog box. At least one button is necessary. **/ template inline int dialog(const char *title,const char *msg, const char *button1_txt,const char *button2_txt, const char *button3_txt,const char *button4_txt, const char *button5_txt,const char *button6_txt, const CImg& logo, const bool centering = false) { #if cimg_display_type!=0 const unsigned char black[3]={0,0,0}, white[3]={255,255,255}, gray[3]={200,200,200}, gray2[3]={150,150,150}; // Create buttons and canvas graphics CImgList buttons, cbuttons, sbuttons; if (button1_txt) { buttons.insert(CImg().draw_text(button1_txt,0,0,black,gray,13)); if (button2_txt) { buttons.insert(CImg().draw_text(button2_txt,0,0,black,gray,13)); if (button3_txt) { buttons.insert(CImg().draw_text(button3_txt,0,0,black,gray,13)); if (button4_txt) { buttons.insert(CImg().draw_text(button4_txt,0,0,black,gray,13)); if (button5_txt) { buttons.insert(CImg().draw_text(button5_txt,0,0,black,gray,13)); if (button6_txt) { buttons.insert(CImg().draw_text(button6_txt,0,0,black,gray,13)); }}}}}} if (!buttons.size) throw CImgArgumentException("cimg::dialog() : No buttons have been defined. At least one is necessary"); unsigned int bw=0, bh=0; cimglist_for(buttons,l) { bw = cimg::max(bw,buttons[l].width); bh = cimg::max(bh,buttons[l].height); } bw+=8; bh+=8; if (bw<64) bw=64; if (bw>128) bw=128; if (bh<24) bh=24; if (bh>48) bh=48; CImg button = CImg(bw,bh,1,3). draw_rectangle(0,0,bw-1,bh-1,gray). draw_line(0,0,bw-1,0,white).draw_line(0,bh-1,0,0,white). draw_line(bw-1,0,bw-1,bh-1,black).draw_line(bw-1,bh-1,0,bh-1,black). draw_line(1,bh-2,bw-2,bh-2,gray2).draw_line(bw-2,bh-2,bw-2,1,gray2); CImg sbutton = CImg(bw,bh,1,3). draw_rectangle(0,0,bw-1,bh-1,gray). draw_line(0,0,bw-1,0,black).draw_line(bw-1,0,bw-1,bh-1,black). draw_line(bw-1,bh-1,0,bh-1,black).draw_line(0,bh-1,0,0,black). draw_line(1,1,bw-2,1,white).draw_line(1,bh-2,1,1,white). draw_line(bw-2,1,bw-2,bh-2,black).draw_line(bw-2,bh-2,1,bh-2,black). draw_line(2,bh-3,bw-3,bh-3,gray2).draw_line(bw-3,bh-3,bw-3,2,gray2). draw_line(4,4,bw-5,4,black,0xAAAAAAAA).draw_line(bw-5,4,bw-5,bh-5,black,0xAAAAAAAA). draw_line(bw-5,bh-5,4,bh-5,black,0xAAAAAAAA).draw_line(4,bh-5,4,4,black,0xAAAAAAAA); CImg cbutton = CImg(bw,bh,1,3). draw_rectangle(0,0,bw-1,bh-1,black).draw_rectangle(1,1,bw-2,bh-2,gray2).draw_rectangle(2,2,bw-3,bh-3,gray). draw_line(4,4,bw-5,4,black,0xAAAAAAAA).draw_line(bw-5,4,bw-5,bh-5,black,0xAAAAAAAA). draw_line(bw-5,bh-5,4,bh-5,black,0xAAAAAAAA).draw_line(4,bh-5,4,4,black,0xAAAAAAAA); cimglist_for(buttons,ll) { cbuttons.insert(CImg(cbutton).draw_image(buttons[ll],1+(bw-buttons[ll].dimx())/2,1+(bh-buttons[ll].dimy())/2)); sbuttons.insert(CImg(sbutton).draw_image(buttons[ll],(bw-buttons[ll].dimx())/2,(bh-buttons[ll].dimy())/2)); buttons[ll] = CImg(button).draw_image(buttons[ll],(bw-buttons[ll].dimx())/2,(bh-buttons[ll].dimy())/2); } CImg canvas; if (msg) canvas = CImg().draw_text(msg,0,0,black,gray,13); const unsigned int bwall = (buttons.size-1)*(12+bw) + bw, w = cimg::max(196U,36+logo.width+canvas.width, 24+bwall), h = cimg::max(96U,36+canvas.height+bh,36+logo.height+bh), lx = 12 + (canvas.data?0:((w-24-logo.width)/2)), ly = (h-12-bh-logo.height)/2, tx = lx+logo.width+12, ty = (h-12-bh-canvas.height)/2, bx = (w-bwall)/2, by = h-12-bh; if (canvas.data) canvas = CImg(w,h,1,3). draw_rectangle(0,0,w-1,h-1,gray). draw_line(0,0,w-1,0,white).draw_line(0,h-1,0,0,white). draw_line(w-1,0,w-1,h-1,black).draw_line(w-1,h-1,0,h-1,black). draw_image(canvas,tx,ty); else canvas = CImg(w,h,1,3). draw_rectangle(0,0,w-1,h-1,gray). draw_line(0,0,w-1,0,white).draw_line(0,h-1,0,0,white). draw_line(w-1,0,w-1,h-1,black).draw_line(w-1,h-1,0,h-1,black); if (logo.data) canvas.draw_image(logo,lx,ly); unsigned int xbuttons[6]; cimglist_for(buttons,lll) { xbuttons[lll] = bx+(bw+12)*lll; canvas.draw_image(buttons[lll],xbuttons[lll],by); } // Open window and enter events loop CImgDisplay disp(canvas,title?title:" ",0,3,false,centering?true:false); if (centering) disp.move((CImgDisplay::screen_dimx()-disp.dimx())/2, (CImgDisplay::screen_dimy()-disp.dimy())/2); bool stopflag = false, refresh = false; int oselected = -1, oclicked = -1, selected = -1, clicked = -1; while (!disp.is_closed && !stopflag) { if (refresh) { if (clicked>=0) CImg(canvas).draw_image(cbuttons[clicked],xbuttons[clicked],by).display(disp); else { if (selected>=0) CImg(canvas).draw_image(sbuttons[selected],xbuttons[selected],by).display(disp); else canvas.display(disp); } refresh = false; } disp.wait(15); if (disp.is_resized) disp.resize(disp); if (disp.button&1) { oclicked = clicked; clicked = -1; cimglist_for(buttons,l) if (disp.mouse_y>=(int)by && disp.mouse_y<(int)(by+bh) && disp.mouse_x>=(int)xbuttons[l] && disp.mouse_x<(int)(xbuttons[l]+bw)) { clicked = selected = l; refresh = true; } if (clicked!=oclicked) refresh = true; } else if (clicked>=0) stopflag = true; if (disp.key) { oselected = selected; switch (disp.key) { case cimg::keyESC: selected=-1; stopflag=true; break; case cimg::keyENTER: if (selected<0) selected=0; stopflag = true; break; case cimg::keyTAB: case cimg::keyARROWRIGHT: case cimg::keyARROWDOWN: selected = (selected+1)%buttons.size; break; case cimg::keyARROWLEFT: case cimg::keyARROWUP: selected = (selected+buttons.size-1)%buttons.size; break; } disp.key = 0; if (selected!=oselected) refresh = true; } } if (disp.is_closed) selected = -1; return selected; #else std::fprintf(stderr,"<%s>\n\n%s\n\n",title,msg); return -1+0*(int)(button1_txt-button2_txt+button3_txt-button4_txt+button5_txt-button6_txt+logo.width+(int)centering); #endif } inline int dialog(const char *title,const char *msg, const char *button1_txt,const char *button2_txt,const char *button3_txt, const char *button4_txt,const char *button5_txt,const char *button6_txt, const bool centering) { return dialog(title,msg,button1_txt,button2_txt,button3_txt,button4_txt,button5_txt,button6_txt, CImg::get_logo40x38(),centering); } // Inner routine used by the Marching cube algorithm template inline int _marching_cubes_indice(const unsigned int edge, const CImg& indices1, const CImg& indices2, const unsigned int x, const unsigned int y, const unsigned int nx, const unsigned int ny) { switch (edge) { case 0: return indices1(x,y,0); case 1: return indices1(nx,y,1); case 2: return indices1(x,ny,0); case 3: return indices1(x,y,1); case 4: return indices2(x,y,0); case 5: return indices2(nx,y,1); case 6: return indices2(x,ny,0); case 7: return indices2(x,y,1); case 8: return indices1(x,y,2); case 9: return indices1(nx,y,2); case 10: return indices1(nx,ny,2); case 11: return indices1(x,ny,2); } return 0; } //! Polygonize an implicit function // This function uses the Marching Cubes Tables published on the web page : // http://astronomy.swin.edu.au/~pbourke/modelling/polygonise/ template inline void marching_cubes(const tfunc& func, const float isovalue, const float x0,const float y0,const float z0, const float x1,const float y1,const float z1, const float resx,const float resy,const float resz, CImgList& points, CImgList& primitives, const bool invert_faces) { static unsigned int edges[256]={ 0x000, 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00, 0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c, 0x99c, 0x895, 0xb9f, 0xa96, 0xd9a, 0xc93, 0xf99, 0xe90, 0x230, 0x339, 0x33 , 0x13a, 0x636, 0x73f, 0x435, 0x53c, 0xa3c, 0xb35, 0x83f, 0x936, 0xe3a, 0xf33, 0xc39, 0xd30, 0x3a0, 0x2a9, 0x1a3, 0xaa , 0x7a6, 0x6af, 0x5a5, 0x4ac, 0xbac, 0xaa5, 0x9af, 0x8a6, 0xfaa, 0xea3, 0xda9, 0xca0, 0x460, 0x569, 0x663, 0x76a, 0x66 , 0x16f, 0x265, 0x36c, 0xc6c, 0xd65, 0xe6f, 0xf66, 0x86a, 0x963, 0xa69, 0xb60, 0x5f0, 0x4f9, 0x7f3, 0x6fa, 0x1f6, 0xff , 0x3f5, 0x2fc, 0xdfc, 0xcf5, 0xfff, 0xef6, 0x9fa, 0x8f3, 0xbf9, 0xaf0, 0x650, 0x759, 0x453, 0x55a, 0x256, 0x35f, 0x55 , 0x15c, 0xe5c, 0xf55, 0xc5f, 0xd56, 0xa5a, 0xb53, 0x859, 0x950, 0x7c0, 0x6c9, 0x5c3, 0x4ca, 0x3c6, 0x2cf, 0x1c5, 0xcc , 0xfcc, 0xec5, 0xdcf, 0xcc6, 0xbca, 0xac3, 0x9c9, 0x8c0, 0x8c0, 0x9c9, 0xac3, 0xbca, 0xcc6, 0xdcf, 0xec5, 0xfcc, 0xcc , 0x1c5, 0x2cf, 0x3c6, 0x4ca, 0x5c3, 0x6c9, 0x7c0, 0x950, 0x859, 0xb53, 0xa5a, 0xd56, 0xc5f, 0xf55, 0xe5c, 0x15c, 0x55 , 0x35f, 0x256, 0x55a, 0x453, 0x759, 0x650, 0xaf0, 0xbf9, 0x8f3, 0x9fa, 0xef6, 0xfff, 0xcf5, 0xdfc, 0x2fc, 0x3f5, 0xff , 0x1f6, 0x6fa, 0x7f3, 0x4f9, 0x5f0, 0xb60, 0xa69, 0x963, 0x86a, 0xf66, 0xe6f, 0xd65, 0xc6c, 0x36c, 0x265, 0x16f, 0x66 , 0x76a, 0x663, 0x569, 0x460, 0xca0, 0xda9, 0xea3, 0xfaa, 0x8a6, 0x9af, 0xaa5, 0xbac, 0x4ac, 0x5a5, 0x6af, 0x7a6, 0xaa , 0x1a3, 0x2a9, 0x3a0, 0xd30, 0xc39, 0xf33, 0xe3a, 0x936, 0x83f, 0xb35, 0xa3c, 0x53c, 0x435, 0x73f, 0x636, 0x13a, 0x33 , 0x339, 0x230, 0xe90, 0xf99, 0xc93, 0xd9a, 0xa96, 0xb9f, 0x895, 0x99c, 0x69c, 0x795, 0x49f, 0x596, 0x29a, 0x393, 0x99 , 0x190, 0xf00, 0xe09, 0xd03, 0xc0a, 0xb06, 0xa0f, 0x905, 0x80c, 0x70c, 0x605, 0x50f, 0x406, 0x30a, 0x203, 0x109, 0x000 }; static int triangles[256][16] = {{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1}, {3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1}, {9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1}, {8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1}, {3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1}, {4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1}, {9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1}, {0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1}, {10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1}, {5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1}, {9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1}, {8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1}, {2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1}, {2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1}, {11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1}, {5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1}, {11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1}, {11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1}, {9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1}, {2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1}, {6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1}, {6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1}, {6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1}, {8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1}, {7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1}, {3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1}, {0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1}, {9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1}, {8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1}, {0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1}, {6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1}, {10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1}, {10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1}, {0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1}, {3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1}, {9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1}, {8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1}, {3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1}, {10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1}, {10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1}, {7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1}, {1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1}, {11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1}, {8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1}, {0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1}, {7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1}, {7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1}, {2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1}, {10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1}, {0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1}, {7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1}, {8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1}, {9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1}, {6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1}, {4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1}, {10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1}, {8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1}, {1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1}, {10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1}, {10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1}, {9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1}, {7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1}, {3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1}, {7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1}, {3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1}, {6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1}, {9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1}, {1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1}, {4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1}, {7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1}, {6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1}, {0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1}, {6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1}, {0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1}, {11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1}, {6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1}, {5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1}, {9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1}, {1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1}, {10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1}, {0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1}, {5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1}, {11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1}, {9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1}, {7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1}, {2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1}, {9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1}, {9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1}, {1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1}, {0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1}, {10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1}, {2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1}, {0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1}, {0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1}, {9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1}, {5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1}, {3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1}, {5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1}, {8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1}, {9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1}, {1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1}, {3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1}, {4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1}, {9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1}, {11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1}, {2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1}, {9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1}, {3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1}, {1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1}, {4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1}, {0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1}, {1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}; const unsigned int nx = (unsigned int)((x1-x0+1)/resx), nxm1 = nx-1, ny = (unsigned int)((y1-y0+1)/resy), nym1 = ny-1, nz = (unsigned int)((z1-z0+1)/resz), nzm1 = nz-1; if (!nxm1 || !nym1 || !nzm1) return; CImg indices1(nx,ny,1,3,-1), indices2(indices1); CImg values1(nx,ny), values2(nx,ny); float X=0, Y=0, Z=0, nX=0, nY=0, nZ=0; // Fill the first plane with function values Y=y0; cimg_forY(values1,y) { X = x0; cimg_forX(values1,x) { values1(x,y) = (float)func(X,Y,z0); X+=resx; } Y+=resy; } // Run Marching Cubes algorithm Z = z0; nZ = Z + resz; for (unsigned int zi=0; zi::vector(Xi,Y,Z)); } if ((edge&2) && indices1(nxi,yi,1)<0) { const float Yi = Y + (isovalue-val1)*resy/(val2-val1); indices1(nxi,yi,1) = points.size; points.insert(CImg::vector(nX,Yi,Z)); } if ((edge&4) && indices1(xi,nyi,0)<0) { const float Xi = X + (isovalue-val3)*resx/(val2-val3); indices1(xi,nyi,0) = points.size; points.insert(CImg::vector(Xi,nY,Z)); } if ((edge&8) && indices1(xi,yi,1)<0) { const float Yi = Y + (isovalue-val0)*resy/(val3-val0); indices1(xi,yi,1) = points.size; points.insert(CImg::vector(X,Yi,Z)); } if ((edge&16) && indices2(xi,yi,0)<0) { const float Xi = X + (isovalue-val4)*resx/(val5-val4); indices2(xi,yi,0) = points.size; points.insert(CImg::vector(Xi,Y,nZ)); } if ((edge&32) && indices2(nxi,yi,1)<0) { const float Yi = Y + (isovalue-val5)*resy/(val6-val5); indices2(nxi,yi,1) = points.size; points.insert(CImg::vector(nX,Yi,nZ)); } if ((edge&64) && indices2(xi,nyi,0)<0) { const float Xi = X + (isovalue-val7)*resx/(val6-val7); indices2(xi,nyi,0) = points.size; points.insert(CImg::vector(Xi,nY,nZ)); } if ((edge&128) && indices2(xi,yi,1)<0) { const float Yi = Y + (isovalue-val4)*resy/(val7-val4); indices2(xi,yi,1) = points.size; points.insert(CImg::vector(X,Yi,nZ)); } if ((edge&256) && indices1(xi,yi,2)<0) { const float Zi = Z+ (isovalue-val0)*resz/(val4-val0); indices1(xi,yi,2) = points.size; points.insert(CImg::vector(X,Y,Zi)); } if ((edge&512) && indices1(nxi,yi,2)<0) { const float Zi = Z + (isovalue-val1)*resz/(val5-val1); indices1(nxi,yi,2) = points.size; points.insert(CImg::vector(nX,Y,Zi)); } if ((edge&1024) && indices1(nxi,nyi,2)<0) { const float Zi = Z + (isovalue-val2)*resz/(val6-val2); indices1(nxi,nyi,2) = points.size; points.insert(CImg::vector(nX,nY,Zi)); } if ((edge&2048) && indices1(xi,nyi,2)<0) { const float Zi = Z + (isovalue-val3)*resz/(val7-val3); indices1(xi,nyi,2) = points.size; points.insert(CImg::vector(X,nY,Zi)); } // Create triangles for (int *triangle=triangles[configuration]; *triangle!=-1; ) { const unsigned int p0 = *(triangle++), p1 = *(triangle++), p2 = *(triangle++); const tf i0 = (tf)(_marching_cubes_indice(p0,indices1,indices2,xi,yi,nxi,nyi)), i1 = (tf)(_marching_cubes_indice(p1,indices1,indices2,xi,yi,nxi,nyi)), i2 = (tf)(_marching_cubes_indice(p2,indices1,indices2,xi,yi,nxi,nyi)); if (invert_faces) primitives.insert(CImg::vector(i0,i1,i2)); else primitives.insert(CImg::vector(i0,i2,i1)); } } } } cimg::swap(values1,values2); cimg::swap(indices1,indices2); } } // Inner routine used by the Marching square algorithm template inline int _marching_squares_indice(const unsigned int edge, const CImg& indices1, const CImg& indices2, const unsigned int x, const unsigned int nx) { switch (edge) { case 0: return (int)indices1(x,0); case 1: return (int)indices1(nx,1); case 2: return (int)indices2(x,0); case 3: return (int)indices1(x,1); } return 0; } //! Polygonize an implicit 2D function by the marching squares algorithm template inline void marching_squares(const tfunc& func, const float isovalue, const float x0,const float y0, const float x1,const float y1, const float resx,const float resy, CImgList& points, CImgList& primitives) { static unsigned int edges[16]={ 0x0, 0x9, 0x3, 0xa, 0x6, 0xf, 0x5, 0xc, 0xc, 0x5, 0xf, 0x6, 0xa, 0x3, 0x9, 0x0 }; static int segments[16][4] = { { -1,-1,-1,-1 }, { 0,3,-1,-1 }, { 0,1,-1,-1 }, { 1,3,-1,-1 }, { 1,2,-1,-1 }, { 0,1,2,3 }, { 0,2,-1,-1 }, { 2,3,-1,-1 }, { 2,3,-1,-1 }, { 0,2,-1,-1}, { 0,3,1,2 }, { 1,2,-1,-1 }, { 1,3,-1,-1 }, { 0,1,-1,-1}, { 0,3,-1,-1}, { -1,-1,-1,-1 } }; const unsigned int nx = (unsigned int)((x1-x0+1)/resx), nxm1 = nx-1, ny = (unsigned int)((y1-y0+1)/resy), nym1 = ny-1; if (!nxm1 || !nym1) return; CImg indices1(nx,1,1,2,-1), indices2(nx,1,1,2); CImg values1(nx), values2(nx); float X = 0, Y = 0, nX = 0, nY = 0; // Fill first line with values cimg_forX(values1,x) { values1(x) = (float)func(X,Y); X+=resx; } // Run the marching squares algorithm Y = y0; nY = Y + resy; for (unsigned int yi=0, nyi=1; yi::vector(Xi,Y)); } if ((edge&2) && indices1(nxi,1)<0) { const float Yi = Y + (isovalue-val1)*resy/(val2-val1); indices1(nxi,1) = points.size; points.insert(CImg::vector(nX,Yi)); } if ((edge&4) && indices2(xi,0)<0) { const float Xi = X + (isovalue-val3)*resx/(val2-val3); indices2(xi,0) = points.size; points.insert(CImg::vector(Xi,nY)); } if ((edge&8) && indices1(xi,1)<0) { const float Yi = Y + (isovalue-val0)*resy/(val3-val0); indices1(xi,1) = points.size; points.insert(CImg::vector(X,Yi)); } // Create segments for (int *segment=segments[configuration]; *segment!=-1; ) { const unsigned int p0 = *(segment++), p1 = *(segment++); const tf i0 = (tf)(_marching_squares_indice(p0,indices1,indices2,xi,nxi)), i1 = (tf)(_marching_squares_indice(p1,indices1,indices2,xi,nxi)); primitives.insert(CImg::vector(i0,i1)); } } } values1.swap(values2); indices1.swap(indices2); } } // End of cimg:: namespace } // End of cimg_library:: namespace } #ifdef std #undef std #endif #endif // Local Variables: // mode: c++ // End: vips-7.38.5/libvips/cimg/cimg_dispatch.c0000644000175000017500000001125712303140253015050 00000000000000/* Function dispatch tables for cimg wrappers. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * SECTION: cimg_funcs * @short_description: expose operations from the CImg library, mostly noise * removal * @stability: Stable * @include: vips/vips.h * * The GREYCstoration filter. */ static int greyc_vec( im_object *argv ) { IMAGE *src = (IMAGE *) argv[0]; IMAGE *dst = (IMAGE *) argv[1]; int iterations = *((int *) argv[2]); double amplitude = *((double *) argv[3]); double sharpness = *((double *) argv[4]); double anisotropy = *((double *) argv[5]); double alpha = *((double *) argv[6]); double sigma = *((double *) argv[7]); double dl = *((double *) argv[8]); double da = *((double *) argv[9]); double gauss_prec = *((double *) argv[10]); int interpolation = *((int *) argv[11]); int fast_approx = *((int *) argv[12]); if( im_greyc_mask( src, dst, NULL, iterations, amplitude, sharpness, anisotropy, alpha, sigma, dl, da, gauss_prec, interpolation, fast_approx ) ) return( -1 ); return( 0 ); } static im_arg_desc greyc_arg_types[] = { IM_INPUT_IMAGE( "src" ), IM_OUTPUT_IMAGE( "dst" ), IM_INPUT_INT( "iterations" ), IM_INPUT_DOUBLE( "amplitude" ), IM_INPUT_DOUBLE( "sharpness" ), IM_INPUT_DOUBLE( "anisotropy" ), IM_INPUT_DOUBLE( "alpha" ), IM_INPUT_DOUBLE( "sigma" ), IM_INPUT_DOUBLE( "dl" ), IM_INPUT_DOUBLE( "da" ), IM_INPUT_DOUBLE( "gauss_prec" ), IM_INPUT_INT( "interpolation" ), IM_INPUT_INT( "fast_approx" ) }; static im_function greyc_desc = { "im_greyc", /* Name */ "noise-removing filter", /* Description */ (im_fn_flags) (IM_FN_TRANSFORM | IM_FN_PIO),/* Flags */ greyc_vec, /* Dispatch function */ IM_NUMBER( greyc_arg_types ), /* Size of arg list */ greyc_arg_types /* Arg list */ }; static int greyc_mask_vec( im_object *argv ) { IMAGE *src = (IMAGE *) argv[0]; IMAGE *dst = (IMAGE *) argv[1]; IMAGE *mask = (IMAGE *) argv[2]; int iterations = *((int *) argv[3]); double amplitude = *((double *) argv[4]); double sharpness = *((double *) argv[5]); double anisotropy = *((double *) argv[6]); double alpha = *((double *) argv[7]); double sigma = *((double *) argv[8]); double dl = *((double *) argv[9]); double da = *((double *) argv[10]); double gauss_prec = *((double *) argv[11]); int interpolation = *((int *) argv[12]); int fast_approx = *((int *) argv[13]); if( im_greyc_mask( src, dst, mask, iterations, amplitude, sharpness, anisotropy, alpha, sigma, dl, da, gauss_prec, interpolation, fast_approx ) ) return( -1 ); return( 0 ); } static im_arg_desc greyc_mask_arg_types[] = { IM_INPUT_IMAGE( "src" ), IM_OUTPUT_IMAGE( "dst" ), IM_INPUT_IMAGE( "mask" ), IM_INPUT_INT( "iterations" ), IM_INPUT_DOUBLE( "amplitude" ), IM_INPUT_DOUBLE( "sharpness" ), IM_INPUT_DOUBLE( "anisotropy" ), IM_INPUT_DOUBLE( "alpha" ), IM_INPUT_DOUBLE( "sigma" ), IM_INPUT_DOUBLE( "dl" ), IM_INPUT_DOUBLE( "da" ), IM_INPUT_DOUBLE( "gauss_prec" ), IM_INPUT_INT( "interpolation" ), IM_INPUT_INT( "fast_approx" ) }; static im_function greyc_mask_desc = { "im_greyc_mask", /* Name */ "noise-removing filter, with a mask", /* Description */ (im_fn_flags) (IM_FN_TRANSFORM | IM_FN_PIO),/* Flags */ greyc_mask_vec, /* Dispatch function */ IM_NUMBER( greyc_mask_arg_types ),/* Size of arg list */ greyc_mask_arg_types /* Arg list */ }; static im_function *function_list[] = { &greyc_desc, &greyc_mask_desc }; /* Package of functions. */ im_package im__cimg = { "cimg", IM_NUMBER( function_list ), function_list }; vips-7.38.5/libvips/conversion/0000755000175000017500000000000012303146330013430 500000000000000vips-7.38.5/libvips/conversion/rot.c0000644000175000017500000002001012303140253014307 00000000000000/* rotate by 0/90/180/270 degrees * * Copyright: 1991, N. Dessipris * Written on: 28/10/91 * Updated on: 2/4/92, J.Cupitt * bugs in im_la90rot fixed, now works for any type. * 19/7/93 JC * - IM_CODING_LABQ allowed now * 15/11/94 JC * - name changed * - memory leaks fixed * 8/2/95 JC * - oops! memory allocation problem fixed * 18/5/95 JC * - IM_MAXLINES increased * 13/8/96 JC * - rewritten for partials * 6/11/02 JC * - speed-up ... replace memcpy() with a loop for small pixels * 14/4/04 * - sets Xoffset / Yoffset * 24/3/09 * - added IM_CODING_RAD support * 1/2/10 * - cleanups * - gtkdoc * 4/11/11 * - rewrite as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsRot { VipsConversion parent_instance; /* The input image. */ VipsImage *in; /* Rotate by ... */ VipsAngle angle; } VipsRot; typedef VipsConversionClass VipsRotClass; G_DEFINE_TYPE( VipsRot, vips_rot, VIPS_TYPE_CONVERSION ); static int vips_rot90_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsImage *in = (VipsImage *) a; /* Output area. */ VipsRect *r = &or->valid; int le = r->left; int ri = IM_RECT_RIGHT(r); int to = r->top; int bo = IM_RECT_BOTTOM(r); int x, y, i; /* Pixel geometry. */ int ps, ls; /* Find the area of the input image we need. */ VipsRect need; need.left = to; need.top = in->Ysize - ri; need.width = r->height; need.height = r->width; if( vips_region_prepare( ir, &need ) ) return( -1 ); /* Find PEL size and line skip for ir. */ ps = VIPS_IMAGE_SIZEOF_PEL( in ); ls = VIPS_REGION_LSKIP( ir ); /* Rotate the bit we now have. */ for( y = to; y < bo; y++ ) { /* Start of this output line. */ VipsPel *q = VIPS_REGION_ADDR( or, le, y ); /* Corresponding position in ir. */ VipsPel *p = VIPS_REGION_ADDR( ir, need.left + y - to, need.top + need.height - 1 ); for( x = le; x < ri; x++ ) { for( i = 0; i < ps; i++ ) q[i] = p[i]; q += ps; p -= ls; } } return( 0 ); } static int vips_rot180_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsImage *in = (VipsImage *) a; /* Output area. */ VipsRect *r = &or->valid; int le = r->left; int ri = IM_RECT_RIGHT(r); int to = r->top; int bo = IM_RECT_BOTTOM(r); int x, y; /* Pixel geometry. */ int ps; /* Find the area of the input image we need. */ Rect need; need.left = in->Xsize - ri; need.top = in->Ysize - bo; need.width = r->width; need.height = r->height; if( vips_region_prepare( ir, &need ) ) return( -1 ); /* Find PEL size and line skip for ir. */ ps = VIPS_IMAGE_SIZEOF_PEL( in ); /* Rotate the bit we now have. */ for( y = to; y < bo; y++ ) { /* Start of this output line. */ VipsPel *q = VIPS_REGION_ADDR( or, le, y ); /* Corresponding position in ir. */ VipsPel *p = VIPS_REGION_ADDR( ir, need.left + need.width - 1, need.top + need.height - (y - to) - 1 ); /* Blap across! */ for( x = le; x < ri; x++ ) { memcpy( q, p, ps ); q += ps; p -= ps; } } return( 0 ); } static int vips_rot270_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsImage *in = (VipsImage *) a; /* Output area. */ VipsRect *r = &or->valid; int le = r->left; int ri = IM_RECT_RIGHT(r); int to = r->top; int bo = IM_RECT_BOTTOM(r); int x, y, i; /* Pixel geometry. */ int ps, ls; /* Find the area of the input image we need. */ VipsRect need; need.left = in->Xsize - bo; need.top = le; need.width = r->height; need.height = r->width; if( vips_region_prepare( ir, &need ) ) return( -1 ); /* Find PEL size and line skip for ir. */ ps = VIPS_IMAGE_SIZEOF_PEL( in ); ls = VIPS_REGION_LSKIP( ir ); /* Rotate the bit we now have. */ for( y = to; y < bo; y++ ) { /* Start of this output line. */ VipsPel *q = VIPS_REGION_ADDR( or, le, y ); /* Corresponding position in ir. */ VipsPel *p = VIPS_REGION_ADDR( ir, need.left + need.width - (y - to) - 1, need.top ); for( x = le; x < ri; x++ ) { for( i = 0; i < ps; i++ ) q[i] = p[i]; q += ps; p += ls; } } return( 0 ); } static int vips_rot_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsRot *rot = (VipsRot *) object; VipsGenerateFn generate_fn; VipsDemandStyle hint; if( VIPS_OBJECT_CLASS( vips_rot_parent_class )->build( object ) ) return( -1 ); if( rot->angle == VIPS_ANGLE_0 ) return( vips_image_write( rot->in, conversion->out ) ); if( vips_image_pio_input( rot->in ) ) return( -1 ); hint = rot->angle == VIPS_ANGLE_180 ? VIPS_DEMAND_STYLE_THINSTRIP : VIPS_DEMAND_STYLE_SMALLTILE; if( vips_image_pipelinev( conversion->out, hint, rot->in, NULL ) ) return( -1 ); switch( rot->angle ) { case VIPS_ANGLE_90: generate_fn = vips_rot90_gen; conversion->out->Xsize = rot->in->Ysize; conversion->out->Ysize = rot->in->Xsize; conversion->out->Xoffset = rot->in->Ysize; conversion->out->Yoffset = 0; break; case VIPS_ANGLE_180: generate_fn = vips_rot180_gen; conversion->out->Xoffset = rot->in->Xsize; conversion->out->Yoffset = rot->in->Ysize; break; case VIPS_ANGLE_270: generate_fn = vips_rot270_gen; conversion->out->Xsize = rot->in->Ysize; conversion->out->Ysize = rot->in->Xsize; conversion->out->Xoffset = 0; conversion->out->Yoffset = rot->in->Xsize; break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } if( vips_image_generate( conversion->out, vips_start_one, generate_fn, vips_stop_one, rot->in, rot ) ) return( -1 ); return( 0 ); } static void vips_rot_class_init( VipsRotClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_rot_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "rot"; vobject_class->description = _( "rotate an image" ); vobject_class->build = vips_rot_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRot, in ) ); VIPS_ARG_ENUM( class, "angle", 6, _( "Angle" ), _( "Angle to rotate image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRot, angle ), VIPS_TYPE_ANGLE, VIPS_ANGLE_90 ); } static void vips_rot_init( VipsRot *rot ) { } /** * vips_rot: * @in: input image * @out: output image * @angle: rotation angle * @...: %NULL-terminated list of optional named arguments * * Rotate @in by a multiple of 90 degrees. * * See also: vips_flip(). * * Returns: 0 on success, -1 on error */ int vips_rot( VipsImage *in, VipsImage **out, VipsAngle angle, ... ) { va_list ap; int result; va_start( ap, angle ); result = vips_call_split( "rot", ap, in, out, angle ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/conversion.c0000644000175000017500000002442012303140253015701 00000000000000/* base class for all conversion operations * * properties: * - single output image */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pconversion.h" /** * SECTION: conversion * @short_description: convert images in some way: change band format, change header, insert, extract, join * @see_also: resample * @stability: Stable * @include: vips/vips.h * * These operations convert an image in some way. They can be split into a two * main groups. * * The first set of operations change an image's format in some way. You * can change the band format (for example, cast to 32-bit unsigned * int), form complex images from real images, convert images to * matrices and back, change header fields, and a few others. * * The second group move pixels about in some way. You can flip, rotate, * extract, insert and join pairs of images in various ways. * */ /** * VipsAlign: * @VIPS_ALIGN_LOW: align low coordinate edge * @VIPS_ALIGN_CENTRE: align centre * @VIPS_ALIGN_HIGH: align high coordinate edge * * See vips_join() and so on. * * Operations like vips_join() need to be told whether to align images on the * low or high coordinate edge, or centre. * * See also: vips_join(). */ /** * VipsAngle: * @VIPS_ANGLE_0: no rotate * @VIPS_ANGLE_90: 90 degrees anti-clockwise * @VIPS_ANGLE_180: 180 degree rotate * @VIPS_ANGLE_270: 90 degrees clockwise * * See vips_rot() and so on. * * Fixed rotate angles. * * See also: vips_rot(). */ /** * VipsExtend: * @VIPS_EXTEND_BLACK: extend with black (all 0) pixels * @VIPS_EXTEND_COPY: copy the image edges * @VIPS_EXTEND_REPEAT: repeat the whole image * @VIPS_EXTEND_MIRROR: mirror the whole image * @VIPS_EXTEND_WHITE: extend with white (all bits set) pixels * @VIPS_EXTEND_BACKGROUND: extend with colour from the @background property * * See vips_embed(), vips_conv(), vips_affine() and so on. * * When the edges of an image are extended, you can specify * how you want the extension done. * * #VIPS_EXTEND_BLACK --- new pixels are black, ie. all bits are zero. * * #VIPS_EXTEND_COPY --- each new pixel takes the value of the nearest edge * pixel * * #VIPS_EXTEND_REPEAT --- the image is tiled to fill the new area * * #VIPS_EXTEND_MIRROR --- the image is reflected and tiled to reduce hash * edges * * #VIPS_EXTEND_WHITE --- new pixels are white, ie. all bits are set * * #VIPS_EXTEND_BACKGROUND --- colour set from the @background property * * We have to specify the exact value of each enum member since we have to * keep these frozen for back compat with vips7. * * See also: vips_embed(). */ /** * VipsDirection: * @VIPS_DIRECTION_HORIZONTAL: left-right * @VIPS_DIRECTION_VERTICAL: top-bottom * * See vips_flip(), vips_join() and so on. * * Operations like vips_flip() need to be told whether to flip left-right or * top-bottom. * * See also: vips_flip(), vips_join(). */ G_DEFINE_ABSTRACT_TYPE( VipsConversion, vips_conversion, VIPS_TYPE_OPERATION ); static int vips_conversion_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); #ifdef DEBUG printf( "vips_conversion_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_object_set( conversion, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_conversion_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_conversion_class_init( VipsConversionClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "conversion"; vobject_class->description = _( "conversion operations" ); vobject_class->build = vips_conversion_build; VIPS_ARG_IMAGE( class, "out", 1, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsConversion, out ) ); } static void vips_conversion_init( VipsConversion *conversion ) { } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_conversion_operation_init( void ) { extern GType vips_copy_get_type( void ); extern GType vips_tile_cache_get_type( void ); extern GType vips_line_cache_get_type( void ); extern GType vips_sequential_get_type( void ); extern GType vips_cache_get_type( void ); extern GType vips_embed_get_type( void ); extern GType vips_flip_get_type( void ); extern GType vips_insert_get_type( void ); extern GType vips_join_get_type( void ); extern GType vips_extract_area_get_type( void ); extern GType vips_crop_get_type( void ); extern GType vips_extract_band_get_type( void ); extern GType vips_replicate_get_type( void ); extern GType vips_cast_get_type( void ); extern GType vips_bandjoin_get_type( void ); extern GType vips_bandrank_get_type( void ); extern GType vips_black_get_type( void ); extern GType vips_rot_get_type( void ); extern GType vips_rot45_get_type( void ); extern GType vips_ifthenelse_get_type( void ); extern GType vips_recomb_get_type( void ); extern GType vips_bandmean_get_type( void ); extern GType vips_flatten_get_type( void ); extern GType vips_bandbool_get_type( void ); extern GType vips_gaussnoise_get_type( void ); extern GType vips_grid_get_type( void ); extern GType vips_scale_get_type( void ); extern GType vips_wrap_get_type( void ); extern GType vips_zoom_get_type( void ); extern GType vips_subsample_get_type( void ); extern GType vips_msb_get_type( void ); #ifdef HAVE_PANGOFT2 extern GType vips_text_get_type( void ); #endif /*HAVE_PANGOFT2*/ extern GType vips_xyz_get_type( void ); extern GType vips_falsecolour_get_type( void ); extern GType vips_gamma_get_type( void ); vips_copy_get_type(); vips_tile_cache_get_type(); vips_line_cache_get_type(); vips_sequential_get_type(); vips_cache_get_type(); vips_embed_get_type(); vips_flip_get_type(); vips_insert_get_type(); vips_join_get_type(); vips_extract_area_get_type(); vips_crop_get_type(); vips_extract_band_get_type(); vips_replicate_get_type(); vips_cast_get_type(); vips_bandjoin_get_type(); vips_bandrank_get_type(); vips_black_get_type(); vips_rot_get_type(); vips_rot45_get_type(); vips_ifthenelse_get_type(); vips_recomb_get_type(); vips_bandmean_get_type(); vips_flatten_get_type(); vips_bandbool_get_type(); vips_gaussnoise_get_type(); vips_grid_get_type(); vips_scale_get_type(); vips_wrap_get_type(); vips_zoom_get_type(); vips_subsample_get_type(); vips_msb_get_type(); #ifdef HAVE_PANGOFT2 vips_text_get_type(); #endif /*HAVE_PANGOFT2*/ vips_xyz_get_type(); vips_falsecolour_get_type(); vips_gamma_get_type(); } /* The common part of most binary conversion * operators. We: * * - check in and out * - cast in1 and in2 up to a common format * - equalise bands * - make an input array * - return the matched images in vec[0] and vec[1] * * A left-over, remove soon. */ IMAGE ** im__insert_base( const char *domain, IMAGE *in1, IMAGE *in2, IMAGE *out ) { IMAGE *t[4]; IMAGE **vec; if( im_piocheck( in1, out ) || im_pincheck( in2 ) || im_check_bands_1orn( domain, in1, in2 ) || im_check_coding_known( domain, in1 ) || im_check_coding_same( domain, in1, in2 ) ) return( NULL ); /* Cast our input images up to a common format and bands. */ if( im_open_local_array( out, t, 4, domain, "p" ) || im__formatalike( in1, in2, t[0], t[1] ) || im__bandalike( domain, t[0], t[1], t[2], t[3] ) || !(vec = im_allocate_input_array( out, t[2], t[3], NULL )) ) return( NULL ); /* Generate the output. */ if( im_cp_descv( out, vec[0], vec[1], NULL ) || im_demand_hint_array( out, IM_SMALLTILE, vec ) ) return( NULL ); return( vec ); } /** * im_insertset: * @main: big image * @sub: small image * @out: output image * @n: number of positions * @x: left positions of @sub * @y: top positions of @sub * * Insert @sub repeatedly into @main at the positions listed in the arrays @x, * @y of length @n. @out is the same * size as @main. @sub is clipped against the edges of @main. * * This operation is fast for large @n, but will use a memory buffer the size * of @out. It's useful for things like making scatter plots. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: im_insert(), im_lrjoin(). * * Returns: 0 on success, -1 on error */ int im_insertset( IMAGE *main, IMAGE *sub, IMAGE *out, int n, int *x, int *y ) { IMAGE **vec; IMAGE *t; int i; if( !(vec = im__insert_base( "im_insert", main, sub, out )) ) return( -1 ); /* Copy to a memory image, zap that, then copy to out. */ if( !(t = im_open_local( out, "im_insertset", "t" )) || im_copy( vec[0], t ) ) return( -1 ); for( i = 0; i < n; i++ ) if( im_insertplace( t, vec[1], x[i], y[i] ) ) return( -1 ); if( im_copy( t, out ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/conversion/grid.c0000644000175000017500000001506012303140253014441 00000000000000/* vips_grid * * 4/8/05 * 7/9/05 * - oops, clipping was wrong * 30/1/10 * - gtkdoc * - small cleanups * 30/5/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pconversion.h" typedef struct _VipsGrid { VipsConversion parent_instance; VipsImage *in; int tile_height; int across; int down; } VipsGrid; typedef VipsConversionClass VipsGridClass; G_DEFINE_TYPE( VipsGrid, vips_grid, VIPS_TYPE_CONVERSION ); static int vips_grid_gen( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) vseq; VipsGrid *grid = (VipsGrid *) b; VipsRect *r = &or->valid; int twidth = grid->in->Xsize; int theight = grid->tile_height; int x, y; VipsRect tile; /* Find top left of tiles we need. */ int xs = (r->left / twidth) * twidth; int ys = (r->top / theight) * theight; /* The tile enclosing the top-left corner of the requested area. */ tile.left = xs; tile.top = ys; tile.width = twidth; tile.height = theight; /* If the request fits inside a single tile, we can just pointer-copy. */ if( vips_rect_includesrect( &tile, r ) ) { Rect irect; /* Translate request to input space. */ irect = *r; irect.left -= xs; irect.top -= ys; irect.top += grid->across * ys + theight * (xs / twidth); if( vips_region_prepare( ir, &irect ) || vips_region_region( or, ir, r, irect.left, irect.top ) ) return( -1 ); return( 0 ); } for( y = ys; y < VIPS_RECT_BOTTOM( r ); y += theight ) for( x = xs; x < VIPS_RECT_RIGHT( r ); x += twidth ) { VipsRect paint; VipsRect input; /* Whole tile at x, y */ tile.left = x; tile.top = y; tile.width = twidth; tile.height = theight; /* Which parts touch the area of the output we are * building. */ vips_rect_intersectrect( &tile, r, &paint ); g_assert( !vips_rect_isempty( &paint ) ); /* Translate back to ir coordinates. */ input = paint; input.left -= x; input.top -= y; input.top += grid->across * y + theight * (x / twidth); /* Render into or. */ if( vips_region_prepare_to( ir, or, &input, paint.left, paint.top ) ) return( -1 ); } return( 0 ); } static int vips_grid_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsGrid *grid = (VipsGrid *) object; if( VIPS_OBJECT_CLASS( vips_grid_parent_class )->build( object ) ) return( -1 ); if( vips_check_coding_known( class->nickname, grid->in ) || vips_image_pio_input( grid->in ) ) return( -1 ); if( grid->in->Ysize % grid->tile_height != 0 || grid->in->Ysize / grid->tile_height != grid->across * grid->down ) { vips_error( class->nickname, "%s", _( "bad grid geometry" ) ); return( -1 ); } /* We can render small tiles with pointer copies. */ if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_SMALLTILE, grid->in, NULL ) ) return( -1 ); conversion->out->Xsize = grid->in->Xsize * grid->across; conversion->out->Ysize = grid->tile_height * grid->down; if( vips_image_generate( conversion->out, vips_start_one, vips_grid_gen, vips_stop_one, grid->in, grid ) ) return( -1 ); return( 0 ); } static void vips_grid_class_init( VipsGridClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "grid"; vobject_class->description = _( "grid an image" ); vobject_class->build = vips_grid_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGrid, in ) ); VIPS_ARG_INT( class, "tile_height", 3, _( "Tile height" ), _( "chop into tiles this high" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGrid, tile_height ), 1, 10000000, 128 ); VIPS_ARG_INT( class, "across", 4, _( "Across" ), _( "number of tiles across" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGrid, across ), 1, 10000000, 1 ); VIPS_ARG_INT( class, "down", 5, _( "Down" ), _( "number of tiles down" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGrid, down ), 1, 10000000, 1 ); } static void vips_grid_init( VipsGrid *grid ) { grid->tile_height = 128; grid->across = 1; grid->down = 1; } /** * vips_grid: * @in: input image * @out: output image * @tile_height: chop into tiles this high * @across: tiles across * @down: tiles down * @...: %NULL-terminated list of optional named arguments * * Chop a tall thin image up into a set of tiles, lay the tiles out in a grid. * * The input image should be a very tall, thin image containing a list of * smaller images. Volumetric or time-sequence images are often laid out like * this. This image is chopped into a series of tiles, each @tile_height * pixels high and the width of @in. The tiles are then rearranged into a grid * @across tiles across and @down tiles down in row-major order. * * Supplying @tile_height, @across and @down is not strictly necessary, we * only really need two of these. Requiring three is a double-check that the * image has the expected geometry. * * See also: vips_embed(), vips_insert(), vips_join(). * * Returns: 0 on success, -1 on error */ int vips_grid( VipsImage *in, VipsImage **out, int tile_height, int across, int down, ... ) { va_list ap; int result; va_start( ap, down ); result = vips_call_split( "grid", ap, in, out, tile_height, across, down ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/recomb.c0000644000175000017500000001441312303141142014762 00000000000000/* recomb.c ... pass an image though a matrix * * 21/6/95 JC * - mildly modernised * 14/3/96 JC * - better error checks, partial * 4/11/09 * - gtkdoc * 9/11/11 * - redo as a class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pconversion.h" typedef struct _VipsRecomb { VipsConversion parent_instance; VipsImage *in; VipsImage *m; /* Our input matrix as a one-band double. */ VipsImage *coeff; } VipsRecomb; typedef VipsConversionClass VipsRecombClass; G_DEFINE_TYPE( VipsRecomb, vips_recomb, VIPS_TYPE_CONVERSION ); /* Inner loop. */ #define LOOP( IN, OUT ) { \ IN * restrict p = (IN *) in; \ OUT * restrict q = (OUT *) out; \ \ for( x = 0; x < or->valid.width; x++ ) { \ double * restrict m = VIPS_MATRIX( recomb->coeff, 0, 0 ); \ \ for( v = 0; v < mheight; v++ ) { \ double t; \ \ t = 0.0; \ \ for( u = 0; u < mwidth; u++ ) \ t += m[u] * p[u]; \ \ q[v] = (OUT) t; \ m += mwidth; \ } \ \ p += mwidth; \ q += mheight; \ } \ } static int vips_recomb_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsRecomb *recomb = (VipsRecomb *) b; VipsImage *im = recomb->in; int mwidth = recomb->m->Xsize; int mheight = recomb->m->Ysize; int y, x, u, v; if( vips_region_prepare( ir, &or->valid ) ) return( -1 ); for( y = 0; y < or->valid.height; y++ ) { VipsPel *in = VIPS_REGION_ADDR( ir, or->valid.left, or->valid.top + y ); VipsPel *out = VIPS_REGION_ADDR( or, or->valid.left, or->valid.top + y ); switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char, float ); break; case VIPS_FORMAT_CHAR: LOOP( signed char, float ); break; case VIPS_FORMAT_USHORT:LOOP( unsigned short, float ); break; case VIPS_FORMAT_SHORT: LOOP( signed short, float ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int, float ); break; case VIPS_FORMAT_INT: LOOP( signed int, float ); break; case VIPS_FORMAT_FLOAT: LOOP( float, float ); break; case VIPS_FORMAT_DOUBLE:LOOP( double, double ); break; default: g_assert( 0 ); } } return( 0 ); } static int vips_recomb_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = (VipsConversion *) object; VipsRecomb *recomb = (VipsRecomb *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 2 ); if( VIPS_OBJECT_CLASS( vips_recomb_parent_class )->build( object ) ) return( -1 ); if( vips_image_pio_input( recomb->in ) || vips_check_uncoded( class->nickname, recomb->in ) || vips_check_noncomplex( class->nickname, recomb->in ) ) return( -1 ); if( vips_image_pio_input( recomb->m ) || vips_check_uncoded( class->nickname, recomb->m ) || vips_check_noncomplex( class->nickname, recomb->m ) || vips_check_mono( class->nickname, recomb->m ) ) return( -1 ); if( recomb->in->Bands != recomb->m->Xsize ) { vips_error( class->nickname, "%s", _( "bands in must equal matrix width" ) ); return( -1 ); } if( vips_check_matrix( class->nickname, recomb->m, &t[0] ) ) return( -1 ); recomb->coeff = t[0]; if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, recomb->in, NULL ) ) return( -1 ); conversion->out->Bands = recomb->m->Ysize; if( vips_bandfmt_isint( recomb->in->BandFmt ) ) conversion->out->BandFmt = VIPS_FORMAT_FLOAT; if( vips_image_generate( conversion->out, vips_start_one, vips_recomb_gen, vips_stop_one, recomb->in, recomb ) ) return( -1 ); return( 0 ); } static void vips_recomb_class_init( VipsRecombClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "recomb"; object_class->description = _( "linear recombination with matrix" ); object_class->build = vips_recomb_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRecomb, in ) ); VIPS_ARG_IMAGE( class, "m", 102, _( "M" ), _( "matrix of coefficients" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRecomb, m ) ); } static void vips_recomb_init( VipsRecomb *recomb ) { } /** * vips_recomb: * @in: input image * @out: output image * @m: recombination matrix * @...: %NULL-terminated list of optional named arguments * * This operation recombines an image's bands. Each pixel in @in is treated as * an n-element vector, where n is the number of bands in @in, and multipled by * the n x m matrix @m to produce the m-band image @out. * * @out is always float, unless @in is double, in which case @out is double * too. No complex images allowed. * * It's useful for various sorts of colour space conversions. * * See also: vips_bandmean(). * * Returns: 0 on success, -1 on error */ int vips_recomb( VipsImage *in, VipsImage **out, VipsImage *m, ... ) { va_list ap; int result; va_start( ap, m ); result = vips_call_split( "recomb", ap, in, out, m ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/falsecolour.c0000644000175000017500000002041212303141142016025 00000000000000/* im_falsecolour * * 23/6/95 JC * - rewritten for PIO * - now walks edges of colour cube to get more saturated appearance * 21/8/05 * - uses falsecolour scale from PET scanner * 7/4/06 * - hmm, reversed scale * 29/1/10 * - cleanups * - gtkdoc * 12/7/11 * - force input to mono 8-bit for the user * 1/8/13 * - redone as a class * 23/1/14 * - oops, was not auto-getting and casting the first band */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pconversion.h" typedef struct _VipsFalsecolour { VipsConversion parent_instance; VipsImage *in; } VipsFalsecolour; typedef VipsConversionClass VipsFalsecolourClass; G_DEFINE_TYPE( VipsFalsecolour, vips_falsecolour, VIPS_TYPE_CONVERSION ); /* Falsecolour scale nicked from a PET scan. */ static unsigned char vips_falsecolour_pet[][3] = { { 12, 0, 25 }, { 17, 0, 34 }, { 20, 0, 41 }, { 22, 0, 45 }, { 23, 0, 47 }, { 27, 0, 55 }, { 12, 0, 25 }, { 5, 0, 11 }, { 5, 0, 11 }, { 5, 0, 11 }, { 1, 0, 4 }, { 1, 0, 4 }, { 6, 0, 13 }, { 15, 0, 30 }, { 19, 0, 40 }, { 23, 0, 48 }, { 28, 0, 57 }, { 36, 0, 74 }, { 42, 0, 84 }, { 46, 0, 93 }, { 51, 0, 102 }, { 59, 0, 118 }, { 65, 0, 130 }, { 69, 0, 138 }, { 72, 0, 146 }, { 81, 0, 163 }, { 47, 0, 95 }, { 12, 0, 28 }, { 64, 0, 144 }, { 61, 0, 146 }, { 55, 0, 140 }, { 52, 0, 137 }, { 47, 0, 132 }, { 43, 0, 128 }, { 38, 0, 123 }, { 30, 0, 115 }, { 26, 0, 111 }, { 23, 0, 108 }, { 17, 0, 102 }, { 9, 0, 94 }, { 6, 0, 91 }, { 2, 0, 87 }, { 0, 0, 88 }, { 0, 0, 100 }, { 0, 0, 104 }, { 0, 0, 108 }, { 0, 0, 113 }, { 0, 0, 121 }, { 0, 0, 125 }, { 0, 0, 129 }, { 0, 0, 133 }, { 0, 0, 141 }, { 0, 0, 146 }, { 0, 0, 150 }, { 0, 0, 155 }, { 0, 0, 162 }, { 0, 0, 167 }, { 0, 0, 173 }, { 0, 0, 180 }, { 0, 0, 188 }, { 0, 0, 193 }, { 0, 0, 197 }, { 0, 0, 201 }, { 0, 0, 209 }, { 0, 0, 214 }, { 0, 0, 218 }, { 0, 0, 222 }, { 0, 0, 230 }, { 0, 0, 235 }, { 0, 0, 239 }, { 0, 0, 243 }, { 0, 0, 247 }, { 0, 4, 251 }, { 0, 10, 255 }, { 0, 14, 255 }, { 0, 18, 255 }, { 0, 24, 255 }, { 0, 31, 255 }, { 0, 36, 255 }, { 0, 39, 255 }, { 0, 45, 255 }, { 0, 53, 255 }, { 0, 56, 255 }, { 0, 60, 255 }, { 0, 66, 255 }, { 0, 74, 255 }, { 0, 77, 255 }, { 0, 81, 255 }, { 0, 88, 251 }, { 0, 99, 239 }, { 0, 104, 234 }, { 0, 108, 230 }, { 0, 113, 225 }, { 0, 120, 218 }, { 0, 125, 213 }, { 0, 128, 210 }, { 0, 133, 205 }, { 0, 141, 197 }, { 0, 145, 193 }, { 0, 150, 188 }, { 0, 154, 184 }, { 0, 162, 176 }, { 0, 167, 172 }, { 0, 172, 170 }, { 0, 180, 170 }, { 0, 188, 170 }, { 0, 193, 170 }, { 0, 197, 170 }, { 0, 201, 170 }, { 0, 205, 170 }, { 0, 211, 170 }, { 0, 218, 170 }, { 0, 222, 170 }, { 0, 226, 170 }, { 0, 232, 170 }, { 0, 239, 170 }, { 0, 243, 170 }, { 0, 247, 170 }, { 0, 251, 161 }, { 0, 255, 147 }, { 0, 255, 139 }, { 0, 255, 131 }, { 0, 255, 120 }, { 0, 255, 105 }, { 0, 255, 97 }, { 0, 255, 89 }, { 0, 255, 78 }, { 0, 255, 63 }, { 0, 255, 55 }, { 0, 255, 47 }, { 0, 255, 37 }, { 0, 255, 21 }, { 0, 255, 13 }, { 0, 255, 5 }, { 2, 255, 2 }, { 13, 255, 13 }, { 18, 255, 18 }, { 23, 255, 23 }, { 27, 255, 27 }, { 35, 255, 35 }, { 40, 255, 40 }, { 43, 255, 43 }, { 48, 255, 48 }, { 55, 255, 55 }, { 60, 255, 60 }, { 64, 255, 64 }, { 69, 255, 69 }, { 72, 255, 72 }, { 79, 255, 79 }, { 90, 255, 82 }, { 106, 255, 74 }, { 113, 255, 70 }, { 126, 255, 63 }, { 140, 255, 56 }, { 147, 255, 53 }, { 155, 255, 48 }, { 168, 255, 42 }, { 181, 255, 36 }, { 189, 255, 31 }, { 197, 255, 27 }, { 209, 255, 21 }, { 224, 255, 14 }, { 231, 255, 10 }, { 239, 255, 7 }, { 247, 251, 3 }, { 255, 243, 0 }, { 255, 239, 0 }, { 255, 235, 0 }, { 255, 230, 0 }, { 255, 222, 0 }, { 255, 218, 0 }, { 255, 214, 0 }, { 255, 209, 0 }, { 255, 201, 0 }, { 255, 197, 0 }, { 255, 193, 0 }, { 255, 188, 0 }, { 255, 180, 0 }, { 255, 176, 0 }, { 255, 172, 0 }, { 255, 167, 0 }, { 255, 156, 0 }, { 255, 150, 0 }, { 255, 146, 0 }, { 255, 142, 0 }, { 255, 138, 0 }, { 255, 131, 0 }, { 255, 125, 0 }, { 255, 121, 0 }, { 255, 117, 0 }, { 255, 110, 0 }, { 255, 104, 0 }, { 255, 100, 0 }, { 255, 96, 0 }, { 255, 90, 0 }, { 255, 83, 0 }, { 255, 78, 0 }, { 255, 75, 0 }, { 255, 71, 0 }, { 255, 67, 0 }, { 255, 65, 0 }, { 255, 63, 0 }, { 255, 59, 0 }, { 255, 54, 0 }, { 255, 52, 0 }, { 255, 50, 0 }, { 255, 46, 0 }, { 255, 41, 0 }, { 255, 39, 0 }, { 255, 36, 0 }, { 255, 32, 0 }, { 255, 25, 0 }, { 255, 22, 0 }, { 255, 20, 0 }, { 255, 17, 0 }, { 255, 13, 0 }, { 255, 10, 0 }, { 255, 7, 0 }, { 255, 4, 0 }, { 255, 0, 0 }, { 252, 0, 0 }, { 251, 0, 0 }, { 249, 0, 0 }, { 248, 0, 0 }, { 244, 0, 0 }, { 242, 0, 0 }, { 240, 0, 0 }, { 237, 0, 0 }, { 234, 0, 0 }, { 231, 0, 0 }, { 229, 0, 0 }, { 228, 0, 0 }, { 225, 0, 0 }, { 222, 0, 0 }, { 221, 0, 0 }, { 219, 0, 0 }, { 216, 0, 0 }, { 213, 0, 0 }, { 212, 0, 0 }, { 210, 0, 0 }, { 207, 0, 0 }, { 204, 0, 0 }, { 201, 0, 0 }, { 199, 0, 0 }, { 196, 0, 0 }, { 193, 0, 0 }, { 192, 0, 0 }, { 190, 0, 0 }, { 188, 0, 0 }, { 184, 0, 0 }, { 183, 0, 0 }, { 181, 0, 0 }, { 179, 0, 0 }, { 175, 0, 0 }, { 174, 0, 0 }, { 174, 0, 0 } }; static int vips_falsecolour_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsFalsecolour *falsecolour = (VipsFalsecolour *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 4 ); if( VIPS_OBJECT_CLASS( vips_falsecolour_parent_class )-> build( object ) ) return( -1 ); if( !(t[0] = vips_image_new_from_memory( (void *) vips_falsecolour_pet, 1, VIPS_NUMBER( vips_falsecolour_pet ), 3, VIPS_FORMAT_UCHAR )) ) return( -1 ); /* Force to mono 8-bit. */ if( vips_check_uncoded( class->nickname, falsecolour->in ) || vips_extract_band( falsecolour->in, &t[1], 0, NULL ) || vips_cast( t[1], &t[2], VIPS_FORMAT_UCHAR, NULL ) || vips_maplut( t[2], &t[3], t[0], NULL ) || vips_image_write( t[3], conversion->out ) ) return( -1 ); return( 0 ); } static void vips_falsecolour_class_init( VipsFalsecolourClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "falsecolour"; vobject_class->description = _( "false colour an image" ); vobject_class->build = vips_falsecolour_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", 0, _( "in" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFalsecolour, in ) ); } static void vips_falsecolour_init( VipsFalsecolour *falsecolour ) { } /** * vips_falsecolour: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Force @in to 1 band, 8-bit, then transform to * a 3-band 8-bit image with a false colour * map. The map is supposed to make small differences in brightness more * obvious. * * See also: vips_maplut(). * * Returns: 0 on success, -1 on error */ int vips_falsecolour( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "falsecolour", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/flatten.c0000644000175000017500000002346612303141142015160 00000000000000/* flatten the alpha out of an image, replacing it with a constant background * * Author: John Cupitt * Written on: 18/6/12 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsFlatten { VipsConversion parent_instance; VipsImage *in; /* Background colour. */ VipsArea *background; /* The [double] converted to the input image format. */ VipsPel *ink; } VipsFlatten; typedef VipsConversionClass VipsFlattenClass; G_DEFINE_TYPE( VipsFlatten, vips_flatten, VIPS_TYPE_CONVERSION ); /* Shift A down N places, rounding to nearest. * * This calculates A / B, rounding the result to nearest, ie. * * (a + (b / 2)) / b * * We mustn't overflow during the add, so we actually do: * * ((a / 2) + (b / 4)) / (b / 2) * * slightly less accurate, but safe from overflow. */ #define SHIFT_ROUND( A, N ) \ ((((A) >> 1) + (1 << ((N) - 2)) - 1) >> ((N) - 1)) /* Flatten with shift + round, black background. */ #define VIPS_FLATTEN_INT_BLACK( TYPE, N ) { \ TYPE *p = (TYPE *) in; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < width; x++ ) { \ TYPE alpha = p[bands - 1]; \ int b; \ \ for( b = 0; b < bands - 1; b++ ) \ q[b] = SHIFT_ROUND( p[b] * alpha, N ); \ \ p += bands; \ q += bands - 1; \ } \ } /* Flatten with shift + round, any background. */ #define VIPS_FLATTEN_INT( TYPE, N ) { \ TYPE *p = (TYPE *) in; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < width; x++ ) { \ TYPE alpha = p[bands - 1]; \ TYPE nalpha = ((1 << (N)) - 1) - alpha; \ TYPE *bg = (TYPE *) flatten->ink; \ int b; \ \ for( b = 0; b < bands - 1; b++ ) \ q[b] = SHIFT_ROUND( p[b] * alpha, (N) ) + \ SHIFT_ROUND( bg[b] * nalpha, (N) ); \ \ p += bands; \ q += bands - 1; \ } \ } /* Flatten via float division, black background. */ #define VIPS_FLATTEN_FLOAT_BLACK( TYPE, SCALE ) { \ TYPE *p = (TYPE *) in; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < width; x++ ) { \ TYPE alpha = p[bands - 1]; \ int b; \ \ for( b = 0; b < bands - 1; b++ ) \ q[b] = ((double) p[b] * alpha) / (SCALE); \ \ p += bands; \ q += bands - 1; \ } \ } /* Flatten via float division, any background. */ #define VIPS_FLATTEN_FLOAT( TYPE, SCALE ) { \ TYPE *p = (TYPE *) in; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < width; x++ ) { \ TYPE alpha = p[bands - 1]; \ TYPE nalpha = (SCALE) - alpha; \ TYPE *bg = (TYPE *) flatten->ink; \ int b; \ \ for( b = 0; b < bands - 1; b++ ) \ q[b] = ((double) p[b] * alpha) / (SCALE) + \ ((double) bg[b] * nalpha) / (SCALE); \ \ p += bands; \ q += bands - 1; \ } \ } static int vips_flatten_black_gen( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) vseq; VipsFlatten *flatten = (VipsFlatten *) b; VipsRect *r = &or->valid; int width = r->width; int bands = ir->im->Bands; int x, y; if( vips_region_prepare( ir, r ) ) return( -1 ); for( y = 0; y < r->height; y++ ) { VipsPel *in = VIPS_REGION_ADDR( ir, r->left, r->top + y ); VipsPel *out = VIPS_REGION_ADDR( or, r->left, r->top + y ); switch( flatten->in->BandFmt ) { case VIPS_FORMAT_UCHAR: VIPS_FLATTEN_INT_BLACK( unsigned char, 8 ); break; case VIPS_FORMAT_CHAR: /* Alpha is 0 - 127? No idea, really. */ VIPS_FLATTEN_INT_BLACK( signed char, 7 ); break; case VIPS_FORMAT_USHORT: VIPS_FLATTEN_INT_BLACK( unsigned short, 16 ); break; case VIPS_FORMAT_SHORT: VIPS_FLATTEN_INT_BLACK( signed short, 15 ); break; case VIPS_FORMAT_UINT: VIPS_FLATTEN_FLOAT_BLACK( unsigned int, UINT_MAX ); break; case VIPS_FORMAT_INT: VIPS_FLATTEN_FLOAT_BLACK( signed int, INT_MAX ); break; case VIPS_FORMAT_FLOAT: VIPS_FLATTEN_FLOAT_BLACK( float, 1.0 ); break; case VIPS_FORMAT_DOUBLE: VIPS_FLATTEN_FLOAT_BLACK( double, 1.0 ); break; case VIPS_FORMAT_COMPLEX: case VIPS_FORMAT_DPCOMPLEX: default: g_assert( 0 ); } } return( 0 ); } /* Any background. */ static int vips_flatten_gen( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) vseq; VipsFlatten *flatten = (VipsFlatten *) b; VipsRect *r = &or->valid; int width = r->width; int bands = ir->im->Bands; int x, y; if( vips_region_prepare( ir, r ) ) return( -1 ); for( y = 0; y < r->height; y++ ) { VipsPel *in = VIPS_REGION_ADDR( ir, r->left, r->top + y ); VipsPel *out = VIPS_REGION_ADDR( or, r->left, r->top + y ); switch( flatten->in->BandFmt ) { case VIPS_FORMAT_UCHAR: VIPS_FLATTEN_INT( unsigned char, 8 ); break; case VIPS_FORMAT_CHAR: /* Alpha is 0 - 127? No idea, really. */ VIPS_FLATTEN_INT( signed char, 7 ); break; case VIPS_FORMAT_USHORT: VIPS_FLATTEN_INT( unsigned short, 16 ); break; case VIPS_FORMAT_SHORT: VIPS_FLATTEN_INT( signed short, 15 ); break; case VIPS_FORMAT_UINT: VIPS_FLATTEN_FLOAT( unsigned int, UINT_MAX ); break; case VIPS_FORMAT_INT: VIPS_FLATTEN_FLOAT( signed int, INT_MAX ); break; case VIPS_FORMAT_FLOAT: VIPS_FLATTEN_FLOAT( float, 1.0 ); break; case VIPS_FORMAT_DOUBLE: VIPS_FLATTEN_FLOAT( double, 1.0 ); break; case VIPS_FORMAT_COMPLEX: case VIPS_FORMAT_DPCOMPLEX: default: g_assert( 0 ); } } return( 0 ); } static int vips_flatten_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsFlatten *flatten = (VipsFlatten *) object; int i; gboolean black; if( VIPS_OBJECT_CLASS( vips_flatten_parent_class )->build( object ) ) return( -1 ); /* Trivial case: fall back to copy(). */ if( flatten->in->Bands == 1 ) return( vips_image_write( flatten->in, conversion->out ) ); if( vips_check_uncoded( class->nickname, flatten->in ) || vips_check_noncomplex( class->nickname, flatten->in ) || vips_image_pio_input( flatten->in ) ) return( -1 ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, flatten->in, NULL ) ) return( -1 ); conversion->out->Bands -= 1; /* Is the background black? We have a special path for this. */ black = TRUE; for( i = 0; i < flatten->background->n; i++ ) if( ((double *) flatten->background->data)[i] != 0.0 ) { black = FALSE; break; } if( black ) { if( vips_image_generate( conversion->out, vips_start_one, vips_flatten_black_gen, vips_stop_one, flatten->in, flatten ) ) return( -1 ); } else { /* Convert the background to the image's format. */ if( !(flatten->ink = vips__vector_to_ink( class->nickname, conversion->out, flatten->background->data, flatten->background->n )) ) return( -1 ); if( vips_image_generate( conversion->out, vips_start_one, vips_flatten_gen, vips_stop_one, flatten->in, flatten ) ) return( -1 ); } return( 0 ); } static void vips_flatten_class_init( VipsFlattenClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_flatten_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "flatten"; vobject_class->description = _( "flatten alpha out of an image" ); vobject_class->build = vips_flatten_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFlatten, in ) ); VIPS_ARG_BOXED( class, "background", 2, _( "Background" ), _( "Background value" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsFlatten, background ), VIPS_TYPE_ARRAY_DOUBLE ); } static void vips_flatten_init( VipsFlatten *flatten ) { flatten->background = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), 1 ); ((double *) (flatten->background->data))[0] = 0.0; } /** * vips_flatten: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @background: colour for new pixels * * Take the last band of @in as an alpha and use it to blend the * remaining channels with @background. * * The alpha channel is 0 - 255 for * integer images and 0 - 1 for float images, where 255 means 100% image and 0 * means 100% background. Non-complex images only. * @background defaults to zero (black). * * Useful for flattening PNG images to RGB. * * See also: pngload(). * * Returns: 0 on success, -1 on error */ int vips_flatten( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "flatten", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/pconversion.h0000644000175000017500000000402012303140253016060 00000000000000/* base class for all conversion operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PCONVERSION_H #define VIPS_PCONVERSION_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_CONVERSION (vips_conversion_get_type()) #define VIPS_CONVERSION( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_CONVERSION, VipsConversion )) #define VIPS_CONVERSION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_CONVERSION, VipsConversionClass)) #define VIPS_IS_CONVERSION( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_CONVERSION )) #define VIPS_IS_CONVERSION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_CONVERSION )) #define VIPS_CONVERSION_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_CONVERSION, VipsConversionClass )) typedef struct _VipsConversion { VipsOperation parent_instance; /* All have an output image. */ VipsImage *out; } VipsConversion; typedef struct _VipsConversionClass { VipsOperationClass parent_class; } VipsConversionClass; GType vips_conversion_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PCONVERSION_H*/ vips-7.38.5/libvips/conversion/replicate.c0000644000175000017500000001272312303140253015467 00000000000000/* replicate an image x times horizontally and vertically * * JC, 30 sep 03 * * 15/4/04 * - some optimisations for some cases * 1/2/10 * - gtkdoc * 26/10/11 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsReplicate { VipsConversion parent_instance; /* The input image. */ VipsImage *in; int across; int down; } VipsReplicate; typedef VipsConversionClass VipsReplicateClass; G_DEFINE_TYPE( VipsReplicate, vips_replicate, VIPS_TYPE_CONVERSION ); static int vips_replicate_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsImage *in = (VipsImage *) a; VipsRect *r = &or->valid; int twidth = in->Xsize; int theight = in->Ysize; int x, y; VipsRect tile; /* Find top left of tiles we need. */ int xs = (r->left / twidth) * twidth; int ys = (r->top / theight) * theight; /* The tile enclosing the top-left corner of the requested area. */ tile.left = xs; tile.top = ys; tile.width = twidth; tile.height = theight; /* If the request fits inside a single tile, we can just pointer-copy. */ if( vips_rect_includesrect( &tile, r ) ) { VipsRect irect; /* Translate request to input space. */ irect = *r; irect.left -= xs; irect.top -= ys; if( vips_region_prepare( ir, &irect ) ) return( -1 ); if( vips_region_region( or, ir, r, irect.left, irect.top ) ) return( -1 ); return( 0 ); } for( y = ys; y < VIPS_RECT_BOTTOM( r ); y += theight ) for( x = xs; x < VIPS_RECT_RIGHT( r ); x += twidth ) { VipsRect paint; /* Whole tile at x, y */ tile.left = x; tile.top = y; tile.width = twidth; tile.height = theight; /* Which parts touch the area of the output we are * building. */ vips_rect_intersectrect( &tile, r, &paint ); /* Translate back to ir coordinates. */ paint.left -= x; paint.top -= y; g_assert( !vips_rect_isempty( &paint ) ); /* Render into or. */ if( vips_region_prepare_to( ir, or, &paint, paint.left + x, paint.top + y ) ) return( -1 ); } return( 0 ); } static int vips_replicate_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsReplicate *replicate = (VipsReplicate *) object; if( VIPS_OBJECT_CLASS( vips_replicate_parent_class )->build( object ) ) return( -1 ); if( vips_image_pio_input( replicate->in ) ) return( -1 ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_SMALLTILE, replicate->in, NULL ) ) return( -1 ); conversion->out->Xsize *= replicate->across; conversion->out->Ysize *= replicate->down; if( vips_image_generate( conversion->out, vips_start_one, vips_replicate_gen, vips_stop_one, replicate->in, replicate ) ) return( -1 ); return( 0 ); } static void vips_replicate_class_init( VipsReplicateClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_replicate_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "replicate"; vobject_class->description = _( "replicate an image" ); vobject_class->build = vips_replicate_build; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsReplicate, in ) ); VIPS_ARG_INT( class, "across", 4, _( "Across" ), _( "Repeat this many times horizontally" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsReplicate, across ), 1, 1000000, 1 ); VIPS_ARG_INT( class, "down", 5, _( "Down" ), _( "Repeat this many times vertically" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsReplicate, down ), 1, 1000000, 1 ); } static void vips_replicate_init( VipsReplicate *replicate ) { } /** * vips_replicate: * @in: input image * @out: output image * @across: repeat input this many times across * @down: repeat input this many times down * @...: %NULL-terminated list of optional named arguments * * Repeats an image many times. * * See also: vips_extract(). * * Returns: 0 on success, -1 on error */ int vips_replicate( VipsImage *in, VipsImage **out, int across, int down, ... ) { va_list ap; int result; va_start( ap, down ); result = vips_call_split( "replicate", ap, in, out, across, down ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/bandary.c0000644000175000017500000001234012303141142015130 00000000000000/* base class for various operations on bands * * Copyright: 1991, N. Dessipris, modification of im_bandary() * * Author: N. Dessipris * Written on: 17/04/1991 * Modified on : * 16/3/94 JC * - rewritten for partials * - now in ANSI C * - now works for any number of input images, except zero * 7/10/94 JC * - new IM_NEW() * 16/4/07 * - fall back to im_copy() for 1 input image * 17/1/09 * - cleanups * - gtk-doc * - im_bandary() just calls this * - works for RAD coding too * 27/1/10 * - formatalike inputs * 17/5/11 * - sizealike inputs * 27/10/11 * - rewrite as a class * 20/11/11 * - from bandjoin */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "bandary.h" G_DEFINE_ABSTRACT_TYPE( VipsBandary, vips_bandary, VIPS_TYPE_CONVERSION ); /* Maximum number of input images -- why not? */ #define MAX_INPUT_IMAGES (64) static int vips_bandary_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion **ir = (VipsRegion **) seq; VipsBandary *bandary = (VipsBandary *) b; VipsBandaryClass *class = VIPS_BANDARY_GET_CLASS( bandary ); Rect *r = &or->valid; VipsPel *p[MAX_INPUT_IMAGES], *q; int y, i; for( i = 0; i < bandary->n; i++ ) { if( vips_region_prepare( ir[i], r ) ) return( -1 ); p[i] = VIPS_REGION_ADDR( ir[i], r->left, r->top ); } p[i] = NULL; q = VIPS_REGION_ADDR( or, r->left, r->top ); VIPS_GATE_START( "vips_bandary_gen: work" ); for( y = 0; y < r->height; y++ ) { class->process_line( bandary, q, p, r->width ); for( i = 0; i < bandary->n; i++ ) p[i] += VIPS_REGION_LSKIP( ir[i] ); q += VIPS_REGION_LSKIP( or ); } VIPS_GATE_STOP( "vips_bandary_gen: work" ); return( 0 ); } static int vips_bandary_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsBandary *bandary = (VipsBandary *) object; int i; VipsImage **format; VipsImage **size; if( VIPS_OBJECT_CLASS( vips_bandary_parent_class )->build( object ) ) return( -1 ); if( bandary->n <= 0 ) { vips_error( class->nickname, "%s", _( "no input images" ) ); return( -1 ); } if( bandary->n > MAX_INPUT_IMAGES ) { vips_error( class->nickname, "%s", _( "too many input images" ) ); return( -1 ); } for( i = 0; i < bandary->n; i++ ) if( vips_image_pio_input( bandary->in[i] ) || vips_check_uncoded( class->nickname, bandary->in[i] ) ) return( -1 ); format = (VipsImage **) vips_object_local_array( object, bandary->n ); size = (VipsImage **) vips_object_local_array( object, bandary->n ); if( vips__formatalike_vec( bandary->in, format, bandary->n ) || vips__sizealike_vec( format, size, bandary->n ) ) return( -1 ); bandary->ready = size; if( vips_image_pipeline_array( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, bandary->ready ) ) return( -1 ); conversion->out->Bands = bandary->out_bands; if( vips_image_generate( conversion->out, vips_start_many, vips_bandary_gen, vips_stop_many, bandary->ready, bandary ) ) return( -1 ); return( 0 ); } static void vips_bandary_class_init( VipsBandaryClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_bandary_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "bandary"; vobject_class->description = _( "operations on image bands" ); vobject_class->build = vips_bandary_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; } static void vips_bandary_init( VipsBandary *bandary ) { bandary->out_bands = -1; } /* Call this before chaining up in _build() to make the operation fall back to * copy. */ int vips_bandary_copy( VipsBandary *bandary ) { VipsConversion *conversion = VIPS_CONVERSION( bandary ); /* This isn't set by arith until build(), so we have to set * again here. * * Should arith set out in _init()? */ g_object_set( bandary, "out", vips_image_new(), NULL ); return( vips_image_write( bandary->in[0], conversion->out ) ); } vips-7.38.5/libvips/conversion/subsample.c0000644000175000017500000002054612303140253015514 00000000000000/* subsample * * 3/7/95 JC * - adapted from im_shrink() * 3/8/02 JC * - fall back to im_copy() for x/y factors == 1 * 21/4/08 * - don't fall back to pixel-wise shrinks for smalltile, it kills * performance, just bring VIPS_MAX_WIDTH down instead * 1/2/10 * - gtkdoc * 1/6/13 * - redo as a class * 2/11/13 * - add @point to force point sample mode */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pconversion.h" typedef struct _VipsSubsample { VipsConversion parent_instance; VipsImage *in; int xfac; int yfac; gboolean point; } VipsSubsample; typedef VipsConversionClass VipsSubsampleClass; G_DEFINE_TYPE( VipsSubsample, vips_subsample, VIPS_TYPE_CONVERSION ); /* Maximum width of input we ask for. */ #define VIPS_MAX_WIDTH (100) /* Subsample a VipsRegion. We fetch in VIPS_MAX_WIDTH pixel-wide strips, * left-to-right across the input. */ static int vips_subsample_line_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsSubsample *subsample = (VipsSubsample *) b; VipsImage *in = (VipsImage *) a; VipsRect *r = &or->valid; int le = r->left; int ri = VIPS_RECT_RIGHT( r ); int to = r->top; int bo = VIPS_RECT_BOTTOM( r ); int ps = VIPS_IMAGE_SIZEOF_PEL( in ); int owidth = VIPS_MAX_WIDTH / subsample->xfac; VipsRect s; int x, y; int z, k; /* Loop down the region. */ for( y = to; y < bo; y++ ) { VipsPel *q = VIPS_REGION_ADDR( or, le, y ); VipsPel *p; /* Loop across the region, in owidth sized pieces. */ for( x = le; x < ri; x += owidth ) { /* How many pixels do we make this time? */ int ow = VIPS_MIN( owidth, ri - x ); /* Ask for this many from input ... can save a * little here! */ int iw = ow * subsample->xfac - (subsample->xfac - 1); /* Ask for input. */ s.left = x * subsample->xfac; s.top = y * subsample->yfac; s.width = iw; s.height = 1; if( vips_region_prepare( ir, &s ) ) return( -1 ); /* Append new pels to output. */ p = VIPS_REGION_ADDR( ir, s.left, s.top ); for( z = 0; z < ow; z++ ) { for( k = 0; k < ps; k++ ) q[k] = p[k]; q += ps; p += ps * subsample->xfac; } } } return( 0 ); } /* Fetch one pixel at a time ... good for very large shrinks. */ static int vips_subsample_point_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsSubsample *subsample = (VipsSubsample *) b; VipsImage *in = (VipsImage *) a; VipsRect *r = &or->valid; int le = r->left; int ri = VIPS_RECT_RIGHT( r ); int to = r->top; int bo = VIPS_RECT_BOTTOM(r); int ps = VIPS_IMAGE_SIZEOF_PEL( in ); VipsRect s; int x, y; int k; /* Loop down the region. */ for( y = to; y < bo; y++ ) { VipsPel *q = VIPS_REGION_ADDR( or, le, y ); VipsPel *p; /* Loop across the region, in owidth sized pieces. */ for( x = le; x < ri; x++ ) { /* Ask for input. */ s.left = x * subsample->xfac; s.top = y * subsample->yfac; s.width = 1; s.height = 1; if( vips_region_prepare( ir, &s ) ) return( -1 ); /* Append new pels to output. */ p = VIPS_REGION_ADDR( ir, s.left, s.top ); for( k = 0; k < ps; k++ ) q[k] = p[k]; q += ps; } } return( 0 ); } static int vips_subsample_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsSubsample *subsample = (VipsSubsample *) object; VipsGenerateFn subsample_fn; if( VIPS_OBJECT_CLASS( vips_subsample_parent_class )->build( object ) ) return( -1 ); g_assert( subsample->xfac > 0 ); g_assert( subsample->yfac > 0 ); if( subsample->xfac == 1 && subsample->yfac == 1 ) return( vips_image_write( subsample->in, conversion->out ) ); if( vips_image_pio_input( subsample->in ) || vips_check_coding_known( class->nickname, subsample->in ) ) return( -1 ); /* Set demand hints. We want THINSTRIP, as we will be demanding a * large area of input for each output line. */ if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, subsample->in, NULL ) ) return( -1 ); /* Prepare output. Note: we round the output width down! */ conversion->out->Xsize = subsample->in->Xsize / subsample->xfac; conversion->out->Ysize = subsample->in->Ysize / subsample->yfac; conversion->out->Xres = subsample->in->Xres / subsample->xfac; conversion->out->Yres = subsample->in->Yres / subsample->yfac; if( conversion->out->Xsize <= 0 || conversion->out->Ysize <= 0 ) { vips_error( class->nickname, "%s", _( "image has shrunk to nothing" ) ); return( -1 ); } /* Generate! If this is a very large shrink, then it's probably faster * to do it a pixel at a time. */ if( subsample->point || subsample->xfac > 10 ) subsample_fn = vips_subsample_point_gen; else subsample_fn = vips_subsample_line_gen; if( vips_image_generate( conversion->out, vips_start_one, subsample_fn, vips_stop_one, subsample->in, subsample ) ) return( -1 ); return( 0 ); } /* xy range we sanity check on ... just to stop crazy numbers from divide by 0 * etc. causing g_assert() failures later. */ #define RANGE (100000000) static void vips_subsample_class_init( VipsSubsampleClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "subsample"; vobject_class->description = _( "subsample an image" ); vobject_class->build = vips_subsample_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL; VIPS_ARG_IMAGE( class, "input", 0, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsSubsample, in ) ); VIPS_ARG_INT( class, "xfac", 2, _( "Xfac" ), _( "Horizontal subsample factor" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsSubsample, xfac ), 1, RANGE, 1 ); VIPS_ARG_INT( class, "yfac", 3, _( "Yfac" ), _( "Vertical subsample factor" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsSubsample, yfac ), 1, RANGE, 1 ); VIPS_ARG_BOOL( class, "point", 2, _( "Point" ), _( "Point sample" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSubsample, point ), FALSE ); } static void vips_subsample_init( VipsSubsample *subsample ) { } /** * vips_subsample: * @in: input image * @out: output image * @xfac: horizontal shrink factor * @yfac: vertical shrink factor * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @point: turn on point sample mode * * Subsample an image by an integer fraction. This is fast, nearest-neighbour * shrink. * * For small horizontal shrinks, this operation will fetch lines of pixels * from @in and then subsample that line. For large shrinks it will fetch * single pixels. * * If @point is set, @in will always be sampled in points. This can be faster * if the previous operations in the pipeline are very slow. * * See also: vips_affine(), vips_shrink(), vips_zoom(). * * Returns: 0 on success, -1 on error. */ int vips_subsample( VipsImage *in, VipsImage **out, int xfac, int yfac, ... ) { va_list ap; int result; va_start( ap, yfac ); result = vips_call_split( "subsample", ap, in, out, xfac, yfac ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/cache.c0000644000175000017500000001071012303140253014554 00000000000000/* vips_sink_screen() as an operation. * * 13/1/12 * - from tilecache.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a cache of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsCache { VipsConversion parent_instance; VipsImage *in; int tile_width; int tile_height; int max_tiles; } VipsCache; typedef VipsConversionClass VipsCacheClass; G_DEFINE_TYPE( VipsCache, vips_cache, VIPS_TYPE_CONVERSION ); static int vips_cache_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsCache *cache = (VipsCache *) object; VIPS_DEBUG_MSG( "vips_cache_build\n" ); if( VIPS_OBJECT_CLASS( vips_cache_parent_class )->build( object ) ) return( -1 ); if( vips_sink_screen( cache->in, conversion->out, NULL, cache->tile_width, cache->tile_height, cache->max_tiles, 0, NULL, NULL ) ) return( -1 ); return( 0 ); } static void vips_cache_class_init( VipsCacheClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_cache_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "cache"; vobject_class->description = _( "cache an image" ); vobject_class->build = vips_cache_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsCache, in ) ); VIPS_ARG_INT( class, "tile_width", 3, _( "Tile width" ), _( "Tile width in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCache, tile_width ), 1, 1000000, 128 ); VIPS_ARG_INT( class, "tile_height", 3, _( "Tile height" ), _( "Tile height in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCache, tile_height ), 1, 1000000, 128 ); VIPS_ARG_INT( class, "max_tiles", 3, _( "Max tiles" ), _( "Maximum number of tiles to cache" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCache, max_tiles ), -1, 1000000, 1000 ); } static void vips_cache_init( VipsCache *cache ) { /* By default, enough pixels for two 1920 x 1080 displays. */ cache->tile_width = 128; cache->tile_height = 128; cache->max_tiles = 250; } /** * vips_cache: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @tile_width: width of tiles in cache * @tile_height: height of tiles in cache * @max_tiles: maximum number of tiles to cache * * This operation behaves rather like vips_copy() between images * @in and @out, except that it keeps a cache of computed pixels. * This cache is made of up to @max_tiles tiles (a value of -1 * means any number of tiles), and each tile is of size @tile_width * by @tile_height pixels. By default it will cache 250 128 x 128 pixel tiles, * enough for two 1920 x 1080 images. * * This operation is a thin wrapper over vips_sink_screen(), see the * documentation for that operation for details. * * It uses a set of background threads to calculate pixels and the various * active cache operations coordinate so as not to overwhelm your system. * * See also: vips_tilecache(). * * Returns: 0 on success, -1 on error. */ int vips_cache( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "cache", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/join.c0000644000175000017500000001756312303140253014465 00000000000000/* join left-right and up-down * * Copyright 1990, 1991: Kirk Martinez, N. Dessipris * Author: Kirk Martinez, N. Dessipris * Written on: 9/6/90 * Modified on: 17/04/1991 * 31/8/93 JC * - args to memcpy() were reversed * 14/11/94 JC * - tided up and ANSIfied * - now accepts IM_CODING_LABQ * - memory leaks removed * - bug in calculation of output Xsize removed (thanks Thomson!) * - bug in checking of image compatibility fixed * 23/10/95 JC * - rewritten in terms of im_insert() * 14/4/04 * - sets Xoffset / Yoffset * 1/2/10 * - gtkdoc * - cleanups * 19/10/11 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsJoin { VipsConversion parent_instance; /* Params. */ VipsImage *in1; VipsImage *in2; VipsDirection direction; gboolean expand; int shim; VipsArea *background; VipsAlign align; } VipsJoin; typedef VipsConversionClass VipsJoinClass; G_DEFINE_TYPE( VipsJoin, vips_join, VIPS_TYPE_CONVERSION ); static int vips_join_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsJoin *join = (VipsJoin *) object; int x, y; VipsImage *t; if( VIPS_OBJECT_CLASS( vips_join_parent_class )->build( object ) ) return( -1 ); switch( join->direction ) { case VIPS_DIRECTION_HORIZONTAL: x = join->in1->Xsize + join->shim; switch( join->align ) { case VIPS_ALIGN_LOW: y = 0; break; case VIPS_ALIGN_CENTRE: y = join->in1->Ysize / 2 - join->in2->Ysize / 2; break; case VIPS_ALIGN_HIGH: y = join->in1->Ysize - join->in2->Ysize; break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } break; case VIPS_DIRECTION_VERTICAL: y = join->in1->Ysize + join->shim; switch( join->align ) { case VIPS_ALIGN_LOW: x = 0; break; case VIPS_ALIGN_CENTRE: x = join->in1->Xsize / 2 - join->in2->Xsize / 2; break; case VIPS_ALIGN_HIGH: x = join->in1->Xsize - join->in2->Xsize; break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } if( vips_insert( join->in1, join->in2, &t, x, y, "expand", TRUE, "background", join->background, NULL ) ) return( -1 ); if( !join->expand ) { VipsImage *t2; int left, top, width, height; switch( join->direction ) { case VIPS_DIRECTION_HORIZONTAL: left = 0; top = VIPS_MAX( 0, y ) - y; width = t->Xsize; height = VIPS_MIN( join->in1->Ysize, join->in2->Ysize ); break; case VIPS_DIRECTION_VERTICAL: left = VIPS_MAX( 0, x ) - x; top = 0; width = VIPS_MIN( join->in1->Xsize, join->in2->Xsize ); height = t->Ysize; break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } if( vips_extract_area( t, &t2, left, top, width, height, NULL ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); t = t2; } if( vips_image_write( t, conversion->out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static void vips_join_class_init( VipsJoinClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_join_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "join"; vobject_class->description = _( "join a pair of images" ); vobject_class->build = vips_join_build; VIPS_ARG_IMAGE( class, "in1", -1, _( "in1" ), _( "First input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsJoin, in1 ) ); VIPS_ARG_IMAGE( class, "in2", 0, _( "in2" ), _( "Second input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsJoin, in2 ) ); VIPS_ARG_ENUM( class, "direction", 2, _( "direction" ), _( "Join left-right or up-down" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsJoin, direction ), VIPS_TYPE_DIRECTION, VIPS_DIRECTION_HORIZONTAL ); VIPS_ARG_BOOL( class, "expand", 4, _( "Expand" ), _( "Expand output to hold all of both inputs" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsJoin, expand ), FALSE ); VIPS_ARG_INT( class, "shim", 5, _( "Shim" ), _( "Pixels between images" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsJoin, shim ), 0, 1000000, 0 ); VIPS_ARG_BOXED( class, "background", 6, _( "Background" ), _( "Colour for new pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsJoin, background ), VIPS_TYPE_ARRAY_DOUBLE ); VIPS_ARG_ENUM( class, "align", 2, _( "Align" ), _( "Align on the low, centre or high coordinate edge" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsJoin, align ), VIPS_TYPE_ALIGN, VIPS_ALIGN_LOW ); } static void vips_join_init( VipsJoin *join ) { /* Init our instance fields. */ join->background = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), 1 ); ((double *) (join->background->data))[0] = 0.0; } /** * vips_join: * @in1: first input image * @in2: second input image * @out: output image * @direction: join horizontally or vertically * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @expand: %TRUE to expand the output image to hold all of the input pixels * @shim: space between images, in pixels * @background: background ink colour * @align: low, centre or high alignment * * Join @in1 and @in2 together, left-right or up-down depending on the value * of @direction. * * If one is taller or wider than the * other, @out will be has high as the smaller. If @expand is %TRUE, then * the output will be expanded to contain all of the input pixels. * * Use @align to set the edge that the images align on. By default, they align * on the edge with the lower value coordinate. * * Use @background to set the colour of any pixels in @out which are not * present in either @in1 or @in2. * * Use @shim to set the spacing between the images. By default this is 0. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: vips_insert(). * * Returns: 0 on success, -1 on error */ int vips_join( VipsImage *in1, VipsImage *in2, VipsImage **out, VipsDirection direction, ... ) { va_list ap; int result; va_start( ap, direction ); result = vips_call_split( "join", ap, in1, in2, out, direction ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/gamma.c0000644000175000017500000001114712303140253014600 00000000000000/* Raise an image to a gamma factor * * Copyright: 1990, N. Dessipris. * * Written on: 19/07/1990 * Modified on: * 19/6/95 JC * - redone as library function * 23/3/10 * - gtkdoc * - 16 bit as well * 1/8/13 * - redone as a class * 11/11/13 * - any format * - calculate pow(1/exp) rather than pow(exp) to be consistent with * other packages */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pconversion.h" typedef struct _VipsGamma { VipsConversion parent_instance; VipsImage *in; double exponent; } VipsGamma; typedef VipsConversionClass VipsGammaClass; G_DEFINE_TYPE( VipsGamma, vips_gamma, VIPS_TYPE_CONVERSION ); /* For each input format, what we normalise the pow() about. */ static double vips_gamma_maxval[10] = { /* UC */ UCHAR_MAX, /* C */ SCHAR_MAX, /* US */ USHRT_MAX, /* S */ SHRT_MAX, /* UI */ UINT_MAX, /* I */ INT_MAX, /* F */ 1.0, /* X */ 1.0, /* D */ 1.0, /* DX */ 1.0 }; static int vips_gamma_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsGamma *gamma = (VipsGamma *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 ); VipsImage *in = gamma->in; double scale; if( VIPS_OBJECT_CLASS( vips_gamma_parent_class )-> build( object ) ) return( -1 ); scale = pow( vips_gamma_maxval[in->BandFmt], 1.0 / gamma->exponent ) / vips_gamma_maxval[in->BandFmt]; if( in->BandFmt == VIPS_FORMAT_UCHAR || in->BandFmt == VIPS_FORMAT_USHORT ) { if( vips_identity( &t[0], "ushort", in->BandFmt == VIPS_FORMAT_USHORT, NULL ) || vips_pow_const1( t[0], &t[1], 1.0 / gamma->exponent, NULL ) || vips_linear1( t[1], &t[2], 1.0 / scale, 0, NULL ) || vips_cast( t[2], &t[3], in->BandFmt, NULL ) || vips_maplut( in, &t[4], t[3], NULL ) || vips_image_write( t[4], conversion->out ) ) return( -1 ); } else { if( vips_pow_const1( in, &t[1], 1.0 / gamma->exponent, NULL ) || vips_linear1( t[1], &t[2], 1.0 / scale, 0, NULL ) || vips_cast( t[2], &t[3], in->BandFmt, NULL ) || vips_image_write( t[3], conversion->out ) ) return( -1 ); } return( 0 ); } static void vips_gamma_class_init( VipsGammaClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "gamma"; vobject_class->description = _( "gamma an image" ); vobject_class->build = vips_gamma_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", -1, _( "in" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGamma, in ) ); VIPS_ARG_DOUBLE( class, "exponent", 0, _( "exponent" ), _( "Gamma factor" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsGamma, exponent ), 0.000001, 1000.0, 2.4 ); } static void vips_gamma_init( VipsGamma *gamma ) { gamma->exponent = 1.0 / 2.4; } /** * vips_gamma: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @exponent: gamma, default 1.0 / 2.4 * * Calculate @in ** (1 / @exponent), normalising to the maximum range of the * input type. For float types use 1.0 as the maximum. * * See also: vips_identity(), vips_pow_const1(), vips_maplut() * * Returns: 0 on success, -1 on error */ int vips_gamma( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "gamma", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/rot45.c0000644000175000017500000001537012303140253014475 00000000000000/* 'lossless' 45 degree rotate ... odd-sized square images only * * Author: N. Dessipris (Copyright, N. Dessipris 1991) * Written on: 08/05/1991 * Modified on: 28/05/1991 * 12/10/95 JC * - small revisions, needs rewriting really * 7/8/96 JC * - absolutely foul desp code revised * - many bugs and mem leaks fixed * 1/3/99 JC * - oops, fns were not preserving scale and offset * 1/12/10 * - allow any size mask for the 90 degree rot45ates by using im_rot4590(). * 12/10/13 * - rewritten as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsRot45 { VipsConversion parent_instance; /* The input image. */ VipsImage *in; /* Rotate by ... */ VipsAngle45 angle; } VipsRot45; typedef VipsConversionClass VipsRot45Class; G_DEFINE_TYPE( VipsRot45, vips_rot45, VIPS_TYPE_CONVERSION ); #define COPY( Q, P ) { \ VipsPel *q = (Q); \ VipsPel *p = (P); \ int b;\ \ for( b = 0; b < ps; b++ )\ q[b] = p[b];\ } #define ASSIGN( Xout, Yout, Xin, Yin ) \ COPY( VIPS_IMAGE_ADDR( out, Xout, Yout ), \ VIPS_IMAGE_ADDR( in, Xin, Yin ) ) #define POINT_TO_TEMP( q, Xin, Yin ) \ COPY( q, VIPS_IMAGE_ADDR( in, Xin, Yin ) ) #define TEMP_TO_POINT( Xout, Yout, p ) \ COPY( VIPS_IMAGE_ADDR( out, Xout, Yout ), p ) /* This can work inplace, ie. in == out is allowed. */ static void vips_rot45_rot45( VipsImage *out, VipsImage *in ) { size_t ps = VIPS_IMAGE_SIZEOF_PEL( in ); VipsPel *temp = VIPS_ARRAY( in, ps, VipsPel ); int size = in->Xsize; int size_2 = size / 2; int x, y; g_assert( in->Xsize == in->Ysize ); g_assert( out->Xsize == out->Ysize ); g_assert( in->Xsize == out->Xsize ); g_assert( in->Xsize % 2 == 1 ); /* Split the square into 8 triangles. Loop over the top-left one, * reflect to index the others. * * 1 1 2 2 3 * 8 1 2 3 3 * 8 8 x 4 4 * 7 7 6 5 4 * 7 6 6 5 5 * * do the centre separately. */ for( y = 0; y < size_2; y++ ) for( x = y; x < size_2; x++ ) { /* Save 1, it goes into 2 at the end. */ POINT_TO_TEMP( temp, x, y ); /* Fill 1 from 8. */ ASSIGN( x, y, y, size_2 - (x - y) ); /* 8 from 7. */ ASSIGN( y, size_2 - (x - y), y, (size - 1) - x ); /* 7 from 6. */ ASSIGN( y, (size - 1) - x, size_2 - (x - y), (size - 1) - y ); /* 6 from 5. */ ASSIGN( size_2 - (x - y), (size - 1) - y, (size - 1) - x, (size - 1) - y ); /* 5 from 4. */ ASSIGN( (size - 1) - x, (size - 1) - y, (size - 1) - y, (x - y) + size_2 ); /* 4 from 3. */ ASSIGN( (size - 1) - y, (x - y) + size_2, (size - 1) - y, x ); /* 3 from 2. */ ASSIGN( (size - 1) - y, x, (x - y) + size_2, y ); /* 2 from saved 1. */ TEMP_TO_POINT( (x - y) + size_2, y, temp ); } /* Centre. */ ASSIGN( size_2, size_2, size_2, size_2 ); } static int vips_rot45_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsRot45 *rot45 = (VipsRot45 *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 1 ); VipsImage *from; if( VIPS_OBJECT_CLASS( vips_rot45_parent_class )->build( object ) ) return( -1 ); if( vips_check_oddsquare( class->nickname, rot45->in ) ) return( -1 ); if( rot45->angle == VIPS_ANGLE45_0 ) return( vips_image_write( rot45->in, conversion->out ) ); if( vips_image_wio_input( rot45->in ) ) return( -1 ); t[0] = vips_image_new_buffer(); if( vips_image_pipelinev( t[0], VIPS_DEMAND_STYLE_ANY, rot45->in, NULL ) ) return( -1 ); if( vips_image_write_prepare( t[0] ) ) return( -1 ); from = rot45->in; switch( rot45->angle ) { case VIPS_ANGLE45_315: vips_rot45_rot45( t[0], from ); from = t[0]; case VIPS_ANGLE45_270: vips_rot45_rot45( t[0], from ); from = t[0]; case VIPS_ANGLE45_225: vips_rot45_rot45( t[0], from ); from = t[0]; case VIPS_ANGLE45_180: vips_rot45_rot45( t[0], from ); from = t[0]; case VIPS_ANGLE45_135: vips_rot45_rot45( t[0], from ); from = t[0]; case VIPS_ANGLE45_90: vips_rot45_rot45( t[0], from ); from = t[0]; case VIPS_ANGLE45_45: vips_rot45_rot45( t[0], from ); break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } if( vips_image_write( t[0], conversion->out ) ) return( -1 ); return( 0 ); } static void vips_rot45_class_init( VipsRot45Class *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_rot45_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "rot45"; vobject_class->description = _( "rotate an image" ); vobject_class->build = vips_rot45_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsRot45, in ) ); VIPS_ARG_ENUM( class, "angle", 6, _( "Angle" ), _( "Angle to rotate image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsRot45, angle ), VIPS_TYPE_ANGLE45, VIPS_ANGLE45_45 ); } static void vips_rot45_init( VipsRot45 *rot45 ) { rot45->angle = VIPS_ANGLE45_45; } /** * vips_rot45: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @angle: rotation angle * * Rotate @in by a multiple of 45 degrees. Odd-length sides and square images * only. * * See also: vips_rot(). * * Returns: 0 on success, -1 on error */ int vips_rot45( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "rot45", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/extract.c0000644000175000017500000002620612303140253015172 00000000000000/* extract an area and/or a set of bands * * Copyright: 1990, J. Cupitt * * Author: J. Cupitt * Written on: 12/02/1990 * Modified on: 4/6/92, J.Cupitt * - speed up! why wasn't this done before? Why am I stupid? * - layout, messages fixed * now extracts IM_CODING_LABQ to IM_CODING_LABQ file: K.Martinez 1/7/93 * 2/7/93 JC * - adapted for partial v2 * - ANSIfied * 7/7/93 JC * - behaviour for IM_CODING_LABQ fixed * - better messages * 7/10/94 JC * - new IM_NEW() * 22/2/95 JC * - new use of im_region_region() * 6/7/98 JC * - im_extract_area() and im_extract_band() added * 11/7/01 JC * - im_extract_band() now numbers from zero * 7/11/01 JC * - oh what pain, im_extract now numbers bands from zero as well * 6/9/02 JC * - zero xoff/yoff for extracted area * 14/4/04 JC * - nope, -ve the origin * 17/7/04 * - added im_extract_bands(), remove many bands from image * 24/3/09 * - added IM_CODING_RAD support * 29/1/10 * - cleanups * - gtkdoc * 26/10/11 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" #include "bandary.h" typedef struct _VipsExtractArea { VipsConversion parent_instance; /* The input image. */ VipsImage *in; int left; int top; int width; int height; } VipsExtractArea; typedef VipsConversionClass VipsExtractAreaClass; G_DEFINE_TYPE( VipsExtractArea, vips_extract_area, VIPS_TYPE_CONVERSION ); /* Extract an area. Can just use pointers. */ static int vips_extract_area_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsExtractArea *extract = (VipsExtractArea *) b; VipsRect iarea; /* Ask for input we need. Translate from demand in or's space to * demand in ir's space. */ iarea = or->valid; iarea.left += extract->left; iarea.top += extract->top; if( vips_region_prepare( ir, &iarea ) ) return( -1 ); /* Attach or to ir. */ if( vips_region_region( or, ir, &or->valid, iarea.left, iarea.top ) ) return( -1 ); return( 0 ); } static int vips_extract_area_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsExtractArea *extract = (VipsExtractArea *) object; if( VIPS_OBJECT_CLASS( vips_extract_area_parent_class )-> build( object ) ) return( -1 ); if( extract->left + extract->width > extract->in->Xsize || extract->top + extract->height > extract->in->Ysize || extract->left < 0 || extract->top < 0 || extract->width <= 0 || extract->height <= 0 ) { vips_error( class->nickname, "%s", _( "bad extract area" ) ); return( -1 ); } if( vips_image_pio_input( extract->in ) || vips_check_coding_known( class->nickname, extract->in ) ) return( -1 ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, extract->in, NULL ) ) return( -1 ); conversion->out->Xsize = extract->width; conversion->out->Ysize = extract->height; conversion->out->Xoffset = -extract->left; conversion->out->Yoffset = -extract->top; if( vips_image_generate( conversion->out, vips_start_one, vips_extract_area_gen, vips_stop_one, extract->in, extract ) ) return( -1 ); return( 0 ); } /* xy range we sanity check on ... just to stop crazy numbers from divide by 0 * etc. causing g_assert() failures later. */ #define RANGE (100000000) static void vips_extract_area_class_init( VipsExtractAreaClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_extract_area_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "extract_area"; vobject_class->description = _( "extract an area from an image" ); vobject_class->build = vips_extract_area_build; VIPS_ARG_IMAGE( class, "input", 0, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsExtractArea, in ) ); VIPS_ARG_INT( class, "left", 2, _( "Left" ), _( "Left edge of extract area" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsExtractArea, left ), -RANGE, RANGE, 0 ); VIPS_ARG_INT( class, "top", 3, _( "Top" ), _( "Top edge of extract area" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsExtractArea, top ), -RANGE, RANGE, 0 ); VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Width of extract area" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsExtractArea, width ), 1, RANGE, 1 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Height of extract area" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsExtractArea, height ), 1, RANGE, 1 ); } static void vips_extract_area_init( VipsExtractArea *extract ) { } /** * vips_extract_area: * @in: input image * @out: output image * @left: left edge of area to extract * @top: top edge of area to extract * @width: width of area to extract * @height: height of area to extract * @...: %NULL-terminated list of optional named arguments * * Extract an area from an image. The area must fit within @in. * * See also: vips_extract_bands(). * * Returns: 0 on success, -1 on error. */ int vips_extract_area( VipsImage *in, VipsImage **out, int left, int top, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "extract_area", ap, in, out, left, top, width, height ); va_end( ap ); return( result ); } /* A synonym for extract_area. */ GType vips_crop_get_type( void ) { static GType type = 0; if( !type ) { static const GTypeInfo info = { sizeof( VipsExtractAreaClass ), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) vips_extract_area_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof( VipsExtractArea ), 32, /* n_preallocs */ (GInstanceInitFunc) vips_extract_area_init, }; type = g_type_register_static( VIPS_TYPE_CONVERSION, "crop", &info, 0 ); } return( type ); } /** * vips_crop: * @in: input image * @out: output image * @left: left edge of area to extract * @top: top edge of area to extract * @width: width of area to extract * @height: height of area to extract * @...: %NULL-terminated list of optional named arguments * * A synonym for vips_extract_area(). * * See also: vips_extract_bands(). * * Returns: 0 on success, -1 on error. */ int vips_crop( VipsImage *in, VipsImage **out, int left, int top, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "crop", ap, in, out, left, top, width, height ); va_end( ap ); return( result ); } typedef struct _VipsExtractBand { VipsBandary parent_instance; /* The input image. */ VipsImage *in; int band; int n; } VipsExtractBand; typedef VipsBandaryClass VipsExtractBandClass; G_DEFINE_TYPE( VipsExtractBand, vips_extract_band, VIPS_TYPE_BANDARY ); static void vips_extract_band_buffer( VipsBandary *bandary, VipsPel *out, VipsPel **in, int width ) { VipsConversion *conversion = (VipsConversion *) bandary; VipsExtractBand *extract = (VipsExtractBand *) bandary; VipsImage *im = bandary->ready[0]; int es = VIPS_IMAGE_SIZEOF_ELEMENT( im ); int ips = VIPS_IMAGE_SIZEOF_PEL( im ); const int ops = VIPS_IMAGE_SIZEOF_PEL( conversion->out ); VipsPel *p, *q; int x, z; p = in[0] + extract->band * es; q = out; for( x = 0; x < width; x++ ) { for( z = 0; z < ops; z++ ) q[z] = p[z]; p += ips; q += ops; } } static int vips_extract_band_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsBandary *bandary = (VipsBandary *) object; VipsExtractBand *extract = (VipsExtractBand *) object; if( extract->in ) { bandary->n = 1; bandary->in = &extract->in; bandary->out_bands = extract->n; if( extract->band + extract->n > extract->in->Bands ) { vips_error( class->nickname, "%s", _( "bad extract band" ) ); return( -1 ); } if( extract->band == 0 && extract->n == extract->in->Bands ) return( vips_bandary_copy( bandary ) ); } if( VIPS_OBJECT_CLASS( vips_extract_band_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } static void vips_extract_band_class_init( VipsExtractBandClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsBandaryClass *bandary_class = VIPS_BANDARY_CLASS( class ); VIPS_DEBUG_MSG( "vips_extract_band_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "extract_band"; vobject_class->description = _( "extract band from an image" ); vobject_class->build = vips_extract_band_build; bandary_class->process_line = vips_extract_band_buffer; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsExtractBand, in ) ); VIPS_ARG_INT( class, "band", 3, _( "Band" ), _( "Band to extract" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsExtractBand, band ), 0, RANGE, 0 ); VIPS_ARG_INT( class, "n", 4, _( "n" ), _( "Number of bands to extract" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsExtractBand, n ), 1, RANGE, 1 ); } static void vips_extract_band_init( VipsExtractBand *extract ) { extract->n = 1; } /** * vips_extract_band: * @in: input image * @out: output image * @band: band to extract * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @n: number of bands to extract * * Extract a band or bands from an image. Extracting out of range is an error. * * See also: vips_extract_area(). * * Returns: 0 on success, -1 on error. */ int vips_extract_band( VipsImage *in, VipsImage **out, int band, ... ) { va_list ap; int result; va_start( ap, band ); result = vips_call_split( "extract_band", ap, in, out, band ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/wrap.c0000644000175000017500000001017012303140253014462 00000000000000/* im_wrap * * Copyright: 2008, Nottingham Trent University * Author: Tom Vajzovic * Written on: 2008-01-15 * 2/2/10 * - rewritten in terms of im_replicate()/im_extract_area() * - gtkdoc * - allows any x/y * 31/5/13 * - redone as a class * - added rotquad behaviour if x/y not set */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include "pconversion.h" typedef struct _VipsWrap { VipsConversion parent_instance; VipsImage *in; int x; int y; } VipsWrap; typedef VipsConversionClass VipsWrapClass; G_DEFINE_TYPE( VipsWrap, vips_wrap, VIPS_TYPE_CONVERSION ); static int vips_wrap_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsWrap *wrap = (VipsWrap *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 7 ); int x; int y; if( VIPS_OBJECT_CLASS( vips_wrap_parent_class )->build( object ) ) return( -1 ); if( !vips_object_argument_isset( object, "x" ) ) wrap->x = wrap->in->Xsize / 2; if( !vips_object_argument_isset( object, "y" ) ) wrap->y = wrap->in->Ysize / 2; /* Clock arithmetic: we want negative x/y to wrap around * nicely. */ x = wrap->x < 0 ? -wrap->x % wrap->in->Xsize : wrap->in->Xsize - wrap->x % wrap->in->Xsize; y = wrap->y < 0 ? -wrap->y % wrap->in->Ysize : wrap->in->Ysize - wrap->y % wrap->in->Ysize; if( vips_replicate( wrap->in, &t[0], 2, 2, NULL ) || vips_extract_area( t[0], &t[1], x, y, wrap->in->Xsize, wrap->in->Ysize, NULL ) || vips_image_write( t[1], conversion->out ) ) return( -1 ); conversion->out->Xoffset = x; conversion->out->Yoffset = y; return( 0 ); } static void vips_wrap_class_init( VipsWrapClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "wrap"; vobject_class->description = _( "wrap image origin" ); vobject_class->build = vips_wrap_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsWrap, in ) ); VIPS_ARG_INT( class, "x", 3, _( "x" ), _( "Left edge of input in output" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsWrap, x ), -1000000, 1000000, 0 ); VIPS_ARG_INT( class, "y", 4, _( "y" ), _( "Top edge of input in output" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsWrap, y ), -1000000, 1000000, 0 ); } static void vips_wrap_init( VipsWrap *wrap ) { } /** * vips_wrap: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @x: horizontal displacement * @y: vertical displacement * * Slice an image up and move the segments about so that the pixel that was * at 0, 0 is now at @x, @y. If @x and @y are not set, they default to the * centre of the image. * * See also: vips_embed(), vips_replicate(). * * Returns: 0 on success, -1 on error */ int vips_wrap( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "wrap", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/bandary.h0000644000175000017500000000463512303140253015147 00000000000000/* base class for various operations on bands */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS__BANDARY_H #define VIPS__BANDARY_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include "pconversion.h" #define VIPS_TYPE_BANDARY (vips_bandary_get_type()) #define VIPS_BANDARY( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_BANDARY, VipsBandary )) #define VIPS_BANDARY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_BANDARY, VipsBandaryClass)) #define VIPS_IS_BANDARY( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_BANDARY )) #define VIPS_IS_BANDARY_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_BANDARY )) #define VIPS_BANDARY_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_BANDARY, VipsBandaryClass )) struct _VipsBandary; typedef void (*VipsBandaryProcessFn)( struct _VipsBandary *bandary, VipsPel *out, VipsPel **in, int width ); typedef struct _VipsBandary { VipsConversion parent_instance; /* Array of input arguments, set these from a subclass. */ VipsImage **in; int n; /* The number of output bands. For example, VipsBandjoin sets the sum * of the bands in the input images. */ int out_bands; /* The input images, ready for the operation. */ VipsImage **ready; } VipsBandary; typedef struct _VipsBandaryClass { VipsConversionClass parent_class; /* The buffer processor. */ VipsBandaryProcessFn process_line; } VipsBandaryClass; GType vips_bandary_get_type( void ); int vips_bandary_copy( VipsBandary *bandary ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS__BANDARY_H*/ vips-7.38.5/libvips/conversion/zoom.c0000644000175000017500000002510412303140253014500 00000000000000/* im_zoom * * Author: N. Martinez 1991 * 6/6/94 JC * - rewritten to ANSI-C * - now works for any type, including IM_CODING_LABQ * 7/10/94 JC * - new IM_ARRAY() macro * 26/1/96 JC * - separate x and y zoom factors * 21/8/96 JC * - partial, yuk! this is so complicated ... * 30/8/96 JC * - sets demand_hint * 10/2/00 JC * - check for integer overflow in zoom facs ... was happening with ip's * zoom on large images * 3/8/02 JC * - fall back to im_copy() for x & y factors == 1 * 24/3/09 * - added IM_CODING_RAD support * 1/2/10 * - gtkdoc * 1/6/13 * - redo as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* * TODO: * Test for pixel size and use memcpy() on individual pixels once they reach * sizes of the order of tens of bytes. char-wise copy is quicker than * memcpy() for smaller pixels. * * Also, I haven't tested it but int-wise copying may be faster still, as * long as alignment permits it. * * tcv. 2006-09-01 */ /* Turn on ADDR() range checks. #define DEBUG 1 */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsZoom { VipsConversion parent_instance; /* The input image. */ VipsImage *in; int xfac; /* Scale factors */ int yfac; } VipsZoom; typedef VipsConversionClass VipsZoomClass; G_DEFINE_TYPE( VipsZoom, vips_zoom, VIPS_TYPE_CONVERSION ); /* Round N down to P boundary. */ #define ROUND_DOWN( N, P ) ((N) - ((N) % P)) /* Round N up to P boundary. */ #define ROUND_UP( N, P ) (ROUND_DOWN( (N) + (P) - 1, (P) )) /* Paint the part of the region containing only whole pels. */ static void vips_zoom_paint_whole( VipsRegion *or, VipsRegion *ir, VipsZoom *zoom, const int left, const int right, const int top, const int bottom ) { const int ps = VIPS_IMAGE_SIZEOF_PEL( ir->im ); const int ls = VIPS_REGION_LSKIP( or ); const int rs = ps * (right - left); /* Transform to ir coordinates. */ const int ileft = left / zoom->xfac; const int iright = right / zoom->xfac; const int itop = top / zoom->yfac; const int ibottom = bottom / zoom->yfac; int x, y, z, i; /* We know this! */ g_assert( right > left && bottom > top && right % zoom->xfac == 0 && left % zoom->xfac == 0 && top % zoom->yfac == 0 && bottom % zoom->yfac == 0 ); /* Loop over input, as we know we are all whole. */ for( y = itop; y < ibottom; y++ ) { VipsPel *p = VIPS_REGION_ADDR( ir, ileft, y ); VipsPel *q = VIPS_REGION_ADDR( or, left, y * zoom->yfac ); VipsPel *r; /* Expand the first line of pels. */ r = q; for( x = ileft; x < iright; x++ ) { /* Copy each pel xfac times. */ for( z = 0; z < zoom->xfac; z++ ) { for( i = 0; i < ps; i++ ) r[i] = p[i]; r += ps; } p += ps; } /* Copy the expanded line yfac-1 times. */ r = q + ls; for( z = 1; z < zoom->yfac; z++ ) { memcpy( r, q, rs ); r += ls; } } } /* Paint the part of the region containing only part-pels. */ static void vips_zoom_paint_part( VipsRegion *or, VipsRegion *ir, VipsZoom *zoom, const int left, const int right, const int top, const int bottom ) { const int ps = VIPS_IMAGE_SIZEOF_PEL( ir->im ); const int ls = VIPS_REGION_LSKIP( or ); const int rs = ps * (right - left); /* Start position in input. */ const int ix = left / zoom->xfac; const int iy = top / zoom->yfac; /* Pels down to yfac boundary, pels down to bottom. Do the smallest of * these for first y loop. */ const int ptbound = (iy + 1) * zoom->yfac - top; const int ptbot = bottom - top; int yt = VIPS_MIN( ptbound, ptbot ); int x, y, z, i; /* Only know this. */ g_assert( right - left >= 0 && bottom - top >= 0 ); /* Have to loop over output. */ for( y = top; y < bottom; ) { VipsPel *p = VIPS_REGION_ADDR( ir, ix, y / zoom->yfac ); VipsPel *q = VIPS_REGION_ADDR( or, left, y ); VipsPel *r; /* Output pels until we jump the input pointer. */ int xt = (ix + 1) * zoom->xfac - left; /* Loop for this output line. */ r = q; for( x = left; x < right; x++ ) { /* Copy 1 pel. */ for( i = 0; i < ps; i++ ) r[i] = p[i]; r += ps; /* Move input if on boundary. */ --xt; if( xt == 0 ) { xt = zoom->xfac; p += ps; } } /* Repeat that output line until the bottom of this pixel * boundary, or we hit bottom. */ r = q + ls; for( z = 1; z < yt; z++ ) { memcpy( r, q, rs ); r += ls; } /* Move y on by the number of lines we wrote. */ y += yt; /* Reset yt for next iteration. */ yt = zoom->yfac; } } /* Zoom a VipsRegion. */ static int vips_zoom_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsZoom *zoom = (VipsZoom *) b; /* Output area we are building. */ const VipsRect *r = &or->valid; const int ri = VIPS_RECT_RIGHT( r ); const int bo = VIPS_RECT_BOTTOM(r); VipsRect s; int left, right, top, bottom; int width, height; /* Area of input we need. We have to round out, as we may have * part-pixels all around the edges. */ left = ROUND_DOWN( r->left, zoom->xfac ); right = ROUND_UP( ri, zoom->xfac ); top = ROUND_DOWN( r->top, zoom->yfac ); bottom = ROUND_UP( bo, zoom->yfac ); width = right - left; height = bottom - top; s.left = left / zoom->xfac; s.top = top / zoom->yfac; s.width = width / zoom->xfac; s.height = height / zoom->yfac; if( vips_region_prepare( ir, &s ) ) return( -1 ); /* Find the part of the output (if any) which uses only whole pels. */ left = ROUND_UP( r->left, zoom->xfac ); right = ROUND_DOWN( ri, zoom->xfac ); top = ROUND_UP( r->top, zoom->yfac ); bottom = ROUND_DOWN( bo, zoom->yfac ); width = right - left; height = bottom - top; /* Stage 1: we just paint the whole pels in the centre of the region. * As we know they are not clipped, we can do it quickly. */ if( width > 0 && height > 0 ) vips_zoom_paint_whole( or, ir, zoom, left, right, top, bottom ); /* Just fractional pixels left. Paint in the top, left, right and * bottom parts. */ if( top - r->top > 0 ) /* Some top pixels. */ vips_zoom_paint_part( or, ir, zoom, r->left, ri, r->top, VIPS_MIN( top, bo ) ); if( left - r->left > 0 && height > 0 ) /* Left pixels. */ vips_zoom_paint_part( or, ir, zoom, r->left, VIPS_MIN( left, ri ), top, bottom ); if( ri - right > 0 && height > 0 ) /* Right pixels. */ vips_zoom_paint_part( or, ir, zoom, VIPS_MAX( right, r->left ), ri, top, bottom ); if( bo - bottom > 0 && height >= 0 ) /* Bottom pixels. */ vips_zoom_paint_part( or, ir, zoom, r->left, ri, VIPS_MAX( bottom, r->top ), bo ); return( 0 ); } static int vips_zoom_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsZoom *zoom = (VipsZoom *) object; if( VIPS_OBJECT_CLASS( vips_zoom_parent_class )->build( object ) ) return( -1 ); g_assert( zoom->xfac > 0 ); g_assert( zoom->yfac > 0 ); /* Make sure we won't get integer overflow. */ if( (double) zoom->in->Xsize * zoom->xfac > (double) INT_MAX / 2 || (double) zoom->in->Ysize * zoom->yfac > (double) INT_MAX / 2 ) { vips_error( class->nickname, "%s", _( "zoom factors too large" ) ); return( -1 ); } if( zoom->xfac == 1 && zoom->yfac == 1 ) return( vips_image_write( zoom->in, conversion->out ) ); if( vips_image_pio_input( zoom->in ) || vips_check_coding_known( class->nickname, zoom->in ) ) return( -1 ); /* Set demand hints. THINSTRIP will prevent us from using * vips_zoom_paint_whole() much ... so go for FATSTRIP. */ if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_FATSTRIP, zoom->in, NULL ) ) return( -1 ); conversion->out->Xsize = zoom->in->Xsize * zoom->xfac; conversion->out->Ysize = zoom->in->Ysize * zoom->yfac; if( vips_image_generate( conversion->out, vips_start_one, vips_zoom_gen, vips_stop_one, zoom->in, zoom ) ) return( -1 ); return( 0 ); } /* xy range we sanity check on ... just to stop crazy numbers from divide by 0 * etc. causing g_assert() failures later. */ #define RANGE (100000000) static void vips_zoom_class_init( VipsZoomClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "zoom"; vobject_class->description = _( "zoom an image" ); vobject_class->build = vips_zoom_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "input", 0, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsZoom, in ) ); VIPS_ARG_INT( class, "xfac", 2, _( "Xfac" ), _( "Horizontal zoom factor" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsZoom, xfac ), 1, RANGE, 1 ); VIPS_ARG_INT( class, "yfac", 3, _( "Yfac" ), _( "Vertical zoom factor" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsZoom, yfac ), 1, RANGE, 1 ); } static void vips_zoom_init( VipsZoom *zoom ) { } /** * vips_zoom: * @in: input image * @out: output image * @xfac: horizontal scale factor * @yfac: vertical scale factor * @...: %NULL-terminated list of optional named arguments * * Zoom an image by repeating pixels. This is fast nearest-neighbour * zoom. * * See also: vips_affine(), vips_subsample(). * * Returns: 0 on success, -1 on error. */ int vips_zoom( VipsImage *in, VipsImage **out, int xfac, int yfac, ... ) { va_list ap; int result; va_start( ap, yfac ); result = vips_call_split( "zoom", ap, in, out, xfac, yfac ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/bandbool.c0000644000175000017500000002017412303140253015276 00000000000000/* bandbool.c --- bool op across image bands * * 7/12/12 * - from boolean.c */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "bandary.h" typedef struct _VipsBandbool { VipsBandary parent_instance; VipsImage *in; VipsOperationBoolean operation; } VipsBandbool; typedef VipsBandaryClass VipsBandboolClass; G_DEFINE_TYPE( VipsBandbool, vips_bandbool, VIPS_TYPE_BANDARY ); static int vips_bandbool_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsBandary *bandary = (VipsBandary *) object; VipsBandbool *bandbool = (VipsBandbool *) object; /* << and >> don't work over bands. */ if( bandbool->operation == VIPS_OPERATION_BOOLEAN_LSHIFT || bandbool->operation == VIPS_OPERATION_BOOLEAN_RSHIFT ) { vips_error( class->nickname, _( "operator %s not supported across image bands" ), vips_enum_nick( VIPS_TYPE_OPERATION_BOOLEAN, bandbool->operation ) ); return( -1 ); } if( bandbool->in ) { if( vips_check_noncomplex( class->nickname, bandbool->in ) ) return( -1 ); if( bandbool->in->Bands == 1 ) return( vips_bandary_copy( bandary ) ); } bandary->out_bands = 1; bandary->n = 1; bandary->in = &bandbool->in; if( VIPS_OBJECT_CLASS( vips_bandbool_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } #define SWITCH( I, F, OP ) \ switch( vips_image_get_format( im ) ) { \ case VIPS_FORMAT_UCHAR: I( unsigned char, OP ); break; \ case VIPS_FORMAT_CHAR: I( signed char, OP ); break; \ case VIPS_FORMAT_USHORT: I( unsigned short, OP ); break; \ case VIPS_FORMAT_SHORT: I( signed short, OP ); break; \ case VIPS_FORMAT_UINT: I( unsigned int, OP ); break; \ case VIPS_FORMAT_INT: I( signed int, OP ); break; \ case VIPS_FORMAT_FLOAT: F( float, OP ); break; \ case VIPS_FORMAT_DOUBLE: F( double, OP ); break;\ \ default: \ g_assert( 0 ); \ } #define LOOPB( TYPE, OP ) { \ TYPE *p = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < width; x++ ) { \ TYPE acc; \ \ acc = p[0]; \ for( b = 1; b < bands; b++ ) \ acc = acc OP p[b]; \ \ q[x] = acc; \ p += bands; \ } \ } #define FLOOPB( TYPE, OP ) { \ TYPE *p = (TYPE *) in[0]; \ int *q = (int *) out; \ \ for( x = 0; x < width; x++ ) { \ int acc; \ \ acc = (int) p[0]; \ for( b = 1; b < bands; b++ ) \ acc = acc OP ((int) p[b]); \ \ q[x] = acc; \ p += bands; \ } \ } static void vips_bandbool_buffer( VipsBandary *bandary, VipsPel *out, VipsPel **in, int width ) { VipsBandbool *bandbool = (VipsBandbool *) bandary; VipsImage *im = bandary->ready[0]; int bands = im->Bands; int x, b; switch( bandbool->operation ) { case VIPS_OPERATION_BOOLEAN_AND: SWITCH( LOOPB, FLOOPB, & ); break; case VIPS_OPERATION_BOOLEAN_OR: SWITCH( LOOPB, FLOOPB, | ); break; case VIPS_OPERATION_BOOLEAN_EOR: SWITCH( LOOPB, FLOOPB, ^ ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type conversions for boolean. */ static const VipsBandFormat vips_bandfmt_boolean[10] = { /* UC C US S UI I F X D DX */ UC, C, US, S, UI, I, I, I, I, I, }; static void vips_bandbool_class_init( VipsBandboolClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsBandaryClass *bandary_class = VIPS_BANDARY_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "bandbool"; object_class->description = _( "boolean operation across image bands" ); object_class->build = vips_bandbool_build; bandary_class->process_line = vips_bandbool_buffer; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBandbool, in ) ); VIPS_ARG_ENUM( class, "boolean", 200, _( "Operation" ), _( "boolean to perform" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBandbool, operation ), VIPS_TYPE_OPERATION_BOOLEAN, VIPS_OPERATION_BOOLEAN_AND ); } static void vips_bandbool_init( VipsBandbool *bandbool ) { bandbool->operation = VIPS_OPERATION_BOOLEAN_AND; } static int vips_bandboolv( VipsImage *in, VipsImage **out, VipsOperationBoolean operation, va_list ap ) { return( vips_call_split( "bandbool", ap, in, out, operation ) ); } /** * vips_bandbool: * @im: left-hand input #VipsImage * @out: output #VipsImage * @operation: boolean operation to perform * @...: %NULL-terminated list of optional named arguments * * Perform various boolean operations across the bands of an image. For * example, a three-band uchar image operated on with * #VIPS_OPERATION_BOOLEAN_AND will produce a one-band uchar image where each * pixel is the bitwise and of the band elements of the corresponding pixel in * the input image. * * The output image is the same format as the input image for integer * types. Float types are cast to int before processing. Complex types are not * supported. * * The output image always has one band. * * This operation is useful in conjuction with vips_relational(). You can use * it to see if all image bands match exactly. * * See also: vips_boolean_const(). * * Returns: 0 on success, -1 on error */ int vips_bandbool( VipsImage *in, VipsImage **out, VipsOperationBoolean operation, ... ) { va_list ap; int result; va_start( ap, operation ); result = vips_bandboolv( in, out, operation, ap ); va_end( ap ); return( result ); } /** * vips_bandand: * @in: left-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_AND on an image. See * vips_bandbool(). * * Returns: 0 on success, -1 on error */ int vips_bandand( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_bandboolv( in, out, VIPS_OPERATION_BOOLEAN_AND, ap ); va_end( ap ); return( result ); } /** * vips_bandor: * @in: left-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_OR on an image. See * vips_bandbool(). * * Returns: 0 on success, -1 on error */ int vips_bandor( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_bandboolv( in, out, VIPS_OPERATION_BOOLEAN_OR, ap ); va_end( ap ); return( result ); } /** * vips_bandeor: * @in: left-hand input #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Perform #VIPS_OPERATION_BOOLEAN_EOR on an image. See * vips_bandbool(). * * Returns: 0 on success, -1 on error */ int vips_bandeor( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_bandboolv( in, out, VIPS_OPERATION_BOOLEAN_EOR, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/ifthenelse.c0000644000175000017500000003312012303140253015637 00000000000000/* ifthenelse.c --- use a condition image to join two images together * * Modified: * 9/2/95 JC * - partialed and ANSIfied * 11/9/95 JC * - return( 0 ) missing! oops * 15/4/05 * - now just evals left/right if all zero/all one * 7/10/06 * - set THINSTRIP * 23/9/09 * - gtkdoc comment * 23/9/09 * - use im_check*() * - allow many-band conditional and single-band a/b * - allow a/b to differ in format and bands * 25/6/10 * - let the conditional image be any format by adding a (!=0) if * necessary * 17/5/11 * - added sizealike * 14/11/11 * - redone as a class * 19/4/12 * - fix blend * - small blend speedup */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsIfthenelse { VipsConversion parent_instance; /* Params. */ VipsImage *cond; VipsImage *in1; VipsImage *in2; gboolean blend; } VipsIfthenelse; typedef VipsConversionClass VipsIfthenelseClass; G_DEFINE_TYPE( VipsIfthenelse, vips_ifthenelse, VIPS_TYPE_CONVERSION ); #define IBLEND1( TYPE ) { \ TYPE *a = (TYPE *) ap; \ TYPE *b = (TYPE *) bp; \ TYPE *q = (TYPE *) qp; \ \ for( i = 0, x = 0; x < n; i++, x += bands ) { \ const int v = c[i]; \ \ for( z = x; z < x + bands; z++ ) \ q[z] = (v * a[z] + (255 - v) * b[z] + 128) / 255; \ } \ } #define IBLENDN( TYPE ) { \ TYPE *a = (TYPE *) ap; \ TYPE *b = (TYPE *) bp; \ TYPE *q = (TYPE *) qp; \ \ for( x = 0; x < n; x += bands ) { \ for( z = x; z < x + bands; z++ ) { \ const int v = c[z]; \ \ q[z] = (v * a[z] + (255 - v) * b[z] + 128) / 255; \ } \ } \ } #define FBLEND1( TYPE ) { \ TYPE *a = (TYPE *) ap; \ TYPE *b = (TYPE *) bp; \ TYPE *q = (TYPE *) qp; \ \ for( i = 0, x = 0; x < n; i++, x += bands ) { \ const double v = c[i] / 255.0; \ \ for( z = x; z < x + bands; z++ ) \ q[z] = v * a[z] + (1.0 - v) * b[z]; \ } \ } #define FBLENDN( TYPE ) { \ TYPE *a = (TYPE *) ap; \ TYPE *b = (TYPE *) bp; \ TYPE *q = (TYPE *) qp; \ \ for( x = 0; x < n; x += bands ) { \ for( z = x; z < x + bands; z++ ) { \ const double v = c[z] / 255.0; \ \ q[z] = v * a[z] + (1.0 - v) * b[z]; \ } \ } \ } #define CBLEND1( TYPE ) { \ TYPE *a = (TYPE *) ap; \ TYPE *b = (TYPE *) bp; \ TYPE *q = (TYPE *) qp; \ \ for( i = 0, x = 0; x < n; i++, x += bands ) { \ const double v = c[i] / 255.0; \ \ for( z = x; z < x + 2 * bands; z++ ) \ q[z] = v * a[z] + (1.0 - v) * b[z]; \ } \ } #define CBLENDN( TYPE ) { \ TYPE *a = (TYPE *) ap; \ TYPE *b = (TYPE *) bp; \ TYPE *q = (TYPE *) qp; \ \ for( x = 0; x < n; x += bands ) { \ for( z = x; z < x + bands; z++ ) { \ const double v = c[z] / 255.0; \ \ q[2 * z] = v * a[2 * z] + (1.0 - v) * b[2 * z]; \ q[2 * z + 1] = v * a[2 * z + 1] + \ (1.0 - v) * b[2 * z + 1]; \ } \ } \ } /* Blend with a 1-band conditional image. */ static void vips_blend1_buffer( VipsPel *qp, VipsPel *c, VipsPel *ap, VipsPel *bp, int width, VipsImage *im ) { int i, x, z; const int bands = im->Bands; const int n = width * bands; switch( im->BandFmt ) { case VIPS_FORMAT_UCHAR: IBLEND1( unsigned char ); break; case VIPS_FORMAT_CHAR: IBLEND1( signed char ); break; case VIPS_FORMAT_USHORT: IBLEND1( unsigned short ); break; case VIPS_FORMAT_SHORT: IBLEND1( signed short ); break; case VIPS_FORMAT_UINT: IBLEND1( unsigned int ); break; case VIPS_FORMAT_INT: IBLEND1( signed int ); break; case VIPS_FORMAT_FLOAT: FBLEND1( float ); break; case VIPS_FORMAT_DOUBLE: FBLEND1( double ); break; case VIPS_FORMAT_COMPLEX: CBLEND1( float ); break; case VIPS_FORMAT_DPCOMPLEX: CBLEND1( double ); break; default: g_assert( 0 ); } } /* Blend with a many band conditional image. */ static void vips_blendn_buffer( VipsPel *qp, VipsPel *c, VipsPel *ap, VipsPel *bp, int width, VipsImage *im ) { int x, z; const int bands = im->Bands; const int n = width * bands; switch( im->BandFmt ) { case VIPS_FORMAT_UCHAR: IBLENDN( unsigned char ); break; case VIPS_FORMAT_CHAR: IBLENDN( signed char ); break; case VIPS_FORMAT_USHORT: IBLENDN( unsigned short ); break; case VIPS_FORMAT_SHORT: IBLENDN( signed short ); break; case VIPS_FORMAT_UINT: IBLENDN( unsigned int ); break; case VIPS_FORMAT_INT: IBLENDN( signed int ); break; case VIPS_FORMAT_FLOAT: FBLENDN( float ); break; case VIPS_FORMAT_DOUBLE: FBLENDN( double ); break; case VIPS_FORMAT_COMPLEX: CBLENDN( float ); break; case VIPS_FORMAT_DPCOMPLEX: CBLENDN( double ); break; default: g_assert( 0 ); } } static int vips_blend_gen( VipsRegion *or, void *seq, void *client1, void *client2, gboolean *stop ) { VipsRegion **ir = (VipsRegion **) seq; VipsRect *r = &or->valid; int le = r->left; int to = r->top; int bo = VIPS_RECT_BOTTOM( r ); VipsImage *c = ir[2]->im; VipsImage *a = ir[0]->im; int x, y; int all0, all255; if( vips_region_prepare( ir[2], r ) ) return( -1 ); /* Is the conditional all zero or all 255? We can avoid asking * for one of the inputs to be calculated. */ all0 = *VIPS_REGION_ADDR( ir[2], le, to ) == 0; all255 = *VIPS_REGION_ADDR( ir[2], le, to ) == 255; for( y = to; y < bo; y++ ) { VipsPel *p = VIPS_REGION_ADDR( ir[2], le, y ); int width = r->width * c->Bands; for( x = 0; x < width; x++ ) { all0 &= p[x] == 0; all255 &= p[x] == 255; } if( !all0 && !all255 ) break; } if( all255 ) { /* All 255. Point or at the then image. */ if( vips_region_prepare( ir[0], r ) || vips_region_region( or, ir[0], r, r->left, r->top ) ) return( -1 ); } else if( all0 ) { /* All zero. Point or at the else image. */ if( vips_region_prepare( ir[1], r ) || vips_region_region( or, ir[1], r, r->left, r->top ) ) return( -1 ); } else { /* Mix of set and clear ... ask for both then and else parts * and interleave. */ if( vips_region_prepare( ir[0], r ) || vips_region_prepare( ir[1], r ) ) return( -1 ); for( y = to; y < bo; y++ ) { VipsPel *ap = VIPS_REGION_ADDR( ir[0], le, y ); VipsPel *bp = VIPS_REGION_ADDR( ir[1], le, y ); VipsPel *cp = VIPS_REGION_ADDR( ir[2], le, y ); VipsPel *q = VIPS_REGION_ADDR( or, le, y ); if( c->Bands == 1 ) vips_blend1_buffer( q, cp, ap, bp, r->width, a ); else vips_blendn_buffer( q, cp, ap, bp, r->width, a ); } } return( 0 ); } static int vips_ifthenelse_gen( VipsRegion *or, void *seq, void *client1, void *client2, gboolean *stop ) { VipsRegion **ir = (VipsRegion **) seq; VipsRect *r = &or->valid; int le = r->left; int to = r->top; int bo = VIPS_RECT_BOTTOM( r ); VipsImage *c = ir[2]->im; VipsImage *a = ir[0]->im; int size, width; int i, x, y, z; int all0, alln0; if( c->Bands == 1 ) { /* Copying PEL-sized units with a one-band conditional. */ size = VIPS_IMAGE_SIZEOF_PEL( a ); width = r->width; } else { /* Copying ELEMENT sized-units with an n-band conditional. */ size = VIPS_IMAGE_SIZEOF_ELEMENT( a ); width = r->width * a->Bands; } if( vips_region_prepare( ir[2], r ) ) return( -1 ); /* Is the conditional all zero or all non-zero? We can avoid asking * for one of the inputs to be calculated. */ all0 = *VIPS_REGION_ADDR( ir[2], le, to ) == 0; alln0 = *VIPS_REGION_ADDR( ir[2], le, to ) != 0; for( y = to; y < bo; y++ ) { VipsPel *p = VIPS_REGION_ADDR( ir[2], le, y ); for( x = 0; x < width; x++ ) { all0 &= p[x] == 0; alln0 &= p[x] != 0; } if( !all0 && !alln0 ) break; } if( alln0 ) { /* All non-zero. Point or at the then image. */ if( vips_region_prepare( ir[0], r ) || vips_region_region( or, ir[0], r, r->left, r->top ) ) return( -1 ); } else if( all0 ) { /* All zero. Point or at the else image. */ if( vips_region_prepare( ir[1], r ) || vips_region_region( or, ir[1], r, r->left, r->top ) ) return( -1 ); } else { /* Mix of set and clear ... ask for both then and else parts * and interleave. */ if( vips_region_prepare( ir[0], r ) || vips_region_prepare( ir[1], r ) ) return( -1 ); for( y = to; y < bo; y++ ) { VipsPel *ap = VIPS_REGION_ADDR( ir[0], le, y ); VipsPel *bp = VIPS_REGION_ADDR( ir[1], le, y ); VipsPel *cp = VIPS_REGION_ADDR( ir[2], le, y ); VipsPel *q = VIPS_REGION_ADDR( or, le, y ); for( x = 0, i = 0; i < width; i++, x += size ) if( cp[i] ) for( z = x; z < x + size; z++ ) q[z] = ap[z]; else for( z = x; z < x + size; z++ ) q[z] = bp[z]; } } return( 0 ); } static int vips_ifthenelse_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsIfthenelse *ifthenelse = (VipsIfthenelse *) object; VipsGenerateFn generate_fn = ifthenelse->blend ? vips_blend_gen : vips_ifthenelse_gen; VipsImage **band = (VipsImage **) vips_object_local_array( object, 3 ); VipsImage **size = (VipsImage **) vips_object_local_array( object, 3 ); VipsImage **format = (VipsImage **) vips_object_local_array( object, 3 ); VipsImage *all[3]; if( VIPS_OBJECT_CLASS( vips_ifthenelse_parent_class )->build( object ) ) return( -1 ); /* We have to have the condition image last since we want the output * image to inherit its properties from the then/else parts. */ all[0] = ifthenelse->in1; all[1] = ifthenelse->in2; all[2] = ifthenelse->cond; /* No need to check input images, sizealike and friends will do this * for us. */ /* Cast our input images up to a common bands and size. */ if( vips__bandalike_vec( class->nickname, all, band, 3, 0 ) || vips__sizealike_vec( band, size, 3 ) ) return( -1 ); /* Condition is cast to uchar, then/else to a common type. */ if( vips_cast( size[2], &format[2], VIPS_FORMAT_UCHAR, NULL ) ) return( -1 ); if( vips__formatalike_vec( size, format, 2 ) ) return( -1 ); if( vips_image_pipeline_array( conversion->out, VIPS_DEMAND_STYLE_SMALLTILE, format ) ) return( -1 ); if( vips_image_generate( conversion->out, vips_start_many, generate_fn, vips_stop_many, format, ifthenelse ) ) return( -1 ); return( 0 ); } static void vips_ifthenelse_class_init( VipsIfthenelseClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_ifthenelse_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "ifthenelse"; vobject_class->description = _( "ifthenelse an image" ); vobject_class->build = vips_ifthenelse_build; VIPS_ARG_IMAGE( class, "cond", -2, _( "Condition" ), _( "Condition input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsIfthenelse, cond ) ); VIPS_ARG_IMAGE( class, "in1", -1, _( "Then image" ), _( "Source for TRUE pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsIfthenelse, in1 ) ); VIPS_ARG_IMAGE( class, "in2", 0, _( "Else image" ), _( "Source for FALSE pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsIfthenelse, in2 ) ); VIPS_ARG_BOOL( class, "blend", 4, _( "blend" ), _( "Blend smoothly between then and else parts" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsIfthenelse, blend ), FALSE ); } static void vips_ifthenelse_init( VipsIfthenelse *ifthenelse ) { } /** * vips_ifthenelse: * @cond: condition #VipsImage * @in1: then #VipsImage * @in2: else #VipsImage * @out: output #VipsImage * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @blend: blend smoothly between @in1 and @in2 * * This operation scans the condition image @cond * and uses it to select pixels from either the then image @in1 or the else * image @in2. Non-zero means @in1, 0 means @in2. * * Any image can have either 1 band or n bands, where n is the same for all * the non-1-band images. Single band images are then effectively copied to * make n-band images. * * Images @in1 and @in2 are cast up to the smallest common format. @cond is * cast to uchar. * * If the images differ in size, the smaller images are enlarged to match the * largest by adding zero pixels along the bottom and right. * * If @blend is %TRUE, then values in @out are smoothly blended between @in1 * and @in2 using the formula: * * @out = (@cond / 255) * @in1 + (1 - @cond / 255) * @in2 * * See also: vips_equal(). * * Returns: 0 on success, -1 on error */ int vips_ifthenelse( VipsImage *cond, VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "ifthenelse", ap, cond, in1, in2, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/tilecache.c0000644000175000017500000006360512303140253015445 00000000000000/* Simple tile or line cache. * * This isn't the same as the sinkscreen cache: we don't sub-divide, and we * single-thread our callee. * * 23/8/06 * - take ownership of reused tiles in case the cache is being shared * 13/2/07 * - release ownership after fillng with pixels in case we read across * threads * 4/2/10 * - gtkdoc * 12/12/10 * - use im_prepare_to() and avoid making a sequence for every cache tile * 5/12/11 * - rework as a class * 23/6/12 * - listen for "minimise" signal * 23/8/12 * - split to line and tile cache * - use a hash table instead of a list * 13/9/12 * - oops, linecache was oversized * 12/11/12 * - make linecache 50% larger to give some slop room * 8/10/12 * - make it optionally threaded * 21/2/13 * - could deadlock if downstream raised an error (thanks Todd) * 25/4/13 * - cache minimisation is optional, see "persistent" flag */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a cache of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG_RED #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" /* A tile in cache can be in one of three states: * * DATA - the tile holds valid pixels * CALC - some thread somewhere is calculating it * PEND - some thread somewhere wants it */ typedef enum VipsTileState { VIPS_TILE_STATE_DATA, VIPS_TILE_STATE_CALC, VIPS_TILE_STATE_PEND } VipsTileState; /* A tile in our cache. */ typedef struct _VipsTile { struct _VipsBlockCache *cache; VipsTileState state; VipsRegion *region; /* Region with private mem for data */ /* We count how many threads are relying on this tile. This tile can't * be flushed if ref_count > 0. */ int ref_count; /* Tile position. Just use left/top to calculate a hash. This is the * key for the hash table. Don't use region->valid in case the region * pointer is NULL. */ VipsRect pos; int time; /* Time of last use for flush */ } VipsTile; typedef struct _VipsBlockCache { VipsConversion parent_instance; VipsImage *in; int tile_width; int tile_height; int max_tiles; VipsAccess access; gboolean threaded; gboolean persistent; int time; /* Update ticks for LRU here */ int ntiles; /* Current cache size */ GMutex *lock; /* Lock everything here */ GCond *new_tile; /* A new tile is ready */ GHashTable *tiles; /* Tiles, hashed by coordinates */ } VipsBlockCache; typedef VipsConversionClass VipsBlockCacheClass; G_DEFINE_TYPE( VipsBlockCache, vips_block_cache, VIPS_TYPE_CONVERSION ); #define VIPS_TYPE_BLOCK_CACHE (vips_block_cache_get_type()) static void vips_block_cache_drop_all( VipsBlockCache *cache ) { /* FIXME this is a disaster if active threads are working on tiles. We * should have something to block new requests, and only dispose once * all tiles are unreffed. */ g_hash_table_remove_all( cache->tiles ); } static void vips_block_cache_dispose( GObject *gobject ) { VipsBlockCache *cache = (VipsBlockCache *) gobject; vips_block_cache_drop_all( cache ); VIPS_FREEF( vips_g_mutex_free, cache->lock ); VIPS_FREEF( vips_g_cond_free, cache->new_tile ); G_OBJECT_CLASS( vips_block_cache_parent_class )->dispose( gobject ); } static void vips_tile_touch( VipsTile *tile ) { g_assert( tile->cache->ntiles >= 0 ); tile->time = tile->cache->time++; } static int vips_tile_move( VipsTile *tile, int x, int y ) { /* We are changing x/y and therefore the hash value. We must unlink * from the old hash position and relink at the new place. */ g_hash_table_steal( tile->cache->tiles, &tile->pos ); tile->pos.left = x; tile->pos.top = y; tile->pos.width = tile->cache->tile_width; tile->pos.height = tile->cache->tile_height; g_hash_table_insert( tile->cache->tiles, &tile->pos, tile ); if( vips_region_buffer( tile->region, &tile->pos ) ) return( -1 ); /* No data yet, but someone must want it. */ tile->state = VIPS_TILE_STATE_PEND; return( 0 ); } static VipsTile * vips_tile_new( VipsBlockCache *cache, int x, int y ) { VipsTile *tile; if( !(tile = VIPS_NEW( NULL, VipsTile )) ) return( NULL ); tile->cache = cache; tile->state = VIPS_TILE_STATE_PEND; tile->ref_count = 0; tile->region = NULL; tile->time = cache->time; tile->pos.left = x; tile->pos.top = y; tile->pos.width = cache->tile_width; tile->pos.height = cache->tile_height; g_hash_table_insert( cache->tiles, &tile->pos, tile ); g_assert( cache->ntiles >= 0 ); cache->ntiles += 1; if( !(tile->region = vips_region_new( cache->in )) ) { g_hash_table_remove( cache->tiles, &tile->pos ); return( NULL ); } vips__region_no_ownership( tile->region ); if( vips_tile_move( tile, x, y ) ) { g_hash_table_remove( cache->tiles, &tile->pos ); return( NULL ); } return( tile ); } /* Do we have a tile in the cache? */ static VipsTile * vips_tile_search( VipsBlockCache *cache, int x, int y ) { VipsRect pos; VipsTile *tile; pos.left = x; pos.top = y; pos.width = cache->tile_width; pos.height = cache->tile_height; tile = (VipsTile *) g_hash_table_lookup( cache->tiles, &pos ); return( tile ); } typedef struct _VipsTileSearch { VipsTile *tile; int oldest; int topmost; } VipsTileSearch; static void vips_tile_search_recycle( gpointer key, gpointer value, gpointer user_data ) { VipsTile *tile = (VipsTile *) value; VipsBlockCache *cache = tile->cache; VipsTileSearch *search = (VipsTileSearch *) user_data; /* Only consider unreffed tiles for recycling. */ if( !tile->ref_count ) { switch( cache->access ) { case VIPS_ACCESS_RANDOM: if( tile->time < search->oldest ) { search->oldest = tile->time; search->tile = tile; } break; case VIPS_ACCESS_SEQUENTIAL: case VIPS_ACCESS_SEQUENTIAL_UNBUFFERED: if( tile->pos.top < search->topmost ) { search->topmost = tile->pos.top; search->tile = tile; } break; default: g_assert( 0 ); } } } /* Find existing tile, make a new tile, or if we have a full set of tiles, * reuse one. */ static VipsTile * vips_tile_find( VipsBlockCache *cache, int x, int y ) { VipsTile *tile; VipsTileSearch search; /* In cache already? */ if( (tile = vips_tile_search( cache, x, y )) ) { VIPS_DEBUG_MSG_RED( "vips_tile_find: " "tile %d x %d in cache\n", x, y ); return( tile ); } /* VipsBlockCache not full? */ if( cache->max_tiles == -1 || cache->ntiles < cache->max_tiles ) { VIPS_DEBUG_MSG_RED( "vips_tile_find: " "making new tile at %d x %d\n", x, y ); if( !(tile = vips_tile_new( cache, x, y )) ) return( NULL ); return( tile ); } /* Reuse an old one. */ search.oldest = cache->time; search.topmost = cache->in->Ysize; search.tile = NULL; g_hash_table_foreach( cache->tiles, vips_tile_search_recycle, &search ); tile = search.tile; if( !tile ) { /* There are no tiles we can reuse -- we have to make another * for now. They will get culled down again next time around. */ if( !(tile = vips_tile_new( cache, x, y )) ) return( NULL ); return( tile ); } VIPS_DEBUG_MSG_RED( "vips_tile_find: reusing tile %d x %d\n", tile->pos.left, tile->pos.top ); if( vips_tile_move( tile, x, y ) ) return( NULL ); return( tile ); } static gboolean vips_tile_unlocked( gpointer key, gpointer value, gpointer user_data ) { VipsTile *tile = (VipsTile *) value; return( !tile->ref_count ); } static void vips_block_cache_minimise( VipsImage *image, VipsBlockCache *cache ) { /* We can't drop tiles that are in use. */ g_mutex_lock( cache->lock ); g_hash_table_foreach_remove( cache->tiles, vips_tile_unlocked, NULL ); g_mutex_unlock( cache->lock ); } static int vips_block_cache_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsBlockCache *cache = (VipsBlockCache *) object; VIPS_DEBUG_MSG( "vips_block_cache_build:\n" ); if( VIPS_OBJECT_CLASS( vips_block_cache_parent_class )-> build( object ) ) return( -1 ); VIPS_DEBUG_MSG( "vips_block_cache_build: max size = %g MB\n", (cache->max_tiles * cache->tile_width * cache->tile_height * VIPS_IMAGE_SIZEOF_PEL( cache->in )) / (1024 * 1024.0) ); if( !cache->persistent ) g_signal_connect( conversion->out, "minimise", G_CALLBACK( vips_block_cache_minimise ), cache ); return( 0 ); } static void vips_block_cache_class_init( VipsBlockCacheClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_block_cache_class_init\n" ); gobject_class->dispose = vips_block_cache_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "blockcache"; vobject_class->description = _( "cache an image" ); vobject_class->build = vips_block_cache_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBlockCache, in ) ); VIPS_ARG_INT( class, "tile_height", 4, _( "Tile height" ), _( "Tile height in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsBlockCache, tile_height ), 1, 1000000, 128 ); VIPS_ARG_ENUM( class, "access", 6, _( "Access" ), _( "Expected access pattern" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsBlockCache, access ), VIPS_TYPE_ACCESS, VIPS_ACCESS_RANDOM ); VIPS_ARG_BOOL( class, "threaded", 7, _( "Threaded" ), _( "Allow threaded access" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsBlockCache, threaded ), FALSE ); VIPS_ARG_BOOL( class, "persistent", 8, _( "Persistent" ), _( "Keep cache between evaluations" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsBlockCache, persistent ), FALSE ); } static unsigned int vips_rect_hash( VipsRect *pos ) { guint hash; /* We could shift down by the tile size? * * X discrimination is more important than Y, since * most tiles will have a similar Y. */ hash = pos->left ^ (pos->top << 16); return( hash ); } static gboolean vips_rect_equal( VipsRect *a, VipsRect *b ) { return( a->left == b->left && a->top == b->top ); } static void vips_tile_destroy( VipsTile *tile ) { VipsBlockCache *cache = tile->cache; VIPS_DEBUG_MSG_RED( "vips_tile_destroy: tile %d, %d (%p)\n", tile->pos.left, tile->pos.top, tile ); cache->ntiles -= 1; g_assert( cache->ntiles >= 0 ); tile->cache = NULL; VIPS_UNREF( tile->region ); vips_free( tile ); } static void vips_block_cache_init( VipsBlockCache *cache ) { cache->tile_width = 128; cache->tile_height = 128; cache->max_tiles = 1000; cache->access = VIPS_ACCESS_RANDOM; cache->threaded = FALSE; cache->persistent = FALSE; cache->time = 0; cache->ntiles = 0; cache->lock = vips_g_mutex_new(); cache->new_tile = vips_g_cond_new(); cache->tiles = g_hash_table_new_full( (GHashFunc) vips_rect_hash, (GEqualFunc) vips_rect_equal, NULL, (GDestroyNotify) vips_tile_destroy ); } typedef struct _VipsTileCache { VipsBlockCache parent_instance; } VipsTileCache; typedef VipsBlockCacheClass VipsTileCacheClass; G_DEFINE_TYPE( VipsTileCache, vips_tile_cache, VIPS_TYPE_BLOCK_CACHE ); static void vips_tile_unref( VipsTile *tile ) { g_assert( tile->ref_count > 0 ); tile->ref_count -= 1; } static void vips_tile_ref( VipsTile *tile ) { tile->ref_count += 1; g_assert( tile->ref_count > 0 ); } static void vips_tile_cache_unref( GSList *work ) { GSList *p; for( p = work; p; p = p->next ) vips_tile_unref( (VipsTile *) p->data ); g_slist_free( work ); } /* Make a set of work tiles. */ static GSList * vips_tile_cache_ref( VipsBlockCache *cache, VipsRect *r ) { const int tw = cache->tile_width; const int th = cache->tile_height; /* Find top left of tiles we need. */ const int xs = (r->left / tw) * tw; const int ys = (r->top / th) * th; GSList *work; VipsTile *tile; int x, y; /* Ref all the tiles we will need. */ work = NULL; for( y = ys; y < VIPS_RECT_BOTTOM( r ); y += th ) for( x = xs; x < VIPS_RECT_RIGHT( r ); x += tw ) { if( !(tile = vips_tile_find( cache, x, y )) ) { vips_tile_cache_unref( work ); return( NULL ); } vips_tile_touch( tile ); vips_tile_ref( tile ); /* We must append, since we want to keep tile ordering * for sequential sources. */ work = g_slist_append( work, tile ); VIPS_DEBUG_MSG_RED( "vips_tile_cache_ref: " "tile %d, %d (%p)\n", x, y, tile ); } return( work ); } static void vips_tile_paste( VipsTile *tile, VipsRegion *or ) { VipsRect hit; /* The part of the tile that we need. */ vips_rect_intersectrect( &or->valid, &tile->pos, &hit ); if( !vips_rect_isempty( &hit ) ) vips_region_copy( tile->region, or, &hit, hit.left, hit.top ); } /* Also called from vips_line_cache_gen(), beware. */ static int vips_tile_cache_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *in = (VipsRegion *) seq; VipsBlockCache *cache = (VipsBlockCache *) b; VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( cache ); VipsRect *r = &or->valid; VipsTile *tile; GSList *work; GSList *p; VIPS_GATE_START( "vips_tile_cache_gen: wait1" ); g_mutex_lock( cache->lock ); VIPS_GATE_STOP( "vips_tile_cache_gen: wait1" ); VIPS_DEBUG_MSG_RED( "vips_tile_cache_gen: " "left = %d, top = %d, width = %d, height = %d\n", r->left, r->top, r->width, r->height ); /* Ref all the tiles we will need. */ work = vips_tile_cache_ref( cache, r ); while( work ) { /* Search for data tiles: easy, we can just paste those in. */ for(;;) { for( p = work; p; p = p->next ) { tile = (VipsTile *) p->data; if( tile->state == VIPS_TILE_STATE_DATA ) break; } if( !p ) break; VIPS_DEBUG_MSG_RED( "vips_tile_cache_gen: " "pasting %p\n", tile ); vips_tile_paste( tile, or ); /* We're done with this tile. */ work = g_slist_remove( work, tile ); vips_tile_unref( tile ); } /* Calculate the first PEND tile we find on the work list. We * don't calculate all PEND tiles since after the first, more * DATA tiles might heve been made available by other threads * and we want to get them out of the way as soon as we can. */ for( p = work; p; p = p->next ) { tile = (VipsTile *) p->data; if( tile->state == VIPS_TILE_STATE_PEND ) { int result; tile->state = VIPS_TILE_STATE_CALC; VIPS_DEBUG_MSG_RED( "vips_tile_cache_gen: " "calc of %p\n", tile ); /* In threaded mode, we let other threads run * while we calc this tile. In non-threaded * mode, we keep the lock and make 'em wait. */ if( cache->threaded ) g_mutex_unlock( cache->lock ); result = vips_region_prepare_to( in, tile->region, &tile->pos, tile->pos.left, tile->pos.top ); if( cache->threaded ) { VIPS_GATE_START( "vips_tile_cache_gen: " "wait2" ); g_mutex_lock( cache->lock ); VIPS_GATE_STOP( "vips_tile_cache_gen: " "wait2" ); } /* If there was an error calculating this * tile, just warn and carry on. * * This can happen with things like reading * .scn files via openslide. We don't want the * read to fail because of one broken tile. */ if( result ) { VIPS_DEBUG_MSG_RED( "vips_tile_cache_gen: " "error on tile %p\n", tile ); vips_warn( class->nickname, _( "error reading tile %dx%d: " "%s" ), tile->pos.left, tile->pos.top, vips_error_buffer() ); vips_error_clear(); vips_region_black( tile->region ); } tile->state = VIPS_TILE_STATE_DATA; vips_tile_touch( tile ); /* Let everyone know there's a new DATA tile. * They need to all check their work lists. */ g_cond_broadcast( cache->new_tile ); break; } } /* There are no PEND or DATA tiles, we must need a tile some * other thread is currently calculating. * * We must block until the CALC tiles we need are done. */ if( !p && work ) { for( p = work; p; p = p->next ) { tile = (VipsTile *) p->data; g_assert( tile->state == VIPS_TILE_STATE_CALC ); } VIPS_DEBUG_MSG_RED( "vips_tile_cache_gen: waiting\n" ); VIPS_GATE_START( "vips_tile_cache_gen: wait3" ); g_cond_wait( cache->new_tile, cache->lock ); VIPS_GATE_STOP( "vips_tile_cache_gen: wait3" ); VIPS_DEBUG_MSG( "vips_tile_cache_gen: awake!\n" ); } } g_mutex_unlock( cache->lock ); return( 0 ); } static int vips_tile_cache_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsBlockCache *block_cache = (VipsBlockCache *) object; VipsTileCache *cache = (VipsTileCache *) object; VIPS_DEBUG_MSG( "vips_tile_cache_build\n" ); if( VIPS_OBJECT_CLASS( vips_tile_cache_parent_class )-> build( object ) ) return( -1 ); if( vips_image_pio_input( block_cache->in ) ) return( -1 ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_SMALLTILE, block_cache->in, NULL ) ) return( -1 ); if( vips_image_generate( conversion->out, vips_start_one, vips_tile_cache_gen, vips_stop_one, block_cache->in, cache ) ) return( -1 ); return( 0 ); } static void vips_tile_cache_class_init( VipsTileCacheClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_tile_cache_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "tilecache"; vobject_class->description = _( "cache an image as a set of tiles" ); vobject_class->build = vips_tile_cache_build; VIPS_ARG_INT( class, "tile_width", 3, _( "Tile width" ), _( "Tile width in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsBlockCache, tile_width ), 1, 1000000, 128 ); VIPS_ARG_INT( class, "max_tiles", 5, _( "Max tiles" ), _( "Maximum number of tiles to cache" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsBlockCache, max_tiles ), -1, 1000000, 1000 ); } static void vips_tile_cache_init( VipsTileCache *cache ) { } /** * vips_tilecache: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @tile_width: width of tiles in cache * @tile_height: height of tiles in cache * @max_tiles: maximum number of tiles to cache * @access: hint expected access pattern #VipsAccess * @threaded: allow many threads * @persistent: don't drop cache at end of computation * * This operation behaves rather like vips_copy() between images * @in and @out, except that it keeps a cache of computed pixels. * This cache is made of up to @max_tiles tiles (a value of -1 * means any number of tiles), and each tile is of size @tile_width * by @tile_height pixels. * * Each cache tile is made with a single call to * vips_image_prepare(). * * When the cache fills, a tile is chosen for reuse. If @access is * #VIPS_ACCESS_RANDOM, then the least-recently-used tile is reused. If * @access is #VIPS_ACCESS_SEQUENTIAL or #VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, * the top-most tile is reused. * * By default, @tile_width and @tile_height are 128 pixels, and the operation * will cache up to 1,000 tiles. @access defaults to #VIPS_ACCESS_RANDOM. * * Normally, only a single thread at once is allowed to calculate tiles. If * you set @threaded to %TRUE, vips_tilecache() will allow many threads to * calculate tiles at once, and share the cache between them. * * Normally the cache is dropped when computation finishes. Set @persistent to * %TRUE to keep the cache between computations. * * See also: vips_cache(), vips_linecache(). * * Returns: 0 on success, -1 on error. */ int vips_tilecache( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "tilecache", ap, in, out ); va_end( ap ); return( result ); } typedef struct _VipsLineCache { VipsBlockCache parent_instance; VipsAccess access; } VipsLineCache; typedef VipsBlockCacheClass VipsLineCacheClass; G_DEFINE_TYPE( VipsLineCache, vips_line_cache, VIPS_TYPE_BLOCK_CACHE ); static int vips_line_cache_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsBlockCache *block_cache = (VipsBlockCache *) b; VIPS_GATE_START( "vips_line_cache_gen: wait" ); g_mutex_lock( block_cache->lock ); VIPS_GATE_STOP( "vips_line_cache_gen: wait" ); /* We size up the cache to the largest request. */ if( or->valid.height > block_cache->max_tiles * block_cache->tile_height ) { block_cache->max_tiles = 1 + (or->valid.height / block_cache->tile_height); VIPS_DEBUG_MSG( "vips_line_cache_gen: bumped max_tiles to %d\n", block_cache->max_tiles ); } g_mutex_unlock( block_cache->lock ); return( vips_tile_cache_gen( or, seq, a, b, stop ) ); } static int vips_line_cache_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsBlockCache *block_cache = (VipsBlockCache *) object; VipsLineCache *cache = (VipsLineCache *) object; VIPS_DEBUG_MSG( "vips_line_cache_build\n" ); if( VIPS_OBJECT_CLASS( vips_line_cache_parent_class )-> build( object ) ) return( -1 ); /* tile_height is set by a param, or defaulted below. */ block_cache->tile_width = block_cache->in->Xsize; block_cache->access = cache->access; if( cache->access == VIPS_ACCESS_SEQUENTIAL_UNBUFFERED ) /* A tile per thread. * * Imagine scanline tiles and four threads. And add a bit for * slop. */ block_cache->max_tiles = 2 * vips_concurrency_get(); else { /* Enough lines for two complete buffers would be exactly * right. Make it 3 to give us some slop room. * * This can go up with request size, see vips_line_cache_gen(). */ int tile_width; int tile_height; int nlines; vips_get_tile_size( block_cache->in, &tile_width, &tile_height, &nlines ); block_cache->max_tiles = 3 * (1 + nlines / block_cache->tile_height); VIPS_DEBUG_MSG( "vips_line_cache_build: nlines = %d\n", nlines ); } VIPS_DEBUG_MSG( "vips_line_cache_build: " "max_tiles = %d, tile_height = %d\n", block_cache->max_tiles, block_cache->tile_height ); VIPS_DEBUG_MSG( "vips_line_cache_build: max size = %g MB\n", (block_cache->max_tiles * block_cache->tile_width * block_cache->tile_height * VIPS_IMAGE_SIZEOF_PEL( block_cache->in )) / (1024 * 1024.0) ); if( vips_image_pio_input( block_cache->in ) ) return( -1 ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, block_cache->in, NULL ) ) return( -1 ); if( vips_image_generate( conversion->out, vips_start_one, vips_line_cache_gen, vips_stop_one, block_cache->in, cache ) ) return( -1 ); return( 0 ); } static void vips_line_cache_class_init( VipsLineCacheClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_line_cache_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "linecache"; vobject_class->description = _( "cache an image as a set of lines" ); vobject_class->build = vips_line_cache_build; VIPS_ARG_ENUM( class, "access", 6, _( "Access" ), _( "Expected access pattern" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsLineCache, access ), VIPS_TYPE_ACCESS, VIPS_ACCESS_SEQUENTIAL ); } static void vips_line_cache_init( VipsLineCache *cache ) { cache->access = VIPS_ACCESS_SEQUENTIAL; } /** * vips_linecache: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @access: hint expected access pattern #VipsAccess * @tile_height: height of tiles in cache * @threaded: allow many threads * * This operation behaves rather like vips_copy() between images * @in and @out, except that it keeps a cache of computed scanlines. * * The number of lines cached is enough for a small amount of non-local * access. If you know you will not be making any non-local access, you can * save some memory and set @access to #VIPS_ACCESS_SEQUENTIAL_UNBUFFERED. * * Each cache tile is made with a single call to * vips_image_prepare(). * * When the cache fills, a tile is chosen for reuse. If @access is * #VIPS_ACCESS_RANDOM, then the least-recently-used tile is reused. If * @access is #VIPS_ACCESS_SEQUENTIAL or #VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, * the top-most tile is reused. @access defaults to #VIPS_ACCESS_RANDOM. * * @tile_height can be used to set the size of the strips that * vips_linecache() uses. The default is 1 (a single scanline). * * Normally, only a single thread at once is allowed to calculate tiles. If * you set @threaded to %TRUE, vips_linecache() will allow many threads to * calculate tiles at once and share the cache between them. * * See also: vips_cache(), vips_tilecache(). * * Returns: 0 on success, -1 on error. */ int vips_linecache( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "linecache", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/flip.c0000644000175000017500000001345112303140253014450 00000000000000/* flip left/right and up/down * * Copyright: 1990, N. Dessipris * Written on: 28/10/91 * Updated on: * 19/7/93 JC * - now allows IM_CODING_LABQ too * - yuk! needs rewriting * 21/12/94 JC * - rewritten * 14/4/04 * - sets Xoffset / Yoffset * 24/3/09 * - added IM_CODING_RAD support * 29/1/10 * - cleanups * - gtkdoc * 17/10/11 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsFlip { VipsConversion parent_instance; /* The input image. */ VipsImage *in; /* Left-right or up-down. */ VipsDirection direction; } VipsFlip; typedef VipsConversionClass VipsFlipClass; G_DEFINE_TYPE( VipsFlip, vips_flip, VIPS_TYPE_CONVERSION ); static int vips_flip_vertical_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsRect *r = &or->valid; VipsRect in; VipsPel *p, *q; int y; int le = r->left; int to = r->top; int bo = VIPS_RECT_BOTTOM( r ); int ls; int psk, qsk; /* Transform to input coordinates. */ in = *r; in.top = ir->im->Ysize - bo; /* Ask for input we need. */ if( vips_region_prepare( ir, &in ) ) return( -1 ); /* Loop, copying and reversing lines. */ p = VIPS_REGION_ADDR( ir, le, in.top + in.height - 1 ); q = VIPS_REGION_ADDR( or, le, to ); psk = VIPS_REGION_LSKIP( ir ); qsk = VIPS_REGION_LSKIP( or ); ls = VIPS_REGION_SIZEOF_LINE( or ); for( y = to; y < bo; y++ ) { memcpy( q, p, ls ); p -= psk; q += qsk; } return( 0 ); } static int vips_flip_horizontal_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsRect *r = &or->valid; VipsRect in; VipsPel *p, *q; int x, y, z; int le = r->left; int ri = VIPS_RECT_RIGHT(r); int to = r->top; int bo = VIPS_RECT_BOTTOM(r); int ps = VIPS_IMAGE_SIZEOF_PEL( ir->im ); /* sizeof pel */ int hgt = ir->im->Xsize - r->width; int lastx; /* Transform to input coordinates. */ in = *r; in.left = hgt - r->left; /* Find x of final pixel in input area. */ lastx = VIPS_RECT_RIGHT( &in ) - 1; /* Ask for input we need. */ if( vips_region_prepare( ir, &in ) ) return( -1 ); /* Loop, copying and reversing lines. */ for( y = to; y < bo; y++ ) { p = VIPS_REGION_ADDR( ir, lastx, y ); q = VIPS_REGION_ADDR( or, le, y ); for( x = le; x < ri; x++ ) { /* Copy the pel. */ for( z = 0; z < ps; z++ ) q[z] = p[z]; /* Skip forwards in out, back in in. */ q += ps; p -= ps; } } return( 0 ); } static int vips_flip_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsFlip *flip = (VipsFlip *) object; VipsGenerateFn generate_fn; if( VIPS_OBJECT_CLASS( vips_flip_parent_class )->build( object ) ) return( -1 ); if( vips_image_pio_input( flip->in ) ) return( -1 ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, flip->in, NULL ) ) return( -1 ); if( flip->direction == VIPS_DIRECTION_HORIZONTAL ) { generate_fn = vips_flip_horizontal_gen; conversion->out->Xoffset = flip->in->Xsize; conversion->out->Yoffset = 0; } else { generate_fn = vips_flip_vertical_gen; conversion->out->Xoffset = 0; conversion->out->Yoffset = flip->in->Ysize; } if( vips_image_generate( conversion->out, vips_start_one, generate_fn, vips_stop_one, flip->in, flip ) ) return( -1 ); return( 0 ); } static void vips_flip_class_init( VipsFlipClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_flip_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "flip"; vobject_class->description = _( "flip an image" ); vobject_class->build = vips_flip_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFlip, in ) ); VIPS_ARG_ENUM( class, "direction", 6, _( "Direction" ), _( "Direction to flip image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsFlip, direction ), VIPS_TYPE_DIRECTION, VIPS_DIRECTION_HORIZONTAL ); } static void vips_flip_init( VipsFlip *flip ) { } /** * vips_flip: * @in: input image * @out: output image * @direction: flip horizontally or vertically * @...: %NULL-terminated list of optional named arguments * * Flips an image left-right or up-down. * * See also: vips_rot(). * * Returns: 0 on success, -1 on error */ int vips_flip( VipsImage *in, VipsImage **out, VipsDirection direction, ... ) { va_list ap; int result; va_start( ap, direction ); result = vips_call_split( "flip", ap, in, out, direction ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/bandjoin.c0000644000175000017500000001363112303140253015302 00000000000000/* VipsBandjoin -- bandwise join of a set of images * * Copyright: 1991, N. Dessipris, modification of im_bandjoin() * * Author: N. Dessipris * Written on: 17/04/1991 * Modified on : * 16/3/94 JC * - rewritten for partials * - now in ANSI C * - now works for any number of input images, except zero * 7/10/94 JC * - new IM_NEW() * 16/4/07 * - fall back to im_copy() for 1 input image * 17/1/09 * - cleanups * - gtk-doc * - im_bandjoin() just calls this * - works for RAD coding too * 27/1/10 * - formatalike inputs * 17/5/11 * - sizealike inputs * 27/10/11 * - rewrite as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "bandary.h" typedef struct _VipsBandjoin { VipsBandary parent_instance; /* The input images. */ VipsArea *in; } VipsBandjoin; typedef VipsBandaryClass VipsBandjoinClass; G_DEFINE_TYPE( VipsBandjoin, vips_bandjoin, VIPS_TYPE_BANDARY ); static void vips_bandjoin_buffer( VipsBandary *bandary, VipsPel *q, VipsPel **p, int width ) { VipsConversion *conversion = (VipsConversion *) bandary; VipsImage **in = bandary->ready; /* Output pel size. */ const int ops = VIPS_IMAGE_SIZEOF_PEL( conversion->out ); int i; /* Loop for each input image. Scattered write is faster than * scattered read. */ for( i = 0; i < bandary->n; i++ ) { /* Input pel size. */ int ips = VIPS_IMAGE_SIZEOF_PEL( in[i] ); VipsPel *p1, *q1; int x, z; q1 = q; p1 = p[i]; for( x = 0; x < width; x++ ) { for( z = 0; z < ips; z++ ) q1[z] = p1[z]; p1 += ips; q1 += ops; } q += ips; } } static int vips_bandjoin_build( VipsObject *object ) { VipsBandary *bandary = (VipsBandary *) object; VipsBandjoin *bandjoin = (VipsBandjoin *) object; if( bandjoin->in ) { bandary->in = bandjoin->in->data; bandary->n = bandjoin->in->n; if( bandary->n == 1 ) return( vips_bandary_copy( bandary ) ); else { int i; bandary->out_bands = 0; for( i = 0; i < bandary->n; i++ ) bandary->out_bands += bandary->in[i]->Bands; } } if( VIPS_OBJECT_CLASS( vips_bandjoin_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_bandjoin_class_init( VipsBandjoinClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsBandaryClass *bandary_class = VIPS_BANDARY_CLASS( class ); VIPS_DEBUG_MSG( "vips_bandjoin_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "bandjoin"; vobject_class->description = _( "bandwise join a set of images" ); vobject_class->build = vips_bandjoin_build; bandary_class->process_line = vips_bandjoin_buffer; VIPS_ARG_BOXED( class, "in", 0, _( "Input" ), _( "Array of input images" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBandjoin, in ), VIPS_TYPE_ARRAY_IMAGE ); } static void vips_bandjoin_init( VipsBandjoin *bandjoin ) { /* Init our instance fields. */ } static int vips_bandjoinv( VipsImage **in, VipsImage **out, int n, va_list ap ) { VipsArea *area; VipsImage **array; int i; int result; area = vips_area_new_array_object( n ); array = (VipsImage **) area->data; for( i = 0; i < n; i++ ) { array[i] = in[i]; g_object_ref( array[i] ); } result = vips_call_split( "bandjoin", ap, area, out ); vips_area_unref( area ); return( result ); } /** * vips_bandjoin: * @in: array of input images * @out: output image * @n: number of input images * @...: %NULL-terminated list of optional named arguments * * Join a set of images together, bandwise. * * If the images * have n and m bands, then the output image will have n + m * bands, with the first n coming from the first image and the last m * from the second. * * If the images differ in size, the smaller images are enlarged to match the * larger by adding zero pixels along the bottom and right. * * The input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: vips_insert(). * * Returns: 0 on success, -1 on error */ int vips_bandjoin( VipsImage **in, VipsImage **out, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_bandjoinv( in, out, n, ap ); va_end( ap ); return( result ); } /** * vips_bandjoin2: * @in1: first input image * @in2: second input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Join a pair of images together, bandwise. See vips_bandjoin(). * * Returns: 0 on success, -1 on error */ int vips_bandjoin2( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) { va_list ap; int result; VipsImage *in[2]; in[0] = in1; in[1] = in2; va_start( ap, out ); result = vips_bandjoinv( in, out, 2, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/copy.c0000644000175000017500000002756212303140253014500 00000000000000/* Copy an image. * * Copyright: 1990, N. Dessipris, based on im_powtra() * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 23/4/93 J.Cupitt * - adapted to work with partial images * 30/6/93 JC * - adapted for partial v2 * - and ANSI C * 7/7/93 JC * - now does IM_CODING_LABQ too * 22/2/95 JC * - new use of im_region_region() * 25/6/02 JC * - added im_copy_set() * - hint is IM_ANY * 5/9/02 JC * - added xoff/yoff to copy_set * 14/4/04 JC * - im_copy() now zeros Xoffset/Yoffset (since origin is the same as * input) * 26/5/04 JC * - added im_copy_swap() * 1/6/05 * - added im_copy_morph() * 13/6/05 * - oop, im_copy_set() was messed up * 29/9/06 * - added im_copy_set_meta(), handy wrapper for nip2 to set meta fields * 2/11/06 * - moved im__convert_saveable() here so it's always defined (was part * of JPEG write code) * 15/2/08 * - added im__saveable_t ... so we can have CMYK JPEG write * 24/3/09 * - added IM_CODING_RAD support * 28/1/10 * - gtk-doc * - cleanups * - removed im_copy_from() and associated stuff * - added im_copy_native() * 28/11/10 * - im_copy_set() now sets xoff / yoff again hmmm * 29/9/11 * - rewrite as a class * 1/12/11 * - use glib byteswap macros */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsCopy { VipsConversion parent_instance; /* The input image. */ VipsImage *in; /* Swap bytes on the way through. */ gboolean swap; /* Fields we can optionally set on the way through. */ VipsInterpretation interpretation; double xres; double yres; int xoffset; int yoffset; int bands; VipsBandFormat format; VipsCoding coding; int width; int height; } VipsCopy; typedef VipsConversionClass VipsCopyClass; G_DEFINE_TYPE( VipsCopy, vips_copy, VIPS_TYPE_CONVERSION ); /* Swap pairs of bytes. */ static void vips_copy_swap2( VipsPel *in, VipsPel *out, int width, VipsImage *im ) { guint16 *p = (guint16 *) in; guint16 *q = (guint16 *) out; int sz = (VIPS_IMAGE_SIZEOF_PEL( im ) * width) / 2; int x; for( x = 0; x < sz; x++ ) q[x] = GUINT16_SWAP_LE_BE( p[x] ); } /* Swap 4- of bytes. */ static void vips_copy_swap4( VipsPel *in, VipsPel *out, int width, VipsImage *im ) { guint32 *p = (guint32 *) in; guint32 *q = (guint32 *) out; int sz = (VIPS_IMAGE_SIZEOF_PEL( im ) * width) / 4; int x; for( x = 0; x < sz; x++ ) q[x] = GUINT32_SWAP_LE_BE( p[x] ); } /* Swap 8- of bytes. */ static void vips_copy_swap8( VipsPel *in, VipsPel *out, int width, VipsImage *im ) { guint64 *p = (guint64 *) in; guint64 *q = (guint64 *) out; int sz = (VIPS_IMAGE_SIZEOF_PEL( im ) * width) / 8; int x; for( x = 0; x < sz; x++ ) q[x] = GUINT64_SWAP_LE_BE( p[x] ); } typedef void (*SwapFn)( VipsPel *in, VipsPel *out, int width, VipsImage *im ); static SwapFn vips_copy_swap_fn[] = { NULL, /* VIPS_FORMAT_UCHAR = 0, */ NULL, /* VIPS_FORMAT_CHAR = 1, */ vips_copy_swap2, /* VIPS_FORMAT_USHORT = 2, */ vips_copy_swap2, /* VIPS_FORMAT_SHORT = 3, */ vips_copy_swap4, /* VIPS_FORMAT_UINT = 4, */ vips_copy_swap4, /* VIPS_FORMAT_INT = 5, */ vips_copy_swap4, /* VIPS_FORMAT_FLOAT = 6, */ vips_copy_swap4, /* VIPS_FORMAT_COMPLEX = 7, */ vips_copy_swap8, /* VIPS_FORMAT_DOUBLE = 8, */ vips_copy_swap8 /* VIPS_FORMAT_DPCOMPLEX = 9, */ }; /* Copy a small area. */ static int vips_copy_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsRect *r = &or->valid; VipsCopy *copy = (VipsCopy *) b; SwapFn swap = vips_copy_swap_fn[copy->in->BandFmt]; /* Ask for input we need. */ if( vips_region_prepare( ir, r ) ) return( -1 ); if( copy->swap && swap ) { int y; for( y = 0; y < r->height; y++ ) { VipsPel *p = VIPS_REGION_ADDR( ir, r->left, r->top + y ); VipsPel *q = VIPS_REGION_ADDR( or, r->left, r->top + y ); swap( p, q, r->width, copy->in ); } } else /* Nothing to do, just copy with pointers. */ if( vips_region_region( or, ir, r, r->left, r->top ) ) return( -1 ); return( 0 ); } /* The props we copy, if set, from the operation to the image. */ static const char *vips_copy_names[] = { "interpretation", "xres", "yres", "xoffset", "yoffset", "bands", "format", "coding", "width", "height" }; static int vips_copy_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsCopy *copy = (VipsCopy *) object; int i; if( VIPS_OBJECT_CLASS( vips_copy_parent_class )->build( object ) ) return( -1 ); if( vips_image_pio_input( copy->in ) ) return( -1 ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, copy->in, NULL ) ) return( -1 ); /* Use props to adjust header fields. */ for( i = 0; i < VIPS_NUMBER( vips_copy_names ); i++ ) { const char *name = vips_copy_names[i]; GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; if( vips_object_get_argument( object, name, &pspec, &argument_class, &argument_instance ) ) return( -1 ); if( argument_instance->assigned ) { GType type = G_PARAM_SPEC_VALUE_TYPE( pspec ); GValue value = { 0, }; g_value_init( &value, type ); g_object_get_property( G_OBJECT( object ), name, &value ); #ifdef VIPS_DEBUG { char *str; str = g_strdup_value_contents( &value ); printf( "vips_copy_build: %s = %s\n", name, str ); g_free( str ); } #endif /* VIPS_DEBUG */ g_object_set_property( G_OBJECT( conversion->out ), name, &value ); g_value_unset( &value ); } } if( vips_image_generate( conversion->out, vips_start_one, vips_copy_gen, vips_stop_one, copy->in, copy ) ) return( -1 ); return( 0 ); } static void vips_copy_class_init( VipsCopyClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_copy_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "copy"; vobject_class->description = _( "copy an image" ); vobject_class->build = vips_copy_build; /* We use copy to make fresh vipsimages to stop sharing, so don't * cache it. Plus copy is cheap. */ operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED | VIPS_OPERATION_NOCACHE; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsCopy, in ) ); VIPS_ARG_BOOL( class, "swap", 2, _( "Swap" ), _( "Swap bytes in image between little and big-endian" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, swap ), FALSE ); VIPS_ARG_INT( class, "width", 3, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, width ), 0, 1000000, 0 ); VIPS_ARG_INT( class, "height", 4, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, height ), 0, 1000000, 0 ); VIPS_ARG_INT( class, "bands", 5, _( "Bands" ), _( "Number of bands in image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, bands ), 0, 1000000, 0 ); VIPS_ARG_ENUM( class, "format", 6, _( "Format" ), _( "Pixel format in image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, format ), VIPS_TYPE_BAND_FORMAT, VIPS_FORMAT_UCHAR ); VIPS_ARG_ENUM( class, "coding", 7, _( "Coding" ), _( "Pixel coding" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, coding ), VIPS_TYPE_CODING, VIPS_CODING_NONE ); VIPS_ARG_ENUM( class, "interpretation", 8, _( "Interpretation" ), _( "Pixel interpretation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, interpretation ), VIPS_TYPE_INTERPRETATION, VIPS_INTERPRETATION_MULTIBAND ); VIPS_ARG_DOUBLE( class, "xres", 9, _( "Xres" ), _( "Horizontal resolution in pixels/mm" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, xres ), -0.0, 1000000, 0 ); VIPS_ARG_DOUBLE( class, "yres", 10, _( "Yres" ), _( "Vertical resolution in pixels/mm" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, yres ), -0.0, 1000000, 0 ); VIPS_ARG_INT( class, "xoffset", 11, _( "Xoffset" ), _( "Horizontal offset of origin" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, xoffset ), -1000000, 1000000, 0 ); VIPS_ARG_INT( class, "yoffset", 12, _( "Yoffset" ), _( "Vertical offset of origin" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCopy, yoffset ), -1000000, 1000000, 0 ); } static void vips_copy_init( VipsCopy *copy ) { /* Init our instance fields. */ } /** * vips_copy: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @width: set image width * @height: set image height * @bands: set image bands * @format: set image format * @coding: set image coding * @interpretation: set image interpretation * @xres: set image xres * @yres: set image yres * @xoffset: set image xoffset * @yoffset: set image yoffset * @swap: swap byte order * * Copy an image, optionally modifying the header. VIPS copies images by * copying pointers, so this operation is instant, even for very large images. * * You can optionally set any or all header fields during the copy. Some * header fields, such as "xres", the horizontal resolution, are safe to * change in any way, others, such as "width" will cause immediate crashes if * they are not set carefully. * * Setting @swap to %TRUE will make vips_copy() swap the byte ordering of * pixels according to the image's format. * * Returns: 0 on success, -1 on error. */ int vips_copy( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "copy", ap, in, out ); va_end( ap ); return( result ); } /** * vips_copy_file: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * A simple convenience function to copy an image to a file, then copy * again to output. If the image is already a file, just copy straight * through. * * The file is allocated with vips_image_new_temp_file(). * The file is automatically deleted when @out is closed. * * See also: vips_copy(), vips_image_new_temp_file(). * * Returns: 0 on success, -1 on error */ int vips_copy_file( VipsImage *in, VipsImage **out, ... ) { VipsImage *file; if( vips_image_isfile( in ) ) return( vips_copy( in, out, NULL ) ); if( !(file = vips_image_new_temp_file( "%s.v" )) ) return( -1 ); if( vips_image_write( in, file ) || vips_copy( file, out, NULL ) ) { g_object_unref( file ); return( -1 ); } g_object_unref( file ); return( 0 ); } vips-7.38.5/libvips/conversion/Makefile.in0000644000175000017500000005621312303144055015426 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/conversion DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libconversion_la_LIBADD = am_libconversion_la_OBJECTS = conversion.lo tilecache.lo gamma.lo \ sequential.lo flatten.lo cache.lo copy.lo embed.lo flip.lo \ insert.lo join.lo extract.lo replicate.lo cast.lo bandjoin.lo \ bandrank.lo recomb.lo bandmean.lo bandbool.lo bandary.lo \ rot.lo rot45.lo ifthenelse.lo falsecolour.lo msb.lo grid.lo \ scale.lo wrap.lo subsample.lo zoom.lo libconversion_la_OBJECTS = $(am_libconversion_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libconversion_la_SOURCES) DIST_SOURCES = $(libconversion_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libconversion.la libconversion_la_SOURCES = \ conversion.c \ pconversion.h \ tilecache.c \ gamma.c \ sequential.c \ flatten.c \ cache.c \ copy.c \ embed.c \ flip.c \ insert.c \ join.c \ extract.c \ replicate.c \ cast.c \ bandjoin.c \ bandrank.c \ recomb.c \ bandmean.c \ bandbool.c \ bandary.h \ bandary.c \ rot.c \ rot45.c \ ifthenelse.c \ falsecolour.c \ msb.c \ grid.c \ scale.c \ wrap.c \ subsample.c \ zoom.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/conversion/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/conversion/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libconversion.la: $(libconversion_la_OBJECTS) $(libconversion_la_DEPENDENCIES) $(EXTRA_libconversion_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libconversion_la_OBJECTS) $(libconversion_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bandary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bandbool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bandjoin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bandmean.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bandrank.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conversion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/falsecolour.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flatten.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifthenelse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/insert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/join.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recomb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replicate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rot45.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sequential.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subsample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tilecache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoom.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/conversion/Makefile.am0000644000175000017500000000104112303140253015376 00000000000000noinst_LTLIBRARIES = libconversion.la libconversion_la_SOURCES = \ conversion.c \ pconversion.h \ tilecache.c \ gamma.c \ sequential.c \ flatten.c \ cache.c \ copy.c \ embed.c \ flip.c \ insert.c \ join.c \ extract.c \ replicate.c \ cast.c \ bandjoin.c \ bandrank.c \ recomb.c \ bandmean.c \ bandbool.c \ bandary.h \ bandary.c \ rot.c \ rot45.c \ ifthenelse.c \ falsecolour.c \ msb.c \ grid.c \ scale.c \ wrap.c \ subsample.c \ zoom.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/conversion/cast.c0000644000175000017500000004046212303141142014450 00000000000000/* cast an image to a numerical format * * Author: Nicos Dessipris * Written on: 07/03/1991 * Modified on: * 04/05/1992 JC * - works for char, uchar too * - floating point code removed from integer clip operations * - uses nint() instead of own rounding code * - calculated the number of >255 clips for float/double input * incorrectly * - rejects complex input correctly now * 27/4/93 JC * - adapted to work with partial images * - nint() removed, now just +0.5 * - im_warning code removed * 30/6/93 JC * - adapted for partial v2 * 31/8/93 JC * - now detects and prints over/underflows * 27/10/93 JC * - unsigned integer clips now faster! * - falls back to im_copy() correctly * 5/5/94 JC * - switched to rint() * 18/8/94 JC * - now uses evalend callback * 9/5/95 JC * - now does complex too * 11/7/95 JC * - now uses IM_RINT() macro * 10/3/01 JC * - slightly faster and simpler * - generalised to im_clip2fmt(), all other clippers now just call * this * 21/4/04 JC * - now does floor(), not rint() ... you'll need to round yourself * before calling this if you want round-to-nearest * 7/11/07 * - use new evalstart/evalend system * 26/8/08 * - oops, complex->complex conversion was broken * 27/1/10 * - modernised * - gtk-doc * 27/10/11 * - redone as a class * 10/4/12 * - cast to uint now removes <0 values */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsCast { VipsConversion parent_instance; VipsImage *in; VipsBandFormat format; int underflow; /* Number of underflows */ int overflow; /* Number of overflows */ } VipsCast; typedef VipsConversionClass VipsCastClass; G_DEFINE_TYPE( VipsCast, vips_cast, VIPS_TYPE_CONVERSION ); static void vips_cast_preeval( VipsImage *image, VipsProgress *progress, VipsCast *cast ) { cast->overflow = 0; cast->underflow = 0; } static void vips_cast_posteval( VipsImage *image, VipsProgress *progress, VipsCast *cast ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( cast ); if( cast->overflow || cast->underflow ) vips_warn( class->nickname, _( "%d underflows and %d overflows detected" ), cast->underflow, cast->overflow ); } /* Our sequence value: the region this sequence is using, and two local stats. */ typedef struct { VipsRegion *ir; /* Input region */ int underflow; /* Number of underflows */ int overflow; /* Number of overflows */ } VipsCastSequence; /* Destroy a sequence value. */ static int vips_cast_stop( void *vseq, void *a, void *b ) { VipsCastSequence *seq = (VipsCastSequence *) vseq; VipsCast *cast = (VipsCast *) b; /* Add to global stats. */ cast->underflow += seq->underflow; cast->overflow += seq->overflow; VIPS_FREEF( g_object_unref, seq->ir ); g_free( seq ); return( 0 ); } /* Make a sequence value. */ static void * vips_cast_start( VipsImage *out, void *a, void *b ) { VipsImage *in = (VipsImage *) a; VipsCastSequence *seq; seq = g_new( VipsCastSequence, 1 ); seq->ir = vips_region_new( in ); seq->overflow = 0; seq->underflow = 0; if( !seq->ir ) { vips_cast_stop( seq, a, b ); return( NULL ); } return( seq ); } /* Cast int types to an int type. */ #define VIPS_CLIP_INT_INT( ITYPE, OTYPE, VIPS_CLIP ) { \ ITYPE * restrict p = (ITYPE *) in; \ OTYPE * restrict q = (OTYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ int t = p[x]; \ \ VIPS_CLIP( t, seq ); \ \ q[x] = t; \ } \ } /* Cast float types to an int type. */ #define VIPS_CLIP_FLOAT_INT( ITYPE, OTYPE, VIPS_CLIP ) { \ ITYPE * restrict p = (ITYPE *) in; \ OTYPE * restrict q = (OTYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ ITYPE v = floor( p[x] ); \ \ VIPS_CLIP( v, seq ); \ \ q[x] = v; \ } \ } /* Cast complex types to an int type. Just take the real part. */ #define VIPS_CLIP_COMPLEX_INT( ITYPE, OTYPE, VIPS_CLIP ) { \ ITYPE * restrict p = (ITYPE *) in; \ OTYPE * restrict q = (OTYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ ITYPE v = floor( p[0] ); \ p += 2; \ \ VIPS_CLIP( v, seq ); \ \ q[x] = v; \ } \ } /* Cast non-complex types to a float type. */ #define VIPS_CLIP_REAL_FLOAT( ITYPE, OTYPE ) { \ ITYPE * restrict p = (ITYPE *) in; \ OTYPE * restrict q = (OTYPE *) out; \ \ for( x = 0; x < sz; x++ ) \ q[x] = p[x]; \ } /* Cast complex types to a float type ... just take real. */ #define VIPS_CLIP_COMPLEX_FLOAT( ITYPE, OTYPE ) { \ ITYPE * restrict p = (ITYPE *) in; \ OTYPE * restrict q = (OTYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ q[x] = p[0]; \ p += 2; \ } \ } /* Cast any non-complex to a complex type ... set imaginary to zero. */ #define VIPS_CLIP_REAL_COMPLEX( ITYPE, OTYPE ) { \ ITYPE * restrict p = (ITYPE *) in; \ OTYPE * restrict q = (OTYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ q[0] = p[x]; \ q[1] = 0.0; \ q += 2; \ } \ } /* Cast any complex to a complex type. */ #define VIPS_CLIP_COMPLEX_COMPLEX( ITYPE, OTYPE ) { \ ITYPE * restrict p = (ITYPE *) in; \ OTYPE * restrict q = (OTYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ q[0] = p[0]; \ q[1] = p[1]; \ p += 2; \ q += 2; \ } \ } #define BAND_SWITCH_INNER( ITYPE, INT, FLOAT, COMPLEX ) { \ switch( conversion->out->BandFmt ) { \ case VIPS_FORMAT_UCHAR: \ INT( ITYPE, unsigned char, VIPS_CLIP_UCHAR ); \ break; \ \ case VIPS_FORMAT_CHAR: \ INT( ITYPE, signed char, VIPS_CLIP_CHAR ); \ break; \ \ case VIPS_FORMAT_USHORT: \ INT( ITYPE, unsigned short, VIPS_CLIP_USHORT ); \ break; \ \ case VIPS_FORMAT_SHORT: \ INT( ITYPE, signed short, VIPS_CLIP_SHORT ); \ break; \ \ case VIPS_FORMAT_UINT: \ INT( ITYPE, unsigned int, VIPS_CLIP_UINT ); \ break; \ \ case VIPS_FORMAT_INT: \ INT( ITYPE, signed int, VIPS_CLIP_NONE ); \ break; \ \ case VIPS_FORMAT_FLOAT: \ FLOAT( ITYPE, float ); \ break; \ \ case VIPS_FORMAT_DOUBLE: \ FLOAT( ITYPE, double ); \ break; \ \ case VIPS_FORMAT_COMPLEX: \ COMPLEX( ITYPE, float ); \ break; \ \ case VIPS_FORMAT_DPCOMPLEX: \ COMPLEX( ITYPE, double ); \ break; \ \ default: \ g_assert( 0 ); \ } \ } static int vips_cast_gen( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsCastSequence *seq = (VipsCastSequence *) vseq; VipsRegion *ir = seq->ir; VipsCast *cast = (VipsCast *) b; VipsConversion *conversion = (VipsConversion *) b; VipsRect *r = &or->valid; int le = r->left; int to = r->top; int bo = VIPS_RECT_BOTTOM( r ); int sz = VIPS_REGION_N_ELEMENTS( or ); int x, y; if( vips_region_prepare( ir, r ) ) return( -1 ); VIPS_GATE_START( "vips_cast_gen: work" ); for( y = to; y < bo; y++ ) { VipsPel *in = VIPS_REGION_ADDR( ir, le, y ); VipsPel *out = VIPS_REGION_ADDR( or, le, y ); switch( cast->in->BandFmt ) { case VIPS_FORMAT_UCHAR: BAND_SWITCH_INNER( unsigned char, VIPS_CLIP_INT_INT, VIPS_CLIP_REAL_FLOAT, VIPS_CLIP_REAL_COMPLEX ); break; case VIPS_FORMAT_CHAR: BAND_SWITCH_INNER( signed char, VIPS_CLIP_INT_INT, VIPS_CLIP_REAL_FLOAT, VIPS_CLIP_REAL_COMPLEX ); break; case VIPS_FORMAT_USHORT: BAND_SWITCH_INNER( unsigned short, VIPS_CLIP_INT_INT, VIPS_CLIP_REAL_FLOAT, VIPS_CLIP_REAL_COMPLEX ); break; case VIPS_FORMAT_SHORT: BAND_SWITCH_INNER( signed short, VIPS_CLIP_INT_INT, VIPS_CLIP_REAL_FLOAT, VIPS_CLIP_REAL_COMPLEX ); break; case VIPS_FORMAT_UINT: BAND_SWITCH_INNER( unsigned int, VIPS_CLIP_INT_INT, VIPS_CLIP_REAL_FLOAT, VIPS_CLIP_REAL_COMPLEX ); break; case VIPS_FORMAT_INT: BAND_SWITCH_INNER( signed int, VIPS_CLIP_INT_INT, VIPS_CLIP_REAL_FLOAT, VIPS_CLIP_REAL_COMPLEX ); break; case VIPS_FORMAT_FLOAT: BAND_SWITCH_INNER( float, VIPS_CLIP_FLOAT_INT, VIPS_CLIP_REAL_FLOAT, VIPS_CLIP_REAL_COMPLEX ); break; case VIPS_FORMAT_DOUBLE: BAND_SWITCH_INNER( double, VIPS_CLIP_FLOAT_INT, VIPS_CLIP_REAL_FLOAT, VIPS_CLIP_REAL_COMPLEX ); break; case VIPS_FORMAT_COMPLEX: BAND_SWITCH_INNER( float, VIPS_CLIP_COMPLEX_INT, VIPS_CLIP_COMPLEX_FLOAT, VIPS_CLIP_COMPLEX_COMPLEX ); break; case VIPS_FORMAT_DPCOMPLEX: BAND_SWITCH_INNER( double, VIPS_CLIP_COMPLEX_INT, VIPS_CLIP_COMPLEX_FLOAT, VIPS_CLIP_COMPLEX_COMPLEX ); break; default: g_assert( 0 ); } } VIPS_GATE_STOP( "vips_cast_gen: work" ); return( 0 ); } static int vips_cast_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsCast *cast = (VipsCast *) object; if( VIPS_OBJECT_CLASS( vips_cast_parent_class )->build( object ) ) return( -1 ); /* Trivial case: fall back to copy(). */ if( cast->in->BandFmt == cast->format ) return( vips_image_write( cast->in, conversion->out ) ); if( vips_check_uncoded( class->nickname, cast->in ) || vips_image_pio_input( cast->in ) ) return( -1 ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, cast->in, NULL ) ) return( -1 ); conversion->out->BandFmt = cast->format; g_signal_connect( cast->in, "preeval", G_CALLBACK( vips_cast_preeval ), cast ); g_signal_connect( cast->in, "posteval", G_CALLBACK( vips_cast_posteval ), cast ); if( vips_image_generate( conversion->out, vips_cast_start, vips_cast_gen, vips_cast_stop, cast->in, cast ) ) return( -1 ); return( 0 ); } static void vips_cast_class_init( VipsCastClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_cast_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "cast"; vobject_class->description = _( "cast an image" ); vobject_class->build = vips_cast_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsCast, in ) ); VIPS_ARG_ENUM( class, "format", 6, _( "Format" ), _( "Format to cast to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsCast, format ), VIPS_TYPE_BAND_FORMAT, VIPS_FORMAT_UCHAR ); } static void vips_cast_init( VipsCast *cast ) { } static int vips_castv( VipsImage *in, VipsImage **out, VipsBandFormat format, va_list ap ) { return( vips_call_split( "cast", ap, in, out, format ) ); } /** * vips_cast: * @in: input image * @out: output image * @format: format to convert to * @...: %NULL-terminated list of optional named arguments * * Convert @in to @format. You can convert between any pair of formats. * Floats are truncated (not rounded). Out of range values are clipped. * * Casting from complex to real returns the real part. * * See also: im_scale(), im_ri2c(). * * Returns: 0 on success, -1 on error */ int vips_cast( VipsImage *in, VipsImage **out, VipsBandFormat format, ... ) { va_list ap; int result; va_start( ap, format ); result = vips_castv( in, out, format, ap ); va_end( ap ); return( result ); } /** * vips_cast_uchar: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_UCHAR. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_uchar( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_UCHAR, ap ); va_end( ap ); return( result ); } /** * vips_cast_char: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_CHAR. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_char( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_CHAR, ap ); va_end( ap ); return( result ); } /** * vips_cast_ushort: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_USHORT. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_ushort( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_USHORT, ap ); va_end( ap ); return( result ); } /** * vips_cast_short: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_SHORT. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_short( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_SHORT, ap ); va_end( ap ); return( result ); } /** * vips_cast_uint: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_UINT. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_uint( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_UINT, ap ); va_end( ap ); return( result ); } /** * vips_cast_int: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_INT. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_int( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_INT, ap ); va_end( ap ); return( result ); } /** * vips_cast_float: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_FLOAT. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_float( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_FLOAT, ap ); va_end( ap ); return( result ); } /** * vips_cast_double: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_DOUBLE. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_double( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_DOUBLE, ap ); va_end( ap ); return( result ); } /** * vips_cast_complex: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_COMPLEX. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_complex( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_COMPLEX, ap ); va_end( ap ); return( result ); } /** * vips_cast_dpcomplex: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Convert @in to #VIPS_FORMAT_DPCOMPLEX. See vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_cast_dpcomplex( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_castv( in, out, VIPS_FORMAT_DPCOMPLEX, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/sequential.c0000644000175000017500000002551512303140253015674 00000000000000/* Like copy, but ensure sequential access. * * Handy with sequential for loading files formats which are strictly * top-to-bottom, like PNG. * * 15/2/12 * - from VipsForeignLoad * 14/7/12 * - support skip forwards as well, so we can do extract/insert * 10/8/12 * - add @trace option * 21/8/12 * - remove skip forward, instead do thread stalling and have an * integrated cache * - use linecache * 4/9/12 * - stop all threads on error * - don't stall forever, just delay ahead threads * 25/2/14 * - we were allowing skipahead if the first request was for y>0, but * this broke on some busy, many-core systems, see comment below */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a cache of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG_GREEN #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" /* Stall threads that run ahead for up to this long, in seconds. * * This has to be a long time: if we're trying to use all cores on a busy * system, it could be ages until all the other threads get a chance to run. */ #define STALL_TIME (1.0) typedef struct _VipsSequential { VipsConversion parent_instance; VipsImage *in; int tile_height; VipsAccess access; gboolean trace; /* Lock access to y_pos with this, use the cond to wake up stalled * threads. */ GMutex *lock; GCond *ready; /* The next read from our source will fetch this scanline, ie. it's 0 * when we start. */ int y_pos; /* If one thread gets an error, we must stop all threads, otherwise we * can stall and never wake. */ int error; } VipsSequential; typedef VipsConversionClass VipsSequentialClass; G_DEFINE_TYPE( VipsSequential, vips_sequential, VIPS_TYPE_CONVERSION ); static void vips_sequential_dispose( GObject *gobject ) { VipsSequential *sequential = (VipsSequential *) gobject; VIPS_FREEF( vips_g_mutex_free, sequential->lock ); VIPS_FREEF( vips_g_cond_free, sequential->ready ); G_OBJECT_CLASS( vips_sequential_parent_class )->dispose( gobject ); } static int vips_sequential_generate( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsSequential *sequential = (VipsSequential *) b; VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( sequential ); VipsRect *r = &or->valid; VipsRegion *ir = (VipsRegion *) seq; VIPS_DEBUG_MSG_GREEN( "thread %p request for line %d, height %d\n", g_thread_self(), r->top, r->height ); if( sequential->trace ) vips_info( class->nickname, "request for line %d, height %d", r->top, r->height ); VIPS_GATE_START( "vips_sequential_generate: wait" ); g_mutex_lock( sequential->lock ); VIPS_GATE_STOP( "vips_sequential_generate: wait" ); VIPS_DEBUG_MSG_GREEN( "thread %p has lock ...\n", g_thread_self() ); /* If we've seen an error, everything must stop. */ if( sequential->error ) { g_mutex_unlock( sequential->lock ); return( -1 ); } if( r->top > sequential->y_pos ) { /* This request is for stuff beyond the current read position, * stall for a while to give other threads time to catch up. * * The stall can be cancelled by a signal on @ready. * * We don't stall forever, since an error would be better than * deadlock, and we don't fail on timeout, since the timeout * may be harmless. */ /* We used to not stall if the read position was zero, ie. if * the first request was for a line some way down the image, * and assume this was extract or somesuch. But this could * sometimes break on busy, many-core systems. * * Think of a better way to support eg. extract safely in * sequential mode. */ #ifdef HAVE_COND_INIT gint64 time; time = g_get_monotonic_time () + STALL_TIME * G_TIME_SPAN_SECOND; #else GTimeVal time; g_get_current_time( &time ); g_time_val_add( &time, STALL_TIME * 1000000 ); #endif VIPS_DEBUG_MSG_GREEN( "thread %p stalling for up to %gs ...\n", g_thread_self(), STALL_TIME ); VIPS_GATE_START( "vips_sequential_generate: wait" ); /* Exit the loop on timeout or condition passes. We have to * be wary of spurious wakeups. */ while( r->top > sequential->y_pos ) #ifdef HAVE_COND_INIT if( !g_cond_wait_until( sequential->ready, sequential->lock, time ) ) break; #else if( !g_cond_timed_wait( sequential->ready, sequential->lock, &time ) ) break; #endif VIPS_GATE_STOP( "vips_sequential_generate: wait" ); VIPS_DEBUG_MSG_GREEN( "thread %p awake again ...\n", g_thread_self() ); } if( r->top > sequential->y_pos ) { /* This is a request for something some way down the image, * and we've fallen through from the stall above. * * Probably the operation is something like extract_area and * we should skip the initial part of the image. In fact, * we read to cache, since it may be useful. */ VipsRect area; VIPS_DEBUG_MSG_GREEN( "thread %p skipping to line %d ...\n", g_thread_self(), r->top ); area.left = 0; area.top = sequential->y_pos; area.width = 1; area.height = r->top - sequential->y_pos; if( vips_region_prepare( ir, &area ) ) { VIPS_DEBUG_MSG( "thread %p error, unlocking ...\n", g_thread_self() ); sequential->error = -1; g_cond_broadcast( sequential->ready ); g_mutex_unlock( sequential->lock ); return( -1 ); } sequential->y_pos = VIPS_RECT_BOTTOM( &area ); } /* This is a request for old or present pixels -- serve from cache. * This may trigger further, sequential reads. */ VIPS_DEBUG_MSG_GREEN( "thread %p reading ...\n", g_thread_self() ); if( vips_region_prepare( ir, r ) || vips_region_region( or, ir, r, r->left, r->top ) ) { VIPS_DEBUG_MSG( "thread %p error, unlocking ...\n", g_thread_self() ); sequential->error = -1; g_cond_broadcast( sequential->ready ); g_mutex_unlock( sequential->lock ); return( -1 ); } if( VIPS_RECT_BOTTOM( r ) > sequential->y_pos ) { /* This request has moved the read point. Update it, and wake * up all stalled threads for a retry. */ sequential->y_pos = VIPS_RECT_BOTTOM( r ); VIPS_DEBUG_MSG_GREEN( "thread %p updating y_pos to %d and " "waking stalled\n", g_thread_self(), sequential->y_pos ); g_cond_broadcast( sequential->ready ); } VIPS_DEBUG_MSG_GREEN( "thread %p unlocking ...\n", g_thread_self() ); g_mutex_unlock( sequential->lock ); return( 0 ); } static int vips_sequential_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsSequential *sequential = (VipsSequential *) object; VipsImage *t; VIPS_DEBUG_MSG( "vips_sequential_build\n" ); if( VIPS_OBJECT_CLASS( vips_sequential_parent_class )->build( object ) ) return( -1 ); if( vips_image_pio_input( sequential->in ) ) return( -1 ); if( vips_linecache( sequential->in, &t, "tile_height", sequential->tile_height, "access", sequential->access, NULL ) ) return( -1 ); vips_object_local( object, t ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, t, NULL ) ) return( -1 ); if( vips_image_generate( conversion->out, vips_start_one, vips_sequential_generate, vips_stop_one, t, sequential ) ) return( -1 ); return( 0 ); } static void vips_sequential_class_init( VipsSequentialClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_sequential_class_init\n" ); gobject_class->dispose = vips_sequential_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "sequential"; vobject_class->description = _( "check sequential access" ); vobject_class->build = vips_sequential_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsSequential, in ) ); VIPS_ARG_BOOL( class, "trace", 2, _( "trace" ), _( "trace pixel requests" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSequential, trace ), TRUE ); VIPS_ARG_INT( class, "tile_height", 3, _( "Tile height" ), _( "Tile height in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSequential, tile_height ), 1, 1000000, 1 ); VIPS_ARG_ENUM( class, "access", 6, _( "Strategy" ), _( "Expected access pattern" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSequential, access ), VIPS_TYPE_ACCESS, VIPS_ACCESS_SEQUENTIAL ); } static void vips_sequential_init( VipsSequential *sequential ) { sequential->trace = FALSE; sequential->access = VIPS_ACCESS_SEQUENTIAL; sequential->lock = vips_g_mutex_new(); sequential->ready = vips_g_cond_new(); sequential->tile_height = 1; sequential->error = 0; } /** * vips_sequential: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @trace: trace requests * @strip_height: height of cache strips * @access: access pattern * * This operation behaves rather like vips_copy() between images * @in and @out, except that it checks that pixels are only requested * top-to-bottom. If a thread makes an out of order request, it is stalled * until the pack catches up. * * This operation is useful for loading file formats which are * strictly top-to-bottom, like PNG. * * If @trace is true, the operation will print diagnostic messages for each * block of pixels which are processed. This can help find the cause of * non-sequential accesses. * * @strip_height can be used to set the size of the tiles that * vips_sequential() uses. The default value is 1. * * @access can be set to #VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, meaning don't * keep a large cache behind the read point. This can save some memory. * * See also: vips_image_cache(). * * Returns: 0 on success, -1 on error. */ int vips_sequential( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "sequential", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/embed.c0000644000175000017500000004063412303141142014573 00000000000000/* VipsEmbed * * Author: J. Cupitt * Written on: 21/2/95 * Modified on: * 6/4/04 * - added extend pixels from edge mode * - sets Xoffset / Yoffset to x / y * 15/4/04 * - added replicate and mirror modes * 4/3/05 * - added solid white mode * 4/1/07 * - degenerate to im_copy() for 0/0/w/h * 1/8/07 * - more general ... x and y can be negative * 24/3/09 * - added IM_CODING_RAD support * 5/11/09 * - gtkdoc * 27/1/10 * - use im_region_paint() * - cleanups * 15/10/11 * - rewrite as a class * 10/10/12 * - add @background */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsEmbed { VipsConversion parent_instance; /* The input image. */ VipsImage *in; VipsExtend extend; VipsArea *background; int x; int y; int width; int height; /* Pixel we paint calculated from background. */ VipsPel *ink; /* Geometry calculations. */ VipsRect rout; /* Whole output area */ VipsRect rsub; /* Rect occupied by image */ /* The 8 border pieces. The 4 borders strictly up/down/left/right of * the main image, and the 4 corner pieces. */ VipsRect border[8]; } VipsEmbed; typedef VipsConversionClass VipsEmbedClass; G_DEFINE_TYPE( VipsEmbed, vips_embed, VIPS_TYPE_CONVERSION ); /* r is the bit we are trying to paint, guaranteed to be entirely within * border area i. Set out to be the edge of the image we need to paint the * pixels in r. */ static void vips_embed_find_edge( VipsEmbed *embed, VipsRect *r, int i, VipsRect *out ) { /* Expand the border by 1 pixel, intersect with the image area, and we * get the edge. Usually too much though: eg. we could make the entire * right edge. */ *out = embed->border[i]; vips_rect_marginadjust( out, 1 ); vips_rect_intersectrect( out, &embed->rsub, out ); /* Usually too much though: eg. we could make the entire * right edge. If we're strictly up/down/left/right of the image, we * can trim. */ if( i == 0 || i == 2 ) { VipsRect extend; /* Above or below. */ extend = *r; extend.top = 0; extend.height = embed->height; vips_rect_intersectrect( out, &extend, out ); } if( i == 1 || i == 3 ) { VipsRect extend; /* Left or right. */ extend = *r; extend.left = 0; extend.width = embed->width; vips_rect_intersectrect( out, &extend, out ); } } /* Copy a single pixel sideways into a line of pixels. */ static void vips_embed_copy_pixel( VipsEmbed *embed, VipsPel *q, VipsPel *p, int n ) { const int bs = VIPS_IMAGE_SIZEOF_PEL( embed->in ); int x, b; for( x = 0; x < n; x++ ) for( b = 0; b < bs; b++ ) *q++ = p[b]; } /* Paint r of region or. It's a border area, lying entirely within * embed->border[i]. p points to the top-left source pixel to fill with. * plsk is the line stride. */ static void vips_embed_paint_edge( VipsEmbed *embed, VipsRegion *or, int i, VipsRect *r, VipsPel *p, int plsk ) { const int bs = VIPS_IMAGE_SIZEOF_PEL( embed->in ); VipsRect todo; VipsPel *q; int y; VIPS_GATE_START( "vips_embed_paint_edge: work" ); /* Pixels left to paint. */ todo = *r; /* Corner pieces ... copy the single pixel to paint the top line of * todo, then use the line copier below to paint the rest of it. */ if( i > 3 ) { q = VIPS_REGION_ADDR( or, todo.left, todo.top ); vips_embed_copy_pixel( embed, q, p, todo.width ); p = q; todo.top += 1; todo.height -= 1; } if( i == 1 || i == 3 ) { /* Vertical line of pixels to copy. */ for( y = 0; y < todo.height; y++ ) { q = VIPS_REGION_ADDR( or, todo.left, todo.top + y ); vips_embed_copy_pixel( embed, q, p, todo.width ); p += plsk; } } else { /* Horizontal line of pixels to copy. */ for( y = 0; y < todo.height; y++ ) { q = VIPS_REGION_ADDR( or, todo.left, todo.top + y ); memcpy( q, p, bs * todo.width ); } } VIPS_GATE_STOP( "vips_embed_paint_edge: work" ); } static int vips_embed_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsEmbed *embed = (VipsEmbed *) b; VipsRect *r = &or->valid; Rect ovl; int i; VipsPel *p; int plsk; /* Entirely within the input image? Generate the subimage and copy * pointers. */ if( vips_rect_includesrect( &embed->rsub, r ) ) { VipsRect need; need = *r; need.left -= embed->x; need.top -= embed->y; if( vips_region_prepare( ir, &need ) || vips_region_region( or, ir, r, need.left, need.top ) ) return( -1 ); return( 0 ); } /* Does any of the input image appear in the area we have been asked * to make? Paste it in. */ vips_rect_intersectrect( r, &embed->rsub, &ovl ); if( !vips_rect_isempty( &ovl ) ) { /* Paint the bits coming from the input image. */ ovl.left -= embed->x; ovl.top -= embed->y; if( vips_region_prepare_to( ir, or, &ovl, ovl.left + embed->x, ovl.top + embed->y ) ) return( -1 ); ovl.left += embed->x; ovl.top += embed->y; } switch( embed->extend ) { case VIPS_EXTEND_BLACK: case VIPS_EXTEND_WHITE: VIPS_GATE_START( "vips_embed_gen: work1" ); /* Paint the borders a solid value. */ for( i = 0; i < 8; i++ ) vips_region_paint( or, &embed->border[i], embed->extend == 0 ? 0 : 255 ); VIPS_GATE_STOP( "vips_embed_gen: work1" ); break; case VIPS_EXTEND_BACKGROUND: VIPS_GATE_START( "vips_embed_gen: work2" ); /* Paint the borders a solid value. */ for( i = 0; i < 8; i++ ) vips_region_paint_pel( or, &embed->border[i], embed->ink ); VIPS_GATE_STOP( "vips_embed_gen: work2" ); break; case VIPS_EXTEND_COPY: /* Extend the borders. */ for( i = 0; i < 8; i++ ) { VipsRect todo; VipsRect edge; vips_rect_intersectrect( r, &embed->border[i], &todo ); if( !vips_rect_isempty( &todo ) ) { vips_embed_find_edge( embed, &todo, i, &edge ); /* Did we paint any of the input image? If we * did, we can fetch the edge pixels from * that. */ if( !vips_rect_isempty( &ovl ) ) { p = VIPS_REGION_ADDR( or, edge.left, edge.top ); plsk = VIPS_REGION_LSKIP( or ); } else { /* No pixels painted ... fetch * directly from the input image. */ edge.left -= embed->x; edge.top -= embed->y; if( vips_region_prepare( ir, &edge ) ) return( -1 ); p = VIPS_REGION_ADDR( ir, edge.left, edge.top ); plsk = VIPS_REGION_LSKIP( ir ); } vips_embed_paint_edge( embed, or, i, &todo, p, plsk ); } } break; default: g_assert( 0 ); } return( 0 ); } static int vips_embed_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsEmbed *embed = (VipsEmbed *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 7 ); VipsRect want; if( VIPS_OBJECT_CLASS( vips_embed_parent_class )->build( object ) ) return( -1 ); /* nip2 can generate this quite often ... just copy. */ if( embed->x == 0 && embed->y == 0 && embed->width == embed->in->Xsize && embed->height == embed->in->Ysize ) return( vips_image_write( embed->in, conversion->out ) ); if( vips_image_pio_input( embed->in ) ) return( -1 ); if( !(embed->ink = vips__vector_to_ink( class->nickname, embed->in, embed->background->data, embed->background->n )) ) return( -1 ); if( !vips_object_argument_isset( object, "extend" ) && vips_object_argument_isset( object, "background" ) ) embed->extend = VIPS_EXTEND_BACKGROUND; switch( embed->extend ) { case VIPS_EXTEND_REPEAT: { /* Clock arithmetic: we want negative x/y to wrap around * nicely. */ const int nx = embed->x < 0 ? -embed->x % embed->in->Xsize : embed->in->Xsize - embed->x % embed->in->Xsize; const int ny = embed->y < 0 ? -embed->y % embed->in->Ysize : embed->in->Ysize - embed->y % embed->in->Ysize; if( vips_replicate( embed->in, &t[0], embed->width / embed->in->Xsize + 2, embed->height / embed->in->Ysize + 2, NULL ) || vips_extract_area( t[0], &t[1], nx, ny, embed->width, embed->height, NULL ) || vips_image_write( t[1], conversion->out ) ) return( -1 ); } break; case VIPS_EXTEND_MIRROR: { /* As repeat, but the tiles are twice the size because of * mirroring. */ const int w2 = embed->in->Xsize * 2; const int h2 = embed->in->Ysize * 2; const int nx = embed->x < 0 ? -embed->x % w2 : w2 - embed->x % w2; const int ny = embed->y < 0 ? -embed->y % h2 : h2 - embed->y % h2; if( /* Make a 2x2 mirror tile. */ vips_flip( embed->in, &t[0], VIPS_DIRECTION_HORIZONTAL, NULL ) || vips_join( embed->in, t[0], &t[1], VIPS_DIRECTION_HORIZONTAL, NULL ) || vips_flip( t[1], &t[2], VIPS_DIRECTION_VERTICAL, NULL ) || vips_join( t[1], t[2], &t[3], VIPS_DIRECTION_VERTICAL, NULL ) || /* Repeat, then cut out the centre. */ vips_replicate( t[3], &t[4], embed->width / t[3]->Xsize + 2, embed->height / t[3]->Ysize + 2, NULL ) || vips_extract_area( t[4], &t[5], nx, ny, embed->width, embed->height, NULL ) || /* Overwrite the centre with the in, much faster * for centre pixels. */ vips_insert( t[5], embed->in, &t[6], embed->x, embed->y, NULL ) || vips_image_write( t[6], conversion->out ) ) return( -1 ); } break; case VIPS_EXTEND_BLACK: case VIPS_EXTEND_WHITE: case VIPS_EXTEND_BACKGROUND: case VIPS_EXTEND_COPY: /* embed is used in many places. We don't really care about * geometry, so use ANY to avoid disturbing all pipelines. */ if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_ANY, embed->in, NULL ) ) return( -1 ); conversion->out->Xsize = embed->width; conversion->out->Ysize = embed->height; /* Whole output area. */ embed->rout.left = 0; embed->rout.top = 0; embed->rout.width = conversion->out->Xsize; embed->rout.height = conversion->out->Ysize; /* Rect occupied by image (can be clipped to nothing). */ want.left = embed->x; want.top = embed->y; want.width = embed->in->Xsize; want.height = embed->in->Ysize; vips_rect_intersectrect( &want, &embed->rout, &embed->rsub ); /* FIXME ... actually, it can't. embed_find_edge() will fail * if rsub is empty. Make this more general at some point * and remove this test. */ if( vips_rect_isempty( &embed->rsub ) ) { vips_error( class->nickname, "%s", _( "bad dimensions" ) ); return( -1 ); } /* Edge rects of new pixels ... top, right, bottom, left. Order * important. Can be empty. */ embed->border[0].left = embed->rsub.left; embed->border[0].top = 0; embed->border[0].width = embed->rsub.width; embed->border[0].height = embed->rsub.top; embed->border[1].left = VIPS_RECT_RIGHT( &embed->rsub ); embed->border[1].top = embed->rsub.top; embed->border[1].width = conversion->out->Xsize - VIPS_RECT_RIGHT( &embed->rsub ); embed->border[1].height = embed->rsub.height; embed->border[2].left = embed->rsub.left; embed->border[2].top = VIPS_RECT_BOTTOM( &embed->rsub ); embed->border[2].width = embed->rsub.width; embed->border[2].height = conversion->out->Ysize - VIPS_RECT_BOTTOM( &embed->rsub ); embed->border[3].left = 0; embed->border[3].top = embed->rsub.top; embed->border[3].width = embed->rsub.left; embed->border[3].height = embed->rsub.height; /* Corner rects. Top-left, top-right, bottom-right, * bottom-left. Order important. */ embed->border[4].left = 0; embed->border[4].top = 0; embed->border[4].width = embed->rsub.left; embed->border[4].height = embed->rsub.top; embed->border[5].left = VIPS_RECT_RIGHT( &embed->rsub ); embed->border[5].top = 0; embed->border[5].width = conversion->out->Xsize - VIPS_RECT_RIGHT( &embed->rsub ); embed->border[5].height = embed->rsub.top; embed->border[6].left = VIPS_RECT_RIGHT( &embed->rsub ); embed->border[6].top = VIPS_RECT_BOTTOM( &embed->rsub ); embed->border[6].width = conversion->out->Xsize - VIPS_RECT_RIGHT( &embed->rsub ); embed->border[6].height = conversion->out->Ysize - VIPS_RECT_BOTTOM( &embed->rsub ); embed->border[7].left = 0; embed->border[7].top = VIPS_RECT_BOTTOM( &embed->rsub ); embed->border[7].width = embed->rsub.left; embed->border[7].height = conversion->out->Ysize - VIPS_RECT_BOTTOM( &embed->rsub ); if( vips_image_generate( conversion->out, vips_start_one, vips_embed_gen, vips_stop_one, embed->in, embed ) ) return( -1 ); break; default: g_assert( 0 ); } return( 0 ); } static void vips_embed_class_init( VipsEmbedClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_embed_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "embed"; vobject_class->description = _( "embed an image in a larger image" ); vobject_class->build = vips_embed_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", -1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsEmbed, in ) ); VIPS_ARG_INT( class, "x", 2, _( "x" ), _( "Left edge of input in output" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsEmbed, x ), -1000000000, 1000000000, 0 ); VIPS_ARG_INT( class, "y", 3, _( "y" ), _( "Top edge of input in output" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsEmbed, y ), -1000000000, 1000000000, 0 ); VIPS_ARG_INT( class, "width", 4, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsEmbed, width ), 1, 1000000000, 1 ); VIPS_ARG_INT( class, "height", 5, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsEmbed, height ), 1, 1000000000, 1 ); VIPS_ARG_ENUM( class, "extend", 6, _( "Extend" ), _( "How to generate the extra pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsEmbed, extend ), VIPS_TYPE_EXTEND, VIPS_EXTEND_BLACK ); VIPS_ARG_BOXED( class, "background", 12, _( "Background" ), _( "Colour for background pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsEmbed, background ), VIPS_TYPE_ARRAY_DOUBLE ); } static void vips_embed_init( VipsEmbed *embed ) { embed->extend = VIPS_EXTEND_BLACK; embed->background = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), 1 ); ((double *) (embed->background->data))[0] = 0; } /** * vips_embed: * @in: input image * @out: output image * @x: place @in at this x position in @out * @y: place @in at this y position in @out * @width: @out should be this many pixels across * @height: @out should be this many pixels down * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @extend: how to generate the edge pixels (default: black) * @background: colour for edge pixels * * The opposite of vips_extract_area(): embed @in within an image of size * @width by @height at position @x, @y. @extend * controls what appears in the new pels, see #VipsExtend. * * See also: vips_extract_area(), vips_insert(). * * Returns: 0 on success, -1 on error. */ int vips_embed( VipsImage *in, VipsImage **out, int x, int y, int width, int height, ... ) { va_list ap; int result; va_start( ap, height ); result = vips_call_split( "embed", ap, in, out, x, y, width, height ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/insert.c0000644000175000017500000002715212303141142015023 00000000000000/* VipsInsert * * Copyright: 1990, J. Cupitt * * Author: J. Cupitt * Written on: 02/08/1990 * Modified on : * 31/8/93 JC * - ANSIfied * - Nicos' reformatting undone. Grr! * 22/12/94 * - modernised * - now does IM_CODING_LABQ too * 22/6/95 JC * - partialized * 10/2/02 JC * - adapted for im_prepare_to() stuff * 14/4/04 * - sets Xoffset / Yoffset * 3/7/06 * - add sanity range checks * 24/3/09 * - added IM_CODING_RAD support * 30/1/10 * - cleanups * - formatalike/bandalike * - gtkdoc * 29/9/11 * - rewrite as a class * - add expand, bg options */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "pconversion.h" typedef struct _VipsInsert { VipsConversion parent_instance; /* Params. */ VipsImage *main; VipsImage *sub; int x; int y; gboolean expand; VipsArea *background; /* Pixel we paint calculated from background. */ VipsPel *ink; /* Inputs cast and banded up. */ VipsImage *main_processed; VipsImage *sub_processed; /* Geometry. */ VipsRect rout; /* Output space */ VipsRect rmain; /* Position of main in output */ VipsRect rsub; /* Position of sub in output */ } VipsInsert; typedef VipsConversionClass VipsInsertClass; G_DEFINE_TYPE( VipsInsert, vips_insert, VIPS_TYPE_CONVERSION ); /* Trivial case: we just need pels from one of the inputs. */ static int vips_insert_just_one( VipsRegion *or, VipsRegion *ir, int x, int y ) { VipsRect need; /* Find the part of pos we need. */ need = or->valid; need.left -= x; need.top -= y; if( vips_region_prepare( ir, &need ) ) return( -1 ); /* Attach our output to it. */ if( vips_region_region( or, ir, &or->valid, need.left, need.top ) ) return( -1 ); return( 0 ); } /* Paste in parts of ir that fall within or --- ir is an input REGION for an * image positioned at pos within or. */ static int vips_insert_paste_region( VipsRegion *or, VipsRegion *ir, VipsRect *pos ) { VipsRect ovl; /* Does any of the sub-image appear in the area we have been asked * to make? */ vips_rect_intersectrect( &or->valid, pos, &ovl ); if( !vips_rect_isempty( &ovl ) ) { /* Find the part of in we need. */ ovl.left -= pos->left; ovl.top -= pos->top; /* Paint this area of pixels into or. */ if( vips_region_prepare_to( ir, or, &ovl, ovl.left + pos->left, ovl.top + pos->top ) ) return( -1 ); } return( 0 ); } /* Insert generate function. */ static int vips_insert_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion **ir = (VipsRegion **) seq; VipsRect *r = &or->valid; VipsInsert *insert = (VipsInsert *) b; Rect ovl; /* Does the rect we have been asked for fall entirely inside the * sub-image? */ if( vips_rect_includesrect( &insert->rsub, &or->valid ) ) return( vips_insert_just_one( or, ir[1], insert->rsub.left, insert->rsub.top ) ); /* Does it fall entirely inside the main, and not at all inside the * sub? */ vips_rect_intersectrect( &or->valid, &insert->rsub, &ovl ); if( vips_rect_includesrect( &insert->rmain, &or->valid ) && vips_rect_isempty( &ovl ) ) return( vips_insert_just_one( or, ir[0], insert->rmain.left, insert->rmain.top ) ); /* Output requires both (or neither) input. If it is not entirely * inside both the main and the sub, then there is going to be some * background. */ if( !(vips_rect_includesrect( &insert->rsub, &or->valid ) && vips_rect_includesrect( &insert->rmain, &or->valid )) ) vips_region_paint_pel( or, r, insert->ink ); /* Paste from main. */ if( vips_insert_paste_region( or, ir[0], &insert->rmain ) ) return( -1 ); /* Paste from sub. */ if( vips_insert_paste_region( or, ir[1], &insert->rsub ) ) return( -1 ); return( 0 ); } /* Calculate a pixel for an image from a vec of double. Valid while im is * valid. */ VipsPel * vips__vector_to_ink( const char *domain, VipsImage *im, double *vec, int n ) { VipsImage **t; double *ones; int i; #ifdef VIPS_DEBUG printf( "vips__vector_to_ink: starting\n" ); #endif /*VIPS_DEBUG*/ if( vips_check_vector( domain, n, im ) ) return( NULL ); /* This looks a bit dodgy, but the pipeline we are creating does not * depend upon im, so it's OK to make t depend on im. */ t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( im ), 4 ); ones = VIPS_ARRAY( im, n, double ); for( i = 0; i < n; i++ ) ones[i] = 1.0; if( vips_black( &t[0], 1, 1, "bands", im->Bands, NULL ) || vips_linear( t[0], &t[1], ones, vec, n, NULL ) || vips_cast( t[1], &t[2], im->BandFmt, NULL ) || !(t[3] = vips_image_new_mode( "vtoi", "t" )) || vips_image_write( t[2], t[3] ) ) return( NULL ); #ifdef VIPS_DEBUG { VipsPel *p = (VipsPel *) (t[3]->data); printf( "vips__vector_to_ink: ink = %p (%d %d %d)\n", p, p[0], p[1], p[2] ); } #endif /*VIPS_DEBUG*/ return( (VipsPel *) t[3]->data ); } static int vips_insert_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = VIPS_CONVERSION( object ); VipsInsert *insert = (VipsInsert *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 6 ); VipsImage **arry; if( VIPS_OBJECT_CLASS( vips_insert_parent_class )->build( object ) ) return( -1 ); if( vips_image_pio_input( insert->main ) || vips_image_pio_input( insert->sub ) || vips_check_bands_1orn( class->nickname, insert->main, insert->sub ) || vips_check_coding_known( class->nickname, insert->main ) || vips_check_coding_same( class->nickname, insert->main, insert->sub ) ) return( -1 ); /* Cast our input images up to a common format and bands. */ if( vips__formatalike( insert->main, insert->sub, &t[0], &t[1] ) || vips__bandalike( class->nickname, t[0], t[1], &t[2], &t[3] ) ) return( -1 ); insert->main_processed = t[2]; insert->sub_processed = t[3]; if( !(arry = vips_allocate_input_array( conversion->out, insert->main_processed, insert->sub_processed, NULL )) ) return( -1 ); if( vips_image_pipeline_array( conversion->out, VIPS_DEMAND_STYLE_ANY, arry ) ) return( -1 ); /* Calculate geometry. */ insert->rmain.left = 0; insert->rmain.top = 0; insert->rmain.width = insert->main_processed->Xsize; insert->rmain.height = insert->main_processed->Ysize; insert->rsub.left = insert->x; insert->rsub.top = insert->y; insert->rsub.width = insert->sub_processed->Xsize; insert->rsub.height = insert->sub_processed->Ysize; if( insert->expand ) { /* Expand output to bounding box of these two. */ vips_rect_unionrect( &insert->rmain, &insert->rsub, &insert->rout ); /* Translate origin to top LH corner of rout. */ insert->rmain.left -= insert->rout.left; insert->rmain.top -= insert->rout.top; insert->rsub.left -= insert->rout.left; insert->rsub.top -= insert->rout.top; insert->rout.left = 0; insert->rout.top = 0; } else insert->rout = insert->rmain; conversion->out->Xsize = insert->rout.width; conversion->out->Ysize = insert->rout.height; if( !(insert->ink = vips__vector_to_ink( class->nickname, conversion->out, insert->background->data, insert->background->n )) ) return( -1 ); if( vips_image_generate( conversion->out, vips_start_many, vips_insert_gen, vips_stop_many, arry, insert ) ) return( -1 ); return( 0 ); } /* xy range we sanity check on ... just to stop crazy numbers from 1/0 etc. * causing g_assert() failures later. */ #define RANGE (100000000) static void vips_insert_class_init( VipsInsertClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); VIPS_DEBUG_MSG( "vips_insert_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "insert"; vobject_class->description = _( "insert an image" ); vobject_class->build = vips_insert_build; VIPS_ARG_IMAGE( class, "main", -1, _( "Main" ), _( "Main input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsInsert, main ) ); VIPS_ARG_IMAGE( class, "sub", 0, _( "Sub-image" ), _( "Sub-image to insert into main image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsInsert, sub ) ); VIPS_ARG_INT( class, "x", 2, _( "X" ), _( "Left edge of sub in main" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsInsert, x ), -RANGE, RANGE, 0 ); VIPS_ARG_INT( class, "y", 3, _( "Y" ), _( "Top edge of sub in main" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsInsert, y ), -RANGE, RANGE, 0 ); VIPS_ARG_BOOL( class, "expand", 4, _( "Expand" ), _( "Expand output to hold all of both inputs" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsInsert, expand ), FALSE ); VIPS_ARG_BOXED( class, "background", 5, _( "Background" ), _( "Colour for new pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsInsert, background ), VIPS_TYPE_ARRAY_DOUBLE ); } static void vips_insert_init( VipsInsert *insert ) { /* Init our instance fields. */ insert->background = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), 1 ); ((double *) (insert->background->data))[0] = 0.0; } /** * vips_insert: * @main: big image * @sub: small image * @out: output image * @x: left position of @sub * @y: top position of @sub * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @expand: expand output to hold whole of both images * @background: colour for new pixels * * Insert one image into another. @sub is inserted into image @main at * position @x, @y relative to the top LH corner of @main. * * Normally @out shows the whole of @main. If @expand is #TRUE then @out is * made large enough to hold all of @main and @sub. * Any areas of @out not coming from * either @main or @sub are set to @background (default 0). * * If @sub overlaps @main, * @sub will appear on top of @main. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: vips_join(), vips_embed(), vips_extract_area(). * * Returns: 0 on success, -1 on error */ int vips_insert( VipsImage *main, VipsImage *sub, VipsImage **out, int x, int y, ... ) { va_list ap; int result; va_start( ap, y ); result = vips_call_split( "insert", ap, main, sub, out, x, y ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/msb.c0000644000175000017500000001527212303140253014302 00000000000000/* vips_msb() * * Copyright: 2006, The Nottingham Trent University * * Author: Tom Vajzovic * * Written on: 2006-03-13 * 27/9/06 * - removed extra im_free() in im_copy() fallback * 4/10/06 * - removed warning on uchar fallback: it happens a lot with nip2 and * isn't very serious * 1/2/10 * - revised, cleanups * - gtkdoc * 30/5/13 * - rewrite as a class * - add --band option, remove im_msb_band() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H */ #include #include #include "pconversion.h" #include "bandary.h" typedef struct _VipsMsb { VipsConversion parent_instance; /* Params. */ VipsImage *in; int band; /* Initial input offset. */ int offset; /* Input step. */ int instep; /* Need to convert signed to unsgned. */ gboolean sign; } VipsMsb; typedef VipsConversionClass VipsMsbClass; G_DEFINE_TYPE( VipsMsb, vips_msb, VIPS_TYPE_CONVERSION ); static int vips_msb_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsMsb *msb = (VipsMsb *) b; VipsConversion *conversion = (VipsConversion *) msb; VipsRect *r = &or->valid; int le = r->left; int to = r->top; int bo = VIPS_RECT_BOTTOM( r ); int sz = r->width * conversion->out->Bands; int x, y, i; if( vips_region_prepare( ir, r ) ) return( -1 ); for( y = to; y < bo; y++ ) { VipsPel *p = VIPS_REGION_ADDR( ir, le, y ); VipsPel *q = VIPS_REGION_ADDR( or, le, y ); if( msb->in->Coding == VIPS_CODING_LABQ && msb->band == -1 ) { /* LABQ, no sub-band select. */ for( x = 0; x < r->width; x++ ) { q[0] = p[0]; q[1] = 0x80 ^ p[1]; q[2] = 0x80 ^ p[2]; q += 4; p += 3; } } else if( msb->sign ) { /* Copy, converting signed to unsigned. */ p += msb->offset; for( i = 0; i < sz; i++ ) { q[i] = 0x80 ^ *p; p += msb->instep; } } else { /* Just pick out bytes. */ p += msb->offset; for( i = 0; i < sz; i++ ) { q[i] = *p; p += msb->instep; } } } return( 0 ); } static int vips_msb_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConversion *conversion = (VipsConversion *) object; VipsMsb *msb = (VipsMsb *) object; int vbands; if( VIPS_OBJECT_CLASS( vips_msb_parent_class )->build( object ) ) return( -1 ); if( vips_check_coding_noneorlabq( class->nickname, msb->in ) || vips_check_int( class->nickname, msb->in ) ) return( -1 ); /* Effective number of bands this image has. */ vbands = msb->in->Coding == VIPS_CODING_LABQ ? 3 : msb->in->Bands; if( msb->band > vbands - 1 ) { vips_error( class->nickname, "%s", _( "bad band" ) ); return( -1 ); } /* Step to next input element. */ msb->instep = VIPS_IMAGE_SIZEOF_ELEMENT( msb->in ); /* Offset into first band element of high order byte. */ msb->offset = vips_amiMSBfirst() ? 0 : VIPS_IMAGE_SIZEOF_ELEMENT( msb->in ) - 1; /* If we're picking out a band, they need scaling up. */ if( msb->band != -1 ) { msb->offset += VIPS_IMAGE_SIZEOF_ELEMENT( msb->in ) * msb->band; msb->instep *= msb->in->Bands; } /* May need to flip sign if we're picking out a band from labq. */ if( msb->in->Coding == VIPS_CODING_LABQ && msb->band > 0 ) msb->sign = TRUE; if( msb->in->Coding == VIPS_CODING_NONE && !vips_bandfmt_isuint( msb->in->BandFmt ) ) msb->sign = TRUE; if( msb->band == -1 && msb->in->BandFmt == VIPS_FORMAT_UCHAR ) return( vips_image_write( msb->in, conversion->out ) ); if( msb->band == 0 && msb->in->Bands == 1 && msb->in->BandFmt == VIPS_FORMAT_UCHAR ) return( vips_image_write( msb->in, conversion->out ) ); if( vips_image_pipelinev( conversion->out, VIPS_DEMAND_STYLE_THINSTRIP, msb->in, NULL ) ) return( -1 ); if( msb->band != -1 ) conversion->out->Bands = 1; else conversion->out->Bands = vbands; conversion->out->BandFmt = VIPS_FORMAT_UCHAR; conversion->out->Coding = VIPS_CODING_NONE; if( conversion->out->Bands == 1 ) conversion->out->Type = VIPS_INTERPRETATION_B_W; else conversion->out->Type = VIPS_INTERPRETATION_MULTIBAND; if( vips_image_generate( conversion->out, vips_start_one, vips_msb_gen, vips_stop_one, msb->in, msb ) ) return( -1 ); return( 0 ); } static void vips_msb_class_init( VipsMsbClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "msb"; vobject_class->description = _( "pick most-significant byte from an image" ); vobject_class->build = vips_msb_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsMsb, in ) ); VIPS_ARG_INT( class, "band", 3, _( "Band" ), _( "Band to msb" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMsb, band ), 0, 100000000, 0 ); } static void vips_msb_init( VipsMsb *msb ) { msb->band = -1; } /** * vips_msb: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @band: msb just this band * * Turn any integer image to 8-bit unsigned char by discarding all but the most * significant byte. Signed values are converted to unsigned by adding 128. * * Use @band to make a one-band 8-bit image. * * This operator also works for LABQ coding. * * See also: vips_scale(), vips_cast(). * * Returns: 0 on success, -1 on error. */ int vips_msb( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "msb", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/bandrank.c0000644000175000017500000001713012303140253015274 00000000000000/* Sort a set of images, pixelwise, and pick out the index at each point. * * 19/8/03 * - from im_maxvalue(), via im_gbandrank() * 10/11/10 * - gtkdoc * - cleanups * - any mix of formats and bands * 23/10/13 * - redo as a class, from bandrank.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "bandary.h" typedef struct _VipsBandrank { VipsBandary parent_instance; /* The input images. */ VipsArea *in; int index; /* Pick out this one */ } VipsBandrank; typedef VipsBandaryClass VipsBandrankClass; G_DEFINE_TYPE( VipsBandrank, vips_bandrank, VIPS_TYPE_BANDARY ); /* Special-case max and min (rather common). */ #define FIND_MAX( TYPE ) { \ for( x = 0; x < sz; x++ ) { \ TYPE top = ((TYPE *) p[0])[x]; \ \ for( i = 1; i < bandary->n; i++ ) { \ TYPE v = ((TYPE *) p[i])[x]; \ \ if( v > top ) \ top = v; \ } \ \ ((TYPE *) q)[x] = top; \ } \ } #define FIND_MIN( TYPE ) { \ for( x = 0; x < sz; x++ ) { \ TYPE bot = ((TYPE *) p[0])[x]; \ \ for( i = 1; i < bandary->n; i++ ) { \ TYPE v = ((TYPE *) p[i])[x]; \ \ if( v < bot ) \ bot = v; \ } \ \ ((TYPE *) q)[x] = bot; \ } \ } #define FIND_RANK( TYPE ) { \ TYPE *sort = (TYPE *) sort_buffer; \ \ for( x = 0; x < sz; x++ ) { \ for( i = 0; i < bandary->n; i++ ) { \ TYPE v = ((TYPE *) p[i])[x]; \ \ /* Search for element >v. */\ for( j = 0; j < i; j++ ) \ if( sort[j] > v ) \ break; \ \ /* Move remaining elements down. */ \ for( k = i; k > j; k-- ) \ sort[k] = sort[k - 1]; \ \ /* Insert this element. */ \ sort[j] = v; \ } \ \ ((TYPE *) q)[x] = sort[bandrank->index]; \ } \ } #define SWITCH( OPERATION ) \ switch( in[0]->BandFmt ) { \ case VIPS_FORMAT_UCHAR: OPERATION( unsigned char ); break; \ case VIPS_FORMAT_CHAR: OPERATION( signed char ); break; \ case VIPS_FORMAT_USHORT: OPERATION( unsigned short ); break; \ case VIPS_FORMAT_SHORT: OPERATION( signed short ); break; \ case VIPS_FORMAT_UINT: OPERATION( unsigned int ); break; \ case VIPS_FORMAT_INT: OPERATION( signed int ); break; \ case VIPS_FORMAT_FLOAT: OPERATION( float ); break; \ case VIPS_FORMAT_DOUBLE: OPERATION( double ); break; \ \ default: \ g_assert( 0 ); \ } /* Sort input band elements in the stack. Needs to be big enough for * sizeof(band-element) * number-of-images. */ #define SORT_BUFFER (1024) static void vips_bandrank_buffer( VipsBandary *bandary, VipsPel *q, VipsPel **p, int width ) { VipsBandrank *bandrank = (VipsBandrank *) bandary; VipsImage **in = bandary->ready; int sz = width * in[0]->Bands; int i, j, k; int x; VipsPel sort_buffer[SORT_BUFFER]; /* Special-case max and min. */ if( bandrank->index == 0 ) SWITCH( FIND_MIN ) else if( bandrank->index == bandary->n - 1 ) SWITCH( FIND_MAX ) else SWITCH( FIND_RANK ) } static int vips_bandrank_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsBandary *bandary = (VipsBandary *) object; VipsBandrank *bandrank = (VipsBandrank *) object; if( bandrank->in ) { VipsImage **band = (VipsImage **) vips_object_local_array( object, bandrank->in->n ); if( bandrank->in->n == 1 ) return( vips_bandary_copy( bandary ) ); /* We need to keep one band element for every input image * on the stack. */ if( sizeof( double ) * bandrank->in->n > SORT_BUFFER ) { vips_error( class->nickname, "%s", _( "too many input images" ) ); return( -1 ); } if( vips__bandalike_vec( class->nickname, bandrank->in->data, band, bandrank->in->n, 0 ) ) return( -1 ); bandary->in = band; bandary->n = bandrank->in->n; bandary->out_bands = band[0]->Bands; if( bandrank->index == -1 ) bandrank->index = bandary->n / 2; } if( VIPS_OBJECT_CLASS( vips_bandrank_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_bandrank_class_init( VipsBandrankClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsBandaryClass *bandary_class = VIPS_BANDARY_CLASS( class ); VIPS_DEBUG_MSG( "vips_bandrank_class_init\n" ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "bandrank"; vobject_class->description = _( "band-wise rank of a set of images" ); vobject_class->build = vips_bandrank_build; bandary_class->process_line = vips_bandrank_buffer; VIPS_ARG_BOXED( class, "in", 0, _( "Input" ), _( "Array of input images" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBandrank, in ), VIPS_TYPE_ARRAY_IMAGE ); VIPS_ARG_INT( class, "index", 0, _( "Index" ), _( "Select this band element from sorted list" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsBandrank, index ), -1, 1000000, -1 ); } static void vips_bandrank_init( VipsBandrank *bandrank ) { /* -1 means median. */ bandrank->index = -1; } static int vips_bandrankv( VipsImage **in, VipsImage **out, int n, va_list ap ) { VipsArea *area; VipsImage **array; int i; int result; area = vips_area_new_array_object( n ); array = (VipsImage **) area->data; for( i = 0; i < n; i++ ) { array[i] = in[i]; g_object_ref( array[i] ); } result = vips_call_split( "bandrank", ap, area, out ); vips_area_unref( area ); return( result ); } /** * vips_bandrank: * @in: array of input images * @out: output image * @n: number of input images * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @index: pick this index from list of sorted values * * Sorts the images @in band-element-wise, then outputs an * image in which each band element is selected from the sorted list by the * @index parameter. For example, if @index * is zero, then each output band element will be the minimum of all the * corresponding input band element. * * By default, @index is -1, meaning pick the median value. * * It works for any uncoded, non-complex image type. Images are cast up to the * smallest common-format. * * Any image can have either 1 band or n bands, where n is the same for all * the non-1-band images. Single band images are then effectively copied to * make n-band images. * * Smaller input images are expanded by adding black pixels. * * See also: vips_rank(). * * Returns: 0 on success, -1 on error */ int vips_bandrank( VipsImage **in, VipsImage **out, int n, ... ) { va_list ap; int result; va_start( ap, n ); result = vips_bandrankv( in, out, n, ap ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/bandmean.c0000644000175000017500000001241712303140253015264 00000000000000/* im_bandmean.c * * Author: Simon Goodall * Written on: 17/7/07 * 17/7/07 JC * - hacked about a bit * 18/8/09 * - gtkdoc * - get rid of the complex case, just double the width * 19/11/11 * - redo as a class */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "bandary.h" typedef struct _VipsBandmean { VipsBandary parent_instance; VipsImage *in; } VipsBandmean; typedef VipsBandaryClass VipsBandmeanClass; G_DEFINE_TYPE( VipsBandmean, vips_bandmean, VIPS_TYPE_BANDARY ); /* Unsigned int types. Round, keep sum in a larger variable. */ #define UILOOP( TYPE, STYPE ) { \ TYPE *p = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ \ for( i = 0; i < sz; i++ ) { \ STYPE sum; \ \ sum = 0; \ for( j = 0; j < bands; j++ ) \ sum += p[j]; \ q[i] = (sum + bands / 2) / bands; \ p += bands; \ } \ } /* Signed int types. Round, keep sum in a larger variable. */ #define SILOOP( TYPE, STYPE ) { \ TYPE *p = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ \ for( i = 0; i < sz; i++ ) { \ STYPE sum; \ \ sum = 0; \ for( j = 0; j < bands; j++ ) \ sum += p[j]; \ q[i] = sum > 0 ? \ (sum + bands / 2) / bands : \ (sum - bands / 2) / bands; \ p += bands; \ } \ } /* Float loop. No rounding, sum in same container. */ #define FLOOP( TYPE ) { \ TYPE *p = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ \ for( i = 0; i < sz; i++ ) { \ TYPE sum; \ \ sum = 0; \ for( j = 0; j < bands; j++ ) \ sum += p[j]; \ q[i] = sum / bands; \ p += bands; \ } \ } static void vips_bandmean_buffer( VipsBandary *bandary, VipsPel *out, VipsPel **in, int width ) { VipsImage *im = bandary->ready[0]; const int bands = im->Bands; const int sz = width * (vips_bandfmt_iscomplex( im->BandFmt ) ? 2 : 1); int i, j; switch( vips_image_get_format( im ) ) { case VIPS_FORMAT_CHAR: SILOOP( signed char, int ); break; case VIPS_FORMAT_UCHAR: UILOOP( unsigned char, unsigned int ); break; case VIPS_FORMAT_SHORT: SILOOP( signed short, int ); break; case VIPS_FORMAT_USHORT: UILOOP( unsigned short, unsigned int ); break; case VIPS_FORMAT_INT: SILOOP( signed int, int ); break; case VIPS_FORMAT_UINT: UILOOP( unsigned int, unsigned int ); break; case VIPS_FORMAT_FLOAT: FLOOP( float ); break; case VIPS_FORMAT_DOUBLE: FLOOP( double ); break; case VIPS_FORMAT_COMPLEX: FLOOP( float ); break; case VIPS_FORMAT_DPCOMPLEX: FLOOP( double ); break; default: g_assert( 0 ); } } static int vips_bandmean_build( VipsObject *object ) { VipsBandary *bandary = (VipsBandary *) object; VipsBandmean *bandmean = (VipsBandmean *) object; if( bandmean->in && bandmean->in->Bands == 1 ) return( vips_bandary_copy( bandary ) ); bandary->out_bands = 1; bandary->n = 1; bandary->in = &bandmean->in; if( VIPS_OBJECT_CLASS( vips_bandmean_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_bandmean_class_init( VipsBandmeanClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsBandaryClass *bandary_class = VIPS_BANDARY_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "bandmean"; object_class->description = _( "band-wise average" ); object_class->build = vips_bandmean_build; bandary_class->process_line = vips_bandmean_buffer; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsBandmean, in ) ); } static void vips_bandmean_init( VipsBandmean *bandmean ) { } /** * vips_bandmean: * @in: input #IMAGE * @out: output #IMAGE * @...: %NULL-terminated list of optional named arguments * * This operation writes a one-band image where each pixel is the average of * the bands for that pixel in the input image. The output band format is * the same as the input band format. Integer types use round-to-nearest * averaging. * * See also: vips_add(), vips_avg(), vips_recomb() * * Returns: 0 on success, -1 on error */ int vips_bandmean( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "bandmean", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/conversion/scale.c0000644000175000017500000001133612303140253014605 00000000000000/* im_scale * * Author: John Cupitt * Written on: 22/4/93 * Modified on: * 30/6/93 JC * - adapted for partial v2 * - ANSI * 31/8/93 JC * - calculation of offset now includes scale * 8/5/06 * - set Type on output too * 16/10/06 * - what? no, don't set Type, useful to be able to scale histograms, for * example * 1/2/10 * - gtkdoc * 30/5/13 * - redo as a class * - add log scale and exponent as an option * 14/1/14 * - use linear uchar mode */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pconversion.h" typedef struct _VipsScale { VipsConversion parent_instance; VipsImage *in; gboolean log; double exp; } VipsScale; typedef VipsConversionClass VipsScaleClass; G_DEFINE_TYPE( VipsScale, vips_scale, VIPS_TYPE_CONVERSION ); static int vips_scale_build( VipsObject *object ) { VipsConversion *conversion = VIPS_CONVERSION( object ); VipsScale *scale = (VipsScale *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 7 ); double mx; double mn; if( VIPS_OBJECT_CLASS( vips_scale_parent_class )->build( object ) ) return( -1 ); if( vips_stats( scale->in, &t[0], NULL ) ) return( -1 ); mn = *VIPS_MATRIX( t[0], 0, 0 ); mx = *VIPS_MATRIX( t[0], 1, 0 ); if( mn == mx ) { /* Range of zero: just return black. */ if( vips_black( &t[1], scale->in->Xsize, scale->in->Ysize, scale->in->Bands, NULL ) || vips_image_write( t[1], conversion->out ) ) return( -1 ); } else if( scale->log ) { double f = 255.0 / log10( 1.0 + pow( mx, scale->exp ) ); if( vips_pow_const1( scale->in, &t[2], scale->exp, NULL ) || vips_linear1( t[2], &t[3], 1.0, 1.0, NULL ) || vips_log10( t[3], &t[4], NULL ) || vips_linear1( t[4], &t[5], f, 0.0, "uchar", TRUE, NULL ) || vips_image_write( t[5], conversion->out ) ) return( -1 ); } else { double f = 255.0 / (mx - mn); double a = -(mn * f); if( vips_linear1( scale->in, &t[2], f, a, "uchar", TRUE, NULL ) || vips_image_write( t[2], conversion->out ) ) return( -1 ); } return( 0 ); } static void vips_scale_class_init( VipsScaleClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "scale"; vobject_class->description = _( "scale an image to uchar" ); vobject_class->build = vips_scale_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsScale, in ) ); VIPS_ARG_BOOL( class, "log", 3, _( "Log" ), _( "Log scale" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsScale, log ), FALSE ); VIPS_ARG_DOUBLE( class, "exp", 3, _( "Exponent" ), _( "Exponent for log scale" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsScale, exp ), 0.00001, 10000, 0.25 ); } static void vips_scale_init( VipsScale *scale ) { scale->exp = 0.25; } /** * vips_scale: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @log: log scale pixels * @exp: exponent for log scale * * Search the image for the maximum and minimum value, then return the image * as unsigned 8-bit, scaled so that the maximum value is 255 and the * minimum is zero. * * If @log is set, transform with log10(1.0 + pow(x, @exp)) + .5, * then scale so max == 255. By default, @exp is 0.25. * * See also: vips_cast(). * * Returns: 0 on success, -1 on error */ int vips_scale( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "scale", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/include/0000755000175000017500000000000012303146327012674 500000000000000vips-7.38.5/libvips/include/Makefile.in0000644000175000017500000005225712303144055014670 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/include DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ SUBDIRS = vips all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/include/Makefile.am0000644000175000017500000000002112303140253014631 00000000000000 SUBDIRS = vips vips-7.38.5/libvips/include/vips/0000755000175000017500000000000012303146330013647 500000000000000vips-7.38.5/libvips/include/vips/deprecated.h0000644000175000017500000000762012303140253016043 00000000000000/* Old and broken stuff we do not enable by default * * 30/6/09 * - from vips.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_DEPRECATED_H #define IM_DEPRECATED_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* On win32, need to override the wingdi defs for these. Yuk! */ #ifdef HAVE_WINDOWS_H #ifdef RGB #undef RGB #endif #ifdef CMYK #undef CMYK #endif #endif /*HAVE_WINDOWS_H*/ /* Bits per Band */ #define BBBYTE 8 #define BBSHORT 16 #define BBINT 32 #define BBFLOAT 32 #define BBCOMPLEX 64 /* complex consisting of two floats */ #define BBDOUBLE 64 #define BBDPCOMPLEX 128 /* complex consisting of two doubles */ /* picture Type */ #define MULTIBAND 0 #define B_W 1 #define LUMINACE 2 #define XRAY 3 #define IR 4 #define YUV 5 #define RED_ONLY 6 /* red channel only */ #define GREEN_ONLY 7 /* green channel only */ #define BLUE_ONLY 8 /* blue channel only */ #define POWER_SPECTRUM 9 #define HISTOGRAM 10 #define FOURIER 24 /* Colour spaces. */ #define LUT 11 #define XYZ 12 #define LAB 13 #define CMC 14 #define CMYK 15 #define LABQ 16 #define RGB 17 #define UCS 18 #define LCH 19 #define LABS 21 #define sRGB 22 #define YXY 23 /* BandFmt */ #define FMTNOTSET -1 #define FMTUCHAR 0 /* pels interpreted as unsigned chars */ #define FMTCHAR 1 /* pels interpreted as signed chars */ #define FMTUSHORT 2 /* pels interpreted as unsigned shorts */ #define FMTSHORT 3 /* pels interpreted as signed shorts */ #define FMTUINT 4 /* pels interpreted as unsigned ints */ #define FMTINT 5 /* pels interpreted as signed ints */ #define FMTFLOAT 6 /* pels interpreted as floats */ #define FMTCOMPLEX 7 /* pels interpreted as complex (2 float each) */ #define FMTDOUBLE 8 /* pels interpreted as unsigned double */ #define FMTDPCOMPLEX 9 /* pels interpreted as complex (2 double each)*/ /* Coding type */ #define NOCODING 0 #define COLQUANT 1 #define LABPACK 2 #define LABPACK_COMPRESSED 3 #define RGB_COMPRESSED 4 #define LUM_COMPRESSED 5 /* Compression type */ #define NO_COMPRESSION 0 #define TCSF_COMPRESSION 1 #define JPEG_COMPRESSION 2 #define esize(I) IM_IMAGE_SIZEOF_ELEMENT(I) #define psize(I) IM_IMAGE_SIZEOF_PEL(I) #define lsize(I) IM_IMAGE_SIZEOF_LINE(I) #define niele(I) IM_IMAGE_N_ELEMENTS(I) #define lskip(B) IM_REGION_LSKIP(B) #define nele(B) IM_REGION_N_ELEMENTS(B) #define rsize(B) IM_REGION_SIZEOF_LINE(B) #define addr(B,X,Y) IM_REGION_ADDR(B,X,Y) #ifndef MAX #define MAX(A,B) IM_MAX(A, B) #define MIN(A,B) IM_MIN(A, B) #endif /*MAX*/ #define CLIP(A,V,B) IM_CLIP(A, V, B) #define NEW(IM,A) IM_NEW(IM,A) #define NUMBER(R) IM_NUMBER(R) #define ARRAY(IM,N,T) IM_ARRAY(IM,N,T) #define UNROLL( N, OPER ) IM_UNROLL( N, OPER ) #define RINT( R ) IM_RINT( R ) #define CLIP_UCHAR( V, SEQ ) IM_CLIP_UCHAR( V, SEQ ) #define CLIP_USHORT( V, SEQ ) IM_CLIP_USHORT( V, SEQ ) #define CLIP_CHAR( V, SEQ ) IM_CLIP_CHAR( V, SEQ ) #define CLIP_SHORT( V, SEQ ) IM_CLIP_SHORT( V, SEQ ) #define CLIP_NONE( V, SEQ ) IM_CLIP_NONE( V, SEQ ) #define right(R) IM_RECT_RIGHT(R) #define bottom(R) IM_RECT_BOTTOM(R) #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_DEPRECATED_H*/ vips-7.38.5/libvips/include/vips/conversion.h0000644000175000017500000001424712303140253016133 00000000000000/* conversion.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_CONVERSION_H #define VIPS_CONVERSION_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ typedef enum { VIPS_EXTEND_BLACK, VIPS_EXTEND_COPY, VIPS_EXTEND_REPEAT, VIPS_EXTEND_MIRROR, VIPS_EXTEND_WHITE, VIPS_EXTEND_BACKGROUND, VIPS_EXTEND_LAST } VipsExtend; typedef enum { VIPS_DIRECTION_HORIZONTAL, VIPS_DIRECTION_VERTICAL, VIPS_DIRECTION_LAST } VipsDirection; typedef enum { VIPS_ALIGN_LOW, VIPS_ALIGN_CENTRE, VIPS_ALIGN_HIGH, VIPS_ALIGN_LAST } VipsAlign; typedef enum { VIPS_ANGLE_0, VIPS_ANGLE_90, VIPS_ANGLE_180, VIPS_ANGLE_270, VIPS_ANGLE_LAST } VipsAngle; typedef enum { VIPS_ANGLE45_0, VIPS_ANGLE45_45, VIPS_ANGLE45_90, VIPS_ANGLE45_135, VIPS_ANGLE45_180, VIPS_ANGLE45_225, VIPS_ANGLE45_270, VIPS_ANGLE45_315, VIPS_ANGLE45_LAST } VipsAngle45; int vips_copy( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_tilecache( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_linecache( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_sequential( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cache( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_copy_file( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_embed( VipsImage *in, VipsImage **out, int x, int y, int width, int height, ... ) __attribute__((sentinel)); int vips_flip( VipsImage *in, VipsImage **out, VipsDirection direction, ... ) __attribute__((sentinel)); int vips_insert( VipsImage *main, VipsImage *sub, VipsImage **out, int x, int y, ... ) __attribute__((sentinel)); int vips_join( VipsImage *main, VipsImage *sub, VipsImage **out, VipsDirection direction, ... ) __attribute__((sentinel)); int vips_extract_area( VipsImage *input, VipsImage **output, int left, int top, int width, int height, ... ) __attribute__((sentinel)); int vips_crop( VipsImage *input, VipsImage **output, int left, int top, int width, int height, ... ) __attribute__((sentinel)); int vips_extract_band( VipsImage *input, VipsImage **output, int band, ... ) __attribute__((sentinel)); int vips_replicate( VipsImage *in, VipsImage **out, int across, int down, ... ) __attribute__((sentinel)); int vips_grid( VipsImage *in, VipsImage **out, int tile_height, int across, int down, ... ) __attribute__((sentinel)); int vips_wrap( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_rot( VipsImage *in, VipsImage **out, VipsAngle angle, ... ) __attribute__((sentinel)); int vips_rot45( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_zoom( VipsImage *in, VipsImage **out, int xfac, int yfac, ... ) __attribute__((sentinel)); int vips_subsample( VipsImage *in, VipsImage **out, int xfac, int yfac, ... ) __attribute__((sentinel)); int vips_cast( VipsImage *in, VipsImage **out, VipsBandFormat format, ... ) __attribute__((sentinel)); int vips_cast_uchar( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_char( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_ushort( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_short( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_uint( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_int( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_float( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_double( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_complex( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cast_dpcomplex( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_scale( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_msb( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_bandjoin( VipsImage **in, VipsImage **out, int n, ... ) __attribute__((sentinel)); int vips_bandjoin2( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) __attribute__((sentinel)); int vips_bandrank( VipsImage **in, VipsImage **out, int n, ... ) __attribute__((sentinel)); int vips_bandbool( VipsImage *in, VipsImage **out, VipsOperationBoolean operation, ... ) __attribute__((sentinel)); int vips_bandand( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_bandor( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_bandeor( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_bandmean( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_recomb( VipsImage *in, VipsImage **out, VipsImage *m, ... ) __attribute__((sentinel)); int vips_ifthenelse( VipsImage *cond, VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) __attribute__((sentinel)); int vips_flatten( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_falsecolour( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_gamma( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int im_insertset( VipsImage *main, VipsImage *sub, VipsImage *out, int n, int *x, int *y ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_CONVERSION_H*/ vips-7.38.5/libvips/include/vips/vips.h0000644000175000017500000001122112303141142014712 00000000000000/* @(#) Header file for Birkbeck/VIPS Image Processing Library * Authors: N. Dessipris, K. Martinez, Birkbeck College, London. * Sept 94 * * 15/7/96 JC * - now does C++ extern stuff * - many more protos * 15/4/97 JC * - protos split out * 4/3/98 JC * - IM_ANY added * - sRGB colourspace added * 28/10/98 JC * - VASARI_MAGIC_INTEL and VASARI_MAGIC_SPARC added * 29/9/99 JC * - new locks for threading, no more threadgroup stuff in IMAGE * 30/11/00 JC * - override RGB/CMYK macros on cygwin * 21/9/02 JC * - new Xoffset/Yoffset fields * - rationalized macro names * 6/6/05 Markus Wollgarten * - added Meta header field * 31/7/05 * - added meta.h for new metadata API * 22/8/05 * - scrapped stupid VAS_HD * 30/9/05 * - added sizeof_header field for mmap window read of RAW files * 4/10/05 * - now you have to define IM_ENABLE_DEPRECATED to get broken #defined * 5/10/05 * - added GNUC attributes * 8/5/06 * - added RGB16, GREY16 * 30/10/06 * - added im_window_t * 7/11/07 * - added preclose and evalstart callbacks * - brought time struct in here * 7/3/08 * - MAGIC values should be unsigned * 2/7/08 * - added invalidate callbacks * 7/8/08 * - include , thanks nicola * 30/6/09 * - move deprecated stuff to its own header */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_VIPS_H #define VIPS_VIPS_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #include #include #include /* If we're being parsed by SWIG, remove gcc attributes. */ #ifdef SWIG # ifndef __attribute__ # define __attribute__(x) /*NOTHING*/ # endif #endif /*SWIG*/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef VIPS_DISABLE_VIPS7COMPAT #include #endif /*VIPS_DISABLE_VIPS7COMPAT*/ #ifdef VIPS_ENABLE_DEPRECATED #include #endif /*VIPS_ENABLE_DEPRECATED*/ #include #include /* We can't use _ here since this will be compiled by our clients and they may * not have _(). */ #define vips_init( ARGV0 ) \ (sizeof( VipsObject ) != vips__get_sizeof_vipsobject() ? ( \ vips_info( "vips_init", "ABI mismatch" ), \ vips_info( "vips_init", \ "library has sizeof(VipsObject) == %zd", \ vips__get_sizeof_vipsobject() ), \ vips_info( "vips_init", \ "application has sizeof(VipsObject) == %zd", \ sizeof( VipsObject ) ), \ vips_error( "vips_init", "ABI mismatch" ), \ -1 ) : \ vips__init( ARGV0 )) const char *vips_get_argv0( void ); void vips_check_init( void ); void vips_shutdown( void ); void vips_thread_shutdown( void ); GOptionGroup *vips_get_option_group( void ); const char *vips_version_string( void ); int vips_version( int flag ); const char *vips_guess_prefix( const char *argv0, const char *env_name ); const char *vips_guess_libdir( const char *argv0, const char *env_name ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_VIPS_H*/ vips-7.38.5/libvips/include/vips/private.h0000644000175000017500000001312312303141142015406 00000000000000/* Declarations which are public-facing, but private. See internal.h for * declarations which are only used internally by vips and which are not * externally visible. * * 6/7/09 * - from vips.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PRIVATE_H #define VIPS_PRIVATE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_SPARE (8) /* Private to iofuncs: the minimum number of scanlines we add above and below * the window as a margin for slop. */ #define VIPS__WINDOW_MARGIN_PIXELS (128) /* Private to iofuncs: add at least this many bytes above and below the window. * There's no point mapping just a few KB of a small image. */ #define VIPS__WINDOW_MARGIN_BYTES (1024 * 1024 * 10) /* sizeof() a VIPS header on disc. */ #define VIPS_SIZEOF_HEADER (64) /* Startup plus ABI check. */ int vips__init( const char *argv0 ); size_t vips__get_sizeof_vipsobject( void ); /* What we track for each mmap window. Have a list of these on an openin * VipsImage. */ typedef struct { int ref_count; /* # of regions referencing us */ struct _VipsImage *im; /* VipsImage we are attached to */ int top; /* Area of image we have mapped, in pixels */ int height; VipsPel *data; /* First pixel of line 'top' */ void *baseaddr; /* Base of window */ size_t length; /* Size of window */ } VipsWindow; /* window manager. */ VipsWindow *vips_window_ref( struct _VipsImage *im, int top, int height ); int vips_window_unref( VipsWindow *window ); void vips_window_print( VipsWindow *window ); /* Per-thread buffer state. Held in a GPrivate. */ typedef struct { GHashTable *hash; /* VipsImage -> VipsBufferCache* */ GThread *thread; /* Just for sanity checking */ } VipsBufferThread; /* Per-image buffer cache. Hash to this from VipsBufferCache. * We can't store the GSList directly in the hash table, as GHashTable lacks an * update operation and we'd need to _remove() and _insert() on every list * operation. */ typedef struct _VipsBufferCache { GSList *buffers; /* GSList of VipsBuffer* */ GThread *thread; /* Just for sanity checking */ struct _VipsImage *im; VipsBufferThread *buffer_thread; GSList *reserve; /* VipsBuffer kept in reserve */ int n_reserve; /* Number in reserve */ } VipsBufferCache; /* What we track for each pixel buffer. These can move between caches and * between threads, but not between images. */ typedef struct _VipsBuffer { int ref_count; /* # of regions referencing us */ struct _VipsImage *im; /* VipsImage we are attached to */ VipsRect area; /* Area this pixel buffer covers */ gboolean done; /* Calculated and in cache */ VipsBufferCache *cache; /* The cache this buffer is published on */ VipsPel *buf; /* Private malloc() area */ size_t bsize; /* Size of private malloc() */ } VipsBuffer; void vips_buffer_dump_all( void ); void vips_buffer_done( VipsBuffer *buffer ); void vips_buffer_undone( VipsBuffer *buffer ); void vips_buffer_unref( VipsBuffer *buffer ); VipsBuffer *vips_buffer_new( struct _VipsImage *im, VipsRect *area ); VipsBuffer *vips_buffer_ref( struct _VipsImage *im, VipsRect *area ); VipsBuffer *vips_buffer_unref_ref( VipsBuffer *buffer, struct _VipsImage *im, VipsRect *area ); void vips_buffer_print( VipsBuffer *buffer ); /* Sections of region.h that are private to VIPS. */ /* Region types. */ typedef enum _RegionType { VIPS_REGION_NONE, VIPS_REGION_BUFFER, /* A VipsBuffer */ VIPS_REGION_OTHER_REGION, /* Memory on another region */ VIPS_REGION_OTHER_IMAGE, /* Memory on another image */ VIPS_REGION_WINDOW /* A VipsWindow on fd */ } RegionType; /* Private to iofuncs: the size of the `tiles' requested by * vips_image_generate() when acting as a data sink. */ #define VIPS__TILE_WIDTH (128) #define VIPS__TILE_HEIGHT (128) /* The height of the strips for the other two request styles. */ #define VIPS__THINSTRIP_HEIGHT (1) #define VIPS__FATSTRIP_HEIGHT (16) /* Functions on regions. */ struct _VipsRegion; void vips__region_take_ownership( struct _VipsRegion *reg ); void vips__region_check_ownership( struct _VipsRegion *reg ); void vips__region_no_ownership( struct _VipsRegion *reg ); typedef int (*VipsRegionFillFn)( struct _VipsRegion *, void * ); int vips_region_fill( struct _VipsRegion *reg, VipsRect *r, VipsRegionFillFn fn, void *a ); int vips__image_wio_output( struct _VipsImage *image ); int vips__image_pio_output( struct _VipsImage *image ); VipsArgumentInstance *vips__argument_get_instance( VipsArgumentClass *argument_class, VipsObject *object); VipsArgument *vips__argument_table_lookup( VipsArgumentTable *table, GParamSpec *pspec); void vips__demand_hint_array( struct _VipsImage *image, int hint, struct _VipsImage **in ); int vips__image_copy_fields_array( struct _VipsImage *out, struct _VipsImage *in[] ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PRIVATE_H*/ vips-7.38.5/libvips/include/vips/vips7compat.h0000644000175000017500000011556112303141142016221 00000000000000/* compat with the vips7 API * * 4/3/11 * - hacked up */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_VIPS7COMPAT_H #define VIPS_VIPS7COMPAT_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* Renamed types. */ #define IM_D93_X0 VIPS_D93_X0 #define IM_D93_Y0 VIPS_D93_Y0 #define IM_D93_Z0 VIPS_D93_Z0 #define IM_D75_X0 VIPS_D75_X0 #define IM_D75_Y0 VIPS_D75_Y0 #define IM_D75_Z0 VIPS_D75_Z0 #define IM_D65_X0 VIPS_D65_X0 #define IM_D65_Y0 VIPS_D65_Y0 #define IM_D65_Z0 VIPS_D65_Z0 #define IM_D55_X0 VIPS_D55_X0 #define IM_D55_Y0 VIPS_D55_Y0 #define IM_D55_Z0 VIPS_D55_Z0 #define IM_D50_X0 VIPS_D50_X0 #define IM_D50_Y0 VIPS_D50_Y0 #define IM_D50_Z0 VIPS_D50_Z0 #define IM_A_X0 VIPS_A_X0 #define IM_A_Y0 VIPS_A_Y0 #define IM_A_Z0 VIPS_A_Z0 #define IM_B_X0 VIPS_B_X0 #define IM_B_Y0 VIPS_B_Y0 #define IM_B_Z0 VIPS_B_Z0 #define IM_C_X0 VIPS_C_X0 #define IM_C_Y0 VIPS_C_Y0 #define IM_C_Z0 VIPS_C_Z0 #define IM_E_X0 VIPS_E_X0 #define IM_E_Y0 VIPS_E_Y0 #define IM_E_Z0 VIPS_E_Z0 #define IM_D3250_X0 VIPS_D3250_X0 #define IM_D3250_Y0 VIPS_D3250_Y0 #define IM_D3250_Z0 VIPS_D3250_Z0 #define im_col_Lab2XYZ vips_col_Lab2XYZ #define im_col_XYZ2Lab vips_col_XYZ2Lab #define im_col_ab2h vips_col_ab2h #define im_col_ab2Ch vips_col_ab2Ch #define im_col_Ch2ab vips_col_Ch2ab #define im_col_L2Lucs vips_col_L2Lcmc #define im_col_C2Cucs vips_col_C2Ccmc #define im_col_Ch2hucs vips_col_Ch2hcmc #define im_col_pythagoras vips_pythagoras #define im_col_make_tables_UCS vips_col_make_tables_CMC #define im_col_Lucs2L vips_col_Lcmc2L #define im_col_Cucs2C vips_col_Ccmc2C #define im_col_Chucs2h vips_col_Chcmc2h #define PEL VipsPel #define IM_BANDFMT_NOTSET VIPS_FORMAT_NOTSET #define IM_BANDFMT_UCHAR VIPS_FORMAT_UCHAR #define IM_BANDFMT_CHAR VIPS_FORMAT_CHAR #define IM_BANDFMT_USHORT VIPS_FORMAT_USHORT #define IM_BANDFMT_SHORT VIPS_FORMAT_SHORT #define IM_BANDFMT_UINT VIPS_FORMAT_UINT #define IM_BANDFMT_INT VIPS_FORMAT_INT #define IM_BANDFMT_FLOAT VIPS_FORMAT_FLOAT #define IM_BANDFMT_COMPLEX VIPS_FORMAT_COMPLEX #define IM_BANDFMT_DOUBLE VIPS_FORMAT_DOUBLE #define IM_BANDFMT_DPCOMPLEX VIPS_FORMAT_DPCOMPLEX #define IM_BANDFMT_LAST VIPS_FORMAT_LAST #define VipsBandFmt VipsBandFormat #define IM_SMALLTILE VIPS_DEMAND_STYLE_SMALLTILE #define IM_FATSTRIP VIPS_DEMAND_STYLE_FATSTRIP #define IM_THINSTRIP VIPS_DEMAND_STYLE_THINSTRIP #define IM_ANY VIPS_DEMAND_STYLE_ANY #define IM_CODING_NONE VIPS_CODING_NONE #define IM_CODING_LABQ VIPS_CODING_LABQ #define IM_CODING_RAD VIPS_CODING_RAD #define IM_TYPE_MULTIBAND VIPS_INTERPRETATION_MULTIBAND #define IM_TYPE_B_W VIPS_INTERPRETATION_B_W #define IM_TYPE_HISTOGRAM VIPS_INTERPRETATION_HISTOGRAM #define IM_TYPE_FOURIER VIPS_INTERPRETATION_FOURIER #define IM_TYPE_XYZ VIPS_INTERPRETATION_XYZ #define IM_TYPE_LAB VIPS_INTERPRETATION_LAB #define IM_TYPE_CMYK VIPS_INTERPRETATION_CMYK #define IM_TYPE_LABQ VIPS_INTERPRETATION_LABQ #define IM_TYPE_RGB VIPS_INTERPRETATION_RGB #define IM_TYPE_UCS VIPS_INTERPRETATION_CMC #define IM_TYPE_LCH VIPS_INTERPRETATION_LCH #define IM_TYPE_LABS VIPS_INTERPRETATION_LABS #define IM_TYPE_sRGB VIPS_INTERPRETATION_sRGB #define IM_TYPE_YXY VIPS_INTERPRETATION_YXY #define IM_TYPE_RGB16 VIPS_INTERPRETATION_RGB16 #define IM_TYPE_GREY16 VIPS_INTERPRETATION_GREY16 #define VipsType VipsInterpretation #define IMAGE VipsImage #define REGION VipsRegion #define IM_INTENT_PERCEPTUAL VIPS_INTENT_PERCEPTUAL #define IM_INTENT_RELATIVE_COLORIMETRIC VIPS_INTENT_RELATIVE #define IM_INTENT_SATURATION VIPS_INTENT_SATURATION #define IM_INTENT_ABSOLUTE_COLORIMETRIC VIPS_INTENT_ABSOLUTE /* Renamed macros. */ #define IM_MAX VIPS_MAX #define IM_MIN VIPS_MIN #define IM_RAD VIPS_RAD #define IM_DEG VIPS_DEG #define IM_PI VIPS_PI #define IM_RINT VIPS_RINT #define IM_ABS VIPS_ABS #define IM_NUMBER VIPS_NUMBER #define IM_CLIP VIPS_CLIP #define IM_CLIP_UCHAR VIPS_CLIP_UCHAR #define IM_CLIP_CHAR VIPS_CLIP_CHAR #define IM_CLIP_USHORT VIPS_CLIP_USHORT #define IM_CLIP_SHORT VIPS_CLIP_SHORT #define IM_CLIP_NONE VIPS_CLIP_NONE #define IM_UNROLL VIPS_UNROLL #define IM_SWAP VIPS_SWAP #define IM_IMAGE_ADDR VIPS_IMAGE_ADDR #define IM_IMAGE_N_ELEMENTS VIPS_IMAGE_N_ELEMENTS #define IM_IMAGE_SIZEOF_ELEMENT VIPS_IMAGE_SIZEOF_ELEMENT #define IM_IMAGE_SIZEOF_PEL VIPS_IMAGE_SIZEOF_PEL #define IM_IMAGE_SIZEOF_LINE VIPS_IMAGE_SIZEOF_LINE #define IM_REGION_LSKIP VIPS_REGION_LSKIP #define IM_REGION_ADDR VIPS_REGION_ADDR #define IM_REGION_ADDR_TOPLEFT VIPS_REGION_ADDR_TOPLEFT #define IM_REGION_N_ELEMENTS VIPS_REGION_N_ELEMENTS #define IM_REGION_SIZEOF_LINE VIPS_REGION_SIZEOF_LINE /* Renamed externs. */ #define im__sizeof_bandfmt vips__image_sizeof_bandformat /* Renamed functions. */ #define im_error vips_error #define im_verror vips_verror #define im_verror_system vips_verror_system #define im_error_system vips_error_system #define im_error_buffer vips_error_buffer #define im_error_clear vips_error_clear #define im_warn vips_warn #define im_vwarn vips_vwarn #define im_diag vips_info #define im_vdiag vips_vinfo #define error_exit vips_error_exit #define im_get_argv0 vips_get_argv0 #define im_version_string vips_version_string #define im_version vips_version #define im_get_option_group vips_get_option_group #define im_guess_prefix vips_guess_prefix #define im_guess_libdir vips_guess_libdir #define im__global_lock vips__global_lock int im_cp_desc(IMAGE *out, IMAGE *in ); int im_cp_descv (IMAGE * im, ...); #define im_cp_desc_array(I, A) vips__image_copy_fields_array(I, A) int im_demand_hint (IMAGE * im, VipsDemandStyle hint, ...); #define im_demand_hint_array( A, B, C ) (vips__demand_hint_array( A, B, C ), 0) #define im_image vips_image_new_from_memory #define im_binfile vips_image_new_from_file_raw #define im__open_temp vips_image_new_temp_file #define im__test_kill( I ) (vips_image_get_kill( I )) #define im__start_eval( I ) (vips_image_preeval( I ), vips_image_get_kill( I )) #define im__handle_eval( I, W, H ) \ (vips_image_eval( I, W, H ), vips_image_get_kill( I )) #define im__end_eval vips_image_posteval #define im_invalidate vips_image_invalidate_all #define im_isfile vips_image_isfile #define im_printdesc( I ) vips_object_print_dump( VIPS_OBJECT( I ) ) #define im_openout( F ) vips_image_new_mode( F, "w" ) #define im_setbuf( F ) vips_image_new( "t" ) #define im_initdesc( image, \ xsize, ysize, bands, bandbits, bandfmt, coding, \ type, xres, yres, xo, yo ) \ vips_image_init_fields( image, \ xsize, ysize, bands, bandfmt, coding, \ type, xres, yres ) #define im__open_image_file vips__open_image_read #define im_setupout vips_image_write_prepare #define im_writeline( Y, IM, P ) vips_image_write_line( IM, Y, P ) #define im_prepare vips_region_prepare #define im_prepare_to vips_region_prepare_to #define im_region_create vips_region_new #define im_region_free g_object_unref #define im_region_region vips_region_region #define im_region_buffer vips_region_buffer #define im_region_black vips_region_black #define im_region_paint vips_region_paint #define im_prepare_many vips_region_prepare_many #define im__region_no_ownership vips__region_no_ownership #define im_image_sanity( I ) (!vips_object_sanity( VIPS_OBJECT( I ) )) #define im_image_sanity_all vips_object_sanity_all #define im__print_all vips_object_print_all /* Compat functions. */ int im_init_world( const char *argv0 ); VipsImage *im_open( const char *filename, const char *mode ); VipsImage *im_open_local( VipsImage *parent, const char *filename, const char *mode ); int im_open_local_array( VipsImage *parent, VipsImage **images, int n, const char *filename, const char *mode ); #define im_callback_fn VipsCallbackFn int im_add_callback( VipsImage *im, const char *callback, im_callback_fn fn, void *a, void *b ); int im_add_callback1( VipsImage *im, const char *callback, im_callback_fn fn, void *a, void *b ); #define im_add_close_callback( IM, FN, A, B ) \ im_add_callback( IM, "close", FN, A, B ) #define im_add_postclose_callback( IM, FN, A, B ) \ im_add_callback( IM, "postclose", FN, A, B ) #define im_add_preclose_callback( IM, FN, A, B ) \ im_add_callback( IM, "preclose", FN, A, B ) #define im_add_evalstart_callback( IM, FN, A, B ) \ im_add_callback1( IM, "preeval", FN, A, B ) #define im_add_evalend_callback( IM, FN, A, B ) \ im_add_callback1( IM, "posteval", FN, A, B ) #define im_add_eval_callback( IM, FN, A, B ) \ (vips_image_set_progress( IM, TRUE ), \ im_add_callback1( IM, "eval", FN, A, B )) #define im_add_invalidate_callback( IM, FN, A, B ) \ im_add_callback( IM, "invalidate", FN, A, B ) #define im_bits_of_fmt( fmt ) (vips_format_sizeof( fmt ) << 3) typedef void *(*im_construct_fn)( void *, void *, void * ); void *im_local( VipsImage *im, im_construct_fn cons, im_callback_fn dest, void *a, void *b, void *c ); int im_local_array( VipsImage *im, void **out, int n, im_construct_fn cons, im_callback_fn dest, void *a, void *b, void *c ); int im_close( VipsImage *im ); VipsImage *im_init( const char *filename ); const char *im_Type2char( VipsInterpretation type ); const char *im_BandFmt2char( VipsBandFormat fmt ); const char *im_Coding2char( VipsCoding coding ); const char *im_Compression2char( int n ); const char *im_dtype2char( VipsImageType n ); const char *im_dhint2char( VipsDemandStyle style ); VipsInterpretation im_char2Type( const char *str ); VipsBandFormat im_char2BandFmt( const char *str ); VipsCoding im_char2Coding( const char *str ); VipsImageType im_char2dtype( const char *str ); VipsDemandStyle im_char2dhint( const char *str ); #define Rect VipsRect #define IM_RECT_RIGHT VIPS_RECT_RIGHT #define IM_RECT_BOTTOM VIPS_RECT_BOTTOM #define IM_RECT_HCENTRE VIPS_RECT_HCENTRE #define IM_RECT_VCENTRE VIPS_RECT_VCENTRE #define im_rect_marginadjust vips_rect_marginadjust #define im_rect_includespoint vips_rect_includespoint #define im_rect_includesrect vips_rect_includesrect #define im_rect_intersectrect vips_rect_intersectrect #define im_rect_isempty vips_rect_isempty #define im_rect_unionrect vips_rect_unionrect #define im_rect_equalsrect vips_rect_equalsrect #define im_rect_dup vips_rect_dup #define im_rect_normalise vips_rect_normalise #define im_start_one vips_start_one #define im_stop_one vips_stop_one #define im_start_many vips_start_many #define im_stop_many vips_stop_many #define im_allocate_input_array vips_allocate_input_array #define im_start_fn VipsStartFn typedef int (*im_generate_fn)( VipsRegion *out, void *seq, void *a, void *b ); #define im_stop_fn VipsStopFn int im_generate( VipsImage *im, im_start_fn start, im_generate_fn generate, im_stop_fn stop, void *a, void *b ); #define im__mmap vips__mmap #define im__munmap vips__munmap #define im_mapfile vips_mapfile #define im_mapfilerw vips_mapfilerw #define im_remapfilerw vips_remapfilerw #define im__print_renders vips__print_renders int im_cache( IMAGE *in, IMAGE *out, int width, int height, int max ); #define IM_FREEF( F, S ) \ G_STMT_START { \ if( S ) { \ (void) F( (S) ); \ (S) = 0; \ } \ } G_STMT_END /* Can't just use VIPS_FREEF(), we want the extra cast to void on the argument * to vips_free() to make sure we can work for "const char *" variables. */ #define IM_FREE( S ) \ G_STMT_START { \ if( S ) { \ (void) im_free( (void *) (S) ); \ (S) = 0; \ } \ } G_STMT_END #define IM_SETSTR( S, V ) \ G_STMT_START { \ const char *sst = (V); \ \ if( (S) != sst ) { \ if( !(S) || !sst || strcmp( (S), sst ) != 0 ) { \ IM_FREE( S ); \ if( sst ) \ (S) = im_strdup( NULL, sst ); \ } \ } \ } G_STMT_END #define im_malloc( IM, SZ ) \ (vips_malloc( VIPS_OBJECT( IM ), (SZ) )) #define im_free vips_free #define im_strdup( IM, STR ) \ (vips_strdup( VIPS_OBJECT( IM ), (STR) )) #define IM_NEW( IM, T ) ((T *) im_malloc( (IM), sizeof( T ))) #define IM_ARRAY( IM, N, T ) ((T *) im_malloc( (IM), (N) * sizeof( T ))) #define im_incheck vips_image_wio_input #define im_outcheck( I ) (0) #define im_rwcheck vips_image_inplace #define im_pincheck vips_image_pio_input #define im_poutcheck( I ) (0) #define im_iocheck( I, O ) im_incheck( I ) #define im_piocheck( I, O ) im_pincheck( I ) #define im_check_uncoded vips_check_uncoded #define im_check_coding_known vips_check_coding_known #define im_check_coding_labq vips_check_coding_labq #define im_check_coding_rad vips_check_coding_rad #define im_check_coding_noneorlabq vips_check_coding_noneorlabq #define im_check_coding_same vips_check_coding_same #define im_check_mono vips_check_mono #define im_check_bands_1or3 vips_check_bands_1or3 #define im_check_bands vips_check_bands #define im_check_bands_1orn vips_check_bands_1orn #define im_check_bands_1orn_unary vips_check_bands_1orn_unary #define im_check_bands_same vips_check_bands_same #define im_check_bandno vips_check_bandno #define im_check_int vips_check_int #define im_check_uint vips_check_uint #define im_check_uintorf vips_check_uintorf #define im_check_noncomplex vips_check_noncomplex #define im_check_complex vips_check_complex #define im_check_format vips_check_format #define im_check_u8or16 vips_check_u8or16 #define im_check_8or16 vips_check_8or16 #define im_check_u8or16orf vips_check_u8or16orf #define im_check_format_same vips_check_format_same #define im_check_size_same vips_check_size_same #define im_check_vector vips_check_vector #define im_check_hist vips_check_hist #define im_check_imask vips_check_imask #define im_check_dmask vips_check_dmask #define vips_bandfmt_isint vips_band_format_isint #define vips_bandfmt_isuint vips_band_format_isuint #define vips_bandfmt_isfloat vips_band_format_isfloat #define vips_bandfmt_iscomplex vips_band_format_iscomplex #define im__change_suffix vips__change_suffix int vips_check_coding_labq( const char *domain, VipsImage *im ); int vips_check_coding_rad( const char *domain, VipsImage *im ); int vips_check_bands_3ormore( const char *domain, VipsImage *im ); /* Buffer processing. */ typedef void (*im_wrapone_fn)( void *in, void *out, int width, void *a, void *b ); int im_wrapone( VipsImage *in, VipsImage *out, im_wrapone_fn fn, void *a, void *b ); typedef void (*im_wraptwo_fn)( void *in1, void *in2, void *out, int width, void *a, void *b ); int im_wraptwo( VipsImage *in1, VipsImage *in2, VipsImage *out, im_wraptwo_fn fn, void *a, void *b ); typedef void (*im_wrapmany_fn)( void **in, void *out, int width, void *a, void *b ); int im_wrapmany( VipsImage **in, VipsImage *out, im_wrapmany_fn fn, void *a, void *b ); #define IM_META_EXIF_NAME VIPS_META_EXIF_NAME #define IM_META_ICC_NAME VIPS_META_ICC_NAME #define IM_META_XML VIPS_META_XML #define IM_META_RESOLUTION_UNIT VIPS_META_RESOLUTION_UNIT #define IM_TYPE_SAVE_STRING VIPS_TYPE_SAVE_STRING #define IM_TYPE_BLOB VIPS_TYPE_BLOB #define IM_TYPE_AREA VIPS_TYPE_AREA #define IM_TYPE_REF_STRING VIPS_TYPE_REF_STRING #define im_header_map_fn VipsImageMapFn #define im_header_map vips_image_map #define im_header_int vips_image_get_int #define im_header_double vips_image_get_double #define im_header_string( IMAGE, FIELD, STRING ) \ vips_image_get_string( IMAGE, FIELD, (const char **) STRING ) #define im_header_as_string vips_image_get_as_string #define im_header_get_typeof vips_image_get_typeof #define im_header_get vips_image_get #define im_histlin vips_image_history_printf #define im_updatehist vips_image_history_args #define im_history_get vips_image_get_history #define im_save_string_get vips_value_get_save_string #define im_save_string_set vips_value_set_save_string #define im_save_string_setf vips_value_set_save_stringf #define im_ref_string_set vips_value_set_ref_string #define im_ref_string_get( V ) vips_value_get_ref_string( V, NULL ) size_t im_ref_string_get_length( const GValue *value ); #define im_blob_get vips_value_get_blob #define im_blob_set vips_value_set_blob #define im_meta_set( A, B, C ) (vips_image_set( A, B, C ), 0) #define im_meta_remove vips_image_remove #define im_meta_get vips_image_get #define im_meta_get_typeof vips_image_get_typeof #define im_meta_set_int( A, B, C ) (vips_image_set_int( A, B, C ), 0) #define im_meta_get_int vips_image_get_int #define im_meta_set_double( A, B, C ) (vips_image_set_double( A, B, C ), 0) #define im_meta_get_double vips_image_get_double #define im_meta_set_area( A, B, C, D ) (vips_image_set_area( A, B, C, D ), 0) #define im_meta_get_area vips_image_get_area #define im_meta_set_string( A, B, C ) (vips_image_set_string( A, B, C ), 0) #define im_meta_get_string vips_image_get_string #define im_meta_set_blob( A, B, C, D, E ) \ (vips_image_set_blob( A, B, C, D, E ), 0) #define im_meta_get_blob vips_image_get_blob #define im_semaphore_t VipsSemaphore #define im_semaphore_up vips_semaphore_up #define im_semaphore_down vips_semaphore_down #define im_semaphore_upn vips_semaphore_upn #define im_semaphore_downn vips_semaphore_downn #define im_semaphore_destroy vips_semaphore_destroy #define im_semaphore_init vips_semaphore_init #define im__open_image_read vips__open_image_read #define im_image_open_input vips_image_open_input #define im_image_open_output vips_image_open_output #define im__has_extension_block vips__has_extension_block #define im__read_extension_block vips__read_extension_block #define im__write_extension_block vips__write_extension_block #define im__writehist vips__writehist #define im__read_header_bytes vips__read_header_bytes #define im__write_header_bytes vips__write_header_bytes #define VSListMap2Fn VipsSListMap2Fn #define VSListMap4Fn VipsSListMap4Fn #define VSListFold2Fn VipsSListFold2Fn #define im_slist_equal vips_slist_equal #define im_slist_map2 vips_slist_map2 #define im_slist_map2_rev vips_slist_map2_rev #define im_slist_map4 vips_slist_map4 #define im_slist_fold2 vips_slist_fold2 #define im_slist_filter vips_slist_filter #define im_slist_free_all vips_slist_free_all #define im_map_equal vips_map_equal #define im_hash_table_map vips_hash_table_map #define im_strncpy vips_strncpy #define im_strrstr vips_strrstr #define im_ispostfix vips_ispostfix #define im_isprefix vips_isprefix #define im_break_token vips_break_token #define im_vsnprintf vips_vsnprintf #define im_snprintf vips_snprintf #define im_filename_split vips_filename_split #define im_skip_dir vips_skip_dir #define im_filename_suffix vips_filename_suffix #define im_filename_suffix_match vips_filename_suffix_match #define im_getnextoption vips_getnextoption #define im_getsuboption vips_getsuboption #define im_file_length vips_file_length #define im__write vips__write #define im__file_open_read vips__file_open_read #define im__file_open_write vips__file_open_write #define im__file_read vips__file_read #define im__file_read_name vips__file_read_name #define im__file_write vips__file_write #define im__get_bytes vips__get_bytes #define im__gvalue_ref_string_new vips__gvalue_ref_string_new #define im__gslist_gvalue_free vips__gslist_gvalue_free #define im__gslist_gvalue_copy vips__gslist_gvalue_copy #define im__gslist_gvalue_merge vips__gslist_gvalue_merge #define im__gslist_gvalue_get vips__gslist_gvalue_get #define im__seek vips__seek #define im__ftruncate vips__ftruncate #define im_existsf vips_existsf #define im_popenf vips_popenf #define im_ispoweroftwo vips_ispoweroftwo #define im_amiMSBfirst vips_amiMSBfirst #define im__temp_name vips__temp_name #define IM_VERSION_STRING VIPS_VERSION_STRING #define IM_MAJOR_VERSION VIPS_MAJOR_VERSION #define IM_MINOR_VERSION VIPS_MINOR_VERSION #define IM_MICRO_VERSION VIPS_MICRO_VERSION #define IM_EXEEXT VIPS_EXEEXT #define IM_SIZEOF_HEADER VIPS_SIZEOF_HEADER #define im_concurrency_set vips_concurrency_set #define im_concurrency_get vips_concurrency_get int im_init_world( const char *argv0 ); int im_add( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_subtract( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_multiply( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_divide( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_min( VipsImage *in, double *out ); int im_minpos( VipsImage *in, int *xpos, int *ypos, double *out ); int im_max( VipsImage *in, double *out ); int im_maxpos( VipsImage *in, int *xpos, int *ypos, double *out ); int im_avg( VipsImage *in, double *out ); int im_deviate( VipsImage *in, double *out ); int im_invert( VipsImage *in, VipsImage *out ); int im_lintra( double a, VipsImage *in, double b, VipsImage *out ); int im_lintra_vec( int n, double *a, VipsImage *in, double *b, VipsImage *out ); int im_abs( VipsImage *in, VipsImage *out ); int im_sign( VipsImage *in, VipsImage *out ); DOUBLEMASK *im_stats( VipsImage *in ); DOUBLEMASK *im_measure_area( VipsImage *im, int left, int top, int width, int height, int h, int v, int *sel, int nsel, const char *name ); int im_sintra( VipsImage *in, VipsImage *out ); int im_costra( VipsImage *in, VipsImage *out ); int im_tantra( VipsImage *in, VipsImage *out ); int im_asintra( VipsImage *in, VipsImage *out ); int im_acostra( VipsImage *in, VipsImage *out ); int im_atantra( VipsImage *in, VipsImage *out ); int im_logtra( VipsImage *in, VipsImage *out ); int im_log10tra( VipsImage *in, VipsImage *out ); int im_exptra( VipsImage *in, VipsImage *out ); int im_exp10tra( VipsImage *in, VipsImage *out ); int im_floor( VipsImage *in, VipsImage *out ); int im_rint( VipsImage *in, VipsImage *out ); int im_ceil( VipsImage *in, VipsImage *out ); int im_equal( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_notequal( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_less( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_lesseq( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_more( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_moreeq( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_andimage( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_orimage( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_eorimage( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_andimage_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_orimage_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_eorimage_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_andimageconst( VipsImage *in, VipsImage *out, double c ); int im_orimageconst( VipsImage *in, VipsImage *out, double c ); int im_eorimageconst( VipsImage *in, VipsImage *out, double c ); int im_shiftleft_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_shiftleft( VipsImage *in, VipsImage *out, int n ); int im_shiftright_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_shiftright( VipsImage *in, VipsImage *out, int n ); int im_remainder( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_remainder_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_remainderconst( VipsImage *in, VipsImage *out, double c ); int im_powtra( VipsImage *in, VipsImage *out, double e ); int im_powtra_vec( VipsImage *in, VipsImage *out, int n, double *e ); int im_expntra( VipsImage *in, VipsImage *out, double e ); int im_expntra_vec( VipsImage *in, VipsImage *out, int n, double *e ); int im_equal_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_notequal_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_less_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_lesseq_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_more_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_moreeq_vec( VipsImage *in, VipsImage *out, int n, double *c ); int im_equalconst( VipsImage *in, VipsImage *out, double c ); int im_notequalconst( VipsImage *in, VipsImage *out, double c ); int im_lessconst( VipsImage *in, VipsImage *out, double c ); int im_lesseqconst( VipsImage *in, VipsImage *out, double c ); int im_moreconst( VipsImage *in, VipsImage *out, double c ); int im_moreeqconst( VipsImage *in, VipsImage *out, double c ); int im_maxpos_vec( VipsImage *im, int *xpos, int *ypos, double *maxima, int n ); int im_minpos_vec( VipsImage *im, int *xpos, int *ypos, double *minima, int n ); int im_maxpos_avg( VipsImage *im, double *xpos, double *ypos, double *out ); int im_linreg( VipsImage **ins, VipsImage *out, double *xs ); int im_cross_phase( VipsImage *a, VipsImage *b, VipsImage *out ); int im_point( VipsImage *im, VipsInterpolate *interpolate, double x, double y, int band, double *out ); int im_point_bilinear( VipsImage *im, double x, double y, int band, double *out ); int im_copy( VipsImage *in, VipsImage *out ); int im_copy_set( VipsImage *in, VipsImage *out, VipsInterpretation interpretation, float xres, float yres, int xoffset, int yoffset ); int im_copy_set_meta( VipsImage *in, VipsImage *out, const char *field, GValue *value ); int im_copy_morph( VipsImage *in, VipsImage *out, int bands, VipsBandFormat format, VipsCoding coding ); int im_copy_swap( VipsImage *in, VipsImage *out ); int im_copy_file( VipsImage *in, VipsImage *out ); int im_copy_native( VipsImage *in, VipsImage *out, gboolean is_msb_first ); int im_embed( VipsImage *in, VipsImage *out, int type, int x, int y, int width, int height ); int im_fliphor( VipsImage *in, VipsImage *out ); int im_flipver( VipsImage *in, VipsImage *out ); int im_insert( VipsImage *main, VipsImage *sub, VipsImage *out, int x, int y ); int im_insert_noexpand( VipsImage *main, VipsImage *sub, VipsImage *out, int x, int y ); int im_lrjoin( VipsImage *left, VipsImage *right, VipsImage *out ); int im_tbjoin( VipsImage *top, VipsImage *bottom, VipsImage *out ); int im_extract_area( VipsImage *in, VipsImage *out, int left, int top, int width, int height ); int im_extract_band( VipsImage *in, VipsImage *out, int band ); int im_extract_bands( VipsImage *in, VipsImage *out, int band, int nbands ); int im_extract_areabands( VipsImage *in, VipsImage *out, int left, int top, int width, int height, int band, int nbands ); int im_replicate( VipsImage *in, VipsImage *out, int across, int down ); int im_wrap( VipsImage *in, VipsImage *out, int x, int y ); int im_rotquad( VipsImage *in, VipsImage *out ); int im_clip2fmt( VipsImage *in, VipsImage *out, VipsBandFormat fmt ); int im_bandjoin( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_gbandjoin( VipsImage **in, VipsImage *out, int n ); int im_rank_image( VipsImage **in, VipsImage *out, int n, int index ); int im_maxvalue( VipsImage **in, VipsImage *out, int n ); int im_grid( VipsImage *in, VipsImage *out, int tile_height, int across, int down ); int im_scale( VipsImage *in, VipsImage *out ); int im_scaleps( VipsImage *in, VipsImage *out ); int im_msb( VipsImage *in, VipsImage *out ); int im_msb_band( VipsImage *in, VipsImage *out, int band ); int im_zoom( VipsImage *in, VipsImage *out, int xfac, int yfac ); int im_subsample( VipsImage *in, VipsImage *out, int xshrink, int yshrink ); int im_gaussnoise( VipsImage *out, int x, int y, double mean, double sigma ); int im_text( VipsImage *out, const char *text, const char *font, int width, int alignment, int dpi ); int im_black( VipsImage *out, int x, int y, int bands ); int im_make_xy( VipsImage *out, const int xsize, const int ysize ); int im_zone( VipsImage *out, int size ); int im_fzone( VipsImage *out, int size ); int im_feye( VipsImage *out, const int xsize, const int ysize, const double factor ); int im_eye( VipsImage *out, const int xsize, const int ysize, const double factor ); int im_grey( VipsImage *out, const int xsize, const int ysize ); int im_fgrey( VipsImage *out, const int xsize, const int ysize ); int im_sines( VipsImage *out, int xsize, int ysize, double horfreq, double verfreq ); int im_buildlut( DOUBLEMASK *input, VipsImage *output ); int im_invertlut( DOUBLEMASK *input, VipsImage *output, int lut_size ); int im_identity( VipsImage *lut, int bands ); int im_identity_ushort( VipsImage *lut, int bands, int sz ); int im_tone_build_range( VipsImage *out, int in_max, int out_max, double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ); int im_tone_build( VipsImage *out, double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ); int im_system( VipsImage *im, const char *cmd, char **out ); VipsImage *im_system_image( VipsImage *im, const char *in_format, const char *out_format, const char *cmd_format, char **log ); int im_c2amph( VipsImage *in, VipsImage *out ); int im_c2rect( VipsImage *in, VipsImage *out ); int im_c2imag( VipsImage *in, VipsImage *out ); int im_c2real( VipsImage *in, VipsImage *out ); int im_ri2c( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_rot90( VipsImage *in, VipsImage *out ); int im_rot180( VipsImage *in, VipsImage *out ); int im_rot270( VipsImage *in, VipsImage *out ); int im_ifthenelse( VipsImage *c, VipsImage *a, VipsImage *b, VipsImage *out ); int im_blend( VipsImage *c, VipsImage *a, VipsImage *b, VipsImage *out ); DOUBLEMASK *im_vips2mask( VipsImage *in, const char *filename ); INTMASK *im_vips2imask( IMAGE *in, const char *filename ); int im_mask2vips( DOUBLEMASK *in, VipsImage *out ); int im_imask2vips( INTMASK *in, VipsImage *out ); int im_bandmean( VipsImage *in, VipsImage *out ); int im_recomb( VipsImage *in, VipsImage *out, DOUBLEMASK *recomb ); int im_argb2rgba( VipsImage *in, VipsImage *out ); int im_falsecolour( VipsImage *in, VipsImage *out ); int im_gammacorrect( VipsImage *in, VipsImage *out, double exponent ); int im_shrink( VipsImage *in, VipsImage *out, double xshrink, double yshrink ); int im_affinei( VipsImage *in, VipsImage *out, VipsInterpolate *interpolate, double a, double b, double c, double d, double dx, double dy, int ox, int oy, int ow, int oh ); int im_affinei_all( VipsImage *in, VipsImage *out, VipsInterpolate *interpolate, double a, double b, double c, double d, double dx, double dy ) ; int im_rightshift_size( VipsImage *in, VipsImage *out, int xshift, int yshift, int band_fmt ); int im_Lab2XYZ_temp( IMAGE *in, IMAGE *out, double X0, double Y0, double Z0 ); int im_Lab2XYZ( IMAGE *in, IMAGE *out ); int im_XYZ2Lab( VipsImage *in, VipsImage *out ); int im_XYZ2Lab_temp( VipsImage *in, VipsImage *out, double X0, double Y0, double Z0 ); int im_Lab2LCh( VipsImage *in, VipsImage *out ); int im_LCh2Lab( VipsImage *in, VipsImage *out ); int im_LCh2UCS( VipsImage *in, VipsImage *out ); int im_UCS2LCh( VipsImage *in, VipsImage *out ); int im_XYZ2Yxy( VipsImage *in, VipsImage *out ); int im_Yxy2XYZ( VipsImage *in, VipsImage *out ); int im_float2rad( VipsImage *in, VipsImage *out ); int im_rad2float( VipsImage *in, VipsImage *out ); int im_Lab2LabQ( VipsImage *in, VipsImage *out ); int im_LabQ2Lab( VipsImage *in, VipsImage *out ); int im_Lab2LabS( VipsImage *in, VipsImage *out ); int im_LabS2Lab( VipsImage *in, VipsImage *out ); int im_LabQ2LabS( VipsImage *in, VipsImage *out ); int im_LabS2LabQ( VipsImage *in, VipsImage *out ); int im_LabQ2sRGB( VipsImage *in, VipsImage *out ); int im_XYZ2sRGB( IMAGE *in, IMAGE *out ); int im_sRGB2XYZ( IMAGE *in, IMAGE *out ); struct im_col_display; #define im_col_displays(S) (NULL) #define im_LabQ2disp_build_table(A, B) (NULL) #define im_LabQ2disp_table(A, B, C) (im_LabQ2disp(A, B, C)) int im_Lab2disp( IMAGE *in, IMAGE *out, struct im_col_display *disp ); int im_disp2Lab( IMAGE *in, IMAGE *out, struct im_col_display *disp ); int im_dE_fromdisp( IMAGE *, IMAGE *, IMAGE *, struct im_col_display * ); int im_dECMC_fromdisp( IMAGE *, IMAGE *, IMAGE *, struct im_col_display * ); #define im_disp2XYZ(A, B, C) (im_sRGB2XYZ(A, B)) #define im_XYZ2disp(A, B, C) (im_XYZ2sRGB(A, B)) #define im_LabQ2disp(A, B, C) (im_LabQ2sRGB(A, B)) int im_icc_transform( VipsImage *in, VipsImage *out, const char *input_profile_filename, const char *output_profile_filename, VipsIntent intent ); #define im_icc_present vips_icc_present int im_icc_import( VipsImage *in, VipsImage *out, const char *input_profile_filename, VipsIntent intent ); int im_icc_import_embedded( VipsImage *in, VipsImage *out, VipsIntent intent ); int im_icc_export_depth( VipsImage *in, VipsImage *out, int depth, const char *output_profile_filename, VipsIntent intent ); int im_icc_ac2rc( VipsImage *in, VipsImage *out, const char *profile_filename ); int im_LabQ2XYZ( VipsImage *in, VipsImage *out ); int im_UCS2XYZ( VipsImage *in, VipsImage *out ); int im_UCS2Lab( VipsImage *in, VipsImage *out ); int im_Lab2UCS( VipsImage *in, VipsImage *out ); int im_XYZ2UCS( VipsImage *in, VipsImage *out ); int im_dE_fromLab( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_dECMC_fromLab( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_dE_fromXYZ( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_dE00_fromLab( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_lab_morph( VipsImage *in, VipsImage *out, DOUBLEMASK *mask, double L_offset, double L_scale, double a_scale, double b_scale ); #define im_col_dE00 vips_col_dE00 int im_quadratic( IMAGE *in, IMAGE *out, IMAGE *coeff ); int im_maplut( VipsImage *in, VipsImage *out, VipsImage *lut ); int im_hist( VipsImage *in, VipsImage *out, int bandno ); int im_histgr( VipsImage *in, VipsImage *out, int bandno ); int im_histcum( VipsImage *in, VipsImage *out ); int im_histnorm( VipsImage *in, VipsImage *out ); int im_histeq( VipsImage *in, VipsImage *out ); int im_heq( VipsImage *in, VipsImage *out, int bandno ); int im_histnD( VipsImage *in, VipsImage *out, int bins ); int im_hist_indexed( VipsImage *index, VipsImage *value, VipsImage *out ); int im_histplot( VipsImage *in, VipsImage *out ); int im_project( VipsImage *in, VipsImage *hout, VipsImage *vout ); int im_profile( IMAGE *in, IMAGE *out, int dir ); int im_hsp( VipsImage *in, VipsImage *ref, VipsImage *out ); int im_histspec( VipsImage *in, VipsImage *ref, VipsImage *out ); int im_lhisteq( VipsImage *in, VipsImage *out, int xwin, int ywin ); int im_stdif( VipsImage *in, VipsImage *out, double a, double m0, double b, double s0, int xwin, int ywin ); int im_mpercent( VipsImage *in, double percent, int *out ); int im_mpercent_hist( VipsImage *hist, double percent, int *out ); int im_ismonotonic( VipsImage *lut, int *out ); int im_tone_analyse( VipsImage *in, VipsImage *out, double Ps, double Pm, double Ph, double S, double M, double H ); int im_tone_map( VipsImage *in, VipsImage *out, VipsImage *lut ); /* Not really correct, but who uses these. */ #define im_lhisteq_raw im_lhisteq #define im_stdif_raw im_stdif /* ruby-vips uses this */ #define vips_class_map_concrete_all vips_class_map_all int im_dilate( VipsImage *in, VipsImage *out, INTMASK *mask ); int im_erode( VipsImage *in, VipsImage *out, INTMASK *mask ); int im_aconv( VipsImage *in, VipsImage *out, DOUBLEMASK *mask, int n_layers, int cluster ); int im_conv( VipsImage *in, VipsImage *out, INTMASK *mask ); int im_conv_f( VipsImage *in, VipsImage *out, DOUBLEMASK *mask ); int im_aconvsep( VipsImage *in, VipsImage *out, DOUBLEMASK *mask, int n_layers ); int im_convsep( VipsImage *in, VipsImage *out, INTMASK *mask ); int im_convsep_f( VipsImage *in, VipsImage *out, DOUBLEMASK *mask ); int im_compass( VipsImage *in, VipsImage *out, INTMASK *mask ); int im_gradient( VipsImage *in, VipsImage *out, INTMASK *mask ); int im_lindetect( VipsImage *in, VipsImage *out, INTMASK *mask ); int im_addgnoise( VipsImage *in, VipsImage *out, double sigma ); int im_contrast_surface_raw( IMAGE *in, IMAGE *out, int half_win_size, int spacing ); int im_contrast_surface( VipsImage *in, VipsImage *out, int half_win_size, int spacing ); int im_grad_x( VipsImage *in, VipsImage *out ); int im_grad_y( VipsImage *in, VipsImage *out ); int im_fastcor( VipsImage *in, VipsImage *ref, VipsImage *out ); int im_spcor( VipsImage *in, VipsImage *ref, VipsImage *out ); int im_gradcor( VipsImage *in, VipsImage *ref, VipsImage *out ); int im_sharpen( VipsImage *in, VipsImage *out, int mask_size, double x1, double y2, double y3, double m1, double m2 ); typedef enum { IM_MASK_IDEAL_HIGHPASS = 0, IM_MASK_IDEAL_LOWPASS = 1, IM_MASK_BUTTERWORTH_HIGHPASS = 2, IM_MASK_BUTTERWORTH_LOWPASS = 3, IM_MASK_GAUSS_HIGHPASS = 4, IM_MASK_GAUSS_LOWPASS = 5, IM_MASK_IDEAL_RINGPASS = 6, IM_MASK_IDEAL_RINGREJECT = 7, IM_MASK_BUTTERWORTH_RINGPASS = 8, IM_MASK_BUTTERWORTH_RINGREJECT = 9, IM_MASK_GAUSS_RINGPASS = 10, IM_MASK_GAUSS_RINGREJECT = 11, IM_MASK_IDEAL_BANDPASS = 12, IM_MASK_IDEAL_BANDREJECT = 13, IM_MASK_BUTTERWORTH_BANDPASS = 14, IM_MASK_BUTTERWORTH_BANDREJECT = 15, IM_MASK_GAUSS_BANDPASS = 16, IM_MASK_GAUSS_BANDREJECT = 17, IM_MASK_FRACTAL_FLT = 18 } ImMaskType; /* We had them in the VIPS namespace for a while before deprecating them. */ #define VIPS_MASK_IDEAL_HIGHPASS IM_MASK_IDEAL_HIGHPASS #define VIPS_MASK_IDEAL_LOWPASS IM_MASK_IDEAL_LOWPASS #define VIPS_MASK_BUTTERWORTH_HIGHPASS IM_MASK_BUTTERWORTH_HIGHPASS #define VIPS_MASK_BUTTERWORTH_LOWPASS IM_MASK_BUTTERWORTH_LOWPASS #define VIPS_MASK_GAUSS_HIGHPASS IM_MASK_GAUSS_HIGHPASS #define VIPS_MASK_GAUSS_LOWPASS IM_MASK_GAUSS_LOWPASS #define VIPS_MASK_IDEAL_RINGPASS IM_MASK_IDEAL_RINGPASS #define VIPS_MASK_IDEAL_RINGREJECT IM_MASK_IDEAL_RINGREJECT #define VIPS_MASK_BUTTERWORTH_RINGPASS IM_MASK_BUTTERWORTH_RINGPASS #define VIPS_MASK_BUTTERWORTH_RINGREJECT IM_MASK_BUTTERWORTH_RINGREJECT #define VIPS_MASK_GAUSS_RINGPASS IM_MASK_GAUSS_RINGPASS #define VIPS_MASK_GAUSS_RINGREJECT IM_MASK_GAUSS_RINGREJECT #define VIPS_MASK_IDEAL_BANDPASS IM_MASK_IDEAL_BANDPASS #define VIPS_MASK_IDEAL_BANDREJECT IM_MASK_IDEAL_BANDREJECT #define VIPS_MASK_BUTTERWORTH_BANDPASS IM_MASK_BUTTERWORTH_BANDPASS #define VIPS_MASK_BUTTERWORTH_BANDREJECT IM_MASK_BUTTERWORTH_BANDREJECT #define VIPS_MASK_GAUSS_BANDPASS IM_MASK_GAUSS_BANDPASS #define VIPS_MASK_GAUSS_BANDREJECT IM_MASK_GAUSS_BANDREJECT #define VIPS_MASK_FRACTAL_FLT IM_MASK_FRACTAL_FLT int im_flt_image_freq( VipsImage *in, VipsImage *out, ImMaskType flag, ... ); int im_create_fmask( VipsImage *out, int xsize, int ysize, ImMaskType flag, ... ); int im_fwfft( VipsImage *in, VipsImage *out ); int im_invfft( VipsImage *in, VipsImage *out ); int im_invfftr( VipsImage *in, VipsImage *out ); int im_freqflt( VipsImage *in, VipsImage *mask, VipsImage *out ); int im_disp_ps( VipsImage *in, VipsImage *out ); int im_fractsurf( VipsImage *out, int size, double frd ); int im_phasecor_fft( VipsImage *in1, VipsImage *in2, VipsImage *out ); int im_cntlines( VipsImage *im, double *nolines, int flag ); int im_rank( VipsImage *in, VipsImage *out, int width, int height, int index ); int im_zerox( VipsImage *in, VipsImage *out, int sign ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_VIPS7COMPAT_H*/ vips-7.38.5/libvips/include/vips/debug.h0000644000175000017500000000363712303140253015035 00000000000000/* Support for debug.c in iofuncs. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_DEBUG_H #define VIPS_DEBUG_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #ifdef VIPS_DEBUG #define VIPS_DEBUG_MSG( ... ) \ G_STMT_START { printf( __VA_ARGS__ ); } G_STMT_END #else #define VIPS_DEBUG_MSG( ... ) \ G_STMT_START { ; } G_STMT_END #endif /*VIPS_DEBUG*/ #ifdef VIPS_DEBUG_RED #define VIPS_DEBUG_MSG_RED( ... ) \ G_STMT_START { printf( "red: " __VA_ARGS__ ); } G_STMT_END #else #define VIPS_DEBUG_MSG_RED( ... ) \ G_STMT_START { ; } G_STMT_END #endif /*VIPS_DEBUG_RED*/ #ifdef VIPS_DEBUG_AMBER #define VIPS_DEBUG_MSG_AMBER( ... ) \ G_STMT_START { printf( "amber: " __VA_ARGS__ ); } G_STMT_END #else #define VIPS_DEBUG_MSG_AMBER( ... ) \ G_STMT_START { ; } G_STMT_END #endif /*VIPS_DEBUG_AMBER*/ #ifdef VIPS_DEBUG_GREEN #define VIPS_DEBUG_MSG_GREEN( ... ) \ G_STMT_START { printf( "green: " __VA_ARGS__ ); } G_STMT_END #else #define VIPS_DEBUG_MSG_GREEN( ... ) \ G_STMT_START { ; } G_STMT_END #endif /*VIPS_DEBUG_GREEN*/ #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /* VIPS_DEBUG_H */ vips-7.38.5/libvips/include/vips/memory.h0000644000175000017500000000437612303140253015260 00000000000000/* memory utilities * * J.Cupitt, 8/4/93 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_MEMORY_H #define VIPS_MEMORY_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_FREEF( F, S ) G_STMT_START { \ if( S ) { \ (void) F( (S) ); \ (S) = 0; \ } \ } G_STMT_END #define VIPS_FREE( S ) VIPS_FREEF( g_free, (S) ); #define VIPS_SETSTR( S, V ) \ G_STMT_START { \ const char *sst = (V); \ \ if( (S) != sst ) { \ if( !(S) || !sst || strcmp( (S), sst ) != 0 ) { \ VIPS_FREE( S ); \ if( sst ) \ (S) = g_strdup( sst ); \ } \ } \ } G_STMT_END #define VIPS_NEW( OBJ, T ) \ ((T *) vips_malloc( VIPS_OBJECT( OBJ ), sizeof( T ))) #define VIPS_ARRAY( OBJ, N, T ) \ ((T *) vips_malloc( VIPS_OBJECT( OBJ ), (N) * sizeof( T ))) void *vips_malloc( VipsObject *object, size_t size ); char *vips_strdup( VipsObject *object, const char *str ); int vips_free( void *buf ); void vips_tracked_free( void *s ); void *vips_tracked_malloc( size_t size ); size_t vips_tracked_get_mem( void ); size_t vips_tracked_get_mem_highwater( void ); int vips_tracked_get_allocs( void ); int vips_tracked_open( const char *pathname, int flags, ... ); int vips_tracked_close( int fd ); int vips_tracked_get_files( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_MEMORY_H*/ vips-7.38.5/libvips/include/vips/operation.h0000644000175000017500000000733712303141142015746 00000000000000/* base class for all vips operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_OPERATION_H #define VIPS_OPERATION_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include typedef enum /*< flags >*/ { VIPS_OPERATION_NONE = 0, VIPS_OPERATION_SEQUENTIAL = 1, VIPS_OPERATION_SEQUENTIAL_UNBUFFERED = 2, VIPS_OPERATION_NOCACHE = 4 } VipsOperationFlags; #define VIPS_TYPE_OPERATION (vips_operation_get_type()) #define VIPS_OPERATION( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_OPERATION, VipsOperation )) #define VIPS_OPERATION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_OPERATION, VipsOperationClass )) #define VIPS_IS_OPERATION( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_OPERATION )) #define VIPS_IS_OPERATION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_OPERATION )) #define VIPS_OPERATION_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_OPERATION, VipsOperationClass )) typedef gboolean (*VipsOperationBuildFn)( VipsObject * ); typedef struct _VipsOperation { VipsObject parent_instance; /* When we added this operation to cache .. used to find LRU for * flush. */ int time; /* Keep the hash here. */ guint hash; gboolean found_hash; /* Pixels calculated ... handy for measuring over-calculation. */ int pixels; } VipsOperation; typedef struct _VipsOperationClass { VipsObjectClass parent_class; /* Print the usage message. */ void (*usage)( struct _VipsOperationClass *, VipsBuf * ); /* Return a set of operation flags. */ VipsOperationFlags (*get_flags)( VipsOperation * ); VipsOperationFlags flags; } VipsOperationClass; GType vips_operation_get_type( void ); VipsOperationFlags vips_operation_get_flags( VipsOperation *operation ); void vips_operation_class_print_usage( VipsOperationClass *operation_class ); int vips_operation_call_valist( VipsOperation *operation, va_list ap ); VipsOperation *vips_operation_new( const char *name ); int vips_call( const char *operation_name, ... ) __attribute__((sentinel)); int vips_call_split( const char *operation_name, va_list optional, ... ); void vips_call_options( GOptionGroup *group, VipsOperation *operation ); int vips_call_argv( VipsOperation *operation, int argc, char **argv ); void vips_cache_drop_all( void ); int vips_cache_operation_buildp( VipsOperation **operation ); VipsOperation *vips_cache_operation_build( VipsOperation *operation ); void vips_cache_print( void ); void vips_cache_set_max( int max ); void vips_cache_set_max_mem( size_t max_mem ); int vips_cache_get_max( void ); int vips_cache_get_size( void ); size_t vips_cache_get_max_mem( void ); int vips_cache_get_max_files( void ); void vips_cache_set_max_files( int max_files ); void vips_cache_set_dump( gboolean dump ); void vips_cache_set_trace( gboolean trace ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_OPERATION_H*/ vips-7.38.5/libvips/include/vips/version.h.in0000644000175000017500000000073712303140253016037 00000000000000/* Macros for the header version. */ #ifndef VIPS_VERSION_H #define VIPS_VERSION_H #define VIPS_VERSION "@VIPS_VERSION@" #define VIPS_VERSION_STRING "@VIPS_VERSION_STRING@" #define VIPS_MAJOR_VERSION (@VIPS_MAJOR_VERSION@) #define VIPS_MINOR_VERSION (@VIPS_MINOR_VERSION@) #define VIPS_MICRO_VERSION (@VIPS_MICRO_VERSION@) /* Not really anything to do with versions, but this is a handy place to put * it. */ #define VIPS_EXEEXT "@VIPS_EXEEXT@" #endif /*VIPS_VERSION_H*/ vips-7.38.5/libvips/include/vips/basic.h0000644000175000017500000000312212303140253015015 00000000000000/* A few basic types needed everywhere. * * 27/10/11 * - from type.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_BASIC_H #define VIPS_BASIC_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /** * VipsPel: * * A picture element. Cast this to whatever the associated VipsBandFormat says * to get the value. */ typedef unsigned char VipsPel; /* Also used for eg. vips_local() and friends. */ typedef int (*VipsCallbackFn)( void *a, void *b ); /* Like GFunc, but return a value. */ typedef void *(*VipsSListMap2Fn)( void *, void *, void * ); typedef void *(*VipsSListMap4Fn)( void *, void *, void *, void *, void * ); typedef void *(*VipsSListFold2Fn)( void *, void *, void *, void * ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_BASIC_H*/ vips-7.38.5/libvips/include/vips/image.h0000644000175000017500000003342412303141142015024 00000000000000/* VIPS image class. * * 7/7/09 * - from vips.h * 2/3/11 * - move to GObject */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_IMAGE_H #define VIPS_IMAGE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* If you read MSB first, you get these two values. * intel order: byte 0 = b6 * SPARC order: byte 0 = 08 */ #define VIPS_MAGIC_INTEL (0xb6a6f208U) #define VIPS_MAGIC_SPARC (0x08f2a6b6U) typedef enum { VIPS_DEMAND_STYLE_ERROR = -1, VIPS_DEMAND_STYLE_SMALLTILE, VIPS_DEMAND_STYLE_FATSTRIP, VIPS_DEMAND_STYLE_THINSTRIP, VIPS_DEMAND_STYLE_ANY } VipsDemandStyle; /* Types of image descriptor we may have. The type field is advisory only: it * does not imply that any fields in IMAGE have valid data. */ typedef enum { VIPS_IMAGE_ERROR = -1, VIPS_IMAGE_NONE, /* no type set */ VIPS_IMAGE_SETBUF, /* malloced memory array */ VIPS_IMAGE_SETBUF_FOREIGN, /* memory array, don't free on close */ VIPS_IMAGE_OPENIN, /* input from fd with a window */ VIPS_IMAGE_MMAPIN, /* memory mapped input file */ VIPS_IMAGE_MMAPINRW, /* memory mapped read/write file */ VIPS_IMAGE_OPENOUT, /* output to fd */ VIPS_IMAGE_PARTIAL /* partial image */ } VipsImageType; typedef enum { VIPS_INTERPRETATION_ERROR = -1, VIPS_INTERPRETATION_MULTIBAND = 0, VIPS_INTERPRETATION_B_W = 1, VIPS_INTERPRETATION_HISTOGRAM = 10, VIPS_INTERPRETATION_XYZ = 12, VIPS_INTERPRETATION_LAB = 13, VIPS_INTERPRETATION_CMYK = 15, VIPS_INTERPRETATION_LABQ = 16, VIPS_INTERPRETATION_RGB = 17, VIPS_INTERPRETATION_CMC = 18, VIPS_INTERPRETATION_LCH = 19, VIPS_INTERPRETATION_LABS = 21, VIPS_INTERPRETATION_sRGB = 22, VIPS_INTERPRETATION_YXY = 23, VIPS_INTERPRETATION_FOURIER = 24, VIPS_INTERPRETATION_RGB16 = 25, VIPS_INTERPRETATION_GREY16 = 26, VIPS_INTERPRETATION_MATRIX = 27, VIPS_INTERPRETATION_scRGB = 28 } VipsInterpretation; typedef enum { VIPS_FORMAT_NOTSET = -1, VIPS_FORMAT_UCHAR = 0, VIPS_FORMAT_CHAR = 1, VIPS_FORMAT_USHORT = 2, VIPS_FORMAT_SHORT = 3, VIPS_FORMAT_UINT = 4, VIPS_FORMAT_INT = 5, VIPS_FORMAT_FLOAT = 6, VIPS_FORMAT_COMPLEX = 7, VIPS_FORMAT_DOUBLE = 8, VIPS_FORMAT_DPCOMPLEX = 9, VIPS_FORMAT_LAST = 10 } VipsBandFormat; typedef enum { VIPS_CODING_ERROR = -1, VIPS_CODING_NONE = 0, VIPS_CODING_LABQ = 2, VIPS_CODING_RAD = 6, VIPS_CODING_LAST = 7 } VipsCoding; typedef enum { VIPS_ACCESS_RANDOM, VIPS_ACCESS_SEQUENTIAL, VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, VIPS_ACCESS_LAST } VipsAccess; /* Struct we keep a record of execution time in. Passed to eval signal so * it can assess progress. */ typedef struct _VipsProgress { /*< private >*/ struct _VipsImage *im; /* Image we are part of */ /*< public >*/ int run; /* Time we have been running */ int eta; /* Estimated seconds of computation left */ gint64 tpels; /* Number of pels we expect to calculate */ gint64 npels; /* Number of pels calculated so far */ int percent; /* Percent complete */ GTimer *start; /* Start time */ } VipsProgress; #define VIPS_TYPE_IMAGE (vips_image_get_type()) #define VIPS_IMAGE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_IMAGE, VipsImage )) #define VIPS_IMAGE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_IMAGE, VipsImageClass)) #define VIPS_IS_IMAGE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_IMAGE )) #define VIPS_IS_IMAGE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_IMAGE )) #define VIPS_IMAGE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_IMAGE, VipsImageClass )) typedef struct _VipsImage { VipsObject parent_object; /*< private >*/ /* We have to keep these names for compatibility with the old API. * Don't use them though, use vips_image_get_width() and friends. */ int Xsize; /* image width, in pixels */ int Ysize; /* image height, in pixels */ int Bands; /* number of image bands */ VipsBandFormat BandFmt; /* pixel format */ VipsCoding Coding; /* pixel coding */ VipsInterpretation Type;/* pixel interpretation */ double Xres; /* horizontal pixels per millimetre */ double Yres; /* vertical pixels per millimetre */ int Xoffset; /* image origin hint */ int Yoffset; /* image origin hint */ /* No longer used, the names are here for compat with very, very old * code. */ int Length; short Compression; short Level; int Bbits; /* was number of bits in this format */ /* Old code expects to see this member, newer code has a param on * eval(). */ VipsProgress *time; /* Derived fields that some code can fiddle with. New code should use * vips_image_get_history() and friends. */ char *Hist; /* don't use, see vips_image_get_history() */ char *filename; /* pointer to copy of filename */ VipsPel *data; /* start of image data for WIO */ int kill; /* set to non-zero to block eval */ /* Everything below this private and only used internally by * VipsImage. */ /* During vips image read and write we need temporary float-sized * fields in the struct for staging xres/yres. Don't use these any * other time. */ float Xres_float; float Yres_float; char *mode; /* mode string passed to _new() */ VipsImageType dtype; /* descriptor type */ int fd; /* file descriptor */ void *baseaddr; /* pointer to the start of an mmap file */ size_t length; /* size of mmap area */ guint32 magic; /* magic from header, endian-ness of image */ /* Partial image stuff. All these fields are initialised * to NULL and ignored unless set by vips_image_generate() etc. */ void *(*start_fn)(); /* user-supplied start function */ int (*generate_fn)(); /* user-supplied generate function */ int (*stop_fn)(); /* user-supplied stop function */ void *client1; /* user arguments */ void *client2; GMutex *sslock; /* start-stop lock */ GSList *regions; /* list of regions current for this image */ VipsDemandStyle dhint; /* demand style hint */ /* Extra user-defined fields ... see vips_image_get() etc. */ GHashTable *meta; /* GhashTable of GValue */ GSList *meta_traverse; /* traverse order for Meta */ /* Part of mmap() read ... the sizeof() the header we skip from the * file start. Usually VIPS_SIZEOF_HEADER, but can be something else * for binary file read. * * guint64 so that we can guarantee to work even on systems with * strange ideas about large files. */ gint64 sizeof_header; /* If this is a large disc image, don't map the whole thing, instead * have a set of windows shared between the regions active on the * image. List of VipsWindow. */ GSList *windows; /* Upstream/downstream relationships, built from args to * vips_demand_hint(). * * We use these to invalidate downstream pixel buffers. * Use 'serial' to spot circular dependencies. * * See also hint_set below. */ GSList *upstream; GSList *downstream; int serial; /* Keep a list of recounted GValue strings so we can share hist * efficiently. */ GSList *history_list; /* The VipsImage (if any) we should signal eval progress on. */ struct _VipsImage *progress_signal; /* Record the file length here. We use this to stop ourselves mapping * things beyond the end of the file in the case that the file has * been truncated. * * gint64 so that we can guarantee to work even on systems with * strange ideas about large files. */ gint64 file_length; /* Set this when vips_demand_hint_array() is called, and check in any * operation that will demand pixels from the image. * * We use vips_demand_hint_array() to build the tree of * upstream/downstream relationships, so it's a mandatory thing. */ gboolean hint_set; /* Delete-on-close is hard to do with signals and callbacks since we * really need to do this in finalize after the fd has been closed, * but you can't emit signals then. * * Also keep a private copy of the filename string to be deleted, * since image->filename will be freed in _dispose(). */ gboolean delete_on_close; char *delete_on_close_filename; } VipsImage; typedef struct _VipsImageClass { VipsObjectClass parent_class; /* Signals we emit. */ /* Evaluation is starting. */ void (*preeval)( VipsImage *image, VipsProgress *progress ); /* Evaluation progress. */ void (*eval)( VipsImage *image, VipsProgress *progress ); /* Evaluation is ending. */ void (*posteval)( VipsImage *image, VipsProgress *progress ); /* An image has been written to. * Used by eg. vips_image_new_mode("x.jpg", "w") to do the * final write to jpeg. * Set *result to non-zero to indicate an error on write. */ void (*written)( VipsImage *image, int *result ); /* An image has been modified in some way and all caches * need dropping. */ void (*invalidate)( VipsImage *image ); /* Minimise this pipeline. * * This is triggered (sometimes) at the end of eval to signal that * we're probably done and that operations involved should try to * minimise memory use by, for example, dropping caches. * * See vips_tilecache(). */ void (*minimise)( VipsImage *image ); } VipsImageClass; GType vips_image_get_type( void ); /* Has to be guint64 and not size_t/off_t since we have to be able to address * huge images on platforms with 32-bit files. */ extern const guint64 vips__image_sizeof_bandformat[]; /* Pixel address calculation macros. */ #define VIPS_IMAGE_SIZEOF_ELEMENT( I ) \ (vips__image_sizeof_bandformat[(I)->BandFmt]) #define VIPS_IMAGE_SIZEOF_PEL( I ) \ (VIPS_IMAGE_SIZEOF_ELEMENT( I ) * (I)->Bands) #define VIPS_IMAGE_SIZEOF_LINE( I ) \ (VIPS_IMAGE_SIZEOF_PEL( I ) * (I)->Xsize) #define VIPS_IMAGE_SIZEOF_IMAGE( I ) \ (VIPS_IMAGE_SIZEOF_LINE( I ) * (I)->Ysize) #define VIPS_IMAGE_N_ELEMENTS( I ) \ ((I)->Bands * (I)->Xsize) #define VIPS_IMAGE_N_PELS( I ) \ ((guint64) (I)->Xsize * (I)->Ysize) /* If VIPS_DEBUG is defined, add bounds checking. */ #ifdef VIPS_DEBUG #define VIPS_IMAGE_ADDR( I, X, Y ) \ ( ((X) >= 0 && (X) < VIPS_IMAGE( I )->Xsize && \ (Y) >= 0 && (Y) < VIPS_IMAGE( I )->Ysize && \ VIPS_IMAGE( I )->data) ? \ (VIPS_IMAGE( I )->data + \ (Y) * VIPS_IMAGE_SIZEOF_LINE( I ) + \ (X) * VIPS_IMAGE_SIZEOF_PEL( I )) : \ (fprintf( stderr, \ "VIPS_IMAGE_ADDR: point out of bounds, " \ "file \"%s\", line %d\n" \ "(point x=%d, y=%d\n" \ " should have been within VipsRect left=%d, top=%d, " \ "width=%d, height=%d)\n", \ __FILE__, __LINE__, \ (X), (Y), \ 0, 0, \ VIPS_IMAGE( I )->Xsize, \ VIPS_IMAGE( I )->Ysize ), (VipsPel *) NULL) \ ) #else /*!VIPS_DEBUG*/ #define VIPS_IMAGE_ADDR( I, X, Y ) \ ((I)->data + \ (Y) * VIPS_IMAGE_SIZEOF_LINE( I ) + \ (X) * VIPS_IMAGE_SIZEOF_PEL( I )) #endif /*VIPS_DEBUG*/ #ifdef VIPS_DEBUG #define VIPS_MATRIX( I, X, Y ) \ ((VIPS_IMAGE( I )->BandFmt == VIPS_FORMAT_DOUBLE && \ VIPS_IMAGE( I )->Bands == 1) ? \ ((double *) VIPS_IMAGE_ADDR( I, X, Y )) : \ (fprintf( stderr, "VIPS_MATRIX: not a matrix image\n" ), \ (double *) NULL)) #else /*!VIPS_DEBUG*/ #define VIPS_MATRIX( I, X, Y ) \ ((double *) VIPS_IMAGE_ADDR( I, X, Y )) #endif /*VIPS_DEBUG*/ int vips_image_written( VipsImage *image ); void vips_image_invalidate_all( VipsImage *image ); void vips_image_minimise_all( VipsImage *image ); void vips_image_preeval( VipsImage *image ); void vips_image_eval( VipsImage *image, guint64 processed ); void vips_image_posteval( VipsImage *image ); void vips_image_set_progress( VipsImage *image, gboolean progress ); gboolean vips_image_iskilled( VipsImage *image ); void vips_image_set_kill( VipsImage *image, gboolean kill ); VipsImage *vips_image_new( void ); VipsImage *vips_image_new_mode( const char *filename, const char *mode ); VipsImage *vips_image_new_buffer( void ); VipsImage *vips_image_new_from_file( const char *filename ); VipsImage *vips_image_new_from_file_raw( const char *filename, int xsize, int ysize, int bands, guint64 offset ); VipsImage *vips_image_new_from_memory( void *buffer, int xsize, int ysize, int bands, VipsBandFormat bandfmt ); VipsImage *vips_image_new_matrix( int width, int height ); VipsImage *vips_image_new_matrixv( int width, int height, ... ); void vips_image_set_delete_on_close( VipsImage *image, gboolean delete_on_close ); VipsImage *vips_image_new_temp_file( const char *format ); int vips_image_write( VipsImage *image, VipsImage *out ); int vips_image_write_to_file( VipsImage *image, const char *filename ); gboolean vips_image_isMSBfirst( VipsImage *image ); gboolean vips_image_isfile( VipsImage *image ); gboolean vips_image_ispartial( VipsImage *image ); int vips_image_wio_input( VipsImage *image ); int vips_image_pio_input( VipsImage *image ); int vips_image_inplace( VipsImage *image ); int vips_image_write_prepare( VipsImage *image ); int vips_image_write_line( VipsImage *image, int ypos, VipsPel *linebuffer ); gboolean vips_band_format_isint( VipsBandFormat format ); gboolean vips_band_format_isuint( VipsBandFormat format ); gboolean vips_band_format_is8bit( VipsBandFormat format ); gboolean vips_band_format_isfloat( VipsBandFormat format ); gboolean vips_band_format_iscomplex( VipsBandFormat format ); int vips_system( const char *cmd_format, ... ) __attribute__((sentinel)); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_IMAGE_H*/ vips-7.38.5/libvips/include/vips/error.h0000644000175000017500000001033112303140253015065 00000000000000/* Error handling. */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_ERROR_H #define VIPS_ERROR_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ const char *vips_error_buffer( void ); void vips_error_clear( void ); void vips_error_freeze( void ); void vips_error_thaw( void ); void vips_error( const char *domain, const char *fmt, ... ) __attribute__((format(printf, 2, 3))); void vips_verror( const char *domain, const char *fmt, va_list ap ); void vips_error_system( int err, const char *domain, const char *fmt, ... ) __attribute__((format(printf, 3, 4))); void vips_verror_system( int err, const char *domain, const char *fmt, va_list ap ); void vips_error_g( GError **error ); void vips_warn( const char *domain, const char *fmt, ... ) __attribute__((format(printf, 2, 3))); void vips_vwarn( const char *domain, const char *fmt, va_list ap ); void vips_info( const char *domain, const char *fmt, ... ) __attribute__((format(printf, 2, 3))); void vips_vinfo( const char *domain, const char *fmt, va_list ap ); void vips_error_exit( const char *fmt, ... ) __attribute__((noreturn, format(printf, 1, 2))); int vips_check_uncoded( const char *domain, VipsImage *im ); int vips_check_coding( const char *domain, VipsImage *im, VipsCoding coding ); int vips_check_coding_known( const char *domain, VipsImage *im ); int vips_check_coding_noneorlabq( const char *domain, VipsImage *im ); int vips_check_coding_same( const char *domain, VipsImage *im1, VipsImage *im2 ); int vips_check_mono( const char *domain, VipsImage *im ); int vips_check_bands( const char *domain, VipsImage *im, int bands ); int vips_check_bands_1or3( const char *domain, VipsImage *in ); int vips_check_bands_atleast( const char *domain, VipsImage *im, int bands ); int vips_check_bands_1orn( const char *domain, VipsImage *im1, VipsImage *im2 ); int vips_check_bands_1orn_unary( const char *domain, VipsImage *im, int n ); int vips_check_bands_same( const char *domain, VipsImage *im1, VipsImage *im2 ); int vips_check_bandno( const char *domain, VipsImage *im, int bandno ); int vips_check_int( const char *domain, VipsImage *im ); int vips_check_uint( const char *domain, VipsImage *im ); int vips_check_uintorf( const char *domain, VipsImage *im ); int vips_check_noncomplex( const char *domain, VipsImage *im ); int vips_check_complex( const char *domain, VipsImage *im ); int vips_check_format( const char *domain, VipsImage *im, VipsBandFormat fmt ); int vips_check_u8or16( const char *domain, VipsImage *im ); int vips_check_8or16( const char *domain, VipsImage *im ); int vips_check_u8or16orf( const char *domain, VipsImage *im ); int vips_check_format_same( const char *domain, VipsImage *im1, VipsImage *im2 ); int vips_check_size_same( const char *domain, VipsImage *im1, VipsImage *im2 ); int vips_check_oddsquare( const char *domain, VipsImage *im ); int vips_check_vector_length( const char *domain, int n, int len ); int vips_check_vector( const char *domain, int n, VipsImage *im ); int vips_check_hist( const char *domain, VipsImage *im ); int vips_check_matrix( const char *domain, VipsImage *im, VipsImage **out ); int vips_check_separable( const char *domain, VipsImage *im ); int vips_check_imask( const char *domain, INTMASK *mask ); int vips_check_dmask( const char *domain, DOUBLEMASK *mask ); int vips_check_dmask_1d( const char *domain, DOUBLEMASK *mask ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_ERROR_H*/ vips-7.38.5/libvips/include/vips/internal.h0000644000175000017500000002323612303141142015556 00000000000000/* Declarations only used internally to vips. See private.h for declarations * which are not public, but which have to be publically visible. * * 11/9/06 * - cut from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_INTERNAL_H #define VIPS_INTERNAL_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* What we store in the Meta hash table. We can't just use GHashTable's * key/value pairs, since we need to iterate over meta in Meta_traverse order. * * We don't refcount at this level ... large meta values are refcounted by * their GValue implementation, see eg. MetaArea. */ typedef struct _VipsMeta { VipsImage *im; char *field; /* strdup() of field name */ GValue value; /* copy of value */ } VipsMeta; void vips__meta_init_types( void ); void vips__meta_destroy( VipsImage *im ); int vips__meta_cp( VipsImage *, const VipsImage * ); /* Default tile geometry. */ extern int vips__tile_width; extern int vips__tile_height; extern int vips__fatstrip_height; extern int vips__thinstrip_height; /* Default n threads. */ extern int vips__concurrency; /* abort() on any error. */ extern int vips__fatal; /* Enable leak check. */ extern int vips__leak; /* Give progress feedback. */ extern int vips__progress; /* Leak check on exit. */ extern int vips__leak; /* Show info messages. Handy for debugging. */ extern int vips__info; /* A string giving the image size (in bytes of uncompressed image) above which * we decompress to disc on open. */ extern char *vips__disc_threshold; /* Cache size settings. */ extern char *vips__cache_max; extern char *vips__cache_max_mem; extern char *vips__cache_max_files; extern gboolean vips__cache_dump; extern gboolean vips__cache_trace; void vips__cache_init( void ); void vips__type_leak( void ); typedef int (*im__fftproc_fn)( VipsImage *, VipsImage *, VipsImage * ); int im__fftproc( IMAGE *dummy, IMAGE *in, IMAGE *out, im__fftproc_fn fn ); /* iofuncs */ int vips__open_image_read( const char *filename ); int vips__open_image_write( const char *filename, gboolean temp ); int vips_image_open_input( VipsImage *image ); int vips_image_open_output( VipsImage *image ); void vips__link_break_all( VipsImage *im ); void *vips__link_map( VipsImage *image, gboolean upstream, VipsSListMap2Fn fn, void *a, void *b ); char *vips__b64_encode( const unsigned char *data, size_t data_length ); unsigned char *vips__b64_decode( const char *buffer, size_t *data_length ); void *vips__mmap( int fd, int writeable, size_t length, gint64 offset ); int vips__munmap( void *start, size_t length ); int vips_mapfile( VipsImage * ); int vips_mapfilerw( VipsImage * ); int vips_remapfilerw( VipsImage * ); void vips__buffer_init( void ); void vips__buffer_shutdown( void ); void vips__copy_4byte( int swap, unsigned char *to, unsigned char *from ); void vips__copy_2byte( gboolean swap, unsigned char *to, unsigned char *from ); guint32 vips__file_magic( const char *filename ); int vips__has_extension_block( VipsImage *im ); void *vips__read_extension_block( VipsImage *im, int *size ); int vips__write_extension_block( VipsImage *im, void *buf, int size ); int vips__writehist( VipsImage *image ); int vips__read_header_bytes( VipsImage *im, unsigned char *from ); int vips__write_header_bytes( VipsImage *im, unsigned char *to ); extern GMutex *vips__global_lock; int vips__formatalike_vec( VipsImage **in, VipsImage **out, int n ); int vips__sizealike_vec( VipsImage **in, VipsImage **out, int n ); int vips__bandup( const char *domain, VipsImage *in, VipsImage **out, int n ); int vips__bandalike_vec( const char *domain, VipsImage **in, VipsImage **out, int n, int base_bands ); int vips__formatalike( VipsImage *in1, VipsImage *in2, VipsImage **out1, VipsImage **out2 ); int vips__sizealike( VipsImage *in1, VipsImage *in2, VipsImage **out1, VipsImage **out2 ); int vips__bandalike( const char *domain, VipsImage *in1, VipsImage *in2, VipsImage **out1, VipsImage **out2 ); void im__format_init( void ); void im__tiff_register( void ); void im__jpeg_register( void ); void im__png_register( void ); void im__csv_register( void ); void im__ppm_register( void ); void im__analyze_register( void ); void im__exr_register( void ); void im__magick_register( void ); int im__bandup( const char *domain, VipsImage *in, VipsImage *out, int n ); int im__bandalike_vec( const char *domain, VipsImage **in, VipsImage **out, int n ); int im__bandalike( const char *domain, VipsImage *in1, VipsImage *in2, VipsImage *out1, VipsImage *out2 ); int im__formatalike_vec( VipsImage **in, VipsImage **out, int n ); int im__formatalike( VipsImage *in1, VipsImage *in2, VipsImage *out1, VipsImage *out2 ); int im__sizealike_vec( VipsImage **in, VipsImage **out, int n ); int im__sizealike( VipsImage *in1, VipsImage *in2, VipsImage *out1, VipsImage *out2 ); int im__arith_binary( const char *domain, VipsImage *in1, VipsImage *in2, VipsImage *out, int format_table[10], im_wrapmany_fn fn, void *b ); int im__arith_binary_const( const char *domain, VipsImage *in, VipsImage *out, int n, double *c, VipsBandFormat vfmt, int format_table[10], im_wrapone_fn fn1, im_wrapone_fn fnn ); int im__value( VipsImage *im, double *value ); typedef int (*im__wrapscan_fn)( void *p, int n, void *seq, void *a, void *b ); int im__wrapscan( VipsImage *in, VipsStartFn start, im__wrapscan_fn scan, VipsStopFn stop, void *a, void *b ); int im__colour_difference( const char *domain, VipsImage *in1, VipsImage *in2, VipsImage *out, im_wrapmany_fn buffer_fn, void *a, void *b ); int im__colour_unary( const char *domain, VipsImage *in, VipsImage *out, VipsInterpretation interpretation, im_wrapone_fn buffer_fn, void *a, void *b ); VipsImage **im__insert_base( const char *domain, VipsImage *in1, VipsImage *in2, VipsImage *out ); int im__find_lroverlap( VipsImage *ref_in, VipsImage *sec_in, VipsImage *out, int bandno_in, int xref, int yref, int xsec, int ysec, int halfcorrelation, int halfarea, int *dx0, int *dy0, double *scale1, double *angle1, double *dx1, double *dy1 ); int im__find_tboverlap( VipsImage *ref_in, VipsImage *sec_in, VipsImage *out, int bandno_in, int xref, int yref, int xsec, int ysec, int halfcorrelation, int halfarea, int *dx0, int *dy0, double *scale1, double *angle1, double *dx1, double *dy1 ); int im__find_best_contrast( VipsImage *image, int xpos, int ypos, int xsize, int ysize, int xarray[], int yarray[], int cont[], int nbest, int hcorsize ); int im__balance( VipsImage *ref, VipsImage *sec, VipsImage *out, VipsImage **ref_out, VipsImage **sec_out, int dx, int dy, int balancetype ); void imb_LCh2Lab( float *, float *, int ); /* A colour temperature. */ typedef struct { double X0, Y0, Z0; } im_colour_temperature; void imb_XYZ2Lab( float *, float *, int, im_colour_temperature * ); void imb_LabS2Lab( signed short *, float *, int ); void imb_Lab2LabS( float *, signed short *, int n ); void vips__Lab2LabQ_vec( VipsPel *out, float *in, int width ); void vips__LabQ2Lab_vec( float *out, VipsPel *in, int width ); void im_copy_dmask_matrix( DOUBLEMASK *mask, double **matrix ); void im_copy_matrix_dmask( double **matrix, DOUBLEMASK *mask ); int *im_ivector(); float *im_fvector(); double *im_dvector(); void im_free_ivector(); void im_free_fvector(); void im_free_dvector(); int **im_imat_alloc(); float **im_fmat_alloc(); double **im_dmat_alloc(); void im_free_imat(); void im_free_fmat(); void im_free_dmat(); int im_invmat( double **, int ); int *im_offsets45( int size ); int im_conv_f_raw( VipsImage *in, VipsImage *out, DOUBLEMASK *mask ); int im_convsep_f_raw( VipsImage *in, VipsImage *out, DOUBLEMASK *mask ); /* inplace */ VipsPel *vips__vector_to_ink( const char *domain, VipsImage *im, double *vec, int n ); VipsPel *im__vector_to_ink( const char *domain, VipsImage *im, int n, double *vec ); VipsImage *im__inplace_base( const char *domain, VipsImage *main, VipsImage *sub, VipsImage *out ); /* Register base vips interpolators, called during startup. */ void vips__interpolate_init( void ); /* Register wrappers for all the vips7 operations. */ void vips__init_wrap7_classes( void ); /* Start up various packages. */ void vips_arithmetic_operation_init( void ); void vips_conversion_operation_init( void ); void vips_resample_operation_init( void ); void vips_foreign_operation_init( void ); void vips_colour_operation_init( void ); void vips_histogram_operation_init( void ); void vips_freqfilt_operation_init( void ); void vips_create_operation_init( void ); void vips_morphology_operation_init( void ); void vips_convolution_operation_init( void ); guint64 vips__parse_size( const char *size_string ); IMAGE *vips__deprecated_open_read( const char *filename, gboolean sequential ); IMAGE *vips__deprecated_open_write( const char *filename ); int vips__input_interpolate_init( im_object *obj, char *str ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_INTERNAL_H*/ vips-7.38.5/libvips/include/vips/cimg_funcs.h0000644000175000017500000000253412303140253016057 00000000000000/* cimg_funcs.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_CIMG_FUNCS_H #define IM_CIMG_FUNCS_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include int im_greyc_mask( VipsImage *in, VipsImage *out, VipsImage *mask, int iterations, float amplitude, float sharpness, float anisotropy, float alpha, float sigma, float dl, float da, float gauss_prec, int interpolation, int fast_approx ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_CIMG_FUNCS_H*/ vips-7.38.5/libvips/include/vips/dispatch.h0000644000175000017500000002277312303140253015550 00000000000000/* VIPS function dispatch. * * J. Cupitt, 8/4/93. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_DISPATCH_H #define IM_DISPATCH_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #include #include /* Type names. You may define your own, but if you use one of these, then * you should use the built-in VIPS type converters. */ #define IM_TYPE_IMAGEVEC "imagevec" /* im_object is ptr to IMAGE[] */ #define IM_TYPE_DOUBLEVEC "doublevec" /* im_object is ptr to double[] */ #define IM_TYPE_INTVEC "intvec" /* im_object is ptr to int[] */ #define IM_TYPE_DOUBLE "double" /* im_object is ptr to double */ #define IM_TYPE_INT "integer" /* 32-bit integer */ #define IM_TYPE_COMPLEX "complex" /* Pair of doubles */ #define IM_TYPE_STRING "string" /* Zero-terminated char array */ #define IM_TYPE_IMASK "intmask" /* Integer mask type */ #define IM_TYPE_DMASK "doublemask" /* Double mask type */ #define IM_TYPE_IMAGE "image" /* IMAGE descriptor */ #define IM_TYPE_DISPLAY "display" /* Display descriptor */ #define IM_TYPE_GVALUE "gvalue" /* GValue wrapper */ #define IM_TYPE_INTERPOLATE "interpolate"/* A subclass of VipsInterpolate */ typedef char *im_arg_type; /* Type of argument id */ /* Internal representation of an argument to an image processing function. */ typedef void *im_object; /* These bits are ored together to make the flags in a type descriptor. * * IM_TYPE_OUTPUT: set to indicate output, otherwise input. If the IM_TYPE_RW * bit is set and IM_TYPE_OUTPUT is not set, both input and output (ie. the * operation side-effects this argument). * * IM_TYPE_ARG: Two ways of making an im_object --- with and without a * command-line string to help you along. Arguments with a string are thing * like IMAGE descriptors, which require a filename to initialise. * Arguments without are things like output numbers, where making the object * simply involves allocating storage. */ typedef enum { IM_TYPE_NONE = 0, /* No flags */ IM_TYPE_OUTPUT = 0x1, /* Output/input object */ IM_TYPE_ARG = 0x2, /* Uses a str arg in construction */ IM_TYPE_RW = 0x4 /* Read-write */ } im_type_flags; /* Initialise, destroy and write objects. The "str" argument to the * init function will not be supplied if this is not an ARG type. The * write function writes to the GString. */ typedef int (*im_init_obj_fn)( im_object *obj, char *str ); typedef int (*im_dest_obj_fn)( im_object obj ); /* Describe a VIPS type. */ typedef struct { im_arg_type type; /* Type of argument */ int size; /* sizeof( im_object repres. ) */ im_type_flags flags; /* Flags */ im_init_obj_fn init; /* Operation functions */ im_dest_obj_fn dest; /* Destroy object */ } im_type_desc; /* Success on an argument. This is called if the image processing function * succeeds and should be used to (for example) print output. */ typedef int (*im_print_obj_fn)( im_object obj ); /* Describe a VIPS command argument. */ typedef struct { char *name; /* eg. "width" */ im_type_desc *desc; /* Type description */ im_print_obj_fn print; /* Print some output objects */ } im_arg_desc; /* Type of VIPS dispatch funtion. */ typedef int (*im_dispatch_fn)( im_object *argv ); /* Maximum size of arg table. */ #define IM_MAX_ARGS (1000) /* Flags for functions. These are for information only, and more may be * added. */ typedef enum { IM_FN_NONE = 0, /* No flags set */ IM_FN_PIO = 0x1, /* Is a partial function */ IM_FN_TRANSFORM = 0x2, /* Performs coordinate transformations */ IM_FN_PTOP = 0x4, /* Point-to-point ... can be done with a LUT */ IM_FN_NOCACHE = 0x8 /* Result should not be cached */ } im_fn_flags; /* Describe a VIPS function. */ typedef struct { char *name; /* eg "im_invert" */ char *desc; /* Description - eg "photographic negative" */ im_fn_flags flags; /* Flags for this function */ im_dispatch_fn disp; /* Dispatch */ int argc; /* Number of args */ im_arg_desc *argv; /* Arg table */ } im_function; /* A set of VIPS functions forming a package. */ typedef struct { char *name; /* Package name (eg "arithmetic") */ int nfuncs; /* Number of functions in package */ im_function **table; /* Array of function descriptors */ } im_package; /* Externs for dispatch. */ /* Struct for mask IO to a file. */ typedef struct { char *name; /* Command-line name in */ void *mask; /* Mask --- DOUBLE or INT */ } im_mask_object; /* Struct for doublevec IO */ typedef struct { int n; /* Vector length */ double *vec; /* Vector */ } im_doublevec_object; /* Struct for intvec IO */ typedef struct { int n; /* Vector length */ int *vec; /* Vector */ } im_intvec_object; /* Struct for imagevec IO */ typedef struct { int n; /* Vector length */ IMAGE **vec; /* Vector */ } im_imagevec_object; /* Built-in VIPS types. */ extern im_type_desc im__input_int; extern im_type_desc im__input_intvec; extern im_type_desc im__input_imask; extern im_type_desc im__output_int; extern im_type_desc im__output_intvec; extern im_type_desc im__output_imask; extern im_type_desc im__input_double; extern im_type_desc im__input_doublevec; extern im_type_desc im__input_dmask; extern im_type_desc im__output_double; extern im_type_desc im__output_doublevec; extern im_type_desc im__output_dmask; extern im_type_desc im__output_dmask_screen; extern im_type_desc im__output_complex; extern im_type_desc im__input_string; extern im_type_desc im__output_string; extern im_type_desc im__input_imagevec; extern im_type_desc im__input_image; extern im_type_desc im__output_image; extern im_type_desc im__rw_image; extern im_type_desc im__input_display; extern im_type_desc im__output_display; extern im_type_desc im__input_gvalue; extern im_type_desc im__output_gvalue; extern im_type_desc im__input_interpolate; /* VIPS print functions. */ int im__iprint( im_object obj ); /* int */ int im__ivprint( im_object obj ); /* intvec */ int im__dprint( im_object obj ); /* double */ int im__dvprint( im_object obj ); /* doublevec */ int im__dmsprint( im_object obj ); /* DOUBLEMASK as stats */ int im__cprint( im_object obj ); /* complex */ int im__sprint( im_object obj ); /* string */ int im__displayprint( im_object obj ); /* im_col_display */ int im__gprint( im_object obj ); /* GValue */ /* Macros for convenient creation. */ #define IM_INPUT_INT( S ) { S, &im__input_int, NULL } #define IM_INPUT_INTVEC( S ) { S, &im__input_intvec, NULL } #define IM_INPUT_IMASK( S ) { S, &im__input_imask, NULL } #define IM_OUTPUT_INT( S ) { S, &im__output_int, im__iprint } #define IM_OUTPUT_INTVEC( S ) { S, &im__output_intvec, im__ivprint } #define IM_OUTPUT_IMASK( S ) { S, &im__output_imask, NULL } #define IM_INPUT_DOUBLE( S ) { S, &im__input_double, NULL } #define IM_INPUT_DOUBLEVEC( S ) { S, &im__input_doublevec, NULL } #define IM_INPUT_DMASK( S ) { S, &im__input_dmask, NULL } #define IM_OUTPUT_DOUBLE( S ) { S, &im__output_double, im__dprint } #define IM_OUTPUT_DOUBLEVEC( S ) { S, &im__output_doublevec, im__dvprint } #define IM_OUTPUT_DMASK( S ) { S, &im__output_dmask, NULL } #define IM_OUTPUT_DMASK_STATS( S ) { S, &im__output_dmask_screen, im__dmsprint } #define IM_OUTPUT_COMPLEX( S ) { S, &im__output_complex, im__cprint } #define IM_INPUT_STRING( S ) { S, &im__input_string, NULL } #define IM_OUTPUT_STRING( S ) { S, &im__output_string, im__sprint } #define IM_INPUT_IMAGE( S ) { S, &im__input_image, NULL } #define IM_INPUT_IMAGEVEC( S ) { S, &im__input_imagevec, NULL } #define IM_OUTPUT_IMAGE( S ) { S, &im__output_image, NULL } #define IM_RW_IMAGE( S ) { S, &im__rw_image, NULL } #define IM_INPUT_DISPLAY( S ) { S, &im__input_display, NULL } #define IM_OUTPUT_DISPLAY( S ) { S, &im__output_display, im__displayprint } #define IM_INPUT_GVALUE( S ) { S, &im__input_gvalue, NULL } #define IM_OUTPUT_GVALUE( S ) { S, &im__output_gvalue, im__gprint } #define IM_INPUT_INTERPOLATE( S ) { S, &im__input_interpolate, NULL } /* Add a plug-in package. */ im_package *im_load_plugin( const char *name ); int im_load_plugins( const char *fmt, ... ) __attribute__((format(printf, 1, 2))); /* Close all plug-ins. */ int im_close_plugins( void ); /* Loop over all loaded packages. */ void *im_map_packages( VipsSListMap2Fn fn, void *a ); /* Convenience functions for finding packages, functions, etc. */ im_function *im_find_function( const char *name ); im_package *im_find_package( const char *name ); im_package *im_package_of_function( const char *name ); /* Allocate space for, and free im_object argument lists. */ int im_free_vargv( im_function *fn, im_object *vargv ); int im_allocate_vargv( im_function *fn, im_object *vargv ); /* Run a VIPS command by name. */ int im_run_command( char *name, int argc, char **argv ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_DISPATCH_H*/ vips-7.38.5/libvips/include/vips/interpolate.h0000644000175000017500000000775112303140253016276 00000000000000/* Various interpolators. * * J.Cupitt, 15/10/08 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_INTERPOLATE_H #define VIPS_INTERPOLATE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_TYPE_INTERPOLATE (vips_interpolate_get_type()) #define VIPS_INTERPOLATE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_INTERPOLATE, VipsInterpolate )) #define VIPS_INTERPOLATE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_INTERPOLATE, VipsInterpolateClass)) #define VIPS_IS_INTERPOLATE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE )) #define VIPS_IS_INTERPOLATE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE )) #define VIPS_INTERPOLATE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_INTERPOLATE, VipsInterpolateClass )) typedef struct _VipsInterpolate { VipsObject parent_object; } VipsInterpolate; /* An interpolation function. This is a class method, but we have a lookup * function for it to speed up dispatch. Write to the memory at "out", * interpolate the value at position (x, y) in "in". */ typedef void (*VipsInterpolateMethod)( VipsInterpolate *interpolate, void *out, VipsRegion *in, double x, double y ); typedef struct _VipsInterpolateClass { VipsObjectClass parent_class; /* Write to pixel out(x,y), interpolating from in(x,y). The caller has * to set the regions up. */ VipsInterpolateMethod interpolate; /* This interpolator needs a window this many pixels across and down. */ int (*get_window_size)( VipsInterpolate * ); /* Or just set this if you want a constant. */ int window_size; /* Stencils are offset by this much. Default to window_size / 2 - 1 * (centering) if get_window_offset is NULL and window_offset is -1. */ int (*get_window_offset)( VipsInterpolate * ); int window_offset; } VipsInterpolateClass; GType vips_interpolate_get_type( void ); void vips_interpolate( VipsInterpolate *interpolate, void *out, VipsRegion *in, double x, double y ); VipsInterpolateMethod vips_interpolate_get_method( VipsInterpolate *interpolate ); int vips_interpolate_get_window_size( VipsInterpolate *interpolate ); int vips_interpolate_get_window_offset( VipsInterpolate *interpolate ); /* How many bits of precision we keep for transformations, ie. how many * pre-computed matricies we have. */ #define VIPS_TRANSFORM_SHIFT (6) #define VIPS_TRANSFORM_SCALE (1 << VIPS_TRANSFORM_SHIFT) /* How many bits of precision we keep for interpolation, ie. where the decimal * is in the fixed-point tables. For 16-bit pixels, we need 16 bits for the * data and 4 bits to add 16 values together. That leaves 12 bits for the * fractional part. */ #define VIPS_INTERPOLATE_SHIFT (12) #define VIPS_INTERPOLATE_SCALE (1 << VIPS_INTERPOLATE_SHIFT) /* Convenience: return static interpolators, no need to unref. */ VipsInterpolate *vips_interpolate_nearest_static( void ); VipsInterpolate *vips_interpolate_bilinear_static( void ); /* Convenience: make an interpolator from a nickname. g_object_unref() when * you're done with it. */ VipsInterpolate *vips_interpolate_new( const char *nickname ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_INTERPOLATE_H*/ vips-7.38.5/libvips/include/vips/intl.h0000644000175000017500000000223012303140253014701 00000000000000/* i18n stuff for vips. */ #ifndef VIPS_INTL_H #define VIPS_INTL_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ const char *vips__gettext( const char *msgid ); const char *vips__ngettext( const char *msgid, const char *plural, unsigned long int n ); #ifdef ENABLE_NLS #include #define _(String) vips__gettext(String) /* ngettext may be defined as a macro if we're optimised. */ #ifdef ngettext #undef ngettext #endif /*ngettext*/ #define ngettext(String,Plural,number) vips__ngettext(String,Plural,number) #ifdef gettext_noop #define N_(String) gettext_noop(String) #else #define N_(String) (String) #endif #else /*!ENABLE_NLS*/ #define _(String) (String) #define N_(String) (String) #define textdomain(String) (String) #define gettext(String) (String) #define dgettext(Domain,String) (String) #define dcgettext(Domain,String,Type) (String) #define bindtextdomain(Domain,Directory) (Domain) #define bind_textdomain_codeset(Domain,Codeset) (Codeset) #define ngettext(S, P, N) ((N) == 1 ? (S) : (P)) #define dngettext(D, S, P, N) ngettext(S, P, N) #endif /* ENABLE_NLS */ #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /* VIPS_INTL_H */ vips-7.38.5/libvips/include/vips/thread.h0000644000175000017500000000302012303140253015200 00000000000000/* Private include file ... if we've been configured without gthread, we need * to point the g_thread_*() and g_mutex_*() functions at our own stubs. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_THREAD_H #define VIPS_THREAD_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* We need wrappers over g_mutex_new(), it was replaced by g_mutex_init() in * glib 2.32+ */ GMutex *vips_g_mutex_new( void ); void vips_g_mutex_free( GMutex * ); /* Same for GCond. */ GCond *vips_g_cond_new( void ); void vips_g_cond_free( GCond * ); /* ... and for GThread. */ GThread *vips_g_thread_new( const char *, GThreadFunc, gpointer ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_THREAD_H*/ vips-7.38.5/libvips/include/vips/resample.h0000644000175000017500000000300112303140253015540 00000000000000/* resample.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_RESAMPLE_H #define VIPS_RESAMPLE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips_shrink( VipsImage *in, VipsImage **out, double xshrink, double yshrink, ... ) __attribute__((sentinel)); int vips_similarity( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_affine( VipsImage *in, VipsImage **out, double a, double b, double c, double d, ... ) __attribute__((sentinel)); int vips_quadratic( VipsImage *in, VipsImage **out, VipsImage *coeff, ... ) __attribute__((sentinel)); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_RESAMPLE_H*/ vips-7.38.5/libvips/include/vips/semaphore.h0000644000175000017500000000325112303140253015722 00000000000000/* Definitions for thread support. * * JC, 9/5/94 * 30/7/99 RP, JC * - reworked for posix/solaris threads * 28/9/99 JC * - restructured, made part of public API */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_SEMAPHORE_H #define VIPS_SEMAPHORE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #include /* Implement our own semaphores. */ typedef struct { char *name; int v; GMutex *mutex; GCond *cond; } VipsSemaphore; int vips_semaphore_up( VipsSemaphore *s ); int vips_semaphore_down( VipsSemaphore *s ); int vips_semaphore_upn( VipsSemaphore *s, int n ); int vips_semaphore_downn( VipsSemaphore *s, int n ); void vips_semaphore_destroy( VipsSemaphore *s ); void vips_semaphore_init( VipsSemaphore *s, int v, char *name ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_SEMAPHORE_H*/ vips-7.38.5/libvips/include/vips/gate.h0000644000175000017500000000370012303140253014656 00000000000000/* Thread profiling. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_GATE_H #define VIPS_GATE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_GATE_START( NAME ) \ G_STMT_START { \ if( vips__thread_profile ) \ vips__thread_gate_start( NAME ); \ } G_STMT_END #define VIPS_GATE_STOP( NAME ) \ G_STMT_START { \ if( vips__thread_profile ) \ vips__thread_gate_stop( NAME ); \ } G_STMT_END #define VIPS_GATE_MALLOC( SIZE ) \ G_STMT_START { \ if( vips__thread_profile ) \ vips__thread_malloc_free( (gint64) (SIZE) ); \ } G_STMT_END #define VIPS_GATE_FREE( SIZE ) \ G_STMT_START { \ if( vips__thread_profile ) \ vips__thread_malloc_free( -((gint64) (SIZE)) ); \ } G_STMT_END extern gboolean vips__thread_profile; void vips__thread_profile_attach( const char *thread_name ); void vips__thread_profile_detach( void ); void vips__thread_profile_stop( void ); void vips__thread_gate_start( const char *gate_name ); void vips__thread_gate_stop( const char *gate_name ); void vips__thread_malloc_free( gint64 size ); #endif /*VIPS_GATE_H*/ #ifdef __cplusplus } #endif /*__cplusplus*/ vips-7.38.5/libvips/include/vips/transform.h0000644000175000017500000000477412303140253015765 00000000000000/* Affine transforms. */ /* Copyright (C) 1991-2003 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_TRANSFORM_H #define VIPS_TRANSFORM_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* Params for an affine transformation. */ typedef struct { /* Area of input we can use. This can be smaller than the real input * image: we expand the input to add extra pixels for interpolation. */ VipsRect iarea; /* The area of the output we've been asked to generate. left/top can * be negative. */ VipsRect oarea; /* The transform. */ double a, b, c, d; double idx, idy; double odx, ody; double ia, ib, ic, id; /* Inverse of matrix abcd */ } VipsTransformation; void vips__transform_init( VipsTransformation *trn ); int vips__transform_calc_inverse( VipsTransformation *trn ); int vips__transform_isidentity( const VipsTransformation *trn ); int vips__transform_add( const VipsTransformation *in1, const VipsTransformation *in2, VipsTransformation *out ); void vips__transform_print( const VipsTransformation *trn ); void vips__transform_forward_point( const VipsTransformation *trn, const double x, const double y, double *ox, double *oy ); void vips__transform_invert_point( const VipsTransformation *trn, const double x, const double y, double *ox, double *oy ); void vips__transform_forward_rect( const VipsTransformation *trn, const VipsRect *in, VipsRect *out ); void vips__transform_invert_rect( const VipsTransformation *trn, const VipsRect *in, VipsRect *out ); void vips__transform_set_area( VipsTransformation * ); int vips__affine( VipsImage *in, VipsImage *out, VipsTransformation *trn ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_TRANSFORM_H*/ vips-7.38.5/libvips/include/vips/util.h0000644000175000017500000001756212303140253014726 00000000000000/* Various useful definitions. * * J.Cupitt, 8/4/93 * 15/7/96 JC * - C++ stuff added */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_UTIL_H #define VIPS_UTIL_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include /* Some platforms don't have M_PI :-( */ #define VIPS_PI (3.14159265358979323846) /* Convert degrees->rads and vice-versa. */ #define VIPS_RAD( R ) (((R) / 360.0) * 2.0 * VIPS_PI) #define VIPS_DEG( A ) (((A) / (2.0 * VIPS_PI)) * 360.0) #define VIPS_MAX( A, B ) ((A) > (B) ? (A) : (B)) #define VIPS_MIN( A, B ) ((A) < (B) ? (A) : (B)) #define VIPS_ABS( X ) (((X) >= 0) ? (X) : -(X)) #define VIPS_CLIP( A, V, B ) VIPS_MAX( (A), VIPS_MIN( (B), (V) ) ) #define VIPS_NUMBER( R ) ((int) (sizeof(R) / sizeof(R[0]))) #define VIPS_SWAP( TYPE, A, B ) \ G_STMT_START { \ TYPE t = (A); \ (A) = (B); \ (B) = t; \ } G_STMT_END /* Duff's device. Do OPERation N times in a 16-way unrolled loop. */ #define VIPS_UNROLL( N, OPER ) \ G_STMT_START { \ if( (N) ) { \ int duff_count = ((N) + 15) / 16; \ \ switch( (N) % 16 ) { \ case 0: do { OPER; \ case 15: OPER; \ case 14: OPER; \ case 13: OPER; \ case 12: OPER; \ case 11: OPER; \ case 10: OPER; \ case 9: OPER; \ case 8: OPER; \ case 7: OPER; \ case 6: OPER; \ case 5: OPER; \ case 4: OPER; \ case 3: OPER; \ case 2: OPER; \ case 1: OPER; \ } while( --duff_count > 0 ); \ } \ } \ } G_STMT_END /* Round a float to the nearest integer. Much faster than rint(). */ #define VIPS_RINT( R ) ((int) ((R) > 0 ? ((R) + 0.5) : ((R) - 0.5))) /* Various integer range clips. Record over/under flows. */ #define VIPS_CLIP_UCHAR( V, SEQ ) \ G_STMT_START { \ if( (V) < 0 ) { \ (SEQ)->underflow++; \ (V) = 0; \ } \ else if( (V) > UCHAR_MAX ) { \ (SEQ)->overflow++; \ (V) = UCHAR_MAX; \ } \ } G_STMT_END #define VIPS_CLIP_CHAR( V, SEQ ) \ G_STMT_START { \ if( (V) < SCHAR_MIN ) { \ (SEQ)->underflow++; \ (V) = SCHAR_MIN; \ } \ else if( (V) > SCHAR_MAX ) { \ (SEQ)->overflow++; \ (V) = SCHAR_MAX; \ } \ } G_STMT_END #define VIPS_CLIP_USHORT( V, SEQ ) \ G_STMT_START { \ if( (V) < 0 ) { \ (SEQ)->underflow++; \ (V) = 0; \ } \ else if( (V) > USHRT_MAX ) { \ (SEQ)->overflow++; \ (V) = USHRT_MAX; \ } \ } G_STMT_END #define VIPS_CLIP_SHORT( V, SEQ ) \ G_STMT_START { \ if( (V) < SHRT_MIN ) { \ (SEQ)->underflow++; \ (V) = SHRT_MIN; \ } \ else if( (V) > SHRT_MAX ) { \ (SEQ)->overflow++; \ (V) = SHRT_MAX; \ } \ } G_STMT_END #define VIPS_CLIP_UINT( V, SEQ ) \ G_STMT_START { \ if( (V) < 0 ) { \ (SEQ)->underflow++; \ (V) = 0; \ } \ } G_STMT_END #define VIPS_CLIP_NONE( V, SEQ ) {} /* Not all platforms have PATH_MAX (eg. Hurd) and we don't need a platform one * anyway, just a static buffer big enough for almost any path. */ #define VIPS_PATH_MAX (4096) const char *vips_enum_string( GType enm, int value ); const char *vips_enum_nick( GType enm, int value ); int vips_enum_from_nick( const char *domain, GType type, const char *str ); gboolean vips_slist_equal( GSList *l1, GSList *l2 ); void *vips_slist_map2( GSList *list, VipsSListMap2Fn fn, void *a, void *b ); void *vips_slist_map2_rev( GSList *list, VipsSListMap2Fn fn, void *a, void *b ); void *vips_slist_map4( GSList *list, VipsSListMap4Fn fn, void *a, void *b, void *c, void *d ); void *vips_slist_fold2( GSList *list, void *start, VipsSListFold2Fn fn, void *a, void *b ); GSList *vips_slist_filter( GSList *list, VipsSListMap2Fn fn, void *a, void *b ); void vips_slist_free_all( GSList *list ); void *vips_map_equal( void *a, void *b ); void *vips_hash_table_map( GHashTable *hash, VipsSListMap2Fn fn, void *a, void *b ); char *vips_strncpy( char *dest, const char *src, int n ); char *vips_strrstr( const char *haystack, const char *needle ); gboolean vips_ispostfix( const char *a, const char *b ); gboolean vips_isprefix( const char *a, const char *b ); char *vips_break_token( char *str, const char *brk ); int vips_vsnprintf( char *str, size_t size, const char *format, va_list ap ); int vips_snprintf( char *str, size_t size, const char *format, ... ) __attribute__((format(printf, 3, 4))); void vips_filename_split( const char *path, char *name, char *mode ); const char *vips_skip_dir( const char *filename ); void vips_filename_suffix( const char *path, char *suffix ); int vips_filename_suffix_match( const char *path, const char *suffixes[] ); char *vips_getnextoption( char **in ); char *vips_getsuboption( const char *buf ); gint64 vips_file_length( int fd ); int vips__write( int fd, const void *buf, size_t count ); FILE *vips__file_open_read( const char *filename, const char *fallback_dir, gboolean text_mode ); FILE *vips__file_open_write( const char *filename, gboolean text_mode ); char *vips__file_read( FILE *fp, const char *name, unsigned int *length_out ); char *vips__file_read_name( const char *name, const char *fallback_dir, unsigned int *length_out ); int vips__file_write( void *data, size_t size, size_t nmemb, FILE *stream ); int vips__get_bytes( const char *filename, unsigned char buf[], int len ); GValue *vips__gvalue_ref_string_new( const char *text ); void vips__gslist_gvalue_free( GSList *list ); GSList *vips__gslist_gvalue_copy( const GSList *list ); GSList *vips__gslist_gvalue_merge( GSList *a, const GSList *b ); char *vips__gslist_gvalue_get( const GSList *list ); int vips__seek( int fd, gint64 pos ); int vips__ftruncate( int fd, gint64 pos ); int vips_existsf( const char *name, ... ) __attribute__((format(printf, 1, 2))); int vips_mkdirf( const char *name, ... ) __attribute__((format(printf, 1, 2))); FILE *vips_popenf( const char *fmt, const char *mode, ... ) __attribute__((format(printf, 1, 3))); /** * VipsToken: * @VIPS_TOKEN_LEFT: left bracket * @VIPS_TOKEN_RIGHT: right bracket * @VIPS_TOKEN_STRING: string constant * @VIPS_TOKEN_EQUALS: equals sign * @VIPS_TOKEN_COMMA: comma * * Tokens returned by the vips lexical analyzer, see vips__token_get(). This * is used to parse option strings for arguments. * * Left and right brackets can be any of (, {, [, <. * * Strings may be in double quotes, and may contain escaped quote characters, * for example string, "string" and "str\"ing". * */ typedef enum { VIPS_TOKEN_LEFT = 1, VIPS_TOKEN_RIGHT, VIPS_TOKEN_STRING, VIPS_TOKEN_EQUALS, VIPS_TOKEN_COMMA } VipsToken; const char *vips__token_get( const char *buffer, VipsToken *token, char *string, int size ); const char *vips__token_must( const char *buffer, VipsToken *token, char *string, int size ); const char *vips__token_need( const char *buffer, VipsToken need_token, char *string, int size ); const char *vips__find_rightmost_brackets( const char *p ); int vips_ispoweroftwo( int p ); int vips_amiMSBfirst( void ); char *vips__temp_name( const char *format ); void vips__change_suffix( const char *name, char *out, int mx, const char *new_suff, const char **olds, int nolds ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_UTIL_H*/ vips-7.38.5/libvips/include/vips/version.h0000644000175000017500000000064012303144752015433 00000000000000/* Macros for the header version. */ #ifndef VIPS_VERSION_H #define VIPS_VERSION_H #define VIPS_VERSION "7.38.5" #define VIPS_VERSION_STRING "7.38.5-Tue Feb 25 16:50:39 GMT 2014" #define VIPS_MAJOR_VERSION (7) #define VIPS_MINOR_VERSION (38) #define VIPS_MICRO_VERSION (5) /* Not really anything to do with versions, but this is a handy place to put * it. */ #define VIPS_EXEEXT "" #endif /*VIPS_VERSION_H*/ vips-7.38.5/libvips/include/vips/morphology.h0000644000175000017500000000337312303141142016141 00000000000000/* morphology.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_MORPHOLOGY_H #define VIPS_MORPHOLOGY_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ typedef enum { VIPS_OPERATION_MORPHOLOGY_ERODE, VIPS_OPERATION_MORPHOLOGY_DILATE, VIPS_OPERATION_MORPHOLOGY_LAST } VipsOperationMorphology; int vips_morph( VipsImage *in, VipsImage **out, VipsImage *mask, VipsOperationMorphology morph, ... ) __attribute__((sentinel)); int vips_rank( VipsImage *in, VipsImage **out, int width, int height, int index, ... ) __attribute__((sentinel)); int vips_countlines( VipsImage *in, double *nolines, VipsDirection direction, ... ) __attribute__((sentinel)); int vips_median( VipsImage *in, VipsImage **out, int size, ... ) __attribute__((sentinel)); int im_label_regions( VipsImage *test, VipsImage *mask, int *segments ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_MORPHOLOGY_H*/ vips-7.38.5/libvips/include/vips/generate.h0000644000175000017500000000523112303140253015531 00000000000000/* Generate pixels. * * J.Cupitt, 8/4/93 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_GENERATE_H #define VIPS_GENERATE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ typedef int (*VipsRegionWrite)( VipsRegion *region, VipsRect *area, void *a ); int vips_sink_disc( VipsImage *im, VipsRegionWrite write_fn, void *a ); typedef void *(*VipsStartFn)( VipsImage *out, void *a, void *b ); typedef int (*VipsGenerateFn)( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ); typedef int (*VipsStopFn)( void *seq, void *a, void *b ); int vips_sink( VipsImage *im, VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn, void *a, void *b ); int vips_sink_tile( VipsImage *im, int tile_width, int tile_height, VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn, void *a, void *b ); typedef void (*VipsSinkNotify)( VipsImage *im, VipsRect *rect, void *a ); int vips_sink_screen( VipsImage *in, VipsImage *out, VipsImage *mask, int tile_width, int tile_height, int max_tiles, int priority, VipsSinkNotify notify, void *a ); int vips_sink_memory( VipsImage *im ); int vips_sink_memory2( VipsImage *image ); void *vips_start_one( VipsImage *out, void *a, void *b ); int vips_stop_one( void *seq, void *a, void *b ); void *vips_start_many( VipsImage *out, void *a, void *b ); int vips_stop_many( void *seq, void *a, void *b ); VipsImage **vips_allocate_input_array( VipsImage *out, ... ) __attribute__((sentinel)); int vips_image_generate( VipsImage *im, VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn, void *a, void *b ); int vips_image_pipeline_array( VipsImage *image, VipsDemandStyle hint, VipsImage **in ); int vips_image_pipelinev( VipsImage *image, VipsDemandStyle hint, ... ) __attribute__((sentinel)); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_GENERATE_H*/ vips-7.38.5/libvips/include/vips/enumtypes.h0000644000175000017500000001136212303140253015772 00000000000000 /* Generated data (by glib-mkenums) */ #ifndef VIPS_ENUM_TYPES_H #define VIPS_ENUM_TYPES_H G_BEGIN_DECLS /* enumerations from "../../../libvips/include/vips/foreign.h" */ GType vips_foreign_flags_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_FOREIGN_FLAGS (vips_foreign_flags_get_type()) GType vips_saveable_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_SAVEABLE (vips_saveable_get_type()) GType vips_foreign_tiff_compression_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_FOREIGN_TIFF_COMPRESSION (vips_foreign_tiff_compression_get_type()) GType vips_foreign_tiff_predictor_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_FOREIGN_TIFF_PREDICTOR (vips_foreign_tiff_predictor_get_type()) GType vips_foreign_tiff_resunit_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_FOREIGN_TIFF_RESUNIT (vips_foreign_tiff_resunit_get_type()) GType vips_foreign_dz_layout_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_FOREIGN_DZ_LAYOUT (vips_foreign_dz_layout_get_type()) GType vips_foreign_dz_depth_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_FOREIGN_DZ_DEPTH (vips_foreign_dz_depth_get_type()) /* enumerations from "../../../libvips/include/vips/arithmetic.h" */ GType vips_operation_math_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_MATH (vips_operation_math_get_type()) GType vips_operation_math2_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_MATH2 (vips_operation_math2_get_type()) GType vips_operation_round_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_ROUND (vips_operation_round_get_type()) GType vips_operation_relational_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_RELATIONAL (vips_operation_relational_get_type()) GType vips_operation_boolean_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_BOOLEAN (vips_operation_boolean_get_type()) GType vips_operation_complex_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_COMPLEX (vips_operation_complex_get_type()) GType vips_operation_complex2_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_COMPLEX2 (vips_operation_complex2_get_type()) GType vips_operation_complexget_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_COMPLEXGET (vips_operation_complexget_get_type()) /* enumerations from "../../../libvips/include/vips/conversion.h" */ GType vips_extend_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_EXTEND (vips_extend_get_type()) GType vips_direction_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_DIRECTION (vips_direction_get_type()) GType vips_align_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_ALIGN (vips_align_get_type()) GType vips_angle_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_ANGLE (vips_angle_get_type()) GType vips_angle45_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_ANGLE45 (vips_angle45_get_type()) /* enumerations from "../../../libvips/include/vips/util.h" */ GType vips_token_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_TOKEN (vips_token_get_type()) /* enumerations from "../../../libvips/include/vips/image.h" */ GType vips_demand_style_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_DEMAND_STYLE (vips_demand_style_get_type()) GType vips_image_type_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_IMAGE_TYPE (vips_image_type_get_type()) GType vips_interpretation_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_INTERPRETATION (vips_interpretation_get_type()) GType vips_band_format_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_BAND_FORMAT (vips_band_format_get_type()) GType vips_coding_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_CODING (vips_coding_get_type()) GType vips_access_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_ACCESS (vips_access_get_type()) /* enumerations from "../../../libvips/include/vips/colour.h" */ GType vips_intent_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_INTENT (vips_intent_get_type()) GType vips_pcs_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_PCS (vips_pcs_get_type()) /* enumerations from "../../../libvips/include/vips/operation.h" */ GType vips_operation_flags_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_FLAGS (vips_operation_flags_get_type()) /* enumerations from "../../../libvips/include/vips/convolution.h" */ GType vips_precision_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_PRECISION (vips_precision_get_type()) GType vips_combine_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_COMBINE (vips_combine_get_type()) /* enumerations from "../../../libvips/include/vips/morphology.h" */ GType vips_operation_morphology_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_OPERATION_MORPHOLOGY (vips_operation_morphology_get_type()) /* enumerations from "../../../libvips/include/vips/object.h" */ GType vips_argument_flags_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_ARGUMENT_FLAGS (vips_argument_flags_get_type()) G_END_DECLS #endif /*VIPS_ENUM_TYPES_H*/ /* Generated data ends here */ vips-7.38.5/libvips/include/vips/region.h0000644000175000017500000001165312303141142015225 00000000000000/* Definitions for partial image regions. * * J.Cupitt, 8/4/93 * * 2/3/11 * - move to GObject */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_REGION_H #define VIPS_REGION_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_TYPE_REGION (vips_region_get_type()) #define VIPS_REGION( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_REGION, VipsRegion )) #define VIPS_REGION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_REGION, VipsRegionClass)) #define VIPS_IS_REGION( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_REGION )) #define VIPS_IS_REGION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_REGION )) #define VIPS_REGION_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_REGION, VipsRegionClass )) /* Sub-area of image. */ typedef struct _VipsRegion { VipsObject parent_object; /*< public >*/ /* Users may read these two fields. */ VipsImage *im; /* Link back to parent image */ VipsRect valid; /* Area of parent we can see */ /* The rest of VipsRegion is private. */ /*< private >*/ RegionType type; /* What kind of attachment */ VipsPel *data; /* Off here to get data */ int bpl; /* Bytes-per-line for data */ void *seq; /* Sequence we are using to fill region */ /* The thread that made this region. Used to assert() test that * regions are not being shared between threads. */ GThread *thread; /* Ref to the window we use for this region, if any. */ VipsWindow *window; /* Ref to the buffer we use for this region, if any. */ VipsBuffer *buffer; /* The image this region is on has changed and caches need to be * dropped. */ gboolean invalid; } VipsRegion; typedef struct _VipsRegionClass { VipsObjectClass parent_class; } VipsRegionClass; GType vips_region_get_type( void ); VipsRegion *vips_region_new( VipsImage *image ); int vips_region_buffer( VipsRegion *reg, VipsRect *r ); int vips_region_image( VipsRegion *reg, VipsRect *r ); int vips_region_region( VipsRegion *reg, VipsRegion *dest, VipsRect *r, int x, int y ); int vips_region_equalsregion( VipsRegion *reg1, VipsRegion *reg2 ); int vips_region_position( VipsRegion *reg, int x, int y ); void vips_region_paint( VipsRegion *reg, VipsRect *r, int value ); void vips_region_paint_pel( VipsRegion *reg, VipsRect *r, VipsPel *ink ); void vips_region_black( VipsRegion *reg ); void vips_region_copy( VipsRegion *reg, VipsRegion *dest, VipsRect *r, int x, int y ); int vips_region_prepare( VipsRegion *reg, VipsRect *r ); int vips_region_prepare_to( VipsRegion *reg, VipsRegion *dest, VipsRect *r, int x, int y ); int vips_region_prepare_many( VipsRegion **reg, VipsRect *r ); void vips_region_dump_all( void ); /* Macros on VipsRegion. * VIPS_REGION_LSKIP() add to move down line * VIPS_REGION_N_ELEMENTS() number of elements across region * VIPS_REGION_SIZEOF_LINE() sizeof width of region * VIPS_REGION_ADDR() address of pixel in region */ #define VIPS_REGION_LSKIP( R ) \ ((size_t)((R)->bpl)) #define VIPS_REGION_N_ELEMENTS( R ) \ ((size_t)((R)->valid.width * (R)->im->Bands)) #define VIPS_REGION_SIZEOF_LINE( R ) \ ((size_t)((R)->valid.width * VIPS_IMAGE_SIZEOF_PEL( (R)->im) )) /* If DEBUG is defined, add bounds checking. */ #ifdef DEBUG #define VIPS_REGION_ADDR( R, X, Y ) \ ( (vips_rect_includespoint( &(R)->valid, (X), (Y) ))? \ ((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \ ((X) - (R)->valid.left) * VIPS_IMAGE_SIZEOF_PEL((R)->im)): \ (fprintf( stderr, \ "VIPS_REGION_ADDR: point out of bounds, " \ "file \"%s\", line %d\n" \ "(point x=%d, y=%d\n" \ " should have been within VipsRect left=%d, top=%d, " \ "width=%d, height=%d)\n", \ __FILE__, __LINE__, \ (X), (Y), \ (R)->valid.left, \ (R)->valid.top, \ (R)->valid.width, \ (R)->valid.height ), abort(), (VipsPel *) NULL) \ ) #else /*DEBUG*/ #define VIPS_REGION_ADDR( R, X, Y ) \ ((R)->data + \ ((Y)-(R)->valid.top) * VIPS_REGION_LSKIP( R ) + \ ((X)-(R)->valid.left) * VIPS_IMAGE_SIZEOF_PEL( (R)->im )) #endif /*DEBUG*/ #define VIPS_REGION_ADDR_TOPLEFT( R ) ((R)->data) #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_REGION_H*/ vips-7.38.5/libvips/include/vips/vector.h0000644000175000017500000000660412303140253015246 00000000000000/* helper stuff for Orc * * 29/10/10 * - from im_dilate hackery */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_VECTOR_H #define VIPS_VECTOR_H #ifdef HAVE_ORC #include #endif /*HAVE_ORC*/ #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_VECTOR_SOURCE_MAX (10) /* An Orc program. */ typedef struct { /* Handy for debugging. */ const char *name; /* How many resources we've used so far in this codegen. */ int n_temp; int n_scanline; int n_source; int n_destination; int n_constant; int n_parameter; int n_instruction; /* The scanline sources, and for each variable, the associated line. * "sl0" onwards. */ int sl[VIPS_VECTOR_SOURCE_MAX]; int line[VIPS_VECTOR_SOURCE_MAX]; /* Non-scanline sources, "s1" etc. s[0] is the var for "s1". */ int s[VIPS_VECTOR_SOURCE_MAX]; /* The destination var. */ int d1; #ifdef HAVE_ORC /* The code we have generated. */ OrcProgram *program; #endif /*HAVE_ORC*/ /* Compiled successfully. */ gboolean compiled; } VipsVector; /* An executor. */ typedef struct { #ifdef HAVE_ORC OrcExecutor executor; #endif /*HAVE_ORC*/ VipsVector *vector; } VipsExecutor; /* Set from the command-line. */ extern gboolean vips__vector_enabled; void vips_vector_init( void ); gboolean vips_vector_isenabled( void ); void vips_vector_set_enabled( gboolean enabled ); void vips_vector_free( VipsVector *vector ); VipsVector *vips_vector_new( const char *name, int dsize ); void vips_vector_constant( VipsVector *vector, char *name, int value, int size ); int vips_vector_source_name( VipsVector *vector, char *name, int size ); void vips_vector_source_scanline( VipsVector *vector, char *name, int line, int size ); void vips_vector_temporary( VipsVector *vector, char *name, int size ); void vips_vector_asm2( VipsVector *vector, const char *op, const char *a, const char *b ); void vips_vector_asm3( VipsVector *vector, const char *op, const char *a, const char *b, const char *c ); gboolean vips_vector_full( VipsVector *vector ); gboolean vips_vector_compile( VipsVector *vector ); void vips_vector_print( VipsVector *vector ); void vips_executor_set_program( VipsExecutor *executor, VipsVector *vector, int n ); void vips_executor_set_scanline( VipsExecutor *executor, VipsRegion *ir, int x, int y ); void vips_executor_set_destination( VipsExecutor *executor, void *value ); void vips_executor_set_array( VipsExecutor *executor, int var, void *value ); void vips_executor_run( VipsExecutor *executor ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_VECTOR_H*/ vips-7.38.5/libvips/include/vips/format.h0000644000175000017500000001230312303140253015225 00000000000000/* Base type for supported image formats. Subclass this to add a new * format. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_FORMAT_H #define IM_FORMAT_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_TYPE_FORMAT (vips_format_get_type()) #define VIPS_FORMAT( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_FORMAT, VipsFormat )) #define VIPS_FORMAT_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_FORMAT, VipsFormatClass)) #define VIPS_IS_FORMAT( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FORMAT )) #define VIPS_IS_FORMAT_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FORMAT )) #define VIPS_FORMAT_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_FORMAT, VipsFormatClass )) /* Image file properties. */ typedef enum { VIPS_FORMAT_NONE = 0, /* No flags set */ VIPS_FORMAT_PARTIAL = 1, /* Lazy read OK (eg. tiled tiff) */ VIPS_FORMAT_BIGENDIAN = 2 /* Most-significant byte first */ } VipsFormatFlags; /* Don't instantiate these things, just use the class stuff. */ typedef struct _VipsFormat { VipsObject parent_object; /*< public >*/ } VipsFormat; typedef struct _VipsFormatClass { VipsObjectClass parent_class; /*< public >*/ /* Is a file in this format. */ gboolean (*is_a)( const char * ); /* Read just the header into the VipsImage. */ int (*header)( const char *, VipsImage * ); /* Load the whole image. */ int (*load)( const char *, VipsImage * ); /* Write the VipsImage to the file in this format. */ int (*save)( VipsImage *, const char * ); /* Get the flags for this file in this format. */ VipsFormatFlags (*get_flags)( const char * ); /* Loop over formats in this order, default 0. We need this because * some formats can be read by several loaders (eg. tiff can be read * by the libMagick loader as well as by the tiff loader), and we want * to make sure the better loader comes first. */ int priority; /* Null-terminated list of allowed suffixes, eg. ".tif", ".tiff". */ const char **suffs; } VipsFormatClass; GType vips_format_get_type( void ); /* Map over and find formats. This uses type introspection to loop over * subclasses of VipsFormat. */ void *vips_format_map( VipsSListMap2Fn fn, void *a, void *b ); VipsFormatClass *vips_format_for_file( const char *filename ); VipsFormatClass *vips_format_for_name( const char *filename ); VipsFormatFlags vips_format_get_flags( VipsFormatClass *format, const char *filename ); /* Read/write an image convenience functions. */ int vips_format_read( const char *filename, VipsImage *out ); int vips_format_write( VipsImage *in, const char *filename ); /* Low-level read/write operations. */ int im_jpeg2vips( const char *filename, VipsImage *out ); int im_bufjpeg2vips( void *buf, size_t len, VipsImage *out, gboolean header_only ); int im_vips2jpeg( VipsImage *in, const char *filename ); int im_vips2mimejpeg( VipsImage *in, int qfac ); int im_vips2bufjpeg( VipsImage *in, VipsImage *out, int qfac, char **obuf, int *olen ); int im_tiff2vips( const char *filename, VipsImage *out ); int im_vips2tiff( VipsImage *in, const char *filename ); int im_tile_cache( VipsImage *in, VipsImage *out, int tile_width, int tile_height, int max_tiles ); int im_magick2vips( const char *filename, VipsImage *out ); int im_exr2vips( const char *filename, VipsImage *out ); int im_ppm2vips( const char *filename, VipsImage *out ); int im_vips2ppm( VipsImage *in, const char *filename ); int im_analyze2vips( const char *filename, VipsImage *out ); int im_csv2vips( const char *filename, VipsImage *out ); int im_vips2csv( VipsImage *in, const char *filename ); int im_png2vips( const char *filename, VipsImage *out ); int im_vips2png( VipsImage *in, const char *filename ); int im_vips2bufpng( VipsImage *in, VipsImage *out, int compression, int interlace, char **obuf, size_t *olen ); int im_raw2vips( const char *filename, VipsImage *out, int width, int height, int bpp, int offset ); int im_vips2raw( VipsImage *in, int fd ); int im_mat2vips( const char *filename, VipsImage *out ); int im_rad2vips( const char *filename, VipsImage *out ); int im_vips2rad( VipsImage *in, const char *filename ); int im_fits2vips( const char *filename, VipsImage *out ); int im_vips2fits( VipsImage *in, const char *filename ); int im_vips2dz( VipsImage *in, const char *filename ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_FORMAT_H*/ vips-7.38.5/libvips/include/vips/threadpool.h0000644000175000017500000000755412303140253016112 00000000000000/* Thread eval for VIPS. * * 29/9/99 JC * - from thread.h * 17/3/10 * - from threadgroup * - rework with a simpler distributed work allocation model */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_THREADPOOL_H #define VIPS_THREADPOOL_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include /* Per-thread state. Allocate functions can use these members to * communicate with work functions. */ #define VIPS_TYPE_THREAD_STATE (vips_thread_state_get_type()) #define VIPS_THREAD_STATE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_THREAD_STATE, VipsThreadState )) #define VIPS_THREAD_STATE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_THREAD_STATE, VipsThreadStateClass)) #define VIPS_IS_THREAD_STATE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_THREAD_STATE )) #define VIPS_IS_THREAD_STATE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_THREAD_STATE )) #define VIPS_THREAD_STATE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_THREAD_STATE, VipsThreadStateClass )) typedef struct _VipsThreadState { VipsObject parent_object; /*< public >*/ /* Image we run on. */ VipsImage *im; /* This region is created and destroyed by the threadpool for the * use of the worker. */ VipsRegion *reg; /* Neither used nor set, do what you like with them. */ VipsRect pos; int x, y; /* Set in work to get the allocate to signal stop. */ gboolean stop; /* The client data passed to the enclosing vips_threadpool_run(). */ void *a; } VipsThreadState; typedef struct _VipsThreadStateClass { VipsObjectClass parent_class; /*< public >*/ } VipsThreadStateClass; void *vips_thread_state_set( VipsObject *object, void *a, void *b ); GType vips_thread_state_get_type( void ); VipsThreadState *vips_thread_state_new( VipsImage *im, void *a ); /* Constructor for per-thread state. */ typedef VipsThreadState *(*VipsThreadStartFn)( VipsImage *im, void *a ); /* A work allocate function. This is run single-threaded by a worker to * set up a new work unit. * Return non-zero for errors. Set *stop for "no more work to do" */ typedef int (*VipsThreadpoolAllocateFn)( VipsThreadState *state, void *a, gboolean *stop ); /* A work function. This does a unit of work (eg. processing a tile or * whatever). Return non-zero for errors. */ typedef int (*VipsThreadpoolWorkFn)( VipsThreadState *state, void *a ); /* A progress function. This is run by the main thread once for every * allocation. Return an error to kill computation early. */ typedef int (*VipsThreadpoolProgressFn)( void *a ); int vips_threadpool_run( VipsImage *im, VipsThreadStartFn start, VipsThreadpoolAllocateFn allocate, VipsThreadpoolWorkFn work, VipsThreadpoolProgressFn progress, void *a ); void vips_get_tile_size( VipsImage *im, int *tile_width, int *tile_height, int *nlines ); void vips__print_renders( void ); void vips_concurrency_set( int concurrency ); int vips_concurrency_get( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_THREADPOOL_H*/ vips-7.38.5/libvips/include/vips/colour.h0000644000175000017500000001474412303140253015253 00000000000000/* Definitions for VIPS colour package. * * J.Cupitt, 8/4/93 * 15/7/96 JC * - C++ stuff added * 20/2/98 JC * - new display calibration added * 26/9/05 * - added IM_ prefix to colour temps */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_COLOUR_H #define VIPS_COLOUR_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* Areas under curves for Dxx. 2 degree observer. */ #define VIPS_D93_X0 (89.7400) #define VIPS_D93_Y0 (100.0) #define VIPS_D93_Z0 (130.7700) #define VIPS_D75_X0 (94.9682) #define VIPS_D75_Y0 (100.0) #define VIPS_D75_Z0 (122.5710) /* D65 temp 6504. */ #define VIPS_D65_X0 (95.0470) #define VIPS_D65_Y0 (100.0) #define VIPS_D65_Z0 (108.8827) #define VIPS_D55_X0 (95.6831) #define VIPS_D55_Y0 (100.0) #define VIPS_D55_Z0 (92.0871) #define VIPS_D50_X0 (96.4250) #define VIPS_D50_Y0 (100.0) #define VIPS_D50_Z0 (82.4680) /* A temp 2856k. */ #define VIPS_A_X0 (109.8503) #define VIPS_A_Y0 (100.0) #define VIPS_A_Z0 (35.5849) /* B temp 4874k. */ #define VIPS_B_X0 (99.0720) #define VIPS_B_Y0 (100.0) #define VIPS_B_Z0 (85.2230) /* C temp 6774k. */ #define VIPS_C_X0 (98.0700) #define VIPS_C_Y0 (100.0) #define VIPS_C_Z0 (118.2300) #define VIPS_E_X0 (100.0) #define VIPS_E_Y0 (100.0) #define VIPS_E_Z0 (100.0) #define VIPS_D3250_X0 (105.6590) #define VIPS_D3250_Y0 (100.0) #define VIPS_D3250_Z0 (45.8501) typedef enum { VIPS_INTENT_PERCEPTUAL = 0, VIPS_INTENT_RELATIVE, VIPS_INTENT_SATURATION, VIPS_INTENT_ABSOLUTE } VipsIntent; typedef enum { VIPS_PCS_LAB, VIPS_PCS_XYZ, VIPS_PCS_LAST } VipsPCS; gboolean vips_colourspace_issupported( const VipsImage *image ); int vips_colourspace( VipsImage *in, VipsImage **out, VipsInterpretation space, ... ) __attribute__((sentinel)); int vips_LabQ2sRGB( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_rad2float( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_float2rad( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_LabS2LabQ( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_LabQ2LabS( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_LabQ2Lab( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_Lab2LabQ( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_LCh2Lab( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_Lab2LCh( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_Yxy2Lab( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_CMC2XYZ( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_Lab2XYZ( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_XYZ2Lab( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_XYZ2scRGB( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_scRGB2sRGB( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_sRGB2scRGB( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_scRGB2XYZ( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_LCh2CMC( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_CMC2LCh( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_XYZ2Yxy( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_Yxy2XYZ( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_LabS2Lab( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_Lab2LabS( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_icc_present( void ); int vips_icc_transform( VipsImage *in, VipsImage **out, const char *output_profile, ... ) __attribute__((sentinel)); int vips_icc_import( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_icc_export( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_icc_ac2rc( VipsImage *in, VipsImage **out, const char *profile_filename ); int vips_dE76( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_dE00( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_dECMC( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); void vips_col_Lab2XYZ( float L, float a, float b, float *X, float *Y, float *Z ); void vips_col_XYZ2Lab( float X, float Y, float Z, float *L, float *a, float *b ); double vips_col_ab2h( double a, double b ); void vips_col_ab2Ch( float a, float b, float *C, float *h ); void vips_col_Ch2ab( float C, float h, float *a, float *b ); float vips_col_L2Lcmc( float L ); float vips_col_C2Ccmc( float C ); float vips_col_Ch2hcmc( float C, float h ); void vips_col_make_tables_CMC( void ); float vips_col_Lcmc2L( float Lcmc ); float vips_col_Ccmc2C( float Ccmc ); float vips_col_Chcmc2h( float C, float hcmc ); int vips_col_sRGB2scRGB_8( int r, int g, int b, float *R, float *G, float *B ); int vips_col_sRGB2scRGB_16( int r, int g, int b, float *R, float *G, float *B ); int vips_col_scRGB2XYZ( float R, float G, float B, float *X, float *Y, float *Z ); int vips_col_XYZ2scRGB( float X, float Y, float Z, float *R, float *G, float *B ); int vips_col_scRGB2sRGB_8( float R, float G, float B, int *r, int *g, int *b, int *or_ret ); int vips_col_scRGB2sRGB_16( float R, float G, float B, int *r, int *g, int *b, int *or_ret ); float vips_pythagoras( float L1, float a1, float b1, float L2, float a2, float b2 ); float vips_col_dE00( float L1, float a1, float b1, float L2, float a2, float b2 ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_COLOUR_H*/ vips-7.38.5/libvips/include/vips/freqfilt.h0000644000175000017500000000303112303140253015547 00000000000000/* freq_filt.h * * 2/11/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_FREQFILT_H #define VIPS_FREQFILT_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips_fwfft( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_invfft( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_freqmult( VipsImage *in, VipsImage *mask, VipsImage **out, ... ) __attribute__((sentinel)); int vips_spectrum( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_phasecor( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) __attribute__((sentinel)); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_FREQFILT_H*/ vips-7.38.5/libvips/include/vips/create.h0000644000175000017500000001016412303140253015203 00000000000000/* create.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_CREATE_H #define VIPS_CREATE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips_black( VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_xyz( VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_grey( VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_gaussmat( VipsImage **out, double sigma, double min_ampl, ... ) __attribute__((sentinel)); int vips_logmat( VipsImage **out, double sigma, double min_ampl, ... ) __attribute__((sentinel)); int vips_text( VipsImage **out, const char *text, ... ) __attribute__((sentinel)); int vips_gaussnoise( VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_eye( VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_sines( VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_zone( VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_identity( VipsImage **out, ... ) __attribute__((sentinel)); int vips_buildlut( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_invertlut( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_tonelut( VipsImage **out, ... ) __attribute__((sentinel)); int vips_mask_ideal( VipsImage **out, int width, int height, double frequency_cutoff, ... ) __attribute__((sentinel)); int vips_mask_ideal_ring( VipsImage **out, int width, int height, double frequency_cutoff, double ringwidth, ... ) __attribute__((sentinel)); int vips_mask_ideal_band( VipsImage **out, int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double r, ... ) __attribute__((sentinel)); int vips_mask_butterworth( VipsImage **out, int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, ... ) __attribute__((sentinel)); int vips_mask_butterworth_ring( VipsImage **out, int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, double ringwidth, ... ) __attribute__((sentinel)); int vips_mask_butterworth_band( VipsImage **out, int width, int height, double order, double frequency_cutoff_x, double frequency_cutoff_y, double r, double amplitude_cutoff, ... ) __attribute__((sentinel)); int vips_mask_gaussian( VipsImage **out, int width, int height, double frequency_cutoff, double amplitude_cutoff, ... ) __attribute__((sentinel)); int vips_mask_gaussian_ring( VipsImage **out, int width, int height, double frequency_cutoff, double amplitude_cutoff, double ringwidth, ... ) __attribute__((sentinel)); int vips_mask_gaussian_band( VipsImage **out, int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double r, double amplitude_cutoff, ... ) __attribute__((sentinel)); int vips_mask_fractal( VipsImage **out, int width, int height, double fractal_dimension, ... ) __attribute__((sentinel)); int vips_fractsurf( VipsImage **out, int width, int height, double fractal_dimension, ... ) __attribute__((sentinel)); int im_benchmarkn( VipsImage *in, VipsImage *out, int n ); int im_benchmark2( VipsImage *in, double *out ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_CREATE_H*/ vips-7.38.5/libvips/include/vips/video.h0000644000175000017500000000240212303140253015042 00000000000000/* video.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_VIDEO_H #define IM_VIDEO_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int im_video_v4l1( VipsImage *im, const char *device, int channel, int brightness, int colour, int contrast, int hue, int ngrabs ); int im_video_test( VipsImage *im, int brightness, int error ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_VIDEO_H*/ vips-7.38.5/libvips/include/vips/type.h0000644000175000017500000001264112303140253014723 00000000000000/* the GTypes we define * * 27/10/11 * - from header.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_TYPE_H #define VIPS_TYPE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* A very simple boxed type for testing. Just holds an int. */ typedef struct _VipsThing { int i; } VipsThing; /** * VIPS_TYPE_THING: * * The #GType for a #VipsThing. */ #define VIPS_TYPE_THING (vips_thing_get_type()) GType vips_thing_get_type( void ); VipsThing *vips_thing_new( int i ); int vips_thing_get_i( VipsThing *thing ); /* A ref-counted area of memory. Can hold arrays of things as well. */ typedef struct _VipsArea { void *data; size_t length; /* 0 if not known */ /* If this area represents an array, the number of elements in the * array. Equal to length / sizeof(element). */ int n; /*< private >*/ /* Reference count and lock. * * We could use an atomic int, but this is not a high-traffic data * structure, so a simple GMutex is OK. */ int count; GMutex *lock; /* Things like ICC profiles need their own free functions. */ VipsCallbackFn free_fn; /* If we are holding an array (for example, an array of double), the * GType of the elements and their size. 0 for not known. * * n is always length / sizeof_type, we keep it as a member for * convenience. */ GType type; size_t sizeof_type; } VipsArea; VipsArea *vips_area_copy( VipsArea *area ); void vips_area_unref( VipsArea *area ); void vips__type_leak( void ); VipsArea *vips_area_new( VipsCallbackFn free_fn, void *data ); VipsArea *vips_area_new_blob( VipsCallbackFn free_fn, void *data, size_t length ); VipsArea *vips_area_new_array( GType type, size_t sizeof_type, int n ); VipsArea *vips_area_new_array_object( int n ); void *vips_area_get_data( VipsArea *area, size_t *length, int *n, GType *type, size_t *sizeof_type ); /** * VIPS_TYPE_AREA: * * The #GType for a #VipsArea. */ #define VIPS_TYPE_AREA (vips_area_get_type()) GType vips_area_get_type( void ); /** * VIPS_TYPE_SAVE_STRING: * * The #GType for a #VipsSaveString. */ #define VIPS_TYPE_SAVE_STRING (vips_save_string_get_type()) GType vips_save_string_get_type( void ); /** * VIPS_TYPE_REF_STRING: * * The #GType for a #VipsRefString. */ #define VIPS_TYPE_REF_STRING (vips_ref_string_get_type()) GType vips_ref_string_get_type( void ); /** * VIPS_TYPE_BLOB: * * The %GType for a #VipsBlob. */ #define VIPS_TYPE_BLOB (vips_blob_get_type()) GType vips_blob_get_type( void ); /** * VIPS_TYPE_ARRAY_DOUBLE: * * The #GType for a #VipsArrayDouble. */ #define VIPS_TYPE_ARRAY_DOUBLE (vips_array_double_get_type()) typedef VipsArea VipsArrayDouble; VipsArrayDouble *vips_array_double_new( const double *array, int n ); VipsArrayDouble *vips_array_double_newv( int n, ... ); GType vips_array_double_get_type( void ); /** * VIPS_TYPE_ARRAY_INT: * * The #GType for a #VipsArrayInt. */ #define VIPS_TYPE_ARRAY_INT (vips_array_int_get_type()) typedef VipsArea VipsArrayInt; VipsArrayInt *vips_array_int_new( const int *array, int n ); VipsArrayInt *vips_array_int_newv( int n, ... ); GType vips_array_int_get_type( void ); /** * VIPS_TYPE_ARRAY_IMAGE: * * The #GType for a #VipsArrayImage. */ #define VIPS_TYPE_ARRAY_IMAGE (vips_array_image_get_type()) GType vips_array_image_get_type( void ); void vips_value_set_area( GValue *value, VipsCallbackFn free_fn, void *data ); void *vips_value_get_area( const GValue *value, size_t *length ); const char *vips_value_get_save_string( const GValue *value ); void vips_value_set_save_string( GValue *value, const char *str ); void vips_value_set_save_stringf( GValue *value, const char *fmt, ... ) __attribute__((format(printf, 2, 3))); const char *vips_value_get_ref_string( const GValue *value, size_t *length ); int vips_value_set_ref_string( GValue *value, const char *str ); void *vips_value_get_blob( const GValue *value, size_t *length ); void vips_value_set_blob( GValue *value, VipsCallbackFn free_fn, void *data, size_t length ); void vips_value_set_array( GValue *value, int n, GType type, size_t sizeof_type ); void *vips_value_get_array( const GValue *value, int *n, GType *type, size_t *sizeof_type ); double *vips_value_get_array_double( const GValue *value, int *n ); int vips_value_set_array_double( GValue *value, const double *array, int n ); int *vips_value_get_array_int( const GValue *value, int *n ); int vips_value_set_array_int( GValue *value, const int *array, int n ); GObject **vips_value_get_array_object( const GValue *value, int *n ); int vips_value_set_array_object( GValue *value, int n ); void vips__meta_init_types( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_TYPE_H*/ vips-7.38.5/libvips/include/vips/mosaicing.h0000644000175000017500000000633512303140253015716 00000000000000/* mosaicing.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_MOSAICING_H #define IM_MOSAICING_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include int im_match_linear( VipsImage *ref, VipsImage *sec, VipsImage *out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2 ); int im_match_linear_search( VipsImage *ref, VipsImage *sec, VipsImage *out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int hwindowsize, int hsearchsize ); int im_lrmerge( VipsImage *ref, VipsImage *sec, VipsImage *out, int dx, int dy, int mwidth ); int im_tbmerge( VipsImage *ref, VipsImage *sec, VipsImage *out, int dx, int dy, int mwidth ); int im_lrmerge1( VipsImage *ref, VipsImage *sec, VipsImage *out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ); int im_tbmerge1( VipsImage *ref, VipsImage *sec, VipsImage *out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ); int im_lrmosaic( VipsImage *ref, VipsImage *sec, VipsImage *out, int bandno, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, int balancetype, int mwidth ); int im_tbmosaic( VipsImage *ref, VipsImage *sec, VipsImage *out, int bandno, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, int balancetype, int mwidth ); int im_lrmosaic1( VipsImage *ref, VipsImage *sec, VipsImage *out, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int hwindowsize, int hsearchsize, int balancetype, int mwidth ); int im_tbmosaic1( VipsImage *ref, VipsImage *sec, VipsImage *out, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int hwindowsize, int hsearchsize, int balancetype, int mwidth ); int im_global_balance( VipsImage *in, VipsImage *out, double gamma ); int im_global_balancef( VipsImage *in, VipsImage *out, double gamma ); int im_correl( VipsImage *ref, VipsImage *sec, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, double *correlation, int *x, int *y ); int im_remosaic( VipsImage *in, VipsImage *out, const char *old_str, const char *new_str ); int im_align_bands( VipsImage *in, VipsImage *out ); int im_maxpos_subpel( VipsImage *in, double *x, double *y ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_MOSAICING_H*/ vips-7.38.5/libvips/include/vips/enumtemplate0000644000175000017500000000073312303140253016213 00000000000000/*** BEGIN file-header ***/ #ifndef VIPS_ENUM_TYPES_H #define VIPS_ENUM_TYPES_H G_BEGIN_DECLS /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ GType @enum_name@_get_type (void) G_GNUC_CONST; #define VIPS_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) /*** END value-header ***/ /*** BEGIN file-tail ***/ G_END_DECLS #endif /*VIPS_ENUM_TYPES_H*/ /*** END file-tail ***/ vips-7.38.5/libvips/include/vips/almostdeprecated.h0000644000175000017500000002274612303140253017271 00000000000000/* Old and broken stuff that we still enable by default, but don't document * and certainly don't recommend. * * 30/6/09 * - from vips.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_ALMOSTDEPRECATED_H #define IM_ALMOSTDEPRECATED_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* Was public, now deprecated. */ typedef enum { IM_BBITS_BYTE = 8, IM_BBITS_SHORT = 16, IM_BBITS_INT = 32, IM_BBITS_FLOAT = 32, IM_BBITS_COMPLEX = 64, IM_BBITS_DOUBLE = 64, IM_BBITS_DPCOMPLEX = 128 } VipsBBits; /* Used to define a region of interest for im_extract() etc. Too boring to be * public API, see im_extract_area() etc. */ typedef struct { int xstart; int ystart; int xsize; int ysize; int chsel; /* 1 2 3 or 0, for r g b or all respectively *(channel select) */ } IMAGE_BOX; int im_extract( IMAGE *, IMAGE *, IMAGE_BOX * ); DOUBLEMASK *im_measure( IMAGE *im, IMAGE_BOX *box, int h, int v, int *sel, int nsel, const char *name ); gboolean im_isuint( IMAGE *im ); gboolean im_isint( IMAGE *im ); gboolean im_isfloat( IMAGE *im ); gboolean im_isscalar( IMAGE *im ); gboolean im_iscomplex( IMAGE *im ); int im_c2ps( IMAGE *in, IMAGE *out ); int im_clip( IMAGE *in, IMAGE *out ); #define MASK_IDEAL_HIGHPASS IM_MASK_IDEAL_HIGHPASS #define MASK_IDEAL_LOWPASS IM_MASK_IDEAL_LOWPASS #define MASK_BUTTERWORTH_HIGHPASS IM_MASK_BUTTERWORTH_HIGHPASS #define MASK_BUTTERWORTH_LOWPASS IM_MASK_BUTTERWORTH_LOWPASS #define MASK_GAUSS_HIGHPASS IM_MASK_GAUSS_HIGHPASS #define MASK_GAUSS_LOWPASS IM_MASK_GAUSS_LOWPASS #define MASK_IDEAL_RINGPASS IM_MASK_IDEAL_RINGPASS #define MASK_IDEAL_RINGREJECT IM_MASK_IDEAL_RINGREJECT #define MASK_BUTTERWORTH_RINGPASS IM_MASK_BUTTERWORTH_RINGPASS #define MASK_BUTTERWORTH_RINGREJECT IM_MASK_BUTTERWORTH_RINGREJECT #define MASK_GAUSS_RINGPASS IM_MASK_GAUSS_RINGPASS #define MASK_GAUSS_RINGREJECT IM_MASK_GAUSS_RINGREJECT #define MASK_IDEAL_BANDPASS IM_MASK_IDEAL_BANDPASS #define MASK_IDEAL_BANDREJECT IM_MASK_IDEAL_BANDREJECT #define MASK_BUTTERWORTH_BANDPASS IM_MASK_BUTTERWORTH_BANDPASS #define MASK_BUTTERWORTH_BANDREJECT IM_MASK_BUTTERWORTH_BANDREJECT #define MASK_GAUSS_BANDPASS IM_MASK_GAUSS_BANDPASS #define MASK_GAUSS_BANDREJECT IM_MASK_GAUSS_BANDREJECT #define MASK_FRACTAL_FLT IM_MASK_FRACTAL_FLT #define MaskType ImMaskType /* Copy and swap types. */ typedef enum { IM_ARCH_NATIVE, IM_ARCH_BYTE_SWAPPED, IM_ARCH_LSB_FIRST, IM_ARCH_MSB_FIRST } im_arch_type; gboolean im_isnative( im_arch_type arch ); int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture ); /* Backwards compatibility macros. */ #define im_clear_error_string() im_error_clear() #define im_errorstring() im_error_buffer() /* Deprecated API. */ void im_errormsg( const char *fmt, ... ) __attribute__((format(printf, 1, 2))); void im_verrormsg( const char *fmt, va_list ap ); void im_errormsg_system( int err, const char *fmt, ... ) __attribute__((format(printf, 2, 3))); void im_diagnostics( const char *fmt, ... ) __attribute__((format(printf, 1, 2))); void im_warning( const char *fmt, ... ) __attribute__((format(printf, 1, 2))); int im_iterate( VipsImage *im, VipsStartFn start, im_generate_fn generate, VipsStopFn stop, void *a, void *b ); /* Async rendering. */ int im_render_priority( VipsImage *in, VipsImage *out, VipsImage *mask, int width, int height, int max, int priority, void (*notify)( VipsImage *, VipsRect *, void * ), void *client ); int im_cache( VipsImage *in, VipsImage *out, int width, int height, int max ); /* Deprecated operations. */ int im_cmulnorm( IMAGE *in1, IMAGE *in2, IMAGE *out ); int im_fav4( IMAGE **, IMAGE * ); int im_gadd( double, IMAGE *, double, IMAGE *, double, IMAGE *); int im_litecor( IMAGE *, IMAGE *, IMAGE *, int, double ); int im_render_fade( IMAGE *in, IMAGE *out, IMAGE *mask, int width, int height, int max, int fps, int steps, int priority, void (*notify)( IMAGE *, VipsRect *, void * ), void *client ); int im_render( IMAGE *in, IMAGE *out, IMAGE *mask, int width, int height, int max, void (*notify)( IMAGE *, VipsRect *, void * ), void *client ); int im_cooc_matrix( IMAGE *im, IMAGE *m, int xp, int yp, int xs, int ys, int dx, int dy, int flag ); int im_cooc_asm( IMAGE *m, double *asmoment ); int im_cooc_contrast( IMAGE *m, double *contrast ); int im_cooc_correlation( IMAGE *m, double *correlation ); int im_cooc_entropy( IMAGE *m, double *entropy ); int im_glds_matrix( IMAGE *im, IMAGE *m, int xpos, int ypos, int xsize, int ysize, int dx, int dy ); int im_glds_asm( IMAGE *m, double *asmoment ); int im_glds_contrast( IMAGE *m, double *contrast ); int im_glds_entropy( IMAGE *m, double *entropy ); int im_glds_mean( IMAGE *m, double *mean ); int im_dif_std(); int im_simcontr( IMAGE *out, int xsize, int ysize ); int im_spatres( IMAGE *in, IMAGE *out, int step ); int im_stretch3( IMAGE *in, IMAGE *out, double dx, double dy ); /* Renamed operations. */ /* arithmetic */ int im_remainderconst_vec( IMAGE *in, IMAGE *out, int n, double *c ); /* boolean */ int im_andconst( IMAGE *, IMAGE *, double ); int im_and_vec( IMAGE *, IMAGE *, int, double * ); int im_orconst( IMAGE *, IMAGE *, double ); int im_or_vec( IMAGE *, IMAGE *, int, double * ); int im_eorconst( IMAGE *, IMAGE *, double ); int im_eor_vec( IMAGE *, IMAGE *, int, double * ); /* mosaicing */ int im_affine( IMAGE *in, IMAGE *out, double a, double b, double c, double d, double dx, double dy, int ox, int oy, int ow, int oh ); int im_similarity( IMAGE *in, IMAGE *out, double a, double b, double dx, double dy ); int im_similarity_area( IMAGE *in, IMAGE *out, double a, double b, double dx, double dy, int ox, int oy, int ow, int oh ); /* colour */ int im_icc_export( IMAGE *in, IMAGE *out, const char *output_profile_filename, int intent ); /* conversion */ int im_clip2dcm( IMAGE *in, IMAGE *out ); int im_clip2cm( IMAGE *in, IMAGE *out ); int im_clip2us( IMAGE *in, IMAGE *out ); int im_clip2ui( IMAGE *in, IMAGE *out ); int im_clip2s( IMAGE *in, IMAGE *out ); int im_clip2i( IMAGE *in, IMAGE *out ); int im_clip2d( IMAGE *in, IMAGE *out ); int im_clip2f( IMAGE *in, IMAGE *out ); int im_clip2c( IMAGE *in, IMAGE *out ); int im_slice( IMAGE *in, IMAGE *out, double, double ); int im_thresh( IMAGE *in, IMAGE *out, double ); int im_print( const char *message ); int im_convsub( IMAGE *in, IMAGE *out, INTMASK *mask, int xskip, int yskip ); int im_bernd( const char *tiffname, int x, int y, int w, int h ); int im_resize_linear( IMAGE *, IMAGE *, int, int ); int im_convf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ); int im_convsepf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ); int im_conv_raw( IMAGE *in, IMAGE *out, INTMASK *mask ); int im_convf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ); int im_convsep_raw( IMAGE *in, IMAGE *out, INTMASK *mask ); int im_convsepf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ); int im_fastcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out ); int im_spcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out ); int im_gradcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out ); int im_contrast_surface_raw( IMAGE *in, IMAGE *out, int half_win_size, int spacing ); int im_stdif_raw( IMAGE *in, IMAGE *out, double a, double m0, double b, double s0, int xwin, int ywin ); int im_lhisteq_raw( IMAGE *in, IMAGE *out, int xwin, int ywin ); int im_erode_raw( IMAGE *in, IMAGE *out, INTMASK *m ); int im_dilate_raw( IMAGE *in, IMAGE *out, INTMASK *m ); int im_rank_raw( IMAGE *in, IMAGE *out, int xsize, int ysize, int order ); /* inplace */ int im_circle( IMAGE *im, int cx, int cy, int radius, int intensity ); int im_line( IMAGE *, int, int, int, int, int ); int im_segment( IMAGE *test, IMAGE *mask, int *segments ); int im_paintrect( IMAGE *im, VipsRect *r, PEL *ink ); int im_insertplace( IMAGE *main, IMAGE *sub, int x, int y ); int im_flood_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink ); int im_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink ); int im_flood_other_copy( IMAGE *test, IMAGE *mark, IMAGE *out, int x, int y, int serial ); int im_flood( IMAGE *im, int x, int y, PEL *ink, VipsRect *dout ); int im_flood_blob( IMAGE *im, int x, int y, PEL *ink, VipsRect *dout ); int im_flood_other( IMAGE *test, IMAGE *mark, int x, int y, int serial, VipsRect *dout ); int im_fastline( IMAGE *im, int x1, int y1, int x2, int y2, PEL *pel ); int im_fastlineuser( IMAGE *im, int x1, int y1, int x2, int y2, int (*fn)(), void *client1, void *client2, void *client3 ); int im_plotmask( IMAGE *im, int ix, int iy, PEL *ink, PEL *mask, VipsRect *r ); int im_readpoint( IMAGE *im, int x, int y, PEL *pel ); int im_plotpoint( IMAGE *im, int x, int y, PEL *pel ); int im_smudge( IMAGE *image, int ix, int iy, VipsRect *r ); int im_smear( IMAGE *im, int ix, int iy, VipsRect *r ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_ALMOSTDEPRECATED_H*/ vips-7.38.5/libvips/include/vips/convolution.h0000644000175000017500000000342412303140253016320 00000000000000/* convolution.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_CONVOLUTION_H #define IM_CONVOLUTION_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ typedef enum { VIPS_PRECISION_INTEGER, VIPS_PRECISION_FLOAT, VIPS_PRECISION_APPROXIMATE, VIPS_PRECISION_LAST } VipsPrecision; typedef enum { VIPS_COMBINE_MAX, VIPS_COMBINE_SUM, VIPS_COMBINE_LAST } VipsCombine; int vips_conv( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) __attribute__((sentinel)); int vips_compass( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) __attribute__((sentinel)); int vips_convsep( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) __attribute__((sentinel)); int vips_sharpen( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_gaussblur( VipsImage *in, VipsImage **out, int radius, ... ) __attribute__((sentinel)); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_CONVOLUTION_H*/ vips-7.38.5/libvips/include/vips/Makefile.in0000644000175000017500000005206712303144055015650 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/include/vips DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/version.h.in $(pkginclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = version.h CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ pkginclude_HEADERS = \ basic.h \ type.h \ gate.h \ almostdeprecated.h \ deprecated.h \ arithmetic.h \ buf.h \ colour.h \ conversion.h \ convolution.h \ debug.h \ dispatch.h \ enumtypes.h \ error.h \ operation.h \ format.h \ foreign.h \ inplace.h \ generate.h \ header.h \ histogram.h \ freqfilt.h \ image.h \ interpolate.h \ intl.h \ mask.h \ memory.h \ morphology.h \ mosaicing.h \ create.h \ video.h \ cimg_funcs.h \ object.h \ private.h \ rect.h \ region.h \ relational.h \ resample.h \ semaphore.h \ threadpool.h \ thread.h \ transform.h \ util.h \ version.h \ vector.h \ vips7compat.h \ vips.h EXTRA_DIST = version.h.in internal.h enumtemplate # the headers we scan for enums etc. # keep in sync with ${top_srcdir}/libvips/iofuncs/Makefile.am # we need absolute filenames here since this list appears in the src dir as # well vips_scan_headers = \ ${top_srcdir}/libvips/include/vips/memory.h \ ${top_srcdir}/libvips/include/vips/foreign.h \ ${top_srcdir}/libvips/include/vips/arithmetic.h \ ${top_srcdir}/libvips/include/vips/conversion.h \ ${top_srcdir}/libvips/include/vips/util.h \ ${top_srcdir}/libvips/include/vips/image.h \ ${top_srcdir}/libvips/include/vips/colour.h \ ${top_srcdir}/libvips/include/vips/operation.h \ ${top_srcdir}/libvips/include/vips/convolution.h \ ${top_srcdir}/libvips/include/vips/morphology.h \ ${top_srcdir}/libvips/include/vips/object.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/include/vips/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/include/vips/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): version.h: $(top_builddir)/config.status $(srcdir)/version.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgincludeHEADERS install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgincludeHEADERS vipsc++.h: vips --cpph all > vipsc++.h enumtypes.h: $(vips_scan_headers) Makefile glib-mkenums --template enumtemplate \ $(vips_scan_headers) > xgen-geth && \ ( cmp -s xgen-geth enumtypes.h || cp xgen-geth enumtypes.h ) && \ rm -f xgen-geth # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/include/vips/object.h0000644000175000017500000005014212303141142015204 00000000000000/* abstract base class for all vips objects */ /* Copyright (C) 1991-2003 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_OBJECT_H #define VIPS_OBJECT_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* Handy! */ #ifdef VIPS_DEBUG #define VIPS_UNREF( X ) G_STMT_START { \ if( X ) { \ g_assert( G_OBJECT( X )->ref_count > 0 ); \ g_object_unref( X ); \ (X) = 0; \ } \ } G_STMT_END #else /*!VIPS_DEBUG*/ #define VIPS_UNREF( X ) VIPS_FREEF( g_object_unref, (X) ) #endif /*VIPS_DEBUG*/ typedef struct _VipsObject VipsObject; typedef struct _VipsObjectClass VipsObjectClass; /* Track extra stuff for arguments to objects */ /** * VipsArgumentFlags: * @VIPS_ARGUMENT_NONE: no flags * @VIPS_ARGUMENT_REQUIRED: must be set in the constructor * @VIPS_ARGUMENT_CONSTRUCT: can only be set in the constructor * @VIPS_ARGUMENT_SET_ONCE: can only be set once * @VIPS_ARGUMENT_SET_ALWAYS: don't do use-before-set checks * @VIPS_ARGUMENT_INPUT: is an input argument (one we depend on) * @VIPS_ARGUMENT_OUTPUT: is an output argument (depends on us) * @VIPS_ARGUMENT_DEPRECATED: just there for back-compat, hide * * Flags we associate with each object argument. * * Have separate input & output flags. Both set is an error; neither set is OK. * * Input gobjects are automatically reffed, output gobjects automatically ref * us. We also automatically watch for "destroy" and unlink. * * @VIPS_ARGUMENT_SET_ALWAYS is handy for arguments which are set from C. For * example, VipsImage::width is a property that gives access to the Xsize * member of struct _VipsImage. We default its 'assigned' to TRUE * since the field is always set directly by C. * * @VIPS_ARGUMENT_DEPRECATED arguments are not shown in help text, are not * looked for if required, are not checked for "have-been-set". You can * deprecate a required argument, but you must obviously add a new required * argument if you do. */ typedef enum /*< flags >*/ { VIPS_ARGUMENT_NONE = 0, VIPS_ARGUMENT_REQUIRED = 1, VIPS_ARGUMENT_CONSTRUCT = 2, VIPS_ARGUMENT_SET_ONCE = 4, VIPS_ARGUMENT_SET_ALWAYS = 8, VIPS_ARGUMENT_INPUT = 16, VIPS_ARGUMENT_OUTPUT = 32, VIPS_ARGUMENT_DEPRECATED = 64 } VipsArgumentFlags; /* Useful flag combinations. User-visible ones are: VIPS_ARGUMENT_REQUIRED_INPUT Eg. the "left" argument for an add operation VIPS_ARGUMENT_OPTIONAL_INPUT Eg. the "caption" for an object VIPS_ARGUMENT_REQUIRED_OUTPUT Eg. the "result" of an add operation VIPS_ARGUMENT_OPTIONAL_OUTPUT Eg. the x pos of the image minimum Other combinations are used internally, eg. supplying the cast-table for an arithmetic operation */ #define VIPS_ARGUMENT_REQUIRED_INPUT \ (VIPS_ARGUMENT_INPUT | \ VIPS_ARGUMENT_REQUIRED | \ VIPS_ARGUMENT_CONSTRUCT) #define VIPS_ARGUMENT_OPTIONAL_INPUT \ (VIPS_ARGUMENT_INPUT | \ VIPS_ARGUMENT_CONSTRUCT) #define VIPS_ARGUMENT_REQUIRED_OUTPUT \ (VIPS_ARGUMENT_OUTPUT | \ VIPS_ARGUMENT_REQUIRED | \ VIPS_ARGUMENT_CONSTRUCT) #define VIPS_ARGUMENT_OPTIONAL_OUTPUT \ (VIPS_ARGUMENT_OUTPUT | \ VIPS_ARGUMENT_CONSTRUCT) extern int _vips__argument_id; #define VIPS_ARG_IMAGE( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_object( (NAME), (LONG), (DESC), \ VIPS_TYPE_IMAGE, \ G_PARAM_READWRITE ); \ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_INTERPOLATE( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_object( (NAME), (LONG), (DESC), \ VIPS_TYPE_INTERPOLATE, \ G_PARAM_READWRITE ); \ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_BOOL( CLASS, NAME, PRIORITY, LONG, DESC, \ FLAGS, OFFSET, VALUE ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_boolean( (NAME), (LONG), (DESC), \ (VALUE), \ G_PARAM_READWRITE ); \ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_DOUBLE( CLASS, NAME, PRIORITY, LONG, DESC, \ FLAGS, OFFSET, MIN, MAX, VALUE ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_double( (NAME), (LONG), (DESC), \ (MIN), (MAX), (VALUE), \ G_PARAM_READWRITE );\ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_BOXED( CLASS, NAME, PRIORITY, LONG, DESC, \ FLAGS, OFFSET, TYPE ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_boxed( (NAME), (LONG), (DESC), \ (TYPE), \ G_PARAM_READWRITE );\ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_INT( CLASS, NAME, PRIORITY, LONG, DESC, \ FLAGS, OFFSET, MIN, MAX, VALUE ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_int( (NAME), (LONG), (DESC), \ (MIN), (MAX), (VALUE), \ G_PARAM_READWRITE );\ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_UINT64( CLASS, NAME, PRIORITY, LONG, DESC, \ FLAGS, OFFSET, MIN, MAX, VALUE ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_uint64( (NAME), (LONG), (DESC), \ (MIN), (MAX), (VALUE), \ G_PARAM_READWRITE );\ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_ENUM( CLASS, NAME, PRIORITY, LONG, DESC, \ FLAGS, OFFSET, TYPE, VALUE ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_enum( (NAME), (LONG), (DESC), \ (TYPE), (VALUE), \ G_PARAM_READWRITE );\ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_FLAGS( CLASS, NAME, PRIORITY, LONG, DESC, \ FLAGS, OFFSET, TYPE, VALUE ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_flags( (NAME), (LONG), (DESC), \ (TYPE), (VALUE), \ G_PARAM_READWRITE );\ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_STRING( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, \ VALUE ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_string( (NAME), (LONG), (DESC), \ (VALUE), \ G_PARAM_READWRITE ); \ g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } #define VIPS_ARG_POINTER( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET ) { \ GParamSpec *pspec; \ \ pspec = g_param_spec_pointer( (NAME), (LONG), (DESC), \ G_PARAM_READWRITE ); \ g_object_class_install_property( gobject_class, \ _vips__argument_id++, pspec ); \ vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \ pspec, (FLAGS), (PRIORITY), (OFFSET) ); \ } /* Keep one of these for every argument. */ typedef struct _VipsArgument { GParamSpec *pspec; /* pspec for this argument */ /* More stuff, see below */ } VipsArgument; /* Keep one of these in the class struct for every argument. */ typedef struct _VipsArgumentClass { VipsArgument parent; /* The class of the object we are an arg for. */ VipsObjectClass *object_class; VipsArgumentFlags flags; int priority; /* Order args by this */ guint offset; /* G_STRUCT_OFFSET of member in object */ } VipsArgumentClass; /* Keep one of these in the object struct for every argument instance. */ typedef struct _VipsArgumentInstance { VipsArgument parent; /* The class we are part of. */ VipsArgumentClass *argument_class; /* The object we are attached to. */ VipsObject *object; /* Has been set. */ gboolean assigned; /* If this is an output argument, keep the id of our "close" handler * here. */ gulong close_id; } VipsArgumentInstance; /* Need to look up our VipsArgument structs from a pspec. Just hash the * pointer (ie. we assume pspecs are never shared, is this correct?) */ typedef GHashTable VipsArgumentTable; VipsArgumentInstance *vips__argument_get_instance( VipsArgumentClass *, VipsObject * ); VipsArgument *vips__argument_table_lookup( VipsArgumentTable *, GParamSpec * ); void vips__object_set_member( VipsObject *object, GParamSpec *pspec, GObject **member, GObject *argument ); typedef void *(*VipsArgumentMapFn)( VipsObject *, GParamSpec *, VipsArgumentClass *, VipsArgumentInstance *, void *a, void *b ); void *vips_argument_map( VipsObject *object, VipsArgumentMapFn fn, void *a, void *b ); typedef void *(*VipsArgumentClassMapFn)( VipsObjectClass *, GParamSpec *, VipsArgumentClass *, void *a, void *b ); void *vips_argument_class_map( VipsObjectClass *object_class, VipsArgumentClassMapFn fn, void *a, void *b ); int vips_object_get_argument( VipsObject *object, const char *name, GParamSpec **pspec, VipsArgumentClass **argument_class, VipsArgumentInstance **argument_instance ); gboolean vips_object_argument_isset( VipsObject *object, const char *name ); VipsArgumentFlags vips_object_get_argument_flags( VipsObject *object, const char *name ); int vips_object_get_argument_priority( VipsObject *object, const char *name ); /* We have to loop over an objects args in several places, and we can't always * use vips_argument_map(), the preferred looper. Have the loop code as a * macro as well for these odd cases. */ #define VIPS_ARGUMENT_FOR_ALL( OBJECT, PSPEC, ARG_CLASS, ARG_INSTANCE ) { \ VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( OBJECT ); \ GSList *p; \ \ for( p = object_class->argument_table_traverse; p; p = p->next ) { \ VipsArgumentClass *ARG_CLASS = \ (VipsArgumentClass *) p->data; \ VipsArgument *argument = (VipsArgument *) argument_class; \ GParamSpec *PSPEC = argument->pspec; \ VipsArgumentInstance *ARG_INSTANCE __attribute__ ((unused)) = \ vips__argument_get_instance( argument_class, \ VIPS_OBJECT( OBJECT ) ); \ #define VIPS_ARGUMENT_FOR_ALL_END } } /* And some macros to collect args from a va list. * * Use something like this: GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; if( vips_object_get_argument( VIPS_OBJECT( operation ), name, &pspec, &argument_class, &argument_instance ) ) return( -1 ); VIPS_ARGUMENT_COLLECT_SET( pspec, argument_class, ap ); GValue value holds the value of an input argument, do something with it VIPS_ARGUMENT_COLLECT_GET( pspec, argument_class, ap ); void **arg points to where to write an output argument VIPS_ARGUMENT_COLLECT_END */ #define VIPS_ARGUMENT_COLLECT_SET( PSPEC, ARG_CLASS, AP ) \ if( (ARG_CLASS->flags & VIPS_ARGUMENT_INPUT) ) { \ GValue value = { 0, }; \ gchar *error = NULL; \ \ /* Input args are given inline, eg. ("factor", 12.0) \ * and must be collected. \ */ \ g_value_init( &value, G_PARAM_SPEC_VALUE_TYPE( PSPEC ) ); \ G_VALUE_COLLECT( &value, AP, 0, &error ); \ \ /* Don't bother with the error message. \ */ \ if( error ) { \ VIPS_DEBUG_MSG( "VIPS_OBJECT_COLLECT_SET: err\n" ); \ g_free( error ); \ } #define VIPS_ARGUMENT_COLLECT_GET( PSPEC, ARG_CLASS, AP ) \ g_value_unset( &value ); \ } \ else if( (ARG_CLASS->flags & VIPS_ARGUMENT_OUTPUT) ) { \ void **arg __attribute__ ((unused)); \ \ /* Output args are a pointer to where to send the \ * result. \ */ \ arg = va_arg( AP, void ** ); #define VIPS_ARGUMENT_COLLECT_END \ } #define VIPS_TYPE_OBJECT (vips_object_get_type()) #define VIPS_OBJECT( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), VIPS_TYPE_OBJECT, VipsObject )) #define VIPS_OBJECT_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), VIPS_TYPE_OBJECT, VipsObjectClass)) #define VIPS_IS_OBJECT( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_OBJECT )) #define VIPS_IS_OBJECT_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_OBJECT )) #define VIPS_OBJECT_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), VIPS_TYPE_OBJECT, VipsObjectClass )) struct _VipsObject { GObject parent_object; /* Set after ->build() has run succesfully: construct is fully done * and checked. */ gboolean constructed; /* Set for static objects which are allocated at startup and never * freed. These objects are ommitted from leak reports. */ gboolean static_object; /* Table of argument instances for this class and any derived classes. */ VipsArgumentTable *argument_table; /* Class properties (see below), duplicated in the instance so we can * get at them easily via the property system. */ char *nickname; char *description; /* The pre/post/close callbacks are all fire-once. */ gboolean preclose; gboolean close; gboolean postclose; /* Total memory allocated relative to this object, handy for * profiling. */ size_t local_memory; }; struct _VipsObjectClass { GObjectClass parent_class; /* Build the object ... all argument properties have been set, * now build the thing. */ int (*build)( VipsObject *object ); /* Try to print something about the class, handy for help displays. * Keep to one line. */ void (*summary_class)( struct _VipsObjectClass *, VipsBuf * ); /* Try to print a one-line summary for the object, the user can see * this output via things like "header fred.tif", --vips-cache-trace, * etc. */ void (*summary)( VipsObject *, VipsBuf * ); /* Try to print everything about the object, handy for debugging. */ void (*dump)( VipsObject *, VipsBuf * ); /* Sanity-check the object. Print messages and stuff. * Handy for debugging. */ void (*sanity)( VipsObject *, VipsBuf * ); /* Rewind. Save and restore any stuff that needs to survive a * dispose(). */ void (*rewind)( VipsObject * ); /* Just before close, everything is still alive. */ void (*preclose)( VipsObject * ); /* Close, time to free stuff. */ void (*close)( VipsObject * ); /* Post-close, everything is dead, except the VipsObject pointer. * Useful for eg. deleting the file associated with a temp image. */ void (*postclose)( VipsObject * ); /* The CLI interface. Implement these four to get CLI input and output * for your object. */ /* Given a command-line arg (eg. a filename), make an instance of the * object. Just do the g_object_new(), don't call _build(). * * Don't call this directly, see vips_object_new_from_string(). */ VipsObject *(*new_from_string)( const char *string ); /* The inverse of ^^. Given an object, output what ->new_from_string() * would have been given to make that object. */ void (*to_string)( VipsObject *, VipsBuf * ); /* Does this output arg need an arg from the command line? Image * output, for example, needs a filename to write to. */ gboolean output_needs_arg; /* Write the object to the string. Return 0 for success, or -1 on * error, setting vips_error(). string is NULL if output_needs_arg() * was FALSE. */ int (*output_to_arg)( VipsObject *object, const char *string ); /* Class nickname, eg. "VipsInterpolateBicubic" has "bicubic" as a * nickname. Not internationalised. */ const char *nickname; /* Class description. Used for help messages, so internationalised. */ const char *description; /* Hash from pspec to VipsArgumentClass. * * This records the VipsArgumentClass for every pspec used in * VipsObject and any subclass (ie. everywhere), so it's huge. Don't * loop over this hash! Fine for lookups though. */ VipsArgumentTable *argument_table; /* A sorted (by priority) list of the VipsArgumentClass for this class * and any superclasses. This is small and specific to this class. * * Use the stored GType to work out when to restart the list for a * subclass. */ GSList *argument_table_traverse; GType argument_table_traverse_gtype; }; gboolean vips_value_is_null( GParamSpec *psoec, const GValue *value ); void vips_object_set_property( GObject *gobject, guint property_id, const GValue *value, GParamSpec *pspec ); void vips_object_get_property( GObject *gobject, guint property_id, GValue *value, GParamSpec *pspec ); void vips_object_preclose( VipsObject *object ); int vips_object_build( VipsObject *object ); void vips_object_summary_class( VipsObjectClass *klass, VipsBuf *buf ); void vips_object_summary( VipsObject *object, VipsBuf *buf ); void vips_object_dump( VipsObject *object, VipsBuf *buf ); void vips_object_print_summary_class( VipsObjectClass *klass ); void vips_object_print_summary( VipsObject *object ); void vips_object_print_dump( VipsObject *object ); void vips_object_print_name( VipsObject *object ); gboolean vips_object_sanity( VipsObject *object ); GType vips_object_get_type( void ); void vips_object_class_install_argument( VipsObjectClass *, GParamSpec *pspec, VipsArgumentFlags flags, int priority, guint offset ); int vips_object_set_argument_from_string( VipsObject *object, const char *name, const char *value ); gboolean vips_object_argument_needsstring( VipsObject *object, const char *name ); int vips_object_get_argument_to_string( VipsObject *object, const char *name, const char *arg ); int vips_object_set_required( VipsObject *object, const char *value ); typedef void *(*VipsObjectSetArguments)( VipsObject *, void *, void * ); VipsObject *vips_object_new( GType type, VipsObjectSetArguments set, void *a, void *b ); int vips_object_set_valist( VipsObject *object, va_list ap ); int vips_object_set( VipsObject *object, ... ) __attribute__((sentinel)); VipsObject *vips_object_new_from_string( VipsObjectClass *object_class, const char *p ); void vips_object_to_string( VipsObject *object, VipsBuf *buf ); void *vips_object_map( VipsSListMap2Fn fn, void *a, void *b ); typedef void *(*VipsTypeMapFn)( GType, void * ); typedef void *(*VipsTypeMap2Fn)( GType, void *, void * ); typedef void *(*VipsClassMapFn)( VipsObjectClass *, void * ); void *vips_type_map( GType base, VipsTypeMap2Fn fn, void *a, void *b ); void *vips_type_map_all( GType base, VipsTypeMapFn fn, void *a ); int vips_type_depth( GType type ); GType vips_type_find( const char *basename, const char *nickname ); void *vips_class_map_all( GType base, VipsClassMapFn fn, void *a ); VipsObjectClass *vips_class_find( const char *basename, const char *nickname ); VipsObject **vips_object_local_array( VipsObject *parent, int n ); void vips_object_local_cb( VipsObject *vobject, GObject *gobject ); #define vips_object_local( V, G ) \ (g_signal_connect( V, "close", \ G_CALLBACK( vips_object_local_cb ), G ), 0) void vips_object_set_static( VipsObject *object, gboolean static_object ); void vips_object_print_all( void ); void vips_object_sanity_all( void ); void vips_object_rewind( VipsObject *object ); void vips_object_unref_outputs( VipsObject *object ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_OBJECT_H*/ vips-7.38.5/libvips/include/vips/Makefile.am0000644000175000017500000000322612303141142015622 00000000000000pkginclude_HEADERS = \ basic.h \ type.h \ gate.h \ almostdeprecated.h \ deprecated.h \ arithmetic.h \ buf.h \ colour.h \ conversion.h \ convolution.h \ debug.h \ dispatch.h \ enumtypes.h \ error.h \ operation.h \ format.h \ foreign.h \ inplace.h \ generate.h \ header.h \ histogram.h \ freqfilt.h \ image.h \ interpolate.h \ intl.h \ mask.h \ memory.h \ morphology.h \ mosaicing.h \ create.h \ video.h \ cimg_funcs.h \ object.h \ private.h \ rect.h \ region.h \ relational.h \ resample.h \ semaphore.h \ threadpool.h \ thread.h \ transform.h \ util.h \ version.h \ vector.h \ vips7compat.h \ vips.h vipsc++.h: vips --cpph all > vipsc++.h EXTRA_DIST = version.h.in internal.h enumtemplate # the headers we scan for enums etc. # keep in sync with ${top_srcdir}/libvips/iofuncs/Makefile.am # we need absolute filenames here since this list appears in the src dir as # well vips_scan_headers = \ ${top_srcdir}/libvips/include/vips/memory.h \ ${top_srcdir}/libvips/include/vips/foreign.h \ ${top_srcdir}/libvips/include/vips/arithmetic.h \ ${top_srcdir}/libvips/include/vips/conversion.h \ ${top_srcdir}/libvips/include/vips/util.h \ ${top_srcdir}/libvips/include/vips/image.h \ ${top_srcdir}/libvips/include/vips/colour.h \ ${top_srcdir}/libvips/include/vips/operation.h \ ${top_srcdir}/libvips/include/vips/convolution.h \ ${top_srcdir}/libvips/include/vips/morphology.h \ ${top_srcdir}/libvips/include/vips/object.h enumtypes.h: $(vips_scan_headers) Makefile glib-mkenums --template enumtemplate \ $(vips_scan_headers) > xgen-geth && \ ( cmp -s xgen-geth enumtypes.h || cp xgen-geth enumtypes.h ) && \ rm -f xgen-geth vips-7.38.5/libvips/include/vips/buf.h0000644000175000017500000000600112303140253014507 00000000000000/* A static string buffer, with overflow protection. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_BUF_H #define VIPS_BUF_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include /* A string in the process of being written to ... multiple calls to * vips_buf_append add to it. On overflow append "..." and block further * writes. */ typedef struct _VipsBuf { /* All fields are private. */ /*< private >*/ char *base; /* String base */ int mx; /* Maximum length */ int i; /* Current write point */ gboolean full; /* String has filled, block writes */ int lasti; /* For read-recent */ gboolean dynamic; /* We own the string with malloc() */ } VipsBuf; #define VIPS_BUF_STATIC( TEXT ) \ { &TEXT[0], sizeof( TEXT ), 0, FALSE, 0, FALSE } /* Init and append to one of the above. */ void vips_buf_rewind( VipsBuf *buf ); void vips_buf_destroy( VipsBuf *buf ); void vips_buf_init( VipsBuf *buf ); void vips_buf_set_static( VipsBuf *buf, char *base, int mx ); void vips_buf_set_dynamic( VipsBuf *buf, int mx ); void vips_buf_init_static( VipsBuf *buf, char *base, int mx ); void vips_buf_init_dynamic( VipsBuf *buf, int mx ); gboolean vips_buf_appendns( VipsBuf *buf, const char *str, int sz ); gboolean vips_buf_appends( VipsBuf *buf, const char *str ); gboolean vips_buf_appendf( VipsBuf *buf, const char *fmt, ... ) __attribute__((format(printf, 2, 3))); gboolean vips_buf_vappendf( VipsBuf *buf, const char *fmt, va_list ap ); gboolean vips_buf_appendc( VipsBuf *buf, char ch ); gboolean vips_buf_appendsc( VipsBuf *buf, gboolean quote, const char *str ); gboolean vips_buf_appendgv( VipsBuf *buf, GValue *value ); gboolean vips_buf_append_size( VipsBuf *buf, size_t n ); gboolean vips_buf_removec( VipsBuf *buf, char ch ); gboolean vips_buf_change( VipsBuf *buf, const char *o, const char *n ); gboolean vips_buf_is_empty( VipsBuf *buf ); gboolean vips_buf_is_full( VipsBuf *buf ); const char *vips_buf_all( VipsBuf *buf ); const char *vips_buf_firstline( VipsBuf *buf ); gboolean vips_buf_appendg( VipsBuf *buf, double g ); gboolean vips_buf_appendd( VipsBuf *buf, int d ); int vips_buf_len( VipsBuf *buf ); #endif /*VIPS_BUF_H*/ #ifdef __cplusplus } #endif /*__cplusplus*/ vips-7.38.5/libvips/include/vips/foreign.h0000644000175000017500000003612612303140253015377 00000000000000/* Base type for supported image foreigns. Subclass this to add a new * foreign. */ /* This foreign is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These foreigns are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_FOREIGN_H #define VIPS_FOREIGN_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #define VIPS_TYPE_FOREIGN (vips_foreign_get_type()) #define VIPS_FOREIGN( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_FOREIGN, VipsForeign )) #define VIPS_FOREIGN_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_FOREIGN, VipsForeignClass)) #define VIPS_IS_FOREIGN( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN )) #define VIPS_IS_FOREIGN_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN )) #define VIPS_FOREIGN_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_FOREIGN, VipsForeignClass )) typedef struct _VipsForeign { VipsOperation parent_object; /*< public >*/ } VipsForeign; typedef struct _VipsForeignClass { VipsOperationClass parent_class; /*< public >*/ /* Loop over formats in this order, default 0. We need this because * some formats can be read by several loaders (eg. tiff can be read * by the libMagick loader as well as by the tiff loader), and we want * to make sure the better loader comes first. */ int priority; /* Null-terminated list of recommended suffixes, eg. ".tif", ".tiff". * This can be used by both load and save, so it's in the base class. */ const char **suffs; } VipsForeignClass; GType vips_foreign_get_type( void ); /* Map over and find formats. This uses type introspection to loop over * subclasses of VipsForeign. */ void *vips_foreign_map( const char *base, VipsSListMap2Fn fn, void *a, void *b ); /* Image file load properties. * * Keep in sync with the deprecated VipsFormatFlags, we need to be able to * cast between them. */ typedef enum /*< flags >*/ { VIPS_FOREIGN_NONE = 0, /* No flags set */ VIPS_FOREIGN_PARTIAL = 1, /* Lazy read OK (eg. tiled tiff) */ VIPS_FOREIGN_BIGENDIAN = 2, /* Most-significant byte first */ VIPS_FOREIGN_SEQUENTIAL = 4, /* Top-to-bottom lazy read OK */ VIPS_FOREIGN_ALL = 7 /* All flags set */ } VipsForeignFlags; #define VIPS_TYPE_FOREIGN_LOAD (vips_foreign_load_get_type()) #define VIPS_FOREIGN_LOAD( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoad )) #define VIPS_FOREIGN_LOAD_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoadClass)) #define VIPS_IS_FOREIGN_LOAD( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN_LOAD )) #define VIPS_IS_FOREIGN_LOAD_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN_LOAD )) #define VIPS_FOREIGN_LOAD_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoadClass )) typedef struct _VipsForeignLoad { VipsForeign parent_object; /*< private >*/ /* Open to disc (default is to open to memory). */ gboolean disc; /* Type of access upstream wants and the loader must supply. */ VipsAccess access; /* Flags for this load operation. */ VipsForeignFlags flags; /* Deprecated and unused, just here for compat. */ gboolean sequential; /*< public >*/ /* The image we generate. This must be set by ->header(). */ VipsImage *out; /* The behind-the-scenes real image we decompress to. This can be a * disc foreign or a memory buffer. This must be set by ->load(). */ VipsImage *real; /* Set this to tag the operation as nocache. */ gboolean nocache; } VipsForeignLoad; typedef struct _VipsForeignLoadClass { VipsForeignClass parent_class; /*< public >*/ /* Is a file in this format. * * This function should return %TRUE if the file contains an image of * this type. If you don't define this function, #VipsForeignLoad * will use @suffs instead. */ gboolean (*is_a)( const char * ); /* Get the flags from a filename. * * This function should examine the file and return a set * of flags. If you don't define it, vips will default to 0 (no flags * set). * * This operation is necessary for vips7 compatibility. */ VipsForeignFlags (*get_flags_filename)( const char * ); /* Get the flags for this load operation. Images can be loaded from * (for example) memory areas rather than files, so you can't just use * @get_flags_filename(). */ VipsForeignFlags (*get_flags)( VipsForeignLoad * ); /* Do the minimum read we can. * * Set the header fields in @out from @filename. If you can read the * whole image as well with no performance cost (as with vipsload), * or if your loader does not support reading only the header, read * the entire image in this method and leave @load() NULL. * * @header() needs to set the dhint on the image .. otherwise you get * the default SMALLTILE. * * Return 0 for success, -1 for error, setting * vips_error(). */ int (*header)( VipsForeignLoad * ); /* Read the whole image into @real. The pixels will get copied to @out * later. * * You can omit this method if you define a @header() method which * loads the whole file. * * Return 0 for success, -1 for error, setting * vips_error(). */ int (*load)( VipsForeignLoad * ); } VipsForeignLoadClass; GType vips_foreign_load_get_type( void ); const char *vips_foreign_find_load( const char *filename ); const char *vips_foreign_find_load_options( const char *filename ); VipsForeignFlags vips_foreign_flags( const char *loader, const char *filename ); gboolean vips_foreign_is_a( const char *loader, const char *filename ); #define VIPS_TYPE_FOREIGN_SAVE (vips_foreign_save_get_type()) #define VIPS_FOREIGN_SAVE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_FOREIGN_SAVE, VipsForeignSave )) #define VIPS_FOREIGN_SAVE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_FOREIGN_SAVE, VipsForeignSaveClass)) #define VIPS_IS_FOREIGN_SAVE( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN_SAVE )) #define VIPS_IS_FOREIGN_SAVE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN_SAVE )) #define VIPS_FOREIGN_SAVE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_FOREIGN_SAVE, VipsForeignSaveClass )) /** * VipsSaveable: * @VIPS_SAVEABLE_MONO: 1 band (eg. CSV) * @VIPS_SAVEABLE_RGB: 1 or 3 bands (eg. PPM) * @VIPS_SAVEABLE_RGBA: 1, 2, 3 or 4 bands (eg. PNG) * @VIPS_SAVEABLE_RGB_CMYK: 1, 3 or 4 bands (eg. JPEG) * @VIPS_SAVEABLE_ANY: any number of bands (eg. TIFF) * * See also: #VipsForeignSave. */ typedef enum { VIPS_SAVEABLE_MONO, VIPS_SAVEABLE_RGB, VIPS_SAVEABLE_RGBA, VIPS_SAVEABLE_RGB_CMYK, VIPS_SAVEABLE_ANY, VIPS_SAVEABLE_LAST } VipsSaveable; typedef struct _VipsForeignSave { VipsForeign parent_object; /* Dont't attach metadata. */ gboolean strip; /*< public >*/ /* The image we are to save, as supplied by our caller. */ VipsImage *in; /* @in converted to a saveable format (eg. 8-bit RGB) according to the * instructions you give in the class fields below. * * This is the image you should actually write to the output. */ VipsImage *ready; } VipsForeignSave; typedef struct _VipsForeignSaveClass { VipsForeignClass parent_class; /*< public >*/ /* How this format treats bands. * * @saveable describes the bands that your saver can handle. For * example, PPM images can have 1 or 3 bands (mono or RGB), so it * uses #VIPS_SAVEABLE_RGB. */ VipsSaveable saveable; /* How this format treats band formats. * * @format_table describes the band formats that your saver can * handle. For each of the 10 #VipsBandFormat values, the array * should give the format your saver will accept. */ VipsBandFormat *format_table; /* The set of coding types this format can save. For example, jpeg can * only save NONE, so has NONE TRUE and RAD and LABQ FALSE. * * Default NONE TRUE, RAD and LABQ FALSE. */ gboolean coding[VIPS_CODING_LAST]; } VipsForeignSaveClass; GType vips_foreign_save_get_type( void ); const char *vips_foreign_find_save( const char *filename ); const char *vips_foreign_find_save_options( const char *filename ); /* Read/write an image convenience functions. */ int vips_foreign_load( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_foreign_save( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_foreign_load_options( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_foreign_save_options( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_openslideload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_jpegload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_jpegload_buffer( void *buf, size_t len, VipsImage **out, ... ) __attribute__((sentinel)); int vips_jpegsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_jpegsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) __attribute__((sentinel)); int vips_jpegsave_mime( VipsImage *in, ... ) __attribute__((sentinel)); int vips_webpload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_webpload_buffer( void *buf, size_t len, VipsImage **out, ... ) __attribute__((sentinel)); int vips_webpsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_webpsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) __attribute__((sentinel)); int vips_webpsave_mime( VipsImage *in, ... ) __attribute__((sentinel)); /** * VipsForeignTiffCompression: * @VIPS_FOREIGN_TIFF_COMPRESSION_NONE: no compression * @VIPS_FOREIGN_TIFF_COMPRESSION_JPEG: jpeg compression * @VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE: deflate (zip) compression * @VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS: packbits compression * @VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4: fax4 compression * @VIPS_FOREIGN_TIFF_COMPRESSION_LZW: LZW compression * * The compression types supported by the tiff writer. * * Use @Q to set the jpeg compression level, default 75. * * Use @prediction to set the lzw or deflate prediction, default none. */ typedef enum { VIPS_FOREIGN_TIFF_COMPRESSION_NONE, VIPS_FOREIGN_TIFF_COMPRESSION_JPEG, VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE, VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS, VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4, VIPS_FOREIGN_TIFF_COMPRESSION_LZW, VIPS_FOREIGN_TIFF_COMPRESSION_LAST } VipsForeignTiffCompression; /** * VipsForeignTiffPredictor: * @VIPS_FOREIGN_TIFF_PREDICTOR_NONE: no prediction * @VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL: horizontal differencing * @VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT: float predictor * * The predictor can help deflate and lzw compression. The values are fixed by * the tiff library. */ typedef enum { VIPS_FOREIGN_TIFF_PREDICTOR_NONE = 1, VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL = 2, VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT = 3, VIPS_FOREIGN_TIFF_PREDICTOR_LAST } VipsForeignTiffPredictor; /** * VipsForeignTiffResunit: * @VIPS_FOREIGN_TIFF_RESUNIT_CM: use centimeters * @VIPS_FOREIGN_TIFF_RESUNIT_INCH: use inches * * Use inches or centimeters as the resolution unit for a tiff file. */ typedef enum { VIPS_FOREIGN_TIFF_RESUNIT_CM, VIPS_FOREIGN_TIFF_RESUNIT_INCH, VIPS_FOREIGN_TIFF_RESUNIT_LAST } VipsForeignTiffResunit; int vips_tiffload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_tiffsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_openexrload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_fitsload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_fitssave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_analyzeload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_rawload( const char *filename, VipsImage **out, int width, int height, int bands, ... ) __attribute__((sentinel)); int vips_rawsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_rawsave_fd( VipsImage *in, int fd, ... ) __attribute__((sentinel)); int vips_csvload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_csvsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_matrixload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_matrixsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_matrixprint( VipsImage *in, ... ) __attribute__((sentinel)); int vips_magickload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_pngload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_pngload_buffer( void *buf, size_t len, VipsImage **out, ... ) __attribute__((sentinel)); int vips_pngsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_pngsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) __attribute__((sentinel)); int vips_ppmload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_ppmsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); int vips_matload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_radload( const char *filename, VipsImage **out, ... ) __attribute__((sentinel)); int vips_radsave( VipsImage *in, const char *filename, ... ) __attribute__((sentinel)); /** * VipsForeignDzLayout: * @VIPS_FOREIGN_DZ_LAYOUT_DZ: use DeepZoom directory layout * @VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY: use Zoomify directory layout * @VIPS_FOREIGN_DZ_LAYOUT_GOOGLE: use Google maps directory layout * * What directory layout and metadata standard to use. */ typedef enum { VIPS_FOREIGN_DZ_LAYOUT_DZ, VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY, VIPS_FOREIGN_DZ_LAYOUT_GOOGLE, VIPS_FOREIGN_DZ_LAYOUT_LAST } VipsForeignDzLayout; /** * VipsForeignDzDepth: * @VIPS_FOREIGN_DZ_DEPTH_1PIXEL: create layers down to 1x1 pixel * @VIPS_FOREIGN_DZ_DEPTH_1TILE: create layers down to 1x1 tile * @VIPS_FOREIGN_DZ_DEPTH_1: only create a single layer * * How many pyramid layers to create. */ typedef enum { VIPS_FOREIGN_DZ_DEPTH_1PIXEL, VIPS_FOREIGN_DZ_DEPTH_1TILE, VIPS_FOREIGN_DZ_DEPTH_1, VIPS_FOREIGN_DZ_DEPTH_LAST } VipsForeignDzDepth; int vips_dzsave( VipsImage *in, const char *basename, ... ) __attribute__((sentinel)); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_FOREIGN_H*/ vips-7.38.5/libvips/include/vips/mask.h0000644000175000017500000000752712303140253014704 00000000000000/* mask.h * * 20/9/09 * - from proto.h */ /* All deprecated. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_MASK_H #define IM_MASK_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ typedef struct im__INTMASK { int xsize; int ysize; int scale; int offset; int *coeff; char *filename; } INTMASK; typedef struct im__DOUBLEMASK { int xsize; int ysize; double scale; double offset; double *coeff; char *filename; } DOUBLEMASK; #define IM_MASK( M, X, Y ) ((M)->coeff[(X) + (Y) * (M)->xsize]) INTMASK *im_create_imask( const char *filename, int xsize, int ysize ); INTMASK *im_create_imaskv( const char *filename, int xsize, int ysize, ... ); DOUBLEMASK *im_create_dmask( const char *filename, int xsize, int ysize ); DOUBLEMASK *im_create_dmaskv( const char *filename, int xsize, int ysize, ... ); INTMASK *im_read_imask( const char *filename ); DOUBLEMASK *im_read_dmask( const char *filename ); void im_print_imask( INTMASK *in ); void im_print_dmask( DOUBLEMASK *in ); int im_write_imask( INTMASK *in ); int im_write_dmask( DOUBLEMASK *in ); int im_write_imask_name( INTMASK *in, const char *filename ); int im_write_dmask_name( DOUBLEMASK *in, const char *filename ); int im_free_imask( INTMASK *in ); int im_free_dmask( DOUBLEMASK *in ); INTMASK *im_log_imask( const char *filename, double sigma, double min_ampl ); DOUBLEMASK *im_log_dmask( const char *filename, double sigma, double min_ampl ); INTMASK *im_gauss_imask( const char *filename, double sigma, double min_ampl ); INTMASK *im_gauss_imask_sep( const char *filename, double sigma, double min_ampl ); DOUBLEMASK *im_gauss_dmask( const char *filename, double sigma, double min_ampl ); DOUBLEMASK *im_gauss_dmask_sep( const char *filename, double sigma, double min_ampl ); INTMASK *im_dup_imask( INTMASK *in, const char *filename ); DOUBLEMASK *im_dup_dmask( DOUBLEMASK *in, const char *filename ); INTMASK *im_scale_dmask( DOUBLEMASK *in, const char *filename ); void im_norm_dmask( DOUBLEMASK *mask ); DOUBLEMASK *im_imask2dmask( INTMASK *in, const char *filename ); INTMASK *im_dmask2imask( DOUBLEMASK *in, const char *filename ); INTMASK *im_rotate_imask90( INTMASK *in, const char *filename ); INTMASK *im_rotate_imask45( INTMASK *in, const char *filename ); DOUBLEMASK *im_rotate_dmask90( DOUBLEMASK *in, const char *filename ); DOUBLEMASK *im_rotate_dmask45( DOUBLEMASK *in, const char *filename ); DOUBLEMASK *im_mattrn( DOUBLEMASK *in, const char *filename ); DOUBLEMASK *im_matcat( DOUBLEMASK *top, DOUBLEMASK *bottom, const char *filename ); DOUBLEMASK *im_matmul( DOUBLEMASK *in1, DOUBLEMASK *in2, const char *filename ); DOUBLEMASK *im_lu_decomp( const DOUBLEMASK *mat, const char *filename ); int im_lu_solve( const DOUBLEMASK *lu, double *vec ); DOUBLEMASK *im_matinv( const DOUBLEMASK *mat, const char *filename ); int im_matinv_inplace( DOUBLEMASK *mat ); DOUBLEMASK *im_local_dmask( struct _VipsImage *out, DOUBLEMASK *mask ); INTMASK *im_local_imask( struct _VipsImage *out, INTMASK *mask ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_MASK_H*/ vips-7.38.5/libvips/include/vips/histogram.h0000644000175000017500000000402312303140253015732 00000000000000/* histograms_lut.h * * 3/11/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_HISTOGRAM_H #define VIPS_HISTOGRAM_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips_maplut( VipsImage *in, VipsImage **out, VipsImage *lut, ... ) __attribute__((sentinel)); int vips_percent( VipsImage *in, double percent, int *threshold, ... ) __attribute__((sentinel)); int vips_stdif( VipsImage *in, VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_hist_cum( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_hist_norm( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_hist_equal( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_hist_plot( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_hist_match( VipsImage *in, VipsImage *ref, VipsImage **out, ... ) __attribute__((sentinel)); int vips_hist_local( VipsImage *in, VipsImage **out, int width, int height, ... ) __attribute__((sentinel)); int vips_hist_ismonotonic( VipsImage *in, gboolean *monotonic, ... ) __attribute__((sentinel)); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_HISTOGRAM_H*/ vips-7.38.5/libvips/include/vips/header.h0000644000175000017500000001230512303140253015167 00000000000000/* boolean.h * * 20/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_HEADER_H #define VIPS_HEADER_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /** * VIPS_META_EXIF_NAME: * * The name that JPEG read and write operations use for the image's EXIF data. */ #define VIPS_META_EXIF_NAME "exif-data" /** * VIPS_META_XMP_NAME: * * The name that JPEG read and write operations use for the image's XMP data. */ #define VIPS_META_XMP_NAME "xmp-data" /** * VIPS_META_IPCT_NAME: * * The name that JPEG read and write operations use for the image's IPCT data. */ #define VIPS_META_IPCT_NAME "ipct-data" /** * VIPS_META_ICC_NAME: * * The name we use to attach an ICC profile. The file read and write * operations for TIFF, JPEG, PNG and others use this item of metadata to * attach and save ICC profiles. The profile is updated by the * vips_icc_transform() operations. */ #define VIPS_META_ICC_NAME "icc-profile-data" /** * VIPS_META_XML: * * The original XML that was used to code the metadata after reading a VIPS * format file. */ #define VIPS_META_XML "xml-header" /** * VIPS_META_RESOLUTION_UNIT: * * The JPEG and TIFF read and write operations use this to record the * file's preferred unit for resolution. */ #define VIPS_META_RESOLUTION_UNIT "resolution-unit" /** * VIPS_META_LOADER: * * Record the name of the original loader here. Handy for hinting file formats * and for debugging. */ #define VIPS_META_LOADER "vips-loader" guint64 vips_format_sizeof( VipsBandFormat format ); int vips_image_get_width( const VipsImage *image ); int vips_image_get_height( const VipsImage *image ); int vips_image_get_bands( const VipsImage *image ); VipsBandFormat vips_image_get_format( const VipsImage *image ); VipsCoding vips_image_get_coding( const VipsImage *image ); VipsInterpretation vips_image_get_interpretation( const VipsImage *image ); VipsInterpretation vips_image_guess_interpretation( const VipsImage *image ); double vips_image_get_xres( const VipsImage *image ); double vips_image_get_yres( const VipsImage *image ); int vips_image_get_xoffset( const VipsImage *image ); int vips_image_get_yoffset( const VipsImage *image ); const char *vips_image_get_filename( const VipsImage *image ); const char *vips_image_get_mode( const VipsImage *image ); double vips_image_get_scale( const VipsImage *array ); double vips_image_get_offset( const VipsImage *array ); void *vips_image_get_data( VipsImage *image ); void vips_image_init_fields( VipsImage *image, int xsize, int ysize, int bands, VipsBandFormat format, VipsCoding coding, VipsInterpretation interpretation, double xres, double yres ); void vips_image_set( VipsImage *image, const char *field, GValue *value ); int vips_image_get( const VipsImage *image, const char *field, GValue *value_copy ); int vips_image_get_as_string( const VipsImage *image, const char *field, char **out ); GType vips_image_get_typeof( const VipsImage *image, const char *field ); gboolean vips_image_remove( VipsImage *image, const char *field ); typedef void *(*VipsImageMapFn)( VipsImage *image, const char *field, GValue *value, void *a ); void *vips_image_map( VipsImage *image, VipsImageMapFn fn, void *a ); void vips_image_set_area( VipsImage *image, const char *field, VipsCallbackFn free_fn, void *data ); int vips_image_get_area( const VipsImage *image, const char *field, void **data ); void vips_image_set_blob( VipsImage *image, const char *field, VipsCallbackFn free_fn, void *data, size_t length ); int vips_image_get_blob( const VipsImage *image, const char *field, void **data, size_t *length ); int vips_image_get_int( const VipsImage *image, const char *field, int *out ); void vips_image_set_int( VipsImage *image, const char *field, int i ); int vips_image_get_double( const VipsImage *image, const char *field, double *out ); void vips_image_set_double( VipsImage *image, const char *field, double d ); int vips_image_get_string( const VipsImage *image, const char *field, const char **out ); void vips_image_set_string( VipsImage *image, const char *field, const char *str ); int vips_image_history_printf( VipsImage *image, const char *format, ... ) __attribute__((format(printf, 2, 3))); int vips_image_history_args( VipsImage *image, const char *name, int argc, char *argv[] ); const char *vips_image_get_history( VipsImage *image ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_HEADER_H*/ vips-7.38.5/libvips/include/vips/arithmetic.h0000644000175000017500000003363412303141142016076 00000000000000/* Headers for arithmetic * * 30/6/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_ARITHMETIC_H #define IM_ARITHMETIC_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /** * VipsOperationMath: * @VIPS_OPERATION_MATH_SIN: sin(), angles in degrees * @VIPS_OPERATION_MATH_COS: cos(), angles in degrees * @VIPS_OPERATION_MATH_TAN: tan(), angles in degrees * @VIPS_OPERATION_MATH_ASIN: asin(), angles in degrees * @VIPS_OPERATION_MATH_ACOS: acos(), angles in degrees * @VIPS_OPERATION_MATH_ATAN: atan(), angles in degrees * @VIPS_OPERATION_MATH_LOG: log base e * @VIPS_OPERATION_MATH_LOG10: log base 10 * @VIPS_OPERATION_MATH_EXP: e to the something * @VIPS_OPERATION_MATH_EXP10: 10 to the something * * See also: vips_math(). */ typedef enum { VIPS_OPERATION_MATH_SIN, VIPS_OPERATION_MATH_COS, VIPS_OPERATION_MATH_TAN, VIPS_OPERATION_MATH_ASIN, VIPS_OPERATION_MATH_ACOS, VIPS_OPERATION_MATH_ATAN, VIPS_OPERATION_MATH_LOG, VIPS_OPERATION_MATH_LOG10, VIPS_OPERATION_MATH_EXP, VIPS_OPERATION_MATH_EXP10, VIPS_OPERATION_MATH_LAST } VipsOperationMath; /** * VipsOperationMath2: * @VIPS_OPERATION_MATH2_POW: pow( left, right ) * @VIPS_OPERATION_MATH2_WOP: pow( right, left ) * * See also: vips_math(). */ typedef enum { VIPS_OPERATION_MATH2_POW, VIPS_OPERATION_MATH2_WOP, VIPS_OPERATION_MATH2_LAST } VipsOperationMath2; /** * VipsOperationRound: * @VIPS_OPERATION_ROUND_RINT: round to nearest * @VIPS_OPERATION_ROUND_FLOOR: largest integral value not greater than * @VIPS_OPERATION_ROUND_CEIL: the smallest integral value not less than * * See also: vips_round(). */ typedef enum { VIPS_OPERATION_ROUND_RINT, VIPS_OPERATION_ROUND_CEIL, VIPS_OPERATION_ROUND_FLOOR, VIPS_OPERATION_ROUND_LAST } VipsOperationRound; /** * VipsOperationRelational: * @VIPS_OPERATION_RELATIONAL_EQUAL: == * @VIPS_OPERATION_RELATIONAL_NOTEQUAL: != * @VIPS_OPERATION_RELATIONAL_LESS: < * @VIPS_OPERATION_RELATIONAL_LESSEQ: <= * @VIPS_OPERATION_RELATIONAL_MORE: > * @VIPS_OPERATION_RELATIONAL_MOREEQ: >= * * See also: vips_relational(). */ typedef enum { VIPS_OPERATION_RELATIONAL_EQUAL, VIPS_OPERATION_RELATIONAL_NOTEQUAL, VIPS_OPERATION_RELATIONAL_LESS, VIPS_OPERATION_RELATIONAL_LESSEQ, VIPS_OPERATION_RELATIONAL_MORE, VIPS_OPERATION_RELATIONAL_MOREEQ, VIPS_OPERATION_RELATIONAL_LAST } VipsOperationRelational; /** * VipsOperationBoolean: * @VIPS_OPERATION_BOOLEAN_AND: & * @VIPS_OPERATION_BOOLEAN_OR: | * @VIPS_OPERATION_BOOLEAN_EOR: ^ * * See also: vips_boolean(). */ typedef enum { VIPS_OPERATION_BOOLEAN_AND, VIPS_OPERATION_BOOLEAN_OR, VIPS_OPERATION_BOOLEAN_EOR, VIPS_OPERATION_BOOLEAN_LSHIFT, VIPS_OPERATION_BOOLEAN_RSHIFT, VIPS_OPERATION_BOOLEAN_LAST } VipsOperationBoolean; /** * VipsOperationComplex: * @VIPS_OPERATION_COMPLEX_POLAR: convert to polar coordinates * @VIPS_OPERATION_COMPLEX_RECT: convert to rectangular coordinates * @VIPS_OPERATION_COMPLEX_CONJ: complex conjugate * * See also: vips_complex(). */ typedef enum { VIPS_OPERATION_COMPLEX_POLAR, VIPS_OPERATION_COMPLEX_RECT, VIPS_OPERATION_COMPLEX_CONJ, VIPS_OPERATION_COMPLEX_LAST } VipsOperationComplex; /** * VipsOperationComplex2: * @VIPS_OPERATION_COMPLEX2_CROSS_PHASE: convert to polar coordinates * * See also: vips_complex2(). */ typedef enum { VIPS_OPERATION_COMPLEX2_CROSS_PHASE, VIPS_OPERATION_COMPLEX2_LAST } VipsOperationComplex2; /** * VipsOperationComplexget: * @VIPS_OPERATION_COMPLEXGET_REAL: get real component * @VIPS_OPERATION_COMPLEXGET_IMAG: get imaginary component * * See also: vips_complexget(). */ typedef enum { VIPS_OPERATION_COMPLEXGET_REAL, VIPS_OPERATION_COMPLEXGET_IMAG, VIPS_OPERATION_COMPLEXGET_LAST } VipsOperationComplexget; int vips_add( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_subtract( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) __attribute__((sentinel)); int vips_multiply( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_divide( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_linear( VipsImage *in, VipsImage **out, double *a, double *b, int n, ... ) __attribute__((sentinel)); int vips_linear1( VipsImage *in, VipsImage **out, double a, double b, ... ) __attribute__((sentinel)); int vips_remainder( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_remainder_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_remainder_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_invert( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_abs( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_sign( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_round( VipsImage *in, VipsImage **out, VipsOperationRound round, ... ) __attribute__((sentinel)); int vips_floor( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_ceil( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_rint( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_math( VipsImage *in, VipsImage **out, VipsOperationMath math, ... ) __attribute__((sentinel)); int vips_sin( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_cos( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_tan( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_asin( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_acos( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_atan( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_exp( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_exp10( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_log( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_log10( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_complex( VipsImage *in, VipsImage **out, VipsOperationComplex cmplx, ... ) __attribute__((sentinel)); int vips_polar( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_rect( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_conj( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_complex2( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationComplex2 cmplx, ... ) __attribute__((sentinel)); int vips_cross_phase( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_complexget( VipsImage *in, VipsImage **out, VipsOperationComplexget get, ... ) __attribute__((sentinel)); int vips_real( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_imag( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_complexform( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_relational( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationRelational relational, ... ) __attribute__((sentinel)); int vips_equal( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_notequal( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_less( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_lesseq( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_more( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_moreeq( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_relational_const( VipsImage *in, VipsImage **out, VipsOperationRelational relational, double *c, int n, ... ) __attribute__((sentinel)); int vips_equal_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_notequal_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_less_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_lesseq_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_more_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_moreeq_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_relational_const1( VipsImage *in, VipsImage **out, VipsOperationRelational relational, double c, ... ) __attribute__((sentinel)); int vips_equal_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_notequal_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_less_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_lesseq_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_more_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_moreeq_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_boolean( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationBoolean boolean, ... ) __attribute__((sentinel)); int vips_andimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_orimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_eorimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_lshift( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_rshift( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_boolean_const( VipsImage *in, VipsImage **out, VipsOperationBoolean boolean, double *c, int n, ... ) __attribute__((sentinel)); int vips_andimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_orimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_eorimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_lshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_rshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_andimage_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_orimage_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_eorimage_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_lshift_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_rshift_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_math2( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationMath2 math2, ... ) __attribute__((sentinel)); int vips_pow( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_wop( VipsImage *left, VipsImage *right, VipsImage **out, ... ) __attribute__((sentinel)); int vips_math2_const( VipsImage *in, VipsImage **out, VipsOperationMath2 math2, double *c, int n, ... ) __attribute__((sentinel)); int vips_pow_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_wop_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) __attribute__((sentinel)); int vips_math2_const1( VipsImage *in, VipsImage **out, VipsOperationMath2 math2, double c, ... ) __attribute__((sentinel)); int vips_pow_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_wop_const1( VipsImage *in, VipsImage **out, double c, ... ) __attribute__((sentinel)); int vips_avg( VipsImage *in, double *out, ... ) __attribute__((sentinel)); int vips_deviate( VipsImage *in, double *out, ... ) __attribute__((sentinel)); int vips_min( VipsImage *in, double *out, ... ) __attribute__((sentinel)); int vips_max( VipsImage *in, double *out, ... ) __attribute__((sentinel)); int vips_stats( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_measure( VipsImage *in, VipsImage **out, int h, int v, ... ) __attribute__((sentinel)); int vips_hist_find( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_hist_find_ndim( VipsImage *in, VipsImage **out, ... ) __attribute__((sentinel)); int vips_hist_find_indexed( VipsImage *in, VipsImage *index, VipsImage **out, ... ) __attribute__((sentinel)); int vips_project( VipsImage *in, VipsImage **columns, VipsImage **rows, ... ) __attribute__((sentinel)); int vips_profile( VipsImage *in, VipsImage **columns, VipsImage **rows, ... ) __attribute__((sentinel)); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_ARITHMETIC_H*/ vips-7.38.5/libvips/include/vips/rect.h0000644000175000017500000000366312303140253014703 00000000000000/* Simple rectangle algebra. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_RECT_H #define VIPS_RECT_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ typedef struct _VipsRect { /*< public >*/ int left; int top; int width; int height; } VipsRect; #define VIPS_RECT_RIGHT(R) ((R)->left + (R)->width) #define VIPS_RECT_BOTTOM(R) ((R)->top + (R)->height) #define VIPS_RECT_HCENTRE(R) ((R)->left + (R)->width / 2) #define VIPS_RECT_VCENTRE(R) ((R)->top + (R)->height / 2) gboolean vips_rect_isempty( const VipsRect *r ); gboolean vips_rect_includespoint( const VipsRect *r, int x, int y ); gboolean vips_rect_includesrect( const VipsRect *r1, const VipsRect *r2 ); gboolean vips_rect_equalsrect( const VipsRect *r1, const VipsRect *r2 ); void vips_rect_marginadjust( VipsRect *r, int n ); void vips_rect_intersectrect( const VipsRect *r1, const VipsRect *r2, VipsRect *out ); void vips_rect_unionrect( const VipsRect *r1, const VipsRect *r2, VipsRect *out ); VipsRect *vips_rect_dup( const VipsRect *r ); void vips_rect_normalise( VipsRect *r ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_RECT_H*/ vips-7.38.5/libvips/include/vips/relational.h0000644000175000017500000000211512303140253016067 00000000000000/* relational.h * * 23/9/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_RELATIONAL_H #define IM_RELATIONAL_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_RELATIONAL_H*/ vips-7.38.5/libvips/include/vips/inplace.h0000644000175000017500000000452112303141142015351 00000000000000/* inplace.h * * 3/11/09 * - from proto.h */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef IM_INPLACE_H #define IM_INPLACE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int im_draw_rect( VipsImage *image, int left, int top, int width, int height, int fill, VipsPel *ink ); int im_draw_circle( VipsImage *image, int x, int y, int radius, gboolean fill, VipsPel *ink ); int im_draw_image( VipsImage *image, VipsImage *sub, int x, int y ); typedef int (*VipsPlotFn)( VipsImage *image, int x, int y, void *a, void *b, void *c ); int im_draw_line_user( VipsImage *image, int x1, int y1, int x2, int y2, VipsPlotFn plot, void *a, void *b, void *c ); int im_draw_line( VipsImage *image, int x1, int y1, int x2, int y2, VipsPel *ink ); int im_lineset( VipsImage *in, VipsImage *out, VipsImage *mask, VipsImage *ink, int n, int *x1v, int *y1v, int *x2v, int *y2v ); int im_draw_flood( VipsImage *image, int x, int y, VipsPel *ink, VipsRect *dout ); int im_draw_flood_blob( VipsImage *image, int x, int y, VipsPel *ink, VipsRect *dout ); int im_draw_flood_other( VipsImage *image, VipsImage *test, int x, int y, int serial, VipsRect *dout ); int im_draw_mask( VipsImage *image, VipsImage *mask_im, int x, int y, VipsPel *ink ); int im_draw_point( VipsImage *image, int x, int y, VipsPel *ink ); int im_read_point( VipsImage *image, int x, int y, VipsPel *ink ); int im_draw_smudge( VipsImage *image, int left, int top, int width, int height ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*IM_INPLACE_H*/ vips-7.38.5/libvips/foreign/0000755000175000017500000000000012303146330012674 500000000000000vips-7.38.5/libvips/foreign/jpeg2vips.c0000644000175000017500000007521612303140253014702 00000000000000/* wrap jpeg library for read * * 28/11/03 JC * - better no-overshoot on tile loop * 12/11/04 * - better demand size choice for eval * 30/6/05 JC * - update im_error()/im_warn() * - now loads and saves exif data * 30/7/05 * - now loads ICC profiles * - now saves ICC profiles from the VIPS header * 24/8/05 * - jpeg load sets vips xres/yres from exif, if possible * - jpeg save sets exif xres/yres from vips, if possible * 29/8/05 * - cut from old vips_jpeg.c * 13/10/06 * - add #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_JPEG #include #include #include #include #ifdef HAVE_EXIF #ifdef UNTAGGED_EXIF #include #include #include #include #else /*!UNTAGGED_EXIF*/ #include #include #include #include #endif /*UNTAGGED_EXIF*/ #endif /*HAVE_EXIF*/ #include #include #include #include "jpeg.h" #include "vipsjpeg.h" /* Stuff we track during a read. */ typedef struct _ReadJpeg { VipsImage *out; /* Shrink by this much during load. 1, 2, 4, 8. */ int shrink; /* Fail on warnings. */ gboolean fail; /* Use a read behind buffer. */ gboolean readbehind; /* Used for file input only. */ char *filename; struct jpeg_decompress_struct cinfo; ErrorManager eman; gboolean invert_pels; /* Set if we need to finish the decompress. */ gboolean decompressing; /* Track the y pos during a read with this. */ int y_pos; } ReadJpeg; static int readjpeg_free( ReadJpeg *jpeg ) { int result; result = 0; if( jpeg->eman.pub.num_warnings != 0 ) { if( jpeg->fail ) { vips_error( "VipsJpeg", "%s", vips_error_buffer() ); result = -1; } else { vips_warn( "VipsJpeg", _( "read gave %ld warnings" ), jpeg->eman.pub.num_warnings ); vips_warn( NULL, "%s", vips_error_buffer() ); } /* Make the message only appear once. */ jpeg->eman.pub.num_warnings = 0; } if( jpeg->decompressing ) { /* jpeg_finish_decompress() can fail ... catch any errors. */ if( !setjmp( jpeg->eman.jmp ) ) jpeg_finish_decompress( &jpeg->cinfo ); jpeg->decompressing = FALSE; } VIPS_FREEF( fclose, jpeg->eman.fp ); VIPS_FREE( jpeg->filename ); jpeg->eman.fp = NULL; /* I don't think this can fail. */ jpeg_destroy_decompress( &jpeg->cinfo ); return( result ); } static void readjpeg_close( VipsObject *object, ReadJpeg *jpeg ) { (void) readjpeg_free( jpeg ); } static ReadJpeg * readjpeg_new( VipsImage *out, int shrink, gboolean fail, gboolean readbehind ) { ReadJpeg *jpeg; if( !(jpeg = VIPS_NEW( out, ReadJpeg )) ) return( NULL ); jpeg->out = out; jpeg->shrink = shrink; jpeg->fail = fail; jpeg->readbehind = readbehind; jpeg->filename = NULL; jpeg->decompressing = FALSE; jpeg->cinfo.err = jpeg_std_error( &jpeg->eman.pub ); jpeg->eman.pub.error_exit = vips__new_error_exit; jpeg->eman.pub.output_message = vips__new_output_message; jpeg->eman.fp = NULL; jpeg->y_pos = 0; /* jpeg_create_decompress() can fail on some sanity checks. Don't * readjpeg_free() since we don't want to jpeg_destroy_decompress(). */ if( setjmp( jpeg->eman.jmp ) ) return( NULL ); jpeg_create_decompress( &jpeg->cinfo ); g_signal_connect( out, "close", G_CALLBACK( readjpeg_close ), jpeg ); return( jpeg ); } /* Set input to a file. */ static int readjpeg_file( ReadJpeg *jpeg, const char *filename ) { jpeg->filename = g_strdup( filename ); if( !(jpeg->eman.fp = vips__file_open_read( filename, NULL, FALSE )) ) return( -1 ); jpeg_stdio_src( &jpeg->cinfo, jpeg->eman.fp ); return( 0 ); } #ifdef HAVE_EXIF #ifdef DEBUG_VERBOSE /* Print exif for debugging ... hacked from exif-0.6.9/actions.c */ static void show_tags( ExifData *data ) { int i; unsigned int tag; const char *name; printf( "show EXIF tags:\n" ); for( i = 0; i < EXIF_IFD_COUNT; i++ ) printf( "%-7.7s", exif_ifd_get_name( i ) ); printf( "\n" ); for( tag = 0; tag < 0xffff; tag++ ) { name = exif_tag_get_title( tag ); if( !name ) continue; printf( " 0x%04x %-29.29s", tag, name ); for( i = 0; i < EXIF_IFD_COUNT; i++ ) if( exif_content_get_entry( data->ifd[i], tag ) ) printf( " * " ); else printf( " - " ); printf( "\n" ); } } static void show_entry( ExifEntry *entry, void *client ) { char exif_text[256]; printf( "%s", exif_tag_get_title( entry->tag ) ); printf( "|" ); printf( "%s", exif_entry_get_value( entry, exif_text, 256 ) ); printf( "|" ); printf( "%s", exif_format_get_name( entry->format ) ); printf( "|" ); printf( "%d bytes", entry->size ); printf( "\n" ); } static void show_ifd( ExifContent *content, void *client ) { int *ifd = (int *) client; printf( "- ifd %d\n", *ifd ); exif_content_foreach_entry( content, show_entry, client ); *ifd += 1; } void show_values( ExifData *data ) { ExifByteOrder order; int ifd; order = exif_data_get_byte_order( data ); printf( "EXIF tags in '%s' byte order\n", exif_byte_order_get_name( order ) ); printf( "Title|Value|Format|Size\n" ); ifd = 0; exif_data_foreach_content( data, show_ifd, &ifd ); if( data->size ) printf( "contains thumbnail of %d bytes\n", data->size ); } #endif /*DEBUG_VERBOSE*/ #endif /*HAVE_EXIF*/ #ifdef HAVE_EXIF static int vips_exif_get_int( ExifData *ed, ExifEntry *entry, unsigned long component, int *out ) { ExifByteOrder bo = exif_data_get_byte_order( ed ); size_t sizeof_component = entry->size / entry->components; size_t offset = component * sizeof_component; if( entry->format == EXIF_FORMAT_SHORT ) *out = exif_get_short( entry->data + offset, bo ); else if( entry->format == EXIF_FORMAT_SSHORT ) *out = exif_get_sshort( entry->data + offset, bo ); else if( entry->format == EXIF_FORMAT_LONG ) /* This won't work for huge values, but who cares. */ *out = (int) exif_get_long( entry->data + offset, bo ); else if( entry->format == EXIF_FORMAT_SLONG ) *out = exif_get_slong( entry->data + offset, bo ); else return( -1 ); return( 0 ); } static int vips_exif_get_rational( ExifData *ed, ExifEntry *entry, unsigned long component, ExifRational *out ) { if( entry->format == EXIF_FORMAT_RATIONAL ) { ExifByteOrder bo = exif_data_get_byte_order( ed ); size_t sizeof_component = entry->size / entry->components; size_t offset = component * sizeof_component; *out = exif_get_rational( entry->data + offset, bo ); } else return( -1 ); return( 0 ); } static int vips_exif_get_srational( ExifData *ed, ExifEntry *entry, unsigned long component, ExifSRational *out ) { if( entry->format == EXIF_FORMAT_SRATIONAL ) { ExifByteOrder bo = exif_data_get_byte_order( ed ); size_t sizeof_component = entry->size / entry->components; size_t offset = component * sizeof_component; *out = exif_get_srational( entry->data + offset, bo ); } else return( -1 ); return( 0 ); } static int vips_exif_get_double( ExifData *ed, ExifEntry *entry, unsigned long component, double *out ) { ExifRational rv; ExifSRational srv; if( !vips_exif_get_rational( ed, entry, component, &rv ) ) *out = (double) rv.numerator / rv.denominator; else if( !vips_exif_get_srational( ed, entry, component, &srv ) ) *out = (double) srv.numerator / srv.denominator; else return( -1 ); return( 0 ); } /* Save an exif value to a string in a way that we can restore. We only bother * for the simple formats (that a client might try to change) though. * * Keep in sync with vips_exif_from_s() in vips2jpeg. */ static void vips_exif_to_s( ExifData *ed, ExifEntry *entry, VipsBuf *buf ) { unsigned long i; int iv; ExifRational rv; ExifSRational srv; char txt[256]; if( entry->format == EXIF_FORMAT_ASCII ) { /* libexif does not null-terminate strings. Copy out and add * the \0 ourselves. */ int len = VIPS_MIN( 254, entry->size ); memcpy( txt, entry->data, len ); txt[len] = '\0'; vips_buf_appendf( buf, "%s ", txt ); } else if( entry->components < 10 && !vips_exif_get_int( ed, entry, 0, &iv ) ) { for( i = 0; i < entry->components; i++ ) { vips_exif_get_int( ed, entry, i, &iv ); vips_buf_appendf( buf, "%d ", iv ); } } else if( entry->components < 10 && !vips_exif_get_rational( ed, entry, 0, &rv ) ) { for( i = 0; i < entry->components; i++ ) { vips_exif_get_rational( ed, entry, i, &rv ); vips_buf_appendf( buf, "%u/%u ", rv.numerator, rv.denominator ); } } else if( entry->components < 10 && !vips_exif_get_srational( ed, entry, 0, &srv ) ) { for( i = 0; i < entry->components; i++ ) { vips_exif_get_srational( ed, entry, i, &srv ); vips_buf_appendf( buf, "%d/%d ", srv.numerator, srv.denominator ); } } else vips_buf_appendf( buf, "%s ", exif_entry_get_value( entry, txt, 256 ) ); vips_buf_appendf( buf, "(%s, %s, %lu components, %d bytes)", exif_entry_get_value( entry, txt, 256 ), exif_format_get_name( entry->format ), entry->components, entry->size ); } typedef struct _VipsExif { VipsImage *image; ExifData *ed; } VipsExif; static void attach_exif_entry( ExifEntry *entry, VipsExif *ve ) { char name_txt[256]; VipsBuf name = VIPS_BUF_STATIC( name_txt ); char value_txt[256]; VipsBuf value = VIPS_BUF_STATIC( value_txt ); vips_buf_appendf( &name, "exif-ifd%d-%s", exif_entry_get_ifd( entry ), exif_tag_get_title( entry->tag ) ); vips_exif_to_s( ve->ed, entry, &value ); /* Can't do anything sensible with the error return. */ (void) vips_image_set_string( ve->image, vips_buf_all( &name ), vips_buf_all( &value ) ); } static void attach_exif_content( ExifContent *content, VipsExif *ve ) { exif_content_foreach_entry( content, (ExifContentForeachEntryFunc) attach_exif_entry, ve ); } static int get_entry_double( ExifData *ed, int ifd, ExifTag tag, double *out ) { ExifEntry *entry; if( !(entry = exif_content_get_entry( ed->ifd[ifd], tag )) || entry->components != 1 ) return( -1 ); return( vips_exif_get_double( ed, entry, 0, out ) ); } static int get_entry_int( ExifData *ed, int ifd, ExifTag tag, int *out ) { ExifEntry *entry; if( !(entry = exif_content_get_entry( ed->ifd[ifd], tag )) || entry->components != 1 ) return( -1 ); return( vips_exif_get_int( ed, entry, 0, out ) ); } static void res_from_exif( VipsImage *im, ExifData *ed ) { double xres, yres; int unit; /* The main image xres/yres are in ifd0. ifd1 has xres/yres of the * image thumbnail, if any. */ if( get_entry_double( ed, 0, EXIF_TAG_X_RESOLUTION, &xres ) || get_entry_double( ed, 0, EXIF_TAG_Y_RESOLUTION, &yres ) || get_entry_int( ed, 0, EXIF_TAG_RESOLUTION_UNIT, &unit ) ) { vips_warn( "VipsJpeg", "%s", _( "error reading resolution" ) ); return; } #ifdef DEBUG printf( "res_from_exif: seen exif tags " "xres = %g, yres = %g, unit = %d\n", xres, yres, unit ); #endif /*DEBUG*/ switch( unit ) { case 2: /* In inches. */ xres /= 25.4; yres /= 25.4; vips_image_set_string( im, VIPS_META_RESOLUTION_UNIT, "in" ); break; case 3: /* In cm. */ xres /= 10.0; yres /= 10.0; vips_image_set_string( im, VIPS_META_RESOLUTION_UNIT, "cm" ); break; default: vips_warn( "VipsJpeg", "%s", _( "unknown EXIF resolution unit" ) ); return; } #ifdef DEBUG printf( "res_from_exif: seen exif resolution %g, %g p/mm\n", xres, yres ); #endif /*DEBUG*/ im->Xres = xres; im->Yres = yres; } static int attach_thumbnail( VipsImage *im, ExifData *ed ) { if( ed->size > 0 ) { char *thumb_copy; thumb_copy = g_malloc( ed->size ); memcpy( thumb_copy, ed->data, ed->size ); vips_image_set_blob( im, "jpeg-thumbnail-data", (VipsCallbackFn) g_free, thumb_copy, ed->size ); } return( 0 ); } #endif /*HAVE_EXIF*/ static int parse_exif( VipsImage *im, void *data, int data_length ) { #ifdef HAVE_EXIF { ExifData *ed; VipsExif ve; if( !(ed = exif_data_new_from_data( data, data_length )) ) return( -1 ); #ifdef DEBUG_VERBOSE show_tags( ed ); show_values( ed ); #endif /*DEBUG_VERBOSE*/ /* Attach informational fields for what we find. FIXME ... better to have this in the UI layer? Or we could attach non-human-readable tags here (int, double etc) and then move the human stuff to the UI layer? */ ve.image = im; ve.ed = ed; exif_data_foreach_content( ed, (ExifDataForeachContentFunc) attach_exif_content, &ve ); /* Look for resolution fields and use them to set the VIPS * xres/yres fields. */ res_from_exif( im, ed ); attach_thumbnail( im, ed ); exif_data_free( ed ); } #endif /*HAVE_EXIF*/ return( 0 ); } static int attach_blob( VipsImage *im, const char *field, void *data, int data_length ) { char *data_copy; /* Only use the first one. */ if( vips_image_get_typeof( im, field ) ) { #ifdef DEBUG printf( "attach_blob: second %s block, ignoring\n", field ); #endif /*DEBUG*/ return( 0 ); } #ifdef DEBUG printf( "attach_blob: attaching %d bytes of %s\n", data_length, field ); #endif /*DEBUG*/ /* Always attach a copy of the unparsed exif data. */ if( !(data_copy = vips_malloc( NULL, data_length )) ) return( -1 ); memcpy( data_copy, data, data_length ); vips_image_set_blob( im, field, (VipsCallbackFn) vips_free, data_copy, data_length ); return( 0 ); } /* Number of app2 sections we can capture. Each one can be 64k, so 6400k should * be enough for anyone (haha). */ #define MAX_APP2_SECTIONS (100) /* Read a cinfo to a VIPS image. Set invert_pels if the pixel reader needs to * do 255-pel. */ static int read_jpeg_header( ReadJpeg *jpeg, VipsImage *out ) { struct jpeg_decompress_struct *cinfo = &jpeg->cinfo; jpeg_saved_marker_ptr p; VipsInterpretation interpretation; double xres, yres; /* Capture app2 sections here for assembly. */ void *app2_data[MAX_APP2_SECTIONS] = { 0 }; size_t app2_data_length[MAX_APP2_SECTIONS] = { 0 }; size_t data_length; int i; /* Read JPEG header. libjpeg will set out_color_space sanely for us * for YUV YCCK etc. */ jpeg_read_header( cinfo, TRUE ); cinfo->scale_denom = jpeg->shrink; cinfo->scale_num = 1; jpeg_calc_output_dimensions( cinfo ); jpeg->invert_pels = FALSE; switch( cinfo->out_color_space ) { case JCS_GRAYSCALE: interpretation = VIPS_INTERPRETATION_B_W; break; case JCS_CMYK: interpretation = VIPS_INTERPRETATION_CMYK; /* Photoshop writes CMYK JPEG inverted :-( Maybe this is a * way to spot photoshop CMYK JPGs. */ if( cinfo->saw_Adobe_marker ) jpeg->invert_pels = TRUE; break; case JCS_RGB: default: interpretation = VIPS_INTERPRETATION_sRGB; break; } /* Get the jfif resolution. exif may overwrite this later. */ xres = 1.0; yres = 1.0; if( cinfo->saw_JFIF_marker && cinfo->X_density != 1U && cinfo->Y_density != 1U ) { #ifdef DEBUG printf( "read_jpeg_header: seen jfif _density %d, %d\n", cinfo->X_density, cinfo->Y_density ); #endif /*DEBUG*/ switch( cinfo->density_unit ) { case 1: /* Pixels per inch. */ xres = cinfo->X_density / 25.4; yres = cinfo->Y_density / 25.4; break; case 2: /* Pixels per cm. */ xres = cinfo->X_density / 10.0; yres = cinfo->Y_density / 10.0; break; default: vips_warn( "VipsJpeg", "%s", _( "unknown JFIF resolution unit" ) ); break; } #ifdef DEBUG printf( "read_jpeg_header: seen jfif resolution %g, %g p/mm\n", xres, yres ); #endif /*DEBUG*/ } /* Set VIPS header. */ vips_image_init_fields( out, cinfo->output_width, cinfo->output_height, cinfo->output_components, VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, interpretation, xres, yres ); vips_image_pipelinev( out, VIPS_DEMAND_STYLE_FATSTRIP, NULL ); /* Interlaced jpegs need lots of memory to read, so our caller needs * to know. */ (void) vips_image_set_int( out, "jpeg-multiscan", jpeg_has_multiple_scans( cinfo ) ); /* Look for EXIF and ICC profile. */ for( p = cinfo->marker_list; p; p = p->next ) { #ifdef DEBUG { printf( "read_jpeg_header: seen %d bytes of APP%d\n", p->data_length, p->marker - JPEG_APP0 ); for( i = 0; i < 10; i++ ) printf( "\t%d) '%c' (%d)\n", i, p->data[i], p->data[i] ); } #endif /*DEBUG*/ switch( p->marker ) { case JPEG_APP0 + 1: /* Possible EXIF or XMP data. */ if( p->data_length > 4 && vips_isprefix( "Exif", (char *) p->data ) ) { if( parse_exif( out, p->data, p->data_length ) || attach_blob( out, VIPS_META_EXIF_NAME, p->data, p->data_length ) ) return( -1 ); } if( p->data_length > 4 && vips_isprefix( "http", (char *) p->data ) && attach_blob( out, VIPS_META_XMP_NAME, p->data, p->data_length ) ) return( -1 ); break; case JPEG_APP0 + 2: /* Possible ICC profile. */ if( p->data_length > 14 && vips_isprefix( "ICC_PROFILE", (char *) p->data ) ) { /* cur_marker numbers from 1, according to * spec. */ int cur_marker = p->data[12] - 1; if( cur_marker >= 0 && cur_marker < MAX_APP2_SECTIONS ) { app2_data[cur_marker] = p->data + 14; app2_data_length[cur_marker] = p->data_length - 14; } } break; case JPEG_APP0 + 13: /* Possible IPCT data block. */ if( p->data_length > 5 && vips_isprefix( "Photo", (char *) p->data ) && attach_blob( out, VIPS_META_IPCT_NAME, p->data, p->data_length ) ) return( -1 ); break; default: break; } } /* Assemble ICC sections. */ data_length = 0; for( i = 0; i < MAX_APP2_SECTIONS && app2_data[i]; i++ ) data_length += app2_data_length[i]; if( data_length ) { unsigned char *data; int p; #ifdef DEBUG printf( "read_jpeg_header: assembled %zd byte ICC profile\n", data_length ); #endif /*DEBUG*/ if( !(data = vips_malloc( NULL, data_length )) ) return( -1 ); p = 0; for( i = 0; i < MAX_APP2_SECTIONS && app2_data[i]; i++ ) { memcpy( data + p, app2_data[i], app2_data_length[i] ); p += app2_data_length[i]; } vips_image_set_blob( out, VIPS_META_ICC_NAME, (VipsCallbackFn) vips_free, data, data_length ); } return( 0 ); } static int read_jpeg_generate( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRect *r = &or->valid; ReadJpeg *jpeg = (ReadJpeg *) a; struct jpeg_decompress_struct *cinfo = &jpeg->cinfo; int sz = cinfo->output_width * cinfo->output_components; int y; #ifdef DEBUG printf( "read_jpeg_generate: %p line %d, %d rows\n", g_thread_self(), r->top, r->height ); #endif /*DEBUG*/ VIPS_GATE_START( "read_jpeg_generate: work" ); /* We're inside a tilecache where tiles are the full image width, so * this should always be true. */ g_assert( r->left == 0 ); g_assert( r->width == or->im->Xsize ); g_assert( VIPS_RECT_BOTTOM( r ) <= or->im->Ysize ); /* Tiles should always be on a 8-pixel boundary. */ g_assert( r->top % 8 == 0 ); /* Tiles should always be a strip in height, unless it's the final * strip. */ g_assert( r->height == VIPS_MIN( 8, or->im->Ysize - r->top ) ); /* And check that y_pos is correct. It should be, since we are inside * a vips_sequential(). */ g_assert( r->top == jpeg->y_pos ); /* Here for longjmp() from vips__new_error_exit(). */ if( setjmp( jpeg->eman.jmp ) ) return( -1 ); for( y = 0; y < r->height; y++ ) { JSAMPROW row_pointer[1]; row_pointer[0] = (JSAMPLE *) VIPS_REGION_ADDR( or, 0, r->top + y ); jpeg_read_scanlines( cinfo, &row_pointer[0], 1 ); if( jpeg->invert_pels ) { int x; for( x = 0; x < sz; x++ ) row_pointer[0][x] = 255 - row_pointer[0][x]; } jpeg->y_pos += 1; } VIPS_GATE_STOP( "read_jpeg_generate: work" ); return( 0 ); } /* Read a cinfo to a VIPS image. */ static int read_jpeg_image( ReadJpeg *jpeg, VipsImage *out ) { struct jpeg_decompress_struct *cinfo = &jpeg->cinfo; VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 3 ); /* Here for longjmp() from vips__new_error_exit(). */ if( setjmp( jpeg->eman.jmp ) ) return( -1 ); t[0] = vips_image_new(); if( read_jpeg_header( jpeg, t[0] ) ) return( -1 ); /* Set decompressing to make readjpeg_free() call * jpeg_stop_decompress(). */ jpeg_start_decompress( cinfo ); jpeg->decompressing = TRUE; #ifdef DEBUG printf( "read_jpeg_image: starting decompress\n" ); #endif /*DEBUG*/ if( vips_image_generate( t[0], NULL, read_jpeg_generate, NULL, jpeg, NULL ) || vips_sequential( t[0], &t[1], "tile_height", 8, "access", jpeg->readbehind ? VIPS_ACCESS_SEQUENTIAL : VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, NULL ) || vips_image_write( t[1], out ) ) return( -1 ); return( 0 ); } /* Read a JPEG file into a VIPS image. */ int vips__jpeg_read_file( const char *filename, VipsImage *out, gboolean header_only, int shrink, gboolean fail, gboolean readbehind ) { ReadJpeg *jpeg; int result; if( !(jpeg = readjpeg_new( out, shrink, fail, readbehind )) ) return( -1 ); /* Here for longjmp() from vips__new_error_exit() during startup. */ if( setjmp( jpeg->eman.jmp ) ) { (void) readjpeg_free( jpeg ); return( -1 ); } /* Set input to file. */ if( readjpeg_file( jpeg, filename ) ) { (void) readjpeg_free( jpeg ); return( -1 ); } /* Need to read in APP1 (EXIF metadata), APP2 (ICC profile), APP13 * (photoshop IPCT). */ jpeg_save_markers( &jpeg->cinfo, JPEG_APP0 + 1, 0xffff ); jpeg_save_markers( &jpeg->cinfo, JPEG_APP0 + 2, 0xffff ); jpeg_save_markers( &jpeg->cinfo, JPEG_APP0 + 13, 0xffff ); /* Convert! */ if( header_only ) result = read_jpeg_header( jpeg, out ); else result = read_jpeg_image( jpeg, out ); /* Don't call readjpeg_free(), we're probably still live. */ return( result ); } /* Just like the above, but we read from a memory buffer. */ typedef struct { /* Public jpeg fields. */ struct jpeg_source_mgr pub; /* Private stuff during read. */ gboolean start_of_file; /* have we gotten any data yet? */ JOCTET *buf; size_t len; } InputBuffer; /* * Initialize source --- called by jpeg_read_header * before any data is actually read. */ static void init_source (j_decompress_ptr cinfo) { InputBuffer *src = (InputBuffer *) cinfo->src; /* We reset the empty-input-file flag for each image, * but we don't clear the input buffer. * This is correct behavior for reading a series of images from one source. */ src->start_of_file = TRUE; } /* * Fill the input buffer --- called whenever buffer is emptied. * * In typical applications, this should read fresh data into the buffer * (ignoring the current state of next_input_byte & bytes_in_buffer), * reset the pointer & count to the start of the buffer, and return TRUE * indicating that the buffer has been reloaded. It is not necessary to * fill the buffer entirely, only to obtain at least one more byte. * * There is no such thing as an EOF return. If the end of the file has been * reached, the routine has a choice of ERREXIT() or inserting fake data into * the buffer. In most cases, generating a warning message and inserting a * fake EOI marker is the best course of action --- this will allow the * decompressor to output however much of the image is there. However, * the resulting error message is misleading if the real problem is an empty * input file, so we handle that case specially. * * In applications that need to be able to suspend compression due to input * not being available yet, a FALSE return indicates that no more data can be * obtained right now, but more may be forthcoming later. In this situation, * the decompressor will return to its caller (with an indication of the * number of scanlines it has read, if any). The application should resume * decompression after it has loaded more data into the input buffer. Note * that there are substantial restrictions on the use of suspension --- see * the documentation. * * When suspending, the decompressor will back up to a convenient restart point * (typically the start of the current MCU). next_input_byte & bytes_in_buffer * indicate where the restart point will be if the current call returns FALSE. * Data beyond this point must be rescanned after resumption, so move it to * the front of the buffer rather than discarding it. */ static boolean fill_input_buffer (j_decompress_ptr cinfo) { static const JOCTET eoi_buffer[4] = { (JOCTET) 0xFF, (JOCTET) JPEG_EOI, 0, 0 }; InputBuffer *src = (InputBuffer *) cinfo->src; if (src->start_of_file) { src->pub.next_input_byte = src->buf; src->pub.bytes_in_buffer = src->len; src->start_of_file = FALSE; } else { WARNMS(cinfo, JWRN_JPEG_EOF); src->pub.next_input_byte = eoi_buffer; src->pub.bytes_in_buffer = 2; } return TRUE; } /* * Skip data --- used to skip over a potentially large amount of * uninteresting data (such as an APPn marker). * * Writers of suspendable-input applications must note that skip_input_data * is not granted the right to give a suspension return. If the skip extends * beyond the data currently in the buffer, the buffer can be marked empty so * that the next read will cause a fill_input_buffer call that can suspend. * Arranging for additional bytes to be discarded before reloading the input * buffer is the application writer's problem. */ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes) { InputBuffer *src = (InputBuffer *) cinfo->src; /* Just skip fwd. */ if (num_bytes > 0) { src->pub.next_input_byte += (size_t) num_bytes; src->pub.bytes_in_buffer -= (size_t) num_bytes; } } /* * An additional method that can be provided by data source modules is the * resync_to_restart method for error recovery in the presence of RST markers. * For the moment, this source module just uses the default resync method * provided by the JPEG library. That method assumes that no backtracking * is possible. */ /* * Terminate source --- called by jpeg_finish_decompress * after all data has been read. Often a no-op. * * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding * application must deal with any cleanup that should happen even * for error exit. */ static void term_source (j_decompress_ptr cinfo) { /* no work necessary here */ } /* * Prepare for input from a memory buffer. The caller needs to free the * buffer after decompress is done, we don't take ownership. */ static void readjpeg_buffer (ReadJpeg *jpeg, void *buf, size_t len) { j_decompress_ptr cinfo = &jpeg->cinfo; InputBuffer *src; /* The source object and input buffer are made permanent so that a series * of JPEG images can be read from the same file by calling jpeg_stdio_src * only before the first one. (If we discarded the buffer at the end of * one image, we'd likely lose the start of the next one.) * This makes it unsafe to use this manager and a different source * manager serially with the same JPEG object. Caveat programmer. */ if (cinfo->src == NULL) { /* first time for this JPEG object? */ cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(InputBuffer)); src = (InputBuffer *) cinfo->src; src->buf = buf; src->len = len; } src = (InputBuffer *) cinfo->src; src->pub.init_source = init_source; src->pub.fill_input_buffer = fill_input_buffer; src->pub.skip_input_data = skip_input_data; src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ src->pub.term_source = term_source; src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ src->pub.next_input_byte = NULL; /* until buffer loaded */ } int vips__jpeg_read_buffer( void *buf, size_t len, VipsImage *out, gboolean header_only, int shrink, int fail, gboolean readbehind ) { ReadJpeg *jpeg; int result; if( !(jpeg = readjpeg_new( out, shrink, fail, readbehind )) ) return( -1 ); if( setjmp( jpeg->eman.jmp ) ) { (void) readjpeg_free( jpeg ); return( -1 ); } /* Set input to buffer. */ readjpeg_buffer( jpeg, buf, len ); /* Need to read in APP1 (EXIF metadata) and APP2 (ICC profile). */ jpeg_save_markers( &jpeg->cinfo, JPEG_APP0 + 1, 0xffff ); jpeg_save_markers( &jpeg->cinfo, JPEG_APP0 + 2, 0xffff ); /* Convert! */ if( header_only ) result = read_jpeg_header( jpeg, out ); else result = read_jpeg_image( jpeg, out ); /* Don't call readjpeg_free(), we're probably still live. */ return( result ); } int vips__isjpeg( const char *filename ) { unsigned char buf[2]; if( vips__get_bytes( filename, buf, 2 ) ) if( (int) buf[0] == 0xff && (int) buf[1] == 0xd8 ) return( 1 ); return( 0 ); } #endif /*HAVE_JPEG*/ vips-7.38.5/libvips/foreign/csv.h0000644000175000017500000000361312303140253013561 00000000000000/* common defs for csv read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_CSV_H #define VIPS_CSV_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ extern const char *vips__foreign_csv_suffs[]; int vips__csv_read( const char *filename, VipsImage *out, int skip, int lines, const char *whitespace, const char *separator ); int vips__csv_read_header( const char *filename, VipsImage *out, int skip, int lines, const char *whitespace, const char *separator ); int vips__csv_write( VipsImage *in, const char *filename, const char *separator ); int vips__matrix_read_header( const char *filename, int *width, int *height, double *scale, double *offset ); int vips__matrix_ismatrix( const char *filename ); VipsImage *vips__matrix_read_file( FILE *fp ); VipsImage *vips__matrix_read( const char *filename ); int vips__matrix_write( VipsImage *in, const char *filename ); int vips__matrix_write_file( VipsImage *in, FILE *fp ); extern const char *vips__foreign_matrix_suffs[]; #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_CSV_H*/ vips-7.38.5/libvips/foreign/tiff.h0000644000175000017500000000341312303140253013714 00000000000000/* common defs for tiff read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_TIFF_H #define VIPS_TIFF_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ extern const char *vips__foreign_tiff_suffs[]; void vips__tiff_init( void ); int vips__tiff_write( VipsImage *in, const char *filename, VipsForeignTiffCompression compression, int Q, VipsForeignTiffPredictor predictor, char *profile, gboolean tile, int tile_width, int tile_height, gboolean pyramid, gboolean squash, VipsForeignTiffResunit resunit, double xres, double yres, gboolean bigtiff, gboolean rgbjpeg ); int vips__tiff_read( const char *filename, VipsImage *out, int page, gboolean readbehind ); int vips__tiff_read_header( const char *filename, VipsImage *out, int page ); gboolean vips__istifftiled( const char *filename ); gboolean vips__istiff( const char *filename ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_TIFF_H*/ vips-7.38.5/libvips/foreign/radiance.c0000644000175000017500000007440312303140253014534 00000000000000/* Read Radiance (.hdr) files * * 3/3/09 * - write packed data, a separate im_rad2float() operation can unpack * 23/3/09 * - add radiance write * 20/12/11 * - reworked as some fns ready for new-style classes * 13/12/12 * - tag RGB rad images as scRGB * 4/11/13 * - support sequential read * 5/11/13 * - rewritten scanline encode and decode, now much faster * 23/1/14 * - put the reader globals into a struct so we can have many active * readers */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Remaining issues: + it ignores some header fields, like VIEW and DATE + it will not rotate/flip as the FORMAT string asks */ /* Sections of this reader from Greg Ward and Radiance with kind permission. The Radience copyright notice appears below. */ /* ==================================================================== * The Radiance Software License, Version 1.0 * * Copyright (c) 1990 - 2009 The Regents of the University of California, * through Lawrence Berkeley National Laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes Radiance software * (http://radsite.lbl.gov/) * developed by the Lawrence Berkeley National Laboratory * (http://www.lbl.gov/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Radiance," "Lawrence Berkeley National Laboratory" * and "The Regents of the University of California" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact radiance@radsite.lbl.gov. * * 5. Products derived from this software may not be called "Radiance", * nor may "Radiance" appear in their name, without prior written * permission of Lawrence Berkeley National Laboratory. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of Lawrence Berkeley National Laboratory. For more * information on Lawrence Berkeley National Laboratory, please see * . */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include #include "radiance.h" /* Begin copy-paste from Radiance sources. */ /* flags for scanline ordering */ #define XDECR 1 #define YDECR 2 #define YMAJOR 4 /* standard scanline ordering */ #define PIXSTANDARD (YMAJOR|YDECR) #define PIXSTDFMT "-Y %d +X %d\n" /* structure for image dimensions */ typedef struct { int rt; /* orientation (from flags above) */ int xr, yr; /* x and y resolution */ } RESOLU; /* macros to get scanline length and number */ #define scanlen(rs) ((rs)->rt & YMAJOR ? (rs)->xr : (rs)->yr) #define numscans(rs) ((rs)->rt & YMAJOR ? (rs)->yr : (rs)->xr) /* resolution string buffer and its size */ #define RESOLU_BUFLEN 32 /* macros for reading/writing resolution struct */ #define fputsresolu(rs,fp) fputs(resolu2str(resolu_buf,rs),fp) #define fgetsresolu(rs,fp) str2resolu(rs, \ fgets(resolu_buf,RESOLU_BUFLEN,fp)) /* reading/writing of standard ordering */ #define fprtresolu(sl,ns,fp) fprintf(fp,PIXSTDFMT,ns,sl) #define fscnresolu(sl,ns,fp) (fscanf(fp,PIXSTDFMT,ns,sl)==2) /* defined in resolu.c */ typedef int gethfunc(char *s, void *p); /* callback to process header lines */ #define RED 0 #define GRN 1 #define BLU 2 #define CIEX 0 /* or, if input is XYZ... */ #define CIEY 1 #define CIEZ 2 #define EXP 3 /* exponent same for either format */ #define COLXS 128 /* excess used for exponent */ #define WHT 3 /* used for RGBPRIMS type */ #undef BYTE #define BYTE unsigned char /* 8-bit unsigned integer */ typedef BYTE COLR[4]; /* red, green, blue (or X,Y,Z), exponent */ typedef float COLORV; typedef COLORV COLOR[3]; /* red, green, blue (or X,Y,Z) */ typedef float RGBPRIMS[4][2]; /* (x,y) chromaticities for RGBW */ typedef float (*RGBPRIMP)[2]; /* pointer to RGBPRIMS array */ typedef float COLORMAT[3][3]; /* color coordinate conversion matrix */ #define copycolr(c1,c2) (c1[0]=c2[0],c1[1]=c2[1], \ c1[2]=c2[2],c1[3]=c2[3]) #define colval(col,pri) ((col)[pri]) #define setcolor(col,r,g,b) ((col)[RED]=(r),(col)[GRN]=(g),(col)[BLU]=(b)) #define copycolor(c1,c2) ((c1)[0]=(c2)[0],(c1)[1]=(c2)[1],(c1)[2]=(c2)[2]) #define scalecolor(col,sf) ((col)[0]*=(sf),(col)[1]*=(sf),(col)[2]*=(sf)) #define addcolor(c1,c2) ((c1)[0]+=(c2)[0],(c1)[1]+=(c2)[1],(c1)[2]+=(c2)[2]) #define multcolor(c1,c2) ((c1)[0]*=(c2)[0],(c1)[1]*=(c2)[1],(c1)[2]*=(c2)[2]) #ifdef NTSC #define CIE_x_r 0.670 /* standard NTSC primaries */ #define CIE_y_r 0.330 #define CIE_x_g 0.210 #define CIE_y_g 0.710 #define CIE_x_b 0.140 #define CIE_y_b 0.080 #define CIE_x_w 0.3333 /* use true white */ #define CIE_y_w 0.3333 #else #define CIE_x_r 0.640 /* nominal CRT primaries */ #define CIE_y_r 0.330 #define CIE_x_g 0.290 #define CIE_y_g 0.600 #define CIE_x_b 0.150 #define CIE_y_b 0.060 #define CIE_x_w 0.3333 /* use true white */ #define CIE_y_w 0.3333 #endif #define STDPRIMS {{CIE_x_r,CIE_y_r},{CIE_x_g,CIE_y_g}, \ {CIE_x_b,CIE_y_b},{CIE_x_w,CIE_y_w}} #define CIE_D ( CIE_x_r*(CIE_y_g - CIE_y_b) + \ CIE_x_g*(CIE_y_b - CIE_y_r) + \ CIE_x_b*(CIE_y_r - CIE_y_g) ) #define CIE_C_rD ( (1./CIE_y_w) * \ ( CIE_x_w*(CIE_y_g - CIE_y_b) - \ CIE_y_w*(CIE_x_g - CIE_x_b) + \ CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g ) ) #define CIE_C_gD ( (1./CIE_y_w) * \ ( CIE_x_w*(CIE_y_b - CIE_y_r) - \ CIE_y_w*(CIE_x_b - CIE_x_r) - \ CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r ) ) #define CIE_C_bD ( (1./CIE_y_w) * \ ( CIE_x_w*(CIE_y_r - CIE_y_g) - \ CIE_y_w*(CIE_x_r - CIE_x_g) + \ CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r ) ) #define CIE_rf (CIE_y_r*CIE_C_rD/CIE_D) #define CIE_gf (CIE_y_g*CIE_C_gD/CIE_D) #define CIE_bf (CIE_y_b*CIE_C_bD/CIE_D) /* As of 9-94, CIE_rf=.265074126, CIE_gf=.670114631 and CIE_bf=.064811243 */ /***** The following definitions are valid for RGB colors only... *****/ #define bright(col) (CIE_rf*(col)[RED]+CIE_gf*(col)[GRN]+CIE_bf*(col)[BLU]) #define normbright(c) ( ( (long)(CIE_rf*256.+.5)*(c)[RED] + \ (long)(CIE_gf*256.+.5)*(c)[GRN] + \ (long)(CIE_bf*256.+.5)*(c)[BLU] ) >> 8 ) /* luminous efficacies over visible spectrum */ #define MAXEFFICACY 683. /* defined maximum at 550 nm */ #define WHTEFFICACY 179. /* uniform white light */ #define D65EFFICACY 203. /* standard illuminant D65 */ #define INCEFFICACY 160. /* illuminant A (incand.) */ #define SUNEFFICACY 208. /* illuminant B (solar dir.) */ #define SKYEFFICACY D65EFFICACY /* skylight (should be 110) */ #define DAYEFFICACY D65EFFICACY /* combined sky and solar */ #define luminance(col) (WHTEFFICACY * bright(col)) /***** ...end of stuff specific to RGB colors *****/ #define intens(col) ( (col)[0] > (col)[1] \ ? (col)[0] > (col)[2] ? (col)[0] : (col)[2] \ : (col)[1] > (col)[2] ? (col)[1] : (col)[2] ) #define colrval(c,p) ( (c)[EXP] ? \ ldexp((c)[p]+.5,(int)(c)[EXP]-(COLXS+8)) : \ 0. ) #define WHTCOLOR {1.0,1.0,1.0} #define BLKCOLOR {0.0,0.0,0.0} #define WHTCOLR {128,128,128,COLXS+1} #define BLKCOLR {0,0,0,0} /* picture format identifier */ #define COLRFMT "32-bit_rle_rgbe" #define CIEFMT "32-bit_rle_xyze" #define PICFMT "32-bit_rle_???e" /* matches either */ #define LPICFMT 15 /* max format id len */ /* macros for exposures */ #define EXPOSSTR "EXPOSURE=" #define LEXPOSSTR 9 #define isexpos(hl) (!strncmp(hl,EXPOSSTR,LEXPOSSTR)) #define exposval(hl) atof((hl)+LEXPOSSTR) #define fputexpos(ex,fp) fprintf(fp,"%s%e\n",EXPOSSTR,ex) /* macros for pixel aspect ratios */ #define ASPECTSTR "PIXASPECT=" #define LASPECTSTR 10 #define isaspect(hl) (!strncmp(hl,ASPECTSTR,LASPECTSTR)) #define aspectval(hl) atof((hl)+LASPECTSTR) #define fputaspect(pa,fp) fprintf(fp,"%s%f\n",ASPECTSTR,pa) /* macros for primary specifications */ #define PRIMARYSTR "PRIMARIES=" #define LPRIMARYSTR 10 #define isprims(hl) (!strncmp(hl,PRIMARYSTR,LPRIMARYSTR)) #define primsval(p,hl) sscanf(hl+LPRIMARYSTR, \ "%f %f %f %f %f %f %f %f", \ &(p)[RED][CIEX],&(p)[RED][CIEY], \ &(p)[GRN][CIEX],&(p)[GRN][CIEY], \ &(p)[BLU][CIEX],&(p)[BLU][CIEY], \ &(p)[WHT][CIEX],&(p)[WHT][CIEY]) #define fputprims(p,fp) fprintf(fp, \ "%s %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f\n",\ PRIMARYSTR, \ (p)[RED][CIEX],(p)[RED][CIEY], \ (p)[GRN][CIEX],(p)[GRN][CIEY], \ (p)[BLU][CIEX],(p)[BLU][CIEY], \ (p)[WHT][CIEX],(p)[WHT][CIEY]) /* macros for color correction */ #define COLCORSTR "COLORCORR=" #define LCOLCORSTR 10 #define iscolcor(hl) (!strncmp(hl,COLCORSTR,LCOLCORSTR)) #define colcorval(cc,hl) sscanf(hl+LCOLCORSTR,"%f %f %f", \ &(cc)[RED],&(cc)[GRN],&(cc)[BLU]) #define fputcolcor(cc,fp) fprintf(fp,"%s %f %f %f\n",COLCORSTR, \ (cc)[RED],(cc)[GRN],(cc)[BLU]) #define CGAMUT_LOWER 01 #define CGAMUT_UPPER 02 #define CGAMUT (CGAMUT_LOWER|CGAMUT_UPPER) #define rgb_cie(xyz,rgb) colortrans(xyz,rgb2xyzmat,rgb) #define cpcolormat(md,ms) memcpy((void *)md,(void *)ms,sizeof(COLORMAT)) #define MAXLINE 512 char HDRSTR[] = "#?"; /* information header magic number */ char FMTSTR[] = "FORMAT="; /* format identifier */ char TMSTR[] = "CAPDATE="; /* capture date identifier */ static gethfunc mycheck; static int formatval( /* get format value (return true if format) */ register char *r, register char *s ) { register char *cp = FMTSTR; while (*cp) if (*cp++ != *s++) return(0); while (isspace(*s)) s++; if (!*s) return(0); if (r == NULL) return(1); do *r++ = *s++; while(*s && !isspace(*s)); *r = '\0'; return(1); } static int isformat( /* is line a format line? */ char *s ) { return(formatval(NULL, s)); } static int getheader( /* get header from file */ FILE *fp, gethfunc *f, void *p ) { char buf[MAXLINE]; int n; /* give up if there are more than 1,000 lines of header, prevents * us scanning entire files when testing for israd */ for (n = 0; n < 1000; n++) { buf[MAXLINE-2] = '\n'; if (fgets(buf, MAXLINE, fp) == NULL) return(-1); if (buf[0] == '\n') return(0); #ifdef MSDOS if (buf[0] == '\r' && buf[1] == '\n') return(0); #endif if (buf[MAXLINE-2] != '\n') { ungetc(buf[MAXLINE-2], fp); /* prevent false end */ buf[MAXLINE-2] = '\0'; } if (f != NULL && (*f)(buf, p) < 0) return(-1); } return(0); } struct check { FILE *fp; char fs[64]; }; static int mycheck( /* check a header line for format info. */ char *s, void *cp ) { if (!formatval(((struct check*)cp)->fs, s) && ((struct check*)cp)->fp != NULL) { fputs(s, ((struct check*)cp)->fp); } return(0); } static int globmatch( /* check for match of s against pattern p */ register char *p, register char *s ) { int setmatch; do { switch (*p) { case '?': /* match any character */ if (!*s++) return(0); break; case '*': /* match any string */ while (p[1] == '*') p++; do if ( (p[1]=='?' || p[1]==*s) && globmatch(p+1,s) ) return(1); while (*s++); return(0); case '[': /* character set */ setmatch = *s == *++p; if (!*p) return(0); while (*++p != ']') { if (!*p) return(0); if (*p == '-') { setmatch += p[-1] <= *s && *s <= p[1]; if (!*++p) break; } else setmatch += *p == *s; } if (!setmatch) return(0); s++; break; case '\\': /* literal next */ p++; /* fall through */ default: /* normal character */ if (*p != *s) return(0); s++; break; } } while (*p++); return(1); } /* * Checkheader(fin,fmt,fout) returns a value of 1 if the input format * matches the specification in fmt, 0 if no input format was found, * and -1 if the input format does not match or there is an * error reading the header. If fmt is empty, then -1 is returned * if any input format is found (or there is an error), and 0 otherwise. * If fmt contains any '*' or '?' characters, then checkheader * does wildcard expansion and copies a matching result into fmt. * Be sure that fmt is big enough to hold the match in such cases, * and that it is not a static, read-only string! * The input header (minus any format lines) is copied to fout * if fout is not NULL. */ static int checkheader( FILE *fin, char *fmt, FILE *fout ) { struct check cdat; register char *cp; cdat.fp = fout; cdat.fs[0] = '\0'; if (getheader(fin, mycheck, &cdat) < 0) return(-1); if (!cdat.fs[0]) return(0); for (cp = fmt; *cp; cp++) /* check for globbing */ if ((*cp == '?') | (*cp == '*')) { if (globmatch(fmt, cdat.fs)) { strcpy(fmt, cdat.fs); return(1); } else return(-1); } return(strcmp(fmt, cdat.fs) ? -1 : 1); /* literal match */ } static char resolu_buf[RESOLU_BUFLEN]; /* resolution line buffer */ static int str2resolu(rp, buf) /* convert resolution line to struct */ register RESOLU *rp; char *buf; { register char *xndx, *yndx; register char *cp; if (buf == NULL) return(0); xndx = yndx = NULL; for (cp = buf; *cp; cp++) if (*cp == 'X') xndx = cp; else if (*cp == 'Y') yndx = cp; if (xndx == NULL || yndx == NULL) return(0); rp->rt = 0; if (xndx > yndx) rp->rt |= YMAJOR; if (xndx[-1] == '-') rp->rt |= XDECR; if (yndx[-1] == '-') rp->rt |= YDECR; if ((rp->xr = atoi(xndx+1)) <= 0) return(0); if ((rp->yr = atoi(yndx+1)) <= 0) return(0); return(1); } #ifdef getc_unlocked /* avoid horrendous overhead of flockfile */ #undef getc #undef putc #define getc getc_unlocked #define putc putc_unlocked #endif #define MINELEN 8 /* minimum scanline length for encoding */ #define MAXELEN 0x7fff /* maximum scanline length for encoding */ #define MINRUN 4 /* minimum run length */ static void fputformat( /* put out a format value */ char *s, FILE *fp ) { fputs(FMTSTR, fp); fputs(s, fp); putc('\n', fp); } char * resolu2str(buf, rp) /* convert resolution struct to line */ char *buf; register RESOLU *rp; { if (rp->rt&YMAJOR) sprintf(buf, "%cY %d %cX %d\n", rp->rt&YDECR ? '-' : '+', rp->yr, rp->rt&XDECR ? '-' : '+', rp->xr); else sprintf(buf, "%cX %d %cY %d\n", rp->rt&XDECR ? '-' : '+', rp->xr, rp->rt&YDECR ? '-' : '+', rp->yr); return(buf); } /* End copy-paste from Radiance sources. */ #define BUFFER_SIZE (4096) #define BUFFER_MARGIN (256) /* Read from a FILE with a rolling memory buffer ... this lets us reduce the * number of fgetc() and gives us some very quick readahead. */ typedef struct _Buffer { unsigned char text[BUFFER_SIZE + BUFFER_MARGIN]; int length; int position; FILE *fp; } Buffer; static Buffer * buffer_new( FILE *fp ) { Buffer *buffer = g_new0( Buffer, 1 ); buffer->length = 0; buffer->position = 0; buffer->fp = fp; return( buffer ); } static void buffer_free( Buffer *buffer ) { g_free( buffer ); } /* Make sure there are at least @require bytes of readahead available. */ static int buffer_need( Buffer *buffer, int require ) { int remaining; g_assert( require < BUFFER_MARGIN ); remaining = buffer->length - buffer->position; if( remaining < require ) { size_t len; memcpy( buffer->text, buffer->text + buffer->position, remaining ); buffer->position = 0; buffer->length = remaining; len = fread( buffer->text + buffer->length, 1, BUFFER_SIZE, buffer->fp ); buffer->length += len; remaining = buffer->length - buffer->position; if( remaining < require ) { vips_error( "rad2vips", "%s", _( "end of file" ) ); return( -1 ); } } return( 0 ); } #define BUFFER_FETCH(B) ((B)->text[(B)->position++]) #define BUFFER_PEEK(B) ((B)->text[(B)->position]) /* Read a single scanlne, encoded in the old style. */ static int scanline_read_old( Buffer *buffer, COLR *scanline, int width ) { int rshift; rshift = 0; while( width > 0 ) { if( buffer_need( buffer, 4 ) ) return( -1 ); scanline[0][RED] = BUFFER_FETCH( buffer ); scanline[0][GRN] = BUFFER_FETCH( buffer ); scanline[0][BLU] = BUFFER_FETCH( buffer ); scanline[0][EXP] = BUFFER_FETCH( buffer ); if( scanline[0][RED] == 1 && scanline[0][GRN] == 1 && scanline[0][BLU] == 1 ) { int i; for( i = scanline[0][EXP] << rshift; i > 0; i-- ) { copycolr( scanline[0], scanline[-1] ); scanline += 1; width -= 1; } rshift += 8; } else { scanline += 1; width -= 1; rshift = 0; } } return( 0 ); } /* Read a single encoded scanline. */ static int scanline_read( Buffer *buffer, COLR *scanline, int width ) { int i, j; /* Detect old-style scanlines. */ if( width < MINELEN || width > MAXELEN ) return( scanline_read_old( buffer, scanline, width ) ); if( buffer_need( buffer, 4 ) ) return( -1 ); if( BUFFER_PEEK( buffer ) != 2 ) return( scanline_read_old( buffer, scanline, width ) ); scanline[0][RED] = BUFFER_FETCH( buffer ); scanline[0][GRN] = BUFFER_FETCH( buffer ); scanline[0][BLU] = BUFFER_FETCH( buffer ); scanline[0][EXP] = BUFFER_FETCH( buffer ); if( scanline[0][GRN] != 2 || scanline[0][BLU] & 128 ) return( scanline_read_old( buffer, scanline + 1, width - 1 ) ); if( ((scanline[0][BLU] << 8) | scanline[0][EXP]) != width ) { vips_error( "rad2vips", "%s", _( "scanline length mismatch" ) ); return( -1 ); } for( i = 0; i < 4; i++ ) for( j = 0; j < width; ) { int code, len; gboolean run; if( buffer_need( buffer, 2 ) ) return( -1 ); code = BUFFER_FETCH( buffer ); run = code > 128; len = run ? code & 127 : code; if( j + len > width ) { vips_error( "rad2vips", "%s", _( "overrun" ) ); return( -1 ); } if( run ) { int val; val = BUFFER_FETCH( buffer ); while( len-- ) scanline[j++][i] = val; } else { if( buffer_need( buffer, len ) ) return( -1 ); while( len-- ) scanline[j++][i] = BUFFER_FETCH( buffer ); } } return( 0 ); } /* An encoded scanline can't be larger than this. */ #define MAX_LINE (2 * MAXELEN * sizeof( COLR )) /* Write a single scanline. */ static int scanline_write( COLR *scanline, int width, FILE *fp ) { unsigned char buffer[MAX_LINE]; int buffer_pos = 0; #define PUTC( CH ) { \ buffer[buffer_pos++] = (CH); \ g_assert( buffer_pos <= MAX_LINE ); \ } int i, j, beg, cnt; if( width < MINELEN || width > MAXELEN ) /* Write as a flat scanline. */ return( fwrite( scanline, sizeof( COLR ), width, fp ) - width ); /* An RLE scanline. Write magic header. */ PUTC( 2 ); PUTC( 2 ); PUTC( width >> 8 ); PUTC( width & 255 ); for( i = 0; i < 4; i++ ) { for( j = 0; j < width; ) { /* Set beg / cnt to the start and length of the next * run longer than MINRUN. */ for( beg = j; beg < width; beg += cnt ) { for( cnt = 1; cnt < 127 && beg + cnt < width && scanline[beg + cnt][i] == scanline[beg][i]; cnt++ ) ; if( cnt >= MINRUN ) break; } /* Code pixels leading up to the run as a set of * non-runs. */ while( j < beg ) { int len = VIPS_MIN( 128, beg - j ); COLR *p = scanline + j; int k; PUTC( len ); for( k = 0; k < len; k++ ) PUTC( p[k][i] ); j += len; } /* Code the run we found, if any */ if( cnt >= MINRUN ) { PUTC( 128 + cnt ); PUTC( scanline[j][i] ); j += cnt; } } } return( fwrite( buffer, 1, buffer_pos, fp ) - buffer_pos ); } /* What we track during radiance file read. */ typedef struct { char *filename; VipsImage *out; FILE *fin; char format[256]; double expos; COLOR colcor; double aspect; RGBPRIMS prims; RESOLU rs; Buffer *buffer; } Read; int vips__rad_israd( const char *filename ) { FILE *fin; char format[256]; int result; #ifdef DEBUG printf( "israd: \"%s\"\n", filename ); #endif /*DEBUG*/ if( !(fin = vips__file_open_read( filename, NULL, FALSE )) ) return( 0 ); strcpy( format, PICFMT ); result = checkheader( fin, format, NULL ); fclose( fin ); return( result == 1 ); } static void read_destroy( VipsObject *object, Read *read ) { VIPS_FREE( read->filename ); VIPS_FREEF( fclose, read->fin ); VIPS_FREEF( buffer_free, read->buffer ); } static Read * read_new( const char *filename, VipsImage *out ) { Read *read; int i; if( !(read = VIPS_NEW( out, Read )) ) return( NULL ); read->filename = vips_strdup( NULL, filename ); read->out = out; read->fin = NULL; strcpy( read->format, COLRFMT ); read->expos = 1.0; for( i = 0; i < 3; i++ ) read->colcor[i] = 1.0; read->aspect = 1.0; read->prims[0][0] = CIE_x_r; read->prims[0][1] = CIE_y_r; read->prims[1][0] = CIE_x_g; read->prims[1][1] = CIE_y_g; read->prims[2][0] = CIE_x_b; read->prims[2][1] = CIE_y_b; read->prims[3][0] = CIE_x_w; read->prims[3][1] = CIE_y_w; g_signal_connect( out, "close", G_CALLBACK( read_destroy ), read ); if( !(read->fin = vips__file_open_read( filename, NULL, FALSE )) || !(read->buffer = buffer_new( read->fin )) ) return( NULL ); return( read ); } static int rad2vips_process_line( char *line, Read *read ) { if( isformat( line ) ) { if( formatval( line, read->format ) ) return( -1 ); } else if( isexpos( line ) ) { read->expos *= exposval( line ); } else if( iscolcor( line ) ) { COLOR cc; int i; colcorval( cc, line ); for( i = 0; i < 3; i++ ) read->colcor[i] *= cc[i]; } else if( isaspect( line ) ) { read->aspect *= aspectval( line ); } else if( isprims( line ) ) { primsval( read->prims, line ); } return( 0 ); } static const char *prims_name[4][2] = { { "rad-prims-rx", "rad-prims-ry" }, { "rad-prims-gx", "rad-prims-gy" }, { "rad-prims-bx", "rad-prims-by" }, { "rad-prims-wx", "rad-prims-wy" } }; static const char *colcor_name[3] = { "rad-colcor-r", "rad-colcor-g", "rad-colcor-b" }; static int rad2vips_get_header( Read *read, VipsImage *out ) { int i, j; VipsInterpretation interpretation; if( getheader( read->fin, (gethfunc *) rad2vips_process_line, read ) || !fgetsresolu( &read->rs, read->fin ) ) { vips_error( "rad2vips", "%s", _( "error reading radiance header" ) ); return( -1 ); } if( strcmp( read->format, COLRFMT ) == 0 ) interpretation = VIPS_INTERPRETATION_scRGB; else if( strcmp( read->format, CIEFMT ) == 0 ) interpretation = VIPS_INTERPRETATION_XYZ; else interpretation = VIPS_INTERPRETATION_MULTIBAND; vips_image_init_fields( out, scanlen( &read->rs ), numscans( &read->rs ), 4, VIPS_FORMAT_UCHAR, VIPS_CODING_RAD, interpretation, 1, read->aspect ); vips_image_pipelinev( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL ); vips_image_set_string( out, "rad-format", read->format ); vips_image_set_double( out, "rad-expos", read->expos ); for( i = 0; i < 3; i++ ) vips_image_set_double( out, colcor_name[i], read->colcor[i] ); vips_image_set_double( out, "rad-aspect", read->aspect ); for( i = 0; i < 4; i++ ) for( j = 0; j < 2; j++ ) vips_image_set_double( out, prims_name[i][j], read->prims[i][j] ); return( 0 ); } int vips__rad_header( const char *filename, VipsImage *out ) { Read *read; #ifdef DEBUG printf( "rad2vips_header: reading \"%s\"\n", filename ); #endif /*DEBUG*/ if( !(read = read_new( filename, out )) ) return( -1 ); if( rad2vips_get_header( read, read->out ) ) return( -1 ); return( 0 ); } static int rad2vips_generate( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRect *r = &or->valid; Read *read = (Read *) a; int y; #ifdef DEBUG printf( "rad2vips_generate: line %d, %d rows\n", r->top, r->height ); #endif /*DEBUG*/ VIPS_GATE_START( "rad2vips_generate: work" ); for( y = 0; y < r->height; y++ ) { COLR *buf = (COLR *) VIPS_REGION_ADDR( or, 0, r->top + y ); if( scanline_read( read->buffer, buf, or->im->Xsize ) ) { vips_error( "rad2vips", _( "read error line %d" ), r->top + y ); return( -1 ); } } VIPS_GATE_STOP( "rad2vips_generate: work" ); return( 0 ); } int vips__rad_load( const char *filename, VipsImage *out, gboolean readbehind ) { VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 3 ); Read *read; #ifdef DEBUG printf( "rad2vips: reading \"%s\"\n", filename ); #endif /*DEBUG*/ if( !(read = read_new( filename, out )) ) return( -1 ); t[0] = vips_image_new(); if( rad2vips_get_header( read, t[0] ) ) return( -1 ); if( vips_image_generate( t[0], NULL, rad2vips_generate, NULL, read, NULL ) || vips_sequential( t[0], &t[1], "tile_height", 8, "access", readbehind ? VIPS_ACCESS_SEQUENTIAL : VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, NULL ) || vips_image_write( t[1], out ) ) return( -1 ); return( 0 ); } /* What we track during a radiance file write. */ typedef struct { VipsImage *in; char *filename; FILE *fout; char format[256]; double expos; COLOR colcor; double aspect; RGBPRIMS prims; RESOLU rs; } Write; static void write_destroy( Write *write ) { VIPS_FREE( write->filename ); VIPS_FREEF( fclose, write->fout ); vips_free( write ); } static Write * write_new( VipsImage *in, const char *filename ) { Write *write; int i; if( !(write = VIPS_NEW( NULL, Write )) ) return( NULL ); write->in = in; write->filename = vips_strdup( NULL, filename ); write->fout = vips__file_open_write( filename, FALSE ); strcpy( write->format, COLRFMT ); write->expos = 1.0; for( i = 0; i < 3; i++ ) write->colcor[i] = 1.0; write->aspect = 1.0; write->prims[0][0] = CIE_x_r; write->prims[0][1] = CIE_y_r; write->prims[1][0] = CIE_x_g; write->prims[1][1] = CIE_y_g; write->prims[2][0] = CIE_x_b; write->prims[2][1] = CIE_y_b; write->prims[3][0] = CIE_x_w; write->prims[3][1] = CIE_y_w; if( !write->filename || !write->fout ) { write_destroy( write ); return( NULL ); } return( write ); } static int vips2rad_put_header( Write *write ) { const char *str; int i, j; double d; (void) vips_image_get_double( write->in, "rad-expos", &write->expos ); (void) vips_image_get_double( write->in, "rad-aspect", &write->aspect ); if( !vips_image_get_string( write->in, "rad-format", &str ) ) vips_strncpy( write->format, str, 256 ); if( write->in->Type == VIPS_INTERPRETATION_scRGB ) strcpy( write->format, COLRFMT ); if( write->in->Type == VIPS_INTERPRETATION_XYZ ) strcpy( write->format, CIEFMT ); for( i = 0; i < 3; i++ ) if( !vips_image_get_double( write->in, colcor_name[i], &d ) ) write->colcor[i] = d; for( i = 0; i < 4; i++ ) for( j = 0; j < 2; j++ ) if( !vips_image_get_double( write->in, prims_name[i][j], &d ) ) write->prims[i][j] = d; /* Make y decreasing for consistency with vips. */ write->rs.rt = YDECR | YMAJOR; write->rs.xr = write->in->Xsize; write->rs.yr = write->in->Ysize; fprintf( write->fout, "#?RADIANCE\n" ); fputformat( write->format, write->fout ); fputexpos( write->expos, write->fout ); fputcolcor( write->colcor, write->fout ); fprintf( write->fout, "SOFTWARE=vips %s\n", vips_version_string() ); fputaspect( write->aspect, write->fout ); fputprims( write->prims, write->fout ); fputs( "\n", write->fout ); fputsresolu( &write->rs, write->fout ); return( 0 ); } static int vips2rad_put_data_block( VipsRegion *region, Rect *area, void *a ) { Write *write = (Write *) a; int i; for( i = 0; i < area->height; i++ ) { VipsPel *p = VIPS_REGION_ADDR( region, 0, area->top + i ); if( scanline_write( (COLR *) p, area->width, write->fout ) ) return( -1 ); } return( 0 ); } static int vips2rad_put_data( Write *write ) { if( vips_sink_disc( write->in, vips2rad_put_data_block, write ) ) return( -1 ); return( 0 ); } int vips__rad_save( VipsImage *in, const char *filename ) { Write *write; #ifdef DEBUG printf( "vips2rad: writing \"%s\"\n", filename ); #endif /*DEBUG*/ if( vips_image_pio_input( in ) || vips_check_coding_rad( "vips2rad", in ) ) return( -1 ); if( !(write = write_new( in, filename )) ) return( -1 ); if( vips2rad_put_header( write ) || vips2rad_put_data( write ) ) { write_destroy( write ); return( -1 ); } write_destroy( write ); return( 0 ); } const char *vips__rad_suffs[] = { ".hdr", NULL }; vips-7.38.5/libvips/foreign/analyze2vips.h0000644000175000017500000000241512303140253015414 00000000000000/* common defs for tiff read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_ANALYZE_H #define VIPS_ANALYZE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips__isanalyze( const char *filename ); int vips__analyze_read_header( const char *filename, VipsImage *out ); int vips__analyze_read( const char *filename, VipsImage *out ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_ANALYZE_H*/ vips-7.38.5/libvips/foreign/vips2jpeg.c0000644000175000017500000007515112303140253014700 00000000000000/* wrap jpeg libray for write * * 28/11/03 JC * - better no-overshoot on tile loop * 12/11/04 * - better demand size choice for eval * 30/6/05 JC * - update im_error()/im_warn() * - now loads and saves exif data * 30/7/05 * - now loads ICC profiles * - now saves ICC profiles from the VIPS header * 24/8/05 * - jpeg load sets vips xres/yres from exif, if possible * - jpeg save sets exif xres/yres from vips, if possible * 29/8/05 * - cut from old vips_jpeg.c * 20/4/06 * - auto convert to sRGB/mono for save * 13/10/06 * - add #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_JPEG #include #include #include #include #include #include #ifdef HAVE_EXIF #ifdef UNTAGGED_EXIF #include #include #include #include #else /*!UNTAGGED_EXIF*/ #include #include #include #include #endif /*UNTAGGED_EXIF*/ #endif /*HAVE_EXIF*/ #include "jpeg.h" #include "vipsjpeg.h" /* New output message method - send to VIPS. */ void vips__new_output_message( j_common_ptr cinfo ) { char buffer[JMSG_LENGTH_MAX]; (*cinfo->err->format_message)( cinfo, buffer ); vips_error( "VipsJpeg", _( "%s" ), buffer ); #ifdef DEBUG printf( "vips__new_output_message: \"%s\"\n", buffer ); #endif /*DEBUG*/ } /* New error_exit handler. */ void vips__new_error_exit( j_common_ptr cinfo ) { ErrorManager *eman = (ErrorManager *) cinfo->err; #ifdef DEBUG printf( "vips__new_error_exit:\n" ); #endif /*DEBUG*/ /* Close the fp if necessary. */ if( eman->fp ) { (void) fclose( eman->fp ); eman->fp = NULL; } /* Send the error message to VIPS. This method is overridden above. */ (*cinfo->err->output_message)( cinfo ); /* Jump back. */ longjmp( eman->jmp, 1 ); } /* What we track during a JPEG write. */ typedef struct { VipsImage *in; struct jpeg_compress_struct cinfo; ErrorManager eman; JSAMPROW *row_pointer; char *profile_bytes; unsigned int profile_length; VipsImage *inverted; } Write; static void write_destroy( Write *write ) { jpeg_destroy_compress( &write->cinfo ); VIPS_FREEF( fclose, write->eman.fp ); VIPS_FREE( write->row_pointer ); VIPS_FREE( write->profile_bytes ); VIPS_UNREF( write->inverted ); g_free( write ); } static Write * write_new( VipsImage *in ) { Write *write; if( !(write = g_new0( Write, 1 )) ) return( NULL ); write->in = in; write->row_pointer = NULL; write->cinfo.err = jpeg_std_error( &write->eman.pub ); write->eman.pub.error_exit = vips__new_error_exit; write->eman.pub.output_message = vips__new_output_message; write->eman.pub.output_message = vips__new_output_message; write->eman.fp = NULL; write->profile_bytes = NULL; write->profile_length = 0; write->inverted = NULL; return( write ); } #ifdef HAVE_EXIF static void vips_exif_set_int( ExifData *ed, ExifEntry *entry, unsigned long component, void *data ) { int value = *((int *) data); ExifByteOrder bo; size_t sizeof_component; size_t offset = component; if( entry->components <= component ) { VIPS_DEBUG_MSG( "vips_exif_set_int: too few components\n" ); return; } /* Wait until after the component check to make sure we cant get /0. */ bo = exif_data_get_byte_order( ed ); sizeof_component = entry->size / entry->components; offset = component * sizeof_component; VIPS_DEBUG_MSG( "vips_exif_set_int: %s = %d\n", exif_tag_get_title( entry->tag ), value ); if( entry->format == EXIF_FORMAT_SHORT ) exif_set_short( entry->data + offset, bo, value ); else if( entry->format == EXIF_FORMAT_SSHORT ) exif_set_sshort( entry->data + offset, bo, value ); else if( entry->format == EXIF_FORMAT_LONG ) exif_set_long( entry->data + offset, bo, value ); else if( entry->format == EXIF_FORMAT_SLONG ) exif_set_slong( entry->data + offset, bo, value ); } static void vips_exif_double_to_rational( double value, ExifRational *rv ) { unsigned int scale; /* We scale up to fill uint32, then set that as the * denominator. Try to avoid generating 0. */ scale = (unsigned int) ((UINT_MAX - 1000) / value); scale = scale == 0 ? 1 : scale; rv->numerator = value * scale; rv->denominator = scale; } static void vips_exif_double_to_srational( double value, ExifSRational *srv ) { int scale; /* We scale up to fill int32, then set that as the * denominator. Try to avoid generating 0. */ scale = (int) ((INT_MAX - 1000) / value); scale = scale == 0 ? 1 : scale; srv->numerator = value * scale; srv->denominator = scale; } /* Parse a char* into an ExifRational. We allow floats as well. */ static void vips_exif_parse_rational( const char *str, ExifRational *rv ) { if( sscanf( str, " %u / %u ", &rv->numerator, &rv->denominator ) == 2 ) return; vips_exif_double_to_rational( g_ascii_strtod( str, NULL ), rv ); } /* Parse a char* into an ExifSRational. We allow floats as well. */ static void vips_exif_parse_srational( const char *str, ExifSRational *srv ) { if( sscanf( str, " %d / %d ", &srv->numerator, &srv->denominator ) == 2 ) return; vips_exif_double_to_srational( g_ascii_strtod( str, NULL ), srv ); } /* Does both signed and unsigned rationals from a char*. */ static void vips_exif_set_rational( ExifData *ed, ExifEntry *entry, unsigned long component, void *data ) { char *value = (char *) data; ExifByteOrder bo; size_t sizeof_component; size_t offset; if( entry->components <= component ) { VIPS_DEBUG_MSG( "vips_exif_set_rational: " "too few components\n" ); return; } /* Wait until after the component check to make sure we cant get /0. */ bo = exif_data_get_byte_order( ed ); sizeof_component = entry->size / entry->components; offset = component * sizeof_component; VIPS_DEBUG_MSG( "vips_exif_set_rational: %s = \"%s\"\n", exif_tag_get_title( entry->tag ), value ); if( entry->format == EXIF_FORMAT_RATIONAL ) { ExifRational rv; vips_exif_parse_rational( value, &rv ); VIPS_DEBUG_MSG( "vips_exif_set_rational: %u / %u\n", rv.numerator, rv.denominator ); exif_set_rational( entry->data + offset, bo, rv ); } else if( entry->format == EXIF_FORMAT_SRATIONAL ) { ExifSRational srv; vips_exif_parse_srational( value, &srv ); VIPS_DEBUG_MSG( "vips_exif_set_rational: %d / %d\n", srv.numerator, srv.denominator ); exif_set_srational( entry->data + offset, bo, srv ); } } /* Does both signed and unsigned rationals from a double*. * * Don't change the exit entry if the value currently there is a good * approximation of the double we are trying to set. */ static void vips_exif_set_double( ExifData *ed, ExifEntry *entry, unsigned long component, void *data ) { double value = *((double *) data); ExifByteOrder bo; size_t sizeof_component; size_t offset; double old_value; if( entry->components <= component ) { VIPS_DEBUG_MSG( "vips_exif_set_double: " "too few components\n" ); return; } /* Wait until after the component check to make sure we cant get /0. */ bo = exif_data_get_byte_order( ed ); sizeof_component = entry->size / entry->components; offset = component * sizeof_component; VIPS_DEBUG_MSG( "vips_exif_set_double: %s = %g\n", exif_tag_get_title( entry->tag ), value ); if( entry->format == EXIF_FORMAT_RATIONAL ) { ExifRational rv; rv = exif_get_rational( entry->data + offset, bo ); old_value = (double) rv.numerator / rv.denominator; if( abs( old_value - value ) > 0.0001 ) { vips_exif_double_to_rational( value, &rv ); VIPS_DEBUG_MSG( "vips_exif_set_double: %u / %u\n", rv.numerator, rv.denominator ); exif_set_rational( entry->data + offset, bo, rv ); } } else if( entry->format == EXIF_FORMAT_SRATIONAL ) { ExifSRational srv; srv = exif_get_srational( entry->data + offset, bo ); old_value = (double) srv.numerator / srv.denominator; if( abs( old_value - value ) > 0.0001 ) { vips_exif_double_to_srational( value, &srv ); VIPS_DEBUG_MSG( "vips_exif_set_double: %d / %d\n", srv.numerator, srv.denominator ); exif_set_srational( entry->data + offset, bo, srv ); } } } typedef void (*write_fn)( ExifData *ed, ExifEntry *entry, unsigned long component, void *data ); /* Write a tag. Update what's there, or make a new one. */ static int write_tag( ExifData *ed, int ifd, ExifTag tag, write_fn fn, void *data ) { ExifEntry *entry; if( (entry = exif_content_get_entry( ed->ifd[ifd], tag )) ) { fn( ed, entry, 0, data ); } else { entry = exif_entry_new(); /* tag must be set before calling exif_content_add_entry. */ entry->tag = tag; exif_content_add_entry( ed->ifd[ifd], entry ); exif_entry_initialize( entry, tag ); exif_entry_unref( entry ); fn( ed, entry, 0, data ); } return( 0 ); } /* This is different, we set the xres/yres from the vips header rather than * from the exif tags on the image metadata. */ static int set_exif_resolution( ExifData *ed, VipsImage *im ) { double xres, yres; const char *p; int unit; VIPS_DEBUG_MSG( "set_exif_resolution: vips res of %g, %g\n", im->Xres, im->Yres ); /* Default to inches, more progs support it. */ unit = 2; if( vips_image_get_typeof( im, VIPS_META_RESOLUTION_UNIT ) && !vips_image_get_string( im, VIPS_META_RESOLUTION_UNIT, &p ) && vips_isprefix( "cm", p ) ) unit = 3; switch( unit ) { case 2: xres = im->Xres * 25.4; yres = im->Yres * 25.4; break; case 3: xres = im->Xres * 10.0; yres = im->Yres * 10.0; break; default: vips_warn( "VipsJpeg", "%s", _( "unknown EXIF resolution unit" ) ); return( 0 ); } /* Main image xres/yres/unit are in ifd0. ifd1 has the thumbnail * xres/yres/unit. */ if( write_tag( ed, 0, EXIF_TAG_X_RESOLUTION, vips_exif_set_double, (void *) &xres ) || write_tag( ed, 0, EXIF_TAG_Y_RESOLUTION, vips_exif_set_double, (void *) &yres ) || write_tag( ed, 0, EXIF_TAG_RESOLUTION_UNIT, vips_exif_set_int, (void *) &unit ) ) { vips_error( "VipsJpeg", "%s", _( "error setting JPEG resolution" ) ); return( -1 ); } return( 0 ); } /* Exif also tracks image dimensions. */ static int set_exif_dimensions( ExifData *ed, VipsImage *im ) { VIPS_DEBUG_MSG( "set_exif_dimensions: vips size of %d, %d\n", im->Xsize, im->Ysize ); if( write_tag( ed, 2, EXIF_TAG_PIXEL_X_DIMENSION, vips_exif_set_int, (void *) &im->Xsize ) || write_tag( ed, 2, EXIF_TAG_PIXEL_Y_DIMENSION, vips_exif_set_int, (void *) &im->Ysize ) ) { vips_error( "VipsJpeg", "%s", _( "error setting JPEG dimensions" ) ); return( -1 ); } return( 0 ); } /* See also vips_exif_to_s() ... keep in sync. */ static void vips_exif_from_s( ExifData *ed, ExifEntry *entry, const char *value ) { unsigned long i; const char *p; if( entry->format != EXIF_FORMAT_SHORT && entry->format != EXIF_FORMAT_SSHORT && entry->format != EXIF_FORMAT_LONG && entry->format != EXIF_FORMAT_SLONG && entry->format != EXIF_FORMAT_RATIONAL && entry->format != EXIF_FORMAT_SRATIONAL ) return; if( entry->components >= 10 ) return; /* Skip any leading spaces. */ p = value; while( *p == ' ' ) p += 1; for( i = 0; i < entry->components; i++ ) { if( entry->format == EXIF_FORMAT_SHORT || entry->format == EXIF_FORMAT_SSHORT || entry->format == EXIF_FORMAT_LONG || entry->format == EXIF_FORMAT_SLONG ) { int value = atof( p ); vips_exif_set_int( ed, entry, i, &value ); } else if( entry->format == EXIF_FORMAT_RATIONAL || entry->format == EXIF_FORMAT_SRATIONAL ) vips_exif_set_rational( ed, entry, i, (void *) p ); /* Skip to the next set of spaces, then to the beginning of * the next item. */ while( *p && *p != ' ' ) p += 1; while( *p == ' ' ) p += 1; if( !*p ) break; } } typedef struct _VipsExif { VipsImage *image; ExifData *ed; } VipsExif; static void vips_exif_update_entry( ExifEntry *entry, VipsExif *ve ) { char name[256]; const char *value; vips_snprintf( name, 256, "exif-ifd%d-%s", exif_entry_get_ifd( entry ), exif_tag_get_title( entry->tag ) ); if( vips_image_get_typeof( ve->image, name ) ) { (void) vips_image_get_string( ve->image, name, &value ); vips_exif_from_s( ve->ed, entry, value ); } } static void vips_exif_update_content( ExifContent *content, VipsExif *ve ) { exif_content_foreach_entry( content, (ExifContentForeachEntryFunc) vips_exif_update_entry, ve ); } static void vips_exif_update( ExifData *ed, VipsImage *image ) { VipsExif ve; VIPS_DEBUG_MSG( "vips_exif_update: \n" ); ve.image = image; ve.ed = ed; exif_data_foreach_content( ed, (ExifDataForeachContentFunc) vips_exif_update_content, &ve ); } #endif /*HAVE_EXIF*/ static int write_blob( Write *write, const char *field, int app ) { unsigned char *data; size_t data_length; if( vips_image_get_typeof( write->in, field ) ) { if( vips_image_get_blob( write->in, field, (void *) &data, &data_length ) ) return( -1 ); #ifdef DEBUG printf( "write_blob: attaching %zd bytes of %s\n", data_length, field ); #endif /*DEBUG*/ jpeg_write_marker( &write->cinfo, app, data, data_length ); } return( 0 ); } static int write_exif( Write *write ) { #ifdef HAVE_EXIF unsigned char *data; size_t data_length; unsigned int idl; ExifData *ed; /* Either parse from the embedded EXIF, or if there's none, make * some fresh EXIF we can write the resolution to. */ if( vips_image_get_typeof( write->in, VIPS_META_EXIF_NAME ) ) { if( vips_image_get_blob( write->in, VIPS_META_EXIF_NAME, (void *) &data, &data_length ) ) return( -1 ); if( !(ed = exif_data_new_from_data( data, data_length )) ) return( -1 ); } else { ed = exif_data_new(); exif_data_set_option( ed, EXIF_DATA_OPTION_FOLLOW_SPECIFICATION ); exif_data_set_data_type( ed, EXIF_DATA_TYPE_COMPRESSED ); exif_data_set_byte_order( ed, EXIF_BYTE_ORDER_INTEL ); /* Create the mandatory EXIF fields with default data. */ exif_data_fix( ed ); } /* Update EXIF tags from the image metadata. */ vips_exif_update( ed, write->in ); /* Update EXIF resolution from the vips image header. */ if( set_exif_resolution( ed, write->in ) ) { exif_data_free( ed ); return( -1 ); } /* Update EXIF image dimensions from the vips image header. */ if( set_exif_dimensions( ed, write->in ) ) { exif_data_free( ed ); return( -1 ); } /* Reserialise and write. exif_data_save_data() returns an int for some * reason. */ exif_data_save_data( ed, &data, &idl ); if( !idl ) { vips_error( "VipsJpeg", "%s", _( "error saving EXIF" ) ); exif_data_free( ed ); return( -1 ); } data_length = idl; #ifdef DEBUG printf( "write_exif: attaching %zd bytes of EXIF\n", data_length ); #endif /*DEBUG*/ exif_data_free( ed ); jpeg_write_marker( &write->cinfo, JPEG_APP0 + 1, data, data_length ); free( data ); #else /*!HAVE_EXIF*/ /* No libexif ... just copy the embedded EXIF over. */ if( write_blob( write, VIPS_META_EXIF_NAME, JPEG_APP0 + 1 ) ) return( -1 ); #endif /*!HAVE_EXIF*/ return( 0 ); } /* ICC writer from lcms, slight tweaks. */ #define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ #define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ #define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ #define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) /* * This routine writes the given ICC profile data into a JPEG file. * It *must* be called AFTER calling jpeg_start_compress() and BEFORE * the first call to jpeg_write_scanlines(). * (This ordering ensures that the APP2 marker(s) will appear after the * SOI and JFIF or Adobe markers, but before all else.) */ static void write_profile_data (j_compress_ptr cinfo, const JOCTET *icc_data_ptr, unsigned int icc_data_len) { unsigned int num_markers; /* total number of markers we'll write */ int cur_marker = 1; /* per spec, counting starts at 1 */ unsigned int length; /* number of bytes to write in this marker */ /* rounding up will fail for length == 0 */ g_assert( icc_data_len > 0 ); /* Calculate the number of markers we'll need, rounding up of course */ num_markers = (icc_data_len + MAX_DATA_BYTES_IN_MARKER - 1) / MAX_DATA_BYTES_IN_MARKER; while (icc_data_len > 0) { /* length of profile to put in this marker */ length = icc_data_len; if (length > MAX_DATA_BYTES_IN_MARKER) length = MAX_DATA_BYTES_IN_MARKER; icc_data_len -= length; /* Write the JPEG marker header (APP2 code and marker length) */ jpeg_write_m_header(cinfo, ICC_MARKER, (unsigned int) (length + ICC_OVERHEAD_LEN)); /* Write the marker identifying string "ICC_PROFILE" (null-terminated). * We code it in this less-than-transparent way so that the code works * even if the local character set is not ASCII. */ jpeg_write_m_byte(cinfo, 0x49); jpeg_write_m_byte(cinfo, 0x43); jpeg_write_m_byte(cinfo, 0x43); jpeg_write_m_byte(cinfo, 0x5F); jpeg_write_m_byte(cinfo, 0x50); jpeg_write_m_byte(cinfo, 0x52); jpeg_write_m_byte(cinfo, 0x4F); jpeg_write_m_byte(cinfo, 0x46); jpeg_write_m_byte(cinfo, 0x49); jpeg_write_m_byte(cinfo, 0x4C); jpeg_write_m_byte(cinfo, 0x45); jpeg_write_m_byte(cinfo, 0x0); /* Add the sequencing info */ jpeg_write_m_byte(cinfo, cur_marker); jpeg_write_m_byte(cinfo, (int) num_markers); /* Add the profile data */ while (length--) { jpeg_write_m_byte(cinfo, *icc_data_ptr); icc_data_ptr++; } cur_marker++; } } /* Write an ICC Profile from a file into the JPEG stream. */ static int write_profile_file( Write *write, const char *profile ) { if( !(write->profile_bytes = vips__file_read_name( profile, VIPS_ICC_DIR, &write->profile_length )) ) return( -1 ); write_profile_data( &write->cinfo, (JOCTET *) write->profile_bytes, write->profile_length ); #ifdef DEBUG printf( "write_profile_file: attached profile \"%s\"\n", profile ); #endif /*DEBUG*/ return( 0 ); } static int write_profile_meta( Write *write ) { void *data; size_t data_length; if( vips_image_get_blob( write->in, VIPS_META_ICC_NAME, &data, &data_length ) ) return( -1 ); write_profile_data( &write->cinfo, data, data_length ); #ifdef DEBUG printf( "write_profile_meta: attached %zd byte profile from header\n", data_length ); #endif /*DEBUG*/ return( 0 ); } static int write_jpeg_block( REGION *region, Rect *area, void *a ) { Write *write = (Write *) a; int i; for( i = 0; i < area->height; i++ ) write->row_pointer[i] = (JSAMPROW) VIPS_REGION_ADDR( region, 0, area->top + i ); /* We are running in a background thread. We need to catch any * longjmp()s from jpeg_write_scanlines() here. */ if( setjmp( write->eman.jmp ) ) return( -1 ); jpeg_write_scanlines( &write->cinfo, write->row_pointer, area->height ); return( 0 ); } /* Write a VIPS image to a JPEG compress struct. */ static int write_vips( Write *write, int qfac, const char *profile, gboolean optimize_coding, gboolean progressive, gboolean strip, gboolean no_subsample ) { VipsImage *in; J_COLOR_SPACE space; /* The image we'll be writing ... can change, see CMYK. */ in = write->in; /* Should have been converted for save. */ g_assert( in->BandFmt == VIPS_FORMAT_UCHAR ); g_assert( in->Coding == VIPS_CODING_NONE ); g_assert( in->Bands == 1 || in->Bands == 3 || in->Bands == 4 ); /* Check input image. */ if( vips_image_pio_input( in ) ) return( -1 ); /* Set compression parameters. */ write->cinfo.image_width = in->Xsize; write->cinfo.image_height = in->Ysize; write->cinfo.input_components = in->Bands; if( in->Bands == 4 && in->Type == VIPS_INTERPRETATION_CMYK ) { space = JCS_CMYK; /* IJG always sets an Adobe marker, so we should invert CMYK. */ if( vips_invert( in, &write->inverted, NULL ) ) return( -1 ); in = write->inverted; } else if( in->Bands == 3 ) space = JCS_RGB; else if( in->Bands == 1 ) space = JCS_GRAYSCALE; else /* Use luminance compression for all channels. */ space = JCS_UNKNOWN; write->cinfo.in_color_space = space; /* Build VIPS output stuff now we know the image we'll be writing. */ if( !(write->row_pointer = VIPS_ARRAY( NULL, in->Ysize, JSAMPROW )) ) return( -1 ); /* Rest to default. */ jpeg_set_defaults( &write->cinfo ); jpeg_set_quality( &write->cinfo, qfac, TRUE ); /* Compute optimal Huffman coding tables. */ write->cinfo.optimize_coding = optimize_coding; /* Enable progressive write. */ if( progressive ) jpeg_simple_progression( &write->cinfo ); /* Turn off chroma subsampling. */ if( no_subsample ) { int i; for( i = 0; i < in->Bands; i++ ) { write->cinfo.comp_info[i].h_samp_factor = 1; write->cinfo.comp_info[i].v_samp_factor = 1; } } /* Build compress tables. */ jpeg_start_compress( &write->cinfo, TRUE ); /* Write any APP markers we need. */ if( !strip ) { if( write_exif( write ) || write_blob( write, VIPS_META_XMP_NAME, JPEG_APP0 + 1 ) || write_blob( write, VIPS_META_IPCT_NAME, JPEG_APP0 + 13 ) ) return( -1 ); /* A profile supplied as an argument overrides an embedded * profile. "none" means don't attach a profile. */ if( profile && strcmp( profile, "none" ) != 0 && write_profile_file( write, profile ) ) return( -1 ); if( !profile && vips_image_get_typeof( in, VIPS_META_ICC_NAME ) && write_profile_meta( write ) ) return( -1 ); } /* Write data. Note that the write function grabs the longjmp()! */ if( vips_sink_disc( in, write_jpeg_block, write ) ) return( -1 ); /* We have to reinstate the setjmp() before we jpeg_finish_compress(). */ if( setjmp( write->eman.jmp ) ) return( -1 ); jpeg_finish_compress( &write->cinfo ); return( 0 ); } /* Write an image to a jpeg file. */ int vips__jpeg_write_file( VipsImage *in, const char *filename, int Q, const char *profile, gboolean optimize_coding, gboolean progressive, gboolean strip, gboolean no_subsample ) { Write *write; if( !(write = write_new( in )) ) return( -1 ); if( setjmp( write->eman.jmp ) ) { /* Here for longjmp() from new_error_exit(). */ write_destroy( write ); return( -1 ); } /* Can't do this in write_new(), has to be after we've made the * setjmp(). */ jpeg_create_compress( &write->cinfo ); /* Make output. */ if( !(write->eman.fp = vips__file_open_write( filename, FALSE )) ) { write_destroy( write ); return( -1 ); } jpeg_stdio_dest( &write->cinfo, write->eman.fp ); /* Convert! */ if( write_vips( write, Q, profile, optimize_coding, progressive, strip, no_subsample ) ) { write_destroy( write ); return( -1 ); } write_destroy( write ); return( 0 ); } /* We can't predict how large the output buffer we need is, because we might * need space for ICC profiles and stuff. So we write to a linked list of mem * buffers and add a new one as they fill. */ #define BUFFER_SIZE (10000) /* A buffer. */ typedef struct _Block { j_compress_ptr cinfo; struct _Block *first; struct _Block *next; JOCTET *data; /* Allocated area */ size_t size; /* Max size */ size_t used; /* How much has been used */ } Block; static Block * block_new( j_compress_ptr cinfo ) { Block *block; block = (Block *) (*cinfo->mem->alloc_large) ( (j_common_ptr) cinfo, JPOOL_IMAGE, sizeof( Block ) ); block->cinfo = cinfo; block->first = block; block->next = NULL; block->data = (JOCTET *) (*cinfo->mem->alloc_large) ( (j_common_ptr) cinfo, JPOOL_IMAGE, BUFFER_SIZE ); block->size = BUFFER_SIZE; block->used = 0; return( block ); } static Block * block_last( Block *block ) { while( block->next ) block = block->next; return( block ); } static Block * block_append( Block *block ) { Block *new; g_assert( block ); new = block_new( block->cinfo ); new->first = block->first; block_last( block )->next = new; return( new ); } static size_t block_length( Block *block ) { size_t len; len = 0; for( block = block->first; block; block = block->next ) len += block->used; return( len ); } static void block_copy( Block *block, void *dest ) { JOCTET *p; p = dest; for( block = block->first; block; block = block->next ) { memcpy( p, block->data, block->used ); p += block->used; } } #ifdef DEBUG static void block_print( Block *block ) { int i; printf( "total length = %zd\n", block_length( block ) ); printf( "set of blocks:\n" ); i = 0; for( block = block->first; block; block = block->next ) { printf( "%d) %p, first = %p, next = %p" "\t data = %p, size = %zd, used = %zd\n", i, block, block->first, block->next, block->data, block->size, block->used ); i += 1; } } #endif /*DEBUG*/ /* Just like the above, but we write to a memory buffer. * * A memory buffer for the compressed image. */ typedef struct { /* Public jpeg fields. */ struct jpeg_destination_mgr pub; /* Private stuff during write. */ /* Build the output area here in chunks. */ Block *block; /* Copy the compressed area here. */ void **obuf; /* Allocated buffer, and size */ size_t *olen; } OutputBuffer; /* Init dest method. */ METHODDEF(void) init_destination( j_compress_ptr cinfo ) { OutputBuffer *buf = (OutputBuffer *) cinfo->dest; /* Allocate relative to the image we are writing .. freed when we junk * this output. */ buf->block = block_new( cinfo ); /* Set buf pointers for library. */ buf->pub.next_output_byte = buf->block->data; buf->pub.free_in_buffer = buf->block->size; } /* Buffer full method ... allocate a new output block. */ METHODDEF(boolean) empty_output_buffer( j_compress_ptr cinfo ) { OutputBuffer *buf = (OutputBuffer *) cinfo->dest; /* Record how many bytes we used. empty_output_buffer() is always * called when the buffer is exactly full. */ buf->block->used = buf->block->size; /* New block and reset. */ buf->block = block_append( buf->block ); buf->pub.next_output_byte = buf->block->data; buf->pub.free_in_buffer = buf->block->size; /* TRUE means we've made some more space. */ return( 1 ); } /* Cleanup. Copy the set of blocks out as a big lump. */ METHODDEF(void) term_destination( j_compress_ptr cinfo ) { OutputBuffer *buf = (OutputBuffer *) cinfo->dest; size_t len; void *obuf; /* Record the number of bytes we wrote in the final buffer. * pub.free_in_buffer is valid here. */ buf->block->used = buf->block->size - buf->pub.free_in_buffer; #ifdef DEBUG block_print( buf->block ); #endif /*DEBUG*/ /* ... and we can count up our buffers now. */ len = block_length( buf->block ); /* Allocate and copy to the output area. */ if( !(obuf = vips_malloc( NULL, len )) ) ERREXIT( cinfo, JERR_FILE_WRITE ); *(buf->obuf) = obuf; *(buf->olen) = len; block_copy( buf->block, obuf ); } /* Set dest to one of our objects. */ static void buf_dest( j_compress_ptr cinfo, void **obuf, size_t *olen ) { OutputBuffer *buf; /* The destination object is made permanent so that multiple JPEG * images can be written to the same file without re-executing * jpeg_stdio_dest. This makes it dangerous to use this manager and * a different destination manager serially with the same JPEG object, * because their private object sizes may be different. * * Caveat programmer. */ if( !cinfo->dest ) { /* first time for this JPEG object? */ cinfo->dest = (struct jpeg_destination_mgr *) (*cinfo->mem->alloc_small) ( (j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof( OutputBuffer ) ); } buf = (OutputBuffer *) cinfo->dest; buf->pub.init_destination = init_destination; buf->pub.empty_output_buffer = empty_output_buffer; buf->pub.term_destination = term_destination; /* Save output parameters. */ buf->obuf = obuf; buf->olen = olen; } int vips__jpeg_write_buffer( VipsImage *in, void **obuf, size_t *olen, int Q, const char *profile, gboolean optimize_coding, gboolean progressive, gboolean strip, gboolean no_subsample ) { Write *write; if( !(write = write_new( in )) ) return( -1 ); /* Clear output parameters. */ *obuf = NULL; *olen = 0; /* Make jpeg compression object. */ if( setjmp( write->eman.jmp ) ) { /* Here for longjmp() from new_error_exit(). */ write_destroy( write ); return( -1 ); } jpeg_create_compress( &write->cinfo ); /* Attach output. */ buf_dest( &write->cinfo, obuf, olen ); /* Convert! */ if( write_vips( write, Q, profile, optimize_coding, progressive, strip, no_subsample ) ) { write_destroy( write ); return( -1 ); } write_destroy( write ); return( 0 ); } const char *vips__jpeg_suffs[] = { ".jpg", ".jpeg", ".jpe", NULL }; #endif /*HAVE_JPEG*/ vips-7.38.5/libvips/foreign/openexrload.c0000644000175000017500000000725112303140253015303 00000000000000/* load openexr from a file * * 5/12/11 * - from openslideload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_OPENEXR #include #include #include #include #include #include #include "openexr2vips.h" typedef struct _VipsForeignLoadOpenexr { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadOpenexr; typedef VipsForeignLoadClass VipsForeignLoadOpenexrClass; G_DEFINE_TYPE( VipsForeignLoadOpenexr, vips_foreign_load_openexr, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_openexr_get_flags_filename( const char *filename ) { VipsForeignFlags flags; flags = 0; if( vips__openexr_istiled( filename ) ) flags |= VIPS_FOREIGN_PARTIAL; return( flags ); } static VipsForeignFlags vips_foreign_load_openexr_get_flags( VipsForeignLoad *load ) { VipsForeignLoadOpenexr *openexr = (VipsForeignLoadOpenexr *) load; return( vips_foreign_load_openexr_get_flags_filename( openexr->filename ) ); } static int vips_foreign_load_openexr_header( VipsForeignLoad *load ) { VipsForeignLoadOpenexr *openexr = (VipsForeignLoadOpenexr *) load; if( vips__openexr_read_header( openexr->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_openexr_load( VipsForeignLoad *load ) { VipsForeignLoadOpenexr *openexr = (VipsForeignLoadOpenexr *) load; if( vips__openexr_read( openexr->filename, load->real ) ) return( -1 ); return( 0 ); } static const char *vips_foreign_openexr_suffs[] = { ".exr", NULL }; static void vips_foreign_load_openexr_class_init( VipsForeignLoadOpenexrClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "openexrload"; object_class->description = _( "load an OpenEXR image" ); foreign_class->suffs = vips_foreign_openexr_suffs; load_class->is_a = vips__openexr_isexr; load_class->get_flags_filename = vips_foreign_load_openexr_get_flags_filename; load_class->get_flags = vips_foreign_load_openexr_get_flags; load_class->header = vips_foreign_load_openexr_header; load_class->load = vips_foreign_load_openexr_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadOpenexr, filename ), NULL ); } static void vips_foreign_load_openexr_init( VipsForeignLoadOpenexr *openexr ) { } #endif /*HAVE_OPENEXR*/ vips-7.38.5/libvips/foreign/jpeg.h0000644000175000017500000000376012303140253013716 00000000000000/* common defs for jpeg read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_JPEG_H #define VIPS_JPEG_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ /* jpeglib includes jconfig.h, which can define HAVE_STDLIB_H ... which we * also define. Make sure it's turned off. */ #ifdef HAVE_STDLIB_H #undef HAVE_STDLIB_H #endif /*HAVE_STDLIB_H*/ /* jpeglib defines its own boolean type as an enum which then clashes with * everyone elses. Rename it as jboolean. */ #define boolean jboolean /* Any TRUE/FALSE macros which have crept in will cause terrible confusion as * well. */ #ifdef TRUE #undef TRUE #endif /*TRUE*/ #ifdef FALSE #undef FALSE #endif /*FALSE*/ #include #include /* Define a new error handler for when we bomb out. */ typedef struct { /* Public fields. */ struct jpeg_error_mgr pub; /* Private stuff for us. */ jmp_buf jmp; /* longjmp() here to get back to VIPS */ FILE *fp; /* fclose() if non-NULL */ } ErrorManager; void vips__new_output_message( j_common_ptr cinfo ); void vips__new_error_exit( j_common_ptr cinfo ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_JPEG_H*/ vips-7.38.5/libvips/foreign/vipssave.c0000644000175000017500000000545012303140253014622 00000000000000/* save to vips * * 24/11/11 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include typedef struct _VipsForeignSaveVips { VipsForeignSave parent_object; char *filename; } VipsForeignSaveVips; typedef VipsForeignSaveClass VipsForeignSaveVipsClass; G_DEFINE_TYPE( VipsForeignSaveVips, vips_foreign_save_vips, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_vips_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveVips *vips = (VipsForeignSaveVips *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_vips_parent_class )-> build( object ) ) return( -1 ); if( vips_image_write_to_file( save->ready, vips->filename ) ) return( -1 ); return( 0 ); } static const char *vips_suffs[] = { ".v", NULL }; static void vips_foreign_save_vips_class_init( VipsForeignSaveVipsClass *class ) { int i; GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "vipssave"; object_class->description = _( "save image to vips file" ); object_class->build = vips_foreign_save_vips_build; foreign_class->suffs = vips_suffs; save_class->saveable = VIPS_SAVEABLE_ANY; for( i = 0; i < VIPS_CODING_LAST; i++ ) save_class->coding[i] = TRUE; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveVips, filename ), NULL ); } static void vips_foreign_save_vips_init( VipsForeignSaveVips *vips ) { } vips-7.38.5/libvips/foreign/rawsave.c0000644000175000017500000001546012303140253014434 00000000000000/* save to raw * * Write raw image data to file. Usefull when defining new formats... * * Jesper Friis * * 10/06/08 JF * - initial code based on im_vips2ppm() * * 04/07/08 JF * - replaced FILE with plain file handlers for reducing * confusion about binary vs. non-binary file modes. * 4/2/10 * - gtkdoc * 15/12/11 * - rework as a class * - added save raw to filename */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include typedef struct _VipsForeignSaveRaw { VipsForeignSave parent_object; char *filename; int fd; } VipsForeignSaveRaw; typedef VipsForeignSaveClass VipsForeignSaveRawClass; G_DEFINE_TYPE( VipsForeignSaveRaw, vips_foreign_save_raw, VIPS_TYPE_FOREIGN_SAVE ); static void vips_foreign_save_raw_dispose( GObject *gobject ) { VipsForeignSaveRaw *raw = (VipsForeignSaveRaw *) gobject; VIPS_FREEF( vips_tracked_close, raw->fd ); G_OBJECT_CLASS( vips_foreign_save_raw_parent_class )-> dispose( gobject ); } static int vips_foreign_save_raw_write( VipsRegion *region, Rect *area, void *a ) { VipsForeignSave *save = (VipsForeignSave *) a; VipsForeignSaveRaw *raw = (VipsForeignSaveRaw *) a; int i; for( i = 0; i < area->height; i++ ) { VipsPel *p = VIPS_REGION_ADDR( region, area->left, area->top + i ); if( vips__write( raw->fd, p, VIPS_IMAGE_SIZEOF_PEL( save->in ) * area->width ) ) return( -1 ); } return( 0 ); } static int vips_foreign_save_raw_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveRaw *raw = (VipsForeignSaveRaw *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_raw_parent_class )-> build( object ) ) return( -1 ); if( (raw->fd = vips__open_image_write( raw->filename, FALSE )) < 0 || vips_image_pio_input( save->in ) || vips_sink_disc( save->in, vips_foreign_save_raw_write, raw ) ) return( -1 ); return( 0 ); } static void vips_foreign_save_raw_class_init( VipsForeignSaveRawClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->dispose = vips_foreign_save_raw_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "rawsave"; object_class->description = _( "save image to raw file" ); object_class->build = vips_foreign_save_raw_build; save_class->saveable = VIPS_SAVEABLE_ANY; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveRaw, filename ), NULL ); } static void vips_foreign_save_raw_init( VipsForeignSaveRaw *raw ) { } /** * vips_rawsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Writes the pixels in @in to the file @filename with no header or other * metadata. * * See also: vips_image_write_file(). * * Returns: 0 on success, -1 on error. */ int vips_rawsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "rawsave", ap, filename ); va_end( ap ); return( result ); } /* And with an fd rather than a filename. */ typedef struct _VipsForeignSaveRawFd { VipsForeignSave parent_object; int fd; } VipsForeignSaveRawFd; typedef VipsForeignSaveClass VipsForeignSaveRawFdClass; G_DEFINE_TYPE( VipsForeignSaveRawFd, vips_foreign_save_raw_fd, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_raw_fd_write( VipsRegion *region, Rect *area, void *a ) { VipsForeignSave *save = (VipsForeignSave *) a; VipsForeignSaveRawFd *fd = (VipsForeignSaveRawFd *) a; int i; for( i = 0; i < area->height; i++ ) { VipsPel *p = VIPS_REGION_ADDR( region, area->left, area->top + i ); if( vips__write( fd->fd, p, VIPS_IMAGE_SIZEOF_PEL( save->in ) * area->width ) ) return( -1 ); } return( 0 ); } static int vips_foreign_save_raw_fd_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveRawFd *fd = (VipsForeignSaveRawFd *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_raw_fd_parent_class )-> build( object ) ) return( -1 ); if( vips_image_pio_input( save->in ) || vips_sink_disc( save->in, vips_foreign_save_raw_fd_write, fd ) ) return( -1 ); return( 0 ); } static void vips_foreign_save_raw_fd_class_init( VipsForeignSaveRawFdClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "rawsave_fd"; object_class->description = _( "write raw image to file descriptor" ); object_class->build = vips_foreign_save_raw_fd_build; save_class->saveable = VIPS_SAVEABLE_ANY; VIPS_ARG_INT( class, "fd", 1, _( "File descriptor" ), _( "File descriptor to write to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveRawFd, fd ), 0, 10000, 0 ); } static void vips_foreign_save_raw_fd_init( VipsForeignSaveRawFd *fd ) { } /** * vips_rawsave_fd: * @in: image to save * @fd: file to write to * @...: %NULL-terminated list of optional named arguments * * Writes the pixels in @in to the @fd with no header or other * metadata. Handy for implementing other savers. * * See also: vips_rawsave(). * * Returns: 0 on success, -1 on error. */ int vips_rawsave_fd( VipsImage *in, int fd, ... ) { va_list ap; int result; va_start( ap, fd ); result = vips_call_split( "rawsave_fd", ap, fd ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/csvsave.c0000644000175000017500000000750612303140253014440 00000000000000/* save to csv * * 2/12/11 * - wrap a class around the csv writer */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "csv.h" typedef struct _VipsForeignSaveCsv { VipsForeignSave parent_object; /* Filename for save. */ char *filename; const char *separator; } VipsForeignSaveCsv; typedef VipsForeignSaveClass VipsForeignSaveCsvClass; G_DEFINE_TYPE( VipsForeignSaveCsv, vips_foreign_save_csv, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_csv_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveCsv *csv = (VipsForeignSaveCsv *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_csv_parent_class )-> build( object ) ) return( -1 ); if( vips__csv_write( save->ready, csv->filename, csv->separator ) ) return( -1 ); return( 0 ); } static void vips_foreign_save_csv_class_init( VipsForeignSaveCsvClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "csvsave"; object_class->description = _( "save image to csv file" ); object_class->build = vips_foreign_save_csv_build; foreign_class->suffs = vips__foreign_csv_suffs; save_class->saveable = VIPS_SAVEABLE_MONO; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveCsv, filename ), NULL ); VIPS_ARG_STRING( class, "separator", 13, _( "Separator" ), _( "Separator characters" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveCsv, separator ), "\t" ); } static void vips_foreign_save_csv_init( VipsForeignSaveCsv *csv ) { csv->separator = g_strdup( "\t" ); } /** * vips_csvsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @separator: separator string * * Writes the pixels in @in to the @filename as CSV (comma-separated values). * The image is written * one line of text per scanline. Complex numbers are written as * "(real,imaginary)" and will need extra parsing I guess. Only the first band * is written. * * @separator gives the string to use to separate numbers in the output. * The default is "\\t" (tab). * * See also: vips_image_write_file(). * * Returns: 0 on success, -1 on error. */ int vips_csvsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "csvsave", ap, in, filename ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/matrixload.c0000644000175000017500000001220712303140253015124 00000000000000/* load matrix from a file * * 5/12/11 * - from csvload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "csv.h" typedef struct _VipsForeignLoadMatrix { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadMatrix; typedef VipsForeignLoadClass VipsForeignLoadMatrixClass; G_DEFINE_TYPE( VipsForeignLoadMatrix, vips_foreign_load_matrix, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_matrix_get_flags_filename( const char *filename ) { return( 0 ); } static VipsForeignFlags vips_foreign_load_matrix_get_flags( VipsForeignLoad *load ) { VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) load; return( vips_foreign_load_matrix_get_flags_filename( matrix->filename ) ); } static int vips_foreign_load_matrix_header( VipsForeignLoad *load ) { VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) load; int width; int height; double scale; double offset; if( vips__matrix_read_header( matrix->filename, &width, &height, &scale, &offset ) ) return( -1 ); vips_image_init_fields( load->out, width, height, 1, VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE, VIPS_INTERPRETATION_B_W, 1.0, 1.0 ); vips_image_set_double( load->out, "scale", scale ); vips_image_set_double( load->out, "offset", offset ); return( 0 ); } static int vips_foreign_load_matrix_load( VipsForeignLoad *load ) { VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) load; VipsImage *out; if( !(out = vips__matrix_read( matrix->filename )) ) return( -1 ); if( vips_image_write( out, load->real ) ) { g_object_unref( out ); return( -1 ); } g_object_unref( out ); return( 0 ); } static void vips_foreign_load_matrix_class_init( VipsForeignLoadMatrixClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "matrixload"; object_class->description = _( "load matrix from file" ); foreign_class->suffs = vips__foreign_matrix_suffs; load_class->is_a = vips__matrix_ismatrix; load_class->get_flags_filename = vips_foreign_load_matrix_get_flags_filename; load_class->get_flags = vips_foreign_load_matrix_get_flags; load_class->header = vips_foreign_load_matrix_header; load_class->load = vips_foreign_load_matrix_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadMatrix, filename ), NULL ); } static void vips_foreign_load_matrix_init( VipsForeignLoadMatrix *matrix ) { } /** * vips_matrixload: * @filename: file to load * @out: output image * @...: %NULL-terminated list of optional named arguments * * Reads a matrix from a file. * * Matrix files have a simple format that's supposed to be easy to create with * a text editor or a spreadsheet. * * The first line has four numbers for width, height, scale and * offset (scale and offset may be omitted, in which case they default to 1.0 * and 0.0). Scale must be non-zero. Width and height must be positive * integers. The numbers are separated by any mixture of spaces, commas, * tabs and quotation marks ("). The scale and offset fields may be * floating-point, and must use '.' * as a decimal separator. * * Subsequent lines each hold one line of matrix data, with numbers again * separated by any mixture of spaces, commas, * tabs and quotation marks ("). The numbers may be floating-point, and must * use '.' * as a decimal separator. * * Extra characters at the ends of lines or at the end of the file are * ignored. * * See also: vips_csvload(). * * Returns: 0 on success, -1 on error. */ int vips_matrixload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "matrixload", ap, filename, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/radsave.c0000644000175000017500000000753112303140253014411 00000000000000/* save to rad * * 2/12/11 * - wrap a class around the rad writer */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "radiance.h" typedef struct _VipsForeignSaveRad { VipsForeignSave parent_object; char *filename; } VipsForeignSaveRad; typedef VipsForeignSaveClass VipsForeignSaveRadClass; G_DEFINE_TYPE( VipsForeignSaveRad, vips_foreign_save_rad, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_rad_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveRad *rad = (VipsForeignSaveRad *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_rad_parent_class )-> build( object ) ) return( -1 ); if( vips__rad_save( save->ready, rad->filename ) ) return( -1 ); return( 0 ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static int vips_foreign_save_rad_format_table[10] = { /* UC C US S UI I F X D DX */ F, F, F, F, F, F, F, F, F, F }; static void vips_foreign_save_rad_class_init( VipsForeignSaveRadClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "radsave"; object_class->description = _( "save image to Radiance file" ); object_class->build = vips_foreign_save_rad_build; foreign_class->suffs = vips__rad_suffs; save_class->saveable = VIPS_SAVEABLE_RGB; save_class->format_table = vips_foreign_save_rad_format_table; save_class->coding[VIPS_CODING_NONE] = FALSE; save_class->coding[VIPS_CODING_RAD] = TRUE; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveRad, filename ), NULL ); } static void vips_foreign_save_rad_init( VipsForeignSaveRad *rad ) { } /** * vips_radsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Write a VIPS image in Radiance (HDR) format. * * Sections of this reader from Greg Ward and Radiance with kind permission. * * See also: vips_image_write_file(). * * Returns: 0 on success, -1 on error. */ int vips_radsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "radsave", ap, in, filename ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/fits.h0000644000175000017500000000253712303140253013737 00000000000000/* defs for fits read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_FITS_H #define VIPS_FITS_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ extern const char *vips__fits_suffs[]; int vips__fits_isfits( const char *filename ); int vips__fits_read_header( const char *filename, VipsImage *out ); int vips__fits_read( const char *filename, VipsImage *out ); int vips__fits_write( VipsImage *in, const char *filename ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_FITS_H*/ vips-7.38.5/libvips/foreign/rawload.c0000644000175000017500000001122012303140253014403 00000000000000/* load raw data from a file * * 14/12/11 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include typedef struct _VipsForeignLoadRaw { VipsForeignLoad parent_object; char *filename; int width; int height; int bands; guint64 offset; } VipsForeignLoadRaw; typedef VipsForeignLoadClass VipsForeignLoadRawClass; G_DEFINE_TYPE( VipsForeignLoadRaw, vips_foreign_load_raw, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_raw_get_flags( VipsForeignLoad *load ) { return( VIPS_FOREIGN_PARTIAL ); } static VipsForeignFlags vips_foreign_load_raw_get_flags_filename( const char *filename ) { return( VIPS_FOREIGN_PARTIAL ); } static int vips_foreign_load_raw_header( VipsForeignLoad *load ) { VipsForeignLoadRaw *raw = (VipsForeignLoadRaw *) load; VipsImage *out; VipsImage *out2; if( !(out2 = vips_image_new_from_file_raw( raw->filename, raw->width, raw->height, raw->bands, raw->offset )) ) return( -1 ); /* Remove the @out that's there now. */ g_object_get( load, "out", &out, NULL ); g_object_unref( out ); g_object_unref( out ); g_object_set( load, "out", out2, NULL ); return( 0 ); } static void vips_foreign_load_raw_class_init( VipsForeignLoadRawClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "rawload"; object_class->description = _( "load raw data from a file" ); load_class->get_flags = vips_foreign_load_raw_get_flags; load_class->get_flags_filename = vips_foreign_load_raw_get_flags_filename; load_class->header = vips_foreign_load_raw_header; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadRaw, filename ), NULL ); VIPS_ARG_INT( class, "width", 10, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadRaw, width ), 0, 1000000, 0 ); VIPS_ARG_INT( class, "height", 11, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadRaw, height ), 0, 1000000, 0 ); VIPS_ARG_INT( class, "bands", 12, _( "Bands" ), _( "Number of bands in image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadRaw, bands ), 0, 1000000, 0 ); VIPS_ARG_UINT64( class, "offset", 13, _( "Size of header" ), _( "Offset in bytes from start of file" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadRaw, offset ), 0, 100000000000, 0 ); } static void vips_foreign_load_raw_init( VipsForeignLoadRaw *raw ) { } /** * vips_rawload: * @filename: file to load * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @width: width of image in pixels * @height: height of image in pixels * @bands: number of image bands * @offset: offset in bytes from start of file * * This operation mmaps the file, setting @out so that access to that * image will read from the file. * * Use functions like vips_copy() to set the pixel type, byte ordering * and so on. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_rawload( const char *filename, VipsImage **out, int width, int height, int bands, ... ) { va_list ap; int result; va_start( ap, bands ); result = vips_call_split( "rawload", ap, filename, out, width, height, bands ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/webpsave.c0000644000175000017500000001670512303140253014603 00000000000000/* save to webp * * 24/11/11 * - wrap a class around the webp writer */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_LIBWEBP #include #include #include "webp.h" typedef struct _VipsForeignSaveWebp { VipsForeignSave parent_object; /* Quality factor. */ int Q; /* Turn on lossless encode. */ gboolean lossless; } VipsForeignSaveWebp; typedef VipsForeignSaveClass VipsForeignSaveWebpClass; G_DEFINE_ABSTRACT_TYPE( VipsForeignSaveWebp, vips_foreign_save_webp, VIPS_TYPE_FOREIGN_SAVE ); #define UC VIPS_FORMAT_UCHAR /* Type promotion for save ... just always go to uchar. */ static int bandfmt_webp[10] = { /* UC C US S UI I F X D DX */ UC, UC, UC, UC, UC, UC, UC, UC, UC, UC }; static void vips_foreign_save_webp_class_init( VipsForeignSaveWebpClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "webpsave_base"; object_class->description = _( "save webp" ); save_class->saveable = VIPS_SAVEABLE_RGBA; save_class->format_table = bandfmt_webp; VIPS_ARG_INT( class, "Q", 10, _( "Q" ), _( "Q factor" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveWebp, Q ), 1, 100, 75 ); VIPS_ARG_BOOL( class, "lossless", 11, _( "lossless" ), _( "enable lossless compression" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveWebp, lossless ), FALSE ); } static void vips_foreign_save_webp_init( VipsForeignSaveWebp *webp ) { webp->Q = 80; } typedef struct _VipsForeignSaveWebpFile { VipsForeignSaveWebp parent_object; /* Filename for save. */ char *filename; } VipsForeignSaveWebpFile; typedef VipsForeignSaveWebpClass VipsForeignSaveWebpFileClass; G_DEFINE_TYPE( VipsForeignSaveWebpFile, vips_foreign_save_webp_file, vips_foreign_save_webp_get_type() ); static int vips_foreign_save_webp_file_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveWebp *webp = (VipsForeignSaveWebp *) object; VipsForeignSaveWebpFile *file = (VipsForeignSaveWebpFile *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_webp_file_parent_class )-> build( object ) ) return( -1 ); if( vips__webp_write_file( save->ready, file->filename, webp->Q, webp->lossless ) ) return( -1 ); return( 0 ); } static void vips_foreign_save_webp_file_class_init( VipsForeignSaveWebpFileClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "webpsave"; object_class->description = _( "save image to webp file" ); object_class->build = vips_foreign_save_webp_file_build; foreign_class->suffs = vips__webp_suffs; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveWebpFile, filename ), NULL ); } static void vips_foreign_save_webp_file_init( VipsForeignSaveWebpFile *file ) { } typedef struct _VipsForeignSaveWebpBuffer { VipsForeignSaveWebp parent_object; /* Save to a buffer. */ VipsArea *buf; } VipsForeignSaveWebpBuffer; typedef VipsForeignSaveWebpClass VipsForeignSaveWebpBufferClass; G_DEFINE_TYPE( VipsForeignSaveWebpBuffer, vips_foreign_save_webp_buffer, vips_foreign_save_webp_get_type() ); static int vips_foreign_save_webp_buffer_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveWebp *webp = (VipsForeignSaveWebp *) object; VipsForeignSaveWebpBuffer *file = (VipsForeignSaveWebpBuffer *) object; void *obuf; size_t olen; VipsArea *area; if( VIPS_OBJECT_CLASS( vips_foreign_save_webp_buffer_parent_class )-> build( object ) ) return( -1 ); if( vips__webp_write_buffer( save->ready, &obuf, &olen, webp->Q, webp->lossless ) ) return( -1 ); area = vips_area_new_blob( (VipsCallbackFn) vips_free, obuf, olen ); g_object_set( file, "buffer", area, NULL ); vips_area_unref( area ); return( 0 ); } static void vips_foreign_save_webp_buffer_class_init( VipsForeignSaveWebpBufferClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "webpsave_buffer"; object_class->description = _( "save image to webp buffer" ); object_class->build = vips_foreign_save_webp_buffer_build; VIPS_ARG_BOXED( class, "buffer", 1, _( "Buffer" ), _( "Buffer to save to" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsForeignSaveWebpBuffer, buf ), VIPS_TYPE_BLOB ); } static void vips_foreign_save_webp_buffer_init( VipsForeignSaveWebpBuffer *file ) { } typedef struct _VipsForeignSaveWebpMime { VipsForeignSaveWebp parent_object; } VipsForeignSaveWebpMime; typedef VipsForeignSaveWebpClass VipsForeignSaveWebpMimeClass; G_DEFINE_TYPE( VipsForeignSaveWebpMime, vips_foreign_save_webp_mime, vips_foreign_save_webp_get_type() ); static int vips_foreign_save_webp_mime_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveWebp *webp = (VipsForeignSaveWebp *) object; void *obuf; size_t olen; if( VIPS_OBJECT_CLASS( vips_foreign_save_webp_mime_parent_class )-> build( object ) ) return( -1 ); if( vips__webp_write_buffer( save->ready, &obuf, &olen, webp->Q, webp->lossless ) ) return( -1 ); printf( "Content-length: %zd\r\n", olen ); printf( "Content-type: image/webp\r\n" ); printf( "\r\n" ); if( fwrite( obuf, sizeof( char ), olen, stdout ) != olen ) { vips_error( "VipsWebp", "%s", _( "error writing output" ) ); return( -1 ); } fflush( stdout ); g_free( obuf ); return( 0 ); } static void vips_foreign_save_webp_mime_class_init( VipsForeignSaveWebpMimeClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; object_class->nickname = "webpsave_mime"; object_class->description = _( "save image to webp mime" ); object_class->build = vips_foreign_save_webp_mime_build; } static void vips_foreign_save_webp_mime_init( VipsForeignSaveWebpMime *mime ) { } #endif /*HAVE_LIBWEBP*/ vips-7.38.5/libvips/foreign/vips2tiff.c0000644000175000017500000011275312303140253014703 00000000000000/* TIFF PARTS: * Copyright (c) 1988, 1990 by Sam Leffler. * All rights reserved. * * This file is provided for unrestricted use provided that this * legend is included on all tape media and as a part of the * software program in whole or part. Users may copy, modify or * distribute this file at will. * * MODIFICATION FOR VIPS Copyright 1991, K.Martinez * * software may be distributed FREE, with these copyright notices * no responsibility/warantee is implied or given * * * Modified and added im_LabQ2LabC() function. It can write IM_TYPE_LABQ image * in vips format to LAB in tiff format. * Copyright 1994 Ahmed Abbood. * * 19/9/95 JC * - calls TIFFClose() more reliably * - tidied up * 12/4/97 JC * - thrown away and rewritten for TIFF 6 lib * 22/4/97 JC * - writes a pyramid! * - to separate TIFF files tho' * 23/4/97 JC * - does 2nd gather pass to put pyramid into a single TIFF file * - ... and shrinks IM_CODING_LABQ too * 26/10/98 JC * - binary open for stupid systems * 7/6/99 JC * - 16bit TIFF write too * 9/7/99 JC * - ZIP tiff added * 11/5/00 JC * - removed TIFFmalloc/TIFFfree * 5/8/00 JC * - mode string now part of filename * 23/4/01 JC * - HAVE_TIFF turns on TIFFness * 19/3/02 ruven * - pyramid stops at tile size, not 64x64 * 29/4/02 JC * - write any number of bands (but still with photometric RGB, so not * very useful) * 10/9/02 JC * - oops, handle TIFF errors better * - now writes CMYK correctly * 13/2/03 JC * - tries not to write mad resolutions * 7/5/03 JC * - only write CMYK if Type == CMYK * - writes EXTRASAMPLES ALPHA for bands == 2 or 4 (if we're writing RGB) * 17/11/03 JC * - write float too * 28/11/03 JC * - read via a "p" so we work from mmap window images * - uses threadgroups for speedup * 9/3/04 JC * - 1 bit write mode added * 5/4/04 * - better handling of edge tiles (thanks Ruven) * 18/5/04 Andrey Kiselev * - added res_inch/res_cm option * 20/5/04 JC * - allow single res number too * 19/7/04 * - write several scanlines at once, good speed up for some cases * 22/9/04 * - got rid of wrapper image so nip gets progress feedback * - fixed tiny read-beyond-buffer issue for edge tiles * 7/10/04 * - added ICC profile embedding * 13/12/04 * - can now pyramid any non-complex type (thanks Ruven) * 27/1/05 * - added ccittfax4 as a compression option * 9/3/05 * - set PHOTOMETRIC_CIELAB for vips TYPE_LAB images ... so we can write * float LAB as well as float RGB * - also LABS images * 22/6/05 * - 16 bit LAB write was broken * 9/9/05 * - write any icc profile from meta * 3/3/06 * - raise tile buffer limit (thanks Ruven) * 11/11/06 * - set ORIENTATION_TOPLEFT (thanks Josef) * 18/7/07 Andrey Kiselev * - remove "b" option on TIFFOpen() * - support TIFFTAG_PREDICTOR types for lzw and deflate compression * 3/11/07 * - use im_wbuffer() for background writes * 15/2/08 * - set TIFFTAG_JPEGQUALITY explicitly when we copy TIFF files, since * libtiff doesn't keep this in the header (thanks Joe) * 20/2/08 * - use tiff error handler from im_tiff2vips.c * 27/2/08 * - don't try to copy icc profiles when building pyramids (thanks Joe) * 9/4/08 * - use IM_META_RESOLUTION_UNIT to set default resunit * 17/4/08 * - allow CMYKA (thanks Doron) * 5/9/08 * - trigger eval callbacks during tile write * 4/2/10 * - gtkdoc * 26/2/10 * - option to turn on bigtiff output * 16/4/10 * - use vips_sink_*() instead of threadgroup and friends * 22/6/10 * - make no-owner regions for the tile cache, since we share these * between threads * 12/7/11 * - use im__temp_name() for intermediates rather than polluting the * output directory * 5/9/11 * - enable YCbCr compression for jpeg write * 23/11/11 * - set reduced-resolution subfile type on pyramid layers * 2/12/11 * - make into a simple function call ready to be wrapped as a new-style * VipsForeign class * 21/3/12 * - bump max layer buffer up * 2/6/12 * - copy jpeg pyramid in gather in RGB mode ... tiff4 doesn't do ycbcr * mode * 7/8/12 * - be more cautious enabling YCbCr mode * 24/9/13 * - support many more vips formats, eg. complex, 32-bit int, any number * of bands, etc., see the tiff loader * 26/1/14 * - add RGB as well as YCbCr write */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_TIFF #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include #include "tiff.h" /* Max no of tiles we buffer in a layer. Enough to buffer a line of 64x64 * tiles on a 100k pixel across image. */ #define MAX_LAYER_BUFFER (10000) /* Bits we OR together for quadrants in a tile. */ typedef enum pyramid_bits { PYR_TL = 1, /* Top-left etc. */ PYR_TR = 2, PYR_BL = 4, PYR_BR = 8, PYR_ALL = 15, PYR_NONE = 0 } PyramidBits; /* A tile in our pyramid. */ typedef struct pyramid_tile { VipsRegion *tile; PyramidBits bits; } PyramidTile; /* A layer in the pyramid. */ typedef struct pyramid_layer { /* Parameters. */ struct tiff_write *tw; /* Main TIFF write struct */ int width, height; /* Layer size */ int sub; /* Subsample factor for this layer */ char *lname; /* Name of this TIFF file */ TIFF *tif; /* TIFF file we write this layer to */ VipsPel *tbuf; /* TIFF output buffer */ PyramidTile tiles[MAX_LAYER_BUFFER]; struct pyramid_layer *below; /* Tiles go to here */ struct pyramid_layer *above; /* Tiles come from here */ } PyramidLayer; /* A TIFF image in the process of being written. */ typedef struct tiff_write { VipsImage *im; /* Original input image */ char *name; /* Final name we write to */ /* Read from im with these. */ VipsRegion *reg; char *bname; /* Name for base layer */ TIFF *tif; /* Image we write to */ PyramidLayer *layer; /* Top of pyramid, if in use */ VipsPel *tbuf; /* TIFF output buffer */ int tls; /* Tile line size */ int compression; /* Compression type */ int jpqual; /* JPEG q-factor */ int predictor; /* Predictor value */ int tile; /* Tile or not */ int tilew, tileh; /* Tile size */ int pyramid; /* Write pyramid */ int onebit; /* Write as 1-bit TIFF */ int resunit; /* Resolution unit (inches or cm) */ float xres; /* Resolution in X */ float yres; /* Resolution in Y */ char *icc_profile; /* Profile to embed */ int bigtiff; /* True for bigtiff write */ int rgbjpeg; /* True for RGB not YCbCr */ GMutex *write_lock; /* Lock TIFF*() calls with this */ } TiffWrite; /* Open TIFF for output. */ static TIFF * tiff_openout( TiffWrite *tw, const char *name ) { TIFF *tif; const char *mode = tw->bigtiff ? "w8" : "w"; #ifdef DEBUG printf( "TIFFOpen( \"%s\", \"%s\" )\n", name, mode ); #endif /*DEBUG*/ if( !(tif = TIFFOpen( name, mode )) ) { vips_error( "vips2tiff", _( "unable to open \"%s\" for output" ), name ); return( NULL ); } return( tif ); } /* Open TIFF for input. */ static TIFF * tiff_openin( const char *name ) { TIFF *tif; if( !(tif = TIFFOpen( name, "r" )) ) { vips_error( "vips2tiff", _( "unable to open \"%s\" for input" ), name ); return( NULL ); } return( tif ); } /* Convert VIPS LabQ to TIFF LAB. Just take the first three bands. */ static void LabQ2LabC( VipsPel *q, VipsPel *p, int n ) { int x; for( x = 0; x < n; x++ ) { /* Get most significant 8 bits of lab. */ q[0] = p[0]; q[1] = p[1]; q[2] = p[2]; p += 4; q += 3; } } /* Pack 8 bit VIPS to 1 bit TIFF. */ static void eightbit2onebit( VipsPel *q, VipsPel *p, int n ) { int x; VipsPel bits; bits = 0; for( x = 0; x < n; x++ ) { bits <<= 1; if( p[x] ) bits |= 1; if( (x & 0x7) == 0x7 ) { *q++ = bits; bits = 0; } } /* Any left-over bits? Need to be left-aligned. */ if( (x & 0x7) != 0 ) *q++ = bits << (8 - (x & 0x7)); } /* Convert VIPS LABS to TIFF 16 bit LAB. */ static void LabS2Lab16( VipsPel *q, VipsPel *p, int n ) { int x; short *p1 = (short *) p; unsigned short *q1 = (unsigned short *) q; for( x = 0; x < n; x++ ) { /* TIFF uses unsigned 16 bit ... move zero, scale up L. */ q1[0] = (int) p1[0] << 1; q1[1] = p1[1]; q1[2] = p1[2]; p1 += 3; q1 += 3; } } /* Pack a VIPS region into a TIFF tile buffer. */ static void pack2tiff( TiffWrite *tw, VipsRegion *in, VipsPel *q, VipsRect *area ) { int y; for( y = area->top; y < VIPS_RECT_BOTTOM( area ); y++ ) { VipsPel *p = (VipsPel *) VIPS_REGION_ADDR( in, area->left, y ); if( in->im->Coding == VIPS_CODING_LABQ ) LabQ2LabC( q, p, area->width ); else if( tw->onebit ) eightbit2onebit( q, p, area->width ); else if( in->im->BandFmt == VIPS_FORMAT_SHORT && in->im->Type == VIPS_INTERPRETATION_LABS ) LabS2Lab16( q, p, area->width ); else memcpy( q, p, area->width * VIPS_IMAGE_SIZEOF_PEL( in->im ) ); q += tw->tls; } } /* Embed an ICC profile from a file. */ static int embed_profile_file( TIFF *tif, const char *profile ) { char *buffer; unsigned int length; if( !(buffer = vips__file_read_name( profile, VIPS_ICC_DIR, &length )) ) return( -1 ); TIFFSetField( tif, TIFFTAG_ICCPROFILE, length, buffer ); vips_free( buffer ); #ifdef DEBUG printf( "vips2tiff: attached profile \"%s\"\n", profile ); #endif /*DEBUG*/ return( 0 ); } /* Embed an ICC profile from VipsImage metadata. */ static int embed_profile_meta( TIFF *tif, VipsImage *im ) { void *data; size_t data_length; if( vips_image_get_blob( im, VIPS_META_ICC_NAME, &data, &data_length ) ) return( -1 ); TIFFSetField( tif, TIFFTAG_ICCPROFILE, data_length, data ); #ifdef DEBUG printf( "vips2tiff: attached profile from meta\n" ); #endif /*DEBUG*/ return( 0 ); } static int embed_profile( TiffWrite *tw, TIFF *tif ) { if( tw->icc_profile && strcmp( tw->icc_profile, "none" ) != 0 && embed_profile_file( tif, tw->icc_profile ) ) return( -1 ); if( !tw->icc_profile && vips_image_get_typeof( tw->im, VIPS_META_ICC_NAME ) && embed_profile_meta( tif, tw->im ) ) return( -1 ); return( 0 ); } /* Write a TIFF header. width and height are the size of the VipsImage we are * writing (may have been shrunk!). */ static int write_tiff_header( TiffWrite *tw, TIFF *tif, int width, int height ) { uint16 v[1]; int format; /* Output base header fields. */ TIFFSetField( tif, TIFFTAG_IMAGEWIDTH, width ); TIFFSetField( tif, TIFFTAG_IMAGELENGTH, height ); TIFFSetField( tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG ); TIFFSetField( tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT ); TIFFSetField( tif, TIFFTAG_COMPRESSION, tw->compression ); if( tw->compression == COMPRESSION_JPEG ) TIFFSetField( tif, TIFFTAG_JPEGQUALITY, tw->jpqual ); if( tw->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE ) TIFFSetField( tif, TIFFTAG_PREDICTOR, tw->predictor ); /* Don't write mad resolutions (eg. zero), it confuses some programs. */ TIFFSetField( tif, TIFFTAG_RESOLUTIONUNIT, tw->resunit ); TIFFSetField( tif, TIFFTAG_XRESOLUTION, VIPS_CLIP( 0.01, tw->xres, 10000 ) ); TIFFSetField( tif, TIFFTAG_YRESOLUTION, VIPS_CLIP( 0.01, tw->yres, 10000 ) ); /* Attach ICC profile. */ if( embed_profile( tw, tif ) ) return( -1 ); /* And colour fields. */ if( tw->im->Coding == VIPS_CODING_LABQ ) { TIFFSetField( tif, TIFFTAG_SAMPLESPERPIXEL, 3 ); TIFFSetField( tif, TIFFTAG_BITSPERSAMPLE, 8 ); TIFFSetField( tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_CIELAB ); } else if( tw->onebit ) { TIFFSetField( tif, TIFFTAG_SAMPLESPERPIXEL, 1 ); TIFFSetField( tif, TIFFTAG_BITSPERSAMPLE, 1 ); TIFFSetField( tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK ); } else { int photometric; TIFFSetField( tif, TIFFTAG_SAMPLESPERPIXEL, tw->im->Bands ); TIFFSetField( tif, TIFFTAG_BITSPERSAMPLE, vips_format_sizeof( tw->im->BandFmt ) << 3 ); switch( tw->im->Bands ) { case 1: case 2: photometric = PHOTOMETRIC_MINISBLACK; if( tw->im->Bands == 2 ) { v[0] = EXTRASAMPLE_ASSOCALPHA; TIFFSetField( tif, TIFFTAG_EXTRASAMPLES, 1, v ); } break; case 3: case 4: /* could be: RGB, RGBA, CMYK, LAB, LABA, generic * multi-band image. */ if( tw->im->Type == VIPS_INTERPRETATION_LAB || tw->im->Type == VIPS_INTERPRETATION_LABS ) photometric = PHOTOMETRIC_CIELAB; else if( tw->im->Type == VIPS_INTERPRETATION_CMYK ) { photometric = PHOTOMETRIC_SEPARATED; TIFFSetField( tif, TIFFTAG_INKSET, INKSET_CMYK ); } else if( tw->compression == COMPRESSION_JPEG && tw->im->Bands == 3 && tw->im->BandFmt == VIPS_FORMAT_UCHAR && !tw->rgbjpeg ) { /* This signals to libjpeg that it can do * YCbCr chrominance subsampling from RGB, not * that we will supply the image as YCbCr. */ photometric = PHOTOMETRIC_YCBCR; TIFFSetField( tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB ); } else photometric = PHOTOMETRIC_RGB; if( tw->im->Type != VIPS_INTERPRETATION_CMYK && tw->im->Bands == 4 ) { v[0] = EXTRASAMPLE_ASSOCALPHA; TIFFSetField( tif, TIFFTAG_EXTRASAMPLES, 1, v ); } break; case 5: /* Only CMYKA */ photometric = PHOTOMETRIC_SEPARATED; TIFFSetField( tif, TIFFTAG_INKSET, INKSET_CMYK ); v[0] = EXTRASAMPLE_ASSOCALPHA; TIFFSetField( tif, TIFFTAG_EXTRASAMPLES, 1, v ); break; default: /* Who knows. Just call it RGB. */ photometric = PHOTOMETRIC_RGB; break; } TIFFSetField( tif, TIFFTAG_PHOTOMETRIC, photometric ); } /* Layout. */ if( tw->tile ) { TIFFSetField( tif, TIFFTAG_TILEWIDTH, tw->tilew ); TIFFSetField( tif, TIFFTAG_TILELENGTH, tw->tileh ); } else TIFFSetField( tif, TIFFTAG_ROWSPERSTRIP, 16 ); if( tif != tw->tif ) { /* Pyramid layer. */ TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE ); } /* Sample format. */ format = SAMPLEFORMAT_UINT; if( vips_band_format_isuint( tw->im->BandFmt ) ) format = SAMPLEFORMAT_UINT; else if( vips_band_format_isint( tw->im->BandFmt ) ) format = SAMPLEFORMAT_INT; else if( vips_band_format_isfloat( tw->im->BandFmt ) ) format = SAMPLEFORMAT_IEEEFP; else if( vips_band_format_iscomplex( tw->im->BandFmt ) ) format = SAMPLEFORMAT_COMPLEXIEEEFP; TIFFSetField( tif, TIFFTAG_SAMPLEFORMAT, format ); return( 0 ); } /* Free a pyramid layer. */ static void free_layer( PyramidLayer *layer ) { int i; for( i = 0; i < MAX_LAYER_BUFFER; i++ ) VIPS_FREEF( g_object_unref, layer->tiles[i].tile ); /* And close the TIFF file we are writing to. */ VIPS_FREEF( vips_free, layer->tbuf ); VIPS_FREEF( TIFFClose, layer->tif ); } /* Free an entire pyramid. */ static void free_pyramid( PyramidLayer *layer ) { if( layer->below ) free_pyramid( layer->below ); free_layer( layer ); } /* Build a pyramid. w & h are size of layer above this layer. Write new layer * struct into *zap, return 0/-1 for success/fail. */ static int build_pyramid( TiffWrite *tw, PyramidLayer *above, PyramidLayer **zap, int w, int h ) { PyramidLayer *layer = VIPS_NEW( tw->im, PyramidLayer ); int i; if( !layer ) return( -1 ); layer->tw = tw; layer->width = w / 2; layer->height = h / 2; if( !above ) /* Top of pyramid. */ layer->sub = 2; else layer->sub = above->sub * 2; layer->lname = NULL; layer->tif = NULL; layer->tbuf = NULL; for( i = 0; i < MAX_LAYER_BUFFER; i++ ) { layer->tiles[i].tile = NULL; layer->tiles[i].bits = PYR_NONE; } layer->below = NULL; layer->above = above; /* Save layer, to make sure it gets freed properly. */ *zap = layer; if( layer->width > tw->tilew || layer->height > tw->tileh ) if( build_pyramid( tw, layer, &layer->below, layer->width, layer->height ) ) return( -1 ); if( !(layer->lname = vips__temp_name( "%s.tif" )) ) return( -1 ); /* Make output image. */ if( !(layer->tif = tiff_openout( tw, layer->lname )) ) return( -1 ); /* Write the TIFF header for this layer. */ if( write_tiff_header( tw, layer->tif, layer->width, layer->height ) ) return( -1 ); if( !(layer->tbuf = vips_malloc( NULL, TIFFTileSize( layer->tif ) )) ) return( -1 ); return( 0 ); } /* Pick a new tile to write to in this layer. Either reuse a tile we have * previously filled, or make a new one. */ static int find_new_tile( PyramidLayer *layer ) { int i; /* Existing buffer we have finished with? */ for( i = 0; i < MAX_LAYER_BUFFER; i++ ) if( layer->tiles[i].bits == PYR_ALL ) return( i ); /* Have to make a new one. */ for( i = 0; i < MAX_LAYER_BUFFER; i++ ) if( !layer->tiles[i].tile ) { if( !(layer->tiles[i].tile = vips_region_new( layer->tw->im )) ) return( -1 ); return( i ); } /* Out of space! */ vips_error( "vips2tiff", "%s", _( "layer buffer exhausted -- " "try making TIFF output tiles smaller" ) ); return( -1 ); } /* Find a tile in the layer buffer - if it's not there, make a new one. */ static int find_tile( PyramidLayer *layer, VipsRect *pos ) { int i; VipsRect quad; VipsRect image; VipsRect inter; /* Do we have a VipsRegion for this position? */ for( i = 0; i < MAX_LAYER_BUFFER; i++ ) { VipsRegion *reg = layer->tiles[i].tile; if( reg && reg->valid.left == pos->left && reg->valid.top == pos->top ) return( i ); } /* Make a new one. */ if( (i = find_new_tile( layer )) < 0 ) return( -1 ); if( vips_region_buffer( layer->tiles[i].tile, pos ) ) return( -1 ); vips__region_no_ownership( layer->tiles[i].tile ); layer->tiles[i].bits = PYR_NONE; /* Do any quadrants of this tile fall entirely outside the image? * If they do, set their bits now. */ quad.width = layer->tw->tilew / 2; quad.height = layer->tw->tileh / 2; image.left = 0; image.top = 0; image.width = layer->width; image.height = layer->height; quad.left = pos->left; quad.top = pos->top; vips_rect_intersectrect( &quad, &image, &inter ); if( vips_rect_isempty( &inter ) ) layer->tiles[i].bits |= PYR_TL; quad.left = pos->left + quad.width; quad.top = pos->top; vips_rect_intersectrect( &quad, &image, &inter ); if( vips_rect_isempty( &inter ) ) layer->tiles[i].bits |= PYR_TR; quad.left = pos->left; quad.top = pos->top + quad.height; vips_rect_intersectrect( &quad, &image, &inter ); if( vips_rect_isempty( &inter ) ) layer->tiles[i].bits |= PYR_BL; quad.left = pos->left + quad.width; quad.top = pos->top + quad.height; vips_rect_intersectrect( &quad, &image, &inter ); if( vips_rect_isempty( &inter ) ) layer->tiles[i].bits |= PYR_BR; return( i ); } /* Shrink a region by a factor of two, writing the result to a specified * offset in another region. VIPS_CODING_LABQ only. */ static void shrink_region_labpack( VipsRegion *from, VipsRect *area, VipsRegion *to, int xoff, int yoff ) { int ls = VIPS_REGION_LSKIP( from ); VipsRect *t = &to->valid; int x, y; VipsRect out; /* Calculate output size and position. */ out.left = t->left + xoff; out.top = t->top + yoff; out.width = area->width / 2; out.height = area->height / 2; /* Shrink ... ignore the extension byte for speed. */ for( y = 0; y < out.height; y++ ) { VipsPel *p = VIPS_REGION_ADDR( from, area->left, area->top + y * 2 ); VipsPel *q = VIPS_REGION_ADDR( to, out.left, out.top + y ); for( x = 0; x < out.width; x++ ) { signed char *sp = (signed char *) p; unsigned char *up = (unsigned char *) p; int l = up[0] + up[4] + up[ls] + up[ls + 4]; int a = sp[1] + sp[5] + sp[ls + 1] + sp[ls + 5]; int b = sp[2] + sp[6] + sp[ls + 2] + sp[ls + 6]; q[0] = l >> 2; q[1] = a >> 2; q[2] = b >> 2; q[3] = 0; q += 4; p += 8; } } } #define SHRINK_TYPE_INT( TYPE ) \ for( x = 0; x < out.width; x++ ) { \ TYPE *tp = (TYPE *) p; \ TYPE *tp1 = (TYPE *) (p + ls); \ TYPE *tq = (TYPE *) q; \ \ for( z = 0; z < nb; z++ ) { \ int tot = tp[z] + tp[z + nb] + \ tp1[z] + tp1[z + nb]; \ \ tq[z] = tot >> 2; \ } \ \ /* Move on two pels in input. \ */ \ p += ps << 1; \ q += ps; \ } #define SHRINK_TYPE_FLOAT( TYPE ) \ for( x = 0; x < out.width; x++ ) { \ TYPE *tp = (TYPE *) p; \ TYPE *tp1 = (TYPE *) (p + ls); \ TYPE *tq = (TYPE *) q; \ \ for( z = 0; z < nb; z++ ) { \ double tot = (double) tp[z] + tp[z + nb] + \ tp1[z] + tp1[z + nb]; \ \ tq[z] = tot / 4; \ } \ \ /* Move on two pels in input. \ */ \ p += ps << 1; \ q += ps; \ } /* Shrink a region by a factor of two, writing the result to a specified * offset in another region. n-band, non-complex. */ static void shrink_region( VipsRegion *from, VipsRect *area, VipsRegion *to, int xoff, int yoff ) { int ls = VIPS_REGION_LSKIP( from ); int ps = VIPS_IMAGE_SIZEOF_PEL( from->im ); int nb = from->im->Bands; VipsRect *t = &to->valid; int x, y, z; VipsRect out; /* Calculate output size and position. */ out.left = t->left + xoff; out.top = t->top + yoff; out.width = area->width / 2; out.height = area->height / 2; for( y = 0; y < out.height; y++ ) { VipsPel *p = VIPS_REGION_ADDR( from, area->left, area->top + y * 2 ); VipsPel *q = VIPS_REGION_ADDR( to, out.left, out.top + y ); /* Process this line of pels. */ switch( from->im->BandFmt ) { case VIPS_FORMAT_UCHAR: SHRINK_TYPE_INT( unsigned char ); break; case VIPS_FORMAT_CHAR: SHRINK_TYPE_INT( signed char ); break; case VIPS_FORMAT_USHORT: SHRINK_TYPE_INT( unsigned short ); break; case VIPS_FORMAT_SHORT: SHRINK_TYPE_INT( signed short ); break; case VIPS_FORMAT_UINT: SHRINK_TYPE_INT( unsigned int ); break; case VIPS_FORMAT_INT: SHRINK_TYPE_INT( signed int ); break; case VIPS_FORMAT_FLOAT: SHRINK_TYPE_FLOAT( float ); break; case VIPS_FORMAT_DOUBLE: SHRINK_TYPE_FLOAT( double ); break; default: g_assert( 0 ); } } } /* Write a tile from a layer. */ static int save_tile( TiffWrite *tw, TIFF *tif, VipsPel *tbuf, VipsRegion *reg, VipsRect *area ) { /* Have to repack pixels. */ pack2tiff( tw, reg, tbuf, area ); #ifdef DEBUG_VERBOSE printf( "Writing %dx%d pixels at position %dx%d to image %s\n", tw->tilew, tw->tileh, area->left, area->top, TIFFFileName( tif ) ); #endif /*DEBUG_VERBOSE*/ /* Write to TIFF! easy. */ if( TIFFWriteTile( tif, tbuf, area->left, area->top, 0, 0 ) < 0 ) { vips_error( "vips2tiff", "%s", _( "TIFF write tile failed" ) ); return( -1 ); } return( 0 ); } /* A new tile has arrived! Shrink into this layer, if we fill a region, write * it and recurse. */ static int new_tile( PyramidLayer *layer, VipsRegion *tile, VipsRect *area ) { TiffWrite *tw = layer->tw; int xoff, yoff; int t, ri, bo; VipsRect out, new; PyramidBits bit; /* Calculate pos and size of new pixels we make inside this layer. */ new.left = area->left / 2; new.top = area->top / 2; new.width = area->width / 2; new.height = area->height / 2; /* Has size fallen to zero? Can happen if this is a one-pixel-wide * strip. */ if( vips_rect_isempty( &new ) ) return( 0 ); /* Offset into this tile ... ie. which quadrant we are writing. */ xoff = new.left % layer->tw->tilew; yoff = new.top % layer->tw->tileh; /* Calculate pos for tile we shrink into in this layer. */ out.left = new.left - xoff; out.top = new.top - yoff; /* Clip against edge of image. */ ri = VIPS_MIN( layer->width, out.left + layer->tw->tilew ); bo = VIPS_MIN( layer->height, out.top + layer->tw->tileh ); out.width = ri - out.left; out.height = bo - out.top; if( (t = find_tile( layer, &out )) < 0 ) return( -1 ); /* Shrink into place. */ if( tw->im->Coding == VIPS_CODING_NONE ) shrink_region( tile, area, layer->tiles[t].tile, xoff, yoff ); else shrink_region_labpack( tile, area, layer->tiles[t].tile, xoff, yoff ); /* Set that bit. */ if( xoff ) if( yoff ) bit = PYR_BR; else bit = PYR_TR; else if( yoff ) bit = PYR_BL; else bit = PYR_TL; if( layer->tiles[t].bits & bit ) { vips_error( "vips2tiff", "%s", _( "internal error #9876345" ) ); return( -1 ); } layer->tiles[t].bits |= bit; if( layer->tiles[t].bits == PYR_ALL ) { /* Save this complete tile. */ if( save_tile( tw, layer->tif, layer->tbuf, layer->tiles[t].tile, &layer->tiles[t].tile->valid ) ) return( -1 ); /* And recurse down the pyramid! */ if( layer->below && new_tile( layer->below, layer->tiles[t].tile, &layer->tiles[t].tile->valid ) ) return( -1 ); } return( 0 ); } /* Write as tiles. This is called by vips_sink_tile() for every tile * generated. */ static int write_tif_tile( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) { TiffWrite *tw = (TiffWrite *) a; g_mutex_lock( tw->write_lock ); /* Write to TIFF. */ if( save_tile( tw, tw->tif, tw->tbuf, out, &out->valid ) ) { g_mutex_unlock( tw->write_lock ); return( -1 ); } /* Is there a pyramid? Write to that too. */ if( tw->layer && new_tile( tw->layer, out, &out->valid ) ) { g_mutex_unlock( tw->write_lock ); return( -1 ); } g_mutex_unlock( tw->write_lock ); return( 0 ); } /* Write as tiles. */ static int write_tif_tilewise( TiffWrite *tw ) { VipsImage *im = tw->im; /* Double check: buffers should match in size, except for onebit and * labq modes. */ { size_t vips_tile_size = VIPS_IMAGE_SIZEOF_PEL( im ) * tw->tilew * tw->tileh; if( tw->im->Coding != VIPS_CODING_LABQ && !tw->onebit && TIFFTileSize( tw->tif ) != vips_tile_size ) { vips_error( "vips2tiff", "%s", _( "unsupported image format" ) ); return( -1 ); } } g_assert( !tw->tbuf ); if( !(tw->tbuf = vips_malloc( NULL, TIFFTileSize( tw->tif ) )) ) return( -1 ); g_assert( !tw->write_lock ); tw->write_lock = vips_g_mutex_new(); /* Write pyramid too? Only bother if bigger than tile size. */ if( tw->pyramid && (im->Xsize > tw->tilew || im->Ysize > tw->tileh) && build_pyramid( tw, NULL, &tw->layer, im->Xsize, im->Ysize ) ) return( -1 ); if( vips_sink_tile( im, tw->tilew, tw->tileh, NULL, write_tif_tile, NULL, tw, NULL ) ) return( -1 ); return( 0 ); } static int write_tif_block( VipsRegion *region, VipsRect *area, void *a ) { TiffWrite *tw = (TiffWrite *) a; VipsImage *im = tw->im; int y; for( y = 0; y < area->height; y++ ) { VipsPel *p = VIPS_REGION_ADDR( region, 0, area->top + y ); /* Any repacking necessary. */ if( im->Coding == VIPS_CODING_LABQ ) { LabQ2LabC( tw->tbuf, p, im->Xsize ); p = tw->tbuf; } else if( im->BandFmt == VIPS_FORMAT_SHORT && im->Type == VIPS_INTERPRETATION_LABS ) { LabS2Lab16( tw->tbuf, p, im->Xsize ); p = tw->tbuf; } else if( tw->onebit ) { eightbit2onebit( tw->tbuf, p, im->Xsize ); p = tw->tbuf; } if( TIFFWriteScanline( tw->tif, p, area->top + y, 0 ) < 0 ) return( -1 ); } return( 0 ); } /* Write as scan-lines. */ static int write_tif_stripwise( TiffWrite *tw ) { g_assert( !tw->tbuf ); /* Double check: buffers should match in size, except for onebit and * labq modes. */ if( tw->im->Coding != VIPS_CODING_LABQ && !tw->onebit && TIFFScanlineSize( tw->tif ) != VIPS_IMAGE_SIZEOF_LINE( tw->im ) ) { vips_error( "vips2tiff", "%s", _( "unsupported image format" ) ); return( -1 ); } if( !(tw->tbuf = vips_malloc( NULL, TIFFScanlineSize( tw->tif ) )) ) return( -1 ); if( vips_sink_disc( tw->im, write_tif_block, tw ) ) return( -1 ); return( 0 ); } /* Delete any temp files we wrote. */ static void delete_files( TiffWrite *tw ) { PyramidLayer *layer; if( tw->bname ) { #ifndef DEBUG unlink( tw->bname ); #else printf( "delete_files: leaving %s\n", tw->bname ); #endif /*DEBUG*/ tw->bname = NULL; } for( layer = tw->layer; layer; layer = layer->below ) if( layer->lname ) { #ifndef DEBUG unlink( layer->lname ); #else printf( "delete_files: leaving %s\n", layer->lname ); #endif /*DEBUG*/ layer->lname = NULL; } } /* Free a TiffWrite. */ static void free_tiff_write( TiffWrite *tw ) { delete_files( tw ); VIPS_FREEF( TIFFClose, tw->tif ); VIPS_FREEF( vips_free, tw->tbuf ); VIPS_FREEF( vips_g_mutex_free, tw->write_lock ); VIPS_FREEF( free_pyramid, tw->layer ); VIPS_FREEF( vips_free, tw->icc_profile ); } /* Round N down to P boundary. */ #define ROUND_DOWN(N,P) ((N) - ((N) % P)) /* Round N up to P boundary. */ #define ROUND_UP(N,P) (ROUND_DOWN( (N) + (P) - 1, (P) )) static int get_compression( VipsForeignTiffCompression compression ) { switch( compression ) { case VIPS_FOREIGN_TIFF_COMPRESSION_NONE: return( COMPRESSION_NONE ); case VIPS_FOREIGN_TIFF_COMPRESSION_JPEG: return( COMPRESSION_JPEG ); case VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE: return( COMPRESSION_ADOBE_DEFLATE ); case VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS: return( COMPRESSION_PACKBITS ); case VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4: return( COMPRESSION_CCITTFAX4 ); case VIPS_FOREIGN_TIFF_COMPRESSION_LZW: return( COMPRESSION_LZW ); default: g_assert( 0 ); } /* Keep -Wall happy. */ return( -1 ); } static int get_resunit( VipsForeignTiffResunit resunit ) { switch( resunit ) { case VIPS_FOREIGN_TIFF_RESUNIT_CM: return( RESUNIT_CENTIMETER ); case VIPS_FOREIGN_TIFF_RESUNIT_INCH: return( RESUNIT_INCH ); default: g_assert( 0 ); } /* Keep -Wall happy. */ return( -1 ); } /* Make and init a TiffWrite. */ static TiffWrite * make_tiff_write( VipsImage *im, const char *filename, VipsForeignTiffCompression compression, int Q, VipsForeignTiffPredictor predictor, char *profile, gboolean tile, int tile_width, int tile_height, gboolean pyramid, gboolean squash, VipsForeignTiffResunit resunit, double xres, double yres, gboolean bigtiff, gboolean rgbjpeg ) { TiffWrite *tw; if( !(tw = VIPS_NEW( im, TiffWrite )) ) return( NULL ); tw->im = im; tw->name = vips_strdup( VIPS_OBJECT( im ), filename ); tw->bname = NULL; tw->tif = NULL; tw->layer = NULL; tw->tbuf = NULL; tw->compression = get_compression( compression ); tw->jpqual = Q; tw->predictor = predictor; tw->tile = tile; tw->tilew = tile_width; tw->tileh = tile_height; tw->pyramid = pyramid; tw->onebit = squash; tw->icc_profile = profile; tw->bigtiff = bigtiff; tw->rgbjpeg = rgbjpeg; tw->write_lock = NULL; tw->resunit = get_resunit( resunit ); tw->xres = xres; tw->yres = yres; if( (tw->tilew & 0xf) != 0 || (tw->tileh & 0xf) != 0 ) { vips_error( "vips2tiff", "%s", _( "tile size not a multiple of 16" ) ); return( NULL ); } if( !tw->tile && tw->pyramid ) { vips_warn( "vips2tiff", "%s", _( "can't have strip pyramid -- " "enabling tiling" ) ); tw->tile = 1; } /* We can only pyramid LABQ and non-complex images. */ if( tw->pyramid ) { if( im->Coding == VIPS_CODING_NONE && vips_bandfmt_iscomplex( im->BandFmt ) ) { vips_error( "vips2tiff", "%s", _( "can only pyramid LABQ and " "non-complex images" ) ); return( NULL ); } } /* Only 1-bit-ize 8 bit mono images. */ if( tw->onebit && (im->Coding != VIPS_CODING_NONE || im->BandFmt != VIPS_FORMAT_UCHAR || im->Bands != 1) ) { vips_warn( "vips2tiff", "%s", _( "can only squash 1 band uchar images -- " "disabling squash" ) ); tw->onebit = 0; } if( tw->onebit && tw->compression == COMPRESSION_JPEG ) { vips_warn( "vips2tiff", "%s", _( "can't have 1-bit JPEG -- disabling JPEG" ) ); tw->compression = COMPRESSION_NONE; } /* Sizeof a line of bytes in the TIFF tile. */ if( im->Coding == VIPS_CODING_LABQ ) tw->tls = tw->tilew * 3; else if( tw->onebit ) tw->tls = ROUND_UP( tw->tilew, 8 ) / 8; else tw->tls = VIPS_IMAGE_SIZEOF_PEL( im ) * tw->tilew; return( tw ); } /* Copy fields. */ #define CopyField( tag, v ) \ if( TIFFGetField( in, tag, &v ) ) TIFFSetField( out, tag, v ) /* Copy a TIFF file ... we know we wrote it, so just copy the tags we know * we might have set. */ static int tiff_copy( TiffWrite *tw, TIFF *out, TIFF *in ) { uint32 i32; uint16 i16; float f; tdata_t buf; ttile_t tile; ttile_t n; /* All the fields we might have set. */ CopyField( TIFFTAG_IMAGEWIDTH, i32 ); CopyField( TIFFTAG_IMAGELENGTH, i32 ); CopyField( TIFFTAG_PLANARCONFIG, i16 ); CopyField( TIFFTAG_ORIENTATION, i16 ); CopyField( TIFFTAG_XRESOLUTION, f ); CopyField( TIFFTAG_YRESOLUTION, f ); CopyField( TIFFTAG_RESOLUTIONUNIT, i16 ); CopyField( TIFFTAG_COMPRESSION, i16 ); CopyField( TIFFTAG_SAMPLESPERPIXEL, i16 ); CopyField( TIFFTAG_BITSPERSAMPLE, i16 ); CopyField( TIFFTAG_PHOTOMETRIC, i16 ); CopyField( TIFFTAG_TILEWIDTH, i32 ); CopyField( TIFFTAG_TILELENGTH, i32 ); CopyField( TIFFTAG_ROWSPERSTRIP, i32 ); CopyField( TIFFTAG_SUBFILETYPE, i32 ); if( tw->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE ) TIFFSetField( out, TIFFTAG_PREDICTOR, tw->predictor ); /* TIFFTAG_JPEGQUALITY is a pesudo-tag, so we can't copy it. * Set explicitly from TiffWrite. */ if( tw->compression == COMPRESSION_JPEG ) { TIFFSetField( out, TIFFTAG_JPEGQUALITY, tw->jpqual ); /* Only for three-band, 8-bit images. */ if( tw->im->Bands == 3 && tw->im->BandFmt == VIPS_FORMAT_UCHAR ) { /* Enable rgb->ycbcr conversion in the jpeg write. */ TIFFSetField( out, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB ); /* And we want ycbcr expanded to rgb on read. Otherwise * TIFFTileSize() will give us the size of a chrominance * subsampled tile. */ TIFFSetField( in, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB ); } } /* We can't copy profiles :( Set again from TiffWrite. */ if( embed_profile( tw, out ) ) return( -1 ); buf = vips_malloc( NULL, TIFFTileSize( in ) ); n = TIFFNumberOfTiles( in ); for( tile = 0; tile < n; tile++ ) { tsize_t len; /* It'd be good to use TIFFReadRawTile()/TIFFWriteRawTile() * here to save compression/decompression, but sadly it seems * not to work :-( investigate at some point. */ len = TIFFReadEncodedTile( in, tile, buf, -1 ); if( len < 0 || TIFFWriteEncodedTile( out, tile, buf, len ) < 0 ) { vips_free( buf ); return( -1 ); } } vips_free( buf ); return( 0 ); } /* Append a file to a TIFF file. */ static int tiff_append( TiffWrite *tw, TIFF *out, const char *name ) { TIFF *in; if( !(in = tiff_openin( name )) ) return( -1 ); if( tiff_copy( tw, out, in ) ) { TIFFClose( in ); return( -1 ); } TIFFClose( in ); if( !TIFFWriteDirectory( out ) ) return( -1 ); return( 0 ); } /* Gather all of the files we wrote into single output file. */ static int gather_pyramid( TiffWrite *tw ) { PyramidLayer *layer; TIFF *out; #ifdef DEBUG printf( "Starting pyramid gather ...\n" ); #endif /*DEBUG*/ if( !(out = tiff_openout( tw, tw->name )) ) return( -1 ); if( tiff_append( tw, out, tw->bname ) ) { TIFFClose( out ); return( -1 ); } for( layer = tw->layer; layer; layer = layer->below ) if( tiff_append( tw, out, layer->lname ) ) { TIFFClose( out ); return( -1 ); } TIFFClose( out ); #ifdef DEBUG printf( "Pyramid built\n" ); #endif /*DEBUG*/ return( 0 ); } int vips__tiff_write( VipsImage *in, const char *filename, VipsForeignTiffCompression compression, int Q, VipsForeignTiffPredictor predictor, char *profile, gboolean tile, int tile_width, int tile_height, gboolean pyramid, gboolean squash, VipsForeignTiffResunit resunit, double xres, double yres, gboolean bigtiff, gboolean rgbjpeg ) { TiffWrite *tw; int res; #ifdef DEBUG printf( "tiff2vips: libtiff version is \"%s\"\n", TIFFGetVersion() ); #endif /*DEBUG*/ vips__tiff_init(); /* Check input image. */ if( vips_check_coding_known( "vips2tiff", in ) ) return( -1 ); /* Make output image. If this is a pyramid, write the base image to * tmp/xx.tif rather than fred.tif. */ if( !(tw = make_tiff_write( in, filename, compression, Q, predictor, profile, tile, tile_width, tile_height, pyramid, squash, resunit, xres, yres, bigtiff, rgbjpeg )) ) return( -1 ); if( tw->pyramid ) { if( !(tw->bname = vips__temp_name( "%s.tif" )) || !(tw->tif = tiff_openout( tw, tw->bname )) ) { free_tiff_write( tw ); return( -1 ); } } else { /* No pyramid ... write straight to name. */ if( !(tw->tif = tiff_openout( tw, tw->name )) ) { free_tiff_write( tw ); return( -1 ); } } /* Write the TIFF header for the full-res file. */ if( write_tiff_header( tw, tw->tif, in->Xsize, in->Ysize ) ) { free_tiff_write( tw ); return( -1 ); } if( tw->tile ) res = write_tif_tilewise( tw ); else res = write_tif_stripwise( tw ); if( res ) { free_tiff_write( tw ); return( -1 ); } /* Free pyramid resources ... this will TIFFClose() the intermediates, * ready for us to read from them again. */ if( tw->layer ) free_pyramid( tw->layer ); if( tw->tif ) { TIFFClose( tw->tif ); tw->tif = NULL; } /* Gather layers together into final pyramid file. */ if( tw->pyramid && gather_pyramid( tw ) ) { free_tiff_write( tw ); return( -1 ); } free_tiff_write( tw ); return( 0 ); } #endif /*HAVE_TIFF*/ vips-7.38.5/libvips/foreign/vips2webp.c0000644000175000017500000000606612303140253014707 00000000000000/* wrap libwebp libray for write * * 6/8/13 * - from vips2jpeg.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_LIBWEBP #include #include #include #include "webp.h" typedef size_t (*webp_encoder)( const uint8_t *rgb, int width, int height, int stride, float quality_factor, uint8_t **output ); typedef size_t (*webp_encoder_lossless)( const uint8_t *rgb, int width, int height, int stride, uint8_t **output ); int vips__webp_write_file( VipsImage *in, const char *filename, int Q, gboolean lossless ) { size_t len; uint8_t *buffer; FILE *fp; if( vips_image_wio_input( in ) ) return( -1 ); if( lossless ) { webp_encoder_lossless encoder; if( in->Bands == 4 ) encoder = WebPEncodeLosslessRGBA; else encoder = WebPEncodeLosslessRGB; if( !(len = encoder( VIPS_IMAGE_ADDR( in, 0, 0 ), in->Xsize, in->Ysize, VIPS_IMAGE_SIZEOF_LINE( in ), &buffer )) ) { vips_error( "vips2webp", "%s", _( "unable to encode" ) ); return( -1 ); } } else { webp_encoder encoder; if( in->Bands == 4 ) encoder = WebPEncodeRGBA; else encoder = WebPEncodeRGB; if( !(len = encoder( VIPS_IMAGE_ADDR( in, 0, 0 ), in->Xsize, in->Ysize, VIPS_IMAGE_SIZEOF_LINE( in ), Q, &buffer )) ) { vips_error( "vips2webp", "%s", _( "unable to encode" ) ); return( -1 ); } } if( !(fp = vips__file_open_write( filename, FALSE )) ) { free( buffer ); return( -1 ); } if( vips__file_write( buffer, len, 1, fp ) ) { fclose( fp ); free( buffer ); return( -1 ); } fclose( fp ); free( buffer ); return( 0 ); } int vips__webp_write_buffer( VipsImage *in, void **obuf, size_t *olen, int Q, gboolean lossless ) { webp_encoder encoder; if( vips_image_wio_input( in ) ) return( -1 ); if( in->Bands == 4 ) encoder = WebPEncodeRGBA; else encoder = WebPEncodeRGB; if( !(*olen = encoder( VIPS_IMAGE_ADDR( in, 0, 0 ), in->Xsize, in->Ysize, VIPS_IMAGE_SIZEOF_LINE( in ), Q, (uint8_t **) obuf )) ) { vips_error( "vips2webp", "%s", _( "unable to encode" ) ); return( -1 ); } return( 0 ); } #endif /*HAVE_LIBWEBP*/ vips-7.38.5/libvips/foreign/fits.c0000644000175000017500000004040012303140253013721 00000000000000/* Read FITS files with cfitsio * * 26/10/10 * - from matlab.c * 27/10/10 * - oops, forgot to init status in close * 30/11/10 * - set RGB16/GREY16 if appropriate * - allow up to 10 dimensions as long as they are empty * 27/1/11 * - lazy read * 31/1/11 * - read in planes and combine with im_bandjoin() * - read whole tiles with fits_read_subset() when we can * 17/3/11 * - renames, updates etc. ready for adding fits write * - fits write! * 21/3/11 * - read/write metadata as whole records to avoid changing things * - cast input to a supported format * - bandsplit for write * 13/12/11 * - redo as a set of fns ready for wrapping in a new-style class * 23/6/13 * - fix ushort save with values >32k, thanks weaverwb */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_CFITSIO #include #include #include #include #include #include #include #include "fits.h" /* TODO - ask Doug for a test colour image found WFPC2u5780205r_c0fx.fits on the fits samples page, but it's tiny - test performance - vips__fits_read() makes rather ugly bandjoins, fix */ /* vips only supports 3 dimensions, but we allow up to MAX_DIMENSIONS as long * as the higher dimensions are all empty. If you change this value, change * fits2vips_get_header() as well. */ #define MAX_DIMENSIONS (10) /* What we track during a cfitsio-file read or write. */ typedef struct { char *filename; VipsImage *image; fitsfile *fptr; int datatype; int naxis; long long int naxes[MAX_DIMENSIONS]; GMutex *lock; /* Lock fits_*() calls with this */ /* Set this to -1 to read all bands, or a +ve int to read a specific * band. */ int band_select; /* We split bands up for write into this buffer. */ VipsPel *buffer; } VipsFits; const char *vips__fits_suffs[] = { ".fits", NULL }; static void vips_fits_error( int status ) { char buf[80]; fits_get_errstatus( status, buf ); vips_error( "fits", "%s", buf ); } /* Shut down. Can be called many times. */ static void vips_fits_close( VipsFits *fits ) { VIPS_FREE( fits->filename ); VIPS_FREEF( vips_g_mutex_free, fits->lock ); if( fits->fptr ) { int status; status = 0; if( fits_close_file( fits->fptr, &status ) ) vips_fits_error( status ); fits->fptr = NULL; } VIPS_FREE( fits->buffer ); } static void vips_fits_close_cb( VipsImage *image, VipsFits *fits ) { vips_fits_close( fits ); } static VipsFits * vips_fits_new_read( const char *filename, VipsImage *out, int band_select ) { VipsFits *fits; int status; if( !(fits = VIPS_NEW( out, VipsFits )) ) return( NULL ); fits->filename = vips_strdup( NULL, filename ); fits->image = out; fits->fptr = NULL; fits->lock = NULL; fits->band_select = band_select; fits->buffer = NULL; g_signal_connect( out, "close", G_CALLBACK( vips_fits_close_cb ), fits ); status = 0; if( fits_open_file( &fits->fptr, filename, READONLY, &status ) ) { vips_error( "fits", _( "unable to open \"%s\"" ), filename ); vips_fits_error( status ); return( NULL ); } fits->lock = vips_g_mutex_new(); return( fits ); } /* fits image types -> VIPS band formats. VIPS doesn't have 64-bit int, so no * entry for LONGLONG_IMG (64). */ static int fits2vips_formats[][3] = { { BYTE_IMG, VIPS_FORMAT_UCHAR, TBYTE }, { SHORT_IMG, VIPS_FORMAT_SHORT, TSHORT }, { USHORT_IMG, VIPS_FORMAT_USHORT, TUSHORT }, { LONG_IMG, VIPS_FORMAT_INT, TINT }, { ULONG_IMG, VIPS_FORMAT_UINT, TUINT }, { FLOAT_IMG, VIPS_FORMAT_FLOAT, TFLOAT }, { DOUBLE_IMG, VIPS_FORMAT_DOUBLE, TDOUBLE } }; static int vips_fits_get_header( VipsFits *fits, VipsImage *out ) { int status; int bitpix; int width, height, bands, format, type; int keysexist; int i; status = 0; if( fits_get_img_paramll( fits->fptr, 10, &bitpix, &fits->naxis, fits->naxes, &status ) ) { vips_fits_error( status ); return( -1 ); } #ifdef VIPS_DEBUG VIPS_DEBUG_MSG( "naxis = %d\n", fits->naxis ); for( i = 0; i < fits->naxis; i++ ) VIPS_DEBUG_MSG( "%d) %lld\n", i, fits->naxes[i] ); #endif /*VIPS_DEBUG*/ height = 1; bands = 1; switch( fits->naxis ) { /* If you add more dimensions here, adjust data read below. See also * the definition of MAX_DIMENSIONS above. */ case 10: case 9: case 8: case 7: case 6: case 5: case 4: for( i = fits->naxis; i > 3; i-- ) if( fits->naxes[i - 1] != 1 ) { vips_error( "fits", "%s", _( "dimensions above 3 " "must be size 1" ) ); return( -1 ); } case 3: bands = fits->naxes[2]; case 2: height = fits->naxes[1]; case 1: width = fits->naxes[0]; break; default: vips_error( "fits", _( "bad number of axis %d" ), fits->naxis ); return( -1 ); } /* Are we in one-band mode? */ if( fits->band_select != -1 ) bands = 1; /* Get image format. We want the 'raw' format of the image, our caller * can convert using the meta info if they want. */ for( i = 0; i < VIPS_NUMBER( fits2vips_formats ); i++ ) if( fits2vips_formats[i][0] == bitpix ) break; if( i == VIPS_NUMBER( fits2vips_formats ) ) { vips_error( "fits", _( "unsupported bitpix %d\n" ), bitpix ); return( -1 ); } format = fits2vips_formats[i][1]; fits->datatype = fits2vips_formats[i][2]; if( bands == 1 ) { if( format == VIPS_FORMAT_USHORT ) type = VIPS_INTERPRETATION_GREY16; else type = VIPS_INTERPRETATION_B_W; } else if( bands == 3 ) { if( format == VIPS_FORMAT_USHORT ) type = VIPS_INTERPRETATION_RGB16; else type = VIPS_INTERPRETATION_RGB; } else type = VIPS_INTERPRETATION_MULTIBAND; vips_image_pipelinev( out, VIPS_DEMAND_STYLE_SMALLTILE, NULL ); vips_image_init_fields( out, width, height, bands, format, VIPS_CODING_NONE, type, 1.0, 1.0 ); /* Read all keys into meta. */ if( fits_get_hdrspace( fits->fptr, &keysexist, NULL, &status ) ) { vips_fits_error( status ); return( -1 ); } for( i = 0; i < keysexist; i++ ) { char record[81]; char vipsname[100]; if( fits_read_record( fits->fptr, i + 1, record, &status ) ) { vips_fits_error( status ); return( -1 ); } VIPS_DEBUG_MSG( "fits2vips: setting meta on vips image:\n" ); VIPS_DEBUG_MSG( " record == \"%s\"\n", record ); /* FITS lets keys repeat. For example, HISTORY appears many * times, each time with a fresh line of history attached. We * have to include the key index in the vips name we assign. */ vips_snprintf( vipsname, 100, "fits-%d", i ); vips_image_set_string( out, vipsname, record ); } return( 0 ); } int vips__fits_read_header( const char *filename, VipsImage *out ) { VipsFits *fits; VIPS_DEBUG_MSG( "fits2vips_header: reading \"%s\"\n", filename ); if( !(fits = vips_fits_new_read( filename, out, -1 )) || vips_fits_get_header( fits, out ) ) return( -1 ); return( 0 ); } static int fits2vips_generate( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) { VipsFits *fits = (VipsFits *) a; Rect *r = &out->valid; VipsPel *q; int z; int status; long fpixel[MAX_DIMENSIONS]; long lpixel[MAX_DIMENSIONS]; long inc[MAX_DIMENSIONS]; status = 0; VIPS_DEBUG_MSG( "fits2vips_generate: " "generating left = %d, top = %d, width = %d, height = %d\n", r->left, r->top, r->width, r->height ); /* Special case: the region we are writing to is exactly the width we * need, ie. we can read a rectangular area into it. */ if( VIPS_REGION_LSKIP( out ) == VIPS_REGION_SIZEOF_LINE( out ) ) { VIPS_DEBUG_MSG( "fits2vips_generate: block read\n" ); for( z = 0; z < MAX_DIMENSIONS; z++ ) fpixel[z] = 1; fpixel[0] = r->left + 1; fpixel[1] = r->top + 1; fpixel[2] = fits->band_select + 1; for( z = 0; z < MAX_DIMENSIONS; z++ ) lpixel[z] = 1; lpixel[0] = VIPS_RECT_RIGHT( r ); lpixel[1] = VIPS_RECT_BOTTOM( r ); lpixel[2] = fits->band_select + 1; for( z = 0; z < MAX_DIMENSIONS; z++ ) inc[z] = 1; q = VIPS_REGION_ADDR( out, r->left, r->top ); /* Break on ffgsv() for this call. */ g_mutex_lock( fits->lock ); if( fits_read_subset( fits->fptr, fits->datatype, fpixel, lpixel, inc, NULL, q, NULL, &status ) ) { vips_fits_error( status ); g_mutex_unlock( fits->lock ); return( -1 ); } g_mutex_unlock( fits->lock ); } else { int y; for( y = r->top; y < VIPS_RECT_BOTTOM( r ); y ++ ) { for( z = 0; z < MAX_DIMENSIONS; z++ ) fpixel[z] = 1; fpixel[0] = r->left + 1; fpixel[1] = y + 1; fpixel[2] = fits->band_select + 1; for( z = 0; z < MAX_DIMENSIONS; z++ ) lpixel[z] = 1; lpixel[0] = VIPS_RECT_RIGHT( r ); lpixel[1] = y + 1; lpixel[2] = fits->band_select + 1; for( z = 0; z < MAX_DIMENSIONS; z++ ) inc[z] = 1; q = VIPS_REGION_ADDR( out, r->left, y ); /* Break on ffgsv() for this call. */ g_mutex_lock( fits->lock ); if( fits_read_subset( fits->fptr, fits->datatype, fpixel, lpixel, inc, NULL, q, NULL, &status ) ) { vips_fits_error( status ); g_mutex_unlock( fits->lock ); return( -1 ); } g_mutex_unlock( fits->lock ); } } return( 0 ); } static int fits2vips( const char *filename, VipsImage *out, int band_select ) { VipsFits *fits; /* The -1 mode is just for reading the header. */ g_assert( band_select >= 0 ); if( !(fits = vips_fits_new_read( filename, out, band_select )) ) return( -1 ); if( vips_fits_get_header( fits, out ) || vips_image_generate( out, NULL, fits2vips_generate, NULL, fits, NULL ) ) { vips_fits_close( fits ); return( -1 ); } /* Don't vips_fits_close(), we need it to stick around for the * generate. */ return( 0 ); } int vips__fits_read( const char *filename, VipsImage *out ) { VipsImage *t; int n_bands; VIPS_DEBUG_MSG( "fits2vips: reading \"%s\"\n", filename ); /* fits is naturally a band-separated format. For single-band images * we can just read out. For many bands we read each band out * separately then join them. */ t = vips_image_new(); if( vips__fits_read_header( filename, t ) ) { g_object_unref( t ); return( -1 ); } n_bands = t->Bands; g_object_unref( t ); if( n_bands == 1 ) { if( fits2vips( filename, out, 0 ) ) return( -1 ); } else { VipsImage **x; int i; t = vips_image_new(); x = (VipsImage **) vips_object_local_array( VIPS_OBJECT( t ), n_bands + 1 ); for( i = 0; i < n_bands; i++ ) { x[i] = vips_image_new(); if( fits2vips( filename, x[i], i ) ) { g_object_unref( t ); return( -1 ); } } if( vips_bandjoin( x, &x[n_bands], n_bands, NULL ) || vips_image_write( x[n_bands], out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); } return( 0 ); } int vips__fits_isfits( const char *filename ) { fitsfile *fptr; int status; VIPS_DEBUG_MSG( "isfits: testing \"%s\"\n", filename ); status = 0; if( fits_open_image( &fptr, filename, READONLY, &status ) ) { VIPS_DEBUG_MSG( "isfits: error reading \"%s\"\n", filename ); #ifdef VIPS_DEBUG vips_fits_error( status ); #endif /*VIPS_DEBUG*/ return( 0 ); } fits_close_file( fptr, &status ); return( 1 ); } static VipsFits * vips_fits_new_write( VipsImage *in, const char *filename ) { VipsFits *fits; int status; status = 0; if( !(fits = VIPS_NEW( in, VipsFits )) ) return( NULL ); fits->filename = vips_strdup( VIPS_OBJECT( in ), filename ); fits->image = in; fits->fptr = NULL; fits->lock = NULL; fits->band_select = -1; fits->buffer = NULL; g_signal_connect( in, "close", G_CALLBACK( vips_fits_close_cb ), fits ); if( !(fits->filename = vips_strdup( NULL, filename )) ) return( NULL ); /* We need to be able to hold one scanline of one band. */ if( !(fits->buffer = VIPS_ARRAY( NULL, VIPS_IMAGE_SIZEOF_ELEMENT( in ) * in->Xsize, VipsPel )) ) return( NULL ); /* fits_create_file() will fail if there's a file of thet name, unless * we put a "!" in front ofthe filename. This breaks conventions with * the rest of vips, so just unlink explicitly. */ g_unlink( filename ); if( fits_create_file( &fits->fptr, filename, &status ) ) { vips_error( "fits", _( "unable to write to \"%s\"" ), filename ); vips_fits_error( status ); return( NULL ); } fits->lock = vips_g_mutex_new(); return( fits ); } static void * vips_fits_write_meta( VipsImage *image, const char *field, GValue *value, void *a ) { VipsFits *fits = (VipsFits *) a; int status; const char *value_str; status = 0; /* We want fields which start "fits-". */ if( !vips_isprefix( "fits-", field ) ) return( NULL ); /* The value should be a refstring, since we wrote it in fits2vips * above ^^. */ value_str = vips_value_get_ref_string( value, NULL ); VIPS_DEBUG_MSG( "vips_fits_write_meta: setting meta on fits image:\n" ); VIPS_DEBUG_MSG( " value == \"%s\"\n", value_str ); if( fits_write_record( fits->fptr, value_str, &status ) ) { vips_fits_error( status ); return( a ); } return( NULL ); } static int vips_fits_set_header( VipsFits *fits, VipsImage *in ) { int status; int bitpix; int i; status = 0; fits->naxis = 3; fits->naxes[0] = in->Xsize; fits->naxes[1] = in->Ysize; fits->naxes[2] = in->Bands; for( i = 0; i < VIPS_NUMBER( fits2vips_formats ); i++ ) if( fits2vips_formats[i][1] == in->BandFmt ) break; if( i == VIPS_NUMBER( fits2vips_formats ) ) { vips_error( "fits", _( "unsupported BandFmt %d\n" ), in->BandFmt ); return( -1 ); } bitpix = fits2vips_formats[i][0]; fits->datatype = fits2vips_formats[i][2]; #ifdef VIPS_DEBUG VIPS_DEBUG_MSG( "naxis = %d\n", fits->naxis ); for( i = 0; i < fits->naxis; i++ ) VIPS_DEBUG_MSG( "%d) %lld\n", i, fits->naxes[i] ); VIPS_DEBUG_MSG( "bitpix = %d\n", bitpix ); #endif /*VIPS_DEBUG*/ if( fits_create_imgll( fits->fptr, bitpix, fits->naxis, fits->naxes, &status ) ) { vips_fits_error( status ); return( -1 ); } if( vips_image_map( in, (VipsImageMapFn) vips_fits_write_meta, fits ) ) return( -1 ); return( 0 ); } static int vips_fits_write( VipsRegion *region, VipsRect *area, void *a ) { VipsFits *fits = (VipsFits *) a; VipsImage *image = fits->image; int es = VIPS_IMAGE_SIZEOF_ELEMENT( image ); int ps = VIPS_IMAGE_SIZEOF_PEL( image ); int status; int y, b, x, k; status = 0; VIPS_DEBUG_MSG( "vips_fits_write: " "writing left = %d, top = %d, width = %d, height = %d\n", area->left, area->top, area->width, area->height ); /* We need to write a band at a time. We can't bandsplit in vips, * since vips_sink_disc() can't loop over many images at once, sadly. */ for( y = 0; y < area->height; y++ ) { VipsPel *p = VIPS_REGION_ADDR( region, area->left, area->top + y ); for( b = 0; b < image->Bands; b++ ) { VipsPel *p1, *q; long fpixel[3]; p1 = p + b * es; q = fits->buffer; for( x = 0; x < area->width; x++ ) { for( k = 0; k < es; k++ ) q[k] = p1[k]; q += es; p1 += ps; } fpixel[0] = area->left + 1; fpixel[1] = area->top + y + 1; fpixel[2] = b + 1; /* No need to lock, write functions are single-threaded. */ if( fits_write_pix( fits->fptr, fits->datatype, fpixel, area->width, fits->buffer, &status ) ) { vips_fits_error( status ); return( -1 ); } } } return( 0 ); } int vips__fits_write( VipsImage *in, const char *filename ) { VipsFits *fits; VIPS_DEBUG_MSG( "vips2fits: writing \"%s\"\n", filename ); if( !(fits = vips_fits_new_write( in, filename )) ) return( -1 ); if( vips_fits_set_header( fits, fits->image ) || vips_sink_disc( fits->image, vips_fits_write, fits ) ) { vips_fits_close( fits ); return( -1 ); } vips_fits_close( fits ); return( 0 ); } #endif /*HAVE_CFITSIO*/ vips-7.38.5/libvips/foreign/dbh.h0000644000175000017500000000777412303140253013537 00000000000000/* * * (c) Copyright, 1986-1991 * Biodynamics Research Unit * Mayo Foundation * * dbh.h * * * database sub-definitions */ /* * * The previous-generation header for Analyze images. Although (c) Mayo * Foundation, it has been in the public domain for many years. * * Analyze images have a 348 byte header stored in a file with a .hdr suffix, * and a corresponding .img file containing just the pixel data. * */ struct header_key /* header_key */ { /* off + size*/ int sizeof_hdr; /* 0 + 4 */ char data_type[10]; /* 4 + 10 */ char db_name[18]; /* 14 + 18 */ int extents; /* 32 + 4 */ short int session_error; /* 36 + 2 */ char regular; /* 38 + 1 */ char hkey_un0; /* 39 + 1 */ }; /* total=40 */ struct image_dimension /* image_dimension */ { /* off + size*/ short int dim[8]; /* 0 + 16 */ char vox_units[4]; /* 16 + 4 */ char cal_units[8]; /* 20 + 4 */ short int unused1; /* 24 + 2 */ short int datatype; /* 30 + 2 */ short int bitpix; /* 32 + 2 */ short int dim_un0; /* 34 + 2 */ float pixdim[8]; /* 36 + 32 */ /* pixdim[] specifies the voxel dimensions: pixdim[1] - voxel width pixdim[2] - voxel height pixdim[3] - interslice distance ..etc */ float vox_offset; /* 68 + 4 */ float funused1; /* 72 + 4 */ float funused2; /* 76 + 4 */ float funused3; /* 80 + 4 */ float cal_max; /* 84 + 4 */ float cal_min; /* 88 + 4 */ int compressed; /* 92 + 4 */ int verified; /* 96 + 4 */ int glmax, glmin; /* 100 + 8 */ }; struct data_history /* data_history */ { /* off + size*/ char descrip[80]; /* 0 + 80 */ char aux_file[24]; /* 80 + 24 */ char orient; /* 104 + 1 */ char originator[10]; /* 105 + 10 */ char generated[10]; /* 115 + 10 */ char scannum[10]; /* 125 + 10 */ char patient_id[10]; /* 135 + 10 */ char exp_date[10]; /* 145 + 10 */ char exp_time[10]; /* 155 + 10 */ char hist_un0[3]; /* 165 + 3 */ int views; /* 168 + 4 */ int vols_added; /* 172 + 4 */ int start_field; /* 176 + 4 */ int field_skip; /* 180 + 4 */ int omax,omin; /* 184 + 8 */ int smax,smin; /* 192 + 8 */ }; /* total=200 */ struct dsr /* dsr */ { /* off + size*/ struct header_key hk; /* 0 + 40 */ struct image_dimension dime; /* 40 + 108 */ struct data_history hist; /* 148 + 200 */ }; /* total=348 */ /* Acceptable values for hdr.dime.datatype */ /* * commented this one out: we don't use it, and dirent.h defines this on some * platforms. * #define DT_UNKNOWN 0 */ #define DT_BINARY 1 #define DT_UNSIGNED_CHAR 2 #define DT_SIGNED_SHORT 4 #define DT_SIGNED_INT 8 #define DT_FLOAT 16 #define DT_COMPLEX 32 #define DT_DOUBLE 64 #define DT_RGB 128 vips-7.38.5/libvips/foreign/matlab.c0000644000175000017500000001432012303140253014216 00000000000000/* Read matlab save files with libmatio * * 4/8/09 * - transpose on load, assemble planes into bands (thanks Mikhail) * 20/12/11 * - reworked as some fns ready for new-style classes */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Remaining issues: + it will not do complex images + it will not handle sparse matricies + it loads the first variable in the file with between 1 and 3 dimensions, is this sensible behaviour? + load only, no save */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_MATIO #include #include #include #include #include #include "matlab.h" /* What we track during a Mat-file read. */ typedef struct { char *filename; VipsImage *out; mat_t *mat; matvar_t *var; } Read; static void read_destroy( Read *read ) { VIPS_FREE( read->filename ); VIPS_FREEF( Mat_VarFree, read->var ); VIPS_FREEF( Mat_Close, read->mat ); vips_free( read ); } static Read * read_new( const char *filename, VipsImage *out ) { Read *read; if( !(read = VIPS_NEW( NULL, Read )) ) return( NULL ); read->filename = vips_strdup( NULL, filename ); read->out = out; read->mat = NULL; read->var = NULL; if( !(read->mat = Mat_Open( filename, MAT_ACC_RDONLY )) ) { vips_error( "mat2vips", _( "unable to open \"%s\"" ), filename ); read_destroy( read ); return( NULL ); } for(;;) { if( !(read->var = Mat_VarReadNextInfo( read->mat )) ) { vips_error( "mat2vips", _( "no matrix variables in \"%s\"" ), filename ); read_destroy( read ); return( NULL ); } #ifdef DEBUG printf( "mat2vips: seen:\n" ); printf( "var->name == %s\n", read->var->name ); printf( "var->class_type == %d\n", read->var->class_type ); printf( "var->rank == %d\n", read->var->rank ); #endif /*DEBUG*/ /* Vector to colour image is OK for us. */ if( read->var->rank >= 1 && read->var->rank <= 3 ) break; VIPS_FREEF( Mat_VarFree, read->var ); } return( read ); } /* Matlab classes -> VIPS band formats. */ static int mat2vips_formats[][2] = { { MAT_C_UINT8, VIPS_FORMAT_UCHAR }, { MAT_C_INT8, VIPS_FORMAT_CHAR }, { MAT_C_UINT16, VIPS_FORMAT_USHORT }, { MAT_C_INT16, VIPS_FORMAT_SHORT }, { MAT_C_UINT32, VIPS_FORMAT_UINT }, { MAT_C_INT32, VIPS_FORMAT_INT }, { MAT_C_SINGLE, VIPS_FORMAT_FLOAT }, { MAT_C_DOUBLE, VIPS_FORMAT_DOUBLE } }; static int mat2vips_get_header( matvar_t *var, VipsImage *im ) { int width, height, bands; VipsBandFormat format; VipsInterpretation interpretation; int i; height = 1; bands = 1; switch( var->rank ) { case 3: bands = var->dims[2]; case 2: height = var->dims[1]; case 1: width = var->dims[0]; break; default: vips_error( "mat2vips", _( "unsupported rank %d\n" ), var->rank ); return( -1 ); } if( bands > 1 ) interpretation = VIPS_INTERPRETATION_MULTIBAND; else interpretation = VIPS_INTERPRETATION_B_W; for( i = 0; i < VIPS_NUMBER( mat2vips_formats ); i++ ) if( mat2vips_formats[i][0] == var->class_type ) break; if( i == VIPS_NUMBER( mat2vips_formats ) ) { vips_error( "mat2vips", _( "unsupported class type %d\n" ), var->class_type ); return( -1 ); } format = mat2vips_formats[i][1]; vips_image_init_fields( im, width, height, bands, format, VIPS_CODING_NONE, interpretation, 1.0, 1.0 ); return( 0 ); } int vips__mat_header( const char *filename, VipsImage *out ) { Read *read; #ifdef DEBUG printf( "mat2vips_header: reading \"%s\"\n", filename ); #endif /*DEBUG*/ if( !(read = read_new( filename, out )) ) return( -1 ); if( mat2vips_get_header( read->var, read->out ) ) { read_destroy( read ); return( -1 ); } read_destroy( read ); return( 0 ); } static int mat2vips_get_data( mat_t *mat, matvar_t *var, VipsImage *im ) { int y; VipsPel *buffer; const int es = VIPS_IMAGE_SIZEOF_ELEMENT( im ); /* Matlab images are plane-separate, so we have to assemble bands in * image-size chunks. */ const guint64 is = es * VIPS_IMAGE_N_PELS( im ); if( Mat_VarReadDataAll( mat, var ) ) { vips_error( "mat2vips", "%s", _( "Mat_VarReadDataAll failed" ) ); return( -1 ); } /* Matlab images are in columns, so we have to transpose into * scanlines with this buffer. */ if( !(buffer = VIPS_ARRAY( im, VIPS_IMAGE_SIZEOF_LINE( im ), VipsPel )) ) return( -1 ); for( y = 0; y < im->Ysize; y++ ) { const VipsPel *p = var->data + y * es; int x; VipsPel *q; q = buffer; for( x = 0; x < im->Xsize; x++ ) { int b; for( b = 0; b < im->Bands; b++ ) { const VipsPel *p2 = p + b * is; int z; for( z = 0; z < es; z++ ) q[z] = p2[z]; q += es; } p += es * im->Ysize; } if( vips_image_write_line( im, y, buffer ) ) return( -1 ); } return( 0 ); } int vips__mat_load( const char *filename, VipsImage *out ) { Read *read; #ifdef DEBUG printf( "mat2vips: reading \"%s\"\n", filename ); #endif /*DEBUG*/ if( !(read = read_new( filename, out )) ) return( -1 ); if( mat2vips_get_header( read->var, read->out ) || mat2vips_get_data( read->mat, read->var, read->out ) ) { read_destroy( read ); return( -1 ); } read_destroy( read ); return( 0 ); } int vips__mat_ismat( const char *filename ) { mat_t *mat; vips_error_freeze(); mat = Mat_Open( filename, MAT_ACC_RDONLY ); Mat_Close( mat ); vips_error_thaw(); return( mat != NULL ); } const char *vips__mat_suffs[] = { ".mat", NULL }; #endif /*HAVE_MATIO*/ vips-7.38.5/libvips/foreign/csvload.c0000644000175000017500000001364512303140253014422 00000000000000/* load csv from a file * * 5/12/11 * - from csvload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "csv.h" typedef struct _VipsForeignLoadCsv { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; int skip; int lines; const char *whitespace; const char *separator; } VipsForeignLoadCsv; typedef VipsForeignLoadClass VipsForeignLoadCsvClass; G_DEFINE_TYPE( VipsForeignLoadCsv, vips_foreign_load_csv, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_csv_get_flags_filename( const char *filename ) { return( 0 ); } static VipsForeignFlags vips_foreign_load_csv_get_flags( VipsForeignLoad *load ) { VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load; return( vips_foreign_load_csv_get_flags_filename( csv->filename ) ); } static int vips_foreign_load_csv_header( VipsForeignLoad *load ) { VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load; if( vips__csv_read_header( csv->filename, load->out, csv->skip, csv->lines, csv->whitespace, csv->separator ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_csv_load( VipsForeignLoad *load ) { VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load; if( vips__csv_read( csv->filename, load->real, csv->skip, csv->lines, csv->whitespace, csv->separator ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_csv_class_init( VipsForeignLoadCsvClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "csvload"; object_class->description = _( "load csv from file" ); foreign_class->suffs = vips__foreign_csv_suffs; load_class->get_flags_filename = vips_foreign_load_csv_get_flags_filename; load_class->get_flags = vips_foreign_load_csv_get_flags; load_class->header = vips_foreign_load_csv_header; load_class->load = vips_foreign_load_csv_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadCsv, filename ), NULL ); VIPS_ARG_INT( class, "skip", 10, _( "Skip" ), _( "Skip this many lines at the start of the file" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadCsv, skip ), 0, 10000000, 0 ); VIPS_ARG_INT( class, "lines", 11, _( "Lines" ), _( "Read this many lines from the file" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadCsv, lines ), -1, 10000000, 0 ); VIPS_ARG_STRING( class, "whitespace", 12, _( "Whitespace" ), _( "Set of whitespace characters" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadCsv, whitespace ), " " ); VIPS_ARG_STRING( class, "separator", 13, _( "Separator" ), _( "Set of separator characters" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadCsv, separator ), ";,\t" ); } static void vips_foreign_load_csv_init( VipsForeignLoadCsv *csv ) { csv->lines = -1; csv->whitespace = g_strdup( " " ); csv->separator = g_strdup( ";,\t" ); } /** * vips_csvload: * @filename: file to load * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @skip: skip this many lines at start of file * @lines: read this many lines from file * @whitespace: set of whitespace characters * @separator: set of separator characters * * Load a CSV (comma-separated values) file. The output image is always 1 * band (monochrome), #VIPS_FORMAT_DOUBLE. * * Items in lines can be either floating point numbers in the C locale, or * strings enclosed in double-quotes ("), or empty. * You can use a backslash (\) within the quotes to escape special characters, * such as quote marks. * * The reader is deliberately rather fussy: it will fail if there are any * short lines, or if the file is too short. It will ignore lines that are * too long. * * @skip sets the number of lines to skip at the start of the file. * Default zero. * * @lines sets the number of lines to read from the file. Default -1, * meaning read all lines to end of file. * * @whitespace sets the skippable whitespace characters. * Default space. * Whitespace characters are always run together. * * @separator sets the characters that separate fields. * Default ;,tab. Separators are never run together. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_csvload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "csvload", ap, filename, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/jpegload.c0000644000175000017500000002010112303140253014535 00000000000000/* load jpeg from a file * * 24/11/11 * - wrap a class around the jpeg writer * 29/11/11 * - split to make load, load from buffer and load from file */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_JPEG #include #include #include #include #ifdef HAVE_EXIF #ifdef UNTAGGED_EXIF #include #include #include #include #else /*!UNTAGGED_EXIF*/ #include #include #include #include #endif /*UNTAGGED_EXIF*/ #endif /*HAVE_EXIF*/ #include #include #include #include "vipsjpeg.h" typedef struct _VipsForeignLoadJpeg { VipsForeignLoad parent_object; /* Shrink by this much during load. */ int shrink; /* Fail on first warning. */ gboolean fail; } VipsForeignLoadJpeg; typedef VipsForeignLoadClass VipsForeignLoadJpegClass; G_DEFINE_ABSTRACT_TYPE( VipsForeignLoadJpeg, vips_foreign_load_jpeg, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_jpeg_get_flags( VipsForeignLoad *load ) { /* The jpeg reader supports sequential read. */ return( VIPS_FOREIGN_SEQUENTIAL ); } static int vips_foreign_load_jpeg_build( VipsObject *object ) { VipsForeignLoadJpeg *jpeg = (VipsForeignLoadJpeg *) object; if( jpeg->shrink != 1 && jpeg->shrink != 2 && jpeg->shrink != 4 && jpeg->shrink != 8 ) { vips_error( "VipsFormatLoadJpeg", _( "bad shrink factor %d" ), jpeg->shrink ); return( -1 ); } if( VIPS_OBJECT_CLASS( vips_foreign_load_jpeg_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_jpeg_class_init( VipsForeignLoadJpegClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "jpegload_base"; object_class->description = _( "load jpeg" ); object_class->build = vips_foreign_load_jpeg_build; load_class->get_flags = vips_foreign_load_jpeg_get_flags; VIPS_ARG_INT( class, "shrink", 10, _( "Shrink" ), _( "Shrink factor on load" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadJpeg, shrink ), 1, 16, 1 ); VIPS_ARG_BOOL( class, "fail", 11, _( "Fail" ), _( "Fail on first warning" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadJpeg, fail ), FALSE ); } static void vips_foreign_load_jpeg_init( VipsForeignLoadJpeg *jpeg ) { jpeg->shrink = 1; } typedef struct _VipsForeignLoadJpegFile { VipsForeignLoadJpeg parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadJpegFile; typedef VipsForeignLoadJpegClass VipsForeignLoadJpegFileClass; G_DEFINE_TYPE( VipsForeignLoadJpegFile, vips_foreign_load_jpeg_file, vips_foreign_load_jpeg_get_type() ); static VipsForeignFlags vips_foreign_load_jpeg_file_get_flags_filename( const char *filename ) { /* The jpeg reader supports sequential read. */ return( VIPS_FOREIGN_SEQUENTIAL ); } static gboolean vips_foreign_load_jpeg_file_is_a( const char *filename ) { return( vips__isjpeg( filename ) ); } static int vips_foreign_load_jpeg_file_header( VipsForeignLoad *load ) { VipsForeignLoadJpeg *jpeg = (VipsForeignLoadJpeg *) load; VipsForeignLoadJpegFile *file = (VipsForeignLoadJpegFile *) load; if( vips__jpeg_read_file( file->filename, load->out, TRUE, jpeg->shrink, jpeg->fail, FALSE ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_jpeg_file_load( VipsForeignLoad *load ) { VipsForeignLoadJpeg *jpeg = (VipsForeignLoadJpeg *) load; VipsForeignLoadJpegFile *file = (VipsForeignLoadJpegFile *) load; if( vips__jpeg_read_file( file->filename, load->real, FALSE, jpeg->shrink, jpeg->fail, load->access == VIPS_ACCESS_SEQUENTIAL ) ) return( -1 ); return( 0 ); } static const char *jpeg_suffs[] = { ".jpg", ".jpeg", ".jpe", NULL }; static void vips_foreign_load_jpeg_file_class_init( VipsForeignLoadJpegFileClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "jpegload"; object_class->description = _( "load jpeg from file" ); foreign_class->suffs = jpeg_suffs; load_class->get_flags_filename = vips_foreign_load_jpeg_file_get_flags_filename; load_class->is_a = vips_foreign_load_jpeg_file_is_a; load_class->header = vips_foreign_load_jpeg_file_header; load_class->load = vips_foreign_load_jpeg_file_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadJpegFile, filename ), NULL ); } static void vips_foreign_load_jpeg_file_init( VipsForeignLoadJpegFile *file ) { } typedef struct _VipsForeignLoadJpegBuffer { VipsForeignLoadJpeg parent_object; /* Load from a buffer. */ VipsArea *buf; } VipsForeignLoadJpegBuffer; typedef VipsForeignLoadJpegClass VipsForeignLoadJpegBufferClass; G_DEFINE_TYPE( VipsForeignLoadJpegBuffer, vips_foreign_load_jpeg_buffer, vips_foreign_load_jpeg_get_type() ); static int vips_foreign_load_jpeg_buffer_header( VipsForeignLoad *load ) { VipsForeignLoadJpeg *jpeg = (VipsForeignLoadJpeg *) load; VipsForeignLoadJpegBuffer *buffer = (VipsForeignLoadJpegBuffer *) load; if( vips__jpeg_read_buffer( buffer->buf->data, buffer->buf->length, load->out, TRUE, jpeg->shrink, jpeg->fail, FALSE ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_jpeg_buffer_load( VipsForeignLoad *load ) { VipsForeignLoadJpeg *jpeg = (VipsForeignLoadJpeg *) load; VipsForeignLoadJpegBuffer *buffer = (VipsForeignLoadJpegBuffer *) load; if( vips__jpeg_read_buffer( buffer->buf->data, buffer->buf->length, load->real, FALSE, jpeg->shrink, jpeg->fail, load->access == VIPS_ACCESS_SEQUENTIAL ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_jpeg_buffer_class_init( VipsForeignLoadJpegBufferClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "jpegload_buffer"; object_class->description = _( "load jpeg from buffer" ); load_class->header = vips_foreign_load_jpeg_buffer_header; load_class->load = vips_foreign_load_jpeg_buffer_load; VIPS_ARG_BOXED( class, "buffer", 1, _( "Buffer" ), _( "Buffer to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadJpegBuffer, buf ), VIPS_TYPE_BLOB ); } static void vips_foreign_load_jpeg_buffer_init( VipsForeignLoadJpegBuffer *buffer ) { } #endif /*HAVE_JPEG*/ vips-7.38.5/libvips/foreign/magickload.c0000644000175000017500000001017012303140253015050 00000000000000/* load with libMagick * * 5/12/11 * - from openslideload.c * 17/1/12 * - remove header-only loads * 11/6/13 * - add @all_frames option, off by default */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_MAGICK #include #include #include #include #include #include #include "magick.h" typedef struct _VipsForeignLoadMagick { VipsForeignLoad parent_object; char *filename; gboolean all_frames; } VipsForeignLoadMagick; typedef VipsForeignLoadClass VipsForeignLoadMagickClass; G_DEFINE_TYPE( VipsForeignLoadMagick, vips_foreign_load_magick, VIPS_TYPE_FOREIGN_LOAD ); static gboolean ismagick( const char *filename ) { VipsImage *t; int result; t = vips_image_new(); vips_error_freeze(); result = vips__magick_read_header( filename, t, FALSE ); g_object_unref( t ); vips_error_thaw(); return( result == 0 ); } static VipsForeignFlags vips_foreign_load_magick_get_flags_filename( const char *filename ) { return( VIPS_FOREIGN_PARTIAL ); } static VipsForeignFlags vips_foreign_load_magick_get_flags( VipsForeignLoad *load ) { VipsForeignLoadMagick *magick = (VipsForeignLoadMagick *) load; return( vips_foreign_load_magick_get_flags_filename( magick->filename ) ); } /* * Unfortunately, libMagick does not support header-only reads very well. See * * http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=20017 * * Test especially with BMP, GIF, TGA. So we are forced to read the entire * image in the @header() method. */ static int vips_foreign_load_magick_header( VipsForeignLoad *load ) { VipsForeignLoadMagick *magick = (VipsForeignLoadMagick *) load; if( vips__magick_read( magick->filename, load->out, magick->all_frames ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "magickload"; object_class->description = _( "load file with ImageMagick" ); /* We need to be well to the back of the queue since the vips's * dedicated loaders are usually preferable. */ foreign_class->priority = -100; load_class->is_a = ismagick; load_class->get_flags_filename = vips_foreign_load_magick_get_flags_filename; load_class->get_flags = vips_foreign_load_magick_get_flags; load_class->header = vips_foreign_load_magick_header; load_class->load = NULL; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadMagick, filename ), NULL ); VIPS_ARG_BOOL( class, "all_frames", 3, _( "all_frames" ), _( "Read all frames from an image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadMagick, all_frames ), FALSE ); } static void vips_foreign_load_magick_init( VipsForeignLoadMagick *magick ) { } #endif /*HAVE_MAGICK*/ vips-7.38.5/libvips/foreign/webpload.c0000644000175000017500000001430012303141142014547 00000000000000/* load webp images * * 6/8/13 * - from webpload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_LIBWEBP #include #include "webp.h" typedef struct _VipsForeignLoadWebp { VipsForeignLoad parent_object; } VipsForeignLoadWebp; typedef VipsForeignLoadClass VipsForeignLoadWebpClass; G_DEFINE_ABSTRACT_TYPE( VipsForeignLoadWebp, vips_foreign_load_webp, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_webp_get_flags( VipsForeignLoad *load ) { return( 0 ); } static int vips_foreign_load_webp_build( VipsObject *object ) { if( VIPS_OBJECT_CLASS( vips_foreign_load_webp_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_webp_class_init( VipsForeignLoadWebpClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "webpload_base"; object_class->description = _( "load webp" ); object_class->build = vips_foreign_load_webp_build; load_class->get_flags = vips_foreign_load_webp_get_flags; } static void vips_foreign_load_webp_init( VipsForeignLoadWebp *webp ) { } typedef struct _VipsForeignLoadWebpFile { VipsForeignLoadWebp parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadWebpFile; typedef VipsForeignLoadWebpClass VipsForeignLoadWebpFileClass; G_DEFINE_TYPE( VipsForeignLoadWebpFile, vips_foreign_load_webp_file, vips_foreign_load_webp_get_type() ); static VipsForeignFlags vips_foreign_load_webp_file_get_flags_filename( const char *filename ) { return( 0 ); } static gboolean vips_foreign_load_webp_file_is_a( const char *filename ) { return( vips__iswebp( filename ) ); } static int vips_foreign_load_webp_file_header( VipsForeignLoad *load ) { VipsForeignLoadWebpFile *file = (VipsForeignLoadWebpFile *) load; if( vips__webp_read_file_header( file->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_webp_file_load( VipsForeignLoad *load ) { VipsForeignLoadWebpFile *file = (VipsForeignLoadWebpFile *) load; if( vips__webp_read_file( file->filename, load->real ) ) return( -1 ); return( 0 ); } const char *vips__webp_suffs[] = { ".webp", NULL }; static void vips_foreign_load_webp_file_class_init( VipsForeignLoadWebpFileClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "webpload"; object_class->description = _( "load webp from file" ); foreign_class->suffs = vips__webp_suffs; load_class->get_flags_filename = vips_foreign_load_webp_file_get_flags_filename; load_class->is_a = vips_foreign_load_webp_file_is_a; load_class->header = vips_foreign_load_webp_file_header; load_class->load = vips_foreign_load_webp_file_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadWebpFile, filename ), NULL ); } static void vips_foreign_load_webp_file_init( VipsForeignLoadWebpFile *file ) { } typedef struct _VipsForeignLoadWebpBuffer { VipsForeignLoadWebp parent_object; /* Load from a buffer. */ VipsArea *buf; } VipsForeignLoadWebpBuffer; typedef VipsForeignLoadWebpClass VipsForeignLoadWebpBufferClass; G_DEFINE_TYPE( VipsForeignLoadWebpBuffer, vips_foreign_load_webp_buffer, vips_foreign_load_webp_get_type() ); static int vips_foreign_load_webp_buffer_header( VipsForeignLoad *load ) { VipsForeignLoadWebpBuffer *buffer = (VipsForeignLoadWebpBuffer *) load; if( vips__webp_read_buffer_header( buffer->buf->data, buffer->buf->length, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_webp_buffer_load( VipsForeignLoad *load ) { VipsForeignLoadWebpBuffer *buffer = (VipsForeignLoadWebpBuffer *) load; if( vips__webp_read_buffer( buffer->buf->data, buffer->buf->length, load->real ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_webp_buffer_class_init( VipsForeignLoadWebpBufferClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "webpload_buffer"; object_class->description = _( "load webp from buffer" ); load_class->header = vips_foreign_load_webp_buffer_header; load_class->load = vips_foreign_load_webp_buffer_load; VIPS_ARG_BOXED( class, "buffer", 1, _( "Buffer" ), _( "Buffer to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadWebpBuffer, buf ), VIPS_TYPE_BLOB ); } static void vips_foreign_load_webp_buffer_init( VipsForeignLoadWebpBuffer *buffer ) { } #endif /*HAVE_LIBWEBP*/ vips-7.38.5/libvips/foreign/vipsjpeg.h0000644000175000017500000000347612303140253014624 00000000000000/* simple interface to our jpg functions */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_VIPSJPEG_H #define VIPS_VIPSJPEG_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ extern const char *vips__jpeg_suffs[]; int vips__jpeg_write_file( VipsImage *in, const char *filename, int Q, const char *profile, gboolean optimize_coding, gboolean progressive, gboolean strip, gboolean no_subsample ); int vips__jpeg_write_buffer( VipsImage *in, void **obuf, size_t *olen, int Q, const char *profile, gboolean optimize_coding, gboolean progressive, gboolean strip, gboolean no_subsample ); int vips__isjpeg( const char *filename ); int vips__jpeg_read_file( const char *name, VipsImage *out, gboolean header_only, int shrink, gboolean fail, gboolean readbehind ); int vips__jpeg_read_buffer( void *buf, size_t len, VipsImage *out, gboolean header_only, int shrink, int fail, gboolean readbehind ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_VIPSJPEG_H*/ vips-7.38.5/libvips/foreign/matload.c0000644000175000017500000000701712303140253014404 00000000000000/* load matlab from a file * * 5/12/11 * - from tiffload.c * 3/7/13 * - lower priority to reduce segvs from Mat_Open() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_MATIO #include #include #include #include #include #include #include "matlab.h" typedef struct _VipsForeignLoadMat { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadMat; typedef VipsForeignLoadClass VipsForeignLoadMatClass; G_DEFINE_TYPE( VipsForeignLoadMat, vips_foreign_load_mat, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_mat_get_flags_filename( const char *filename ) { return( 0 ); } static VipsForeignFlags vips_foreign_load_mat_get_flags( VipsForeignLoad *load ) { VipsForeignLoadMat *mat = (VipsForeignLoadMat *) load; return( vips_foreign_load_mat_get_flags_filename( mat->filename ) ); } static int vips_foreign_load_mat_header( VipsForeignLoad *load ) { VipsForeignLoadMat *mat = (VipsForeignLoadMat *) load; if( vips__mat_header( mat->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_mat_load( VipsForeignLoad *load ) { VipsForeignLoadMat *mat = (VipsForeignLoadMat *) load; if( vips__mat_load( mat->filename, load->real ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_mat_class_init( VipsForeignLoadMatClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "matload"; object_class->description = _( "load mat from file" ); foreign_class->suffs = vips__mat_suffs; /* We need to be lower priority than the jpeg loader, since some jpegs * can make libmatio segv on Mat_Open(). */ foreign_class->priority = -50; load_class->is_a = vips__mat_ismat; load_class->get_flags_filename = vips_foreign_load_mat_get_flags_filename; load_class->get_flags = vips_foreign_load_mat_get_flags; load_class->header = vips_foreign_load_mat_header; load_class->load = vips_foreign_load_mat_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadMat, filename ), NULL ); } static void vips_foreign_load_mat_init( VipsForeignLoadMat *mat ) { } #endif /*HAVE_MATIO*/ vips-7.38.5/libvips/foreign/tiff2vips.c0000644000175000017500000011550412303140253014700 00000000000000/* TIFF parts: Copyright (c) 1988, 1990 by Sam Leffler. * All rights reserved. * * This file is provided for unrestricted use provided that this * legend is included on all tape media and as a part of the * software program in whole or part. Users may copy, modify or * distribute this file at will. * ----------------------------- * Modifications for VIPS: Kirk Martinez 1994 * 22/11/94 JC * - more general * - memory leaks fixed * 20/3/95 JC * - TIFF error handler added * - read errors detected correctly * * Modified to handle LAB in tiff format. * It convert LAB-tiff format to VIPS_INTERPRETATION_LABQ in vips format. * Copyright July-1995 Ahmed Abbood. * * * 19/9/95 JC * - now calls TIFFClose ... stupid * 25/1/96 JC * - typo on MINISBLACK ... * 7/4/97 JC * - completely redone for TIFF 6 * - now full baseline TIFF 6 reader, and does CIELAB as well * 11/4/97 JC * - added partial read for tiled images * 23/4/97 JC * - extra subsample parameter * - im_istiffpyramid() added * 5/12/97 JC * - if loading YCbCr, convert to VIPS_CODING_LABQ * 1/5/98 JC * - now reads 16-bit greyscale and RGB * 26/10/98 JC * - now used "rb" mode on systems that need binary open * 12/11/98 JC * - no sub-sampling if sub == 1 * 26/2/99 JC * - ooops, else missing for subsample stuff above * 2/10/99 JC * - tiled 16-bit greyscale read was broken * - added mutex for TIFFReadTile() calls * 11/5/00 JC * - removed TIFFmalloc/TIFFfree usage * 23/4/01 JC * - HAVE_TIFF turns on TIFF goodness * 24/5/01 JC * - im_tiff2vips_header() added * 11/7/01 JC * - subsample now in input filename * - ... and it's a page number (from 0) instead * 21/8/02 JC * - now reads CMYK * - hmm, dpi -> ppm conversion was wrong! * 10/9/02 JC * - oops, handle TIFF errors better * 2/12/02 JC * - reads 8-bit RGBA * 12/12/02 JC * - reads 16-bit LAB * 13/2/03 JC * - pixels/cm res read was wrong * 17/11/03 Andrey Kiselev * - read 32-bit float greyscale and rgb * 5/4/04 * - better handling of edge tiles (thanks Ruven) * 16/4/04 * - cleanup * - added broken tile read mode * 18/5/04 Andrey Kiselev * - better no resolution diagnostic * 26/5/04 * - reads 16 bit RGBA * 28/7/04 * - arrg, 16bit RGB was broken, thanks haida * 26/11/04 * - add a TIFF warning handler, stops occasional libMagick exceptions * 9/3/05 * - load 32-bit float LAB * 8/4/05 * - onebit read no longer reads one byte too many on multiple of 8 wide * images * 22/6/05 * - 16 bit LAB read was broken * 9/9/05 * - read any ICCPROFILE tag * 8/5/06 * - set RGB16 and GREY16 Type * 21/5/06 * - use external im_tile_cache() operation for great code shrinkage * - less RAM usage too, esp. with >1 CPU * - should be slightly faster * - removed 'broken' read option * 18/7/07 Andrey Kiselev * - remove "b" option on TIFFOpen() * 9/4/08 * - set VIPS_META_RESOLUTION_UNIT * 17/4/08 * - allow CMYKA (thanks Doron) * 17/7/08 * - convert YCbCr to RGB on read (thanks Ole) * 15/8/08 * - reorganise for image format system * 20/12/08 * - dont read with mmap: no performance advantage with libtiff, chews up * VM wastefully * 13/1/09 * - read strip-wise, not scanline-wise ... works with more compression / * subsampling schemes (esp. subsampled YCbCr), and it's a bit quicker * 4/2/10 * - gtkdoc * 12/12/10 * - oops, we can just memcpy() now heh * - avoid unpacking via buffers if we can: either read a tile directly * into the output region, or writeline directly from the tiff buffer * 4/4/11 * - argh int/uint mixup for rows_per_strip, thanks Bubba * 21/4/11 * - palette read can do 1,2,4,8 bits per sample * - palette read can do mono images * 5/12/11 * - make into a simple function call ready to be wrapped as a new-style * VipsForeign class * 18/2/12 * - switch to sequential read * - remove the lock ... tilecache does this for us * 3/6/12 * - always offer THINSTRIP ... later stages can ask for something more * relaxed if they wish * 7/6/12 * - clip rows_per_strip down to image height to avoid overflows for huge * values (thanks Nicolas) * - better error msg for not PLANARCONFIG_CONTIG images * 16/9/13 * - support alpha for 8, 16 and 32-bit greyscale images, thanks Robert * 17/9/13 * - support separate planes for strip read * - big cleanup * - support for many more formats, eg. 32-bit int etc. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_TIFF #include #include #include #include #include #include #include #include "tiff.h" /* Scanline-type process function. */ struct _ReadTiff; typedef void (*scanline_process_fn)( struct _ReadTiff *, VipsPel *q, VipsPel *p, int n, void *client ); /* Stuff we track during a read. */ typedef struct _ReadTiff { /* Parameters. */ char *filename; VipsImage *out; int page; gboolean readbehind; /* The TIFF we read. */ TIFF *tiff; /* Process for this image type. */ scanline_process_fn sfn; void *client; /* Set this is the processfn is just doing a memcpy. */ gboolean memcpy; /* Geometry. */ uint32 twidth, theight; /* Tile size */ uint32 rows_per_strip; tsize_t scanline_size; tsize_t strip_size; int number_of_strips; int samples_per_pixel; int bits_per_sample; int photometric_interpretation; int sample_format; /* Turn on separate plane reading. */ gboolean separate; /* Hold a single strip or tile, possibly just an image plane. */ tdata_t plane_buf; /* Hold a plane-assembled strip or tile ... a set of samples_per_pixel * strips or tiles interleaved. */ tdata_t contig_buf; } ReadTiff; /* Handle TIFF errors here. Shared with vips2tiff.c. These can be called from * more than one thread, but vips_error and vips_warn have mutexes in, so that's * OK. */ static void vips__thandler_error( const char *module, const char *fmt, va_list ap ) { vips_verror( module, fmt, ap ); } static void vips__thandler_warning( const char *module, const char *fmt, va_list ap ) { char buf[256]; vips_vsnprintf( buf, 256, fmt, ap ); vips_warn( module, "%s", buf ); } /* Call this during startup. Other libraries may be using libtiff and we want * to capture any messages they send as well. */ void vips__tiff_init( void ) { TIFFSetErrorHandler( vips__thandler_error ); TIFFSetWarningHandler( vips__thandler_warning ); } /* Test for field exists. */ static int tfexists( TIFF *tif, ttag_t tag ) { uint32 a, b; if( TIFFGetField( tif, tag, &a, &b ) ) return( 1 ); else return( 0 ); } /* Get a uint32 field. */ static int tfget32( TIFF *tif, ttag_t tag, uint32 *out ) { uint32 fld; if( !TIFFGetFieldDefaulted( tif, tag, &fld ) ) { vips_error( "tiff2vips", _( "required field %d missing" ), tag ); return( 0 ); } *out = fld; return( 1 ); } /* Get a uint16 field. */ static int tfget16( TIFF *tif, ttag_t tag, int *out ) { uint16 fld; if( !TIFFGetFieldDefaulted( tif, tag, &fld ) ) { vips_error( "tiff2vips", _( "required field %d missing" ), tag ); return( 0 ); } *out = fld; return( 1 ); } static int check_samples( ReadTiff *rtiff, int samples_per_pixel ) { if( rtiff->samples_per_pixel != samples_per_pixel ) { vips_error( "tiff2vips", _( "not %d bands" ), samples_per_pixel ); return( -1 ); } return( 0 ); } /* Check n and n+1 so we can have an alpha. */ static int check_min_samples( ReadTiff *rtiff, int samples_per_pixel ) { if( rtiff->samples_per_pixel < samples_per_pixel ) { vips_error( "tiff2vips", _( "not at least %d samples per pixel" ), samples_per_pixel ); return( -1 ); } return( 0 ); } static int check_interpretation( ReadTiff *rtiff, int photometric_interpretation ) { if( rtiff->photometric_interpretation != photometric_interpretation ) { vips_error( "tiff2vips", _( "not photometric interpretation %d" ), photometric_interpretation ); return( -1 ); } return( 0 ); } static int check_bits( ReadTiff *rtiff, int bits_per_sample ) { if( rtiff->bits_per_sample != bits_per_sample ) { vips_error( "tiff2vips", _( "not %d bits per sample" ), bits_per_sample ); return( -1 ); } return( 0 ); } static int check_bits_palette( ReadTiff *rtiff ) { if( rtiff->bits_per_sample != 8 && rtiff->bits_per_sample != 4 && rtiff->bits_per_sample != 2 && rtiff->bits_per_sample != 1 ) { vips_error( "tiff2vips", _( "%d bits per sample palette image not supported" ), rtiff->bits_per_sample ); return( -1 ); } return( 0 ); } static VipsBandFormat guess_format( ReadTiff *rtiff ) { switch( rtiff->bits_per_sample ) { case 1: case 2: case 4: case 8: if( rtiff->sample_format == SAMPLEFORMAT_INT ) return( VIPS_FORMAT_CHAR ); if( rtiff->sample_format == SAMPLEFORMAT_UINT ) return( VIPS_FORMAT_UCHAR ); break; case 16: if( rtiff->sample_format == SAMPLEFORMAT_INT ) return( VIPS_FORMAT_SHORT ); if( rtiff->sample_format == SAMPLEFORMAT_UINT ) return( VIPS_FORMAT_USHORT ); break; case 32: if( rtiff->sample_format == SAMPLEFORMAT_INT ) return( VIPS_FORMAT_INT ); if( rtiff->sample_format == SAMPLEFORMAT_UINT ) return( VIPS_FORMAT_UINT ); if( rtiff->sample_format == SAMPLEFORMAT_IEEEFP ) return( VIPS_FORMAT_FLOAT ); break; case 64: if( rtiff->sample_format == SAMPLEFORMAT_IEEEFP ) return( VIPS_FORMAT_DOUBLE ); if( rtiff->sample_format == SAMPLEFORMAT_COMPLEXIEEEFP ) return( VIPS_FORMAT_COMPLEX ); break; case 128: if( rtiff->sample_format == SAMPLEFORMAT_COMPLEXIEEEFP ) return( VIPS_FORMAT_DPCOMPLEX ); break; default: break; } vips_error( "tiff2vips", "%s", _( "unsupported tiff image type\n" ) ); return( VIPS_FORMAT_NOTSET ); } /* Per-scanline process function for VIPS_CODING_LABQ. */ static void labpack_line( ReadTiff *rtiff, VipsPel *q, VipsPel *p, int n, void *dummy ) { int x; for( x = 0; x < n; x++ ) { q[0] = p[0]; q[1] = p[1]; q[2] = p[2]; q[3] = 0; q += 4; p += rtiff->samples_per_pixel; } } /* Read an 8-bit LAB image. */ static int parse_labpack( ReadTiff *rtiff, VipsImage *out ) { if( check_min_samples( rtiff, 3 ) || check_bits( rtiff, 8 ) || check_interpretation( rtiff, PHOTOMETRIC_CIELAB ) ) return( -1 ); out->Bands = 4; out->BandFmt = VIPS_FORMAT_UCHAR; out->Coding = VIPS_CODING_LABQ; out->Type = VIPS_INTERPRETATION_LAB; rtiff->sfn = labpack_line; return( 0 ); } /* Per-scanline process function for LABS. */ static void labs_line( ReadTiff *rtiff, VipsPel *q, VipsPel *p, int n, void *dummy ) { int x; unsigned short *p1 = (unsigned short *) p; short *q1 = (short *) q; int i; for( x = 0; x < n; x++ ) { /* We use a signed int16 for L. */ q1[0] = p1[0] >> 1; for( i = 1; i < rtiff->samples_per_pixel; i++ ) q1[i] = p1[i]; q1 += rtiff->samples_per_pixel; p1 += rtiff->samples_per_pixel; } } /* Read a 16-bit LAB image. */ static int parse_labs( ReadTiff *rtiff, VipsImage *out ) { if( check_min_samples( rtiff, 3 ) || check_bits( rtiff, 16 ) || check_interpretation( rtiff, PHOTOMETRIC_CIELAB ) ) return( -1 ); out->Bands = rtiff->samples_per_pixel; out->BandFmt = VIPS_FORMAT_SHORT; out->Coding = VIPS_CODING_NONE; out->Type = VIPS_INTERPRETATION_LABS; rtiff->sfn = labs_line; return( 0 ); } /* Per-scanline process function for 1 bit images. */ static void onebit_line( ReadTiff *rtiff, VipsPel *q, VipsPel *p, int n, void *flg ) { int x, i, z; VipsPel bits; int black = rtiff->photometric_interpretation == PHOTOMETRIC_MINISBLACK ? 0 : 255; int white = black ^ 0xff; /* (sigh) how many times have I written this? */ x = 0; for( i = 0; i < (n >> 3); i++ ) { bits = (VipsPel) p[i]; for( z = 0; z < 8; z++ ) { q[x] = (bits & 128) ? white : black; bits <<= 1; x += 1; } } /* Do last byte in line. */ if( n & 7 ) { bits = p[i]; for( z = 0; z < (n & 7); z++ ) { q[x + z] = (bits & 128) ? white : black; bits <<= 1; } } } /* Read a 1-bit TIFF image. */ static int parse_onebit( ReadTiff *rtiff, VipsImage *out ) { if( check_samples( rtiff, 1 ) || check_bits( rtiff, 1 ) ) return( -1 ); out->Bands = 1; out->BandFmt = VIPS_FORMAT_UCHAR; out->Coding = VIPS_CODING_NONE; out->Type = VIPS_INTERPRETATION_B_W; rtiff->sfn = onebit_line; return( 0 ); } /* Swap the sense of the first channel, if necessary. */ #define GREY_LOOP( TYPE, MAX ) { \ TYPE *p1; \ TYPE *q1; \ \ p1 = (TYPE *) p; \ q1 = (TYPE *) q; \ for( x = 0; x < n; x++ ) { \ if( invert ) \ q1[0] = MAX - p1[0]; \ else \ q1[0] = p1[0]; \ \ for( i = 1; i < rtiff->samples_per_pixel; i++ ) \ q1[i] = p1[i]; \ \ q1 += rtiff->samples_per_pixel; \ p1 += rtiff->samples_per_pixel; \ } \ } /* Per-scanline process function for greyscale images. */ static void greyscale_line( ReadTiff *rtiff, VipsPel *q, VipsPel *p, int n, void *client ) { gboolean invert = rtiff->photometric_interpretation == PHOTOMETRIC_MINISWHITE; VipsBandFormat format = guess_format( rtiff ); int x, i; switch( format ) { case VIPS_FORMAT_UCHAR: case VIPS_FORMAT_CHAR: GREY_LOOP( guchar, UCHAR_MAX ); break; case VIPS_FORMAT_SHORT: GREY_LOOP( gshort, SHRT_MAX ); break; case VIPS_FORMAT_USHORT: GREY_LOOP( gushort, USHRT_MAX ); break; case VIPS_FORMAT_INT: GREY_LOOP( gint, INT_MAX ); break; case VIPS_FORMAT_UINT: GREY_LOOP( guint, UINT_MAX ); break; case VIPS_FORMAT_FLOAT: GREY_LOOP( float, 1.0 ); break; case VIPS_FORMAT_DOUBLE: GREY_LOOP( double, 1.0 ); break; default: g_assert( 0 ); } } /* Read a grey-scale TIFF image. We have to invert the first band if * PHOTOMETRIC_MINISBLACK is set. */ static int parse_greyscale( ReadTiff *rtiff, VipsImage *out ) { if( check_min_samples( rtiff, 1 ) ) return( -1 ); out->Bands = rtiff->samples_per_pixel; if( (out->BandFmt = guess_format( rtiff )) == VIPS_FORMAT_NOTSET ) return( -1 ); out->Coding = VIPS_CODING_NONE; if( rtiff->bits_per_sample == 16 ) out->Type = VIPS_INTERPRETATION_GREY16; else out->Type = VIPS_INTERPRETATION_B_W; /* greyscale_line() doesn't do complex. */ if( vips_check_noncomplex( "tiff2vips", out ) ) return( -1 ); rtiff->sfn = greyscale_line; return( 0 ); } typedef struct { /* LUTs mapping image indexes to RGB. */ VipsPel *red; VipsPel *green; VipsPel *blue; /* All maps equal, so we write mono. */ gboolean mono; } PaletteRead; /* Per-scanline process function for palette images. */ static void palette_line( ReadTiff *rtiff, VipsPel *q, VipsPel *p, int n, void *client ) { PaletteRead *read = (PaletteRead *) client; int bit; VipsPel data; int x; bit = 0; data = 0; for( x = 0; x < n; x++ ) { int i; if( bit <= 0 ) { data = *p++; bit = 8; } i = data >> (8 - rtiff->bits_per_sample); data <<= rtiff->bits_per_sample; bit -= rtiff->bits_per_sample; if( read->mono ) { q[0] = read->red[i]; q += 1; } else { q[0] = read->red[i]; q[1] = read->green[i]; q[2] = read->blue[i]; q += 3; } } } /* Read a palette-ised TIFF image. 1/2/4/8 bits only. */ static int parse_palette( ReadTiff *rtiff, VipsImage *out ) { PaletteRead *read; uint16 *tred, *tgreen, *tblue; int i; if( check_bits_palette( rtiff ) || check_samples( rtiff, 1 ) ) return( -1 ); if( !(read = VIPS_NEW( out, PaletteRead )) || !(read->red = VIPS_ARRAY( out, 256, VipsPel )) || !(read->green = VIPS_ARRAY( out, 256, VipsPel )) || !(read->blue = VIPS_ARRAY( out, 256, VipsPel )) ) return( -1 ); /* Get maps, convert to 8-bit data. */ if( !TIFFGetField( rtiff->tiff, TIFFTAG_COLORMAP, &tred, &tgreen, &tblue ) ) { vips_error( "tiff2vips", "%s", _( "bad colormap" ) ); return( -1 ); } for( i = 0; i < (1 << rtiff->bits_per_sample); i++ ) { read->red[i] = tred[i] >> 8; read->green[i] = tgreen[i] >> 8; read->blue[i] = tblue[i] >> 8; } /* Are all the maps equal? We have a mono image. */ read->mono = TRUE; for( i = 0; i < (1 << rtiff->bits_per_sample); i++ ) if( read->red[i] != read->green[i] || read->green[i] != read->blue[i] ) { read->mono = FALSE; break; } /* There's a TIFF extension, INDEXED, that is the preferred way to * encode mono palette images, but few applications support it. So we * just search the colormap. */ out->BandFmt = VIPS_FORMAT_UCHAR; out->Coding = VIPS_CODING_NONE; if( read->mono ) { out->Bands = 1; out->Type = VIPS_INTERPRETATION_B_W; } else { out->Bands = 3; out->Type = VIPS_INTERPRETATION_sRGB; } rtiff->client = read; rtiff->sfn = palette_line; return( 0 ); } /* Per-scanline process function when we just need to copy. */ static void memcpy_line( ReadTiff *rtiff, VipsPel *q, VipsPel *p, int n, void *client ) { VipsImage *im = (VipsImage *) client; size_t len = n * VIPS_IMAGE_SIZEOF_PEL( im ); memcpy( q, p, len ); } /* Read a regular multiband image where we can just copy pixels from the tiff * buffer. */ static int parse_copy( ReadTiff *rtiff, VipsImage *out ) { out->Bands = rtiff->samples_per_pixel; if( (out->BandFmt = guess_format( rtiff )) == VIPS_FORMAT_NOTSET ) return( -1 ); out->Coding = VIPS_CODING_NONE; if( rtiff->samples_per_pixel >= 3 && (rtiff->photometric_interpretation == PHOTOMETRIC_RGB || rtiff->photometric_interpretation == PHOTOMETRIC_YCBCR) ) { if( rtiff->bits_per_sample == 16 ) out->Type = VIPS_INTERPRETATION_RGB16; else out->Type = VIPS_INTERPRETATION_sRGB; } if( rtiff->samples_per_pixel >= 3 && rtiff->photometric_interpretation == PHOTOMETRIC_CIELAB ) out->Type = VIPS_INTERPRETATION_LAB; if( rtiff->samples_per_pixel >= 4 && rtiff->photometric_interpretation == PHOTOMETRIC_SEPARATED ) out->Type = VIPS_INTERPRETATION_CMYK; rtiff->sfn = memcpy_line; rtiff->client = out; rtiff->memcpy = TRUE; return( 0 ); } /* Read resolution from a TIFF image. */ static int parse_resolution( TIFF *tiff, VipsImage *out ) { float x, y; int ru; if( TIFFGetFieldDefaulted( tiff, TIFFTAG_XRESOLUTION, &x ) && TIFFGetFieldDefaulted( tiff, TIFFTAG_YRESOLUTION, &y ) && tfget16( tiff, TIFFTAG_RESOLUTIONUNIT, &ru ) ) { switch( ru ) { case RESUNIT_NONE: break; case RESUNIT_INCH: /* In pixels-per-inch ... convert to mm. */ x /= 10.0 * 2.54; y /= 10.0 * 2.54; vips_image_set_string( out, VIPS_META_RESOLUTION_UNIT, "in" ); break; case RESUNIT_CENTIMETER: /* In pixels-per-centimetre ... convert to mm. */ x /= 10.0; y /= 10.0; vips_image_set_string( out, VIPS_META_RESOLUTION_UNIT, "cm" ); break; default: vips_error( "tiff2vips", "%s", _( "unknown resolution unit" ) ); return( -1 ); } } else { vips_warn( "tiff2vips", _( "no resolution information for " "TIFF image \"%s\" -- defaulting to 1 pixel per mm" ), TIFFFileName( tiff ) ); x = 1.0; y = 1.0; } out->Xres = x; out->Yres = y; return( 0 ); } typedef int (*reader_fn)( ReadTiff *rtiff, VipsImage *out ); /* We have a range of output paths. Look at the tiff header and try to * route the input image to the best output path. */ static reader_fn pick_reader( ReadTiff *rtiff ) { if( rtiff->photometric_interpretation == PHOTOMETRIC_CIELAB ) { if( rtiff->bits_per_sample == 8 ) return( parse_labpack ); if( rtiff->bits_per_sample == 16 ) return( parse_labs ); } if( rtiff->photometric_interpretation == PHOTOMETRIC_MINISWHITE || rtiff->photometric_interpretation == PHOTOMETRIC_MINISBLACK ) { if( rtiff->bits_per_sample == 1 ) return( parse_onebit ); else return( parse_greyscale ); } if( rtiff->photometric_interpretation == PHOTOMETRIC_PALETTE ) return( parse_palette ); if( rtiff->photometric_interpretation == PHOTOMETRIC_YCBCR ) { /* Sometimes JPEG in TIFF images are tagged as YCBCR. Ask * libtiff to convert to RGB for us. */ TIFFSetField( rtiff->tiff, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB ); } return( parse_copy ); } /* Look at PhotometricInterpretation and BitsPerPixel and try to figure out * which of the image classes this is. */ static int parse_header( ReadTiff *rtiff, VipsImage *out ) { uint32 data_length; uint32 width, height; void *data; if( tfexists( rtiff->tiff, TIFFTAG_PLANARCONFIG ) ) { int v; tfget16( rtiff->tiff, TIFFTAG_PLANARCONFIG, &v ); if( v == PLANARCONFIG_SEPARATE ) rtiff->separate = TRUE; } /* We always need dimensions. */ if( !tfget32( rtiff->tiff, TIFFTAG_IMAGEWIDTH, &width ) || !tfget32( rtiff->tiff, TIFFTAG_IMAGELENGTH, &height ) || parse_resolution( rtiff->tiff, out ) || !tfget16( rtiff->tiff, TIFFTAG_SAMPLESPERPIXEL, &rtiff->samples_per_pixel ) || !tfget16( rtiff->tiff, TIFFTAG_BITSPERSAMPLE, &rtiff->bits_per_sample ) || !tfget16( rtiff->tiff, TIFFTAG_PHOTOMETRIC, &rtiff->photometric_interpretation ) ) return( -1 ); /* Some optional fields. */ { uint16 v; TIFFGetFieldDefaulted( rtiff->tiff, TIFFTAG_SAMPLEFORMAT, &v ); /* Some images have this set to void, bizarre. */ if( v == SAMPLEFORMAT_VOID ) v = SAMPLEFORMAT_UINT; rtiff->sample_format = v; } /* Arbitrary sanity-checking limits. */ if( width <= 0 || width > 1000000 || height <= 0 || height > 1000000 ) { vips_error( "tiff2vips", "%s", _( "width/height out of range" ) ); return( -1 ); } if( rtiff->samples_per_pixel <= 0 || rtiff->samples_per_pixel > 10000 || rtiff->bits_per_sample <= 0 || rtiff->bits_per_sample > 32 ) { vips_error( "tiff2vips", "%s", _( "samples out of range" ) ); return( -1 ); } out->Xsize = width; out->Ysize = height; #ifdef DEBUG printf( "parse_header: samples_per_pixel = %d\n", rtiff->samples_per_pixel ); printf( "parse_header: bits_per_sample = %d\n", rtiff->bits_per_sample ); printf( "parse_header: sample_format = %d\n", rtiff->sample_format ); #endif /*DEBUG*/ /* We have a range of output paths. Look at the tiff header and try to * route the input image to the best output path. */ if( pick_reader( rtiff )( rtiff, out ) ) return( -1 ); /* Read any ICC profile. */ if( TIFFGetField( rtiff->tiff, TIFFTAG_ICCPROFILE, &data_length, &data ) ) { void *data_copy; if( !(data_copy = vips_malloc( NULL, data_length )) ) return( -1 ); memcpy( data_copy, data, data_length ); vips_image_set_blob( out, VIPS_META_ICC_NAME, (VipsCallbackFn) vips_free, data_copy, data_length ); } return( 0 ); } /* The size of the buffer written by TIFFReadTile(). We can't use * TIFFTileSize() since that ignores the setting of TIFFTAG_JPEGCOLORMODE. If * this pseudo tag has been set and the tile is encoded with YCbCr, the tile * is returned with chrominance upsampled. * * This seems not to happen for old-style jpeg-compressed tiles. */ static size_t tiff_tile_size( ReadTiff *rtiff ) { return( TIFFTileRowSize( rtiff->tiff ) * rtiff->theight ); } /* Allocate a tile buffer. Have one of these for each thread so we can unpack * to vips in parallel. */ static void * tiff_seq_start( VipsImage *out, void *a, void *b ) { ReadTiff *rtiff = (ReadTiff *) a; tsize_t size; tdata_t *buf; size = tiff_tile_size( rtiff ); if( !(buf = vips_malloc( NULL, size )) ) return( NULL ); return( (void *) buf ); } /* Paint a tile from the file. This is a * special-case for a region is exactly a tiff tile, and pixels need no * conversion. In this case, libtiff can read tiles directly to our output * region. */ static int tiff_fill_region_aligned( VipsRegion *out, void *seq, void *a, void *b ) { ReadTiff *rtiff = (ReadTiff *) a; VipsRect *r = &out->valid; g_assert( (r->left % rtiff->twidth) == 0 ); g_assert( (r->top % rtiff->theight) == 0 ); g_assert( r->width == rtiff->twidth ); g_assert( r->height == rtiff->theight ); g_assert( VIPS_REGION_LSKIP( out ) == VIPS_REGION_SIZEOF_LINE( out ) ); #ifdef DEBUG printf( "tiff_fill_region_aligned: left = %d, top = %d\n", r->left, r->top ); #endif /*DEBUG*/ VIPS_GATE_START( "tiff_fill_region_aligned: work" ); /* Read that tile directly into the vips tile. */ if( TIFFReadTile( rtiff->tiff, VIPS_REGION_ADDR( out, r->left, r->top ), r->left, r->top, 0, 0 ) < 0 ) { VIPS_GATE_STOP( "tiff_fill_region_aligned: work" ); return( -1 ); } VIPS_GATE_STOP( "tiff_fill_region_aligned: work" ); return( 0 ); } /* Loop over the output region painting in tiles from the file. */ static int tiff_fill_region( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) { tdata_t *buf = (tdata_t *) seq; ReadTiff *rtiff = (ReadTiff *) a; VipsRect *r = &out->valid; /* Find top left of tiles we need. */ int xs = (r->left / rtiff->twidth) * rtiff->twidth; int ys = (r->top / rtiff->theight) * rtiff->theight; /* Sizeof a line of bytes in the TIFF tile. */ int tls = tiff_tile_size( rtiff ) / rtiff->theight; /* Sizeof a pel in the TIFF file. This won't work for formats which * are <1 byte per pel, like onebit :-( Fortunately, it's only used * to calculate addresses within a tile and, because we are wrapped in * vips_tilecache(), we will never have to calculate positions not * within a tile. */ int tps = tls / rtiff->twidth; int x, y, z; /* Special case: we are filling a single tile exactly sized to match * the tiff tile and we have no repacking to do for this format. */ if( rtiff->memcpy && r->left % rtiff->twidth == 0 && r->top % rtiff->theight == 0 && r->width == rtiff->twidth && r->height == rtiff->theight && VIPS_REGION_LSKIP( out ) == VIPS_REGION_SIZEOF_LINE( out ) ) return( tiff_fill_region_aligned( out, seq, a, b ) ); VIPS_GATE_START( "tiff_fill_region: work" ); for( y = ys; y < VIPS_RECT_BOTTOM( r ); y += rtiff->theight ) for( x = xs; x < VIPS_RECT_RIGHT( r ); x += rtiff->twidth ) { VipsRect tile; VipsRect hit; /* Read that tile. */ if( TIFFReadTile( rtiff->tiff, buf, x, y, 0, 0 ) < 0 ) { VIPS_GATE_STOP( "tiff_fill_region: work" ); return( -1 ); } /* The tile we read. */ tile.left = x; tile.top = y; tile.width = rtiff->twidth; tile.height = rtiff->theight; /* The section that hits the region we are building. */ vips_rect_intersectrect( &tile, r, &hit ); /* Unpack to VIPS format. * Just unpack the section of the tile we need. */ for( z = 0; z < hit.height; z++ ) { VipsPel *p = (VipsPel *) buf + (hit.left - tile.left) * tps + (hit.top - tile.top + z) * tls; VipsPel *q = VIPS_REGION_ADDR( out, hit.left, hit.top + z ); rtiff->sfn( rtiff, q, p, hit.width, rtiff->client ); } } VIPS_GATE_STOP( "tiff_fill_region: work" ); return( 0 ); } static int tiff_seq_stop( void *seq, void *a, void *b ) { vips_free( seq ); return( 0 ); } /* Tile-type TIFF reader core - pass in a per-tile transform. Generate into * the im and do it all partially. */ static int read_tilewise( ReadTiff *rtiff, VipsImage *out ) { VipsImage *raw; VipsImage *t; #ifdef DEBUG printf( "tiff2vips: read_tilewise\n" ); #endif /*DEBUG*/ /* I don't have a sample images for tiled + separate, ban it for now. */ if( rtiff->separate ) { vips_error( "tiff2vips", "%s", _( "tiled separate planes not supported" ) ); return( -1 ); } /* Get tiling geometry. */ if( !tfget32( rtiff->tiff, TIFFTAG_TILEWIDTH, &rtiff->twidth ) || !tfget32( rtiff->tiff, TIFFTAG_TILELENGTH, &rtiff->theight ) ) return( -1 ); /* Read to this image, then cache to out, see below. */ raw = vips_image_new(); vips_object_local( out, raw ); /* Parse the TIFF header and set up raw. */ if( parse_header( rtiff, raw ) ) return( -1 ); /* Double check: in memcpy mode, the vips tilesize should exactly * match the tifftile size. */ if( rtiff->memcpy ) { size_t vips_tile_size; vips_tile_size = VIPS_IMAGE_SIZEOF_PEL( raw ) * rtiff->twidth * rtiff->theight; if( tiff_tile_size( rtiff ) != vips_tile_size ) { vips_error( "tiff2vips", "%s", _( "unsupported tiff image type" ) ); return( -1 ); } } /* Even though this is a tiled reader, we hint thinstrip since with * the cache we are quite happy serving that if anything downstream * would like it. */ vips_image_pipelinev( raw, VIPS_DEMAND_STYLE_THINSTRIP, NULL ); if( vips_image_generate( raw, tiff_seq_start, tiff_fill_region, tiff_seq_stop, rtiff, NULL ) ) return( -1 ); /* Copy to out, adding a cache. Enough tiles for two complete rows. */ if( vips_tilecache( raw, &t, "tile_width", rtiff->twidth, "tile_height", rtiff->theight, "max_tiles", 2 * (1 + raw->Xsize / rtiff->twidth), NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static int tiff2vips_strip_read( TIFF *tiff, int strip, tdata_t buf ) { tsize_t length; length = TIFFReadEncodedStrip( tiff, strip, buf, (tsize_t) -1 ); if( length == -1 ) { vips_error( "tiff2vips", "%s", _( "read error" ) ); return( -1 ); } return( 0 ); } /* Read a strip. If the image is in separate planes, read each plane and * interleave to the output. */ static int tiff2vips_strip_read_interleaved( ReadTiff *rtiff, int y, tdata_t buf ) { tstrip_t strip = y / rtiff->rows_per_strip; if( rtiff->separate ) { int strips_per_plane = 1 + (rtiff->out->Ysize - 1) / rtiff->rows_per_strip; int strip_height = VIPS_MIN( rtiff->rows_per_strip, rtiff->out->Ysize - y ); int pels_per_strip = rtiff->out->Xsize * strip_height; int bytes_per_sample = rtiff->bits_per_sample >> 3; int i, j, k; for( i = 0; i < rtiff->samples_per_pixel; i++ ) { VipsPel *p; VipsPel *q; if( tiff2vips_strip_read( rtiff->tiff, strips_per_plane * i + strip, rtiff->plane_buf ) ) return( -1 ); p = (VipsPel *) rtiff->plane_buf; q = i * bytes_per_sample + (VipsPel *) buf; for( j = 0; j < pels_per_strip; j++ ) { for( k = 0; k < bytes_per_sample; k++ ) q[k] = p[k]; p += bytes_per_sample; q += bytes_per_sample * rtiff->samples_per_pixel; } } } else { if( tiff2vips_strip_read( rtiff->tiff, y / rtiff->rows_per_strip, buf ) ) return( -1 ); } return( 0 ); } static int tiff2vips_stripwise_generate( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { ReadTiff *rtiff = (ReadTiff *) a; VipsRect *r = &or->valid; int y; #ifdef DEBUG printf( "tiff2vips: read_stripwise_generate: top = %d, height = %d\n", r->top, r->height ); #endif /*DEBUG*/ /* We're inside a tilecache where tiles are the full image width, so * this should always be true. */ g_assert( r->left == 0 ); g_assert( r->width == or->im->Xsize ); g_assert( VIPS_RECT_BOTTOM( r ) <= or->im->Ysize ); /* Tiles should always be on a strip boundary. */ g_assert( r->top % rtiff->rows_per_strip == 0 ); /* Tiles should always be a strip in height, unless it's the final * strip. */ g_assert( r->height == VIPS_MIN( rtiff->rows_per_strip, or->im->Ysize - r->top ) ); VIPS_GATE_START( "tiff2vips_stripwise_generate: work" ); for( y = 0; y < r->height; y += rtiff->rows_per_strip ) { tdata_t dst; /* Read directly into the image if we can. Otherwise, we must * read to a temp buffer then unpack into the image. */ if( rtiff->memcpy ) dst = VIPS_REGION_ADDR( or, 0, r->top + y ); else dst = rtiff->contig_buf; if( tiff2vips_strip_read_interleaved( rtiff, r->top + y, dst ) ) { VIPS_GATE_STOP( "tiff2vips_stripwise_generate: work" ); return( -1 ); } /* If necessary, unpack to destination. */ if( !rtiff->memcpy ) { int height = VIPS_MIN( VIPS_MIN( rtiff->rows_per_strip, or->im->Ysize - (r->top + y) ), r->height ); VipsPel *p; VipsPel *q; int z; p = rtiff->contig_buf; q = VIPS_REGION_ADDR( or, 0, r->top + y ); for( z = 0; z < height; z++ ) { rtiff->sfn( rtiff, q, p, or->im->Xsize, rtiff->client ); p += rtiff->scanline_size; q += VIPS_REGION_LSKIP( or ); } } } VIPS_GATE_STOP( "tiff2vips_stripwise_generate: work" ); return( 0 ); } /* Stripwise reading. * * We could potentially read strips in any order, but this would give * catastrophic performance for operations like 90 degress rotate on a * large image. Only offer sequential read. */ static int read_stripwise( ReadTiff *rtiff, VipsImage *out ) { VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 3 ); #ifdef DEBUG printf( "tiff2vips: read_stripwise\n" ); #endif /*DEBUG*/ t[0] = vips_image_new(); if( parse_header( rtiff, t[0] ) ) return( -1 ); vips_image_pipelinev( t[0], VIPS_DEMAND_STYLE_THINSTRIP, NULL ); if( !tfget32( rtiff->tiff, TIFFTAG_ROWSPERSTRIP, &rtiff->rows_per_strip ) ) return( -1 ); rtiff->scanline_size = TIFFScanlineSize( rtiff->tiff ); rtiff->strip_size = TIFFStripSize( rtiff->tiff ); rtiff->number_of_strips = TIFFNumberOfStrips( rtiff->tiff ); /* rows_per_strip can be 2 ** 32 - 1, meaning the whole image. Clip * this down to ysize to avoid confusing vips. * * And it musn't be zero. */ rtiff->rows_per_strip = VIPS_CLIP( 1, rtiff->rows_per_strip, t[0]->Ysize ); #ifdef DEBUG printf( "read_stripwise: rows_per_strip = %u\n", rtiff->rows_per_strip ); printf( "read_stripwise: scanline_size = %zd\n", rtiff->scanline_size ); printf( "read_stripwise: strip_size = %zd\n", rtiff->strip_size ); printf( "read_stripwise: number_of_strips = %d\n", rtiff->number_of_strips ); #endif /*DEBUG*/ /* Double check: in memcpy mode, the vips linesize should exactly * match the tiff line size. */ if( rtiff->memcpy ) { size_t vips_line_size; /* Lines are smaller in plane-separated mode. */ if( rtiff->separate ) vips_line_size = VIPS_IMAGE_SIZEOF_ELEMENT( t[0] ) * t[0]->Xsize; else vips_line_size = VIPS_IMAGE_SIZEOF_LINE( t[0] ); if( rtiff->scanline_size != vips_line_size ) { vips_error( "tiff2vips", "%s", _( "unsupported tiff image type" ) ); return( -1 ); } } /* If we have separate image planes, we must read to a plane buffer, * then interleave to the output. * * We don't need a separate buffer per thread since the _generate() * function runs inside the cache lock. */ if( rtiff->separate ) { if( !(rtiff->plane_buf = vips_malloc( VIPS_OBJECT( out ), rtiff->strip_size )) ) return( -1 ); } /* If we need to manipulate pixels, we must read to an interleaved * plane buffer before repacking to the output. * * We don't need a separate buffer per thread since the _generate() * function runs inside the cache lock. */ if( !rtiff->memcpy ) { tsize_t size; size = rtiff->strip_size; if( rtiff->separate ) size *= rtiff->samples_per_pixel; if( !(rtiff->contig_buf = vips_malloc( VIPS_OBJECT( out ), size )) ) return( -1 ); } if( vips_image_generate( t[0], NULL, tiff2vips_stripwise_generate, NULL, rtiff, NULL ) || vips_sequential( t[0], &t[1], "tile_height", rtiff->rows_per_strip, "access", rtiff->readbehind ? VIPS_ACCESS_SEQUENTIAL : VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, NULL ) || vips_image_write( t[1], out ) ) return( -1 ); return( 0 ); } static void readtiff_destroy( VipsObject *object, ReadTiff *rtiff ) { VIPS_FREEF( TIFFClose, rtiff->tiff ); } static ReadTiff * readtiff_new( const char *filename, VipsImage *out, int page, gboolean readbehind ) { ReadTiff *rtiff; if( !(rtiff = VIPS_NEW( out, ReadTiff )) ) return( NULL ); rtiff->filename = vips_strdup( VIPS_OBJECT( out ), filename ); rtiff->out = out; rtiff->page = page; rtiff->readbehind = readbehind; rtiff->tiff = NULL; rtiff->sfn = NULL; rtiff->client = NULL; rtiff->memcpy = FALSE; rtiff->twidth = 0; rtiff->theight = 0; rtiff->separate = FALSE; rtiff->plane_buf = NULL; rtiff->contig_buf = NULL; g_signal_connect( out, "close", G_CALLBACK( readtiff_destroy ), rtiff ); if( rtiff->page < 0 || rtiff->page > 1000 ) { vips_error( "tiff2vips", _( "bad page number %d" ), rtiff->page ); return( NULL ); } return( rtiff ); } /* Pull out the nth directory from a TIFF file. */ static TIFF * get_directory( const char *filename, int page ) { TIFF *tif; int i; /* No mmap --- no performance advantage with libtiff, and it burns up * our VM if the tiff file is large. */ if( !(tif = TIFFOpen( filename, "rm" )) ) { vips_error( "tiff2vips", _( "unable to open \"%s\" for input" ), filename ); return( NULL ); } for( i = 0; i < page; i++ ) if( !TIFFReadDirectory( tif ) ) { /* Run out of directories. */ TIFFClose( tif ); return( NULL ); } return( tif ); } /* FIXME ... Unused for now, perhaps if we add another format flag. static int istiffpyramid( const char *name ) { TIFF *tif; vips__tiff_init(); if( (tif = get_directory( name, 2 )) ) { // We can see page 2 ... assume it is. TIFFClose( tif ); return( 1 ); } return( 0 ); } */ int vips__tiff_read( const char *filename, VipsImage *out, int page, gboolean readbehind ) { ReadTiff *rtiff; #ifdef DEBUG printf( "tiff2vips: libtiff version is \"%s\"\n", TIFFGetVersion() ); printf( "tiff2vips: libtiff starting for %s\n", filename ); #endif /*DEBUG*/ vips__tiff_init(); if( !(rtiff = readtiff_new( filename, out, page, readbehind )) ) return( -1 ); if( !(rtiff->tiff = get_directory( rtiff->filename, rtiff->page )) ) { vips_error( "tiff2vips", _( "TIFF file does not " "contain page %d" ), rtiff->page ); return( -1 ); } if( TIFFIsTiled( rtiff->tiff ) ) { if( read_tilewise( rtiff, out ) ) return( -1 ); } else { if( read_stripwise( rtiff, out ) ) return( -1 ); } return( 0 ); } int vips__tiff_read_header( const char *filename, VipsImage *out, int page ) { ReadTiff *rtiff; vips__tiff_init(); if( !(rtiff = readtiff_new( filename, out, page, FALSE )) ) return( -1 ); if( !(rtiff->tiff = get_directory( rtiff->filename, rtiff->page )) ) { vips_error( "tiff2vips", _( "TIFF file does not contain page %d" ), rtiff->page ); return( -1 ); } if( parse_header( rtiff, out ) ) return( -1 ); return( 0 ); } gboolean vips__istifftiled( const char *filename ) { TIFF *tif; gboolean tiled; vips__tiff_init(); if( !(tif = TIFFOpen( filename, "rm" )) ) { vips_error_clear(); return( FALSE ); } tiled = TIFFIsTiled( tif ); TIFFClose( tif ); return( tiled ); } gboolean vips__istiff( const char *filename ) { unsigned char buf[2]; if( vips__get_bytes( filename, buf, 2 ) ) if( (buf[0] == 'M' && buf[1] == 'M') || (buf[0] == 'I' && buf[1] == 'I') ) return( TRUE ); return( FALSE ); } #endif /*HAVE_TIFF*/ vips-7.38.5/libvips/foreign/openexr2vips.c0000644000175000017500000002135412303140253015427 00000000000000/* Convert OpenEXR to VIPS * * 1/5/06 * - from im_png2vips.c * 17/5/06 * - oops, buffer calcs were wrong * 19/5/06 * - added tiled read, with a separate cache * - removed *255 we had before, better to do something clever with * chromaticities * 4/2/10 * - gtkdoc * 12/12/11 * - redo as a set of fns ready for wrapping in a new-style class */ /* TODO - colour management - attributes - more of OpenEXR's pixel formats - more than just RGBA channels the openexr C API is very limited ... it seems RGBA half pixels is all you can do openexr lets you have different formats in different channels :-( there's no API to read the "chromaticities" attribute :-( */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_OPENEXR #include #include #include #include #include #include #include #include #include "openexr2vips.h" /* What we track during a OpenEXR read. */ typedef struct { char *filename; VipsImage *out; ImfTiledInputFile *tiles; ImfInputFile *lines; const ImfHeader *header; VipsRect window; int tile_width; int tile_height; } Read; gboolean vips__openexr_isexr( const char *filename ) { unsigned char buf[4]; if( vips__get_bytes( filename, buf, 4 ) ) if( buf[0] == 0x76 && buf[1] == 0x2f && buf[2] == 0x31 && buf[3] == 0x01 ) return( TRUE ); return( FALSE ); } static void get_imf_error( void ) { vips_error( "exr2vips", _( "EXR error: %s" ), ImfErrorMessage() ); } static void read_destroy( VipsImage *out, Read *read ) { VIPS_FREE( read->filename ); VIPS_FREEF( ImfCloseTiledInputFile, read->tiles ); VIPS_FREEF( ImfCloseInputFile, read->lines ); vips_free( read ); } static Read * read_new( const char *filename, VipsImage *out ) { Read *read; int xmin, ymin; int xmax, ymax; if( !(read = VIPS_NEW( NULL, Read )) ) return( NULL ); read->filename = vips_strdup( NULL, filename ); read->out = out; read->tiles = NULL; read->lines = NULL; if( out ) g_signal_connect( out, "close", G_CALLBACK( read_destroy ), read ); /* Try to open tiled first ... if that fails, fall back to scanlines. FIXME ... seems a bit ugly, but how else can you spot a tiled EXR image? */ if( !(read->tiles = ImfOpenTiledInputFile( read->filename )) ) { if( !(read->lines = ImfOpenInputFile( read->filename )) ) { get_imf_error(); return( NULL ); } } #ifdef DEBUG if( read->tiles ) printf( "exr2vips: opening in tiled mode\n" ); else printf( "exr2vips: opening in scanline mode\n" ); #endif /*DEBUG*/ if( read->tiles ) { read->header = ImfTiledInputHeader( read->tiles ); read->tile_width = ImfTiledInputTileXSize( read->tiles ); read->tile_height = ImfTiledInputTileYSize( read->tiles ); } else read->header = ImfInputHeader( read->lines ); ImfHeaderDataWindow( read->header, &xmin, &ymin, &xmax, &ymax ); read->window.left = xmin; read->window.top = ymin; read->window.width = xmax - xmin + 1; read->window.height = ymax - ymin + 1; return( read ); } gboolean vips__openexr_istiled( const char *filename ) { Read *read; gboolean tiled; if( !(read = read_new( filename, NULL )) ) return( FALSE ); tiled = read->tiles != NULL; read_destroy( NULL, read ); return( tiled ); } /* Read a OpenEXR file (header) into a VIPS (header). */ static void read_header( Read *read, VipsImage *out ) { /* FIXME ... not really sRGB. I think EXR is actually linear (no gamma). We ought to read the chromaticities from the header, put through a 3x3 matrix and output as XYZ */ vips_image_init_fields( out, read->window.width, read->window.height, 4, VIPS_FORMAT_FLOAT, VIPS_CODING_NONE, VIPS_INTERPRETATION_sRGB, 1.0, 1.0 ); if( read->tiles ) vips_image_pipelinev( out, VIPS_DEMAND_STYLE_SMALLTILE, NULL ); else vips_image_pipelinev( out, VIPS_DEMAND_STYLE_FATSTRIP, NULL ); } int vips__openexr_read_header( const char *filename, VipsImage *out ) { Read *read; if( !(read = read_new( filename, out )) ) return( -1 ); read_header( read, out ); return( 0 ); } /* Allocate a tile buffer. */ static void * vips__openexr_start( VipsImage *out, void *a, void *b ) { Read *read = (Read *) a; ImfRgba *imf_buffer; if( !(imf_buffer = VIPS_ARRAY( out, read->tile_width * read->tile_height, ImfRgba )) ) return( NULL ); return( imf_buffer ); } static int vips__openexr_generate( VipsRegion *out, void *seq, void *a, void *b, gboolean *top ) { ImfRgba *imf_buffer = (ImfRgba *) seq; Read *read = (Read *) a; VipsRect *r = &out->valid; const int tw = read->tile_width; const int th = read->tile_height; /* Find top left of tiles we need. */ const int xs = (r->left / tw) * tw; const int ys = (r->top / th) * th; int x, y, z; VipsRect image; /* Area of image. */ image.left = 0; image.top = 0; image.width = read->out->Xsize; image.height = read->out->Ysize; for( y = ys; y < VIPS_RECT_BOTTOM( r ); y += th ) for( x = xs; x < VIPS_RECT_RIGHT( r ); x += tw ) { VipsRect tile; VipsRect hit; int result; if( !ImfTiledInputSetFrameBuffer( read->tiles, imf_buffer - (read->window.left + x) - (read->window.top + y) * tw, 1, tw ) ) { get_imf_error(); return( -1 ); } #ifdef DEBUG printf( "exr2vips: requesting tile %d x %d\n", x / tw, y / th ); #endif /*DEBUG*/ result = ImfTiledInputReadTile( read->tiles, x / tw, y / th, 0, 0 ); if( !result ) { get_imf_error(); return( -1 ); } /* The tile in the file, in VIPS coordinates. */ tile.left = x; tile.top = y; tile.width = tw; tile.height = th; vips_rect_intersectrect( &tile, &image, &tile ); /* The part of this tile that hits the region. */ vips_rect_intersectrect( &tile, r, &hit ); /* Convert to float and write to the region. */ for( z = 0; z < hit.height; z++ ) { ImfRgba *p = imf_buffer + (hit.left - tile.left) + (hit.top - tile.top + z) * tw; float *q = (float *) VIPS_REGION_ADDR( out, hit.left, hit.top + z ); ImfHalfToFloatArray( 4 * hit.width, (ImfHalf *) p, q ); } } return( 0 ); } int vips__openexr_read( const char *filename, VipsImage *out ) { Read *read; if( !(read = read_new( filename, out )) ) return( -1 ); if( read->tiles ) { VipsImage *raw; VipsImage *t; /* Tile cache: keep enough for two complete rows of tiles. */ raw = vips_image_new(); vips_object_local( out, raw ); read_header( read, raw ); if( vips_image_generate( raw, vips__openexr_start, vips__openexr_generate, NULL, read, NULL ) ) return( -1 ); /* Copy to out, adding a cache. Enough tiles for a complete * row, plus 50%. */ if( vips_tilecache( raw, &t, "tile_width", read->tile_width, "tile_height", read->tile_height, "max_tiles", (int) (1.5 * (1 + raw->Xsize / read->tile_width)), NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); } else { const int left = read->window.left; const int top = read->window.top; const int width = read->window.width; const int height = read->window.height; ImfRgba *imf_buffer; float *vips_buffer; int y; if( !(imf_buffer = VIPS_ARRAY( out, width, ImfRgba )) || !(vips_buffer = VIPS_ARRAY( out, 4 * width, float )) ) return( -1 ); read_header( read, out ); for( y = 0; y < height; y++ ) { if( !ImfInputSetFrameBuffer( read->lines, imf_buffer - left - (top + y) * width, 1, width ) ) { get_imf_error(); return( -1 ); } if( !ImfInputReadPixels( read->lines, top + y, top + y ) ) { get_imf_error(); return( -1 ); } ImfHalfToFloatArray( 4 * width, (ImfHalf *) imf_buffer, vips_buffer ); if( vips_image_write_line( out, y, (VipsPel *) vips_buffer ) ) return( -1 ); } } return( 0 ); } #endif /*HAVE_OPENEXR*/ vips-7.38.5/libvips/foreign/foreign.c0000644000175000017500000020605512303141142014415 00000000000000/* VIPS function dispatch tables for image file load/save. * * 7/2/12 * - add support for sequential reads * 18/6/12 * - flatten alpha with vips_flatten() * 28/5/13 * - auto rshift down to 8 bits during save * 19/1/14 * - pack and unpack rad to scrgb */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include /** * SECTION: foreign * @short_description: load and save images in a variety of formats * @stability: Stable * @see_also: image * @include: vips/vips.h * * This set of operations load and save images in a variety of formats. * * The operations share a base class that offers a simple way to search for a * subclass of #VipsForeign which can load a certain file (see * vips_foreign_find_load()) or which could be used to save an image to a * certain file type (see vips_foreign_find_save()). You can then run these * operations using vips_call() and friends to perform the load or save. * * A pair of convenience * functions, vips_foreign_load() and vips_foreign_save(), automate the * process, loading an image from a file or saving an image to a file. These * functions let you give load or save options as name - value pairs in the C * argument list. You can use vips_foreign_load_options() and * vips_foreign_save_options() to include options in the file name. * * For example: * * |[ * vips_foreign_save (my_image, "frank.tiff", * "compression", VIPS_FOREIGN_TIFF_COMPRESSION_JPEG, * NULL); * ]| * * Will save an image to the file "frank.tiff" in TIFF format (selected by * the file name extension) with JPEG compression. * * |[ * vips_foreign_save_options (my_image, "frank.tiff[compression=jpeg]"); * ]| * * Is the same thing, but with the option in the filename. * * You can also invoke the operations directly, for example: * * |[ * vips_tiffsave (my_image, "frank.anything", * "compression", VIPS_FOREIGN_TIFF_COMPRESSION_JPEG, * NULL); * ]| * * To add support for a new file format to vips, simply define a new subclass * of #VipsForeignLoad or #VipsForeignSave. * * If you define a new operation which is a subclass of #VipsForeign, support * for it automatically appears in all VIPS user-interfaces. It will also be * transparently supported by vips_image_new_from_file() and friends. * * VIPS comes with VipsForeign for TIFF, JPEG, PNG, Analyze, PPM, OpenEXR, CSV, * Matlab, Radiance, RAW, FITS and VIPS. It also * includes import filters which can * load with libMagick and with OpenSlide. */ /** * VipsForeignFlags: * @VIPS_FOREIGN_NONE: no flags set * @VIPS_FOREIGN_PARTIAL: the image may be read lazilly * @VIPS_FOREIGN_SEQUENTIAL: top-to-bottom lazy reading * @VIPS_FOREIGN_BIGENDIAN: image pixels are most-significant byte first * * Some hints about the image loader. * * @VIPS_FOREIGN_PARTIAL means that the image can be read directly from the * file without needing to be unpacked to a temporary image first. * * @VIPS_FOREIGN_SEQUENTIAL means that the loader supports lazy reading, but * only top-to-bottom (sequential) access. Formats like PNG can read sets of * scanlines, for example, but only in order. * * If neither PARTIAL or SEQUENTIAL is set, the loader only supports whole * image read. Setting both PARTIAL and SEQUENTIAL is an error. * * @VIPS_FOREIGN_BIGENDIAN means that image pixels are most-significant byte * first. Depending on the native byte order of the host machine, you may * need to swap bytes. See vips_copy(). */ /** * VipsForeignClass: * * The suffix list is used to select a format to save a file in, and to pick a * loader if you don't define is_a(). * * You should also define @nickname and @description in #VipsObject. */ /** * VipsForeignLoad: * * @header() must set at least the header fields of @out. @laod(), if defined, * must load the pixels to @real. */ /** * VipsForeignLoadClass: * * Add a new loader to VIPS by subclassing #VipsForeignLoad. Subclasses need to * implement at least @header(). * * As a complete example, here's the code for the PNG loader, minus the actual * calls to libpng. * * |[ typedef struct _VipsForeignLoadPng { VipsForeignLoad parent_object; char *filename; } VipsForeignLoadPng; typedef VipsForeignLoadClass VipsForeignLoadPngClass; G_DEFINE_TYPE( VipsForeignLoadPng, vips_foreign_load_png, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_png_get_flags_filename( const char *filename ) { VipsForeignFlags flags; flags = 0; if( vips__png_isinterlaced( filename ) ) flags = VIPS_FOREIGN_PARTIAL; else flags = VIPS_FOREIGN_SEQUENTIAL; return( flags ); } static VipsForeignFlags vips_foreign_load_png_get_flags( VipsForeignLoad *load ) { VipsForeignLoadPng *png = (VipsForeignLoadPng *) load; return( vips_foreign_load_png_get_flags_filename( png->filename ) ); } static int vips_foreign_load_png_header( VipsForeignLoad *load ) { VipsForeignLoadPng *png = (VipsForeignLoadPng *) load; if( vips__png_header( png->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_png_load( VipsForeignLoad *load ) { VipsForeignLoadPng *png = (VipsForeignLoadPng *) load; if( vips__png_read( png->filename, load->real ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_png_class_init( VipsForeignLoadPngClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "pngload"; object_class->description = _( "load png from file" ); foreign_class->suffs = vips__png_suffs; load_class->is_a = vips__png_ispng; load_class->get_flags_filename = vips_foreign_load_png_get_flags_filename; load_class->get_flags = vips_foreign_load_png_get_flags; load_class->header = vips_foreign_load_png_header; load_class->load = vips_foreign_load_png_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadPng, filename ), NULL ); } static void vips_foreign_load_png_init( VipsForeignLoadPng *png ) { } * ]| */ /** * VipsForeignSaveClass: * * Call your saver in the class' @build() method after chaining up. The * prepared image should be ready for you to save in @ready. * * As a complete example, here's the code for the CSV saver, minus the calls * to the actual save routines. * * |[ typedef struct _VipsForeignSaveCsv { VipsForeignSave parent_object; char *filename; const char *separator; } VipsForeignSaveCsv; typedef VipsForeignSaveClass VipsForeignSaveCsvClass; G_DEFINE_TYPE( VipsForeignSaveCsv, vips_foreign_save_csv, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_csv_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveCsv *csv = (VipsForeignSaveCsv *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_csv_parent_class )-> build( object ) ) return( -1 ); if( vips__csv_write( save->ready, csv->filename, csv->separator ) ) return( -1 ); return( 0 ); } static void vips_foreign_save_csv_class_init( VipsForeignSaveCsvClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "csvsave"; object_class->description = _( "save image to csv file" ); object_class->build = vips_foreign_save_csv_build; foreign_class->suffs = vips__foreign_csv_suffs; save_class->saveable = VIPS_SAVEABLE_MONO; // no need to define ->format_table, we don't want the input // cast for us VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveCsv, filename ), NULL ); VIPS_ARG_STRING( class, "separator", 13, _( "Separator" ), _( "Separator characters" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveCsv, separator ), "\t" ); } static void vips_foreign_save_csv_init( VipsForeignSaveCsv *csv ) { csv->separator = g_strdup( "\t" ); } * ]| */ G_DEFINE_ABSTRACT_TYPE( VipsForeign, vips_foreign, VIPS_TYPE_OPERATION ); static void vips_foreign_summary_class( VipsObjectClass *object_class, VipsBuf *buf ) { VipsForeignClass *class = VIPS_FOREIGN_CLASS( object_class ); VIPS_OBJECT_CLASS( vips_foreign_parent_class )-> summary_class( object_class, buf ); vips_buf_appends( buf, " " ); if( class->suffs ) { const char **p; vips_buf_appends( buf, "(" ); for( p = class->suffs; *p; p++ ) { vips_buf_appendf( buf, "%s", *p ); if( p[1] ) vips_buf_appends( buf, ", " ); } vips_buf_appends( buf, "), " ); } vips_buf_appendf( buf, "priority=%d", class->priority ); } static void vips_foreign_class_init( VipsForeignClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "file"; object_class->description = _( "load and save image files" ); object_class->summary_class = vips_foreign_summary_class; } static void vips_foreign_init( VipsForeign *object ) { } /* To iterate over supported files we build a temp list of subclasses of * VipsForeign, sort by priority, iterate, and free. */ static void * file_add_class( VipsForeignClass *file, GSList **files ) { /* Append so we don't reverse the list of files. */ *files = g_slist_append( *files, file ); return( NULL ); } static gint file_compare( VipsForeignClass *a, VipsForeignClass *b ) { return( b->priority - a->priority ); } /** * vips_foreign_map: * @base: base class to search below (eg. "VipsForeignLoad") * @fn: (scope call): function to apply to each #VipsForeignClass * @a: user data * @b: user data * * Apply a function to every #VipsForeignClass that VIPS knows about. Foreigns * are presented to the function in priority order. * * Like all VIPS map functions, if @fn returns %NULL, iteration continues. If * it returns non-%NULL, iteration terminates and that value is returned. The * map function returns %NULL if all calls return %NULL. * * See also: vips_slist_map(). * * Returns: (transfer none): the result of iteration */ void * vips_foreign_map( const char *base, VipsSListMap2Fn fn, void *a, void *b ) { GSList *files; void *result; files = NULL; (void) vips_class_map_all( g_type_from_name( base ), (VipsClassMapFn) file_add_class, (void *) &files ); files = g_slist_sort( files, (GCompareFunc) file_compare ); result = vips_slist_map2( files, fn, a, b ); g_slist_free( files ); return( result ); } /* Abstract base class for image load. */ G_DEFINE_ABSTRACT_TYPE( VipsForeignLoad, vips_foreign_load, VIPS_TYPE_FOREIGN ); static void vips_foreign_load_dispose( GObject *gobject ) { VipsForeignLoad *load = VIPS_FOREIGN_LOAD( gobject ); VIPS_UNREF( load->real ); G_OBJECT_CLASS( vips_foreign_load_parent_class )->dispose( gobject ); } static void vips_foreign_load_summary_class( VipsObjectClass *object_class, VipsBuf *buf ) { VipsForeignLoadClass *class = VIPS_FOREIGN_LOAD_CLASS( object_class ); VIPS_OBJECT_CLASS( vips_foreign_load_parent_class )-> summary_class( object_class, buf ); if( !G_TYPE_IS_ABSTRACT( G_TYPE_FROM_CLASS( class ) ) ) { if( class->is_a ) vips_buf_appends( buf, ", is_a" ); if( class->get_flags ) vips_buf_appends( buf, ", get_flags" ); if( class->get_flags_filename ) vips_buf_appends( buf, ", get_flags_filename" ); if( class->header ) vips_buf_appends( buf, ", header" ); if( class->load ) vips_buf_appends( buf, ", load" ); /* You can omit ->load(), you must not omit ->header(). */ g_assert( class->header ); } } /* Can this VipsForeign open this file? */ static void * vips_foreign_load_new_from_foreign_sub( VipsForeignLoadClass *load_class, const char *filename ) { VipsForeignClass *class = VIPS_FOREIGN_CLASS( load_class ); if( load_class->is_a ) { if( load_class->is_a( filename ) ) return( load_class ); } else if( class->suffs && vips_filename_suffix_match( filename, class->suffs ) ) return( load_class ); return( NULL ); } /** * vips_foreign_find_load: * @filename: file to find a loader for * * Searches for an operation you could use to load @filename. * * See also: vips_foreign_read(). * * Returns: the name of an operation on success, %NULL on error */ const char * vips_foreign_find_load( const char *filename ) { VipsForeignLoadClass *load_class; if( !vips_existsf( "%s", filename ) ) { vips_error( "VipsForeignLoad", _( "file \"%s\" not found" ), filename ); return( NULL ); } if( !(load_class = (VipsForeignLoadClass *) vips_foreign_map( "VipsForeignLoad", (VipsSListMap2Fn) vips_foreign_load_new_from_foreign_sub, (void *) filename, NULL )) ) { vips_error( "VipsForeignLoad", _( "\"%s\" is not a known file format" ), filename ); return( NULL ); } return( G_OBJECT_CLASS_NAME( load_class ) ); } /** * vips_foreign_find_load_options: * @filename: file to find a loader for * * Searches for an operation you could use to load @filename. * * Arguments to the loader may be embedded in the filename using the usual * syntax. * * See also: vips_foreign_load(). * * Returns: 0 on success, -1 on error */ const char * vips_foreign_find_load_options( const char *filename ) { VipsObjectClass *oclass = g_type_class_ref( VIPS_TYPE_FOREIGN_LOAD ); VipsObject *object; const char *type_name; /* This will use vips_foreign_load_new_from_string() to pick a loader, * then set options from the tail of the filename. This is rather slow * :-( */ if( !(object = vips_object_new_from_string( oclass, filename )) ) return( NULL ); type_name = G_OBJECT_TYPE_NAME( object ); g_object_unref( object ); return( type_name ); } /** * vips_foreign_is_a: * @loader: name of loader to use for test * @filename: file to test * * Return %TRUE if @filename can be loaded by @loader. @loader is something * like "tiffload" or "VipsForeignLoadTiff". * * Returns: %TRUE if @filename can be loaded by @loader. */ gboolean vips_foreign_is_a( const char *loader, const char *filename ) { VipsObjectClass *class; VipsForeignLoadClass *load_class; if( !(class = vips_class_find( "VipsForeignLoad", loader )) ) return( FALSE ); load_class = VIPS_FOREIGN_LOAD_CLASS( class ); if( load_class->is_a && load_class->is_a( filename ) ) return( TRUE ); return( FALSE ); } /** * vips_foreign_flags: * @loader: name of loader to use for test * @filename: file to test * * Return the flags for @filename using @loader. * @loader is something like "tiffload" or "VipsForeignLoadTiff". * * Returns: the flags for @filename. */ VipsForeignFlags vips_foreign_flags( const char *loader, const char *filename ) { VipsObjectClass *class; if( (class = vips_class_find( "VipsForeignLoad", loader )) ) { VipsForeignLoadClass *load_class = VIPS_FOREIGN_LOAD_CLASS( class ); if( load_class->get_flags_filename ) return( load_class->get_flags_filename( filename ) ); } return( 0 ); } static VipsObject * vips_foreign_load_new_from_string( const char *string ) { const char *file_op; GType type; VipsForeignLoad *load; if( !(file_op = vips_foreign_find_load( string )) ) return( NULL ); type = g_type_from_name( file_op ); g_assert( type ); load = VIPS_FOREIGN_LOAD( g_object_new( type, NULL ) ); g_object_set( load, "filename", string, NULL ); return( VIPS_OBJECT( load ) ); } static guint64 vips_get_disc_threshold( void ) { static gboolean done = FALSE; static guint64 threshold; if( !done ) { const char *env; done = TRUE; /* 100mb default. */ threshold = 100 * 1024 * 1024; if( (env = g_getenv( "IM_DISC_THRESHOLD" )) ) threshold = vips__parse_size( env ); if( vips__disc_threshold ) threshold = vips__parse_size( vips__disc_threshold ); #ifdef DEBUG printf( "vips_get_disc_threshold: %zd bytes\n", threshold ); #endif /*DEBUG*/ } return( threshold ); } static VipsImage * vips_foreign_load_temp( VipsForeignLoad *load ) { const guint64 disc_threshold = vips_get_disc_threshold(); const guint64 image_size = VIPS_IMAGE_SIZEOF_IMAGE( load->out ); /* If this is a partial operation, we can open directly. */ if( load->flags & VIPS_FOREIGN_PARTIAL ) { #ifdef DEBUG printf( "vips_foreign_load_temp: partial temp\n" ); #endif /*DEBUG*/ return( vips_image_new() ); } /* If it can do sequential access and it's been requested, we can open * directly. */ if( (load->flags & VIPS_FOREIGN_SEQUENTIAL) && load->access != VIPS_ACCESS_RANDOM ) { #ifdef DEBUG printf( "vips_foreign_load_temp: partial sequential temp\n" ); #endif /*DEBUG*/ return( vips_image_new() ); } /* We open via disc if: * - 'disc' is set * - disc-threshold has not been set to zero * - the uncompressed image will be larger than * vips_get_disc_threshold() */ if( load->disc && disc_threshold && image_size > disc_threshold ) { #ifdef DEBUG printf( "vips_foreign_load_temp: disc temp\n" ); #endif /*DEBUG*/ return( vips_image_new_temp_file( "%s.v" ) ); } #ifdef DEBUG printf( "vips_foreign_load_temp: memory temp\n" ); #endif /*DEBUG*/ /* Otherwise, fall back to a memory buffer. */ return( vips_image_new_buffer() ); } /* Check two images for compatibility: their geometries need to match. */ static gboolean vips_foreign_load_iscompat( VipsImage *a, VipsImage *b ) { if( a->Xsize != b->Xsize || a->Ysize != b->Ysize || a->Bands != b->Bands || a->Coding != b->Coding || a->BandFmt != b->BandFmt ) { vips_error( "VipsForeignLoad", "%s", _( "images do not match" ) ); return( FALSE ); } return( TRUE ); } /* Our start function ... do the lazy open, if necessary, and return a region * on the new image. */ static void * vips_foreign_load_start( VipsImage *out, void *a, void *b ) { VipsForeignLoad *load = VIPS_FOREIGN_LOAD( b ); VipsForeignLoadClass *class = VIPS_FOREIGN_LOAD_GET_CLASS( load ); if( !load->real ) { if( !(load->real = vips_foreign_load_temp( load )) ) return( NULL ); #ifdef DEBUG printf( "vips_foreign_load_start: triggering ->load()\n" ); #endif /*DEBUG*/ /* Read the image in. */ if( class->load( load ) || vips_image_pio_input( load->real ) ) return( NULL ); /* ->header() read the header into @out, load has read the * image into @real. They must match exactly in size, bands, * format and coding for the copy to work. * * Some versions of ImageMagick give different results between * Ping and Load for some formats, for example. */ if( !vips_foreign_load_iscompat( load->real, out ) ) return( NULL ); /* We have to tell vips that out depends on real. We've set * the demand hint below, but not given an input there. */ vips_image_pipelinev( load->out, load->out->dhint, load->real, NULL ); } return( vips_region_new( load->real ) ); } /* Just pointer-copy. */ static int vips_foreign_load_generate( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsRect *r = &or->valid; /* Ask for input we need. */ if( vips_region_prepare( ir, r ) ) return( -1 ); /* Attach output region to that. */ if( vips_region_region( or, ir, r, r->left, r->top ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsForeignLoad *load = VIPS_FOREIGN_LOAD( object ); VipsForeignLoadClass *fclass = VIPS_FOREIGN_LOAD_GET_CLASS( object ); VipsForeignFlags flags; #ifdef DEBUG printf( "vips_foreign_load_build:\n" ); #endif /*DEBUG*/ flags = 0; if( fclass->get_flags ) flags |= fclass->get_flags( load ); if( (flags & VIPS_FOREIGN_PARTIAL) && (flags & VIPS_FOREIGN_SEQUENTIAL) ) { vips_warn( class->nickname, "%s", _( "VIPS_FOREIGN_PARTIAL and VIPS_FOREIGN_SEQUENTIAL " "both set -- using SEQUENTIAL" ) ); flags ^= VIPS_FOREIGN_PARTIAL; } g_object_set( load, "flags", flags, NULL ); /* If the loader can do sequential mode and sequential has been * requested, we need to block caching. */ if( (load->flags & VIPS_FOREIGN_SEQUENTIAL) && load->access != VIPS_ACCESS_RANDOM ) load->nocache = TRUE; if( VIPS_OBJECT_CLASS( vips_foreign_load_parent_class )-> build( object ) ) return( -1 ); if( load->sequential ) { vips_warn( class->nickname, "%s", _( "ignoring deprecated \"sequential\" mode" ) ); vips_warn( class->nickname, "%s", _( "please use \"access\" instead" ) ); } g_object_set( object, "out", vips_image_new(), NULL ); vips_image_set_string( load->out, VIPS_META_LOADER, class->nickname ); #ifdef DEBUG printf( "vips_foreign_load_build: triggering ->header()\n" ); #endif /*DEBUG*/ /* Read the header into @out. */ if( fclass->header && fclass->header( load ) ) return( -1 ); /* If there's no ->load() method then the header read has done * everything. Otherwise, it's just set fields and we must also * load pixels. * * Delay the load until the first pixel is requested by doing the work * in the start function of the copy. */ if( fclass->load ) { #ifdef DEBUG printf( "vips_foreign_load_build: delaying read ...\n" ); #endif /*DEBUG*/ /* ->header() should set the dhint. It'll default to the safe * SMALLTILE if header() did not set it. */ vips_image_pipelinev( load->out, load->out->dhint, NULL ); /* Then 'start' creates the real image and 'gen' fetches * pixels for @out from @real on demand. */ if( vips_image_generate( load->out, vips_foreign_load_start, vips_foreign_load_generate, vips_stop_one, NULL, load ) ) return( -1 ); } return( 0 ); } static VipsOperationFlags vips_foreign_load_operation_get_flags( VipsOperation *operation ) { VipsForeignLoad *load = VIPS_FOREIGN_LOAD( operation ); VipsOperationFlags flags; flags = VIPS_OPERATION_CLASS( vips_foreign_load_parent_class )-> get_flags( operation ); if( load->nocache ) flags |= VIPS_OPERATION_NOCACHE; return( flags ); } static void vips_foreign_load_class_init( VipsForeignLoadClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsOperationClass *operation_class = (VipsOperationClass *) class; gobject_class->dispose = vips_foreign_load_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->build = vips_foreign_load_build; object_class->summary_class = vips_foreign_load_summary_class; object_class->new_from_string = vips_foreign_load_new_from_string; object_class->nickname = "fileload"; object_class->description = _( "file loaders" ); operation_class->get_flags = vips_foreign_load_operation_get_flags; VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsForeignLoad, out ) ); VIPS_ARG_FLAGS( class, "flags", 6, _( "Flags" ), _( "Flags for this file" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsForeignLoad, flags ), VIPS_TYPE_FOREIGN_FLAGS, VIPS_FOREIGN_NONE ); VIPS_ARG_BOOL( class, "disc", 7, _( "Disc" ), _( "Open to disc" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoad, disc ), TRUE ); VIPS_ARG_ENUM( class, "access", 8, _( "Access" ), _( "Required access pattern for this file" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoad, access ), VIPS_TYPE_ACCESS, VIPS_ACCESS_RANDOM ); VIPS_ARG_BOOL( class, "sequential", 10, _( "Sequential" ), _( "Sequential read only" ), VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, G_STRUCT_OFFSET( VipsForeignLoad, sequential ), FALSE ); } static void vips_foreign_load_init( VipsForeignLoad *load ) { load->disc = TRUE; load->access = VIPS_ACCESS_RANDOM; } /* Abstract base class for image savers. */ G_DEFINE_ABSTRACT_TYPE( VipsForeignSave, vips_foreign_save, VIPS_TYPE_FOREIGN ); static void vips_foreign_save_dispose( GObject *gobject ) { VipsForeignSave *save = VIPS_FOREIGN_SAVE( gobject ); VIPS_UNREF( save->ready ); G_OBJECT_CLASS( vips_foreign_save_parent_class )->dispose( gobject ); } static void vips_foreign_save_summary_class( VipsObjectClass *object_class, VipsBuf *buf ) { VipsForeignSaveClass *class = VIPS_FOREIGN_SAVE_CLASS( object_class ); VIPS_OBJECT_CLASS( vips_foreign_save_parent_class )-> summary_class( object_class, buf ); vips_buf_appendf( buf, ", %s", vips_enum_nick( VIPS_TYPE_SAVEABLE, class->saveable ) ); } /* Can we write this filename with this file? */ static void * vips_foreign_find_save_sub( VipsForeignSaveClass *save_class, const char *filename ) { VipsForeignClass *class = VIPS_FOREIGN_CLASS( save_class ); if( class->suffs && vips_filename_suffix_match( filename, class->suffs ) ) return( save_class ); return( NULL ); } /** * vips_foreign_find_save: * @filename: name to find a saver for * * Searches for an operation you could use to write to @filename. * * @filename may not contain embedded options. See * vips_foreign_find_save_options() if your filename may have options in. * * See also: vips_foreign_write(). * * Returns: the name of an operation on success, %NULL on error */ const char * vips_foreign_find_save( const char *filename ) { VipsForeignSaveClass *save_class; if( !(save_class = (VipsForeignSaveClass *) vips_foreign_map( "VipsForeignSave", (VipsSListMap2Fn) vips_foreign_find_save_sub, (void *) filename, NULL )) ) { vips_error( "VipsForeignSave", _( "\"%s\" is not a known file format" ), filename ); return( NULL ); } return( G_OBJECT_CLASS_NAME( save_class ) ); } /** * vips_foreign_find_save_options: * @filename: name to find a saver for * * Searches for an operation you could use to write to @filename. * * @filename may contain embedded options. See * vips_foreign_find_save() if your filename does not options in. * * See also: vips_foreign_write(). * * Returns: 0 on success, -1 on error */ const char * vips_foreign_find_save_options( const char *filename ) { VipsObjectClass *oclass = g_type_class_ref( VIPS_TYPE_FOREIGN_SAVE ); VipsObject *object; const char *type_name; /* This will use vips_foreign_save_new_from_string() to pick a saver, * then set options from the tail of the filename. This is rather slow * :-( */ if( !(object = vips_object_new_from_string( oclass, filename )) ) return( NULL ); type_name = G_OBJECT_TYPE_NAME( object ); g_object_unref( object ); return( type_name ); } static VipsObject * vips_foreign_save_new_from_string( const char *string ) { const char *file_op; GType type; VipsForeignSave *save; if( !(file_op = vips_foreign_find_save( string )) ) return( NULL ); type = g_type_from_name( file_op ); g_assert( type ); save = VIPS_FOREIGN_SAVE( g_object_new( type, NULL ) ); g_object_set( save, "filename", string, NULL ); return( VIPS_OBJECT( save ) ); } /* Generate the saveable image. */ static int vips_foreign_convert_saveable( VipsForeignSave *save ) { VipsForeignSaveClass *class = VIPS_FOREIGN_SAVE_GET_CLASS( save ); VipsImage *in = save->in; /* in holds a reference to the output of our chain as we build it. */ g_object_ref( in ); /* For coded images, can this class save the coding we are in now? * Nothing to do. */ if( in->Coding != VIPS_CODING_NONE && class->coding[in->Coding] ) { VIPS_UNREF( save->ready ); save->ready = in; return( 0 ); } /* For uncoded images, if this saver supports ANY bands and this * format we have nothing to do. */ if( in->Coding == VIPS_CODING_NONE && class->saveable == VIPS_SAVEABLE_ANY && class->format_table[in->BandFmt] == in->BandFmt ) { VIPS_UNREF( save->ready ); save->ready = in; return( 0 ); } /* Otherwise ... we need to decode and then (possibly) recode at the * end. */ /* If this is an VIPS_CODING_LABQ, we can go straight to RGB. */ if( in->Coding == VIPS_CODING_LABQ ) { VipsImage *out; if( vips_LabQ2sRGB( in, &out, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } /* If this is an VIPS_CODING_RAD, we unpack to float. This could be * scRGB or XYZ. */ if( in->Coding == VIPS_CODING_RAD ) { VipsImage *out; if( vips_rad2float( in, &out, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } /* Get the bands right. */ if( in->Coding == VIPS_CODING_NONE ) { /* Do we need to flatten out an alpha channel? There needs to * be an alpha there now, and this writer needs to not support * alpha. */ if( (in->Bands == 2 || (in->Bands == 4 && in->Type != VIPS_INTERPRETATION_CMYK)) && (class->saveable == VIPS_SAVEABLE_MONO || class->saveable == VIPS_SAVEABLE_RGB || class->saveable == VIPS_SAVEABLE_RGB_CMYK) ) { VipsImage *out; if( vips_flatten( in, &out, 0, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } /* Other alpha removal strategies ... just drop the extra * bands. */ else if( in->Bands > 3 && (class->saveable == VIPS_SAVEABLE_RGB || (class->saveable == VIPS_SAVEABLE_RGB_CMYK && in->Type != VIPS_INTERPRETATION_CMYK)) ) { VipsImage *out; /* Don't let 4 bands though unless the image really is * a CMYK. * * Consider a RGBA png being saved as JPG. We can * write CMYK jpg, but we mustn't do that for RGBA * images. */ if( vips_extract_band( in, &out, 0, "n", 3, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } else if( in->Bands > 4 && ((class->saveable == VIPS_SAVEABLE_RGB_CMYK && in->Type == VIPS_INTERPRETATION_CMYK) || class->saveable == VIPS_SAVEABLE_RGBA) ) { VipsImage *out; if( vips_extract_band( in, &out, 0, "n", 4, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } else if( in->Bands > 1 && class->saveable == VIPS_SAVEABLE_MONO ) { VipsImage *out; if( vips_extract_band( in, &out, 0, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } /* Else we have VIPS_SAVEABLE_ANY and we don't chop bands down. */ } /* If the saver supports RAD, we need to go to scRGB or XYZ. */ if( class->coding[VIPS_CODING_RAD] ) { if( in->Type != VIPS_INTERPRETATION_scRGB && in->Type != VIPS_INTERPRETATION_XYZ ) { VipsImage *out; if( vips_colourspace( in, &out, VIPS_INTERPRETATION_scRGB, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } } else if( in->Bands == 3 && vips_colourspace_issupported( in ) ) { /* Interpret the Type field for colorimetric images. */ VipsImage *out; if( vips_colourspace( in, &out, VIPS_INTERPRETATION_sRGB, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } /* Shift down to 8 bits. Handy for 8-bit-only formats like jpeg. * * If the operation wants to write 8 bits for this format and this * image is 16 bits or more and Type is RGB16 or GREY16 ... * automatically shift down. */ if( vips_band_format_is8bit( class->format_table[in->BandFmt] ) && !vips_band_format_is8bit( in->BandFmt ) && (in->Type == VIPS_INTERPRETATION_RGB16 || in->Type == VIPS_INTERPRETATION_GREY16) ) { VipsImage *out; if( vips_rshift_const1( in, &out, 8, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } /* Cast to the output format. */ { VipsImage *out; if( vips_cast( in, &out, class->format_table[in->BandFmt], NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } /* Does this class want a coded image? Search the coding table for the * first one. */ if( class->coding[VIPS_CODING_NONE] ) { /* Already NONE, nothing to do. */ } else if( class->coding[VIPS_CODING_LABQ] ) { VipsImage *out; if( vips_Lab2LabQ( in, &out, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } else if( class->coding[VIPS_CODING_RAD] ) { VipsImage *out; if( vips_float2rad( in, &out, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); in = out; } VIPS_UNREF( save->ready ); save->ready = in; return( 0 ); } static int vips_foreign_save_build( VipsObject *object ) { VipsForeignSave *save = VIPS_FOREIGN_SAVE( object ); if( save->in && vips_foreign_convert_saveable( save ) ) return( -1 ); if( VIPS_OBJECT_CLASS( vips_foreign_save_parent_class )-> build( object ) ) return( -1 ); return( 0 ); } #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static int vips_foreign_save_format_table[10] = { // UC C US S UI I F X D DX UC, C, US, S, UI, I, F, X, D, DX }; static void vips_foreign_save_class_init( VipsForeignSaveClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsOperationClass *operation_class = (VipsOperationClass *) class; int i; gobject_class->dispose = vips_foreign_save_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->build = vips_foreign_save_build; object_class->summary_class = vips_foreign_save_summary_class; object_class->new_from_string = vips_foreign_save_new_from_string; object_class->nickname = "filesave"; object_class->description = _( "file savers" ); /* I think all savers are sequential. Hopefully. */ operation_class->flags |= VIPS_OPERATION_SEQUENTIAL_UNBUFFERED; /* Must not cache savers. */ operation_class->flags |= VIPS_OPERATION_NOCACHE; /* Default to no coding allowed. */ for( i = 0; i < VIPS_CODING_LAST; i++ ) class->coding[i] = FALSE; class->coding[VIPS_CODING_NONE] = TRUE; /* Default to no cast on save. */ class->format_table = vips_foreign_save_format_table; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Image to save" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSave, in ) ); VIPS_ARG_BOOL( class, "strip", 100, _( "Strip" ), _( "Strip all metadata from image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSave, strip ), FALSE ); } static void vips_foreign_save_init( VipsForeignSave *object ) { } /** * vips_foreign_load: * @filename: file to load * @out: output image * @...: %NULL-terminated list of optional named arguments * * Loads @filename into @out using the loader recommended by * vips_foreign_find_load(). * * See also: vips_foreign_save(), vips_foreign_load_options(). * * Returns: 0 on success, -1 on error */ int vips_foreign_load( const char *filename, VipsImage **out, ... ) { const char *operation; va_list ap; int result; if( !(operation = vips_foreign_find_load( filename )) ) return( -1 ); va_start( ap, out ); result = vips_call_split( operation, ap, filename, out ); va_end( ap ); return( result ); } /** * vips_foreign_save: * @in: image to write * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Saves @in to @filename using the saver recommended by * vips_foreign_find_save(). Options are not in @filename but must be given * as a NULL-terminated list of name-value pairs. * * See also: vips_foreign_load(). * * Returns: 0 on success, -1 on error */ int vips_foreign_save( VipsImage *in, const char *filename, ... ) { const char *operation; va_list ap; int result; if( !(operation = vips_foreign_find_save( filename )) ) return( -1 ); va_start( ap, filename ); result = vips_call_split( operation, ap, in, filename ); va_end( ap ); return( result ); } /** * vips_foreign_load_options: * @filename: file to load * @out: output image * @...: %NULL-terminated list of optional named arguments * * Loads @filename into @out using the loader recommended by * vips_foreign_find_load(). * * Arguments to the loader may be embedded in the filename using the usual * syntax. They may also be given as a set of NULL-terminated optional * arguments. * * See also: vips_foreign_load(). * * Returns: 0 on success, -1 on error */ int vips_foreign_load_options( const char *filename, VipsImage **out, ... ) { VipsObjectClass *oclass = g_type_class_ref( VIPS_TYPE_FOREIGN_LOAD ); VipsObject *object; va_list ap; int result; /* This will use vips_foreign_load_new_from_string() to pick a loader, * then set options from the remains of the string. */ if( !(object = vips_object_new_from_string( oclass, filename )) ) return( -1 ); /* Also set options from args. */ va_start( ap, out ); result = vips_object_set_valist( object, ap ); va_end( ap ); if( result ) return( -1 ); if( vips_cache_operation_buildp( (VipsOperation **) &object ) ) { /* The build may have made some output objects before * failing. */ vips_object_unref_outputs( object ); g_object_unref( object ); return( -1 ); } g_object_get( object, "out", out, NULL ); /* Getting @out will have upped its count so it'll be safe. * We can junk all other outputs, */ vips_object_unref_outputs( object ); /* @out holds a ref to new_object, we can drop ours. */ g_object_unref( object ); return( 0 ); } /** * vips_foreign_save_options: * @in: image to write * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Saves @in to @filename using the saver recommended by * vips_foreign_find_save(). * * Arguments to the saver may be embedded in the filename using the usual * syntax. They may also be given as a set of NULL-terminated optional * arguments. * * See also: vips_foreign_save(). * * Returns: 0 on success, -1 on error */ int vips_foreign_save_options( VipsImage *in, const char *filename, ... ) { VipsObjectClass *oclass = g_type_class_ref( VIPS_TYPE_FOREIGN_SAVE ); VipsObject *object; va_list ap; int result; /* This will use vips_foreign_save_new_from_string() to pick a saver, * then set options from the tail of the filename. */ if( !(object = vips_object_new_from_string( oclass, filename )) ) return( -1 ); g_object_set( object, "in", in, NULL ); /* Also set options from args. */ va_start( ap, filename ); result = vips_object_set_valist( object, ap ); va_end( ap ); if( result ) return( -1 ); /* ... and running _build() should save it. */ if( vips_cache_operation_buildp( (VipsOperation **) &object ) ) { g_object_unref( object ); return( -1 ); } g_object_unref( object ); return( 0 ); } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_foreign_operation_init( void ) { extern GType vips_foreign_load_rad_get_type( void ); extern GType vips_foreign_save_rad_get_type( void ); extern GType vips_foreign_load_mat_get_type( void ); extern GType vips_foreign_load_ppm_get_type( void ); extern GType vips_foreign_save_ppm_get_type( void ); extern GType vips_foreign_load_png_get_type( void ); extern GType vips_foreign_load_png_buffer_get_type( void ); extern GType vips_foreign_save_png_file_get_type( void ); extern GType vips_foreign_save_png_buffer_get_type( void ); extern GType vips_foreign_load_csv_get_type( void ); extern GType vips_foreign_save_csv_get_type( void ); extern GType vips_foreign_load_matrix_get_type( void ); extern GType vips_foreign_save_matrix_get_type( void ); extern GType vips_foreign_print_matrix_get_type( void ); extern GType vips_foreign_load_fits_get_type( void ); extern GType vips_foreign_save_fits_get_type( void ); extern GType vips_foreign_load_analyze_get_type( void ); extern GType vips_foreign_load_openexr_get_type( void ); extern GType vips_foreign_load_openslide_get_type( void ); extern GType vips_foreign_load_jpeg_file_get_type( void ); extern GType vips_foreign_load_jpeg_buffer_get_type( void ); extern GType vips_foreign_save_jpeg_file_get_type( void ); extern GType vips_foreign_save_jpeg_buffer_get_type( void ); extern GType vips_foreign_save_jpeg_mime_get_type( void ); extern GType vips_foreign_load_tiff_get_type( void ); extern GType vips_foreign_save_tiff_get_type( void ); extern GType vips_foreign_load_vips_get_type( void ); extern GType vips_foreign_save_vips_get_type( void ); extern GType vips_foreign_load_raw_get_type( void ); extern GType vips_foreign_save_raw_get_type( void ); extern GType vips_foreign_save_raw_fd_get_type( void ); extern GType vips_foreign_load_magick_get_type( void ); extern GType vips_foreign_save_dz_get_type( void ); extern GType vips_foreign_load_webp_file_get_type( void ); extern GType vips_foreign_load_webp_buffer_get_type( void ); extern GType vips_foreign_save_webp_file_get_type( void ); extern GType vips_foreign_save_webp_buffer_get_type( void ); vips_foreign_load_rad_get_type(); vips_foreign_save_rad_get_type(); vips_foreign_load_ppm_get_type(); vips_foreign_save_ppm_get_type(); vips_foreign_load_csv_get_type(); vips_foreign_save_csv_get_type(); vips_foreign_load_matrix_get_type(); vips_foreign_save_matrix_get_type(); vips_foreign_print_matrix_get_type(); vips_foreign_load_analyze_get_type(); vips_foreign_load_raw_get_type(); vips_foreign_save_raw_get_type(); vips_foreign_save_raw_fd_get_type(); vips_foreign_load_vips_get_type(); vips_foreign_save_vips_get_type(); vips_foreign_save_dz_get_type(); #ifdef HAVE_PNG vips_foreign_load_png_get_type(); vips_foreign_load_png_buffer_get_type(); vips_foreign_save_png_file_get_type(); vips_foreign_save_png_buffer_get_type(); #endif /*HAVE_PNG*/ #ifdef HAVE_MATIO vips_foreign_load_mat_get_type(); #endif /*HAVE_MATIO*/ #ifdef HAVE_JPEG vips_foreign_load_jpeg_file_get_type(); vips_foreign_load_jpeg_buffer_get_type(); vips_foreign_save_jpeg_file_get_type(); vips_foreign_save_jpeg_buffer_get_type(); vips_foreign_save_jpeg_mime_get_type(); #endif /*HAVE_JPEG*/ #ifdef HAVE_LIBWEBP vips_foreign_load_webp_file_get_type(); vips_foreign_load_webp_buffer_get_type(); vips_foreign_save_webp_file_get_type(); vips_foreign_save_webp_buffer_get_type(); #endif /*HAVE_LIBWEBP*/ #ifdef HAVE_TIFF vips_foreign_load_tiff_get_type(); vips_foreign_save_tiff_get_type(); #endif /*HAVE_TIFF*/ #ifdef HAVE_OPENSLIDE vips_foreign_load_openslide_get_type(); #endif /*HAVE_OPENSLIDE*/ #ifdef HAVE_MAGICK vips_foreign_load_magick_get_type(); #endif /*HAVE_MAGICK*/ #ifdef HAVE_CFITSIO vips_foreign_load_fits_get_type(); vips_foreign_save_fits_get_type(); #endif /*HAVE_CFITSIO*/ #ifdef HAVE_OPENEXR vips_foreign_load_openexr_get_type(); #endif /*HAVE_OPENEXR*/ } /** * vips_magickload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @all_frames: load all frames in sequence * * Read in an image using libMagick, the ImageMagick library. This library can * read more than 80 file formats, including SVG, BMP, EPS, DICOM and many * others. * The reader can handle any ImageMagick image, including the float and double * formats. It will work with any quantum size, including HDR. Any metadata * attached to the libMagick image is copied on to the VIPS image. * * The reader should also work with most versions of GraphicsMagick. See the * "--with-magickpackage" configure option. * * Normally it will only load the first image in a many-image sequence (such * as a GIF). Set @all_frames to true to read the whole image sequence. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_magickload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "magickload", ap, filename, out ); va_end( ap ); return( result ); } /** * vips_tiffload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @page: load this page * * Read a TIFF file into a VIPS image. It is a full baseline TIFF 6 reader, * with extensions for tiled images, multipage images, LAB colour space, * pyramidal images and JPEG compression. including CMYK and YCbCr. * * @page means load this page from the file. By default the first page (page * 0) is read. * * Any ICC profile is read and attached to the VIPS image. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_tiffload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "tiffload", ap, filename, out ); va_end( ap ); return( result ); } /** * vips_tiffsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @compression; use this compression scheme * @Q: quality factor * @predictor; compress with this prediction * @profile: attach this ICC profile * @tile; set %TRUE to write a tiled tiff * @tile_width; set tile size * @tile_height; set tile size * @pyramid; set %TRUE to write an image pyramid * @squash; squash 8-bit images down to 1 bit * @resunit; convert resolution to pixels per inch or cm during write * @xres; horizontal resolution in pixels/mm * @yres; vertical resolution in pixels/mm * @bigtiff; write a BigTiff file * * Write a VIPS image to a file as TIFF. * * Use @compression to set the tiff compression. Currently jpeg, packbits, * fax4, lzw, none and deflate are supported. The default is no compression. * JPEG compression is a good lossy compressor for photographs, packbits is * good for 1-bit images, and deflate is the best lossless compression TIFF * can do. LZW has patent problems and is no longer recommended. * * Use @Q to set the JPEG compression factor. Default 75. * * Use @predictor to set the predictor for lzw and deflate compression. * * Predictor is not set by default. There are three predictor values recognised * at the moment (2007, July): 1 is no prediction, 2 is a horizontal * differencing and 3 is a floating point predictor. Refer to the libtiff * specifications for further discussion of various predictors. In short, * predictor helps to better compress image, especially in case of digital * photos or scanned images and bit depths > 8. Try it to find whether it * works for your images. * * Use @profile to give the filename of a profile to be embedded in the TIFF. * This does not affect the pixels which are written, just the way * they are tagged. You can use the special string "none" to mean * "don't attach a profile". * * If no profile is specified and the VIPS header * contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the * profile from the VIPS header will be attached. * * Set @tile to TRUE to write a tiled tiff. By default tiff are written in * strips. Use @tile_width and @tile_height to set the tile size. The defaiult * is 128 by 128. * * Set @pyramid to write the image as a set of images, one per page, of * decreasing size. * * Set @squash to make 8-bit uchar images write as 1-bit TIFFs with zero * pixels written as 0 and non-zero as 1. * * Use @resunit to override the default resolution unit. * The default * resolution unit is taken from the header field "resolution-unit" * (#VIPS_META_RESOLUTION_UNIT in C). If this field is not set, then * VIPS defaults to cm. * * Use @xres and @yres to override the default horizontal and vertical * resolutions. By default these values are taken from the VIPS image header. * libvips resolution is always in pixels per millimetre. * * Set @bigtiff to attempt to write a bigtiff. * Bigtiff is a variant of the TIFF * format that allows more than 4GB in a file. * * See also: vips_tiffload(), vips_image_write_file(). * * Returns: 0 on success, -1 on error. */ int vips_tiffsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "tiffsave", ap, in, filename ); va_end( ap ); return( result ); } /** * vips_jpegload_buffer: * @buf: memory area to load * @len: size of memory area * @out: image to write * @...: %NULL-terminated list of optional named arguments * * Read a JPEG-formatted memory block into a VIPS image. It can read most * 8-bit JPEG images, including CMYK and YCbCr. * * This function is handy for processing JPEG image thumbnails. * * Caution: on return only the header will have been read, the pixel data is * not decompressed until the first pixel is read. Therefore you must not free * @buf until you have read pixel data from @out. * * See also: vips_jpegload(). * * Returns: 0 on success, -1 on error. */ int vips_jpegload_buffer( void *buf, size_t len, VipsImage **out, ... ) { va_list ap; VipsArea *area; int result; /* We don't take a copy of the data or free it. */ area = vips_area_new_blob( NULL, buf, len ); va_start( ap, out ); result = vips_call_split( "jpegload_buffer", ap, area, out ); va_end( ap ); vips_area_unref( area ); return( result ); } /** * vips_jpegload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @shrink: shrink by this much on load * @fail: fail on warnings * * Read a JPEG file into a VIPS image. It can read most 8-bit JPEG images, * including CMYK and YCbCr. * * @shrink means shrink by this integer factor during load. Possible values * are 1, 2, 4 and 8. Shrinking during read is very much faster than * decompressing the whole image and then shrinking later. * * Setting @fail to true makes the JPEG reader fail on any warnings. * This can be useful for detecting truncated files, for example. Normally * reading these produces a warning, but no fatal error. * * Example: * * |[ * vips_jpegload( "fred.jpg", &out, * "shrink", 8, * "fail", TRUE, * NULL ); * ]| * * Any embedded ICC profiles are ignored: you always just get the RGB from * the file. Instead, the embedded profile will be attached to the image as * @VIPS_META_ICC_NAME ("icc-profile-data"). You need to use something like * vips_icc_import() to get CIE values from the file. * * EXIF metadata is attached as @VIPS_META_EXIF_NAME ("exif-data"), IPCT as * @VIPS_META_IPCT_NAME ("ipct-data"), and XMP as VIPS_META_XMP_NAME * ("xmp-data"). * * The int metadata item "jpeg-multiscan" is set to the result of * jpeg_has_multiple_scans(). Interlaced jpeg images need a large amount of * memory to load, so this field gives callers a chance to handle these * images differently. * * The EXIF thumbnail, if present, is attached to the image as * "jpeg-thumbnail-data". See vips_image_get_blob(). * * This function only reads the image header and does not decompress any pixel * data. Decompression only occurs when pixels are accessed by some other * function. * * See also: vips_jpegload_buffer(), vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_jpegload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "jpegload", ap, filename, out ); va_end( ap ); return( result ); } /** * vips_jpegsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @Q: quality factor * @profile: attach this ICC profile * @optimize_coding: compute optimal Huffman coding tables * @interlace: write an interlaced (progressive) jpeg * @strip: remove all metadata from image * @no-subsample: disable chroma subsampling * * Write a VIPS image to a file as JPEG. * * Use @Q to set the JPEG compression factor. Default 75. * * Use @profile to give the filename of a profile to be embedded in the JPEG. * This does not affect the pixels which are written, just the way * they are tagged. You can use the special string "none" to mean * "don't attach a profile". * * If no profile is specified and the VIPS header * contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the * profile from the VIPS header will be attached. * * The image is automatically converted to RGB, Monochrome or CMYK before * saving. * * EXIF data is constructed from @VIPS_META_EXIF_NAME ("exif-data"), then * modified with any other related tags on the image before being written to * the file. * * IPCT as @VIPS_META_IPCT_NAME ("ipct-data") and XMP as VIPS_META_XMP_NAME * ("xmp-data") are coded and attached. * * If @optimize_coding is set, the Huffman tables are optimised. This is * sllightly slower and produces slightly smaller files. * * If @interlace is set, the jpeg files will be interlaced (progressive jpeg, * in jpg parlance). These files may be better for display over a slow network * conection, but need much more memory to encode and decode. * * If @strip is set, no EXIF data, IPCT data, ICC profile or XMP metadata is * written into the output file. * * If @no-subsample is set, chrominance subsampling is disabled. This will * improve quality at the cost of larger file size. Useful for high Q factors. * * See also: vips_jpegsave_buffer(), vips_image_write_file(). * * Returns: 0 on success, -1 on error. */ int vips_jpegsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "jpegsave", ap, in, filename ); va_end( ap ); return( result ); } /** * vips_jpegsave_buffer: * @in: image to save * @buf: return output buffer here * @len: return output length here * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @Q: JPEG quality factor * @profile: attach this ICC profile * @optimize_coding: compute optimal Huffman coding tables * @interlace: write an interlaced (progressive) jpeg * @strip: remove all metadata from image * @no-subsample: disable chroma subsampling * * As vips_jpegsave(), but save to a memory buffer. * * The address of the buffer is returned in @obuf, the length of the buffer in * @olen. You are responsible for freeing the buffer with g_free() when you * are done with it. * * See also: vips_jpegsave(), vips_image_write_to_file(). * * Returns: 0 on success, -1 on error. */ int vips_jpegsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) { va_list ap; VipsArea *area; int result; area = NULL; va_start( ap, len ); result = vips_call_split( "jpegsave_buffer", ap, in, &area ); va_end( ap ); if( !result && area ) { if( buf ) { *buf = area->data; area->free_fn = NULL; } if( buf ) *len = area->length; vips_area_unref( area ); } return( result ); } /** * vips_jpegsave_mime: * @in: image to save * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @Q: JPEG quality factor * @profile: attach this ICC profile * @optimize_coding: compute optimal Huffman coding tables * @strip: remove all metadata from image * @no-subsample: disable chroma subsampling * * As vips_jpegsave(), but save as a mime jpeg on stdout. * * See also: vips_jpegsave(), vips_image_write_to_file(). * * Returns: 0 on success, -1 on error. */ int vips_jpegsave_mime( VipsImage *in, ... ) { va_list ap; int result; va_start( ap, in ); result = vips_call_split( "jpegsave_mime", ap, in ); va_end( ap ); return( result ); } /** * vips_webpload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * * Read a webp file into a VIPS image. * * See also: * * Returns: 0 on success, -1 on error. */ int vips_webpload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "webpload", ap, filename, out ); va_end( ap ); return( result ); } /** * vips_webpload_buffer: * @buf: memory area to load * @len: size of memory area * @out: image to write * @...: %NULL-terminated list of optional named arguments * * See also: * * Returns: 0 on success, -1 on error. */ int vips_webpload_buffer( void *buf, size_t len, VipsImage **out, ... ) { va_list ap; VipsArea *area; int result; /* We don't take a copy of the data or free it. */ area = vips_area_new_blob( NULL, buf, len ); va_start( ap, out ); result = vips_call_split( "webpload_buffer", ap, area, out ); va_end( ap ); vips_area_unref( area ); return( result ); } /** * vips_webpsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @Q: quality factor * * See also: * * Returns: 0 on success, -1 on error. */ int vips_webpsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "webpsave", ap, in, filename ); va_end( ap ); return( result ); } /** * vips_webpsave_buffer: * @in: image to save * @buf: return output buffer here * @len: return output length here * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @Q: JPEG quality factor * * See also: * * Returns: 0 on success, -1 on error. */ int vips_webpsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) { va_list ap; VipsArea *area; int result; area = NULL; va_start( ap, len ); result = vips_call_split( "webpsave_buffer", ap, in, &area ); va_end( ap ); if( !result && area ) { if( buf ) { *buf = area->data; area->free_fn = NULL; } if( buf ) *len = area->length; vips_area_unref( area ); } return( result ); } /** * vips_webpsave_mime: * @in: image to save * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @Q: quality factor * * See also: * * Returns: 0 on success, -1 on error. */ int vips_webpsave_mime( VipsImage *in, ... ) { va_list ap; int result; va_start( ap, in ); result = vips_call_split( "webpsave_mime", ap, in ); va_end( ap ); return( result ); } /** * vips_openexrload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Read a OpenEXR file into a VIPS image. * * The reader can handle scanline and tiled OpenEXR images. It can't handle * OpenEXR colour management, image attributes, many pixel formats, anything * other than RGBA. * * This reader uses the rather limited OpenEXR C API. It should really be * redone in C++. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_openexrload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "openexrload", ap, filename, out ); va_end( ap ); return( result ); } /** * vips_openslideload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @layer: load this layer * @associated: load this associated image * * Read a virtual slide supported by the OpenSlide library into a VIPS image. * OpenSlide supports images in Aperio, Hamamatsu VMS, Hamamatsu VMU, MIRAX, * and Trestle formats. * * To facilitate zooming, virtual slide formats include multiple scaled-down * versions of the high-resolution image. These are typically called * "levels", though OpenSlide and im_openslide2vips() call them "layers". * By default, vips_openslideload() reads the highest-resolution layer * (layer 0). Set @layer to the layer number you want. * * In addition to the slide image itself, virtual slide formats sometimes * include additional images, such as a scan of the slide's barcode. * OpenSlide calls these "associated images". To read an associated image, * set @associated to the image's name. * A slide's associated images are listed in the * "slide-associated-images" metadata item. * * The output of this operator is in pre-multipled ARGB format. Use * im_argb2rgba() to decode to png-style RGBA. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_openslideload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "openslideload", ap, filename, out ); va_end( ap ); return( result ); } /** * vips_fitsload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Read a FITS image file into a VIPS image. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_fitsload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "fitsload", ap, filename, out ); va_end( ap ); return( result ); } /** * vips_fitssave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Write a VIPS image to a file as FITS. * * See also: vips_image_write_file(). * * Returns: 0 on success, -1 on error. */ int vips_fitssave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "fitssave", ap, in, filename ); va_end( ap ); return( result ); } /** * vips_pngload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * Read a PNG file into a VIPS image. It can read all png images, including 8- * and 16-bit images, 1 and 3 channel, with and without an alpha channel. * * Any ICC profile is read and attached to the VIPS image. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_pngload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "pngload", ap, filename, out ); va_end( ap ); return( result ); } /** * vips_pngload_buffer: * @buf: memory area to load * @len: size of memory area * @out: image to write * @...: %NULL-terminated list of optional named arguments * * Read a PNG-formatted memory block into a VIPS image. It can read all png * images, including 8- and 16-bit images, 1 and 3 channel, with and without * an alpha channel. * * Any ICC profile is read and attached to the VIPS image. * * Caution: on return only the header will have been read, the pixel data is * not decompressed until the first pixel is read. Therefore you must not free * @buf until you have read pixel data from @out. * * See also: vips_pngload(). * * Returns: 0 on success, -1 on error. */ int vips_pngload_buffer( void *buf, size_t len, VipsImage **out, ... ) { va_list ap; VipsArea *area; int result; /* We don't take a copy of the data or free it. */ area = vips_area_new_blob( NULL, buf, len ); va_start( ap, out ); result = vips_call_split( "pngload_buffer", ap, area, out ); va_end( ap ); vips_area_unref( area ); return( result ); } /** * vips_pngsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @compression: compression level * @interlace: interlace image * * Write a VIPS image to a file as PNG. * * @compression means compress with this much effort (0 - 9). Default 6. * * Set @interlace to %TRUE to interlace the image with ADAM7 * interlacing. Beware * than an interlaced PNG can be up to 7 times slower to write than a * non-interlaced image. * * If the VIPS header * contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the * profile from the VIPS header will be attached. * * The image is automatically converted to RGB, RGBA, Monochrome or Mono + * alpha before saving. Images with more than one byte per band element are * saved as 16-bit PNG, others are saved as 8-bit PNG. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_pngsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "pngsave", ap, in, filename ); va_end( ap ); return( result ); } /** * vips_pngsave_buffer: * @in: image to save * @buf: return output buffer here * @len: return output length here * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @compression: compression level * @interlace: interlace image * * As vips_pngsave(), but save to a memory buffer. * * The address of the buffer is returned in @obuf, the length of the buffer in * @olen. You are responsible for freeing the buffer with g_free() when you * are done with it. * * See also: vips_pngsave(), vips_image_write_to_file(). * * Returns: 0 on success, -1 on error. */ int vips_pngsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) { va_list ap; VipsArea *area; int result; area = NULL; va_start( ap, len ); result = vips_call_split( "pngsave_buffer", ap, in, &area ); va_end( ap ); if( !result && area ) { if( buf ) { *buf = area->data; area->free_fn = NULL; } if( buf ) *len = area->length; vips_area_unref( area ); } return( result ); } /** * vips_matload: * @filename: file to load * @out: output image * @...: %NULL-terminated list of optional named arguments * * Read a Matlab save file into a VIPS image. * * This operation searches the save * file for the first array variable with between 1 and 3 dimensions and loads * it as an image. It will not handle complex images. It does not handle * sparse matrices. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_matload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "matload", ap, filename, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/webp2vips.c0000644000175000017500000001367312303141213014706 00000000000000/* read with libwebp * * 6/8/13 * - from png2vips.c * 24/2/14 * - oops, buffer path was broken, thanks Lovell */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* */ #define DEBUG_VERBOSE #define DEBUG #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_LIBWEBP #include #include #include #include #include "webp.h" /* How many bytes do we need to read from the start of the file to be able to * validate the header? * * This doesn't seem to be documented anywhere :-( guess a value. */ #define MINIMAL_HEADER (100) /* What we track during a read. */ typedef struct { /* File source. */ char *filename; /* Memory source. We se gint64 rather than size_t since we use * vips_file_length() and vips__mmap() for file sources. */ void *data; gint64 length; /* If we are opening a file object, the fd. */ int fd; /* Decoder config. */ WebPDecoderConfig config; /* Incremental decoder state. */ WebPIDecoder *idec; } Read; int vips__iswebp( const char *filename ) { unsigned char header[MINIMAL_HEADER]; if( vips__get_bytes( filename, header, MINIMAL_HEADER ) && WebPGetInfo( header, MINIMAL_HEADER, NULL, NULL ) ) return( 1 ); return( 0 ); } static int read_free( Read *read ) { VIPS_FREEF( WebPIDelete, read->idec ); WebPFreeDecBuffer( &read->config.output ); if( read->fd && read->data && read->length ) { vips__munmap( read->data, read->length ); read->data = NULL; read->length = 0; } VIPS_FREEF( vips_tracked_close, read->fd ); VIPS_FREE( read->filename ); VIPS_FREE( read ); return( 0 ); } static Read * read_new( const char *filename, void *data, size_t length ) { Read *read; if( !(read = VIPS_NEW( NULL, Read )) ) return( NULL ); read->filename = g_strdup( filename ); read->data = data; read->length = length; read->fd = 0; read->idec = NULL; if( read->filename ) { /* libwebp makes streaming from a file source very hard. We * have to read to a full memory buffer, then copy to out. * * mmap the input file, it's slightly quicker. */ if( !(read->fd = vips__open_image_read( read->filename )) || (read->length = vips_file_length( read->fd )) < 0 || !(read->data = vips__mmap( read->fd, FALSE, read->length, 0 )) ) { read_free( read ); return( NULL ); } } WebPInitDecoderConfig( &read->config ); if( WebPGetFeatures( read->data, MINIMAL_HEADER, &read->config.input ) != VP8_STATUS_OK ) { read_free( read ); return( NULL ); } if( read->config.input.has_alpha ) read->config.output.colorspace = MODE_RGBA; else read->config.output.colorspace = MODE_RGB; read->config.options.use_threads = TRUE; return( read ); } static int read_header( Read *read, VipsImage *out ) { vips_image_init_fields( out, read->config.input.width, read->config.input.height, read->config.input.has_alpha ? 4 : 3, VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, VIPS_INTERPRETATION_sRGB, 1.0, 1.0 ); vips_image_pipelinev( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL ); return( 0 ); } int vips__webp_read_file_header( const char *filename, VipsImage *out ) { Read *read; if( !(read = read_new( filename, NULL, 0 )) ) { vips_error( "webp2vips", _( "unable to open \"%s\"" ), filename ); return( -1 ); } if( read_header( read, out ) ) return( -1 ); read_free( read ); return( 0 ); } typedef uint8_t *(*webp_decoder)( const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride ); static int read_image( Read *read, VipsImage *out ) { VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 3 ); webp_decoder decoder; t[0] = vips_image_new_buffer(); if( read_header( read, t[0] ) ) return( -1 ); if( vips_image_write_prepare( t[0] ) ) return( -1 ); if( t[0]->Bands == 3 ) decoder = WebPDecodeRGBInto; else decoder = WebPDecodeRGBAInto; if( !decoder( (uint8_t *) read->data, read->length, VIPS_IMAGE_ADDR( t[0], 0, 0 ), VIPS_IMAGE_SIZEOF_IMAGE( t[0] ), VIPS_IMAGE_SIZEOF_LINE( t[0] ) ) ) { vips_error( "webp2vips", "%s", _( "unable to read pixels" ) ); return( -1 ); } if( vips_image_write( t[0], out ) ) return( -1 ); return( 0 ); } int vips__webp_read_file( const char *filename, VipsImage *out ) { Read *read; if( !(read = read_new( filename, NULL, 0 )) ) { vips_error( "webp2vips", _( "unable to open \"%s\"" ), filename ); return( -1 ); } if( read_image( read, out ) ) return( -1 ); read_free( read ); return( 0 ); } int vips__webp_read_buffer_header( void *buf, size_t len, VipsImage *out ) { Read *read; if( !(read = read_new( NULL, buf, len )) ) { vips_error( "webp2vips", "%s", _( "unable to open buffer" ) ); return( -1 ); } if( read_header( read, out ) ) return( -1 ); read_free( read ); return( 0 ); } int vips__webp_read_buffer( void *buf, size_t len, VipsImage *out ) { Read *read; if( !(read = read_new( NULL, buf, len )) ) { vips_error( "webp2vips", "%s", _( "unable to open buffer" ) ); return( -1 ); } if( read_image( read, out ) ) return( -1 ); return( 0 ); } #endif /*HAVE_LIBWEBP*/ vips-7.38.5/libvips/foreign/openslide2vips.h0000644000175000017500000000270112303140253015731 00000000000000/* common defs for jpeg read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_OPENSLIDE2VIPS_H #define VIPS_OPENSLIDE2VIPS_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips__openslide_isslide( const char *filename ); int vips__openslide_read_header( const char *filename, VipsImage *out, int level, char *associated ); int vips__openslide_read( const char *filename, VipsImage *out, int level ); int vips__openslide_read_associated( const char *filename, VipsImage *out, const char *associated ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_OPENSLIDE2VIPS_H*/ vips-7.38.5/libvips/foreign/jpegsave.c0000644000175000017500000002172112303140253014565 00000000000000/* save to jpeg * * 24/11/11 * - wrap a class around the jpeg writer */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_JPEG #include #include #include #include #ifdef HAVE_EXIF #ifdef UNTAGGED_EXIF #include #include #include #include #else /*!UNTAGGED_EXIF*/ #include #include #include #include #endif /*UNTAGGED_EXIF*/ #endif /*HAVE_EXIF*/ #include #include #include #include "vipsjpeg.h" typedef struct _VipsForeignSaveJpeg { VipsForeignSave parent_object; /* Quality factor. */ int Q; /* Profile to embed .. "none" means don't attach a profile. */ char *profile; /* Compute optimal Huffman coding tables. */ gboolean optimize_coding; /* Generate an interlaced (progressive, in jpg terminology) file. */ gboolean interlace; /* Disable chroma subsampling. */ gboolean no_subsample; } VipsForeignSaveJpeg; typedef VipsForeignSaveClass VipsForeignSaveJpegClass; G_DEFINE_ABSTRACT_TYPE( VipsForeignSaveJpeg, vips_foreign_save_jpeg, VIPS_TYPE_FOREIGN_SAVE ); #define UC VIPS_FORMAT_UCHAR /* Type promotion for save ... just always go to uchar. */ static int bandfmt_jpeg[10] = { /* UC C US S UI I F X D DX */ UC, UC, UC, UC, UC, UC, UC, UC, UC, UC }; static void vips_foreign_save_jpeg_class_init( VipsForeignSaveJpegClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "jpegsave_base"; object_class->description = _( "save jpeg" ); save_class->saveable = VIPS_SAVEABLE_RGB_CMYK; save_class->format_table = bandfmt_jpeg; VIPS_ARG_INT( class, "Q", 10, _( "Q" ), _( "Q factor" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveJpeg, Q ), 1, 100, 75 ); VIPS_ARG_STRING( class, "profile", 11, _( "Profile" ), _( "ICC profile to embed" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveJpeg, profile ), NULL ); VIPS_ARG_BOOL( class, "optimize_coding", 12, _( "Optimize_coding" ), _( "Compute optimal Huffman coding tables" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveJpeg, optimize_coding ), FALSE ); VIPS_ARG_BOOL( class, "interlace", 13, _( "Interlace" ), _( "Generate an interlaced (progressive) jpeg" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveJpeg, interlace ), FALSE ); VIPS_ARG_BOOL( class, "no_subsample", 14, _( "No subsample" ), _( "Disable chroma subsample" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveJpeg, no_subsample ), FALSE ); } static void vips_foreign_save_jpeg_init( VipsForeignSaveJpeg *jpeg ) { jpeg->Q = 75; } typedef struct _VipsForeignSaveJpegFile { VipsForeignSaveJpeg parent_object; /* Filename for save. */ char *filename; } VipsForeignSaveJpegFile; typedef VipsForeignSaveJpegClass VipsForeignSaveJpegFileClass; G_DEFINE_TYPE( VipsForeignSaveJpegFile, vips_foreign_save_jpeg_file, vips_foreign_save_jpeg_get_type() ); static int vips_foreign_save_jpeg_file_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveJpeg *jpeg = (VipsForeignSaveJpeg *) object; VipsForeignSaveJpegFile *file = (VipsForeignSaveJpegFile *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_jpeg_file_parent_class )-> build( object ) ) return( -1 ); if( vips__jpeg_write_file( save->ready, file->filename, jpeg->Q, jpeg->profile, jpeg->optimize_coding, jpeg->interlace, save->strip, jpeg->no_subsample ) ) return( -1 ); return( 0 ); } static void vips_foreign_save_jpeg_file_class_init( VipsForeignSaveJpegFileClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "jpegsave"; object_class->description = _( "save image to jpeg file" ); object_class->build = vips_foreign_save_jpeg_file_build; foreign_class->suffs = vips__jpeg_suffs; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveJpegFile, filename ), NULL ); } static void vips_foreign_save_jpeg_file_init( VipsForeignSaveJpegFile *file ) { } typedef struct _VipsForeignSaveJpegBuffer { VipsForeignSaveJpeg parent_object; /* Save to a buffer. */ VipsArea *buf; } VipsForeignSaveJpegBuffer; typedef VipsForeignSaveJpegClass VipsForeignSaveJpegBufferClass; G_DEFINE_TYPE( VipsForeignSaveJpegBuffer, vips_foreign_save_jpeg_buffer, vips_foreign_save_jpeg_get_type() ); static int vips_foreign_save_jpeg_buffer_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveJpeg *jpeg = (VipsForeignSaveJpeg *) object; VipsForeignSaveJpegBuffer *file = (VipsForeignSaveJpegBuffer *) object; void *obuf; size_t olen; VipsArea *area; if( VIPS_OBJECT_CLASS( vips_foreign_save_jpeg_buffer_parent_class )-> build( object ) ) return( -1 ); if( vips__jpeg_write_buffer( save->ready, &obuf, &olen, jpeg->Q, jpeg->profile, jpeg->optimize_coding, jpeg->interlace, save->strip, jpeg->no_subsample ) ) return( -1 ); area = vips_area_new_blob( (VipsCallbackFn) vips_free, obuf, olen ); g_object_set( file, "buffer", area, NULL ); vips_area_unref( area ); return( 0 ); } static void vips_foreign_save_jpeg_buffer_class_init( VipsForeignSaveJpegBufferClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "jpegsave_buffer"; object_class->description = _( "save image to jpeg buffer" ); object_class->build = vips_foreign_save_jpeg_buffer_build; VIPS_ARG_BOXED( class, "buffer", 1, _( "Buffer" ), _( "Buffer to save to" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsForeignSaveJpegBuffer, buf ), VIPS_TYPE_BLOB ); } static void vips_foreign_save_jpeg_buffer_init( VipsForeignSaveJpegBuffer *file ) { } typedef struct _VipsForeignSaveJpegMime { VipsForeignSaveJpeg parent_object; } VipsForeignSaveJpegMime; typedef VipsForeignSaveJpegClass VipsForeignSaveJpegMimeClass; G_DEFINE_TYPE( VipsForeignSaveJpegMime, vips_foreign_save_jpeg_mime, vips_foreign_save_jpeg_get_type() ); static int vips_foreign_save_jpeg_mime_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveJpeg *jpeg = (VipsForeignSaveJpeg *) object; void *obuf; size_t olen; if( VIPS_OBJECT_CLASS( vips_foreign_save_jpeg_mime_parent_class )-> build( object ) ) return( -1 ); if( vips__jpeg_write_buffer( save->ready, &obuf, &olen, jpeg->Q, jpeg->profile, jpeg->optimize_coding, jpeg->interlace, save->strip, jpeg->no_subsample ) ) return( -1 ); printf( "Content-length: %zd\r\n", olen ); printf( "Content-type: image/jpeg\r\n" ); printf( "\r\n" ); if( fwrite( obuf, sizeof( char ), olen, stdout ) != olen ) { vips_error( "VipsJpeg", "%s", _( "error writing output" ) ); return( -1 ); } fflush( stdout ); g_free( obuf ); return( 0 ); } static void vips_foreign_save_jpeg_mime_class_init( VipsForeignSaveJpegMimeClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; object_class->nickname = "jpegsave_mime"; object_class->description = _( "save image to jpeg mime" ); object_class->build = vips_foreign_save_jpeg_mime_build; } static void vips_foreign_save_jpeg_mime_init( VipsForeignSaveJpegMime *mime ) { } #endif /*HAVE_JPEG*/ vips-7.38.5/libvips/foreign/magick.h0000644000175000017500000000241612303140253014221 00000000000000/* common defs for libMagick read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_MAGICK_H #define VIPS_MAGICK_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips__magick_read( const char *filename, VipsImage *out, gboolean all_frames ); int vips__magick_read_header( const char *filename, VipsImage *out, gboolean all_frames ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_MAGICK_H*/ vips-7.38.5/libvips/foreign/dzsave.c0000644000175000017500000011166012303140253014257 00000000000000/* save to deep zoom format * * 21/3/12 * - from the tiff pyramid writer * 5/7/12 (thanks Alexander Koshman) * - make tiles down to 1x1 pixels * - oop make right-hand edge tiles * - improve overlap handling * 7/7/12 * - threaded write * 6/8/12 (thanks to Benjamin Gilbert for pointing out the errors) * - shrink down to a 1x1 pixel tile, even for very long and thin images * - round image size up on shrink * - write a .dzi file with the pyramid params * - default tile size and overlap now matches the openslide writer * 7/8/12 (thanks to Benjamin Gilbert again for more testing) * - reorganise the directory structure * - rename to basename and tile_size * - deprecate tile_width/_height and dirname * 1/10/12 * - did not write low pyramid layers for images with an odd number of * scan lines (thanks Martin) * 2/10/12 * - remove filename options from format string in .dzi (thanks Martin) * 3/10/12 * - add zoomify and google maps output * 10/10/12 * - add @background option * 1/11/12 * - add @depth option * 21/1/13 * - add @centre option * 26/2/13 * - fix another corner case, thanks Martin * 29/5/13 * - add --angle option * 19/6/13 * - faster --centre logic, thanks Kacey */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* This is difficult to test, there are so many options. It's failed in the past in these cases. These have layers with strips which exactly align with image edges, or which have orphan scanlines which need adding for the shrink. 1. $ header test.v test.v: 14016x16448 uchar, 3 bands, srgb, openin VipsImage (0x11e7060) $ time vips dzsave test.v x --overlap 0 Not all layers written. 2. $ header ~/Desktop/leicaimage.scn /home/john/Desktop/leicaimage.scn: 4225x7905 uchar, 4 bands, rgb Not all layers written. 3. $ header ~/leicatest1.scn /home/john/leicatest1.scn: 11585x8449 uchar, 4 bands, rgb Not all layers written. various combinations of odd and even tile-size and overlap need testing too. */ /* #define DEBUG_VERBOSE #define DEBUG #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include /* Round N down to P boundary. */ #define ROUND_DOWN(N,P) ((N) - ((N) % P)) /* Round N up to P boundary. */ #define ROUND_UP(N,P) (ROUND_DOWN( (N) + (P) - 1, (P) )) typedef struct _VipsForeignSaveDz VipsForeignSaveDz; typedef struct _Layer Layer; /* A layer in the pyramid. */ struct _Layer { VipsForeignSaveDz *dz; /* The real size of the image. image->Xsize and image->Ysize are * always even to make x2 shrink easy. The real image may be a * smaller, odd size, */ int width; int height; /* Number of tiles across and down in this layer. Zoomify needs this * to calculate the directory to put each tile in. */ int tiles_across; int tiles_down; /* The rect within width/height that contains real image, as opposed * to background. In centre mode we can have large image borders. */ VipsRect real_pixels; /* The image we build. */ VipsImage *image; /* The top of this strip of tiles, excluding the overlap. Go up from * this to get to the top pixel we write in each one. */ int y; /* The next line we write to in this strip. */ int write_y; VipsRegion *strip; /* The current strip of pixels */ VipsRegion *copy; /* Pixels we copy to the next strip */ int sub; /* Subsample factor for this layer */ int n; /* Layer number ... 0 for smallest */ Layer *below; /* Tiles go to here */ Layer *above; /* Tiles come from here */ }; struct _VipsForeignSaveDz { VipsForeignSave parent_object; /* Name to write to. */ char *basename; char *suffix; int overlap; int tile_size; VipsForeignDzLayout layout; VipsArrayDouble *background; VipsForeignDzDepth depth; gboolean centre; VipsAngle angle; Layer *layer; /* x2 shrink pyr layer */ /* Count zoomify tiles we write. */ int tile_count; }; typedef VipsForeignSaveClass VipsForeignSaveDzClass; G_DEFINE_TYPE( VipsForeignSaveDz, vips_foreign_save_dz, VIPS_TYPE_FOREIGN_SAVE ); /* Free a pyramid. */ static void layer_free( Layer *layer ) { VIPS_FREEF( g_object_unref, layer->strip ); VIPS_FREEF( g_object_unref, layer->copy ); VIPS_FREEF( g_object_unref, layer->image ); VIPS_FREEF( layer_free, layer->below ); } static void vips_foreign_save_dz_dispose( GObject *gobject ) { VipsForeignSaveDz *dz = (VipsForeignSaveDz *) gobject; VIPS_FREEF( layer_free, dz->layer ); G_OBJECT_CLASS( vips_foreign_save_dz_parent_class )->dispose( gobject ); } /* Build a pyramid. * * width/height is the size of this layer, real_* the subsection of the layer * which is real pixels (as opposed to background). */ static Layer * pyramid_build( VipsForeignSaveDz *dz, Layer *above, int width, int height, VipsRect *real_pixels ) { VipsForeignSave *save = VIPS_FOREIGN_SAVE( dz ); Layer *layer = VIPS_NEW( dz, Layer ); VipsRect strip; int limit; layer->dz = dz; layer->width = width; layer->height = height; layer->tiles_across = ROUND_UP( width, dz->tile_size ) / dz->tile_size; layer->tiles_down = ROUND_UP( height, dz->tile_size ) / dz->tile_size; layer->real_pixels = *real_pixels; layer->image = NULL; layer->strip = NULL; layer->copy = NULL; if( !above ) /* Top of pyramid. */ layer->sub = 1; else layer->sub = above->sub * 2; layer->below = NULL; layer->above = above; /* We round the image size up to an even number to make x2 shrink * easy. */ layer->image = vips_image_new(); if( vips_image_pipelinev( layer->image, VIPS_DEMAND_STYLE_ANY, save->ready, NULL ) ) { layer_free( layer ); return( NULL ); } layer->image->Xsize = width + (width & 1); layer->image->Ysize = height + (height & 1); layer->strip = vips_region_new( layer->image ); layer->copy = vips_region_new( layer->image ); /* The regions will get used in the bg thread callback, so make sure * we don't own them. */ vips__region_no_ownership( layer->strip ); vips__region_no_ownership( layer->copy ); /* Build a line of tiles here. Normally strips are height + 2 * * overlap, but the first row is missing the top edge. * * Expand the strip if necessary to make sure we have an even * number of lines. */ layer->y = 0; layer->write_y = 0; strip.left = 0; strip.top = 0; strip.width = layer->image->Xsize; strip.height = dz->tile_size + dz->overlap; if( (strip.height & 1) == 1 ) strip.height += 1; if( vips_region_buffer( layer->strip, &strip ) ) { layer_free( layer ); return( NULL ); } switch( dz->depth ) { case VIPS_FOREIGN_DZ_DEPTH_1PIXEL: limit = 1; break; case VIPS_FOREIGN_DZ_DEPTH_1TILE: limit = dz->tile_size; break; case VIPS_FOREIGN_DZ_DEPTH_1: limit = VIPS_MAX( width, height ); break; default: g_assert( 0 ); limit = dz->tile_size; break; } if( width > limit || height > limit ) { /* Round up, so eg. a 5 pixel wide image becomes 3 a layer * down. * * For the rect, round left/top down, round bottom/right up, * so we get all possible pixels. */ VipsRect halfrect; halfrect.left = real_pixels->left / 2; halfrect.top = real_pixels->top / 2; halfrect.width = (VIPS_RECT_RIGHT( real_pixels ) + 1) / 2 - halfrect.left; halfrect.height = (VIPS_RECT_BOTTOM( real_pixels ) + 1) / 2 - halfrect.top; if( !(layer->below = pyramid_build( dz, layer, (width + 1) / 2, (height + 1) / 2, &halfrect )) ) { layer_free( layer ); return( NULL ); } layer->n = layer->below->n + 1; } else layer->n = 0; #ifdef DEBUG printf( "pyramid_build:\n" ); printf( "\tn = %d\n", layer->n ); printf( "\twidth = %d, height = %d\n", width, height ); printf( "\tXsize = %d, Ysize = %d\n", layer->image->Xsize, layer->image->Ysize ); printf( "\treal_pixels.left = %d, real_pixels.top = %d\n", real_pixels->left, real_pixels->top ); printf( "\treal_pixels.width = %d, real_pixels.height = %d\n", real_pixels->width, real_pixels->height ); #endif return( layer ); } static int pyramid_mkdir( VipsForeignSaveDz *dz ) { char buf[VIPS_PATH_MAX]; if( dz->layout == VIPS_FOREIGN_DZ_LAYOUT_DZ ) vips_snprintf( buf, VIPS_PATH_MAX, "%s_files", dz->basename ); else vips_snprintf( buf, VIPS_PATH_MAX, "%s", dz->basename ); if( vips_existsf( "%s", buf ) ) { vips_error( "dzsave", _( "Directory \"%s\" exists" ), buf ); return( -1 ); } if( vips_mkdirf( "%s", buf ) ) return( -1 ); return( 0 ); } static int write_dzi( VipsForeignSaveDz *dz ) { FILE *fp; char buf[VIPS_PATH_MAX]; char *p; vips_snprintf( buf, VIPS_PATH_MAX, "%s.dzi", dz->basename ); if( !(fp = vips__file_open_write( buf, TRUE )) ) return( -1 ); vips_snprintf( buf, VIPS_PATH_MAX, "%s", dz->suffix + 1 ); if( (p = (char *) vips__find_rightmost_brackets( buf )) ) *p = '\0'; fprintf( fp, "\n" ); fprintf( fp, "overlap ); fprintf( fp, " TileSize=\"%d\"\n", dz->tile_size ); fprintf( fp, " >\n" ); fprintf( fp, " layer->height ); fprintf( fp, " Width=\"%d\"\n", dz->layer->width ); fprintf( fp, " />\n" ); fprintf( fp, "\n" ); fclose( fp ); return( 0 ); } static int write_properties( VipsForeignSaveDz *dz ) { FILE *fp; char buf[VIPS_PATH_MAX]; vips_snprintf( buf, VIPS_PATH_MAX, "%s/ImageProperties.xml", dz->basename ); if( !(fp = vips__file_open_write( buf, TRUE )) ) return( -1 ); fprintf( fp, "\n", dz->layer->width, dz->layer->height, dz->tile_count, dz->tile_size ); fclose( fp ); return( 0 ); } static int write_blank( VipsForeignSaveDz *dz ) { char buf[VIPS_PATH_MAX]; VipsImage *x, *t; int n; VipsArea *ones; double *d; int i; vips_snprintf( buf, VIPS_PATH_MAX, "%s/blank.png", dz->basename ); if( vips_black( &x, dz->tile_size, dz->tile_size, NULL ) ) return( -1 ); vips_area_get_data( (VipsArea *) dz->background, NULL, &n, NULL, NULL ); ones = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), n ); d = (double *) vips_area_get_data( ones, NULL, NULL, NULL, NULL ); for( i = 0; i < n; i++ ) d[i] = 1.0; if( vips_linear( x, &t, d, (double *) vips_area_get_data( (VipsArea *) dz->background, NULL, NULL, NULL, NULL ), n, NULL ) ) { vips_area_unref( ones ); g_object_unref( x ); return( -1 ); } vips_area_unref( ones ); g_object_unref( x ); x = t; if( vips_image_write_to_file( x, buf ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } /* Generate area @target in @to using pixels in @from. VIPS_CODING_LABQ only. */ static void shrink_region_labpack( VipsRegion *from, VipsRegion *to, VipsRect *target ) { int ls = VIPS_REGION_LSKIP( from ); int x, y; for( y = 0; y < target->height; y++ ) { VipsPel *p = VIPS_REGION_ADDR( from, target->left * 2, (target->top + y) * 2 ); VipsPel *q = VIPS_REGION_ADDR( to, target->left, target->top + y ); /* Ignore the extra bits for speed. */ for( x = 0; x < target->width; x++ ) { signed char *sp = (signed char *) p; unsigned char *up = (unsigned char *) p; int l = up[0] + up[4] + up[ls] + up[ls + 4]; int a = sp[1] + sp[5] + sp[ls + 1] + sp[ls + 5]; int b = sp[2] + sp[6] + sp[ls + 2] + sp[ls + 6]; q[0] = l >> 2; q[1] = a >> 2; q[2] = b >> 2; q[3] = 0; q += 4; p += 8; } } } #define SHRINK_TYPE_INT( TYPE ) \ for( x = 0; x < target->width; x++ ) { \ TYPE *tp = (TYPE *) p; \ TYPE *tp1 = (TYPE *) (p + ls); \ TYPE *tq = (TYPE *) q; \ \ for( z = 0; z < nb; z++ ) { \ int tot = tp[z] + tp[z + nb] + \ tp1[z] + tp1[z + nb]; \ \ tq[z] = tot >> 2; \ } \ \ /* Move on two pels in input. \ */ \ p += ps << 1; \ q += ps; \ } #define SHRINK_TYPE_FLOAT( TYPE ) \ for( x = 0; x < target->width; x++ ) { \ TYPE *tp = (TYPE *) p; \ TYPE *tp1 = (TYPE *) (p + ls); \ TYPE *tq = (TYPE *) q; \ \ for( z = 0; z < nb; z++ ) { \ double tot = tp[z] + tp[z + nb] + \ tp1[z] + tp1[z + nb]; \ \ tq[z] = tot / 4; \ } \ \ /* Move on two pels in input. \ */ \ p += ps << 1; \ q += ps; \ } /* Generate area @target in @to using pixels in @from. Non-complex. */ static void shrink_region_uncoded( VipsRegion *from, VipsRegion *to, VipsRect *target ) { int ls = VIPS_REGION_LSKIP( from ); int ps = VIPS_IMAGE_SIZEOF_PEL( from->im ); int nb = from->im->Bands; int x, y, z; for( y = 0; y < target->height; y++ ) { VipsPel *p = VIPS_REGION_ADDR( from, target->left * 2, (target->top + y) * 2 ); VipsPel *q = VIPS_REGION_ADDR( to, target->left, target->top + y ); /* Process this line of pels. */ switch( from->im->BandFmt ) { case VIPS_FORMAT_UCHAR: SHRINK_TYPE_INT( unsigned char ); break; case VIPS_FORMAT_CHAR: SHRINK_TYPE_INT( signed char ); break; case VIPS_FORMAT_USHORT: SHRINK_TYPE_INT( unsigned short ); break; case VIPS_FORMAT_SHORT: SHRINK_TYPE_INT( signed short ); break; case VIPS_FORMAT_UINT: SHRINK_TYPE_INT( unsigned int ); break; case VIPS_FORMAT_INT: SHRINK_TYPE_INT( signed int ); break; case VIPS_FORMAT_FLOAT: SHRINK_TYPE_FLOAT( float ); break; case VIPS_FORMAT_DOUBLE: SHRINK_TYPE_FLOAT( double ); break; default: g_assert( 0 ); } } } /* Our state during a threaded write of a strip. */ typedef struct _Strip { Layer *layer; VipsImage *image; /* Allocate the next tile on this boundary. */ int x; } Strip; static void strip_free( Strip *strip ) { g_object_unref( strip->image ); } static void strip_init( Strip *strip, Layer *layer ) { VipsForeignSaveDz *dz = layer->dz; VipsRect line, image; strip->layer = layer; strip->image = NULL; strip->x = 0; /* The image we wrap around our pixel buffer must be the full width, * including any rounding up, since we must have contiguous pixels. * We can trim the height down though. * * When we loop across the strip writing tiles we have to look out for * the smaller width. */ image.left = 0; image.top = 0; image.width = layer->image->Xsize; image.height = layer->height; line.left = 0; line.top = layer->y - dz->overlap; line.width = image.width; line.height = dz->tile_size + 2 * dz->overlap; vips_rect_intersectrect( &image, &line, &line ); if( !(strip->image = vips_image_new_from_memory( VIPS_REGION_ADDR( layer->strip, 0, line.top ), line.width, line.height, layer->image->Bands, layer->image->BandFmt )) ) { strip_free( strip ); return; } } static int strip_allocate( VipsThreadState *state, void *a, gboolean *stop ) { Strip *strip = (Strip *) a; Layer *layer = strip->layer; VipsForeignSaveDz *dz = layer->dz; VipsRect image; #ifdef DEBUG_VERBOSE printf( "strip_allocate\n" ); #endif /*DEBUG_VERBOSE*/ image.left = 0; image.top = 0; image.width = layer->width; image.height = layer->height; /* Position this tile. */ state->pos.left = strip->x - dz->overlap; state->pos.top = 0; state->pos.width = dz->tile_size + 2 * dz->overlap; state->pos.height = state->im->Ysize; vips_rect_intersectrect( &image, &state->pos, &state->pos ); state->x = strip->x; state->y = layer->y; strip->x += dz->tile_size; if( vips_rect_isempty( &state->pos ) ) { *stop = TRUE; #ifdef DEBUG_VERBOSE printf( "strip_allocate: done\n" ); #endif /*DEBUG_VERBOSE*/ return( 0 ); } return( 0 ); } /* Create a tile name in the current layout. */ static int tile_name( Layer *layer, char *buf, int x, int y ) { /* Need to lock around exists()/mkdir() or there's a race. */ static GMutex *file_lock = NULL; static GOnce file_lock_once = G_ONCE_INIT; VipsForeignSaveDz *dz = layer->dz; char dirname[VIPS_PATH_MAX]; char dirname2[VIPS_PATH_MAX]; Layer *p; int n; file_lock = g_once( &file_lock_once, (GThreadFunc) vips_g_mutex_new, NULL ); g_mutex_lock( file_lock ); switch( dz->layout ) { case VIPS_FOREIGN_DZ_LAYOUT_DZ: vips_snprintf( dirname, VIPS_PATH_MAX, "%s_files/%d", dz->basename, layer->n ); vips_snprintf( buf, VIPS_PATH_MAX, "%s/%d_%d%s", dirname, x, y, dz->suffix ); if( !vips_existsf( "%s", dirname ) && vips_mkdirf( "%s", dirname ) ) { g_mutex_unlock( file_lock ); return( -1 ); } break; case VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY: /* We need to work out the tile number so we can calculate the * directory to put this tile in. * * Tiles are numbered from 0 for the most-zoomed-out tile. */ n = 0; /* Count all tiles in layers below this one. */ for( p = layer->below; p; p = p->below ) n += p->tiles_across * p->tiles_down; /* And count tiles so far in this layer. */ n += y * layer->tiles_across + x; vips_snprintf( dirname, VIPS_PATH_MAX, "%s/TileGroup%d", dz->basename, n / 256 ); vips_snprintf( buf, VIPS_PATH_MAX, "%s/%d-%d-%d%s", dirname, layer->n, x, y, dz->suffix ); /* Used at the end in ImageProperties.xml */ dz->tile_count += 1; if( !vips_existsf( "%s", dirname ) && vips_mkdirf( "%s", dirname ) ) { g_mutex_unlock( file_lock ); return( -1 ); } break; case VIPS_FOREIGN_DZ_LAYOUT_GOOGLE: vips_snprintf( dirname, VIPS_PATH_MAX, "%s/%d", dz->basename, layer->n ); vips_snprintf( dirname2, VIPS_PATH_MAX, "%s/%d", dirname, y ); vips_snprintf( buf, VIPS_PATH_MAX, "%s/%d%s", dirname2, x, dz->suffix ); if( !vips_existsf( "%s", dirname ) && vips_mkdirf( "%s", dirname ) ) { g_mutex_unlock( file_lock ); return( -1 ); } if( !vips_existsf( "%s", dirname2 ) && vips_mkdirf( "%s", dirname2 ) ) { g_mutex_unlock( file_lock ); return( -1 ); } break; default: g_assert( 0 ); g_mutex_unlock( file_lock ); return( -1 ); } g_mutex_unlock( file_lock ); return( 0 ); } static int strip_work( VipsThreadState *state, void *a ) { Strip *strip = (Strip *) a; Layer *layer = strip->layer; VipsForeignSaveDz *dz = layer->dz; char buf[VIPS_PATH_MAX]; VipsImage *x; VipsImage *t; #ifdef DEBUG_VERBOSE printf( "strip_work\n" ); #endif /*DEBUG_VERBOSE*/ /* If we are centring we may be outside the real pixels. Skip in * this case, and the viewer will display blank.png for us. */ if( dz->centre ) { VipsRect tile; tile.left = state->x; tile.top = state->y; tile.width = dz->tile_size; tile.height = dz->tile_size; vips_rect_intersectrect( &tile, &layer->real_pixels, &tile ); if( vips_rect_isempty( &tile ) ) { #ifdef DEBUG_VERBOSE printf( "strip_work: skipping tile %d x %d\n", state->x / dz->tile_size, state->y / dz->tile_size ); #endif /*DEBUG_VERBOSE*/ return( 0 ); } } if( tile_name( layer, buf, state->x / dz->tile_size, state->y / dz->tile_size ) ) return( -1 ); #ifdef DEBUG vips_object_sanity( VIPS_OBJECT( strip->image ) ); #endif /*DEBUG*/ /* Extract relative to the strip top-left corner. */ if( vips_extract_area( strip->image, &x, state->pos.left, 0, state->pos.width, state->pos.height, NULL ) ) return( -1 ); /* Google tiles need to be padded up to tilesize. */ if( dz->layout == VIPS_FOREIGN_DZ_LAYOUT_GOOGLE ) { if( vips_embed( x, &t, 0, 0, dz->tile_size, dz->tile_size, "background", dz->background, NULL ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); x = t; } #ifdef DEBUG_VERBOSE printf( "strip_work: writing to %s\n", buf ); #endif /*DEBUG_VERBOSE*/ if( vips_image_write_to_file( x, buf ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); #ifdef DEBUG_VERBOSE printf( "strip_work: success\n" ); #endif /*DEBUG_VERBOSE*/ return( 0 ); } /* Write a line of tiles with a threadpool. */ static int strip_save( Layer *layer ) { Strip strip; #ifdef DEBUG printf( "strip_save: n = %d, y = %d\n", layer->n, layer->y ); #endif /*DEBUG*/ strip_init( &strip, layer ); if( vips_threadpool_run( strip.image, vips_thread_state_new, strip_allocate, strip_work, NULL, &strip ) ) { strip_free( &strip ); return( -1 ); } strip_free( &strip ); return( 0 ); } /* A strip has filled, but the rightmost column and the bottom-most row may * not have been if we've rounded the size up. * * Fill them, if necessary, by copying the previous row/column. */ static void layer_generate_extras( Layer *layer ) { VipsRegion *strip = layer->strip; /* We only work for full-width strips. */ g_assert( strip->valid.width == layer->image->Xsize ); if( layer->width < layer->image->Xsize ) { int ps = VIPS_IMAGE_SIZEOF_PEL( strip->im ); int b, y; /* Need to add a right-most column. */ for( y = 0; y < strip->valid.height; y++ ) { VipsPel *p = VIPS_REGION_ADDR( strip, layer->width - 1, strip->valid.top + y ); VipsPel *q = p + ps; for( b = 0; b < ps; b++ ) q[b] = p[b]; } } if( layer->height < layer->image->Ysize ) { VipsRect last; /* The last two lines of the image. */ last.left = 0; last.top = layer->image->Ysize - 2; last.width = layer->image->Xsize; last.height = 2; /* Do we have them both? Fill the last with the next-to-last. */ vips_rect_intersectrect( &last, &strip->valid, &last ); if( last.height == 2 ) { last.height = 1; vips_region_copy( strip, strip, &last, 0, last.top + 1 ); } } } static int strip_arrived( Layer *layer ); /* Shrink what pixels we can from this strip into the layer below. If the * strip below fills, recurse. */ static int strip_shrink( Layer *layer ) { VipsForeignSaveDz *dz = layer->dz; VipsForeignSave *save = VIPS_FOREIGN_SAVE( dz ); Layer *below = layer->below; VipsRegion *from = layer->strip; VipsRegion *to = below->strip; VipsRect target; VipsRect source; /* We may have an extra column of pixels on the right or * bottom that need filling: generate them. */ layer_generate_extras( layer ); /* Our pixels might cross a strip boundary in the layer below, so we * have to write repeatedly until we run out of pixels. */ for(;;) { /* The pixels the layer below needs. */ target.left = 0; target.top = below->write_y; target.width = below->image->Xsize; target.height = to->valid.height; vips_rect_intersectrect( &target, &to->valid, &target ); /* Those pixels need this area of this layer. */ source.left = target.left * 2; source.top = target.top * 2; source.width = target.width * 2; source.height = target.height * 2; /* Of which we have these available. */ vips_rect_intersectrect( &source, &from->valid, &source ); /* So these are the pixels in the layer below we can provide. */ target.left = source.left / 2; target.top = source.top / 2; target.width = source.width / 2; target.height = source.height / 2; /* None? All done. */ if( vips_rect_isempty( &target ) ) break; if( save->ready->Coding == VIPS_CODING_NONE ) shrink_region_uncoded( from, to, &target ); else shrink_region_labpack( from, to, &target ); below->write_y += target.height; /* If we've filled the strip below, let it know. * We can either fill the region, if it's somewhere half-way * down the image, or, if it's at the bottom, get to the last * real line of pixels. */ if( below->write_y == VIPS_RECT_BOTTOM( &to->valid ) || below->write_y == below->height ) { if( strip_arrived( below ) ) return( -1 ); } } return( 0 ); } /* A new strip has arrived! The strip has enough pixels in to write a line of * tiles. * * - write a line of tiles * - shrink what we can to the layer below * - move our strip down by the tile height * - copy the overlap with the previous strip */ static int strip_arrived( Layer *layer ) { VipsForeignSaveDz *dz = layer->dz; VipsRect new_strip; VipsRect overlap; if( strip_save( layer ) ) return( -1 ); if( layer->below && strip_shrink( layer ) ) return( -1 ); /* Position our strip down the image. * * Expand the strip if necessary to make sure we have an even * number of lines. */ layer->y += dz->tile_size; new_strip.left = 0; new_strip.top = layer->y - dz->overlap; new_strip.width = layer->image->Xsize; new_strip.height = dz->tile_size + 2 * dz->overlap; if( (new_strip.height & 1) == 1 ) new_strip.height += 1; /* We may exactly hit the bottom of the real image (ie. before borders * have been possibly expanded by 1 pixel). In this case, we'll not * be able to do the expansion in layer_generate_extras(), since the * region won't be large enough, and we'll not get another chance * since this is the bottom. * * Add another scanline if this has happened. */ if( VIPS_RECT_BOTTOM( &new_strip ) == layer->height ) new_strip.height = layer->image->Ysize - new_strip.top; /* What pixels that we will need do we already have? Save them in * overlap. */ vips_rect_intersectrect( &new_strip, &layer->strip->valid, &overlap ); if( !vips_rect_isempty( &overlap ) ) { if( vips_region_buffer( layer->copy, &overlap ) ) return( -1 ); vips_region_copy( layer->strip, layer->copy, &overlap, overlap.left, overlap.top ); } if( vips_region_buffer( layer->strip, &new_strip ) ) return( -1 ); /* And copy back again. */ if( !vips_rect_isempty( &overlap ) ) vips_region_copy( layer->copy, layer->strip, &overlap, overlap.left, overlap.top ); return( 0 ); } /* Another strip of image pixels from vips_sink_disc(). Write into the top * pyramid layer. */ static int pyramid_strip( VipsRegion *region, VipsRect *area, void *a ) { VipsForeignSaveDz *dz = (VipsForeignSaveDz *) a; Layer *layer = dz->layer; #ifdef DEBUG printf( "pyramid_strip: strip at %d, height %d\n", area->top, area->height ); #endif/*DEBUG*/ for(;;) { VipsRect *to = &layer->strip->valid; VipsRect target; /* The bit of strip that needs filling. */ target.left = 0; target.top = layer->write_y; target.width = layer->image->Xsize; target.height = to->height; vips_rect_intersectrect( &target, to, &target ); /* Clip against what we have available. */ vips_rect_intersectrect( &target, area, &target ); /* Are we empty? All done. */ if( vips_rect_isempty( &target ) ) break; /* And copy those pixels in. * * FIXME: If the strip fits inside the region we've just * received, we could skip the copy. Will this happen very * often? Unclear. */ vips_region_copy( region, layer->strip, &target, target.left, target.top ); layer->write_y += target.height; /* We can either fill the strip, if it's somewhere half-way * down the image, or, if it's at the bottom, get to the last * real line of pixels. */ if( layer->write_y == VIPS_RECT_BOTTOM( to ) || layer->write_y == layer->height ) { if( strip_arrived( layer ) ) return( -1 ); } } return( 0 ); } static int vips_foreign_save_dz_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveDz *dz = (VipsForeignSaveDz *) object; VipsRect real_pixels; /* Google and zoomify default to zero overlap, ".jpg". */ if( dz->layout == VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY || dz->layout == VIPS_FOREIGN_DZ_LAYOUT_GOOGLE ) { if( !vips_object_argument_isset( object, "overlap" ) ) dz->overlap = 0; if( !vips_object_argument_isset( object, "suffix" ) ) VIPS_SETSTR( dz->suffix, ".jpg" ); } /* Default to white background. */ if( dz->layout == VIPS_FOREIGN_DZ_LAYOUT_GOOGLE && !vips_object_argument_isset( object, "background" ) ) { VipsArrayDouble *background; background = vips_array_double_newv( 1, 255.0 ); g_object_set( object, "background", background, NULL ); vips_area_unref( background ); } if( dz->overlap >= dz->tile_size ) { vips_error( "dzsave", "%s", _( "overlap must be less than tile " "width and height" ) ) ; return( -1 ); } /* DeepZoom stops at 1x1 pixels, others when the image fits within a * tile. */ if( dz->layout == VIPS_FOREIGN_DZ_LAYOUT_DZ ) { if( !vips_object_argument_isset( object, "depth" ) ) dz->depth = VIPS_FOREIGN_DZ_DEPTH_1PIXEL; } else if( !vips_object_argument_isset( object, "depth" ) ) dz->depth = VIPS_FOREIGN_DZ_DEPTH_1TILE; if( VIPS_OBJECT_CLASS( vips_foreign_save_dz_parent_class )-> build( object ) ) return( -1 ); /* Optional rotate. */ { VipsImage *z; if( vips_rot( save->ready, &z, dz->angle, NULL ) ) return( -1 ); VIPS_UNREF( save->ready ); save->ready = z; } /* The real pixels we have from our input. This is about to get * expanded with background. */ real_pixels.left = 0; real_pixels.top = 0; real_pixels.width = save->ready->Xsize; real_pixels.height = save->ready->Ysize; /* For centred images, imagine shrinking so that the image fits in a * single tile, centering in that tile, then expanding back again. */ if( dz->layout == VIPS_FOREIGN_DZ_LAYOUT_GOOGLE && dz->centre ) { VipsImage *z; Layer *layer; int n_layers; int size; if( !(layer = pyramid_build( dz, NULL, save->ready->Xsize, save->ready->Ysize, &real_pixels )) ) return( -1 ); n_layers = layer->n; /* This would cause interesting problems. */ g_assert( n_layers < 30 ); layer_free( layer ); size = dz->tile_size * (1 << n_layers); real_pixels.left = (size - save->ready->Xsize) / 2; real_pixels.top = (size - save->ready->Ysize) / 2; if( vips_embed( save->ready, &z, real_pixels.left, real_pixels.top, size, size, "background", dz->background, NULL ) ) return( -1 ); VIPS_UNREF( save->ready ); save->ready = z; #ifdef DEBUG printf( "centre: centring within a %d x %d image\n", size, size ); #endif } #ifdef DEBUG printf( "vips_foreign_save_dz_build: tile_size == %d\n", dz->tile_size ); printf( "vips_foreign_save_dz_build: overlap == %d\n", dz->overlap ); #endif /* Build the skeleton of the image pyramid. */ if( !(dz->layer = pyramid_build( dz, NULL, save->ready->Xsize, save->ready->Ysize, &real_pixels )) ) return( -1 ); if( pyramid_mkdir( dz ) ) return( -1 ); if( vips_sink_disc( save->ready, pyramid_strip, dz ) ) return( -1 ); switch( dz->layout ) { case VIPS_FOREIGN_DZ_LAYOUT_DZ: if( write_dzi( dz ) ) return( -1 ); break; case VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY: if( write_properties( dz ) ) return( -1 ); break; case VIPS_FOREIGN_DZ_LAYOUT_GOOGLE: if( write_blank( dz ) ) return( -1 ); break; default: g_assert( 0 ); return( -1 ); } return( 0 ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static int bandfmt_dz[10] = { /* UC C US S UI I F X D DX */ UC, C, US, S, UI, I, F, F, D, D }; const char *dz_suffs[] = { ".dz", NULL }; static void vips_foreign_save_dz_class_init( VipsForeignSaveDzClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->dispose = vips_foreign_save_dz_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "dzsave"; object_class->description = _( "save image to deep zoom format" ); object_class->build = vips_foreign_save_dz_build; foreign_class->suffs = dz_suffs; save_class->saveable = VIPS_SAVEABLE_ANY; save_class->format_table = bandfmt_dz; save_class->coding[VIPS_CODING_LABQ] = TRUE; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, basename ), NULL ); VIPS_ARG_ENUM( class, "layout", 8, _( "Layout" ), _( "Directory layout" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, layout ), VIPS_TYPE_FOREIGN_DZ_LAYOUT, VIPS_FOREIGN_DZ_LAYOUT_DZ ); VIPS_ARG_STRING( class, "suffix", 9, _( "suffix" ), _( "Filename suffix for tiles" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, suffix ), ".jpeg" ); VIPS_ARG_INT( class, "overlap", 10, _( "Overlap" ), _( "Tile overlap in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, overlap ), 0, 8192, 0 ); VIPS_ARG_INT( class, "tile_size", 11, _( "Tile size" ), _( "Tile size in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ), 1, 8192, 256 ); VIPS_ARG_BOXED( class, "background", 12, _( "Background" ), _( "Colour for background pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, background ), VIPS_TYPE_ARRAY_DOUBLE ); VIPS_ARG_ENUM( class, "depth", 13, _( "Depth" ), _( "Pyramid depth" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, depth ), VIPS_TYPE_FOREIGN_DZ_DEPTH, VIPS_FOREIGN_DZ_DEPTH_1PIXEL ); VIPS_ARG_BOOL( class, "centre", 13, _( "Center" ), _( "Center image in tile" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, centre ), FALSE ); VIPS_ARG_ENUM( class, "angle", 14, _( "Angle" ), _( "Rotate image during save" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveDz, angle ), VIPS_TYPE_ANGLE, VIPS_ANGLE_0 ); /* How annoying. We stupidly had these in earlier versions. */ VIPS_ARG_STRING( class, "dirname", 1, _( "Base name" ), _( "Base name to save to" ), VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, G_STRUCT_OFFSET( VipsForeignSaveDz, basename ), NULL ); VIPS_ARG_STRING( class, "basename", 1, _( "Base name" ), _( "Base name to save to" ), VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, G_STRUCT_OFFSET( VipsForeignSaveDz, basename ), NULL ); VIPS_ARG_INT( class, "tile_width", 12, _( "Tile width" ), _( "Tile width in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ), 1, 8192, 256 ); VIPS_ARG_INT( class, "tile_height", 12, _( "Tile height" ), _( "Tile height in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, G_STRUCT_OFFSET( VipsForeignSaveDz, tile_size ), 1, 8192, 256 ); } static void vips_foreign_save_dz_init( VipsForeignSaveDz *dz ) { VIPS_SETSTR( dz->suffix, ".jpeg" ); dz->layout = VIPS_FOREIGN_DZ_LAYOUT_DZ; dz->overlap = 1; dz->tile_size = 256; dz->tile_count = 0; dz->depth = VIPS_FOREIGN_DZ_DEPTH_1PIXEL; dz->angle = VIPS_ANGLE_0; } /** * vips_dzsave: * @in: image to save * @basename: basename to save to * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @layout; directory layout convention * @suffix: suffix for tile tiles * @overlap; set tile overlap * @tile_size; set tile size * @background: background colour * @depth: how deep to make the pyramid * @centre: centre the tiles * @angle: rotate the image by this much * * Save an image as a set of tiles at various resolutions. By default dzsave * uses DeepZoom layout -- use @layout to pick other conventions. * * In DeepZoom layout a directory called * "@basename_files" is created to hold the tiles, and an XML file called * "@basename.dzi" is written with the image metadata, * * In Zoomify and Google layout, a directory called @basename is created to * hold the tile structure. * * You can set @suffix to something like ".jpg[Q=85]" to control the tile write * options. * * In Google layout mode, edge tiles are expanded to @tile_size by @tile_size * pixels. Normally they are filled with white, but you can set another colour * with @background. Images are usually placed at the top-left of the tile, * but you can have them centred by turning on @centre. * * You can set the size and overlap of tiles with @tile_size and @overlap. * They default to the correct settings for the selected @layout. * * Use @depth to control how low the pyramid goes. This defaults to the * correct setting for the @layout you select. * * See also: vips_tiffsave(). * * Returns: 0 on success, -1 on error. */ int vips_dzsave( VipsImage *in, const char *basename, ... ) { va_list ap; int result; va_start( ap, basename ); result = vips_call_split( "dzsave", ap, in, basename ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/openslide2vips.c0000644000175000017500000002632512303141142015732 00000000000000/* Read a virtual microscope slide using OpenSlide. * * Benjamin Gilbert * * Copyright (c) 2011-2012 Carnegie Mellon University * * 26/11/11 * - initial version * 27/11/11 * - fix black background in transparent areas * - no need to set *stop on fill_region() error return * - add OpenSlide properties to image metadata * - consolidate setup into one function * - support reading arbitrary layers * - use VIPS_ARRAY() * - add helper to copy a line of pixels * - support reading associated images * 7/12/11 * - redirect OpenSlide error logging to vips_error() * 8/12/11 * - add more exposition to documentation * 9/12/11 * - unpack to a tile cache * 11/12/11 * - move argb->rgba into conversion * - turn into a set of read fns ready to be called from a class * 28/2/12 * - convert "layer" to "level" where externally visible * 9/4/12 * - move argb2rgba back in here, we don't have a use for coded pixels * - small cleanups * 11/4/12 * - fail if both level and associated image are specified * 20/9/12 * - update openslide_open error handling for 3.3.0 semantics * - switch from deprecated _layer_ functions * 11/10/12 * - look for tile-width and tile-height properties * - use threaded tile cache * 6/8/13 * - always output solid (not transparent) pixels */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_OPENSLIDE #include #include #include #include #include #include #include #include "openslide2vips.h" typedef struct { openslide_t *osr; char *associated; /* Only valid if associated == NULL. */ int32_t level; double downsample; uint32_t bg; /* Try to get these from openslide properties. */ int tile_width; int tile_height; } ReadSlide; int vips__openslide_isslide( const char *filename ) { openslide_t *osr; int ok; ok = 0; vips_error_freeze(); osr = openslide_open( filename ); vips_error_thaw(); if( osr ) { const char *vendor; /* Generic tiled tiff images can be opened by openslide as * well. Only offer to load this file if it's not a generic * tiff since we want vips_tiffload() to handle these. */ vendor = openslide_get_property_value( osr, OPENSLIDE_PROPERTY_NAME_VENDOR ); /* vendor will be NULL if osr is in error state. */ if( vendor && strcmp( vendor, "generic-tiff" ) != 0 ) ok = 1; openslide_close( osr ); } VIPS_DEBUG_MSG( "vips__openslide_isslide: %s - %d\n", filename, ok ); return( ok ); } static void readslide_destroy_cb( VipsImage *image, ReadSlide *rslide ) { VIPS_FREEF( openslide_close, rslide->osr ); VIPS_FREE( rslide->associated ); } static int check_associated_image( openslide_t *osr, const char *name ) { const char * const *associated; for( associated = openslide_get_associated_image_names( osr ); *associated != NULL; associated++ ) if( strcmp( *associated, name ) == 0 ) return( 0 ); vips_error( "openslide2vips", "%s", _( "invalid associated image name" ) ); return( -1 ); } static ReadSlide * readslide_new( const char *filename, VipsImage *out, int level, const char *associated ) { ReadSlide *rslide; int64_t w, h; const char *error; const char *background; const char * const *properties; if( level && associated ) { vips_error( "openslide2vips", "%s", _( "specify only one of level or associated " "image" ) ); return( NULL ); } rslide = VIPS_NEW( out, ReadSlide ); memset( rslide, 0, sizeof( *rslide ) ); g_signal_connect( out, "close", G_CALLBACK( readslide_destroy_cb ), rslide ); rslide->level = level; rslide->associated = g_strdup( associated ); /* Non-crazy defaults, override below if we can. */ rslide->tile_width = 256; rslide->tile_height = 256; rslide->osr = openslide_open( filename ); if( rslide->osr == NULL ) { vips_error( "openslide2vips", "%s", _( "unsupported slide format" ) ); return( NULL ); } error = openslide_get_error( rslide->osr ); if( error ) { vips_error( "openslide2vips", _( "opening slide: %s" ), error ); return( NULL ); } if( level < 0 || level >= openslide_get_level_count( rslide->osr ) ) { vips_error( "openslide2vips", "%s", _( "invalid slide level" ) ); return( NULL ); } if( associated && check_associated_image( rslide->osr, associated ) ) return( NULL ); if( associated ) { openslide_get_associated_image_dimensions( rslide->osr, associated, &w, &h ); vips_image_set_string( out, "slide-associated-image", associated ); vips_image_pipelinev( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL ); } else { char buf[256]; const char *value; openslide_get_level_dimensions( rslide->osr, level, &w, &h ); rslide->downsample = openslide_get_level_downsample( rslide->osr, level ); vips_image_set_int( out, "slide-level", level ); vips_image_pipelinev( out, VIPS_DEMAND_STYLE_SMALLTILE, NULL ); /* Try to get tile width/height. An undocumented, experimental * feature. */ vips_snprintf( buf, 256, "openslide.level[%d].tile-width", level ); if( (value = openslide_get_property_value( rslide->osr, buf )) ) rslide->tile_width = atoi( value ); vips_snprintf( buf, 256, "openslide.level[%d].tile-height", level ); if( (value = openslide_get_property_value( rslide->osr, buf )) ) rslide->tile_height = atoi( value ); if( value ) VIPS_DEBUG_MSG( "readslide_new: found tile-size\n" ); } rslide->bg = 0xffffff; if( (background = openslide_get_property_value( rslide->osr, OPENSLIDE_PROPERTY_NAME_BACKGROUND_COLOR )) ) rslide->bg = strtoul( background, NULL, 16 ); if( w < 0 || h < 0 || rslide->downsample < 0 ) { vips_error( "openslide2vips", _( "getting dimensions: %s" ), openslide_get_error( rslide->osr ) ); return( NULL ); } if( w > INT_MAX || h > INT_MAX ) { vips_error( "openslide2vips", "%s", _( "image dimensions overflow int" ) ); return( NULL ); } vips_image_init_fields( out, w, h, 4, VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, VIPS_INTERPRETATION_RGB, 1.0, 1.0 ); for( properties = openslide_get_property_names( rslide->osr ); *properties != NULL; properties++ ) vips_image_set_string( out, *properties, openslide_get_property_value( rslide->osr, *properties ) ); associated = g_strjoinv( ", ", (char **) openslide_get_associated_image_names( rslide->osr ) ); vips_image_set_string( out, "slide-associated-images", associated ); return( rslide ); } int vips__openslide_read_header( const char *filename, VipsImage *out, int level, char *associated ) { if( !readslide_new( filename, out, level, associated ) ) return( -1 ); return( 0 ); } static int vips__openslide_generate( VipsRegion *out, void *_seq, void *_rslide, void *unused, gboolean *stop ) { ReadSlide *rslide = _rslide; uint32_t bg = rslide->bg; VipsRect *r = &out->valid; int n = r->width * r->height; uint32_t *buf = (uint32_t *) VIPS_REGION_ADDR( out, r->left, r->top ); const char *error; int i; VIPS_DEBUG_MSG( "vips__openslide_generate: %dx%d @ %dx%d\n", r->width, r->height, r->left, r->top ); /* We're inside a cache, so requests should always be * tile_width by tile_height pixels and on a tile boundary. */ g_assert( (r->left % rslide->tile_width) == 0 ); g_assert( (r->top % rslide->tile_height) == 0 ); g_assert( r->width <= rslide->tile_width ); g_assert( r->height <= rslide->tile_height ); /* The memory on the region should be contiguous for our ARGB->RGBA * loop below. */ g_assert( VIPS_REGION_LSKIP( out ) == r->width * 4 ); openslide_read_region( rslide->osr, buf, r->left * rslide->downsample, r->top * rslide->downsample, rslide->level, r->width, r->height ); error = openslide_get_error( rslide->osr ); if( error ) { vips_error( "openslide2vips", _( "reading region: %s" ), error ); return( -1 ); } /* Convert from ARGB to RGBA and undo premultiplication. Since we are * inside a cache, we know buf must be continuous. * * We throw away transparency. Formats like Mirax use transparent + bg * colour for areas with no useful pixels. But if we output * transparent pixels and then convert to RGB for jpeg write later, we * would have to pass the bg colour down the pipe somehow. The * structure of dzsave makes this tricky. * * We could output plain RGB instead, but that would break * compatibility with older vipses. */ for( i = 0; i < n; i++ ) { uint32_t *p = buf + i; uint32_t x = *p; uint8_t a = x >> 24; VipsPel *out = (VipsPel *) p; if( a != 0 ) { out[0] = 255 * ((x >> 16) & 255) / a; out[1] = 255 * ((x >> 8) & 255) / a; out[2] = 255 * (x & 255) / a; out[3] = 255; } else { /* Use background color. */ out[0] = (bg >> 16) & 255; out[1] = (bg >> 8) & 255; out[2] = bg & 255; out[3] = 255; } } return( 0 ); } int vips__openslide_read( const char *filename, VipsImage *out, int level ) { ReadSlide *rslide; VipsImage *raw; VipsImage *t; VIPS_DEBUG_MSG( "vips__openslide_read: %s %d\n", filename, level ); raw = vips_image_new(); vips_object_local( out, raw ); if( !(rslide = readslide_new( filename, raw, level, NULL )) ) return( -1 ); if( vips_image_generate( raw, NULL, vips__openslide_generate, NULL, rslide, NULL ) ) return( -1 ); /* Copy to out, adding a cache. Enough tiles for a complete row, plus * 50%. */ if( vips_tilecache( raw, &t, "tile_width", rslide->tile_width, "tile_height", rslide->tile_height, "max_tiles", (int) (1.5 * (1 + raw->Xsize / rslide->tile_width)), "threaded", TRUE, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int vips__openslide_read_associated( const char *filename, VipsImage *out, const char *associated ) { ReadSlide *rslide; VipsImage *raw; const char *error; VIPS_DEBUG_MSG( "vips__openslide_read_associated: %s %s\n", filename, associated ); /* Memory buffer. Get associated directly to this, then copy to out. */ raw = vips_image_new_buffer(); vips_object_local( out, raw ); if( !(rslide = readslide_new( filename, raw, 0, associated )) || vips_image_write_prepare( raw ) ) return( -1 ); openslide_read_associated_image( rslide->osr, rslide->associated, (uint32_t *) VIPS_IMAGE_ADDR( raw, 0, 0 ) ); error = openslide_get_error( rslide->osr ); if( error ) { vips_error( "openslide2vips", _( "reading associated image: %s" ), error ); return( -1 ); } if( vips_image_write( raw, out ) ) return( -1 ); return( 0 ); } #endif /*HAVE_OPENSLIDE*/ vips-7.38.5/libvips/foreign/analyze2vips.c0000644000175000017500000003642712303140253015421 00000000000000/* Read a Analyze file. Old-style header (so called 7.5 format). * * 3/8/05 * - dbh.h header from Ralph Myers * 22/8/05 * - better byteswapper * 12/5/09 * - fix signed/unsigned warning * 13/1/09 * - try harder not to generate error messages in "isanalyze" * 4/2/10 * - gtkdoc * 14/12/11 * - redo as a set of fns ready for wrapping in a new-style class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "dbh.h" #include "analyze2vips.h" /* The things we can have in header fields. Can't use GType, since we want a * static value we can use in a declaration. */ typedef enum { BYTE, SHORT, INT, FLOAT, STRING } Type; /* A field in the dsr header. */ typedef struct { const char *name; /* Eg. "header_key.sizeof_hdr" */ Type type; glong offset; /* Offset in struct */ int len; /* Sizeof ... useful for string types */ } Field; static Field dsr_header[] = { { "dsr-header_key.sizeof_hdr", INT, G_STRUCT_OFFSET( struct dsr, hk.sizeof_hdr ), 4 }, { "dsr-header_key.data_type", STRING, G_STRUCT_OFFSET( struct dsr, hk.data_type ), 10 }, { "dsr-header_key.db_name", STRING, G_STRUCT_OFFSET( struct dsr, hk.db_name ), 18 }, { "dsr-header_key.extents", INT, G_STRUCT_OFFSET( struct dsr, hk.extents ), 4 }, { "dsr-header_key.session_error", SHORT, G_STRUCT_OFFSET( struct dsr, hk.session_error ), 2 }, { "dsr-header_key.regular", BYTE, G_STRUCT_OFFSET( struct dsr, hk.regular ), 1 }, { "dsr-header_key.hkey_un0", BYTE, G_STRUCT_OFFSET( struct dsr, hk.hkey_un0 ), 1 }, { "dsr-image_dimension.dim[0]", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim[0] ), 2 }, { "dsr-image_dimension.dim[1]", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim[1] ), 2 }, { "dsr-image_dimension.dim[2]", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim[2] ), 2 }, { "dsr-image_dimension.dim[3]", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim[3] ), 2 }, { "dsr-image_dimension.dim[4]", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim[4] ), 2 }, { "dsr-image_dimension.dim[5]", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim[5] ), 2 }, { "dsr-image_dimension.dim[6]", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim[6] ), 2 }, { "dsr-image_dimension.dim[7]", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim[7] ), 2 }, { "dsr-image_dimension.vox_units[0]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.vox_units[0] ), 1 }, { "dsr-image_dimension.vox_units[1]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.vox_units[1] ), 1 }, { "dsr-image_dimension.vox_units[2]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.vox_units[2] ), 1 }, { "dsr-image_dimension.vox_units[3]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.vox_units[3] ), 1 }, { "dsr-image_dimension.cal_units[0]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.cal_units[0] ), 1 }, { "dsr-image_dimension.cal_units[1]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.cal_units[1] ), 1 }, { "dsr-image_dimension.cal_units[2]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.cal_units[2] ), 1 }, { "dsr-image_dimension.cal_units[3]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.cal_units[3] ), 1 }, { "dsr-image_dimension.cal_units[4]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.cal_units[4] ), 1 }, { "dsr-image_dimension.cal_units[5]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.cal_units[5] ), 1 }, { "dsr-image_dimension.cal_units[6]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.cal_units[6] ), 1 }, { "dsr-image_dimension.cal_units[7]", BYTE, G_STRUCT_OFFSET( struct dsr, dime.cal_units[7] ), 1 }, { "dsr-image_dimension.data_type", SHORT, G_STRUCT_OFFSET( struct dsr, dime.datatype ), 2 }, { "dsr-image_dimension.bitpix", SHORT, G_STRUCT_OFFSET( struct dsr, dime.bitpix ), 2 }, { "dsr-image_dimension.dim_un0", SHORT, G_STRUCT_OFFSET( struct dsr, dime.dim_un0 ), 2 }, { "dsr-image_dimension.pixdim[0]", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.pixdim[0] ), 4 }, { "dsr-image_dimension.pixdim[1]", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.pixdim[1] ), 4 }, { "dsr-image_dimension.pixdim[2]", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.pixdim[2] ), 4 }, { "dsr-image_dimension.pixdim[3]", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.pixdim[3] ), 4 }, { "dsr-image_dimension.pixdim[4]", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.pixdim[4] ), 4 }, { "dsr-image_dimension.pixdim[5]", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.pixdim[5] ), 4 }, { "dsr-image_dimension.pixdim[6]", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.pixdim[6] ), 4 }, { "dsr-image_dimension.pixdim[7]", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.pixdim[7] ), 4 }, { "dsr-image_dimension.vox_offset", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.vox_offset ), 4 }, { "dsr-image_dimension.cal_max", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.cal_max ), 4 }, { "dsr-image_dimension.cal_min", FLOAT, G_STRUCT_OFFSET( struct dsr, dime.cal_min ), 4 }, { "dsr-image_dimension.compressed", INT, G_STRUCT_OFFSET( struct dsr, dime.compressed ), 4 }, { "dsr-image_dimension.verified", INT, G_STRUCT_OFFSET( struct dsr, dime.verified ), 4 }, { "dsr-image_dimension.glmax", INT, G_STRUCT_OFFSET( struct dsr, dime.glmax ), 4 }, { "dsr-image_dimension.glmin", INT, G_STRUCT_OFFSET( struct dsr, dime.glmin ), 4 }, { "dsr-data_history.descrip", STRING, G_STRUCT_OFFSET( struct dsr, hist.descrip ), 80 }, { "dsr-data_history.aux_file", STRING, G_STRUCT_OFFSET( struct dsr, hist.aux_file ), 24 }, { "dsr-data_history.orient", BYTE, G_STRUCT_OFFSET( struct dsr, hist.orient ), 1 }, { "dsr-data_history.originator", STRING, G_STRUCT_OFFSET( struct dsr, hist.originator ), 10 }, { "dsr-data_history.generated", STRING, G_STRUCT_OFFSET( struct dsr, hist.generated ), 10 }, { "dsr-data_history.scannum", STRING, G_STRUCT_OFFSET( struct dsr, hist.scannum ), 10 }, { "dsr-data_history.patient_id", STRING, G_STRUCT_OFFSET( struct dsr, hist.patient_id ), 10 }, { "dsr-data_history.exp_date", STRING, G_STRUCT_OFFSET( struct dsr, hist.exp_date ), 10 }, { "dsr-data_history.exp_time", STRING, G_STRUCT_OFFSET( struct dsr, hist.exp_time ), 10 }, { "dsr-data_history.hist_un0", STRING, G_STRUCT_OFFSET( struct dsr, hist.hist_un0 ), 3 }, { "dsr-data_history.views", INT, G_STRUCT_OFFSET( struct dsr, hist.views ), 4 }, { "dsr-data_history.vols_added", INT, G_STRUCT_OFFSET( struct dsr, hist.vols_added ), 4 }, { "dsr-data_history.start_field", INT, G_STRUCT_OFFSET( struct dsr, hist.start_field ), 4 }, { "dsr-data_history.field_skip", INT, G_STRUCT_OFFSET( struct dsr, hist.field_skip ), 4 }, { "dsr-data_history.omax", INT, G_STRUCT_OFFSET( struct dsr, hist.omax ), 4 }, { "dsr-data_history.omin", INT, G_STRUCT_OFFSET( struct dsr, hist.omin ), 4 }, { "dsr-data_history.smax", INT, G_STRUCT_OFFSET( struct dsr, hist.smax ), 4 }, { "dsr-data_history.smin", INT, G_STRUCT_OFFSET( struct dsr, hist.smin ), 4 } }; /* Given a filename, generate the names for the header and the image data. * * Eg. * "fred" -> "fred.hdr", "fred.img" * "fred.img" -> "fred.hdr", "fred.img" */ static void generate_filenames( const char *path, char *header, char *image ) { const char *olds[] = { ".img", ".hdr" }; vips__change_suffix( path, header, FILENAME_MAX, ".hdr", olds, 2 ); vips__change_suffix( path, image, FILENAME_MAX, ".img", olds, 2 ); } /* str is a str which may not be NULL-terminated. Return a pointer to a static * buffer with a NULL-terminated version so we can safely printf() the string. * Also, make sure the string is plain ascii. */ static char * getstr( int mx, const char *str ) { static char buf[256]; int i; g_assert( mx < 256 ); strncpy( buf, str, mx ); buf[mx]= '\0'; /* How annoying, patient_id has some funny ctrlchars in that mess up * xml encode later. */ for( i = 0; i < mx && buf[i]; i++ ) if( !isascii( buf[i] ) || buf[i] < 32 ) buf[i] = '@'; return( buf ); } #ifdef DEBUG static void print_dsr( struct dsr *d ) { int i; for( i = 0; i < VIPS_NUMBER( dsr_header ); i++ ) { printf( "%s = ", dsr_header[i].name ); switch( dsr_header[i].type ) { case BYTE: printf( "%d\n", G_STRUCT_MEMBER( char, d, dsr_header[i].offset ) ); break; case SHORT: printf( "%d\n", G_STRUCT_MEMBER( short, d, dsr_header[i].offset ) ); break; case INT: printf( "%d\n", G_STRUCT_MEMBER( int, d, dsr_header[i].offset ) ); break; case FLOAT: printf( "%g\n", G_STRUCT_MEMBER( float, d, dsr_header[i].offset ) ); break; case STRING: printf( "\"%s\"\n", getstr( dsr_header[i].len, &G_STRUCT_MEMBER( char, d, dsr_header[i].offset ) ) ); break; default: g_assert( 0 ); } } } #endif /*DEBUG*/ static struct dsr * read_header( const char *header ) { struct dsr *d; unsigned int len; if( !(d = (struct dsr *) vips__file_read_name( header, NULL, &len )) ) return( NULL ); if( len != sizeof( struct dsr ) ) { vips_error( "analyze2vips", "%s", _( "header file size incorrect" ) ); vips_free( d ); return( NULL ); } /* Ouch! Should check at configure time I guess. */ g_assert( sizeof( struct dsr ) == 348 ); /* dsr headers are always SPARC byte order (MSB first). Do we need to * swap? */ if( !vips_amiMSBfirst() ) { int i; for( i = 0; i < VIPS_NUMBER( dsr_header ); i++ ) { unsigned char *p; switch( dsr_header[i].type ) { case SHORT: p = &G_STRUCT_MEMBER( unsigned char, d, dsr_header[i].offset ); vips__copy_2byte( TRUE, p, p ); break; case INT: case FLOAT: p = &G_STRUCT_MEMBER( unsigned char, d, dsr_header[i].offset ); vips__copy_4byte( TRUE, p, p ); break; case BYTE: case STRING: break; default: g_assert( 0 ); } } } if( (int) len != d->hk.sizeof_hdr ) { vips_error( "analyze2vips", "%s", _( "header size incorrect" ) ); vips_free( d ); return( NULL ); } return( d ); } /* Try to get VIPS header properties from a dsr. */ static int get_vips_properties( struct dsr *d, int *width, int *height, int *bands, VipsBandFormat *fmt ) { int i; if( d->dime.dim[0] < 2 || d->dime.dim[0] > 7 ) { vips_error( "analyze2vips", _( "%d-dimensional images not supported" ), d->dime.dim[0] ); return( -1 ); } /* Size of base 2d images. */ *width = d->dime.dim[1]; *height = d->dime.dim[2]; for( i = 3; i <= d->dime.dim[0]; i++ ) *height *= d->dime.dim[i]; /* Check it's a datatype we can handle. */ switch( d->dime.datatype ) { case DT_UNSIGNED_CHAR: *bands = 1; *fmt = VIPS_FORMAT_UCHAR; break; case DT_SIGNED_SHORT: *bands = 1; *fmt = VIPS_FORMAT_SHORT; break; case DT_SIGNED_INT: *bands = 1; *fmt = VIPS_FORMAT_INT; break; case DT_FLOAT: *bands = 1; *fmt = VIPS_FORMAT_FLOAT; break; case DT_COMPLEX: *bands = 1; *fmt = VIPS_FORMAT_COMPLEX; break; case DT_DOUBLE: *bands = 1; *fmt = VIPS_FORMAT_DOUBLE; break; case DT_RGB: *bands = 3; *fmt = VIPS_FORMAT_UCHAR; break; default: vips_error( "analyze2vips", _( "datatype %d not supported" ), d->dime.datatype ); return( -1 ); } #ifdef DEBUG printf( "get_vips_properties: width = %d\n", *width ); printf( "get_vips_properties: height = %d\n", *height ); printf( "get_vips_properties: bands = %d\n", *bands ); printf( "get_vips_properties: fmt = %d\n", *fmt ); #endif /*DEBUG*/ return( 0 ); } static void attach_meta( IMAGE *out, struct dsr *d ) { int i; vips_image_set_blob( out, "dsr", (VipsCallbackFn) vips_free, d, d->hk.sizeof_hdr ); for( i = 0; i < VIPS_NUMBER( dsr_header ); i++ ) { switch( dsr_header[i].type ) { case BYTE: vips_image_set_int( out, dsr_header[i].name, G_STRUCT_MEMBER( char, d, dsr_header[i].offset ) ); break; case SHORT: vips_image_set_int( out, dsr_header[i].name, G_STRUCT_MEMBER( short, d, dsr_header[i].offset ) ); break; case INT: vips_image_set_int( out, dsr_header[i].name, G_STRUCT_MEMBER( int, d, dsr_header[i].offset ) ); break; case FLOAT: vips_image_set_double( out, dsr_header[i].name, G_STRUCT_MEMBER( float, d, dsr_header[i].offset ) ); break; case STRING: vips_image_set_string( out, dsr_header[i].name, getstr( dsr_header[i].len, &G_STRUCT_MEMBER( char, d, dsr_header[i].offset ) ) ); break; default: g_assert( 0 ); } } } int vips__isanalyze( const char *filename ) { char header[FILENAME_MAX]; char image[FILENAME_MAX]; struct dsr *d; int width, height; int bands; VipsBandFormat fmt; int result; generate_filenames( filename, header, image ); if( !vips_existsf( "%s", header ) ) return( 0 ); vips_error_freeze(); d = read_header( header ); vips_error_thaw(); if( !d ) return( 0 ); #ifdef DEBUG print_dsr( d ); #endif /*DEBUG*/ vips_error_freeze(); result = get_vips_properties( d, &width, &height, &bands, &fmt ); vips_error_thaw(); vips_free( d ); return( result == 0 ); } int vips__analyze_read_header( const char *filename, VipsImage *out ) { char header[FILENAME_MAX]; char image[FILENAME_MAX]; struct dsr *d; int width, height; int bands; VipsBandFormat fmt; generate_filenames( filename, header, image ); if( !(d = read_header( header )) ) return( -1 ); #ifdef DEBUG print_dsr( d ); #endif /*DEBUG*/ if( get_vips_properties( d, &width, &height, &bands, &fmt ) ) { vips_free( d ); return( -1 ); } vips_image_init_fields( out, width, height, bands, fmt, VIPS_CODING_NONE, bands == 1 ? VIPS_INTERPRETATION_B_W : VIPS_INTERPRETATION_sRGB, 1.0, 1.0 ); attach_meta( out, d ); return( 0 ); } int vips__analyze_read( const char *filename, VipsImage *out ) { char header[FILENAME_MAX]; char image[FILENAME_MAX]; struct dsr *d; VipsImage *x = vips_image_new(); VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( x ), 3 ); int width, height; int bands; VipsBandFormat fmt; generate_filenames( filename, header, image ); if( !(d = read_header( header )) ) { g_object_unref( x ); return( -1 ); } attach_meta( out, d ); #ifdef DEBUG print_dsr( d ); #endif /*DEBUG*/ if( get_vips_properties( d, &width, &height, &bands, &fmt ) || !(t[0] = vips_image_new_from_file_raw( image, width, height, bands * vips_format_sizeof( fmt ), 0 )) ) { g_object_unref( x ); return( -1 ); } if( vips_copy( t[0], &t[1], "bands", bands, "format", fmt, NULL ) || vips_copy( t[1], &t[2], "swap", !vips_amiMSBfirst(), NULL ) || vips_image_write( t[2], out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } vips-7.38.5/libvips/foreign/ppm.h0000644000175000017500000000263212303140253013562 00000000000000/* common defs for ppm read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PPM_H #define VIPS_PPM_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips__ppm_header( const char *name, VipsImage *out ); int vips__ppm_load( const char *name, VipsImage *out ); int vips__ppm_isppm( const char *filename ); VipsForeignFlags vips__ppm_flags( const char *filename ); extern const char *vips__ppm_suffs[]; int vips__ppm_save( VipsImage *in, const char *filename, gboolean ascii ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PPM_H*/ vips-7.38.5/libvips/foreign/Makefile.in0000644000175000017500000006161112303144055014670 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/foreign DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libforeign_la_LIBADD = am_libforeign_la_OBJECTS = radiance.lo radload.lo radsave.lo ppm.lo \ ppmload.lo ppmsave.lo csv.lo csvload.lo csvsave.lo \ matrixload.lo matrixsave.lo dzsave.lo rawload.lo rawsave.lo \ vipsload.lo vipssave.lo analyzeload.lo analyze2vips.lo \ foreign.lo matlab.lo matload.lo magick2vips.lo magickload.lo \ pngload.lo pngsave.lo vipspng.lo openexr2vips.lo \ openexrload.lo fits.lo fitsload.lo fitssave.lo vips2tiff.lo \ tiff2vips.lo tiffload.lo tiffsave.lo openslide2vips.lo \ openslideload.lo webpload.lo webpsave.lo webp2vips.lo \ vips2webp.lo vips2jpeg.lo jpeg2vips.lo jpegload.lo jpegsave.lo libforeign_la_OBJECTS = $(am_libforeign_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libforeign_la_SOURCES) DIST_SOURCES = $(libforeign_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libforeign.la libforeign_la_SOURCES = \ radiance.h \ radiance.c \ radload.c \ radsave.c \ ppm.h \ ppm.c \ ppmload.c \ ppmsave.c \ csv.h \ csv.c \ csvload.c \ csvsave.c \ matrixload.c \ matrixsave.c \ dzsave.c \ rawload.c \ rawsave.c \ vipsload.c \ vipssave.c \ dbh.h \ analyzeload.c \ analyze2vips.c \ analyze2vips.h \ foreign.c \ matlab.h \ matlab.c \ matload.c \ magick.h \ magick2vips.c \ magickload.c \ pngload.c \ pngsave.c \ vipspng.h \ vipspng.c \ openexr2vips.h \ openexr2vips.c \ openexrload.c \ fits.h \ fits.c \ fitsload.c \ fitssave.c \ tiff.h \ vips2tiff.c \ tiff2vips.c \ tiffload.c \ tiffsave.c \ openslide2vips.h \ openslide2vips.c \ openslideload.c \ webp.h \ webpload.c \ webpsave.c \ webp2vips.c \ vips2webp.c \ vips2jpeg.c \ jpeg2vips.c \ jpeg.h \ vipsjpeg.h \ jpegload.c \ jpegsave.c EXTRA_DIST = AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/foreign/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/foreign/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libforeign.la: $(libforeign_la_OBJECTS) $(libforeign_la_DEPENDENCIES) $(EXTRA_libforeign_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libforeign_la_OBJECTS) $(libforeign_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analyze2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analyzeload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csvload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csvsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dzsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fitsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fitssave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foreign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpeg2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpegload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpegsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magick2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magickload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matlab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrixload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrixsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openexr2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openexrload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openslide2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openslideload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppmload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppmsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radiance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffsave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vips2jpeg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vips2tiff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vips2webp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vipsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vipspng.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vipssave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webp2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webpload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webpsave.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/foreign/ppmsave.c0000644000175000017500000001054712303140253014440 00000000000000/* save to ppm * * 2/12/11 * - wrap a class around the ppm writer */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "ppm.h" typedef struct _VipsForeignSavePpm { VipsForeignSave parent_object; char *filename; gboolean ascii; } VipsForeignSavePpm; typedef VipsForeignSaveClass VipsForeignSavePpmClass; G_DEFINE_TYPE( VipsForeignSavePpm, vips_foreign_save_ppm, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_ppm_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSavePpm *ppm = (VipsForeignSavePpm *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_ppm_parent_class )-> build( object ) ) return( -1 ); if( vips__ppm_save( save->ready, ppm->filename, ppm->ascii ) ) return( -1 ); return( 0 ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static int bandfmt_ppm[10] = { /* UC C US S UI I F X D DX */ UC, UC, US, US, UI, UI, F, F, F, F }; static void vips_foreign_save_ppm_class_init( VipsForeignSavePpmClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "ppmsave"; object_class->description = _( "save image to ppm file" ); object_class->build = vips_foreign_save_ppm_build; foreign_class->suffs = vips__ppm_suffs; save_class->saveable = VIPS_SAVEABLE_RGB; save_class->format_table = bandfmt_ppm; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSavePpm, filename ), NULL ); VIPS_ARG_BOOL( class, "ascii", 10, _( "ASCII" ), _( "save as ascii" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSavePpm, ascii ), FALSE ); } static void vips_foreign_save_ppm_init( VipsForeignSavePpm *ppm ) { } /** * vips_ppmsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @ascii: save as ASCII rather than binary * * Write a VIPS image to a file as PPM. It can write 8, 16 or * 32 bit unsigned integer images, float images, colour or monochrome, * stored as binary or ASCII. * Integer images of more than 8 bits can only be stored in ASCII. * * When writing float (PFM) images the scale factor is set from the * "pfm-scale" metadata. * * Set @ascii to %TRUE to write as human-readable ASCII. Normally data is * written in binary. * * The storage format is indicated by a filename extension. Use one of .pbm, * .pgm, .ppm, .pfm. * * See also: vips_image_write_file(). * * Returns: 0 on success, -1 on error. */ int vips_ppmsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "ppmsave", ap, in, filename ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/tiffsave.c0000644000175000017500000001627012303140253014573 00000000000000/* save to tiff * * 2/12/11 * - wrap a class around the tiff writer * 17/3/12 * - argh xres/yres macro was wrong * 26/1/14 * - add rgbjpeg flag */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_TIFF #include #include #include #include #include "tiff.h" typedef struct _VipsForeignSaveTiff { VipsForeignSave parent_object; /* Filename for save. */ char *filename; /* Many options argh. */ VipsForeignTiffCompression compression; int Q; VipsForeignTiffPredictor predictor; char *profile; gboolean tile; int tile_width; int tile_height; gboolean pyramid; gboolean squash; VipsForeignTiffResunit resunit; double xres; double yres; gboolean bigtiff; gboolean rgbjpeg; } VipsForeignSaveTiff; typedef VipsForeignSaveClass VipsForeignSaveTiffClass; G_DEFINE_TYPE( VipsForeignSaveTiff, vips_foreign_save_tiff, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_tiff_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveTiff *tiff = (VipsForeignSaveTiff *) object; const char *p; if( VIPS_OBJECT_CLASS( vips_foreign_save_tiff_parent_class )-> build( object ) ) return( -1 ); /* Default xres/yres to the values from the image. */ if( !vips_object_argument_isset( object, "xres" ) ) tiff->xres = save->ready->Xres * 10.0; if( !vips_object_argument_isset( object, "yres" ) ) tiff->yres = save->ready->Yres * 10.0; /* resunit param overrides resunit metadata. */ if( !vips_object_argument_isset( object, "resunit" ) && vips_image_get_typeof( save->ready, VIPS_META_RESOLUTION_UNIT ) && !vips_image_get_string( save->ready, VIPS_META_RESOLUTION_UNIT, &p ) && vips_isprefix( "in", p ) ) tiff->resunit = VIPS_FOREIGN_TIFF_RESUNIT_INCH; if( tiff->resunit == VIPS_FOREIGN_TIFF_RESUNIT_INCH ) { tiff->xres *= 2.54; tiff->yres *= 2.54; } if( vips__tiff_write( save->ready, tiff->filename, tiff->compression, tiff->Q, tiff->predictor, tiff->profile, tiff->tile, tiff->tile_width, tiff->tile_height, tiff->pyramid, tiff->squash, tiff->resunit, tiff->xres, tiff->yres, tiff->bigtiff, tiff->rgbjpeg ) ) return( -1 ); return( 0 ); } static void vips_foreign_save_tiff_class_init( VipsForeignSaveTiffClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "tiffsave"; object_class->description = _( "save image to tiff file" ); object_class->build = vips_foreign_save_tiff_build; foreign_class->suffs = vips__foreign_tiff_suffs; save_class->saveable = VIPS_SAVEABLE_ANY; save_class->coding[VIPS_CODING_LABQ] = TRUE; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, filename ), NULL ); VIPS_ARG_ENUM( class, "compression", 6, _( "Compression" ), _( "Compression for this file" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, compression ), VIPS_TYPE_FOREIGN_TIFF_COMPRESSION, VIPS_FOREIGN_TIFF_COMPRESSION_NONE ); VIPS_ARG_INT( class, "Q", 7, _( "Q" ), _( "Q factor" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, Q ), 1, 100, 75 ); VIPS_ARG_ENUM( class, "predictor", 8, _( "predictor" ), _( "Compression prediction" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, predictor ), VIPS_TYPE_FOREIGN_TIFF_PREDICTOR, VIPS_FOREIGN_TIFF_PREDICTOR_NONE ); VIPS_ARG_STRING( class, "profile", 9, _( "profile" ), _( "ICC profile to embed" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, profile ), NULL ); VIPS_ARG_BOOL( class, "tile", 10, _( "Tile" ), _( "Write a tiled tiff" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, tile ), FALSE ); VIPS_ARG_INT( class, "tile_width", 11, _( "Tile width" ), _( "Tile width in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, tile_width ), 1, 1024, 128 ); VIPS_ARG_INT( class, "tile_height", 12, _( "Tile height" ), _( "Tile height in pixels" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, tile_height ), 1, 1024, 128 ); VIPS_ARG_BOOL( class, "pyramid", 13, _( "Pyramid" ), _( "Write a pyramidal tiff" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, pyramid ), FALSE ); VIPS_ARG_BOOL( class, "squash", 14, _( "Squash" ), _( "Squash images down to 1 bit" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, squash ), FALSE ); VIPS_ARG_ENUM( class, "resunit", 15, _( "Resolution unit" ), _( "Resolution unit" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, resunit ), VIPS_TYPE_FOREIGN_TIFF_RESUNIT, VIPS_FOREIGN_TIFF_RESUNIT_CM ); VIPS_ARG_DOUBLE( class, "xres", 16, _( "Xres" ), _( "Horizontal resolution in pixels/mm" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, xres ), -0.0, 1000000, 0 ); VIPS_ARG_DOUBLE( class, "yres", 17, _( "Yres" ), _( "Vertical resolution in pixels/mm" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, yres ), -0.0, 1000000, 0 ); VIPS_ARG_BOOL( class, "bigtiff", 18, _( "Bigtiff" ), _( "Write a bigtiff image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSaveTiff, bigtiff ), FALSE ); VIPS_ARG_BOOL( class, "rgbjpeg", 20, _( "RGB JPEG" ), _( "Output RGB JPEG rather than YCbCr" ), VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, G_STRUCT_OFFSET( VipsForeignSaveTiff, rgbjpeg ), FALSE ); } static void vips_foreign_save_tiff_init( VipsForeignSaveTiff *tiff ) { tiff->compression = VIPS_FOREIGN_TIFF_COMPRESSION_NONE; tiff->Q = 75; tiff->predictor = VIPS_FOREIGN_TIFF_PREDICTOR_NONE; tiff->tile_width = 128; tiff->tile_height = 128; tiff->resunit = VIPS_FOREIGN_TIFF_RESUNIT_CM; tiff->xres = 1.0; tiff->yres = 1.0; } #endif /*HAVE_TIFF*/ vips-7.38.5/libvips/foreign/Makefile.am0000644000175000017500000000172512303140253014653 00000000000000noinst_LTLIBRARIES = libforeign.la libforeign_la_SOURCES = \ radiance.h \ radiance.c \ radload.c \ radsave.c \ ppm.h \ ppm.c \ ppmload.c \ ppmsave.c \ csv.h \ csv.c \ csvload.c \ csvsave.c \ matrixload.c \ matrixsave.c \ dzsave.c \ rawload.c \ rawsave.c \ vipsload.c \ vipssave.c \ dbh.h \ analyzeload.c \ analyze2vips.c \ analyze2vips.h \ foreign.c \ matlab.h \ matlab.c \ matload.c \ magick.h \ magick2vips.c \ magickload.c \ pngload.c \ pngsave.c \ vipspng.h \ vipspng.c \ openexr2vips.h \ openexr2vips.c \ openexrload.c \ fits.h \ fits.c \ fitsload.c \ fitssave.c \ tiff.h \ vips2tiff.c \ tiff2vips.c \ tiffload.c \ tiffsave.c \ openslide2vips.h \ openslide2vips.c \ openslideload.c \ webp.h \ webpload.c \ webpsave.c \ webp2vips.c \ vips2webp.c \ vips2jpeg.c \ jpeg2vips.c \ jpeg.h \ vipsjpeg.h \ jpegload.c \ jpegsave.c EXTRA_DIST = AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/foreign/matrixsave.c0000644000175000017500000001267312303140253015152 00000000000000/* save to matrix * * 2/7/13 * - wrap a class around the matrix writer */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "csv.h" typedef struct _VipsForeignSaveMatrix { VipsForeignSave parent_object; /* Filename for save. */ char *filename; } VipsForeignSaveMatrix; typedef VipsForeignSaveClass VipsForeignSaveMatrixClass; G_DEFINE_TYPE( VipsForeignSaveMatrix, vips_foreign_save_matrix, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_matrix_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveMatrix *matrix = (VipsForeignSaveMatrix *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_matrix_parent_class )-> build( object ) ) return( -1 ); if( vips__matrix_write( save->ready, matrix->filename ) ) return( -1 ); return( 0 ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static int bandfmt_matrix[10] = { /* UC C US S UI I F X D DX */ D, D, D, D, D, D, D, D, D, D }; static void vips_foreign_save_matrix_class_init( VipsForeignSaveMatrixClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "matrixsave"; object_class->description = _( "save image to matrix file" ); object_class->build = vips_foreign_save_matrix_build; foreign_class->suffs = vips__foreign_matrix_suffs; save_class->saveable = VIPS_SAVEABLE_MONO; save_class->format_table = bandfmt_matrix; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveMatrix, filename ), NULL ); } static void vips_foreign_save_matrix_init( VipsForeignSaveMatrix *matrix ) { } /** * vips_matrixsave: * @in: image to save * @filename: file to write to * @...: %NULL-terminated list of optional named arguments * * Write @in to @filename in matrix format. See vips_matrixload() for a * description of the format. * * See also: vips_matrixload(). * * Returns: 0 on success, -1 on error. */ int vips_matrixsave( VipsImage *in, const char *filename, ... ) { va_list ap; int result; va_start( ap, filename ); result = vips_call_split( "matrixsave", ap, in, filename ); va_end( ap ); return( result ); } typedef struct _VipsForeignPrintMatrix { VipsForeignSave parent_object; } VipsForeignPrintMatrix; typedef VipsForeignSaveClass VipsForeignPrintMatrixClass; G_DEFINE_TYPE( VipsForeignPrintMatrix, vips_foreign_print_matrix, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_print_matrix_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; if( VIPS_OBJECT_CLASS( vips_foreign_print_matrix_parent_class )-> build( object ) ) return( -1 ); if( vips__matrix_write_file( save->ready, stdout ) ) return( -1 ); return( 0 ); } static void vips_foreign_print_matrix_class_init( VipsForeignPrintMatrixClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; object_class->nickname = "matrixprint"; object_class->description = _( "print matrix" ); object_class->build = vips_foreign_print_matrix_build; foreign_class->suffs = vips__foreign_matrix_suffs; save_class->saveable = VIPS_SAVEABLE_MONO; save_class->format_table = bandfmt_matrix; } static void vips_foreign_print_matrix_init( VipsForeignPrintMatrix *matrix ) { } /** * vips_matrixprint: * @in: image to print * @...: %NULL-terminated list of optional named arguments * * Print @in to %stdout in matrix format. See vips_matrixload() for a * description of the format. * * See also: vips_matrixload(). * * Returns: 0 on success, -1 on error. */ int vips_matrixprint( VipsImage *in, ... ) { va_list ap; int result; va_start( ap, in ); result = vips_call_split( "matrixprint", ap, in ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/fitssave.c0000644000175000017500000000660112303140253014605 00000000000000/* save to fits * * 2/12/11 * - wrap a class around the fits writer */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_CFITSIO #include #include #include #include #include "fits.h" typedef struct _VipsForeignSaveFits { VipsForeignSave parent_object; /* Filename for save. */ char *filename; } VipsForeignSaveFits; typedef VipsForeignSaveClass VipsForeignSaveFitsClass; G_DEFINE_TYPE( VipsForeignSaveFits, vips_foreign_save_fits, VIPS_TYPE_FOREIGN_SAVE ); static int vips_foreign_save_fits_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSaveFits *fits = (VipsForeignSaveFits *) object; VipsImage *t; if( VIPS_OBJECT_CLASS( vips_foreign_save_fits_parent_class )-> build( object ) ) return( -1 ); if( vips_flip( save->ready, &t, VIPS_DIRECTION_VERTICAL, NULL ) ) return( -1 ); if( vips__fits_write( t, fits->filename ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static int bandfmt_fits[10] = { /* UC C US S UI I F X D DX */ UC, UC, US, US, UI, UI, F, X, D, DX }; static void vips_foreign_save_fits_class_init( VipsForeignSaveFitsClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "fitssave"; object_class->description = _( "save image to fits file" ); object_class->build = vips_foreign_save_fits_build; foreign_class->suffs = vips__fits_suffs; save_class->saveable = VIPS_SAVEABLE_ANY; save_class->format_table = bandfmt_fits; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSaveFits, filename ), NULL ); } static void vips_foreign_save_fits_init( VipsForeignSaveFits *fits ) { } #endif /*HAVE_CFITSIO*/ vips-7.38.5/libvips/foreign/csv.c0000644000175000017500000003557112303140253013564 00000000000000/* Read/write csv files. * * 19/12/05 JC * - hacked from ppm reader * 9/6/06 * - hacked from im_debugim * 11/9/06 * - now distingushes whitespace and separators, so we can have blank * fields * 20/9/06 * - oop, unquoted trailing columns could get missed * 23/10/06 * - allow separator to be specified (default "\t", ) * 17/11/06 * - oops, was broken * 17/5/07 * - added im_csv2vips_header() * 4/2/10 * - gtkdoc * 1/3/10 * - allow lines that end with EOF * 23/9/11 * - allow quoted strings, including escaped quotes * 16/12/11 * - rework as a set of fns ready for wrapping as a class * 23/2/12 * - report positions for EOF/EOL errors * 2/7/13 * - add matrix read/write */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "csv.h" /* Skip to the start of the next line (ie. read until we see a '\n'), return * zero if we are at EOF. * * Files can end with EOF or with \nEOF. Tricky! */ static int skip_line( FILE *fp ) { int ch; /* Are we at a delayed EOF? See below. */ if( (ch = fgetc( fp )) == EOF ) return( 0 ); ungetc( ch, fp ); /* If we hit EOF and no \n, wait until the next call to report EOF. */ while( (ch = fgetc( fp )) != '\n' && ch != EOF ) ; return( -1 ); } static int skip_white( FILE *fp, const char whitemap[256] ) { int ch; do { ch = fgetc( fp ); } while( ch != EOF && ch != '\n' && whitemap[ch] ); ungetc( ch, fp ); return( ch ); } static int skip_to_quote( FILE *fp ) { int ch; do { ch = fgetc( fp ); /* Ignore \" in strings. */ if( ch == '\\' ) ch = fgetc( fp ); else if( ch == '"' ) break; } while( ch != EOF && ch != '\n' ); ungetc( ch, fp ); return( ch ); } static int skip_to_sep( FILE *fp, const char sepmap[256] ) { int ch; do { ch = fgetc( fp ); } while( ch != EOF && ch != '\n' && !sepmap[ch] ); ungetc( ch, fp ); return( ch ); } /* Read a single item. Syntax is: * * element : * whitespace* item whitespace* [EOF|EOL|separator] * * item : * double | * "anything" | * empty * * the anything in quotes can contain " escaped with \ * * Return the char that caused failure on fail (EOF or \n). */ static int read_double( FILE *fp, const char whitemap[256], const char sepmap[256], int lineno, int colno, double *out ) { int ch; /* The fscanf() may change this ... but all other cases need a zero. */ *out = 0; ch = skip_white( fp, whitemap ); if( ch == EOF || ch == '\n' ) return( ch ); if( ch == '"' ) { (void) fgetc( fp ); (void) skip_to_quote( fp ); (void) fgetc( fp ); } else if( !sepmap[ch] && fscanf( fp, "%lf", out ) != 1 ) { /* Only a warning, since (for example) exported spreadsheets * will often have text or date fields. */ vips_warn( "csv2vips", _( "error parsing number, line %d, column %d" ), lineno, colno ); /* Step over the bad data to the next separator. */ (void) skip_to_sep( fp, sepmap ); } /* Don't need to check result, we have read a field successfully. */ ch = skip_white( fp, whitemap ); /* If it's a separator, we have to step over it. */ if( ch != EOF && sepmap[ch] ) (void) fgetc( fp ); return( 0 ); } static int read_csv( FILE *fp, VipsImage *out, int skip, int lines, const char *whitespace, const char *separator, gboolean read_image ) { int i; char whitemap[256]; char sepmap[256]; const char *p; fpos_t pos; int columns; int ch; double d; double *buf; int y; /* Make our char maps. */ for( i = 0; i < 256; i++ ) { whitemap[i] = 0; sepmap[i] = 0; } for( p = whitespace; *p; p++ ) whitemap[(int) *p] = 1; for( p = separator; *p; p++ ) sepmap[(int) *p] = 1; /* Skip first few lines. */ for( i = 0; i < skip; i++ ) if( !skip_line( fp ) ) { vips_error( "csv2vips", "%s", _( "end of file while skipping start" ) ); return( -1 ); } /* Parse the first line to get number of columns. Only bother checking * fgetpos() the first time we use it: assume it's working after this. */ if( fgetpos( fp, &pos ) ) { vips_error_system( errno, "csv2vips", "%s", _( "unable to seek" ) ); return( -1 ); } for( columns = 0; (ch = read_double( fp, whitemap, sepmap, skip + 1, columns + 1, &d )) == 0; columns++ ) ; fsetpos( fp, &pos ); if( columns == 0 ) { vips_error( "csv2vips", "%s", _( "empty line" ) ); return( -1 ); } /* If lines is -1, we have to scan the whole file to get the * number of lines out. */ if( lines == -1 ) { fgetpos( fp, &pos ); for( lines = 0; skip_line( fp ); lines++ ) ; fsetpos( fp, &pos ); } vips_image_pipelinev( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL ); vips_image_init_fields( out, columns, lines, 1, VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE, VIPS_INTERPRETATION_B_W, 1.0, 1.0 ); /* Just reading the header? We are done. */ if( !read_image ) return( 0 ); if( !(buf = VIPS_ARRAY( out, VIPS_IMAGE_N_ELEMENTS( out ), double )) ) return( -1 ); for( y = 0; y < lines; y++ ) { int x; for( x = 0; x < columns; x++ ) { int lineno = y + skip + 1; int colno = x + 1; ch = read_double( fp, whitemap, sepmap, lineno, colno, &d ); if( ch == EOF ) { vips_error( "csv2vips", _( "unexpected EOF, line %d col %d" ), lineno, colno ); return( -1 ); } else if( ch == '\n' ) { vips_error( "csv2vips", _( "unexpected EOL, line %d col %d" ), lineno, colno ); return( -1 ); } else if( ch ) /* Parse error. */ return( -1 ); buf[x] = d; } if( vips_image_write_line( out, y, (VipsPel *) buf ) ) return( -1 ); /* Skip over the '\n' to the next line. */ skip_line( fp ); } return( 0 ); } int vips__csv_read( const char *filename, VipsImage *out, int skip, int lines, const char *whitespace, const char *separator ) { FILE *fp; if( !(fp = vips__file_open_read( filename, NULL, TRUE )) ) return( -1 ); if( read_csv( fp, out, skip, lines, whitespace, separator, TRUE ) ) { fclose( fp ); return( -1 ); } fclose( fp ); return( 0 ); } int vips__csv_read_header( const char *filename, VipsImage *out, int skip, int lines, const char *whitespace, const char *separator ) { FILE *fp; if( !(fp = vips__file_open_read( filename, NULL, TRUE )) ) return( -1 ); if( read_csv( fp, out, skip, lines, whitespace, separator, FALSE ) ) { fclose( fp ); return( -1 ); } fclose( fp ); return( 0 ); } const char *vips__foreign_csv_suffs[] = { ".csv", NULL }; #define PRINT_INT( TYPE ) fprintf( fp, "%d", *((TYPE*)p) ); #define PRINT_FLOAT( TYPE ) fprintf( fp, "%g", *((TYPE*)p) ); #define PRINT_COMPLEX( TYPE ) fprintf( fp, "(%g, %g)", \ ((TYPE*)p)[0], ((TYPE*)p)[1] ); static int vips2csv( VipsImage *in, FILE *fp, const char *sep ) { int w = VIPS_IMAGE_N_ELEMENTS( in ); int es = VIPS_IMAGE_SIZEOF_ELEMENT( in ); int x, y; VipsPel *p; p = in->data; for( y = 0; y < in->Ysize; y++ ) { for( x = 0; x < w; x++ ) { if( x > 0 ) fprintf( fp, "%s", sep ); switch( in->BandFmt ) { case VIPS_FORMAT_UCHAR: PRINT_INT( unsigned char ); break; case VIPS_FORMAT_CHAR: PRINT_INT( char ); break; case VIPS_FORMAT_USHORT: PRINT_INT( unsigned short ); break; case VIPS_FORMAT_SHORT: PRINT_INT( short ); break; case VIPS_FORMAT_UINT: PRINT_INT( unsigned int ); break; case VIPS_FORMAT_INT: PRINT_INT( int ); break; case VIPS_FORMAT_FLOAT: PRINT_FLOAT( float ); break; case VIPS_FORMAT_DOUBLE: PRINT_FLOAT( double ); break; case VIPS_FORMAT_COMPLEX: PRINT_COMPLEX( float ); break; case VIPS_FORMAT_DPCOMPLEX: PRINT_COMPLEX( double ); break; default: g_assert( 0 ); } p += es; } fprintf( fp, "\n" ); } return( 0 ); } int vips__csv_write( VipsImage *in, const char *filename, const char *separator ) { FILE *fp; if( vips_check_mono( "vips2csv", in ) || vips_check_uncoded( "vips2csv", in ) || vips_image_wio_input( in ) ) return( -1 ); if( !(fp = vips__file_open_write( filename, TRUE )) ) return( -1 ); if( vips2csv( in, fp, separator ) ) { fclose( fp ); return( -1 ); } fclose( fp ); return( 0 ); } /* Read to non-whitespace, or buffer overflow. */ static int fetch_nonwhite( FILE *fp, const char whitemap[256], char *buf, int max ) { int ch; int i; for( i = 0; i < max - 1; i++ ) { ch = fgetc( fp ); if( ch == EOF || ch == '\n' || whitemap[ch] ) break; buf[i] = ch; } buf[i] = '\0'; /* We mustn't skip the terminator. */ ungetc( ch, fp ); return( ch ); } /* Read a single double in ascii (not locale) encoding. * * Return the char that caused failure on fail (EOF or \n). */ static int read_ascii_double( FILE *fp, const char whitemap[256], double *out ) { int ch; char buf[256]; char *p; *out = 0.0; ch = skip_white( fp, whitemap ); if( ch == EOF || ch == '\n' ) return( ch ); fetch_nonwhite( fp, whitemap, buf, 256 ); /* The str we fetched must contain at least 1 digit. This helps stop * us trying to convert "MATLAB" (for example) to a number and * getting zero. */ for( p = buf; *p; p++ ) if( isdigit( *p ) ) break; if( !*p ) return( *buf ); *out = g_ascii_strtod( buf, NULL ); return( 0 ); } /* Read the header. Two numbers for width and height, and two optional * numbers for scale and offset. */ static int vips__matrix_header( char *whitemap, FILE *fp, int *width, int *height, double *scale, double *offset ) { double header[4]; double d; int i; int ch; for( i = 0; i < 4 && (ch = read_ascii_double( fp, whitemap, &header[i] )) == 0; i++ ) ; if( i < 2 ) { vips_error( "mask2vips", "%s", _( "no width / height" ) ); return( -1 ); } if( floor( header[0] ) != header[0] || floor( header[1] ) != header[1] ) { vips_error( "mask2vips", "%s", _( "width / height not int" ) ); return( -1 ); } *width = header[0]; *height = header[1]; if( *width <= 0 || *width > 100000 || *height <= 0 || *height > 100000 ) { vips_error( "mask2vips", "%s", _( "width / height out of range" ) ); return( -1 ); } if( i == 3 ) { vips_error( "mask2vips", "%s", _( "bad scale / offset" ) ); return( -1 ); } if( (ch = read_ascii_double( fp, whitemap, &d )) != '\n' ) { vips_error( "mask2vips", "%s", _( "extra chars in header" ) ); return( -1 ); } if( i > 2 && header[2] == 0.0 ) { vips_error( "mask2vips", "%s", _( "zero scale" ) ); return( -1 ); } *scale = i > 2 ? header[2] : 1.0; *offset = i > 2 ? header[3] : 0.0; skip_line( fp ); return( 0 ); } #define WHITESPACE " \"\t\n;," /* Get the header from an matrix file. * * Also read the first line and make sure there are the right number of * entries. */ int vips__matrix_read_header( const char *filename, int *width, int *height, double *scale, double *offset ) { char whitemap[256]; int i; char *p; FILE *fp; int ch; double d; for( i = 0; i < 256; i++ ) whitemap[i] = 0; for( p = WHITESPACE; *p; p++ ) whitemap[(int) *p] = 1; if( !(fp = vips__file_open_read( filename, NULL, TRUE )) ) return( -1 ); if( vips__matrix_header( whitemap, fp, width, height, scale, offset ) ) { fclose( fp ); return( -1 ); } for( i = 0; i < *width; i++ ) { ch = read_ascii_double( fp, whitemap, &d ); if( ch ) { fclose( fp ); vips_error( "mask2vips", "%s", _( "line too short" ) ); return( -1 ); } } /* Deliberately don't check for line too long. */ fclose( fp ); return( 0 ); } int vips__matrix_ismatrix( const char *filename ) { int width; int height; double scale; double offset; int result; vips_error_freeze(); result = vips__matrix_read_header( filename, &width, &height, &scale, &offset ); vips_error_thaw(); return( result == 0 ); } static int vips__matrix_body( char *whitemap, VipsImage *out, FILE *fp ) { int x, y; for( y = 0; y < out->Ysize; y++ ) { for( x = 0; x < out->Xsize; x++ ) { int ch; double d; ch = read_ascii_double( fp, whitemap, &d ); if( ch == EOF || ch == '\n' ) { vips_error( "mask2vips", _( "line %d too short" ), y + 1 ); return( -1 ); } *VIPS_MATRIX( out, x, y ) = d; /* Deliberately don't check for line too long. */ } skip_line( fp ); } return( 0 ); } VipsImage * vips__matrix_read_file( FILE *fp ) { char whitemap[256]; int i; char *p; int width; int height; double scale; double offset; VipsImage *out; for( i = 0; i < 256; i++ ) whitemap[i] = 0; for( p = WHITESPACE; *p; p++ ) whitemap[(int) *p] = 1; if( vips__matrix_header( whitemap, fp, &width, &height, &scale, &offset ) ) return( NULL ); if( !(out = vips_image_new_matrix( width, height )) ) return( NULL ); vips_image_set_double( out, "scale", scale ); vips_image_set_double( out, "offset", offset ); if( vips__matrix_body( whitemap, out, fp ) ) { g_object_unref( out ); return( NULL ); } return( out ); } VipsImage * vips__matrix_read( const char *filename ) { FILE *fp; VipsImage *out; if( !(fp = vips__file_open_read( filename, NULL, TRUE )) ) return( NULL ); out = vips__matrix_read_file( fp ); fclose( fp ); return( out ); } int vips__matrix_write_file( VipsImage *in, FILE *fp ) { VipsImage *mask; int x, y; if( vips_check_matrix( "vips2mask", in, &mask ) ) return( -1 ); fprintf( fp, "%d %d ", mask->Xsize, mask->Ysize ); if( vips_image_get_typeof( mask, "scale" ) && vips_image_get_typeof( mask, "offset" ) ) fprintf( fp, "%g %g ", vips_image_get_scale( mask ), vips_image_get_offset( mask ) ); fprintf( fp, "\n" ); for( y = 0; y < mask->Ysize; y++ ) { for( x = 0; x < mask->Xsize; x++ ) fprintf( fp, "%g ", *VIPS_MATRIX( mask, x, y ) ); fprintf( fp, "\n" ); } g_object_unref( mask ); return( 0 ); } int vips__matrix_write( VipsImage *in, const char *filename ) { FILE *fp; int result; if( !(fp = vips__file_open_write( filename, TRUE )) ) return( -1 ); result = vips__matrix_write_file( in, fp ); fclose( fp ); return( result ); } const char *vips__foreign_matrix_suffs[] = { ".mat", NULL }; vips-7.38.5/libvips/foreign/pngload.c0000644000175000017500000001233012303140253014401 00000000000000/* load png from a file * * 5/12/11 * - from tiffload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #ifdef HAVE_PNG #include "vipspng.h" typedef struct _VipsForeignLoadPng { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadPng; typedef VipsForeignLoadClass VipsForeignLoadPngClass; G_DEFINE_TYPE( VipsForeignLoadPng, vips_foreign_load_png, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_png_get_flags_filename( const char *filename ) { VipsForeignFlags flags; flags = 0; if( vips__png_isinterlaced( filename ) ) flags |= VIPS_FOREIGN_PARTIAL; else flags |= VIPS_FOREIGN_SEQUENTIAL; return( flags ); } static VipsForeignFlags vips_foreign_load_png_get_flags( VipsForeignLoad *load ) { VipsForeignLoadPng *png = (VipsForeignLoadPng *) load; return( vips_foreign_load_png_get_flags_filename( png->filename ) ); } static int vips_foreign_load_png_header( VipsForeignLoad *load ) { VipsForeignLoadPng *png = (VipsForeignLoadPng *) load; if( vips__png_header( png->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_png_load( VipsForeignLoad *load ) { VipsForeignLoadPng *png = (VipsForeignLoadPng *) load; if( vips__png_read( png->filename, load->real, load->access == VIPS_ACCESS_SEQUENTIAL ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_png_class_init( VipsForeignLoadPngClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "pngload"; object_class->description = _( "load png from file" ); foreign_class->suffs = vips__png_suffs; load_class->is_a = vips__png_ispng; load_class->get_flags_filename = vips_foreign_load_png_get_flags_filename; load_class->get_flags = vips_foreign_load_png_get_flags; load_class->header = vips_foreign_load_png_header; load_class->load = vips_foreign_load_png_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadPng, filename ), NULL ); } static void vips_foreign_load_png_init( VipsForeignLoadPng *png ) { } typedef struct _VipsForeignLoadPngBuffer { VipsForeignLoad parent_object; /* Load from a buffer. */ VipsArea *buf; } VipsForeignLoadPngBuffer; typedef VipsForeignLoadClass VipsForeignLoadPngBufferClass; G_DEFINE_TYPE( VipsForeignLoadPngBuffer, vips_foreign_load_png_buffer, VIPS_TYPE_FOREIGN_LOAD ); static int vips_foreign_load_png_buffer_header( VipsForeignLoad *load ) { VipsForeignLoadPngBuffer *png = (VipsForeignLoadPngBuffer *) load; if( vips__png_header_buffer( png->buf->data, png->buf->length, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_png_buffer_load( VipsForeignLoad *load ) { VipsForeignLoadPngBuffer *png = (VipsForeignLoadPngBuffer *) load; if( vips__png_read_buffer( png->buf->data, png->buf->length, load->real, load->access == VIPS_ACCESS_SEQUENTIAL ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_png_buffer_class_init( VipsForeignLoadPngBufferClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "pngload_buffer"; object_class->description = _( "load png from buffer" ); load_class->header = vips_foreign_load_png_buffer_header; load_class->load = vips_foreign_load_png_buffer_load; VIPS_ARG_BOXED( class, "buffer", 1, _( "Buffer" ), _( "Buffer to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadPngBuffer, buf ), VIPS_TYPE_BLOB ); } static void vips_foreign_load_png_buffer_init( VipsForeignLoadPngBuffer *png ) { } #endif /*HAVE_PNG*/ vips-7.38.5/libvips/foreign/matlab.h0000644000175000017500000000243412303140253014226 00000000000000/* common defs for matio read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_MAT_H #define VIPS_MAT_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ extern const char *vips__mat_suffs[]; int vips__mat_load( const char *filename, VipsImage *out ); int vips__mat_header( const char *filename, VipsImage *out ); int vips__mat_ismat( const char *filename ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_MAT_H*/ vips-7.38.5/libvips/foreign/vipspng.h0000644000175000017500000000332012303140253014447 00000000000000/* common defs for png read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PNG_H #define VIPS_PNG_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips__png_header( const char *name, VipsImage *out ); int vips__png_read( const char *name, VipsImage *out, gboolean readbehind ); int vips__png_ispng( const char *filename ); gboolean vips__png_isinterlaced( const char *filename ); extern const char *vips__png_suffs[]; int vips__png_read_buffer( char *buffer, size_t length, VipsImage *out, gboolean readbehind ); int vips__png_header_buffer( char *buffer, size_t length, VipsImage *out ); int vips__png_write( VipsImage *in, const char *filename, int compress, int interlace ); int vips__png_write_buf( VipsImage *in, void **obuf, size_t *olen, int compression, int interlace ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PNG_H*/ vips-7.38.5/libvips/foreign/openexr2vips.h0000644000175000017500000000253012303140253015427 00000000000000/* common defs for jpeg read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_OPENEXR2VIPS_H #define VIPS_OPENEXR2VIPS_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips__openexr_isexr( const char *filename ); gboolean vips__openexr_istiled( const char *filename ); int vips__openexr_read_header( const char *filename, VipsImage *out ); int vips__openexr_read( const char *filename, VipsImage *out ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_OPENEXR2VIPS_H*/ vips-7.38.5/libvips/foreign/fitsload.c0000644000175000017500000000614612303140253014572 00000000000000/* load fits from a file * * 5/12/11 * - from openslideload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_CFITSIO #include #include #include #include #include #include #include "fits.h" typedef struct _VipsForeignLoadFits { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadFits; typedef VipsForeignLoadClass VipsForeignLoadFitsClass; G_DEFINE_TYPE( VipsForeignLoadFits, vips_foreign_load_fits, VIPS_TYPE_FOREIGN_LOAD ); static int vips_foreign_load_fits_header( VipsForeignLoad *load ) { VipsForeignLoadFits *fits = (VipsForeignLoadFits *) load; if( vips__fits_read_header( fits->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_fits_load( VipsForeignLoad *load ) { VipsForeignLoadFits *fits = (VipsForeignLoadFits *) load; VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( fits ), 2 ); t[0] = vips_image_new(); if( vips__fits_read( fits->filename, t[0] ) || vips_flip( t[0], &t[1], VIPS_DIRECTION_VERTICAL, NULL ) || vips_image_write( t[1], load->real ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_fits_class_init( VipsForeignLoadFitsClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "fitsload"; object_class->description = _( "load a FITS image" ); foreign_class->suffs = vips__fits_suffs; load_class->is_a = vips__fits_isfits; load_class->header = vips_foreign_load_fits_header; load_class->load = vips_foreign_load_fits_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadFits, filename ), NULL ); } static void vips_foreign_load_fits_init( VipsForeignLoadFits *fits ) { } #endif /*HAVE_CFITSIO*/ vips-7.38.5/libvips/foreign/vipsload.c0000644000175000017500000000676612303140253014616 00000000000000/* load vips from a file * * 24/11/11 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include typedef struct _VipsForeignLoadVips { VipsForeignLoad parent_object; char *filename; } VipsForeignLoadVips; typedef VipsForeignLoadClass VipsForeignLoadVipsClass; G_DEFINE_TYPE( VipsForeignLoadVips, vips_foreign_load_vips, VIPS_TYPE_FOREIGN_LOAD ); static gboolean vips_foreign_load_vips_is_a( const char *filename ) { return( vips__file_magic( filename ) ); } static VipsForeignFlags vips_foreign_load_vips_get_flags_filename( const char *filename ) { VipsForeignFlags flags; flags = VIPS_FOREIGN_PARTIAL; if( vips__file_magic( filename ) == VIPS_MAGIC_SPARC ) flags |= VIPS_FOREIGN_BIGENDIAN; return( flags ); } static VipsForeignFlags vips_foreign_load_vips_get_flags( VipsForeignLoad *load ) { VipsForeignLoadVips *vips = (VipsForeignLoadVips *) load; return( vips_foreign_load_vips_get_flags_filename( vips->filename ) ); } static int vips_foreign_load_vips_header( VipsForeignLoad *load ) { VipsForeignLoadVips *vips = (VipsForeignLoadVips *) load; VipsImage *out; VipsImage *out2; if( !(out2 = vips_image_new_from_file( vips->filename )) ) return( -1 ); /* Remove the @out that's there now. */ g_object_get( load, "out", &out, NULL ); g_object_unref( out ); g_object_unref( out ); g_object_set( load, "out", out2, NULL ); return( 0 ); } static const char *vips_suffs[] = { ".v", NULL }; static void vips_foreign_load_vips_class_init( VipsForeignLoadVipsClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "vipsload"; object_class->description = _( "load vips from file" ); foreign_class->suffs = vips_suffs; load_class->is_a = vips_foreign_load_vips_is_a; load_class->get_flags = vips_foreign_load_vips_get_flags; load_class->get_flags_filename = vips_foreign_load_vips_get_flags_filename; load_class->header = vips_foreign_load_vips_header; load_class->load = NULL; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadVips, filename ), NULL ); } static void vips_foreign_load_vips_init( VipsForeignLoadVips *vips ) { } vips-7.38.5/libvips/foreign/webp.h0000644000175000017500000000320012303140253013713 00000000000000/* common defs for webp read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_WEBP_H #define VIPS_WEBP_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ extern const char *vips__webp_suffs[]; int vips__iswebp( const char *filename ); int vips__webp_read_file_header( const char *name, VipsImage *out ); int vips__webp_read_file( const char *name, VipsImage *out ); int vips__webp_read_buffer_header( void *buf, size_t len, VipsImage *out ); int vips__webp_read_buffer( void *buf, size_t len, VipsImage *out ); int vips__webp_write_file( VipsImage *out, const char *filename, int Q, gboolean lossless ); int vips__webp_write_buffer( VipsImage *out, void **buf, size_t *len, int Q, gboolean lossless ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_WEBP_H*/ vips-7.38.5/libvips/foreign/vipspng.c0000644000175000017500000005206312303140253014452 00000000000000/* Load/save png image with libpng * * 28/11/03 JC * - better no-overshoot on tile loop * 22/2/05 * - read non-interlaced PNG with a line buffer (thanks Michel Brabants) * 11/1/06 * - read RGBA palette-ized images more robustly (thanks Tom) * 20/4/06 * - auto convert to sRGB/mono (with optional alpha) for save * 1/5/06 * - from vips_png.c * 8/5/06 * - set RGB16/GREY16 if appropriate * 2/11/07 * - use im_wbuffer() API for BG writes * 28/2/09 * - small cleanups * 4/2/10 * - gtkdoc * - fixed 16-bit save * 12/5/10 * - lololo but broke 8-bit save, fixed again * 20/7/10 Tim Elliott * - added im_vips2bufpng() * 8/1/11 * - get set png resolution (thanks Zhiyu Wu) * 17/3/11 * - update for libpng-1.5 API changes * - better handling of palette and 1-bit images * - ... but we are now png 1.2.9 and later only :-( argh * 28/3/11 * - argh gamma was wrong when viewed in firefox * 19/12/11 * - rework as a set of fns ready for wrapping as a class * 7/2/12 * - mild refactoring * - add support for sequential reads * 23/2/12 * - add a longjmp() to our error handler to stop the default one running * 13/3/12 * - add ICC profile read/write * 15/3/12 * - better alpha handling * - sanity check pixel geometry before allowing read * 17/6/12 * - more alpha fixes ... some images have no transparency chunk but * still set color_type to alpha * 16/7/13 * - more robust error handling from libpng */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_PNG #include #include #include #include #include #include #include #include "vipspng.h" #if PNG_LIBPNG_VER < 10003 #error "PNG library too old." #endif static void user_error_function( png_structp png_ptr, png_const_charp error_msg ) { vips_error( "vipspng", "%s", error_msg ); /* This function must not return or the default error handler will be * invoked. */ longjmp( png_jmpbuf( png_ptr ), -1 ); } static void user_warning_function( png_structp png_ptr, png_const_charp warning_msg ) { vips_error( "vipspng", "%s", warning_msg ); } /* What we track during a PNG read. */ typedef struct { char *name; VipsImage *out; gboolean readbehind; int y_pos; png_structp pPng; png_infop pInfo; png_bytep *row_pointer; /* For FILE input. */ FILE *fp; /* For memory input. */ char *buffer; size_t length; size_t read_pos; } Read; static void read_destroy( VipsImage *out, Read *read ) { VIPS_FREEF( fclose, read->fp ); if( read->pPng ) png_destroy_read_struct( &read->pPng, &read->pInfo, NULL ); VIPS_FREE( read->row_pointer ); } static Read * read_new( VipsImage *out, gboolean readbehind ) { Read *read; if( !(read = VIPS_NEW( out, Read )) ) return( NULL ); read->name = NULL; read->readbehind = readbehind; read->out = out; read->y_pos = 0; read->pPng = NULL; read->pInfo = NULL; read->row_pointer = NULL; read->fp = NULL; read->buffer = NULL; read->length = 0; read->read_pos = 0; g_signal_connect( out, "close", G_CALLBACK( read_destroy ), read ); if( !(read->pPng = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, user_error_function, user_warning_function )) ) return( NULL ); /* Catch PNG errors from png_create_info_struct(). */ if( setjmp( png_jmpbuf( read->pPng ) ) ) return( NULL ); if( !(read->pInfo = png_create_info_struct( read->pPng )) ) return( NULL ); return( read ); } static Read * read_new_filename( VipsImage *out, const char *name, gboolean readbehind ) { Read *read; if( !(read = read_new( out, readbehind )) ) return( NULL ); read->name = vips_strdup( VIPS_OBJECT( out ), name ); if( !(read->fp = vips__file_open_read( name, NULL, FALSE )) ) return( NULL ); /* Read enough of the file that png_get_interlace_type() will start * working. */ png_init_io( read->pPng, read->fp ); png_read_info( read->pPng, read->pInfo ); return( read ); } /* Read a png header. */ static int png2vips_header( Read *read, VipsImage *out ) { png_uint_32 width, height; int bit_depth, color_type; int interlace_type; png_uint_32 res_x, res_y; int unit_type; png_charp name; int compression_type; /* Well thank you, libpng. */ #if PNG_LIBPNG_VER < 10400 png_charp profile; #else png_bytep profile; #endif png_uint_32 proflen; int bands; VipsInterpretation interpretation; double Xres, Yres; if( setjmp( png_jmpbuf( read->pPng ) ) ) return( -1 ); png_get_IHDR( read->pPng, read->pInfo, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL ); /* png_get_channels() gives us 1 band for palette images ... so look * at colour_type for output bands. * * Ignore alpha, we detect that separately below. */ switch( color_type ) { case PNG_COLOR_TYPE_PALETTE: bands = 3; break; case PNG_COLOR_TYPE_GRAY_ALPHA: case PNG_COLOR_TYPE_GRAY: bands = 1; break; case PNG_COLOR_TYPE_RGB: case PNG_COLOR_TYPE_RGB_ALPHA: bands = 3; break; default: vips_error( "png2vips", "%s", _( "unsupported color type" ) ); return( -1 ); } if( bit_depth > 8 ) { if( bands < 3 ) interpretation = VIPS_INTERPRETATION_GREY16; else interpretation = VIPS_INTERPRETATION_RGB16; } else { if( bands < 3 ) interpretation = VIPS_INTERPRETATION_B_W; else interpretation = VIPS_INTERPRETATION_sRGB; } /* Expand palette images. */ if( color_type == PNG_COLOR_TYPE_PALETTE ) png_set_palette_to_rgb( read->pPng ); /* Expand transparency. */ if( png_get_valid( read->pPng, read->pInfo, PNG_INFO_tRNS ) ) { png_set_tRNS_to_alpha( read->pPng ); bands += 1; } else if( color_type == PNG_COLOR_TYPE_GRAY_ALPHA || color_type == PNG_COLOR_TYPE_RGB_ALPHA ) { /* Some images have no transparency chunk, but still set * color_type to alpha. */ bands += 1; } /* Expand <8 bit images to full bytes. */ if( color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8 ) png_set_expand_gray_1_2_4_to_8( read->pPng ); /* If we're an INTEL byte order machine and this is 16bits, we need * to swap bytes. */ if( bit_depth > 8 && !vips_amiMSBfirst() ) png_set_swap( read->pPng ); /* Get resolution. I'm not sure what we should do for UNKNOWN, since * vips is always pixels/mm. */ unit_type = PNG_RESOLUTION_METER; res_x = 1000; res_y = 1000; png_get_pHYs( read->pPng, read->pInfo, &res_x, &res_y, &unit_type ); switch( unit_type ) { case PNG_RESOLUTION_METER: Xres = res_x / 1000.0; Yres = res_y / 1000.0; break; default: Xres = res_x; Yres = res_y; break; } /* Set VIPS header. */ vips_image_init_fields( out, width, height, bands, bit_depth > 8 ? VIPS_FORMAT_USHORT : VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, interpretation, Xres, Yres ); /* Sequential mode needs thinstrip to work with things like * vips_shrink(). */ vips_image_pipelinev( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL ); /* Fetch the ICC profile. @name is useless, something like "icc" or * "ICC Profile" etc. Ignore it. * * @profile was png_charpp in libpngs < 1.5, png_bytepp is the * modern one. Ignore the warning, if any. */ if( png_get_iCCP( read->pPng, read->pInfo, &name, &compression_type, &profile, &proflen ) ) { void *profile_copy; #ifdef DEBUG printf( "png2vips_header: attaching %zd bytes of ICC profile\n", proflen ); printf( "png2vips_header: name = \"%s\"\n", name ); #endif /*DEBUG*/ if( !(profile_copy = vips_malloc( NULL, proflen )) ) return( -1 ); memcpy( profile_copy, profile, proflen ); vips_image_set_blob( out, VIPS_META_ICC_NAME, (VipsCallbackFn) vips_free, profile_copy, proflen ); } /* Sanity-check line size. */ png_read_update_info( read->pPng, read->pInfo ); if( png_get_rowbytes( read->pPng, read->pInfo ) != VIPS_IMAGE_SIZEOF_LINE( out ) ) { vips_error( "vipspng", "%s", _( "unable to read PNG header" ) ); return( -1 ); } return( 0 ); } /* Read a PNG file header into a VIPS header. */ int vips__png_header( const char *name, VipsImage *out ) { Read *read; if( !(read = read_new_filename( out, name, FALSE )) || png2vips_header( read, out ) ) return( -1 ); return( 0 ); } /* Out is a huge "t" buffer we decompress to. */ static int png2vips_interlace( Read *read, VipsImage *out ) { int y; #ifdef DEBUG printf( "png2vips_interlace: reading whole image\n" ); #endif /*DEBUG*/ if( vips_image_write_prepare( out ) ) return( -1 ); if( setjmp( png_jmpbuf( read->pPng ) ) ) return( -1 ); if( !(read->row_pointer = VIPS_ARRAY( NULL, out->Ysize, png_bytep )) ) return( -1 ); for( y = 0; y < out->Ysize; y++ ) read->row_pointer[y] = VIPS_IMAGE_ADDR( out, 0, y ); png_read_image( read->pPng, read->row_pointer ); return( 0 ); } static int png2vips_generate( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRect *r = &or->valid; Read *read = (Read *) a; int y; #ifdef DEBUG printf( "png2vips_generate: line %d, %d rows\n", r->top, r->height ); #endif /*DEBUG*/ /* We're inside a tilecache where tiles are the full image width, so * this should always be true. */ g_assert( r->left == 0 ); g_assert( r->width == or->im->Xsize ); g_assert( VIPS_RECT_BOTTOM( r ) <= or->im->Ysize ); /* Tiles should always be a strip in height, unless it's the final * strip. */ g_assert( r->height == VIPS_MIN( 8, or->im->Ysize - r->top ) ); /* And check that y_pos is correct. It should be, since we are inside * a vips_sequential(). */ g_assert( r->top == read->y_pos ); for( y = 0; y < r->height; y++ ) { png_bytep q = (png_bytep) VIPS_REGION_ADDR( or, 0, r->top + y ); /* We need to catch and ignore errors from read_row(). */ if( !setjmp( png_jmpbuf( read->pPng ) ) ) png_read_row( read->pPng, q, NULL ); else { #ifdef DEBUG printf( "png2vips_generate: png_read_row() failed, " "line %d\n", r->top + y ); printf( "png2vips_generate: file %s\n", read->name ); printf( "png2vips_generate: thread %p\n", g_thread_self() ); #endif /*DEBUG*/ } read->y_pos += 1; } return( 0 ); } /* Interlaced PNGs need to be entirely decompressed into memory then can be * served partially from there. Non-interlaced PNGs may be read sequentially. */ gboolean vips__png_isinterlaced( const char *filename ) { VipsImage *image; Read *read; int interlace_type; image = vips_image_new(); if( !(read = read_new_filename( image, filename, FALSE )) ) { g_object_unref( image ); return( -1 ); } interlace_type = png_get_interlace_type( read->pPng, read->pInfo ); g_object_unref( image ); return( interlace_type != PNG_INTERLACE_NONE ); } static int png2vips_image( Read *read, VipsImage *out ) { int interlace_type = png_get_interlace_type( read->pPng, read->pInfo ); VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 3 ); if( interlace_type != PNG_INTERLACE_NONE ) { /* Arg awful interlaced image. We have to load to a huge mem * buffer, then copy to out. */ t[0] = vips_image_new_buffer(); if( png2vips_header( read, t[0] ) || png2vips_interlace( read, t[0] ) || vips_image_write( t[0], out ) ) return( -1 ); } else { t[0] = vips_image_new(); if( png2vips_header( read, t[0] ) || vips_image_generate( t[0], NULL, png2vips_generate, NULL, read, NULL ) || vips_sequential( t[0], &t[1], "tile_height", 8, "access", read->readbehind ? VIPS_ACCESS_SEQUENTIAL : VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, NULL ) || vips_image_write( t[1], out ) ) return( -1 ); } return( 0 ); } int vips__png_read( const char *filename, VipsImage *out, gboolean readbehind ) { Read *read; #ifdef DEBUG printf( "vips__png_read: reading \"%s\"\n", filename ); #endif /*DEBUG*/ if( !(read = read_new_filename( out, filename, readbehind )) || png2vips_image( read, out ) ) return( -1 ); #ifdef DEBUG printf( "vips__png_read: done\n" ); #endif /*DEBUG*/ return( 0 ); } int vips__png_ispng( const char *filename ) { unsigned char buf[8]; return( vips__get_bytes( filename, buf, 8 ) && !png_sig_cmp( buf, 0, 8 ) ); } static void vips_png_read_buffer( png_structp pPng, png_bytep data, png_size_t length ) { Read *read = png_get_io_ptr( pPng ); #ifdef DEBUG printf( "vips_png_read_buffer: read %zd bytes\n", length ); #endif /*DEBUG*/ if( read->read_pos + length > read->length ) png_error( pPng, "not enough data in buffer" ); memcpy( data, read->buffer + read->read_pos, length ); read->read_pos += length; } static Read * read_new_buffer( VipsImage *out, char *buffer, size_t length, gboolean readbehind ) { Read *read; if( !(read = read_new( out, readbehind )) ) return( NULL ); read->length = length; read->buffer = buffer; png_set_read_fn( read->pPng, read, vips_png_read_buffer ); /* Read enough of the file that png_get_interlace_type() will start * working. */ png_read_info( read->pPng, read->pInfo ); return( read ); } int vips__png_header_buffer( char *buffer, size_t length, VipsImage *out ) { Read *read; if( !(read = read_new_buffer( out, buffer, length, FALSE )) || png2vips_header( read, out ) ) return( -1 ); return( 0 ); } int vips__png_read_buffer( char *buffer, size_t length, VipsImage *out, gboolean readbehind ) { Read *read; if( !(read = read_new_buffer( out, buffer, length, readbehind )) || png2vips_image( read, out ) ) return( -1 ); return( 0 ); } const char *vips__png_suffs[] = { ".png", NULL }; /* What we track during a PNG write. */ typedef struct { VipsImage *in; FILE *fp; png_structp pPng; png_infop pInfo; png_bytep *row_pointer; } Write; static void write_finish( Write *write ) { VIPS_FREEF( fclose, write->fp ); if( write->pPng ) png_destroy_write_struct( &write->pPng, &write->pInfo ); } static void write_destroy( VipsImage *out, Write *write ) { write_finish( write ); } static Write * write_new( VipsImage *in ) { Write *write; if( !(write = VIPS_NEW( in, Write )) ) return( NULL ); memset( write, 0, sizeof( Write ) ); write->in = in; g_signal_connect( in, "close", G_CALLBACK( write_destroy ), write ); if( !(write->row_pointer = VIPS_ARRAY( in, in->Ysize, png_bytep )) ) return( NULL ); if( !(write->pPng = png_create_write_struct( PNG_LIBPNG_VER_STRING, NULL, user_error_function, user_warning_function )) ) return( NULL ); /* Catch PNG errors from png_create_info_struct(). */ if( setjmp( png_jmpbuf( write->pPng ) ) ) return( NULL ); if( !(write->pInfo = png_create_info_struct( write->pPng )) ) return( NULL ); return( write ); } static int write_png_block( VipsRegion *region, Rect *area, void *a ) { Write *write = (Write *) a; int i; /* The area to write is always a set of complete scanlines. */ g_assert( area->left == 0 ); g_assert( area->width == region->im->Xsize ); g_assert( area->top + area->height <= region->im->Ysize ); /* Catch PNG errors. Yuk. */ if( setjmp( png_jmpbuf( write->pPng ) ) ) return( -1 ); for( i = 0; i < area->height; i++ ) write->row_pointer[i] = (png_bytep) VIPS_REGION_ADDR( region, 0, area->top + i ); png_write_rows( write->pPng, write->row_pointer, area->height ); return( 0 ); } /* Write a VIPS image to PNG. */ static int write_vips( Write *write, int compress, int interlace ) { VipsImage *in = write->in; int bit_depth; int color_type; int interlace_type; int i, nb_passes; g_assert( in->BandFmt == VIPS_FORMAT_UCHAR || in->BandFmt == VIPS_FORMAT_USHORT ); g_assert( in->Coding == VIPS_CODING_NONE ); g_assert( in->Bands > 0 && in->Bands < 5 ); /* Catch PNG errors. */ if( setjmp( png_jmpbuf( write->pPng ) ) ) return( -1 ); /* Check input image. */ if( vips_image_pio_input( in ) ) return( -1 ); if( compress < 0 || compress > 9 ) { vips_error( "vips2png", "%s", _( "compress should be in [0,9]" ) ); return( -1 ); } /* Set compression parameters. */ png_set_compression_level( write->pPng, compress ); bit_depth = in->BandFmt == VIPS_FORMAT_UCHAR ? 8 : 16; switch( in->Bands ) { case 1: color_type = PNG_COLOR_TYPE_GRAY; break; case 2: color_type = PNG_COLOR_TYPE_GRAY_ALPHA; break; case 3: color_type = PNG_COLOR_TYPE_RGB; break; case 4: color_type = PNG_COLOR_TYPE_RGB_ALPHA; break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } interlace_type = interlace ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE; png_set_IHDR( write->pPng, write->pInfo, in->Xsize, in->Ysize, bit_depth, color_type, interlace_type, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT ); /* Set resolution. libpnbg uses pixels per meter. */ png_set_pHYs( write->pPng, write->pInfo, VIPS_RINT( in->Xres * 1000 ), VIPS_RINT( in->Yres * 1000 ), PNG_RESOLUTION_METER ); /* Set ICC Profile. */ if( vips_image_get_typeof( in, VIPS_META_ICC_NAME ) ) { void *profile; size_t profile_length; if( vips_image_get_blob( in, VIPS_META_ICC_NAME, &profile, &profile_length ) ) return( -1 ); #ifdef DEBUG printf( "write_vips: attaching %zd bytes of ICC profile\n", profile_length ); #endif /*DEBUG*/ png_set_iCCP( write->pPng, write->pInfo, "icc", PNG_COMPRESSION_TYPE_BASE, profile, profile_length ); } png_write_info( write->pPng, write->pInfo ); /* If we're an intel byte order CPU and this is a 16bit image, we need * to swap bytes. */ if( bit_depth > 8 && !vips_amiMSBfirst() ) png_set_swap( write->pPng ); if( interlace ) nb_passes = png_set_interlace_handling( write->pPng ); else nb_passes = 1; /* Write data. */ for( i = 0; i < nb_passes; i++ ) if( vips_sink_disc( write->in, write_png_block, write ) ) return( -1 ); /* The setjmp() was held by our background writer: reset it. */ if( setjmp( png_jmpbuf( write->pPng ) ) ) return( -1 ); png_write_end( write->pPng, write->pInfo ); return( 0 ); } int vips__png_write( VipsImage *in, const char *filename, int compress, int interlace ) { Write *write; #ifdef DEBUG printf( "vips__png_write: writing \"%s\"\n", filename ); #endif /*DEBUG*/ if( !(write = write_new( in )) ) return( -1 ); /* Make output. */ if( !(write->fp = vips__file_open_write( filename, FALSE )) ) return( -1 ); png_init_io( write->pPng, write->fp ); /* Convert it! */ if( write_vips( write, compress, interlace ) ) { vips_error( "vips2png", _( "unable to write \"%s\"" ), filename ); return( -1 ); } write_finish( write ); #ifdef DEBUG printf( "vips__png_write: done\n" ); #endif /*DEBUG*/ return( 0 ); } typedef struct _WriteBuf { char *buf; size_t len; size_t alloc; } WriteBuf; static void write_buf_free( WriteBuf *wbuf ) { VIPS_FREE( wbuf->buf ); VIPS_FREE( wbuf ); } static WriteBuf * write_buf_new( void ) { WriteBuf *wbuf; if( !(wbuf = VIPS_NEW( NULL, WriteBuf )) ) return( NULL ); wbuf->buf = NULL; wbuf->len = 0; wbuf->alloc = 0; return( wbuf ); } static void write_buf_grow( WriteBuf *wbuf, size_t grow_len ) { size_t new_len = wbuf->len + grow_len; if( new_len > wbuf->alloc ) { size_t proposed_alloc = (16 + wbuf->alloc) * 3 / 2; wbuf->alloc = VIPS_MAX( proposed_alloc, new_len ); /* There's no vips_realloc(), so we call g_realloc() directly. * This is safe, since vips_malloc() / vips_free() are wrappers * over g_malloc() / g_free(). * * FIXME: add vips_realloc(). */ wbuf->buf = g_realloc( wbuf->buf, wbuf->alloc ); VIPS_DEBUG_MSG( "write_buf_grow: grown to %zd bytes\n", wbuf->alloc ); } } static void user_write_data( png_structp png_ptr, png_bytep data, png_size_t length ) { WriteBuf *wbuf = (WriteBuf *) png_get_io_ptr( png_ptr ); char *write_start; write_buf_grow( wbuf, length ); write_start = wbuf->buf + wbuf->len; memcpy( write_start, data, length ); wbuf->len += length; g_assert( wbuf->len <= wbuf->alloc ); } int vips__png_write_buf( VipsImage *in, void **obuf, size_t *olen, int compression, int interlace ) { WriteBuf *wbuf; Write *write; if( !(wbuf = write_buf_new()) ) return( -1 ); if( !(write = write_new( in )) ) { write_buf_free( wbuf ); return( -1 ); } png_set_write_fn( write->pPng, wbuf, user_write_data, NULL ); /* Convert it! */ if( write_vips( write, compression, interlace ) ) { write_buf_free( wbuf ); vips_error( "vips2png", "%s", _( "unable to write to buffer" ) ); return( -1 ); } *obuf = wbuf->buf; wbuf->buf = NULL; if( olen ) *olen = wbuf->len; write_buf_free( wbuf ); return( 0 ); } #endif /*HAVE_PNG*/ vips-7.38.5/libvips/foreign/radiance.h0000644000175000017500000000257212303140253014537 00000000000000/* common defs for ppm read/write */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_RADIANCE_H #define VIPS_RADIANCE_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ int vips__rad_israd( const char *filename ); int vips__rad_header( const char *filename, VipsImage *out ); int vips__rad_load( const char *filename, VipsImage *out, gboolean readbehind ); int vips__rad_save( VipsImage *in, const char *filename ); extern const char *vips__rad_suffs[]; #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_RADIANCE_H*/ vips-7.38.5/libvips/foreign/tiffload.c0000644000175000017500000001004612303140253014547 00000000000000/* load tiff from a file * * 5/12/11 * - from tiffload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_TIFF #include #include #include #include #include #include #include "tiff.h" typedef struct _VipsForeignLoadTiff { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; /* Load this page. */ int page; } VipsForeignLoadTiff; typedef VipsForeignLoadClass VipsForeignLoadTiffClass; G_DEFINE_TYPE( VipsForeignLoadTiff, vips_foreign_load_tiff, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_tiff_get_flags_filename( const char *filename ) { VipsForeignFlags flags; flags = 0; if( vips__istifftiled( filename ) ) flags |= VIPS_FOREIGN_PARTIAL; else flags |= VIPS_FOREIGN_SEQUENTIAL; return( flags ); } static VipsForeignFlags vips_foreign_load_tiff_get_flags( VipsForeignLoad *load ) { VipsForeignLoadTiff *tiff = (VipsForeignLoadTiff *) load; return( vips_foreign_load_tiff_get_flags_filename( tiff->filename ) ); } static int vips_foreign_load_tiff_header( VipsForeignLoad *load ) { VipsForeignLoadTiff *tiff = (VipsForeignLoadTiff *) load; if( vips__tiff_read_header( tiff->filename, load->out, tiff->page ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_tiff_load( VipsForeignLoad *load ) { VipsForeignLoadTiff *tiff = (VipsForeignLoadTiff *) load; if( vips__tiff_read( tiff->filename, load->real, tiff->page, load->access == VIPS_ACCESS_SEQUENTIAL ) ) return( -1 ); return( 0 ); } const char *vips__foreign_tiff_suffs[] = { ".tif", ".tiff", NULL }; static void vips_foreign_load_tiff_class_init( VipsForeignLoadTiffClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; /* Other libraries may be using libtiff, we want to capture tiff * warning and error as soon as we can. * * This class init will be triggered during startup. */ vips__tiff_init(); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "tiffload"; object_class->description = _( "load tiff from file" ); foreign_class->suffs = vips__foreign_tiff_suffs; load_class->is_a = vips__istiff; load_class->get_flags_filename = vips_foreign_load_tiff_get_flags_filename; load_class->get_flags = vips_foreign_load_tiff_get_flags; load_class->header = vips_foreign_load_tiff_header; load_class->load = vips_foreign_load_tiff_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadTiff, filename ), NULL ); VIPS_ARG_INT( class, "page", 10, _( "Page" ), _( "Load this page from the file" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadTiff, page ), 0, 100000, 0 ); } static void vips_foreign_load_tiff_init( VipsForeignLoadTiff *tiff ) { } #endif /*HAVE_TIFF*/ vips-7.38.5/libvips/foreign/magick2vips.c0000644000175000017500000004143012303140253015177 00000000000000/* Read a file using libMagick * * 7/1/03 JC * - from im_tiff2vips * 3/2/03 JC * - some InitializeMagick() fail with NULL arg * 2/11/04 * - im_magick2vips_header() also checks sensible width/height * 28/10/05 * - copy attributes to meta * - write many-frame images as a big column if all frames have identical * width/height/bands/depth * 31/3/06 * - test for magick attr support * 8/5/06 * - set RGB16/GREY16 if appropriate * 10/8/07 * - support 32/64 bit imagemagick too * 21/2/08 * - use MaxRGB if QuantumRange is missing (thanks Bob) * - look for MAGICKCORE_HDRI_SUPPORT (thanks Marcel) * - use image->attributes if GetNextImageAttribute() is missing * 3/3/09 * - allow funky bit depths, like 14 (thanks Mikkel) * 17/3/09 * - reset dcm:display-range to help DICOM read * 20/4/09 * - argh libMagick uses 255 == transparent ... we must invert all * alpha channels * 12/5/09 * - fix signed/unsigned warnings * 23/7/09 * - SetImageOption() is optional (to help GM) * 4/2/10 * - gtkdoc * 30/4/10 * - better number of bands detection with GetImageType() * - use new API stuff, argh * 17/12/11 * - turn into a set of read fns ready to be called from a class * 11/6/13 * - add @all_frames option, off by default */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Turn on debugging output. #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_MAGICK #include #include #include #include #include #include #include "magick.h" /* pre-float Magick used to call this MaxRGB. */ #if !defined(QuantumRange) # define QuantumRange MaxRGB #endif /* And this used to be UseHDRI. */ #if MAGICKCORE_HDRI_SUPPORT # define UseHDRI=1 #endif /* What we track during a read call. */ typedef struct _Read { char *filename; VipsImage *im; gboolean all_frames; Image *image; ImageInfo *image_info; ExceptionInfo exception; int n_frames; Image **frames; int frame_height; /* Mutex to serialise calls to libMagick during threaded read. */ GMutex *lock; } Read; static int read_destroy( VipsImage *im, Read *read ) { #ifdef DEBUG printf( "magick2vips: read_destroy: %s\n", read->filename ); #endif /*DEBUG*/ VIPS_FREE( read->filename ); VIPS_FREEF( DestroyImage, read->image ); VIPS_FREEF( DestroyImageInfo, read->image_info ); VIPS_FREE( read->frames ); DestroyExceptionInfo( &read->exception ); VIPS_FREEF( vips_g_mutex_free, read->lock ); return( 0 ); } static Read * read_new( const char *filename, VipsImage *im, gboolean all_frames ) { Read *read; static int inited = 0; if( !inited ) { #ifdef HAVE_MAGICKCOREGENESIS MagickCoreGenesis( vips_get_argv0(), MagickFalse ); #else /*!HAVE_MAGICKCOREGENESIS*/ InitializeMagick( "" ); #endif /*HAVE_MAGICKCOREGENESIS*/ inited = 1; } if( !(read = VIPS_NEW( im, Read )) ) return( NULL ); read->filename = g_strdup( filename ); read->all_frames = all_frames; read->im = im; read->image = NULL; read->image_info = CloneImageInfo( NULL ); GetExceptionInfo( &read->exception ); read->n_frames = 0; read->frames = NULL; read->frame_height = 0; read->lock = vips_g_mutex_new(); g_signal_connect( im, "close", G_CALLBACK( read_destroy ), read ); if( !read->image_info ) return( NULL ); vips_strncpy( read->image_info->filename, filename, MaxTextExtent ); #ifdef DEBUG printf( "magick2vips: read_new: %s\n", read->filename ); #endif /*DEBUG*/ return( read ); } static int get_bands( Image *image ) { int bands; ImageType type = GetImageType( image, &image->exception ); switch( type ) { case BilevelType: case GrayscaleType: bands = 1; break; case GrayscaleMatteType: /* ImageMagick also has PaletteBilevelMatteType, but GraphicsMagick * does not. Skip for portability. */ bands = 2; break; case PaletteType: case TrueColorType: bands = 3; break; case PaletteMatteType: case TrueColorMatteType: case ColorSeparationType: bands = 4; break; case ColorSeparationMatteType: bands = 5; break; default: vips_error( "magick2vips", _( "unsupported image type %d" ), (int) type ); return( -1 ); } return( bands ); } static int parse_header( Read *read ) { VipsImage *im = read->im; Image *image = read->image; Image *p; int i; #ifdef DEBUG printf( "parse_header: filename = %s\n", read->filename ); printf( "GetImageChannelDepth(AllChannels) = %zd\n", GetImageChannelDepth( image, AllChannels, &image->exception ) ); printf( "GetImageDepth() = %zd\n", GetImageDepth( image, &image->exception ) ); printf( "image->depth = %zd\n", image->depth ); printf( "GetImageType() = %d\n", GetImageType( image, &image->exception ) ); printf( "IsGrayImage() = %d\n", IsGrayImage( image, &image->exception ) ); printf( "IsMonochromeImage() = %d\n", IsMonochromeImage( image, &image->exception ) ); printf( "IsOpaqueImage() = %d\n", IsOpaqueImage( image, &image->exception ) ); printf( "image->columns = %zd\n", image->columns ); printf( "image->rows = %zd\n", image->rows ); #endif /*DEBUG*/ im->Xsize = image->columns; im->Ysize = image->rows; read->frame_height = image->rows; if( (im->Bands = get_bands( image )) < 0 ) return( -1 ); /* Depth can be 'fractional'. You'd think we should use * GetImageDepth() but that seems unreliable. 16-bit mono DICOM images * are reported as depth 1, for example. */ im->BandFmt = -1; if( image->depth >= 1 && image->depth <= 8 ) im->BandFmt = VIPS_FORMAT_UCHAR; if( image->depth >= 9 && image->depth <= 16 ) im->BandFmt = VIPS_FORMAT_USHORT; #ifdef UseHDRI if( image->depth == 32 ) im->BandFmt = VIPS_FORMAT_FLOAT; if( image->depth == 64 ) im->BandFmt = VIPS_FORMAT_DOUBLE; #else /*!UseHDRI*/ if( image->depth == 32 ) im->BandFmt = VIPS_FORMAT_UINT; #endif /*UseHDRI*/ if( im->BandFmt == -1 ) { vips_error( "magick2vips", _( "unsupported bit depth %d" ), (int) image->depth ); return( -1 ); } switch( image->colorspace ) { case GRAYColorspace: if( im->BandFmt == VIPS_FORMAT_USHORT ) im->Type = VIPS_INTERPRETATION_GREY16; else im->Type = VIPS_INTERPRETATION_B_W; break; case RGBColorspace: if( im->BandFmt == VIPS_FORMAT_USHORT ) im->Type = VIPS_INTERPRETATION_RGB16; else im->Type = VIPS_INTERPRETATION_RGB; break; case sRGBColorspace: if( im->BandFmt == VIPS_FORMAT_USHORT ) im->Type = VIPS_INTERPRETATION_RGB16; else im->Type = VIPS_INTERPRETATION_sRGB; break; case CMYKColorspace: im->Type = VIPS_INTERPRETATION_CMYK; break; default: vips_error( "magick2vips", _( "unsupported colorspace %d" ), (int) image->colorspace ); return( -1 ); } switch( image->units ) { case PixelsPerInchResolution: im->Xres = image->x_resolution / 25.4; im->Yres = image->y_resolution / 25.4; break; case PixelsPerCentimeterResolution: im->Xres = image->x_resolution / 10.0; im->Yres = image->y_resolution / 10.0; break; default: im->Xres = 1.0; im->Yres = 1.0; break; } /* Other fields. */ im->Coding = VIPS_CODING_NONE; vips_image_pipelinev( im, VIPS_DEMAND_STYLE_SMALLTILE, NULL ); /* Three ways to loop over attributes / properties :-( */ #ifdef HAVE_RESETIMAGEPROPERTYITERATOR { char *key; /* This is the most recent imagemagick API, test for this first. */ ResetImagePropertyIterator( image ); while( (key = GetNextImageProperty( image )) ) { char name_text[256]; VipsBuf name = VIPS_BUF_STATIC( name_text ); vips_buf_appendf( &name, "magick-%s", key ); vips_image_set_string( im, vips_buf_all( &name ), GetImageProperty( image, key ) ); } } #elif defined(HAVE_RESETIMAGEATTRIBUTEITERATOR) { const ImageAttribute *attr; /* magick6.1-ish and later, deprecated in 6.5ish. */ ResetImageAttributeIterator( image ); while( (attr = GetNextImageAttribute( image )) ) { char name_text[256]; VipsBuf name = VIPS_BUF_STATIC( name_text ); vips_buf_appendf( &name, "magick-%s", attr->key ); vips_image_set_string( im, vips_buf_all( &name ), attr->value ); } } #else { const ImageAttribute *attr; /* GraphicsMagick is missing the iterator: we have to loop ourselves. * ->attributes is marked as private in the header, but there's no * getter so we have to access it directly. */ for( attr = image->attributes; attr; attr = attr->next ) { char name_text[256]; VipsBuf name = VIPS_BUF_STATIC( name_text ); vips_buf_appendf( &name, "magick-%s", attr->key ); vips_image_set_string( im, vips_buf_all( &name ), attr->value ); } } #endif /* Do we have a set of equal-sized frames? Append them. FIXME ... there must be an attribute somewhere from dicom read which says this is a volumetric image */ read->n_frames = 0; for( p = image; p; (p = GetNextImageInList( p )) ) { if( p->columns != (unsigned int) im->Xsize || p->rows != (unsigned int) im->Ysize || get_bands( p ) != im->Bands ) break; read->n_frames += 1; } if( p ) /* Nope ... just do the first image in the list. */ read->n_frames = 1; #ifdef DEBUG printf( "image has %d frames\n", read->n_frames ); #endif /*DEBUG*/ /* If all_frames is off, just get the first one. */ if( !read->all_frames ) read->n_frames = 1; /* Record frame pointers. */ im->Ysize *= read->n_frames; if( !(read->frames = VIPS_ARRAY( NULL, read->n_frames, Image * )) ) return( -1 ); p = image; for( i = 0; i < read->n_frames; i++ ) { read->frames[i] = p; p = GetNextImageInList( p ); } return( 0 ); } /* Divide by this to get 0 - MAX from a Quantum. Eg. consider QuantumRange == * 65535, MAX == 255 (a Q16 ImageMagic representing an 8-bit image). Make sure * this can't be zero (if QuantumRange < MAX) .. can happen if we have a Q8 * ImageMagick trying to represent a 16-bit image. */ #define SCALE( MAX ) \ (QuantumRange < (MAX) ? \ 1 : \ ((QuantumRange + 1) / ((MAX) + 1))) #define GRAY_LOOP( TYPE, MAX ) { \ TYPE *q = (TYPE *) q8; \ \ for( x = 0; x < n; x++ ) \ q[x] = pixels[x].green / SCALE( MAX ); \ } #define GRAYA_LOOP( TYPE, MAX ) { \ TYPE *q = (TYPE *) q8; \ \ for( x = 0; x < n; x++ ) { \ q[0] = pixels[x].green / SCALE( MAX ); \ q[1] = MAX - pixels[x].opacity / SCALE( MAX ); \ \ q += 2; \ } \ } #define RGB_LOOP( TYPE, MAX ) { \ TYPE *q = (TYPE *) q8; \ \ for( x = 0; x < n; x++ ) { \ q[0] = pixels[x].red / SCALE( MAX ); \ q[1] = pixels[x].green / SCALE( MAX ); \ q[2] = pixels[x].blue / SCALE( MAX ); \ \ q += 3; \ } \ } #define RGBA_LOOP( TYPE, MAX ) { \ TYPE *q = (TYPE *) q8; \ \ for( x = 0; x < n; x++ ) { \ q[0] = pixels[x].red / SCALE( MAX ); \ q[1] = pixels[x].green / SCALE( MAX ); \ q[2] = pixels[x].blue / SCALE( MAX ); \ q[3] = MAX - pixels[x].opacity / SCALE( MAX ); \ \ q += 4; \ } \ } static void unpack_pixels( VipsImage *im, VipsPel *q8, PixelPacket *pixels, int n ) { int x; switch( im->Bands ) { case 1: /* Gray. */ switch( im->BandFmt ) { case VIPS_FORMAT_UCHAR: GRAY_LOOP( unsigned char, 255 ); break; case VIPS_FORMAT_USHORT: GRAY_LOOP( unsigned short, 65535 ); break; case VIPS_FORMAT_UINT: GRAY_LOOP( unsigned int, 4294967295UL ); break; case VIPS_FORMAT_DOUBLE: GRAY_LOOP( double, QuantumRange ); break; default: g_assert( 0 ); } break; case 2: /* Gray plus alpha. */ switch( im->BandFmt ) { case VIPS_FORMAT_UCHAR: GRAYA_LOOP( unsigned char, 255 ); break; case VIPS_FORMAT_USHORT: GRAYA_LOOP( unsigned short, 65535 ); break; case VIPS_FORMAT_UINT: GRAYA_LOOP( unsigned int, 4294967295UL ); break; case VIPS_FORMAT_DOUBLE: GRAYA_LOOP( double, QuantumRange ); break; default: g_assert( 0 ); } break; case 3: /* RGB. */ switch( im->BandFmt ) { case VIPS_FORMAT_UCHAR: RGB_LOOP( unsigned char, 255 ); break; case VIPS_FORMAT_USHORT: RGB_LOOP( unsigned short, 65535 ); break; case VIPS_FORMAT_UINT: RGB_LOOP( unsigned int, 4294967295UL ); break; case VIPS_FORMAT_DOUBLE: RGB_LOOP( double, QuantumRange ); break; default: g_assert( 0 ); } break; case 4: /* RGBA or CMYK. */ switch( im->BandFmt ) { case VIPS_FORMAT_UCHAR: RGBA_LOOP( unsigned char, 255 ); break; case VIPS_FORMAT_USHORT: RGBA_LOOP( unsigned short, 65535 ); break; case VIPS_FORMAT_UINT: RGBA_LOOP( unsigned int, 4294967295UL ); break; case VIPS_FORMAT_DOUBLE: RGBA_LOOP( double, QuantumRange ); break; default: g_assert( 0 ); } break; default: g_assert( 0 ); } } static PixelPacket * get_pixels( Image *image, int left, int top, int width, int height ) { PixelPacket *pixels; #ifdef HAVE_GETVIRTUALPIXELS if( !(pixels = (PixelPacket *) GetVirtualPixels( image, left, top, width, height, &image->exception )) ) #else if( !(pixels = GetImagePixels( image, left, top, width, height )) ) #endif return( NULL ); /* Can't happen if red/green/blue are doubles. */ #ifndef UseHDRI /* Unpack palette. */ if( image->storage_class == PseudoClass ) { #ifdef HAVE_GETVIRTUALPIXELS IndexPacket *indexes = (IndexPacket *) GetVirtualIndexQueue( image ); #else IndexPacket *indexes = GetIndexes( image ); #endif int i; for( i = 0; i < width * height; i++ ) { IndexPacket x = indexes[i]; if( x < image->colors ) { pixels[i].red = image->colormap[x].red; pixels[i].green = image->colormap[x].green; pixels[i].blue = image->colormap[x].blue; } } } #endif /*UseHDRI*/ return( pixels ); } static int magick_fill_region( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) { Read *read = (Read *) a; VipsRect *r = &out->valid; int y; for( y = 0; y < r->height; y++ ) { int top = r->top + y; int frame = top / read->frame_height; int line = top % read->frame_height; PixelPacket *pixels; g_mutex_lock( read->lock ); pixels = get_pixels( read->frames[frame], r->left, line, r->width, 1 ); g_mutex_unlock( read->lock ); if( !pixels ) { vips_error( "magick2vips", "%s", _( "unable to read pixels" ) ); return( -1 ); } unpack_pixels( read->im, VIPS_REGION_ADDR( out, r->left, top ), pixels, r->width ); } return( 0 ); } int vips__magick_read( const char *filename, VipsImage *out, gboolean all_frames ) { Read *read; #ifdef DEBUG printf( "magick2vips: vips__magick_read: %s\n", filename ); #endif /*DEBUG*/ if( !(read = read_new( filename, out, all_frames )) ) return( -1 ); #ifdef HAVE_SETIMAGEOPTION /* When reading DICOM images, we want to ignore any * window_center/_width setting, since it may put pixels outside the * 0-65535 range and lose data. * * These window settings are attached as vips metadata, so our caller * can interpret them if it wants. */ SetImageOption( read->image_info, "dcm:display-range", "reset" ); #endif /*HAVE_SETIMAGEOPTION*/ #ifdef DEBUG printf( "magick2vips: calling ReadImage() ...\n" ); #endif /*DEBUG*/ read->image = ReadImage( read->image_info, &read->exception ); if( !read->image ) { vips_error( "magick2vips", _( "unable to read file \"%s\"\n" "libMagick error: %s %s" ), filename, read->exception.reason, read->exception.description ); return( -1 ); } if( parse_header( read ) ) return( -1 ); if( vips_image_generate( out, NULL, magick_fill_region, NULL, read, NULL ) ) return( -1 ); return( 0 ); } /* This has severe issues. See: * * http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=20017 */ int vips__magick_read_header( const char *filename, VipsImage *im, gboolean all_frames ) { Read *read; #ifdef DEBUG printf( "vips__magick_read_header: %s\n", filename ); #endif /*DEBUG*/ if( !(read = read_new( filename, im, all_frames )) ) return( -1 ); #ifdef DEBUG printf( "vips__magick_read_header: pinging image ...\n" ); #endif /*DEBUG*/ read->image = PingImage( read->image_info, &read->exception ); if( !read->image ) { vips_error( "magick2vips", _( "unable to ping file " "\"%s\"\nlibMagick error: %s %s" ), filename, read->exception.reason, read->exception.description ); return( -1 ); } if( parse_header( read ) ) return( -1 ); if( im->Xsize <= 0 || im->Ysize <= 0 ) { vips_error( "magick2vips", "%s", _( "bad image size" ) ); return( -1 ); } return( 0 ); } #endif /*HAVE_MAGICK*/ vips-7.38.5/libvips/foreign/analyzeload.c0000644000175000017500000001022712303140253015263 00000000000000/* load analyze from a file * * 5/12/11 * - from openslideload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "analyze2vips.h" typedef struct _VipsForeignLoadAnalyze { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadAnalyze; typedef VipsForeignLoadClass VipsForeignLoadAnalyzeClass; G_DEFINE_TYPE( VipsForeignLoadAnalyze, vips_foreign_load_analyze, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_analyze_get_flags_filename( const char *filename ) { return( VIPS_FOREIGN_PARTIAL ); } static VipsForeignFlags vips_foreign_load_analyze_get_flags( VipsForeignLoad *load ) { return( VIPS_FOREIGN_PARTIAL ); } static int vips_foreign_load_analyze_header( VipsForeignLoad *load ) { VipsForeignLoadAnalyze *analyze = (VipsForeignLoadAnalyze *) load; if( vips__analyze_read_header( analyze->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_analyze_load( VipsForeignLoad *load ) { VipsForeignLoadAnalyze *analyze = (VipsForeignLoadAnalyze *) load; if( vips__analyze_read( analyze->filename, load->real ) ) return( -1 ); return( 0 ); } static const char *vips_foreign_analyze_suffs[] = { ".img", ".hdr", NULL }; static void vips_foreign_load_analyze_class_init( VipsForeignLoadAnalyzeClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "analyzeload"; object_class->description = _( "load an Analyze6 image" ); foreign_class->suffs = vips_foreign_analyze_suffs; load_class->is_a = vips__isanalyze; load_class->get_flags_filename = vips_foreign_load_analyze_get_flags_filename; load_class->get_flags = vips_foreign_load_analyze_get_flags; load_class->header = vips_foreign_load_analyze_header; load_class->load = vips_foreign_load_analyze_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadAnalyze, filename ), NULL ); } static void vips_foreign_load_analyze_init( VipsForeignLoadAnalyze *analyze ) { } /** * vips_analyzeload: * @filename: file to load * @out: decompressed image * @...: %NULL-terminated list of optional named arguments * * Load an Analyze 6.0 file. If @filename is "fred.img", this will look for * an image header called "fred.hdr" and pixel data in "fred.img". You can * also load "fred" or "fred.hdr". * * Images are * loaded lazilly and byte-swapped, if necessary. The Analyze metadata is read * and attached. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_analyzeload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "analyzeload", ap, filename, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/ppm.c0000644000175000017500000003421712303140253013561 00000000000000/* Read a ppm file. * * Stephen Chan ... original code * * 21/11/00 JC * - hacked for VIPS * - reads ppm/pgm/pbm * - mmaps binary pgm/ppm * - reads all ascii formats (slowly!) * 22/11/00 JC * - oops, ascii read was broken * - does 16/32 bit ascii now as well * 24/5/01 * - im_ppm2vips_header() added * 28/11/03 JC * - better no-overshoot on tile loop * 22/5/04 * - does 16/32 bit binary too * - tiny fix for missing file close on read error * 19/8/05 * - use im_raw2vips() for binary read * 9/9/05 * - tiny cleanups * 3/11/07 * - use im_wbuffer() for bg writes * 4/2/10 * - gtkdoc * 1/5/10 * - add PFM (portable float map) support * 19/12/11 * - rework as a set of fns ready to be called from a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "ppm.h" /* The largest number/field/whatever we can read. */ #define MAX_THING (80) static void skip_line( FILE *fp ) { while( fgetc( fp ) != '\n' ) ; } static void skip_white_space( FILE *fp ) { int ch; while( isspace( ch = fgetc( fp ) ) ) ; ungetc( ch, fp ); if( ch == '#' ) { skip_line( fp ); skip_white_space( fp ); } } static int read_int( FILE *fp, int *i ) { skip_white_space( fp ); if( fscanf( fp, "%d", i ) != 1 ) { vips_error( "ppm2vips", "%s", _( "bad int" ) ); return( -1 ); } return( 0 ); } static int read_float( FILE *fp, float *f ) { skip_white_space( fp ); if( fscanf( fp, "%f", f ) != 1 ) { vips_error( "ppm2vips", "%s", _( "bad float" ) ); return( -1 ); } return( 0 ); } /* ppm types. */ static char *magic_names[] = { "P1", /* pbm ... 1 band 1 bit, ascii */ "P2", /* pgm ... 1 band many bit, ascii */ "P3", /* ppm ... 3 band many bit, ascii */ "P4", /* pbm ... 1 band 1 bit, binary */ "P5", /* pgm ... 1 band 8 bit, binary */ "P6", /* ppm ... 3 band 8 bit, binary */ "PF", /* pfm ... 3 band 32 bit, binary */ "Pf" /* pfm ... 1 band 32 bit, binary */ }; static int read_header( FILE *fp, VipsImage *out, int *bits, int *ascii, int *msb_first ) { int width, height, bands; VipsBandFormat format; VipsInterpretation interpretation; int index; char buf[MAX_THING]; /* Characteristics, indexed by ppm type. */ static int lookup_bits[] = { 1, 8, 8, 1, 8, 8, 32, 32 }; static int lookup_bands[] = { 1, 1, 3, 1, 1, 3, 3, 1 }; static int lookup_ascii[] = { 1, 1, 1, 0, 0, 0, 0, 0 }; /* Read in the magic number. */ buf[0] = fgetc( fp ); buf[1] = fgetc( fp ); buf[2] = '\0'; for( index = 0; index < VIPS_NUMBER( magic_names ); index++ ) if( strcmp( magic_names[index], buf ) == 0 ) break; if( index == VIPS_NUMBER( magic_names ) ) { vips_error( "ppm2vips", "%s", _( "bad magic number" ) ); return( -1 ); } *bits = lookup_bits[index]; bands = lookup_bands[index]; *ascii = lookup_ascii[index]; /* Default ... can be changed below for PFM images. */ *msb_first = 0; /* Read in size. */ if( read_int( fp, &width ) || read_int( fp, &height ) ) return( -1 ); /* Read in max value / scale for >1 bit images. */ if( *bits > 1 ) { if( index == 6 || index == 7 ) { float scale; if( read_float( fp, &scale ) ) return( -1 ); /* Scale > 0 means big-endian. */ *msb_first = scale > 0; vips_image_set_double( out, "pfm-scale", fabs( scale ) ); } else { int max_value; if( read_int( fp, &max_value ) ) return( -1 ); if( max_value > 255 ) *bits = 16; if( max_value > 65535 ) *bits = 32; } } /* For binary images, there is always exactly 1 more whitespace * character before the data starts. */ if( !*ascii && !isspace( fgetc( fp ) ) ) { vips_error( "ppm2vips", "%s", _( "not whitespace before start of binary data" ) ); return( -1 ); } /* Choose a VIPS bandfmt. */ switch( *bits ) { case 1: case 8: format = VIPS_FORMAT_UCHAR; break; case 16: format = VIPS_FORMAT_USHORT; break; case 32: if( index == 6 || index == 7 ) format = VIPS_FORMAT_FLOAT; else format = VIPS_FORMAT_UINT; break; default: g_assert( 0 ); /* Keep -Wall happy. */ return( 0 ); } if( bands == 1 ) { if( format == VIPS_FORMAT_USHORT ) interpretation = VIPS_INTERPRETATION_GREY16; else interpretation = VIPS_INTERPRETATION_B_W; } else { if( format == VIPS_FORMAT_USHORT ) interpretation = VIPS_INTERPRETATION_RGB16; else if( format == VIPS_FORMAT_UINT ) interpretation = VIPS_INTERPRETATION_RGB; else interpretation = VIPS_INTERPRETATION_sRGB; } vips_image_init_fields( out, width, height, bands, format, VIPS_CODING_NONE, interpretation, 1.0, 1.0 ); return( 0 ); } /* Read a ppm/pgm file using mmap(). */ static int read_mmap( FILE *fp, const char *filename, int msb_first, VipsImage *out ) { const guint64 header_offset = ftell( fp ); VipsImage *x = vips_image_new(); VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( x ), 3 ); if( vips_rawload( filename, &t[0], out->Xsize, out->Ysize, VIPS_IMAGE_SIZEOF_PEL( out ), "offset", header_offset, NULL ) || vips_copy( t[0], &t[1], "bands", out->Bands, "format", out->BandFmt, "coding", out->Coding, NULL ) || vips_copy( t[1], &t[2], "swap", !vips_amiMSBfirst(), NULL ) || vips_image_write( t[2], out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } /* Read an ascii ppm/pgm file. */ static int read_ascii( FILE *fp, VipsImage *out ) { int x, y; VipsPel *buf; if( !(buf = VIPS_ARRAY( out, VIPS_IMAGE_SIZEOF_LINE( out ), VipsPel )) ) return( -1 ); for( y = 0; y < out->Ysize; y++ ) { for( x = 0; x < out->Xsize * out->Bands; x++ ) { int val; if( read_int( fp, &val ) ) return( -1 ); switch( out->BandFmt ) { case VIPS_FORMAT_UCHAR: buf[x] = VIPS_CLIP( 0, val, 255 ); break; case VIPS_FORMAT_USHORT: ((unsigned short *) buf)[x] = VIPS_CLIP( 0, val, 65535 ); break; case VIPS_FORMAT_UINT: ((unsigned int *) buf)[x] = val; break; default: g_assert( 0 ); } } if( vips_image_write_line( out, y, buf ) ) return( -1 ); } return( 0 ); } /* Read an ascii 1 bit file. */ static int read_1bit_ascii( FILE *fp, VipsImage *out ) { int x, y; VipsPel *buf; if( !(buf = VIPS_ARRAY( out, VIPS_IMAGE_SIZEOF_LINE( out ), VipsPel )) ) return( -1 ); for( y = 0; y < out->Ysize; y++ ) { for( x = 0; x < out->Xsize * out->Bands; x++ ) { int val; if( read_int( fp, &val ) ) return( -1 ); if( val == 1 ) buf[x] = 0; else buf[x] = 255; } if( vips_image_write_line( out, y, buf ) ) return( -1 ); } return( 0 ); } /* Read a 1 bit binary file. */ static int read_1bit_binary( FILE *fp, VipsImage *out ) { int x, y, i; int bits; VipsPel *buf; if( !(buf = VIPS_ARRAY( out, VIPS_IMAGE_SIZEOF_LINE( out ), VipsPel )) ) return( -1 ); bits = fgetc( fp ); for( i = 0, y = 0; y < out->Ysize; y++ ) { for( x = 0; x < out->Xsize * out->Bands; x++, i++ ) { buf[x] = (bits & 128) ? 255 : 0; bits <<= 1; if( (i & 7) == 7 ) bits = fgetc( fp ); } if( vips_image_write_line( out, y, buf ) ) return( -1 ); } return( 0 ); } static int parse_ppm( FILE *fp, const char *filename, VipsImage *out ) { int bits; int ascii; int msb_first; if( read_header( fp, out, &bits, &ascii, &msb_first ) ) return( -1 ); /* What sort of read are we doing? */ if( !ascii && bits >= 8 ) return( read_mmap( fp, filename, msb_first, out ) ); else if( !ascii && bits == 1 ) return( read_1bit_binary( fp, out ) ); else if( ascii && bits == 1 ) return( read_1bit_ascii( fp, out ) ); else return( read_ascii( fp, out ) ); } int vips__ppm_header( const char *filename, VipsImage *out ) { FILE *fp; int bits; int ascii; int msb_first; if( !(fp = vips__file_open_read( filename, NULL, FALSE )) ) return( -1 ); if( read_header( fp, out, &bits, &ascii, &msb_first ) ) { fclose( fp ); return( -1 ); } fclose( fp ); return( 0 ); } /* Can this PPM file be read with a mmap? */ static int isppmmmap( const char *filename ) { VipsImage *im; FILE *fp; int bits; int ascii; int msb_first; if( !(fp = vips__file_open_read( filename, NULL, FALSE )) ) return( -1 ); im = vips_image_new(); if( read_header( fp, im, &bits, &ascii, &msb_first ) ) { g_object_unref( im ); fclose( fp ); return( 0 ); } g_object_unref( im ); fclose( fp ); return( !ascii && bits >= 8 ); } int vips__ppm_load( const char *filename, VipsImage *out ) { FILE *fp; /* Note that we open in binary mode. If this is a binary PPM, we need * to be able to mmap it. */ if( !(fp = vips__file_open_read( filename, NULL, FALSE )) ) return( -1 ); if( parse_ppm( fp, filename, out ) ) { fclose( fp ); return( -1 ); } fclose( fp ); return( 0 ); } int vips__ppm_isppm( const char *filename ) { VipsPel buf[3]; if( vips__get_bytes( filename, buf, 2 ) ) { int i; buf[2] = '\0'; for( i = 0; i < VIPS_NUMBER( magic_names ); i++ ) if( strcmp( (char *) buf, magic_names[i] ) == 0 ) return( TRUE ); } return( 0 ); } /* ppm flags function. */ VipsForeignFlags vips__ppm_flags( const char *filename ) { VipsForeignFlags flags; flags = 0; if( isppmmmap( filename ) ) flags |= VIPS_FOREIGN_PARTIAL; return( flags ); } const char *vips__ppm_suffs[] = { ".ppm", ".pgm", ".pbm", ".pfm", NULL }; typedef int (*write_fn)( VipsImage *in, FILE *fp, VipsPel *p ); /* What we track during a PPM write. */ typedef struct { VipsImage *in; FILE *fp; char *name; write_fn fn; } Write; static void write_destroy( Write *write ) { VIPS_FREEF( fclose, write->fp ); VIPS_FREE( write->name ); vips_free( write ); } static Write * write_new( VipsImage *in, const char *name ) { Write *write; if( !(write = VIPS_NEW( NULL, Write )) ) return( NULL ); write->in = in; write->name = vips_strdup( NULL, name ); write->fp = vips__file_open_write( name, FALSE ); if( !write->name || !write->fp ) { write_destroy( write ); return( NULL ); } return( write ); } static int write_ppm_line_ascii( VipsImage *in, FILE *fp, VipsPel *p ) { const int sk = VIPS_IMAGE_SIZEOF_PEL( in ); int x, k; for( x = 0; x < in->Xsize; x++ ) { for( k = 0; k < in->Bands; k++ ) { switch( in->BandFmt ) { case VIPS_FORMAT_UCHAR: fprintf( fp, "%d ", p[k] ); break; case VIPS_FORMAT_USHORT: fprintf( fp, "%d ", ((unsigned short *) p)[k] ); break; case VIPS_FORMAT_UINT: fprintf( fp, "%d ", ((unsigned int *) p)[k] ); break; default: g_assert( 0 ); } } fprintf( fp, " " ); p += sk; } if( !fprintf( fp, "\n" ) ) { vips_error( "vips2ppm", "%s", _( "write error ... disc full?" ) ); return( -1 ); } return( 0 ); } static int write_ppm_line_binary( VipsImage *in, FILE *fp, VipsPel *p ) { if( !fwrite( p, VIPS_IMAGE_SIZEOF_LINE( in ), 1, fp ) ) { vips_error( "vips2ppm", "%s", _( "write error ... disc full?" ) ); return( -1 ); } return( 0 ); } static int write_ppm_block( REGION *region, Rect *area, void *a ) { Write *write = (Write *) a; int i; for( i = 0; i < area->height; i++ ) { VipsPel *p = VIPS_REGION_ADDR( region, 0, area->top + i ); if( write->fn( write->in, write->fp, p ) ) return( -1 ); } return( 0 ); } static int write_ppm( Write *write, int ascii ) { VipsImage *in = write->in; char *magic; time_t timebuf; if( in->BandFmt == VIPS_FORMAT_FLOAT && in->Bands == 3 ) magic = "PF"; else if( in->BandFmt == VIPS_FORMAT_FLOAT && in->Bands == 1 ) magic = "Pf"; else if( in->Bands == 1 && ascii ) magic = "P2"; else if( in->Bands == 1 && !ascii ) magic = "P5"; else if( in->Bands == 3 && ascii ) magic = "P3"; else if( in->Bands == 3 && !ascii ) magic = "P6"; else g_assert( 0 ); fprintf( write->fp, "%s\n", magic ); time( &timebuf ); fprintf( write->fp, "#vips2ppm - %s\n", ctime( &timebuf ) ); fprintf( write->fp, "%d %d\n", in->Xsize, in->Ysize ); switch( in->BandFmt ) { case VIPS_FORMAT_UCHAR: fprintf( write->fp, "%d\n", UCHAR_MAX ); break; case VIPS_FORMAT_USHORT: fprintf( write->fp, "%d\n", USHRT_MAX ); break; case VIPS_FORMAT_UINT: fprintf( write->fp, "%d\n", UINT_MAX ); break; case VIPS_FORMAT_FLOAT: { double scale; if( vips_image_get_double( in, "pfm-scale", &scale ) ) scale = 1; if( !vips_amiMSBfirst() ) scale *= -1; fprintf( write->fp, "%g\n", scale ); } break; default: g_assert( 0 ); } write->fn = ascii ? write_ppm_line_ascii : write_ppm_line_binary; if( vips_sink_disc( write->in, write_ppm_block, write ) ) return( -1 ); return( 0 ); } int vips__ppm_save( VipsImage *in, const char *filename, gboolean ascii ) { Write *write; if( vips_check_uintorf( "vips2ppm", in ) || vips_check_bands_1or3( "vips2ppm", in ) || vips_check_uncoded( "vips2ppm", in ) || vips_image_pio_input( in ) ) return( -1 ); /* We can only write >8 bit binary images in float. */ if( vips_format_sizeof( in->BandFmt ) > 1 && !ascii && in->BandFmt != VIPS_FORMAT_FLOAT ) { vips_error( "vips2ppm", "%s", _( "binary >8 bit images must be float" ) ); return( -1 ); } if( !(write = write_new( in, filename )) ) return( -1 ); if( write_ppm( write, ascii ) ) { write_destroy( write ); return( -1 ); } write_destroy( write ); return( 0 ); } vips-7.38.5/libvips/foreign/openslideload.c0000644000175000017500000001216512303141142015603 00000000000000/* load openslide from a file * * 5/12/11 * - from openslideload.c * 28/2/12 * - convert "layer" to "level" where externally visible * 11/4/12 * - convert remaining uses of "layer" to "level" * 20/9/12 * - add Leica filename suffix * - drop glib log handler (unneeded with >= 3.3.0) */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_OPENSLIDE #include #include #include #include #include #include #include "openslide2vips.h" typedef struct _VipsForeignLoadOpenslide { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; /* Load this level. */ int level; /* Load this associated image. */ char *associated; } VipsForeignLoadOpenslide; typedef VipsForeignLoadClass VipsForeignLoadOpenslideClass; G_DEFINE_TYPE( VipsForeignLoadOpenslide, vips_foreign_load_openslide, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_openslide_get_flags_filename( const char *filename ) { /* We can't tell from just the filename, we need to know what part of * the file the user wants. But it'll usually be partial. */ return( VIPS_FOREIGN_PARTIAL ); } static VipsForeignFlags vips_foreign_load_openslide_get_flags( VipsForeignLoad *load ) { VipsForeignLoadOpenslide *openslide = (VipsForeignLoadOpenslide *) load; VipsForeignFlags flags; flags = 0; if( !openslide->associated ) flags |= VIPS_FOREIGN_PARTIAL; return( flags ); } static int vips_foreign_load_openslide_header( VipsForeignLoad *load ) { VipsForeignLoadOpenslide *openslide = (VipsForeignLoadOpenslide *) load; if( vips__openslide_read_header( openslide->filename, load->out, openslide->level, openslide->associated ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_openslide_load( VipsForeignLoad *load ) { VipsForeignLoadOpenslide *openslide = (VipsForeignLoadOpenslide *) load; if( !openslide->associated ) { if( vips__openslide_read( openslide->filename, load->real, openslide->level ) ) return( -1 ); } else { if( vips__openslide_read_associated( openslide->filename, load->real, openslide->associated ) ) return( -1 ); } return( 0 ); } static const char *vips_foreign_openslide_suffs[] = { ".svs", /* Aperio */ ".vms", ".vmu", ".ndpi", /* Hamamatsu */ ".scn", /* Leica */ ".mrxs", /* MIRAX */ ".tif", /* Trestle */ NULL }; static void vips_foreign_load_openslide_class_init( VipsForeignLoadOpenslideClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "openslideload"; object_class->description = _( "load file with OpenSlide" ); /* We need to be ahead of the tiff sniffer since many OpenSlide * formats are tiff derivatives. If we see a tiff which would be * better handled by the vips tiff loader we are careful to say no. */ foreign_class->priority = 100; foreign_class->suffs = vips_foreign_openslide_suffs; load_class->is_a = vips__openslide_isslide; load_class->get_flags_filename = vips_foreign_load_openslide_get_flags_filename; load_class->get_flags = vips_foreign_load_openslide_get_flags; load_class->header = vips_foreign_load_openslide_header; load_class->load = vips_foreign_load_openslide_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadOpenslide, filename ), NULL ); VIPS_ARG_INT( class, "level", 10, _( "Level" ), _( "Load this level from the file" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadOpenslide, level ), 0, 100000, 0 ); VIPS_ARG_STRING( class, "associated", 11, _( "Associated" ), _( "Load this associated image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignLoadOpenslide, associated ), NULL ); } static void vips_foreign_load_openslide_init( VipsForeignLoadOpenslide *openslide ) { } #endif /*HAVE_OPENSLIDE*/ vips-7.38.5/libvips/foreign/pngsave.c0000644000175000017500000001424212303140253014424 00000000000000/* save to png * * 2/12/11 * - wrap a class around the png writer * 16/7/12 * - compression should be 0-9, not 1-10 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #ifdef HAVE_PNG #include #include #include #include #include "vipspng.h" typedef struct _VipsForeignSavePng { VipsForeignSave parent_object; int compression; gboolean interlace; } VipsForeignSavePng; typedef VipsForeignSaveClass VipsForeignSavePngClass; G_DEFINE_ABSTRACT_TYPE( VipsForeignSavePng, vips_foreign_save_png, VIPS_TYPE_FOREIGN_SAVE ); /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static int bandfmt_png[10] = { /* UC C US S UI I F X D DX */ UC, UC, US, US, US, US, UC, UC, UC, UC }; static void vips_foreign_save_png_class_init( VipsForeignSavePngClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "pngsave_base"; object_class->description = _( "save png" ); foreign_class->suffs = vips__png_suffs; save_class->saveable = VIPS_SAVEABLE_RGBA; save_class->format_table = bandfmt_png; VIPS_ARG_INT( class, "compression", 6, _( "Compression" ), _( "Compression factor" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSavePng, compression ), 0, 9, 6 ); VIPS_ARG_BOOL( class, "interlace", 7, _( "Interlace" ), _( "Interlace image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsForeignSavePng, interlace ), FALSE ); } static void vips_foreign_save_png_init( VipsForeignSavePng *png ) { png->compression = 6; } typedef struct _VipsForeignSavePngFile { VipsForeignSavePng parent_object; char *filename; } VipsForeignSavePngFile; typedef VipsForeignSavePngClass VipsForeignSavePngFileClass; G_DEFINE_TYPE( VipsForeignSavePngFile, vips_foreign_save_png_file, vips_foreign_save_png_get_type() ); static int vips_foreign_save_png_file_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSavePng *png = (VipsForeignSavePng *) object; VipsForeignSavePngFile *png_file = (VipsForeignSavePngFile *) object; if( VIPS_OBJECT_CLASS( vips_foreign_save_png_file_parent_class )-> build( object ) ) return( -1 ); if( vips__png_write( save->ready, png_file->filename, png->compression, png->interlace ) ) return( -1 ); return( 0 ); } static void vips_foreign_save_png_file_class_init( VipsForeignSavePngFileClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "pngsave"; object_class->description = _( "save image to png file" ); object_class->build = vips_foreign_save_png_file_build; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to save to" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignSavePngFile, filename ), NULL ); } static void vips_foreign_save_png_file_init( VipsForeignSavePngFile *file ) { } typedef struct _VipsForeignSavePngBuffer { VipsForeignSavePng parent_object; VipsArea *buf; } VipsForeignSavePngBuffer; typedef VipsForeignSavePngClass VipsForeignSavePngBufferClass; G_DEFINE_TYPE( VipsForeignSavePngBuffer, vips_foreign_save_png_buffer, vips_foreign_save_png_get_type() ); static int vips_foreign_save_png_buffer_build( VipsObject *object ) { VipsForeignSave *save = (VipsForeignSave *) object; VipsForeignSavePng *png = (VipsForeignSavePng *) object; void *obuf; size_t olen; VipsArea *area; if( VIPS_OBJECT_CLASS( vips_foreign_save_png_buffer_parent_class )-> build( object ) ) return( -1 ); if( vips__png_write_buf( save->ready, &obuf, &olen, png->compression, png->interlace ) ) return( -1 ); area = vips_area_new_blob( (VipsCallbackFn) vips_free, obuf, olen ); g_object_set( object, "buffer", area, NULL ); return( 0 ); } static void vips_foreign_save_png_buffer_class_init( VipsForeignSavePngBufferClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "pngsave_buffer"; object_class->description = _( "save image to png buffer" ); object_class->build = vips_foreign_save_png_buffer_build; VIPS_ARG_BOXED( class, "buffer", 1, _( "Buffer" ), _( "Buffer to save to" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsForeignSavePngBuffer, buf ), VIPS_TYPE_BLOB ); } static void vips_foreign_save_png_buffer_init( VipsForeignSavePngBuffer *buffer ) { } #endif /*HAVE_PNG*/ vips-7.38.5/libvips/foreign/radload.c0000644000175000017500000001073612303140253014373 00000000000000/* load radlab from a file * * 5/12/11 * - from tiffload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "radiance.h" typedef struct _VipsForeignLoadRad { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadRad; typedef VipsForeignLoadClass VipsForeignLoadRadClass; G_DEFINE_TYPE( VipsForeignLoadRad, vips_foreign_load_rad, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_rad_get_flags_filename( const char *filename ) { /* The rad reader supports sequential read. */ return( VIPS_FOREIGN_SEQUENTIAL ); } static VipsForeignFlags vips_foreign_load_rad_get_flags( VipsForeignLoad *load ) { VipsForeignLoadRad *rad = (VipsForeignLoadRad *) load; return( vips_foreign_load_rad_get_flags_filename( rad->filename ) ); } static int vips_foreign_load_rad_header( VipsForeignLoad *load ) { VipsForeignLoadRad *rad = (VipsForeignLoadRad *) load; if( vips__rad_header( rad->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_rad_load( VipsForeignLoad *load ) { VipsForeignLoadRad *rad = (VipsForeignLoadRad *) load; if( vips__rad_load( rad->filename, load->real, load->access == VIPS_ACCESS_SEQUENTIAL ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_rad_class_init( VipsForeignLoadRadClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "radload"; object_class->description = _( "load a Radiance image from a file" ); foreign_class->suffs = vips__rad_suffs; load_class->is_a = vips__rad_israd; load_class->get_flags_filename = vips_foreign_load_rad_get_flags_filename; load_class->get_flags = vips_foreign_load_rad_get_flags; load_class->header = vips_foreign_load_rad_header; load_class->load = vips_foreign_load_rad_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadRad, filename ), NULL ); } static void vips_foreign_load_rad_init( VipsForeignLoadRad *rad ) { } /** * vips_radload: * @filename: file to load * @out: output image * @...: %NULL-terminated list of optional named arguments * * Read a Radiance (HDR) file into a VIPS image. * * Radiance files are read as #VIPS_CODING_RAD. They have one byte for each of * red, green and blue, and one byte of shared exponent. Some operations (like * vips_extract_area()) can work directly with images in this format, but * mmany (all the arithmetic operations, for example) will not. Unpack * #VIPS_CODING_RAD images to 3 band float with im_rad2float() if you want to do * arithmetic on them. * * This operation ignores some header fields, like VIEW and DATE. It will not * rotate/flip as the FORMAT string asks. * * Sections of this reader from Greg Ward and Radiance with kind permission. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_radload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "radload", ap, filename, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/foreign/ppmload.c0000644000175000017500000000771012303140253014417 00000000000000/* load ppm from a file * * 5/12/11 * - from tiffload.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "ppm.h" typedef struct _VipsForeignLoadPpm { VipsForeignLoad parent_object; /* Filename for load. */ char *filename; } VipsForeignLoadPpm; typedef VipsForeignLoadClass VipsForeignLoadPpmClass; G_DEFINE_TYPE( VipsForeignLoadPpm, vips_foreign_load_ppm, VIPS_TYPE_FOREIGN_LOAD ); static VipsForeignFlags vips_foreign_load_ppm_get_flags_filename( const char *filename ) { return( (VipsForeignFlags) vips__ppm_flags( filename ) ); } static VipsForeignFlags vips_foreign_load_ppm_get_flags( VipsForeignLoad *load ) { VipsForeignLoadPpm *ppm = (VipsForeignLoadPpm *) load; return( vips_foreign_load_ppm_get_flags_filename( ppm->filename ) ); } static int vips_foreign_load_ppm_header( VipsForeignLoad *load ) { VipsForeignLoadPpm *ppm = (VipsForeignLoadPpm *) load; if( vips__ppm_header( ppm->filename, load->out ) ) return( -1 ); return( 0 ); } static int vips_foreign_load_ppm_load( VipsForeignLoad *load ) { VipsForeignLoadPpm *ppm = (VipsForeignLoadPpm *) load; if( vips__ppm_load( ppm->filename, load->real ) ) return( -1 ); return( 0 ); } static void vips_foreign_load_ppm_class_init( VipsForeignLoadPpmClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsForeignClass *foreign_class = (VipsForeignClass *) class; VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "ppmload"; object_class->description = _( "load ppm from file" ); foreign_class->suffs = vips__ppm_suffs; load_class->is_a = vips__ppm_isppm; load_class->get_flags_filename = vips_foreign_load_ppm_get_flags_filename; load_class->get_flags = vips_foreign_load_ppm_get_flags; load_class->header = vips_foreign_load_ppm_header; load_class->load = vips_foreign_load_ppm_load; VIPS_ARG_STRING( class, "filename", 1, _( "Filename" ), _( "Filename to load from" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsForeignLoadPpm, filename ), NULL ); } static void vips_foreign_load_ppm_init( VipsForeignLoadPpm *ppm ) { } /** * vips_ppmload: * @filename: file to load * @out: output image * @...: %NULL-terminated list of optional named arguments * * Read a PPM/PBM/PGM/PFM file into a VIPS image. * * It can read 1, 8, 16 and 32 bit images, colour or monochrome, * stored in binary or in ASCII. One bit images become 8 bit VIPS images, * with 0 and 255 for 0 and 1. * * See also: vips_image_new_from_file(). * * Returns: 0 on success, -1 on error. */ int vips_ppmload( const char *filename, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "ppmload", ap, filename, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/convolution/0000755000175000017500000000000012303146330013622 500000000000000vips-7.38.5/libvips/convolution/im_aconv.c0000644000175000017500000007003412303140253015503 00000000000000/* im_aconv ... approximate convolution * * This operation does an approximate convolution. * * Author: John Cupitt & Nicolas Robidoux * Written on: 31/5/11 * Modified on: * 31/5/11 * - from im_aconvsep() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* See: http://incubator.quasimondo.com/processing/stackblur.pde This thing is a little like stackblur, but generalised to any 2D convolution. */ /* TODO timing: $ time vips im_conv_f img_0075.jpg x2.v g2d201.con real 5m3.359s user 9m34.700s sys 0m1.500s $ time vips im_aconv img_0075.jpg x.v g2d201.con 10 10 real 0m3.151s user 0m5.640s sys 0m0.100s $ vips im_subtract x.v x2.v diff.v $ vips im_abs diff.v abs.v $ vips im_max abs.v 2.70833 - are we handling mask offset correctly? */ /* #define DEBUG #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include /* Maximum number of boxes we can break the mask into. */ #define MAX_LINES (10000) /* The number of edges we consider at once in clustering. Higher values are * faster, but risk pushing up average error in the result. */ #define MAX_EDGES (1000) /* Get an (x,y) value from a mask. */ #define MASK( M, X, Y ) ((M)->coeff[(X) + (Y) * (M)->xsize]) /* A horizontal line in the mask. */ typedef struct _HLine { /* Start is the left-most pixel in the line, end is one beyond the * right-most pixel. */ int start; int end; /* The hlines have weights. weight 0 means this line is unused. */ int weight; } HLine; /* For clustering. A pair of hlines and their distance. An edge in a graph. */ typedef struct _Edge { /* The index into boxes->hline[]. */ int a; int b; /* The distance between them, see boxes_distance(). */ int d; } Edge; /* An element of a vline. */ typedef struct _VElement { /* band is the index into hline[] we add, row is the row we take * it from. */ int band; int row; /* Negative lobes are made with factor -1, we also common-up repeated * additions of the same line. */ int factor; } VElement; /* A vline. */ typedef struct _VLine { int band; int factor; int start; int end; } VLine; /* A set of boxes. */ typedef struct _Boxes { /* Copy of our arguments. */ IMAGE *in; IMAGE *out; DOUBLEMASK *mask; int n_layers; int cluster; int area; int rounding; /* The horizontal lines we gather. hline[3] writes to band 3 in the * intermediate image. max_line is the length of the longest hline: * over 256 and we need to use an int intermediate for 8-bit images. */ int n_hline; HLine hline[MAX_LINES]; int max_line; /* During clustering, the top few edges we are considering. */ Edge edge[MAX_EDGES]; /* Scale and sum a set of hlines to make the final value. */ int n_velement; VElement velement[MAX_LINES]; /* And group those velements as vlines. */ int n_vline; VLine vline[MAX_LINES]; } Boxes; /* Euclid's algorithm. Use this to common up mults. */ static int gcd( int a, int b ) { if( b == 0 ) return( abs( a ) ); else return( gcd( b, a % b ) ); } static void boxes_start( Boxes *boxes, int x ) { boxes->hline[boxes->n_hline].start = x; boxes->hline[boxes->n_hline].weight = 1; } static int boxes_end( Boxes *boxes, int x, int y, int factor ) { boxes->hline[boxes->n_hline].end = x; boxes->velement[boxes->n_velement].row = y; boxes->velement[boxes->n_velement].band = boxes->n_hline; boxes->velement[boxes->n_velement].factor = factor; if( boxes->n_hline >= MAX_LINES - 1 ) { vips_error( "im_aconv", "%s", _( "mask too complex" ) ); return( -1 ); } boxes->n_hline += 1; if( boxes->n_velement >= MAX_LINES - 1 ) { vips_error( "im_aconv", "%s", _( "mask too complex" ) ); return( -1 ); } boxes->n_velement += 1; return( 0 ); } #ifdef DEBUG static void boxes_hprint( Boxes *boxes ) { int x, y; printf( "hlines:\n" ); printf( " n b r f w\n" ); for( y = 0; y < boxes->n_velement; y++ ) { int b = boxes->velement[y].band; printf( "%4d %3d %3d %2d %3d ", y, b, boxes->velement[y].row, boxes->velement[y].factor, boxes->hline[b].weight ); for( x = 0; x < 45; x++ ) { int rx = x * (boxes->mask->xsize + 1) / 45; if( rx >= boxes->hline[b].start && rx < boxes->hline[b].end ) printf( "#" ); else printf( " " ); } printf( " %3d .. %3d\n", boxes->hline[b].start, boxes->hline[b].end ); } } static void boxes_vprint( Boxes *boxes ) { int y; printf( "%d vlines:\n", boxes->n_vline ); printf( " n b f s e\n" ); for( y = 0; y < boxes->n_vline; y++ ) printf( "%4d %2d %2d == %3d .. %3d\n", y, boxes->vline[y].band, boxes->vline[y].factor, boxes->vline[y].start, boxes->vline[y].end ); printf( "area = %d\n", boxes->area ); printf( "rounding = %d\n", boxes->rounding ); printf( "max_line = %d\n", boxes->max_line ); } #endif /*DEBUG*/ /* Break the mask into a set of lines. */ static int boxes_break( Boxes *boxes ) { DOUBLEMASK *mask = boxes->mask; const int size = mask->xsize * mask->ysize; double max; double min; double depth; int layers_above; int layers_below; int z, n, x, y; /* Find mask range. We must always include the zero axis in the mask. */ max = 0; min = 0; for( n = 0; n < size; n++ ) { max = IM_MAX( max, mask->coeff[n] ); min = IM_MIN( min, mask->coeff[n] ); } VIPS_DEBUG_MSG( "boxes_new: min = %g, max = %g\n", min, max ); /* The zero axis must fall on a layer boundary. Estimate the * depth, find n-lines-above-zero, get exact depth, then calculate a * fixed n-lines which includes any negative parts. */ depth = (max - min) / boxes->n_layers; layers_above = ceil( max / depth ); depth = max / layers_above; layers_below = floor( min / depth ); boxes->n_layers = layers_above - layers_below; VIPS_DEBUG_MSG( "boxes_new: depth = %g, n_layers = %d\n", depth, boxes->n_layers ); /* For each layer, generate a set of lines which are inside the * perimeter. Work down from the top. */ for( z = 0; z < boxes->n_layers; z++ ) { /* How deep we are into the mask, as a double we can test * against. Add half the layer depth so we can easily find >50% * mask elements. */ double z_ph = max - (1 + z) * depth + depth / 2; /* Odd, but we must avoid rounding errors that make us miss 0 * in the line above. */ int z_positive = z < layers_above; for( y = 0; y < mask->ysize; y++ ) { int inside; /* Start outside the perimeter. */ inside = 0; for( x = 0; x < mask->xsize; x++ ) { double coeff = MASK( mask, x, y ); /* The vertical line from mask[x, y] to 0 is * inside. Is our current square (x, y) part * of that line? */ if( (z_positive && coeff >= z_ph) || (!z_positive && coeff <= z_ph) ) { if( !inside ) { boxes_start( boxes, x ); inside = 1; } } else { if( inside ) { if( boxes_end( boxes, x, y, z_positive ? 1 : -1 ) ) return( -1 ); inside = 0; } } } if( inside && boxes_end( boxes, mask->xsize, y, z_positive ? 1 : -1 ) ) return( -1 ); } } #ifdef DEBUG VIPS_DEBUG_MSG( "boxes_new: generated %d boxes\n", boxes->n_hline ); boxes_hprint( boxes ); #endif /*DEBUG*/ return( 0 ); } /* The 'distance' between a pair of hlines. */ static int boxes_distance( Boxes *boxes, int a, int b ) { g_assert( boxes->hline[a].weight > 0 && boxes->hline[b].weight > 0 ); return( abs( boxes->hline[a].start - boxes->hline[b].start ) + abs( boxes->hline[a].end - boxes->hline[b].end ) ); } /* Merge two hlines. Line b is deleted, and any refs to b in vlines updated to * point at a. */ static void boxes_merge( Boxes *boxes, int a, int b ) { int i; /* Scale weights. */ int fa = boxes->hline[a].weight; int fb = boxes->hline[b].weight; double w = (double) fb / (fa + fb); /* New endpoints. */ boxes->hline[a].start += w * (boxes->hline[b].start - boxes->hline[a].start); boxes->hline[a].end += w * (boxes->hline[b].end - boxes->hline[a].end); boxes->hline[a].weight += boxes->hline[b].weight; /* Update velement refs to b to refer to a instead. */ for( i = 0; i < boxes->n_velement; i++ ) if( boxes->velement[i].band == b ) boxes->velement[i].band = a; /* Mark b to be deleted. */ boxes->hline[b].weight = 0; } static int edge_sortfn( const void *p1, const void *p2 ) { Edge *a = (Edge *) p1; Edge *b = (Edge *) p2; return( a->d - b->d ); } /* Cluster in batches. Return non-zero if we merged some lines. * * This is not as accurate as rescanning the whole space on every merge, but * it's far faster. */ static int boxes_cluster2( Boxes *boxes, int cluster ) { int i, j, k; int worst; int worst_i; int merged; for( i = 0; i < MAX_EDGES; i++ ) { boxes->edge[i].a = -1; boxes->edge[i].b = -1; boxes->edge[i].d = 99999; } worst_i = 0; worst = boxes->edge[worst_i].d; for( i = 0; i < boxes->n_hline; i++ ) { if( boxes->hline[i].weight == 0 ) continue; for( j = i + 1; j < boxes->n_hline; j++ ) { int distance; if( boxes->hline[j].weight == 0 ) continue; distance = boxes_distance( boxes, i, j ); if( distance < worst ) { boxes->edge[worst_i].a = i; boxes->edge[worst_i].b = j; boxes->edge[worst_i].d = distance; worst_i = 0; worst = boxes->edge[worst_i].d; for( k = 0; k < MAX_EDGES; k++ ) if( boxes->edge[k].d > worst ) { worst = boxes->edge[k].d; worst_i = k; } } } } /* Sort to get closest first. */ qsort( boxes->edge, MAX_EDGES, sizeof( Edge ), edge_sortfn ); /* printf( "edges:\n" ); printf( " n a b d:\n" ); for( i = 0; i < MAX_EDGES; i++ ) printf( "%2i) %3d %3d %3d\n", i, boxes->edge[i].a, boxes->edge[i].b, boxes->edge[i].d ); */ /* Merge from the top down. */ merged = 0; for( k = 0; k < MAX_EDGES; k++ ) { Edge *edge = &boxes->edge[k]; if( edge->d > cluster ) break; /* Has been removed, see loop below. */ if( edge->a == -1 ) continue; boxes_merge( boxes, edge->a, edge->b ); merged = 1; /* Nodes a and b have vanished or been moved. Remove any edges * which refer to them from the edge list, */ for( i = k; i < MAX_EDGES; i++ ) { Edge *edgei = &boxes->edge[i]; if( edgei->a == edge->a || edgei->b == edge->a || edgei->a == edge->b || edgei->b == edge->b ) edgei->a = -1; } } return( merged ); } /* Renumber after clustering. We will have removed a lot of hlines ... shuffle * the rest down, adjust all the vline references. */ static void boxes_renumber( Boxes *boxes ) { int i, j; VIPS_DEBUG_MSG( "boxes_renumber: renumbering ...\n" ); /* Loop for all zero-weight hlines. */ for( i = 0; i < boxes->n_hline; ) { if( boxes->hline[i].weight > 0 ) { i++; continue; } /* We move hlines i + 1 down, so we need to adjust all * band[] refs to match. */ for( j = 0; j < boxes->n_velement; j++ ) if( boxes->velement[j].band > i ) boxes->velement[j].band -= 1; memmove( boxes->hline + i, boxes->hline + i + 1, sizeof( HLine ) * (boxes->n_hline - i - 1) ); boxes->n_hline -= 1; } VIPS_DEBUG_MSG( "boxes_renumber: ... %d hlines remain\n", boxes->n_hline ); } /* Sort by band, then factor, then row. */ static int velement_sortfn( const void *p1, const void *p2 ) { VElement *a = (VElement *) p1; VElement *b = (VElement *) p2; if( a->band != b->band ) return( a->band - b->band ); if( a->factor != b->factor ) return( a->factor - b->factor ); return( a->row - b->row ); } static void boxes_vline( Boxes *boxes ) { int y, z; VIPS_DEBUG_MSG( "boxes_vline: forming vlines ...\n" ); /* Sort to get elements which could form a vline together. */ qsort( boxes->velement, boxes->n_velement, sizeof( VElement ), velement_sortfn ); #ifdef DEBUG boxes_hprint( boxes ); #endif /*DEBUG*/ /* If two lines have the same row and band, we can join them and knock * up the factor instead. */ for( y = 0; y < boxes->n_velement; y++ ) { for( z = y + 1; z < boxes->n_velement; z++ ) if( boxes->velement[z].band != boxes->velement[y].band || boxes->velement[z].row != boxes->velement[y].row ) break; boxes->velement[y].factor = z - y; memmove( boxes->velement + y + 1, boxes->velement + z, sizeof( VElement ) * (boxes->n_velement - z) ); boxes->n_velement -= z - y - 1; } #ifdef DEBUG printf( "after commoning up, %d velement remain\n", boxes->n_velement ); boxes_hprint( boxes ); #endif /*DEBUG*/ boxes->n_vline = 0; for( y = 0; y < boxes->n_velement; ) { int n = boxes->n_vline; /* Start of a line. */ boxes->vline[n].band = boxes->velement[y].band; boxes->vline[n].factor = boxes->velement[y].factor; boxes->vline[n].start = boxes->velement[y].row; /* Search for the end of this line. */ for( z = y + 1; z < boxes->n_velement; z++ ) if( boxes->velement[z].band != boxes->vline[n].band || boxes->velement[z].factor != boxes->vline[n].factor || boxes->velement[z].row != boxes->vline[n].start + z - y ) break; /* So the line ends at the previously examined element. We * want 'end' to be one beyond that (non-inclusive). */ boxes->vline[n].end = boxes->velement[z - 1].row + 1; boxes->n_vline += 1; y = z; } VIPS_DEBUG_MSG( "boxes_vline: found %d vlines\n", boxes->n_vline ); } /* Break a mask into boxes. */ static Boxes * boxes_new( IMAGE *in, IMAGE *out, DOUBLEMASK *mask, int n_layers, int cluster ) { const int size = mask->xsize * mask->ysize; Boxes *boxes; double sum; int x, y, z; /* Check parameters. */ if( im_piocheck( in, out ) || im_check_uncoded( "im_aconv", in ) || vips_check_dmask( "im_aconv", mask ) ) return( NULL ); boxes = VIPS_NEW( out, Boxes ); boxes->in = in; boxes->out = out; if( !(boxes->mask = (DOUBLEMASK *) im_local( out, (im_construct_fn) im_dup_dmask, (im_callback_fn) im_free_dmask, mask, mask->filename, NULL )) ) return( NULL ); boxes->n_layers = n_layers; boxes->cluster = cluster; boxes->n_hline = 0; boxes->n_velement = 0; boxes->n_vline = 0; /* Break into a set of hlines. */ if( boxes_break( boxes ) ) return( NULL ); /* Cluster to find groups of lines. */ VIPS_DEBUG_MSG( "boxes_new: clustering with thresh %d ...\n", cluster ); while( boxes_cluster2( boxes, cluster ) ) ; /* Renumber to remove holes created by clustering. */ boxes_renumber( boxes ); /* Find a set of vlines for the remaining hlines. */ boxes_vline( boxes ); /* Find the area of the lines and the length of the longest hline. */ boxes->area = 0; boxes->max_line = 0; for( y = 0; y < boxes->n_velement; y++ ) { x = boxes->velement[y].band; z = boxes->hline[x].end - boxes->hline[x].start; boxes->area += boxes->velement[y].factor * z; if( z > boxes->max_line ) boxes->max_line = z; } /* Strength reduction: if all lines are divisible by n, we can move * that n out into the ->area factor. The aim is to produce as many * factor 1 lines as we can and to reduce the chance of overflow. */ x = boxes->velement[0].factor; for( y = 1; y < boxes->n_velement; y++ ) x = gcd( x, boxes->velement[y].factor ); for( y = 0; y < boxes->n_velement; y++ ) boxes->velement[y].factor /= x; boxes->area *= x; /* Find the area of the original mask. */ sum = 0; for( z = 0; z < size; z++ ) sum += mask->coeff[z]; boxes->area = rint( sum * boxes->area / mask->scale ); boxes->rounding = (boxes->area + 1) / 2 + mask->offset * boxes->area; #ifdef DEBUG boxes_hprint( boxes ); boxes_vprint( boxes ); #endif /*DEBUG*/ /* With 512x512 tiles, each hline requires 3mb of intermediate per * thread ... 300 lines is about a gb per thread, ouch. */ if( boxes->n_hline > 150 ) { im_error( "im_aconv", "%s", _( "mask too complex" ) ); return( NULL ); } return( boxes ); } /* Our sequence value. */ typedef struct { Boxes *boxes; REGION *ir; /* Input region */ /* Offsets for start and stop. */ int *start; int *end; int last_stride; /* Avoid recalcing offsets, if we can */ /* The rolling sums. int for integer types, double for floating point * types. */ void *sum; } AConvSequence; /* Free a sequence value. */ static int aconv_stop( void *vseq, void *a, void *b ) { AConvSequence *seq = (AConvSequence *) vseq; IM_FREEF( im_region_free, seq->ir ); return( 0 ); } /* Convolution start function. */ static void * aconv_start( IMAGE *out, void *a, void *b ) { IMAGE *in = (IMAGE *) a; Boxes *boxes = (Boxes *) b; AConvSequence *seq; if( !(seq = IM_NEW( out, AConvSequence )) ) return( NULL ); /* Init! */ seq->boxes = boxes; seq->ir = im_region_create( in ); /* n_velement should be the largest possible dimension. */ g_assert( boxes->n_velement >= boxes->n_hline ); g_assert( boxes->n_velement >= boxes->n_vline ); seq->start = IM_ARRAY( out, boxes->n_velement, int ); seq->end = IM_ARRAY( out, boxes->n_velement, int ); if( vips_band_format_isint( out->BandFmt ) ) seq->sum = IM_ARRAY( out, boxes->n_velement, int ); else seq->sum = IM_ARRAY( out, boxes->n_velement, double ); seq->last_stride = -1; if( !seq->ir || !seq->start || !seq->end || !seq->sum ) { aconv_stop( seq, in, boxes ); return( NULL ); } return( seq ); } /* The h and v loops are very similar, but also annoyingly different. Keep * them separate for easy debugging. */ #define HCONV( IN, OUT ) \ G_STMT_START { \ for( i = 0; i < bands; i++ ) { \ OUT *seq_sum = (OUT *) seq->sum; \ \ IN *p; \ OUT *q; \ \ p = i + (IN *) IM_REGION_ADDR( ir, r->left, r->top + y ); \ q = i * n_hline + \ (OUT *) IM_REGION_ADDR( or, r->left, r->top + y ); \ \ for( z = 0; z < n_hline; z++ ) { \ seq_sum[z] = 0; \ for( x = boxes->hline[z].start; \ x < boxes->hline[z].end; x++ ) \ seq_sum[z] += p[x * istride]; \ q[z] = seq_sum[z]; \ } \ q += ostride; \ \ for( x = 1; x < r->width; x++ ) { \ for( z = 0; z < n_hline; z++ ) { \ seq_sum[z] += p[seq->end[z]]; \ seq_sum[z] -= p[seq->start[z]]; \ q[z] = seq_sum[z]; \ } \ p += istride; \ q += ostride; \ } \ } \ } G_STMT_END /* Do horizontal masks ... we scan the mask along scanlines. */ static int aconv_hgenerate( REGION *or, void *vseq, void *a, void *b ) { AConvSequence *seq = (AConvSequence *) vseq; IMAGE *in = (IMAGE *) a; Boxes *boxes = (Boxes *) b; REGION *ir = seq->ir; const int n_hline = boxes->n_hline; DOUBLEMASK *mask = boxes->mask; Rect *r = &or->valid; /* Double the bands (notionally) for complex. */ int bands = vips_band_format_iscomplex( in->BandFmt ) ? 2 * in->Bands : in->Bands; Rect s; int x, y, z, i; int istride; int ostride; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; if( im_prepare( ir, &s ) ) return( -1 ); istride = IM_IMAGE_SIZEOF_PEL( in ) / IM_IMAGE_SIZEOF_ELEMENT( in ); ostride = IM_IMAGE_SIZEOF_PEL( or->im ) / IM_IMAGE_SIZEOF_ELEMENT( or->im ); /* Init offset array. */ if( seq->last_stride != istride ) { seq->last_stride = istride; for( z = 0; z < n_hline; z++ ) { seq->start[z] = boxes->hline[z].start * istride; seq->end[z] = boxes->hline[z].end * istride; } } for( y = 0; y < r->height; y++ ) { switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: if( boxes->max_line > 256 ) HCONV( unsigned char, unsigned int ); else HCONV( unsigned char, unsigned short ); break; case IM_BANDFMT_CHAR: if( boxes->max_line > 256 ) HCONV( signed char, signed int ); else HCONV( signed char, signed short ); break; case IM_BANDFMT_USHORT: HCONV( unsigned short, unsigned int ); break; case IM_BANDFMT_SHORT: HCONV( signed short, signed int ); break; case IM_BANDFMT_UINT: HCONV( unsigned int, unsigned int ); break; case IM_BANDFMT_INT: HCONV( signed int, signed int ); break; case IM_BANDFMT_FLOAT: HCONV( float, float ); break; case IM_BANDFMT_DOUBLE: HCONV( double, double ); break; case IM_BANDFMT_COMPLEX: HCONV( float, float ); break; case IM_BANDFMT_DPCOMPLEX: HCONV( double, double ); break; default: g_assert( 0 ); } } return( 0 ); } static int aconv_horizontal( Boxes *boxes, IMAGE *in, IMAGE *out ) { /* Prepare output. Consider a 7x7 mask and a 7x7 image --- the output * would be 1x1. */ if( im_cp_desc( out, in ) ) return( -1 ); out->Xsize -= boxes->mask->xsize - 1; if( out->Xsize <= 0 ) { im_error( "im_aconv", "%s", _( "image too small for mask" ) ); return( -1 ); } out->Bands *= boxes->n_hline; /* Short u?char lines can use u?short intermediate. */ if( vips_band_format_isuint( in->BandFmt ) ) out->BandFmt = boxes->max_line < 256 ? IM_BANDFMT_USHORT : IM_BANDFMT_UINT; else if( vips_band_format_isint( in->BandFmt ) ) out->BandFmt = boxes->max_line < 256 ? IM_BANDFMT_SHORT : IM_BANDFMT_INT; if( im_demand_hint( out, IM_SMALLTILE, in, NULL ) || im_generate( out, aconv_start, aconv_hgenerate, aconv_stop, in, boxes ) ) return( -1 ); out->Xoffset = -boxes->mask->xsize / 2; out->Yoffset = -boxes->mask->ysize / 2; return( 0 ); } #define CLIP_UCHAR( V ) \ G_STMT_START { \ if( (V) < 0 ) \ (V) = 0; \ else if( (V) > UCHAR_MAX ) \ (V) = UCHAR_MAX; \ } G_STMT_END #define CLIP_CHAR( V ) \ G_STMT_START { \ if( (V) < SCHAR_MIN ) \ (V) = SCHAR_MIN; \ else if( (V) > SCHAR_MAX ) \ (V) = SCHAR_MAX; \ } G_STMT_END #define CLIP_USHORT( V ) \ G_STMT_START { \ if( (V) < 0 ) \ (V) = 0; \ else if( (V) > USHRT_MAX ) \ (V) = USHRT_MAX; \ } G_STMT_END #define CLIP_SHORT( V ) \ G_STMT_START { \ if( (V) < SHRT_MIN ) \ (V) = SHRT_MIN; \ else if( (V) > SHRT_MAX ) \ (V) = SHRT_MAX; \ } G_STMT_END #define CLIP_NONE( V ) {} #define VCONV( ACC, IN, OUT, CLIP ) \ G_STMT_START { \ for( x = 0; x < sz; x++ ) { \ ACC *seq_sum = (ACC *) seq->sum; \ \ IN *p; \ OUT *q; \ ACC sum; \ \ p = x * boxes->n_hline + \ (IN *) IM_REGION_ADDR( ir, r->left, r->top ); \ q = x + (OUT *) IM_REGION_ADDR( or, r->left, r->top ); \ \ sum = 0; \ for( z = 0; z < n_vline; z++ ) { \ seq_sum[z] = 0; \ for( k = boxes->vline[z].start; \ k < boxes->vline[z].end; k++ ) \ seq_sum[z] += p[k * istride + \ boxes->vline[z].band]; \ sum += boxes->vline[z].factor * seq_sum[z]; \ } \ sum = (sum + boxes->rounding) / boxes->area; \ CLIP( sum ); \ *q = sum; \ q += ostride; \ \ for( y = 1; y < r->height; y++ ) { \ sum = 0;\ for( z = 0; z < n_vline; z++ ) { \ seq_sum[z] += p[seq->end[z]]; \ seq_sum[z] -= p[seq->start[z]]; \ sum += boxes->vline[z].factor * seq_sum[z]; \ } \ p += istride; \ sum = (sum + boxes->rounding) / boxes->area; \ CLIP( sum ); \ *q = sum; \ q += ostride; \ } \ } \ } G_STMT_END /* Do vertical masks ... we scan the mask down columns of pixels. */ static int aconv_vgenerate( REGION *or, void *vseq, void *a, void *b ) { AConvSequence *seq = (AConvSequence *) vseq; IMAGE *in = (IMAGE *) a; Boxes *boxes = (Boxes *) b; REGION *ir = seq->ir; const int n_vline = boxes->n_vline; DOUBLEMASK *mask = boxes->mask; Rect *r = &or->valid; /* Double the width (notionally) for complex. */ int sz = vips_band_format_iscomplex( in->BandFmt ) ? 2 * IM_REGION_N_ELEMENTS( or ) : IM_REGION_N_ELEMENTS( or ); Rect s; int x, y, z, k; int istride; int ostride; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); istride = IM_REGION_LSKIP( ir ) / IM_IMAGE_SIZEOF_ELEMENT( in ); ostride = IM_REGION_LSKIP( or ) / IM_IMAGE_SIZEOF_ELEMENT( boxes->out ); /* Init offset array. */ if( seq->last_stride != istride ) { seq->last_stride = istride; for( z = 0; z < n_vline; z++ ) { seq->start[z] = boxes->vline[z].band + boxes->vline[z].start * istride; seq->end[z] = boxes->vline[z].band + boxes->vline[z].end * istride; } } switch( boxes->in->BandFmt ) { case IM_BANDFMT_UCHAR: if( boxes->max_line > 256 ) VCONV( unsigned int, \ unsigned int, unsigned char, CLIP_UCHAR ); else VCONV( unsigned int, \ unsigned short, unsigned char, CLIP_UCHAR ); break; case IM_BANDFMT_CHAR: if( boxes->max_line > 256 ) VCONV( signed int, \ signed int, signed char, CLIP_UCHAR ); else VCONV( signed int, \ signed short, signed char, CLIP_UCHAR ); break; case IM_BANDFMT_USHORT: VCONV( unsigned int, \ unsigned int, unsigned short, CLIP_USHORT ); break; case IM_BANDFMT_SHORT: VCONV( signed int, signed int, signed short, CLIP_SHORT ); break; case IM_BANDFMT_UINT: VCONV( unsigned int, unsigned int, unsigned int, CLIP_NONE ); break; case IM_BANDFMT_INT: VCONV( signed int, signed int, signed int, CLIP_NONE ); break; case IM_BANDFMT_FLOAT: VCONV( float, float, float, CLIP_NONE ); break; case IM_BANDFMT_DOUBLE: VCONV( double, double, double, CLIP_NONE ); break; case IM_BANDFMT_COMPLEX: VCONV( float, float, float, CLIP_NONE ); break; case IM_BANDFMT_DPCOMPLEX: VCONV( double, double, double, CLIP_NONE ); break; default: g_assert( 0 ); } return( 0 ); } static int aconv_vertical( Boxes *boxes, IMAGE *in, IMAGE *out ) { /* Prepare output. Consider a 7x7 mask and a 7x7 image --- the output * would be 1x1. */ if( im_cp_desc( out, in ) ) return( -1 ); out->Ysize -= boxes->mask->ysize - 1; if( out->Ysize <= 0 ) { im_error( "im_aconv", "%s", _( "image too small for mask" ) ); return( -1 ); } out->Bands = boxes->in->Bands; out->BandFmt = boxes->in->BandFmt; if( im_demand_hint( out, IM_SMALLTILE, in, NULL ) || im_generate( out, aconv_start, aconv_vgenerate, aconv_stop, in, boxes ) ) return( -1 ); out->Xoffset = -boxes->mask->xsize / 2; out->Yoffset = -boxes->mask->ysize / 2; return( 0 ); } /** * im_aconv: * @in: input image * @out: output image * @mask: convolution mask * @n_layers: number of layers for approximation * @cluster: cluster lines closer than this distance * * Perform an approximate convolution of @in with @mask. * * The output image * always has the same #VipsBandFmt as the input image. * * Larger values for @n_layers give more accurate * results, but are slower. As @n_layers approaches the mask radius, the * accuracy will become close to exact convolution and the speed will drop to * match. For many large masks, such as Gaussian, @n_layers need be only 10% of * this value and accuracy will still be good. * * Smaller values of @cluster will give more accurate results, but be slower * and use more memory. 10% of the mask radius is a good rule of thumb. * * See also: im_convsep_f(), im_create_dmaskv(). * * Returns: 0 on success, -1 on error */ int im_aconv( IMAGE *in, IMAGE *out, DOUBLEMASK *mask, int n_layers, int cluster ) { IMAGE *t[2]; Boxes *boxes; if( !(boxes = boxes_new( in, out, mask, n_layers, cluster )) || im_open_local_array( out, t, 2, "im_aconv", "p" ) ) return( -1 ); /* */ if( im_embed( in, t[0], 1, mask->xsize / 2, mask->ysize / 2, in->Xsize + mask->xsize - 1, in->Ysize + mask->ysize - 1 ) || aconv_horizontal( boxes, t[0], t[1] ) || aconv_vertical( boxes, t[1], out ) ) return( -1 ); /* For testing .. just try one direction. if( aconv_horizontal( boxes, in, out ) ) return( -1 ); */ out->Xoffset = 0; out->Yoffset = 0; return( 0 ); } vips-7.38.5/libvips/convolution/fastcor.c0000644000175000017500000001453112303140253015351 00000000000000/* fastcor * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on : 15/03/1991 * 20/2/95 JC * - ANSIfied * - in1 and in2 swapped, to match order for im_spcor * - memory leaks fixed * 21/2/95 JC * - partialed * - speed-ups * 7/4/04 * - now uses im_embed() with edge stretching on the output * - sets Xoffset / Yoffset * 8/3/06 JC * - use im_embed() with edge stretching on the input, not the output * - calculate sum of squares of differences, rather than abs of * difference * 3/2/10 * - gtkdoc * - cleanups * 7/11/13 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pconvolution.h" #include "correlation.h" typedef VipsCorrelationClass VipsFastcor; typedef VipsCorrelationClass VipsFastcorClass; G_DEFINE_TYPE( VipsFastcor, vips_fastcor, VIPS_TYPE_CORRELATION ); #define CORR_INT( TYPE ) { \ for( y = 0; y < r->height; y++ ) { \ unsigned int *q = (unsigned int *) \ VIPS_REGION_ADDR( out, r->left, r->top + y ); \ \ for( x = 0; x < r->width; x++ ) \ for( b = 0; b < bands; b++ ) { \ TYPE *p1 = (TYPE *) ref->data; \ TYPE *p2 = (TYPE *) VIPS_REGION_ADDR( in, \ r->left + x, r->top + y ); \ \ unsigned int sum; \ \ sum = 0; \ for( j = 0; j < ref->Ysize; j++ ) { \ for( i = b; i < sz; i += bands ) { \ int t = p1[i] - p2[i]; \ \ sum += t * t; \ } \ \ p1 += sz; \ p2 += lsk; \ } \ \ *q++ = sum; \ } \ } \ } #define CORR_FLOAT( TYPE ) { \ for( y = 0; y < r->height; y++ ) { \ TYPE *q = (TYPE *) \ VIPS_REGION_ADDR( out, r->left, r->top + y ); \ \ for( x = 0; x < r->width; x++ ) \ for( b = 0; b < bands; b++ ) { \ TYPE *p1 = (TYPE *) ref->data; \ TYPE *p2 = (TYPE *) VIPS_REGION_ADDR( in, \ r->left + x, r->top + y ); \ \ TYPE sum; \ \ sum = 0; \ for( j = 0; j < ref->Ysize; j++ ) { \ for( i = b; i < sz; i += bands ) { \ TYPE t = p1[i] - p2[i]; \ \ sum += t * t; \ } \ \ p1 += sz; \ p2 += lsk; \ } \ \ *q++ = sum; \ } \ } \ } static void vips_fastcor_correlation( VipsCorrelation *correlation, VipsRegion *in, VipsRegion *out ) { VipsRect *r = &out->valid; VipsImage *ref = correlation->ref_ready; int bands = vips_band_format_iscomplex( ref->BandFmt ) ? ref->Bands * 2 : ref->Bands; int sz = ref->Xsize * bands; int lsk = VIPS_REGION_LSKIP( in ); int x, y, i, j, b; switch( vips_image_get_format( ref ) ) { case VIPS_FORMAT_CHAR: CORR_INT( signed char ); break; case VIPS_FORMAT_UCHAR: CORR_INT( unsigned char ); break; case VIPS_FORMAT_SHORT: CORR_INT( signed short ); break; case VIPS_FORMAT_USHORT: CORR_INT( unsigned short ); break; case VIPS_FORMAT_INT: CORR_INT( signed int ); break; case VIPS_FORMAT_UINT: CORR_INT( unsigned int ); break; case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_COMPLEX: CORR_FLOAT( float ); break; case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DPCOMPLEX: CORR_FLOAT( double ); break; default: g_assert( 0 ); } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX /* Type promotion for multiplication. Sign and value preserving. Make sure * these match the case statement in multiply_buffer() above. */ static int vips_fastcor_format_table[10] = { /* UC C US S UI I F X D DX */ UI, UI, UI, UI, UI, UI,F, X, D, DX }; static void vips_fastcor_class_init( VipsFastcorClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsCorrelationClass *cclass = VIPS_CORRELATION_CLASS( class ); object_class->nickname = "fastcor"; object_class->description = _( "fast correlation" ); cclass->format_table = vips_fastcor_format_table; cclass->correlation = vips_fastcor_correlation; } static void vips_fastcor_init( VipsFastcor *fastcor ) { } /** * vips_fastcor: * @in: input image * @ref: reference image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Calculate a fast correlation surface. * * @ref is placed at every position in @in and the sum of squares of * differences calculated. * * The output * image is the same size as the input. Extra input edge pixels are made by * copying the existing edges outwards. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The output type is uint if both inputs are integer, float if both are float * or complex, and double if either is double or double complex. * In other words, the output type is just large enough to hold the whole * range of possible values. * * See also: vips_spcor(). * * Returns: 0 on success, -1 on error */ int vips_fastcor( VipsImage *in, VipsImage *ref, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "fastcor", ap, in, ref, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/convolution/convsep.c0000644000175000017500000001066512303141142015367 00000000000000/* convolve twice, rotating the mask * * 23/10/13 * - from vips_convsep() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pconvolution.h" typedef struct { VipsConvolution parent_instance; VipsPrecision precision; int layers; int cluster; } VipsConvsep; typedef VipsConvolutionClass VipsConvsepClass; G_DEFINE_TYPE( VipsConvsep, vips_convsep, VIPS_TYPE_CONVOLUTION ); static int vips_convsep_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConvolution *convolution = (VipsConvolution *) object; VipsConvsep *convsep = (VipsConvsep *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 3 ); g_object_set( convsep, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_convsep_parent_class )->build( object ) ) return( -1 ); if( vips_check_separable( class->nickname, convolution->M ) ) return( -1 ); if( vips_rot( convolution->M, &t[0], VIPS_ANGLE_90, NULL ) || vips_conv( convolution->in, &t[1], convolution->M, "precision", convsep->precision, "layers", convsep->layers, "cluster", convsep->cluster, NULL ) || vips_conv( t[1], &t[2], t[0], "precision", convsep->precision, "layers", convsep->layers, "cluster", convsep->cluster, NULL ) ) return( -1 ); if( vips_image_write( t[2], convolution->out ) ) return( -1 ); return( 0 ); } static void vips_convsep_class_init( VipsConvsepClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "convsep"; object_class->description = _( "convolution operation" ); object_class->build = vips_convsep_build; VIPS_ARG_ENUM( class, "precision", 203, _( "Precision" ), _( "Convolve with this precision" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsConvsep, precision ), VIPS_TYPE_PRECISION, VIPS_PRECISION_INTEGER ); VIPS_ARG_INT( class, "layers", 204, _( "Layers" ), _( "Use this many layers in approximation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsConvsep, layers ), 1, 1000, 5 ); VIPS_ARG_INT( class, "cluster", 205, _( "Cluster" ), _( "Cluster lines closer than this in approximation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsConvsep, cluster ), 1, 100, 1 ); } static void vips_convsep_init( VipsConvsep *convsep ) { convsep->precision = VIPS_PRECISION_INTEGER; convsep->layers = 5; convsep->cluster = 1; } /** * vips_convsep: * @in: input image * @out: output image * @mask: convolution mask * * Optional arguments: * * @precision: calculation accuracy * @layers: number of layers for approximation * @cluster: cluster lines closer than this distance * * Perform a separable convolution of @in with @mask. * See vips_conv() for a detailed description. * * The mask must be 1xn or nx1 elements. * * The image is convolved twice: once with @mask and then again with @mask * rotated by 90 degrees. This is much faster for certain types of mask * (gaussian blur, for example) than doing a full 2D convolution. * * See also: vips_conv(), vips_gaussmat(). * * Returns: 0 on success, -1 on error */ int vips_convsep( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) { va_list ap; int result; va_start( ap, mask ); result = vips_call_split( "convsep", ap, in, out, mask ); va_end( ap ); return( result ); } vips-7.38.5/libvips/convolution/gaussblur.c0000644000175000017500000001071212303141142015712 00000000000000/* Gaussian blur. * * 15/11/13 * - from vips_sharpen() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include typedef struct _VipsGaussblur { VipsOperation parent_instance; VipsImage *in; VipsImage *out; int radius; VipsPrecision precision; } VipsGaussblur; typedef VipsOperationClass VipsGaussblurClass; G_DEFINE_TYPE( VipsGaussblur, vips_gaussblur, VIPS_TYPE_OPERATION ); static int vips_gaussblur_build( VipsObject *object ) { VipsGaussblur *gaussblur = (VipsGaussblur *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 2 ); if( VIPS_OBJECT_CLASS( vips_gaussblur_parent_class )->build( object ) ) return( -1 ); /* Stop at 20% of max ... bit mean, but means mask radius is roughly * right. */ if( vips_gaussmat( &t[0], gaussblur->radius / 2, 0.2, "separable", TRUE, "integer", gaussblur->precision != VIPS_PRECISION_FLOAT, NULL ) ) return( -1 ); #ifdef DEBUG printf( "gaussblur: blurring with:\n" ); vips_matrixprint( t[0], NULL ); #endif /*DEBUG*/ if( vips_convsep( gaussblur->in, &t[1], t[0], "precision", gaussblur->precision, NULL ) ) return( -1 ); g_object_set( object, "out", vips_image_new(), NULL ); if( vips_image_write( t[1], gaussblur->out ) ) return( -1 ); return( 0 ); } static void vips_gaussblur_class_init( VipsGaussblurClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "gaussblur"; object_class->description = _( "Unsharp masking for print" ); object_class->build = vips_gaussblur_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGaussblur, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsGaussblur, out ) ); VIPS_ARG_INT( class, "radius", 3, _( "radius" ), _( "Mask radius" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsGaussblur, radius ), 1, 1000000, 3 ); VIPS_ARG_ENUM( class, "precision", 4, _( "Precision" ), _( "Convolve with this precision" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsGaussblur, precision ), VIPS_TYPE_PRECISION, VIPS_PRECISION_INTEGER ); } static void vips_gaussblur_init( VipsGaussblur *gaussblur ) { gaussblur->radius = 3; gaussblur->precision = VIPS_PRECISION_INTEGER; } /** * vips_gaussblur: * @in: input image * @out: output image * @radius: how large a mask to use * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @precision: #VipsPrecision for blur * * This operator runs vips_gaussmat() and vips_convsep() for you on an image. * * @radius is not used directly. Instead the standard deviation of * vips_gaussmat() is set to @radius / 2 and the minimum amplitude set to 20%. * This gives a mask radius of approximately @radius pixels. * * See also: vips_gaussmat(), vips_conv(). * * Returns: 0 on success, -1 on error. */ int vips_gaussblur( VipsImage *in, VipsImage **out, int radius, ... ) { va_list ap; int result; va_start( ap, radius ); result = vips_call_split( "gaussblur", ap, in, out, radius ); va_end( ap ); return( result ); } vips-7.38.5/libvips/convolution/im_conv.c0000644000175000017500000006143612303140253015350 00000000000000/* im_conv * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris & Kirk Martinez * Written on: 29/04/1991 * Modified on: 19/05/1991 * 8/7/93 JC * - adapted for partial v2 * - memory leaks fixed * - ANSIfied * 23/7/93 JC * - inner loop unrolled with a switch - 25% speed-up! * 13/12/93 JC * - tiny rounding error removed * 7/10/94 JC * - new IM_ARRAY() macro * - various simplifications * - evalend callback added * 1/2/95 JC * - use of IM_REGION_ADDR() updated * - output size was incorrect! see comment below * - bug with large non-square matricies fixed too * - uses new im_embed() function * 13/7/98 JC * - wierd bug ... im_free_imask is no longer directly called for close * callback, caused SIGKILL on solaris 2.6 ... linker bug? * 9/3/01 JC * - reworked and simplified, about 10% faster * - slightly better range clipping * 27/7/01 JC * - reject masks with scale == 0 * 7/4/04 * - im_conv() now uses im_embed() with edge stretching on the input, not * the output * - sets Xoffset / Yoffset * 11/11/05 * - simpler inner loop avoids gcc4 bug * 7/11/07 * - new evalstart/end callbacks * 12/5/08 * - int rounding was +1 too much, argh * - only rebuild the buffer offsets if bpl changes * 5/4/09 * - tiny speedups and cleanups * - add restrict, though it doesn't seem to help gcc * 12/11/09 * - only check for non-zero elements once * - add mask-all-zero check * - cleanups * 3/2/10 * - gtkdoc * - more cleanups * 23/08/10 * - add a special case for 3x3 masks, about 20% faster * 1/10/10 * - support complex (just double the bands) * 18/10/10 * - add experimental Orc path * 29/10/10 * - use VipsVector * - get rid of im_convsep(), just call this twice, no longer worth * keeping two versions * 8/11/10 * - add array tiling * 9/5/11 * - argh typo in overflow estimation could cause errors * 15/10/11 Nicolas * - handle offset correctly in seperable convolutions */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Show sample pixels as they are transformed. #define DEBUG_PIXELS */ /* #define DEBUG */ /* TODO - tried 8-bit data with a 32-bit intermediate, but it was only slightly faster than C 16-bit data would be even slower, no speed advantage - make up a signed 8-bit code path? - don't use divluw, it's insanely slow, instead scale coefficients so that we can just do >>8 at the end */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include /* We can't run more than this many passes. Larger than this and we * fall back to C. */ #define MAX_PASS (10) /* A pass with a vector. */ typedef struct { int first; /* The index of the first mask coff we use */ int last; /* The index of the last mask coff we use */ int r; /* Set previous result in this var */ /* The code we generate for this section of this mask. */ VipsVector *vector; } Pass; /* Our parameters ... we take a copy of the mask argument, plus we make a * smaller version with the zeros squeezed out. */ typedef struct { IMAGE *in; IMAGE *out; INTMASK *mask; /* Copy of mask arg */ int nnz; /* Number of non-zero mask elements */ int *coeff; /* Array of non-zero mask coefficients */ int *coeff_pos; /* Index of each nnz element in mask->coeff */ int underflow; /* Global underflow/overflow counts */ int overflow; /* The convolver we generate for this mask. We have to split the * convolve and clip into two phases. */ int n_pass; Pass pass[MAX_PASS]; int s1; /* Input to clip */ VipsVector *clip; } Conv; static void conv_vector_free( Conv *conv ) { int i; for( i = 0; i < conv->n_pass; i++ ) IM_FREEF( vips_vector_free, conv->pass[i].vector ); conv->n_pass = 0; IM_FREEF( vips_vector_free, conv->clip ); } static int conv_close( Conv *conv ) { IM_FREEF( im_free_imask, conv->mask ); conv_vector_free( conv ); return( 0 ); } static int conv_evalstart( Conv *conv ) { /* Reset underflow/overflow count. * * This often doesn't get called until eval has already finished, so * resetting here just wipes all records. * conv->overflow = 0; conv->underflow = 0; * */ return( 0 ); } static int conv_evalend( Conv *conv ) { if( conv->overflow ) vips_info( "im_conv", _( "%d overflows detected" ), conv->overflow ); if( conv->underflow ) vips_info( "im_conv", _( "%d underflows detected" ), conv->underflow ); return( 0 ); } #define TEMP( N, S ) vips_vector_temporary( v, N, S ) #define SCANLINE( N, P, S ) vips_vector_source_scanline( v, N, P, S ) #define CONST( N, V, S ) vips_vector_constant( v, N, V, S ) #define ASM2( OP, A, B ) vips_vector_asm2( v, OP, A, B ) #define ASM3( OP, A, B, C ) vips_vector_asm3( v, OP, A, B, C ) /* Generate code for a section of the mask. * * 0 for success, -1 on error. */ static int conv_compile_convolution_u8s16_section( Pass *pass, Conv *conv, gboolean first_pass ) { INTMASK *mask = conv->mask; const int n_mask = mask->xsize * mask->ysize; int i; VipsVector *v; char zero[256]; char offset[256]; char source[256]; char coeff[256]; pass->vector = v = vips_vector_new( "conv", 2 ); /* The value we fetch from the image, the product with the matrix * value, the accumulated sum. */ TEMP( "value", 1 ); TEMP( "product", 2 ); TEMP( "sum", 2 ); /* Init the sum. If this is the first pass, it's a constant. If this * is a later pass, we have to init the sum from the result * of the previous pass. */ if( first_pass ) { CONST( zero, 0, 2 ); ASM2( "copyw", "sum", zero ); } else { /* "r" is the result of the previous pass. */ pass->r = vips_vector_source_name( v, "r", 2 ); ASM2( "loadw", "sum", "r" ); } for( i = pass->first; i < n_mask; i++ ) { int x = i % mask->xsize; int y = i / mask->xsize; if( !mask->coeff[i] ) /* Exclude zero elements. */ continue; /* The source. sl0 is the first scanline in the mask. */ SCANLINE( source, y, 1 ); /* The offset, only for non-first-columns though. */ if( x > 0 ) CONST( offset, conv->in->Bands * x, 1 ); /* The coefficient. Only for non-1 coeffs though, we skip the * mul for them. * * We need to do 8-bit unsigned pixel * signed mask, so we * have to cast the pixel up to 16-bit then do a mult against a * 16-bit constant. We know the result will fit in the bottom * 16 bits. */ if( mask->coeff[i] != 1 ) CONST( coeff, mask->coeff[i], 2 ); /* Two factors: * - element is in the first column, ie. has a zero offset * - mask coeff is 1, ie. we can skip the multiply * * We could combine some of these cases, but it's simpler * and safer to spell them all out. */ if( x == 0 ) ASM2( "loadb", "value", source ); else ASM3( "loadoffb", "value", source, offset ); ASM2( "convubw", "product", "value" ); if( mask->coeff[i] != 1 ) ASM3( "mullw", "product", "product", coeff ); ASM3( "addssw", "sum", "sum", "product" ); if( vips_vector_full( v ) ) break; } pass->last = i; ASM2( "copyw", "d1", "sum" ); #ifdef DEBUG vips_vector_print( v ); printf( "compiling ...\n" ); #endif /*DEBUG*/ if( !vips_vector_compile( v ) ) return( -1 ); return( 0 ); } /* Generate the convolution pass for u8 data with an s16 accumulator. * * 0 for success, -1 on error. */ static int conv_compile_convolution_u8s16( Conv *conv ) { INTMASK *mask = conv->mask; const int n_mask = mask->xsize * mask->ysize; double min, max; int i; if( conv->in->BandFmt != IM_BANDFMT_UCHAR ) return( -1 ); /* Can the accumulator overflow or underflow at any stage? Since * matrix elements are signed, we need to calculate a running * possible min and max. */ min = 0; max = 0; for( i = 0; i < n_mask; i++ ) { int v = 255 * mask->coeff[i]; min = IM_MIN( min, min + v ); max = IM_MAX( max, max + v ); if( max > SHRT_MAX ) return( -1 ); if( min < SHRT_MIN ) return( -1 ); } /* Generate passes until we've used up the whole mask. */ for( i = 0;;) { Pass *pass; /* Skip any zero coefficients at the start of the mask * region. */ for( ; i < n_mask && !mask->coeff[i]; i++ ) ; if( i == n_mask ) break; /* Allocate space for another pass. */ if( conv->n_pass == MAX_PASS ) return( -1 ); pass = &conv->pass[conv->n_pass]; conv->n_pass += 1; pass->first = i; pass->last = i; pass->r = -1; if( conv_compile_convolution_u8s16_section( pass, conv, conv->n_pass == 1 ) ) return( -1 ); i = pass->last + 1; #ifdef DEBUG printf( "conv_compile_convolution_u8s16: " "first = %d, last = %d\n", pass->first, pass->last ); #endif /*DEBUG*/ if( i >= n_mask ) break; } return( 0 ); } /* Generate the program that does (pass + rounding) / scale + offset * from a s16 intermediate back to a u8 output. */ static int conv_compile_scale_s16u8( Conv *conv ) { INTMASK *mask = conv->mask; VipsVector *v; char scale[256]; char offset[256]; char zero[256]; /* Scale and offset must be in range. */ if( mask->scale > 255 || mask->scale < 0 || mask->offset > SHRT_MAX || mask->offset < SHRT_MIN ) return( -1 ); conv->clip = v = vips_vector_new( "clip", 1 ); conv->s1 = vips_vector_source_name( v, "s1", 2 ); TEMP( "t1", 2 ); TEMP( "t2", 2 ); /* We can only do unsigned divide, so we must add the offset before * dividing by the scale. We need to scale the offset up. * * We can build the rounding into the offset as well. * You might think this should be (scale + 1) / 2, but then we'd be * adding one for scale == 1. */ CONST( scale, mask->scale, 1 ); CONST( offset, mask->offset * mask->scale + mask->scale / 2, 2 ); CONST( zero, 0, 2 ); /* Offset and scale. */ ASM3( "addssw", "t1", "s1", offset ); /* We need to convert the signed result of the * offset to unsigned for the div, ie. we want to set anything <0 to 0. */ ASM3( "cmpgtsw", "t2", "t1", zero ); ASM3( "andw", "t1", "t1", "t2" ); ASM3( "divluw", "t1", "t1", scale ); ASM2( "convuuswb", "d1", "t1" ); if( !vips_vector_compile( v ) ) return( -1 ); #ifdef DEBUG vips_vector_print( v ); #endif /*DEBUG*/ return( 0 ); } static Conv * conv_new( IMAGE *in, IMAGE *out, INTMASK *mask ) { Conv *conv = IM_NEW( out, Conv ); const int n_mask = mask->xsize * mask->ysize; int i; if( !conv ) return( NULL ); conv->in = in; conv->out = out; conv->mask = NULL; conv->nnz = 0; conv->coeff = NULL; conv->coeff_pos = NULL; conv->underflow = 0; conv->overflow = 0; conv->n_pass = 0; conv->s1 = -1; conv->clip = NULL; if( im_add_close_callback( out, (im_callback_fn) conv_close, conv, NULL ) || im_add_close_callback( out, (im_callback_fn) conv_evalstart, conv, NULL ) || im_add_close_callback( out, (im_callback_fn) conv_evalend, conv, NULL ) || !(conv->coeff = IM_ARRAY( out, n_mask, int )) || !(conv->coeff_pos = IM_ARRAY( out, n_mask, int )) || !(conv->mask = im_dup_imask( mask, "conv_mask" )) ) return( NULL ); /* Find non-zero mask elements. */ for( i = 0; i < n_mask; i++ ) if( mask->coeff[i] ) { conv->coeff[conv->nnz] = mask->coeff[i]; conv->coeff_pos[conv->nnz] = i; conv->nnz += 1; } /* Was the whole mask zero? We must have at least 1 element in there: * set it to zero. */ if( conv->nnz == 0 ) { conv->coeff[0] = mask->coeff[0]; conv->coeff_pos[0] = 0; conv->nnz = 1; } /* Generate code for this mask / image, if possible. */ if( vips_vector_isenabled() ) { if( conv_compile_convolution_u8s16( conv ) || conv_compile_scale_s16u8( conv ) ) conv_vector_free( conv ); } return( conv ); } /* Our sequence value. */ typedef struct { Conv *conv; REGION *ir; /* Input region */ int *offsets; /* Offsets for each non-zero matrix element */ VipsPel **pts; /* Per-non-zero mask element pointers */ int underflow; /* Underflow/overflow counts */ int overflow; int last_bpl; /* Avoid recalcing offsets, if we can */ /* We need a pair of intermediate buffers to keep the results of each * conv pass in. */ void *t1; void *t2; } ConvSequence; /* Free a sequence value. */ static int conv_stop( void *vseq, void *a, void *b ) { ConvSequence *seq = (ConvSequence *) vseq; Conv *conv = (Conv *) b; /* Add local under/over counts to global counts. */ conv->overflow += seq->overflow; conv->underflow += seq->underflow; IM_FREEF( im_region_free, seq->ir ); IM_FREE( seq->t1 ); IM_FREE( seq->t2 ); return( 0 ); } /* Convolution start function. */ static void * conv_start( IMAGE *out, void *a, void *b ) { IMAGE *in = (IMAGE *) a; Conv *conv = (Conv *) b; ConvSequence *seq; if( !(seq = IM_NEW( out, ConvSequence )) ) return( NULL ); /* Init! */ seq->conv = conv; seq->ir = NULL; seq->pts = NULL; seq->underflow = 0; seq->overflow = 0; seq->last_bpl = -1; seq->t1 = NULL; seq->t2 = NULL; /* Attach region and arrays. */ seq->ir = im_region_create( in ); seq->offsets = IM_ARRAY( out, conv->nnz, int ); seq->pts = IM_ARRAY( out, conv->nnz, VipsPel * ); if( !seq->ir || !seq->offsets || !seq->pts ) { conv_stop( seq, in, conv ); return( NULL ); } if( vips_vector_isenabled() && conv->n_pass ) { seq->t1 = IM_ARRAY( NULL, IM_IMAGE_N_ELEMENTS( in ), short ); seq->t2 = IM_ARRAY( NULL, IM_IMAGE_N_ELEMENTS( in ), short ); if( !seq->t1 || !seq->t2 ) { conv_stop( seq, in, conv ); return( NULL ); } } return( seq ); } #define INNER { \ sum += t[i] * p[i][x]; \ i += 1; \ } /* INT inner loops. */ #define CONV_INT( TYPE, IM_CLIP ) { \ TYPE ** restrict p = (TYPE **) seq->pts; \ TYPE * restrict q = (TYPE *) IM_REGION_ADDR( or, le, y ); \ \ for( x = 0; x < sz; x++ ) { \ int sum; \ int i; \ \ sum = 0; \ i = 0; \ IM_UNROLL( conv->nnz, INNER ); \ \ sum = ((sum + rounding) / mask->scale) + mask->offset; \ \ IM_CLIP; \ \ q[x] = sum; \ } \ } /* FLOAT inner loops. */ #define CONV_FLOAT( TYPE ) { \ TYPE ** restrict p = (TYPE **) seq->pts; \ TYPE * restrict q = (TYPE *) IM_REGION_ADDR( or, le, y ); \ \ for( x = 0; x < sz; x++ ) { \ double sum; \ int i; \ \ sum = 0; \ i = 0; \ IM_UNROLL( conv->nnz, INNER ); \ \ sum = (sum / mask->scale) + mask->offset; \ \ q[x] = sum; \ } \ } /* Convolve! See below for the special-case 3x3 path. */ static int conv_gen( REGION *or, void *vseq, void *a, void *b ) { ConvSequence *seq = (ConvSequence *) vseq; IMAGE *in = (IMAGE *) a; Conv *conv = (Conv *) b; REGION *ir = seq->ir; INTMASK *mask = conv->mask; int * restrict t = conv->coeff; /* You might think this should be (scale + 1) / 2, but then we'd be * adding one for scale == 1. */ int rounding = mask->scale / 2; Rect *r = &or->valid; Rect s; int le = r->left; int to = r->top; int bo = IM_RECT_BOTTOM( r ); int sz = IM_REGION_N_ELEMENTS( or ) * (im_iscomplex( in ) ? 2 : 1); int x, y, z, i; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); VIPS_GATE_START( "conv_gen: work" ); /* Fill offset array. Only do this if the bpl has changed since the * previous im_prepare(). */ if( seq->last_bpl != IM_REGION_LSKIP( ir ) ) { seq->last_bpl = IM_REGION_LSKIP( ir ); for( i = 0; i < conv->nnz; i++ ) { z = conv->coeff_pos[i]; x = z % conv->mask->xsize; y = z / conv->mask->xsize; seq->offsets[i] = IM_REGION_ADDR( ir, x + le, y + to ) - IM_REGION_ADDR( ir, le, to ); } } for( y = to; y < bo; y++ ) { /* Init pts for this line of PELs. */ for( z = 0; z < conv->nnz; z++ ) seq->pts[z] = seq->offsets[z] + IM_REGION_ADDR( ir, le, y ); switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: CONV_INT( unsigned char, IM_CLIP_UCHAR( sum, seq ) ); break; case IM_BANDFMT_CHAR: CONV_INT( signed char, IM_CLIP_CHAR( sum, seq ) ); break; case IM_BANDFMT_USHORT: CONV_INT( unsigned short, IM_CLIP_USHORT( sum, seq ) ); break; case IM_BANDFMT_SHORT: CONV_INT( signed short, IM_CLIP_SHORT( sum, seq ) ); break; case IM_BANDFMT_UINT: CONV_INT( unsigned int, IM_CLIP_NONE( sum, seq ) ); break; case IM_BANDFMT_INT: CONV_INT( signed int, IM_CLIP_NONE( sum, seq ) ); break; case IM_BANDFMT_FLOAT: case IM_BANDFMT_COMPLEX: CONV_FLOAT( float ); break; case IM_BANDFMT_DOUBLE: case IM_BANDFMT_DPCOMPLEX: CONV_FLOAT( double ); break; default: g_assert( 0 ); } } VIPS_GATE_STOP( "conv_gen: work" ); return( 0 ); } /* INT inner loops. */ #define CONV3x3_INT( TYPE, IM_CLIP ) { \ TYPE * restrict p0 = (TYPE *) IM_REGION_ADDR( ir, le, y ); \ TYPE * restrict p1 = (TYPE *) IM_REGION_ADDR( ir, le, y + 1 ); \ TYPE * restrict p2 = (TYPE *) IM_REGION_ADDR( ir, le, y + 2 ); \ TYPE * restrict q = (TYPE *) IM_REGION_ADDR( or, le, y ); \ \ for( x = 0; x < sz; x++ ) { \ int sum; \ \ sum = 0; \ sum += m[0] * p0[0]; \ sum += m[1] * p0[bands]; \ sum += m[2] * p0[bands * 2]; \ sum += m[3] * p1[0]; \ sum += m[4] * p1[bands]; \ sum += m[5] * p1[bands * 2]; \ sum += m[6] * p2[0]; \ sum += m[7] * p2[bands]; \ sum += m[8] * p2[bands * 2]; \ \ p0 += 1; \ p1 += 1; \ p2 += 1; \ \ sum = ((sum + rounding) / mask->scale) + mask->offset; \ \ IM_CLIP; \ \ q[x] = sum; \ } \ } /* FLOAT inner loops. */ #define CONV3x3_FLOAT( TYPE ) { \ TYPE * restrict p0 = (TYPE *) IM_REGION_ADDR( ir, le, y ); \ TYPE * restrict p1 = (TYPE *) IM_REGION_ADDR( ir, le, y + 1 ); \ TYPE * restrict p2 = (TYPE *) IM_REGION_ADDR( ir, le, y + 2 ); \ TYPE * restrict q = (TYPE *) IM_REGION_ADDR( or, le, y ); \ \ for( x = 0; x < sz; x++ ) { \ double sum; \ \ sum = 0; \ sum += m[0] * p0[0]; \ sum += m[1] * p0[bands]; \ sum += m[2] * p0[bands * 2]; \ sum += m[3] * p1[0]; \ sum += m[4] * p1[bands]; \ sum += m[5] * p1[bands * 2]; \ sum += m[6] * p2[0]; \ sum += m[7] * p2[bands]; \ sum += m[8] * p2[bands * 2]; \ \ p0 += 1; \ p1 += 1; \ p2 += 1; \ \ sum = (sum / mask->scale) + mask->offset; \ \ q[x] = sum; \ } \ } /* 3x3 masks are very common, so we have a special path for them. This is * about 20% faster than the general convolver above. */ static int conv3x3_gen( REGION *or, void *vseq, void *a, void *b ) { ConvSequence *seq = (ConvSequence *) vseq; IMAGE *in = (IMAGE *) a; Conv *conv = (Conv *) b; REGION *ir = seq->ir; INTMASK *mask = conv->mask; int * restrict m = mask->coeff; /* You might think this should be (scale + 1) / 2, but then we'd be * adding one for scale == 1. */ int rounding = mask->scale / 2; Rect *r = &or->valid; int le = r->left; int to = r->top; int bo = IM_RECT_BOTTOM( r ); int sz = IM_REGION_N_ELEMENTS( or ) * (im_iscomplex( in ) ? 2 : 1); int bands = in->Bands; Rect s; int x, y; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += 2; s.height += 2; if( im_prepare( ir, &s ) ) return( -1 ); VIPS_GATE_START( "conv3x3_gen: work" ); for( y = to; y < bo; y++ ) { switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: CONV3x3_INT( unsigned char, IM_CLIP_UCHAR( sum, seq ) ); break; case IM_BANDFMT_CHAR: CONV3x3_INT( signed char, IM_CLIP_CHAR( sum, seq ) ); break; case IM_BANDFMT_USHORT: CONV3x3_INT( unsigned short, IM_CLIP_USHORT( sum, seq ) ); break; case IM_BANDFMT_SHORT: CONV3x3_INT( signed short, IM_CLIP_SHORT( sum, seq ) ); break; case IM_BANDFMT_UINT: CONV3x3_INT( unsigned int, IM_CLIP_NONE( sum, seq ) ); break; case IM_BANDFMT_INT: CONV3x3_INT( signed int, IM_CLIP_NONE( sum, seq ) ); break; case IM_BANDFMT_FLOAT: case IM_BANDFMT_COMPLEX: CONV3x3_FLOAT( float ); break; case IM_BANDFMT_DOUBLE: case IM_BANDFMT_DPCOMPLEX: CONV3x3_FLOAT( double ); break; default: g_assert( 0 ); } } VIPS_GATE_STOP( "conv3x3_gen: work" ); return( 0 ); } /* The VipsVector codepath. */ static int convvec_gen( REGION *or, void *vseq, void *a, void *b ) { ConvSequence *seq = (ConvSequence *) vseq; IMAGE *in = (IMAGE *) a; Conv *conv = (Conv *) b; INTMASK *mask = conv->mask; REGION *ir = seq->ir; Rect *r = &or->valid; int sz = IM_REGION_N_ELEMENTS( or ) * (im_iscomplex( in ) ? 2 : 1); Rect s; int j, y; VipsExecutor convolve[MAX_PASS]; VipsExecutor clip; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); VIPS_GATE_START( "convvec_gen: work" ); for( j = 0; j < conv->n_pass; j++ ) vips_executor_set_program( &convolve[j], conv->pass[j].vector, sz ); vips_executor_set_program( &clip, conv->clip, sz ); for( y = 0; y < r->height; y++ ) { #ifdef DEBUG_PIXELS { int h, v; printf( "before convolve: %d, %d\n", r->left, r->top + y ); for( v = 0; v < mask->ysize; v++ ) { for( h = 0; h < mask->xsize; h++ ) printf( "%3d ", *IM_REGION_ADDR( ir, r->left + h, r->top + y + v ) ); printf( "\n" ); } } #endif /*DEBUG_PIXELS*/ for( j = 0; j < conv->n_pass; j++ ) { /* We always read from t1 and write to t2. */ vips_executor_set_scanline( &convolve[j], ir, r->left, r->top + y ); vips_executor_set_array( &convolve[j], conv->pass[j].r, seq->t1 ); vips_executor_set_destination( &convolve[j], seq->t2 ); vips_executor_run( &convolve[j] ); IM_SWAP( void *, seq->t1, seq->t2 ); } #ifdef DEBUG_PIXELS printf( "before clip: %d\n", ((signed short *) seq->t1)[0] ); #endif /*DEBUG_PIXELS*/ vips_executor_set_array( &clip, conv->s1, seq->t1 ); vips_executor_set_destination( &clip, IM_REGION_ADDR( or, r->left, r->top + y ) ); vips_executor_run( &clip ); #ifdef DEBUG_PIXELS printf( "after clip: %d\n", *IM_REGION_ADDR( or, r->left, r->top + y ) ); #endif /*DEBUG_PIXELS*/ } VIPS_GATE_STOP( "convvec_gen: work" ); return( 0 ); } int im_conv_raw( IMAGE *in, IMAGE *out, INTMASK *mask ) { Conv *conv; im_generate_fn generate; #ifdef DEBUG printf( "im_conv_raw: starting with matrix:\n" ); im_print_imask( mask ); #endif /*DEBUG*/ /* Check parameters. */ if( im_piocheck( in, out ) || im_check_uncoded( "im_conv", in ) || im_check_imask( "im_conv", mask ) ) return( -1 ); if( mask->scale == 0 ) { im_error( "im_conv", "%s", "mask scale must be non-zero" ); return( -1 ); } if( !(conv = conv_new( in, out, mask )) ) return( -1 ); /* Prepare output. Consider a 7x7 mask and a 7x7 image --- the output * would be 1x1. */ if( im_cp_desc( out, in ) ) return( -1 ); out->Xsize -= mask->xsize - 1; out->Ysize -= mask->ysize - 1; if( out->Xsize <= 0 || out->Ysize <= 0 ) { im_error( "im_conv", "%s", _( "image too small for mask" ) ); return( -1 ); } if( conv->n_pass ) { generate = convvec_gen; #ifdef DEBUG printf( "im_conv_raw: using vector path\n" ); #endif /*DEBUG*/ } else if( mask->xsize == 3 && mask->ysize == 3 ) { generate = conv3x3_gen; #ifdef DEBUG printf( "im_conv_raw: using 3x3 path\n" ); #endif /*DEBUG*/ } else { generate = conv_gen; #ifdef DEBUG printf( "im_conv_raw: using general path\n" ); #endif /*DEBUG*/ } if( im_demand_hint( out, IM_SMALLTILE, in, NULL ) || im_generate( out, conv_start, generate, conv_stop, in, conv ) ) return( -1 ); out->Xoffset = -mask->xsize / 2; out->Yoffset = -mask->ysize / 2; return( 0 ); } int im_conv( IMAGE *in, IMAGE *out, INTMASK *mask ) { IMAGE *t1 = im_open_local( out, "im_conv intermediate", "p" ); if( !t1 || im_embed( in, t1, 1, mask->xsize / 2, mask->ysize / 2, in->Xsize + mask->xsize - 1, in->Ysize + mask->ysize - 1 ) || im_conv_raw( t1, out, mask ) ) return( -1 ); out->Xoffset = 0; out->Yoffset = 0; return( 0 ); } vips-7.38.5/libvips/convolution/correlation.c0000644000175000017500000001117212303140253016227 00000000000000/* base class for correlation * * 7/11/13 * - from convolution.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "pconvolution.h" #include "correlation.h" G_DEFINE_ABSTRACT_TYPE( VipsCorrelation, vips_correlation, VIPS_TYPE_OPERATION ); static int vips_correlation_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsCorrelation *correlation = (VipsCorrelation *) b; VipsCorrelationClass *cclass = VIPS_CORRELATION_GET_CLASS( correlation ); VipsRect *r = &or->valid; VipsRect irect; /* What part of ir do we need? */ irect.left = r->left; irect.top = r->top; irect.width = r->width + correlation->ref_ready->Xsize - 1; irect.height = r->height + correlation->ref_ready->Ysize - 1; if( vips_region_prepare( ir, &irect ) ) return( -1 ); cclass->correlation( correlation, ir, or ); return( 0 ); } static int vips_correlation_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsCorrelationClass *cclass = VIPS_CORRELATION_CLASS( class ); VipsCorrelation *correlation = (VipsCorrelation *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 ); if( VIPS_OBJECT_CLASS( vips_correlation_parent_class )-> build( object ) ) return( -1 ); /* Stretch input out. */ if( vips_embed( correlation->in, &t[0], correlation->ref->Xsize / 2, correlation->ref->Ysize / 2, correlation->in->Xsize + correlation->ref->Xsize - 1, correlation->in->Ysize + correlation->ref->Ysize - 1, "extend", VIPS_EXTEND_COPY, NULL ) || vips__formatalike( t[0], correlation->ref, &t[1], &t[2] ) || vips__bandalike( class->nickname, t[1], t[2], &t[3], &t[4] ) || vips_image_wio_input( t[4] ) ) return( -1 ); correlation->in_ready = t[3]; correlation->ref_ready = t[4]; g_object_set( object, "out", vips_image_new(), NULL ); /* FATSTRIP is good for us as THINSTRIP will cause * too many recalculations on overlaps. */ if( vips_image_pipelinev( correlation->out, VIPS_DEMAND_STYLE_FATSTRIP, correlation->in_ready, correlation->ref_ready, NULL ) ) return( -1 ); correlation->out->Xsize = correlation->in->Xsize; correlation->out->Ysize = correlation->in->Ysize; correlation->out->BandFmt = cclass->format_table[correlation->in_ready->BandFmt]; if( cclass->pre_generate && cclass->pre_generate( correlation ) ) return( -1 ); if( vips_image_generate( correlation->out, vips_start_one, vips_correlation_gen, vips_stop_one, correlation->in_ready, correlation ) ) return( -1 ); return( 0 ); } static void vips_correlation_class_init( VipsCorrelationClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "correlation"; object_class->description = _( "correlation operation" ); object_class->build = vips_correlation_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsCorrelation, in ) ); VIPS_ARG_IMAGE( class, "ref", 10, _( "Mask" ), _( "Input reference image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsCorrelation, ref ) ); VIPS_ARG_IMAGE( class, "out", 20, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsCorrelation, out ) ); } static void vips_correlation_init( VipsCorrelation *correlation ) { } vips-7.38.5/libvips/convolution/compass.c0000644000175000017500000001231112303141142015345 00000000000000/* repeatedly convolve with a rotating mask * * 23/10/13 * - from vips_conv() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pconvolution.h" typedef struct { VipsConvolution parent_instance; int times; VipsAngle45 angle; VipsCombine combine; VipsPrecision precision; int layers; int cluster; } VipsCompass; typedef VipsConvolutionClass VipsCompassClass; G_DEFINE_TYPE( VipsCompass, vips_compass, VIPS_TYPE_CONVOLUTION ); static int vips_compass_build( VipsObject *object ) { VipsConvolution *convolution = (VipsConvolution *) object; VipsCompass *compass = (VipsCompass *) object; VipsImage **masks; VipsImage *mask; VipsImage **images; int i; VipsImage **abs; VipsImage **combine; VipsImage *x; g_object_set( compass, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_compass_parent_class )->build( object ) ) return( -1 ); masks = (VipsImage **) vips_object_local_array( object, compass->times ); images = (VipsImage **) vips_object_local_array( object, compass->times ); abs = (VipsImage **) vips_object_local_array( object, compass->times ); combine = (VipsImage **) vips_object_local_array( object, compass->times ); mask = convolution->M; for( i = 0; i < compass->times; i++ ) { if( vips_conv( convolution->in, &images[i], mask, "precision", compass->precision, "layers", compass->layers, "cluster", compass->cluster, NULL ) ) return( -1 ); if( vips_rot45( mask, &masks[i], "angle", compass->angle, NULL ) ) return( -1 ); mask = masks[i]; } for( i = 0; i < compass->times; i++ ) if( vips_abs( images[i], &abs[i], NULL ) ) return( -1 ); switch( compass->combine ) { case VIPS_COMBINE_MAX: if( vips_bandrank( abs, &combine[0], compass->times, "index", compass->times - 1, NULL ) ) return( -1 ); x = combine[0]; break; case VIPS_COMBINE_SUM: x = abs[0]; for( i = 1; i < compass->times; i++ ) { if( vips_add( x, abs[i], &combine[i], NULL ) ) return( -1 ); x = combine[i]; } break; default: g_assert( 0 ); } if( vips_image_write( x, convolution->out ) ) return( -1 ); return( 0 ); } static void vips_compass_class_init( VipsCompassClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "compass"; object_class->description = _( "convolution operation" ); object_class->build = vips_compass_build; VIPS_ARG_INT( class, "times", 101, _( "Times" ), _( "Rotate and convolve this many times" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCompass, times ), 1, 1000, 2 ); VIPS_ARG_ENUM( class, "angle", 103, _( "Angle" ), _( "Rotate mask by this much between convolutions" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCompass, angle ), VIPS_TYPE_ANGLE45, VIPS_ANGLE45_90 ); VIPS_ARG_ENUM( class, "combine", 104, _( "Combine" ), _( "Combine convolution results like this" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCompass, combine ), VIPS_TYPE_COMBINE, VIPS_COMBINE_MAX ); VIPS_ARG_ENUM( class, "precision", 203, _( "Precision" ), _( "Convolve with this precision" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCompass, precision ), VIPS_TYPE_PRECISION, VIPS_PRECISION_INTEGER ); VIPS_ARG_INT( class, "layers", 204, _( "Layers" ), _( "Use this many layers in approximation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCompass, layers ), 1, 1000, 5 ); VIPS_ARG_INT( class, "cluster", 205, _( "Cluster" ), _( "Cluster lines closer than this in approximation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsCompass, cluster ), 1, 100, 1 ); } static void vips_compass_init( VipsCompass *compass ) { compass->times = 2; compass->angle = VIPS_ANGLE45_90; compass->combine = VIPS_COMBINE_MAX; compass->precision = VIPS_PRECISION_INTEGER; compass->layers = 5; compass->cluster = 1; } int vips_compass( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) { va_list ap; int result; va_start( ap, mask ); result = vips_call_split( "compass", ap, in, out, mask ); va_end( ap ); return( result ); } vips-7.38.5/libvips/convolution/sharpen.c0000644000175000017500000002651312303141142015351 00000000000000/* Cored sharpen of LABQ image. * * Usage: * * int im_sharpen( IMAGE *in, IMAGE *out, * int mask_size, * int x1, int x2, * double m1, double m2 ) * * Returns 0 on success and -1 on error * * Copyright: 1995 A. Abbood * Author: A. Abbood * Written on: 30/01/1995 * 15/5/95 JC * - updated for latest 7.3 mods * - m3 parameter removed * - bug fixes and speed-ups * 4/7/95 JC * - x3 parameter added * - xs are now double * 6/7/95 JC * - xs are now ys * - better LUT generation * 12/3/01 JC * - uses seperable convolution for umask * - tiny clean ups * 23/7/01 JC * - fix for band extract index changed * 21/4/04 * - switched to gaussian mask and radius * 20/11/04 * - uses extract_bands() to remove and reattach ab for slight speedup * - accepts LabS as well as LabQ for slight speedup * - small code tidies * - ~15% speed up in total * 29/11/06 * - convolve first to help region sharing * 3/2/10 * - gtkdoc * - cleanups * 13/11/13 * - redo as a class * - does any type, any number of bands */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include typedef struct _VipsSharpen { VipsOperation parent_instance; VipsImage *in; VipsImage *out; int radius; double x1; double y2; double y3; double m1; double m2; double x2; double x3; /* Parameters scaled up to int. * * We need indexes in the range [-x3,x2], so add x3 to * indexes before starting to index table. */ int ix1; int ix2; int ix3; /* The lut we build. */ int *lut; } VipsSharpen; typedef VipsOperationClass VipsSharpenClass; G_DEFINE_TYPE( VipsSharpen, vips_sharpen, VIPS_TYPE_OPERATION ); static int vips_sharpen_generate( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsRegion **in = (VipsRegion **) vseq; VipsSharpen *sharpen = (VipsSharpen *) b; VipsRect *r = &or->valid; int ix3 = sharpen->ix3; int range = sharpen->ix2 + sharpen->ix3; int *lut = sharpen->lut; int x, y; if( vips_region_prepare( in[0], r ) || vips_region_prepare( in[1], r ) ) return( -1 ); VIPS_GATE_START( "vips_sharpen_generate: work" ); for( y = 0; y < r->height; y++ ) { short *p1 = (short *) VIPS_REGION_ADDR( in[0], r->left, r->top + y ); short *p2 = (short *) VIPS_REGION_ADDR( in[1], r->left, r->top + y ); short *q = (short *) VIPS_REGION_ADDR( or, r->left, r->top + y ); for( x = 0; x < r->width; x++ ) { int v1 = p1[x]; int v2 = p2[x]; /* v2 is the area average. If this is zero, then we * pass the original image through unaltered. */ if( v2 == 0 ) q[x] = v1; else { /* Find difference. Offset by x3 to get the * expected range of values. */ int s1 = ix3 + (v1 - v2); int s2; if( s1 < 0 ) s1 = 0; else if( s1 > range ) s1 = range; s2 = v1 + lut[s1]; if( s2 < 0 ) s2 = 0; else if( s2 > 32767 ) s2 = 32767; q[x] = s2; } } } VIPS_GATE_STOP( "vips_sharpen_generate: work" ); return( 0 ); } static int vips_sharpen_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsSharpen *sharpen = (VipsSharpen *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 7 ); VipsImage **args = (VipsImage **) vips_object_local_array( object, 2 ); VipsImage *in; int ix1, ix2, ix3; int i; VIPS_GATE_START( "vips_sharpen_build: build" ); if( VIPS_OBJECT_CLASS( vips_sharpen_parent_class )->build( object ) ) return( -1 ); /* Turn y parameters into xs. */ sharpen->x2 = (sharpen->y2 - sharpen->x1 * (sharpen->m1 - sharpen->m2)) / sharpen->m2; sharpen->x3 = (sharpen->y3 - sharpen->x1 * (sharpen->m1 - sharpen->m2)) / sharpen->m2; in = sharpen->in; if( vips_colourspace( in, &t[0], VIPS_INTERPRETATION_LABS, NULL ) ) return( -1 ); in = t[0]; if( vips_check_uncoded( class->nickname, in ) || vips_check_bands_atleast( class->nickname, in, 3 ) || vips_check_format( class->nickname, in, VIPS_FORMAT_SHORT ) ) return( -1 ); if( sharpen->x1 < 0 || sharpen->x1 > 99 || sharpen->x2 < 0 || sharpen->x2 > 99 || sharpen->x1 > sharpen->x2 || sharpen->x3 < 0 || sharpen->x3 > 99 || sharpen->x1 > sharpen->x3 ) { vips_error( class->nickname, "%s", _( "parameters out of range" ) ); return( -1 ); } /* Stop at 20% of max ... bit mean, but means mask radius is roughly * right. We always sharpen a short, so no point using a float mask. */ if( vips_gaussmat( &t[1], 1 + sharpen->radius / 2, 0.2, "separable", TRUE, "integer", TRUE, NULL ) ) return( -1 ); #ifdef DEBUG printf( "sharpen: blurring with:\n" ); vips_matrixprint( t[1], NULL ); #endif /*DEBUG*/ /* Build the int lut. */ sharpen->ix1 = ix1 = sharpen->x1 * 327.67; sharpen->ix2 = ix2 = sharpen->x2 * 327.67; sharpen->ix3 = ix3 = sharpen->x3 * 327.67; if( !(sharpen->lut = VIPS_ARRAY( sharpen->out, ix2 + ix3 + 1, int )) ) return( -1 ); for( i = 0; i < ix1; i++ ) { sharpen->lut[ix3 + i] = i * sharpen->m1; sharpen->lut[ix3 - i] = -i * sharpen->m1; } for( i = ix1; i <= ix2; i++ ) sharpen->lut[ix3 + i] = ix1 * sharpen->m1 + (i - ix1) * sharpen->m2; for( i = ix1; i <= ix3; i++ ) sharpen->lut[ix3 - i] = -(ix1 * sharpen->m1 + (i - ix1) * sharpen->m2); /* Extract L and the rest, convolve L. */ if( vips_extract_band( in, &args[0], 0, NULL ) || vips_extract_band( in, &t[3], 1, "n", in->Bands - 1, NULL ) || vips_convsep( args[0], &args[1], t[1], NULL ) ) return( -1 ); /* Set demand hints. FATSTRIP is good for us, as THINSTRIP will cause * too many recalculations on overlaps. */ t[5] = vips_image_new(); if( vips_image_pipeline_array( t[5], VIPS_DEMAND_STYLE_FATSTRIP, args ) ) return( -1 ); if( vips_image_generate( t[5], vips_start_many, vips_sharpen_generate, vips_stop_many, args, sharpen ) ) return( -1 ); g_object_set( object, "out", vips_image_new(), NULL ); /* Reattach the rest. */ if( vips_bandjoin2( t[5], t[3], &t[6], NULL ) || vips_image_write( t[6], sharpen->out ) ) return( -1 ); VIPS_GATE_STOP( "vips_sharpen_build: build" ); return( 0 ); } static void vips_sharpen_class_init( VipsSharpenClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "sharpen"; object_class->description = _( "Unsharp masking for print" ); object_class->build = vips_sharpen_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsSharpen, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsSharpen, out ) ); VIPS_ARG_INT( class, "radius", 3, _( "Radius" ), _( "Mask radius" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSharpen, radius ), 1, 1000000, 3 ); VIPS_ARG_DOUBLE( class, "x1", 5, _( "x1" ), _( "Flat/jaggy threshold" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSharpen, x1 ), 1, 1000000, 1.5 ); VIPS_ARG_DOUBLE( class, "y2", 6, _( "y2" ), _( "Maximum brightening" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSharpen, y2 ), 1, 1000000, 20 ); VIPS_ARG_DOUBLE( class, "y3", 7, _( "y3" ), _( "Maximum darkening" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSharpen, y3 ), 1, 1000000, 50 ); VIPS_ARG_DOUBLE( class, "m1", 8, _( "m1" ), _( "Slope for flat areas" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSharpen, m1 ), 0, 1000000, 1 ); VIPS_ARG_DOUBLE( class, "m2", 9, _( "m2" ), _( "Slope for jaggy areas" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSharpen, m2 ), 0, 1000000, 2 ); } static void vips_sharpen_init( VipsSharpen *sharpen ) { sharpen->radius = 3; sharpen->x1 = 1.5; sharpen->y2 = 20; sharpen->y3 = 50; sharpen->m1 = 1; sharpen->m2 = 2; } /** * vips_sharpen: * @in: input image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @radius: how large a mask to use * @x1: flat/jaggy threshold * @y2: maximum amount of brightening * @y3: maximum amount of darkening * @m1: slope for flat areas * @m2: slope for jaggy areas * * Selectively sharpen the L channel of a LAB image. The input image is * transformed to #VIPS_INTERPRETATION_LABS. * * The operation performs a gaussian blur of radius @radius and subtracts * from @in to generate a high-frequency signal. This signal is passed * through a lookup table formed from the five parameters and added back to * @in. * * The lookup table is formed like this: * * |[ ^ y2 |- - - - - ----------- | / | / slope m2 | .../ -x1 | ... | -------------------...----------------------> | ... | x1 |... slope m1 / | / m2 | / | / | / | / | ______/ _ _ _ _ _ _ | -y3 | * ]| * * For printing, we recommend the following settings (the defaults): * * |[ radius == 3 x1 == 1.5 y2 == 20 (don't brighten by more than 20 L*) y3 == 50 (can darken by up to 50 L*) m1 == 1 (some sharpening in flat areas) m2 == 2 (more sharpening in jaggy areas) * ]| * * If you want more or less sharpening, we suggest you just change the m1 * and m2 parameters. * * The @radius parameter changes the width of the fringe and can be * adjusted according to the output printing resolution. As an approximate * guideline, use 1 for 4 pixels/mm (CRT display resolution), 2 for 8 * pixels/mm, 3 for 12 pixels/mm and 4 for 16 pixels/mm (300 dpi == 12 * pixels/mm). These figures refer to the image raster, not the half-tone * resolution. * * See also: im_conv(). * * Returns: 0 on success, -1 on error. */ int vips_sharpen( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "sharpen", ap, in, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/convolution/spcor.c0000644000175000017500000002147512303140253015043 00000000000000/* spcor * * Copyright: 1990, N. Dessipris; 2006, 2007 Nottingham Trent University. * * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on : * 20/2/95 JC * - updated * - ANSIfied, a little * 21/2/95 JC * - rewritten * - partialed * - speed-ups * - new correlation coefficient (see above), from Niblack "An * Introduction to Digital Image Processing", Prentice/Hall, pp 138. * 4/9/97 JC * - now does short/ushort as well * 13/2/03 JC * - oops, could segv for short images * 14/4/04 JC * - sets Xoffset / Yoffset * 8/3/06 JC * - use im_embed() with edge stretching on the input, not the output * * 2006-10-24 tcv * - add im_spcor2 * * 2007-11-12 tcv * - make im_spcor a wrapper selecting either im__spcor or im__spcor2 * 2008-09-09 JC * - roll back the windowed version for now, it has some tile edge effects * 3/2/10 * - gtkdoc * - cleanups * 7/11/13 * - redone as a class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "pconvolution.h" #include "correlation.h" typedef struct _VipsSpcor { VipsCorrelation parent_instance; /* Per-band mean of ref images. */ double *rmean; /* Per band sqrt(sumij (ref(i,j)-mean(ref))^2) */ double *c1; } VipsSpcor; typedef VipsCorrelationClass VipsSpcorClass; G_DEFINE_TYPE( VipsSpcor, vips_spcor, VIPS_TYPE_CORRELATION ); static int vips_spcor_pre_generate( VipsCorrelation *correlation ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( correlation ); VipsSpcor *spcor = (VipsSpcor *) correlation; VipsImage *ref = correlation->ref_ready; int bands = ref->Bands; VipsImage **b = (VipsImage **) vips_object_local_array( VIPS_OBJECT( spcor ), bands ); VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( spcor ), 2 ); VipsImage **b2 = (VipsImage **) vips_object_local_array( VIPS_OBJECT( spcor ), bands ); int i; double *offset; double *scale; if( vips_check_noncomplex( class->nickname, ref ) ) return( -1 ); /* Per-band mean. */ if( !(spcor->rmean = VIPS_ARRAY( spcor, bands, double )) || !(spcor->c1 = VIPS_ARRAY( spcor, bands, double )) ) return( -1 ); for( i = 0; i < bands; i++ ) if( vips_extract_band( ref, &b[i], i, NULL ) || vips_avg( b[i], &spcor->rmean[i], NULL ) ) return( -1 ); /* Per band sqrt(sumij (ref(i,j)-mean(ref))^2) */ if( !(offset = VIPS_ARRAY( spcor, bands, double )) || !(scale = VIPS_ARRAY( spcor, bands, double )) ) return( -1 ); for( i = 0; i < bands; i++ ) { offset[i] = -spcor->rmean[i]; scale[i] = 1.0; } if( vips_linear( ref, &t[0], scale, offset, bands, NULL ) || vips_multiply( t[0], t[0], &t[1], NULL ) ) return( -1 ); for( i = 0; i < bands; i++ ) if( vips_extract_band( t[1], &b2[i], i, NULL ) || vips_avg( b2[i], &spcor->c1[i], NULL ) ) return( -1 ); for( i = 0; i < bands; i++ ) { spcor->c1[i] *= ref->Xsize * ref->Ysize; spcor->c1[i] = sqrt( spcor->c1[i] ); } return( 0 ); } #define LOOP( IN ) { \ IN *r1 = ((IN *) ref->data) + b; \ IN *p1 = ((IN *) p) + b; \ int in_lsk = lsk / sizeof( IN ); \ IN *r1a; \ IN *p1a; \ \ /* Mean of area of in corresponding to ref. \ */ \ p1a = p1; \ sum1 = 0.0; \ for( j = 0; j < ref->Ysize; j++ ) { \ for( i = 0; i < sz; i += bands ) \ sum1 += p1a[i]; \ p1a += in_lsk; \ } \ imean = sum1 / VIPS_IMAGE_N_PELS( ref ); \ \ /* Calculate sum-of-squares-of-differences for this window on \ * in, and also sum-of-products-of-differences from mean. \ */ \ p1a = p1; \ r1a = r1; \ sum2 = 0.0; \ sum3 = 0.0; \ for( j = 0; j < ref->Ysize; j++ ) { \ for( i = 0; i < sz; i += bands ) { \ /* Reference pel, and input pel. \ */ \ IN ip = p1a[i]; \ IN rp = r1a[i]; \ \ /* Accumulate sum-of-squares-of- \ * differences for input image. \ */ \ double t = ip - imean; \ sum2 += t * t; \ \ /* Accumulate product-of-difference from mean. \ */ \ sum3 += (rp - spcor->rmean[b]) * (ip - imean); \ } \ \ p1a += in_lsk; \ r1a += sz; \ } \ } static void vips_spcor_correlation( VipsCorrelation *correlation, VipsRegion *in, VipsRegion *out ) { VipsSpcor *spcor = (VipsSpcor *) correlation; VipsRect *r = &out->valid; VipsImage *ref = correlation->ref_ready; int bands = vips_band_format_iscomplex( ref->BandFmt ) ? ref->Bands * 2 : ref->Bands; int sz = ref->Xsize * bands; int lsk = VIPS_REGION_LSKIP( in ); int x, y, b, j, i; double imean; double sum1; double sum2, sum3; double c2, cc; for( y = 0; y < r->height; y++ ) { float *q = (float *) VIPS_REGION_ADDR( out, r->left, r->top + y ); for( x = 0; x < r->width; x++ ) { VipsPel *p = VIPS_REGION_ADDR( in, r->left + x, r->top + y ); for( b = 0; b < bands; b++ ) { switch( vips_image_get_format( ref ) ) { case VIPS_FORMAT_UCHAR: LOOP( unsigned char ); break; case VIPS_FORMAT_CHAR: LOOP( signed char ); break; case VIPS_FORMAT_USHORT: LOOP( unsigned short ); break; case VIPS_FORMAT_SHORT: LOOP( signed short ); break; case VIPS_FORMAT_UINT: LOOP( unsigned int ); break; case VIPS_FORMAT_INT: LOOP( signed int ); break; case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_COMPLEX: LOOP( float ); break; case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DPCOMPLEX: LOOP( double ); break; default: g_assert( 0 ); } c2 = sqrt( sum2 ); cc = sum3 / (spcor->c1[b] * c2); *q++ = cc; } } } } /* Save a bit of typing. */ #define UC VIPS_FORMAT_UCHAR #define C VIPS_FORMAT_CHAR #define US VIPS_FORMAT_USHORT #define S VIPS_FORMAT_SHORT #define UI VIPS_FORMAT_UINT #define I VIPS_FORMAT_INT #define F VIPS_FORMAT_FLOAT #define X VIPS_FORMAT_COMPLEX #define D VIPS_FORMAT_DOUBLE #define DX VIPS_FORMAT_DPCOMPLEX static int vips_spcor_format_table[10] = { /* UC C US S UI I F X D DX */ F, F, F, F, F, F, F, F, F, F }; static void vips_spcor_class_init( VipsSpcorClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsCorrelationClass *cclass = VIPS_CORRELATION_CLASS( class ); object_class->nickname = "spcor"; object_class->description = _( "spatial correlation" ); cclass->format_table = vips_spcor_format_table; cclass->pre_generate = vips_spcor_pre_generate; cclass->correlation = vips_spcor_correlation; } static void vips_spcor_init( VipsSpcor *spcor ) { } /** * vips_spcor: * @in: input image * @ref: reference image * @out: output image * @...: %NULL-terminated list of optional named arguments * * Calculate a correlation surface. * * @ref is placed at every position in @in and the correlation coefficient * calculated. The output * image is always float. * * The output * image is the same size as the input. Extra input edge pixels are made by * copying the existing edges outwards. * * The correlation coefficient is calculated as: * * |[ * sumij (ref(i,j)-mean(ref))(inkl(i,j)-mean(inkl)) * c(k,l) = ------------------------------------------------ * sqrt(sumij (ref(i,j)-mean(ref))^2) * * sqrt(sumij (inkl(i,j)-mean(inkl))^2) * ]| * * where inkl is the area of @in centred at position (k,l). * * from Niblack "An Introduction to Digital Image Processing", * Prentice/Hall, pp 138. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The output image is always float, unless either of the two inputs is * double, in which case the output is also double. * * See also: vips_gradcor(), vips_fastcor(). * * Returns: 0 on success, -1 on error */ int vips_spcor( VipsImage *in, VipsImage *ref, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "spcor", ap, in, ref, out ); va_end( ap ); return( result ); } vips-7.38.5/libvips/convolution/Makefile.in0000644000175000017500000005322712303144055015622 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/convolution DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libconvolution_la_LIBADD = am_libconvolution_la_OBJECTS = convolution.lo correlation.lo conv.lo \ convsep.lo compass.lo fastcor.lo spcor.lo sharpen.lo \ gaussblur.lo im_aconv.lo im_aconvsep.lo im_conv.lo \ im_conv_f.lo libconvolution_la_OBJECTS = $(am_libconvolution_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libconvolution_la_SOURCES) DIST_SOURCES = $(libconvolution_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libconvolution.la libconvolution_la_SOURCES = \ convolution.c \ pconvolution.h \ correlation.c \ correlation.h \ conv.c \ convsep.c \ compass.c \ fastcor.c \ spcor.c \ sharpen.c \ gaussblur.c \ im_aconv.c \ im_aconvsep.c \ im_conv.c \ im_conv_f.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/convolution/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/convolution/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libconvolution.la: $(libconvolution_la_OBJECTS) $(libconvolution_la_DEPENDENCIES) $(EXTRA_libconvolution_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libconvolution_la_OBJECTS) $(libconvolution_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convolution.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convsep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/correlation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fastcor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaussblur.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_aconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_aconvsep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_conv_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sharpen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spcor.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/convolution/Makefile.am0000644000175000017500000000055312303140253015577 00000000000000noinst_LTLIBRARIES = libconvolution.la libconvolution_la_SOURCES = \ convolution.c \ pconvolution.h \ correlation.c \ correlation.h \ conv.c \ convsep.c \ compass.c \ fastcor.c \ spcor.c \ sharpen.c \ gaussblur.c \ im_aconv.c \ im_aconvsep.c \ im_conv.c \ im_conv_f.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/convolution/im_aconvsep.c0000644000175000017500000004671312303140253016222 00000000000000/* im_aconvsep ... separable approximate convolution * * This operation does an approximate, seperable convolution. * * Author: John Cupitt & Nicolas Robidoux * Written on: 31/5/11 * Modified on: * 31/5/11 * - from im_conv() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* See: http://incubator.quasimondo.com/processing/stackblur.pde This thing is a little like stackblur, but generalised to any separable mask. */ /* TODO - are we handling mask offset correctly? */ /* Show sample pixels as they are transformed. #define DEBUG_PIXELS */ /* #define DEBUG #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include /* Maximum number of lines we can break the mask into. */ #define MAX_LINES (1000) /* Euclid's algorithm. Use this to common up mults. */ static int gcd( int a, int b ) { if( b == 0 ) return( abs( a ) ); else return( gcd( b, a % b ) ); } /* A set of lines. */ typedef struct _Lines { /* Copy of our arguments. */ IMAGE *in; IMAGE *out; DOUBLEMASK *mask; int n_layers; int area; int rounding; /* Start is the left-most pixel in the line, end is one beyond the * right-most pixel. */ int n_lines; int start[MAX_LINES]; int end[MAX_LINES]; int factor[MAX_LINES]; } Lines; static void lines_start( Lines *lines, int x, int factor ) { lines->start[lines->n_lines] = x; lines->factor[lines->n_lines] = factor; } static int lines_end( Lines *lines, int x ) { lines->end[lines->n_lines] = x; if( lines->n_lines >= MAX_LINES - 1 ) { vips_error( "im_aconvsep", "%s", _( "mask too complex" ) ); return( -1 ); } lines->n_lines += 1; return( 0 ); } /* Break a mask into lines. */ static Lines * lines_new( IMAGE *in, IMAGE *out, DOUBLEMASK *mask, int n_layers ) { const int width = mask->xsize * mask->ysize; Lines *lines; double max; double min; double depth; double sum; int layers_above; int layers_below; int z, n, x; /* Check parameters. */ if( im_piocheck( in, out ) || im_check_uncoded( "im_aconvsep", in ) || vips_check_dmask_1d( "im_aconvsep", mask ) ) return( NULL ); lines = VIPS_NEW( out, Lines ); lines->in = in; lines->out = out; if( !(lines->mask = (DOUBLEMASK *) im_local( out, (im_construct_fn) im_dup_dmask, (im_callback_fn) im_free_dmask, mask, mask->filename, NULL )) ) return( NULL ); lines->n_layers = n_layers; lines->n_lines = 0; VIPS_DEBUG_MSG( "lines_new: breaking into %d layers ...\n", n_layers ); /* Find mask range. We must always include the zero axis in the mask. */ max = 0; min = 0; for( x = 0; x < width; x++ ) { if( mask->coeff[x] > max ) max = mask->coeff[x]; if( mask->coeff[x] < min ) min = mask->coeff[x]; } /* The zero axis must fall on a layer boundary. Estimate the * depth, find n-lines-above-zero, get exact depth, then calculate a * fixed n-lines which includes any negative parts. */ depth = (max - min) / n_layers; layers_above = ceil( max / depth ); depth = max / layers_above; layers_below = floor( min / depth ); n_layers = layers_above - layers_below; VIPS_DEBUG_MSG( "depth = %g, n_layers = %d\n", depth, n_layers ); /* For each layer, generate a set of lines which are inside the * perimeter. Work down from the top. */ for( z = 0; z < n_layers; z++ ) { double y = max - (1 + z) * depth; /* y plus half depth ... ie. the layer midpoint. */ double y_ph = y + depth / 2; /* Odd, but we must avoid rounding errors that make us miss 0 * in the line above. */ int y_positive = z < layers_above; int inside; /* Start outside the perimeter. */ inside = 0; for( x = 0; x < width; x++ ) { /* The vertical line from mask[z] to 0 is inside. Is * our current square (x, y) part of that line? */ if( (y_positive && mask->coeff[x] >= y_ph) || (!y_positive && mask->coeff[x] <= y_ph) ) { if( !inside ) { lines_start( lines, x, y_positive ? 1 : -1 ); inside = 1; } } else { if( inside ) { if( lines_end( lines, x ) ) return( NULL ); inside = 0; } } } if( inside && lines_end( lines, width ) ) return( NULL ); } /* Can we common up any lines? Search for lines with identical * start/end. */ for( z = 0; z < lines->n_lines; z++ ) { for( n = z + 1; n < lines->n_lines; n++ ) { if( lines->start[z] == lines->start[n] && lines->end[z] == lines->end[n] ) { lines->factor[z] += lines->factor[n]; /* n can be deleted. Do this in a separate * pass below. */ lines->factor[n] = 0; } } } /* Now we can remove all factor 0 lines. */ for( z = 0; z < lines->n_lines; z++ ) { if( lines->factor[z] == 0 ) { for( x = z; x < lines->n_lines; x++ ) { lines->start[x] = lines->start[x + 1]; lines->end[x] = lines->end[x + 1]; lines->factor[x] = lines->factor[x + 1]; } lines->n_lines -= 1; } } /* Find the area of the lines. */ lines->area = 0; for( z = 0; z < lines->n_lines; z++ ) lines->area += lines->factor[z] * (lines->end[z] - lines->start[z]); /* Strength reduction: if all lines are divisible by n, we can move * that n out into the ->area factor. The aim is to produce as many * factor 1 lines as we can and to reduce the chance of overflow. */ x = lines->factor[0]; for( z = 1; z < lines->n_lines; z++ ) x = gcd( x, lines->factor[z] ); for( z = 0; z < lines->n_lines; z++ ) lines->factor[z] /= x; lines->area *= x; /* Find the area of the original mask. */ sum = 0; for( z = 0; z < width; z++ ) sum += mask->coeff[z]; lines->area = rint( sum * lines->area / mask->scale ); lines->rounding = (lines->area + 1) / 2 + mask->offset * lines->area; /* ASCII-art layer drawing. printf( "lines:\n" ); for( z = 0; z < lines->n_lines; z++ ) { printf( "%3d - %2d x ", z, lines->factor[z] ); for( x = 0; x < 55; x++ ) { int rx = x * (width + 1) / 55; if( rx >= lines->start[z] && rx < lines->end[z] ) printf( "#" ); else printf( " " ); } printf( " %3d .. %3d\n", lines->start[z], lines->end[z] ); } printf( "area = %d\n", lines->area ); printf( "rounding = %d\n", lines->rounding ); */ return( lines ); } /* Our sequence value. */ typedef struct { Lines *lines; REGION *ir; /* Input region */ int *start; /* Offsets for start and stop */ int *end; /* The sums for each line. int for integer types, double for floating * point types. */ void *sum; int last_stride; /* Avoid recalcing offsets, if we can */ } AConvSep; /* Free a sequence value. */ static int aconvsep_stop( void *vseq, void *a, void *b ) { AConvSep *seq = (AConvSep *) vseq; IM_FREEF( im_region_free, seq->ir ); return( 0 ); } /* Convolution start function. */ static void * aconvsep_start( IMAGE *out, void *a, void *b ) { IMAGE *in = (IMAGE *) a; Lines *lines = (Lines *) b; AConvSep *seq; if( !(seq = IM_NEW( out, AConvSep )) ) return( NULL ); /* Init! */ seq->lines = lines; seq->ir = im_region_create( in ); seq->start = IM_ARRAY( out, lines->n_lines, int ); seq->end = IM_ARRAY( out, lines->n_lines, int ); if( vips_band_format_isint( out->BandFmt ) ) seq->sum = IM_ARRAY( out, lines->n_lines, int ); else seq->sum = IM_ARRAY( out, lines->n_lines, double ); seq->last_stride = -1; if( !seq->ir || !seq->start || !seq->end || !seq->sum ) { aconvsep_stop( seq, in, lines ); return( NULL ); } return( seq ); } #define CLIP_UCHAR( V ) \ G_STMT_START { \ if( (V) < 0 ) \ (V) = 0; \ else if( (V) > UCHAR_MAX ) \ (V) = UCHAR_MAX; \ } G_STMT_END #define CLIP_CHAR( V ) \ G_STMT_START { \ if( (V) < SCHAR_MIN ) \ (V) = SCHAR_MIN; \ else if( (V) > SCHAR_MAX ) \ (V) = SCHAR_MAX; \ } G_STMT_END #define CLIP_USHORT( V ) \ G_STMT_START { \ if( (V) < 0 ) \ (V) = 0; \ else if( (V) > USHRT_MAX ) \ (V) = USHRT_MAX; \ } G_STMT_END #define CLIP_SHORT( V ) \ G_STMT_START { \ if( (V) < SHRT_MIN ) \ (V) = SHRT_MIN; \ else if( (V) > SHRT_MAX ) \ (V) = SHRT_MAX; \ } G_STMT_END #define CLIP_NONE( V ) {} /* The h and v loops are very similar, but also annoyingly different. Keep * them separate for easy debugging. */ #define HCONV_INT( TYPE, CLIP ) { \ for( i = 0; i < bands; i++ ) { \ int *seq_sum = (int *) seq->sum; \ \ TYPE *q; \ TYPE *p; \ int sum; \ \ p = i + (TYPE *) IM_REGION_ADDR( ir, r->left, r->top + y ); \ q = i + (TYPE *) IM_REGION_ADDR( or, r->left, r->top + y ); \ \ sum = 0; \ for( z = 0; z < n_lines; z++ ) { \ seq_sum[z] = 0; \ for( x = lines->start[z]; x < lines->end[z]; x++ ) \ seq_sum[z] += p[x * istride]; \ sum += lines->factor[z] * seq_sum[z]; \ } \ sum = (sum + lines->rounding) / lines->area; \ CLIP( sum ); \ *q = sum; \ q += ostride; \ \ for( x = 1; x < r->width; x++ ) { \ sum = 0; \ for( z = 0; z < n_lines; z++ ) { \ seq_sum[z] += p[seq->end[z]]; \ seq_sum[z] -= p[seq->start[z]]; \ sum += lines->factor[z] * seq_sum[z]; \ } \ p += istride; \ sum = (sum + lines->rounding) / lines->area; \ CLIP( sum ); \ *q = sum; \ q += ostride; \ } \ } \ } #define HCONV_FLOAT( TYPE ) { \ for( i = 0; i < bands; i++ ) { \ double *seq_sum = (double *) seq->sum; \ \ TYPE *q; \ TYPE *p; \ double sum; \ \ p = i + (TYPE *) IM_REGION_ADDR( ir, r->left, r->top + y ); \ q = i + (TYPE *) IM_REGION_ADDR( or, r->left, r->top + y ); \ \ sum = 0; \ for( z = 0; z < lines->n_lines; z++ ) { \ seq_sum[z] = 0; \ for( x = lines->start[z]; x < lines->end[z]; x++ ) \ seq_sum[z] += p[x * istride]; \ sum += lines->factor[z] * seq_sum[z]; \ } \ sum = sum / lines->area + mask->offset; \ *q = sum; \ q += ostride; \ \ for( x = 1; x < r->width; x++ ) { \ sum = 0; \ for( z = 0; z < lines->n_lines; z++ ) { \ seq_sum[z] += p[seq->end[z]]; \ seq_sum[z] -= p[seq->start[z]]; \ sum += lines->factor[z] * seq_sum[z]; \ } \ p += istride; \ sum = sum / lines->area + mask->offset; \ *q = sum; \ q += ostride; \ } \ } \ } /* Do horizontal masks ... we scan the mask along scanlines. */ static int aconvsep_generate_horizontal( REGION *or, void *vseq, void *a, void *b ) { AConvSep *seq = (AConvSep *) vseq; IMAGE *in = (IMAGE *) a; Lines *lines = (Lines *) b; REGION *ir = seq->ir; const int n_lines = lines->n_lines; DOUBLEMASK *mask = lines->mask; Rect *r = &or->valid; /* Double the bands (notionally) for complex. */ int bands = vips_band_format_iscomplex( in->BandFmt ) ? 2 * in->Bands : in->Bands; Rect s; int x, y, z, i; int istride; int ostride; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); /* Stride can be different for the vertical case, keep this here for * ease of direction change. */ istride = IM_IMAGE_SIZEOF_PEL( in ) / IM_IMAGE_SIZEOF_ELEMENT( in ); ostride = IM_IMAGE_SIZEOF_PEL( lines->out ) / IM_IMAGE_SIZEOF_ELEMENT( lines->out ); /* Init offset array. */ if( seq->last_stride != istride ) { seq->last_stride = istride; for( z = 0; z < n_lines; z++ ) { seq->start[z] = lines->start[z] * istride; seq->end[z] = lines->end[z] * istride; } } for( y = 0; y < r->height; y++ ) { switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: HCONV_INT( unsigned char, CLIP_UCHAR ); break; case IM_BANDFMT_CHAR: HCONV_INT( signed char, CLIP_UCHAR ); break; case IM_BANDFMT_USHORT: HCONV_INT( unsigned short, CLIP_USHORT ); break; case IM_BANDFMT_SHORT: HCONV_INT( signed short, CLIP_SHORT ); break; case IM_BANDFMT_UINT: HCONV_INT( unsigned int, CLIP_NONE ); break; case IM_BANDFMT_INT: HCONV_INT( signed int, CLIP_NONE ); break; case IM_BANDFMT_FLOAT: HCONV_FLOAT( float ); break; case IM_BANDFMT_DOUBLE: HCONV_FLOAT( double ); break; case IM_BANDFMT_COMPLEX: HCONV_FLOAT( float ); break; case IM_BANDFMT_DPCOMPLEX: HCONV_FLOAT( double ); break; default: g_assert( 0 ); } } return( 0 ); } #define VCONV_INT( TYPE, CLIP ) { \ for( x = 0; x < sz; x++ ) { \ int *seq_sum = (int *) seq->sum; \ \ TYPE *q; \ TYPE *p; \ int sum; \ \ p = x + (TYPE *) IM_REGION_ADDR( ir, r->left, r->top ); \ q = x + (TYPE *) IM_REGION_ADDR( or, r->left, r->top ); \ \ sum = 0; \ for( z = 0; z < lines->n_lines; z++ ) { \ seq_sum[z] = 0; \ for( y = lines->start[z]; y < lines->end[z]; y++ ) \ seq_sum[z] += p[y * istride]; \ sum += lines->factor[z] * seq_sum[z]; \ } \ sum = (sum + lines->rounding) / lines->area; \ CLIP( sum ); \ *q = sum; \ q += ostride; \ \ for( y = 1; y < r->height; y++ ) { \ sum = 0; \ for( z = 0; z < lines->n_lines; z++ ) { \ seq_sum[z] += p[seq->end[z]]; \ seq_sum[z] -= p[seq->start[z]]; \ sum += lines->factor[z] * seq_sum[z]; \ } \ p += istride; \ sum = (sum + lines->rounding) / lines->area; \ CLIP( sum ); \ *q = sum; \ q += ostride; \ } \ } \ } #define VCONV_FLOAT( TYPE ) { \ for( x = 0; x < sz; x++ ) { \ double *seq_sum = (double *) seq->sum; \ \ TYPE *q; \ TYPE *p; \ double sum; \ \ p = x + (TYPE *) IM_REGION_ADDR( ir, r->left, r->top ); \ q = x + (TYPE *) IM_REGION_ADDR( or, r->left, r->top ); \ \ sum = 0; \ for( z = 0; z < lines->n_lines; z++ ) { \ seq_sum[z] = 0; \ for( y = lines->start[z]; y < lines->end[z]; y++ ) \ seq_sum[z] += p[y * istride]; \ sum += lines->factor[z] * seq_sum[z]; \ } \ sum = sum / lines->area + mask->offset; \ *q = sum; \ q += ostride; \ \ for( y = 1; y < r->height; y++ ) { \ sum = 0; \ for( z = 0; z < lines->n_lines; z++ ) { \ seq_sum[z] += p[seq->end[z]]; \ seq_sum[z] -= p[seq->start[z]]; \ sum += lines->factor[z] * seq_sum[z]; \ } \ p += istride; \ sum = sum / lines->area + mask->offset; \ *q = sum; \ q += ostride; \ } \ } \ } /* Do vertical masks ... we scan the mask down columns of pixels. Copy-paste * from above with small changes. */ static int aconvsep_generate_vertical( REGION *or, void *vseq, void *a, void *b ) { AConvSep *seq = (AConvSep *) vseq; IMAGE *in = (IMAGE *) a; Lines *lines = (Lines *) b; REGION *ir = seq->ir; const int n_lines = lines->n_lines; DOUBLEMASK *mask = lines->mask; Rect *r = &or->valid; /* Double the width (notionally) for complex. */ int sz = vips_band_format_iscomplex( in->BandFmt ) ? 2 * IM_REGION_N_ELEMENTS( or ) : IM_REGION_N_ELEMENTS( or ); Rect s; int x, y, z; int istride; int ostride; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); /* Stride can be different for the vertical case, keep this here for * ease of direction change. */ istride = IM_REGION_LSKIP( ir ) / IM_IMAGE_SIZEOF_ELEMENT( lines->in ); ostride = IM_REGION_LSKIP( or ) / IM_IMAGE_SIZEOF_ELEMENT( lines->out ); /* Init offset array. */ if( seq->last_stride != istride ) { seq->last_stride = istride; for( z = 0; z < n_lines; z++ ) { seq->start[z] = lines->start[z] * istride; seq->end[z] = lines->end[z] * istride; } } switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: VCONV_INT( unsigned char, CLIP_UCHAR ); break; case IM_BANDFMT_CHAR: VCONV_INT( signed char, CLIP_UCHAR ); break; case IM_BANDFMT_USHORT: VCONV_INT( unsigned short, CLIP_USHORT ); break; case IM_BANDFMT_SHORT: VCONV_INT( signed short, CLIP_SHORT ); break; case IM_BANDFMT_UINT: VCONV_INT( unsigned int, CLIP_NONE ); break; case IM_BANDFMT_INT: VCONV_INT( signed int, CLIP_NONE ); break; case IM_BANDFMT_FLOAT: VCONV_FLOAT( float ); break; case IM_BANDFMT_DOUBLE: VCONV_FLOAT( double ); break; case IM_BANDFMT_COMPLEX: VCONV_FLOAT( float ); break; case IM_BANDFMT_DPCOMPLEX: VCONV_FLOAT( double ); break; default: g_assert( 0 ); } return( 0 ); } static int aconvsep_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask, int n_layers ) { Lines *lines; im_generate_fn generate; #ifdef DEBUG printf( "aconvsep_raw: starting with matrix:\n" ); im_print_dmask( mask ); #endif /*DEBUG*/ if( !(lines = lines_new( in, out, mask, n_layers )) ) return( -1 ); /* Prepare output. Consider a 7x7 mask and a 7x7 image --- the output * would be 1x1. */ if( im_cp_desc( out, in ) ) return( -1 ); out->Xsize -= mask->xsize - 1; out->Ysize -= mask->ysize - 1; if( out->Xsize <= 0 || out->Ysize <= 0 ) { im_error( "im_aconvsep", "%s", _( "image too small for mask" ) ); return( -1 ); } if( mask->xsize == 1 ) generate = aconvsep_generate_vertical; else generate = aconvsep_generate_horizontal; if( im_demand_hint( out, IM_SMALLTILE, in, NULL ) || im_generate( out, aconvsep_start, generate, aconvsep_stop, in, lines ) ) return( -1 ); out->Xoffset = -mask->xsize / 2; out->Yoffset = -mask->ysize / 2; return( 0 ); } /** * im_aconvsep: * @in: input image * @out: output image * @mask: convolution mask * @n_layers: number of layers for approximation * * Perform an approximate separable convolution of @in with @mask. * * The mask must be 1xn or nx1 elements. * The output image * always has the same #VipsBandFmt as the input image. * * The image is convolved twice: once with @mask and then again with @mask * rotated by 90 degrees. * * Larger values for @n_layers give more accurate * results, but are slower. As @n_layers approaches the mask radius, the * accuracy will become close to exact convolution and the speed will drop to * match. For many large masks, such as Gaussian, @n_layers need be only 10% of * this value and accuracy will still be good. * * See also: im_convsep_f(), im_create_dmaskv(). * * Returns: 0 on success, -1 on error */ int im_aconvsep( IMAGE *in, IMAGE *out, DOUBLEMASK *mask, int n_layers ) { IMAGE *t[2]; const int n_mask = mask->xsize * mask->ysize; DOUBLEMASK *rmask; if( im_open_local_array( out, t, 2, "im_aconvsep", "p" ) || !(rmask = (DOUBLEMASK *) im_local( out, (im_construct_fn) im_dup_dmask, (im_callback_fn) im_free_dmask, mask, mask->filename, NULL )) ) return( -1 ); rmask->xsize = mask->ysize; rmask->ysize = mask->xsize; /* */ if( im_embed( in, t[0], 1, n_mask / 2, n_mask / 2, in->Xsize + n_mask - 1, in->Ysize + n_mask - 1 ) || aconvsep_raw( t[0], t[1], mask, n_layers ) || aconvsep_raw( t[1], out, rmask, n_layers ) ) return( -1 ); /* For testing .. just try one direction. if( aconvsep_raw( in, out, mask, n_layers ) ) return( -1 ); */ out->Xoffset = 0; out->Yoffset = 0; return( 0 ); } vips-7.38.5/libvips/convolution/correlation.h0000644000175000017500000000471012303140253016234 00000000000000/* base class for all correlation operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PCORRELATION_H #define VIPS_PCORRELATION_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_CORRELATION (vips_correlation_get_type()) #define VIPS_CORRELATION( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_CORRELATION, VipsCorrelation )) #define VIPS_CORRELATION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_CORRELATION, VipsCorrelationClass)) #define VIPS_IS_CORRELATION( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_CORRELATION )) #define VIPS_IS_CORRELATION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_CORRELATION )) #define VIPS_CORRELATION_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_CORRELATION, VipsCorrelationClass )) typedef struct { VipsOperation parent_instance; /* Params. */ VipsImage *in; VipsImage *ref; VipsImage *out; /* The two input images, upcast to the smallest common format. ref is * a memory buffer. */ VipsImage *in_ready; VipsImage *ref_ready; } VipsCorrelation; typedef struct { VipsOperationClass parent_class; /* For each upcast input format, what output format. */ const VipsBandFormat *format_table; /* Run just before generate. The subclass can fill in some stuff. */ int (*pre_generate)( VipsCorrelation * ); void (*correlation)( VipsCorrelation *, VipsRegion *in, VipsRegion *out ); } VipsCorrelationClass; GType vips_correlation_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PCORRELATION_H*/ vips-7.38.5/libvips/convolution/conv.c0000644000175000017500000001342512303141142014654 00000000000000/* convolution * * 12/8/13 * - from vips_hist_cum() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* This is a simple wrapper over the old vips7 functions. At some point we * should rewrite this as a pure vips8 class and redo the vips7 functions as * wrappers over this. */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include "pconvolution.h" typedef struct { VipsConvolution parent_instance; VipsPrecision precision; int layers; int cluster; } VipsConv; typedef VipsConvolutionClass VipsConvClass; G_DEFINE_TYPE( VipsConv, vips_conv, VIPS_TYPE_CONVOLUTION ); static int vips_conv_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConvolution *convolution = (VipsConvolution *) object; VipsConv *conv = (VipsConv *) object; INTMASK *imsk; DOUBLEMASK *dmsk; g_object_set( conv, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_conv_parent_class )->build( object ) ) return( -1 ); /* printf( "vips_conv_build: convolving with:\n" ); vips_matrixprint( convolution->M, NULL ); */ if( !(imsk = im_vips2imask( convolution->M, class->nickname )) || !im_local_imask( convolution->out, imsk ) ) return( -1 ); if( !(dmsk = im_vips2mask( convolution->M, class->nickname )) || !im_local_dmask( convolution->out, dmsk ) ) return( -1 ); switch( conv->precision ) { case VIPS_PRECISION_INTEGER: if( im_conv( convolution->in, convolution->out, imsk ) ) return( -1 ); break; case VIPS_PRECISION_FLOAT: if( im_conv_f( convolution->in, convolution->out, dmsk ) ) return( -1 ); break; case VIPS_PRECISION_APPROXIMATE: if( im_aconv( convolution->in, convolution->out, dmsk, conv->layers, conv->cluster ) ) return( -1 ); break; default: g_assert( 0 ); } return( 0 ); } static void vips_conv_class_init( VipsConvClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; object_class->nickname = "conv"; object_class->description = _( "convolution operation" ); object_class->build = vips_conv_build; VIPS_ARG_ENUM( class, "precision", 103, _( "Precision" ), _( "Convolve with this precision" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsConv, precision ), VIPS_TYPE_PRECISION, VIPS_PRECISION_INTEGER ); VIPS_ARG_INT( class, "layers", 104, _( "Layers" ), _( "Use this many layers in approximation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsConv, layers ), 1, 1000, 5 ); VIPS_ARG_INT( class, "cluster", 105, _( "Cluster" ), _( "Cluster lines closer than this in approximation" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsConv, cluster ), 1, 100, 1 ); } static void vips_conv_init( VipsConv *conv ) { conv->precision = VIPS_PRECISION_INTEGER; conv->layers = 5; conv->cluster = 1; } /** * vips_conv: * @in: input image * @out: output image * @mask: convolve with this mask * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @precision: calculation accuracy * @layers: number of layers for approximation * @cluster: cluster lines closer than this distance * * Convolution. * * Perform a convolution of @in with @mask. * Each output pixel is * calculated as sigma[i]{pixel[i] * mask[i]} / scale + offset, where scale * and offset are part of @mask. * * If @precision is #VIPS_PRECISION_INTEGER then the convolution is performed * with integer arithmetic and the output image * always has the same #VipsBandFmt as the input image. * * Convolutions on unsigned 8-bit images are calculated with the * processor's vector unit, if possible. Disable this with --vips-novector or * IM_NOVECTOR. * * If @precision is #VIPS_PRECISION_FLOAT then the convolution is performed * with floating-point arithmetic. The output image * is always %VIPS_FORMAT_FLOAT unless @in is %VIPS_FORMAT_DOUBLE, in which case * @out is also %VIPS_FORMAT_DOUBLE. * * If @precision is #VIPS_PRECISION_APPROXIMATE then the output image * always has the same #VipsBandFmt as the input image. * * Larger values for @layers give more accurate * results, but are slower. As @layers approaches the mask radius, the * accuracy will become close to exact convolution and the speed will drop to * match. For many large masks, such as Gaussian, @n_layers need be only 10% of * this value and accuracy will still be good. * * Smaller values of @cluster will give more accurate results, but be slower * and use more memory. 10% of the mask radius is a good rule of thumb. * * Returns: 0 on success, -1 on error */ int vips_conv( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) { va_list ap; int result; va_start( ap, mask ); result = vips_call_split( "conv", ap, in, out, mask ); va_end( ap ); return( result ); } vips-7.38.5/libvips/convolution/im_conv_f.c0000644000175000017500000002230312303140253015643 00000000000000/* im_conv_f * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris & Kirk Martinez * Written on: 29/04/1991 * Modified on: 19/05/1991 * 8/7/93 JC * - adapted for partial v2 * - memory leaks fixed * - ANSIfied * 12/7/93 JC * - adapted im_convbi() to im_convbf() * 7/10/94 JC * - new IM_ARRAY() macro * - evalend callbacks * - more typedef * 9/3/01 JC * - redone from im_conv() * 27/7/01 JC * - rejects masks with scale == 0 * 7/4/04 * - now uses im_embed() with edge stretching on the input, not * the output * - sets Xoffset / Yoffset * 11/11/05 * - simpler inner loop avoids gcc4 bug * 12/11/09 * - only rebuild the buffer offsets if bpl changes * - tiny speedups and cleanups * - add restrict, though it doesn't seem to help gcc * - add mask-all-zero check * 13/11/09 * - rename as im_conv_f() to make it easier for vips.c to make the * overloaded version * 3/2/10 * - gtkdoc * - more cleanups * 1/10/10 * - support complex (just double the bands) * 29/10/10 * - get rid of im_convsep_f(), just call this twice, no longer worth * keeping two versions * 15/10/11 Nicolas * - handle offset correctly in seperable convolutions */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* Our parameters ... we take a copy of the mask argument, plus we make a * smaller version with the zeros squeezed out. */ typedef struct { IMAGE *in; IMAGE *out; DOUBLEMASK *mask; /* Copy of mask arg */ int nnz; /* Number of non-zero mask elements */ double *coeff; /* Array of non-zero mask coefficients */ int *coeff_pos; /* Index of each nnz element in mask->coeff */ } Conv; static int conv_close( Conv *conv ) { IM_FREEF( im_free_dmask, conv->mask ); return( 0 ); } static Conv * conv_new( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { Conv *conv = IM_NEW( out, Conv ); const int ne = mask->xsize * mask->ysize; int i; if( !conv ) return( NULL ); conv->in = in; conv->out = out; conv->mask = NULL; conv->nnz = 0; conv->coeff = NULL; if( im_add_close_callback( out, (im_callback_fn) conv_close, conv, NULL ) || !(conv->coeff = IM_ARRAY( out, ne, double )) || !(conv->coeff_pos = IM_ARRAY( out, ne, int )) || !(conv->mask = im_dup_dmask( mask, "conv_mask" )) ) return( NULL ); /* Find non-zero mask elements. */ for( i = 0; i < ne; i++ ) if( mask->coeff[i] ) { conv->coeff[conv->nnz] = mask->coeff[i]; conv->coeff_pos[conv->nnz] = i; conv->nnz += 1; } /* Was the whole mask zero? We must have at least 1 element in there: * set it to zero. */ if( conv->nnz == 0 ) { conv->coeff[0] = mask->coeff[0]; conv->coeff_pos[0] = 0; conv->nnz = 1; } return( conv ); } /* Our sequence value. */ typedef struct { Conv *conv; REGION *ir; /* Input region */ int *offsets; /* Offsets for each non-zero matrix element */ VipsPel **pts; /* Per-non-zero mask element image pointers */ int last_bpl; /* Avoid recalcing offsets, if we can */ } ConvSequence; /* Free a sequence value. */ static int conv_stop( void *vseq, void *a, void *b ) { ConvSequence *seq = (ConvSequence *) vseq; IM_FREEF( im_region_free, seq->ir ); return( 0 ); } /* Convolution start function. */ static void * conv_start( IMAGE *out, void *a, void *b ) { IMAGE *in = (IMAGE *) a; Conv *conv = (Conv *) b; ConvSequence *seq; if( !(seq = IM_NEW( out, ConvSequence )) ) return( NULL ); /* Init! */ seq->conv = conv; seq->ir = NULL; seq->pts = NULL; seq->last_bpl = -1; /* Attach region and arrays. */ seq->ir = im_region_create( in ); seq->offsets = IM_ARRAY( out, conv->nnz, int ); seq->pts = IM_ARRAY( out, conv->nnz, VipsPel * ); if( !seq->ir || !seq->offsets || !seq->pts ) { conv_stop( seq, in, conv ); return( NULL ); } return( (void *) seq ); } #define INNER { \ sum += t[i] * p[i][x]; \ i += 1; \ } #define CONV_FLOAT( ITYPE, OTYPE ) { \ ITYPE ** restrict p = (ITYPE **) seq->pts; \ OTYPE * restrict q = (OTYPE *) IM_REGION_ADDR( or, le, y ); \ \ for( x = 0; x < sz; x++ ) { \ double sum; \ int i; \ \ sum = 0; \ i = 0; \ IM_UNROLL( conv->nnz, INNER ); \ \ sum = (sum / mask->scale) + mask->offset; \ \ q[x] = sum; \ } \ } /* Convolve! */ static int conv_gen( REGION *or, void *vseq, void *a, void *b ) { ConvSequence *seq = (ConvSequence *) vseq; IMAGE *in = (IMAGE *) a; Conv *conv = (Conv *) b; REGION *ir = seq->ir; DOUBLEMASK *mask = conv->mask; double * restrict t = conv->coeff; Rect *r = &or->valid; Rect s; int le = r->left; int to = r->top; int bo = IM_RECT_BOTTOM(r); int sz = IM_REGION_N_ELEMENTS( or ) * (vips_bandfmt_iscomplex( in->BandFmt ) ? 2 : 1); int x, y, z, i; /* Prepare the section of the input image we need. A little larger * than the section of the output image we are producing. */ s = *r; s.width += mask->xsize - 1; s.height += mask->ysize - 1; if( im_prepare( ir, &s ) ) return( -1 ); /* Fill offset array. Only do this if the bpl has changed since the * previous im_prepare(). */ if( seq->last_bpl != IM_REGION_LSKIP( ir ) ) { seq->last_bpl = IM_REGION_LSKIP( ir ); for( i = 0; i < conv->nnz; i++ ) { z = conv->coeff_pos[i]; x = z % conv->mask->xsize; y = z / conv->mask->xsize; seq->offsets[i] = IM_REGION_ADDR( ir, x + le, y + to ) - IM_REGION_ADDR( ir, le, to ); } } for( y = to; y < bo; y++ ) { /* Init pts for this line of PELs. */ for( z = 0; z < conv->nnz; z++ ) seq->pts[z] = seq->offsets[z] + IM_REGION_ADDR( ir, le, y ); switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: CONV_FLOAT( unsigned char, float ); break; case IM_BANDFMT_CHAR: CONV_FLOAT( signed char, float ); break; case IM_BANDFMT_USHORT: CONV_FLOAT( unsigned short, float ); break; case IM_BANDFMT_SHORT: CONV_FLOAT( signed short, float ); break; case IM_BANDFMT_UINT: CONV_FLOAT( unsigned int, float ); break; case IM_BANDFMT_INT: CONV_FLOAT( signed int, float ); break; case IM_BANDFMT_FLOAT: case IM_BANDFMT_COMPLEX: CONV_FLOAT( float, float ); break; case IM_BANDFMT_DOUBLE: case IM_BANDFMT_DPCOMPLEX: CONV_FLOAT( double, double ); break; default: g_assert( 0 ); } } return( 0 ); } int im_conv_f_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { Conv *conv; /* Check parameters. */ if( im_piocheck( in, out ) || im_check_uncoded( "im_conv", in ) || im_check_dmask( "im_conv", mask ) ) return( -1 ); if( mask->scale == 0 ) { im_error( "im_conv_f", "%s", "mask scale must be non-zero" ); return( -1 ); } if( !(conv = conv_new( in, out, mask )) ) return( -1 ); /* Prepare output. Consider a 7x7 mask and a 7x7 image --- the output * would be 1x1. */ if( im_cp_desc( out, in ) ) return( -1 ); if( vips_bandfmt_isint( in->BandFmt ) ) out->BandFmt = IM_BANDFMT_FLOAT; out->Xsize -= mask->xsize - 1; out->Ysize -= mask->ysize - 1; if( out->Xsize <= 0 || out->Ysize <= 0 ) { im_error( "im_conv_f", "%s", _( "image too small for mask" ) ); return( -1 ); } if( im_demand_hint( out, IM_SMALLTILE, in, NULL ) ) return( -1 ); if( im_generate( out, conv_start, conv_gen, conv_stop, in, conv ) ) return( -1 ); out->Xoffset = -mask->xsize / 2; out->Yoffset = -mask->ysize / 2; return( 0 ); } /** * im_conv_f: * @in: input image * @out: output image * @mask: convolution mask * * Convolve @in with @mask using floating-point arithmetic. The output image * is always %IM_BANDFMT_FLOAT unless @in is %IM_BANDFMT_DOUBLE, in which case * @out is also %IM_BANDFMT_DOUBLE. * * Each output pixel is * calculated as sigma[i]{pixel[i] * mask[i]} / scale + offset, where scale * and offset are part of @mask. * * See also: im_conv(), im_convsep_f(), im_create_dmaskv(). * * Returns: 0 on success, -1 on error */ int im_conv_f( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { IMAGE *t1 = im_open_local( out, "im_conv_f intermediate", "p" ); if( !t1 || im_embed( in, t1, 1, mask->xsize / 2, mask->ysize / 2, in->Xsize + mask->xsize - 1, in->Ysize + mask->ysize - 1 ) || im_conv_f_raw( t1, out, mask ) ) return( -1 ); out->Xoffset = 0; out->Yoffset = 0; return( 0 ); } vips-7.38.5/libvips/convolution/pconvolution.h0000644000175000017500000000417212303140253016454 00000000000000/* base class for all convolution operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_PCONVOLUTION_H #define VIPS_PCONVOLUTION_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #define VIPS_TYPE_CONVOLUTION (vips_convolution_get_type()) #define VIPS_CONVOLUTION( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ VIPS_TYPE_CONVOLUTION, VipsConvolution )) #define VIPS_CONVOLUTION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ VIPS_TYPE_CONVOLUTION, VipsConvolutionClass)) #define VIPS_IS_CONVOLUTION( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_CONVOLUTION )) #define VIPS_IS_CONVOLUTION_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_CONVOLUTION )) #define VIPS_CONVOLUTION_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ VIPS_TYPE_CONVOLUTION, VipsConvolutionClass )) typedef struct _VipsConvolution VipsConvolution; struct _VipsConvolution { VipsOperation parent_instance; VipsImage *in; VipsImage *out; VipsImage *mask; /* @mask cast ready for processing. */ VipsImage *M; }; typedef struct _VipsConvolutionClass { VipsOperationClass parent_class; } VipsConvolutionClass; GType vips_convolution_get_type( void ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_PCONVOLUTION_H*/ vips-7.38.5/libvips/convolution/convolution.c0000644000175000017500000001024412303140253016264 00000000000000/* base class for all convolution operations * * properties: * - one input image * - one output image * - one input mask */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "pconvolution.h" /** * SECTION: convolution * @short_description: convolve and correlate images * @stability: Stable * @include: vips/vips.h * * These operations convolve an image in some way, or are operations based on * simple convolution, or are useful with convolution. * */ /** * VipsPrecision: * @VIPS_PRECISION_INTEGER: int everywhere * @VIPS_PRECISION_FLOAT: float everywhere * @VIPS_PRECISION_APPROXIMATE: approximate integer output * * How accurate an operation should be. * */ G_DEFINE_ABSTRACT_TYPE( VipsConvolution, vips_convolution, VIPS_TYPE_OPERATION ); static int vips_convolution_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsConvolution *convolution = VIPS_CONVOLUTION( object ); VipsImage **t = (VipsImage **) vips_object_local_array( object, 2 ); #ifdef DEBUG printf( "vips_convolution_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ if( VIPS_OBJECT_CLASS( vips_convolution_parent_class )-> build( object ) ) return( -1 ); if( vips_check_matrix( class->nickname, convolution->mask, &t[0] ) ) return( -1 ); convolution->M = t[0]; return( 0 ); } static void vips_convolution_class_init( VipsConvolutionClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "convolution"; vobject_class->description = _( "convolution operations" ); vobject_class->build = vips_convolution_build; operation_class->flags = VIPS_OPERATION_SEQUENTIAL; /* Inputs set by subclassess. */ VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsConvolution, in ) ); VIPS_ARG_IMAGE( class, "out", 10, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsConvolution, out ) ); VIPS_ARG_IMAGE( class, "mask", 20, _( "Mask" ), _( "Input matrix image" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsConvolution, mask ) ); } static void vips_convolution_init( VipsConvolution *convolution ) { } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_convolution_operation_init( void ) { extern int vips_conv_get_type( void ); extern int vips_compass_get_type( void ); extern int vips_convsep_get_type( void ); extern int vips_fastcor_get_type( void ); extern int vips_spcor_get_type( void ); extern int vips_sharpen_get_type( void ); extern int vips_gaussblur_get_type( void ); vips_conv_get_type(); vips_compass_get_type(); vips_convsep_get_type(); vips_fastcor_get_type(); vips_spcor_get_type(); vips_sharpen_get_type(); vips_gaussblur_get_type(); } vips-7.38.5/libvips/mosaicing/0000755000175000017500000000000012303146331013215 500000000000000vips-7.38.5/libvips/mosaicing/im_tbmosaic.c0000644000175000017500000002060712303140253015571 00000000000000/* join top-bottom with an approximate overlap * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 07/11/1989 * Modified on : 29/11/1989, 18/04/1991 * Modified and debugged by Ahmed Abbood . 1995 * 14/6/95 JC * - adapted for new balance ideas * - more bug-fixes * 1/11/95 JC * - frees memory used by analysis phase as soon as possible * - means large mosaics use significantly less peak memory * 26/3/96 JC * - now calls im_tbmerge() rather than im__tbmerge() * 30/7/97 JC * - im__find_tboverlap() returns 1st order params too * 2/2/01 JC * - added tunable max blend width * 24/2/05 * - im_scale() makes it work for any image type * 25/1/11 * - gtk-doc * - remove balance stuff * - any mix of types and bands * - cleanups */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "mosaic.h" int im__find_tboverlap( IMAGE *ref_in, IMAGE *sec_in, IMAGE *out, int bandno_in, int xref, int yref, int xsec, int ysec, int halfcorrelation, int halfarea, int *dx0, int *dy0, double *scale1, double *angle1, double *dx1, double *dy1 ) { Rect top, bottom, overlap; IMAGE *ref, *sec; IMAGE *t[6]; TIE_POINTS points, *p_points; /* defined in mosaic.h */ TIE_POINTS newpoints, *p_newpoints; int i; int dx, dy; /* Test cor and area. */ if( halfcorrelation < 0 || halfarea < 0 || halfarea < halfcorrelation ) { im_error( "im_tbmosaic", "%s", _( "bad area parameters" ) ); return( -1 ); } /* Set positions of top and bottom. */ top.left = 0; top.top = 0; top.width = ref_in->Xsize; top.height = ref_in->Ysize; bottom.left = xref - xsec; bottom.top = yref - ysec; bottom.width = sec_in->Xsize; bottom.height = sec_in->Ysize; /* Find overlap. */ im_rect_intersectrect( &top, &bottom, &overlap ); if( overlap.width < 2 * halfarea + 1 || overlap.height < 2 * halfarea + 1 ) { im_error( "im_tbmosaic", "%s", _( "overlap too small for search" ) ); return( -1 ); } /* Extract overlaps as 8-bit, 1 band. */ if( !(ref = im_open_local( out, "temp_one", "t" )) || !(sec = im_open_local( out, "temp_two", "t" )) || im_open_local_array( out, t, 6, "im_tbmosaic", "p" ) || im_extract_area( ref_in, t[0], overlap.left, overlap.top, overlap.width, overlap.height ) || im_extract_area( sec_in, t[1], overlap.left - bottom.left, overlap.top - bottom.top, overlap.width, overlap.height ) ) return( -1 ); if( ref_in->Coding == IM_CODING_LABQ ) { if( im_LabQ2Lab( t[0], t[2] ) || im_LabQ2Lab( t[1], t[3] ) || im_Lab2disp( t[2], t[4], im_col_displays( 1 ) ) || im_Lab2disp( t[3], t[5], im_col_displays( 1 ) ) || im_extract_band( t[4], ref, 1 ) || im_extract_band( t[5], sec, 1 ) ) return( -1 ); } else if( ref_in->Coding == IM_CODING_NONE ) { if( im_extract_band( t[0], t[2], bandno_in ) || im_extract_band( t[1], t[3], bandno_in ) || im_scale( t[2], ref ) || im_scale( t[3], sec ) ) return( -1 ); } else { im_error( "im_tbmosaic", "%s", _( "unknown Coding type" ) ); return( -1 ); } /* Initialise and fill TIE_POINTS */ p_points = &points; p_newpoints = &newpoints; p_points->reference = ref_in->filename; p_points->secondary = sec_in->filename; p_points->nopoints = IM_MAXPOINTS; p_points->deltax = 0; p_points->deltay = 0; p_points->halfcorsize = halfcorrelation; p_points->halfareasize = halfarea; /* Initialise the structure */ for( i = 0; i < IM_MAXPOINTS; i++ ) { p_points->x_reference[i] = 0; p_points->y_reference[i] = 0; p_points->x_secondary[i] = 0; p_points->y_secondary[i] = 0; p_points->contrast[i] = 0; p_points->correlation[i] = 0.0; p_points->dx[i] = 0.0; p_points->dy[i] = 0.0; p_points->deviation[i] = 0.0; } /* Search ref for possible tie-points. Sets: p_points->contrast, * p_points->x,y_reference. */ if( im__tbcalcon( ref, p_points ) ) return( -1 ); /* For each candidate point, correlate against corresponding part of * sec. Sets x,y_secondary and fills correlation and dx, dy. */ if( im__chkpair( ref, sec, p_points ) ) return( -1 ); /* First call to im_clinear(). */ if( im__initialize( p_points ) ) return( -1 ); /* Improve the selection of tiepoints until all abs(deviations) are * < 1.0 by deleting all wrong points. */ if( im__improve( p_points, p_newpoints ) ) return( -1 ); /* Average remaining offsets. */ if( im__avgdxdy( p_newpoints, &dx, &dy ) ) return( -1 ); /* Offset with overlap position. */ *dx0 = -bottom.left + dx; *dy0 = -bottom.top + dy; /* Write 1st order parameters too. */ *scale1 = newpoints.l_scale; *angle1 = newpoints.l_angle; *dx1 = newpoints.l_deltax; *dy1 = newpoints.l_deltay; return( 0 ); } /** * im_tbmosaic: * @ref: reference image * @sec: secondary image * @out: output image * @bandno: band to search for features * @xref: position in reference image * @yref: position in reference image * @xsec: position in secondary image * @ysec: position in secondary image * @hwindowsize: half window size * @hsearchsize: half search size * @balancetype: no longer used * @mwidth: maximum blend width * * This operation joins two images top-bottom (with @ref on the top) * given an approximate overlap. * * @sec is positioned so that the pixel (@xsec, @ysec) lies on top of the * pixel in @ref at (@xref, @yref). The overlap area is divided into three * sections, 20 high-contrast points in band @bandno of image @ref are found * in each, and each high-contrast point is searched for in @sec using * @hwindowsize and @hsearchsize (see im_correl()). * * A linear model is fitted to the 60 tie-points, points a long way from the * fit are discarded, and the model refitted until either too few points * remain or the model reaches good agreement. * * The detected displacement is used with im_tbmerge() to join the two images * together. * * @mwidth limits the maximum height of the * blend area. A value of "-1" means "unlimited". The two images are blended * with a raised cosine. * * Pixels with all bands equal to zero are "transparent", that * is, zero pixels in the overlap area do not contribute to the merge. * This makes it possible to join non-rectangular images. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: im_tbmerge(), im_lrmosaic(), im_insert(), im_global_balance(). * * Returns: 0 on success, -1 on error */ int im_tbmosaic( IMAGE *ref, IMAGE *sec, IMAGE *out, int bandno, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, int balancetype, int mwidth ) { int dx0, dy0; double scale1, angle1, dx1, dy1; IMAGE *dummy; /* Correct overlap. dummy is just a placeholder used to ensure that * memory used by the analysis phase is freed as soon as possible. */ if( !(dummy = im_open( "placeholder:1", "p" )) ) return( -1 ); if( im__find_tboverlap( ref, sec, dummy, bandno, xref, yref, xsec, ysec, hwindowsize, hsearchsize, &dx0, &dy0, &scale1, &angle1, &dx1, &dy1 ) ) { im_close( dummy ); return( -1 ); } im_close( dummy ); /* Merge top-bottom. */ if( im_tbmerge( ref, sec, out, dx0, dy0, mwidth ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/im_avgdxdy.c0000644000175000017500000000413312303140253015432 00000000000000/* @(#) Function which averages the difference x_secondary[] - x_reference[] * @(#) and y_secondary[] - y_reference[] of the structure points; * @(#) The rounded integer result is returnd into dx, dy * @(#) No IMAGES are involved in this function. * @(#) * @(#) int im_avgdxdy( points, dx, dy ) * @(#) TIE_POINTS *points; * @(#) int *dx, *dy; * @(#) * @(#) Returns 0 on sucess and -1 on error. * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 20/12/1990 * Modified on : 18/04/1991 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "mosaic.h" int im__avgdxdy( TIE_POINTS *points, int *dx, int *dy ) { int sumdx, sumdy; int i; if( points->nopoints == 0 ) { im_error( "im_avgdxdy", "%s", _( "no points to average" ) ); return( -1 ); } /* Lots of points. */ sumdx = 0; sumdy = 0; for( i = 0; i < points->nopoints; i++ ) { sumdx += points->x_secondary[i] - points->x_reference[i]; sumdy += points->y_secondary[i] - points->y_reference[i]; } *dx = IM_RINT( (double) sumdx / (double) points->nopoints ); *dy = IM_RINT( (double) sumdy / (double) points->nopoints ); return( 0 ); } vips-7.38.5/libvips/mosaicing/merge.h0000644000175000017500000000610312303140253014402 00000000000000/* Declarations for code shared between im_lrmerge() and im_tbmerge(). */ /* Copyright (C) 1991-2003 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Number of entries in blend table. As a power of two as well, for >>ing. */ #define BLEND_SHIFT (10) #define BLEND_SIZE (1< #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "mosaic.h" int im__tbcalcon( IMAGE *ref, TIE_POINTS *points ) { /* Geometry: border we must leave around each area. */ const int border = points->halfareasize; /* Width of an area. */ const int awidth = ref->Xsize / AREAS; /* Number of points we find in each area. */ const int len = points->nopoints / AREAS; int i; Rect area; /* Make sure we can read image. */ if( im_incheck( ref ) ) return( -1 ); if( ref->Bands != 1 || ref->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im__tbcalcon", "%s", _( "help!" ) ); return( -1 ); } /* Define bits to search for high-contrast areas. */ area.width = awidth; area.height = ref->Ysize; area.left = 0; area.top = 0; im_rect_marginadjust( &area, -border ); area.width--; area.height--; if( area.width < 0 || area.height < 0 ) { im_error( "im__tbcalcon", "%s", _( "overlap too small" ) ); return( -1 ); } /* Loop over areas, finding points. */ for( i = 0; area.left < ref->Xsize; area.left += awidth, i++ ) if( im__find_best_contrast( ref, area.left, area.top, area.width, area.height, points->x_reference + i*len, points->y_reference + i*len, points->contrast + i*len, len, points->halfcorsize ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/im_tbmerge.c0000644000175000017500000004466412303140253015426 00000000000000/* Merge two images top-bottom. dx, dy is the offset needed to get from sec * (secondary image) to ref (reference image). * * Usage: * * int * im_tbmerge( ref, sec, out, dx, dy ) * IMAGE *ref, *sec, *out; * int dx, dy; * * Returns 0 on success and -1 on error * * Copyright: 1990, 1991 N. Dessipris * Author: N. Dessipris * Written on: 20/09/1990 * Updated on: 17/04/1991 * 1/6/92: J. Cupitt * - check for difference bug fixed * - geometry calculations improved and simplified * - small speedups * 30/6/93 K.Martinez : coped with IM_CODING_LABQ images * 7/7/93 JC * - ANSIfied * - proper freeing on errors, ready for partial * 8/11/93 JC * - now propogates both input histories * - adds magic lines for global mosaic optimisation * * * 16/May/1994 Ahmed. Abbood * - Modified to use partials on all IO * * June/1995 Ahmed Abbood * * - Modified to work with different types of images. * * * 16/6/95 JC * - added to VIPS! * 7/9/95 JC * - split into two parts: im_tbmerge() and im__tbmerge() * - latter called by im_tbmosaic() * - just the same as public im_tbmerge(), but adds no history * - necessary for im_global_balance() * - small bugs fixed * 10/10/95 JC * - better checks that parameters are sensible * 11/10/95 JC * - Kirk spotted what a load of rubbish Ahmed's code is * - rewritten - many, many bugs fixed * 28/7/97 JC * - new non-rectangular im_lrmerge adapted to make this * - small tidies * 18/2/98 JC * - im_demand_hint() call added * 19/2/98 JC * - now works for any dx/dy by calling im_insert() for bizarre cases * 2/2/01 JC * - added tunable max blend width * 8/3/01 JC * - switched to integer arithmetic for integer blends * 23/3/01 JC * - oops, iblend was broken * 7/11/01 JC * - more sophisticated transparency handling * 15/8/02 JC * - records Xoffset/Yoffset * 20/6/05 * - now requires all bands == 0 for transparency (used to just check * band 0) * 24/1/11 * - gtk-doc * - match formats and bands automatically */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "merge.h" /* Return the position of the first non-zero pel from the top. */ static int find_top( REGION *ir, int *pos, int x, int y, int h ) { VipsPel *pr = IM_REGION_ADDR( ir, x, y ); IMAGE *im = ir->im; int ls = IM_REGION_LSKIP( ir ) / IM_IMAGE_SIZEOF_ELEMENT( im ); int b = im->Bands; int i, j; /* Double the number of bands in a complex. */ if( vips_bandfmt_iscomplex( im->BandFmt ) ) b *= 2; /* Search for the first non-zero band element from the top edge of the image. */ #define tsearch( TYPE ) { \ TYPE *p = (TYPE *) pr; \ \ for( i = 0; i < h; i++ ) { \ for( j = 0; j < b; j++ ) \ if( p[j] ) \ break; \ if( j < b ) \ break; \ \ p += ls; \ } \ } switch( im->BandFmt ) { case IM_BANDFMT_UCHAR: tsearch( unsigned char ); break; case IM_BANDFMT_CHAR: tsearch( signed char ); break; case IM_BANDFMT_USHORT: tsearch( unsigned short ); break; case IM_BANDFMT_SHORT: tsearch( signed short ); break; case IM_BANDFMT_UINT: tsearch( unsigned int ); break; case IM_BANDFMT_INT: tsearch( signed int ); break; case IM_BANDFMT_FLOAT: tsearch( float ); break; case IM_BANDFMT_DOUBLE: tsearch( double ); break; case IM_BANDFMT_COMPLEX:tsearch( float ); break; case IM_BANDFMT_DPCOMPLEX:tsearch( double ); break; default: im_error( "im_tbmerge", "%s", _( "internal error" ) ); return( -1 ); } *pos = y + i; return( 0 ); } /* Return the position of the first non-zero pel from the bottom. */ static int find_bot( REGION *ir, int *pos, int x, int y, int h ) { VipsPel *pr = IM_REGION_ADDR( ir, x, y ); IMAGE *im = ir->im; int ls = IM_REGION_LSKIP( ir ) / IM_IMAGE_SIZEOF_ELEMENT( ir->im ); int b = im->Bands; int i, j; /* Double the number of bands in a complex. */ if( vips_bandfmt_iscomplex( im->BandFmt ) ) b *= 2; /* Search for the first non-zero band element from the top edge of the image. */ #define rsearch( TYPE ) { \ TYPE *p = (TYPE *) pr + (h - 1) * ls; \ \ for( i = h - 1; i >= 0; i-- ) { \ for( j = 0; j < b; j++ ) \ if( p[j] ) \ break; \ if( j < b ) \ break; \ \ p -= ls; \ } \ } switch( im->BandFmt ) { case IM_BANDFMT_UCHAR: rsearch( unsigned char ); break; case IM_BANDFMT_CHAR: rsearch( signed char ); break; case IM_BANDFMT_USHORT: rsearch( unsigned short ); break; case IM_BANDFMT_SHORT: rsearch( signed short ); break; case IM_BANDFMT_UINT: rsearch( unsigned int ); break; case IM_BANDFMT_INT: rsearch( signed int ); break; case IM_BANDFMT_FLOAT: rsearch( float ); break; case IM_BANDFMT_DOUBLE: rsearch( double ); break; case IM_BANDFMT_COMPLEX:rsearch( float ); break; case IM_BANDFMT_DPCOMPLEX:rsearch( double ); break; default: im_error( "im_tbmerge", "%s", _( "internal error" ) ); return( -1 ); } *pos = y + i; return( 0 ); } /* Make first/last for oreg. */ static int make_firstlast( MergeInfo *inf, Overlapping *ovlap, Rect *oreg ) { REGION *rir = inf->rir; REGION *sir = inf->sir; Rect rr, sr; int x; int missing; /* We're going to build first/last ... lock it from other generate * threads. In fact it's harmless if we do get two writers, but we may * avoid duplicating work. */ g_mutex_lock( ovlap->fl_lock ); /* Do we already have first/last for this area? Bail out if we do. */ missing = 0; for( x = oreg->left; x < IM_RECT_RIGHT( oreg ); x++ ) { const int j = x - ovlap->overlap.left; const int first = ovlap->first[j]; if( first < 0 ) { missing = 1; break; } } if( !missing ) { /* No work to do! */ g_mutex_unlock( ovlap->fl_lock ); return( 0 ); } /* Entire height of overlap in ref for oreg ... we know oreg is inside * overlap. */ rr.left = oreg->left; rr.top = ovlap->overlap.top; rr.width = oreg->width; rr.height = ovlap->overlap.height; rr.left -= ovlap->rarea.left; rr.top -= ovlap->rarea.top; /* Same in sec. */ sr.left = oreg->left; sr.top = ovlap->overlap.top; sr.width = oreg->width; sr.height = ovlap->overlap.height; sr.left -= ovlap->sarea.left; sr.top -= ovlap->sarea.top; /* Make pixels. */ if( im_prepare( rir, &rr ) || im_prepare( sir, &sr ) ) { g_mutex_unlock( ovlap->fl_lock ); return( -1 ); } /* Make first/last cache. */ for( x = 0; x < oreg->width; x++ ) { const int j = (x + oreg->left) - ovlap->overlap.left; int *first = &ovlap->first[j]; int *last = &ovlap->last[j]; /* Done this line already? */ if( *first < 0 ) { /* Search for top/bottom of overlap on this scan-line. */ if( find_top( sir, first, x + sr.left, sr.top, sr.height ) || find_bot( rir, last, x + rr.left, rr.top, rr.height ) ) { g_mutex_unlock( ovlap->fl_lock ); return( -1 ); } /* Translate to output space. */ *first += ovlap->sarea.top; *last += ovlap->rarea.top; /* Clip to maximum blend width, if necessary. */ if( ovlap->mwidth >= 0 && *last - *first > ovlap->mwidth ) { int shrinkby = (*last - *first) - ovlap->mwidth; *first += shrinkby / 2; *last -= shrinkby / 2; } } } g_mutex_unlock( ovlap->fl_lock ); return( 0 ); } /* Test pixel == 0. */ #define TEST_ZERO( TYPE, T, RESULT ) { \ TYPE *tt = (T); \ int ii; \ \ for( ii = 0; ii < cb; ii++ ) \ if( tt[i] ) \ break; \ if( ii == cb ) \ (RESULT) = 1; \ } /* Blend two integer images ... one scan-line. */ #define iblend( TYPE, B, IN1, IN2, OUT ) { \ TYPE *tr = (TYPE *) (IN1); \ TYPE *ts = (TYPE *) (IN2); \ TYPE *tq = (TYPE *) (OUT); \ const int cb = (B); \ int ref_zero; \ int sec_zero; \ int x, b; \ int i; \ \ for( i = 0, x = 0; x < oreg->width; x++ ) { \ ref_zero = 0; \ sec_zero = 0; \ TEST_ZERO( TYPE, tr, ref_zero ); \ TEST_ZERO( TYPE, ts, sec_zero ); \ \ /* Above the bottom image? \ */ \ if( y < first[x] ) { \ if( !ref_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ } \ /* To the right? \ */ \ else if( y >= last[x] ) { \ if( !sec_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ } \ /* In blend area. \ */ \ else { \ if( !ref_zero && !sec_zero ) { \ const int bheight = last[x] - first[x]; \ const int inx = ((y - first[x]) << \ BLEND_SHIFT) / bheight; \ int c1 = im__icoef1[inx]; \ int c2 = im__icoef2[inx]; \ \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = c1*tr[i] / BLEND_SCALE + \ c2*ts[i] / BLEND_SCALE; \ } \ else if( !ref_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ } \ } \ } /* Blend two float images. */ #define fblend( TYPE, B, IN1, IN2, OUT ) { \ TYPE *tr = (TYPE *) (IN1); \ TYPE *ts = (TYPE *) (IN2); \ TYPE *tq = (TYPE *) (OUT); \ int ref_zero; \ int sec_zero; \ const int cb = (B); \ int x, b; \ int i; \ \ for( i = 0, x = 0; x < oreg->width; x++ ) { \ ref_zero = 0; \ sec_zero = 0; \ TEST_ZERO( TYPE, tr, ref_zero ); \ TEST_ZERO( TYPE, ts, sec_zero ); \ \ /* Above the bottom image? \ */ \ if( y < first[x] ) \ if( !ref_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ /* To the right? \ */ \ else if( y >= last[x] ) \ if( !sec_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ /* In blend area. \ */ \ else { \ if( !ref_zero && !sec_zero ) { \ const int bheight = last[x] - first[x]; \ const int inx = ((y - first[x]) << \ BLEND_SHIFT) / bheight; \ double c1 = im__coef1[inx]; \ double c2 = im__coef2[inx]; \ \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = c1 * tr[i] + c2 * ts[i]; \ } \ else if( !ref_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ } \ } \ } /* Top-bottom blend function for non-labpack images. */ static int tb_blend( REGION *or, MergeInfo *inf, Overlapping *ovlap, Rect *oreg ) { REGION *rir = inf->rir; REGION *sir = inf->sir; IMAGE *im = or->im; Rect prr, psr; int y, yr, ys; /* Make sure we have a complete first/last set for this area. */ if( make_firstlast( inf, ovlap, oreg ) ) return( -1 ); /* Part of rr which we will output. */ prr = *oreg; prr.left -= ovlap->rarea.left; prr.top -= ovlap->rarea.top; /* Part of sr which we will output. */ psr = *oreg; psr.left -= ovlap->sarea.left; psr.top -= ovlap->sarea.top; /* Make pixels. */ if( im_prepare( rir, &prr ) ) return( -1 ); if( im_prepare( sir, &psr ) ) return( -1 ); /* Loop down overlap area. */ for( y = oreg->top, yr = prr.top, ys = psr.top; y < IM_RECT_BOTTOM( oreg ); y++, yr++, ys++ ) { VipsPel *pr = IM_REGION_ADDR( rir, prr.left, yr ); VipsPel *ps = IM_REGION_ADDR( sir, psr.left, ys ); VipsPel *q = IM_REGION_ADDR( or, oreg->left, y ); const int j = oreg->left - ovlap->overlap.left; const int *first = ovlap->first + j; const int *last = ovlap->last + j; switch( im->BandFmt ) { case IM_BANDFMT_UCHAR: iblend( unsigned char, im->Bands, pr, ps, q ); break; case IM_BANDFMT_CHAR: iblend( signed char, im->Bands, pr, ps, q ); break; case IM_BANDFMT_USHORT: iblend( unsigned short, im->Bands, pr, ps, q ); break; case IM_BANDFMT_SHORT: iblend( signed short, im->Bands, pr, ps, q ); break; case IM_BANDFMT_UINT: iblend( unsigned int, im->Bands, pr, ps, q ); break; case IM_BANDFMT_INT: iblend( signed int, im->Bands, pr, ps, q ); break; case IM_BANDFMT_FLOAT: fblend( float, im->Bands, pr, ps, q ); break; case IM_BANDFMT_DOUBLE: fblend( double, im->Bands, pr, ps, q ); break; case IM_BANDFMT_COMPLEX: fblend( float, im->Bands*2, pr, ps, q ); break; case IM_BANDFMT_DPCOMPLEX: fblend( double, im->Bands*2, pr, ps, q ); break; default: im_error( "im_tbmerge", "%s", _( "internal error" ) ); return( -1 ); } } return( 0 ); } /* Top-bottom blend function for IM_CODING_LABQ images. */ static int tb_blend_labpack( REGION *or, MergeInfo *inf, Overlapping *ovlap, Rect *oreg ) { REGION *rir = inf->rir; REGION *sir = inf->sir; Rect prr, psr; int y, yr, ys; /* Make sure we have a complete first/last set for this area. This * will just look at the top 8 bits of L, not all 10, but should be OK. */ if( make_firstlast( inf, ovlap, oreg ) ) return( -1 ); /* Part of rr which we will output. */ prr = *oreg; prr.left -= ovlap->rarea.left; prr.top -= ovlap->rarea.top; /* Part of sr which we will output. */ psr = *oreg; psr.left -= ovlap->sarea.left; psr.top -= ovlap->sarea.top; /* Make pixels. */ if( im_prepare( rir, &prr ) ) return( -1 ); if( im_prepare( sir, &psr ) ) return( -1 ); /* Loop down overlap area. */ for( y = oreg->top, yr = prr.top, ys = psr.top; y < IM_RECT_BOTTOM( oreg ); y++, yr++, ys++ ) { VipsPel *pr = IM_REGION_ADDR( rir, prr.left, yr ); VipsPel *ps = IM_REGION_ADDR( sir, psr.left, ys ); VipsPel *q = IM_REGION_ADDR( or, oreg->left, y ); const int j = oreg->left - ovlap->overlap.left; const int *first = ovlap->first + j; const int *last = ovlap->last + j; float *fq = inf->merge; float *r = inf->from1; float *s = inf->from2; /* Unpack two bits we want. */ vips__LabQ2Lab_vec( r, pr, oreg->width ); vips__LabQ2Lab_vec( s, ps, oreg->width ); /* Blend as floats. */ fblend( float, 3, r, s, fq ); /* Re-pack to output buffer. */ vips__Lab2LabQ_vec( q, inf->merge, oreg->width ); } return( 0 ); } /* Build per-call state. */ static Overlapping * build_tbstate( IMAGE *ref, IMAGE *sec, IMAGE *out, int dx, int dy, int mwidth ) { Overlapping *ovlap; if( !(ovlap = im__build_mergestate( "im_tbmerge", ref, sec, out, dx, dy, mwidth )) ) return( NULL ); /* Select blender. */ switch( ovlap->ref->Coding ) { case IM_CODING_LABQ: ovlap->blend = tb_blend_labpack; break; case IM_CODING_NONE: ovlap->blend = tb_blend; break; default: im_error( "im_tbmerge", "%s", _( "unknown coding type" ) ); return( NULL ); } /* Find the parts of output which come just from ref and just from sec. */ ovlap->rpart = ovlap->rarea; ovlap->spart = ovlap->sarea; ovlap->rpart.height -= ovlap->overlap.height; ovlap->spart.top += ovlap->overlap.height; ovlap->spart.height -= ovlap->overlap.height; /* Is there too much overlap? ie. bottom edge of ref image is greater * than bottom edge of sec image, or top edge of ref > top edge of * sec. */ if( IM_RECT_BOTTOM( &ovlap->rarea ) > IM_RECT_BOTTOM( &ovlap->sarea ) || ovlap->rarea.top > ovlap->sarea.top ) { im_error( "im_tbmerge", "%s", _( "too much overlap" ) ); return( NULL ); } /* Max number of pixels we may have to blend together. */ ovlap->blsize = ovlap->overlap.width; return( ovlap ); } int im__tbmerge( IMAGE *ref, IMAGE *sec, IMAGE *out, int dx, int dy, int mwidth ) { Overlapping *ovlap; if( dy > 0 || dy < 1 - ref->Ysize ) { /* No overlap, use insert instead. */ if( im_insert( ref, sec, out, -dx, -dy ) ) return( -1 ); out->Xoffset = -dx; out->Yoffset = -dy; return( 0 ); } /* Build state for this join. */ if( !(ovlap = build_tbstate( ref, sec, out, dx, dy, mwidth )) ) return( -1 ); /* Prepare the output IMAGE. */ if( im_cp_descv( out, ref, sec, NULL ) ) return( -1 ); out->Xsize = ovlap->oarea.width; out->Ysize = ovlap->oarea.height; out->Xoffset = ovlap->sarea.left; out->Yoffset = ovlap->sarea.top; /* Set demand hints. */ if( im_demand_hint( out, IM_THINSTRIP, ref, sec, NULL ) ) return( -1 ); /* Generate! */ if( im_generate( out, im__start_merge, im__merge_gen, im__stop_merge, ovlap, NULL ) ) return( -1 ); return ( 0 ); } /** * im_tbmerge: * @ref: reference image * @sec: secondary image * @out: output image * @dx: displacement of ref from sec * @dy: displacement of ref from sec * @mwidth: maximum seam width * * This operation joins two images top-bottom (with @ref on the top) with a * smooth seam. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * @dx and @dy give the displacement of @sec relative to @ref, in other words, * the vector to get from the origin of @sec to the origin of @ref, in other * words, @dx will generally be a negative number. * * @mwidth limits the maximum height of the * blend area. A value of "-1" means "unlimited". The two images are blended * with a raised cosine. * * Pixels with all bands equal to zero are "transparent", that * is, zero pixels in the overlap area do not contribute to the merge. * This makes it possible to join non-rectangular images. * * See also: im_lrmosaic(), im_lrmerge(), im_match_linear(), im_insert(). * * Returns: 0 on success, -1 on error */ int im_tbmerge( IMAGE *ref, IMAGE *sec, IMAGE *out, int dx, int dy, int mwidth ) { if( im__tbmerge( ref, sec, out, dx, dy, mwidth ) ) return( -1 ); if( im_histlin( out, "#TBJOIN <%s> <%s> <%s> <%d> <%d> <%d>", ref->filename, sec->filename, out->filename, -dx, -dy, mwidth ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/im_lrcalcon.c0000644000175000017500000001703512303140253015566 00000000000000/* @(#) Functions which takes an initial estimate of deltax, deltay * @(#) between reference and secondary images (probably from the scanner), * @(#) and looks in three areas of the overlapping part of the reference image * @(#) corresponding to reference and secondary. For every other halfreasize * @(#) point of the three areas of the reference image * @(#) the contrast is calculated * @(#) an area 2*halfcorsize+1 centered at this point * @(#) Results are saved in the structure points * @(#) The function expects the following valid data in points: * @(#) deltax, deltay, nopoints, halfcorsize, halfareasize * @(#) and fills in the memebers: * @(#) x, y_reference[], contrast and x,y_secondary[], * @(#) based on deltax and deltay * @(#) Input image should are either memory mapped or in a buffer. * @(#) The initial setting checks all points of reference * @(#) in the overlapping area of the images to be mosaiced * @(#) To speed up the procedure the ysize of the box can be reduced * @(#) during the calculation of the ysize * @(#) An easy way is to change FACTOR to 1 2 or 3. * @(#) The calculation of the contrast is carried out based on bandno only. * @(#) The variable bandno should be between 1 and ref->Bands * @(#) * @(#) int im_lrcalcon( ref, sec, bandno, points ) * @(#) IMAGE *ref, *sec; * @(#) int bandno; * @(#) TIE_POINTS *points; see mosaic.h * @(#) * @(#) Returns 0 on sucess and -1 on error. * @(#) * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 20/12/1990 * Modified on : 18/04/1991 * 8/7/93 JC * - now calls im_incheck() * 12/7/95 JC * - reworked * - what a lot of horrible old code there was too * 24/1/97 JC * - now ignores black stuff (all bands zero) when selecting possible tie * points, part of new mosaic policy * 26/9/97 JC * - now skips all-black windows, instead of any-black windows * 11/4/01 JC * - ooops, < 0 should have been <= 0 * 10/3/03 JC * - better error message for overlap too small */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "mosaic.h" /* A position and contrast. */ typedef struct { int x, y; int cont; } PosCont; /* Search a window for black pelss ... true if window is all black. * One-band uchar only. */ static int all_black( IMAGE *im, int xpos, int ypos, int winsize ) { const int hwinsize = (winsize - 1)/2; const int left = xpos - hwinsize; const int top = ypos - hwinsize; const int ls = im->Xsize; int x, y; VipsPel *line; /* Loop over image. */ line = im->data + top*ls + left; for( y = 0; y < winsize; y++ ) { for( x = 0; x < winsize; x++ ) if( line[x] ) /* Not all black. */ return( 0 ); line += ls; } return( -1 ); } /* Calculate a value for 'contrast' within a window * of (odd) size winsize*winsize centered at location (xpos, ypos). * One band uchar only, */ static int calculate_contrast( IMAGE *im, int xpos, int ypos, int winsize ) { const int hwinsize = (winsize - 1)/2; const int left = xpos - hwinsize; const int top = ypos - hwinsize; const int ls = im->Xsize; int x, y; VipsPel *line, *p; int total; line = im->data + top*ls + left; for( total = 0, y = 0; y < winsize-1; y++ ) { p = line; for( x = 0; x < winsize-1; x++ ) { const int lrd = (int) p[0] - p[1]; const int tbd = (int) p[0] - p[ls]; total += abs( lrd ) + abs( tbd ); p += 1; } line += ls; } return( total ); } /* Compare two PosConts for qsort. */ static int pos_compare( const void *vl, const void *vr ) { PosCont *l = (PosCont *) vl; PosCont *r = (PosCont *) vr; return( r->cont - l->cont ); } /* Search an area for the n best contrast areas. */ int im__find_best_contrast( IMAGE *im, int xpos, int ypos, int xsize, int ysize, int xarray[], int yarray[], int cont[], int nbest, int hcorsize ) { /* Geometry: we test squares of size windowsize, overlapping by * hcorsize. */ const int windowsize = 2 * hcorsize + 1; /* Number of squares we can fit in area. */ const int nacross = (xsize - windowsize + hcorsize) / hcorsize; const int ndown = (ysize - windowsize + hcorsize) / hcorsize; /* Number of squares we search. */ int elms; /* All points in this area. */ PosCont *pc; int x, y, i; if( nacross <= 0 || ndown <= 0 ) { im_error( "im__lrcalcon", "%s", _( "overlap too small for your search size" ) ); return( -1 ); } /* Malloc space for 3 int arrays, to keep the int coordinates and * the contrast. */ if( !(pc = IM_ARRAY( NULL, nacross * ndown, PosCont )) ) return( -1 ); /* Find contrast for each area. */ for( i = 0, y = 0; y < ndown; y++ ) for( x = 0; x < nacross; x++ ) { const int left = xpos + x * hcorsize; const int top = ypos + y * hcorsize; /* Skip this position if it is all black. */ if( all_black( im, left, top, windowsize ) ) continue; /* Find contrast and note. */ pc[i].x = left; pc[i].y = top; pc[i].cont = calculate_contrast( im, left, top, windowsize ); i++; } /* Note number found. */ elms = i; /* Found enough tie-points? */ if( elms < nbest ) { im_error( "im_mosaic", _( "found %d tie-points, need at least %d" ), elms, nbest ); im_free( pc ); return( -1 ); } /* Sort areas by contrast. */ qsort( pc, elms, sizeof( PosCont ), pos_compare ); /* Copy the n best into our parent. */ for( i = 0; i < nbest; i++ ) { xarray[i] = pc[i].x; yarray[i] = pc[i].y; cont[i] = pc[i].cont; } im_free( pc ); return( 0 ); } int im__lrcalcon( IMAGE *ref, TIE_POINTS *points ) { /* Geometry: border we must leave around each area. */ const int border = points->halfareasize; /* Height of an area. */ const int aheight = ref->Ysize / AREAS; /* Number of points we find in each area. */ const int len = points->nopoints / AREAS; int i; Rect area; /* Make sure we can read image. */ if( im_incheck( ref ) ) return( -1 ); if( ref->Bands != 1 || ref->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im__lrcalcon", "%s", _( "not 1-band uchar image" ) ); return( -1 ); } /* Define bits to search for high-contrast areas. Need to be able to * fit at least 1 window in. */ area.height = aheight; area.width = ref->Xsize; area.left = 0; area.top = 0; im_rect_marginadjust( &area, -border ); area.width--; area.height--; /* Loop over areas, finding points. */ for( i = 0; area.top < ref->Ysize; area.top += aheight, i++ ) if( im__find_best_contrast( ref, area.left, area.top, area.width, area.height, points->x_reference + i*len, points->y_reference + i*len, points->contrast + i*len, len, points->halfcorsize ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/im_clinear.c0000644000175000017500000001051712303140253015404 00000000000000/* @(#) Function which calculates the coefficients between corresponding * @(#) points from reference and secondary images (probably from the scanner), * @(#) previously calculated using the functions im_calcon() and im_chpair() * @(#) It is assummed that a selection of the best(?) possible points has * @(#) been already carried out and that those nopoints points are in arrays * @(#) x1, y1 and x2, y2 * @(#) No IMAGES are involved in this function and the calculated parameters * @(#) are returned in scale angle deltax and deltay of the TIE_POINTS struct. * @(#) * @(#) int im_clinear( points ) * @(#) TIE_POINTS *points; * @(#) * @(#) Returns 0 on sucess and -1 on error. * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 20/12/1990 * Modified on : 18/04/1991 * 24/1/97 JC * - tiny mem leak fixed */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "mosaic.h" int im__clinear( TIE_POINTS *points ) { double **mat; /* matrix mar[4][4] */ double *g; /* vector g[1][4] */ double value; double sx1=0.0, sx1x1=0.0, sy1=0.0, sy1y1=0.0, sx1y1 = 0.0; double sx2x1=0.0, sx2y1=0.0, sx2=0.0, sy2=0.0, sy2y1=0.0, sy2x1=0.0; int i, j; int elms; double scale, angle, xdelta, ydelta; int *xref, *yref, *xsec, *ysec; double *dx, *dy, *dev; xref = &points->x_reference[0]; yref = &points->y_reference[0]; xsec = &points->x_secondary[0]; ysec = &points->y_secondary[0]; dx = &points->dx[0]; dy = &points->dy[0]; dev = &points->deviation[0]; elms = points->nopoints; if( !(mat = im_dmat_alloc( 0, 3, 0, 3 )) ) return( -1 ); if( !(g = im_dvector( 0, 3 )) ) { im_free_dmat( mat, 0, 3, 0, 3 ); return( -1 ); } for( i = 0; i < points->nopoints; i++ ) { sx1 += xref[i]; sx1x1 += xref[i] * xref[i]; sy1 += yref[i]; sy1y1 += yref[i] * yref[i]; sx1y1 += xref[i] * yref[i]; sx2x1 += xsec[i] * xref[i]; sx2y1 += xsec[i] * yref[i]; sy2y1 += ysec[i] * yref[i]; sy2x1 += ysec[i] * xref[i]; sx2 += xsec[i]; sy2 += ysec[i]; } mat[0][0] = sx1x1 + sy1y1; mat[0][1] = 0; mat[0][2] = sx1; mat[0][3] = sy1; mat[1][0] = 0; mat[1][1] = sx1x1 + sy1y1; mat[1][2] = -sy1; mat[1][3] = sx1; mat[2][0] = sx1; mat[2][1] = -sy1; mat[2][2] = (double)elms; mat[2][3] = 0.0; mat[3][0] = sy1; mat[3][1] = sx1; mat[3][2] = 0.0; mat[3][3] = (double)elms; g[0] = sx2x1 + sy2y1; g[1] = -sx2y1 + sy2x1; g[2] = sx2; g[3] = sy2; if( im_invmat( mat, 4 ) ) { im_free_dmat( mat, 0, 3, 0, 3 ); im_free_dvector( g, 0, 3 ); im_error( "im_clinear", "%s", _( "im_invmat failed" ) ); return( -1 ); } scale = 0.0; angle = 0.0; xdelta = 0.0; ydelta = 0.0; for( j = 0; j < 4; j++ ) { scale += mat[0][j] * g[j]; angle += mat[1][j] * g[j]; xdelta += mat[2][j] * g[j]; ydelta += mat[3][j] * g[j]; } /* find the deviation of each point for the estimated variables * if it greater than 1 then the solution is not good enough * but this is handled by the main program */ for( i = 0; i < points->nopoints; i++ ) { dx[i] = xsec[i] - ((scale * xref[i]) - (angle * yref[i]) + xdelta); dy[i] = ysec[i] - ((angle * xref[i]) + (scale * yref[i]) + ydelta); value = sqrt( dx[i]*dx[i] + dy[i]*dy[i] ); dev[i] = value; } points->l_scale = scale; points->l_angle = angle; points->l_deltax = xdelta; points->l_deltay = ydelta; im_free_dmat( mat, 0, 3, 0, 3 ); im_free_dvector( g, 0, 3 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/im_remosaic.c0000644000175000017500000000736212303140253015575 00000000000000/* Use one mosiaced file to mosaic another set of images. * * 1/11/01 JC * - from global_balance * 25/02/02 JC * - detect size change * 10/4/06 * - spot file-not-found */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Define for debug output. #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "merge.h" #include "global_balance.h" typedef struct _RemosaicData { const char *old_str; const char *new_str; int new_len; int old_len; } RemosaicData; static IMAGE * remosaic( JoinNode *node, RemosaicData *rd ) { SymbolTable *st = node->st; IMAGE *im = node->im; IMAGE *out; char filename[FILENAME_MAX]; char *p; if( !im ) { im_error( "im_remosaic", _( "file \"%s\" not found" ), node->name ); return( NULL ); } /* Remove substring rd->old_str from in->filename, replace with * rd->new_str. */ im_strncpy( filename, im->filename, FILENAME_MAX ); if( (p = im_strrstr( filename, rd->old_str )) ) { int offset = p - &filename[0]; im_strncpy( p, rd->new_str, FILENAME_MAX - offset ); im_strncpy( p + rd->new_len, im->filename + offset + rd->old_len, FILENAME_MAX - offset - rd->new_len ); } #ifdef DEBUG printf( "im_remosaic: filename \"%s\" -> \"%s\"\n", im->filename, filename ); #endif /*DEBUG*/ if( !(out = im__global_open_image( st, filename )) ) return( NULL ); if( out->Xsize != im->Xsize || out->Ysize != im->Ysize ) { im_error( "im_remosaic", _( "substitute image \"%s\" is not " "the same size as \"%s\"" ), filename, im->filename ); return( NULL ); } return( out ); } /** * im_remosaic: * @in: mosaic to rebuild * @out: output image * @old_str: gamma of source images * @new_str: gamma of source images * * im_remosaic() works rather as im_global_balance(). It takes apart the * mosaiced image in and rebuilds it, substituting images. * * Unlike im_global_balance(), images are substituted based on their file†* names. The rightmost occurence of the string @old_str is swapped * for @new_str, that file is opened, and that image substituted for * the old image. * * It's convenient for multispectral images. You can mosaic one band, then * use that mosaic as a template for mosaicing the others automatically. * * See also: im_lrmosaic(), im_global_balance(). * * Returns: 0 on success, -1 on error */ int im_remosaic( IMAGE *in, IMAGE *out, const char *old_str, const char *new_str ) { SymbolTable *st; RemosaicData rd; if( !(st = im__build_symtab( out, SYM_TAB_SIZE )) || im__parse_desc( st, in ) ) return( -1 ); /* Re-make mosaic. */ rd.old_str = old_str; rd.new_str = new_str; rd.new_len = strlen( new_str ); rd.old_len = strlen( old_str ); if( im__build_mosaic( st, out, (transform_fn) remosaic, &rd ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/im_maxpos_subpel.c0000644000175000017500000001435412303140253016653 00000000000000/* find position of maximum, subpixel estimation * * Copyright: 2008, Nottingham Trent University * Author: Tom Vajzovic * Written on: 2008-02-07 * * 25/1/11 * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H */ #include #include #include #define MOST_OF( A, B ) ( (A) > 0.9 * (B) ) #define LITTLE_OF( A, B ) ( (B) < 0.1 * (B) ) /** * im_maxpos_subpel: * @in: input image * @x: output position of maximum * @y: output position of maximum * * This function implements: * * "Extension of Phase Correlation to Subpixel Registration" * by H. Foroosh, from IEEE trans. Im. Proc. 11(3), 2002. * * If the best three matches in the correlation are aranged: * * 02 or 01 * 1 2 * * then we return a subpixel match using the ratio of correlations in the * vertical and horizontal dimension. * * ( xs[0], ys[0] ) is the best integer alignment * ( xs[ use_x ], ys[ use_x ] ) is equal in y and (+/-)1 off in x * ( xs[ use_y ], ys[ use_y ] ) is equal in x and (+/-)1 off in y * * Alternatively if the best four matches in the correlation are aranged in * a square: * * 01 or 03 or 02 or 03 * 32 12 31 21 * * then we return a subpixel match weighting with the sum the two on each * side over the sum of all four, but only if all four of them are very * close to the best, and the fifth is nowhere near. * * This alternative method is not described by Foroosh, but is often the * case where the match is close to n-and-a-half pixels in both dimensions. * * See also: im_maxpos(), im_min(), im_stats(). * * Returns: 0 on success, -1 on error */ int im_maxpos_subpel( IMAGE *in, double *x, double *y ){ #define FUNCTION_NAME "im_maxpos_subpel" int xs[5]; int ys[5]; double vals[5]; int xa, ya, xb, yb; double vxa, vya, vxb, vyb; if( im_maxpos_vec( in, xs, ys, vals, 5 )) return -1; #define WRAP_TEST_RETURN() \ \ /* wrap around if we have alignment -1 < d <= 0 */ \ /* (change it to: size - 1 <= d < size ) */ \ \ if( ! xa && in-> Xsize - 1 == xb ) \ xa= in-> Xsize; \ \ else if( ! xb && in-> Xsize - 1 == xa ) \ xb= in-> Xsize; \ \ if( ! ya && in-> Ysize - 1 == yb ) \ ya= in-> Ysize; \ \ else if( ! yb && in-> Ysize - 1 == ya ) \ yb= in-> Ysize; \ \ if( 1 == abs( xb - xa ) && 1 == abs( yb - ya )){ \ *x= ((double)xa) + ((double)( xb - xa )) * ( vxb / ( vxa + vxb )); \ *y= ((double)ya) + ((double)( yb - ya )) * ( vyb / ( vya + vyb )); \ return 0; \ } #define TEST3( A, B ) \ if( xs[0] == xs[A] && ys[0] == ys[B] ){ \ xa= xs[0]; \ ya= ys[0]; \ xb= xs[B]; \ yb= ys[A]; \ vxa= vals[0]; \ vya= vals[0]; \ vxb= vals[B]; \ vyb= vals[A]; \ WRAP_TEST_RETURN() \ } TEST3( 1, 2 ) TEST3( 2, 1 ) if( MOST_OF( vals[1], vals[0] ) && MOST_OF( vals[2], vals[0] ) && MOST_OF( vals[3], vals[0] ) && LITTLE_OF( vals[4], vals[0] )){ #define TEST4( A, B, C, D, E, F, G, H ) \ if( xs[A] == xs[B] && xs[C] == xs[D] && ys[E] == ys[F] && ys[G] == ys[H] ){ \ xa= xs[A]; \ xb= xs[C]; \ ya= ys[E]; \ yb= ys[G]; \ vxa= vals[A] + vals[B]; \ vxb= vals[C] + vals[D]; \ vya= vals[E] + vals[F]; \ vyb= vals[G] + vals[H]; \ WRAP_TEST_RETURN() \ } TEST4( 0, 3, 1, 2, 0, 1, 2, 3 ) TEST4( 0, 1, 2, 3, 0, 3, 1, 2 ) TEST4( 0, 3, 1, 2, 0, 2, 1, 3 ) TEST4( 0, 2, 1, 3, 0, 3, 1, 2 ) } im_warn( FUNCTION_NAME, "registration performed to nearest pixel only: correlation does not have the expected distribution for sub-pixel registration" ); *x= (double) xs[0]; *y= (double) ys[0]; return 0; } vips-7.38.5/libvips/mosaicing/im_chkpair.c0000644000175000017500000001340312303140253015405 00000000000000/* find image overlaps * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on : 18/04/1991 * 8/7/93 JC * - allows IM_CODING_LABQ coding * - now calls im_incheck() * 13/7/95 JC * - rewritten * - now uses im_spcor() * 13/8/96 JC * - order of args changed to help C++ API * 24/1/11 * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "mosaic.h" /** * im_correl: * @ref: reference image * @sec: secondary image * @xref: position in reference image * @yref: position in reference image * @xsec: position in secondary image * @ysec: position in secondary image * @hwindowsize: half window size * @hsearchsize: half search size * @correlation: return detected correlation * @x: return found position * @y: return found position * * This operation finds the position of @sec within @ref. * * The area around * (@xsec, @ysec) is searched for the best match to the area around (@xref, * @yref). It searches an area of size @hsearchsize for a * match of size @hwindowsize. The position of the best match is * returned, together with the correlation at that point. * * Only the first band of each image is correlated. @ref and @sec may be * very large --- the function extracts and generates just the * parts needed. Correlation is done with im_spcor(); the position of * the maximum is found with im_maxpos(). * * See also: im_match_linear(), im_match_linear_search(), im_lrmosaic(). * * Returns: 0 on success, -1 on error */ int im_correl( IMAGE *ref, IMAGE *sec, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, double *correlation, int *x, int *y ) { IMAGE *surface = im_open( "surface", "t" ); IMAGE *t1, *t2, *t3, *t4; Rect refr, secr; Rect winr, srhr; Rect wincr, srhcr; if( !surface || !(t1 = im_open_local( surface, "correlate:1", "p" )) || !(t2 = im_open_local( surface, "correlate:1", "p" )) || !(t3 = im_open_local( surface, "correlate:1", "p" )) || !(t4 = im_open_local( surface, "correlate:1", "p" )) ) return( -1 ); /* Find position of window and search area, and clip against image * size. */ refr.left = 0; refr.top = 0; refr.width = ref->Xsize; refr.height = ref->Ysize; winr.left = xref - hwindowsize; winr.top = yref - hwindowsize; winr.width = hwindowsize*2 + 1; winr.height = hwindowsize*2 + 1; im_rect_intersectrect( &refr, &winr, &wincr ); secr.left = 0; secr.top = 0; secr.width = sec->Xsize; secr.height = sec->Ysize; srhr.left = xsec - hsearchsize; srhr.top = ysec - hsearchsize; srhr.width = hsearchsize*2 + 1; srhr.height = hsearchsize*2 + 1; im_rect_intersectrect( &secr, &srhr, &srhcr ); /* Extract window and search area. */ if( im_extract_area( ref, t1, wincr.left, wincr.top, wincr.width, wincr.height ) || im_extract_area( sec, t2, srhcr.left, srhcr.top, srhcr.width, srhcr.height ) ) { im_close( surface ); return( -1 ); } /* Make sure we have just one band. From im_*mosaic() we will, but * from im_match_linear_search() etc. we may not. */ if( t1->Bands != 1 ) { if( im_extract_band( t1, t3, 0 ) ) { im_close( surface ); return( -1 ); } t1 = t3; } if( t2->Bands != 1 ) { if( im_extract_band( t2, t4, 0 ) ) { im_close( surface ); return( -1 ); } t2 = t4; } /* Search! */ if( im_spcor( t2, t1, surface ) ) { im_close( surface ); return( -1 ); } /* Find maximum of correlation surface. */ if( im_maxpos( surface, x, y, correlation ) ) { im_close( surface ); return( -1 ); } im_close( surface ); /* Translate back to position within sec. */ *x += srhcr.left; *y += srhcr.top; return( 0 ); } int im__chkpair( IMAGE *ref, IMAGE *sec, TIE_POINTS *points ) { int i; int x, y; double correlation; const int hcor = points->halfcorsize; const int harea = points->halfareasize; /* Check images. */ if( im_incheck( ref ) || im_incheck( sec ) ) return( -1 ); if( ref->Bands != sec->Bands || ref->BandFmt != sec->BandFmt || ref->Coding != sec->Coding ) { im_error( "im_chkpair", "%s", _( "inputs incompatible" ) ); return( -1 ); } if( ref->Bands != 1 || ref->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im_chkpair", "%s", _( "help!" ) ); return( -1 ); } for( i = 0; i < points->nopoints; i++ ) { /* Find correlation point. */ if( im_correl( ref, sec, points->x_reference[i], points->y_reference[i], points->x_reference[i], points->y_reference[i], hcor, harea, &correlation, &x, &y ) ) return( -1 ); /* And note in x_secondary. */ points->x_secondary[i] = x; points->y_secondary[i] = y; points->correlation[i] = correlation; /* Note each dx, dy too. */ points->dx[i] = points->x_secondary[i] - points->x_reference[i]; points->dy[i] = points->y_secondary[i] - points->y_reference[i]; } return( 0 ); } vips-7.38.5/libvips/mosaicing/im_initialize.c0000644000175000017500000000431412303140253016126 00000000000000/* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "mosaic.h" int im__initialize( TIE_POINTS *points ) { if( im__clinear( points ) ) { /* im_clinear failed! Set some sensible fallback values. */ int i, j; double xdelta, ydelta, max_cor; double a1, a2; int *xref = &points->x_reference[0]; int *yref = &points->y_reference[0]; int *xsec = &points->x_secondary[0]; int *ysec = &points->y_secondary[0]; double *corr = &points->correlation[0]; double *dx = &points->dx[0]; double *dy = &points->dy[0]; int npt = points->nopoints; max_cor = 0.0; for( i = 0; i < npt; i++ ) if( corr[i] > max_cor ) max_cor = corr[i]; max_cor = max_cor - 0.04; xdelta = 0.0; ydelta = 0.0; j = 0; for( i = 0; i < npt; i++ ) if( corr[i] >= max_cor ) { xdelta += xsec[i] - xref[i]; ydelta += ysec[i] - yref[i]; ++j; } xdelta = xdelta/j; ydelta = ydelta/j; for(i = 0; i < npt; i++ ) { dx[i] = (xsec[i] - xref[i]) - xdelta; dy[i] = (ysec[i] - yref[i]) - ydelta; } for( i = 0; i < npt; i++ ) { a1 = dx[i]; a2 = dy[i]; points->deviation[i] = sqrt( a1*a1 + a2*a2 ); } points->l_scale = 1.0; points->l_angle = 0.0; points->l_deltax = xdelta; points->l_deltay = ydelta; } return( 0 ); } vips-7.38.5/libvips/mosaicing/mosaic.h0000644000175000017500000000663712303140253014572 00000000000000/* @(#) Local definitions used by the mosaicing program * @(#) If IM_MAXPOINTS change please ensure that it is still a multiple of * @(#) AREAS or else AREAS must change as well. Initial setup is for * @(#) IM_MAXPOINTS = 60, AREAS = 3. * @(#) * Copyright: 1990, 1991 N. Dessipris * Author: Nicos Dessipris * Written on: 07/11/1989 * Modified on : 29/11/1989 */ /* Copyright (C) 1991-2003 The National Gallery This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #define IM_MAXPOINTS (60) /* IM_MAXPOINTS % AREAS must be zero */ #define AREAS (3) typedef struct { char *reference; /* filename of reference */ char *secondary; /* filename of secondary */ int deltax; /* initial estimate of displacement */ int deltay; /* initial estimate of displacement */ int nopoints; /* must be multiple of AREAS and <= IM_MAXPOINTS */ int halfcorsize; /* recommended 5 */ int halfareasize; /* recommended 8 */ /* x, y_reference and contrast found by im_calcon() */ int x_reference[IM_MAXPOINTS], y_reference[IM_MAXPOINTS]; int contrast[IM_MAXPOINTS]; /* x, y_secondary and correlation set by im_chkpair() */ int x_secondary[IM_MAXPOINTS], y_secondary[IM_MAXPOINTS]; /* returns the corrected best correlation * as detected in 2*halfareasize+1 * centered at point (x2, y2) and using * correlation area 2*halfareasize+1 */ double correlation[IM_MAXPOINTS]; /* Coefficients calculated by im_clinear() */ double l_scale, l_angle, l_deltax, l_deltay; /* used by im_clinear() */ double dx[IM_MAXPOINTS], dy[IM_MAXPOINTS]; double deviation[IM_MAXPOINTS]; } TIE_POINTS; int im__chkpair( IMAGE *, IMAGE *, TIE_POINTS *point ); int im__initialize( TIE_POINTS *points ); int im__improve( TIE_POINTS *inpoints, TIE_POINTS *outpoints ); int im__avgdxdy( TIE_POINTS *points, int *dx, int *dy ); int im__lrcalcon( IMAGE *ref, TIE_POINTS *points ); int im__tbcalcon( IMAGE *ref, TIE_POINTS *points ); int im__coeff( int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, double *a, double *b, double *dx, double *dy ); int im__clinear( TIE_POINTS *points ); int im__find_lroverlap( IMAGE *ref_in, IMAGE *sec_in, IMAGE *out, int bandno_in, int xref, int yref, int xsec, int ysec, int halfcorrelation, int halfarea, int *dx0, int *dy0, double *scale1, double *angle1, double *dx1, double *dy1 ); int im__find_tboverlap( IMAGE *ref_in, IMAGE *sec_in, IMAGE *out, int bandno_in, int xref, int yref, int xsec, int ysec, int halfcorrelation, int halfarea, int *dx0, int *dy0, double *scale1, double *angle1, double *dx1, double *dy1 ); vips-7.38.5/libvips/mosaicing/im_align_bands.c0000644000175000017500000000525712303140253016235 00000000000000/* * Brute force align the bands of an image. * * Copyright: Nottingham Trent University * Author: Tom Vajzovic * Written on: 2008-02-04 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include /** * im_align_bands: * @in: image to align * @out: output image * * This operation uses im_phasecor_fft() to find an integer displacement to * align all image bands band 0. It is very slow and not very accurate. * * Use im_estpar() in preference: it's fast and accurate. * * See also: im_global_balancef(), im_remosaic(). * * Returns: 0 on success, -1 on error */ int im_align_bands( IMAGE *in, IMAGE *out ){ #define FUNCTION_NAME "im_align_bands" if( im_piocheck( in, out )) return -1; if( 1 == in-> Bands ) return im_copy( in, out ); { IMAGE **bands= IM_ARRAY( out, 2 * in-> Bands, IMAGE* ); IMAGE **wrapped_bands= bands + in-> Bands; double x= 0.0; double y= 0.0; int i; if( ! bands || im_open_local_array( out, bands, in-> Bands, FUNCTION_NAME ": bands", "p" ) || im_open_local_array( out, wrapped_bands + 1, in-> Bands - 1, FUNCTION_NAME ": wrapped_bands", "p" )) return -1; for( i= 0; i < in-> Bands; ++i ) if( im_extract_band( in, bands[i], i )) return -1; wrapped_bands[ 0 ]= bands[0]; for( i= 1; i < in-> Bands; ++i ){ IMAGE *temp= im_open( FUNCTION_NAME ": temp", "t" ); double this_x, this_y, val; if( ! temp || im_phasecor_fft( bands[i-1], bands[i], temp ) || im_maxpos_avg( temp, & this_x, & this_y, & val ) || im_close( temp )) return -1; x+= this_x; y+= this_y; if( im_wrap( bands[i], wrapped_bands[i], (int) x, (int) y )) return -1; } return im_gbandjoin( wrapped_bands, out, in-> Bands ); } #undef FUNCTION_NAME } vips-7.38.5/libvips/mosaicing/global_balance.h0000644000175000017500000000734712303140253016223 00000000000000/* Header for the .desc file parser in im_global_balance() * * 1/11/01 JC * - cut from global_balance.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Number of entries in spine of file name hash table. */ #define SYM_TAB_SIZE (113) typedef enum _JoinType JoinType; typedef struct _OverlapInfo OverlapInfo; typedef struct _JoinNode JoinNode; typedef struct _SymbolTable SymbolTable; /* Type of a transform function. */ typedef IMAGE *(*transform_fn)( JoinNode *, void * ); /* Join type. */ enum _JoinType { JOIN_LR, /* im_lrmerge join */ JOIN_TB, /* im_tbmerge join */ JOIN_LRROTSCALE, /* 1st oder lrmerge */ JOIN_TBROTSCALE, /* 1st oder tbmerge */ JOIN_CP, /* im_copy operation */ JOIN_LEAF /* Base file */ }; /* An overlap struct. Attach a list of these to each leaf, one for each of * the other leaves we touch. */ struct _OverlapInfo { JoinNode *node; /* The base node - we are on this list */ JoinNode *other; /* Node we overlap with */ Rect overlap; /* The overlap area */ DOUBLEMASK *nstats; /* Node's stats for overlap area */ DOUBLEMASK *ostats; /* Other's stats for overlap area */ }; /* Struct for a join node. */ struct _JoinNode { char *name; /* This file name */ JoinType type; /* What kind of join */ SymbolTable *st; /* Symbol table we are on */ int dirty; /* Used for circularity detection */ /* Params from join line in .desc file. */ double a, b; double dx, dy; int mwidth; /* Cumulative transform for this node. What our parents do to us. * cumtrn.area is position and size of us, thistrn.area is pos and * size of arg2. */ VipsTransformation cumtrn; /* X-tras for LR/TB. thistrn is what we do to arg2. */ JoinNode *arg1; /* Left or up thing to join */ JoinNode *arg2; /* Right or down thing to join */ VipsTransformation thistrn; /* Transformation for arg2 */ /* Special for leaves: all the join_nodes we overlap with, the * IMAGE for that file, and the index. */ GSList *overlaps; IMAGE *im; IMAGE *trnim; /* Transformed image .. used in 2nd pass */ int index; }; /* We need to keep a table of JoinNode, indexed by file name. Hash into one * of these from the name to get a pointer to the base of a list of JoinNode * which hash to that offset. */ struct _SymbolTable { GSList **table; /* Ptr to base of hash table */ int sz; /* Size of hash table */ IMAGE *im; /* Malloc relative to this */ int novl; /* Number of unique overlaps */ int nim; /* Number of leaf images */ int njoin; /* Number of join nodes */ JoinNode *root; /* Root of join tree */ JoinNode *leaf; /* Leaf nominated to be 1.000 */ double *fac; /* Correction factors */ }; IMAGE *im__global_open_image( SymbolTable *st, char *name ); SymbolTable *im__build_symtab( IMAGE *out, int sz ); int im__parse_desc( SymbolTable *st, IMAGE *in ); void *im__map_table( SymbolTable *st, void *(*fn)(), void *a, void *b ); int im__build_mosaic( SymbolTable *st, IMAGE *out, transform_fn tfn, void * ); vips-7.38.5/libvips/mosaicing/Makefile.in0000644000175000017500000005444312303144056015216 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/mosaicing DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmosaicing_la_LIBADD = am_libmosaicing_la_OBJECTS = im_align_bands.lo match.lo mosaic1.lo \ mosaicing_dispatch.lo global_balance.lo im_avgdxdy.lo \ im_chkpair.lo im_clinear.lo im_improve.lo im_initialize.lo \ im_lrcalcon.lo im_lrmerge.lo im_lrmosaic.lo \ im_maxpos_subpel.lo im_tbcalcon.lo im_tbmerge.lo \ im_remosaic.lo im_tbmosaic.lo libmosaicing_la_OBJECTS = $(am_libmosaicing_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmosaicing_la_SOURCES) DIST_SOURCES = $(libmosaicing_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libmosaicing.la libmosaicing_la_SOURCES = \ im_align_bands.c \ match.c \ mosaic1.c \ mosaicing_dispatch.c \ global_balance.c \ im_avgdxdy.c \ im_chkpair.c \ im_clinear.c \ im_improve.c \ im_initialize.c \ im_lrcalcon.c \ im_lrmerge.c \ im_lrmosaic.c \ im_maxpos_subpel.c \ im_tbcalcon.c \ im_tbmerge.c \ im_remosaic.c \ im_tbmosaic.c \ merge.h \ global_balance.h \ mosaic.h AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/mosaicing/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/mosaicing/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmosaicing.la: $(libmosaicing_la_OBJECTS) $(libmosaicing_la_DEPENDENCIES) $(EXTRA_libmosaicing_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmosaicing_la_OBJECTS) $(libmosaicing_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/global_balance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_align_bands.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_avgdxdy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_chkpair.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_clinear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_improve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_initialize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_lrcalcon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_lrmerge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_lrmosaic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_maxpos_subpel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_remosaic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_tbcalcon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_tbmerge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_tbmosaic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/match.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mosaic1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mosaicing_dispatch.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/mosaicing/Makefile.am0000644000175000017500000000076012303140253015171 00000000000000noinst_LTLIBRARIES = libmosaicing.la libmosaicing_la_SOURCES = \ im_align_bands.c \ match.c \ mosaic1.c \ mosaicing_dispatch.c \ global_balance.c \ im_avgdxdy.c \ im_chkpair.c \ im_clinear.c \ im_improve.c \ im_initialize.c \ im_lrcalcon.c \ im_lrmerge.c \ im_lrmosaic.c \ im_maxpos_subpel.c \ im_tbcalcon.c \ im_tbmerge.c \ im_remosaic.c \ im_tbmosaic.c \ merge.h \ global_balance.h \ mosaic.h AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/mosaicing/mosaic1.c0000644000175000017500000004220612303140253014636 00000000000000/* 1st order mosaic functions * * 31/7/97 JC * - done! * 12/9/97 JC * - mods so global_balance() can work with 1st order mosaics * 27/12/99 JC * - now uses affine() stuff * - small tidies * 2/2/01 JC * - added tunable max blend width * 23/3/01 JC * - better mosaic1 calcs ... was a bit broken * 14/12/04 * - works for LABQ as well * 25/1/11 * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "mosaic.h" #include "merge.h" /* #define DEBUG */ /* define this to get old not-really-working joiner. #define OLD */ /* Like im_similarity(), but return the transform we generated. */ static int apply_similarity( VipsTransformation *trn, IMAGE *in, IMAGE *out, double a, double b, double dx, double dy ) { trn->iarea.left = 0; trn->iarea.top = 0; trn->iarea.width = in->Xsize; trn->iarea.height = in->Ysize; trn->a = a; trn->b = -b; trn->c = b; trn->d = a; trn->idx = 0; trn->idy = 0; trn->odx = dx; trn->ody = dy; vips__transform_set_area( trn ); if( vips__transform_calc_inverse( trn ) ) return( -1 ); if( vips__affine( in, out, trn ) ) return( -1 ); return( 0 ); } /* A join function ... either left-right or top-bottom rotscalemerge. */ typedef int (*joinfn)( IMAGE *, IMAGE *, IMAGE *, double, double, double, double, int ); /* similarity+lrmerge. */ int im__lrmerge1( IMAGE *ref, IMAGE *sec, IMAGE *out, double a, double b, double dx, double dy, int mwidth ) { VipsTransformation trn; IMAGE *t1 = im_open_local( out, "im_lrmosaic1:1", "p" ); VipsBuf buf; char text[1024]; /* Scale, rotate and displace sec. */ if( !t1 || apply_similarity( &trn, sec, t1, a, b, dx, dy ) ) return( -1 ); /* And join to ref. */ if( im__lrmerge( ref, t1, out, -trn.oarea.left, -trn.oarea.top, mwidth ) ) return( -1 ); /* Note parameters in history file ... for global balance to pick up * later. */ vips_buf_init_static( &buf, text, 1024 ); vips_buf_appendf( &buf, "#LRROTSCALE <%s> <%s> <%s> <", ref->filename, sec->filename, out->filename ); vips_buf_appendg( &buf, a ); vips_buf_appendf( &buf, "> <" ); vips_buf_appendg( &buf, b ); vips_buf_appendf( &buf, "> <" ); vips_buf_appendg( &buf, dx ); vips_buf_appendf( &buf, "> <" ); vips_buf_appendg( &buf, dy ); vips_buf_appendf( &buf, "> <%d>", mwidth ); if( im_histlin( out, "%s", vips_buf_all( &buf ) ) ) return( -1 ); return( 0 ); } /* similarity+tbmerge. */ int im__tbmerge1( IMAGE *ref, IMAGE *sec, IMAGE *out, double a, double b, double dx, double dy, int mwidth ) { VipsTransformation trn; IMAGE *t1 = im_open_local( out, "im_lrmosaic1:2", "p" ); VipsBuf buf; char text[1024]; /* Scale, rotate and displace sec. */ if( !t1 || apply_similarity( &trn, sec, t1, a, b, dx, dy ) ) return( -1 ); /* And join to ref. */ if( im__tbmerge( ref, t1, out, -trn.oarea.left, -trn.oarea.top, mwidth ) ) return( -1 ); /* Note parameters in history file ... for global balance to pick up * later. */ vips_buf_init_static( &buf, text, 1024 ); vips_buf_appendf( &buf, "#TBROTSCALE <%s> <%s> <%s> <", ref->filename, sec->filename, out->filename ); vips_buf_appendg( &buf, a ); vips_buf_appendf( &buf, "> <" ); vips_buf_appendg( &buf, b ); vips_buf_appendf( &buf, "> <" ); vips_buf_appendg( &buf, dx ); vips_buf_appendf( &buf, "> <" ); vips_buf_appendg( &buf, dy ); vips_buf_appendf( &buf, "> <%d>", mwidth ); if( im_histlin( out, "%s", vips_buf_all( &buf ) ) ) return( -1 ); return( 0 ); } /* Join two images, using a pair of tie-points as parameters. */ static int rotjoin( IMAGE *ref, IMAGE *sec, IMAGE *out, joinfn jfn, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) { double a, b, dx, dy; /* Solve to get scale + rot + disp. */ if( im__coeff( xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, &a, &b, &dx, &dy ) ) return( -1 ); /* Scale, rotate and displace sec. */ if( jfn( ref, sec, out, a, b, dx, dy, mwidth ) ) return( -1 ); return( 0 ); } /** * im_lrmerge1: * @ref: reference image * @sec: secondary image * @out: output image * @xr1: first reference tie-point * @yr1: first reference tie-point * @xs1: first secondary tie-point * @ys1: first secondary tie-point * @xr2: second reference tie-point * @yr2: second reference tie-point * @xs2: second secondary tie-point * @ys2: second secondary tie-point * @mwidth: maximum blend width * * This operation joins two images left-right (with @ref on the left) * given a pair of tie-points. @sec is scaled and rotated as * necessary before the join. * * @mwidth limits the maximum width of the * blend area. A value of "-1" means "unlimited". The two images are blended * with a raised cosine. * * Pixels with all bands equal to zero are "transparent", that * is, zero pixels in the overlap area do not contribute to the merge. * This makes it possible to join non-rectangular images. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: im_tbmerge1(), im_lrmerge(), im_insert(), im_global_balance(). * * Returns: 0 on success, -1 on error */ int im_lrmerge1( IMAGE *ref, IMAGE *sec, IMAGE *out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) { return( rotjoin( ref, sec, out, im__lrmerge1, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, mwidth ) ); } /** * im_tbmerge1: * @ref: reference image * @sec: secondary image * @out: output image * @xr1: first reference tie-point * @yr1: first reference tie-point * @xs1: first secondary tie-point * @ys1: first secondary tie-point * @xr2: second reference tie-point * @yr2: second reference tie-point * @xs2: second secondary tie-point * @ys2: second secondary tie-point * @mwidth: maximum blend width * * This operation joins two images top-bottom (with @ref on the top) * given a pair of tie-points. @sec is scaled and rotated as * necessary before the join. * * @mwidth limits the maximum height of the * blend area. A value of "-1" means "unlimited". The two images are blended * with a raised cosine. * * Pixels with all bands equal to zero are "transparent", that * is, zero pixels in the overlap area do not contribute to the merge. * This makes it possible to join non-rectangular images. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: im_lrmerge1(), im_tbmerge(), im_insert(), im_global_balance(). * * Returns: 0 on success, -1 on error */ int im_tbmerge1( IMAGE *ref, IMAGE *sec, IMAGE *out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int mwidth ) { return( rotjoin( ref, sec, out, im__tbmerge1, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, mwidth ) ); } /* Like rotjoin, but do a search to refine the tie-points. */ static int rotjoin_search( IMAGE *ref, IMAGE *sec, IMAGE *out, joinfn jfn, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int halfcorrelation, int halfarea, int balancetype, int mwidth ) { VipsTransformation trn; double cor1, cor2; double a, b, dx, dy; double xs3, ys3; double xs4, ys4; int xs5, ys5; int xs6, ys6; double xs7, ys7; double xs8, ys8; /* Temps. */ IMAGE *t[3]; if( im_open_local_array( out, t, 3, "rotjoin_search", "p" ) ) return( -1 ); /* Unpack LABQ to LABS for correlation. */ if( ref->Coding == IM_CODING_LABQ ) { if( im_LabQ2LabS( ref, t[0] ) ) return( -1 ); } else t[0] = ref; if( sec->Coding == IM_CODING_LABQ ) { if( im_LabQ2LabS( sec, t[1] ) ) return( -1 ); } else t[1] = sec; /* Solve to get scale + rot + disp. */ if( im__coeff( xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, &a, &b, &dx, &dy ) || apply_similarity( &trn, t[1], t[2], a, b, dx, dy ) ) return( -1 ); /* Map points on sec to rotated image. */ vips__transform_forward_point( &trn, xs1, ys1, &xs3, &ys3 ); vips__transform_forward_point( &trn, xs2, ys2, &xs4, &ys4 ); /* Refine tie-points on rotated image. Remember the clip * vips__transform_set_area() has set, and move the sec tie-points * accordingly. */ if( im_correl( t[0], t[2], xr1, yr1, xs3 - trn.oarea.left, ys3 - trn.oarea.top, halfcorrelation, halfarea, &cor1, &xs5, &ys5 ) ) return( -1 ); if( im_correl( t[0], t[2], xr2, yr2, xs4 - trn.oarea.left, ys4 - trn.oarea.top, halfcorrelation, halfarea, &cor2, &xs6, &ys6 ) ) return( -1 ); #ifdef DEBUG printf( "rotjoin_search: nudged pair 1 from %d, %d to %d, %d\n", xs3 - trn.oarea.left, ys3 - trn.oarea.top, xs5, ys5 ); printf( "rotjoin_search: nudged pair 2 from %d, %d to %d, %d\n", xs4 - trn.oarea.left, ys4 - trn.oarea.top, xs6, ys6 ); #endif /*DEBUG*/ /* Put the sec tie-points back into output space. */ xs5 += trn.oarea.left; ys5 += trn.oarea.top; xs6 += trn.oarea.left; ys6 += trn.oarea.top; /* ... and now back to input space again. */ vips__transform_invert_point( &trn, xs5, ys5, &xs7, &ys7 ); vips__transform_invert_point( &trn, xs6, ys6, &xs8, &ys8 ); /* Recalc the transform using the refined points. */ if( im__coeff( xr1, yr1, xs7, ys7, xr2, yr2, xs8, ys8, &a, &b, &dx, &dy ) ) return( -1 ); /* Scale and rotate final. */ if( jfn( ref, sec, out, a, b, dx, dy, mwidth ) ) return( -1 ); return( 0 ); } /** * im_lrmosaic1: * @ref: reference image * @sec: secondary image * @out: output image * @bandno: band to search for features * @xr1: first reference tie-point * @yr1: first reference tie-point * @xs1: first secondary tie-point * @ys1: first secondary tie-point * @xr2: second reference tie-point * @yr2: second reference tie-point * @xs2: second secondary tie-point * @ys2: second secondary tie-point * @hwindowsize: half window size * @hsearchsize: half search size * @balancetype: no longer used * @mwidth: maximum blend width * * This operation joins two images left-right (with @ref on the left) * given an approximate pair of tie-points. @sec is scaled and rotated as * necessary before the join. * * Before performing the transformation, the tie-points are improved by * searching band @bandno in an area of @sec of size @hsearchsize for a * match of size @hwindowsize to @ref. * * @mwidth limits the maximum width of the * blend area. A value of "-1" means "unlimited". The two images are blended * with a raised cosine. * * Pixels with all bands equal to zero are "transparent", that * is, zero pixels in the overlap area do not contribute to the merge. * This makes it possible to join non-rectangular images. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: im_tbmosaic1(), im_lrmerge(), im_insert(), im_global_balance(). * * Returns: 0 on success, -1 on error */ int im_lrmosaic1( IMAGE *ref, IMAGE *sec, IMAGE *out, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int hwindowsize, int hsearchsize, int balancetype, int mwidth ) { return( rotjoin_search( ref, sec, out, im__lrmerge1, bandno, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, hwindowsize, hsearchsize, balancetype, mwidth ) ); } /** * im_tbmosaic1: * @ref: reference image * @sec: secondary image * @out: output image * @bandno: band to search for features * @xr1: first reference tie-point * @yr1: first reference tie-point * @xs1: first secondary tie-point * @ys1: first secondary tie-point * @xr2: second reference tie-point * @yr2: second reference tie-point * @xs2: second secondary tie-point * @ys2: second secondary tie-point * @hwindowsize: half window size * @hsearchsize: half search size * @balancetype: no longer used * @mwidth: maximum blend width * * This operation joins two images top-bottom (with @ref on the top) * given an approximate pair of tie-points. @sec is scaled and rotated as * necessary before the join. * * Before performing the transformation, the tie-points are improved by * searching band @bandno in an area of @sec of size @hsearchsize for a * match of size @hwindowsize to @ref. * * @mwidth limits the maximum height of the * blend area. A value of "-1" means "unlimited". The two images are blended * with a raised cosine. * * Pixels with all bands equal to zero are "transparent", that * is, zero pixels in the overlap area do not contribute to the merge. * This makes it possible to join non-rectangular images. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: im_lrmosaic1(), im_tbmerge(), im_insert(), im_global_balance(). * * Returns: 0 on success, -1 on error */ int im_tbmosaic1( IMAGE *ref, IMAGE *sec, IMAGE *out, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int hwindowsize, int hsearchsize, int balancetype, int mwidth ) { return( rotjoin_search( ref, sec, out, im__tbmerge1, bandno, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, hwindowsize, hsearchsize, balancetype, mwidth ) ); } #ifdef OLD /* 1st order mosaic using im__find_lroverlap() ... does not work too well :( * Look at im__find_lroverlap() for problem? */ static int old_lrmosaic1( IMAGE *ref, IMAGE *sec, IMAGE *out, int bandno, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int halfcorrelation, int halfarea, int balancetype, int mwidth ) { VipsTransformation trn1, trn2; int dx0, dy0; double a, b, dx, dy; double a1, b1, dx1, dy1; double af, bf, dxf, dyf; int xpos, ypos; int xpos1, ypos1; /* Temps. */ IMAGE *t1 = im_open_local( out, "im_lrmosaic1:1", "p" ); IMAGE *t2 = im_open_local( out, "im_lrmosaic1:2", "p" ); IMAGE *dummy; if( !t1 || !t2 ) return( -1 ); /* Solve to get scale + rot + disp. */ if( im__coeff( xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, &a, &b, &dx, &dy ) || apply_similarity( &trn1, sec, t1, a, b, dx, dy ) ) return( -1 ); /* Correct tie-points. dummy is just a placeholder used to ensure that * memory used by the analysis phase is freed as soon as possible. */ if( !(dummy = im_open( "placeholder:1", "p" )) ) return( -1 ); if( im__find_lroverlap( ref, t1, dummy, bandno, -trn1.area.left, -trn1.area.top, 0, 0, halfcorrelation, halfarea, &dx0, &dy0, &a1, &b1, &dx1, &dy1 ) ) { im_close( dummy ); return( -1 ); } im_close( dummy ); /* Now combine the two transformations to get a corrected transform. */ af = a1 * a - b1 * b; bf = a1 * b + b1 * a; dxf = a1 * dx - b1 * dy + dx1; dyf = b1 * dx + a1 * dy + dy1; printf( "transform was: a = %g, b = %g, dx = %g, dy = %g\n", a, b, dx, dy ); printf( "correction: a = %g, b = %g, dx = %g, dy = %g\n", a1, b1, dx1, dy1 ); printf( "final: a = %g, b = %g, dx = %g, dy = %g\n", af, bf, dxf, dyf ); /* Scale and rotate final. */ if( apply_similarity( &trn2, sec, t2, af, bf, dxf, dyf ) ) return( -1 ); printf( "disp: trn1 left = %d, top = %d\n", trn1.area.left, trn1.area.top ); printf( "disp: trn2 left = %d, top = %d\n", trn2.area.left, trn2.area.top ); /* And join to ref. */ if( im_lrmerge( ref, t2, out, -trn2.area.left, -trn2.area.top, mwidth ) ) return( -1 ); return( 0 ); } #endif /*OLD*/ vips-7.38.5/libvips/mosaicing/im_lrmerge.c0000644000175000017500000006771112303140253015434 00000000000000/* Merge two images left-right. * * Copyright: 1990, 1991 N. Dessipris * Author: N. Dessipris * Written on: 20/09/1990 * Updated on: 17/04/1991 * 1/6/92: JC * - check for difference bug fixed * - geometry calculations improved and simplified * - small speedups Kirk Martinez for Sys5 29/4/93 * 7/8/93 JC * - ANSIfied * - memory leaks fixed, ready for partial v2 * - now does IM_CODING_LABQ too * 8/11/93 JC * - now propogates both input histories * - adds magic lines for global mosaic optimisation * * * May/1994 Ahmed Abbood * * - Modified to use partials on all IO * June/1995 Ahmed Abbood * * - Modified to work with different types of images. * * 16/6/95 JC * - tidied up a little * - added to VIPS! * 7/9/95 JC * - split into two parts: im_lrmerge() and im__lrmerge() * - latter called by im_lrmosaic() * - just the same as public im_lrmerge(), but adds no history * - necessary for im_global_balance() * - small bugs fixed * 10/10/95 JC * - better checks that parameters are sensible * 11/10/95 JC * - Kirk spotted what a load of rubbish Ahmed's code is * - rewritten - many, many bugs fixed * 24/1/97 JC * - now outputs bounding area of input images, rather than clipping * - ignores 0 pixels in blend * - small tidies * 7/2/97 JC * - new blend, caching * 25/2/97 JC * - old blend back, much simpler * - speed this up at some point if you think of an easy way to do it * 29/7/97 JC * - IM_CODING_LABQ blend now works, was bug in im_wrapone() * - small tidies * 10/1/98 JC * - merge LUTs now shared between all running mergers * - frees memory explicitly in im__stop_merge, for much better memory * use in large mosaics, huge improvement! * 18/2/98 JC * - im_demand_hint() call added * 19/2/98 JC * - now works for any dx/dy by calling im_insert() for bizarre cases * 26/9/99 JC * - ooops, blend lut was wrong! wonder how long that's been broken, * since feb97 I guess * 2/2/01 JC * - added tunable max blend width * 8/3/01 JC * - switched to integer arithmetic for integer blends * 7/11/01 JC * - more sophisticated transparency handling * - tiny blend speed up * 19/3/02 JC * - move fl cache to main state for better sharing * 15/8/02 JC * - records Xoffset/Yoffset * 20/6/05 * - now requires all bands == 0 for transparency (used to just check * band 0) * 24/1/11 * - gtk-doc * - match formats and bands automatically */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include /* #define DEBUG */ #include #include #include #include #include "merge.h" /* Blend luts. Shared between all lr and tb blends. */ double *im__coef1 = NULL; double *im__coef2 = NULL; int *im__icoef1 = NULL; int *im__icoef2 = NULL; /* Create a lut for the merging area. Always BLEND_SIZE entries, we * scale later when we index it. */ int im__make_blend_luts() { int x; /* Already done? */ if( im__coef1 && im__coef2 ) return( 0 ); /* Allocate and fill. */ im__coef1 = IM_ARRAY( NULL, BLEND_SIZE, double ); im__coef2 = IM_ARRAY( NULL, BLEND_SIZE, double ); im__icoef1 = IM_ARRAY( NULL, BLEND_SIZE, int ); im__icoef2 = IM_ARRAY( NULL, BLEND_SIZE, int ); if( !im__coef1 || !im__coef2 || !im__icoef1 || !im__icoef2 ) return( -1 ); for( x = 0; x < BLEND_SIZE; x++ ) { double a = IM_PI * x / (BLEND_SIZE - 1.0); im__coef1[x] = (cos( a ) + 1.0) / 2.0; im__coef2[x] = 1.0 - im__coef1[x]; im__icoef1[x] = im__coef1[x] * BLEND_SCALE; im__icoef2[x] = im__coef2[x] * BLEND_SCALE; } return( 0 ); } /* Return the position of the first non-zero pel from the left. */ static int find_first( REGION *ir, int *pos, int x, int y, int w ) { VipsPel *pr = IM_REGION_ADDR( ir, x, y ); IMAGE *im = ir->im; int ne = w * im->Bands; int i; /* Double the number of bands in a complex. */ if( vips_bandfmt_iscomplex( im->BandFmt ) ) ne *= 2; /* Search for the first non-zero band element from the left edge of the image. */ #define lsearch( TYPE ) { \ TYPE *p = (TYPE *) pr; \ \ for( i = 0; i < ne; i++ ) \ if( p[i] )\ break;\ } switch( im->BandFmt ) { case IM_BANDFMT_UCHAR: lsearch( unsigned char ); break; case IM_BANDFMT_CHAR: lsearch( signed char ); break; case IM_BANDFMT_USHORT: lsearch( unsigned short ); break; case IM_BANDFMT_SHORT: lsearch( signed short ); break; case IM_BANDFMT_UINT: lsearch( unsigned int ); break; case IM_BANDFMT_INT: lsearch( signed int ); break; case IM_BANDFMT_FLOAT: lsearch( float ); break; case IM_BANDFMT_DOUBLE: lsearch( double ); break; case IM_BANDFMT_COMPLEX:lsearch( float ); break; case IM_BANDFMT_DPCOMPLEX:lsearch( double ); break; default: im_error( "im_lrmerge", "%s", _( "internal error" ) ); return( -1 ); } /* i is first non-zero band element, we want first non-zero pixel. */ *pos = x + i / im->Bands; return( 0 ); } /* Return the position of the first non-zero pel from the right. */ static int find_last( REGION *ir, int *pos, int x, int y, int w ) { VipsPel *pr = IM_REGION_ADDR( ir, x, y ); IMAGE *im = ir->im; int ne = w * im->Bands; int i; /* Double the number of bands in a complex. */ if( vips_bandfmt_iscomplex( im->BandFmt ) ) ne *= 2; /* Search for the first non-zero band element from the right. */ #define rsearch( TYPE ) { \ TYPE *p = (TYPE *) pr; \ \ for( i = ne - 1; i >= 0; i-- )\ if( p[i] )\ break;\ } switch( im->BandFmt ) { case IM_BANDFMT_UCHAR: rsearch( unsigned char ); break; case IM_BANDFMT_CHAR: rsearch( signed char ); break; case IM_BANDFMT_USHORT: rsearch( unsigned short ); break; case IM_BANDFMT_SHORT: rsearch( signed short ); break; case IM_BANDFMT_UINT: rsearch( unsigned int ); break; case IM_BANDFMT_INT: rsearch( signed int ); break; case IM_BANDFMT_FLOAT: rsearch( float ); break; case IM_BANDFMT_DOUBLE: rsearch( double ); break; case IM_BANDFMT_COMPLEX:rsearch( float ); break; case IM_BANDFMT_DPCOMPLEX:rsearch( double ); break; default: im_error( "im_lrmerge", "%s", _( "internal error" ) ); return( -1 ); } /* i is first non-zero band element, we want first non-zero pixel. */ *pos = x + i / im->Bands; return( 0 ); } /* Make sure we have first/last for this area. */ static int make_firstlast( MergeInfo *inf, Overlapping *ovlap, Rect *oreg ) { REGION *rir = inf->rir; REGION *sir = inf->sir; Rect rr, sr; int y, yr, ys; int missing; /* We're going to build first/last ... lock it from other generate * threads. In fact it's harmless if we do get two writers, but we may * avoid duplicating work. */ g_mutex_lock( ovlap->fl_lock ); /* Do we already have first/last for this area? Bail out if we do. */ missing = 0; for( y = oreg->top; y < IM_RECT_BOTTOM( oreg ); y++ ) { const int j = y - ovlap->overlap.top; const int first = ovlap->first[j]; if( first < 0 ) { missing = 1; break; } } if( !missing ) { /* No work to do! */ g_mutex_unlock( ovlap->fl_lock ); return( 0 ); } /* Entire width of overlap in ref for scan-lines we want. */ rr.left = ovlap->overlap.left; rr.top = oreg->top; rr.width = ovlap->overlap.width; rr.height = oreg->height; rr.left -= ovlap->rarea.left; rr.top -= ovlap->rarea.top; /* Entire width of overlap in sec for scan-lines we want. */ sr.left = ovlap->overlap.left; sr.top = oreg->top; sr.width = ovlap->overlap.width; sr.height = oreg->height; sr.left -= ovlap->sarea.left; sr.top -= ovlap->sarea.top; #ifdef DEBUG printf( "im__lrmerge: making first/last for areas:\n" ); printf( "ref: left = %d, top = %d, width = %d, height = %d\n", rr.left, rr.top, rr.width, rr.height ); printf( "sec: left = %d, top = %d, width = %d, height = %d\n", sr.left, sr.top, sr.width, sr.height ); #endif /* Make pixels. */ if( im_prepare( rir, &rr ) || im_prepare( sir, &sr ) ) { g_mutex_unlock( ovlap->fl_lock ); return( -1 ); } /* Make first/last cache. */ for( y = oreg->top, yr = rr.top, ys = sr.top; y < IM_RECT_BOTTOM( oreg ); y++, yr++, ys++ ) { const int j = y - ovlap->overlap.top; int *first = &ovlap->first[j]; int *last = &ovlap->last[j]; /* Done this line already? */ if( *first < 0 ) { /* Search for start/end of overlap on this scan-line. */ if( find_first( sir, first, sr.left, ys, sr.width ) || find_last( rir, last, rr.left, yr, rr.width ) ) { g_mutex_unlock( ovlap->fl_lock ); return( -1 ); } /* Translate to output space. */ *first += ovlap->sarea.left; *last += ovlap->rarea.left; /* Clip to maximum blend width, if necessary. */ if( ovlap->mwidth >= 0 && *last - *first > ovlap->mwidth ) { int shrinkby = (*last - *first) - ovlap->mwidth; *first += shrinkby / 2; *last -= shrinkby / 2; } } } g_mutex_unlock( ovlap->fl_lock ); return( 0 ); } /* Test pixel == 0. */ #define TEST_ZERO( TYPE, T, RESULT ) { \ TYPE *tt = (T); \ int ii; \ \ for( ii = 0; ii < cb; ii++ ) \ if( tt[i] ) \ break; \ if( ii == cb ) \ (RESULT) = 1; \ } /* Blend two integer images. */ #define iblend( TYPE, B, IN1, IN2, OUT ) { \ TYPE *tr = (TYPE *) (IN1); \ TYPE *ts = (TYPE *) (IN2); \ TYPE *tq = (TYPE *) (OUT); \ const int cb = (B); \ const int left = IM_CLIP( 0, first - oreg->left, oreg->width ); \ const int right = IM_CLIP( left, last - oreg->left, oreg->width ); \ int ref_zero; \ int sec_zero; \ int x, b; \ int i; \ \ /* Left of the blend area. \ */ \ for( i = 0, x = 0; x < left; x++ ) { \ ref_zero = 0; \ TEST_ZERO( TYPE, tr, ref_zero ); \ if( !ref_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ } \ \ /* In blend area. \ */ \ for( x = left; x < right; x++ ) { \ ref_zero = 0; \ sec_zero = 0; \ TEST_ZERO( TYPE, tr, ref_zero ); \ TEST_ZERO( TYPE, ts, sec_zero ); \ \ if( !ref_zero && !sec_zero ) { \ int inx = ((x + oreg->left - first) << \ BLEND_SHIFT) / bwidth; \ int c1 = im__icoef1[inx]; \ int c2 = im__icoef2[inx]; \ \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = c1 * tr[i] / BLEND_SCALE + \ c2 * ts[i] / BLEND_SCALE; \ } \ else if( !ref_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ } \ \ /* Right of blend. */ \ for( x = right; x < oreg->width; x++ ) { \ sec_zero = 0; \ TEST_ZERO( TYPE, ts, sec_zero ); \ if( !sec_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ } \ } /* Blend two float images. */ #define fblend( TYPE, B, IN1, IN2, OUT ) { \ TYPE *tr = (TYPE *) (IN1); \ TYPE *ts = (TYPE *) (IN2); \ TYPE *tq = (TYPE *) (OUT); \ const int cb = (B); \ const int left = IM_CLIP( 0, first - oreg->left, oreg->width ); \ const int right = IM_CLIP( left, last - oreg->left, oreg->width ); \ int ref_zero; \ int sec_zero; \ int x, b; \ int i; \ \ /* Left of the blend area. \ */ \ for( i = 0, x = 0; x < left; x++ ) { \ ref_zero = 0; \ TEST_ZERO( TYPE, tr, ref_zero ); \ if( !ref_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ } \ \ /* In blend area. \ */ \ for( x = left; x < right; x++ ) { \ ref_zero = 0; \ sec_zero = 0; \ TEST_ZERO( TYPE, tr, ref_zero ); \ TEST_ZERO( TYPE, ts, sec_zero ); \ \ if( !ref_zero && !sec_zero ) { \ int inx = ((x + oreg->left - first) << \ BLEND_SHIFT) / bwidth; \ double c1 = im__coef1[inx]; \ double c2 = im__coef2[inx]; \ \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = c1 * tr[i] + c2 * ts[i]; \ } \ else if( !ref_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ } \ \ /* Right of blend. */ \ for( x = right; x < oreg->width; x++ ) { \ sec_zero = 0; \ TEST_ZERO( TYPE, ts, sec_zero ); \ if( !sec_zero ) \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = ts[i]; \ else \ for( b = 0; b < cb; b++, i++ ) \ tq[i] = tr[i]; \ } \ } /* Left-right blend function for non-labpack images. */ static int lr_blend( REGION *or, MergeInfo *inf, Overlapping *ovlap, Rect *oreg ) { REGION *rir = inf->rir; REGION *sir = inf->sir; IMAGE *im = or->im; Rect prr, psr; int y, yr, ys; /* Make sure we have a complete first/last set for this area. */ if( make_firstlast( inf, ovlap, oreg ) ) return( -1 ); /* Part of rr which we will output. */ prr = *oreg; prr.left -= ovlap->rarea.left; prr.top -= ovlap->rarea.top; /* Part of sr which we will output. */ psr = *oreg; psr.left -= ovlap->sarea.left; psr.top -= ovlap->sarea.top; /* Make pixels. */ if( im_prepare( rir, &prr ) ) return( -1 ); if( im_prepare( sir, &psr ) ) return( -1 ); /* Loop down overlap area. */ for( y = oreg->top, yr = prr.top, ys = psr.top; y < IM_RECT_BOTTOM( oreg ); y++, yr++, ys++ ) { VipsPel *pr = IM_REGION_ADDR( rir, prr.left, yr ); VipsPel *ps = IM_REGION_ADDR( sir, psr.left, ys ); VipsPel *q = IM_REGION_ADDR( or, oreg->left, y ); const int j = y - ovlap->overlap.top; const int first = ovlap->first[j]; const int last = ovlap->last[j]; const int bwidth = last - first; switch( im->BandFmt ) { case IM_BANDFMT_UCHAR: iblend( unsigned char, im->Bands, pr, ps, q ); break; case IM_BANDFMT_CHAR: iblend( signed char, im->Bands, pr, ps, q ); break; case IM_BANDFMT_USHORT: iblend( unsigned short, im->Bands, pr, ps, q ); break; case IM_BANDFMT_SHORT: iblend( signed short, im->Bands, pr, ps, q ); break; case IM_BANDFMT_UINT: iblend( unsigned int, im->Bands, pr, ps, q ); break; case IM_BANDFMT_INT: iblend( signed int, im->Bands, pr, ps, q ); break; case IM_BANDFMT_FLOAT: fblend( float, im->Bands, pr, ps, q ); break; case IM_BANDFMT_DOUBLE: fblend( double, im->Bands, pr, ps, q ); break; case IM_BANDFMT_COMPLEX: fblend( float, im->Bands*2, pr, ps, q ); break; case IM_BANDFMT_DPCOMPLEX: fblend( double, im->Bands*2, pr, ps, q ); break; default: im_error( "im_lrmerge", "%s", _( "internal error" ) ); return( -1 ); } } return( 0 ); } /* Left-right blend function for IM_CODING_LABQ images. */ static int lr_blend_labpack( REGION *or, MergeInfo *inf, Overlapping *ovlap, Rect *oreg ) { REGION *rir = inf->rir; REGION *sir = inf->sir; Rect prr, psr; int y, yr, ys; /* Make sure we have a complete first/last set for this area. This * will just look at the top 8 bits of L, not all 10, but should be OK. */ if( make_firstlast( inf, ovlap, oreg ) ) return( -1 ); /* Part of rr which we will output. */ prr = *oreg; prr.left -= ovlap->rarea.left; prr.top -= ovlap->rarea.top; /* Part of sr which we will output. */ psr = *oreg; psr.left -= ovlap->sarea.left; psr.top -= ovlap->sarea.top; /* Make pixels. */ if( im_prepare( rir, &prr ) ) return( -1 ); if( im_prepare( sir, &psr ) ) return( -1 ); /* Loop down overlap area. */ for( y = oreg->top, yr = prr.top, ys = psr.top; y < IM_RECT_BOTTOM( oreg ); y++, yr++, ys++ ) { VipsPel *pr = IM_REGION_ADDR( rir, prr.left, yr ); VipsPel *ps = IM_REGION_ADDR( sir, psr.left, ys ); VipsPel *q = IM_REGION_ADDR( or, oreg->left, y ); const int j = y - ovlap->overlap.top; const int first = ovlap->first[j]; const int last = ovlap->last[j]; const int bwidth = last - first; float *fq = inf->merge; float *r = inf->from1; float *s = inf->from2; /* Unpack two bits we want. */ vips__LabQ2Lab_vec( r, pr, oreg->width ); vips__LabQ2Lab_vec( s, ps, oreg->width ); /* Blend as floats. */ fblend( float, 3, r, s, fq ); /* Re-pack to output buffer. */ vips__Lab2LabQ_vec( q, inf->merge, oreg->width ); } return( 0 ); } static void * lock_free( GMutex *lock ) { vips_g_mutex_free( lock ); return( NULL ); } /* Build basic per-call state and do some geometry calculations. Shared with * im_tbmerge, so not static. */ Overlapping * im__build_mergestate( const char *domain, IMAGE *ref, IMAGE *sec, IMAGE *out, int dx, int dy, int mwidth ) { IMAGE **vec; Overlapping *ovlap; int x; if( !(vec = im__insert_base( domain, ref, sec, out )) || !(ovlap = IM_NEW( out, Overlapping )) ) return( NULL ); if( mwidth < -1 ) { im_error( domain, "%s", _( "mwidth must be -1 or >= 0" ) ); return( NULL ); } ovlap->ref = vec[0]; ovlap->sec = vec[1]; ovlap->out = out; ovlap->dx = dx; ovlap->dy = dy; ovlap->mwidth = mwidth; /* Area occupied by ref image. Place at (0,0) to start with. */ ovlap->rarea.left = 0; ovlap->rarea.top = 0; ovlap->rarea.width = ovlap->ref->Xsize; ovlap->rarea.height = ovlap->ref->Ysize; /* Area occupied by sec image. */ ovlap->sarea.left = -dx; ovlap->sarea.top = -dy; ovlap->sarea.width = ovlap->sec->Xsize; ovlap->sarea.height = ovlap->sec->Ysize; /* Compute overlap. */ im_rect_intersectrect( &ovlap->rarea, &ovlap->sarea, &ovlap->overlap ); if( im_rect_isempty( &ovlap->overlap ) ) { im_error( domain, "%s", _( "no overlap" ) ); return( NULL ); } /* Find position and size of output image. */ im_rect_unionrect( &ovlap->rarea, &ovlap->sarea, &ovlap->oarea ); /* Now: translate everything, so that the output image, not the left * image, is at (0,0). */ ovlap->rarea.left -= ovlap->oarea.left; ovlap->rarea.top -= ovlap->oarea.top; ovlap->sarea.left -= ovlap->oarea.left; ovlap->sarea.top -= ovlap->oarea.top; ovlap->overlap.left -= ovlap->oarea.left; ovlap->overlap.top -= ovlap->oarea.top; ovlap->oarea.left = 0; ovlap->oarea.top = 0; /* Make sure blend luts are built. */ im__make_blend_luts(); /* Size of first/last cache. Could be either of these ... just pick * the larger. */ ovlap->flsize = IM_MAX( ovlap->overlap.width, ovlap->overlap.height ); /* Build first/last cache. */ ovlap->first = IM_ARRAY( out, ovlap->flsize, int ); ovlap->last = IM_ARRAY( out, ovlap->flsize, int ); if( !ovlap->first || !ovlap->last ) return( NULL ); for( x = 0; x < ovlap->flsize; x++ ) ovlap->first[x] = -1; ovlap->fl_lock = vips_g_mutex_new(); if( im_add_close_callback( out, (im_callback_fn) lock_free, ovlap->fl_lock, NULL ) ) { vips_g_mutex_free( ovlap->fl_lock ); return( NULL ); } return( ovlap ); } /* Build per-call state. */ static Overlapping * build_lrstate( IMAGE *ref, IMAGE *sec, IMAGE *out, int dx, int dy, int mwidth ) { Overlapping *ovlap; if( !(ovlap = im__build_mergestate( "im_lrmerge", ref, sec, out, dx, dy, mwidth )) ) return( NULL ); /* Select blender. */ switch( ovlap->ref->Coding ) { case IM_CODING_LABQ: ovlap->blend = lr_blend_labpack; break; case IM_CODING_NONE: ovlap->blend = lr_blend; break; default: im_error( "im_lrmerge", "%s", _( "unknown coding type" ) ); return( NULL ); } /* Find the parts of output which come just from ref and just from sec. */ ovlap->rpart = ovlap->rarea; ovlap->spart = ovlap->sarea; ovlap->rpart.width -= ovlap->overlap.width; ovlap->spart.left += ovlap->overlap.width; ovlap->spart.width -= ovlap->overlap.width; /* Is there too much overlap? ie. right edge of ref image is greater * than right edge of sec image, or left > left. */ if( IM_RECT_RIGHT( &ovlap->rarea ) > IM_RECT_RIGHT( &ovlap->sarea ) || ovlap->rarea.left > ovlap->sarea.left ) { im_error( "im_lrmerge", "%s", _( "too much overlap" ) ); return( NULL ); } /* Max number of pixels we may have to blend over. */ ovlap->blsize = ovlap->overlap.width; return( ovlap ); } /* The area being demanded can be filled using only pels from either the ref * or the sec images. Attach output to the appropriate part of the input image. * area is the position that ir->im occupies in the output image. * * Shared with im_tbmerge(), so not static. */ int im__attach_input( REGION *or, REGION *ir, Rect *area ) { Rect r = or->valid; /* Translate to source coordinate space. */ r.left -= area->left; r.top -= area->top; /* Demand input. */ if( im_prepare( ir, &r ) ) return( -1 ); /* Attach or to ir. */ if( im_region_region( or, ir, &or->valid, r.left, r.top ) ) return( -1 ); return( 0 ); } /* The area being demanded requires pixels from the ref and sec images. As * above, but just do a sub-area of the output, and make sure we copy rather * than just pointer-fiddling. reg is the sub-area of or->valid we should do. * * Shared with im_tbmerge(), so not static. */ int im__copy_input( REGION *or, REGION *ir, Rect *area, Rect *reg ) { Rect r = *reg; /* Translate to source coordinate space. */ r.left -= area->left; r.top -= area->top; /* Paint this area of ir into or. */ if( im_prepare_to( ir, or, &r, reg->left, reg->top ) ) return( -1 ); return( 0 ); } /* Generate function for merge. This is shared between im_lrmerge() and * im_tbmerge(). */ int im__merge_gen( REGION *or, void *seq, void *a, void *b ) { MergeInfo *inf = (MergeInfo *) seq; Overlapping *ovlap = (Overlapping *) a; Rect *r = &or->valid; Rect rreg, sreg, oreg; /* Find intersection with overlap, ref and sec parts. */ im_rect_intersectrect( r, &ovlap->rpart, &rreg ); im_rect_intersectrect( r, &ovlap->spart, &sreg ); /* Do easy cases first: can we satisfy this demand with pixels just * from ref, or just from sec. */ if( im_rect_equalsrect( r, &rreg ) ) { if( im__attach_input( or, inf->rir, &ovlap->rarea ) ) return( -1 ); } else if( im_rect_equalsrect( r, &sreg ) ) { if( im__attach_input( or, inf->sir, &ovlap->sarea ) ) return( -1 ); } else { /* Difficult case - do in three stages: black out whole area, * copy in parts of ref and sec we touch, write blend area. * This could be sped up somewhat ... we will usually black * out far too much, and write to the blend area three times. * Upgrade in the future! */ /* Need intersections with whole of left & right, and overlap * too. */ im_rect_intersectrect( r, &ovlap->rarea, &rreg ); im_rect_intersectrect( r, &ovlap->sarea, &sreg ); im_rect_intersectrect( r, &ovlap->overlap, &oreg ); im_region_black( or ); if( !im_rect_isempty( &rreg ) ) if( im__copy_input( or, inf->rir, &ovlap->rarea, &rreg ) ) return( -1 ); if( !im_rect_isempty( &sreg ) ) if( im__copy_input( or, inf->sir, &ovlap->sarea, &sreg ) ) return( -1 ); /* Nasty: inf->rir and inf->sir now point to the same bit of * memory (part of or), and we've written twice. We need to * make sure we get fresh pixels for the blend, so we must * invalidate them both. Should maybe add a call to the API * for this. */ inf->rir->valid.width = inf->sir->valid.width = 0; /* Now blat in the blended area. */ if( !im_rect_isempty( &oreg ) ) if( ovlap->blend( or, inf, ovlap, &oreg ) ) return( -1 ); } return( 0 ); } /* Stop function. Shared with im_tbmerge(). Free explicitly to reduce mem * requirements quickly for large mosaics. */ int im__stop_merge( void *seq, void *a, void *b ) { MergeInfo *inf = (MergeInfo *) seq; if( inf->rir ) { im_region_free( inf->rir ); inf->rir = NULL; } if( inf->sir ) { im_region_free( inf->sir ); inf->sir = NULL; } if( inf->from1 ) { im_free( inf->from1 ); inf->from1 = NULL; } if( inf->from2 ) { im_free( inf->from2 ); inf->from2 = NULL; } if( inf->merge ) { im_free( inf->merge ); inf->merge = NULL; } im_free( inf ); return( 0 ); } /* Start function. Shared with im_tbmerge(). */ void * im__start_merge( IMAGE *out, void *a, void *b ) { Overlapping *ovlap = (Overlapping *) a; MergeInfo *inf; if( !(inf = IM_NEW( NULL, MergeInfo )) ) return( NULL ); /* Clear all ptrs. */ inf->rir = NULL; inf->sir = NULL; inf->from1 = NULL; inf->from2 = NULL; inf->merge = NULL; /* If this is going to be a IM_CODING_LABQ, we need IM_CODING_LABQ * blend buffers. */ if( out->Coding == IM_CODING_LABQ ) { inf->from1 = IM_ARRAY( NULL, ovlap->blsize * 3, float ); inf->from2 = IM_ARRAY( NULL, ovlap->blsize * 3, float ); inf->merge = IM_ARRAY( NULL, ovlap->blsize * 3, float ); if( !inf->from1 || !inf->from2 || !inf->merge ) { im__stop_merge( inf, NULL, NULL ); return( NULL ); } } /* Make input regions. */ inf->rir = im_region_create( ovlap->ref ); inf->sir = im_region_create( ovlap->sec ); if( !inf->rir || !inf->sir ) { im__stop_merge( inf, NULL, NULL ); return( NULL ); } return( inf ); } int im__lrmerge( IMAGE *ref, IMAGE *sec, IMAGE *out, int dx, int dy, int mwidth ) { Overlapping *ovlap; #ifdef DEBUG printf( "im__lrmerge %s %s %s %d %d %d\n", ref->filename, sec->filename, out->filename, dx, dy, mwidth ); printf( "ref is %d x %d pixels\n", ref->Xsize, ref->Ysize ); printf( "sec is %d x %d pixels\n", sec->Xsize, sec->Ysize ); #endif if( dx > 0 || dx < 1 - ref->Xsize ) { #ifdef DEBUG printf( "im__lrmerge: no overlap, using insert\n" ); #endif /* No overlap, use insert instead. */ if( im_insert( ref, sec, out, -dx, -dy ) ) return( -1 ); out->Xoffset = -dx; out->Yoffset = -dy; return( 0 ); } /* Build state for this join. */ if( !(ovlap = build_lrstate( ref, sec, out, dx, dy, mwidth )) ) return( -1 ); /* Prepare the output IMAGE. */ if( im_cp_descv( out, ovlap->ref, ovlap->sec, NULL ) ) return( -1 ); out->Xsize = ovlap->oarea.width; out->Ysize = ovlap->oarea.height; out->Xoffset = ovlap->sarea.left; out->Yoffset = ovlap->sarea.top; /* Set demand hints. */ if( im_demand_hint( out, IM_THINSTRIP, ovlap->ref, ovlap->sec, NULL ) ) return( -1 ); /* Generate! */ if( im_generate( out, im__start_merge, im__merge_gen, im__stop_merge, ovlap, NULL ) ) return( -1 ); return ( 0 ); } /** * im_lrmerge: * @ref: reference image * @sec: secondary image * @out: output image * @dx: displacement of ref from sec * @dy: displacement of ref from sec * @mwidth: maximum seam width * * This operation joins two images left-right (with @ref on the left) with a * smooth seam. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * @dx and @dy give the displacement of @sec relative to @ref, in other words, * the vector to get from the origin of @sec to the origin of @ref, in other * words, @dx will generally be a negative number. * * @mwidth limits the maximum width of the * blend area. A value of "-1" means "unlimited". The two images are blended * with a raised cosine. * * Pixels with all bands equal to zero are "transparent", that * is, zero pixels in the overlap area do not contribute to the merge. * This makes it possible to join non-rectangular images. * * See also: im_lrmosaic(), im_tbmerge(), im_match_linear(), im_insert(). * * Returns: 0 on success, -1 on error */ int im_lrmerge( IMAGE *ref, IMAGE *sec, IMAGE *out, int dx, int dy, int mwidth ) { if( im__lrmerge( ref, sec, out, dx, dy, mwidth ) ) return( -1 ); if( im_histlin( out, "#LRJOIN <%s> <%s> <%s> <%d> <%d> <%d>", ref->filename, sec->filename, out->filename, -dx, -dy, mwidth ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/im_lrmosaic.c0000644000175000017500000002157012303140253015601 00000000000000/* join left-right with an approximate overlap * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 07/11/1989 * Modified on : 29/11/1989, 18/04/1991 * * * Modified and debugged by Ahmed Abbood . 1995 * 14/6/95 JC * - rewritten for new balance ideas * - more bug-fixes * 1/11/95 JC * - frees memory used by analysis phase as soon as possible * - means large mosaics use significantly less peak memory * 26/3/96 JC * - now calls im_lrmerge() rather than im__lrmerge() * 2/2/01 JC * - added tunable max blend width * 24/2/05 * - im_scale() makes it work for any image type * 25/1/11 * - gtk-doc * - remove balance stuff * - any mix of types and bands * - cleanups */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "mosaic.h" #ifdef DEBUG static void im__print_mdebug( TIE_POINTS *points ) { int i; double adx = 0.0; double ady = 0.0; double acor = 0.0; for( i = 0; i < points->nopoints; i++ ) { adx += points->dx[i]; ady += points->dy[i]; acor += points->correlation[i]; } adx = adx / (double) points->nopoints; ady = ady / (double) points->nopoints; acor = acor / (double) points->nopoints; printf( "points: %d\n", points->nopoints ); printf( "average dx, dy: %g %g\n", adx, ady ); printf( "average correlation: %g\n", acor ); printf( "deltax, deltay: %g %g\n", points->l_deltax, points->l_deltay ); } #endif /*DEBUG*/ int im__find_lroverlap( IMAGE *ref_in, IMAGE *sec_in, IMAGE *out, int bandno_in, int xref, int yref, int xsec, int ysec, int halfcorrelation, int halfarea, int *dx0, int *dy0, double *scale1, double *angle1, double *dx1, double *dy1 ) { Rect left, right, overlap; IMAGE *ref, *sec; IMAGE *t[6]; TIE_POINTS points, *p_points; TIE_POINTS newpoints, *p_newpoints; int dx, dy; int i; /* Test cor and area. */ if( halfcorrelation < 0 || halfarea < 0 || halfarea < halfcorrelation ) { im_error( "im_lrmosaic", "%s", _( "bad area parameters" ) ); return( -1 ); } /* Set positions of left and right. */ left.left = 0; left.top = 0; left.width = ref_in->Xsize; left.height = ref_in->Ysize; right.left = xref - xsec; right.top = yref - ysec; right.width = sec_in->Xsize; right.height = sec_in->Ysize; /* Find overlap. */ im_rect_intersectrect( &left, &right, &overlap ); if( overlap.width < 2 * halfarea + 1 || overlap.height < 2 * halfarea + 1 ) { im_error( "im_lrmosaic", "%s", _( "overlap too small for search" ) ); return( -1 ); } /* Extract overlaps as 8-bit, 1 band. */ if( !(ref = im_open_local( out, "temp_one", "t" )) || !(sec = im_open_local( out, "temp_two", "t" )) || im_open_local_array( out, t, 6, "im_lrmosaic", "p" ) || im_extract_area( ref_in, t[0], overlap.left, overlap.top, overlap.width, overlap.height ) || im_extract_area( sec_in, t[1], overlap.left - right.left, overlap.top - right.top, overlap.width, overlap.height ) ) return( -1 ); if( ref_in->Coding == IM_CODING_LABQ ) { if( im_LabQ2Lab( t[0], t[2] ) || im_LabQ2Lab( t[1], t[3] ) || im_Lab2disp( t[2], t[4], im_col_displays( 1 ) ) || im_Lab2disp( t[3], t[5], im_col_displays( 1 ) ) || im_extract_band( t[4], ref, 1 ) || im_extract_band( t[5], sec, 1 ) ) return( -1 ); } else if( ref_in->Coding == IM_CODING_NONE ) { if( im_extract_band( t[0], t[2], bandno_in ) || im_extract_band( t[1], t[3], bandno_in ) || im_scale( t[2], ref ) || im_scale( t[3], sec ) ) return( -1 ); } else { im_error( "im_lrmosaic", "%s", _( "unknown Coding type" ) ); return( -1 ); } /* Initialise and fill TIE_POINTS */ p_points = &points; p_newpoints = &newpoints; p_points->reference = ref_in->filename; p_points->secondary = sec_in->filename; p_points->nopoints = IM_MAXPOINTS; p_points->deltax = 0; p_points->deltay = 0; p_points->halfcorsize = halfcorrelation; p_points->halfareasize = halfarea; /* Initialise the structure */ for( i = 0; i < IM_MAXPOINTS; i++ ) { p_points->x_reference[i] = 0; p_points->y_reference[i] = 0; p_points->x_secondary[i] = 0; p_points->y_secondary[i] = 0; p_points->contrast[i] = 0; p_points->correlation[i] = 0.0; p_points->dx[i] = 0.0; p_points->dy[i] = 0.0; p_points->deviation[i] = 0.0; } /* Search ref for possible tie-points. Sets: p_points->contrast, * p_points->x,y_reference. */ if( im__lrcalcon( ref, p_points ) ) return( -1 ); /* For each candidate point, correlate against corresponding part of * sec. Sets x,y_secondary and fills correlation and dx, dy. */ if( im__chkpair( ref, sec, p_points ) ) return( -1 ); /* First call to im_clinear(). */ if( im__initialize( p_points ) ) return( -1 ); /* Improve the selection of tiepoints until all abs(deviations) are * < 1.0 by deleting all wrong points. */ if( im__improve( p_points, p_newpoints ) ) return( -1 ); /* Average remaining offsets. */ if( im__avgdxdy( p_newpoints, &dx, &dy ) ) return( -1 ); /* Offset with overlap position. */ *dx0 = -right.left + dx; *dy0 = -right.top + dy; /* Write 1st order parameters too. */ *scale1 = newpoints.l_scale; *angle1 = newpoints.l_angle; *dx1 = newpoints.l_deltax; *dy1 = newpoints.l_deltay; return( 0 ); } /** * im_lrmosaic: * @ref: reference image * @sec: secondary image * @out: output image * @bandno: band to search for features * @xref: position in reference image * @yref: position in reference image * @xsec: position in secondary image * @ysec: position in secondary image * @hwindowsize: half window size * @hsearchsize: half search size * @balancetype: no longer used * @mwidth: maximum blend width * * This operation joins two images left-right (with @ref on the left) * given an approximate overlap. * * @sec is positioned so that the pixel (@xsec, @ysec) lies on top of the * pixel in @ref at (@xref, @yref). The overlap area is divided into three * sections, 20 high-contrast points in band @bandno of image @ref are found * in each, and each high-contrast point is searched for in @sec using * @hwindowsize and @hsearchsize (see im_correl()). * * A linear model is fitted to the 60 tie-points, points a long way from the * fit are discarded, and the model refitted until either too few points * remain or the model reaches good agreement. * * The detected displacement is used with im_lrmerge() to join the two images * together. * * @mwidth limits the maximum width of the * blend area. A value of "-1" means "unlimited". The two images are blended * with a raised cosine. * * Pixels with all bands equal to zero are "transparent", that * is, zero pixels in the overlap area do not contribute to the merge. * This makes it possible to join non-rectangular images. * * If the number of bands differs, one of the images * must have one band. In this case, an n-band image is formed from the * one-band image by joining n copies of the one-band image together, and then * the two n-band images are operated upon. * * The two input images are cast up to the smallest common type (see table * Smallest common format in * arithmetic). * * See also: im_lrmerge(), im_tbmosaic(), im_insert(), im_global_balance(). * * Returns: 0 on success, -1 on error */ int im_lrmosaic( IMAGE *ref, IMAGE *sec, IMAGE *out, int bandno, int xref, int yref, int xsec, int ysec, int hwindowsize, int hsearchsize, int balancetype, int mwidth ) { int dx0, dy0; double scale1, angle1, dx1, dy1; IMAGE *dummy; /* Correct overlap. dummy is just a placeholder used to ensure that * memory used by the analysis phase is freed as soon as possible. */ if( !(dummy = im_open( "placeholder:1", "p" )) ) return( -1 ); if( im__find_lroverlap( ref, sec, dummy, bandno, xref, yref, xsec, ysec, hwindowsize, hsearchsize, &dx0, &dy0, &scale1, &angle1, &dx1, &dy1 ) ) { im_close( dummy ); return( -1 ); } im_close( dummy ); /* Merge left right. */ if( im_lrmerge( ref, sec, out, dx0, dy0, mwidth ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/im_improve.c0000644000175000017500000001173412303140253015452 00000000000000/* @(#) Function which improves the selection of tiepoints carried out by * @(#) im_clinear() until no points have deviation greater than 1 pixel * @(#) No reference or secondary images are involved * @(#) Function im_improve assumes that im_clinear has been applied on points * @(#) No IMAGES are involved in this function and the result is * @(#) returned in outpoints which is declared as a pointer in the * @(#) calling routine. Space for outpoints should be allocated in the calling * @(#) routine * @(#) * @(#) int im_improve( inpoints, outpoints ) * @(#) TIE_POINTS *inpoints, *outpoints; * @(#) * @(#) Returns 0 on sucess and -1 on error. * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 20/12/1990 * Modified on : 18/04/1991 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "mosaic.h" static void copypoints( TIE_POINTS *pnew, TIE_POINTS *pold ) { int i; pnew->reference = pold->reference; pnew->secondary = pold->secondary; pnew->deltax = pold->deltax; pnew->deltay = pold->deltay; pnew->nopoints = pold->nopoints; pnew->halfcorsize = pold->halfcorsize; pnew->halfareasize = pold->halfareasize; for( i = 0; i < pold->nopoints; i++ ) { pnew->x_reference[i] = pold->x_reference[i]; pnew->y_reference[i] = pold->y_reference[i]; pnew->x_secondary[i] = pold->x_secondary[i]; pnew->y_secondary[i] = pold->y_secondary[i]; pnew->contrast[i] = pold->contrast[i]; pnew->correlation[i] = pold->correlation[i]; pnew->deviation[i] = pold->deviation[i]; pnew->dx[i] = pold->dx[i]; pnew->dy[i] = pold->dy[i]; } pnew->l_scale = pold->l_scale; pnew->l_angle = pold->l_angle; pnew->l_deltax = pold->l_deltax; pnew->l_deltay = pold->l_deltay; } /* exclude all points with deviation greater or equal to 1.0 pixel */ static int copydevpoints( TIE_POINTS *pnew, TIE_POINTS *pold ) { int i; int j; double thresh_dev,max_dev, min_dev; double *corr; min_dev = 9999.0; max_dev = 0.0; corr = &pold->correlation[0]; for( i = 0; i < pold->nopoints; i++ ) if( corr[i] > 0.01 ) { if( pold->deviation[i]/corr[i] < min_dev ) min_dev = pold->deviation[i]/corr[i] ; if( pold->deviation[i]/corr[i] > max_dev ) max_dev = pold->deviation[i]/corr[i]; } thresh_dev = min_dev + (max_dev - min_dev)*0.3; if( thresh_dev <= 1.0 ) thresh_dev = 1.0; for( i = 0, j = 0; i < pold->nopoints; i++ ) if( pold->correlation[i] > 0.01 ) if( pold->deviation[i]/corr[i] <= thresh_dev ) { pnew->x_reference[j] = pold->x_reference[i]; pnew->y_reference[j] = pold->y_reference[i]; pnew->x_secondary[j] = pold->x_secondary[i]; pnew->y_secondary[j] = pold->y_secondary[i]; pnew->contrast[j] = pold->contrast[i]; pnew->correlation[j] = pold->correlation[i]; pnew->deviation[j] = pold->deviation[i]; pnew->dx[j] = pold->dx[i]; pnew->dy[j] = pold->dy[i]; j++; } pnew->nopoints = j; for( i = j; i < IM_MAXPOINTS; i++ ) { pnew->x_reference[i] = 0; pnew->y_reference[i] = 0; pnew->x_secondary[i] = 0; pnew->y_secondary[i] = 0; pnew->contrast[i] = 0; pnew->correlation[i] = 0.0; pnew->deviation[i] = 0.0; pnew->dx[i] = 0.0; pnew->dy[i] = 0.0; } /* Return non-zero if we changed something. */ if( j != pold->nopoints ) return( -1 ); return( 0 ); } int im__improve( TIE_POINTS *inpoints, TIE_POINTS *outpoints ) { TIE_POINTS points1, points2; TIE_POINTS *p = &points1; TIE_POINTS *q = &points2; /* p has the current state - make a new state, q, with only those * points which have a small deviation. */ for( copypoints( p, inpoints ); copypoints( q, p ), copydevpoints( q, p ); ) { /* If there are only a few left, jump out. */ if( q->nopoints < 2 ) break; /* Fit the model to the new set of points. */ if( im__clinear( q ) ) return( -1 ); /* And loop. */ IM_SWAP( void *, p, q ); } /* q has the output - copy to outpoints. */ copypoints( outpoints, q ); return( 0 ); } vips-7.38.5/libvips/mosaicing/mosaicing_dispatch.c0000644000175000017500000005040112303140253017126 00000000000000/* Function dispatch tables for mosaicing. * * J. Cupitt, 23/2/95 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include "merge.h" /** * SECTION: mosaicing * @short_description: build image mosaics * @stability: Stable * @include: vips/vips.h * * These functions are useful for joining many small images together to make * one large image. They can cope with unstable contrast and arbitary sub-image * layout, but will not do any geometric correction. Geometric errors should * be removed before using these functions. * * The mosaicing functions can be grouped into layers: * * The lowest level functions are im_correl(), im_lrmerge() and im_tbmerge(). * im_correl() * searches a large image for a small sub-image, returning * the position of the best sub-image match. im_lrmerge() and im_tbmerge() * join two images together * left-right or up-down with a smooth seam. * * Next, im_lrmosaic() and im_tbmosaic() use the * search function plus the two low-level merge operations to join two images * given just an approximate overlap as a start point. * * The functions im_lrmosaic1() and im_tbmosaic1() are * first-order * analogues of the basic mosaic functions: they take two approximate * tie-points and use * them to rotate and scale the right-hand or bottom image before starting to * join. * * Finally, im_global_balance() can be used to remove contrast differences in * a mosaic * which has been assembled with these functions. It takes the mosaic apart, * measures image contrast differences along the seams, finds a set of * correction factors which will minimise these differences, and reassembles * the mosaic. * im_remosaic() uses the * same * techniques, but will reassemble the image from a different set of source * images. * */ /* Merge args. */ static im_arg_desc merge_args[] = { IM_INPUT_IMAGE( "ref" ), IM_INPUT_IMAGE( "sec" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "dx" ), IM_INPUT_INT( "dy" ), IM_INPUT_INT( "mwidth" ) }; /* Merge1 args. */ static im_arg_desc merge1_args[] = { IM_INPUT_IMAGE( "ref" ), IM_INPUT_IMAGE( "sec" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xr1" ), IM_INPUT_INT( "yr1" ), IM_INPUT_INT( "xs1" ), IM_INPUT_INT( "ys1" ), IM_INPUT_INT( "xr2" ), IM_INPUT_INT( "yr2" ), IM_INPUT_INT( "xs2" ), IM_INPUT_INT( "ys2" ), IM_INPUT_INT( "mwidth" ) }; /* Mosaic args. */ static im_arg_desc mosaic_args[] = { IM_INPUT_IMAGE( "ref" ), IM_INPUT_IMAGE( "sec" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "bandno" ), IM_INPUT_INT( "xr" ), IM_INPUT_INT( "yr" ), IM_INPUT_INT( "xs" ), IM_INPUT_INT( "ys" ), IM_INPUT_INT( "halfcorrelation" ), IM_INPUT_INT( "halfarea" ), IM_INPUT_INT( "balancetype" ), IM_INPUT_INT( "mwidth" ) }; /* Mosaic1 args. */ static im_arg_desc mosaic1_args[] = { IM_INPUT_IMAGE( "ref" ), IM_INPUT_IMAGE( "sec" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "bandno" ), IM_INPUT_INT( "xr1" ), IM_INPUT_INT( "yr1" ), IM_INPUT_INT( "xs1" ), IM_INPUT_INT( "ys1" ), IM_INPUT_INT( "xr2" ), IM_INPUT_INT( "yr2" ), IM_INPUT_INT( "xs2" ), IM_INPUT_INT( "ys2" ), IM_INPUT_INT( "halfcorrelation" ), IM_INPUT_INT( "halfarea" ), IM_INPUT_INT( "balancetype" ), IM_INPUT_INT( "mwidth" ) }; /* Call im_lrmosaic via arg vector. */ static int lrmosaic_vec( im_object *argv ) { int bandno = *((int *) argv[3]); int xr = *((int *) argv[4]); int yr = *((int *) argv[5]); int xs = *((int *) argv[6]); int ys = *((int *) argv[7]); int halfcorrelation = *((int *) argv[8]); int halfarea = *((int *) argv[9]); int balancetype = *((int *) argv[10]); int mwidth = *((int *) argv[11]); return( im_lrmosaic( argv[0], argv[1], argv[2], bandno, xr, yr, xs, ys, halfcorrelation, halfarea, balancetype, mwidth ) ); } /* Call im_lrmosaic1 via arg vector. */ static int lrmosaic1_vec( im_object *argv ) { int bandno = *((int *) argv[3]); int xr1 = *((int *) argv[4]); int yr1 = *((int *) argv[5]); int xs1 = *((int *) argv[6]); int ys1 = *((int *) argv[7]); int xr2 = *((int *) argv[8]); int yr2 = *((int *) argv[9]); int xs2 = *((int *) argv[10]); int ys2 = *((int *) argv[11]); int halfcorrelation = *((int *) argv[12]); int halfarea = *((int *) argv[13]); int balancetype = *((int *) argv[14]); int mwidth = *((int *) argv[15]); return( im_lrmosaic1( argv[0], argv[1], argv[2], bandno, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, halfcorrelation, halfarea, balancetype, mwidth ) ); } /* Description of im_lrmosaic. */ static im_function lrmosaic_desc = { "im_lrmosaic", /* Name */ "left-right mosaic of ref and sec",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ lrmosaic_vec, /* Dispatch function */ IM_NUMBER( mosaic_args ), /* Size of arg list */ mosaic_args /* Arg list */ }; static im_arg_desc find_overlap_args[] = { IM_INPUT_IMAGE( "ref" ), IM_INPUT_IMAGE( "sec" ), IM_INPUT_INT( "bandno" ), IM_INPUT_INT( "xr" ), IM_INPUT_INT( "yr" ), IM_INPUT_INT( "xs" ), IM_INPUT_INT( "ys" ), IM_INPUT_INT( "halfcorrelation" ), IM_INPUT_INT( "halfarea" ), IM_OUTPUT_INT( "dx0" ), IM_OUTPUT_INT( "dy0" ), IM_OUTPUT_DOUBLE( "scale1" ), IM_OUTPUT_DOUBLE( "angle1" ), IM_OUTPUT_DOUBLE( "dx1" ), IM_OUTPUT_DOUBLE( "dy1" ) }; /* Call im__find_lroverlap via arg vector. */ static int find_lroverlap_vec( im_object *argv ) { int bandno = *((int *) argv[2]); int xr = *((int *) argv[3]); int yr = *((int *) argv[4]); int xs = *((int *) argv[5]); int ys = *((int *) argv[6]); int halfcorrelation = *((int *) argv[7]); int halfarea = *((int *) argv[8]); int *dx0 = (int *) argv[9]; int *dy0 = (int *) argv[10]; double *scale1 = (double *) argv[11]; double *angle1 = (double *) argv[12]; double *dx1 = (double *) argv[13]; double *dy1 = (double *) argv[14]; IMAGE *t; int result; if( !(t = im_open( "find_lroverlap_vec", "p" )) ) return( -1 ); result = im__find_lroverlap( argv[0], argv[1], t, bandno, xr, yr, xs, ys, halfcorrelation, halfarea, dx0, dy0, scale1, angle1, dx1, dy1 ); im_close( t ); return( result ); } /* Description of im__find_lroverlap. */ static im_function find_lroverlap_desc = { "im__find_lroverlap", /* Name */ "search for left-right overlap of ref and sec",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ find_lroverlap_vec, /* Dispatch function */ IM_NUMBER( find_overlap_args ), /* Size of arg list */ find_overlap_args /* Arg list */ }; /* Description of im_lrmosaic1. */ static im_function lrmosaic1_desc = { "im_lrmosaic1", /* Name */ "first-order left-right mosaic of ref and sec",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ lrmosaic1_vec, /* Dispatch function */ IM_NUMBER( mosaic1_args ), /* Size of arg list */ mosaic1_args /* Arg list */ }; /* Call im_tbmosaic via arg vector. */ static int tbmosaic_vec( im_object *argv ) { int bandno = *((int *) argv[3]); int x1 = *((int *) argv[4]); int y1 = *((int *) argv[5]); int x2 = *((int *) argv[6]); int y2 = *((int *) argv[7]); int halfcorrelation = *((int *) argv[8]); int halfarea = *((int *) argv[9]); int balancetype = *((int *) argv[10]); int mwidth = *((int *) argv[11]); return( im_tbmosaic( argv[0], argv[1], argv[2], bandno, x1, y1, x2, y2, halfcorrelation, halfarea, balancetype, mwidth ) ); } /* Call im_tbmosaic1 via arg vector. */ static int tbmosaic1_vec( im_object *argv ) { int bandno = *((int *) argv[3]); int xr1 = *((int *) argv[4]); int yr1 = *((int *) argv[5]); int xs1 = *((int *) argv[6]); int ys1 = *((int *) argv[7]); int xr2 = *((int *) argv[8]); int yr2 = *((int *) argv[9]); int xs2 = *((int *) argv[10]); int ys2 = *((int *) argv[11]); int halfcorrelation = *((int *) argv[12]); int halfarea = *((int *) argv[13]); int balancetype = *((int *) argv[14]); int mwidth = *((int *) argv[15]); return( im_tbmosaic1( argv[0], argv[1], argv[2], bandno, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, halfcorrelation, halfarea, balancetype, mwidth ) ); } /* Call im__find_tboverlap via arg vector. */ static int find_tboverlap_vec( im_object *argv ) { int bandno = *((int *) argv[2]); int xr = *((int *) argv[3]); int yr = *((int *) argv[4]); int xs = *((int *) argv[5]); int ys = *((int *) argv[6]); int halfcorrelation = *((int *) argv[7]); int halfarea = *((int *) argv[8]); int *dx0 = (int *) argv[9]; int *dy0 = (int *) argv[10]; double *scale1 = (double *) argv[11]; double *angle1 = (double *) argv[12]; double *dx1 = (double *) argv[13]; double *dy1 = (double *) argv[14]; IMAGE *t; int result; if( !(t = im_open( "find_tboverlap_vec", "p" )) ) return( -1 ); result = im__find_tboverlap( argv[0], argv[1], t, bandno, xr, yr, xs, ys, halfcorrelation, halfarea, dx0, dy0, scale1, angle1, dx1, dy1 ); im_close( t ); return( result ); } /* Description of im__find_tboverlap. */ static im_function find_tboverlap_desc = { "im__find_tboverlap", /* Name */ "search for top-bottom overlap of ref and sec",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ find_tboverlap_vec, /* Dispatch function */ IM_NUMBER( find_overlap_args ), /* Size of arg list */ find_overlap_args /* Arg list */ }; /* Description of im_tbmosaic. */ static im_function tbmosaic_desc = { "im_tbmosaic", /* Name */ "top-bottom mosaic of in1 and in2",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ tbmosaic_vec, /* Dispatch function */ IM_NUMBER( mosaic_args ), /* Size of arg list */ mosaic_args /* Arg list */ }; /* Description of im_tbmosaic1. */ static im_function tbmosaic1_desc = { "im_tbmosaic1", /* Name */ "first-order top-bottom mosaic of ref and sec",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ tbmosaic1_vec, /* Dispatch function */ IM_NUMBER( mosaic1_args ), /* Size of arg list */ mosaic1_args /* Arg list */ }; /* Call im_lrmerge via arg vector. */ static int lrmerge_vec( im_object *argv ) { int dx = *((int *) argv[3]); int dy = *((int *) argv[4]); int mwidth = *((int *) argv[5]); return( im_lrmerge( argv[0], argv[1], argv[2], dx, dy, mwidth ) ); } /* Call im_lrmerge1 via arg vector. */ static int lrmerge1_vec( im_object *argv ) { int xr1 = *((int *) argv[3]); int yr1 = *((int *) argv[4]); int xs1 = *((int *) argv[5]); int ys1 = *((int *) argv[6]); int xr2 = *((int *) argv[7]); int yr2 = *((int *) argv[8]); int xs2 = *((int *) argv[9]); int ys2 = *((int *) argv[10]); int mwidth = *((int *) argv[11]); return( im_lrmerge1( argv[0], argv[1], argv[2], xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, mwidth ) ); } /* Description of im_lrmerge. */ static im_function lrmerge_desc = { "im_lrmerge", /* Name */ "left-right merge of in1 and in2",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ lrmerge_vec, /* Dispatch function */ IM_NUMBER( merge_args ), /* Size of arg list */ merge_args /* Arg list */ }; /* Description of im_lrmerge1. */ static im_function lrmerge1_desc = { "im_lrmerge1", /* Name */ "first-order left-right merge of ref and sec",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ lrmerge1_vec, /* Dispatch function */ IM_NUMBER( merge1_args ), /* Size of arg list */ merge1_args /* Arg list */ }; /* Call im_tbmerge via arg vector. */ static int tbmerge_vec( im_object *argv ) { int dx = *((int *) argv[3]); int dy = *((int *) argv[4]); int mwidth = *((int *) argv[5]); return( im_tbmerge( argv[0], argv[1], argv[2], dx, dy, mwidth ) ); } /* Call im_tbmerge1 via arg vector. */ static int tbmerge1_vec( im_object *argv ) { int xr1 = *((int *) argv[3]); int yr1 = *((int *) argv[4]); int xs1 = *((int *) argv[5]); int ys1 = *((int *) argv[6]); int xr2 = *((int *) argv[7]); int yr2 = *((int *) argv[8]); int xs2 = *((int *) argv[9]); int ys2 = *((int *) argv[10]); int mwidth = *((int *) argv[11]); return( im_tbmerge1( argv[0], argv[1], argv[2], xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, mwidth ) ); } /* Description of im_tbmerge. */ static im_function tbmerge_desc = { "im_tbmerge", /* Name */ "top-bottom merge of in1 and in2",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ tbmerge_vec, /* Dispatch function */ IM_NUMBER( merge_args ), /* Size of arg list */ merge_args /* Arg list */ }; /* Description of im_tbmerge1. */ static im_function tbmerge1_desc = { "im_tbmerge1", /* Name */ "first-order top-bottom merge of in1 and in2",/* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ tbmerge1_vec, /* Dispatch function */ IM_NUMBER( merge1_args ), /* Size of arg list */ merge1_args /* Arg list */ }; /* match_linear args */ static im_arg_desc match_linear_args[] = { IM_INPUT_IMAGE( "ref" ), IM_INPUT_IMAGE( "sec" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xref1" ), IM_INPUT_INT( "yref1" ), IM_INPUT_INT( "xsec1" ), IM_INPUT_INT( "ysec1" ), IM_INPUT_INT( "xref2" ), IM_INPUT_INT( "yref2" ), IM_INPUT_INT( "xsec2" ), IM_INPUT_INT( "ysec2" ) }; /* Call im_match_linear via arg vector. */ static int match_linear_vec( im_object *argv ) { int xref1 = *((int *) argv[3]); int yref1 = *((int *) argv[4]); int xsec1 = *((int *) argv[5]); int ysec1 = *((int *) argv[6]); int xref2 = *((int *) argv[7]); int yref2 = *((int *) argv[8]); int xsec2 = *((int *) argv[9]); int ysec2 = *((int *) argv[10]); return( im_match_linear( argv[0], argv[1], argv[2], xref1, yref1, xsec1, ysec1, xref2, yref2, xsec2, ysec2 ) ); } /* Description of im_match_linear. */ static im_function match_linear_desc = { "im_match_linear", /* Name */ "resample ref so that tie-points match", IM_FN_PIO, /* Flags */ match_linear_vec, /* Dispatch function */ IM_NUMBER( match_linear_args ), /* Size of arg list */ match_linear_args /* Arg list */ }; /* match_linear_search args */ static im_arg_desc match_linear_search_args[] = { IM_INPUT_IMAGE( "ref" ), IM_INPUT_IMAGE( "sec" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xref1" ), IM_INPUT_INT( "yref1" ), IM_INPUT_INT( "xsec1" ), IM_INPUT_INT( "ysec1" ), IM_INPUT_INT( "xref2" ), IM_INPUT_INT( "yref2" ), IM_INPUT_INT( "xsec2" ), IM_INPUT_INT( "ysec2" ), IM_INPUT_INT( "hwindowsize" ), IM_INPUT_INT( "hsearchsize" ) }; /* Call im_match_linear_search via arg vector. */ static int match_linear_search_vec( im_object *argv ) { int xref1 = *((int *) argv[3]); int yref1 = *((int *) argv[4]); int xsec1 = *((int *) argv[5]); int ysec1 = *((int *) argv[6]); int xref2 = *((int *) argv[7]); int yref2 = *((int *) argv[8]); int xsec2 = *((int *) argv[9]); int ysec2 = *((int *) argv[10]); int hwin = *((int *) argv[11]); int hsrch = *((int *) argv[12]); return( im_match_linear_search( argv[0], argv[1], argv[2], xref1, yref1, xsec1, ysec1, xref2, yref2, xsec2, ysec2, hwin, hsrch ) ); } /* Description of im_match_linear_search. */ static im_function match_linear_search_desc = { "im_match_linear_search", /* Name */ "search sec, then resample so that tie-points match", IM_FN_PIO, /* Flags */ match_linear_search_vec, /* Dispatch function */ IM_NUMBER( match_linear_search_args ),/* Size of arg list */ match_linear_search_args /* Arg list */ }; /* correl args */ static im_arg_desc correl_args[] = { IM_INPUT_IMAGE( "ref" ), IM_INPUT_IMAGE( "sec" ), IM_INPUT_INT( "xref" ), IM_INPUT_INT( "yref" ), IM_INPUT_INT( "xsec" ), IM_INPUT_INT( "ysec" ), IM_INPUT_INT( "hwindowsize" ), IM_INPUT_INT( "hsearchsize" ), IM_OUTPUT_DOUBLE( "correlation" ), IM_OUTPUT_INT( "x" ), IM_OUTPUT_INT( "y" ) }; /* Call im_correl via arg vector. */ static int correl_vec( im_object *argv ) { int xref = *((int *) argv[2]); int yref = *((int *) argv[3]); int xsec = *((int *) argv[4]); int ysec = *((int *) argv[5]); int cor = *((int *) argv[6]); int area = *((int *) argv[7]); int *x = (int *) argv[8]; int *y = (int *) argv[9]; double *correlation = (double *) argv[10]; return( im_correl( argv[0], argv[1], xref, yref, xsec, ysec, cor, area, correlation, x, y ) ); } /* Description of im_correl. */ static im_function correl_desc = { "im_correl", /* Name */ "search area around sec for match for area around ref", IM_FN_PIO, /* Flags */ correl_vec, /* Dispatch function */ IM_NUMBER( correl_args ), /* Size of arg list */ correl_args /* Arg list */ }; /* global_balance args */ static im_arg_desc global_balance_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "gamma" ) }; /* Call im_global_balance via arg vector. */ static int global_balance_vec( im_object *argv ) { double gamma = *((double *) argv[2]); return( im_global_balance( argv[0], argv[1], gamma ) ); } /* Description of im_global_balance. */ static im_function global_balance_desc = { "im_global_balance", /* Name */ "automatically rebuild mosaic with balancing", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ global_balance_vec, /* Dispatch function */ IM_NUMBER( global_balance_args ), /* Size of arg list */ global_balance_args /* Arg list */ }; /* Call im_global_balancef via arg vector. */ static int global_balancef_vec( im_object *argv ) { double gamma = *((double *) argv[2]); return( im_global_balancef( argv[0], argv[1], gamma ) ); } /* Description of im_global_balancef. */ static im_function global_balancef_desc = { "im_global_balancef", /* Name */ "automatically rebuild mosaic with balancing, float output", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ global_balancef_vec, /* Dispatch function */ IM_NUMBER( global_balance_args ), /* Size of arg list */ global_balance_args /* Arg list */ }; /* remosaic args */ static im_arg_desc remosaic_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_STRING( "old_str" ), IM_INPUT_STRING( "new_str" ) }; /* Call im_remosaic via arg vector. */ static int remosaic_vec( im_object *argv ) { return( im_remosaic( argv[0], argv[1], argv[2], argv[3] ) ); } /* Description of im_remosaic. */ static im_function remosaic_desc = { "im_remosaic", /* Name */ "automatically rebuild mosaic with new files", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ remosaic_vec, /* Dispatch function */ IM_NUMBER( remosaic_args ),/* Size of arg list */ remosaic_args /* Arg list */ }; static int align_bands_vec( im_object *argv ){ return im_align_bands( (IMAGE*)argv[0], (IMAGE*)argv[1] ); } static im_arg_desc align_bands_arg_types[]= { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; static im_function align_bands_desc= { "im_align_bands", "align the bands of an image", 0, align_bands_vec, IM_NUMBER( align_bands_arg_types ), align_bands_arg_types }; static int maxpos_subpel_vec( im_object *argv ){ return im_maxpos_subpel( (IMAGE*)argv[0], (double*)argv[1], (double*)argv[2] ); } static im_arg_desc maxpos_subpel_arg_types[]= { IM_INPUT_IMAGE( "im" ), IM_OUTPUT_DOUBLE( "x" ), IM_OUTPUT_DOUBLE( "y" ) }; static im_function maxpos_subpel_desc= { "im_maxpos_subpel", "subpixel position of maximum of (phase correlation) image", IM_FN_PIO, maxpos_subpel_vec, IM_NUMBER( maxpos_subpel_arg_types ), maxpos_subpel_arg_types }; /* Package up all these functions. */ static im_function *mos_list[] = { &align_bands_desc, &correl_desc, &find_lroverlap_desc, &find_tboverlap_desc, &global_balance_desc, &global_balancef_desc, &lrmerge_desc, &lrmerge1_desc, &lrmosaic_desc, &lrmosaic1_desc, &match_linear_desc, &match_linear_search_desc, &maxpos_subpel_desc, &remosaic_desc, &tbmerge_desc, &tbmerge1_desc, &tbmosaic_desc, &tbmosaic1_desc }; /* Package of functions. */ im_package im__mosaicing = { "mosaicing", IM_NUMBER( mos_list ), mos_list }; vips-7.38.5/libvips/mosaicing/match.c0000644000175000017500000001131112303140253014367 00000000000000/* Match images. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "mosaic.h" /* Given a pair of points, return scale, angle, dx, dy to resample the 2nd * image with. */ int im__coeff( int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, double *a, double *b, double *dx, double *dy ) { DOUBLEMASK *in, *out; if( !(in = im_create_dmask( "in", 4, 4 )) ) return( -1 ); in->coeff[0] = (double)xs1; in->coeff[1] = (double)-ys1; in->coeff[2] = 1.0; in->coeff[3] = 0.0; in->coeff[4] = (double)ys1; in->coeff[5] = (double)xs1; in->coeff[6] = 0.0; in->coeff[7] = 1.0; in->coeff[8] = (double)xs2; in->coeff[9] = (double)-ys2; in->coeff[10] = 1.0; in->coeff[11] = 0.0; in->coeff[12] = (double)ys2; in->coeff[13] = (double)xs2; in->coeff[14] = 0.0; in->coeff[15] = 1.0; if( !(out = im_matinv( in, "out" )) ) { im_free_dmask( in ); return( -1 ); } *a = out->coeff[0]*xr1 + out->coeff[1]*yr1 + out->coeff[2]*xr2 + out->coeff[3]*yr2; *b = out->coeff[4]*xr1 + out->coeff[5]*yr1 + out->coeff[6]*xr2 + out->coeff[7]*yr2; *dx= out->coeff[8]*xr1 + out->coeff[9]*yr1 + out->coeff[10]*xr2 + out->coeff[11]*yr2; *dy= out->coeff[12]*xr1 + out->coeff[13]*yr1 + out->coeff[14]*xr2 + out->coeff[15]*yr2; im_free_dmask( in ); im_free_dmask( out ); return( 0 ); } /** * im_match_linear: * @ref: reference image * @sec: secondary image * @out: output image * @xr1: first reference tie-point * @yr1: first reference tie-point * @xs1: first secondary tie-point * @ys1: first secondary tie-point * @xr2: second reference tie-point * @yr2: second reference tie-point * @xs2: second secondary tie-point * @ys2: second secondary tie-point * * Scale, rotate and translate @sec so that the tie-points line up. * * See also: im_match_linear_search(). * * Returns: 0 on success, -1 on error */ int im_match_linear( IMAGE *ref, IMAGE *sec, IMAGE *out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2 ) { double a, b, dx, dy; int w, h, x, y; /* Solve to get scale + rot + disp to obtain match. */ if( im__coeff( xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, &a, &b, &dx, &dy ) ) return( -1 ); /* Output area of ref image. */ x = 0; y = 0; w = ref->Xsize; h = ref->Ysize; /* Transform image! */ if( im_affinei( sec, out, vips_interpolate_bilinear_static(), a, -b, b, a, dx, dy, x, y, w, h ) ) return( -1 ); return( 0 ); } /** * im_match_linear_search: * @ref: reference image * @sec: secondary image * @out: output image * @xr1: first reference tie-point * @yr1: first reference tie-point * @xs1: first secondary tie-point * @ys1: first secondary tie-point * @xr2: second reference tie-point * @yr2: second reference tie-point * @xs2: second secondary tie-point * @ys2: second secondary tie-point * @hwindowsize: half window size * @hsearchsize: half search size * * Scale, rotate and translate @sec so that the tie-points line up. * * Before performing the transformation, the tie-points are improved by * searching an area of @sec of size @hsearchsize for a * match of size @hwindowsize to @ref. * * This function will only work well for small rotates and scales. * * See also: im_match_linear(). * * Returns: 0 on success, -1 on error */ int im_match_linear_search( IMAGE *ref, IMAGE *sec, IMAGE *out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int hwindowsize, int hsearchsize ) { int xs3, ys3; int xs4, ys4; double cor1, cor2; if( im_correl( ref, sec, xr1, yr1, xs1, ys1, hwindowsize, hsearchsize, &cor1, &xs3, &ys3 ) || im_correl( ref, sec, xr2, yr2, xs2, ys2, hwindowsize, hsearchsize, &cor2, &xs4, &ys4 ) || im_match_linear( ref, sec, out, xr1, yr1, xs3, ys3, xr2, yr2, xs4, ys4 ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/mosaicing/global_balance.c0000644000175000017500000011662212303140253016213 00000000000000/* Parse ".desc" files from mosaiced images to generate (x,y) offsets for * every sub-image. Find all overlap stats and solve balancing with LMS. * Regenerate mosaic, with balancing fixed. * * 1/12/93 JC * - first version, unfinished! * 6/9/95 JC * - LMS fixed, now works, more or less * 12/9/95 JC * - now does positions correctly too * - ignores trivial overlaps * 19/9/95 JC * - prints correct number of balance factors! * 10/11/95 JC * - now tracks im_copy() calls too, so you can save sub-images * 12/1/96 JC * - slightly clearer diagnostics * - better centre of factors around 1.0 with log() average * 1/3/96 JC * - new im_global_balance_float variant lets our caller adjust factor * range if output has burn-out * - im_global_balance_search uses the above to produce scaled output ... * very slow! * 11/3/96 JC * - now tries current directory too for input files * 22/3/96 JC * - horrible bug in position finding! now fixed * 1/8/97 JC * - revised for new mosaic functions and non-square images * 12/9/97 JC * - code for im_lrmosaic1() support * - output type == input type, so works for short images too * 6/1/99 JC * - new gamma parameter, do scale in linear space * - removed _search version, as can now be done with ip * - renamed _float to f suffix, in line with im_conv()/im_convf() * 15/2/00 JC * - balancef() did not scale in linear space * 2/2/01 JC * - added tunable max blend width * 7/11/01 JC * - global_balance.h broken out for im_remosaic() * 25/02/02 JC * - better transform function scheme * 21/3/01 JC * - quicker bailout on error * 8/11/02 JC * - add <> around file names so you can have spaces :( * 9/12/02 JC * - track original params and always reuse them ... makes us proof * against geo reconstruct errors * 10/3/03 JC * - weed out overlaps which contain only transparent pixels * 4/1/07 * - switch to new history thing, switch im_errormsg() too * 24/1/11 * - gtk-doc * 12/7/12 * - always allocate local to an output descriptor ... stops ref cycles * with the new base class */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Strategy: build a tree describing the file * relationships in the desc file, then walk that passing constraints * back up to the root. Look up file names in symbol_table. */ /* Define for debug output. #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "merge.h" #include "global_balance.h" #define MAX_ITEMS (50) /* How pix an overlap has to be (in pixels) before we think it's trivial and * we ignore it. */ #define TRIVIAL (20 * 20) /* Break a string into a list of strings. Write '\0's into the string. out * needs to be MAX_FILES long. -1 for error, otherwise number of args found. " " out[0] = "fred" out[1] = "jim poop" out[2] = "sn aff le" */ static int break_items( char *line, char **out ) { int i; char *p; for( i = 0; i < MAX_ITEMS; i++ ) { /* Skip to first '<'. */ if( !(p = strchr( line, '<' )) ) break; out[i] = line = p + 1; if( !(p = strchr( line, '>' )) ) { im_error( "break_files", "%s", _( "no matching '>'" ) ); return( -1 ); } *p = '\0'; line = p + 1; } if( i == MAX_ITEMS ) { im_error( "break_files", "%s", _( "too many items" ) ); return( -1 ); } return( i ); } /* Try to open a file. If full path fails, try the current directory. */ IMAGE * im__global_open_image( SymbolTable *st, char *name ) { IMAGE *im; if( (im = im_open_local( st->im, name, "r" )) || (im = im_open_local( st->im, im_skip_dir( name ), "r" )) ) return( im ); return( NULL ); } static int junk_node( JoinNode *node ) { IM_FREEF( g_slist_free, node->overlaps ); return( 0 ); } /* Hash from a filename to an index into symbol_table. */ static int hash( char *n ) { int i; int r = 0; int l = strlen( n ); for( i = 0; i < l; i++ ) r = ((r + n[i]) * 43) & 0xffffff; return( r % SYM_TAB_SIZE ); } /* Make a leaf for a file. */ static JoinNode * build_node( SymbolTable *st, char *name ) { JoinNode *node = IM_NEW( st->im, JoinNode ); int n = hash( name ); /* Fill fields. */ if( !node || !(node->name = im_strdup( st->im, name )) ) return( NULL ); node->type = JOIN_LEAF; node->dirty = 0; node->mwidth = -2; node->st = st; vips__transform_init( &node->cumtrn ); node->trnim = NULL; node->arg1 = NULL; node->arg2 = NULL; node->overlaps = NULL; node->im = NULL; node->index = 0; if( im_add_close_callback( st->im, (im_callback_fn) junk_node, node, NULL ) ) return( NULL ); /* Try to open. */ if( (node->im = im__global_open_image( st, name )) ) { /* There is a file there - set width and height. */ node->cumtrn.oarea.width = node->im->Xsize; node->cumtrn.oarea.height = node->im->Ysize; } else { /* Clear the error buffer to lessen confusion. */ im_error_clear(); } st->table[n] = g_slist_prepend( st->table[n], node ); return( node ); } /* Make a new overlap struct. */ static OverlapInfo * build_overlap( JoinNode *node, JoinNode *other, Rect *overlap ) { OverlapInfo *lap = IM_NEW( node->st->im, OverlapInfo ); if( !lap ) return( NULL ); lap->node = node; lap->other = other; lap->overlap = *overlap; lap->nstats = NULL; lap->ostats = NULL; node->overlaps = g_slist_prepend( node->overlaps, lap ); node->st->novl++; return( lap ); } static void overlap_destroy( OverlapInfo *lap ) { JoinNode *node = lap->node; node->overlaps = g_slist_remove( node->overlaps, lap ); g_assert( node->st->novl > 0 ); node->st->novl--; } static int junk_table( SymbolTable *st ) { int i; for( i = 0; i < st->sz; i++ ) IM_FREEF( g_slist_free, st->table[i] ); return( 0 ); } /* Build a new symbol table. */ SymbolTable * im__build_symtab( IMAGE *out, int sz ) { SymbolTable *st = IM_NEW( out, SymbolTable ); int i; if( !st || !(st->table = IM_ARRAY( out, sz, GSList * )) ) return( NULL ); st->sz = sz; st->im = out; st->novl = 0; st->nim = 0; st->njoin = 0; st->root = NULL; st->leaf = NULL; st->fac = NULL; if( im_add_close_callback( out, (im_callback_fn) junk_table, st, NULL ) ) return( NULL ); for( i = 0; i < sz; i++ ) st->table[i] = NULL; return( st ); } /* Does this node have this file name? */ static JoinNode * test_name( JoinNode *node, char *name ) { if( strcmp( node->name, name ) == 0 ) return( node ); else return( NULL ); } /* Look up a filename in the symbol_table. */ static JoinNode * find_node( SymbolTable *st, char *name ) { return( im_slist_map2( st->table[hash( name )], (VSListMap2Fn) test_name, name, NULL ) ); } /* Given a name: return either the existing node for that name, or a new node * we have made. */ static JoinNode * add_node( SymbolTable *st, char *name ) { JoinNode *node; if( !(node = find_node( st, name )) && !(node = build_node( st, name )) ) return( NULL ); return( node ); } /* Map a user function over the whole of the symbol table. */ void * im__map_table( SymbolTable *st, void *(*fn)(), void *a, void *b ) { int i; void *r; for( i = 0; i < st->sz; i++ ) if( (r = im_slist_map2( st->table[i], (VSListMap2Fn) fn, a, b )) ) return( r ); return( NULL ); } /* Set the dirty field on a join. */ static void * set_dirty( JoinNode *node, int state ) { node->dirty = state; return( NULL ); } /* Clean the whole table. */ static void clean_table( SymbolTable *st ) { (void) im__map_table( st, set_dirty, (void *) 0, NULL ); } /* Do geometry calculations on a node, assuming geo is up to date for any * children. */ static void calc_geometry( JoinNode *node ) { Rect um; switch( node->type ) { case JOIN_LR: case JOIN_TB: case JOIN_LRROTSCALE: case JOIN_TBROTSCALE: /* Join two areas. */ im_rect_unionrect( &node->arg1->cumtrn.oarea, &node->arg2->cumtrn.oarea, &um ); node->cumtrn.iarea.left = 0; node->cumtrn.iarea.top = 0; node->cumtrn.iarea.width = um.width; node->cumtrn.iarea.height = um.height; vips__transform_set_area( &node->cumtrn ); break; case JOIN_CP: /* Copy from child. */ node->cumtrn = node->arg1->cumtrn; break; case JOIN_LEAF: /* Just use leaf dimensions, if there are any. */ if( node->im ) { node->cumtrn.iarea.left = 0; node->cumtrn.iarea.top = 0; node->cumtrn.iarea.width = node->im->Xsize; node->cumtrn.iarea.height = node->im->Ysize; vips__transform_set_area( &node->cumtrn ); } break; default: error_exit( "internal error #98356" ); /*NOTREACHED*/ } } /* Propogate a transform down a tree. If dirty is set, we've been here before, * so there is a doubling up of this node. If this is a leaf, then we have the * same leaf twice (which, in fact, we can cope with); if this is a node, we * have circularity. */ static int propogate_transform( JoinNode *node, VipsTransformation *trn ) { if( !node ) return( 0 ); if( node->dirty && node->arg1 && node->arg2 ) { im_error( "im_global_balance", "%s", _( "circularity detected" ) ); return( -1 ); } node->dirty = 1; /* Transform our children. */ if( propogate_transform( node->arg1, trn ) || propogate_transform( node->arg2, trn ) ) return( -1 ); /* Transform us, and recalculate our position and size. */ vips__transform_add( &node->cumtrn, trn, &node->cumtrn ); calc_geometry( node ); return( 0 ); } /* Ah ha! A leaf is actually made up of two smaller files with an lr or a tb * merge. Turn a leaf node into a join node. Propogate the transform down * arg2's side of the tree. */ static int make_join( SymbolTable *st, JoinType type, JoinNode *arg1, JoinNode *arg2, JoinNode *out, double a, double b, double dx, double dy, int mwidth ) { VipsTransformation trn; /* Check output is ok. */ if( out->type != JOIN_LEAF ) { im_error( "im_global_balance", _( "image \"%s\" used twice as output" ), out->name ); return( -1 ); } /* Fill fields. */ out->type = type; out->mwidth = mwidth; out->a = a; out->b = b; out->dx = dx; out->dy = dy; out->arg1 = arg1; out->arg2 = arg2; out->thistrn.a = a; out->thistrn.b = -b; out->thistrn.c = b; out->thistrn.d = a; out->thistrn.idx = 0; out->thistrn.idy = 0; out->thistrn.odx = dx; out->thistrn.ody = dy; /* Clean the table and propogate the transform down the RHS of the * graph. */ clean_table( st ); if( propogate_transform( arg2, &out->thistrn ) ) return( -1 ); /* Find the position and size of our output. */ calc_geometry( out ); /* Now normalise the result, so that out is at (0,0) again. */ trn.a = 1.0; trn.b = 0.0; trn.c = 0.0; trn.d = 1.0; trn.idx = 0; trn.idy = 0; trn.odx = -out->cumtrn.oarea.left; trn.ody = -out->cumtrn.oarea.top; clean_table( st ); if( propogate_transform( out, &trn ) ) return( -1 ); return( 0 ); } /* Make a copy node. */ static int make_copy( SymbolTable *st, JoinNode *before, JoinNode *after ) { /* Check output is ok. */ if( after->type != JOIN_LEAF ) { im_error( "im_global_balance", _( "image \"%s\" used twice as output" ), after->name ); return( -1 ); } /* Fill fields. */ after->type = JOIN_CP; after->arg1 = before; after->arg2 = NULL; /* Copy over the position and size from the before to the after. */ calc_geometry( after ); return( 0 ); } /* Process a single .desc line. */ static int process_line( SymbolTable *st, const char *text ) { char line[1024]; #ifdef DEBUG printf( "read: %s\n", text ); #endif /*DEBUG*/ /* We destroy line during the parse. */ im_strncpy( line, text, 1024 ); if( im_isprefix( "#LRJOIN ", line ) || im_isprefix( "#TBJOIN ", line ) ) { /* Yes: magic join command. Break into tokens. Format is eg. #LRJOIN [] */ char *item[MAX_ITEMS]; int nitems; JoinType type; JoinNode *arg1, *arg2, *join; int dx, dy, mwidth; if( (nitems = break_items( line, item )) < 0 ) return( -1 ); if( nitems != 5 && nitems != 6 ) { im_error( "global_balance", "%s", _( "bad number of args in join line" ) ); return( -1 ); } if( !(arg1 = add_node( st, item[0] )) || !(arg2 = add_node( st, item[1] )) || !(join = add_node( st, item[2] )) ) return( -1 ); dx = atoi( item[3] ); dy = atoi( item[4] ); if( nitems == 6 ) mwidth = atoi( item[5] ); else mwidth = -1; if( im_isprefix( "#LRJOIN ", line ) ) type = JOIN_LR; else type = JOIN_TB; if( make_join( st, type, arg1, arg2, join, 1.0, 0.0, dx, dy, mwidth ) ) return( -1 ); } else if( im_isprefix( "#LRROTSCALE ", line ) || im_isprefix( "#TBROTSCALE ", line ) ) { /* Rot + scale. Format is eg. #LRROTSCALE \ [] */ char *item[MAX_ITEMS]; int nitems; JoinType type; JoinNode *arg1, *arg2, *join; double a, b, dx, dy; int mwidth; if( (nitems = break_items( line, item )) < 0 ) return( -1 ); if( nitems != 7 && nitems != 8 ) { im_error( "global_balance", "%s", _( "bad number of args in join1 line" ) ); return( -1 ); } if( !(arg1 = add_node( st, item[0] )) || !(arg2 = add_node( st, item[1] )) || !(join = add_node( st, item[2] )) ) return( -1 ); a = g_ascii_strtod( item[3], NULL ); b = g_ascii_strtod( item[4], NULL ); dx = g_ascii_strtod( item[5], NULL ); dy = g_ascii_strtod( item[6], NULL ); if( nitems == 8 ) mwidth = atoi( item[7] ); else mwidth = -1; if( im_isprefix( "#LRROTSCALE ", line ) ) type = JOIN_LRROTSCALE; else type = JOIN_TBROTSCALE; if( make_join( st, type, arg1, arg2, join, a, b, dx, dy, mwidth ) ) return( -1 ); } else if( im_isprefix( "copy ", line ) ) { /* im_copy() call ... make a JOIN_CP node. */ char *item[MAX_ITEMS]; int nitems; JoinNode *before, *after; if( (nitems = break_items( line, item )) < 0 ) return( -1 ); if( nitems != 2 ) { im_error( "global_balance", "%s", _( "bad number of args in copy line" ) ); return( -1 ); } if( !(before = add_node( st, item[0] )) || !(after = add_node( st, item[1] )) || make_copy( st, before, after ) ) return( -1 ); } return( 0 ); } /* Set the dirty flag on any nodes we reference. */ static void * set_referenced( JoinNode *node ) { if( node->arg1 ) node->arg1->dirty = 1; if( node->arg2 ) node->arg2->dirty = 1; return( NULL ); } /* Is this a root node? Should be clean. */ static void * is_root( JoinNode *node ) { if( !node->dirty ) return( (void *) node ); else return( NULL ); } /* Scan the symbol table, looking for a node which no node references. */ static JoinNode * find_root( SymbolTable *st ) { JoinNode *root; /* Clean the table, then scan it, setting all pointed-to nodes dirty. */ clean_table( st ); im__map_table( st, set_referenced, NULL, NULL ); /* Look for the first clean symbol. */ root = (JoinNode *) im__map_table( st, is_root, NULL, NULL ); /* No root? Hot dang! */ if( !root ) { im_error( "im_global_balance", "%s", _( "mosaic root not found in desc file\n" "is this really a mosaiced image?" ) ); return( NULL ); } /* Now dirty that - then if there are any more clean symbols, we have * more than one root. */ root->dirty = 1; if( im__map_table( st, is_root, NULL, NULL ) ) { im_error( "im_global_balance", "%s", _( "more than one root" ) ); return( NULL ); } return( root ); } /* Walk history_list and parse each line. */ int im__parse_desc( SymbolTable *st, IMAGE *in ) { GSList *p; for( p = in->history_list; p; p = p->next ) { GValue *value = (GValue *) p->data; g_assert( G_VALUE_TYPE( value ) == IM_TYPE_REF_STRING ); if( process_line( st, im_ref_string_get( value ) ) ) return( -1 ); } /* Find root. */ if( !(st->root = find_root( st )) ) return( -1 ); return( 0 ); } /* Count and index all leaf images. */ static void * count_leaves( JoinNode *node ) { if( node->type == JOIN_LEAF ) { node->index = node->st->nim; node->st->nim++; } return( NULL ); } #ifdef DEBUG /* Print a JoinNode. */ static void print_node( JoinNode *node ) { printf( "%s, position %dx%d, size %dx%d, index %d\n", im_skip_dir( node->name ), node->cumtrn.oarea.left, node->cumtrn.oarea.top, node->cumtrn.oarea.width, node->cumtrn.oarea.height, node->index ); } #endif /*DEBUG*/ #ifdef DEBUG /* Print a leaf. */ static void * print_leaf( JoinNode *node ) { if( node->type == JOIN_LEAF ) print_node( node ); return( NULL ); } #endif /*DEBUG*/ /* Count all join nodes. */ static void * count_joins( JoinNode *node ) { if( node->type == JOIN_TB || node->type == JOIN_LR || node->type == JOIN_LRROTSCALE || node->type == JOIN_TBROTSCALE ) node->st->njoin++; return( NULL ); } #ifdef DEBUG /* Print a few spaces. */ static void spc( int n ) { int i; for( i = 0; i < n; i++ ) printf( " " ); } #endif /*DEBUG*/ #ifdef DEBUG static char * JoinType2char( JoinType type ) { switch( type ) { case JOIN_LR: return( "JOIN_LR" ); case JOIN_TB: return( "JOIN_TB" ); case JOIN_LRROTSCALE: return( "JOIN_LRROTSCALE" ); case JOIN_TBROTSCALE: return( "JOIN_TBROTSCALE" ); case JOIN_CP: return( "JOIN_CP" ); case JOIN_LEAF: return( "JOIN_LEAF" ); default: error_exit( "internal error #9275" ); /*NOTEACHED*/ return( NULL ); } } #endif /*DEBUG*/ #ifdef DEBUG /* Print a join node. */ static void * print_joins( JoinNode *node, int indent ) { switch( node->type ) { case JOIN_TB: case JOIN_LR: case JOIN_TBROTSCALE: case JOIN_LRROTSCALE: spc( indent ); printf( "%s to make %s, size %dx%d, pos. %dx%d, of:\n", JoinType2char( node->type ), im_skip_dir( node->name ), node->cumtrn.oarea.width, node->cumtrn.oarea.height, node->cumtrn.oarea.left, node->cumtrn.oarea.top ); spc( indent ); printf( "reference:\n" ); print_joins( node->arg1, indent+2 ); spc( indent ); printf( "secondary:\n" ); print_joins( node->arg2, indent+2 ); break; case JOIN_CP: spc( indent ); printf( "copy to make %s of:\n", im_skip_dir( node->name ) ); print_joins( node->arg1, indent+2 ); break; case JOIN_LEAF: spc( indent ); printf( "input image %s\n", im_skip_dir( node->name ) ); break; } return( NULL ); } #endif /*DEBUG*/ #ifdef DEBUG /* Print an overlap. */ static void * print_overlap( OverlapInfo *lap ) { printf( "-> %s overlaps with %s; (this, other) = (%.4G, %.4G)\n", im_skip_dir( lap->node->name ), im_skip_dir( lap->other->name ), lap->nstats->coeff[4], lap->ostats->coeff[4] ); return( NULL ); } #endif /*DEBUG*/ #ifdef DEBUG /* Print the overlaps on a leaf. */ static void * print_overlaps( JoinNode *node ) { if( node->type == JOIN_LEAF && g_slist_length( node->overlaps ) > 0 ) { printf( "overlap of %s with:\n", im_skip_dir( node->name ) ); im_slist_map2( node->overlaps, (VSListMap2Fn) print_overlap, NULL, NULL ); } return( NULL ); } #endif /*DEBUG*/ #ifdef DEBUG /* Print and accumulate the error on an overlap. */ static void * print_overlap_error( OverlapInfo *lap, double *fac, double *total ) { double na = lap->nstats->coeff[4]; double oa = lap->ostats->coeff[4]; double err; if( fac ) { na *= fac[lap->node->index]; oa *= fac[lap->other->index]; } err = na - oa; printf( "-> file %s, error = %g\n", im_skip_dir( lap->other->name ), err ); *total += err*err; return( NULL ); } #endif /*DEBUG*/ #ifdef DEBUG /* Print and accumulate the overlap errors on a leaf. */ static void * print_overlap_errors( JoinNode *node, double *fac, double *total ) { if( node->type == JOIN_LEAF && g_slist_length( node->overlaps ) > 0 ) { printf( "overlap of %s (index %d) with:\n", im_skip_dir( node->name ), node->index ); im_slist_map2( node->overlaps, (VSListMap2Fn) print_overlap_error, fac, total ); } return( NULL ); } #endif /*DEBUG*/ /* Extract a rect. */ static int extract_rect( IMAGE *in, IMAGE *out, Rect *r ) { return( im_extract_area( in, out, r->left, r->top, r->width, r->height ) ); } /* Two images overlap in an area ... make a mask the size of the area, which * has 255 for every pixel where both images are non-zero. */ static int make_overlap_mask( IMAGE *mem, IMAGE *ref, IMAGE *sec, IMAGE *mask, Rect *rarea, Rect *sarea ) { IMAGE *t[6]; if( im_open_local_array( mem, t, 6, "mytemps", "p" ) || extract_rect( ref, t[0], rarea ) || extract_rect( sec, t[1], sarea ) || im_extract_band( t[0], t[2], 0 ) || im_extract_band( t[1], t[3], 0 ) || im_notequalconst( t[2], t[4], 0.0 ) || im_notequalconst( t[3], t[5], 0.0 ) || im_andimage( t[4], t[5], mask ) ) return( -1 ); return( 0 ); } /* Find the number of non-zero pixels in a mask image. */ static int count_nonzero( IMAGE *in, gint64 *count ) { double avg; if( im_avg( in, &avg ) ) return( -1 ); *count = (avg * VIPS_IMAGE_N_PELS( in )) / 255.0; return( 0 ); } /* Find stats on an area of an IMAGE ... consider only pixels for which the * mask is true. */ static DOUBLEMASK * find_image_stats( IMAGE *mem, IMAGE *in, IMAGE *mask, Rect *area ) { DOUBLEMASK *stats; IMAGE *t[4]; gint64 count; /* Extract area, build black image, mask out pixels we want. */ if( im_open_local_array( mem, t, 4, "find_image_stats", "p" ) || extract_rect( in, t[0], area ) || im_black( t[1], t[0]->Xsize, t[0]->Ysize, t[0]->Bands ) || im_clip2fmt( t[1], t[2], t[0]->BandFmt ) || im_ifthenelse( mask, t[0], t[2], t[3] ) ) return( NULL ); /* Get stats from masked image. */ if( !(stats = im_local_dmask( mem, im_stats( t[3] ) )) ) return( NULL ); /* Number of non-zero pixels in mask. */ if( count_nonzero( mask, &count ) ) return( NULL ); /* And scale masked average to match. */ stats->coeff[4] *= (double) count / VIPS_IMAGE_N_PELS( mask ); /* Yuk! Zap the deviation column with the pixel count. Used later to * determine if this is likely to be a significant overlap. */ stats->coeff[5] = count; #ifdef DEBUG if( count == 0 ) im_warn( "global_balance", "%s", _( "empty overlap!" ) ); #endif /*DEBUG*/ return( stats ); } /* Find the stats for an overlap struct. */ static int find_overlap_stats( OverlapInfo *lap ) { IMAGE *mem = lap->node->st->im; IMAGE *t1 = im_open_local( mem, "find_overlap_stats:1", "p" ); Rect rarea, sarea; /* Translate the overlap area into the coordinate scheme for the main * node. */ rarea = lap->overlap; rarea.left -= lap->node->cumtrn.oarea.left; rarea.top -= lap->node->cumtrn.oarea.top; /* Translate the overlap area into the coordinate scheme for the other * node. */ sarea = lap->overlap; sarea.left -= lap->other->cumtrn.oarea.left; sarea.top -= lap->other->cumtrn.oarea.top; /* Make a mask for the overlap. */ if( make_overlap_mask( mem, lap->node->trnim, lap->other->trnim, t1, &rarea, &sarea ) ) return( -1 ); /* Find stats for that area. */ if( !(lap->nstats = find_image_stats( mem, lap->node->trnim, t1, &rarea )) ) return( -1 ); if( !(lap->ostats = find_image_stats( mem, lap->other->trnim, t1, &sarea )) ) return( -1 ); return( 0 ); } /* Sub-fn. of below. */ static void * overlap_eq( OverlapInfo *this, JoinNode *node ) { if( this->other == node ) return( this ); else return( NULL ); } /* Is this an overlapping leaf? If yes, add to overlap list. */ static void * test_overlap( JoinNode *other, JoinNode *node ) { Rect overlap; OverlapInfo *lap; /* Is other a suitable leaf to overlap with node? */ if( other->type != JOIN_LEAF || node == other ) return( NULL ); /* Is there an overlap? */ im_rect_intersectrect( &node->cumtrn.oarea, &other->cumtrn.oarea, &overlap ); if( im_rect_isempty( &overlap ) ) return( NULL ); /* Is this a trivial overlap? Ignore it if it is. */ if( overlap.width * overlap.height < TRIVIAL ) /* Too few pixels. */ return( NULL ); /* Have we already added this overlap the other way around? ie. is * node on other's overlap list? */ if( im_slist_map2( other->overlaps, (VSListMap2Fn) overlap_eq, node, NULL ) ) return( NULL ); /* A new overlap - add to overlap list. */ if( !(lap = build_overlap( node, other, &overlap )) ) return( node ); /* Calculate overlap statistics. Open stuff relative to this, and * free quickly. */ if( find_overlap_stats( lap ) ) return( node ); /* If the pixel count either masked overlap is trivial, ignore this * overlap. */ if( lap->nstats->coeff[5] < TRIVIAL || lap->ostats->coeff[5] < TRIVIAL ) { #ifdef DEBUG printf( "trivial overlap ... junking\n" ); printf( "nstats count = %g, ostats count = %g\n", lap->nstats->coeff[5], lap->ostats->coeff[5] ); print_overlap( lap ); #endif /*DEBUG*/ overlap_destroy( lap ); } return( NULL ); } /* If this is a leaf, look at all other joins for a leaf that overlaps. Aside: * If this is a leaf, there should be an IMAGE. Flag an error if there is * not. */ static void * find_overlaps( JoinNode *node, SymbolTable *st ) { if( node->type == JOIN_LEAF ) { /* Check for image. */ if( !node->im ) { im_error( "im_global_balance", _( "unable to open \"%s\"" ), node->name ); return( node ); } if( !node->trnim ) error_exit( "global_balance: sanity failure #9834" ); return( im__map_table( st, test_overlap, node, NULL ) ); } return( NULL ); } /* Bundle of variables for matrix creation. */ typedef struct { SymbolTable *st; /* Main table */ JoinNode *leaf; /* Leaf to be 1.000 */ DOUBLEMASK *K; /* LHS */ DOUBLEMASK *M; /* RHS */ int row; /* Current row */ } MatrixBundle; /* Add a new row for the nominated overlap to the matricies. */ static void * add_nominated( OverlapInfo *ovl, MatrixBundle *bun, double *gamma ) { double *Kp = bun->K->coeff + bun->row; double *Mp = bun->M->coeff + bun->row*bun->M->xsize; double ns = pow( ovl->nstats->coeff[4], 1/(*gamma) ); double os = pow( ovl->ostats->coeff[4], 1/(*gamma) ); Kp[0] = ns; Mp[ovl->other->index - 1] = os; bun->row++; return( NULL ); } /* Add a new row for an ordinary overlap to the matricies. */ static void * add_other( OverlapInfo *ovl, MatrixBundle *bun, double *gamma ) { double *Mp = bun->M->coeff + bun->row*bun->M->xsize; double ns = -pow( ovl->nstats->coeff[4], 1/(*gamma) ); double os = pow( ovl->ostats->coeff[4], 1/(*gamma) ); Mp[ovl->node->index - 1] = ns; Mp[ovl->other->index - 1] = os; bun->row++; return( NULL ); } /* Add stuff for node to matrix. */ static void * add_row( JoinNode *node, MatrixBundle *bun, double *gamma ) { if( node == bun->leaf ) im_slist_map2( node->overlaps, (VSListMap2Fn) add_nominated, bun, gamma ); else im_slist_map2( node->overlaps, (VSListMap2Fn) add_other, bun, gamma ); return( NULL ); } /* Fill K and M. leaf is image selected to have factor of 1.000. */ static void fill_matricies( SymbolTable *st, double gamma, DOUBLEMASK *K, DOUBLEMASK *M ) { MatrixBundle bun; bun.st = st; bun.leaf = st->leaf; bun.K = K; bun.M = M; bun.row = 0; /* Build matricies. */ im__map_table( st, add_row, &bun, &gamma ); } /* Used to select the leaf whose coefficient we set to 1. */ static void * choose_leaf( JoinNode *node ) { if( node->type == JOIN_LEAF ) return( node ); return( NULL ); } /* Make an image from a node. */ static IMAGE * make_mos_image( SymbolTable *st, JoinNode *node, transform_fn tfn, void *a ) { IMAGE *im1, *im2, *out; switch( node->type ) { case JOIN_LR: case JOIN_TB: if( !(im1 = make_mos_image( st, node->arg1, tfn, a )) || !(im2 = make_mos_image( st, node->arg2, tfn, a )) || !(out = im_open_local( st->im, node->name, "p" )) ) return( NULL ); if( node->type == JOIN_LR ) { if( im_lrmerge( im1, im2, out, -node->dx, -node->dy, node->mwidth ) ) return( NULL ); } else { if( im_tbmerge( im1, im2, out, -node->dx, -node->dy, node->mwidth ) ) return( NULL ); } break; case JOIN_LRROTSCALE: case JOIN_TBROTSCALE: if( !(im1 = make_mos_image( st, node->arg1, tfn, a )) || !(im2 = make_mos_image( st, node->arg2, tfn, a )) || !(out = im_open_local( st->im, node->name, "p" )) ) return( NULL ); if( node->type == JOIN_LRROTSCALE ) { if( im__lrmerge1( im1, im2, out, node->a, node->b, node->dx, node->dy, node->mwidth ) ) return( NULL ); } else { if( im__tbmerge1( im1, im2, out, node->a, node->b, node->dx, node->dy, node->mwidth ) ) return( NULL ); } break; case JOIN_LEAF: /* Trivial case! */ if( !(out = tfn( node, a )) ) return( NULL ); break; case JOIN_CP: /* Very trivial case. */ out = make_mos_image( st, node->arg1, tfn, a ); break; default: error_exit( "internal error #982369824375987" ); /*NOTEACHED*/ return( NULL ); } return( out ); } /* Re-build mosaic. */ int im__build_mosaic( SymbolTable *st, IMAGE *out, transform_fn tfn, void *a ) { JoinNode *root = st->root; IMAGE *im1, *im2; switch( root->type ) { case JOIN_LR: case JOIN_TB: if( !(im1 = make_mos_image( st, root->arg1, tfn, a )) || !(im2 = make_mos_image( st, root->arg2, tfn, a )) ) return( -1 ); if( root->type == JOIN_LR ) { if( im_lrmerge( im1, im2, out, -root->dx, -root->dy, root->mwidth ) ) return( -1 ); } else { if( im_tbmerge( im1, im2, out, -root->dx, -root->dy, root->mwidth ) ) return( -1 ); } break; case JOIN_LRROTSCALE: case JOIN_TBROTSCALE: if( !(im1 = make_mos_image( st, root->arg1, tfn, a )) || !(im2 = make_mos_image( st, root->arg2, tfn, a )) ) return( -1 ); if( root->type == JOIN_LRROTSCALE ) { if( im__lrmerge1( im1, im2, out, root->a, root->b, root->dx, root->dy, root->mwidth ) ) return( -1 ); } else { if( im__tbmerge1( im1, im2, out, root->a, root->b, root->dx, root->dy, root->mwidth ) ) return( -1 ); } break; case JOIN_LEAF: /* Trivial case! Just one file in our mosaic. */ if( !(im1 = tfn( root, a )) || im_copy( im1, out ) ) return( -1 ); break; case JOIN_CP: /* Very trivial case. */ if( !(im1 = make_mos_image( st, root->arg1, tfn, a )) ) return( -1 ); if( im_copy( im1, out ) ) return( -1 ); break; default: error_exit( "internal error #982369824375987" ); /*NOTEACHED*/ } return( 0 ); } /* Find correction factors. */ static int find_factors( SymbolTable *st, double gamma ) { DOUBLEMASK *K; DOUBLEMASK *M; DOUBLEMASK *m1, *m2, *m3, *m4, *m5; double total; double avg; int i; /* Make output matricies. */ if( !(K = im_local_dmask( st->im, im_create_dmask( "K", 1, st->novl ) )) || !(M = im_local_dmask( st->im, im_create_dmask( "M", st->nim-1, st->novl ) )) ) return( -1 ); fill_matricies( st, gamma, K, M ); #ifdef DEBUG im_write_dmask( K ); im_write_dmask( M ); #endif /*DEBUG*/ /* Calculate LMS. */ if( !(m1 = im_local_dmask( st->im, im_mattrn( M, "lms:1" ) )) ) return( -1 ); if( !(m2 = im_local_dmask( st->im, im_matmul( m1, M, "lms:2" ) )) ) return( -1 ); if( !(m3 = im_local_dmask( st->im, im_matinv( m2, "lms:3" ) )) ) return( -1 ); if( !(m4 = im_local_dmask( st->im, im_matmul( m3, m1, "lms:4" ) )) ) return( -1 ); if( !(m5 = im_local_dmask( st->im, im_matmul( m4, K, "lms:5" ) )) ) return( -1 ); /* Make array of correction factors. */ if( !(st->fac = IM_ARRAY( st->im, st->nim, double )) ) return( -1 ); for( i = 0; i < m5->ysize; i++ ) st->fac[i + 1] = m5->coeff[i]; st->fac[0] = 1.0; /* Find average balance factor, normalise to that average. */ total = 0.0; for( i = 0; i < st->nim; i++ ) total += st->fac[i]; avg = total / st->nim; for( i = 0; i < st->nim; i++ ) st->fac[i] /= avg; #ifdef DEBUG /* Diagnostics! */ printf( "debugging output for im_global_balance():\n" ); for( i = 0; i < st->nim; i++ ) printf( "balance factor %d = %g\n", i, st->fac[i] ); total = 0.0; printf( "Overlap errors:\n" ); im__map_table( st, print_overlap_errors, NULL, &total ); printf( "RMS error = %g\n", sqrt( total / st->novl ) ); total = 0.0; printf( "Overlap errors after adjustment:\n" ); im__map_table( st, print_overlap_errors, st->fac, &total ); printf( "RMS error = %g\n", sqrt( total / st->novl ) ); #endif /*DEBUG*/ return( 0 ); } /* Look for all leaves, make sure we have a transformed version of each. */ static void * generate_trn_leaves( JoinNode *node, SymbolTable *st ) { if( node->type == JOIN_LEAF ) { /* Check for image. */ if( !node->im ) { im_error( "im_global_balance", _( "unable to open \"%s\"" ), node->name ); return( node ); } if( node->trnim ) error_exit( "global_balance: sanity failure #765" ); /* Special case: if this is an untransformed leaf (there will * always be at least one), then skip the affine. */ if( vips__transform_isidentity( &node->cumtrn ) ) node->trnim = node->im; else if( !(node->trnim = im_open_local( node->st->im, "trnleaf:1", "p" )) || vips__affine( node->im, node->trnim, &node->cumtrn ) ) return( node ); } return( NULL ); } /* Analyse mosaic. */ static int analyse_mosaic( SymbolTable *st, IMAGE *in ) { /* Parse Hist on in. */ if( im__parse_desc( st, in ) ) return( -1 ); /* Print parsed data. */ #ifdef DEBUG printf( "Input files:\n" ); im__map_table( st, print_leaf, NULL, NULL ); printf( "\nOutput file:\n" ); print_node( st->root ); printf( "\nJoin commands:\n" ); print_joins( st->root, 0 ); #endif /*DEBUG*/ /* Generate transformed leaves. */ if( im__map_table( st, generate_trn_leaves, st, NULL ) ) return( -1 ); /* Find overlaps. */ if( im__map_table( st, find_overlaps, st, NULL ) ) return( -1 ); /* Scan table, counting and indexing input images and joins. */ im__map_table( st, count_leaves, NULL, NULL ); im__map_table( st, count_joins, NULL, NULL ); /* Select leaf to be 1.000. * This must be index == 0, unless you change stuff above! */ st->leaf = im__map_table( st, choose_leaf, NULL, NULL ); /* And print overlaps. */ #ifdef DEBUG printf( "\nLeaf to be 1.000:\n" ); print_node( st->leaf ); printf( "\nOverlaps:\n" ); im__map_table( st, print_overlaps, NULL, NULL ); printf( "\n%d input files, %d unique overlaps, %d joins\n", st->nim, st->novl, st->njoin ); #endif /*DEBUG*/ return( 0 ); } /* Scale im by fac --- if it's uchar/ushort, use a lut. If we can use a lut, * transform in linear space. If we can't, don't bother for efficiency. */ static IMAGE * transform( JoinNode *node, double *gamma ) { SymbolTable *st = node->st; IMAGE *in = node->im; double fac = st->fac[node->index]; IMAGE *out = im_open_local( st->im, node->name, "p" ); IMAGE *t1 = im_open_local( out, "transform:1", "p" ); IMAGE *t2 = im_open_local( out, "transform:2", "p" ); IMAGE *t3 = im_open_local( out, "transform:3", "p" ); IMAGE *t4 = im_open_local( out, "transform:4", "p" ); IMAGE *t5 = im_open_local( out, "transform:5", "p" ); if( !out || !t1 || !t2 || !t3 || !t4 || !t5 ) return( NULL ); if( fac == 1.0 ) { /* Easy! */ out = in; } else if( in->BandFmt == IM_BANDFMT_UCHAR ) { if( im_identity( t1, 1 ) || im_powtra( t1, t2, 1.0 / (*gamma) ) || im_lintra( fac, t2, 0.0, t3 ) || im_powtra( t3, t4, *gamma ) || im_clip2fmt( t4, t5, IM_BANDFMT_UCHAR ) || im_maplut( in, out, t5 ) ) return( NULL ); } else if( in->BandFmt == IM_BANDFMT_USHORT ) { if( im_identity_ushort( t1, 1, 65535 ) || im_powtra( t1, t2, 1.0 / (*gamma) ) || im_lintra( fac, t2, 0.0, t3 ) || im_powtra( t3, t4, *gamma ) || im_clip2fmt( t4, t5, IM_BANDFMT_USHORT ) || im_maplut( in, out, t5 ) ) return( NULL ); } else { /* Just im_lintra it. */ if( im_lintra( fac, in, 0.0, t1 ) || im_clip2fmt( t1, out, in->BandFmt ) ) return( NULL ); } return( out ); } /* As above, but output as float, not matched to input. */ static IMAGE * transformf( JoinNode *node, double *gamma ) { SymbolTable *st = node->st; IMAGE *in = node->im; double fac = node->st->fac[node->index]; IMAGE *out = im_open_local( st->im, node->name, "p" ); IMAGE *t1 = im_open_local( out, "transform:1", "p" ); IMAGE *t2 = im_open_local( out, "transform:2", "p" ); IMAGE *t3 = im_open_local( out, "transform:3", "p" ); IMAGE *t4 = im_open_local( out, "transform:4", "p" ); if( !out || !t1 || !t2 || !t3 || !t4 ) return( NULL ); if( fac == 1.0 ) { /* Easy! */ out = in; } else if( in->BandFmt == IM_BANDFMT_UCHAR ) { if( im_identity( t1, 1 ) || im_powtra( t1, t2, 1/(*gamma) ) || im_lintra( fac, t2, 0.0, t3 ) || im_powtra( t3, t4, *gamma ) || im_maplut( in, out, t4 ) ) return( NULL ); } else if( in->BandFmt == IM_BANDFMT_USHORT ) { if( im_identity_ushort( t1, 1, 65535 ) || im_powtra( t1, t2, 1/(*gamma) ) || im_lintra( fac, t2, 0.0, t3 ) || im_powtra( t3, t4, *gamma ) || im_maplut( in, out, t4 ) ) return( NULL ); } else { /* Just im_lintra it. */ if( im_lintra( fac, in, 0.0, out ) ) return( NULL ); } return( out ); } /** * im_global_balance: * @in: mosaic to rebuild * @out: output image * @gamma: gamma of source images * * im_global_balance() can be used to remove contrast differences in * an assembled mosaic. * * It reads the History field attached to @in and builds a list of the source * images that were used to make the mosaic and the position that each ended * up at in the final image. * * It opens each of the source images in turn and extracts all parts which * overlap with any of the other images. It finds the average values in the * overlap areas and uses least-mean-square to find a set of correction * factors which will minimise overlap differences. It uses @gamma to * gamma-correct the source images before calculating the factors. A value of * 1.0 will stop this. * * Each of the source images is transformed with the appropriate correction * factor, then the mosaic is reassembled. @out always has the same #BandFmt * as @in. Use im_global_balancef() to get float output and avoid clipping. * * There are some conditions that must be met before this operation can work: * the source images must all be present under the filenames recorded in the * history on @in, and the mosaic must have been built using only operations in * this package. * * See also: im_global_balancef(), im_remosaic(). * * Returns: 0 on success, -1 on error */ int im_global_balance( IMAGE *in, IMAGE *out, double gamma ) { SymbolTable *st; if( !(st = im__build_symtab( out, SYM_TAB_SIZE )) || analyse_mosaic( st, in ) || find_factors( st, gamma ) || im__build_mosaic( st, out, (transform_fn) transform, &gamma ) ) return( -1 ); return( 0 ); } /** * im_global_balancef: * @in: mosaic to rebuild * @out: output image * @gamma: gamma of source images * * Just as im_global_balance(), but the output image is always float. This * stops overflow or underflow in the case of an extremely unbalanced image * mosaic. * * See also: im_global_balance(), im_remosaic(). * * Returns: 0 on success, -1 on error */ int im_global_balancef( IMAGE *in, IMAGE *out, double gamma ) { SymbolTable *st; if( !(st = im__build_symtab( out, SYM_TAB_SIZE )) || analyse_mosaic( st, in ) || find_factors( st, gamma ) || im__build_mosaic( st, out, (transform_fn) transformf, &gamma ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/iofuncs/0000755000175000017500000000000012303146331012712 500000000000000vips-7.38.5/libvips/iofuncs/gate.c0000644000175000017500000002173412303140253013722 00000000000000/* gate.c --- thread profiling * * Written on: 18 nov 13 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Very verbose. #define VIPS_DEBUG_RED */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #define VIPS_GATE_SIZE (1000) /* A set of timing records. i is the index of the next slot we fill. */ typedef struct _VipsThreadGateBlock { struct _VipsThreadGateBlock *prev; gint64 time[VIPS_GATE_SIZE]; int i; } VipsThreadGateBlock; /* What we track for each gate-name. */ typedef struct _VipsThreadGate { const char *name; VipsThreadGateBlock *start; VipsThreadGateBlock *stop; } VipsThreadGate; /* One of these in per-thread private storage. */ typedef struct _VipsThreadProfile { /*< private >*/ const char *name; GThread *thread; GHashTable *gates; VipsThreadGate *memory; } VipsThreadProfile; gboolean vips__thread_profile = FALSE; static GPrivate *vips_thread_profile_key = NULL; static FILE *vips__thread_fp = NULL;; static void vips_thread_gate_block_save( VipsThreadGateBlock *block, FILE *fp ) { int i; for( i = block->i - 1; i >= 0; i-- ) fprintf( fp, "%" G_GINT64_FORMAT " ", block->time[i] ); fprintf( fp, "\n" ); if( block->prev ) vips_thread_gate_block_save( block->prev, fp ); } static void vips_thread_profile_save_gate( VipsThreadGate *gate, FILE *fp ) { if( gate->start->i || gate->start->prev ) { fprintf( fp, "gate: %s\n", gate->name ); fprintf( fp, "start:\n" ); vips_thread_gate_block_save( gate->start, fp ); fprintf( fp, "stop:\n" ); vips_thread_gate_block_save( gate->stop, fp ); } } static void vips_thread_profile_save_cb( gpointer key, gpointer value, gpointer data ) { VipsThreadGate *gate = (VipsThreadGate *) value; FILE *fp = (FILE *) data; vips_thread_profile_save_gate( gate, fp ); } static void vips_thread_profile_save( VipsThreadProfile *profile ) { g_mutex_lock( vips__global_lock ); VIPS_DEBUG_MSG( "vips_thread_profile_save: %s\n", profile->name ); if( !vips__thread_fp ) { vips__thread_fp = vips__file_open_write( "vips-profile.txt", TRUE ); if( !vips__thread_fp ) { g_mutex_unlock( vips__global_lock ); vips_error_exit( "unable to create profile log" ); } printf( "recording profile in vips-profile.txt\n" ); } fprintf( vips__thread_fp, "thread: %s (%p)\n", profile->name, profile ); g_hash_table_foreach( profile->gates, vips_thread_profile_save_cb, vips__thread_fp ); vips_thread_profile_save_gate( profile->memory, vips__thread_fp ); g_mutex_unlock( vips__global_lock ); } static void vips_thread_gate_block_free( VipsThreadGateBlock *block ) { VIPS_FREEF( vips_thread_gate_block_free, block->prev ); VIPS_FREE( block ); } static void vips_thread_gate_free( VipsThreadGate *gate ) { VIPS_FREEF( vips_thread_gate_block_free, gate->start ); VIPS_FREEF( vips_thread_gate_block_free, gate->stop ); VIPS_FREE( gate ); } static void vips_thread_profile_free( VipsThreadProfile *profile ) { VIPS_DEBUG_MSG( "vips_thread_profile_free: %s\n", profile->name ); if( vips__thread_profile ) vips_thread_profile_save( profile ); VIPS_FREEF( g_hash_table_destroy, profile->gates ); VIPS_FREEF( vips_thread_gate_free, profile->memory ); VIPS_FREE( profile ); } void vips__thread_profile_stop( void ) { if( vips__thread_profile ) VIPS_FREEF( fclose, vips__thread_fp ); } static void vips__thread_profile_init_cb( VipsThreadProfile *profile ) { /* Threads (including the main thread) must call * vips_thread_shutdown() before exiting. Check that they have. * * We can't save automatically, because the shutdown order is * important. We must free all memory before saving the thread * profile, for example. * * We can't do the freeing in this callback since GPrivate has already * stopped working. */ vips_error_exit( "vips_thread_shutdown() not called for thread %p", g_thread_self() ); } static void vips__thread_profile_init( void ) { #ifdef HAVE_PRIVATE_INIT static GPrivate private = G_PRIVATE_INIT( (GDestroyNotify) vips__thread_profile_init_cb ); vips_thread_profile_key = &private; #else if( !vips_thread_profile_key ) vips_thread_profile_key = g_private_new( (GDestroyNotify) vips__thread_profile_init_cb ); #endif } static VipsThreadGate * vips_thread_gate_new( const char *gate_name ) { VipsThreadGate *gate; gate = g_new( VipsThreadGate, 1 ); gate->name = gate_name; gate->start = g_new0( VipsThreadGateBlock, 1 ); gate->stop = g_new0( VipsThreadGateBlock, 1 ); return( gate ); } void vips__thread_profile_attach( const char *thread_name ) { static GOnce once = G_ONCE_INIT; VipsThreadProfile *profile; g_once( &once, (GThreadFunc) vips__thread_profile_init, NULL ); VIPS_DEBUG_MSG( "vips__thread_profile_attach: %s\n", thread_name ); g_assert( !g_private_get( vips_thread_profile_key ) ); profile = g_new( VipsThreadProfile, 1 ); profile->name = thread_name; profile->gates = g_hash_table_new_full( g_direct_hash, g_str_equal, NULL, (GDestroyNotify) vips_thread_gate_free ); profile->memory = vips_thread_gate_new( "memory" ); g_private_set( vips_thread_profile_key, profile ); } static VipsThreadProfile * vips_thread_profile_get( void ) { return( g_private_get( vips_thread_profile_key ) ); } /* This usually happens automatically when a thread shuts down, see * vips__thread_profile_init() where we set a GDestroyNotify, but will not * happen for the main thread. * * Shut down any stats on the main thread with this, see vips_shutdown() */ void vips__thread_profile_detach( void ) { VipsThreadProfile *profile; VIPS_DEBUG_MSG( "vips__thread_profile_detach:\n" ); if( (profile = vips_thread_profile_get()) ) { vips_thread_profile_free( profile ); g_private_set( vips_thread_profile_key, NULL ); } } static void vips_thread_gate_block_add( VipsThreadGateBlock **block ) { VipsThreadGateBlock *new_block; new_block = g_new0( VipsThreadGateBlock, 1 ); new_block->prev = *block; *block = new_block; } static gint64 vips_get_time( void ) { #ifdef HAVE_MONOTONIC_TIME return( g_get_monotonic_time() ); #else GTimeVal time; g_get_current_time( &time ); return( (gint64) time.tv_usec ); #endif } void vips__thread_gate_start( const char *gate_name ) { VipsThreadProfile *profile; VIPS_DEBUG_MSG_RED( "vips__thread_gate_start: %s\n", gate_name ); if( (profile = vips_thread_profile_get()) ) { gint64 time = vips_get_time(); VipsThreadGate *gate; if( !(gate = g_hash_table_lookup( profile->gates, gate_name )) ) { gate = vips_thread_gate_new( gate_name ); g_hash_table_insert( profile->gates, (char *) gate_name, gate ); } if( gate->start->i >= VIPS_GATE_SIZE ) vips_thread_gate_block_add( &gate->start ); gate->start->time[gate->start->i++] = time; VIPS_DEBUG_MSG_RED( "\t %" G_GINT64_FORMAT "\n", time ); } } void vips__thread_gate_stop( const char *gate_name ) { VipsThreadProfile *profile; VIPS_DEBUG_MSG_RED( "vips__thread_gate_stop: %s\n", gate_name ); if( (profile = vips_thread_profile_get()) ) { gint64 time = vips_get_time(); VipsThreadGate *gate; if( !(gate = g_hash_table_lookup( profile->gates, gate_name )) ) { gate = vips_thread_gate_new( gate_name ); g_hash_table_insert( profile->gates, (char *) gate_name, gate ); } if( gate->stop->i >= VIPS_GATE_SIZE ) vips_thread_gate_block_add( &gate->stop ); gate->stop->time[gate->stop->i++] = time; VIPS_DEBUG_MSG_RED( "\t %" G_GINT64_FORMAT "\n", time ); } } /* Record a malloc() or free(). Use -ve numbers for free. */ void vips__thread_malloc_free( gint64 size ) { VipsThreadProfile *profile; VIPS_DEBUG_MSG_RED( "vips__thread_malloc_free: %zd\n", size ); #ifdef VIPS_DEBUG if( !(profile = vips_thread_profile_get()) ) printf( "argh no block to record free() in!\n" ); #endif /*VIPS_DEBUG*/ if( (profile = vips_thread_profile_get()) ) { gint64 time = vips_get_time(); VipsThreadGate *gate = profile->memory; if( gate->start->i >= VIPS_GATE_SIZE ) { vips_thread_gate_block_add( &gate->start ); vips_thread_gate_block_add( &gate->stop ); } gate->start->time[gate->start->i++] = time; gate->stop->time[gate->stop->i++] = size; } } vips-7.38.5/libvips/iofuncs/window.c0000644000175000017500000002042412303140253014304 00000000000000/* Manage sets of mmap buffers on an image. * * 30/10/06 * - from region.c * 19/3/09 * - block mmaps of nodata images */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_TOTAL #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #ifdef HAVE_SYS_MMAN_H #include #endif #include #include #include #include #ifdef OS_WIN32 #include #endif /*OS_WIN32*/ /* Sanity checking ... write to this during read tests to make sure we don't * get optimised out. */ int vips__read_test; /* Add this many lines above and below the mmap() window. */ int vips__window_margin_pixels = VIPS__WINDOW_MARGIN_PIXELS; /* Always map at least this many bytes. There's no point making tiny windows * on small files. */ int vips__window_margin_bytes = VIPS__WINDOW_MARGIN_BYTES; /* Track global mmap usage. */ #ifdef DEBUG_TOTAL static int total_mmap_usage = 0; static int max_mmap_usage = 0; #endif /*DEBUG_TOTAL*/ static int vips_window_unmap( VipsWindow *window ) { /* unmap the old window */ if( window->baseaddr ) { if( vips__munmap( window->baseaddr, window->length ) ) return( -1 ); #ifdef DEBUG_TOTAL g_mutex_lock( vips__global_lock ); total_mmap_usage -= window->length; assert( total_mmap_usage >= 0 ); g_mutex_unlock( vips__global_lock ); #endif /*DEBUG_TOTAL*/ window->data = NULL; window->baseaddr = NULL; window->length = 0; } return( 0 ); } static int vips_window_free( VipsWindow *window ) { assert( window->ref_count == 0 ); #ifdef DEBUG printf( "** vips_window_free: window top = %d, height = %d (%p)\n", window->top, window->height, window ); #endif /*DEBUG*/ if( vips_window_unmap( window ) ) return( -1 ); window->im = NULL; vips_free( window ); return( 0 ); } int vips_window_unref( VipsWindow *window ) { IMAGE *im = window->im; g_mutex_lock( im->sslock ); #ifdef DEBUG printf( "vips_window_unref: window top = %d, height = %d, count = %d\n", window->top, window->height, window->ref_count ); #endif /*DEBUG*/ assert( window->ref_count > 0 ); window->ref_count -= 1; if( window->ref_count == 0 ) { assert( g_slist_find( im->windows, window ) ); im->windows = g_slist_remove( im->windows, window ); #ifdef DEBUG printf( "vips_window_unref: %d windows left\n", g_slist_length( im->windows ) ); #endif /*DEBUG*/ if( vips_window_free( window ) ) { g_mutex_unlock( im->sslock ); return( -1 ); } } g_mutex_unlock( im->sslock ); return( 0 ); } #ifdef DEBUG_TOTAL static void trace_mmap_usage( void ) { g_mutex_lock( vips__global_lock ); { static int last_total = 0; int total = total_mmap_usage / (1024 * 1024); int max = max_mmap_usage / (1024 * 1024); if( total != last_total ) { printf( "vips_window_set: current mmap " "usage of ~%dMB (high water mark %dMB)\n", total, max ); last_total = total; } } g_mutex_unlock( vips__global_lock ); } #endif /*DEBUG_TOTAL*/ static int vips_getpagesize() { static int pagesize = 0; if( !pagesize ) { #ifdef OS_WIN32 SYSTEM_INFO si; GetSystemInfo( &si ); pagesize = si.dwAllocationGranularity; #else /*OS_WIN32*/ pagesize = getpagesize(); #endif /*OS_WIN32*/ #ifdef DEBUG_TOTAL printf( "vips_getpagesize: 0x%x\n", pagesize ); #endif /*DEBUG_TOTAL*/ } return( pagesize ); } /* Map a window into a file. */ static int vips_window_set( VipsWindow *window, int top, int height ) { int pagesize = vips_getpagesize(); void *baseaddr; gint64 start, end, pagestart; size_t length, pagelength; /* Calculate start and length for our window. */ start = window->im->sizeof_header + VIPS_IMAGE_SIZEOF_LINE( window->im ) * top; length = VIPS_IMAGE_SIZEOF_LINE( window->im ) * height; pagestart = start - start % pagesize; end = start + length; pagelength = end - pagestart; /* Make sure we have enough file. */ if( end > window->im->file_length ) { vips_error( "vips_window_set", _( "unable to read data for \"%s\", %s" ), window->im->filename, _( "file has been truncated" ) ); return( -1 ); } if( !(baseaddr = vips__mmap( window->im->fd, 0, pagelength, pagestart )) ) return( -1 ); window->baseaddr = baseaddr; window->length = pagelength; window->data = (VipsPel *) baseaddr + (start - pagestart); window->top = top; window->height = height; /* Sanity check ... make sure the data pointer is readable. */ vips__read_test &= window->data[0]; #ifdef DEBUG_TOTAL g_mutex_lock( vips__global_lock ); total_mmap_usage += window->length; if( total_mmap_usage > max_mmap_usage ) max_mmap_usage = total_mmap_usage; g_mutex_unlock( vips__global_lock ); trace_mmap_usage(); #endif /*DEBUG_TOTAL*/ return( 0 ); } /* Make a new window. */ static VipsWindow * vips_window_new( IMAGE *im, int top, int height ) { VipsWindow *window; if( !(window = VIPS_NEW( NULL, VipsWindow )) ) return( NULL ); window->ref_count = 0; window->im = im; window->top = 0; window->height = 0; window->data = NULL; window->baseaddr = NULL; window->length = 0; if( vips_window_set( window, top, height ) ) { vips_window_free( window ); return( NULL ); } im->windows = g_slist_prepend( im->windows, window ); window->ref_count += 1; #ifdef DEBUG printf( "** vips_window_new: window top = %d, height = %d (%p)\n", window->top, window->height, window ); #endif /*DEBUG*/ return( window ); } /* A request for an area of pixels. */ typedef struct { int top; int height; } request_t; static void * vips_window_fits( VipsWindow *window, request_t *req ) { if( window->top <= req->top && window->top + window->height >= req->top + req->height ) return( window ); return( NULL ); } /* Find an existing window that fits within top/height and return a ref. */ static VipsWindow * vips_window_find( IMAGE *im, int top, int height ) { request_t req; VipsWindow *window; req.top = top; req.height = height; window = vips_slist_map2( im->windows, (VipsSListMap2Fn) vips_window_fits, &req, NULL ); if( window ) { window->ref_count += 1; #ifdef DEBUG printf( "vips_window_find: ref window top = %d, height = %d, " "count = %d\n", top, height, window->ref_count ); #endif /*DEBUG*/ } return( window ); } /* Return a ref to a window that encloses top/height. */ VipsWindow * vips_window_ref( IMAGE *im, int top, int height ) { VipsWindow *window; g_mutex_lock( im->sslock ); if( !(window = vips_window_find( im, top, height )) ) { /* No existing window ... make a new one. Ask for a larger * window than we strictly need. There's no point making tiny * windows. */ int margin = VIPS_MIN( vips__window_margin_pixels, vips__window_margin_bytes / VIPS_IMAGE_SIZEOF_LINE( im ) ); top -= margin; height += margin * 2; top = VIPS_CLIP( 0, top, im->Ysize - 1 ); height = VIPS_CLIP( 0, height, im->Ysize - top ); if( !(window = vips_window_new( im, top, height )) ) { g_mutex_unlock( im->sslock ); return( NULL ); } } g_mutex_unlock( im->sslock ); return( window ); } void vips_window_print( VipsWindow *window ) { printf( "VipsWindow: %p ref_count = %d, ", window, window->ref_count ); printf( "im = %p, ", window->im ); printf( "top = %d, ", window->top ); printf( "height = %d, ", window->height ); printf( "data = %p, ", window->data ); printf( "baseaddr = %p, ", window->baseaddr ); printf( "length = %zd\n", window->length ); } vips-7.38.5/libvips/iofuncs/base64.c0000644000175000017500000001631212303140253014062 00000000000000/* base64.c -- Encode/decode integers in base64 format * Created: Mon Sep 23 16:55:12 1996 by faith@dict.org * Revised: Sat Mar 30 12:02:36 2002 by faith@dict.org * Copyright 1996, 2002 Rickard E. Faith (faith@dict.org) * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published * by the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA * * \section{Base-64 Routines} * * \intro These routines use the 64-character subset of International * Alphabet IA5 discussed in RFC 1421 (printeable encoding) and RFC 1522 * (base64 MIME). * Value Encoding Value Encoding Value Encoding Value Encoding 0 A 17 R 34 i 51 z 1 B 18 S 35 j 52 0 2 C 19 T 36 k 53 1 3 D 20 U 37 l 54 2 4 E 21 V 38 m 55 3 5 F 22 W 39 n 56 4 6 G 23 X 40 o 57 5 7 H 24 Y 41 p 58 6 8 I 25 Z 42 q 59 7 9 J 26 a 43 r 60 8 10 K 27 b 44 s 61 9 11 L 28 c 45 t 62 + 12 M 29 d 46 u 63 / 13 N 30 e 47 v 14 O 31 f 48 w (pad) = 15 P 32 g 49 x 16 Q 33 h 50 y * */ /* Hacked for VIPS ... does any length object (not just ints), formats base64 into 70 character lines, output to a malloc'd buffer. VIPS uses this to write BLOBs (like ICC profiles, for example) to the XML that follows an image. Modified on: 23/7/07 JC - oop, needed a slightly larger worst-case buffer in im__b64_encode() 12/5/09 - fix signed/unsigned warning 25/3/11 - move to vips_ namespace */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include "base64.h" static unsigned char b64_list[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; #define XX 100 static unsigned char b64_index[256] = { XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,62, XX,XX,XX,63, 52,53,54,55, 56,57,58,59, 60,61,XX,XX, XX,XX,XX,XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14, 15,16,17,18, 19,20,21,22, 23,24,25,XX, XX,XX,XX,XX, XX,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40, 41,42,43,44, 45,46,47,48, 49,50,51,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, }; /* Read (up to) 3 bytes from in. Be careful about byte ordering :-/ we need to * end up with in[2] in the bottom few bits. */ static int read24( const unsigned char *in, size_t remaining ) { int bits; int i; bits = 0; for( i = 0; i < 3; i++ ) { bits <<= 8; if( remaining > 0 ) { bits |= in[i]; remaining -= 1; } } return( bits ); } /* Output (up to) 24 bits as four base64 chars. Pad with '=' characters. */ static void encode24( char *p, int bits, size_t remaining ) { int i; for( i = 0; i < 4; i++ ) { if( remaining == 0 ) p[i] = '='; else { /* Take the top 6 bits of 24. */ p[i] = b64_list[(bits >> 18) & 63]; bits <<= 6; remaining -= 6; } } } /* Output to a malloc'd buffer, NULL on error. Try to be simple and reliable, * rather than quick. */ char * vips__b64_encode( const unsigned char *data, size_t data_length ) { /* Worst case: 1.333 chars per byte, plus 10% for extra carriage * returns and stuff. And the \n\0 at the end. */ const size_t output_data_length = data_length * 44 / 30 + 2; char *buffer; char *p; size_t i; int cursor; if( data_length == 0 ) { vips_error( "vips__b64_encode", "%s", _( "too little data" ) ); return( NULL ); } if( output_data_length > 1024 * 1024 ) { /* We shouldn't really be used for large amounts of data. */ vips_error( "vips__b64_encode", "%s", _( "too much data" ) ); return( NULL ); } if( !(buffer = vips_malloc( NULL, output_data_length )) ) return( NULL ); p = buffer; *p++ = '\n'; cursor = 0; for( i = 0; i < data_length; i += 3 ) { size_t remaining = data_length - i; int bits; bits = read24( data + i, remaining ); encode24( p, bits, remaining * 8 ); p += 4; cursor += 4; if( cursor >= 76 ) { *p++ = '\n'; cursor = 0; } } if( cursor > 0 ) *p++ = '\n'; *p++ = '\0'; #ifdef DEBUG { unsigned int total; /* Calculate a very simple checksum for debugging. */ for( total = 0, i = 0; i < data_length; i++ ) total += data[i]; printf( "vips__b64_encode: length = %u, checksum 0x%x\n", data_length, total & 0xffff ); } #endif /*DEBUG*/ return( buffer ); } /* Decode base64 back to binary in a malloc'd buffer. NULL on error. */ unsigned char * vips__b64_decode( const char *buffer, size_t *data_length ) { const size_t buffer_length = strlen( buffer ); /* Worst case. */ const size_t output_data_length = buffer_length * 3 / 4; unsigned char *data; unsigned char *p; unsigned int bits; int nbits; size_t i; if( output_data_length > 1024 * 1024 ) { /* We shouldn't really be used for large amounts of data. */ vips_error( "vips__b64_decode", "%s", _( "too much data" ) ); return( NULL ); } if( !(data = vips_malloc( NULL, output_data_length )) ) return( NULL ); p = data; bits = 0; nbits = 0; for( i = 0; i < buffer_length; i++ ) { unsigned int val; if( (val = b64_index[(int) buffer[i]]) != XX ) { bits <<= 6; bits |= val; nbits += 6; if( nbits >= 8 ) { *p++ = (bits >> (nbits - 8)) & 0xff; nbits -= 8; } } } g_assert( (size_t) (p - data) < output_data_length ); if( data_length ) *data_length = p - data; #ifdef DEBUG { unsigned int total; /* Calculate a very simple checksum for debugging. */ for( total = 0, i = 0; i < p - data; i++ ) total += data[i]; printf( "vips__b64_decode: length = %d, checksum 0x%x\n", p - data, total & 0xffff ); } #endif /*DEBUG*/ return( data ); } vips-7.38.5/libvips/iofuncs/type.c0000644000175000017500000007571012303140253013766 00000000000000/* array type * * Unlike GArray, this has fixed length, tracks a GType for elements, and has * a per-element free function. * * 27/10/11 * - from header.c * 16/7/13 * - leakcheck VipsArea */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include /* A very simple boxed type for testing. Just an int. */ /** * vips_thing_new: * @n: * * Returns: (transfer full): a new #VipsThing. */ VipsThing * vips_thing_new( int i ) { VipsThing *thing; thing = g_new( VipsThing, 1 ); thing->i = i; printf( "vips_thing_new: %d %p\n", i, thing ); return( thing ); } static VipsThing * vips_thing_copy( VipsThing *thing ) { VipsThing *thing2; thing2 = vips_thing_new( thing->i ); printf( "vips_thing_copy: %d %p = %p\n", thing->i, thing2, thing ); return( thing2 ); } static void vips_thing_free( VipsThing *thing ) { printf( "vips_thing_free: %d %p\n", thing->i, thing ); g_free( thing ); } int vips_thing_get_i( VipsThing *thing ) { printf( "vips_thing_get_i: %d %p\n", thing->i, thing ); return( thing->i ); } /* * glib-2.26+ only G_DEFINE_BOXED_TYPE( VipsThing, vips_thing, (GBoxedCopyFunc) vips_thing_copy, (GBoxedFreeFunc) vips_thing_free ); */ GType vips_thing_get_type( void ) { static GType type = 0; if( !type ) { type = g_boxed_type_register_static( "VipsThing", (GBoxedCopyFunc) vips_thing_copy, (GBoxedFreeFunc) vips_thing_free ); } return( type ); } /** * SECTION: VipsArea * @short_description: an area of memory * @stability: Stable * @see_also: header, * @include: vips/vips.h * * A VipsArea wraps a chunk of memory. It adds reference counting and a free * function. It also keeps a count and a GType, so the area can be an array. * * This type is used for things like passing an array of double or an array of * VipsObject pointers to operations, and for reference-counted immutable * strings. */ static GSList *vips_area_all = NULL; VipsArea * vips_area_copy( VipsArea *area ) { g_mutex_lock( area->lock ); g_assert( area->count > 0 ); area->count += 1; #ifdef DEBUG printf( "vips_area_copy: %p count = %d\n", area, area->count ); #endif /*DEBUG*/ g_mutex_unlock( area->lock ); return( area ); } void vips_area_unref( VipsArea *area ) { g_mutex_lock( area->lock ); g_assert( area->count > 0 ); area->count -= 1; #ifdef DEBUG printf( "vips_area_unref: %p count = %d\n", area, area->count ); #endif /*DEBUG*/ if( vips__leak ) { g_mutex_lock( vips__global_lock ); g_assert( g_slist_find( vips_area_all, area ) ); g_mutex_unlock( vips__global_lock ); } if( area->count == 0 ) { if( area->free_fn && area->data ) { area->free_fn( area->data, area ); area->data = NULL; area->free_fn = NULL; } g_mutex_unlock( area->lock ); VIPS_FREEF( vips_g_mutex_free, area->lock ); g_free( area ); if( vips__leak ) { g_mutex_lock( vips__global_lock ); vips_area_all = g_slist_remove( vips_area_all, area ); g_mutex_unlock( vips__global_lock ); } #ifdef DEBUG g_mutex_lock( vips__global_lock ); printf( "vips_area_unref: free .. total = %d\n", g_slist_length( vips_area_all ) ); g_mutex_unlock( vips__global_lock ); #endif /*DEBUG*/ } else g_mutex_unlock( area->lock ); } /** * vips_area_new: * @free_fn: (scope async): @data will be freed with this function * @data: data will be freed with this function * * An area of memory with a free function. (eg. \0-terminated string, or a * struct). Inital count == 1, so _unref() after attaching somewhere. * * See also: vips_area_unref(). * * Returns: (transfer full): the new #VipsArea. */ VipsArea * vips_area_new( VipsCallbackFn free_fn, void *data ) { VipsArea *area; area = g_new( VipsArea, 1 ); area->count = 1; area->lock = vips_g_mutex_new(); area->length = 0; area->data = data; area->free_fn = free_fn; area->type = 0; area->sizeof_type = 0; if( vips__leak ) { g_mutex_lock( vips__global_lock ); vips_area_all = g_slist_prepend( vips_area_all, area ); g_mutex_unlock( vips__global_lock ); } #ifdef DEBUG g_mutex_lock( vips__global_lock ); printf( "vips_area_new: %p count = %d (%d in total)\n", area, area->count, g_slist_length( vips_area_all ) ); g_mutex_unlock( vips__global_lock ); #endif /*DEBUG*/ return( area ); } void vips__type_leak( void ) { if( vips_area_all ) { GSList *p; printf( "VipsArea leaks:\n" ); for( p = vips_area_all; p; p = p->next ) { VipsArea *area = (VipsArea *) p->data; printf( "\t%p count = %d\n", area, area->count ); } printf( "%d in total\n", g_slist_length( vips_area_all ) ); } } /** * vips_area_new_blob: * @free_fn: (scope async): @data will be freed with this function * @data: data will be freed with this function * @length: number of bytes in @data * * Like vips_area_new(), but track a length as well. * * An area of mem with a free func and a length (some sort of binary object, * like an ICC profile). * * See also: vips_area_unref(). * * Returns: (transfer full): the new #VipsArea. */ VipsArea * vips_area_new_blob( VipsCallbackFn free_fn, void *data, size_t length ) { VipsArea *area; area = vips_area_new( free_fn, data ); area->length = length; return( area ); } /** * vips_area_new_array: * @type: %GType of elements to store * @sizeof_type: sizeof() an element in the array * @n: number of elements in the array * * An area which holds an array of elements of some GType. To set values for * the elements, get the pointer and write. * * See also: vips_area_unref(). * * Returns: (transfer full): the new #VipsArea. */ VipsArea * vips_area_new_array( GType type, size_t sizeof_type, int n ) { VipsArea *area; void *array; array = g_malloc( n * sizeof_type ); area = vips_area_new( (VipsCallbackFn) g_free, array ); area->n = n; area->length = n * sizeof_type; area->type = type; area->sizeof_type = sizeof_type; return( area ); } static void vips_area_free_array_object( GObject **array, VipsArea *area ) { int i; for( i = 0; i < area->n; i++ ) VIPS_FREEF( g_object_unref, array[i] ); area->n = 0; } /** * vips_area_new_array_object: * @n: number of elements in the array * * An area which holds an array of GObjects. See vips_area_new_array(). When * the area is freed, each %GObject will be unreffed. * * See also: vips_area_unref(). * * Returns: (transfer full): the new #VipsArea. */ VipsArea * vips_area_new_array_object( int n ) { GObject **array; VipsArea *area; array = g_new0( GObject *, n ); area = vips_area_new( (VipsCallbackFn) vips_area_free_array_object, array ); area->n = n; area->length = n * sizeof( GObject * ); area->type = G_TYPE_OBJECT; area->sizeof_type = sizeof( GObject * ); return( area ); } /** * vips_area_get_data: * @area: #VipsArea to fetch from * @length: (allow-none): optionally return length in bytes here * @n: (allow-none): optionally return number of elements here * @type: (allow-none): optionally return element type here * @sizeof_type: (allow-none): optionally return sizeof() element type here * * Return the data pointer plus optionally the length in bytes of an area, * the number of elements, the %GType of each element and the sizeof() each * element. * * Returns: (transfer none): The pointer held by @area. */ void * vips_area_get_data( VipsArea *area, size_t *length, int *n, GType *type, size_t *sizeof_type ) { if( length ) *length = area->length; if( n ) *n = area->n; if( type ) *type = area->type; if( sizeof_type ) *sizeof_type = area->sizeof_type; return( area->data ); } /* Transform an area to a G_TYPE_STRING. */ static void transform_area_g_string( const GValue *src_value, GValue *dest_value ) { VipsArea *area; char buf[256]; area = g_value_get_boxed( src_value ); vips_snprintf( buf, 256, "VIPS_TYPE_AREA, count = %d, data = %p", area->count, area->data ); g_value_set_string( dest_value, buf ); } GType vips_area_get_type( void ) { static GType type = 0; if( !type ) { type = g_boxed_type_register_static( "VipsArea", (GBoxedCopyFunc) vips_area_copy, (GBoxedFreeFunc) vips_area_unref ); g_value_register_transform_func( type, G_TYPE_STRING, transform_area_g_string ); } return( type ); } /* Transform funcs for builtin types to SAVE_STRING. */ static void transform_int_save_string( const GValue *src_value, GValue *dest_value ) { vips_value_set_save_stringf( dest_value, "%d", g_value_get_int( src_value ) ); } static void transform_save_string_int( const GValue *src_value, GValue *dest_value ) { g_value_set_int( dest_value, atoi( vips_value_get_save_string( src_value ) ) ); } static void transform_double_save_string( const GValue *src_value, GValue *dest_value ) { char buf[G_ASCII_DTOSTR_BUF_SIZE]; /* Need to be locale independent. */ g_ascii_dtostr( buf, G_ASCII_DTOSTR_BUF_SIZE, g_value_get_double( src_value ) ); vips_value_set_save_string( dest_value, buf ); } static void transform_save_string_double( const GValue *src_value, GValue *dest_value ) { g_value_set_double( dest_value, g_ascii_strtod( vips_value_get_save_string( src_value ), NULL ) ); } /* Save meta fields to the header. We have a new string type for header fields * to save to XML and define transform functions to go from our meta types to * this string type. */ GType vips_save_string_get_type( void ) { static GType type = 0; if( !type ) { type = g_boxed_type_register_static( "VipsSaveString", (GBoxedCopyFunc) g_strdup, (GBoxedFreeFunc) g_free ); } return( type ); } /* Transform a refstring to a G_TYPE_STRING and back. */ static void transform_ref_string_g_string( const GValue *src_value, GValue *dest_value ) { g_value_set_string( dest_value, vips_value_get_ref_string( src_value, NULL ) ); } static void transform_g_string_ref_string( const GValue *src_value, GValue *dest_value ) { vips_value_set_ref_string( dest_value, g_value_get_string( src_value ) ); } /* To a save string. */ static void transform_ref_string_save_string( const GValue *src_value, GValue *dest_value ) { vips_value_set_save_stringf( dest_value, "%s", vips_value_get_ref_string( src_value, NULL ) ); } static void transform_save_string_ref_string( const GValue *src_value, GValue *dest_value ) { vips_value_set_ref_string( dest_value, vips_value_get_save_string( src_value ) ); } GType vips_ref_string_get_type( void ) { static GType type = 0; if( !type ) { type = g_boxed_type_register_static( "VipsRefString", (GBoxedCopyFunc) vips_area_copy, (GBoxedFreeFunc) vips_area_unref ); g_value_register_transform_func( type, G_TYPE_STRING, transform_ref_string_g_string ); g_value_register_transform_func( G_TYPE_STRING, type, transform_g_string_ref_string ); g_value_register_transform_func( type, VIPS_TYPE_SAVE_STRING, transform_ref_string_save_string ); g_value_register_transform_func( VIPS_TYPE_SAVE_STRING, type, transform_save_string_ref_string ); } return( type ); } /* Transform a blob to a G_TYPE_STRING. */ static void transform_blob_g_string( const GValue *src_value, GValue *dest_value ) { void *blob; size_t blob_length; char buf[256]; blob = vips_value_get_blob( src_value, &blob_length ); vips_snprintf( buf, 256, "VIPS_TYPE_BLOB, data = %p, length = %zd", blob, blob_length ); g_value_set_string( dest_value, buf ); } /* Transform a blob to a save string and back. */ static void transform_blob_save_string( const GValue *src_value, GValue *dest_value ) { void *blob; size_t blob_length; char *b64; blob = vips_value_get_blob( src_value, &blob_length ); if( (b64 = vips__b64_encode( blob, blob_length )) ) { vips_value_set_save_string( dest_value, b64 ); vips_free( b64 ); } } static void transform_save_string_blob( const GValue *src_value, GValue *dest_value ) { const char *b64; void *blob; size_t blob_length; b64 = vips_value_get_save_string( src_value ); if( (blob = vips__b64_decode( b64, &blob_length )) ) vips_value_set_blob( dest_value, (VipsCallbackFn) vips_free, blob, blob_length ); } GType vips_blob_get_type( void ) { static GType type = 0; if( !type ) { type = g_boxed_type_register_static( "VipsBlob", (GBoxedCopyFunc) vips_area_copy, (GBoxedFreeFunc) vips_area_unref ); g_value_register_transform_func( type, G_TYPE_STRING, transform_blob_g_string ); g_value_register_transform_func( type, VIPS_TYPE_SAVE_STRING, transform_blob_save_string ); g_value_register_transform_func( VIPS_TYPE_SAVE_STRING, type, transform_save_string_blob ); } return( type ); } static void transform_array_int_g_string( const GValue *src_value, GValue *dest_value ) { int n; int *array = vips_value_get_array_int( src_value, &n ); char txt[1024]; VipsBuf buf = VIPS_BUF_STATIC( txt ); int i; for( i = 0; i < n; i++ ) /* Use space as a separator since ',' may be a decimal point * in this locale. */ vips_buf_appendf( &buf, "%d ", array[i] ); g_value_set_string( dest_value, vips_buf_all( &buf ) ); } /* It'd be great to be able to write a generic string->array function, but * it doesn't seem possible. */ static void transform_g_string_array_int( const GValue *src_value, GValue *dest_value ) { char *str; int n; char *p, *q; int i; int *array; /* Walk the string to get the number of elements. * We need a copy of the string, since we insert \0 during * scan. * * We can't allow ',' as a separator, since some locales use it as a * decimal point. */ str = g_value_dup_string( src_value ); n = 0; for( p = str; (q = vips_break_token( p, "\t; " )); p = q ) n += 1; g_free( str ); vips_value_set_array( dest_value, n, G_TYPE_INT, sizeof( int ) ); array = (int *) vips_value_get_array( dest_value, NULL, NULL, NULL ); str = g_value_dup_string( src_value ); i = 0; for( p = str; (q = vips_break_token( p, "\t; " )); p = q ) { if( sscanf( p, "%d", &array[i] ) != 1 ) { /* Set array to length zero to indicate an error. */ vips_error( "vipstype", _( "unable to convert \"%s\" to int" ), p ); vips_value_set_array( dest_value, 0, G_TYPE_INT, sizeof( int ) ); g_free( str ); return; } i += 1; } g_free( str ); } GType vips_array_int_get_type( void ) { static GType type = 0; if( !type ) { type = g_boxed_type_register_static( "VipsArrayInt", (GBoxedCopyFunc) vips_area_copy, (GBoxedFreeFunc) vips_area_unref ); g_value_register_transform_func( type, G_TYPE_STRING, transform_array_int_g_string ); g_value_register_transform_func( G_TYPE_STRING, type, transform_g_string_array_int ); } return( type ); } static void transform_array_double_g_string( const GValue *src_value, GValue *dest_value ) { int n; double *array = vips_value_get_array_double( src_value, &n ); char txt[1024]; VipsBuf buf = VIPS_BUF_STATIC( txt ); int i; for( i = 0; i < n; i++ ) /* Use space as a separator since ',' may be a decimal point * in this locale. */ vips_buf_appendf( &buf, "%g ", array[i] ); g_value_set_string( dest_value, vips_buf_all( &buf ) ); } /* It'd be great to be able to write a generic string->array function, but * it doesn't seem possible. */ static void transform_g_string_array_double( const GValue *src_value, GValue *dest_value ) { char *str; int n; char *p, *q; int i; double *array; /* Walk the string to get the number of elements. * We need a copy of the string since we insert \0 during * scan. * * We can't allow ',' as a separator since some locales use it as a * decimal point. */ str = g_value_dup_string( src_value ); n = 0; for( p = str; (q = vips_break_token( p, "\t; " )); p = q ) n += 1; g_free( str ); vips_value_set_array( dest_value, n, G_TYPE_DOUBLE, sizeof( double ) ); array = (double *) vips_value_get_array( dest_value, NULL, NULL, NULL ); str = g_value_dup_string( src_value ); i = 0; for( p = str; (q = vips_break_token( p, "\t; " )); p = q ) { if( sscanf( p, "%lf", &array[i] ) != 1 ) { /* Set array to length zero to indicate an error. */ vips_error( "vipstype", _( "unable to convert \"%s\" to float" ), p ); vips_value_set_array( dest_value, 0, G_TYPE_DOUBLE, sizeof( double ) ); g_free( str ); return; } i += 1; } g_free( str ); } GType vips_array_double_get_type( void ) { static GType type = 0; if( !type ) { type = g_boxed_type_register_static( "VipsArrayDouble", (GBoxedCopyFunc) vips_area_copy, (GBoxedFreeFunc) vips_area_unref ); g_value_register_transform_func( type, G_TYPE_STRING, transform_array_double_g_string ); g_value_register_transform_func( G_TYPE_STRING, type, transform_g_string_array_double ); } return( type ); } static void transform_g_string_array_image( const GValue *src_value, GValue *dest_value ) { char *str; int n; char *p, *q; int i; GObject **array; /* We need a copy of the string, since we insert \0 during * scan. */ str = g_value_dup_string( src_value ); n = 0; for( p = str; (q = vips_break_token( p, " " )); p = q ) n += 1; g_free( str ); vips_value_set_array_object( dest_value, n ); array = vips_value_get_array_object( dest_value, NULL ); str = g_value_dup_string( src_value ); for( i = 0, p = str; (q = vips_break_token( p, " " )); i++, p = q ) if( !(array[i] = G_OBJECT( vips_image_new_from_file( p ) )) ) { /* Set the dest to length zero to indicate error. */ vips_value_set_array_object( dest_value, 0 ); g_free( str ); return; } g_free( str ); } GType vips_array_image_get_type( void ) { static GType type = 0; if( !type ) { type = g_boxed_type_register_static( "VipsArrayImage", (GBoxedCopyFunc) vips_area_copy, (GBoxedFreeFunc) vips_area_unref ); g_value_register_transform_func( G_TYPE_STRING, type, transform_g_string_array_image ); } return( type ); } /** * vips_value_set_area: * @value: (out): set this value * @free_fn: (scope async): data will be freed with this function * @data: set @value to track this pointer * * Set value to be a ref-counted area of memory with a free function. */ void vips_value_set_area( GValue *value, VipsCallbackFn free_fn, void *data ) { VipsArea *area; area = vips_area_new( free_fn, data ); g_value_init( value, VIPS_TYPE_AREA ); g_value_set_boxed( value, area ); vips_area_unref( area ); } /** * vips_value_get_area: * @value: get from this value * @length: (allow-none): optionally return length here * * Get the pointer from an area. Don't touch count (area is static). * * Returns: (transfer none): The pointer held by @value. */ void * vips_value_get_area( const GValue *value, size_t *length ) { VipsArea *area; area = g_value_get_boxed( value ); return( vips_area_get_data( area, length, NULL, NULL, NULL ) ); } /** * vips_value_get_save_string: * @value: GValue to get from * * Get the C string held internally by the GValue. * * Returns: (transfer none): The C string held by @value. */ const char * vips_value_get_save_string( const GValue *value ) { return( (char *) g_value_get_boxed( value ) ); } /** * vips_value_set_save_string: * @value: (out): GValue to set * @str: C string to copy into the GValue * * Copies the C string into @value. */ void vips_value_set_save_string( GValue *value, const char *str ) { g_assert( G_VALUE_TYPE( value ) == VIPS_TYPE_SAVE_STRING ); g_value_set_boxed( value, str ); } /** * vips_value_set_save_stringf: * @value: (out): GValue to set * @fmt: printf()-style format string * @Varargs: arguments to printf()-formatted @fmt * * Generates a string and copies it into @value. */ void vips_value_set_save_stringf( GValue *value, const char *fmt, ... ) { va_list ap; char *str; g_assert( G_VALUE_TYPE( value ) == VIPS_TYPE_SAVE_STRING ); va_start( ap, fmt ); str = g_strdup_vprintf( fmt, ap ); va_end( ap ); vips_value_set_save_string( value, str ); g_free( str ); } /** * vips_value_get_ref_string: * @value: %GValue to get from * @length: (allow-none): return length here, optionally * * Get the C string held internally by the GValue. * * Returns: (transfer none): The C string held by @value. */ const char * vips_value_get_ref_string( const GValue *value, size_t *length ) { return( vips_value_get_area( value, length ) ); } /** * vips_value_set_ref_string: * @value: (out): GValue to set * @str: C string to copy into the GValue * * Copies the C string @str into @value. * * vips_ref_string are immutable C strings that are copied between images by * copying reference-counted pointers, making the much more efficient than * regular GValue strings. * * Returns: 0 on success, -1 otherwise. */ int vips_value_set_ref_string( GValue *value, const char *str ) { VipsArea *area; char *str_copy; g_assert( G_VALUE_TYPE( value ) == VIPS_TYPE_REF_STRING ); str_copy = g_strdup( str ); area = vips_area_new( (VipsCallbackFn) vips_free, str_copy ); /* Handy place to cache this. */ area->length = strlen( str ); g_value_set_boxed( value, area ); vips_area_unref( area ); return( 0 ); } /** * vips_value_set_blob: * @value: (out): GValue to set * @free_fn: (scope async): free function for @data * @data: pointer to area of memory * @length: length of memory area * * Sets @value to hold a @data. When @value is freed, @data will be * freed with @free_fn. @value also holds a note of the length of the memory * area. * * blobs are things like ICC profiles or EXIF data. They are relocatable, and * are saved to VIPS files for you coded as base64 inside the XML. They are * copied by copying reference-counted pointers. * * See also: vips_value_get_blob() */ void vips_value_set_blob( GValue *value, VipsCallbackFn free_fn, void *data, size_t length ) { VipsArea *area; g_assert( G_VALUE_TYPE( value ) == VIPS_TYPE_BLOB ); area = vips_area_new_blob( free_fn, data, length ); g_value_set_boxed( value, area ); vips_area_unref( area ); } /** * vips_value_get_blob: * @value: GValue to set * @length: (allow-none): optionally return length of memory area * * Returns the data pointer from a blob. Optionally returns the length too. * * blobs are things like ICC profiles or EXIF data. They are relocatable, and * are saved to VIPS files for you coded as base64 inside the XML. They are * copied by copying reference-counted pointers. * * See also: vips_value_set_blob() * * Returns: (transfer none): The pointer held by @value. */ void * vips_value_get_blob( const GValue *value, size_t *length ) { return( vips_value_get_area( value, length ) ); } /** * vips_value_set_array: * @value: (out): %GValue to set * @n: number of elements * @type: the type of each element * @sizeof_type: the sizeof each element * * Set @value to be an array of things. * * This allocates memory but does not * initialise the contents: get the pointer and write instead. */ void vips_value_set_array( GValue *value, int n, GType type, size_t sizeof_type ) { VipsArea *area; area = vips_area_new_array( type, sizeof_type, n ); g_value_set_boxed( value, area ); vips_area_unref( area ); } /** * vips_value_get_array: * @value: %GValue to get from * @n: (allow-none): return the number of elements here, optionally * @type: (allow-none): return the type of each element here, optionally * @sizeof_type: (allow-none): return the sizeof each element here, optionally * * Return the pointer to the array held by @value. * Optionally return the other properties of the array in @n, @type, * @sizeof_type. * * See also: vips_value_set_array(). * * Returns: (transfer none): The array address. */ void * vips_value_get_array( const GValue *value, int *n, GType *type, size_t *sizeof_type ) { VipsArea *area; /* Can't check value type, because we may get called from * vips_*_get_type(). */ area = g_value_get_boxed( value ); if( n ) *n = area->n; if( type ) *type = area->type; if( sizeof_type ) *sizeof_type = area->sizeof_type; return( area->data ); } /** * vips_array_int_new: * @array: (array length=n): array of int * @n: number of ints * * Allocate a new array of ints and copy @array into it. Free with * vips_area_unref(). * * See also: #VipsArea. * * Returns: (transfer full): A new #VipsArrayInt. */ VipsArrayInt * vips_array_int_new( const int *array, int n ) { VipsArea *area; int *array_copy; area = vips_area_new_array( G_TYPE_INT, sizeof( int ), n ); array_copy = vips_area_get_data( area, NULL, NULL, NULL, NULL ); memcpy( array_copy, array, n * sizeof( int ) ); return( area ); } /** * vips_array_int_newv: * @n: number of ints * @...: list of int arguments * * Allocate a new array of @n ints and copy @... into it. Free with * vips_area_unref(). * * See also: vips_array_int_new() * * Returns: (transfer full): A new #VipsArrayInt. */ VipsArrayInt * vips_array_int_newv( int n, ... ) { va_list ap; VipsArea *area; int *array; int i; area = vips_area_new_array( G_TYPE_INT, sizeof( int ), n ); array = vips_area_get_data( area, NULL, NULL, NULL, NULL ); va_start( ap, n ); for( i = 0; i < n; i++ ) array[i] = va_arg( ap, int ); va_end( ap ); return( area ); } /** * vips_value_get_array_int: * @value: %GValue to get from * @n: (allow-none): return the number of elements here, optionally * * Return the start of the array of ints held by @value. * optionally return the number of elements in @n. * * See also: vips_array_int_set(). * * Returns: (transfer none): The array address. */ int * vips_value_get_array_int( const GValue *value, int *n ) { return( vips_value_get_array( value, n, NULL, NULL ) ); } /** * vips_value_set_array_int: * @value: (out): %GValue to get from * @array: (array length=n): array of ints * @n: the number of elements * * Set @value to hold a copy of @array. Pass in the array length in @n. * * See also: vips_array_int_get(). * * Returns: 0 on success, -1 otherwise. */ int vips_value_set_array_int( GValue *value, const int *array, int n ) { int *array_copy; g_value_init( value, VIPS_TYPE_ARRAY_INT ); vips_value_set_array( value, n, G_TYPE_INT, sizeof( int ) ); array_copy = vips_value_get_array_int( value, NULL ); memcpy( array_copy, array, n * sizeof( int ) ); return( 0 ); } /** * vips_array_double_new: * @array: (array length=n): array of double * @n: number of doubles * * Allocate a new array of doubles and copy @array into it. Free with * vips_area_unref(). * * See also: #VipsArea. * * Returns: (transfer full): A new #VipsArrayDouble. */ VipsArrayDouble * vips_array_double_new( const double *array, int n ) { VipsArea *area; double *array_copy; area = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), n ); array_copy = vips_area_get_data( area, NULL, NULL, NULL, NULL ); memcpy( array_copy, array, n * sizeof( double ) ); return( area ); } /** * vips_array_double_newv: * @n: number of doubles * @...: list of double arguments * * Allocate a new array of @n doubles and copy @... into it. Free with * vips_area_unref(). * * See also: vips_array_double_new() * * Returns: (transfer full): A new #VipsArrayDouble. */ VipsArrayDouble * vips_array_double_newv( int n, ... ) { va_list ap; VipsArea *area; double *array; int i; area = vips_area_new_array( G_TYPE_DOUBLE, sizeof( double ), n ); array = vips_area_get_data( area, NULL, NULL, NULL, NULL ); va_start( ap, n ); for( i = 0; i < n; i++ ) array[i] = va_arg( ap, double ); va_end( ap ); return( area ); } /** * vips_value_get_array_double: * @value: %GValue to get from * @n: (allow-none): return the number of elements here, optionally * * Return the start of the array of doubles held by @value. * optionally return the number of elements in @n. * * See also: vips_array_double_set(). * * Returns: (transfer none): The array address. */ double * vips_value_get_array_double( const GValue *value, int *n ) { return( vips_value_get_array( value, n, NULL, NULL ) ); } /** * vips_value_set_array_double: * @value: (out): %GValue to get from * @array: (array length=n): array of doubles * @n: the number of elements * * Set @value to hold a copy of @array. Pass in the array length in @n. * * See also: vips_array_double_get(). * * Returns: 0 on success, -1 otherwise. */ int vips_value_set_array_double( GValue *value, const double *array, int n ) { double *array_copy; g_value_init( value, VIPS_TYPE_ARRAY_DOUBLE ); vips_value_set_array( value, n, G_TYPE_DOUBLE, sizeof( double ) ); array_copy = vips_value_get_array_double( value, NULL ); memcpy( array_copy, array, n * sizeof( double ) ); return( 0 ); } /** * vips_value_get_array_object: (skip) * @value: %GValue to get from * @n: (allow-none): return the number of elements here, optionally * * Return the start of the array of %GObject held by @value. * optionally return the number of elements in @n. * * See also: vips_array_object_set(). * * Returns: (transfer none): The array address. */ GObject ** vips_value_get_array_object( const GValue *value, int *n ) { return( vips_value_get_array( value, n, NULL, NULL ) ); } /** * vips_array_object_set: * @value: (out): %GValue to set * @n: the number of elements * * Set @value to hold an array of GObject. Pass in the array length in @n. * * See also: vips_array_object_get(). * * Returns: 0 on success, -1 otherwise. */ int vips_value_set_array_object( GValue *value, int n ) { VipsArea *area; if( !(area = vips_area_new_array_object( n )) ) return( -1 ); g_value_set_boxed( value, area ); vips_area_unref( area ); return( 0 ); } /* Make the types we need for basic functioning. Called from init_world(). */ void vips__meta_init_types( void ) { (void) vips_thing_get_type(); (void) vips_save_string_get_type(); (void) vips_area_get_type(); (void) vips_ref_string_get_type(); (void) vips_blob_get_type(); (void) vips_array_double_get_type(); (void) vips_array_image_get_type(); /* Register transform functions to go from built-in saveable types to * a save string. Transform functions for our own types are set * during type creation. */ g_value_register_transform_func( G_TYPE_INT, VIPS_TYPE_SAVE_STRING, transform_int_save_string ); g_value_register_transform_func( VIPS_TYPE_SAVE_STRING, G_TYPE_INT, transform_save_string_int ); g_value_register_transform_func( G_TYPE_DOUBLE, VIPS_TYPE_SAVE_STRING, transform_double_save_string ); g_value_register_transform_func( VIPS_TYPE_SAVE_STRING, G_TYPE_DOUBLE, transform_save_string_double ); } vips-7.38.5/libvips/iofuncs/memory.c0000644000175000017500000002537712303140253014321 00000000000000/* tracked memory * * 2/11/99 JC * - from im_open.c and callback.c * - malloc tracking stuff added * 11/3/01 JC * - im_strncpy() added * 20/4/01 JC * - im_(v)snprintf() added * 6/7/05 * - more tracking for DEBUGM * 20/10/06 * - return NULL for size <= 0 * 11/5/06 * - abort() on malloc() failure with DEBUG * 20/10/09 * - gtkdoc comment * 6/11/09 * - im_malloc()/im_free() now call g_try_malloc()/g_free() ... removes * confusion over whether to use im_free() or g_free() for things like * im_header_string() * 21/9/11 * - rename as vips_tracked_malloc() to emphasise difference from * g_malloc()/g_free() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include #include #include /** * SECTION: memory * @short_description: memory utilities * @stability: Stable * @include: vips/vips.h * * These functions cover two main areas. * * First, some simple utility functions over the underlying * g_malloc()/g_free() functions. Memory allocated and freeded using these * functions is interchangeable with any other glib library. * * Second, a pair of functions, vips_tracked_malloc() and vips_tracked_free(), * which are NOT compatible. If you g_free() memory that has been allocated * with vips_tracked_malloc() you will see crashes. * * The tracked functions are * only suitable for large allocations internal to the library, for example * pixel buffers. libvips watches the total amount of live tracked memory and * uses this information to decide when to trim caches. */ /* g_assert( 0 ) on memory errors. #define DEBUG */ #ifdef DEBUG # warning DEBUG on in libsrc/iofuncs/memory.c #endif /*DEBUG*/ static int vips_tracked_allocs = 0; static size_t vips_tracked_mem = 0; static int vips_tracked_files = 0; static size_t vips_tracked_mem_highwater = 0; static GMutex *vips_tracked_mutex = NULL; /** * VIPS_NEW: * @OBJ: allocate memory local to @OBJ, or %NULL for no auto-free * @T: type of thing to allocate * * Returns: A pointer of type @T *, or %NULL on error. */ /** * VIPS_ARRAY: * @OBJ: allocate memory local to @OBJ, or %NULL for no auto-free * @N: number of @T 's to allocate * @T: type of thing to allocate * * Returns: A pointer of type @T *, or %NULL on error. */ static void vips_malloc_cb( VipsObject *object, char *buf ) { g_free( buf ); } /** * vips_malloc: * @object: allocate memory local to this #VipsObject, or %NULL * @size: number of bytes to allocate * * g_malloc() local to @object, that is, the memory will be automatically * freed for you when the object is closed. If @object is %NULL, you need to * free the memory explicitly with g_free(). * * This function cannot fail. See vips_tracked_malloc() if you are * allocating large amounts of memory. * * See also: vips_tracked_malloc(). * * Returns: a pointer to the allocated memory */ void * vips_malloc( VipsObject *object, size_t size ) { void *buf; buf = g_malloc( size ); if( object ) { g_signal_connect( object, "postclose", G_CALLBACK( vips_malloc_cb ), buf ); object->local_memory += size; } return( buf ); } /** * vips_strdup: * @object: allocate memory local to this #VipsObject, or %NULL * @str: string to copy * * g_strdup() a string. When @object is freed, the string will be freed for * you. If @object is %NULL, you need to * free the memory explicitly with g_free(). * * This function cannot fail. * * See also: vips_malloc(). * * Returns: a pointer to the allocated memory */ char * vips_strdup( VipsObject *object, const char *str ) { char *str_dup; str_dup = g_strdup( str ); if( object ) { g_signal_connect( object, "postclose", G_CALLBACK( vips_malloc_cb ), str_dup ); object->local_memory += strlen( str ); } return( str_dup ); } /** * vips_free: * @buf: memory to free * * Frees memory with g_free() and returns 0. Handy for callbacks. * * See also: vips_malloc(). * * Returns: 0 */ int vips_free( void *buf ) { g_free( buf ); return( 0 ); } /** * vips_tracked_free: * @s: memory to free * * Only use it to free * memory that was previously allocated with vips_tracked_malloc() with a * %NULL first argument. * * See also: vips_tracked_malloc(). */ void vips_tracked_free( void *s ) { size_t size; /* Keep the size of the alloc in the previous 16 bytes. Ensures * alignment rules are kept. */ s = (void *) ((char*)s - 16); size = *((size_t*)s); g_mutex_lock( vips_tracked_mutex ); if( vips_tracked_allocs <= 0 ) vips_warn( "vips_tracked", "%s", _( "vips_free: too many frees" ) ); if( vips_tracked_mem < size ) vips_warn( "vips_tracked", "%s", _( "vips_free: too much free" ) ); vips_tracked_mem -= size; vips_tracked_allocs -= 1; g_mutex_unlock( vips_tracked_mutex ); g_free( s ); VIPS_GATE_FREE( size ); } static void vips_tracked_init( void ) { static GOnce vips_tracked_once = G_ONCE_INIT; vips_tracked_mutex = g_once( &vips_tracked_once, (GThreadFunc) vips_g_mutex_new, NULL ); } /** * vips_tracked_malloc: * @size: number of bytes to allocate * * Allocate an area of memory that will be tracked by vips_tracked_get_mem() * and friends. * * If allocation fails, vips_malloc() returns %NULL and * sets an error message. * * You must only free the memory returned with vips_tracked_free(). * * See also: vips_tracked_free(), vips_malloc(). * * Returns: a pointer to the allocated memory, or %NULL on error. */ void * vips_tracked_malloc( size_t size ) { void *buf; vips_tracked_init(); /* Need an extra sizeof(size_t) bytes to track * size of this block. Ask for an extra 16 to make sure we don't break * alignment rules. */ size += 16; if( !(buf = g_try_malloc( size )) ) { #ifdef DEBUG g_assert( 0 ); #endif /*DEBUG*/ vips_error( "vips_tracked", _( "out of memory --- size == %dMB" ), (int) (size / (1024.0*1024.0)) ); vips_warn( "vips_tracked", _( "out of memory --- size == %dMB" ), (int) (size / (1024.0*1024.0)) ); return( NULL ); } g_mutex_lock( vips_tracked_mutex ); *((size_t *)buf) = size; buf = (void *) ((char *)buf + 16); vips_tracked_mem += size; if( vips_tracked_mem > vips_tracked_mem_highwater ) vips_tracked_mem_highwater = vips_tracked_mem; vips_tracked_allocs += 1; g_mutex_unlock( vips_tracked_mutex ); VIPS_GATE_MALLOC( size ); return( buf ); } /** * vips_tracked_open: * @pathname: name of file to open * @flags: flags for open() * @mode: open mode * * Exactly as open(2), but the number of files current open via * vips_tracked_open() is available via vips_tracked_get_files(). This is used * by the vips operation cache to drop cache when the number of files * available is low. * * You must only close the file descriptor with vips_tracked_close(). * * See also: vips_tracked_close(), vips_tracked_get_files(). * * Returns: a file descriptor, or -1 on error. */ int vips_tracked_open( const char *pathname, int flags, ... ) { int fd; mode_t mode; va_list ap; /* mode_t is promoted to int in ..., so we have to pull it out as an * int. */ va_start( ap, flags ); mode = va_arg( ap, int ); va_end( ap ); if( (fd = open( pathname, flags, mode )) == -1 ) return( -1 ); vips_tracked_init(); g_mutex_lock( vips_tracked_mutex ); vips_tracked_files += 1; #ifdef DEBUG printf( "vips_tracked_open: %s = %d (%d)\n", pathname, fd, vips_tracked_files ); #endif /*DEBUG*/ g_mutex_unlock( vips_tracked_mutex ); return( fd ); } /** * vips_tracked_close: * @fd: file to close() * * Exactly as close(2), but update the number of files currently open via * vips_tracked_get_files(). This is used * by the vips operation cache to drop cache when the number of files * available is low. * * You must only close file descriptors opened with vips_tracked_open(). * * See also: vips_tracked_open(), vips_tracked_get_files(). * * Returns: a file descriptor, or -1 on error. */ int vips_tracked_close( int fd ) { int result; g_mutex_lock( vips_tracked_mutex ); g_assert( vips_tracked_files > 0 ); vips_tracked_files -= 1; #ifdef DEBUG printf( "vips_tracked_close: %d (%d)\n", fd, vips_tracked_files ); #endif /*DEBUG*/ g_mutex_unlock( vips_tracked_mutex ); result = close( fd ); return( result ); } /** * vips_tracked_get_mem: * * Returns the number of bytes currently allocated via vips_malloc() and * friends. vips uses this figure to decide when to start dropping cache, see * #VipsOperation. * * Returns: the number of currently allocated bytes */ size_t vips_tracked_get_mem( void ) { size_t mem; vips_tracked_init(); g_mutex_lock( vips_tracked_mutex ); mem = vips_tracked_mem; g_mutex_unlock( vips_tracked_mutex ); return( mem ); } /** * vips_tracked_get_mem_highwater: * * Returns the largest number of bytes simultaneously allocated via * vips_tracked_malloc(). Handy for estimating max memory requirements for a * program. * * Returns: the largest number of currently allocated bytes */ size_t vips_tracked_get_mem_highwater( void ) { size_t mx; vips_tracked_init(); g_mutex_lock( vips_tracked_mutex ); mx = vips_tracked_mem_highwater; g_mutex_unlock( vips_tracked_mutex ); return( mx ); } /** * vips_tracked_get_allocs: * * Returns the number of active allocations. * * Returns: the number of active allocations */ int vips_tracked_get_allocs( void ) { int n; vips_tracked_init(); g_mutex_lock( vips_tracked_mutex ); n = vips_tracked_allocs; g_mutex_unlock( vips_tracked_mutex ); return( n ); } /** * vips_tracked_get_files: * * Returns the number of open files. * * Returns: the number of open files */ int vips_tracked_get_files( void ) { int n; vips_tracked_init(); g_mutex_lock( vips_tracked_mutex ); n = vips_tracked_files; g_mutex_unlock( vips_tracked_mutex ); return( n ); } vips-7.38.5/libvips/iofuncs/vips.c0000644000175000017500000005730312303140253013764 00000000000000/* Read and write a vips file * * 22/5/08 * - from im_open.c, im_openin.c, im_desc_hd.c, im_readhist.c, * im_openout.c * 19/3/09 * - block mmaps of nodata images * 12/5/09 * - fix signed/unsigned warnings * 12/10/09 * - heh argh reading history always stopped after the first line * 9/12/09 * - only wholly map input files on im_incheck() ... this reduces VM use, * especially with large numbers of small files * 14/2/11 * - renamed to vips.c from im_open_vips.c, some stuff chopped out for * image.c ... this file now just does read / write to disc * 28/3/11 * - moved to vips_ namespace */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG #define SHOW_HEADER */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_FILE_H #include #endif /*HAVE_SYS_FILE_H*/ #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #ifdef HAVE_IO_H #include #endif /*HAVE_IO_H*/ #include #include #ifdef OS_WIN32 #include #endif /*OS_WIN32*/ #include #include #include /* Try to make an O_BINARY ... sometimes need the leading '_'. */ #ifdef BINARY_OPEN #ifndef O_BINARY #ifdef _O_BINARY #define O_BINARY _O_BINARY #endif /*_O_BINARY*/ #endif /*!O_BINARY*/ #endif /*BINARY_OPEN*/ /* If we have O_BINARY, add it to a mode flags set. */ #ifdef O_BINARY #define BINARYIZE(M) ((M) | O_BINARY) #else /*!O_BINARY*/ #define BINARYIZE(M) (M) #endif /*O_BINARY*/ /* Open mode for image write ... on some systems, have to set BINARY too. * * We use O_RDWR not O_WRONLY since after writing we may want to rewind the * image and read from it. * */ #define MODE_WRITE BINARYIZE (O_RDWR | O_CREAT | O_TRUNC) /* Mode for read/write. This is if we might later want to mmaprw () the file. */ #define MODE_READWRITE BINARYIZE (O_RDWR) /* Mode for read only. This is the fallback if READWRITE fails. */ #define MODE_READONLY BINARYIZE (O_RDONLY) /* Our XML namespace. */ #define NAMESPACE "http://www.vips.ecs.soton.ac.uk/vips" /* Open for read for image files. */ int vips__open_image_read( const char *filename ) { int fd; /* Try to open read-write, so that calls to vips_image_inplace() will * work. When we later mmap this file, we set read-only, so there * is little danger of scrubbing over files we own. */ fd = vips_tracked_open( filename, MODE_READWRITE ); if( fd == -1 ) /* Open read-write failed. Fall back to open read-only. */ fd = vips_tracked_open( filename, MODE_READONLY ); if( fd == -1 ) { vips_error_system( errno, "VipsImage", _( "unable to open \"%s\"" ), filename ); return( -1 ); } return( fd ); } /* Open for write for image files. */ int vips__open_image_write( const char *filename, gboolean temp ) { int flags; int fd; flags = MODE_WRITE; #ifdef _O_TEMPORARY /* On Windows, setting O_TEMP gets the file automatically * deleted on process exit, even if the processes crashes. See * vips_image_rewind() for what we do to help on *nix. */ if( temp ) flags |= _O_TEMPORARY; #endif /*_O_TEMPORARY*/ if( (fd = vips_tracked_open( filename, flags, 0666 )) < 0 ) { vips_error_system( errno, "VipsImage", _( "unable to write to \"%s\"" ), filename ); return( -1 ); } return( fd ); } /* Predict the size of the header plus pixel data. Don't use off_t, * it's sometimes only 32 bits (eg. on many windows build environments) and we * want to always be 64 bit. */ static gint64 image_pixel_length( VipsImage *image ) { gint64 psize; switch( image->Coding ) { case VIPS_CODING_LABQ: case VIPS_CODING_RAD: case VIPS_CODING_NONE: psize = VIPS_IMAGE_SIZEOF_IMAGE( image ); break; default: psize = image->Length; break; } return( psize + image->sizeof_header ); } /* Copy 2 and 4 bytes, optionally swapping byte order. */ void vips__copy_4byte( int swap, unsigned char *to, unsigned char *from ) { guint32 *in = (guint32 *) from; guint32 *out = (guint32 *) to; if( swap ) *out = GUINT32_SWAP_LE_BE( *in ); else *out = *in; } void vips__copy_2byte( gboolean swap, unsigned char *to, unsigned char *from ) { guint16 *in = (guint16 *) from; guint16 *out = (guint16 *) to; if( swap ) *out = GUINT16_SWAP_LE_BE( *in ); else *out = *in; } guint32 vips__file_magic( const char *filename ) { guint32 magic; if( vips__get_bytes( filename, (unsigned char *) &magic, 4 ) && (magic == VIPS_MAGIC_INTEL || magic == VIPS_MAGIC_SPARC ) ) return( magic ); return( 0 ); } /* offset, read, write functions. */ typedef struct _FieldIO { glong offset; int size; void (*copy)( gboolean swap, unsigned char *to, unsigned char *from ); } FieldIO; static FieldIO fields[] = { { G_STRUCT_OFFSET( VipsImage, Xsize ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Ysize ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Bands ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Bbits ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, BandFmt ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Coding ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Type ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Xres_float ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Yres_float ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Length ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Compression ), 2, vips__copy_2byte }, { G_STRUCT_OFFSET( VipsImage, Level ), 2, vips__copy_2byte }, { G_STRUCT_OFFSET( VipsImage, Xoffset ), 4, vips__copy_4byte }, { G_STRUCT_OFFSET( VipsImage, Yoffset ), 4, vips__copy_4byte } }; int vips__read_header_bytes( VipsImage *im, unsigned char *from ) { gboolean swap; int i; #ifdef SHOW_HEADER printf( "vips__read_header_bytes: file bytes:\n" ); for( i = 0; i < im->sizeof_header; i++ ) printf( "%2d - 0x%02x\n", i, from[i] ); #endif /*SHOW_HEADER*/ /* The magic number is always written MSB first, we may need to swap. */ vips__copy_4byte( !vips_amiMSBfirst(), (unsigned char *) &im->magic, from ); from += 4; if( im->magic != VIPS_MAGIC_INTEL && im->magic != VIPS_MAGIC_SPARC ) { vips_error( "VipsImage", _( "\"%s\" is not a VIPS image" ), im->filename ); return( -1 ); } /* We need to swap for other fields if the file byte order is * different from ours. */ swap = vips_amiMSBfirst() != (im->magic == VIPS_MAGIC_SPARC); for( i = 0; i < VIPS_NUMBER( fields ); i++ ) { fields[i].copy( swap, &G_STRUCT_MEMBER( unsigned char, im, fields[i].offset ), from ); from += fields[i].size; } /* Set this ourselves ... bbits is deprecated in the file format. */ im->Bbits = vips_format_sizeof( im->BandFmt ) << 3; /* We read xres/yres as floats to a staging area, then copy to double * in the main fields. */ im->Xres = im->Xres_float; im->Yres = im->Yres_float; return( 0 ); } int vips__write_header_bytes( VipsImage *im, unsigned char *to ) { /* Swap if the byte order we are asked to write the header in is * different from ours. */ gboolean swap = vips_amiMSBfirst() != (im->magic == VIPS_MAGIC_SPARC); int i; unsigned char *q; /* We set xres/yres as floats in a staging area, then copy those * smaller values to the file. */ im->Xres_float = im->Xres; im->Yres_float = im->Yres; /* Always write the magic number MSB first. */ vips__copy_4byte( !vips_amiMSBfirst(), to, (unsigned char *) &im->magic ); q = to + 4; for( i = 0; i < VIPS_NUMBER( fields ); i++ ) { fields[i].copy( swap, q, &G_STRUCT_MEMBER( unsigned char, im, fields[i].offset ) ); q += fields[i].size; } /* Pad spares with zeros. */ while( q - to < im->sizeof_header ) *q++ = 0; #ifdef SHOW_HEADER printf( "vips__write_header_bytes: file bytes:\n" ); for( i = 0; i < im->sizeof_header; i++ ) printf( "%2d - 0x%02x\n", i, to[i] ); #endif /*SHOW_HEADER*/ return( 0 ); } /* Read a chunk of an fd into memory. Add a '\0' at the end. */ static char * read_chunk( int fd, gint64 offset, size_t length ) { char *buf; if( vips__seek( fd, offset ) ) return( NULL ); if( !(buf = vips_malloc( NULL, length + 1 )) ) return( NULL ); if( read( fd, buf, length ) != (ssize_t) length ) { vips_free( buf ); vips_error( "VipsImage", "%s", _( "unable to read history" ) ); return( NULL ); } buf[length] = '\0'; return( buf ); } /* Does it look like an image has an extension block? */ int vips__has_extension_block( VipsImage *im ) { gint64 psize; psize = image_pixel_length( im ); g_assert( im->file_length > 0 ); return( im->file_length - psize > 0 ); } /* Read everything after the pixels into memory. */ void * vips__read_extension_block( VipsImage *im, int *size ) { gint64 psize; void *buf; psize = image_pixel_length( im ); g_assert( im->file_length > 0 ); if( im->file_length - psize > 10 * 1024 * 1024 ) { vips_error( "VipsImage", "%s", _( "more than a 10 megabytes of XML? " "sufferin' succotash!" ) ); return( NULL ); } if( im->file_length - psize == 0 ) return( NULL ); if( !(buf = read_chunk( im->fd, psize, im->file_length - psize )) ) return( NULL ); if( size ) *size = im->file_length - psize; #ifdef DEBUG printf( "vips__read_extension_block: read %d bytes from %s\n", (int) (im->file_length - psize), im->filename ); printf( "data: \"%s\"\n", (char *) buf ); #endif /*DEBUG*/ return( buf ); } /* Read everything after the pixels into memory. FIXME ... why can't we use xmlParserInputBufferCreateFd and parse directly from the fd rather than having to read the stupid thing into memory the libxml API docs are impossible to decipher */ static xmlDoc * read_xml( VipsImage *im ) { void *buf; int size; xmlDoc *doc; xmlNode *node; if( !(buf = vips__read_extension_block( im, &size )) ) return( NULL ); if( !(doc = xmlParseMemory( buf, size )) ) { vips_free( buf ); return( NULL ); } vips_free( buf ); if( !(node = xmlDocGetRootElement( doc )) || !node->nsDef || !vips_isprefix( NAMESPACE, (char *) node->nsDef->href ) ) { vips_error( "VipsImage", "%s", _( "incorrect namespace in XML" ) ); xmlFreeDoc( doc ); return( NULL ); } #ifdef DEBUG printf( "read_xml: namespace == %s\n", node->nsDef->href ); #endif /*DEBUG*/ return( doc ); } /* Find the first child node with a name. */ static xmlNode * get_node( xmlNode *base, const char *name ) { xmlNode *i; for( i = base->children; i; i = i->next ) if( strcmp( (char *) i->name, name ) == 0 ) return( i ); return( NULL ); } /* Read a string property to a buffer. TRUE for success. */ static int get_sprop( xmlNode *xnode, const char *name, char *buf, int sz ) { char *value = (char *) xmlGetProp( xnode, (xmlChar *) name ); if( !value ) return( 0 ); vips_strncpy( buf, value, sz ); VIPS_FREEF( xmlFree, value ); return( 1 ); } /* Chop history into lines, add each one as a refstring. */ static void set_history( VipsImage *im, char *history ) { GSList *history_list; char *p, *q; /* There can be history there already if we're rewinding. */ VIPS_FREEF( vips__gslist_gvalue_free, im->history_list ); history_list = NULL; for( p = history; *p; p = q ) { if( (q = strchr( p, '\n' )) ) { *q = '\0'; q += 1; } else q = p + strlen( p ); history_list = g_slist_prepend( history_list, vips__gvalue_ref_string_new( p ) ); } im->history_list = g_slist_reverse( history_list ); } /* Load header fields. */ static int rebuild_header_builtin( VipsImage *im, xmlNode *i ) { char name[256]; if( get_sprop( i, "name", name, 256 ) ) { if( strcmp( name, "Hist" ) == 0 ) { char *history; /* Have to take (another) copy, since we need to free * with xmlFree(). */ history = (char *) xmlNodeGetContent( i ); set_history( im, history ); xmlFree( history ); } } return( 0 ); } /* Load meta fields. */ static int rebuild_header_meta( VipsImage *im, xmlNode *i ) { char name[256]; char type[256]; if( get_sprop( i, "name", name, 256 ) && get_sprop( i, "type", type, 256 ) ) { GType gtype = g_type_from_name( type ); /* Can we convert from VIPS_SAVE_STRING to type? */ if( gtype && g_value_type_transformable( VIPS_TYPE_SAVE_STRING, gtype ) ) { char *content; GValue save_value = { 0 }; GValue value = { 0 }; content = (char *) xmlNodeGetContent( i ); g_value_init( &save_value, VIPS_TYPE_SAVE_STRING ); vips_value_set_save_string( &save_value, content ); xmlFree( content ); g_value_init( &value, gtype ); if( !g_value_transform( &save_value, &value ) ) { g_value_unset( &save_value ); vips_error( "VipsImage", "%s", _( "error transforming from " "save format" ) ); return( -1 ); } vips_image_set( im, name, &value ); g_value_unset( &save_value ); g_value_unset( &value ); } } return( 0 ); } static xmlDoc * get_xml( VipsImage *im ) { if( vips_image_get_typeof( im, VIPS_META_XML ) ) { xmlDoc *doc; if( vips_image_get_area( im, VIPS_META_XML, (void *) &doc ) ) return( NULL ); return( doc ); } return( NULL ); } /* Rebuild header fields that depend on stuff saved in xml. */ static int rebuild_header( VipsImage *im ) { xmlDoc *doc; if( (doc = get_xml( im )) ) { xmlNode *root; xmlNode *block; if( !(root = xmlDocGetRootElement( doc )) ) return( -1 ); if( (block = get_node( root, "header" )) ) { xmlNode *i; for( i = block->children; i; i = i->next ) if( strcmp( (char *) i->name, "field" ) == 0 ) if( rebuild_header_builtin( im, i ) ) return( -1 ); } if( (block = get_node( root, "meta" )) ) { xmlNode *i; for( i = block->children; i; i = i->next ) if( strcmp( (char *) i->name, "field" ) == 0 ) if( rebuild_header_meta( im, i ) ) return( -1 ); } } return( 0 ); } /* Called at the end of vips open ... get any XML after the pixel data * and read it in. */ static int readhist( VipsImage *im ) { /* Junk any old xml meta. */ if( vips_image_get_typeof( im, VIPS_META_XML ) ) vips_image_set_area( im, VIPS_META_XML, NULL, NULL ); if( vips__has_extension_block( im ) ) { xmlDoc *doc; if( !(doc = read_xml( im )) ) return( -1 ); vips_image_set_area( im, VIPS_META_XML, (VipsCallbackFn) xmlFreeDoc, doc ); } if( rebuild_header( im ) ) return( -1 ); return( 0 ); } #define MAX_STRSIZE (32768) /* Max size of text for stack strings */ static int set_prop( xmlNode *node, const char *name, const char *fmt, ... ) { va_list ap; char value[MAX_STRSIZE]; va_start( ap, fmt ); (void) vips_vsnprintf( value, MAX_STRSIZE, fmt, ap ); va_end( ap ); if( !xmlSetProp( node, (xmlChar *) name, (xmlChar *) value ) ) { vips_error( "VipsImage", _( "unable to set property \"%s\" " "to value \"%s\"." ), name, value ); return( -1 ); } return( 0 ); } static int set_sprop( xmlNode *node, const char *name, const char *value ) { if( value && set_prop( node, name, "%s", value ) ) return( -1 ); return( 0 ); } static int set_field( xmlNode *node, const char *name, const char *type, const char *content ) { xmlNode *field; if( !(field = xmlNewChild( node, NULL, (xmlChar *) "field", NULL )) || set_sprop( field, "type", type ) || set_sprop( field, "name", name ) ) return( -1 ); xmlNodeSetContent( field, (xmlChar *) content ); return( 0 ); } static void * save_fields_meta( VipsMeta *meta, xmlNode *node ) { GType type = G_VALUE_TYPE( &meta->value ); /* If we can transform to VIPS_TYPE_SAVE_STRING and back, we can save * and restore. */ if( g_value_type_transformable( type, VIPS_TYPE_SAVE_STRING ) && g_value_type_transformable( VIPS_TYPE_SAVE_STRING, type ) ) { GValue save_value = { 0 }; g_value_init( &save_value, VIPS_TYPE_SAVE_STRING ); if( !g_value_transform( &meta->value, &save_value ) ) { vips_error( "VipsImage", "%s", _( "error transforming to save format" ) ); return( node ); } if( set_field( node, meta->field, g_type_name( type ), vips_value_get_save_string( &save_value ) ) ) { g_value_unset( &save_value ); return( node ); } g_value_unset( &save_value ); } return( NULL ); } static int save_fields( VipsImage *im, xmlNode *node ) { xmlNode *this; /* Save header fields. */ if( !(this = xmlNewChild( node, NULL, (xmlChar *) "header", NULL )) ) return( -1 ); if( set_field( this, "Hist", g_type_name( VIPS_TYPE_REF_STRING ), vips_image_get_history( im ) ) ) return( -1 ); if( !(this = xmlNewChild( node, NULL, (xmlChar *) "meta", NULL )) ) return( -1 ); if( im->meta_traverse && vips_slist_map2( im->meta_traverse, (VipsSListMap2Fn) save_fields_meta, this, NULL ) ) return( -1 ); return( 0 ); } int vips__write_extension_block( VipsImage *im, void *buf, int size ) { gint64 length; gint64 psize; psize = image_pixel_length( im ); if( (length = vips_file_length( im->fd )) == -1 ) return( -1 ); if( length - psize < 0 ) { vips_error( "VipsImage", "%s", _( "file has been truncated" ) ); return( -1 ); } if( vips__ftruncate( im->fd, psize ) || vips__seek( im->fd, psize ) ) return( -1 ); if( vips__write( im->fd, buf, size ) ) return( -1 ); #ifdef DEBUG printf( "vips__write_extension_block: written %d bytes of XML to %s\n", size, im->filename ); #endif /*DEBUG*/ return( 0 ); } #ifdef DEBUG /* Return a string of n characters. Buffer is zapped each time! */ const char * rpt( char ch, int n ) { int i; static char buf[200]; n = VIPS_MIN( 190, n ); for( i = 0; i < n; i++ ) buf[i] = ch; buf[i] = '\0'; return( buf ); } /* Return a string of n spaces. Buffer is zapped each time! */ const char * spc( int n ) { return( rpt( ' ', n ) ); } static void prettify_tree_sub( xmlNode *xnode, int indent ) { xmlNode *txt; xmlNode *next; for(;;) { next = xnode->next; /* According to memprof, this leaks :-( If you cut it out into * a separate prog though, it's OK FIXME ... how odd */ txt = xmlNewText( "\n" ); xmlAddPrevSibling( xnode, txt ); txt = xmlNewText( spc( indent ) ); xmlAddPrevSibling( xnode, txt ); if( xnode->children ) prettify_tree_sub( xnode->children, indent + 2 ); if( !next ) break; xnode = next; } txt = xmlNewText( spc( indent - 2 ) ); xmlAddNextSibling( xnode, txt ); txt = xmlNewText( "\n" ); xmlAddNextSibling( xnode, txt ); } /* Walk an XML document, adding extra blank text elements so that it's easier * to read. Don't call me twice! */ void prettify_tree( xmlDoc *xdoc ) { xmlNode *xnode = xmlDocGetRootElement( xdoc ); prettify_tree_sub( xnode, 0 ); } #endif /*DEBUG*/ /* Append XML to output fd. */ int vips__writehist( VipsImage *im ) { xmlDoc *doc; char namespace[256]; char *dump; int dump_size; assert( im->dtype == VIPS_IMAGE_OPENOUT ); assert( im->fd != -1 ); if( !(doc = xmlNewDoc( (xmlChar *) "1.0" )) ) return( -1 ); vips_snprintf( namespace, 256, "%s/%d.%d.%d", NAMESPACE, VIPS_MAJOR_VERSION, VIPS_MINOR_VERSION, VIPS_MICRO_VERSION ); if( !(doc->children = xmlNewDocNode( doc, NULL, (xmlChar *) "root", NULL )) || set_sprop( doc->children, "xmlns", namespace ) || save_fields( im, doc->children ) ) { vips_error( "VipsImage", "%s", _( "xml save error" ) ); xmlFreeDoc( doc ); return( -1 ); } /* Bizarre double-cast stops a bogus gcc 4.1 compiler warning. */ xmlDocDumpMemory( doc, (xmlChar **) ((char *) &dump), &dump_size ); if( !dump ) { vips_error( "VipsImage", "%s", _( "xml save error" ) ); xmlFreeDoc( doc ); return( -1 ); } if( vips__write_extension_block( im, dump, dump_size ) ) { xmlFreeDoc( doc ); xmlFree( dump ); return( -1 ); } #ifdef DEBUG { char *dump2; int dump_size2; /* Uncomment to have XML pretty-printed. Can be annoying during * debugging tho' */ prettify_tree( doc ); xmlDocDumpMemory( doc, (xmlChar **) &dump2, &dump_size2 ); if( !dump2 ) { vips_error( "VipsImage", "%s", _( "xml save error" ) ); xmlFreeDoc( doc ); xmlFree( dump ); return( -1 ); } printf( "vips__writehist: saved XML is: \"%s\"", dump2 ); xmlFree( dump2 ); } #endif /*DEBUG*/ xmlFreeDoc( doc ); xmlFree( dump ); return( 0 ); } /* Open the filename, read the header, some sanity checking. */ int vips_image_open_input( VipsImage *image ) { /* We don't use im->sizeof_header here, but we know we're reading a * VIPS image anyway. */ unsigned char header[VIPS_SIZEOF_HEADER]; gint64 psize; gint64 rsize; image->dtype = VIPS_IMAGE_OPENIN; /* We may have an fd already, see vips_image_rewind_output(). */ if( image->fd == -1 ) { image->fd = vips__open_image_read( image->filename ); if( image->fd == -1 ) return( -1 ); } vips__seek( image->fd, 0 ); if( read( image->fd, header, VIPS_SIZEOF_HEADER ) != VIPS_SIZEOF_HEADER || vips__read_header_bytes( image, header ) ) { vips_error_system( errno, "VipsImage", _( "unable to read header for \"%s\"" ), image->filename ); return( -1 ); } /* Predict and check the file size. */ psize = image_pixel_length( image ); if( (rsize = vips_file_length( image->fd )) == -1 ) return( -1 ); image->file_length = rsize; if( psize > rsize ) vips_warn( "VipsImage", _( "unable to read data for \"%s\", %s" ), image->filename, _( "file has been truncated" ) ); /* Set demand style. This suits a disc file we read sequentially. */ image->dhint = VIPS_DEMAND_STYLE_THINSTRIP; /* Set the history part of im descriptor. Don't return an error if this * fails (due to eg. corrupted XML) because it's probably mostly * harmless. */ if( readhist( image ) ) { vips_warn( "VipsImage", _( "error reading XML: %s" ), vips_error_buffer() ); vips_error_clear(); } return( 0 ); } int vips_image_open_output( VipsImage *image ) { if( image->fd == -1 ) { /* Don't use im->sizeof_header here, but we know we're * writing a VIPS image anyway. */ unsigned char header[VIPS_SIZEOF_HEADER]; if( (image->fd = vips__open_image_write( image->filename, image->delete_on_close )) < 0 ) return( -1 ); /* We always write in native mode, so we must overwrite the * magic we read from the file originally. */ image->magic = vips_amiMSBfirst() ? VIPS_MAGIC_SPARC : VIPS_MAGIC_INTEL; if( vips__write_header_bytes( image, header ) || vips__write( image->fd, header, VIPS_SIZEOF_HEADER ) ) return( -1 ); } return( 0 ); } vips-7.38.5/libvips/iofuncs/init.c0000644000175000017500000005376012303141142013747 00000000000000/* Start up the world of vips. * * 7/1/04 JC * - 1st version * 7/6/05 * - g_type_init() too, so we can use gobject * 2/9/06 * - also set g_prg_name() and load plugins * 8/12/06 * - add liboil support * 5/2/07 * - stop a loop if we're called recursively during VIPS startup ... it * can happen if (for example) vips_guess_prefix() fails and tries to * i18n an error message (thanks Christian) * 8/6/07 * - just warn if plugins fail to load correctly: too annoying to have * VIPS refuse to start because of a dodgy plugin * 7/11/07 * - progress feedback option * 5/8/08 * - load plugins from libdir/vips-x.x * 5/10/09 * - gtkdoc comments * 14/3/10 * - init image and region before we start, we need all types to be fully * constructed before we go parallel */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #ifdef HAVE_SYS_PARAM_H #include #endif /*HAVE_SYS_PARAM_H*/ #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #ifdef HAVE_DIRECT_H #include #endif /*HAVE_DIRECT_H*/ #include #include #include #include #include #include /* abort() on the first warning or error. */ int vips__fatal = 0; /* Use in various small places where we need a mutex and it's not worth * making a private one. */ GMutex *vips__global_lock = NULL; /* Keep a copy of the argv0 here. */ static char *vips__argv0 = NULL; /* Leak check on exit. */ int vips__leak = 0; /** * vips_get_argv0: * * See also: vips_init(). * * Returns: a pointer to an internal copy of the argv0 string passed to * vips_init(). Do not free this value */ const char * vips_get_argv0( void ) { return( vips__argv0 ); } /** * vips_init: * @argv0: name of application * * vips_init() starts up the world of VIPS. You should call this on * program startup before using any other VIPS operations. If you do not call * vips_init(), VIPS will call it for you when you use your first VIPS * operation, but * it may not be able to get hold of @argv0 and VIPS may therefore be unable * to find its data files. It is much better to call this function yourself. * * vips_init() does approximately the following: * * * * initialises any libraries that VIPS is using, including GObject * and the threading system, if neccessary * * * guesses where the VIPS data files are and sets up * internationalisation --- see vips_guess_prefix() * * * * creates the main vips types, including VipsImage and friends * * * * loads any plugins from $libdir/vips-x.y/, where x and y are the * major and minor version numbers for this VIPS. * * * * * Example: * * |[ * int main( int argc, char **argv ) * { * if( vips_init( argv[0] ) ) * vips_error_exit( "unable to start VIPS" ); * * vips_shutdown(); * * return( 0 ); * } * ]| * * See also: vips_shutdown(), vips_get_option_group(), vips_version(), * vips_guess_prefix(), vips_guess_libdir(). * * Returns: 0 on success, -1 otherwise */ /* vips_init() is actually a macro which checks library and application * compatibility before calling vips__init(). */ int vips__init( const char *argv0 ) { extern GType vips_system_get_type( void ); static gboolean started = FALSE; static gboolean done = FALSE; char *prgname; const char *prefix; const char *libdir; char name[256]; /* Two stage done handling: 'done' means we've completed, 'started' * means we're currently initialising. Use this to prevent recursive * invocation. */ if( done ) /* Called more than once, we succeeded, just return OK. */ return( 0 ); if( started ) /* Recursive invocation, something has broken horribly. * Hopefully the first init will handle it. */ return( 0 ); started = TRUE; #ifdef NEED_TYPE_INIT /* Before glib 2.36 you have to call this on startup. */ g_type_init(); #endif /*NEED_TYPE_INIT*/ /* Older glibs need this. */ #ifndef HAVE_THREAD_NEW if( !g_thread_supported() ) g_thread_init( NULL ); #endif if( !vips__global_lock ) vips__global_lock = vips_g_mutex_new(); VIPS_SETSTR( vips__argv0, argv0 ); prgname = g_path_get_basename( argv0 ); g_set_prgname( prgname ); g_free( prgname ); vips__thread_profile_attach( "main" ); /* We can't do VIPS_GATE_START() until command-line processing * happens, since vips__thread_profile may not be set yet. Call * directly. */ vips__thread_gate_start( "init: main" ); vips__thread_gate_start( "init: startup" ); /* Try to discover our prefix. */ if( !(prefix = vips_guess_prefix( argv0, "VIPSHOME" )) || !(libdir = vips_guess_libdir( argv0, "VIPSHOME" )) ) return( -1 ); /* Get i18n .mo files from $VIPSHOME/share/locale/. */ vips_snprintf( name, 256, "%s" G_DIR_SEPARATOR_S "share" G_DIR_SEPARATOR_S "locale", prefix ); bindtextdomain( GETTEXT_PACKAGE, name ); bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" ); /* Default info setting from env. */ if( g_getenv( "IM_INFO" ) ) vips__info = 1; /* Register base vips types. */ (void) vips_image_get_type(); (void) vips_region_get_type(); vips__meta_init_types(); vips__interpolate_init(); im__format_init(); /* Start up operator cache. */ vips__cache_init(); /* Start up packages. */ (void) vips_system_get_type(); vips_arithmetic_operation_init(); vips_conversion_operation_init(); vips_create_operation_init(); vips_foreign_operation_init(); vips_resample_operation_init(); vips_colour_operation_init(); vips_histogram_operation_init(); vips_convolution_operation_init(); vips_freqfilt_operation_init(); vips_morphology_operation_init(); /* Load up any plugins in the vips libdir. We don't error on failure, * it's too annoying to have VIPS refuse to start because of a broken * plugin. */ if( im_load_plugins( "%s/vips-%d.%d", libdir, VIPS_MAJOR_VERSION, VIPS_MINOR_VERSION ) ) { vips_warn( "vips_init", "%s", vips_error_buffer() ); vips_error_clear(); } /* Also load from libdir. This is old and slightly broken behaviour * :-( kept for back compat convenience. */ if( im_load_plugins( "%s", libdir ) ) { vips_warn( "vips_init", "%s", vips_error_buffer() ); vips_error_clear(); } /* Build classes which wrap old vips7 operations. */ vips__init_wrap7_classes(); /* Start up the buffer cache. */ vips__buffer_init(); /* Get the run-time compiler going. */ vips_vector_init(); /* Register vips_shutdown(). This may well not get called and many * platforms don't support it anyway. */ #ifdef HAVE_ATEXIT atexit( vips_shutdown ); #endif /*HAVE_ATEXIT*/ done = TRUE; vips__thread_gate_stop( "init: startup" ); return( 0 ); } /* Return the sizeof() various important data structures. These are checked * against the headers used to build our caller by vips_init(). * * We allow direct access to members of VipsImage and VipsRegion (mostly for * reasons of history), so any change to a superclass of either of these * objects will break our ABI. */ size_t vips__get_sizeof_vipsobject( void ) { return( sizeof( VipsObject ) ); } /* Call this before vips stuff that uses stuff we need to have inited. */ void vips_check_init( void ) { /* Pass in a nonsense name for argv0 ... this init path is only here * for old programs which are missing an vips_init() call. We need * i18n set up before we can translate. */ if( vips_init( "giant_banana" ) ) vips_error_clear(); } static void vips_leak( void ) { char txt[1024]; VipsBuf buf = VIPS_BUF_STATIC( txt ); vips_object_print_all(); if( vips_tracked_get_allocs() || vips_tracked_get_mem() || vips_tracked_get_files() ) { vips_buf_appendf( &buf, "memory: %d allocations, %zd bytes\n", vips_tracked_get_allocs(), vips_tracked_get_mem() ); vips_buf_appendf( &buf, "files: %d open\n", vips_tracked_get_files() ); } vips_buf_appendf( &buf, "memory: high-water mark " ); vips_buf_append_size( &buf, vips_tracked_get_mem_highwater() ); vips_buf_appends( &buf, "\n" ); fprintf( stderr, "%s", vips_buf_all( &buf ) ); vips__type_leak(); } /** * vips_thread_shutdown: * * Free any thread-private data and flush any profiling information. * * This function needs to be called when a thread that has been using vips * exits. It is called for you by vips_shutdown() and for any threads created * by vips_g_thread_new(). * * You will need to call it from threads created in * other ways. If you do not call it, vips will generate an error message. * * May be called many times. */ void vips_thread_shutdown( void ) { vips__buffer_shutdown(); vips__thread_profile_detach(); } /** * vips_shutdown: * * Call this to drop caches and close plugins. Run with "--vips-leak" to do * a leak check too. May be called many times. */ void vips_shutdown( void ) { #ifdef DEBUG printf( "vips_shutdown:\n" ); #endif /*DEBUG*/ vips_cache_drop_all(); im_close_plugins(); /* Mustn't run this more than once. Don't use the VIPS_GATE macro, * since we don't for gate start. */ { static gboolean done = FALSE; if( !done ) vips__thread_gate_stop( "init: main" ); } vips_thread_shutdown(); vips__thread_profile_stop(); /* In dev releases, always show leaks. But not more than once, it's * annoying. */ #ifndef DEBUG_LEAK if( vips__leak ) #endif /*DEBUG_LEAK*/ { static gboolean done = FALSE; if( !done ) vips_leak(); done = TRUE; } } const char * vips__gettext( const char *msgid ) { vips_check_init(); return( dgettext( GETTEXT_PACKAGE, msgid ) ); } const char * vips__ngettext( const char *msgid, const char *plural, unsigned long int n ) { vips_check_init(); return( dngettext( GETTEXT_PACKAGE, msgid, plural, n ) ); } static gboolean vips_lib_version_cb( const gchar *option_name, const gchar *value, gpointer data, GError **error ) { printf( "libvips %s\n", VIPS_VERSION_STRING ); vips_shutdown(); exit( 0 ); } static gboolean vips_set_fatal_cb( const gchar *option_name, const gchar *value, gpointer data, GError **error ) { vips__fatal = 1; /* Set masks for debugging ... stop on any problem. */ g_log_set_always_fatal( G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING ); return( TRUE ); } static GOptionEntry option_entries[] = { { "vips-info", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &vips__info, N_( "show informative messages" ), NULL }, { "vips-fatal", 0, G_OPTION_FLAG_HIDDEN | G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (gpointer) &vips_set_fatal_cb, N_( "abort on first error or warning" ), NULL }, { "vips-concurrency", 'c', 0, G_OPTION_ARG_INT, &vips__concurrency, N_( "evaluate with N concurrent threads" ), "N" }, { "vips-tile-width", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_INT, &vips__tile_width, N_( "set tile width to N (DEBUG)" ), "N" }, { "vips-tile-height", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_INT, &vips__tile_height, N_( "set tile height to N (DEBUG)" ), "N" }, { "vips-thinstrip-height", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_INT, &vips__thinstrip_height, N_( "set thinstrip height to N (DEBUG)" ), "N" }, { "vips-fatstrip-height", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_INT, &vips__fatstrip_height, N_( "set fatstrip height to N (DEBUG)" ), "N" }, { "vips-progress", 0, 0, G_OPTION_ARG_NONE, &vips__progress, N_( "show progress feedback" ), NULL }, { "vips-leak", 0, 0, G_OPTION_ARG_NONE, &vips__leak, N_( "leak-check on exit" ), NULL }, { "vips-profile", 0, 0, G_OPTION_ARG_NONE, &vips__thread_profile, N_( "profile and dump timing on exit" ), NULL }, { "vips-disc-threshold", 0, 0, G_OPTION_ARG_STRING, &vips__disc_threshold, N_( "images larger than N are decompressed to disc" ), "N" }, { "vips-novector", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &vips__vector_enabled, N_( "disable vectorised versions of operations" ), NULL }, { "vips-cache-max", 0, 0, G_OPTION_ARG_STRING, &vips__cache_max, N_( "cache at most N operations" ), "N" }, { "vips-cache-max-memory", 0, 0, G_OPTION_ARG_STRING, &vips__cache_max_mem, N_( "cache at most N bytes in memory" ), "N" }, { "vips-cache-max-files", 0, 0, G_OPTION_ARG_STRING, &vips__cache_max_files, N_( "allow at most N open files" ), "N" }, { "vips-cache-trace", 0, 0, G_OPTION_ARG_NONE, &vips__cache_trace, N_( "trace operation cache" ), NULL }, { "vips-cache-dump", 0, 0, G_OPTION_ARG_NONE, &vips__cache_dump, N_( "dump operation cache on exit" ), NULL }, { "vips-version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (gpointer) &vips_lib_version_cb, N_( "print libvips version" ), NULL }, { NULL } }; /** * vips_get_option_group: (skip) * * vips_get_option_group() returns a GOptionGroup containing various VIPS * command-line options. It can be used with GOption to help * parse argc/argv. * * See also: vips_version(), vips_guess_prefix(), * vips_guess_libdir(), vips_init(). * * Returns: a GOptionGroup for VIPS, see GOption */ GOptionGroup * vips_get_option_group( void ) { static GOptionGroup *option_group = NULL; if( !option_group ) { option_group = g_option_group_new( "vips", _( "VIPS Options" ), _( "Show VIPS options" ), NULL, NULL ); g_option_group_add_entries( option_group, option_entries ); } return( option_group ); } /* Find the prefix part of a dir ... name is the name of this prog from argv0. * * dir name guess prefix * * /home/john/vips-7.6.4/bin/vips-7.6 vips-7.6 /home/john/vips-7.6.4 * /usr/local/bin/ip ip /usr/local * * all other forms ... return NULL. */ static char * extract_prefix( const char *dir, const char *name ) { char edir[VIPS_PATH_MAX]; char vname[VIPS_PATH_MAX]; int i; #ifdef DEBUG printf( "extract_prefix: trying for dir = \"%s\", name = \"%s\"\n", dir, name ); #endif /*DEBUG*/ /* Is dir relative? Prefix with cwd. */ if( !g_path_is_absolute( dir ) ) { char *cwd; cwd = g_get_current_dir(); vips_snprintf( edir, VIPS_PATH_MAX, "%s" G_DIR_SEPARATOR_S "%s", cwd, dir ); g_free( cwd ); } else { vips_strncpy( edir, dir, VIPS_PATH_MAX ); } /* Chop off the trailing prog name, plus the trailing * G_DIR_SEPARATOR_S. */ if( !vips_ispostfix( edir, name ) ) return( NULL ); vips_strncpy( vname, edir, VIPS_PATH_MAX ); vname[strlen( edir ) - strlen( name ) - 1] = '\0'; /* Remove any "/./", any trailing "/.", any trailing "/". */ for( i = 0; i < (int) strlen( vname ); i++ ) if( vips_isprefix( G_DIR_SEPARATOR_S "." G_DIR_SEPARATOR_S, vname + i ) ) memcpy( vname + i, vname + i + 2, strlen( vname + i + 2 ) + 1 ); if( vips_ispostfix( vname, G_DIR_SEPARATOR_S "." ) ) vname[strlen( vname ) - 2] = '\0'; if( vips_ispostfix( vname, G_DIR_SEPARATOR_S ) ) vname[strlen( vname ) - 1] = '\0'; #ifdef DEBUG printf( "extract_prefix: canonicalised path = \"%s\"\n", vname ); #endif /*DEBUG*/ /* Ought to be a "/bin" at the end now. */ if( !vips_ispostfix( vname, G_DIR_SEPARATOR_S "bin" ) ) return( NULL ); vname[strlen( vname ) - strlen( G_DIR_SEPARATOR_S "bin" )] = '\0'; #ifdef DEBUG printf( "extract_prefix: found \"%s\"\n", vname ); #endif /*DEBUG*/ return( vips_strdup( NULL, vname ) ); } /* Search a path for a file ... we overwrite the PATH string passed in. */ static char * scan_path( char *path, const char *name ) { char *p, *q; char *prefix; for( p = path; (q = vips_break_token( p, G_SEARCHPATH_SEPARATOR_S )); p = q ) { char str[VIPS_PATH_MAX]; /* Form complete path. */ vips_snprintf( str, VIPS_PATH_MAX, "%s" G_DIR_SEPARATOR_S "%s", p, name ); #ifdef DEBUG printf( "scan_path: looking in \"%s\" for \"%s\"\n", p, name ); #endif /*DEBUG*/ if( vips_existsf( "%s", str ) && (prefix = extract_prefix( str, name )) ) { return( prefix ); } } return( NULL ); } /* Look for a file along PATH. If we find it, look for an enclosing prefix. */ static char * find_file( const char *name ) { const char *path = g_getenv( "PATH" ); char *prefix; char full_path[VIPS_PATH_MAX]; if( !path ) return( NULL ); #ifdef DEBUG printf( "vips_guess_prefix: g_getenv( \"PATH\" ) == \"%s\"\n", path ); #endif /*DEBUG*/ #ifdef OS_WIN32 { char *dir; /* Windows always searches '.' first, so prepend cwd to path. */ dir = g_get_current_dir(); vips_snprintf( full_path, VIPS_PATH_MAX, "%s" G_SEARCHPATH_SEPARATOR_S "%s", dir, path ); g_free( dir ); } #else /*!OS_WIN32*/ vips_strncpy( full_path, path, VIPS_PATH_MAX ); #endif /*OS_WIN32*/ if( (prefix = scan_path( full_path, name )) ) return( prefix ); return( NULL ); } /* Guess a value for the install PREFIX. */ static const char * guess_prefix( const char *argv0, const char *name ) { char *prefix; /* Try to guess from argv0. */ if( argv0 ) { if( g_path_is_absolute( argv0 ) ) { /* Must point to our executable. */ if( (prefix = extract_prefix( argv0, name )) ) { #ifdef DEBUG printf( "vips_guess_prefix: found \"%s\" from " "argv0\n", prefix ); #endif /*DEBUG*/ return( prefix ); } } /* Look along path for name. */ if( (prefix = find_file( name )) ) { #ifdef DEBUG printf( "vips_guess_prefix: found \"%s\" from " "PATH\n", prefix ); #endif /*DEBUG*/ return( prefix ); } } #ifdef HAVE_REALPATH /* Try to guess from cwd. Only if this is a relative path, though. No * realpath on winders, but fortunately it seems to always generate * a full path in argv[0]. */ if( !g_path_is_absolute( argv0 ) ) { char full_path[VIPS_PATH_MAX]; char *resolved; char *dir; dir = g_get_current_dir(); vips_snprintf( full_path, VIPS_PATH_MAX, "%s" G_DIR_SEPARATOR_S "%s", dir, argv0 ); g_free( dir ); if( (resolved = realpath( full_path, NULL )) ) { prefix = extract_prefix( resolved, name ); free( resolved ); if( prefix ) { #ifdef DEBUG printf( "vips_guess_prefix: found \"%s\" " "from cwd\n", prefix ); #endif /*DEBUG*/ return( prefix ); } } } #endif /*HAVE_REALPATH*/ /* Fall back to the configure-time prefix. */ return( VIPS_PREFIX ); } /** * vips_guess_prefix: * @argv0: program name (typically argv[0]) * @env_name: save prefix in this environment variable * * vips_guess_prefix() tries to guess the install directory. You should pass * in the value of argv[0] (the name your program was run as) as a clue to * help it out, plus the name of the environment variable you let the user * override your package install area with (eg. "VIPSHOME"). * * On success, vips_guess_prefix() returns the prefix it discovered, and as a * side effect, sets the environment variable (if it's not set). * * Don't free the return string! * * See also: vips_guess_libdir(). * * Returns: the install prefix as a static string, do not free. */ const char * vips_guess_prefix( const char *argv0, const char *env_name ) { const char *prefix; const char *p; char name[VIPS_PATH_MAX]; /* Already set? */ if( (prefix = g_getenv( env_name )) ) { #ifdef DEBUG printf( "vips_guess_prefix: found \"%s\" in environment\n", prefix ); #endif /*DEBUG*/ return( prefix ); } /* Get the program name from argv0. */ p = vips_skip_dir( argv0 ); /* Add the exe suffix, if it's missing. */ if( strlen( VIPS_EXEEXT ) > 0 ) { const char *olds[] = { VIPS_EXEEXT }; vips__change_suffix( p, name, VIPS_PATH_MAX, VIPS_EXEEXT, olds, 1 ); } else vips_strncpy( name, p, VIPS_PATH_MAX ); #ifdef DEBUG printf( "vips_guess_prefix: argv0 = %s\n", argv0 ); printf( "vips_guess_prefix: name = %s\n", name ); #endif /*DEBUG*/ prefix = guess_prefix( argv0, name ); g_setenv( env_name, prefix, TRUE ); return( prefix ); } /** * vips_guess_libdir: * @argv0: program name (typically argv[0]) * @env_name: save prefix in this environment variable * * vips_guess_libdir() tries to guess the install directory (usually the * configure libdir, or $prefix/lib). You should pass * in the value of argv[0] (the name your program was run as) as a clue to * help it out, plus the name of the environment variable you let the user * override your package install area with (eg. "VIPSHOME"). * * On success, vips_guess_libdir() returns the libdir it discovered, and as a * side effect, sets the prefix environment variable (if it's not set). * * Don't free the return string! * * See also: vips_guess_prefix(). * * Returns: the libdir as a static string, do not free. */ const char * vips_guess_libdir( const char *argv0, const char *env_name ) { const char *prefix = vips_guess_prefix( argv0, env_name ); static char *libdir = NULL; if( libdir ) return( libdir ); /* Have we been moved since configure? If not, use the configure-time * libdir. */ if( strcmp( prefix, VIPS_PREFIX ) == 0 ) libdir = VIPS_LIBDIR; else libdir = g_strdup_printf( "%s/lib", prefix ); #ifdef DEBUG printf( "vips_guess_libdir: VIPS_PREFIX = %s\n", VIPS_PREFIX ); printf( "vips_guess_libdir: VIPS_LIBDIR = %s\n", VIPS_LIBDIR ); printf( "vips_guess_libdir: prefix = %s\n", prefix ); printf( "vips_guess_libdir: libdir = %s\n", libdir ); #endif /*DEBUG*/ return( libdir ); } vips-7.38.5/libvips/iofuncs/enumtypes.c0000644000175000017500000005167212303141142015035 00000000000000 /* Generated data (by glib-mkenums) */ /* auto-generated enums for vips introspection */ #include /* enumerations from "../../libvips/include/vips/foreign.h" */ GType vips_foreign_flags_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GFlagsValue values[] = { {VIPS_FOREIGN_NONE, "VIPS_FOREIGN_NONE", "none"}, {VIPS_FOREIGN_PARTIAL, "VIPS_FOREIGN_PARTIAL", "partial"}, {VIPS_FOREIGN_BIGENDIAN, "VIPS_FOREIGN_BIGENDIAN", "bigendian"}, {VIPS_FOREIGN_SEQUENTIAL, "VIPS_FOREIGN_SEQUENTIAL", "sequential"}, {VIPS_FOREIGN_ALL, "VIPS_FOREIGN_ALL", "all"}, {0, NULL, NULL} }; etype = g_flags_register_static( "VipsForeignFlags", values ); } return( etype ); } GType vips_saveable_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_SAVEABLE_MONO, "VIPS_SAVEABLE_MONO", "mono"}, {VIPS_SAVEABLE_RGB, "VIPS_SAVEABLE_RGB", "rgb"}, {VIPS_SAVEABLE_RGBA, "VIPS_SAVEABLE_RGBA", "rgba"}, {VIPS_SAVEABLE_RGB_CMYK, "VIPS_SAVEABLE_RGB_CMYK", "rgb-cmyk"}, {VIPS_SAVEABLE_ANY, "VIPS_SAVEABLE_ANY", "any"}, {VIPS_SAVEABLE_LAST, "VIPS_SAVEABLE_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsSaveable", values ); } return( etype ); } GType vips_foreign_tiff_compression_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_FOREIGN_TIFF_COMPRESSION_NONE, "VIPS_FOREIGN_TIFF_COMPRESSION_NONE", "none"}, {VIPS_FOREIGN_TIFF_COMPRESSION_JPEG, "VIPS_FOREIGN_TIFF_COMPRESSION_JPEG", "jpeg"}, {VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE, "VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE", "deflate"}, {VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS, "VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS", "packbits"}, {VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4, "VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4", "ccittfax4"}, {VIPS_FOREIGN_TIFF_COMPRESSION_LZW, "VIPS_FOREIGN_TIFF_COMPRESSION_LZW", "lzw"}, {VIPS_FOREIGN_TIFF_COMPRESSION_LAST, "VIPS_FOREIGN_TIFF_COMPRESSION_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsForeignTiffCompression", values ); } return( etype ); } GType vips_foreign_tiff_predictor_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_FOREIGN_TIFF_PREDICTOR_NONE, "VIPS_FOREIGN_TIFF_PREDICTOR_NONE", "none"}, {VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL, "VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL", "horizontal"}, {VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT, "VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT", "float"}, {VIPS_FOREIGN_TIFF_PREDICTOR_LAST, "VIPS_FOREIGN_TIFF_PREDICTOR_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsForeignTiffPredictor", values ); } return( etype ); } GType vips_foreign_tiff_resunit_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_FOREIGN_TIFF_RESUNIT_CM, "VIPS_FOREIGN_TIFF_RESUNIT_CM", "cm"}, {VIPS_FOREIGN_TIFF_RESUNIT_INCH, "VIPS_FOREIGN_TIFF_RESUNIT_INCH", "inch"}, {VIPS_FOREIGN_TIFF_RESUNIT_LAST, "VIPS_FOREIGN_TIFF_RESUNIT_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsForeignTiffResunit", values ); } return( etype ); } GType vips_foreign_dz_layout_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_FOREIGN_DZ_LAYOUT_DZ, "VIPS_FOREIGN_DZ_LAYOUT_DZ", "dz"}, {VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY, "VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY", "zoomify"}, {VIPS_FOREIGN_DZ_LAYOUT_GOOGLE, "VIPS_FOREIGN_DZ_LAYOUT_GOOGLE", "google"}, {VIPS_FOREIGN_DZ_LAYOUT_LAST, "VIPS_FOREIGN_DZ_LAYOUT_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsForeignDzLayout", values ); } return( etype ); } GType vips_foreign_dz_depth_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_FOREIGN_DZ_DEPTH_1PIXEL, "VIPS_FOREIGN_DZ_DEPTH_1PIXEL", "1pixel"}, {VIPS_FOREIGN_DZ_DEPTH_1TILE, "VIPS_FOREIGN_DZ_DEPTH_1TILE", "1tile"}, {VIPS_FOREIGN_DZ_DEPTH_1, "VIPS_FOREIGN_DZ_DEPTH_1", "1"}, {VIPS_FOREIGN_DZ_DEPTH_LAST, "VIPS_FOREIGN_DZ_DEPTH_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsForeignDzDepth", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/conversion.h" */ GType vips_extend_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_EXTEND_BLACK, "VIPS_EXTEND_BLACK", "black"}, {VIPS_EXTEND_COPY, "VIPS_EXTEND_COPY", "copy"}, {VIPS_EXTEND_REPEAT, "VIPS_EXTEND_REPEAT", "repeat"}, {VIPS_EXTEND_MIRROR, "VIPS_EXTEND_MIRROR", "mirror"}, {VIPS_EXTEND_WHITE, "VIPS_EXTEND_WHITE", "white"}, {VIPS_EXTEND_BACKGROUND, "VIPS_EXTEND_BACKGROUND", "background"}, {VIPS_EXTEND_LAST, "VIPS_EXTEND_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsExtend", values ); } return( etype ); } GType vips_direction_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_DIRECTION_HORIZONTAL, "VIPS_DIRECTION_HORIZONTAL", "horizontal"}, {VIPS_DIRECTION_VERTICAL, "VIPS_DIRECTION_VERTICAL", "vertical"}, {VIPS_DIRECTION_LAST, "VIPS_DIRECTION_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsDirection", values ); } return( etype ); } GType vips_align_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_ALIGN_LOW, "VIPS_ALIGN_LOW", "low"}, {VIPS_ALIGN_CENTRE, "VIPS_ALIGN_CENTRE", "centre"}, {VIPS_ALIGN_HIGH, "VIPS_ALIGN_HIGH", "high"}, {VIPS_ALIGN_LAST, "VIPS_ALIGN_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsAlign", values ); } return( etype ); } GType vips_angle_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_ANGLE_0, "VIPS_ANGLE_0", "0"}, {VIPS_ANGLE_90, "VIPS_ANGLE_90", "90"}, {VIPS_ANGLE_180, "VIPS_ANGLE_180", "180"}, {VIPS_ANGLE_270, "VIPS_ANGLE_270", "270"}, {VIPS_ANGLE_LAST, "VIPS_ANGLE_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsAngle", values ); } return( etype ); } GType vips_angle45_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_ANGLE45_0, "VIPS_ANGLE45_0", "0"}, {VIPS_ANGLE45_45, "VIPS_ANGLE45_45", "45"}, {VIPS_ANGLE45_90, "VIPS_ANGLE45_90", "90"}, {VIPS_ANGLE45_135, "VIPS_ANGLE45_135", "135"}, {VIPS_ANGLE45_180, "VIPS_ANGLE45_180", "180"}, {VIPS_ANGLE45_225, "VIPS_ANGLE45_225", "225"}, {VIPS_ANGLE45_270, "VIPS_ANGLE45_270", "270"}, {VIPS_ANGLE45_315, "VIPS_ANGLE45_315", "315"}, {VIPS_ANGLE45_LAST, "VIPS_ANGLE45_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsAngle45", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/arithmetic.h" */ GType vips_operation_math_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_MATH_SIN, "VIPS_OPERATION_MATH_SIN", "sin"}, {VIPS_OPERATION_MATH_COS, "VIPS_OPERATION_MATH_COS", "cos"}, {VIPS_OPERATION_MATH_TAN, "VIPS_OPERATION_MATH_TAN", "tan"}, {VIPS_OPERATION_MATH_ASIN, "VIPS_OPERATION_MATH_ASIN", "asin"}, {VIPS_OPERATION_MATH_ACOS, "VIPS_OPERATION_MATH_ACOS", "acos"}, {VIPS_OPERATION_MATH_ATAN, "VIPS_OPERATION_MATH_ATAN", "atan"}, {VIPS_OPERATION_MATH_LOG, "VIPS_OPERATION_MATH_LOG", "log"}, {VIPS_OPERATION_MATH_LOG10, "VIPS_OPERATION_MATH_LOG10", "log10"}, {VIPS_OPERATION_MATH_EXP, "VIPS_OPERATION_MATH_EXP", "exp"}, {VIPS_OPERATION_MATH_EXP10, "VIPS_OPERATION_MATH_EXP10", "exp10"}, {VIPS_OPERATION_MATH_LAST, "VIPS_OPERATION_MATH_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationMath", values ); } return( etype ); } GType vips_operation_math2_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_MATH2_POW, "VIPS_OPERATION_MATH2_POW", "pow"}, {VIPS_OPERATION_MATH2_WOP, "VIPS_OPERATION_MATH2_WOP", "wop"}, {VIPS_OPERATION_MATH2_LAST, "VIPS_OPERATION_MATH2_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationMath2", values ); } return( etype ); } GType vips_operation_round_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_ROUND_RINT, "VIPS_OPERATION_ROUND_RINT", "rint"}, {VIPS_OPERATION_ROUND_CEIL, "VIPS_OPERATION_ROUND_CEIL", "ceil"}, {VIPS_OPERATION_ROUND_FLOOR, "VIPS_OPERATION_ROUND_FLOOR", "floor"}, {VIPS_OPERATION_ROUND_LAST, "VIPS_OPERATION_ROUND_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationRound", values ); } return( etype ); } GType vips_operation_relational_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_RELATIONAL_EQUAL, "VIPS_OPERATION_RELATIONAL_EQUAL", "equal"}, {VIPS_OPERATION_RELATIONAL_NOTEQUAL, "VIPS_OPERATION_RELATIONAL_NOTEQUAL", "notequal"}, {VIPS_OPERATION_RELATIONAL_LESS, "VIPS_OPERATION_RELATIONAL_LESS", "less"}, {VIPS_OPERATION_RELATIONAL_LESSEQ, "VIPS_OPERATION_RELATIONAL_LESSEQ", "lesseq"}, {VIPS_OPERATION_RELATIONAL_MORE, "VIPS_OPERATION_RELATIONAL_MORE", "more"}, {VIPS_OPERATION_RELATIONAL_MOREEQ, "VIPS_OPERATION_RELATIONAL_MOREEQ", "moreeq"}, {VIPS_OPERATION_RELATIONAL_LAST, "VIPS_OPERATION_RELATIONAL_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationRelational", values ); } return( etype ); } GType vips_operation_boolean_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_BOOLEAN_AND, "VIPS_OPERATION_BOOLEAN_AND", "and"}, {VIPS_OPERATION_BOOLEAN_OR, "VIPS_OPERATION_BOOLEAN_OR", "or"}, {VIPS_OPERATION_BOOLEAN_EOR, "VIPS_OPERATION_BOOLEAN_EOR", "eor"}, {VIPS_OPERATION_BOOLEAN_LSHIFT, "VIPS_OPERATION_BOOLEAN_LSHIFT", "lshift"}, {VIPS_OPERATION_BOOLEAN_RSHIFT, "VIPS_OPERATION_BOOLEAN_RSHIFT", "rshift"}, {VIPS_OPERATION_BOOLEAN_LAST, "VIPS_OPERATION_BOOLEAN_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationBoolean", values ); } return( etype ); } GType vips_operation_complex_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_COMPLEX_POLAR, "VIPS_OPERATION_COMPLEX_POLAR", "polar"}, {VIPS_OPERATION_COMPLEX_RECT, "VIPS_OPERATION_COMPLEX_RECT", "rect"}, {VIPS_OPERATION_COMPLEX_CONJ, "VIPS_OPERATION_COMPLEX_CONJ", "conj"}, {VIPS_OPERATION_COMPLEX_LAST, "VIPS_OPERATION_COMPLEX_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationComplex", values ); } return( etype ); } GType vips_operation_complex2_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_COMPLEX2_CROSS_PHASE, "VIPS_OPERATION_COMPLEX2_CROSS_PHASE", "cross-phase"}, {VIPS_OPERATION_COMPLEX2_LAST, "VIPS_OPERATION_COMPLEX2_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationComplex2", values ); } return( etype ); } GType vips_operation_complexget_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_COMPLEXGET_REAL, "VIPS_OPERATION_COMPLEXGET_REAL", "real"}, {VIPS_OPERATION_COMPLEXGET_IMAG, "VIPS_OPERATION_COMPLEXGET_IMAG", "imag"}, {VIPS_OPERATION_COMPLEXGET_LAST, "VIPS_OPERATION_COMPLEXGET_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationComplexget", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/util.h" */ GType vips_token_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_TOKEN_LEFT, "VIPS_TOKEN_LEFT", "left"}, {VIPS_TOKEN_RIGHT, "VIPS_TOKEN_RIGHT", "right"}, {VIPS_TOKEN_STRING, "VIPS_TOKEN_STRING", "string"}, {VIPS_TOKEN_EQUALS, "VIPS_TOKEN_EQUALS", "equals"}, {VIPS_TOKEN_COMMA, "VIPS_TOKEN_COMMA", "comma"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsToken", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/image.h" */ GType vips_demand_style_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_DEMAND_STYLE_ERROR, "VIPS_DEMAND_STYLE_ERROR", "error"}, {VIPS_DEMAND_STYLE_SMALLTILE, "VIPS_DEMAND_STYLE_SMALLTILE", "smalltile"}, {VIPS_DEMAND_STYLE_FATSTRIP, "VIPS_DEMAND_STYLE_FATSTRIP", "fatstrip"}, {VIPS_DEMAND_STYLE_THINSTRIP, "VIPS_DEMAND_STYLE_THINSTRIP", "thinstrip"}, {VIPS_DEMAND_STYLE_ANY, "VIPS_DEMAND_STYLE_ANY", "any"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsDemandStyle", values ); } return( etype ); } GType vips_image_type_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_IMAGE_ERROR, "VIPS_IMAGE_ERROR", "error"}, {VIPS_IMAGE_NONE, "VIPS_IMAGE_NONE", "none"}, {VIPS_IMAGE_SETBUF, "VIPS_IMAGE_SETBUF", "setbuf"}, {VIPS_IMAGE_SETBUF_FOREIGN, "VIPS_IMAGE_SETBUF_FOREIGN", "setbuf-foreign"}, {VIPS_IMAGE_OPENIN, "VIPS_IMAGE_OPENIN", "openin"}, {VIPS_IMAGE_MMAPIN, "VIPS_IMAGE_MMAPIN", "mmapin"}, {VIPS_IMAGE_MMAPINRW, "VIPS_IMAGE_MMAPINRW", "mmapinrw"}, {VIPS_IMAGE_OPENOUT, "VIPS_IMAGE_OPENOUT", "openout"}, {VIPS_IMAGE_PARTIAL, "VIPS_IMAGE_PARTIAL", "partial"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsImageType", values ); } return( etype ); } GType vips_interpretation_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_INTERPRETATION_ERROR, "VIPS_INTERPRETATION_ERROR", "error"}, {VIPS_INTERPRETATION_MULTIBAND, "VIPS_INTERPRETATION_MULTIBAND", "multiband"}, {VIPS_INTERPRETATION_B_W, "VIPS_INTERPRETATION_B_W", "b-w"}, {VIPS_INTERPRETATION_HISTOGRAM, "VIPS_INTERPRETATION_HISTOGRAM", "histogram"}, {VIPS_INTERPRETATION_XYZ, "VIPS_INTERPRETATION_XYZ", "xyz"}, {VIPS_INTERPRETATION_LAB, "VIPS_INTERPRETATION_LAB", "lab"}, {VIPS_INTERPRETATION_CMYK, "VIPS_INTERPRETATION_CMYK", "cmyk"}, {VIPS_INTERPRETATION_LABQ, "VIPS_INTERPRETATION_LABQ", "labq"}, {VIPS_INTERPRETATION_RGB, "VIPS_INTERPRETATION_RGB", "rgb"}, {VIPS_INTERPRETATION_CMC, "VIPS_INTERPRETATION_CMC", "cmc"}, {VIPS_INTERPRETATION_LCH, "VIPS_INTERPRETATION_LCH", "lch"}, {VIPS_INTERPRETATION_LABS, "VIPS_INTERPRETATION_LABS", "labs"}, {VIPS_INTERPRETATION_sRGB, "VIPS_INTERPRETATION_sRGB", "srgb"}, {VIPS_INTERPRETATION_YXY, "VIPS_INTERPRETATION_YXY", "yxy"}, {VIPS_INTERPRETATION_FOURIER, "VIPS_INTERPRETATION_FOURIER", "fourier"}, {VIPS_INTERPRETATION_RGB16, "VIPS_INTERPRETATION_RGB16", "rgb16"}, {VIPS_INTERPRETATION_GREY16, "VIPS_INTERPRETATION_GREY16", "grey16"}, {VIPS_INTERPRETATION_MATRIX, "VIPS_INTERPRETATION_MATRIX", "matrix"}, {VIPS_INTERPRETATION_scRGB, "VIPS_INTERPRETATION_scRGB", "scrgb"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsInterpretation", values ); } return( etype ); } GType vips_band_format_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_FORMAT_NOTSET, "VIPS_FORMAT_NOTSET", "notset"}, {VIPS_FORMAT_UCHAR, "VIPS_FORMAT_UCHAR", "uchar"}, {VIPS_FORMAT_CHAR, "VIPS_FORMAT_CHAR", "char"}, {VIPS_FORMAT_USHORT, "VIPS_FORMAT_USHORT", "ushort"}, {VIPS_FORMAT_SHORT, "VIPS_FORMAT_SHORT", "short"}, {VIPS_FORMAT_UINT, "VIPS_FORMAT_UINT", "uint"}, {VIPS_FORMAT_INT, "VIPS_FORMAT_INT", "int"}, {VIPS_FORMAT_FLOAT, "VIPS_FORMAT_FLOAT", "float"}, {VIPS_FORMAT_COMPLEX, "VIPS_FORMAT_COMPLEX", "complex"}, {VIPS_FORMAT_DOUBLE, "VIPS_FORMAT_DOUBLE", "double"}, {VIPS_FORMAT_DPCOMPLEX, "VIPS_FORMAT_DPCOMPLEX", "dpcomplex"}, {VIPS_FORMAT_LAST, "VIPS_FORMAT_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsBandFormat", values ); } return( etype ); } GType vips_coding_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_CODING_ERROR, "VIPS_CODING_ERROR", "error"}, {VIPS_CODING_NONE, "VIPS_CODING_NONE", "none"}, {VIPS_CODING_LABQ, "VIPS_CODING_LABQ", "labq"}, {VIPS_CODING_RAD, "VIPS_CODING_RAD", "rad"}, {VIPS_CODING_LAST, "VIPS_CODING_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsCoding", values ); } return( etype ); } GType vips_access_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_ACCESS_RANDOM, "VIPS_ACCESS_RANDOM", "random"}, {VIPS_ACCESS_SEQUENTIAL, "VIPS_ACCESS_SEQUENTIAL", "sequential"}, {VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, "VIPS_ACCESS_SEQUENTIAL_UNBUFFERED", "sequential-unbuffered"}, {VIPS_ACCESS_LAST, "VIPS_ACCESS_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsAccess", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/colour.h" */ GType vips_intent_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_INTENT_PERCEPTUAL, "VIPS_INTENT_PERCEPTUAL", "perceptual"}, {VIPS_INTENT_RELATIVE, "VIPS_INTENT_RELATIVE", "relative"}, {VIPS_INTENT_SATURATION, "VIPS_INTENT_SATURATION", "saturation"}, {VIPS_INTENT_ABSOLUTE, "VIPS_INTENT_ABSOLUTE", "absolute"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsIntent", values ); } return( etype ); } GType vips_pcs_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_PCS_LAB, "VIPS_PCS_LAB", "lab"}, {VIPS_PCS_XYZ, "VIPS_PCS_XYZ", "xyz"}, {VIPS_PCS_LAST, "VIPS_PCS_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsPCS", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/operation.h" */ GType vips_operation_flags_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GFlagsValue values[] = { {VIPS_OPERATION_NONE, "VIPS_OPERATION_NONE", "none"}, {VIPS_OPERATION_SEQUENTIAL, "VIPS_OPERATION_SEQUENTIAL", "sequential"}, {VIPS_OPERATION_SEQUENTIAL_UNBUFFERED, "VIPS_OPERATION_SEQUENTIAL_UNBUFFERED", "sequential-unbuffered"}, {VIPS_OPERATION_NOCACHE, "VIPS_OPERATION_NOCACHE", "nocache"}, {0, NULL, NULL} }; etype = g_flags_register_static( "VipsOperationFlags", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/convolution.h" */ GType vips_precision_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_PRECISION_INTEGER, "VIPS_PRECISION_INTEGER", "integer"}, {VIPS_PRECISION_FLOAT, "VIPS_PRECISION_FLOAT", "float"}, {VIPS_PRECISION_APPROXIMATE, "VIPS_PRECISION_APPROXIMATE", "approximate"}, {VIPS_PRECISION_LAST, "VIPS_PRECISION_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsPrecision", values ); } return( etype ); } GType vips_combine_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_COMBINE_MAX, "VIPS_COMBINE_MAX", "max"}, {VIPS_COMBINE_SUM, "VIPS_COMBINE_SUM", "sum"}, {VIPS_COMBINE_LAST, "VIPS_COMBINE_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsCombine", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/morphology.h" */ GType vips_operation_morphology_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GEnumValue values[] = { {VIPS_OPERATION_MORPHOLOGY_ERODE, "VIPS_OPERATION_MORPHOLOGY_ERODE", "erode"}, {VIPS_OPERATION_MORPHOLOGY_DILATE, "VIPS_OPERATION_MORPHOLOGY_DILATE", "dilate"}, {VIPS_OPERATION_MORPHOLOGY_LAST, "VIPS_OPERATION_MORPHOLOGY_LAST", "last"}, {0, NULL, NULL} }; etype = g_enum_register_static( "VipsOperationMorphology", values ); } return( etype ); } /* enumerations from "../../libvips/include/vips/object.h" */ GType vips_argument_flags_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const GFlagsValue values[] = { {VIPS_ARGUMENT_NONE, "VIPS_ARGUMENT_NONE", "none"}, {VIPS_ARGUMENT_REQUIRED, "VIPS_ARGUMENT_REQUIRED", "required"}, {VIPS_ARGUMENT_CONSTRUCT, "VIPS_ARGUMENT_CONSTRUCT", "construct"}, {VIPS_ARGUMENT_SET_ONCE, "VIPS_ARGUMENT_SET_ONCE", "set-once"}, {VIPS_ARGUMENT_SET_ALWAYS, "VIPS_ARGUMENT_SET_ALWAYS", "set-always"}, {VIPS_ARGUMENT_INPUT, "VIPS_ARGUMENT_INPUT", "input"}, {VIPS_ARGUMENT_OUTPUT, "VIPS_ARGUMENT_OUTPUT", "output"}, {VIPS_ARGUMENT_DEPRECATED, "VIPS_ARGUMENT_DEPRECATED", "deprecated"}, {0, NULL, NULL} }; etype = g_flags_register_static( "VipsArgumentFlags", values ); } return( etype ); } /* Generated data ends here */ vips-7.38.5/libvips/iofuncs/cache.c0000644000175000017500000005275012303140253014047 00000000000000/* cache vips operations * * 20/6/12 * - try to make it compile on centos5 * 7/7/12 * - add a lock so we can run operations from many threads */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* TODO listen for invalidate will we need to drop all on exit? unclear what about delayed writes ... do we ever write in close? we shouldn't, should do in evalend or written or somesuch use g_param_values_cmp() instead of value_equal()? */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include /* Set by GOption from the command line, eg. "12m". */ char *vips__cache_max = NULL; char *vips__cache_max_mem = NULL; char *vips__cache_max_files = NULL; gboolean vips__cache_dump = FALSE; gboolean vips__cache_trace = FALSE; /* Max number of cached operations. We are likely to trim due to memuse or * file use before we hit this limit. */ static int vips_cache_max = 10000; /* How many tracked open files we allow before we start dropping cache. */ static int vips_cache_max_files = 100; /* How much RAM we spend on caches before we start dropping cached operations * ... default 100mb. * * It was 1gb, but that's a lot of memory for things like vipsthumbnail where * there will be (almost) no reuse. Default low and let apps raise it if it'd * be useful. */ static size_t vips_cache_max_mem = 100 * 1024 * 1024; /* Hold a ref to all "recent" operations. */ static GHashTable *vips_cache_table = NULL; /* A 'time' counter: increment on all cache ops. Use this to detect LRU. */ static int vips_cache_time = 0; /* Protect cache access with this. */ static GMutex *vips_cache_lock = NULL; /* Old versions of glib are missing these. When we abandon centos 5, switch to * g_int64_hash() and g_double_hash(). */ #define INT64_HASH(X) (g_direct_hash(X)) #define DOUBLE_HASH(X) (g_direct_hash(X)) /* Old glibs use g_value_get_char(), new ones g_value_get_schar(). */ #ifdef HAVE_VALUE_GET_SCHAR #define VIPS_VALUE_GET_CHAR g_value_get_schar #else #define VIPS_VALUE_GET_CHAR g_value_get_char #endif /* Pass in the pspec so we can get the generic type. For example, a * held in a GParamSpec allowing OBJECT, but the value could be of type * VipsImage. generics are much faster to compare. */ static unsigned int vips_value_hash( GParamSpec *pspec, GValue *value ) { GType generic = G_PARAM_SPEC_TYPE( pspec ); /* Not compile-time constants, so we have to use a set of if()s. Could * make a table at run time I guess. */ if( generic == G_TYPE_PARAM_BOOLEAN ) return( (unsigned int) g_value_get_boolean( value ) ); else if( generic == G_TYPE_PARAM_CHAR ) return( (unsigned int) VIPS_VALUE_GET_CHAR( value ) ); else if( generic == G_TYPE_PARAM_UCHAR ) return( (unsigned int) g_value_get_uchar( value ) ); else if( generic == G_TYPE_PARAM_INT ) return( (unsigned int) g_value_get_int( value ) ); else if( generic == G_TYPE_PARAM_UINT ) return( (unsigned int) g_value_get_uint( value ) ); else if( generic == G_TYPE_PARAM_LONG ) return( (unsigned int) g_value_get_long( value ) ); else if( generic == G_TYPE_PARAM_ULONG ) return( (unsigned int) g_value_get_ulong( value ) ); else if( generic == G_TYPE_PARAM_ENUM ) return( (unsigned int) g_value_get_enum( value ) ); else if( generic == G_TYPE_PARAM_FLAGS ) return( (unsigned int) g_value_get_flags( value ) ); else if( generic == G_TYPE_PARAM_UINT64 ) { guint64 i = g_value_get_uint64( value ); return( INT64_HASH( (gint64 *) &i ) ); } else if( generic == G_TYPE_PARAM_INT64 ) { gint64 i = g_value_get_int64( value ); return( INT64_HASH( &i ) ); } else if( generic == G_TYPE_PARAM_FLOAT ) { float f = g_value_get_float( value ); return( g_direct_hash( (void *) &f ) ); } else if( generic == G_TYPE_PARAM_DOUBLE ) { double d = g_value_get_double( value ); return( DOUBLE_HASH( &d ) ); } else if( generic == G_TYPE_PARAM_STRING ) { const char *s = g_value_get_string( value ); return( s ? g_str_hash( s ) : 0 ); } else if( generic == G_TYPE_PARAM_BOXED ) { void *p = g_value_get_boxed( value ); return( p ? g_direct_hash( p ) : 0 ); } else if( generic == G_TYPE_PARAM_POINTER ) { void *p = g_value_get_pointer( value ); return( p ? g_direct_hash( p ) : 0 ); } else if( generic == G_TYPE_PARAM_OBJECT ) { void *p = g_value_get_object( value ); return( p ? g_direct_hash( p ) : 0 ); } else { /* Fallback: convert to a string and hash that. * This is very slow, print a warning if we use it * so we can add another case. */ char *s; unsigned int hash; s = g_strdup_value_contents( value ); hash = g_str_hash( s ); printf( "vips_value_hash: no case for %s\n", s ); printf( "\ttype %d, %s\n", (int) G_VALUE_TYPE( value ), g_type_name( G_VALUE_TYPE( value ) ) ); printf( "\tgeneric %d, %s\n", (int) G_VALUE_TYPE( generic ), g_type_name( generic ) ); g_free( s ); return( hash ); } } /* Pass in the pspec so we can get the generic type. For example, a * value could be held in a GParamSpec allowing OBJECT, but the value * could be of type VipsImage. generics are much faster to compare. */ static gboolean vips_value_equal( GParamSpec *pspec, GValue *v1, GValue *v2 ) { GType generic = G_PARAM_SPEC_TYPE( pspec ); GType t1 = G_VALUE_TYPE( v1 ); GType t2 = G_VALUE_TYPE( v2 ); if( t1 != t2 ) return( FALSE ); /* Not compile-time constants, so we have to use a set of if()s. Could * make a table at run time I guess. */ if( generic == G_TYPE_PARAM_BOOLEAN ) return( g_value_get_boolean( v1 ) == g_value_get_boolean( v2 ) ); else if( generic == G_TYPE_PARAM_CHAR ) return( VIPS_VALUE_GET_CHAR( v1 ) == VIPS_VALUE_GET_CHAR( v2 ) ); if( generic == G_TYPE_PARAM_UCHAR ) return( g_value_get_uchar( v1 ) == g_value_get_uchar( v2 ) ); if( generic == G_TYPE_PARAM_INT ) return( g_value_get_int( v1 ) == g_value_get_int( v2 ) ); if( generic == G_TYPE_PARAM_UINT ) return( g_value_get_uint( v1 ) == g_value_get_uint( v2 ) ); if( generic == G_TYPE_PARAM_LONG ) return( g_value_get_long( v1 ) == g_value_get_long( v2 ) ); if( generic == G_TYPE_PARAM_ULONG ) return( g_value_get_ulong( v1 ) == g_value_get_ulong( v2 ) ); if( generic == G_TYPE_PARAM_ENUM ) return( g_value_get_enum( v1 ) == g_value_get_enum( v2 ) ); if( generic == G_TYPE_PARAM_FLAGS ) return( g_value_get_flags( v1 ) == g_value_get_flags( v2 ) ); if( generic == G_TYPE_PARAM_UINT64 ) return( g_value_get_uint64( v1 ) == g_value_get_uint64( v2 ) ); if( generic == G_TYPE_PARAM_INT64 ) return( g_value_get_int64( v1 ) == g_value_get_int64( v2 ) ); if( generic == G_TYPE_PARAM_FLOAT ) return( g_value_get_float( v1 ) == g_value_get_float( v2 ) ); if( generic == G_TYPE_PARAM_DOUBLE ) return( g_value_get_double( v1 ) == g_value_get_double( v2 ) ); if( generic == G_TYPE_PARAM_STRING ) { const char *s1 = g_value_get_string( v1 ); const char *s2 = g_value_get_string( v2 ); if( s1 == s2 ) return( TRUE ); else return( s1 && s2 && strcmp( s1, s2 ) == 0 ); } if( generic == G_TYPE_PARAM_BOXED ) return( g_value_get_boxed( v1 ) == g_value_get_boxed( v2 ) ); if( generic == G_TYPE_PARAM_POINTER ) return( g_value_get_pointer( v1 ) == g_value_get_pointer( v2 ) ); if( generic == G_TYPE_PARAM_OBJECT ) return( g_value_get_object( v1 ) == g_value_get_object( v2 ) ); else { /* Fallback: convert to a string and compare that. * This is very slow, print a warning if we use it * so we can add another case. */ char *s1; char *s2; gboolean equal; s1 = g_strdup_value_contents( v1 ); s2 = g_strdup_value_contents( v2 ); equal = strcmp( s1, s2 ) == 0; printf( "vips_value_equal: no case for %s, %s\n", s1, s2 ); printf( "\tt1 %d, %s\n", (int) t1, g_type_name( t1 ) ); printf( "\tt2 %d, %s\n", (int) t2, g_type_name( t2 ) ); printf( "\tgeneric %d, %s\n", (int) G_VALUE_TYPE( generic ), g_type_name( generic ) ); g_free( s1 ); g_free( s2 ); return( equal ); } } static void * vips_object_hash_arg( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { unsigned int *hash = (unsigned int *) a; if( (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && (argument_class->flags & VIPS_ARGUMENT_INPUT) && argument_instance->assigned ) { const char *name = g_param_spec_get_name( pspec ); GType type = G_PARAM_SPEC_VALUE_TYPE( pspec ); GValue value = { 0, }; g_value_init( &value, type ); g_object_get_property( G_OBJECT( object ), name, &value ); *hash = (*hash << 1) ^ vips_value_hash( pspec, &value ); g_value_unset( &value ); } return( NULL ); } /* Find a hash from the input arguments to a VipsOperstion. */ static unsigned int vips_operation_hash( VipsOperation *operation ) { if( !operation->found_hash ) { guint hash; /* Include the operation type in the hash. */ hash = (guint) G_OBJECT_TYPE( operation ); (void) vips_argument_map( VIPS_OBJECT( operation ), vips_object_hash_arg, &hash, NULL ); /* Make sure we can't have a zero hash value. */ hash |= 1; operation->hash = hash; operation->found_hash = TRUE; } return( operation->hash ); } static void * vips_object_equal_arg( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsObject *other = (VipsObject *) a; if( (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && (argument_class->flags & VIPS_ARGUMENT_INPUT) && argument_instance->assigned ) { const char *name = g_param_spec_get_name( pspec ); GType type = G_PARAM_SPEC_VALUE_TYPE( pspec ); GValue v1 = { 0, }; GValue v2 = { 0, }; gboolean equal; g_value_init( &v1, type ); g_value_init( &v2, type ); g_object_get_property( G_OBJECT( object ), name, &v1 ); g_object_get_property( G_OBJECT( other ), name, &v2 ); equal = vips_value_equal( pspec, &v1, &v2 ); g_value_unset( &v1 ); g_value_unset( &v2 ); if( !equal ) return( object ); } return( NULL ); } /* Are two objects equal, ie. have the same inputs. */ static gboolean vips_operation_equal( VipsOperation *a, VipsOperation *b ) { if( a == b ) return( TRUE ); if( G_OBJECT_TYPE( a ) == G_OBJECT_TYPE( b ) && vips_operation_hash( a ) == vips_operation_hash( b ) && !vips_argument_map( VIPS_OBJECT( a ), vips_object_equal_arg, b, NULL ) ) return( TRUE ); return( FALSE ); } void vips__cache_init( void ) { if( !vips_cache_table ) { vips_cache_lock = vips_g_mutex_new(); vips_cache_table = g_hash_table_new( (GHashFunc) vips_operation_hash, (GEqualFunc) vips_operation_equal ); if( vips__cache_max ) vips_cache_max = vips__parse_size( vips__cache_max ); if( vips__cache_max_mem ) vips_cache_max_mem = vips__parse_size( vips__cache_max_mem ); if( vips__cache_max_files ) vips_cache_max_files = vips__parse_size( vips__cache_max_files ); } } static void * vips_cache_print_fn( void *value, void *a, void *b ) { char str[32768]; VipsBuf buf = VIPS_BUF_STATIC( str ); vips_object_to_string( VIPS_OBJECT( value ), &buf ); printf( "%p - %s\n", value, vips_buf_all( &buf ) ); return( NULL ); } /** * vips_cache_print: * * Print the whole operation cache to stdout. Handy for debugging. */ void vips_cache_print( void ) { g_mutex_lock( vips_cache_lock ); if( vips_cache_table ) { printf( "Operation cache:\n" ); vips_hash_table_map( vips_cache_table, vips_cache_print_fn, NULL, NULL ); } g_mutex_unlock( vips_cache_lock ); } static void * vips_object_unref_arg( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { if( (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && (argument_class->flags & VIPS_ARGUMENT_OUTPUT) && argument_instance->assigned && G_IS_PARAM_SPEC_OBJECT( pspec ) ) { GObject *value; /* This will up the ref count for us. */ g_object_get( G_OBJECT( object ), g_param_spec_get_name( pspec ), &value, NULL ); /* Drop the ref we just got, then drop the ref we make when we * added to the cache. */ g_object_unref( value ); g_object_unref( value ); } return( NULL ); } static void vips_cache_unref( VipsOperation *operation ) { (void) vips_argument_map( VIPS_OBJECT( operation ), vips_object_unref_arg, NULL, NULL ); g_object_unref( operation ); } /* Drop an operation from the cache. */ static void vips_cache_drop( VipsOperation *operation ) { /* It must be in cache. */ g_assert( g_hash_table_lookup( vips_cache_table, operation ) ); g_hash_table_remove( vips_cache_table, operation ); vips_cache_unref( operation ); } static void * vips_cache_get_first_fn( void *value, void *a, void *b ) { return( value ); } /* Return the first item. */ static VipsOperation * vips_cache_get_first( void ) { if( vips_cache_table ) return( VIPS_OPERATION( vips_hash_table_map( vips_cache_table, vips_cache_get_first_fn, NULL, NULL ) ) ); else return( NULL ); } /** * vips_cache_drop_all: * * Drop the whole operation cache, handy for leak tracking. */ void vips_cache_drop_all( void ) { g_mutex_lock( vips_cache_lock ); if( vips_cache_table ) { VipsOperation *operation; if( vips__cache_dump ) vips_cache_print(); /* We can't modify the hash in the callback from * g_hash_table_foreach() and friends. Repeatedly drop the * first item instead. */ while( (operation = vips_cache_get_first()) ) vips_cache_drop( operation ); VIPS_FREEF( g_hash_table_unref, vips_cache_table ); } g_mutex_unlock( vips_cache_lock ); } static void vips_cache_get_lru_cb( VipsOperation *key, VipsOperation *value, VipsOperation **best ) { if( !*best || (*best)->time > value->time ) *best = value; } /* Get the least-recently-used cache item. * * TODO ... will this be too expensive? probably not */ static VipsOperation * vips_cache_get_lru( void ) { VipsOperation *operation; operation = NULL; g_hash_table_foreach( vips_cache_table, (GHFunc) vips_cache_get_lru_cb, &operation ); return( operation ); } /* Is the cache full? Drop until it's not. */ static void vips_cache_trim( void ) { VipsOperation *operation; g_mutex_lock( vips_cache_lock ); while( vips_cache_table && (g_hash_table_size( vips_cache_table ) > vips_cache_max || vips_tracked_get_files() > vips_cache_max_files || vips_tracked_get_mem() > vips_cache_max_mem) && (operation = vips_cache_get_lru()) ) { #ifdef DEBUG printf( "vips_cache_trim: trimming %p\n", operation ); #endif /*DEBUG*/ vips_cache_drop( operation ); } g_mutex_unlock( vips_cache_lock ); } static void * vips_object_ref_arg( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { if( (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && (argument_class->flags & VIPS_ARGUMENT_OUTPUT) && argument_instance->assigned && G_IS_PARAM_SPEC_OBJECT( pspec ) ) { GObject *value; /* This will up the ref count for us. */ g_object_get( G_OBJECT( object ), g_param_spec_get_name( pspec ), &value, NULL ); } return( NULL ); } static void vips_operation_touch( VipsOperation *operation ) { vips_cache_time += 1; operation->time = vips_cache_time; } /* Ref an operation for the cache. The operation itself, plus all the output * objects it makes. */ static void vips_cache_ref( VipsOperation *operation ) { g_object_ref( operation ); (void) vips_argument_map( VIPS_OBJECT( operation ), vips_object_ref_arg, NULL, NULL ); vips_operation_touch( operation ); } /** * vips_cache_operation_buildp: (skip) * @operation: pointer to operation to lookup * * Look up @operation in the cache. If we get a hit, unref @operation, ref the * old one and return that through the argument pointer. * * If we miss, build and add @operation. * * Returns: 0 on success, or -1 on error. */ int vips_cache_operation_buildp( VipsOperation **operation ) { VipsOperation *hit; g_assert( VIPS_IS_OPERATION( *operation ) ); #ifdef VIPS_DEBUG printf( "vips_cache_operation_build: " ); vips_object_print_dump( VIPS_OBJECT( *operation ) ); #endif /*VIPS_DEBUG*/ vips_cache_trim(); g_mutex_lock( vips_cache_lock ); if( (hit = g_hash_table_lookup( vips_cache_table, *operation )) ) { if( vips__cache_trace ) { printf( "vips cache-: " ); vips_object_print_summary( VIPS_OBJECT( hit ) ); } /* Ref before unref in case *operation == hit. */ vips_cache_ref( hit ); g_object_unref( *operation ); *operation = hit; } g_mutex_unlock( vips_cache_lock ); if( !hit ) { if( vips_object_build( VIPS_OBJECT( *operation ) ) ) return( -1 ); /* Has to be after _build() so we can see output args. */ if( vips__cache_trace ) { if( vips_operation_get_flags( *operation ) & VIPS_OPERATION_NOCACHE ) printf( "vips cache : " ); else printf( "vips cache+: " ); vips_object_print_summary( VIPS_OBJECT( *operation ) ); } g_mutex_lock( vips_cache_lock ); if( !(vips_operation_get_flags( *operation ) & VIPS_OPERATION_NOCACHE) ) { vips_cache_ref( *operation ); g_hash_table_insert( vips_cache_table, *operation, *operation ); } g_mutex_unlock( vips_cache_lock ); } return( 0 ); } /** * vips_cache_operation_build: * @operation: operation to lookup * * A binding-friendly version of vips_cache_operation_buildp(). * * After calling this, @operation has the same ref count as when it went in, * and the result must be freed with vips_object_unref_outputs() and * g_object_unref(). * * Returns: (transfer full): The built operation. */ VipsOperation * vips_cache_operation_build( VipsOperation *operation ) { VipsOperation *orig_operation = operation; /* Stop it being unreffed for us on hit. */ g_object_ref( orig_operation ); if( vips_cache_operation_buildp( &operation ) ) { g_object_unref( orig_operation ); return( NULL ); } return( operation ); } /** * vips_cache_set_max: * @max: maximum number of operation to cache * * Set the maximum number of operations we keep in cache. */ void vips_cache_set_max( int max ) { vips_cache_max = max; vips_cache_trim(); } /** * vips_cache_set_max_mem: * @max_mem: maximum amount of tracked memory we use * * Set the maximum amount of tracked memory we allow before we start dropping * cached operations. See vips_tracked_get_mem(). * * See also: vips_tracked_get_mem(). */ void vips_cache_set_max_mem( size_t max_mem ) { vips_cache_max_mem = max_mem; vips_cache_trim(); } /** * vips_cache_get_max: * * Get the maximum number of operations we keep in cache. * * Returns: the maximum number of operations we keep in cache */ int vips_cache_get_max( void ) { return( vips_cache_max ); } /** * vips_cache_get_size: * * Get the current number of operations in cache. * * Returns: get the current number of operations in cache. */ int vips_cache_get_size( void ) { guint size; g_mutex_lock( vips_cache_lock ); size = 0; if( vips_cache_table ) size = g_hash_table_size( vips_cache_table ); g_mutex_unlock( vips_cache_lock ); return( size ); } /** * vips_cache_get_max_mem: * * Get the maximum amount of tracked memory we allow before we start dropping * cached operations. See vips_tracked_get_mem(). * * See also: vips_tracked_get_mem(). * * Returns: the maximum amount of tracked memory we allow */ size_t vips_cache_get_max_mem( void ) { return( vips_cache_max_mem ); } /** * vips_cache_get_max_files: * * Get the maximum number of tracked files we allow before we start dropping * cached operations. See vips_tracked_get_files(). * * See also: vips_tracked_get_files(). * * Returns: the maximum number of tracked files we allow */ int vips_cache_get_max_files( void ) { return( vips_cache_max_files ); } /** * vips_cache_set_max_files: * @max_files: max open files we allow * * Set the maximum number of tracked files we allow before we start dropping * cached operations. See vips_tracked_get_files(). * * See also: vips_tracked_get_files(). */ void vips_cache_set_max_files( int max_files ) { vips_cache_max_files = max_files; vips_cache_trim(); } /** * vips_cache_set_dump: * @dump: if %TRUE, dump the operation cache on exit * * Handy for debugging. Print the operation cache to stdout just before exit. * * See also: vips_cache_set_trace(). */ void vips_cache_set_dump( gboolean dump ) { vips__cache_dump = dump; } /** * vips_cache_set_trace: * @trace: if %TRUE, trace the operation cache * * Handy for debugging. Print operation cache actions to stdout as we run. * * See also: vips_cache_set_dump(). */ void vips_cache_set_trace( gboolean trace ) { vips__cache_trace = trace; } vips-7.38.5/libvips/iofuncs/buffer.c0000644000175000017500000003220412303141142014243 00000000000000/* Manage sets of pixel buffers on an image. * * 30/10/06 * - from window.c * 2/2/07 * - speed up the search, use our own lock (thanks Christian) * 5/2/07 * - split to many buffer lists per image * 11/2/07 * - split to a buffer hash per thread * - reuse buffer mallocs when we can * 20/2/07 * - add VipsBufferCacheList and we can avoid some hash ops on * done/undone * 5/3/10 * - move invalid stuff to region * - move link maintenance to im_demand_hint * 21/9/11 * - switch to vips_tracked_malloc() * 18/12/13 * - keep a few buffers in reserve per image, stops malloc/free * cycling when sharing is repeatedly discovered */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_CREATE #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #ifdef DEBUG /* Track all regions here for debugging. */ static GSList *vips__buffers_all = NULL; #endif /*DEBUG*/ #ifdef DEBUG_CREATE static int buffer_cache_n = 0; #endif /*DEBUG_CREATE*/ /* The maximum numbers of buffers we hold in reserve per image. */ static const int buffer_cache_max_reserve = 2; static GPrivate *buffer_thread_key = NULL; #ifdef DEBUG static void * vips_buffer_dump( VipsBuffer *buffer, size_t *reserve, size_t *alive ) { if( buffer->im && buffer->buf ) { printf( "buffer %p, %gMB\n", buffer, buffer->bsize / (1024 * 1024.0) ); *alive += buffer->bsize; } else if( !buffer->im ) *reserve += buffer->bsize; else printf( "buffer craziness!\n" ); return( NULL ); } void vips_buffer_dump_all( void ) { size_t reserve; size_t alive; reserve = 0; alive = 0; vips_slist_map2( vips__buffers_all, (VipsSListMap2Fn) vips_buffer_dump, &reserve, &alive ); printf( "%gMB alive\n", alive / (1024 * 1024.0) ); printf( "%gMB in reserve\n", reserve / (1024 * 1024.0) ); } #endif /*DEBUG*/ static void vips_buffer_free( VipsBuffer *buffer ) { vips_tracked_free( buffer->buf ); buffer->bsize = 0; g_free( buffer ); #ifdef DEBUG g_mutex_lock( vips__global_lock ); g_assert( g_slist_find( vips__buffers_all, buffer ) ); vips__buffers_all = g_slist_remove( vips__buffers_all, buffer ); g_mutex_unlock( vips__global_lock ); #endif /*DEBUG*/ } static void buffer_thread_free( VipsBufferThread *buffer_thread ) { VIPS_FREEF( g_hash_table_destroy, buffer_thread->hash ); VIPS_FREE( buffer_thread ); } static void buffer_cache_free( VipsBufferCache *cache ) { GSList *p; #ifdef DEBUG_CREATE buffer_cache_n -= 1; printf( "buffer_cache_free: freeing cache %p on thread %p\n", cache, g_thread_self() ); printf( "\t(%d caches left)\n", buffer_cache_n ); #endif /*DEBUG_CREATE*/ /* Need to mark undone so we don't try and take them off this hash on * unref. */ for( p = cache->buffers; p; p = p->next ) { VipsBuffer *buffer = (VipsBuffer *) p->data; buffer->done = FALSE; } VIPS_FREEF( g_slist_free, cache->buffers ); for( p = cache->reserve; p; p = p->next ) { VipsBuffer *buffer = (VipsBuffer *) p->data; vips_buffer_free( buffer ); } VIPS_FREEF( g_slist_free, cache->reserve ); g_free( cache ); } static VipsBufferCache * buffer_cache_new( VipsBufferThread *buffer_thread, VipsImage *im ) { VipsBufferCache *cache; cache = g_new( VipsBufferCache, 1 ); cache->buffers = NULL; cache->thread = g_thread_self(); cache->im = im; cache->buffer_thread = buffer_thread; cache->reserve = NULL; cache->n_reserve = 0; #ifdef DEBUG_CREATE buffer_cache_n += 1; printf( "buffer_cache_new: new cache %p for thread %p\n", cache, g_thread_self() ); printf( "\t(%d caches now)\n", buffer_cache_n ); #endif /*DEBUG_CREATE*/ return( cache ); } static VipsBufferThread * buffer_thread_new( void ) { VipsBufferThread *buffer_thread; buffer_thread = g_new( VipsBufferThread, 1 ); buffer_thread->hash = g_hash_table_new_full( g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) buffer_cache_free ); buffer_thread->thread = g_thread_self(); return( buffer_thread ); } static VipsBufferThread * buffer_thread_get( void ) { VipsBufferThread *buffer_thread; if( !(buffer_thread = g_private_get( buffer_thread_key )) ) { buffer_thread = buffer_thread_new(); g_private_set( buffer_thread_key, buffer_thread ); } g_assert( buffer_thread->thread == g_thread_self() ); return( buffer_thread ); } static VipsBufferCache * buffer_cache_get( VipsImage *im ) { VipsBufferThread *buffer_thread = buffer_thread_get(); VipsBufferCache *cache; if( !(cache = (VipsBufferCache *) g_hash_table_lookup( buffer_thread->hash, im )) ) { cache = buffer_cache_new( buffer_thread, im ); g_hash_table_insert( buffer_thread->hash, im, cache ); } g_assert( cache->thread == g_thread_self() ); return( cache ); } /* Pixels have been calculated: publish for other parts of this thread to see. */ void vips_buffer_done( VipsBuffer *buffer ) { if( !buffer->done ) { VipsImage *im = buffer->im; VipsBufferCache *cache = buffer_cache_get( im ); #ifdef DEBUG_VERBOSE printf( "vips_buffer_done: thread %p adding to cache %p\n", g_thread_self(), cache ); vips_buffer_print( buffer ); #endif /*DEBUG_VERBOSE*/ g_assert( !g_slist_find( cache->buffers, buffer ) ); g_assert( !buffer->cache ); buffer->done = TRUE; buffer->cache = cache; cache->buffers = g_slist_prepend( cache->buffers, buffer ); } } /* Take off the public 'done' list. Make sure it has no calculated pixels in. */ void vips_buffer_undone( VipsBuffer *buffer ) { if( buffer->done ) { VipsBufferCache *cache = buffer->cache; #ifdef DEBUG_VERBOSE printf( "vips_buffer_undone: thread %p removing " "buffer %p from cache %p\n", g_thread_self(), buffer, cache ); #endif /*DEBUG_VERBOSE*/ g_assert( cache->thread == g_thread_self() ); g_assert( cache->buffer_thread->thread == cache->thread ); g_assert( g_slist_find( cache->buffers, buffer ) ); g_assert( cache->buffer_thread == buffer_thread_get() ); cache->buffers = g_slist_remove( cache->buffers, buffer ); buffer->done = FALSE; #ifdef DEBUG_VERBOSE printf( "vips_buffer_undone: %d buffers left\n", g_slist_length( cache_list->buffers ) ); #endif /*DEBUG_VERBOSE*/ } buffer->cache = NULL; buffer->area.width = 0; buffer->area.height = 0; } void vips_buffer_unref( VipsBuffer *buffer ) { #ifdef DEBUG_VERBOSE printf( "** vips_buffer_unref: left = %d, top = %d, " "width = %d, height = %d (%p)\n", buffer->area.left, buffer->area.top, buffer->area.width, buffer->area.height, buffer ); #endif /*DEBUG_VERBOSE*/ g_assert( buffer->ref_count > 0 ); buffer->ref_count -= 1; if( buffer->ref_count == 0 ) { VipsImage *im = buffer->im; VipsBufferCache *cache = buffer_cache_get( im ); #ifdef DEBUG_VERBOSE if( !buffer->done ) printf( "vips_buffer_unref: buffer was not done\n" ); #endif /*DEBUG_VERBOSE*/ vips_buffer_undone( buffer ); /* Place on this thread's reserve list for reuse. */ if( cache->n_reserve < buffer_cache_max_reserve ) { g_assert( !buffer->cache ); cache->reserve = g_slist_prepend( cache->reserve, buffer ); cache->n_reserve += 1; buffer->area.width = 0; buffer->area.height = 0; } else vips_buffer_free( buffer ); } } static int buffer_move( VipsBuffer *buffer, VipsRect *area ) { VipsImage *im = buffer->im; size_t new_bsize; g_assert( buffer->ref_count == 1 ); vips_buffer_undone( buffer ); g_assert( !buffer->done ); buffer->area = *area; new_bsize = (size_t) VIPS_IMAGE_SIZEOF_PEL( im ) * area->width * area->height; if( buffer->bsize < new_bsize || !buffer->buf ) { buffer->bsize = new_bsize; VIPS_FREEF( vips_tracked_free, buffer->buf ); if( !(buffer->buf = vips_tracked_malloc( buffer->bsize )) ) return( -1 ); } return( 0 ); } /* Make a new buffer. */ VipsBuffer * vips_buffer_new( VipsImage *im, VipsRect *area ) { VipsBufferCache *cache = buffer_cache_get( im ); VipsBuffer *buffer; if( cache->reserve ) { buffer = (VipsBuffer *) cache->reserve->data; cache->reserve = g_slist_remove( cache->reserve, buffer ); cache->n_reserve -= 1; g_assert( buffer->im == im ); g_assert( buffer->done == FALSE ); g_assert( !buffer->cache ); buffer->ref_count = 1; } else { buffer = g_new0( VipsBuffer, 1 ); buffer->ref_count = 1; buffer->im = im; buffer->done = FALSE; buffer->cache = NULL; buffer->buf = NULL; buffer->bsize = 0; #ifdef DEBUG g_mutex_lock( vips__global_lock ); vips__buffers_all = g_slist_prepend( vips__buffers_all, buffer ); g_mutex_unlock( vips__global_lock ); #endif /*DEBUG*/ } if( buffer_move( buffer, area ) ) { vips_buffer_free( buffer ); return( NULL ); } return( buffer ); } /* Find an existing buffer that encloses area and return a ref. */ static VipsBuffer * buffer_find( VipsImage *im, VipsRect *r ) { VipsBufferCache *cache = buffer_cache_get( im ); VipsBuffer *buffer; GSList *p; VipsRect *area; /* This needs to be quick :-( don't use * vips_slist_map2()/vips_rect_includesrect(), do the search inline. * * FIXME we return the first enclosing buffer, perhaps we should * search for the largest? */ for( p = cache->buffers; p; p = p->next ) { buffer = (VipsBuffer *) p->data; area = &buffer->area; if( area->left <= r->left && area->top <= r->top && area->left + area->width >= r->left + r->width && area->top + area->height >= r->top + r->height ) { buffer->ref_count += 1; #ifdef DEBUG_VERBOSE printf( "vips_buffer_find: left = %d, top = %d, " "width = %d, height = %d, count = %d (%p)\n", buffer->area.left, buffer->area.top, buffer->area.width, buffer->area.height, buffer->ref_count, buffer ); #endif /*DEBUG_VERBOSE*/ return( buffer ); } } return( NULL ); } /* Return a ref to a buffer that encloses area. The buffer we return might be * done. */ VipsBuffer * vips_buffer_ref( VipsImage *im, VipsRect *area ) { VipsBuffer *buffer; if( !(buffer = buffer_find( im, area )) ) /* No existing buffer ... make a new one. */ if( !(buffer = vips_buffer_new( im, area )) ) return( NULL ); return( buffer ); } /* Unref old, ref new, in a single operation. Reuse stuff if we can. The * buffer we return might or might not be done. */ VipsBuffer * vips_buffer_unref_ref( VipsBuffer *old_buffer, VipsImage *im, VipsRect *area ) { VipsBuffer *buffer; g_assert( !old_buffer || old_buffer->im == im ); /* Is the current buffer OK? */ if( old_buffer && vips_rect_includesrect( &old_buffer->area, area ) ) return( old_buffer ); /* Does the new area already have a buffer? */ if( (buffer = buffer_find( im, area )) ) { VIPS_FREEF( vips_buffer_unref, old_buffer ); return( buffer ); } /* Is the current buffer unshared? We can just move it. */ if( old_buffer && old_buffer->ref_count == 1 ) { if( buffer_move( old_buffer, area ) ) { vips_buffer_unref( old_buffer ); return( NULL ); } return( old_buffer ); } /* Fallback ... unref the old one, make a new one. */ VIPS_FREEF( vips_buffer_unref, old_buffer ); if( !(buffer = vips_buffer_new( im, area )) ) return( NULL ); return( buffer ); } void vips_buffer_print( VipsBuffer *buffer ) { printf( "VipsBuffer: %p ref_count = %d, ", buffer, buffer->ref_count ); printf( "im = %p, ", buffer->im ); printf( "area.left = %d, ", buffer->area.left ); printf( "area.top = %d, ", buffer->area.top ); printf( "area.width = %d, ", buffer->area.width ); printf( "area.height = %d, ", buffer->area.height ); printf( "done = %d, ", buffer->done ); printf( "buf = %p, ", buffer->buf ); printf( "bsize = %zd\n", buffer->bsize ); } static void vips__buffer_init_cb( VipsBufferThread *buffer_thread ) { vips_error_exit( "vips_thread_shutdown() not called for thread %p", g_thread_self() ); } /* Init the buffer cache system. */ void vips__buffer_init( void ) { #ifdef HAVE_PRIVATE_INIT static GPrivate private = G_PRIVATE_INIT( (GDestroyNotify) vips__buffer_init_cb ); buffer_thread_key = &private; #else if( !buffer_thread_key ) buffer_thread_key = g_private_new( (GDestroyNotify) vips__buffer_init_cb ); #endif if( buffer_cache_max_reserve < 1 ) printf( "vips__buffer_init: buffer reserve disabled\n" ); } void vips__buffer_shutdown( void ) { VipsBufferThread *buffer_thread; if( (buffer_thread = g_private_get( buffer_thread_key )) ) { buffer_thread_free( buffer_thread ); g_private_set( buffer_thread_key, NULL ); } } vips-7.38.5/libvips/iofuncs/sinkmemory.c0000644000175000017500000002064312303140253015175 00000000000000/* SinkMemory an image to a memory buffer, keeping top-to-bottom ordering. * * For sequential operations we need to keep requests reasonably ordered: we * can't let some tiles get very delayed. So we need to stall starting new * threads if the last thread gets too far behind. * * 17/2/12 * - from sinkdisc.c * 23/2/12 * - we could deadlock if generate failed */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "sink.h" /* A part of the image we are writing. */ typedef struct _SinkMemoryArea { struct _SinkMemory *memory; VipsRect rect; /* Part of image this area covers */ VipsSemaphore nwrite; /* Number of threads writing to this area */ } SinkMemoryArea; /* Per-call state. */ typedef struct _SinkMemory { SinkBase sink_base; /* We are current writing tiles to area, we'll delay starting a new * area if old_area (the previous position) hasn't completed. */ SinkMemoryArea *area; SinkMemoryArea *old_area; /* A region covering the whole of the output image ... we write to * this from many workers with vips_region_prepare_to(). */ VipsRegion *region; } SinkMemory; /* Our per-thread state ... we need to also track the area that pos is * supposed to write to. */ typedef struct _SinkMemoryThreadState { VipsThreadState parent_object; SinkMemoryArea *area; } SinkMemoryThreadState; typedef struct _SinkMemoryThreadStateClass { VipsThreadStateClass parent_class; } SinkMemoryThreadStateClass; G_DEFINE_TYPE( SinkMemoryThreadState, sink_memory_thread_state, VIPS_TYPE_THREAD_STATE ); static void sink_memory_thread_state_class_init( SinkMemoryThreadStateClass *class ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); object_class->nickname = "sinkmemorythreadstate"; object_class->description = _( "per-thread state for sinkmemory" ); } static void sink_memory_thread_state_init( SinkMemoryThreadState *state ) { } static VipsThreadState * sink_memory_thread_state_new( VipsImage *image, void *a ) { return( VIPS_THREAD_STATE( vips_object_new( sink_memory_thread_state_get_type(), vips_thread_state_set, image, a ) ) ); } static void sink_memory_area_free( SinkMemoryArea *area ) { vips_semaphore_destroy( &area->nwrite ); vips_free( area ); } static SinkMemoryArea * sink_memory_area_new( SinkMemory *memory ) { SinkMemoryArea *area; if( !(area = VIPS_NEW( NULL, SinkMemoryArea )) ) return( NULL ); area->memory = memory; vips_semaphore_init( &area->nwrite, 0, "nwrite" ); return( area ); } /* Move an area to a position. */ static void sink_memory_area_position( SinkMemoryArea *area, int top, int height ) { SinkMemory *memory = area->memory; VipsRect all, rect; all.left = 0; all.top = 0; all.width = memory->sink_base.im->Xsize; all.height = memory->sink_base.im->Ysize; rect.left = 0; rect.top = top; rect.width = memory->sink_base.im->Xsize; rect.height = height; vips_rect_intersectrect( &all, &rect, &area->rect ); } /* Our VipsThreadpoolAllocate function ... move the thread to the next tile * that needs doing. If we fill the current area, we block until the previous * area is finished, then swap areas. * If all tiles are done, we return FALSE to end * iteration. */ static gboolean sink_memory_area_allocate_fn( VipsThreadState *state, void *a, gboolean *stop ) { SinkMemoryThreadState *wstate = (SinkMemoryThreadState *) state; SinkMemory *memory = (SinkMemory *) a; SinkBase *sink_base = (SinkBase *) memory; VipsRect image; VipsRect tile; VIPS_DEBUG_MSG( "sink_memory_area_allocate_fn: %p\n", g_thread_self() ); /* Is the state x/y OK? New line or maybe new buffer or maybe even * all done. */ if( sink_base->x >= memory->area->rect.width ) { sink_base->x = 0; sink_base->y += sink_base->tile_height; if( sink_base->y >= VIPS_RECT_BOTTOM( &memory->area->rect ) ) { /* Block until the previous area is done. */ if( memory->area->rect.top > 0 ) vips_semaphore_downn( &memory->old_area->nwrite, 0 ); /* End of image? */ if( sink_base->y >= sink_base->im->Ysize ) { *stop = TRUE; return( 0 ); } /* Swap buffers. */ VIPS_SWAP( SinkMemoryArea *, memory->area, memory->old_area ); /* Position buf at the new y. */ sink_memory_area_position( memory->area, sink_base->y, sink_base->nlines ); } } /* x, y and buf are good: save params for thread. */ image.left = 0; image.top = 0; image.width = sink_base->im->Xsize; image.height = sink_base->im->Ysize; tile.left = sink_base->x; tile.top = sink_base->y; tile.width = sink_base->tile_width; tile.height = sink_base->tile_height; vips_rect_intersectrect( &image, &tile, &state->pos ); /* The thread needs to know which area it's writing to. */ wstate->area = memory->area; VIPS_DEBUG_MSG( " %p allocated %d x %d:\n", g_thread_self(), state->pos.left, state->pos.top ); /* Add to the number of writers on the area. */ vips_semaphore_upn( &memory->area->nwrite, -1 ); /* Move state on. */ sink_base->x += sink_base->tile_width; /* Add the number of pixels we've just allocated to progress. */ sink_base->processed += state->pos.width * state->pos.height; return( 0 ); } /* Our VipsThreadpoolWork function ... generate a tile! */ static int sink_memory_area_work_fn( VipsThreadState *state, void *a ) { SinkMemory *memory = (SinkMemory *) a; SinkMemoryThreadState *wstate = (SinkMemoryThreadState *) state; SinkMemoryArea *area = wstate->area; int result; VIPS_DEBUG_MSG( "sink_memory_area_work_fn: %p %d x %d\n", g_thread_self(), state->pos.left, state->pos.top ); result = vips_region_prepare_to( state->reg, memory->region, &state->pos, state->pos.left, state->pos.top ); VIPS_DEBUG_MSG( "sink_memory_area_work_fn: %p result = %d\n", g_thread_self(), result ); /* Tell the allocator we're done. */ vips_semaphore_upn( &area->nwrite, 1 ); return( result ); } static void sink_memory_free( SinkMemory *memory ) { VIPS_FREEF( sink_memory_area_free, memory->area ); VIPS_FREEF( sink_memory_area_free, memory->old_area ); VIPS_UNREF( memory->region ); } static int sink_memory_init( SinkMemory *memory, VipsImage *image ) { VipsRect all; vips_sink_base_init( &memory->sink_base, image ); memory->area = NULL; memory->old_area = NULL; all.left = 0; all.top = 0; all.width = image->Xsize; all.height = image->Ysize; if( !(memory->region = vips_region_new( image )) || vips_region_image( memory->region, &all ) || !(memory->area = sink_memory_area_new( memory )) || !(memory->old_area = sink_memory_area_new( memory )) ) { sink_memory_free( memory ); return( -1 ); } return( 0 ); } /** * vips_sink_memory: * @im: generate this image to memory * * Loops over an image, generating it to a memory buffer attached to the * image. * * See also: vips_sink(), vips_get_tile_size(). * * Returns: 0 on success, or -1 on error. */ int vips_sink_memory( VipsImage *image ) { SinkMemory memory; int result; if( sink_memory_init( &memory, image ) ) return( -1 ); vips_image_preeval( image ); result = 0; sink_memory_area_position( memory.area, 0, memory.sink_base.nlines ); if( vips_threadpool_run( image, sink_memory_thread_state_new, sink_memory_area_allocate_fn, sink_memory_area_work_fn, vips_sink_base_progress, &memory ) ) result = -1; vips_image_posteval( image ); sink_memory_free( &memory ); VIPS_DEBUG_MSG( "vips_sink_memory: done\n" ); return( result ); } vips-7.38.5/libvips/iofuncs/rect.c0000644000175000017500000001241612303140253013734 00000000000000/* Simple rectangle algebra. Should build rectangle list algebra on top of * this. * * J. Cupitt, 8/4/93. * * 17/3/11 * - move to vips_ prefix * - gtk-doc comments */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * SECTION: rect * @short_description: the VIPS rectangle class * @stability: Stable * @see_also: region * @include: vips/vips.h * * The #VipsRect class and associated types and macros. */ /** * VipsRect: * @left: left edge of rectangle * @top: top edge of rectangle * @width: width of rectangle * @height: height of rectangle * * A #VipsRect is a rectangular area of pixels. This is a struct for * performing simple rectangle algebra. */ /** * vips_rect_includespoint: * @r: rectangle to test * @x: position to test for * @y: position to test for * * Does @r contain point (@x, @y)? * * Returns: %TRUE if @r contains (@x, @y). */ gboolean vips_rect_includespoint( const VipsRect *r, int x, int y ) { return( r->left <= x && r->top <= y && r->left + r->width > x && r->top + r->height > y ); } /** * vips_rect_isempty: * @r: rectangle to test * * Is @r empty? ie. zero width or height. * * Returns: %TRUE if @r contains no pixels. */ gboolean vips_rect_isempty( const VipsRect *r ) { return( r->width <= 0 || r->height <= 0 ); } /** * vips_rect_includesrect: * @r1: outer rectangle * @r2: inner rectangle * * Is @r2 a subset of @r1? * * Returns: %TRUE if @r2 is a subset of @r1. */ gboolean vips_rect_includesrect( const VipsRect *r1, const VipsRect *r2 ) { return( r1->left <= r2->left && r1->top <= r2->top && r1->left + r1->width >= r2->left + r2->width && r1->top + r1->height >= r2->top + r2->height ); } /** * vips_rect_equalsrect: * @r1: first rectangle * @r2: second rectangle * * Is @r1 equal to @r2? * * Returns: %TRUE if @r1 is equal to @r2. */ gboolean vips_rect_equalsrect( const VipsRect *r1, const VipsRect *r2 ) { return( r1->left == r2->left && r1->top == r2->top && r1->width == r2->width && r1->height == r2->height ); } /** * vips_rect_marginadjust: * @r: rectangle to adjust * @n: enlarge by * * Enlarge @r by @n. +1 means out one pixel. */ void vips_rect_marginadjust( VipsRect *r, int n ) { r->left -= n; r->top -= n; r->width += 2 * n; r->height += 2 * n; } /** * vips_rect_intersectrect: * @r1: input rectangle 1 * @r2: input rectangle 2 * @out: output rectangle * * Fill @out with the intersection of @r1 and @r2. @out can equal @r1 or @r2. */ void vips_rect_intersectrect( const VipsRect *r1, const VipsRect *r2, VipsRect *out ) { int left = VIPS_MAX( r1->left, r2->left ); int top = VIPS_MAX( r1->top, r2->top ); int right = VIPS_MIN( VIPS_RECT_RIGHT( r1 ), VIPS_RECT_RIGHT( r2 ) ); int bottom = VIPS_MIN( VIPS_RECT_BOTTOM( r1 ), VIPS_RECT_BOTTOM( r2 ) ); int width = VIPS_MAX( 0, right - left ); int height = VIPS_MAX( 0, bottom - top ); out->left = left; out->top = top; out->width = width; out->height = height; } /** * vips_rect_unionrect: * @r1: input rectangle 1 * @r2: input rectangle 2 * @out: output rectangle * * Fill @out with the bounding box of @r1 and @r2. @out can equal @r1 or @r2. */ void vips_rect_unionrect( const VipsRect *r1, const VipsRect *r2, VipsRect *out ) { if( vips_rect_isempty( r1 ) ) *out = *r2; else if( vips_rect_isempty( r2 ) ) *out = *r1; else { int left = VIPS_MIN( r1->left, r2->left ); int top = VIPS_MIN( r1->top, r2->top ); int width = VIPS_MAX( VIPS_RECT_RIGHT( r1 ), VIPS_RECT_RIGHT( r2 ) ) - left; int height = VIPS_MAX( VIPS_RECT_BOTTOM( r1 ), VIPS_RECT_BOTTOM( r2 ) )- top; out->left = left; out->top = top; out->width = width; out->height = height; } } /** * vips_rect_dup: * @r: rectangle to duplicate * * Duplicate a rect to the heap. You need to free the result with vips_free(). * * Returns: a pointer to copy of @r allocated on the heap. */ VipsRect * vips_rect_dup( const VipsRect *r ) { VipsRect *out; if( !(out = VIPS_NEW( NULL, VipsRect )) ) return( NULL ); *out = *r; return( out ); } /** * vips_rect_normalise: * @r: rect to normalise * * Make sure width and height are >0 by moving the origin and flipping the * rect. */ void vips_rect_normalise( VipsRect *r ) { if( r->width < 0 ) { r->left += r->width; r->width *= -1; } if( r->height < 0 ) { r->top += r->height; r->height *= -1; } } vips-7.38.5/libvips/iofuncs/buf.c0000644000175000017500000002756012303140253013561 00000000000000/* string buffers */ /* Copyright (C) 1991-2003 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include /** * SECTION: buf * @short_description: a string you can append to * @stability: Stable * @see_also: #vips * @include: vips/vips.h * * A message buffer you can append stuff to safely and quickly. If the message * gets too long, you get "..." and truncation. Message buffers can be on the * stack or heap. * * For example: * * |[ * char txt[256]; * VipsBuf buf = VIPS_BUF_STATIC (txt); * int i; * * vips_buf_appends (&buf, "Numbers are: "); * for (i = 0; i < array_length; i++) { * if (i > 0) * vips_buf_appends (&buf, ", "); * vips_buf_appendg (&buf, array[i]); * } * printf ("%s", vips_buf_all (&buf)); * ]| */ /* Largest string we can append in one operation. */ #define MAX_STRSIZE (100000) /** * VIPS_BUF_STATIC: * @TEXT: the storage area to use * * Initialize a heap buffer. For example: * * |[ * char txt[256]; * VipsBuf buf = VIPS_BUF_STATIC (txt); * ]| */ /** * vips_buf_rewind: * @buf: the buffer * * Reset the buffer to the empty string. */ void vips_buf_rewind( VipsBuf *buf ) { buf->i = 0; buf->lasti = 0; buf->full = FALSE; if( buf->base ) buf->base[0] = '\0'; } /** * vips_buf_init: * @buf: the buffer * * Initialize a buffer. */ void vips_buf_init( VipsBuf *buf ) { buf->base = NULL; buf->mx = 0; buf->dynamic = FALSE; vips_buf_rewind( buf ); } /** * vips_buf_destroy: * @buf: the buffer * * Destroy a buffer. Only needed for heap buffers. Leaves the buffer in the * _init state. */ void vips_buf_destroy( VipsBuf *buf ) { if( buf->dynamic ) { VIPS_FREE( buf->base ); } vips_buf_init( buf ); } /** * vips_buf_set_static: * @buf: the buffer * @base: the start of the memory area to use for storage * @mx: the size of the storage area * * Attach the buffer to a static memory area. The buffer needs to have been * initialised. The memory area needs to be at least 4 bytes long. */ void vips_buf_set_static( VipsBuf *buf, char *base, int mx ) { g_assert( mx >= 4 ); vips_buf_destroy( buf ); buf->base = base; buf->mx = mx; buf->dynamic = FALSE; vips_buf_rewind( buf ); } /** * vips_buf_init_static: * @buf: the buffer * @base: the start of the memory area to use for storage * @mx: the size of the storage area * * Initialise and attach to a static memory area. VIPS_BUF_STATIC() is usually * more convenient. * * For example: * * |[ * char txt[256]; * VipsBuf buf; * * vips_buf_init_static (&buf, txt, 256); * ]| * * Static buffers don't need to be freed when they go out of scope, but their * size must be set at compile-time. */ void vips_buf_init_static( VipsBuf *buf, char *base, int mx ) { vips_buf_init( buf ); vips_buf_set_static( buf, base, mx ); } /** * vips_buf_set_dynamic: * @buf: the buffer * @mx: the size of the storage area * * Attach the buffer to a heap memory area. The buffer needs to have been * initialised. The memory area needs to be at least 4 bytes long. */ void vips_buf_set_dynamic( VipsBuf *buf, int mx ) { g_assert( mx >= 4 ); if( buf->mx == mx && buf->dynamic ) /* No change? */ vips_buf_rewind( buf ); else { vips_buf_destroy( buf ); if( !(buf->base = VIPS_ARRAY( NULL, mx, char )) ) /* No error return, so just block writes. */ buf->full = TRUE; else { buf->mx = mx; buf->dynamic = TRUE; vips_buf_rewind( buf ); } } } /** * vips_buf_init_dynamic: * @buf: the buffer * @mx: the size of the storage area * * Initialise and attach to a heap memory area. * The memory area needs to be at least 4 bytes long. * * |[ * VipsBuf buf; * * vips_buf_init_synamic (&buf, 256); * ]| * * Dynamic buffers must be freed with vips_buf_destroy(), but their size can * be set at runtime. */ void vips_buf_init_dynamic( VipsBuf *buf, int mx ) { vips_buf_init( buf ); vips_buf_set_dynamic( buf, mx ); } /** * vips_buf_appendns: * @buf: the buffer * @str: the string to append to the buffer * @sz: the size of the string to append * * Append at most @sz chars from @str to @buf. @sz < 0 means unlimited. This * is the low-level append operation: functions like vips_buf_appendf() build * on top of this. * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_appendns( VipsBuf *buf, const char *str, int sz ) { int len; int n; int avail; int cpy; if( buf->full ) return( FALSE ); /* Amount we want to copy. */ len = strlen( str ); if( sz >= 0 ) n = VIPS_MIN( sz, len ); else n = len; /* Space available. */ avail = buf->mx - buf->i - 4; /* Amount we actually copy. */ cpy = VIPS_MIN( n, avail ); strncpy( buf->base + buf->i, str, cpy ); buf->i += cpy; if( buf->i >= buf->mx - 4 ) { buf->full = TRUE; strcpy( buf->base + buf->mx - 4, "..." ); buf->i = buf->mx - 1; return( FALSE ); } return( TRUE ); } /** * vips_buf_appends: * @buf: the buffer * @str: the string to append to the buffer * * Append the whole of @str to @buf. * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_appends( VipsBuf *buf, const char *str ) { return( vips_buf_appendns( buf, str, -1 ) ); } /** * vips_buf_appendc: * @buf: the buffer * @ch: the character to append to the buffer * * Append a single character @ch to @buf. * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_appendc( VipsBuf *buf, char ch ) { char tiny[2]; tiny[0] = ch; tiny[1] = '\0'; return( vips_buf_appendns( buf, tiny, 1 ) ); } /** * vips_buf_change: * @buf: the buffer * @o: the string to search for * @n: the string to substitute * * Swap the rightmost occurence of @o for @n. * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_change( VipsBuf *buf, const char *old, const char *new ) { int olen = strlen( old ); int nlen = strlen( new ); int i; if( buf->full ) return( FALSE ); if( buf->i - olen + nlen > buf->mx - 4 ) { buf->full = TRUE; return( FALSE ); } /* Find pos of old. */ for( i = buf->i - olen; i > 0; i-- ) if( vips_isprefix( old, buf->base + i ) ) break; g_assert( i >= 0 ); /* Move tail of buffer to make right-size space for new. */ memmove( buf->base + i + nlen, buf->base + i + olen, buf->i - i - olen ); /* Copy new in. */ memcpy( buf->base + i, new, nlen ); buf->i = i + nlen + (buf->i - i - olen); return( TRUE ); } /** * vips_buf_removec: * @buf: the buffer * @ch: the character to remove * * Remove the last character, if it's @ch. * * Returns: %FALSE on failure, %TRUE otherwise. */ gboolean vips_buf_removec( VipsBuf *buf, char ch ) { if( buf->full ) return( FALSE ); if( buf->i <= 0 ) return( FALSE ); if( buf->base[buf->i - 1] == ch ) buf->i -= 1; return( TRUE ); } /** * vips_buf_appendf: * @buf: the buffer * @fmt: printf()-style format string * @Varargs: arguments to format string * * Format the string and append to @buf. * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_appendf( VipsBuf *buf, const char *fmt, ... ) { char str[MAX_STRSIZE]; va_list ap; va_start( ap, fmt ); (void) vips_vsnprintf( str, MAX_STRSIZE, fmt, ap ); va_end( ap ); return( vips_buf_appends( buf, str ) ); } /** * vips_buf_vappendf: * @buf: the buffer * @fmt: printf()-style format string * @ap: arguments to format string * * Append to @buf, args as vprintf(). * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_vappendf( VipsBuf *buf, const char *fmt, va_list ap ) { char str[MAX_STRSIZE]; (void) vips_vsnprintf( str, MAX_STRSIZE, fmt, ap ); return( vips_buf_appends( buf, str ) ); } /** * vips_buf_appendg: * @buf: the buffer * @g: value to format and append * * Append a double, non-localised. Useful for config files etc. * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_appendg( VipsBuf *buf, double g ) { char text[G_ASCII_DTOSTR_BUF_SIZE]; g_ascii_dtostr( text, sizeof( text ), g ); return( vips_buf_appends( buf, text ) ); } /** * vips_buf_appendd: * @buf: the buffer * @d: value to format and append * * Append a number. If the number is -ve, add brackets. Needed for * building function arguments. * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_appendd( VipsBuf *buf, int d ) { if( d < 0 ) return( vips_buf_appendf( buf, " (%d)", d ) ); else return( vips_buf_appendf( buf, " %d", d ) ); } /** * vips_buf_appendgv: * @buf: the buffer * @value: #GValue to format and append * * Format and append a #GValue with g_strdup_value_contents(). * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_appendgv( VipsBuf *buf, GValue *value ) { char *str_value; gboolean result; str_value = g_strdup_value_contents( value ); result = vips_buf_appends( buf, str_value ); g_free( str_value ); return( result ); } /** * vips_buf_append_size: * @buf: the buffer * @n: the number of bytes * * Turn a number of bytes into a sensible string ... eg "12", "12KB", "12MB", * "12GB" etc. * * Returns: %FALSE on overflow, %TRUE otherwise. */ gboolean vips_buf_append_size( VipsBuf *buf, size_t n ) { const static char *names[] = { /* File length unit. */ N_( "bytes" ), /* Kilo byte unit. */ N_( "KB" ), /* Mega byte unit. */ N_( "MB" ), /* Giga byte unit. */ N_( "GB" ), /* Tera byte unit. */ N_( "TB" ) }; double sz = n; int i; for( i = 0; sz > 1024 && i < VIPS_NUMBER( names ); sz /= 1024, i++ ) ; if( i == 0 ) /* No decimal places for bytes. */ return( vips_buf_appendf( buf, "%g %s", sz, _( names[i] ) ) ); else return( vips_buf_appendf( buf, "%.2f %s", sz, _( names[i] ) ) ); } /** * vips_buf_all: * @buf: the buffer * * Return the contents of the buffer as a C string. * * Returns: the %NULL-terminated contents of the buffer. This is a pointer to * the memory managed by the buffer and must not be freed. */ const char * vips_buf_all( VipsBuf *buf ) { buf->base[buf->i] = '\0'; return( buf->base ); } /** * vips_buf_firstline: * @buf: the buffer * * Trim to just the first line (excluding "\n"). * * Returns: the %NULL-terminated contents of the buffer. This is a pointer to * the memory managed by the buffer and must not be freed. */ const char * vips_buf_firstline( VipsBuf *buf ) { char *p; if( (p = strchr( vips_buf_all( buf ), '\n' )) ) *p = '\0'; return( vips_buf_all( buf ) ); } /** * vips_buf_is_empty: * @buf: the buffer * * Returns: %TRUE if the buffer is empty. */ gboolean vips_buf_is_empty( VipsBuf *buf ) { return( buf->i == 0 ); } /** * vips_buf_is_full: * @buf: the buffer * * Returns: %TRUE if the buffer is full. */ gboolean vips_buf_is_full( VipsBuf *buf ) { return( buf->full ); } /** * vips_buf_len: * @buf: the buffer * * Returns: the number of characters currently in the buffer. */ int vips_buf_len( VipsBuf *buf ) { return( buf->i ); } vips-7.38.5/libvips/iofuncs/system.c0000644000175000017500000001740412303140253014325 00000000000000/* vips_system(): run a command on an image * * 7/3/00 JC * - hacked it in * 21/10/02 JC * - use mktemp() if mkstemp() is not available * 10/3/03 JC * - out can be NULL * 23/12/04 * - use g_mkstemp() * 8/9/09 * - add .v suffix (thanks Roland) * - use vipsbuf * - rewrite to make it simpler * 2/2/10 * - gtkdoc * 4/6/13 * - redo as a class * - input and output images are now optional */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include typedef struct _VipsSystem { VipsOperation parent_instance; VipsImage *in; VipsImage *out; char *cmd_format; char *in_format; char *out_format; char *log; /* Set to delete in_name on close. */ gboolean delete_on_close; char *in_name; char *out_name; } VipsSystem; typedef VipsOperationClass VipsSystemClass; G_DEFINE_TYPE( VipsSystem, vips_system, VIPS_TYPE_OPERATION ); static void vips_system_dispose( GObject *gobject ) { VipsSystem *system = (VipsSystem *) gobject; if( system->delete_on_close && system->in_name ) g_unlink( system->in_name ); VIPS_FREE( system->in_name ); system->delete_on_close = FALSE; VIPS_FREE( system->out_name ); G_OBJECT_CLASS( vips_system_parent_class )->dispose( gobject ); } static int vips_system_build( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsSystem *system = (VipsSystem *) object; FILE *fp; char line[VIPS_PATH_MAX]; char txt[VIPS_PATH_MAX]; VipsBuf buf = VIPS_BUF_STATIC( txt ); int result; if( VIPS_OBJECT_CLASS( vips_system_parent_class )->build( object ) ) return( -1 ); /* Write the input image to a file. We must always make a copy of the * file, even if this is a disc file already, in case the command * needs a different format. */ if( system->in ) { char *in_format = system->in_format ? system->in_format : "%s.tif"; if( !(system->in_name = vips__temp_name( in_format )) ) return( -1 ); if( vips_image_write_to_file( system->in, system->in_name ) ) return( -1 ); system->delete_on_close = TRUE; } /* Make the output filename. */ if( system->out_format && !(system->out_name = vips__temp_name( system->out_format )) ) return( -1 ); if( system->in_name ) { if( !(fp = vips_popenf( system->cmd_format, "r", system->in_name, system->out_name )) ) return( -1 ); } else { if( !(fp = vips_popenf( system->cmd_format, "r", system->out_name )) ) return( -1 ); } while( fgets( line, VIPS_PATH_MAX, fp ) ) if( !vips_buf_appends( &buf, line ) ) break; g_object_set( system, "log", vips_buf_all( &buf ), NULL ); if( (result = pclose( fp )) ) { vips_error( class->nickname, _( "command failed: \"%s\"" ), system->cmd_format ); return( -1 ); } if( system->out_format ) { VipsImage *out; if( !(out = vips_image_new_from_file( system->out_name )) ) return( -1 ); vips_image_set_delete_on_close( out, TRUE ); g_object_set( system, "out", out, NULL ); } return( 0 ); } static void vips_system_class_init( VipsSystemClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->dispose = vips_system_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "system"; vobject_class->description = _( "run an external command" ); vobject_class->build = vips_system_build; VIPS_ARG_IMAGE( class, "in", 0, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSystem, in ) ); VIPS_ARG_IMAGE( class, "out", 1, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsSystem, out ) ); VIPS_ARG_STRING( class, "cmd_format", 2, _( "Command" ), _( "Command to run" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsSystem, cmd_format ), NULL ); VIPS_ARG_STRING( class, "in_format", 2, _( "Input format" ), _( "Format for input filename" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSystem, in_format ), NULL ); VIPS_ARG_STRING( class, "out_format", 2, _( "Output format" ), _( "Format for output filename" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsSystem, out_format ), NULL ); VIPS_ARG_STRING( class, "log", 2, _( "Log" ), _( "Command log" ), VIPS_ARGUMENT_OPTIONAL_OUTPUT, G_STRUCT_OFFSET( VipsSystem, log ), NULL ); } static void vips_system_init( VipsSystem *system ) { } /** * vips_system: * @cmd_format: command to run * @...: %NULL-terminated list of optional named arguments * * Optional arguments: * * @in: input image * @out: output image * @in_format: write input file like this * @out_format: write output filename like this * @log: stdout of command is returned here * * vips_system() runs a command, optionally passing an image in and * optionally getting an image * back. The command's stdout is returned in @log. * * First, if @in is set, it is written to a file. The filename is formed by * substituting something like "vips-49857-1" for the first %%s in @in_format, * then * prepending "/tmp". If the environment variable TMPDIR is defined, it * can be used to set a different temporary directory. * * On Windows, if the environment variable TMPDIR is not defined, VIPS calls * GetTempPath() to get the user's preferred temporary area. If that fails, it * defaults to C:\temp. * * If @in_format is * something like "%%s.png", the file will be written in PNG format. By * default, @in_format is "%%s.tif". * * If @out_format is set, an output filename is formed in the same way. * * The * command string to run is made by substituting the first %%s in @cmd_format * for the name of the input file, if @in is set, and the second %%s for the * output filename, if set. * * The command is executed with popen() and the output captured in @log. * * After the command finishes, if @out_format is set, the output image is * opened and returned in @out. * Closing the output image will automatically delete the output file. * * Finally the input images are deleted. * * For example, this call will run the ImageMagick convert program on an * image, using JPEG files to pass images into and out of the convert command. * * |[ * VipsImage *in; * VipsImage *out; * char *log; * * if (vips_system ("convert %s -swirl 45 %s", * "in", in, * "out", &out, * "in_format", "%s.jpg", * "out_format", "%s.jpg", * "log", &log, * NULL)) * error ... * ]| * * Returns: 0 on success, -1 on failure. */ int vips_system( const char *cmd_format, ... ) { va_list ap; int result; va_start( ap, cmd_format ); result = vips_call_split( "system", ap, cmd_format ); va_end( ap ); return( result ); } vips-7.38.5/libvips/iofuncs/threadpool.c0000644000175000017500000005400112303140253015134 00000000000000/* Support for thread pools ... like threadgroups, but lighter. * * 18/3/10 * - from threadgroup.c * - distributed work allocation idea from Christian Blenia, thank you * very much * 21/3/10 * - progress feedback * - only expose VipsThreadState * 11/5/10 * - argh, stopping many threads could sometimes leave allocated work * undone * 17/7/10 * - set pool->error whenever we set thr->error, lets us catch allocate * errors (thanks Tim) */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG_RED #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include #include #ifdef OS_WIN32 #include #endif /*OS_WIN32*/ /** * SECTION: threadpool * @short_description: pools of worker threads * @stability: Stable * @see_also: generate * @include: vips/vips.h * * vips_threadpool_run() loops a set of threads over an image. Threads take it * in turns to allocate units of work (a unit might be a tile in an image), * then run in parallel to process those units. An optional progress function * can be used to give feedback. */ /* Maximum number of concurrent threads we allow. No reason for the limit, * it's just there to stop mad values for IM_CONCURRENCY killing the system. */ #define MAX_THREADS (1024) /* Name of environment variable we get concurrency level from. */ #define IM_CONCURRENCY "IM_CONCURRENCY" /* Default tile geometry ... can be set by init_world. */ int vips__tile_width = VIPS__TILE_WIDTH; int vips__tile_height = VIPS__TILE_HEIGHT; int vips__fatstrip_height = VIPS__FATSTRIP_HEIGHT; int vips__thinstrip_height = VIPS__THINSTRIP_HEIGHT; /* Default n threads ... 0 means get from environment. */ int vips__concurrency = 0; /* Glib 2.32 revised the thread API. We need some compat functions. */ GMutex * vips_g_mutex_new( void ) { GMutex *mutex; #ifdef HAVE_MUTEX_INIT mutex = g_new( GMutex, 1 ); g_mutex_init( mutex ); #else mutex = g_mutex_new(); #endif return( mutex ); } void vips_g_mutex_free( GMutex *mutex ) { #ifdef HAVE_MUTEX_INIT g_mutex_clear( mutex ); g_free( mutex ); #else g_mutex_free( mutex ); #endif } GCond * vips_g_cond_new( void ) { GCond *cond; #ifdef HAVE_COND_INIT cond = g_new( GCond, 1 ); g_cond_init( cond ); #else cond = g_cond_new(); #endif return( cond ); } void vips_g_cond_free( GCond *cond ) { #ifdef HAVE_COND_INIT g_cond_clear( cond ); g_free( cond ); #else g_cond_free( cond ); #endif } typedef struct { const char *domain; GThreadFunc func; gpointer data; } VipsThreadInfo; static void * vips_thread_run( gpointer data ) { VipsThreadInfo *info = (VipsThreadInfo *) data; void *result; if( vips__thread_profile ) vips__thread_profile_attach( info->domain ); result = info->func( info->data ); g_free( info ); vips_thread_shutdown(); return( result ); } GThread * vips_g_thread_new( const char *domain, GThreadFunc func, gpointer data ) { GThread *thread; VipsThreadInfo *info; GError *error = NULL; info = g_new( VipsThreadInfo, 1 ); info->domain = domain; info->func = func; info->data = data; #ifdef HAVE_THREAD_NEW thread = g_thread_try_new( domain, vips_thread_run, info, &error ); #else thread = g_thread_create( vips_thread_run, info, TRUE, &error ); #endif if( !thread ) { if( error ) { vips_error( domain, "%s", error->message ); g_error_free( error ); } else vips_error( domain, "%s", _( "unable to create thread" ) ); } return( thread ); } /** * vips_concurrency_set: * @concurrency: number of threads to run * * Sets the number of worker threads that vips should use when running a * #VipsThreadPool. * * The special value 0 means "default". In this case, the number of threads is * set by the environmnt variable IM_CONCURRENCY, or if that is not set, the * number of threads availble on the hist machine. * * See also: vips_concurrency_get(). */ void vips_concurrency_set( int concurrency ) { vips__concurrency = concurrency; } static int get_num_processors( void ) { int nproc; nproc = 1; #ifdef G_OS_UNIX #if defined(HAVE_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN) { /* POSIX style. */ int x; x = sysconf( _SC_NPROCESSORS_ONLN ); if( x > 0 ) nproc = x; } #elif defined HW_NCPU { /* BSD style. */ int x; size_t len = sizeof(x); sysctl( (int[2]) {CTL_HW, HW_NCPU}, 2, &x, &len, NULL, 0 ); if( x > 0 ) nproc = x; } #endif /* libgomp has some very complex code on Linux to count the number of * processors available to the current process taking pthread affinity * into account, but we don't attempt that here. Perhaps we should? */ #endif /*G_OS_UNIX*/ #ifdef OS_WIN32 { /* Count the CPUs currently available to this process. */ DWORD_PTR process_cpus; DWORD_PTR system_cpus; if( GetProcessAffinityMask( GetCurrentProcess(), &process_cpus, &system_cpus ) ) { unsigned int count; for( count = 0; process_cpus != 0; process_cpus >>= 1 ) if( process_cpus & 1 ) count++; if( count > 0 ) nproc = count; } } #endif /*OS_WIN32*/ return( nproc ); } /** * vips_concurrency_get: * * Returns the number of worker threads that vips should use when running a * #VipsThreadPool. * * vips gets this values from these sources in turn: * * If vips_concurrency_set() has been called, this value is used. The special * value 0 means "default". You can also use the command-line argument * "--vips-concurrency" to set this value. * * If vips_concurrency_set() has not been called and no command-line argument * was used, vips uses the value of the environment variable IM_CONCURRENCY, * * If IM_CONCURRENCY has not been set, vips find the number of hardware * threads that the host machine can run in parallel and uses that value. * * The final value is clipped to the range 1 - 1024. * * See also: vips_concurrency_get(). * * Returns: number of worker threads to use. */ int vips_concurrency_get( void ) { const char *str; int nthr; int x; /* Tell the threads system how much concurrency we expect. */ if( vips__concurrency > 0 ) nthr = vips__concurrency; else if( (str = g_getenv( IM_CONCURRENCY )) && (x = atoi( str )) > 0 ) nthr = x; else nthr = get_num_processors(); if( nthr < 1 || nthr > MAX_THREADS ) { nthr = VIPS_CLIP( 1, nthr, MAX_THREADS ); vips_warn( "vips_concurrency_get", _( "threads clipped to %d" ), nthr ); } /* Save for next time around. */ vips_concurrency_set( nthr ); return( nthr ); } /** * VipsThreadState: * @im: the #VipsImage being operated upon * @reg: a #REGION * @pos: a #Rect * @x: an int * @y: an int * @a: client data * * These per-thread values are carried around for your use by * vips_threadpool_run(). They are private to each thread, so they are a * useful place * for #VipsThreadpoolAllocate and #VipsThreadpoolWork to communicate. * * @reg is created for you at the start of processing and freed at the end, * but you can do what you like with it. */ G_DEFINE_TYPE( VipsThreadState, vips_thread_state, VIPS_TYPE_OBJECT ); static void vips_thread_state_dispose( GObject *gobject ) { VipsThreadState *state = (VipsThreadState *) gobject; VIPS_DEBUG_MSG( "vips_thread_state_dispose:\n" ); VIPS_UNREF( state->reg ); G_OBJECT_CLASS( vips_thread_state_parent_class )->dispose( gobject ); } static int vips_thread_state_build( VipsObject *object ) { VipsThreadState *state = (VipsThreadState *) object; if( !(state->reg = vips_region_new( state->im )) ) return( -1 ); return( VIPS_OBJECT_CLASS( vips_thread_state_parent_class )->build( object ) ); } static void vips_thread_state_class_init( VipsThreadStateClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); gobject_class->dispose = vips_thread_state_dispose; object_class->build = vips_thread_state_build; object_class->nickname = "threadstate"; object_class->description = _( "per-thread state for vipsthreadpool" ); } static void vips_thread_state_init( VipsThreadState *state ) { VIPS_DEBUG_MSG( "vips_thread_state_init:\n" ); state->reg = NULL; state->stop = FALSE; } void * vips_thread_state_set( VipsObject *object, void *a, void *b ) { VipsThreadState *state = (VipsThreadState *) object; VipsImage *im = (VipsImage *) a; VIPS_DEBUG_MSG( "vips_thread_state_set:\n" ); state->im = im; state->a = b; return( NULL ); } VipsThreadState * vips_thread_state_new( VipsImage *im, void *a ) { VIPS_DEBUG_MSG( "vips_thread_state_new:\n" ); return( VIPS_THREAD_STATE( vips_object_new( VIPS_TYPE_THREAD_STATE, vips_thread_state_set, im, a ) ) ); } /* What we track for each thread in the pool. */ typedef struct { /* All private. */ /*< private >*/ struct _VipsThreadpool *pool; /* Pool we are part of */ VipsThreadState *state; /* Thread we are running. */ GThread *thread; /* Set this to ask the thread to exit. */ gboolean exit; /* Set by the thread if work or allocate return an error. */ gboolean error; } VipsThread; /* What we track for a group of threads working together. */ typedef struct _VipsThreadpool { /* All private. */ /*< private >*/ VipsImage *im; /* Image we are calculating */ /* Start a thread, do a unit of work (runs in parallel) and allocate * a unit of work (serial). Plus the mutex we use to serialize work * allocation. */ VipsThreadStartFn start; VipsThreadpoolAllocateFn allocate; VipsThreadpoolWorkFn work; GMutex *allocate_lock; void *a; /* User argument to start / allocate / etc. */ int nthr; /* Number of threads in pool */ VipsThread **thr; /* Threads */ /* The caller blocks here until all threads finish. */ VipsSemaphore finish; /* Workers up this for every loop to make the main thread tick. */ VipsSemaphore tick; /* Set this to abort evaluation early with an error. */ gboolean error; /* Set by Allocate (via an arg) to indicate normal end of computation. */ gboolean stop; } VipsThreadpool; /* Junk a thread. */ static void vips_thread_free( VipsThread *thr ) { /* Is there a thread running this region? Kill it! */ if( thr->thread ) { thr->exit = 1; /* Return value is always NULL (see thread_main_loop). */ (void) g_thread_join( thr->thread ); VIPS_DEBUG_MSG_RED( "thread_free: g_thread_join()\n" ); thr->thread = NULL; } VIPS_FREEF( g_object_unref, thr->state ); thr->pool = NULL; } static int vips_thread_allocate( VipsThread *thr ) { VipsThreadpool *pool = thr->pool; g_assert( !pool->stop ); if( !thr->state ) { if( !(thr->state = pool->start( pool->im, pool->a )) ) return( -1 ); } if( pool->allocate( thr->state, pool->a, &pool->stop ) ) return( -1 ); return( 0 ); } /* The main loop: get some work, do it! Can run from many worker threads, or * from the main thread if threading is off. */ static void vips_thread_work_unit( VipsThread *thr ) { VipsThreadpool *pool = thr->pool; if( thr->error ) return; VIPS_GATE_START( "vips_thread_work_unit: wait" ); g_mutex_lock( pool->allocate_lock ); VIPS_GATE_STOP( "vips_thread_work_unit: wait" ); /* Has another worker signaled stop while we've been working? */ if( pool->stop ) { g_mutex_unlock( pool->allocate_lock ); return; } if( vips_thread_allocate( thr ) ) { thr->error = TRUE; pool->error = TRUE; g_mutex_unlock( pool->allocate_lock ); return; } /* Have we just signalled stop? */ if( pool->stop ) { g_mutex_unlock( pool->allocate_lock ); return; } g_mutex_unlock( pool->allocate_lock ); /* Process a work unit. */ if( pool->work( thr->state, pool->a ) ) { thr->error = TRUE; pool->error = TRUE; } } /* What runs as a thread ... loop, waiting to be told to do stuff. */ static void * vips_thread_main_loop( void *a ) { VipsThread *thr = (VipsThread *) a; VipsThreadpool *pool = thr->pool; g_assert( pool == thr->pool ); VIPS_GATE_START( "vips_thread_main_loop: thread" ); /* Process work units! Always tick, even if we are stopping, so the * main thread will wake up for exit. */ for(;;) { VIPS_GATE_START( "vips_thread_work_unit: u" ); vips_thread_work_unit( thr ); VIPS_GATE_STOP( "vips_thread_work_unit: u" ); vips_semaphore_up( &pool->tick ); if( pool->stop || pool->error ) break; } /* We are exiting: tell the main thread. */ vips_semaphore_up( &pool->finish ); VIPS_GATE_STOP( "vips_thread_main_loop: thread" ); return( NULL ); } /* Attach another thread to a threadpool. */ static VipsThread * vips_thread_new( VipsThreadpool *pool ) { VipsThread *thr; if( !(thr = VIPS_NEW( pool->im, VipsThread )) ) return( NULL ); thr->pool = pool; thr->state = NULL; thr->thread = NULL; thr->exit = 0; thr->error = 0; /* We can't build the state here, it has to be done by the worker * itself the first time that allocate runs so that any regions are * owned by the correct thread. */ if( !(thr->thread = vips_g_thread_new( "worker", vips_thread_main_loop, thr )) ) { vips_thread_free( thr ); return( NULL ); } VIPS_DEBUG_MSG_RED( "vips_thread_new: vips_g_thread_new()\n" ); return( thr ); } /* Kill all threads in a threadpool, if there are any. */ static void vips_threadpool_kill_threads( VipsThreadpool *pool ) { if( pool->thr ) { int i; for( i = 0; i < pool->nthr; i++ ) vips_thread_free( pool->thr[i] ); pool->thr = NULL; VIPS_DEBUG_MSG( "vips_threadpool_kill_threads: " "killed %d threads\n", pool->nthr ); } } /* This can be called multiple times, careful. */ static int vips_threadpool_free( VipsThreadpool *pool ) { VIPS_DEBUG_MSG( "vips_threadpool_free: \"%s\" (%p)\n", pool->im->filename, pool ); vips_threadpool_kill_threads( pool ); VIPS_FREEF( vips_g_mutex_free, pool->allocate_lock ); vips_semaphore_destroy( &pool->finish ); vips_semaphore_destroy( &pool->tick ); return( 0 ); } static void vips_threadpool_new_cb( VipsImage *im, VipsThreadpool *pool ) { vips_threadpool_free( pool ); } static VipsThreadpool * vips_threadpool_new( VipsImage *im ) { VipsThreadpool *pool; /* Allocate and init new thread block. */ if( !(pool = VIPS_NEW( im, VipsThreadpool )) ) return( NULL ); pool->im = im; pool->allocate = NULL; pool->work = NULL; pool->allocate_lock = vips_g_mutex_new(); pool->nthr = vips_concurrency_get(); pool->thr = NULL; vips_semaphore_init( &pool->finish, 0, "finish" ); vips_semaphore_init( &pool->tick, 0, "tick" ); pool->stop = FALSE; pool->error = FALSE; /* Attach tidy-up callback. */ g_signal_connect( im, "close", G_CALLBACK( vips_threadpool_new_cb ), pool ); VIPS_DEBUG_MSG( "vips_threadpool_new: \"%s\" (%p), with %d threads\n", im->filename, pool, pool->nthr ); return( pool ); } /* Attach a set of threads. */ static int vips_threadpool_create_threads( VipsThreadpool *pool ) { int i; g_assert( !pool->thr ); /* Make thread array. */ if( !(pool->thr = VIPS_ARRAY( pool->im, pool->nthr, VipsThread * )) ) return( -1 ); for( i = 0; i < pool->nthr; i++ ) pool->thr[i] = NULL; /* Attach threads and start them working. */ for( i = 0; i < pool->nthr; i++ ) if( !(pool->thr[i] = vips_thread_new( pool )) ) { vips_threadpool_kill_threads( pool ); return( -1 ); } return( 0 ); } /** * VipsThreadpoolStartFn: * @a: client data * @b: client data * @c: client data * * This function is called once by each worker just before the first time work * is allocated to it to build the per-thread state. Per-thread state is used * by #VipsThreadpoolAllocate and #VipsThreadpoolWork to communicate. * * #VipsThreadState is a subclass of #VipsObject. Start functions are called * from allocate, that is, they are single-threaded. * * See also: vips_threadpool_run(). * * Returns: a new #VipsThreadState object, or NULL on error */ /** * VipsThreadpoolAllocateFn: * @state: per-thread state * @a: client data * @b: client data * @c: client data * @stop: set this to signal end of computation * * This function is called to allocate a new work unit for the thread. It is * always single-threaded, so it can modify per-pool state (such as a * counter). * * @a, @b, @c are the values supplied to the call to * vips_threadpool_run(). * * It should set @stop to %TRUE to indicate that no work could be allocated * because the job is done. * * See also: vips_threadpool_run(). * * Returns: 0 on success, or -1 on error */ /** * VipsThreadpoolWorkFn: * @state: per-thread state * @a: client data * @b: client data * @c: client data * * This function is called to process a work unit. Many copies of this can run * at once, so it should not write to the per-pool state. It can write to * per-thread state. * * @a, @b, @c are the values supplied to the call to * vips_threadpool_run(). * * See also: vips_threadpool_run(). * * Returns: 0 on success, or -1 on error */ /** * VipsThreadpoolProgressFn: * @a: client data * @b: client data * @c: client data * * This function is called by the main thread once for every work unit * processed. It can be used to give the user progress feedback. * * See also: vips_threadpool_run(). * * Returns: 0 on success, or -1 on error */ /** * vips_threadpool_run: * @im: image to loop over * @start: allocate per-thread state * @allocate: allocate a work unit * @work: process a work unit * @progress: give progress feedback about a work unit, or %NULL * @a: client data * * This function runs a set of threads over an image. Each thread first calls * @start to create new per-thread state, then runs * @allocate to set up a new work unit (perhaps the next tile in an image, for * example), then @work to process that work unit. After each unit is * processed, @progress is called, so that the operation can give * progress feedback. @progress may be %NULL. * * The object returned by @start must be an instance of a subclass of * #VipsThreadState. Use this to communicate between @allocate and @work. * * @allocate and @start are always single-threaded (so they can write to the * per-pool state), whereas @work can be executed concurrently. @progress is * always called by * the main thread (ie. the thread which called vips_threadpool_run()). * * See also: vips_concurrency_set(). * * Returns: 0 on success, or -1 on error. */ int vips_threadpool_run( VipsImage *im, VipsThreadStartFn start, VipsThreadpoolAllocateFn allocate, VipsThreadpoolWorkFn work, VipsThreadpoolProgressFn progress, void *a ) { VipsThreadpool *pool; int result; if( !(pool = vips_threadpool_new( im )) ) return( -1 ); pool->start = start; pool->allocate = allocate; pool->work = work; pool->a = a; /* Attach workers and set them going. */ if( vips_threadpool_create_threads( pool ) ) { vips_threadpool_free( pool ); return( -1 ); } for(;;) { /* Wait for a tick from a worker. */ vips_semaphore_down( &pool->tick ); VIPS_DEBUG_MSG( "vips_threadpool_run: tick\n" ); if( pool->stop || pool->error ) break; if( progress && progress( pool->a ) ) pool->error = TRUE; if( pool->stop || pool->error ) break; } /* Wait for them all to hit finish. */ vips_semaphore_downn( &pool->finish, pool->nthr ); /* Return 0 for success. */ result = pool->error ? -1 : 0; vips_threadpool_free( pool ); vips_image_minimise_all( im ); return( result ); } /* Round N down to P boundary. */ #define ROUND_DOWN(N,P) ((N) - ((N) % P)) /* Round N up to P boundary. */ #define ROUND_UP(N,P) (ROUND_DOWN( (N) + (P) - 1, (P) )) /** * vips_get_tile_size: * @im: image to guess for * @tile_width: return selected tile width * @tile_height: return selected tile height * @nlines: return buffer height in scanlines * * Pick a tile size and a buffer height for this image and the current * value of vips_concurrency_get(). The buffer height * will always be a multiple of tile_height. */ void vips_get_tile_size( VipsImage *im, int *tile_width, int *tile_height, int *nlines ) { const int nthr = vips_concurrency_get(); /* Pick a render geometry. */ switch( im->dhint ) { case VIPS_DEMAND_STYLE_SMALLTILE: *tile_width = vips__tile_width; *tile_height = vips__tile_height; break; case VIPS_DEMAND_STYLE_ANY: case VIPS_DEMAND_STYLE_FATSTRIP: *tile_width = im->Xsize; *tile_height = vips__fatstrip_height; break; case VIPS_DEMAND_STYLE_THINSTRIP: *tile_width = im->Xsize; *tile_height = vips__thinstrip_height; break; default: g_assert( 0 ); } /* We can't set nlines for the current demand style: a later bit of * the pipeline might see a different hint and we need to synchronise * buffer sizes everywhere. * * Pick the maximum buffer size we might possibly need, then round up * to a multiple of tileheight. */ *nlines = vips__tile_height * (1 + nthr / VIPS_MAX( 1, im->Xsize / vips__tile_width )) * 2; *nlines = VIPS_MAX( *nlines, vips__fatstrip_height * nthr * 2 ); *nlines = VIPS_MAX( *nlines, vips__thinstrip_height * nthr * 2 ); *nlines = ROUND_UP( *nlines, *tile_height ); /* We make this assumption in several places. */ g_assert( *nlines % *tile_height == 0 ); VIPS_DEBUG_MSG( "vips_get_tile_size: %d by %d patches, " "groups of %d scanlines\n", *tile_width, *tile_height, *nlines ); } vips-7.38.5/libvips/iofuncs/operation.c0000644000175000017500000006323212303141142014777 00000000000000/* base class for all vips operations */ /* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include /** * SECTION: operation * @short_description: the VIPS operation base object class * @stability: Stable * @see_also: object * @include: vips/vips.h * * The #VipsOperation class and associated types and macros. * * #VipsOperation is the base class for all operations in libvips. It builds * on #VipsObject to provide the introspection and command-line interface to * libvips. * * It also maintains a cache of recent operations. You can tune the cache * behaviour in various ways. * */ /** * VipsOperationFlags: * @VIPS_OPERATION_NONE: no flags * @VIPS_OPERATION_SEQUENTIAL: can work sequentially * @VIPS_OPERATION_NOCACHE: must not be cached * * Flags we associate with an operation. * * @VIPS_OPERATION_SEQUENTIAL means that the operation works like vips_conv(): * it can happily process images top-to-bottom with only small non-local * references. * * @VIPS_OPERATION_SEQUENTIAL_UNBUFFERED means that the operation works like * vips_copy(): it can happily process images top-to-bottom and makes no * non-local references. * * @VIPS_OPERATION_NOCACHE means that the operation must not be cached by * vips. */ /* Abstract base class for operations. */ G_DEFINE_ABSTRACT_TYPE( VipsOperation, vips_operation, VIPS_TYPE_OBJECT ); static void vips_operation_finalize( GObject *gobject ) { VipsOperation *operation = VIPS_OPERATION( gobject ); VIPS_DEBUG_MSG( "vips_operation_finalize: %p\n", gobject ); if( operation->pixels ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( gobject ); vips_info( class->nickname, _( "%d pixels calculated" ), operation->pixels ); } G_OBJECT_CLASS( vips_operation_parent_class )->finalize( gobject ); } static void vips_operation_dispose( GObject *gobject ) { VIPS_DEBUG_MSG( "vips_operation_dispose: %p\n", gobject ); G_OBJECT_CLASS( vips_operation_parent_class )->dispose( gobject ); } /* What to show about the argument. */ typedef struct { char *message; /* header message on first print */ gboolean required; /* show required args or optional */ gboolean oftype; /* "is of type" message */ int n; /* Arg number */ } VipsOperationClassUsage; static void * vips_operation_class_usage_arg( VipsObjectClass *object_class, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsBuf *buf, VipsOperationClassUsage *usage ) { /* Only show construct args ... others are internal. */ if( usage->required == ((argument_class->flags & VIPS_ARGUMENT_REQUIRED) != 0) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && !(argument_class->flags & VIPS_ARGUMENT_DEPRECATED) ) { if( usage->message && usage->n == 0 ) vips_buf_appendf( buf, "%s\n", usage->message ); if( usage->oftype ) { vips_buf_appendf( buf, " %-12s - %s, %s %s\n", g_param_spec_get_name( pspec ), g_param_spec_get_blurb( pspec ), (argument_class->flags & VIPS_ARGUMENT_INPUT) ? _( "input" ) : _( "output" ), g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ) ); } else { if( usage->n > 0 ) vips_buf_appends( buf, " " ); vips_buf_appends( buf, g_param_spec_get_name( pspec ) ); } usage->n += 1; } return( NULL ); } static void vips_operation_usage( VipsOperationClass *class, VipsBuf *buf ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); VipsOperationClassUsage usage; /* First pass through args: show the required names. */ vips_buf_appendf( buf, " %s ", object_class->nickname ); usage.message = NULL; usage.required = TRUE; usage.oftype = FALSE; usage.n = 0; vips_argument_class_map( object_class, (VipsArgumentClassMapFn) vips_operation_class_usage_arg, buf, &usage ); vips_buf_appends( buf, "\n" ); vips_buf_appendf( buf, "%s\n", object_class->description ); /* Show required types. */ usage.message = "where:"; usage.required = TRUE; usage.oftype = TRUE; usage.n = 0; vips_argument_class_map( object_class, (VipsArgumentClassMapFn) vips_operation_class_usage_arg, buf, &usage ); /* Show optional args. */ usage.message = "optional arguments:"; usage.required = FALSE; usage.oftype = TRUE; usage.n = 0; vips_argument_class_map( object_class, (VipsArgumentClassMapFn) vips_operation_class_usage_arg, buf, &usage ); /* Show flags. */ if( class->flags ) { GFlagsValue *value; VipsOperationFlags flags; GFlagsClass *flags_class = g_type_class_ref( VIPS_TYPE_OPERATION_FLAGS ); vips_buf_appendf( buf, "operation flags: " ); flags = class->flags; while( flags && (value = g_flags_get_first_value( flags_class, flags )) ) { vips_buf_appendf( buf, "%s ", value->value_nick ); flags &= ~value->value; } vips_buf_appends( buf, "\n" ); } } static void * vips_operation_call_argument( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsArgument *argument = (VipsArgument *) argument_class; printf( " %s: offset = %d ", g_param_spec_get_name( argument->pspec ), argument_class->offset ); if( argument_class->flags & VIPS_ARGUMENT_REQUIRED ) printf ("required " ); if( argument_class->flags & VIPS_ARGUMENT_CONSTRUCT ) printf ("construct " ); if( argument_class->flags & VIPS_ARGUMENT_SET_ONCE ) printf ("set-once " ); if( argument_instance->assigned ) printf ("assigned " ); printf( "\n" ); return( NULL ); } static void vips_operation_dump( VipsObject *object, VipsBuf *buf ) { VipsOperation *operation = VIPS_OPERATION( object ); VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( object ); printf( "%s args:\n", object_class->nickname ); vips_argument_map( VIPS_OBJECT( operation ), vips_operation_call_argument, NULL, NULL ); VIPS_OBJECT_CLASS( vips_operation_parent_class )->dump( object, buf ); } static void * vips_operation_vips_operation_print_summary_arg( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsBuf *buf = (VipsBuf *) a; /* Just assigned required input construct args */ if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && argument_instance->assigned ) { const char *name = g_param_spec_get_name( pspec ); GType type = G_PARAM_SPEC_VALUE_TYPE( pspec ); GValue gvalue = { 0, }; char *str; g_value_init( &gvalue, type ); g_object_get_property( G_OBJECT( object ), name, &gvalue ); str = g_strdup_value_contents( &gvalue ); vips_buf_appendf( buf, " %s=%s", name, str ); g_free( str ); g_value_unset( &gvalue ); } return( NULL ); } static void vips_operation_summary( VipsObject *object, VipsBuf *buf ) { VipsOperation *operation = VIPS_OPERATION( object ); VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( object ); vips_buf_appendf( buf, "%s", object_class->nickname ); vips_argument_map( VIPS_OBJECT( operation ), vips_operation_vips_operation_print_summary_arg, buf, NULL ); vips_buf_appends( buf, " -" ); VIPS_OBJECT_CLASS( vips_operation_parent_class )-> summary( object, buf ); } static VipsOperationFlags vips_operation_real_get_flags( VipsOperation *operation ) { VipsOperationClass *class = VIPS_OPERATION_GET_CLASS( operation ); return( class->flags ); } static void vips_operation_class_init( VipsOperationClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->finalize = vips_operation_finalize; gobject_class->dispose = vips_operation_dispose; vobject_class->nickname = "operation"; vobject_class->description = _( "operations" ); vobject_class->summary = vips_operation_summary; vobject_class->dump = vips_operation_dump; class->usage = vips_operation_usage; class->get_flags = vips_operation_real_get_flags; } static void vips_operation_init( VipsOperation *operation ) { } /** * vips_operation_get_flags: * @operation: operation to fetch flags from * * Returns the set of flags for this operation. * * Returns: 0 on success, or -1 on error. */ VipsOperationFlags vips_operation_get_flags( VipsOperation *operation ) { VipsOperationClass *class = VIPS_OPERATION_GET_CLASS( operation ); return( class->get_flags( operation ) ); } /** * vips_operation_class_print_usage: (skip) * @operation_class: class to print usage for * * Print a usage message for the operation to stdout. */ void vips_operation_class_print_usage( VipsOperationClass *operation_class ) { char str[2048]; VipsBuf buf = VIPS_BUF_STATIC( str ); operation_class->usage( operation_class, &buf ); printf( "%s", _( "usage:" ) ); printf( "\n%s", vips_buf_all( &buf ) ); } VipsOperation * vips_operation_new( const char *name ) { GType type; VipsOperation *operation; vips_check_init(); if( !(type = vips_type_find( "VipsOperation", name )) ) { vips_error( "VipsOperation", _( "class \"%s\" not found" ), name ); return( NULL ); } operation = VIPS_OPERATION( g_object_new( type, NULL ) ); VIPS_DEBUG_MSG( "vips_operation_new: %s (%p)\n", name, operation ); return( operation ); } /* Some systems do not have va_copy() ... this might work (it does on MSVC), * apparently. * * FIXME ... this should be in configure.in */ #ifndef va_copy #define va_copy(d,s) ((d) = (s)) #endif static int vips_operation_set_valist_required( VipsOperation *operation, va_list ap ) { VIPS_DEBUG_MSG( "vips_operation_set_valist_required:\n" ); /* Set required input arguments. Can't use vips_argument_map here * :-( because passing va_list by reference is not portable. */ VIPS_ARGUMENT_FOR_ALL( operation, pspec, argument_class, argument_instance ) { g_assert( argument_instance ); if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) ) { VIPS_ARGUMENT_COLLECT_SET( pspec, argument_class, ap ); #ifdef VIPS_DEBUG { char *str; str = g_strdup_value_contents( &value ); VIPS_DEBUG_MSG( "\t%s = %s\n", g_param_spec_get_name( pspec ), str ); g_free( str ); } #endif /*VIPS_DEBUG */ g_object_set_property( G_OBJECT( operation ), g_param_spec_get_name( pspec ), &value ); VIPS_ARGUMENT_COLLECT_GET( pspec, argument_class, ap ); #ifdef VIPS_DEBUG printf( "\tskipping arg %p for %s\n", arg, g_param_spec_get_name( pspec ) ); #endif /*VIPS_DEBUG */ VIPS_ARGUMENT_COLLECT_END } } VIPS_ARGUMENT_FOR_ALL_END return( 0 ); } static int vips_operation_get_valist_required( VipsOperation *operation, va_list ap ) { VIPS_DEBUG_MSG( "vips_operation_get_valist_required:\n" ); /* Extract output arguments. Can't use vips_argument_map here * :-( because passing va_list by reference is not portable. */ VIPS_ARGUMENT_FOR_ALL( operation, pspec, argument_class, argument_instance ) { if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) ) { VIPS_ARGUMENT_COLLECT_SET( pspec, argument_class, ap ); VIPS_ARGUMENT_COLLECT_GET( pspec, argument_class, ap ); if( !argument_instance->assigned ) continue; #ifdef VIPS_DEBUG printf( "\twriting %s to %p\n", g_param_spec_get_name( pspec ), arg ); #endif /*VIPS_DEBUG */ g_object_get( G_OBJECT( operation ), g_param_spec_get_name( pspec ), arg, NULL ); /* If the pspec is an object, that will up the ref * count. We want to hand over the ref, so we have to * knock it down again. */ if( G_IS_PARAM_SPEC_OBJECT( pspec ) ) { GObject *object; object = *((GObject **) arg); g_object_unref( object ); } VIPS_ARGUMENT_COLLECT_END } } VIPS_ARGUMENT_FOR_ALL_END return( 0 ); } static int vips_operation_get_valist_optional( VipsOperation *operation, va_list ap ) { char *name; VIPS_DEBUG_MSG( "vips_operation_get_valist_optional:\n" ); for( name = va_arg( ap, char * ); name; name = va_arg( ap, char * ) ) { GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; VIPS_DEBUG_MSG( "\tname = '%s' (%p)\n", name, name ); if( vips_object_get_argument( VIPS_OBJECT( operation ), name, &pspec, &argument_class, &argument_instance ) ) return( -1 ); VIPS_ARGUMENT_COLLECT_SET( pspec, argument_class, ap ); /* We must collect input args as we walk the name/value list, * but we don't do anything with them. */ VIPS_ARGUMENT_COLLECT_GET( pspec, argument_class, ap ); /* Here's an output arg. */ #ifdef VIPS_DEBUG printf( "\twriting %s to %p\n", g_param_spec_get_name( pspec ), arg ); #endif /*VIPS_DEBUG */ /* If the dest pointer is NULL, skip the read. */ if( arg ) { g_object_get( G_OBJECT( operation ), g_param_spec_get_name( pspec ), arg, NULL ); /* If the pspec is an object, that will up * the ref count. We want to hand over the * ref, so we have to knock it down again. */ if( G_IS_PARAM_SPEC_OBJECT( pspec ) ) { GObject *object; object = *((GObject **) arg); g_object_unref( object ); } } VIPS_ARGUMENT_COLLECT_END } return( 0 ); } /* This can change operation to point at an old, cached one. */ static int vips_call_required_optional( VipsOperation **operation, va_list required, va_list optional ) { int result; va_list a; va_list b; /* We need to be able to walk required and optional twice. On x64 gcc, * vips_operation_set_valist_required() etc. will destructively alter * the passed-in va_list. We make a copy and walk that instead. */ va_copy( a, required ); va_copy( b, optional ); result = vips_operation_set_valist_required( *operation, a ) || vips_object_set_valist( VIPS_OBJECT( *operation ), b ); va_end( a ); va_end( b ); if( result ) return( -1 ); /* Build from cache. */ if( vips_cache_operation_buildp( operation ) ) return( -1 ); /* Walk args again, writing output. */ va_copy( a, required ); va_copy( b, optional ); result = vips_operation_get_valist_required( *operation, required ) || vips_operation_get_valist_optional( *operation, optional ); va_end( a ); va_end( b ); return( result ); } int vips_call( const char *operation_name, ... ) { VipsOperation *operation; int result; va_list required; va_list optional; VIPS_DEBUG_MSG( "vips_call: starting for %s ...\n", operation_name ); if( !(operation = vips_operation_new( operation_name ) ) ) return( -1 ); #ifdef VIPS_DEBUG VIPS_DEBUG_MSG( "where:\n" ); vips_object_print_dump( VIPS_OBJECT( operation ) ); #endif /*VIPS_DEBUG*/ /* We have to break the va_list into separate required and optional * components. * * Note the start, grab the required, then copy and reuse. */ va_start( required, operation_name ); va_copy( optional, required ); VIPS_ARGUMENT_FOR_ALL( operation, pspec, argument_class, argument_instance ) { g_assert( argument_instance ); if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) ) { VIPS_ARGUMENT_COLLECT_SET( pspec, argument_class, optional ); VIPS_ARGUMENT_COLLECT_GET( pspec, argument_class, optional ); VIPS_ARGUMENT_COLLECT_END } } VIPS_ARGUMENT_FOR_ALL_END result = vips_call_required_optional( &operation, required, optional ); va_end( required ); va_end( optional ); /* Failed: junk args and back out. */ if( result ) { vips_object_unref_outputs( VIPS_OBJECT( operation ) ); g_object_unref( operation ); return( -1 ); } /* The operation we have built should now have been reffed by one of * its arguments or have finished its work. Either way, we can unref. */ g_object_unref( operation ); return( result ); } int vips_call_split( const char *operation_name, va_list optional, ... ) { VipsOperation *operation; int result; va_list required; VIPS_DEBUG_MSG( "vips_call_split: starting for %s ...\n", operation_name ); if( !(operation = vips_operation_new( operation_name ) ) ) return( -1 ); va_start( required, optional ); result = vips_call_required_optional( &operation, required, optional ); va_end( required ); /* Build failed: junk args and back out. */ if( result ) { vips_object_unref_outputs( VIPS_OBJECT( operation ) ); g_object_unref( operation ); return( -1 ); } /* The operation we have built should now have been reffed by one of * its arguments or have finished its work. Either way, we can unref. */ g_object_unref( operation ); return( result ); } static void * vips_call_find_pspec( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { const char *name = (const char *) a; /* One char names we assume are "-x" style abbreviations, longer names * we match the whole string. */ if( !(argument_class->flags & VIPS_ARGUMENT_REQUIRED) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && !argument_instance->assigned ) if( (strlen( name ) == 1 && g_param_spec_get_name( pspec )[0] == name[0]) || strcmp( g_param_spec_get_name( pspec ), name ) == 0 ) return( argument_instance ); return( NULL ); } /* Keep this stuff around for output args. */ typedef struct _VipsCallOptionOutput { VipsArgumentInstance *argument_instance; const char *value; } VipsCallOptionOutput; static void vips_call_option_output( VipsObject *object, VipsCallOptionOutput *output ) { VipsArgumentInstance *argument_instance = output->argument_instance; GParamSpec *pspec = ((VipsArgument *) argument_instance)->pspec; /* Don't look at the output arg if _build() hasn't run sucessfully, it * probably won't have been set. */ if( object->constructed ) if( vips_object_get_argument_to_string( object, g_param_spec_get_name( pspec ), output->value ) ) { /* FIXME .. Hmm what can we do here? If an arg is image * output, for example, we will lose the error. */ } g_free( output ); } static gboolean vips_call_options_set( const gchar *option_name, const gchar *value, gpointer data, GError **error ) { VipsOperation *operation = (VipsOperation *) data; const char *name; VipsArgumentInstance *argument_instance; VipsArgumentClass *argument_class; GParamSpec *pspec; VIPS_DEBUG_MSG( "vips_call_options_set: %s = %s\n", option_name, value ); /* Remove any leading "--" from the option name. */ for( name = option_name; *name == '-'; name++ ) ; if( !(argument_instance = (VipsArgumentInstance *) vips_argument_map( VIPS_OBJECT( operation ), vips_call_find_pspec, (void *) name, NULL )) ) { vips_error( VIPS_OBJECT_GET_CLASS( operation )->nickname, _( "unknown argument '%s'" ), name ); vips_error_g( error ); return( FALSE ); } argument_class = argument_instance->argument_class; pspec = ((VipsArgument *) argument_instance)->pspec; if( (argument_class->flags & VIPS_ARGUMENT_INPUT) ) { if( vips_object_set_argument_from_string( VIPS_OBJECT( operation ), g_param_spec_get_name( pspec ), value ) ) { vips_error_g( error ); return( FALSE ); } #ifdef VIPS_DEBUG { GType type = G_PARAM_SPEC_VALUE_TYPE( pspec ); GValue gvalue = { 0, }; char *str; g_value_init( &gvalue, type ); g_object_get_property( G_OBJECT( operation ), g_param_spec_get_name( pspec ), &gvalue ); str = g_strdup_value_contents( &gvalue ); VIPS_DEBUG_MSG( "\tGValue %s = %s\n", g_param_spec_get_name( pspec ), str ); g_free( str ); g_value_unset( &gvalue ); } #endif /*VIPS_DEBUG*/ } else if( (argument_class->flags & VIPS_ARGUMENT_OUTPUT) ) { VipsCallOptionOutput *output; /* We can't do output now, we have to attach a callback to do * the processing after the operation has run. * * FIXME ... something like posteval or postbuild might be * better for this? */ output = g_new( VipsCallOptionOutput, 1 ); output->argument_instance = argument_instance; output->value = value; g_signal_connect( operation, "preclose", G_CALLBACK( vips_call_option_output ), output ); } return( TRUE ); } static void * vips_call_options_add( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { GOptionGroup *group = (GOptionGroup *) a; if( !(argument_class->flags & VIPS_ARGUMENT_REQUIRED) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && !argument_instance->assigned ) { const char *name = g_param_spec_get_name( pspec ); gboolean needs_string = vips_object_argument_needsstring( object, name ); GOptionEntry entry[2]; entry[0].long_name = name; entry[0].short_name = name[0]; entry[0].description = g_param_spec_get_blurb( pspec ); entry[0].flags = 0; if( !needs_string ) entry[0].flags |= G_OPTION_FLAG_NO_ARG; if( argument_class->flags & VIPS_ARGUMENT_DEPRECATED ) entry[0].flags |= G_OPTION_FLAG_HIDDEN; entry[0].arg = G_OPTION_ARG_CALLBACK; entry[0].arg_data = (gpointer) vips_call_options_set; if( needs_string ) entry[0].arg_description = g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ); else entry[0].arg_description = NULL; entry[1].long_name = NULL; VIPS_DEBUG_MSG( "vips_call_options_add: adding %s\n", name ); g_option_group_add_entries( group, &entry[0] ); } return( NULL ); } void vips_call_options( GOptionGroup *group, VipsOperation *operation ) { (void) vips_argument_map( VIPS_OBJECT( operation ), vips_call_options_add, group, NULL ); } /* What we track during an argv call. */ typedef struct _VipsCall { VipsOperation *operation; int argc; char **argv; int i; } VipsCall; static const char * vips_call_get_arg( VipsCall *call, int i ) { if( i < 0 || i >= call->argc ) { vips_error( VIPS_OBJECT_GET_CLASS( call->operation )->nickname, "%s", _( "too few arguments" ) ); return( NULL ); } return( call->argv[i] ); } static void * vips_call_argv_input( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsCall *call = (VipsCall *) a; /* Loop over all required construct args. */ if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && !(argument_class->flags & VIPS_ARGUMENT_DEPRECATED) ) { const char *name = g_param_spec_get_name( pspec ); if( (argument_class->flags & VIPS_ARGUMENT_INPUT) ) { const char *arg; if( !(arg = vips_call_get_arg( call, call->i )) || vips_object_set_argument_from_string( object, name, arg ) ) return( pspec ); call->i += 1; } else if( (argument_class->flags & VIPS_ARGUMENT_OUTPUT) ) { if( vips_object_argument_needsstring( object, name ) ) call->i += 1; } } return( NULL ); } static void * vips_call_argv_output( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsCall *call = (VipsCall *) a; /* Loop over all required construct args. */ if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && !(argument_class->flags & VIPS_ARGUMENT_DEPRECATED) ) { if( (argument_class->flags & VIPS_ARGUMENT_INPUT) ) call->i += 1; else if( (argument_class->flags & VIPS_ARGUMENT_OUTPUT) ) { const char *name = g_param_spec_get_name( pspec ); const char *arg; arg = NULL; if( vips_object_argument_needsstring( object, name ) ) { arg = vips_call_get_arg( call, call->i ); if( !arg ) return( pspec ); call->i += 1; } if( vips_object_get_argument_to_string( object, name, arg ) ) return( pspec ); } } return( NULL ); } /* Our main command-line entry point. Optional args should have been set by * the GOption parser already, see above. * * We don't create the operation, so we must not unref it. The caller must * unref on error too. The caller must also call vips_object_unref_outputs() on * all code paths. */ int vips_call_argv( VipsOperation *operation, int argc, char **argv ) { VipsCall call; g_assert( argc >= 0 ); #ifdef VIPS_DEBUG printf( "vips_call_argv: " ); vips_object_print_name( VIPS_OBJECT( operation ) ); printf( "\n" ); { int i; for( i = 0; i < argc; i++ ) printf( "%d) %s\n", i, argv[i] ); } #endif /*VIPS_DEBUG*/ call.operation = operation; call.argc = argc; call.argv = argv; call.i = 0; if( vips_argument_map( VIPS_OBJECT( operation ), vips_call_argv_input, &call, NULL ) ) return( -1 ); /* Any unused arguments? We must fail. Consider eg. "vips bandjoin a b * c". This would overwrite b with a and ignore c, potentially * disasterous. */ if( argc > call.i ) { vips_error( VIPS_OBJECT_GET_CLASS( operation )->nickname, "%s", _( "too many arguments" ) ); return( -1 ); } /* We can't use the operation cache, we need to be able to change the * operation pointer. The cache probably wouldn't help anyway. */ if( vips_object_build( VIPS_OBJECT( operation ) ) ) return( -1 ); call.i = 0; if( vips_argument_map( VIPS_OBJECT( operation ), vips_call_argv_output, &call, NULL ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/iofuncs/base64.h0000644000175000017500000000174612303140253014074 00000000000000/* Copyright (C) 1991-2005 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* base64 encode/decode functions. */ char *im__b64_encode( const unsigned char *data, size_t data_length ); unsigned char *im__b64_decode( const char *buffer, size_t *data_length ); vips-7.38.5/libvips/iofuncs/sink.h0000644000175000017500000000352012303140253013744 00000000000000/* A sink that's not attached to anything, eg. find image average, * * 28/3/10 * - from im_iterate(), reworked for threadpool */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifndef VIPS_SINK_H #define VIPS_SINK_H #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ #include #include /* Base for sink.c / sinkdisc.c / sinkmemory.c */ typedef struct _SinkBase { VipsImage *im; /* The position we're at in buf. */ int x; int y; /* The tilesize we've picked. */ int tile_width; int tile_height; int nlines; /* The number of pixels allocate has allocated. Used for progress * feedback. */ guint64 processed; } SinkBase; /* Some function we can share. */ void vips_sink_base_init( SinkBase *sink_base, VipsImage *image ); VipsThreadState *vips_sink_thread_state_new( VipsImage *im, void *a ); int vips_sink_base_allocate( VipsThreadState *state, void *a, gboolean *stop ); int vips_sink_base_progress( void *a ); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif /*VIPS_SINK_H*/ vips-7.38.5/libvips/iofuncs/header.c0000644000175000017500000011144112303140253014225 00000000000000/* get, set and copy image header fields * * 9/7/02 JC * - first version * 7/6/05 * - now reads meta fields too * - cleaned up * - added im_header_exists(), im_header_map() * 1/8/05 * - now im_header_get_type() and im_header_get() rather than * im_header_exists() * 4/1/07 * - removed Hist from standard fields ... now a separate function * 29/8/09 * - im_header_get_type() renamed as im_header_get_typeof() to prevent * confusion with GObject-style type definers * 1/10/09 * - rename as header.c * - gtkdoc comments * 22/3/11 * - rename fields for vips8 * - move to vips_ prefix */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include /** * SECTION: header * @short_description: get, set and walk image headers * @stability: Stable * @see_also: meta, * check * @include: vips/vips.h * * These functions let you get at image header data (including metadata) in a * uniform way. They are handy for language bindings but less useful for C * users. * * They first search the * VIPS header * fields (see image), then search for * a metadata field of that name (see * meta). * Use vips_image_get_typeof() to test for the * existance and #GType * of a header field. * * See meta * for a set of functions for adding new metadata to an image. */ /** * SECTION: meta * @short_description: get and set image metadata * @stability: Stable * @see_also: header * @include: vips/vips.h * * You can attach arbitrary metadata to images. VipsMetadata is copied as images * are processed, so all images which used this image as input, directly or * indirectly, will have this same bit of metadata attached to them. Copying * is implemented with reference-counted pointers, so it is efficient, even for * large items of data. This does however mean that metadata items need to be * immutable. VipsMetadata * is handy for things like ICC profiles or EXIF data. * * Various convenience functions (eg. vips_image_set_int()) let you easily * attach * simple types like * numbers, strings and memory blocks to images. Use vips_image_map() to loop * over an image's fields, including all metadata. * * Items of metadata are identified by strings. Some strings are reserved, for * example the ICC profile for an image is known by convention as * "icc-profile-data". * * If you save an image in VIPS format, all metadata (with a restriction, see * below) is automatically saved for you in a block of XML at the end of the * file. When you load a VIPS image, the metadata is restored. You can use the * 'edvips' command-line tool to extract or replace this block of XML. * * VIPS metadata is based on GValue. See the docs for that system if you want * to do fancy stuff such as defining a new metadata type. * VIPS defines a new GValue called "vips_save_string", a variety of string. If * your GValue can be transformed to vips_save_string, it will be saved and * loaded to and from VIPS files for you. * * VIPS provides a couple of base classes which implement * reference-counted areas of memory. If you base your metadata on one of * these types, it can be copied between images efficiently. */ /* Name, offset pair. */ typedef struct _HeaderField { const char *field; glong offset; } HeaderField; /* Built in fields and struct offsets. */ static HeaderField int_field[] = { { "width", G_STRUCT_OFFSET( VipsImage, Xsize ) }, { "height", G_STRUCT_OFFSET( VipsImage, Ysize ) }, { "bands", G_STRUCT_OFFSET( VipsImage, Bands ) }, { "format", G_STRUCT_OFFSET( VipsImage, BandFmt ) }, { "coding", G_STRUCT_OFFSET( VipsImage, Coding ) }, { "interpretation", G_STRUCT_OFFSET( VipsImage, Type ) }, { "xoffset", G_STRUCT_OFFSET( VipsImage, Xoffset ) }, { "yoffset", G_STRUCT_OFFSET( VipsImage, Yoffset ) } }; static HeaderField double_field[] = { { "xres", G_STRUCT_OFFSET( VipsImage, Xres ) }, { "yres", G_STRUCT_OFFSET( VipsImage, Yres ) } }; static HeaderField string_field[] = { { "filename", G_STRUCT_OFFSET( VipsImage, filename ) } }; /* Old names we keep around for back-compat. We never loop over these with * map, but we do check them when we look up fields by name. */ static HeaderField old_int_field[] = { { "Xsize", G_STRUCT_OFFSET( VipsImage, Xsize ) }, { "Ysize", G_STRUCT_OFFSET( VipsImage, Ysize ) }, { "Bands", G_STRUCT_OFFSET( VipsImage, Bands ) }, { "Bbits", G_STRUCT_OFFSET( VipsImage, Bbits ) }, { "BandFmt", G_STRUCT_OFFSET( VipsImage, BandFmt ) }, { "Coding", G_STRUCT_OFFSET( VipsImage, Coding ) }, { "Type", G_STRUCT_OFFSET( VipsImage, Type ) }, { "Xoffset", G_STRUCT_OFFSET( VipsImage, Xoffset ) }, { "Yoffset", G_STRUCT_OFFSET( VipsImage, Yoffset ) } }; static HeaderField old_double_field[] = { { "Xres", G_STRUCT_OFFSET( VipsImage, Xres ) }, { "Yres", G_STRUCT_OFFSET( VipsImage, Yres ) } }; /* This is used by (eg.) VIPS_IMAGE_SIZEOF_ELEMENT() to calculate object * size. * * It needs to be guint64 and not size_t since we use this as the basis for * image address calcs and they have to be 64-bit, even on 32-bit machines. */ const guint64 vips__image_sizeof_bandformat[] = { sizeof( unsigned char ), /* VIPS_FORMAT_UCHAR */ sizeof( signed char ), /* VIPS_FORMAT_CHAR */ sizeof( unsigned short ), /* VIPS_FORMAT_USHORT */ sizeof( unsigned short ), /* VIPS_FORMAT_SHORT */ sizeof( unsigned int ), /* VIPS_FORMAT_UINT */ sizeof( unsigned int ), /* VIPS_FORMAT_INT */ sizeof( float ), /* VIPS_FORMAT_FLOAT */ 2 * sizeof( float ), /* VIPS_FORMAT_COMPLEX */ sizeof( double ), /* VIPS_FORMAT_DOUBLE */ 2 * sizeof( double ) /* VIPS_FORMAT_DPCOMPLEX */ }; /* Return number of bytes for a band format, or -1 on error. */ guint64 vips_format_sizeof( VipsBandFormat format ) { return( (format < 0 || format > VIPS_FORMAT_DPCOMPLEX) ? vips_error( "vips_format_sizeof", _( "unknown band format %d" ), format ), -1 : vips__image_sizeof_bandformat[format] ); } #ifdef DEBUG /* Check that this meta is on the hash table. */ static void * meta_sanity_on_hash( VipsMeta *meta, VipsImage *im ) { VipsMeta *found; if( meta->im != im ) printf( "*** field \"%s\" has incorrect im\n", meta->field ); if( !(found = g_hash_table_lookup( im->meta, meta->field )) ) printf( "*** field \"%s\" is on traverse but not in hash\n", meta->field ); if( found != meta ) printf( "*** meta \"%s\" on traverse and hash do not match\n", meta->field ); return( NULL ); } static void meta_sanity_on_traverse( const char *field, VipsMeta *meta, VipsImage *im ) { if( meta->field != field ) printf( "*** field \"%s\" has incorrect field\n", meta->field ); if( meta->im != im ) printf( "*** field \"%s\" has incorrect im\n", meta->field ); if( !g_slist_find( im->meta_traverse, meta ) ) printf( "*** field \"%s\" is in hash but not on traverse\n", meta->field ); } static void meta_sanity( const VipsImage *im ) { if( im->meta ) g_hash_table_foreach( im->meta, (GHFunc) meta_sanity_on_traverse, (void *) im ); vips_slist_map2( im->meta_traverse, (VipsSListMap2Fn) meta_sanity_on_hash, (void *) im, NULL ); } #endif /*DEBUG*/ static void meta_free( VipsMeta *meta ) { #ifdef DEBUG { char *str_value; str_value = g_strdup_value_contents( &meta->value ); printf( "meta_free: field %s, value = %s\n", meta->field, str_value ); g_free( str_value ); } #endif /*DEBUG*/ if( meta->im ) meta->im->meta_traverse = g_slist_remove( meta->im->meta_traverse, meta ); g_value_unset( &meta->value ); g_free( meta->field ); g_free( meta ); } static VipsMeta * meta_new( VipsImage *image, const char *field, GValue *value ) { VipsMeta *meta; meta = g_new( VipsMeta, 1 ); meta->im = image; meta->field = NULL; memset( &meta->value, 0, sizeof( GValue ) ); meta->field = g_strdup( field ); g_value_init( &meta->value, G_VALUE_TYPE( value ) ); g_value_copy( value, &meta->value ); image->meta_traverse = g_slist_append( image->meta_traverse, meta ); g_hash_table_replace( image->meta, meta->field, meta ); #ifdef DEBUG { char *str_value; str_value = g_strdup_value_contents( value ); printf( "meta_new: field %s, value = %s\n", field, str_value ); g_free( str_value ); } #endif /*DEBUG*/ return( meta ); } /* Destroy all the meta on an image. */ void vips__meta_destroy( VipsImage *image ) { VIPS_FREEF( g_hash_table_destroy, image->meta ); g_assert( !image->meta_traverse ); } static void meta_init( VipsImage *im ) { if( !im->meta ) { g_assert( !im->meta_traverse ); im->meta = g_hash_table_new_full( g_str_hash, g_str_equal, NULL, (GDestroyNotify) meta_free ); } } int vips_image_get_width( const VipsImage *image ) { return( image->Xsize ); } int vips_image_get_height( const VipsImage *image ) { return( image->Ysize ); } int vips_image_get_bands( const VipsImage *image ) { return( image->Bands ); } VipsBandFormat vips_image_get_format( const VipsImage *image ) { return( image->BandFmt ); } VipsCoding vips_image_get_coding( const VipsImage *image ) { return( image->Coding ); } /* vips_image_get_interpretation: * @image: image to guess for * * Return the #VipsInterpretation set in the image header. * Use vips_image_guess_interpretation() if you want a sanity-checked value. * * Returns: the #VipsInterpretation from the image header. */ VipsInterpretation vips_image_get_interpretation( const VipsImage *image ) { return( image->Type ); } /* Try to pick a sane value for interpretation, assuming Type has been set * incorrectly. */ static VipsInterpretation vips_image_default_interpretation( const VipsImage *image ) { switch( image->Coding ) { case VIPS_CODING_LABQ: return( VIPS_INTERPRETATION_LABQ ); case VIPS_CODING_RAD: return( VIPS_INTERPRETATION_RGB ); default: break; } if( image->Bands == 1 ) return( VIPS_INTERPRETATION_B_W ); else return( VIPS_INTERPRETATION_MULTIBAND ); } /* vips_image_guess_interpretation: * @image: image to guess for * * Return the #VipsInterpretation for an image, guessing a default value if * the set value looks wrong. * * Returns: a sensible #VipsInterpretation for the image. */ VipsInterpretation vips_image_guess_interpretation( const VipsImage *image ) { gboolean sane; sane = TRUE; /* Coding overrides interpretation. */ switch( image->Coding ) { case VIPS_CODING_LABQ: if( image->Type != VIPS_INTERPRETATION_LABQ ) sane = FALSE; break; case VIPS_CODING_RAD: if( image->Type != VIPS_INTERPRETATION_RGB ) sane = FALSE; break; default: break; } switch( image->Type ) { case VIPS_INTERPRETATION_MULTIBAND: if( image->Bands == 1 ) sane = FALSE; break; case VIPS_INTERPRETATION_B_W: if( image->Bands > 1 ) sane = FALSE; break; case VIPS_INTERPRETATION_HISTOGRAM: if( image->Xsize > 1 && image->Ysize > 1 ) sane = FALSE; break; case VIPS_INTERPRETATION_FOURIER: if( !vips_band_format_iscomplex( image->BandFmt ) ) sane = FALSE; break; case VIPS_INTERPRETATION_XYZ: case VIPS_INTERPRETATION_LAB: case VIPS_INTERPRETATION_RGB: case VIPS_INTERPRETATION_CMC: case VIPS_INTERPRETATION_LCH: case VIPS_INTERPRETATION_sRGB: case VIPS_INTERPRETATION_scRGB: case VIPS_INTERPRETATION_YXY: if( image->Bands < 3 ) sane = FALSE; break; case VIPS_INTERPRETATION_CMYK: if( image->Bands < 4 ) sane = FALSE; break; case VIPS_INTERPRETATION_LABQ: if( image->Coding != VIPS_CODING_LABQ ) sane = FALSE; break; case VIPS_INTERPRETATION_LABS: if( image->BandFmt != VIPS_FORMAT_SHORT ) sane = FALSE; break; case VIPS_INTERPRETATION_RGB16: if( image->BandFmt == VIPS_FORMAT_CHAR || image->BandFmt == VIPS_FORMAT_UCHAR || image->Bands < 3 ) sane = FALSE; break; case VIPS_INTERPRETATION_GREY16: if( image->BandFmt == VIPS_FORMAT_CHAR || image->BandFmt == VIPS_FORMAT_UCHAR ) sane = FALSE; break; case VIPS_INTERPRETATION_MATRIX: if( image->Bands != 1 ) sane = FALSE; break; default: g_assert( 0 ); sane = FALSE; break; } if( sane ) return( vips_image_get_interpretation( image ) ); else return( vips_image_default_interpretation( image ) ); } double vips_image_get_xres( const VipsImage *image ) { return( image->Xres ); } double vips_image_get_yres( const VipsImage *image ) { return( image->Yres ); } int vips_image_get_xoffset( const VipsImage *image ) { return( image->Xoffset ); } int vips_image_get_yoffset( const VipsImage *image ) { return( image->Yoffset ); } const char * vips_image_get_filename( const VipsImage *image ) { return( image->filename ); } const char * vips_image_get_mode( const VipsImage *image ) { return( image->mode ); } double vips_image_get_scale( const VipsImage *array ) { double scale; scale = 1.0; if( vips_image_get_typeof( array, "scale" ) ) vips_image_get_double( array, "scale", &scale ); return( scale ); } double vips_image_get_offset( const VipsImage *array ) { double offset; offset = 0.0; if( vips_image_get_typeof( array, "offset" ) ) vips_image_get_double( array, "offset", &offset ); return( offset ); } /** * vips_image_get_data: (skip) * @image: image to get data for * * Return a pointer to the image's pixel data, if possible. This can involve * allocating large amounts of memory and performing a long computation. Image * pixels are laid out in band-packed rows. * * See also: vips_image_wio_input(). * * Returns: a pointer to pixel data, if possible. */ void * vips_image_get_data( VipsImage *image ) { if( vips_image_wio_input( image ) ) return( NULL ); return( image->data ); } /** * vips_image_init_fields: * @image: image to init * @xsize: image width * @ysize: image height * @bands: image bands * @format: band format * @coding: image coding * @interpretation: image type * @xres: horizontal resolution, pixels per millimetre * @yres: vertical resolution, pixels per millimetre * * A convenience function to set the header fields after creating an image. * Normally you copy the fields from your input images with * vips_image_pipelinev() and then make * any adjustments you need, but if you are creating an image from scratch, * for example im_black() or im_jpeg2vips(), you do need to set all the * fields yourself. * * See also: vips_image_pipelinev(). */ void vips_image_init_fields( VipsImage *image, int xsize, int ysize, int bands, VipsBandFormat format, VipsCoding coding, VipsInterpretation interpretation, double xres, double yres ) { g_object_set( image, "width", xsize, "height", ysize, "bands", bands, "format", format, NULL ); image->Coding = coding; image->Type = interpretation; image->Xres = xres; image->Yres = yres; } static void * meta_cp_field( VipsMeta *meta, VipsImage *dst ) { #ifdef DEBUG { char *str_value; str_value = g_strdup_value_contents( &meta->value ); printf( "vips__meta_cp: copying field %s, value = %s\n", meta->field, str_value ); g_free( str_value ); } #endif /*DEBUG*/ (void) meta_new( dst, meta->field, &meta->value ); #ifdef DEBUG meta_sanity( dst ); #endif /*DEBUG*/ return( NULL ); } /* Copy meta on to dst. */ static int meta_cp( VipsImage *dst, const VipsImage *src ) { if( src->meta ) { /* Loop, copying fields. */ meta_init( dst ); vips_slist_map2( src->meta_traverse, (VipsSListMap2Fn) meta_cp_field, dst, NULL ); } return( 0 ); } /* We have to have this as a separate entry point so we can support the old * vips7 API. */ int vips__image_copy_fields_array( VipsImage *out, VipsImage *in[] ) { int i; int ni; g_assert( in[0] ); /* Copy magic too, handy for knowing the original image's byte order. */ out->magic = in[0]->magic; out->Xsize = in[0]->Xsize; out->Ysize = in[0]->Ysize; out->Bands = in[0]->Bands; out->Bbits = in[0]->Bbits; out->BandFmt = in[0]->BandFmt; out->Type = in[0]->Type; out->Coding = in[0]->Coding; out->Xres = in[0]->Xres; out->Yres = in[0]->Yres; out->Xoffset = in[0]->Xoffset; out->Yoffset = in[0]->Yoffset; /* Count number of images. */ for( ni = 0; in[ni]; ni++ ) ; /* Need to copy last-to-first so that in0 meta will override any * earlier meta. */ vips__meta_destroy( out ); for( i = ni - 1; i >= 0; i-- ) if( meta_cp( out, in[i] ) ) return( -1 ); /* Merge hists first to last. */ for( i = 0; in[i]; i++ ) out->history_list = vips__gslist_gvalue_merge( out->history_list, in[i]->history_list ); return( 0 ); } /** * vips_image_set: * @image: image to set the metadata on * @field: the name to give the metadata * @value: the GValue to copy into the image * * Set a piece of metadata on @image. Any old metadata with that name is * destroyed. The GValue is copied into the image, so you need to unset the * value when you're done with it. * * For example, to set an integer on an image (though you would use the * convenience function vips_image_set_int() in practice), you would need: * * |[ * GValue value = { 0 }; * * g_value_init( &value, G_TYPE_INT ); * g_value_set_int( &value, 42 ); * vips_image_set( image, field, &value ); * g_value_unset( &value ); * * return( 0 ); * ]| * * See also: vips_image_get(). */ void vips_image_set( VipsImage *image, const char *field, GValue *value ) { g_assert( field ); g_assert( value ); meta_init( image ); (void) meta_new( image, field, value ); #ifdef DEBUG meta_sanity( image ); #endif /*DEBUG*/ } /** * vips_image_get: * @image: image to get the field from from * @field: the name to give the metadata * @value_copy: the GValue is copied into this * * Fill @value_copy with a copy of the header field. @value_copy must be zeroed * but uninitialised. * * This will return -1 and add a message to the error buffer if the field * does not exist. Use vips_image_get_typeof() to test for the * existence * of a field first if you are not certain it will be there. * * For example, to read a double from an image (though of course you would use * vips_image_get_double() in practice): * * |[ * GValue value = { 0 }; * double d; * * if( vips_image_get( image, field, &value ) ) * return( -1 ); * * if( G_VALUE_TYPE( &value ) != G_TYPE_DOUBLE ) { * vips_error( "mydomain", * _( "field \"%s\" is of type %s, not double" ), * field, * g_type_name( G_VALUE_TYPE( &value ) ) ); * g_value_unset( &value ); * return( -1 ); * } * * d = g_value_get_double( &value ); * g_value_unset( &value ); * * return( 0 ); * ]| * * See also: vips_image_get_typeof(), vips_image_get_double(). * * Returns: 0 on success, -1 otherwise. */ int vips_image_get( const VipsImage *image, const char *field, GValue *value_copy ) { int i; VipsMeta *meta; g_assert( field ); g_assert( value_copy ); for( i = 0; i < VIPS_NUMBER( int_field ); i++ ) if( strcmp( field, int_field[i].field ) == 0 ) { g_value_init( value_copy, G_TYPE_INT ); g_value_set_int( value_copy, G_STRUCT_MEMBER( int, image, int_field[i].offset ) ); return( 0 ); } for( i = 0; i < VIPS_NUMBER( old_int_field ); i++ ) if( strcmp( field, old_int_field[i].field ) == 0 ) { g_value_init( value_copy, G_TYPE_INT ); g_value_set_int( value_copy, G_STRUCT_MEMBER( int, image, old_int_field[i].offset ) ); return( 0 ); } for( i = 0; i < VIPS_NUMBER( double_field ); i++ ) if( strcmp( field, double_field[i].field ) == 0 ) { g_value_init( value_copy, G_TYPE_DOUBLE ); g_value_set_double( value_copy, G_STRUCT_MEMBER( double, image, double_field[i].offset ) ); return( 0 ); } for( i = 0; i < VIPS_NUMBER( old_double_field ); i++ ) if( strcmp( field, old_double_field[i].field ) == 0 ) { g_value_init( value_copy, G_TYPE_DOUBLE ); g_value_set_double( value_copy, G_STRUCT_MEMBER( double, image, old_double_field[i].offset ) ); return( 0 ); } for( i = 0; i < VIPS_NUMBER( string_field ); i++ ) if( strcmp( field, string_field[i].field ) == 0 ) { g_value_init( value_copy, G_TYPE_STRING ); g_value_set_static_string( value_copy, G_STRUCT_MEMBER( char *, image, string_field[i].offset ) ); return( 0 ); } if( image->meta && (meta = g_hash_table_lookup( image->meta, field )) ) { g_value_init( value_copy, G_VALUE_TYPE( &meta->value ) ); g_value_copy( &meta->value, value_copy ); return( 0 ); } vips_error( "vips_image_get", _( "field \"%s\" not found" ), field ); return( -1 ); } /** * vips_image_get_typeof: * @image: image to test * @field: the name to search for * * Read the GType for a header field. Returns zero if there is no * field of that name. * * See also: vips_image_get(). * * Returns: the GType of the field, or zero if there is no * field of that name. */ GType vips_image_get_typeof( const VipsImage *image, const char *field ) { int i; VipsMeta *meta; g_assert( field ); for( i = 0; i < VIPS_NUMBER( int_field ); i++ ) if( strcmp( field, int_field[i].field ) == 0 ) return( G_TYPE_INT ); for( i = 0; i < VIPS_NUMBER( old_int_field ); i++ ) if( strcmp( field, old_int_field[i].field ) == 0 ) return( G_TYPE_INT ); for( i = 0; i < VIPS_NUMBER( double_field ); i++ ) if( strcmp( field, double_field[i].field ) == 0 ) return( G_TYPE_DOUBLE ); for( i = 0; i < VIPS_NUMBER( old_double_field ); i++ ) if( strcmp( field, old_double_field[i].field ) == 0 ) return( G_TYPE_DOUBLE ); for( i = 0; i < VIPS_NUMBER( string_field ); i++ ) if( strcmp( field, string_field[i].field ) == 0 ) return( G_TYPE_STRING ); if( image->meta && (meta = g_hash_table_lookup( image->meta, field )) ) return( G_VALUE_TYPE( &meta->value ) ); VIPS_DEBUG_MSG( "vips_image_get_typeof: unknown field %s\n", field ); return( 0 ); } /** * vips_image_remove: * @image: image to test * @field: the name to search for * * Find and remove an item of metadata. Return %FALSE if no metadata of that * name was found. * * See also: vips_image_set(), vips_image_get_typeof(). * * Returns: %TRUE if an item of metadata of that name was found and removed */ gboolean vips_image_remove( VipsImage *image, const char *field ) { if( image->meta && g_hash_table_remove( image->meta, field ) ) return( TRUE ); return( FALSE ); } static void * vips_image_map_fn( VipsMeta *meta, VipsImageMapFn fn, void *a ) { return( fn( meta->im, meta->field, &meta->value, a ) ); } /** * vips_image_map: (skip) * @image: image to map over * @fn: function to call for each header field * @a: user data for function * * This function calls @fn for every header field, including every item of * metadata. * * Like all _map functions, the user function should return %NULL to continue * iteration, or a non-%NULL pointer to indicate early termination. * * See also: vips_image_get_typeof(), vips_image_get(). * * Returns: %NULL on success, the failing pointer otherwise. */ void * vips_image_map( VipsImage *image, VipsImageMapFn fn, void *a ) { int i; GValue value = { 0 }; void *result; for( i = 0; i < VIPS_NUMBER( int_field ); i++ ) { vips_image_get( image, int_field[i].field, &value ); result = fn( image, int_field[i].field, &value, a ); g_value_unset( &value ); if( result ) return( result ); } for( i = 0; i < VIPS_NUMBER( double_field ); i++ ) { vips_image_get( image, double_field[i].field, &value ); result = fn( image, double_field[i].field, &value, a ); g_value_unset( &value ); if( result ) return( result ); } for( i = 0; i < VIPS_NUMBER( string_field ); i++ ) { vips_image_get( image, string_field[i].field, &value ); result = fn( image, string_field[i].field, &value, a ); g_value_unset( &value ); if( result ) return( result ); } if( image->meta_traverse && (result = vips_slist_map2( image->meta_traverse, (VipsSListMap2Fn) vips_image_map_fn, fn, a )) ) return( result ); return( NULL ); } /** * vips_image_set_area: * @image: image to attach the metadata to * @field: metadata name * @free_fn: (scope async): free function for @data * @data: pointer to area of memory * * Attaches @data as a metadata item on @image under the name @field. When * VIPS no longer needs the metadata, it will be freed with @free_fn. * * See also: vips_image_get_double(), vips_image_set() */ void vips_image_set_area( VipsImage *image, const char *field, VipsCallbackFn free_fn, void *data ) { GValue value = { 0 }; vips_value_set_area( &value, free_fn, data ); vips_image_set( image, field, &value ); g_value_unset( &value ); } static int meta_get_value( const VipsImage *image, const char *field, GType type, GValue *value_copy ) { if( vips_image_get( image, field, value_copy ) ) return( -1 ); if( G_VALUE_TYPE( value_copy ) != type ) { vips_error( "VipsImage", _( "field \"%s\" is of type %s, not %s" ), field, g_type_name( G_VALUE_TYPE( value_copy ) ), g_type_name( type ) ); g_value_unset( value_copy ); return( -1 ); } return( 0 ); } /** * vips_image_get_area: * @image: image to get the metadata from * @field: metadata name * @data: return metadata value * * Gets @data from @image under the name @field. A convenience * function over vips_image_get(). Use vips_image_get_typeof() to test for * the existance of a piece of metadata. * * See also: vips_image_set_area(), vips_image_get(), * vips_image_get_typeof() * * Returns: 0 on success, -1 otherwise. */ int vips_image_get_area( const VipsImage *image, const char *field, void **data ) { GValue value_copy = { 0 }; if( !meta_get_value( image, field, VIPS_TYPE_AREA, &value_copy ) ) { *data = vips_value_get_area( &value_copy, NULL ); g_value_unset( &value_copy ); return( 0 ); } return( -1 ); } /** * vips_image_set_blob: * @image: image to attach the metadata to * @field: metadata name * @free_fn: (scope async): free function for @data * @data: pointer to area of memory * @length: length of memory area * * Attaches @blob as a metadata item on @image under the name @field. A * convenience * function over vips_image_set() using an vips_blob. * * See also: vips_image_get_blob(), vips_image_set(). */ void vips_image_set_blob( VipsImage *image, const char *field, VipsCallbackFn free_fn, void *data, size_t length ) { GValue value = { 0 }; g_value_init( &value, VIPS_TYPE_BLOB ); vips_value_set_blob( &value, free_fn, data, length ); vips_image_set( image, field, &value ); g_value_unset( &value ); } /** * vips_image_get_blob: (skip) * @image: image to get the metadata from * @field: metadata name * @data: pointer to area of memory * @length: return the blob length here, optionally * * Gets @blob from @image under the name @field, optionally return its length in * @length. A convenience * function over vips_image_get(). Use vips_image_get_typeof() to test for the * existance * of a piece of metadata. * * See also: vips_image_get(), vips_image_get_typeof(), vips_blob_get(), * * Returns: 0 on success, -1 otherwise. */ int vips_image_get_blob( const VipsImage *image, const char *field, void **data, size_t *length ) { GValue value_copy = { 0 }; if( !meta_get_value( image, field, VIPS_TYPE_BLOB, &value_copy ) ) { *data = vips_value_get_blob( &value_copy, length ); g_value_unset( &value_copy ); return( 0 ); } return( -1 ); } /** * vips_image_get_int: * @image: image to get the header field from * @field: field name * @out: return field value * * Gets @out from @im under the name @field. This function searches for * int-valued fields. * * See also: vips_image_get(), vips_image_get_typeof() * * Returns: 0 on success, -1 otherwise. */ int vips_image_get_int( const VipsImage *image, const char *field, int *out ) { int i; GValue value_copy = { 0 }; for( i = 0; i < VIPS_NUMBER( int_field ); i++ ) if( strcmp( field, int_field[i].field ) == 0 ) { *out = G_STRUCT_MEMBER( int, image, int_field[i].offset ); return( 0 ); } for( i = 0; i < VIPS_NUMBER( old_int_field ); i++ ) if( strcmp( field, old_int_field[i].field ) == 0 ) { *out = G_STRUCT_MEMBER( int, image, old_int_field[i].offset ); return( 0 ); } if( !meta_get_value( image, field, G_TYPE_INT, &value_copy ) ) { *out = g_value_get_int( &value_copy ); g_value_unset( &value_copy ); return( 0 ); } return( -1 ); } /** * vips_image_set_int: * @image: image to attach the metadata to * @field: metadata name * @i: metadata value * * Attaches @i as a metadata item on @image under the name @field. A * convenience * function over vips_image_set(). * * See also: vips_image_get_int(), vips_image_set() */ void vips_image_set_int( VipsImage *image, const char *field, int i ) { GValue value = { 0 }; g_value_init( &value, G_TYPE_INT ); g_value_set_int( &value, i ); vips_image_set( image, field, &value ); g_value_unset( &value ); } /** * vips_image_get_double: * @image: image to get the header field from * @field: field name * @out: return field value * * Gets @out from @im under the name @field. * This function searches for * double-valued fields. * * See also: vips_image_get(), vips_image_get_typeof() * * Returns: 0 on success, -1 otherwise. */ int vips_image_get_double( const VipsImage *image, const char *field, double *out ) { int i; GValue value_copy = { 0 }; for( i = 0; i < VIPS_NUMBER( double_field ); i++ ) if( strcmp( field, double_field[i].field ) == 0 ) { *out = G_STRUCT_MEMBER( double, image, double_field[i].offset ); return( 0 ); } for( i = 0; i < VIPS_NUMBER( old_double_field ); i++ ) if( strcmp( field, old_double_field[i].field ) == 0 ) { *out = G_STRUCT_MEMBER( double, image, old_double_field[i].offset ); return( 0 ); } if( !meta_get_value( image, field, G_TYPE_DOUBLE, &value_copy ) ) { *out = g_value_get_double( &value_copy ); g_value_unset( &value_copy ); return( 0 ); } return( -1 ); } /** * vips_image_set_double: * @image: image to attach the metadata to * @field: metadata name * @d: metadata value * * Attaches @d as a metadata item on @image under the name @field. A * convenience * function over vips_image_set(). * * See also: vips_image_get_double(), vips_image_set() */ void vips_image_set_double( VipsImage *image, const char *field, double d ) { GValue value = { 0 }; g_value_init( &value, G_TYPE_DOUBLE ); g_value_set_double( &value, d ); vips_image_set( image, field, &value ); g_value_unset( &value ); } /** * vips_image_get_string: * @image: image to get the header field from * @field: field name * @out: return field value * * Gets @out from @im under the name @field. * This function searches for string-valued fields. * * Do not free @out. * * See also: vips_image_get(), vips_image_get_typeof() * * Returns: 0 on success, -1 otherwise. */ int vips_image_get_string( const VipsImage *image, const char *field, const char **out ) { int i; GValue value_copy = { 0 }; VipsArea *area; for( i = 0; i < VIPS_NUMBER( string_field ); i++ ) if( strcmp( field, string_field[i].field ) == 0 ) { *out = G_STRUCT_MEMBER( char *, image, string_field[i].offset ); return( 0 ); } if( !meta_get_value( image, field, VIPS_TYPE_REF_STRING, &value_copy ) ) { area = g_value_get_boxed( &value_copy ); *out = area->data; g_value_unset( &value_copy ); return( 0 ); } return( -1 ); } /** * vips_image_set_string: * @image: image to attach the metadata to * @field: metadata name * @str: metadata value * * Attaches @str as a metadata item on @image under the name @field. * A convenience * function over vips_image_set() using an vips_ref_string. * * See also: vips_image_get_double(), vips_image_set(), vips_ref_string */ void vips_image_set_string( VipsImage *image, const char *field, const char *str ) { GValue value = { 0 }; g_value_init( &value, VIPS_TYPE_REF_STRING ); vips_value_set_ref_string( &value, str ); vips_image_set( image, field, &value ); g_value_unset( &value ); } /** * vips_image_get_as_string: * @image: image to get the header field from * @field: field name * @out: return field value as string * * Gets @out from @im under the name @field. * This function will read any field, returning it as a printable string. * You need to free the string with g_free() when you are done with it. * * See also: vips_image_get(), vips_image_get_typeof(). * * Returns: 0 on success, -1 otherwise. */ int vips_image_get_as_string( const VipsImage *image, const char *field, char **out ) { GValue value = { 0 }; GType type; if( vips_image_get( image, field, &value ) ) return( -1 ); /* Display the save form, if there is one. This way we display * something useful for ICC profiles, xml fields, etc. */ type = G_VALUE_TYPE( &value ); if( g_value_type_transformable( type, VIPS_TYPE_SAVE_STRING ) ) { GValue save_value = { 0 }; g_value_init( &save_value, VIPS_TYPE_SAVE_STRING ); if( !g_value_transform( &value, &save_value ) ) return( -1 ); *out = g_strdup( vips_value_get_save_string( &save_value ) ); g_value_unset( &save_value ); } else *out = g_strdup_value_contents( &value ); g_value_unset( &value ); return( 0 ); } /** * vips_image_history_printf: * @image: add history line to this image * @format: printf() format string * @Varargs: arguments to format string * * Add a line to the image history. The @format and arguments are expanded, the * date and time is appended prefixed with a hash character, and the whole * string is appended to the image history and terminated with a newline. * * For example: * * |[ * vips_image_history_printf( image, "vips im_invert %s %s", * in->filename, out->filename ); * ]| * * Might add the string * * |[ * "vips im_invert /home/john/fred.v /home/john/jim.v # Fri Apr 3 23:30:35 * 2009\n" * ]| * * VIPS operations don't add history lines for you because a single action at * the application level might involve many VIPS operations. History must be * recorded by the application. * * Returns: 0 on success, -1 on error. */ int vips_image_history_printf( VipsImage *image, const char *fmt, ... ) { va_list args; char line[VIPS_PATH_MAX]; time_t timebuf; /* Format command. -40, to leave 26 for the ctime, three for the # and * a bit. */ va_start( args, fmt ); (void) vips_vsnprintf( line, VIPS_PATH_MAX - 40, fmt, args ); va_end( args ); strcat( line, " # " ); /* Add the date. ctime always attaches a '\n', gah. */ time( &timebuf ); strcat( line, ctime( &timebuf ) ); line[strlen( line ) - 1] = '\0'; #ifdef DEBUG printf( "vips_image_history_printf: " "adding:\n\t%s\nto history on image %p\n", line, image ); #endif /*DEBUG*/ image->history_list = g_slist_append( image->history_list, vips__gvalue_ref_string_new( line ) ); return( 0 ); } /** * vips_image_history_args: * @image: image to attach history line to * @name: program name * @argc: number of program arguments * @argv: program arguments * * Formats the name/argv as a single string and calls * vips_image_history_printf(). A * convenience function for command-line prorams. * * See also: vips_image_get_history(). * * Returns: 0 on success, -1 on error. */ int vips_image_history_args( VipsImage *image, const char *name, int argc, char *argv[] ) { int i; char txt[1024]; VipsBuf buf = VIPS_BUF_STATIC( txt ); vips_buf_appends( &buf, name ); for( i = 0; i < argc; i++ ) { vips_buf_appends( &buf, " " ); vips_buf_appends( &buf, argv[i] ); } if( vips_image_history_printf( image, "%s", vips_buf_all( &buf ) ) ) return( -1 ); return( 0 ); } /** * vips_image_get_history: * @image: get history from here * * This function reads the image history as a C string. The string is owned * by VIPS and must not be freed. * * VIPS tracks the history of each image, that is, the sequence of operations * that generated that image. Applications built on VIPS need to call * vips_image_history_printf() for each action they perform, setting the * command-line equivalent for the action. * * See also: vips_image_history_printf(). * * Returns: The history of @image as a C string. Do not free! */ const char * vips_image_get_history( VipsImage *image ) { if( !image->Hist ) image->Hist = vips__gslist_gvalue_get( image->history_list ); return( image->Hist ? image->Hist : "" ); } vips-7.38.5/libvips/iofuncs/vector.c0000644000175000017500000002013612303140253014277 00000000000000/* helper functions for Orc * * 29/10/10 * - from morph hacking */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* TODO - would setting params by index rather than name be any quicker? */ /* Verbose messages from Orc (or use ORC_DEBUG=99 on the command-line). #define DEBUG_ORC */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /* Cleared by the command-line --vips-novector switch and the IM_NOVECTOR env * var. */ gboolean vips__vector_enabled = TRUE; void vips_vector_init( void ) { #ifdef HAVE_ORC orc_init(); #ifdef DEBUG_ORC /* You can also do ORC_DEBUG=99 at the command-line. */ orc_debug_set_level( 99 ); #endif /*DEBUG_ORC*/ /* Look for the environment variable IM_NOVECTOR and use that to turn * off as well. */ if( g_getenv( "IM_NOVECTOR" ) ) vips__vector_enabled = FALSE; #endif /*HAVE_ORC*/ } gboolean vips_vector_isenabled( void ) { #ifdef HAVE_ORC return( vips__vector_enabled ); #else /*!HAVE_ORC*/ return( FALSE ); #endif /*HAVE_ORC*/ } void vips_vector_set_enabled( gboolean enabled ) { vips__vector_enabled = enabled; } void vips_vector_free( VipsVector *vector ) { #ifdef HAVE_ORC VIPS_FREEF( orc_program_free, vector->program ); #endif /*HAVE_ORC*/ VIPS_FREE( vector ); } VipsVector * vips_vector_new( const char *name, int dsize ) { VipsVector *vector; int i; if( !(vector = VIPS_NEW( NULL, VipsVector )) ) return( NULL ); vector->name = name; vector->n_temp = 0; vector->n_scanline = 0; vector->n_source = 0; vector->n_destination = 0; vector->n_constant = 0; vector->n_parameter = 0; vector->n_instruction = 0; for( i = 0; i < VIPS_VECTOR_SOURCE_MAX; i++ ) { vector->s[i] = -1; vector->sl[i] = -1; } vector->d1 = -1; vector->compiled = FALSE; #ifdef HAVE_ORC vector->program = orc_program_new(); /* We always make d1, our callers make either a single point source, or * for area ops, a set of scanlines. */ vector->d1 = orc_program_add_destination( vector->program, dsize, "d1" ); vector->n_destination += 1; #endif /*HAVE_ORC*/ return( vector ); } void vips_vector_asm2( VipsVector *vector, const char *op, const char *a, const char *b ) { vector->n_instruction += 1; #ifdef DEBUG printf( " %s %s %s\n", op, a, b ); #endif /*DEBUG*/ #ifdef HAVE_ORC orc_program_append_ds_str( vector->program, op, a, b ); #endif /*HAVE_ORC*/ } void vips_vector_asm3( VipsVector *vector, const char *op, const char *a, const char *b, const char *c ) { vector->n_instruction += 1; #ifdef DEBUG printf( " %s %s %s %s\n", op, a, b, c ); #endif /*DEBUG*/ #ifdef HAVE_ORC orc_program_append_str( vector->program, op, a, b, c ); #endif /*HAVE_ORC*/ } void vips_vector_constant( VipsVector *vector, char *name, int value, int size ) { #ifdef HAVE_ORC char *sname; if( size == 1 ) sname = "b"; else if( size == 2 ) sname = "w"; else if( size == 4 ) sname = "l"; else { printf( "vips_vector_constant: bad constant size\n" ); /* Not really correct, heh. */ sname = "x"; } if( value > 0 ) vips_snprintf( name, 256, "c%d%s", value, sname ); else vips_snprintf( name, 256, "cm%d%s", -value, sname ); if( orc_program_find_var_by_name( vector->program, name ) == -1 ) { orc_program_add_constant( vector->program, size, value, name ); vector->n_constant += 1; } #endif /*HAVE_ORC*/ } int vips_vector_source_name( VipsVector *vector, char *name, int size ) { int var; #ifdef HAVE_ORC g_assert( orc_program_find_var_by_name( vector->program, name ) == -1 ); vector->s[vector->n_source] = var = orc_program_add_source( vector->program, size, name ); vector->n_source += 1; #else /*!HAVE_ORC*/ var = -1; #endif /*HAVE_ORC*/ return( var ); } void vips_vector_source_scanline( VipsVector *vector, char *name, int line, int size ) { #ifdef HAVE_ORC vips_snprintf( name, 256, "sl%d", line ); if( orc_program_find_var_by_name( vector->program, name ) == -1 ) { int var; var = orc_program_add_source( vector->program, size, name ); vector->sl[vector->n_scanline] = var; vector->line[vector->n_scanline] = line; vector->n_scanline += 1; } #endif /*HAVE_ORC*/ } void vips_vector_temporary( VipsVector *vector, char *name, int size ) { #ifdef HAVE_ORC g_assert( orc_program_find_var_by_name( vector->program, name ) == -1 ); orc_program_add_temporary( vector->program, size, name ); vector->n_temp += 1; #endif /*HAVE_ORC*/ } gboolean vips_vector_full( VipsVector *vector ) { /* We can need a max of 2 constants plus one source per * coefficient, so stop if we're sure we don't have enough. */ if( vector->n_constant > 16 - 2 ) return( TRUE ); /* You can have 8 parameters, and d1 counts as one of them, so +1 * there. */ if( vector->n_source + vector->n_scanline + 1 > 7 ) return( TRUE ); /* I seem to get segvs with I counts over about 50 :-( argh. After * signalling full, some operations will add up to 4 more instructions * as they finish up. Leave a margin. */ if( vector->n_instruction > 42 ) return( TRUE ); return( FALSE ); } gboolean vips_vector_compile( VipsVector *vector ) { #ifdef HAVE_ORC OrcCompileResult result; result = orc_program_compile( vector->program ); if( !ORC_COMPILE_RESULT_IS_SUCCESSFUL( result ) ) { #ifdef DEBUG printf( "*** error compiling %s\n", vector->name ); #endif /*DEBUG*/ return( FALSE ); } vector->compiled = TRUE; #endif /*HAVE_ORC*/ return( TRUE ); } void vips_vector_print( VipsVector *vector ) { int i; printf( "%s: ", vector->name ); if( vector->compiled ) printf( "successfully compiled\n" ); else printf( "not compiled\n" ); printf( " n_scanline = %d\n", vector->n_scanline ); for( i = 0; i < vector->n_scanline; i++ ) printf( " var %d = line %d\n", vector->sl[i], vector->line[i] ); printf( " n_source = %d\n", vector->n_source ); for( i = 0; i < vector->n_source; i++ ) printf( " var %d\n", vector->s[i] ); printf( " n_parameter = %d\n", vector->n_parameter ); printf( " n_destination = %d\n", vector->n_destination ); printf( " n_constant = %d\n", vector->n_constant ); printf( " n_temp = %d\n", vector->n_temp ); printf( " n_instruction = %d\n", vector->n_instruction ); } void vips_executor_set_program( VipsExecutor *executor, VipsVector *vector, int n ) { #ifdef HAVE_ORC executor->vector = vector; orc_executor_set_program( &executor->executor, vector->program ); orc_executor_set_n( &executor->executor, n ); #endif /*HAVE_ORC*/ } void vips_executor_set_array( VipsExecutor *executor, int var, void *value ) { #ifdef HAVE_ORC if( var != -1 ) orc_executor_set_array( &executor->executor, var, value ); #endif /*HAVE_ORC*/ } void vips_executor_set_scanline( VipsExecutor *executor, VipsRegion *ir, int x, int y ) { VipsVector *vector = executor->vector; VipsPel *base = VIPS_REGION_ADDR( ir, x, y ); int lsk = VIPS_REGION_LSKIP( ir ); int i; for( i = 0; i < vector->n_scanline; i++ ) { vips_executor_set_array( executor, vector->sl[i], base + vector->line[i] * lsk ); } } void vips_executor_set_destination( VipsExecutor *executor, void *value ) { VipsVector *vector = executor->vector; vips_executor_set_array( executor, vector->d1, value ); } void vips_executor_run( VipsExecutor *executor ) { #ifdef HAVE_ORC orc_executor_run( &executor->executor ); #endif /*HAVE_ORC*/ } vips-7.38.5/libvips/iofuncs/semaphore.c0000644000175000017500000000604412303140253014762 00000000000000/* Support for thread stuff. * * JC & KM 9/5/94 * Modified: * 28/11/94 JC * - return(0) missing from tidy_thread_info() * 4/8/99 RP JC * - reorganised for POSIX * 28/3/11 * - moved to vips_ namespace */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_IO */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include void vips_semaphore_init( VipsSemaphore *s, int v, char *name ) { s->v = v; s->name = name; s->mutex = vips_g_mutex_new(); s->cond = vips_g_cond_new(); } void vips_semaphore_destroy( VipsSemaphore *s ) { VIPS_FREEF( vips_g_mutex_free, s->mutex ); VIPS_FREEF( vips_g_cond_free, s->cond ); } /* Add n to the semaphore and signal any threads that are blocked waiting * a change. */ int vips_semaphore_upn( VipsSemaphore *s, int n ) { int value_after_op; g_mutex_lock( s->mutex ); s->v += n; value_after_op = s->v; /* If we are only incrementing by one, we only need to wake a single * thread. If we are incrementing by a lot, we must wake all threads. */ if( n == 1 ) g_cond_signal( s->cond ); else g_cond_broadcast( s->cond ); g_mutex_unlock( s->mutex ); #ifdef DEBUG_IO printf( "vips_semaphore_upn(\"%s\",%d) = %d\n", s->name, n, value_after_op ); if( value_after_op > 1 ) vips_error( "vips_semaphore_upn", "up over 1!" ); #endif /*DEBUG_IO*/ return( value_after_op ); } /* Increment the semaphore. */ int vips_semaphore_up( VipsSemaphore *s ) { return( vips_semaphore_upn( s, 1 ) ); } /* Wait for sem>n, then subtract n. */ int vips_semaphore_downn( VipsSemaphore *s, int n ) { int value_after_op; VIPS_GATE_START( "vips_semaphore_downn: wait" ); g_mutex_lock( s->mutex ); while( s->v < n ) g_cond_wait( s->cond, s->mutex ); s->v -= n; value_after_op = s->v; g_mutex_unlock( s->mutex ); #ifdef DEBUG_IO printf( "vips_semaphore_downn(\"%s\",%d): %d\n", s->name, n, value_after_op ); #endif /*DEBUG_IO*/ VIPS_GATE_STOP( "vips_semaphore_downn: wait" ); return( value_after_op ); } /* Wait for sem > 0, then decrement. */ int vips_semaphore_down( VipsSemaphore *s ) { return( vips_semaphore_downn( s, 1 ) ); } vips-7.38.5/libvips/iofuncs/error.c0000644000175000017500000007516412303140253014141 00000000000000/* error.c --- error message handling * * Copyright: N. Dessipris * Written on: 18/03/1991 * Updated on: 9/7/92 KM * 20/12/2003 JC * - i18n added, domain now separate arg * 14/2/07 * - lock around error buffer changes * 20/2/08 * - lock around warnings and diagnostics too, why not * 2/10/09 * - error_exit() moved here * - gtkdoc comments * 24/6/10 * - fmt to error_exit() may be NULL */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include #include #ifdef OS_WIN32 #include #include #endif /*OS_WIN32*/ /** * SECTION: error * @short_description: error messages and error handling * @stability: Stable * @include: vips/vips.h * * VIPS maintains an error buffer (a log of localised text messages), * a set of functions * for adding messages, and a way to access and clear the buffer. * * The error buffer is global, that is, it is shared between all threads. You * can add to the buffer from any thread (there is a lock to prevent * corruption), but it's sensible to only read and clear the buffer from the * main thread of execution. * * The general principle is: if you detect an error, log a message for the * user. If a function you call detects an error, just propogate it and don't * add another message. * * |[ * IMAGE *im; * * if( !(im = vips_image_new_from_file( filename )) ) * // vips_image_new_from_file() will set a message, we don't need to * return( -1 ); * * if( vips_image_get_width( im ) < 100 ) { * // we have detected an error, we must set a message * vips_error( "myprogram", "%s", _( "width too small" ) ); * return( -1 ); * } * ]| * * The domain argument most of these functions take is not localised and is * supposed to indicate the component which failed. */ /* Show info messages. Handy for debugging. */ int vips__info = 0; /* Make global array to keep the error message buffer. */ #define VIPS_MAX_ERROR (10240) static char vips_error_text[VIPS_MAX_ERROR] = ""; static VipsBuf vips_error_buf = VIPS_BUF_STATIC( vips_error_text ); static int vips_error_freeze_count = 0; /** * vips_error_freeze: * * Stop errors being logged. Use vips_error_thaw() to unfreeze. You can * nest freeze/thaw pairs. */ void vips_error_freeze( void ) { g_mutex_lock( vips__global_lock ); g_assert( vips_error_freeze_count >= 0 ); vips_error_freeze_count += 1; g_mutex_unlock( vips__global_lock ); } /** * vips_error_thaw: * * Reenable error logging. */ void vips_error_thaw( void ) { g_mutex_lock( vips__global_lock ); vips_error_freeze_count -= 1; g_assert( vips_error_freeze_count >= 0 ); g_mutex_unlock( vips__global_lock ); } /** * vips_error_buffer: * * Get a pointer to the start of the error buffer as a C string. * The string is owned by the error system and must not be freed. * * See also: vips_error_clear(). * * Returns: the error buffer as a C string which must not be freed */ const char * vips_error_buffer( void ) { const char *msg; g_mutex_lock( vips__global_lock ); msg = vips_buf_all( &vips_error_buf ); g_mutex_unlock( vips__global_lock ); return( msg ); } /* Some systems do not have va_copy() ... this might work (it does on MSVC), * apparently. * * FIXME ... this should be in configure.in */ #ifndef va_copy #define va_copy(d,s) ((d) = (s)) #endif /** * vips_verror: * @domain: the source of the error * @fmt: printf()-style format string for the error * @ap: arguments to the format string * * Append a message to the error buffer. * * See also: vips_error(). */ void vips_verror( const char *domain, const char *fmt, va_list ap ) { #ifdef VIPS_DEBUG { char txt[256]; VipsBuf buf = VIPS_BUF_STATIC( txt ); va_list ap2; vips_buf_appendf( &buf, "%s: ", domain ); va_copy( ap2, ap ); vips_buf_vappendf( &buf, fmt, ap2 ); vips_buf_appends( &buf, "\n" ); VIPS_DEBUG_MSG( "vips_verror: %s", vips_buf_all( &buf ) ); } #endif /*VIPS_DEBUG*/ g_mutex_lock( vips__global_lock ); g_assert( vips_error_freeze_count >= 0 ); if( !vips_error_freeze_count ) { vips_buf_appendf( &vips_error_buf, "%s: ", domain ); vips_buf_vappendf( &vips_error_buf, fmt, ap ); vips_buf_appends( &vips_error_buf, "\n" ); } g_mutex_unlock( vips__global_lock ); if( vips__fatal ) vips_error_exit( "vips__fatal" ); } /** * vips_error: * @domain: the source of the error * @fmt: printf()-style format string for the error * @Varargs: arguments to the format string * * Format the string in the style of printf() and append to the error buffer. * * See also: vips_error_system(), vips_verror(). */ void vips_error( const char *domain, const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); vips_verror( domain, fmt, ap ); va_end( ap ); } /** * vips_verror_system: * @err: the system error code * @domain: the source of the error * @fmt: printf()-style format string for the error * @ap: arguments to the format string * * Format the string in the style of printf() and append to the error buffer. * Then create and append a localised message based on the system error code, * usually the value of errno. * * See also: vips_error_system(). */ void vips_verror_system( int err, const char *domain, const char *fmt, va_list ap ) { vips_verror( domain, fmt, ap ); #ifdef OS_WIN32 { char *buf; if( FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), (LPSTR) &buf, 0, NULL ) ) { vips_error( _( "windows error" ), "%s", buf ); LocalFree( buf ); } } #else /*OS_WIN32*/ { char *buf; buf = g_locale_to_utf8( strerror( err ), -1, NULL, NULL, NULL ); vips_error( _( "unix error" ), "%s", buf ); g_free( buf ); } #endif /*OS_WIN32*/ } /** * vips_error_system: * @err: the system error code * @domain: the source of the error * @fmt: printf()-style format string for the error * @Varargs: arguments to the format string * * Format the string in the style of printf() and append to the error buffer. * Then create and append a localised message based on the system error code, * usually the value of errno. * * See also: vips_verror_system(). */ void vips_error_system( int err, const char *domain, const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); vips_verror_system( err, domain, fmt, ap ); va_end( ap ); } /** * vips_error_g: * @error: glib error pointer * * This function sets the glib error pointer from the vips error buffer and * clears it. It's handy for returning errors to glib functions from vips. * * See also: g_set_error(). */ void vips_error_g( GError **error ) { static GQuark vips_domain = 0; if( !vips_domain ) vips_domain = g_quark_from_string( "libvips" ); /* glib does not expect a trailing '\n' and vips always has one. */ g_mutex_lock( vips__global_lock ); vips_buf_removec( &vips_error_buf, '\n' ); g_mutex_unlock( vips__global_lock ); g_set_error( error, vips_domain, -1, "%s", vips_error_buffer() ); vips_error_clear(); } /** * vips_error_clear: * * Clear and reset the error buffer. This is typically called after presenting * an error to the user. * * See also: vips_error_buffer(). */ void vips_error_clear( void ) { g_mutex_lock( vips__global_lock ); vips_buf_rewind( &vips_error_buf ); g_mutex_unlock( vips__global_lock ); } /** * vips_vinfo: * @domain: the source of the message * @fmt: printf()-style format string for the message * @ap: arguments to the format string * * Sends a formatted informational message to stderr if the --vips-info flag * has been given to the program or the environment variable IM_INFO has been * defined. * * Informational messages are used to report details about the operation of * functions. * * See also: vips_info(), vips_warn(). */ void vips_vinfo( const char *domain, const char *fmt, va_list ap ) { if( vips__info ) { g_mutex_lock( vips__global_lock ); (void) fprintf( stderr, _( "%s: " ), _( "info" ) ); if( domain ) (void) fprintf( stderr, _( "%s: " ), domain ); (void) vfprintf( stderr, fmt, ap ); (void) fprintf( stderr, "\n" ); g_mutex_unlock( vips__global_lock ); } } /** * vips_info: * @domain: the source of the diagnostic message * @fmt: printf()-style format string for the message * @Varargs: arguments to the format string * * Sends a formatted informational message to stderr if the --vips-info flag * has been given to the program or the environment variable IM_INFO has been * defined. * * Informational messages are used to report details about the operation of * functions. * * See also: vips_vdiag(), vips_warn(). */ void vips_info( const char *domain, const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); vips_vinfo( domain, fmt, ap ); va_end( ap ); } /** * vips_vwarn: * @domain: the source of the warning message * @fmt: printf()-style format string for the message * @ap: arguments to the format string * * Sends a formatted warning message to stderr. If you define the * environment variable IM_WARNING, these message are surpressed. * * Warning messages are used to report things like overflow counts. * * See also: vips_info(), vips_warn(). */ void vips_vwarn( const char *domain, const char *fmt, va_list ap ) { if( !g_getenv( "IM_WARNING" ) ) { g_mutex_lock( vips__global_lock ); (void) fprintf( stderr, _( "%s: " ), _( "vips warning" ) ); if( domain ) (void) fprintf( stderr, _( "%s: " ), domain ); (void) vfprintf( stderr, fmt, ap ); (void) fprintf( stderr, "\n" ); g_mutex_unlock( vips__global_lock ); } if( vips__fatal ) vips_error_exit( "vips__fatal" ); } /** * vips_warn: * @domain: the source of the warning message * @fmt: printf()-style format string for the message * @Varargs: arguments to the format string * * Sends a formatted warning message to stderr. If you define the * environment variable IM_WARNING, these message are surpressed. * * Warning messages are used to report things like overflow counts. * * See also: vips_info(), vips_vwarn(). */ void vips_warn( const char *domain, const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); vips_vwarn( domain, fmt, ap ); va_end( ap ); } /** * vips_error_exit: * @fmt: printf()-style format string for the message * @Varargs: arguments to the format string * * Sends a formatted error message to stderr, then sends the contents of the * error buffer, if any, then shuts down vips and terminates the program with * an error code. * * @fmt may be %NULL, in which case only the error buffer is printed before * exiting. * * See also: vips_error(). */ void vips_error_exit( const char *fmt, ... ) { if( fmt ) { va_list ap; fprintf( stderr, "%s: ", g_get_prgname() ); va_start( ap, fmt ); (void) vfprintf( stderr, fmt, ap ); va_end( ap ); fprintf( stderr, "\n" ); } fprintf( stderr, "%s", vips_error_buffer() ); vips_shutdown(); if( vips__fatal ) abort(); else exit( 1 ); } /** * vips_check_uncoded: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is not coded. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 on OK, or -1 on error. */ int vips_check_uncoded( const char *domain, VipsImage *im ) { if( im->Coding != VIPS_CODING_NONE ) { vips_error( domain, "%s", _( "image must be uncoded" ) ); return( -1 ); } return( 0 ); } /** * vips_check_coding_noneorlabq: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is uncoded or LABQ coded. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 on OK, or -1 on error. */ int vips_check_coding_noneorlabq( const char *domain, VipsImage *im ) { /* These all have codings that extract/ifthenelse/etc can ignore. */ if( im->Coding != VIPS_CODING_NONE && im->Coding != VIPS_CODING_LABQ ) { vips_error( domain, "%s", _( "image coding must be 'none' or 'labq'" ) ); return( -1 ); } return( 0 ); } /** * vips_check_coding_known: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is uncoded, LABQ coded or RAD coded. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 on OK, or -1 on error. */ int vips_check_coding_known( const char *domain, VipsImage *im ) { /* These all have codings that extract/ifthenelse/etc can ignore. */ if( im->Coding != VIPS_CODING_NONE && im->Coding != VIPS_CODING_LABQ && im->Coding != VIPS_CODING_RAD ) { vips_error( domain, "%s", _( "unknown image coding" ) ); return( -1 ); } return( 0 ); } /** * vips_check_coding: * @domain: the originating domain for the error message * @im: image to check * @coding: required coding * * Check that the image has the required @coding. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 on OK, or -1 on error. */ int vips_check_coding( const char *domain, VipsImage *im, VipsCoding coding ) { if( im->Coding != coding ) { vips_error( domain, _( "coding '%s' only" ), vips_enum_nick( VIPS_TYPE_CODING, coding ) ); return( -1 ); } return( 0 ); } /** * vips_check_mono: * @domain: the originating domain for the error message * @im: image to check * * Check that the image has exactly one band. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_mono( const char *domain, VipsImage *im ) { if( im->Bands != 1 ) { vips_error( domain, "%s", _( "image must one band" ) ); return( -1 ); } return( 0 ); } /** * vips_check_bands: * @domain: the originating domain for the error message * @im: image to check * @bands: must have this many bands * * Check that the image has @bands bands. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_bands( const char *domain, VipsImage *im, int bands ) { if( im->Bands != bands ) { vips_error( domain, _( "image must have %d bands" ), bands ); return( -1 ); } return( 0 ); } /** * vips_check_bands_1or3: * @domain: the originating domain for the error message * @im: image to check * * Check that the image has either one or three bands. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_bands_1or3( const char *domain, VipsImage *im ) { if( im->Bands != 1 && im->Bands != 3 ) { vips_error( domain, "%s", _( "image must have one or three bands" ) ); return( -1 ); } return( 0 ); } /** * vips_check_bands_atleast: * @domain: the originating domain for the error message * @im: image to check * @bands: at least this many bands * * Check that the image has at least @bands bands. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_bands_atleast( const char *domain, VipsImage *im, int bands ) { if( im->Bands < bands ) { vips_error( domain, _( "image must have at least %d bands" ), bands ); return( -1 ); } return( 0 ); } /** * vips_check_bands_1orn: * @domain: the originating domain for the error message * @im1: first image to check * @im2: second image to check * * Check that the images have the same number of bands, or that one of the * images has just 1 band. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 on OK, or -1 on error. */ int vips_check_bands_1orn( const char *domain, VipsImage *im1, VipsImage *im2 ) { if( im1->Bands != im2->Bands && (im1->Bands != 1 && im2->Bands != 1) ) { vips_error( domain, "%s", _( "images must have the same number of bands, " "or one must be single-band" ) ); return( -1 ); } return( 0 ); } /** * vips_check_bands_1orn_unary: * @domain: the originating domain for the error message * @im: image to check * @n: number of bands, or 1 * * Check that an image has 1 or @n bands. Handy for unary operations, cf. * vips_check_bands_1orn(). * If not, set an error message * and return non-zero. * * See also: vips_check_bands_1orn(). * * Returns: 0 on OK, or -1 on error. */ int vips_check_bands_1orn_unary( const char *domain, VipsImage *im, int n ) { if( im->Bands != 1 && im->Bands != n ) { vips_error( domain, _( "image must have 1 or %d bands" ), n ); return( -1 ); } return( 0 ); } /** * vips_check_noncomplex: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is not complex. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_noncomplex( const char *domain, VipsImage *im ) { if( vips_band_format_iscomplex( im->BandFmt ) ) { vips_error( domain, "%s", _( "image must be non-complex" ) ); return( -1 ); } return( 0 ); } /** * vips_check_complex: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is complex. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_complex( const char *domain, VipsImage *im ) { if( !vips_band_format_iscomplex( im->BandFmt ) ) { vips_error( domain, "%s", _( "image must be complex" ) ); return( -1 ); } return( 0 ); } /** * vips_check_format: * @domain: the originating domain for the error message * @im: image to check * @fmt: format to test for * * Check that the image has the specified format. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_format( const char *domain, VipsImage *im, VipsBandFormat fmt ) { if( im->BandFmt != fmt ) { vips_error( domain, _( "image must be %s" ), vips_enum_string( VIPS_TYPE_BAND_FORMAT, fmt ) ); return( -1 ); } return( 0 ); } /** * vips_check_int: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is in one of the integer formats. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_int( const char *domain, VipsImage *im ) { if( !vips_band_format_isint( im->BandFmt ) ) { vips_error( domain, "%s", _( "image must be integer" ) ); return( -1 ); } return( 0 ); } /** * vips_check_uint: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is in one of the unsigned integer formats. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_uint( const char *domain, VipsImage *im ) { if( !vips_band_format_isuint( im->BandFmt ) ) { vips_error( domain, "%s", _( "image must be unsigned integer" ) ); return( -1 ); } return( 0 ); } /** * vips_check_8or16: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is 8 or 16-bit integer, signed or unsigned. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_8or16( const char *domain, VipsImage *im ) { if( im->BandFmt != VIPS_FORMAT_UCHAR && im->BandFmt != VIPS_FORMAT_USHORT && im->BandFmt != VIPS_FORMAT_CHAR && im->BandFmt != VIPS_FORMAT_SHORT ) { vips_error( domain, "%s", _( "image must be 8- or 16-bit integer, " "signed or unsigned" ) ); return( -1 ); } return( 0 ); } /** * vips_check_u8or16: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is 8 or 16-bit unsigned integer. * Otherwise set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_u8or16( const char *domain, VipsImage *im ) { if( im->BandFmt != VIPS_FORMAT_UCHAR && im->BandFmt != VIPS_FORMAT_USHORT ) { vips_error( domain, "%s", _( "image must be 8- or 16-bit unsigned integer" ) ); return( -1 ); } return( 0 ); } /** * vips_check_u8or16orf: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is 8 or 16-bit unsigned integer, or float. * Otherwise set an error message and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_u8or16orf( const char *domain, VipsImage *im ) { if( im->BandFmt != VIPS_FORMAT_UCHAR && im->BandFmt != VIPS_FORMAT_USHORT && im->BandFmt != VIPS_FORMAT_FLOAT ) { vips_error( domain, "%s", _( "image must be 8- or 16-bit unsigned integer, " "or float" ) ); return( -1 ); } return( 0 ); } /** * vips_check_uintorf: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is unsigned int or float. * Otherwise set an error message and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_uintorf( const char *domain, VipsImage *im ) { if( im->BandFmt != VIPS_FORMAT_UCHAR && im->BandFmt != VIPS_FORMAT_USHORT && im->BandFmt != VIPS_FORMAT_UINT && im->BandFmt != VIPS_FORMAT_FLOAT ) { vips_error( domain, "%s", _( "image must be unsigned int or float" ) ); return( -1 ); } return( 0 ); } /** * vips_check_size_same: * @domain: the originating domain for the error message * @im1: first image to check * @im2: second image to check * * Check that the images have the same size. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_size_same( const char *domain, VipsImage *im1, VipsImage *im2 ) { if( im1->Xsize != im2->Xsize || im1->Ysize != im2->Ysize ) { vips_error( domain, "%s", _( "images must match in size" ) ); return( -1 ); } return( 0 ); } /** * vips_check_oddsquare: * @domain: the originating domain for the error message * @im: image to check * * Check that the image is square and that the sides are odd. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_oddsquare( const char *domain, VipsImage *im ) { if( im->Xsize != im->Ysize || im->Xsize % 2 == 0 ) { vips_error( domain, "%s", _( "images must be odd and square" ) ); return( -1 ); } return( 0 ); } /** * vips_check_bands_same: * @domain: the originating domain for the error message * @im1: first image to check * @im2: second image to check * * Check that the images have the same number of bands. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_bands_same( const char *domain, VipsImage *im1, VipsImage *im2 ) { if( im1->Bands != im2->Bands ) { vips_error( domain, "%s", _( "images must have the same number of bands" ) ); return( -1 ); } return( 0 ); } /** * vips_check_bandno: * @domain: the originating domain for the error message * @im: image to check * @bandno: band number * * @bandno should be a valid band number (ie. 0 to im->Bands - 1), or can be * -1, meaning all bands. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_bandno( const char *domain, VipsImage *im, int bandno ) { if( bandno < -1 || bandno > im->Bands - 1 ) { vips_error( domain, "bandno must be -1, or less than %d", im->Bands ); return( -1 ); } return( 0 ); } /** * vips_check_format_same: * @domain: the originating domain for the error message * @im1: first image to check * @im2: second image to check * * Check that the images have the same format. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_format_same( const char *domain, VipsImage *im1, VipsImage *im2 ) { if( im1->BandFmt != im2->BandFmt ) { vips_error( domain, "%s", _( "images must have the same band format" ) ); return( -1 ); } return( 0 ); } /** * vips_check_coding_same: * @domain: the originating domain for the error message * @im1: first image to check * @im2: second image to check * * Check that the images have the same coding. * If not, set an error message * and return non-zero. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_coding_same( const char *domain, VipsImage *im1, VipsImage *im2 ) { if( im1->Coding != im2->Coding ) { vips_error( domain, "%s", _( "images must have the same coding" ) ); return( -1 ); } return( 0 ); } /** * vips_check_vector_length: * @domain: the originating domain for the error message * @n: number of elements in vector * @len: number of elements vector should have * * Check that @n == @len. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_vector_length( const char *domain, int n, int len ) { if( n != len ) { vips_error( domain, _( "vector must have %d elements" ), len ); return( -1 ); } return( 0 ); } /** * vips_check_vector: * @domain: the originating domain for the error message * @n: number of elements in vector * @im: image to check against * * Operations with a vector constant need a 1-element vector, or a vector with * the same number of elements as there are bands in the image. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_vector( const char *domain, int n, VipsImage *im ) { if( n != 1 && im->Bands != 1 && n != im->Bands ) { vips_error( domain, _( "vector must have 1 or %d elements" ), im->Bands ); return( -1 ); } return( 0 ); } /** * vips_check_hist: * @domain: the originating domain for the error message * @im: image to check * * Histogram images must have width or height 1, and must not have more than * 65536 elements. Return 0 if the image will pass as a histogram, or -1 and * set an error message otherwise. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_hist( const char *domain, VipsImage *im ) { if( im->Xsize != 1 && im->Ysize != 1 ) { vips_error( domain, "%s", _( "histograms must have width or height 1" ) ); return( -1 ); } if( VIPS_IMAGE_N_PELS( im ) > 65536 ) { vips_error( domain, "%s", _( "histograms must have not have more than " "65536 elements" ) ); return( -1 ); } return( 0 ); } /** * vips_check_matrix: * @domain: the originating domain for the error message * @im: image to check * @out: put image as in-memory doubles here * * Matrix images must have width and height less than 100000 and have 1 band. * * Return 0 if the image will pass as a matrix, or -1 and set an error * message otherwise. * * @out is set to be @im cast to double and stored in memory. Use * VIPS_MATRIX() to address values in @out. * * You must unref @out when you are done with it. * * See also: VIPS_MATRIX(), vips_object_local() * * Returns: 0 if OK, -1 otherwise. */ int vips_check_matrix( const char *domain, VipsImage *im, VipsImage **out ) { *out = NULL; if( im->Xsize > 100000 || im->Ysize > 100000 ) { vips_error( domain, "%s", _( "matrix image too large" ) ); return( -1 ); } if( im->Bands != 1 ) { vips_error( domain, "%s", _( "matrix image must have one band" ) ); return( -1 ); } if( vips_cast( im, out, VIPS_FORMAT_DOUBLE, NULL ) ) return( -1 ); if( vips_image_wio_input( *out ) ) return( -1 ); return( 0 ); } /** * vips_check_separable: * @domain: the originating domain for the error message * @im: image to check * * Separable matrix images must have width or height 1. * Return 0 if the image will pass, or -1 and * set an error message otherwise. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_separable( const char *domain, VipsImage *im ) { if( im->Xsize != 1 && im->Ysize != 1 ) { vips_error( domain, "%s", _( "separable matrix images must have " "width or height 1" ) ); return( -1 ); } return( 0 ); } /** * vips_check_imask: (skip) * @domain: the originating domain for the error message * @mask: mask to check * * Sanity-check a mask parameter. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_imask( const char *domain, INTMASK *mask ) { if( !mask || mask->xsize > 1000 || mask->ysize > 1000 || mask->xsize <= 0 || mask->ysize <= 0 || mask->scale == 0 || !mask->coeff ) { vips_error( domain, "%s", _( "nonsense mask parameters" ) ); return( -1 ); } return( 0 ); } /** * vips_check_dmask: (skip) * @domain: the originating domain for the error message * @mask: mask to check * * Sanity-check a mask parameter. * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_dmask( const char *domain, DOUBLEMASK *mask ) { if( !mask || mask->xsize > 1000 || mask->ysize > 1000 || mask->xsize <= 0 || mask->ysize <= 0 || mask->scale == 0 || !mask->coeff ) { vips_error( domain, "%s", _( "nonsense mask parameters" ) ); return( -1 ); } return( 0 ); } /** * vips_check_dmask_1d: (skip) * @domain: the originating domain for the error message * @mask: mask to check * * A mask must be one-dimensional (width or height 1). * * See also: vips_error(). * * Returns: 0 if OK, -1 otherwise. */ int vips_check_dmask_1d( const char *domain, DOUBLEMASK *mask ) { if( vips_check_dmask( domain, mask ) ) return( -1 ); if( mask->xsize != 1 && mask->ysize != 1 ) { vips_error( domain, "%s", _( "mask must be 1D" ) ); return( -1 ); } return( 0 ); } vips-7.38.5/libvips/iofuncs/sinkdisc.c0000644000175000017500000003113312303140253014603 00000000000000/* Write an image to a disc file. * * 19/3/10 * - from im_wbuffer.c * - move on top of VipsThreadpool, instead of im_threadgroup_t * 23/6/10 * - better buffer handling for single-line images * 17/7/10 * - we could get stuck if allocate failed (thanks Tim) * 23/2/12 * - we could deadlock if generate failed */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include #include #include "sink.h" /* A buffer we are going to write to disc in a background thread. */ typedef struct _WriteBuffer { struct _Write *write; VipsRegion *region; /* Pixels */ VipsRect area; /* Part of image this region covers */ VipsSemaphore go; /* Start bg thread loop */ VipsSemaphore nwrite; /* Number of threads writing to region */ VipsSemaphore done; /* Bg thread has done write */ int write_errno; /* Save write errors here */ GThread *thread; /* BG writer thread */ gboolean kill; /* Set to ask thread to exit */ } WriteBuffer; /* Per-call state. */ typedef struct _Write { SinkBase sink_base; /* We are current writing tiles to buf, buf_back is in the hands of * the bg write thread. */ WriteBuffer *buf; WriteBuffer *buf_back; /* The file format write operation. */ VipsRegionWrite write_fn; void *a; } Write; /* Our per-thread state ... we need to also track the buffer that pos is * supposed to write to. */ typedef struct _WriteThreadState { VipsThreadState parent_object; WriteBuffer *buf; } WriteThreadState; typedef struct _WriteThreadStateClass { VipsThreadStateClass parent_class; } WriteThreadStateClass; G_DEFINE_TYPE( WriteThreadState, write_thread_state, VIPS_TYPE_THREAD_STATE ); static void write_thread_state_class_init( WriteThreadStateClass *class ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); object_class->nickname = "writethreadstate"; object_class->description = _( "per-thread state for sinkdisc" ); } static void write_thread_state_init( WriteThreadState *state ) { state->buf = NULL; } static VipsThreadState * write_thread_state_new( VipsImage *im, void *a ) { return( VIPS_THREAD_STATE( vips_object_new( write_thread_state_get_type(), vips_thread_state_set, im, a ) ) ); } static void wbuffer_free( WriteBuffer *wbuffer ) { /* Is there a thread running this region? Kill it! */ if( wbuffer->thread ) { wbuffer->kill = TRUE; vips_semaphore_up( &wbuffer->go ); /* Return value is always NULL (see wbuffer_write_thread). */ (void) g_thread_join( wbuffer->thread ); VIPS_DEBUG_MSG( "wbuffer_free: g_thread_join()\n" ); wbuffer->thread = NULL; } VIPS_UNREF( wbuffer->region ); vips_semaphore_destroy( &wbuffer->go ); vips_semaphore_destroy( &wbuffer->nwrite ); vips_semaphore_destroy( &wbuffer->done ); vips_free( wbuffer ); } static void wbuffer_write( WriteBuffer *wbuffer ) { Write *write = wbuffer->write; VIPS_DEBUG_MSG( "wbuffer_write: %d bytes from wbuffer %p\n", wbuffer->region->bpl * wbuffer->area.height, wbuffer ); VIPS_GATE_START( "wbuffer_write: work" ); wbuffer->write_errno = write->write_fn( wbuffer->region, &wbuffer->area, write->a ); VIPS_GATE_STOP( "wbuffer_write: work" ); } /* Run this as a thread to do a BG write. */ static void * wbuffer_write_thread( void *data ) { WriteBuffer *wbuffer = (WriteBuffer *) data; for(;;) { /* Wait to be told to write. */ vips_semaphore_down( &wbuffer->go ); if( wbuffer->kill ) break; /* Now block until the last worker finishes on this buffer. */ vips_semaphore_downn( &wbuffer->nwrite, 0 ); wbuffer_write( wbuffer ); /* Signal write complete. */ vips_semaphore_up( &wbuffer->done ); } return( NULL ); } static WriteBuffer * wbuffer_new( Write *write ) { WriteBuffer *wbuffer; if( !(wbuffer = VIPS_NEW( NULL, WriteBuffer )) ) return( NULL ); wbuffer->write = write; wbuffer->region = NULL; vips_semaphore_init( &wbuffer->go, 0, "go" ); vips_semaphore_init( &wbuffer->nwrite, 0, "nwrite" ); vips_semaphore_init( &wbuffer->done, 0, "done" ); wbuffer->write_errno = 0; wbuffer->thread = NULL; wbuffer->kill = FALSE; if( !(wbuffer->region = vips_region_new( write->sink_base.im )) ) { wbuffer_free( wbuffer ); return( NULL ); } /* The worker threads need to be able to move the buffers around. */ vips__region_no_ownership( wbuffer->region ); /* Make this last (picks up parts of wbuffer on startup). */ if( !(wbuffer->thread = vips_g_thread_new( "wbuffer", wbuffer_write_thread, wbuffer )) ) { wbuffer_free( wbuffer ); return( NULL ); } return( wbuffer ); } /* Block until the previous write completes, then write the front buffer. */ static int wbuffer_flush( Write *write ) { VIPS_DEBUG_MSG( "wbuffer_flush:\n" ); /* Block until the other buffer has been written. We have to do this * before we can set this buffer writing or we'll lose output ordering. */ if( write->buf->area.top > 0 ) { vips_semaphore_down( &write->buf_back->done ); /* Previous write suceeded? */ if( write->buf_back->write_errno ) { vips_error_system( write->buf_back->write_errno, "wbuffer_write", "%s", _( "write failed" ) ); return( -1 ); } } /* Set the background writer going for this buffer. */ vips_semaphore_up( &write->buf->go ); return( 0 ); } /* Move a wbuffer to a position. */ static int wbuffer_position( WriteBuffer *wbuffer, int top, int height ) { VipsRect image, area; int result; image.left = 0; image.top = 0; image.width = wbuffer->write->sink_base.im->Xsize; image.height = wbuffer->write->sink_base.im->Ysize; area.left = 0; area.top = top; area.width = wbuffer->write->sink_base.im->Xsize; area.height = height; vips_rect_intersectrect( &area, &image, &wbuffer->area ); /* The workers take turns to move the buffers. */ vips__region_take_ownership( wbuffer->region ); result = vips_region_buffer( wbuffer->region, &wbuffer->area ); vips__region_no_ownership( wbuffer->region ); /* This should be an exclusive buffer, hopefully. */ g_assert( !wbuffer->region->buffer->done ); return( result ); } /* Our VipsThreadpoolAllocate function ... move the thread to the next tile * that needs doing. If no buffer is available (the bg writer hasn't yet * finished with it), we block. If all tiles are done, we return FALSE to end * iteration. */ static gboolean wbuffer_allocate_fn( VipsThreadState *state, void *a, gboolean *stop ) { WriteThreadState *wstate = (WriteThreadState *) state; Write *write = (Write *) a; SinkBase *sink_base = (SinkBase *) write; VipsRect image; VipsRect tile; VIPS_DEBUG_MSG( "wbuffer_allocate_fn:\n" ); /* Is the state x/y OK? New line or maybe new buffer or maybe even * all done. */ if( sink_base->x >= write->buf->area.width ) { sink_base->x = 0; sink_base->y += sink_base->tile_height; if( sink_base->y >= VIPS_RECT_BOTTOM( &write->buf->area ) ) { /* Block until the write of the previous buffer * is done, then set write of this buffer going. */ if( wbuffer_flush( write ) ) return( -1 ); /* End of image? */ if( sink_base->y >= sink_base->im->Ysize ) { *stop = TRUE; return( 0 ); } VIPS_DEBUG_MSG( "wbuffer_allocate_fn: " "finished top = %d, height = %d\n", write->buf->area.top, write->buf->area.height ); VIPS_DEBUG_MSG( "wbuffer_allocate_fn: " "starting top = %d, height = %d\n", sink_base->y, sink_base->nlines ); /* Swap buffers. */ VIPS_SWAP( WriteBuffer *, write->buf, write->buf_back ); /* Position buf at the new y. */ if( wbuffer_position( write->buf, sink_base->y, sink_base->nlines ) ) return( -1 ); } } /* x, y and buf are good: save params for thread. */ image.left = 0; image.top = 0; image.width = sink_base->im->Xsize; image.height = sink_base->im->Ysize; tile.left = sink_base->x; tile.top = sink_base->y; tile.width = sink_base->tile_width; tile.height = sink_base->tile_height; vips_rect_intersectrect( &image, &tile, &state->pos ); /* The thread needs to know which buffer it's writing to. */ wstate->buf = write->buf; VIPS_DEBUG_MSG( " thread %p allocated " "left = %d, top = %d, width = %d, height = %d\n", g_thread_self(), tile.left, tile.top, tile.width, tile.height ); /* Add to the number of writers on the buffer. */ vips_semaphore_upn( &write->buf->nwrite, -1 ); /* Move state on. */ sink_base->x += sink_base->tile_width; /* Add the number of pixels we've just allocated to progress. */ sink_base->processed += state->pos.width * state->pos.height; return( 0 ); } /* Our VipsThreadpoolWork function ... generate a tile! */ static int wbuffer_work_fn( VipsThreadState *state, void *a ) { WriteThreadState *wstate = (WriteThreadState *) state; int result; VIPS_DEBUG_MSG( "wbuffer_work_fn: thread %p, %d x %d\n", g_thread_self(), state->pos.left, state->pos.top ); result = vips_region_prepare_to( state->reg, wstate->buf->region, &state->pos, state->pos.left, state->pos.top ); VIPS_DEBUG_MSG( "wbuffer_work_fn: thread %p result = %d\n", g_thread_self(), result ); /* Tell the bg write thread we've left. */ vips_semaphore_upn( &wstate->buf->nwrite, 1 ); return( result ); } static void write_init( Write *write, VipsImage *image, VipsRegionWrite write_fn, void *a ) { vips_sink_base_init( &write->sink_base, image ); write->buf = wbuffer_new( write ); write->buf_back = wbuffer_new( write ); write->write_fn = write_fn; write->a = a; } static void write_free( Write *write ) { VIPS_FREEF( wbuffer_free, write->buf ); VIPS_FREEF( wbuffer_free, write->buf_back ); } /** * VipsRegionWrite: * @region: get pixels from here * @area: area to write * @a: client data * * The function should write the pixels in @area from @region. @a is the * value passed into vips_discsink(). * * See also: vips_sink_disc(). * * Returns: 0 on success, -1 on error. */ /** * vips_sink_disc: * @im: image to process * @write_fn: called for every batch of pixels * @a: client data * * vips_sink_disc() loops over @im, top-to-bottom, generating it in sections. * As each section is produced, @write_fn is called. * * @write_fn is always called single-threaded (though not always from the same * thread), it's always given image * sections in top-to-bottom order, and there are never any gaps. * * This operation is handy for making image sinks which output to things like * disc files. * * See also: vips_concurrency_set(). * * Returns: 0 on success, -1 on error. */ int vips_sink_disc( VipsImage *im, VipsRegionWrite write_fn, void *a ) { Write write; int result; vips_image_preeval( im ); write_init( &write, im, write_fn, a ); result = 0; if( !write.buf || !write.buf_back || wbuffer_position( write.buf, 0, write.sink_base.nlines ) || vips_threadpool_run( im, write_thread_state_new, wbuffer_allocate_fn, wbuffer_work_fn, vips_sink_base_progress, &write ) ) result = -1; /* Just before allocate signalled stop, it set write.buf writing. We * need to wait for this write to finish. * * We can't just free the buffers (which will wait for the bg threads * to finish), since the bg thread might see the kill before it gets a * chance to write. * * If the pool exited with an error, write.buf might not have been * started (if the allocate failed), and in any case, we don't care if * the final write went through or not. */ if( !result ) vips_semaphore_down( &write.buf->done ); vips_image_posteval( im ); write_free( &write ); return( result ); } vips-7.38.5/libvips/iofuncs/sink.c0000644000175000017500000002306212303140253013742 00000000000000/* A sink that's not attached to anything, eg. find image average, * * 28/3/10 * - from im_iterate(), reworked for threadpool */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "sink.h" /* Per-call state. */ typedef struct _Sink { SinkBase sink_base; /* We need a temp "p" image between the source image and us to * make sure we can't damage the original. */ VipsImage *t; /* Call params. */ VipsStartFn start_fn; VipsGenerateFn generate_fn; VipsStopFn stop_fn; void *a; void *b; } Sink; /* Our per-thread state. */ typedef struct _SinkThreadState { VipsThreadState parent_object; /* Sequence value for this thread. */ void *seq; /* The region we walk over sink.t copy. We can't use * parent_object.reg, it's defined on the outer image. */ VipsRegion *reg; } SinkThreadState; typedef struct _SinkThreadStateClass { VipsThreadStateClass parent_class; } SinkThreadStateClass; G_DEFINE_TYPE( SinkThreadState, sink_thread_state, VIPS_TYPE_THREAD_STATE ); /* Call a thread's stop function. */ static int sink_call_stop( Sink *sink, SinkThreadState *state ) { if( state->seq && sink->stop_fn ) { VIPS_DEBUG_MSG( "sink_call_stop: state = %p\n", state ); if( sink->stop_fn( state->seq, sink->a, sink->b ) ) { SinkBase *sink_base = (SinkBase *) sink; vips_error( "vips_sink", _( "stop function failed for image \"%s\"" ), sink_base->im->filename ); return( -1 ); } state->seq = NULL; } return( 0 ); } static void sink_thread_state_dispose( GObject *gobject ) { SinkThreadState *state = (SinkThreadState *) gobject; Sink *sink = (Sink *) ((VipsThreadState *) state)->a; sink_call_stop( sink, state ); VIPS_UNREF( state->reg ); G_OBJECT_CLASS( sink_thread_state_parent_class )->dispose( gobject ); } /* Call the start function for this thread, if necessary. */ static int sink_call_start( Sink *sink, SinkThreadState *state ) { if( !state->seq && sink->start_fn ) { VIPS_DEBUG_MSG( "sink_call_start: state = %p\n", state ); state->seq = sink->start_fn( sink->t, sink->a, sink->b ); if( !state->seq ) { SinkBase *sink_base = (SinkBase *) sink; vips_error( "vips_sink", _( "start function failed for image \"%s\"" ), sink_base->im->filename ); return( -1 ); } } return( 0 ); } static int sink_thread_state_build( VipsObject *object ) { SinkThreadState *state = (SinkThreadState *) object; Sink *sink = (Sink *) ((VipsThreadState *) state)->a; if( !(state->reg = vips_region_new( sink->t )) || sink_call_start( sink, state ) ) return( -1 ); return( VIPS_OBJECT_CLASS( sink_thread_state_parent_class )->build( object ) ); } static void sink_thread_state_class_init( SinkThreadStateClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); gobject_class->dispose = sink_thread_state_dispose; object_class->build = sink_thread_state_build; object_class->nickname = "sinkthreadstate"; object_class->description = _( "per-thread state for sink" ); } static void sink_thread_state_init( SinkThreadState *state ) { state->seq = NULL; state->reg = NULL; } VipsThreadState * vips_sink_thread_state_new( VipsImage *im, void *a ) { return( VIPS_THREAD_STATE( vips_object_new( sink_thread_state_get_type(), vips_thread_state_set, im, a ) ) ); } static void sink_free( Sink *sink ) { VIPS_FREEF( g_object_unref, sink->t ); } void vips_sink_base_init( SinkBase *sink_base, VipsImage *image ) { /* Always clear kill before we start looping. See the * call to vips_image_iskilled() below. */ vips_image_set_kill( image, FALSE ); sink_base->im = image; sink_base->x = 0; sink_base->y = 0; vips_get_tile_size( image, &sink_base->tile_width, &sink_base->tile_height, &sink_base->nlines ); sink_base->processed = 0; } static int sink_init( Sink *sink, VipsImage *image, VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn, void *a, void *b ) { g_assert( generate_fn ); vips_sink_base_init( &sink->sink_base, image ); sink->t = NULL; sink->start_fn = start_fn; sink->generate_fn = generate_fn; sink->stop_fn = stop_fn; sink->a = a; sink->b = b; if( !(sink->t = vips_image_new()) || vips_image_write( sink->sink_base.im, sink->t ) ) { sink_free( sink ); return( -1 ); } return( 0 ); } int vips_sink_base_allocate( VipsThreadState *state, void *a, gboolean *stop ) { SinkBase *sink_base = (SinkBase *) a; VipsRect image, tile; /* Has work requested early termination? */ if( state->stop ) { *stop = TRUE; return( 0 ); } /* Is the state x/y OK? New line or maybe all done. */ if( sink_base->x >= sink_base->im->Xsize ) { sink_base->x = 0; sink_base->y += sink_base->tile_height; if( sink_base->y >= sink_base->im->Ysize ) { *stop = TRUE; return( 0 ); } } /* x, y and buf are good: save params for thread. */ image.left = 0; image.top = 0; image.width = sink_base->im->Xsize; image.height = sink_base->im->Ysize; tile.left = sink_base->x; tile.top = sink_base->y; tile.width = sink_base->tile_width; tile.height = sink_base->tile_height; vips_rect_intersectrect( &image, &tile, &state->pos ); /* Move state on. */ sink_base->x += sink_base->tile_width; /* Add the number of pixels we've just allocated to progress. */ sink_base->processed += state->pos.width * state->pos.height; return( 0 ); } static int sink_work( VipsThreadState *state, void *a ) { SinkThreadState *sstate = (SinkThreadState *) state; Sink *sink = (Sink *) a; if( vips_region_prepare( sstate->reg, &state->pos ) || sink->generate_fn( sstate->reg, sstate->seq, sink->a, sink->b, &state->stop ) ) return( -1 ); return( 0 ); } int vips_sink_base_progress( void *a ) { SinkBase *sink_base = (SinkBase *) a; VIPS_DEBUG_MSG( "vips_sink_base_progress:\n" ); /* Trigger any eval callbacks on our source image and * check for errors. */ vips_image_eval( sink_base->im, sink_base->processed ); if( vips_image_iskilled( sink_base->im ) ) return( -1 ); return( 0 ); } /** * vips_sink_tile: * @im: scan over this image * @tile_width: tile width * @tile_height: tile height * @start_fn: start sequences with this function * @generate_fn: generate pixels with this function * @stop_fn: stop sequences with this function * @a: user data * @b: user data * * Loops over an image. @generate is called for every pixel in the image, with * the @reg argument being a region of pixels for processing. * * Each set of pixels is @tile_width by @tile_height pixels (less at the * image edges). This is handy for things like writing a tiled TIFF image, * where tiles have to be generated with a certain size. * * See also: vips_sink(), vips_get_tile_size(). * * Returns: 0 on success, or -1 on error. */ int vips_sink_tile( VipsImage *im, int tile_width, int tile_height, VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn, void *a, void *b ) { Sink sink; int result; g_assert( vips_object_sanity( VIPS_OBJECT( im ) ) ); /* We don't use this, but make sure it's set in case any old binaries * are expecting it. */ im->Bbits = vips_format_sizeof( im->BandFmt ) << 3; if( sink_init( &sink, im, start_fn, generate_fn, stop_fn, a, b ) ) return( -1 ); if( tile_width > 0 ) { sink.sink_base.tile_width = tile_width; sink.sink_base.tile_height = tile_height; } /* vips_sink_base_progress() signals progress on im, so we have to do * pre/post on that too. */ vips_image_preeval( im ); result = vips_threadpool_run( im, vips_sink_thread_state_new, vips_sink_base_allocate, sink_work, vips_sink_base_progress, &sink ); vips_image_posteval( im ); sink_free( &sink ); return( result ); } /** * vips_sink: * @im: scan over this image * @start_fn: start sequences with this function * @generate_fn: generate pixels with this function * @stop_fn: stop sequences with this function * @a: user data * @b: user data * * Loops over an image. @generate is called for every pixel in the image, with * the @reg argument being a region of pixels for processing. vips_sink() is * used to implement operations like #VipsAvg which have no image output. * * Each set of pixels is sized according to the requirements of the image * pipeline that generated @im. * * See also: vips_image_generate(), vips_image_new(). * * Returns: 0 on success, or -1 on error. */ int vips_sink( VipsImage *im, VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn, void *a, void *b ) { return( vips_sink_tile( im, -1, -1, start_fn, generate_fn, stop_fn, a, b ) ); } vips-7.38.5/libvips/iofuncs/enumtemplate0000644000175000017500000000125612303140253015256 00000000000000/*** BEGIN file-header ***/ /* auto-generated enums for vips introspection */ #include /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ GType @enum_name@_get_type( void ) { static GType etype = 0; if( etype == 0 ) { static const G@Type@Value values[] = { /*** END value-header ***/ /*** BEGIN value-production ***/ {@VALUENAME@, "@VALUENAME@", "@valuenick@"}, /*** END value-production ***/ /*** BEGIN value-tail ***/ {0, NULL, NULL} }; etype = g_@type@_register_static( "@EnumName@", values ); } return( etype ); } /*** END value-tail ***/ vips-7.38.5/libvips/iofuncs/generate.c0000644000175000017500000004406312303140253014574 00000000000000/* Manage pipelines of partial images. * * J.Cupitt, 17/4/93. * 1/7/93 JC * - adapted for partial v2 * - ANSIfied * 6/7/93 JC * - im_setupout() conventions clarified - see autorewind in * im_iocheck(). * 20/7/93 JC * - eval callbacks added * 7/9/93 JC * - demand hint mechanism added * 25/10/93 * - asynchronous output mechanisms removed, as no observable speed-up * 9/5/94 * - new thread stuff added, with a define to turn it off * 15/8/94 * - start & stop functions can now be NULL for no-op * 7/10/94 JC * - evalend callback system added * 23/12/94 JC * - IM_ARRAY uses added * 22/2/95 JC * - im_fill_copy() added * - im_region_region() uses modified * 24/4/95 JC & KM * - im_fill_lines() bug removed * 30/8/96 JC * - revised and simplified ... some code shared with im_iterate() * - new im_generate_region() added * 2/3/98 JC * - IM_ANY added * 20/7/99 JC * - tile geometry made into ints for easy tuning * 30/7/99 RP JC * - threads reorganised for POSIX * 29/9/99 JC * - threadgroup stuff added * 15/4/04 * - better how-many-pixels-calculated * 27/11/06 * - merge background write stuff * 7/11/07 * - new start/end eval callbacks * 7/10/09 * - gtkdoc comments * 16/4/10 * - remove threadgroup stuff * 24/3/11 * - move demand_hint stuff in here * - move to vips_ namespace * 7/7/12 * - lock around link make/break so we can process an image from many * threads */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include /** * SECTION: generate * @short_description: calculate pixels and pixel buffers * @stability: Stable * @see_also: image, * region * @include: vips/vips.h * * These functions let you generate regions of pixels in an image * processing operation, and ask for regions of image to be calculated. */ /* Max number of images we can handle. */ #define MAX_IMAGES (1000) /* Make an upstream/downstream link. upstream is one of downstream's inputs. */ static void vips__link_make( VipsImage *image_up, VipsImage *image_down ) { g_assert( image_up ); g_assert( image_down ); image_up->downstream = g_slist_prepend( image_up->downstream, image_down ); image_down->upstream = g_slist_prepend( image_down->upstream, image_up ); /* Propogate the progress indicator. */ if( image_up->progress_signal && !image_down->progress_signal ) image_down->progress_signal = image_up->progress_signal; } static void * vips__link_break( VipsImage *image_up, VipsImage *image_down ) { g_assert( image_up ); g_assert( image_down ); g_assert( g_slist_find( image_up->downstream, image_down ) ); g_assert( g_slist_find( image_down->upstream, image_up ) ); image_up->downstream = g_slist_remove( image_up->downstream, image_down ); image_down->upstream = g_slist_remove( image_down->upstream, image_up ); /* Unlink the progress chain. */ if( image_down->progress_signal && image_down->progress_signal == image_up->progress_signal ) image_down->progress_signal = NULL; return( NULL ); } static void * vips__link_break_rev( VipsImage *image_down, VipsImage *image_up ) { return( vips__link_break( image_up, image_down ) ); } /* A VipsImage is going ... break all links. */ void vips__link_break_all( VipsImage *image ) { g_mutex_lock( vips__global_lock ); vips_slist_map2( image->upstream, (VipsSListMap2Fn) vips__link_break, image, NULL ); vips_slist_map2( image->downstream, (VipsSListMap2Fn) vips__link_break_rev, image, NULL ); g_assert( !image->upstream ); g_assert( !image->downstream ); g_mutex_unlock( vips__global_lock ); } typedef struct _LinkMap { gboolean upstream; int *serial; VipsSListMap2Fn fn; void *a; void *b; } LinkMap; static void * vips__link_mapp( VipsImage *image, LinkMap *map ) { void *res; /* Loop? */ if( image->serial == *map->serial ) return( NULL ); image->serial = *map->serial; if( (res = map->fn( image, map->a, map->b )) ) return( res ); return( vips_slist_map2( map->upstream ? image->upstream : image->downstream, (VipsSListMap2Fn) vips__link_mapp, map, NULL ) ); } static void * vips__link_map_cb( VipsImage *image, GSList **images ) { *images = g_slist_prepend( *images, image ); return( NULL ); } /* Apply a function to an image and all upstream or downstream images, * direct and indirect. */ void * vips__link_map( VipsImage *image, gboolean upstream, VipsSListMap2Fn fn, void *a, void *b ) { static int serial = 0; LinkMap map; GSList *images; GSList *p; void *result; serial += 1; images = NULL; /* The function might do anything, including removing images * or invalidating other images, so we can't trigger them from within * the image loop. Instead we collect a list of images, ref them, * run the functions, and unref. */ map.upstream = upstream; map.serial = &serial; map.fn = (VipsSListMap2Fn) vips__link_map_cb; map.a = (void *) &images; map.b = NULL; g_mutex_lock( vips__global_lock ); vips__link_mapp( image, &map ); for( p = images; p; p = p->next ) g_object_ref( p->data ); g_mutex_unlock( vips__global_lock ); result = vips_slist_map2( images, fn, a, b ); for( p = images; p; p = p->next ) g_object_unref( p->data ); g_slist_free( images ); return( result ); } /* We have to have this as a separate entry point so we can support the old * vips7 API. */ void vips__demand_hint_array( VipsImage *image, VipsDemandStyle hint, VipsImage **in ) { int i, len, nany; VipsDemandStyle set_hint; /* How many input images are there? And how many are ANY? */ for( i = 0, len = 0, nany = 0; in[i]; i++, len++ ) if( in[i]->dhint == VIPS_DEMAND_STYLE_ANY ) nany++; set_hint = hint; if( len == 0 ) /* No input images? Just set the requested hint. We don't * force ANY, since the operation might be something like * tiled read of an EXR image, where we certainly don't want * ANY. */ ; else if( nany == len ) /* Special case: if all the inputs are ANY, then output can * be ANY regardless of what this function wants. */ set_hint = VIPS_DEMAND_STYLE_ANY; else /* Find the most restrictive of all the hints available to us. */ for( i = 0; i < len; i++ ) set_hint = (VipsDemandStyle) VIPS_MIN( (int) set_hint, (int) in[i]->dhint ); image->dhint = set_hint; #ifdef DEBUG printf( "vips_image_pipeline_array: set dhint for \"%s\" to %s\n", image->filename, vips_enum_nick( VIPS_TYPE_DEMAND_STYLE, image->dhint ) ); printf( "\toperation requested %s\n", vips_enum_nick( VIPS_TYPE_DEMAND_STYLE, hint ) ); printf( "\tinputs were:\n" ); printf( "\t" ); for( i = 0; in[i]; i++ ) printf( "%s ", vips_enum_nick( VIPS_TYPE_DEMAND_STYLE, in[i]->dhint ) ); printf( "\n" ); #endif /*DEBUG*/ /* im depends on all these ims. */ g_mutex_lock( vips__global_lock ); for( i = 0; i < len; i++ ) vips__link_make( in[i], image ); g_mutex_unlock( vips__global_lock ); /* Set a flag on the image to say we remembered to call this thing. * vips_image_generate() and friends check this. */ image->hint_set = TRUE; } /** * vips_image_pipeline_array: * @image: output image * @hint: demand hint for @image * @in: %NULL-terminated array of input images * * Add an image to a pipeline. @image depends on all of the images in @in, * @image prefers to supply pixels according to @hint. * * Operations can set demand hints, that is, hints to the VIPS IO system about * the type of region geometry this operation works best with. For example, * operations which transform coordinates will usually work best with * %VIPS_DEMAND_STYLE_SMALLTILE, operations which work on local windows of * pixels will like %VIPS_DEMAND_STYLE_FATSTRIP. * * Header fields in @image are set from the fields in @in, with lower-numbered * images in @in taking priority. * For example, if @in[0] and @in[1] both have an item * called "icc-profile", it's the profile attached to @in[0] that will end up * on @image. * Image history is completely copied from all @in. @image will have the history * of all the input images. * The array of input images can be empty, meaning @image is at the start of a * pipeline. * * VIPS uses the list of input images to build the tree of operations it needs * for the cache invalidation system. * * See also: vips_image_pipelinev(), vips_image_generate(). * * Returns: 0 on success, -1 on error. */ int vips_image_pipeline_array( VipsImage *image, VipsDemandStyle hint, VipsImage **in ) { vips__demand_hint_array( image, hint, in ); if( in[0] && vips__image_copy_fields_array( image, in ) ) return( -1 ); return( 0 ); } /** * vips_image_pipelinev: * @image: output image of pipeline * @hint: hint for this image * @...: %NULL-terminated list of input images * * Build an array and call vips_image_pipeline_array(). * * See also: vips_image_generate(). */ int vips_image_pipelinev( VipsImage *image, VipsDemandStyle hint, ... ) { va_list ap; int i; VipsImage *ar[MAX_IMAGES]; va_start( ap, hint ); for( i = 0; i < MAX_IMAGES && (ar[i] = va_arg( ap, VipsImage * )); i++ ) ; va_end( ap ); if( i == MAX_IMAGES ) { vips_warn( "vips_image_pipeline", "%s", _( "too many images" ) ); /* Make sure we have a sentinel there. */ ar[i - 1] = NULL; } return( vips_image_pipeline_array( image, hint, ar ) ); } /** * vips_start_one: * @out: image to generate * @a: user data * @b: user data * * Start function for one image in. Input image is @a. * * See also: vips_image_generate(). */ void * vips_start_one( VipsImage *out, void *a, void *b ) { VipsImage *in = (VipsImage *) a; return( vips_region_new( in ) ); } /** * vips_stop_one: * @seq: sequence value * @a: user data * @b: user data * * Stop function for one image in. Input image is @a. * * See also: vips_image_generate(). */ int vips_stop_one( void *seq, void *a, void *b ) { VipsRegion *reg = (VipsRegion *) seq; g_object_unref( reg ); return( 0 ); } /** * vips_stop_many: * @seq: sequence value * @a: user data * @b: user data * * Stop function for many images in. @a is a pointer to * a %NULL-terminated array of input images. * * See also: vips_image_generate(). */ int vips_stop_many( void *seq, void *a, void *b ) { VipsRegion **ar = (VipsRegion **) seq; if( ar ) { int i; for( i = 0; ar[i]; i++ ) g_object_unref( ar[i] ); vips_free( (char *) ar ); } return( 0 ); } /** * vips_start_many: * @out: image to generate * @a: user data * @b: user data * * Start function for many images in. @a is a pointer to * a %NULL-terminated array of input images. * * See also: vips_image_generate(), vips_allocate_input_array() */ void * vips_start_many( VipsImage *out, void *a, void *b ) { VipsImage **in = (VipsImage **) a; int i, n; VipsRegion **ar; /* How many images? */ for( n = 0; in[n]; n++ ) ; /* Alocate space for region array. */ if( !(ar = VIPS_ARRAY( NULL, n + 1, VipsRegion * )) ) return( NULL ); /* Create a set of regions. */ for( i = 0; i < n; i++ ) if( !(ar[i] = vips_region_new( in[i] )) ) { vips_stop_many( ar, NULL, NULL ); return( NULL ); } ar[n] = NULL; return( ar ); } /** * vips_allocate_input_array: * @image: free array when this image closes * @Varargs: %NULL-terminated list of input images * * Convenience function --- make a %NULL-terminated array of input images. * Use with vips_start_many(). * * See also: vips_image_generate(), vips_start_many(). * * Returns: %NULL-terminated array of images. Do not free the result. */ VipsImage ** vips_allocate_input_array( VipsImage *image, ... ) { va_list ap; VipsImage **ar; int i, n; /* Count input images. */ va_start( ap, image ); for( n = 0; va_arg( ap, VipsImage * ); n++ ) ; va_end( ap ); /* Allocate array. */ if( !(ar = VIPS_ARRAY( image, n + 1, VipsImage * )) ) return( NULL ); /* Fill array. */ va_start( ap, image ); for( i = 0; i < n; i++ ) ar[i] = va_arg( ap, VipsImage * ); va_end( ap ); ar[n] = NULL; return( ar ); } /** * VipsStartFn: * @image: image being calculated * @a: user data * @b: user data * * Start a new processing sequence for this generate function. This allocates * per-thread state, such as an input region. * * See also: vips_start_one(), vips_start_many(). * * Returns: a new sequence value */ /** * VipsGenerateFn: * @region: #VipsRegion to fill * @seq: sequence value * @a: user data * @b: user data * * Fill @image->valid with pixels. @seq contains per-thread state, such as the * input regions. * * See also: vips_image_generate(), vips_stop_many(). * * Returns: 0 on success, -1 on error. */ /** * VipsStopFn: * @seq: sequence value * @a: user data * @b: user data * * Stop a processing sequence. This frees * per-thread state, such as an input region. * * See also: vips_stop_one(), vips_stop_many(). * * Returns: 0 on success, -1 on error. */ /* A write function for VIPS images. Just write() the pixel data. */ static int write_vips( VipsRegion *region, VipsRect *area, void *a, void *b ) { size_t nwritten, count; void *buf; count = region->bpl * area->height; buf = VIPS_REGION_ADDR( region, 0, area->top ); do { nwritten = write( region->im->fd, buf, count ); if( nwritten == (size_t) -1 ) return( errno ); buf = (void *) ((char *) buf + nwritten); count -= nwritten; } while( count > 0 ); return( 0 ); } /** * vips_image_generate: * @image: generate this image * @start_fn: start sequences with this function * @generate_fn: generate pixels with this function * @stop_fn: stop sequences with this function * @a: user data * @b: user data * * Generates an image. The action depends on the image type. * * For images opened with "p", vips_image_generate() just attaches the * start/generate/stop callbacks and returns. * * For "t" images, memory is allocated for the whole image and it is entirely * generated using vips_sink(). * * For "w" images, memory for a few scanlines is allocated and * vips_sink_disc() used to generate the image in small chunks. As each * chunk is generated, it is written to disc. * * See also: vips_sink(), vips_image_new(), vips_region_prepare(). * * Returns: 0 on success, or -1 on error. */ int vips_image_generate( VipsImage *image, VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn, void *a, void *b ) { int res; VIPS_DEBUG_MSG( "vips_image_generate: %p\n", image ); g_assert( generate_fn ); g_assert( vips_object_sanity( VIPS_OBJECT( image ) ) ); if( !image->hint_set ) { vips_error( "vips_image_generate", "%s", _( "demand hint not set" ) ); return( -1 ); } /* We don't use this, but make sure it's set in case any old binaries * are expecting it. */ image->Bbits = vips_format_sizeof( image->BandFmt ) << 3; /* Look at output type to decide our action. */ switch( image->dtype ) { case VIPS_IMAGE_PARTIAL: /* Output to partial image. Just attach functions and return. */ if( image->generate_fn || image->start_fn || image->stop_fn ) { vips_error( "VipsImage", "%s", _( "generate() called twice" ) ); return( -1 ); } image->start_fn = start_fn; image->generate_fn = generate_fn; image->stop_fn = stop_fn; image->client1 = a; image->client2 = b; VIPS_DEBUG_MSG( "vips_image_generate: " "attaching partial callbacks\n" ); break; case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_SETBUF_FOREIGN: case VIPS_IMAGE_MMAPINRW: case VIPS_IMAGE_OPENOUT: /* Eval now .. sanity check. */ if( image->generate_fn || image->start_fn || image->stop_fn ) { vips_error( "VipsImage", "%s", _( "generate() called twice" ) ); return( -1 ); } /* Attach callbacks. */ image->start_fn = start_fn; image->generate_fn = generate_fn; image->stop_fn = stop_fn; image->client1 = a; image->client2 = b; if( vips_image_write_prepare( image ) ) return( -1 ); if( image->dtype == VIPS_IMAGE_OPENOUT ) res = vips_sink_disc( image, (VipsRegionWrite) write_vips, NULL ); else res = vips_sink_memory( image ); /* Error? */ if( res ) return( -1 ); break; default: /* Not a known output style. */ vips_error( "VipsImage", _( "unable to output to a %s image" ), vips_enum_nick( VIPS_TYPE_IMAGE_TYPE, image->dtype ) ); return( -1 ); } if( vips_image_written( image ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/iofuncs/region.c0000644000175000017500000010477412303141142014271 00000000000000/* Make and destroy partial image regions. * * J.Cupitt, 8/4/93. * 1/7/93 JC * - adapted for partial v2 * - ANSIfied * 15/8/94 JC * - start & stop can now be NULL for no-op * 12/5/94 JC * - threads v2.0 added * 22/2/95 JC * - im_region_region() args changed * 22/6/95 JC * - im_region_local() did not always reset the data pointer * 18/11/98 JC * - init a, b, c also now, to help rtc avoid spurious checks * 29/6/01 JC * - im_region_free() now frees immediately * 6/8/02 JC * - new mmap() window regions * 5/11/02 JC * - fix for mmap a local region * 28/2/05 * - shrink local region memory if required much-greater-than allocated * 3/6/05 * - im_region_region() allows Bands and BandFmt to differ, provided * sizeof( pel ) is the same ... makes im_copy_morph() work * 30/10/06 * - switch to im_window_t for mmap window stuff * 29/11/06 * - switch to im_buffer_t for local mem buffer stuff * 19/1/07 * - im_region_image() only sets r, not whole image * 1'2'07 * - gah, im_region_image() could still break (thanks Mikkel) * 23/7/08 * - added im_region_print() * 7/10/09 * - gtkdoc comments * 5/3/10 * - move invalid stuff to region * 3/3/11 * - move on top of VipsObject, rename as VipsRegion */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_MOVE #define DEBUG_ENVIRONMENT 1 #define DEBUG_CREATE #define DEBUG #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include #include /** * SECTION: region * @short_description: small, rectangular parts of images * @stability: Stable * @see_also: image, * generate * @include: vips/vips.h * * A #VipsRegion is a small part of an image and some pixels. You use regions to * read pixels out of images without having to have the whole image in memory * at once. * * A region can be a memory buffer, part of a memory-mapped file, part of some * other image, or part of some other region. * * Regions must be created, used and freed all within the same thread, since * they can reference private per-thread caches. VIPS sanity-checks region * ownership in various places, so you are likely to see g_assert() errors if * you don't follow this rule. * * There * is API to transfer ownership of regions between threads, but hopefully this * is only needed within VIPS, so we don't expose it. Hopefully. */ /** * VipsRegion: * @im: the #VipsImage that this region is defined on * @valid: the #VipsRect of pixels that this region represents * * A small part of a #VipsImage. @valid holds the left/top/width/height of the * area of pixels that are available from the region. * * See also: VIPS_REGION_ADDR(), vips_region_new(), vips_region_prepare(). */ /** * VIPS_REGION_LSKIP: * @R: a #VipsRegion * * Returns: The number of bytes to add to move down a scanline. */ /** * VIPS_REGION_N_ELEMENTS: * @R: a #VipsRegion * * Returns: The number of band elements across a region. */ /** * VIPS_REGION_SIZEOF_LINE: * @R: a #VipsRegion * * Returns: The number of bytes across a region. */ /** * VIPS_REGION_ADDR: * @R: a #VipsRegion * @X: x coordinate * @Y: y coordinate * * This macro returns a pointer to a pixel in a region. The (x, y) coordinates * need to be within the #VipsRect (@R->valid). * * If DEBUG is defined, you get a version that checks bounds for you. * * Returns: The address of pixel (x,y) in the region. */ /** * VIPS_REGION_ADDR_TOPLEFT: * @R: a #VipsRegion * * This macro returns a pointer to the top-left pixel in the #VipsRegion, that * is, the pixel at (@R->valid.left, @R->valid.top). * * Returns: The address of the top-left pixel in the region. */ /* Properties. */ enum { PROP_IMAGE = 1, PROP_LAST }; G_DEFINE_TYPE( VipsRegion, vips_region, VIPS_TYPE_OBJECT ); #ifdef VIPS_DEBUG static GSList *vips__regions_all = NULL; #endif /*VIPS_DEBUG*/ static void vips_region_finalize( GObject *gobject ) { #ifdef VIPS_DEBUG VIPS_DEBUG_MSG( "vips_region_finalize: " ); vips_object_print_name( VIPS_OBJECT( gobject ) ); VIPS_DEBUG_MSG( "\n" ); #endif /*VIPS_DEBUG*/ #ifdef VIPS_DEBUG g_mutex_lock( vips__global_lock ); vips__regions_all = g_slist_remove( vips__regions_all, gobject ); g_mutex_unlock( vips__global_lock ); #endif /*VIPS_DEBUG*/ G_OBJECT_CLASS( vips_region_parent_class )->finalize( gobject ); } /* Call a start function if no sequence is running on this VipsRegion. */ int vips__region_start( VipsRegion *region ) { VipsImage *image = region->im; if( !region->seq && image->start_fn ) { VIPS_GATE_START( "vips__region_start: wait" ); g_mutex_lock( image->sslock ); VIPS_GATE_STOP( "vips__region_start: wait" ); region->seq = image->start_fn( image, image->client1, image->client2 ); g_mutex_unlock( image->sslock ); if( !region->seq ) { vips_error( "vips__region_start", _( "start function failed for image %s" ), image->filename ); return( -1 ); } } return( 0 ); } /* Call a stop function if a sequence is running in this VipsRegion. */ void vips__region_stop( VipsRegion *region ) { IMAGE *image = region->im; if( region->seq && image->stop_fn ) { int result; VIPS_GATE_START( "vips__region_stop: wait" ); g_mutex_lock( image->sslock ); VIPS_GATE_STOP( "vips__region_stop: wait" ); result = image->stop_fn( region->seq, image->client1, image->client2 ); g_mutex_unlock( image->sslock ); /* stop function can return an error, but we have nothing we * can really do with it, sadly. */ if( result ) vips_warn( "VipsRegion", "stop callback failed for image %s", image->filename ); region->seq = NULL; } } static void vips_region_dispose( GObject *gobject ) { VipsRegion *region = VIPS_REGION( gobject ); VipsImage *image = region->im; #ifdef VIPS_DEBUG VIPS_DEBUG_MSG( "vips_region_dispose: " ); vips_object_print_name( VIPS_OBJECT( gobject ) ); VIPS_DEBUG_MSG( "\n" ); #endif /*VIPS_DEBUG*/ vips_object_preclose( VIPS_OBJECT( gobject ) ); /* Stop this sequence. */ vips__region_stop( region ); /* Free any attached memory. */ VIPS_FREEF( vips_window_unref, region->window ); VIPS_FREEF( vips_buffer_unref, region->buffer ); /* Detach from image. */ VIPS_GATE_START( "vips_region_dispose: wait" ); g_mutex_lock( image->sslock ); VIPS_GATE_STOP( "vips_region_dispose: wait" ); image->regions = g_slist_remove( image->regions, region ); g_mutex_unlock( image->sslock ); region->im = NULL; g_object_unref( image ); G_OBJECT_CLASS( vips_region_parent_class )->dispose( gobject ); } static void vips_region_dump( VipsObject *object, VipsBuf *buf ) { VipsRegion *region = VIPS_REGION( object ); vips_buf_appendf( buf, "VipsRegion: %p, ", region ); vips_buf_appendf( buf, "im = %p, ", region->im ); vips_buf_appendf( buf, "valid.left = %d, ", region->valid.left ); vips_buf_appendf( buf, "valid.top = %d, ", region->valid.top ); vips_buf_appendf( buf, "valid.width = %d, ", region->valid.width ); vips_buf_appendf( buf, "valid.height = %d, ", region->valid.height ); vips_buf_appendf( buf, "type = %d, ", region->type ); vips_buf_appendf( buf, "data = %p, ", region->data ); vips_buf_appendf( buf, "bpl = %d, ", region->bpl ); vips_buf_appendf( buf, "seq = %p, ", region->seq ); vips_buf_appendf( buf, "thread = %p, ", region->thread ); vips_buf_appendf( buf, "window = %p, ", region->window ); vips_buf_appendf( buf, "buffer = %p, ", region->buffer ); vips_buf_appendf( buf, "invalid = %d", region->invalid ); VIPS_OBJECT_CLASS( vips_region_parent_class )->dump( object, buf ); } static void vips_region_summary( VipsObject *object, VipsBuf *buf ) { VipsRegion *region = VIPS_REGION( object ); vips_buf_appendf( buf, "VipsRegion: %p, ", region ); vips_buf_appendf( buf, "im = %p, ", region->im ); vips_buf_appendf( buf, "left = %d, ", region->valid.left ); vips_buf_appendf( buf, "top = %d, ", region->valid.top ); vips_buf_appendf( buf, "width = %d, ", region->valid.width ); vips_buf_appendf( buf, "height = %d", region->valid.height ); if( region->buffer && region->buffer->buf ) vips_buf_appendf( buf, ", %.3gMB", region->buffer->bsize / (1024 * 1024.0) ); VIPS_OBJECT_CLASS( vips_region_parent_class )->summary( object, buf ); } static void vips_region_sanity( VipsObject *object, VipsBuf *buf ) { VipsRegion *region = VIPS_REGION( object ); vips_object_sanity( VIPS_OBJECT( region->im ) ); switch( region->im->dtype ) { case VIPS_IMAGE_PARTIAL: /* Start and stop can be NULL, but not generate. */ if( !region->im->generate_fn ) vips_buf_appends( buf, "generate NULL in partial\n" ); break; default: break; } VIPS_OBJECT_CLASS( vips_region_parent_class )->sanity( object, buf ); } /* If a region is being created in one thread (eg. the main thread) and then * used in another (eg. a worker thread), the new thread needs to tell VIPS * to stop sanity g_assert() fails. The previous owner needs to * vips__region_no_ownership() before we can call this. */ void vips__region_take_ownership( VipsRegion *region ) { /* Lock so that there's a memory barrier with the thread doing the * vips__region_no_ownership() before us. */ VIPS_GATE_START( "vips__region_take_ownership: wait" ); g_mutex_lock( region->im->sslock ); VIPS_GATE_STOP( "vips__region_take_ownership: wait" ); if( region->thread != g_thread_self() ) { g_assert( region->thread == NULL ); /* We don't want to move shared buffers: the other region * using this buffer will still be on the other thread. * Not sure if this will ever happen: if it does, we'll * need to dup the buffer. */ g_assert( !region->buffer || region->buffer->ref_count == 1 ); region->thread = g_thread_self(); } g_mutex_unlock( region->im->sslock ); } void vips__region_check_ownership( VipsRegion *region ) { if( region->thread ) { g_assert( region->thread == g_thread_self() ); if( region->buffer && region->buffer->cache ) g_assert( region->thread == region->buffer->cache->thread ); } } /* Call this from the relinquishing thread. Removes the buffer (if any) from * this thread's buffer cache. */ void vips__region_no_ownership( VipsRegion *region ) { VIPS_GATE_START( "vips__region_no_ownership: wait" ); g_mutex_lock( region->im->sslock ); VIPS_GATE_STOP( "vips__region_no_ownership: wait" ); vips__region_check_ownership( region ); region->thread = NULL; if( region->buffer ) vips_buffer_undone( region->buffer ); g_mutex_unlock( region->im->sslock ); } static int vips_region_build( VipsObject *object ) { VipsRegion *region = VIPS_REGION( object ); VipsImage *image = region->im; VIPS_DEBUG_MSG( "vips_region_build: %p\n", region ); if( VIPS_OBJECT_CLASS( vips_region_parent_class )->build( object ) ) return( -1 ); vips__region_take_ownership( region ); /* We're usually inside the ss lock anyway. But be safe ... */ VIPS_GATE_START( "vips_region_build: wait" ); g_mutex_lock( image->sslock ); VIPS_GATE_STOP( "vips_region_build: wait" ); image->regions = g_slist_prepend( image->regions, region ); g_mutex_unlock( image->sslock ); return( 0 ); } static void vips_region_class_init( VipsRegionClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->finalize = vips_region_finalize; gobject_class->dispose = vips_region_dispose; vobject_class->summary = vips_region_summary; vobject_class->dump = vips_region_dump; vobject_class->sanity = vips_region_sanity; vobject_class->build = vips_region_build; } static void vips_region_init( VipsRegion *region ) { region->type = VIPS_REGION_NONE; #ifdef VIPS_DEBUG g_mutex_lock( vips__global_lock ); vips__regions_all = g_slist_prepend( vips__regions_all, region ); printf( "vips_region_init: %d regions in vips\n", g_slist_length( vips__regions_all ) ); g_mutex_unlock( vips__global_lock ); #endif /*VIPS_DEBUG*/ } /** * vips_region_new: * @image: image to create this region on * * Create a region. #VipsRegion s start out empty, you need to call * vips_region_prepare() to fill them with pixels. * * See also: vips_region_prepare(). */ VipsRegion * vips_region_new( VipsImage *image ) { VipsRegion *region; /* Ref quickly, we want to make sure we keep the image around. * We can't use the property system, we need to be very threaded. */ g_object_ref( image ); g_assert( G_OBJECT( image )->ref_count > 1 ); #ifdef DEBUG g_assert( vips_object_sanity( VIPS_OBJECT( image ) ) ); #endif /*DEBUG*/ region = VIPS_REGION( g_object_new( VIPS_TYPE_REGION, NULL ) ); region->im = image; if( vips_object_build( VIPS_OBJECT( region ) ) ) { VIPS_UNREF( region ); return( NULL ); } #ifdef DEBUG g_assert( vips_object_sanity( VIPS_OBJECT( region ) ) ); #endif /*DEBUG*/ return( region ); } /* Region should be a pixel buffer. On return, check * reg->buffer->done to see if there are pixels there already. Otherwise, you * need to calculate. */ /** * vips_region_buffer: * @reg: region to operate upon * @r: #VipsRect of pixels you need to be able to address * * The region is transformed so that at least @r pixels are available as a * memory buffer. * * Returns: 0 on success, or -1 for error. */ int vips_region_buffer( VipsRegion *reg, VipsRect *r ) { VipsImage *im = reg->im; VipsRect image; VipsRect clipped; vips__region_check_ownership( reg ); /* Clip against image. */ image.top = 0; image.left = 0; image.width = im->Xsize; image.height = im->Ysize; vips_rect_intersectrect( r, &image, &clipped ); /* Test for empty. */ if( vips_rect_isempty( &clipped ) ) { vips_error( "VipsRegion", "%s", _( "valid clipped to nothing" ) ); return( -1 ); } VIPS_FREEF( vips_window_unref, reg->window ); /* Have we been asked to drop caches? We want to throw everything * away. * * If not, try to reuse the current buffer. */ if( reg->invalid ) { VIPS_FREEF( vips_buffer_unref, reg->buffer ); reg->invalid = FALSE; if( !(reg->buffer = vips_buffer_new( im, &clipped )) ) return( -1 ); } else { /* We combine buffer unref and new buffer ref in one call * to reduce malloc/free cycling. */ if( !(reg->buffer = vips_buffer_unref_ref( reg->buffer, im, &clipped )) ) return( -1 ); } /* Init new stuff. */ reg->valid = reg->buffer->area; reg->bpl = VIPS_IMAGE_SIZEOF_PEL( im ) * reg->buffer->area.width; reg->type = VIPS_REGION_BUFFER; reg->data = reg->buffer->buf; return( 0 ); } /** * vips_region_image: * @reg: region to operate upon * @r: #VipsRect of pixels you need to be able to address * * The region is transformed so that at least @r pixels are available directly * from the image. The image needs to be a memory buffer or represent a file * on disc that has been mapped or can be mapped. * * Returns: 0 on success, or -1 for error. */ int vips_region_image( VipsRegion *reg, VipsRect *r ) { VipsImage *image = reg->im; VipsRect all; VipsRect clipped; /* Sanity check. */ vips__region_check_ownership( reg ); /* Clip against image. */ all.top = 0; all.left = 0; all.width = image->Xsize; all.height = image->Ysize; vips_rect_intersectrect( r, &all, &clipped ); /* Test for empty. */ if( vips_rect_isempty( &clipped ) ) { vips_error( "VipsRegion", "%s", _( "valid clipped to nothing" ) ); return( -1 ); } VIPS_FREEF( vips_buffer_unref, reg->buffer ); VIPS_FREEF( vips_window_unref, reg->window ); reg->invalid = FALSE; if( image->data ) { /* We have the whole image available ... easy! */ /* We can't just set valid = clipped, since this may be an * incompletely calculated memory buffer. Just set valid to r. */ reg->valid = clipped; reg->bpl = VIPS_IMAGE_SIZEOF_LINE( image ); reg->data = VIPS_IMAGE_ADDR( image, clipped.left, clipped.top ); reg->type = VIPS_REGION_OTHER_IMAGE; } else if( image->dtype == VIPS_IMAGE_OPENIN ) { /* No complete image data ... but we can use a rolling window. */ if( reg->type != VIPS_REGION_WINDOW || !reg->window || reg->window->top > clipped.top || reg->window->top + reg->window->height < clipped.top + clipped.height ) { if( !(reg->window = vips_window_ref( image, clipped.top, clipped.height )) ) return( -1 ); reg->type = VIPS_REGION_WINDOW; } /* Note the area the window actually represents. */ reg->valid.left = 0; reg->valid.top = reg->window->top; reg->valid.width = image->Xsize; reg->valid.height = reg->window->height; reg->bpl = VIPS_IMAGE_SIZEOF_LINE( image ); reg->data = reg->window->data; } else { vips_error( "VipsRegion", "%s", _( "bad image type" ) ); return( -1 ); } return( 0 ); } /** * vips_region_region: * @reg: region to operate upon * @dest: region to connect to * @r: #VipsRect of pixels you need to be able to address * @x: postion of @r in @dest * @y: postion of @r in @dest * * Make VIPS_REGION_ADDR() on @reg go to @dest instead. * * @r is the part of @reg which you want to be able to address (this * effectively becomes the valid field), (@x, @y) is the top LH corner of the * corresponding area in @dest. * * Performs all clipping necessary to ensure that @reg->valid is indeed * valid. * * If the region we attach to is modified, we can be left with dangling * pointers! If the region we attach to is on another image, the two images * must have * the same sizeof( pel ). * * Returns: 0 on success, or -1 for error. */ int vips_region_region( VipsRegion *reg, VipsRegion *dest, VipsRect *r, int x, int y ) { VipsRect image; VipsRect wanted; VipsRect clipped; VipsRect clipped2; VipsRect final; /* Sanity check. */ if( !dest->data ) { vips_error( "VipsRegion", "%s", _( "no pixel data on attached image" ) ); return( -1 ); } if( VIPS_IMAGE_SIZEOF_PEL( dest->im ) != VIPS_IMAGE_SIZEOF_PEL( reg->im ) ) { vips_error( "VipsRegion", "%s", _( "images do not match in pixel size" ) ); return( -1 ); } vips__region_check_ownership( reg ); /* We can't test g_assert( dest->thread == g_thread_self() ); * since we can have several threads writing to the same region in * threadgroup. */ /* Clip r against size of the image. */ image.top = 0; image.left = 0; image.width = reg->im->Xsize; image.height = reg->im->Ysize; vips_rect_intersectrect( r, &image, &clipped ); /* Translate to dest's coordinate space and clip against the available * pixels. */ wanted.left = x + (clipped.left - r->left); wanted.top = y + (clipped.top - r->top); wanted.width = clipped.width; wanted.height = clipped.height; /* Test that dest->valid is large enough. */ if( !vips_rect_includesrect( &dest->valid, &wanted ) ) { vips_error( "VipsRegion", "%s", _( "dest too small" ) ); return( -1 ); } /* Clip against the available pixels. */ vips_rect_intersectrect( &wanted, &dest->valid, &clipped2 ); /* Translate back to reg's coordinate space and set as valid. */ final.left = r->left + (clipped2.left - wanted.left); final.top = r->top + (clipped2.top - wanted.top); final.width = clipped2.width; final.height = clipped2.height; /* Test for empty. */ if( vips_rect_isempty( &final ) ) { vips_error( "VipsRegion", "%s", _( "valid clipped to nothing" ) ); return( -1 ); } /* Init new stuff. */ VIPS_FREEF( vips_buffer_unref, reg->buffer ); VIPS_FREEF( vips_window_unref, reg->window ); reg->invalid = FALSE; reg->valid = final; reg->bpl = dest->bpl; reg->data = VIPS_REGION_ADDR( dest, clipped2.left, clipped2.top ); reg->type = VIPS_REGION_OTHER_REGION; return( 0 ); } /** * vips_region_equalsregion: * @reg1: region to test * @reg2: region to test * * Do two regions point to the same piece of image? ie. * * |[ * VIPS_REGION_ADDR( reg1, x, y ) == VIPS_REGION_ADDR( reg2, x, y ) && * *VIPS_REGION_ADDR( reg1, x, y ) == * *VIPS_REGION_ADDR( reg2, x, y ) for all x, y, reg1, reg2. * ]| * * Returns: non-zero on equality. */ int vips_region_equalsregion( VipsRegion *reg1, VipsRegion *reg2 ) { return( reg1->im == reg2->im && vips_rect_equalsrect( ®1->valid, ®2->valid ) && reg1->data == reg2->data ); } /** * vips_region_position: * @reg: region to operate upon * @x: position to move to * @y: position to move to * * Set the position of a region. This only affects reg->valid, ie. the way * pixels are addressed, not reg->data, the pixels which are addressed. Clip * against the size of the image. Do not allow negative positions, or * positions outside the image. * * Returns: 0 on success, or -1 for error. */ int vips_region_position( VipsRegion *reg, int x, int y ) { VipsRect req, image, clipped; /* Clip! */ image.top = 0; image.left = 0; image.width = reg->im->Xsize; image.height = reg->im->Ysize; req.top = y; req.left = x; req.width = reg->valid.width; req.height = reg->valid.height; vips_rect_intersectrect( &image, &req, &clipped ); if( x < 0 || y < 0 || vips_rect_isempty( &clipped ) ) { vips_error( "VipsRegion", "%s", _( "bad position" ) ); return( -1 ); } reg->valid = clipped; reg->invalid = FALSE; return( 0 ); } int vips_region_fill( VipsRegion *reg, VipsRect *r, VipsRegionFillFn fn, void *a ) { g_assert( reg->im->dtype == VIPS_IMAGE_PARTIAL ); g_assert( reg->im->generate_fn ); /* Should have local memory. */ if( vips_region_buffer( reg, r ) ) return( -1 ); /* Evaluate into or, if we've not got calculated pixels. */ if( !reg->buffer->done ) { if( fn( reg, a ) ) return( -1 ); /* Publish our results. */ if( reg->buffer ) vips_buffer_done( reg->buffer ); } return( 0 ); } /** * vips_region_paint: * @reg: region to operate upon * @r: area to paint * @value: value to paint * * Paints @value into @reg covering rectangle @r. @value is passed to * memset(), so it usually needs to be 0 or 255. @r is clipped against * @reg->valid. * * See also: vips_region_black(). */ void vips_region_paint( VipsRegion *reg, VipsRect *r, int value ) { VipsRect ovl; vips_rect_intersectrect( r, ®->valid, &ovl ); if( !vips_rect_isempty( &ovl ) ) { VipsPel *q = VIPS_REGION_ADDR( reg, ovl.left, ovl.top ); size_t wd = ovl.width * VIPS_IMAGE_SIZEOF_PEL( reg->im ); size_t ls = VIPS_REGION_LSKIP( reg ); int y; for( y = 0; y < ovl.height; y++ ) { memset( (char *) q, value, wd ); q += ls; } } } /** * vips_region_paint_pel: * @reg: region to operate upon * @r: area to paint * @ink: value to paint * * Paints @ink into @reg covering rectangle @r. @r is clipped against * @reg->valid. * * @ink should be a byte array of the same size as an image pixel containing * the binary value to write into the pixels. * * See also: vips_region_paint(). */ void vips_region_paint_pel( VipsRegion *reg, VipsRect *r, VipsPel *ink ) { VipsRect ovl; vips_rect_intersectrect( r, ®->valid, &ovl ); if( !vips_rect_isempty( &ovl ) ) { int ps = VIPS_IMAGE_SIZEOF_PEL( reg->im ); int ws = ovl.width * ps; int ls = VIPS_REGION_LSKIP( reg ); VipsPel *to, *q; int x, y, z; /* We plot the first line pointwise, then memcpy() it for the * subsequent lines. */ to = VIPS_REGION_ADDR( reg, ovl.left, ovl.top ); q = to; for( x = 0; x < ovl.width; x++ ) { /* Faster than memcpy() for about n<20. */ for( z = 0; z < ps; z++ ) q[z] = ink[z]; q += ps; } q = to + ls; for( y = 1; y < ovl.height; y++ ) { memcpy( q, to, ws ); q += ls; } } } /** * vips_region_black: * @reg: region to operate upon * * Paints 0 into the valid part of @reg. * * See also: vips_region_paint(). */ void vips_region_black( VipsRegion *reg ) { vips_region_paint( reg, ®->valid, 0 ); } /** * vips_region_copy: * @reg: source region * @dest: destination region * @r: #VipsRect of pixels you need to copy * @x: postion of @r in @dest * @y: postion of @r in @dest * * Copy from one region to another. Copy area @r from inside @reg to @dest, * positioning the area of pixels at @x, @y. The two regions must have pixels * which are the same size. * * See also: vips_region_paint(). */ void vips_region_copy( VipsRegion *reg, VipsRegion *dest, VipsRect *r, int x, int y ) { int z; int len = VIPS_IMAGE_SIZEOF_PEL( reg->im ) * r->width; VipsPel *p = VIPS_REGION_ADDR( reg, r->left, r->top ); VipsPel *q = VIPS_REGION_ADDR( dest, x, y ); int plsk = VIPS_REGION_LSKIP( reg ); int qlsk = VIPS_REGION_LSKIP( dest ); #ifdef DEBUG /* Find the area we will write to in dest. */ VipsRect output; printf( "vips_region_copy: sanity check\n" ); output.left = x; output.top = y; output.width = r->width; output.height = r->height; /* Must be inside dest->valid. */ g_assert( vips_rect_includesrect( &dest->valid, &output ) ); /* Check the area we are reading from in reg. */ g_assert( vips_rect_includesrect( ®->valid, r ) ); /* VipsPel size must be the same. */ g_assert( VIPS_IMAGE_SIZEOF_PEL( reg->im ) == VIPS_IMAGE_SIZEOF_PEL( dest->im ) ); #endif /*DEBUG*/ for( z = 0; z < r->height; z++ ) { memcpy( q, p, len ); p += plsk; q += qlsk; } } /* Generate into a region. */ static int vips_region_generate( VipsRegion *reg ) { VipsImage *im = reg->im; /* Start new sequence, if necessary. */ if( vips__region_start( reg ) ) return( -1 ); /* Ask for evaluation. */ if( im->generate_fn( reg, reg->seq, im->client1, im->client2 ) ) return( -1 ); return( 0 ); } /** * vips_region_prepare: * @reg: region to prepare * @r: #VipsRect of pixels you need to be able to address * * vips_region_prepare() fills @reg with pixels. After calling, * you can address at least the area @r with VIPS_REGION_ADDR() and get * valid pixels. * * vips_region_prepare() runs in-line, that is, computation is done by * the calling thread, no new threads are involved, and computation * blocks until the pixels are ready. * * Use vips_region_prepare_thread() to calculate an area of pixels with many * threads. Use vips_sink_screen() to calculate an area of pixels in the * background. * * See also: vips_region_prepare_thread(), vips_sink_screen(), * vips_region_prepare_to(). * * Returns: 0 on success, or -1 on error. */ int vips_region_prepare( VipsRegion *reg, VipsRect *r ) { VipsImage *im = reg->im; VipsRect save = *r; vips__region_check_ownership( reg ); if( vips_image_iskilled( im ) ) return( -1 ); /* We use save for sanity checking valid: we test at the end that the * pixels we have generated are indeed all the ones that were asked * for. * * However, r may be clipped by the image size, so we need to clip * save as well to make sure we don't fail the assert due to that. */ { VipsRect image; image.left = 0; image.top = 0; image.width = reg->im->Xsize; image.height = reg->im->Ysize; vips_rect_intersectrect( &save, &image, &save ); } #ifdef DEBUG printf( "vips_region_prepare: " "left = %d, top = %d, width = %d, height = %d\n", r->left, r->top, r->width, r->height ); #endif /*DEBUG*/ switch( im->dtype ) { case VIPS_IMAGE_PARTIAL: if( vips_region_fill( reg, r, (VipsRegionFillFn) vips_region_generate, NULL ) ) return( -1 ); break; case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_SETBUF_FOREIGN: case VIPS_IMAGE_MMAPIN: case VIPS_IMAGE_MMAPINRW: case VIPS_IMAGE_OPENIN: /* Attach to existing buffer. */ if( vips_region_image( reg, r ) ) return( -1 ); break; default: vips_error( "vips_region_prepare", _( "unable to input from a %s image" ), vips_enum_string( VIPS_TYPE_DEMAND_STYLE, im->dtype ) ); return( -1 ); } /* valid should now include all the pixels that were asked for. */ g_assert( vips_rect_includesrect( ®->valid, &save ) ); return( 0 ); } /* We need to make pixels using reg's generate function, and write the result * to dest. */ static int vips_region_prepare_to_generate( VipsRegion *reg, VipsRegion *dest, VipsRect *r, int x, int y ) { IMAGE *im = reg->im; VipsPel *p; if( !im->generate_fn ) { vips_error( "vips_region_prepare_to", "%s", _( "incomplete header" ) ); return( -1 ); } if( vips_region_region( reg, dest, r, x, y ) ) return( -1 ); /* Remember where reg is pointing now. */ p = VIPS_REGION_ADDR( reg, reg->valid.left, reg->valid.top ); /* Run sequence into reg. */ if( vips_region_generate( reg ) ) return( -1 ); /* The generate function may not have actually made any pixels ... it * might just have redirected reg to point somewhere else. If it has, * we need an extra copy operation. */ if( VIPS_REGION_ADDR( reg, reg->valid.left, reg->valid.top ) != p ) vips_region_copy( reg, dest, r, x, y ); return( 0 ); } /** * vips_region_prepare_to: * @reg: region to prepare * @dest: region to write to * @r: #VipsRect of pixels you need to be able to address * @x: postion of @r in @dest * @y: postion of @r in @dest * * Like vips_region_prepare(): fill @reg with data, ready to be read from by * our caller. Unlike vips_region_prepare(), rather than allocating memory * local to @reg for the result, we guarantee that we will fill the pixels * in @dest at offset @x, @y. In other words, we generate an extra copy * operation if necessary. * * Also unlike vips_region_prepare(), @dest is not set up for writing for * you with * vips_region_buffer(). You can * point @dest at anything, and pixels really will be written there. * This makes vips_prepare_to() useful for making the ends of pipelines, since * it (effectively) makes a break in the pipe. * * See also: vips_region_prepare(), vips_sink_disc(). * * Returns: 0 on success, or -1 on error */ int vips_region_prepare_to( VipsRegion *reg, VipsRegion *dest, VipsRect *r, int x, int y ) { VipsImage *im = reg->im; VipsRect image; VipsRect wanted; VipsRect clipped; VipsRect clipped2; VipsRect final; if( vips_image_iskilled( im ) ) return( -1 ); /* Sanity check. */ if( !dest->data || dest->im->BandFmt != reg->im->BandFmt || dest->im->Bands != reg->im->Bands ) { vips_error( "vips_region_prepare_to", "%s", _( "inappropriate region type" ) ); return( -1 ); } /* clip r first against the size of reg->im, then again against the * memory we have available to write to on dest. Just like * vips_region_region() */ image.top = 0; image.left = 0; image.width = reg->im->Xsize; image.height = reg->im->Ysize; vips_rect_intersectrect( r, &image, &clipped ); g_assert( clipped.left == r->left ); g_assert( clipped.top == r->top ); wanted.left = x + (clipped.left - r->left); wanted.top = y + (clipped.top - r->top); wanted.width = clipped.width; wanted.height = clipped.height; /* Test that dest->valid is large enough. */ if( !vips_rect_includesrect( &dest->valid, &wanted ) ) { vips_error( "vips_region_prepare_to", "%s", _( "dest too small" ) ); return( -1 ); } vips_rect_intersectrect( &wanted, &dest->valid, &clipped2 ); /* Translate back to reg's coordinate space and set as valid. */ final.left = r->left + (clipped2.left - wanted.left); final.top = r->top + (clipped2.top - wanted.top); final.width = clipped2.width; final.height = clipped2.height; x = clipped2.left; y = clipped2.top; if( vips_rect_isempty( &final ) ) { vips_error( "vips_region_prepare_to", "%s", _( "valid clipped to nothing" ) ); return( -1 ); } #ifdef DEBUG printf( "vips_region_prepare_to: " "left = %d, top = %d, width = %d, height = %d\n", final.left, final.top, final.width, final.height ); #endif /*DEBUG*/ /* Input or output image type? */ switch( im->dtype ) { case VIPS_IMAGE_OPENOUT: case VIPS_IMAGE_PARTIAL: /* We are generating with a sequence. */ if( vips_region_prepare_to_generate( reg, dest, &final, x, y ) ) return( -1 ); break; case VIPS_IMAGE_MMAPIN: case VIPS_IMAGE_MMAPINRW: case VIPS_IMAGE_OPENIN: /* Attach to existing buffer and copy to dest. */ if( vips_region_image( reg, &final ) ) return( -1 ); vips_region_copy( reg, dest, &final, x, y ); break; case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_SETBUF_FOREIGN: /* Could be either input or output. If there is a generate * function, we are outputting. */ if( im->generate_fn ) { if( vips_region_prepare_to_generate( reg, dest, &final, x, y ) ) return( -1 ); } else { if( vips_region_image( reg, &final ) ) return( -1 ); vips_region_copy( reg, dest, &final, x, y ); } break; default: vips_error( "vips_region_prepare_to", _( "unable to input from a %s image" ), vips_enum_nick( VIPS_TYPE_DEMAND_STYLE, im->dtype ) ); return( -1 ); } /* We've written fresh pixels to dest, it's no longer invalid (if it * was). * * We need this extra thing here because, unlike * vips_region_prepare(), we don't vips_region_buffer() dest before * writing it. */ dest->invalid = FALSE; return( 0 ); } int vips_region_prepare_many( VipsRegion **reg, VipsRect *r ) { for( ; *reg; ++reg ) if( vips_region_prepare( *reg, r ) ) return( -1 ); return( 0 ); } #ifdef VIPS_DEBUG static void * vips_region_dump_all_cb( VipsRegion *region, size_t *alive ) { char str[2048]; VipsBuf buf = VIPS_BUF_STATIC( str ); vips_object_summary( VIPS_OBJECT( region ), &buf ); printf( "%s\n", vips_buf_all( &buf ) ); if( region->buffer && region->buffer->buf ) *alive += region->buffer->bsize; return( NULL ); } void vips_region_dump_all( void ) { size_t alive; g_mutex_lock( vips__global_lock ); alive = 0; printf( "%d regions in vips\n", g_slist_length( vips__regions_all ) ); vips_slist_map2( vips__regions_all, (VipsSListMap2Fn) vips_region_dump_all_cb, &alive, NULL ); printf( "%gMB alive\n", alive / (1024 * 1024.0) ); g_mutex_unlock( vips__global_lock ); } #endif /*VIPS_DEBUG*/ vips-7.38.5/libvips/iofuncs/mapfile.c0000644000175000017500000002005112303140253014406 00000000000000/* map and unmap files in various ways * * Copyright: Nicos Dessipris * Wriiten on: 13/02/1990 * Updated on: * 10/5/93 J.Cupitt * - im_mapfilerw() added * 13/12/94 JC * - ANSIfied * 5/7/99 JC * - better error if unable to map rw * 31/3/02 JC * - better mmap() fails error * 19/9/02 JC * - added im__mmap()/im__munmap() with windows versions * 5/1/04 Lev Serebryakov * - patched for freebsd compatibility * 5/2/04 JC * - now records length as well as base, so we unmap the right amount of * memory even if files change behind our back * 1/1/10 * - set NOCACHE if we can ... helps OS X performance a lot * 25/3/11 * - move to vips_ namespace */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #ifdef HAVE_SYS_MMAN_H #include #endif /*HAVE_SYS_MMAN_H*/ #ifdef HAVE_SYS_FILE_H #include #endif /*HAVE_SYS_FILE_H*/ #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #ifdef OS_WIN32 #ifndef S_ISREG #define S_ISREG(m) (!!(m & _S_IFREG)) #endif #endif /*OS_WIN32*/ #include #ifdef OS_WIN32 #include #endif /*OS_WIN32*/ void * vips__mmap( int fd, int writeable, size_t length, gint64 offset ) { void *baseaddr; #ifdef DEBUG printf( "vips__mmap: length = 0x%zx, offset = 0x%lx\n", length, offset ); #endif /*DEBUG*/ #ifdef OS_WIN32 { HANDLE hFile = (HANDLE) _get_osfhandle( fd ); DWORD flProtect; DWORD dwDesiredAccess; HANDLE hMMFile; ULARGE_INTEGER quad; DWORD dwFileOffsetHigh; DWORD dwFileOffsetLow; if( writeable ) { flProtect = PAGE_READWRITE; dwDesiredAccess = FILE_MAP_WRITE; } else { flProtect = PAGE_READONLY; dwDesiredAccess = FILE_MAP_READ; } quad.QuadPart = offset; dwFileOffsetLow = quad.LowPart; dwFileOffsetHigh = quad.HighPart; if( !(hMMFile = CreateFileMapping( hFile, NULL, flProtect, 0, 0, NULL )) ) { vips_error_system( GetLastError(), "vips_mapfile", "%s", _( "unable to CreateFileMapping" ) ); printf( "CreateFileMapping failed: %s\n", vips_error_buffer() ); return( NULL ); } if( !(baseaddr = (char *)MapViewOfFile( hMMFile, dwDesiredAccess, dwFileOffsetHigh, dwFileOffsetLow, length )) ) { vips_error_system( GetLastError(), "vips_mapfile", "%s", _( "unable to MapViewOfFile" ) ); printf( "MapViewOfFile failed: %s\n", vips_error_buffer() ); CloseHandle( hMMFile ); return( NULL ); } /* Can close mapping now ... view stays until UnmapViewOfFile(). FIXME ... is this a performance problem? */ CloseHandle( hMMFile ); } #else /*!OS_WIN32*/ { int prot; int flags; if( writeable ) prot = PROT_WRITE; else prot = PROT_READ; flags = MAP_SHARED; /* OS X caches mmapped files very aggressively if this flags is not * set. Scanning a large file without this flag will cause every other * process to get swapped out and kill performance. */ #ifdef MAP_NOCACHE flags |= MAP_NOCACHE; #endif /*MAP_NOCACHE*/ /* Casting gint64 to off_t should be safe, even on *nixes without * LARGEFILE. */ baseaddr = mmap( 0, length, prot, flags, fd, (off_t) offset ); if( baseaddr == MAP_FAILED ) { vips_error_system( errno, "vips_mapfile", "%s", _( "unable to mmap" ) ); vips_warn( "vips_mapfile", _( "map failed (%s), " "running very low on system resources, " "expect a crash soon" ), strerror( errno ) ); return( NULL ); } } #endif /*OS_WIN32*/ return( baseaddr ); } int vips__munmap( void *start, size_t length ) { #ifdef OS_WIN32 if( !UnmapViewOfFile( start ) ) { vips_error_system( GetLastError(), "vips_mapfile", "%s", _( "unable to UnmapViewOfFile" ) ); return( -1 ); } #else /*!OS_WIN32*/ if( munmap( start, length ) < 0 ) { vips_error_system( errno, "vips_mapfile", "%s", _( "unable to munmap file" ) ); return( -1 ); } #endif /*OS_WIN32*/ return( 0 ); } int vips_mapfile( VipsImage *im ) { struct stat st; mode_t m; assert( !im->baseaddr ); /* Check the size of the file; if it is less than 64 bytes, then flag * an error, we won't be able to read the vips header without a segv. */ g_assert( im->file_length > 0 ); if( im->file_length < 64 ) { vips_error( "vips_mapfile", "%s", _( "file is less than 64 bytes" ) ); return( -1 ); } if( fstat( im->fd, &st ) == -1 ) { vips_error( "vips_mapfile", "%s", _( "unable to get file status" ) ); return( -1 ); } m = (mode_t) st.st_mode; if( !S_ISREG( m ) ) { vips_error( "vips_mapfile", "%s", _( "not a regular file" ) ); return( -1 ); } if( !(im->baseaddr = vips__mmap( im->fd, 0, im->file_length, 0 )) ) return( -1 ); im->length = im->file_length; return( 0 ); } /* As above, but map read/write. */ int vips_mapfilerw( VipsImage *im ) { struct stat st; mode_t m; assert( !im->baseaddr ); /* Check the size of the file if it is less than 64 bytes return * make also sure that it is a regular file */ g_assert( im->file_length > 0 ); if( fstat( im->fd, &st ) == -1 ) { vips_error( "vips_mapfilerw", "%s", _( "unable to get file status" ) ); return( -1 ); } m = (mode_t) st.st_mode; if( im->file_length < 64 || !S_ISREG( m ) ) { vips_error( "vips_mapfile", "%s", _( "unable to read data" ) ); return( -1 ); } if( !(im->baseaddr = vips__mmap( im->fd, 1, im->file_length, 0 )) ) return( -1 ); im->length = im->file_length; return( 0 ); } /* From im_rwcheck() ... image needs to be a completely mapped read-only file, * we try to remap it read-write. */ int vips_remapfilerw( VipsImage *image ) { void *baseaddr; #ifdef OS_WIN32 { HANDLE hFile = (HANDLE) _get_osfhandle( image->fd ); HANDLE hMMFile; if( !(hMMFile = CreateFileMapping( hFile, NULL, PAGE_READWRITE, 0, 0, NULL )) ) { vips_error_system( GetLastError(), "vips_mapfile", "%s", _( "unable to CreateFileMapping" ) ); return( -1 ); } if( !UnmapViewOfFile( image->baseaddr ) ) { vips_error_system( GetLastError(), "vips_mapfile", "%s", _( "unable to UnmapViewOfFile" ) ); return( -1 ); } if( !(baseaddr = (char *)MapViewOfFileEx( hMMFile, FILE_MAP_WRITE, 0, 0, 0, image->baseaddr )) ) { vips_error_system( GetLastError(), "vips_mapfile", "%s", _( "unable to MapViewOfFile" ) ); CloseHandle( hMMFile ); return( -1 ); } /* Can close mapping now ... view stays until UnmapViewOfFile(). FIXME ... is this a performance problem? */ CloseHandle( hMMFile ); } #else /*!OS_WIN32*/ { assert( image->dtype == VIPS_IMAGE_MMAPIN ); baseaddr = mmap( image->baseaddr, image->length, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, image->fd, 0 ); if( baseaddr == (void *)-1 ) { vips_error( "vips_mapfile", _( "unable to mmap: \"%s\" - %s" ), image->filename, strerror( errno ) ); return( -1 ); } } #endif /*OS_WIN32*/ image->dtype = VIPS_IMAGE_MMAPINRW; if( baseaddr != image->baseaddr ) { vips_error( "vips_mapfile", _( "unable to mmap \"%s\" to same " "address" ), image->filename ); image->baseaddr = baseaddr; return( -1 ); } return( 0 ); } vips-7.38.5/libvips/iofuncs/Makefile.in0000644000175000017500000005764512303144055014721 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/iofuncs DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libiofuncs_la_LIBADD = am_libiofuncs_la_OBJECTS = type.lo gate.lo enumtypes.lo object.lo \ base64.lo error.lo image.lo vips.lo generate.lo mapfile.lo \ cache.lo sink.lo sinkmemory.lo sinkdisc.lo sinkscreen.lo \ memory.lo header.lo operation.lo region.lo rect.lo \ semaphore.lo threadpool.lo util.lo init.lo buf.lo window.lo \ vector.lo system.lo buffer.lo libiofuncs_la_OBJECTS = $(am_libiofuncs_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libiofuncs_la_SOURCES) DIST_SOURCES = $(libiofuncs_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libiofuncs.la libiofuncs_la_SOURCES = \ type.c \ gate.c \ enumtypes.c \ object.c \ base64.h \ base64.c \ error.c \ image.c \ vips.c \ generate.c \ mapfile.c \ cache.c \ sink.h \ sink.c \ sinkmemory.c \ sinkdisc.c \ sinkscreen.c \ memory.c \ header.c \ operation.c \ region.c \ rect.c \ semaphore.c \ threadpool.c \ util.c \ init.c \ buf.c \ window.c \ vector.c \ system.c \ buffer.c EXTRA_DIST = enumtemplate AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ # the headers we scan for enums etc. # keep in sync with ../include/vips/Makefile.am # we need absolute filenames here since this list appears in the header dir as # well vips_scan_headers = \ ${top_srcdir}/libvips/include/vips/memory.h \ ${top_srcdir}/libvips/include/vips/foreign.h \ ${top_srcdir}/libvips/include/vips/conversion.h \ ${top_srcdir}/libvips/include/vips/arithmetic.h \ ${top_srcdir}/libvips/include/vips/util.h \ ${top_srcdir}/libvips/include/vips/image.h \ ${top_srcdir}/libvips/include/vips/colour.h \ ${top_srcdir}/libvips/include/vips/operation.h \ ${top_srcdir}/libvips/include/vips/convolution.h \ ${top_srcdir}/libvips/include/vips/morphology.h \ ${top_srcdir}/libvips/include/vips/object.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/iofuncs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/iofuncs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libiofuncs.la: $(libiofuncs_la_OBJECTS) $(libiofuncs_la_DEPENDENCIES) $(EXTRA_libiofuncs_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libiofuncs_la_OBJECTS) $(libiofuncs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enumtypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/header.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/operation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/region.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semaphore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinkdisc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinkmemory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinkscreen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threadpool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am enumtypes.c: $(vips_scan_headers) Makefile glib-mkenums --template enumtemplate \ $(vips_scan_headers) > xgen-getc && \ ( cmp -s xgen-getc enumtypes.c || cp xgen-getc enumtypes.c ) && \ rm -f xgen-getc # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/iofuncs/Makefile.am0000644000175000017500000000270512303140253014667 00000000000000noinst_LTLIBRARIES = libiofuncs.la libiofuncs_la_SOURCES = \ type.c \ gate.c \ enumtypes.c \ object.c \ base64.h \ base64.c \ error.c \ image.c \ vips.c \ generate.c \ mapfile.c \ cache.c \ sink.h \ sink.c \ sinkmemory.c \ sinkdisc.c \ sinkscreen.c \ memory.c \ header.c \ operation.c \ region.c \ rect.c \ semaphore.c \ threadpool.c \ util.c \ init.c \ buf.c \ window.c \ vector.c \ system.c \ buffer.c EXTRA_DIST = enumtemplate AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ # the headers we scan for enums etc. # keep in sync with ../include/vips/Makefile.am # we need absolute filenames here since this list appears in the header dir as # well vips_scan_headers = \ ${top_srcdir}/libvips/include/vips/memory.h \ ${top_srcdir}/libvips/include/vips/foreign.h \ ${top_srcdir}/libvips/include/vips/conversion.h \ ${top_srcdir}/libvips/include/vips/arithmetic.h \ ${top_srcdir}/libvips/include/vips/util.h \ ${top_srcdir}/libvips/include/vips/image.h \ ${top_srcdir}/libvips/include/vips/colour.h \ ${top_srcdir}/libvips/include/vips/operation.h \ ${top_srcdir}/libvips/include/vips/convolution.h \ ${top_srcdir}/libvips/include/vips/morphology.h \ ${top_srcdir}/libvips/include/vips/object.h enumtypes.c: $(vips_scan_headers) Makefile glib-mkenums --template enumtemplate \ $(vips_scan_headers) > xgen-getc && \ ( cmp -s xgen-getc enumtypes.c || cp xgen-getc enumtypes.c ) && \ rm -f xgen-getc vips-7.38.5/libvips/iofuncs/image.c0000644000175000017500000020231312303141142014054 00000000000000/* vips image class * * 4/2/11 * - hacked up from various places * 6/6/13 * - vips_image_write() didn't ref non-partial sources */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include /** * SECTION: image * @short_description: the VIPS image class * @stability: Stable * @see_also: region * @include: vips/vips.h * * The image class and associated types and macros. * * vips_image_wio_input() and friends indicate the image IO style you * intend to use, transforming the underlying #VipsImage structure if * necessary. */ /** * VIPS_MAGIC_INTEL: * * The first four bytes of a VIPS file in Intel byte ordering. */ /** * VIPS_MAGIC_SPARC: * * The first four bytes of a VIPS file in SPARC byte ordering. */ /** * VipsAccess: * @VIPS_ACCESS_RANDOM: can read anywhere * @VIPS_ACCESS_SEQUENTIAL: top-to-bottom reading only, but with a small buffer * @VIPS_ACCESS_SEQUENTIAL_UNBUFFERED: top-to-bottom reading only * * The type of access an operation has to supply. See vips_tilecache() * and #VipsForeign. * * @VIPS_ACCESS_RANDOM means requests can come in any order. * * @VIPS_ACCESS_SEQUENTIAL means requests will be top-to-bottom, but with some * amount of buffering behind the read point for small non-local accesses. * * @VIPS_ACCESS_SEQUENTIAL_UNBUFFERED means requests will be strictly * top-to-bottom with no read-behind. This can save some memory. */ /** * VipsDemandStyle: * @VIPS_DEMAND_STYLE_SMALLTILE: demand in small (typically 64x64 pixel) tiles * @VIPS_DEMAND_STYLE_FATSTRIP: demand in fat (typically 10 pixel high) strips * @VIPS_DEMAND_STYLE_THINSTRIP: demand in thin (typically 1 pixel high) strips * @VIPS_DEMAND_STYLE_ANY: demand geometry does not matter * * See vips_image_pipelinev(). Operations can hint to the VIPS image IO system about * the kind of demand geometry they prefer. * * These demand styles are given below in order of increasing * restrictiveness. When demanding output from a pipeline, * vips_image_generate() * will use the most restrictive of the styles requested by the operations * in the pipeline. * * #VIPS_DEMAND_STYLE_THINSTRIP --- This operation would like to output strips * the width of the image and a few pels high. This is option suitable for * point-to-point operations, such as those in the arithmetic package. * * This option is only efficient for cases where each output pel depends * upon the pel in the corresponding position in the input image. * * #VIPS_DEMAND_STYLE_FATSTRIP --- This operation would like to output strips * the width of the image and as high as possible. This option is suitable * for area operations which do not violently transform coordinates, such * as im_conv(). * * #VIPS_DEMAND_STYLE_SMALLTILE --- This is the most general demand format. * Output is demanded in small (around 100x100 pel) sections. This style works * reasonably efficiently, even for bizzare operations like 45 degree rotate. * * #VIPS_DEMAND_STYLE_ANY --- This image is not being demand-read from a disc * file (even indirectly) so any demand style is OK. It's used for things like * im_black() where the pixels are calculated. * * See also: vips_image_pipelinev(). */ /** * VipsInterpretation: * @VIPS_INTERPRETATION_MULTIBAND: generic many-band image * @VIPS_INTERPRETATION_B_W: some kind of single-band image * @VIPS_INTERPRETATION_HISTOGRAM: a 1D image, eg. histogram or lookup table * @VIPS_INTERPRETATION_FOURIER: image is in fourier space * @VIPS_INTERPRETATION_XYZ: the first three bands are CIE XYZ * @VIPS_INTERPRETATION_LAB: pixels are in CIE Lab space * @VIPS_INTERPRETATION_CMYK: the first four bands are in CMYK space * @VIPS_INTERPRETATION_LABQ: implies #VIPS_CODING_LABQ * @VIPS_INTERPRETATION_RGB: generic RGB space * @VIPS_INTERPRETATION_CMC: a uniform colourspace based on CMC(1:1) * @VIPS_INTERPRETATION_LCH: pixels are in CIE LCh space * @VIPS_INTERPRETATION_LABS: CIE LAB coded as three signed 16-bit values * @VIPS_INTERPRETATION_sRGB: pixels are sRGB * @VIPS_INTERPRETATION_scRGB: pixels are scRGB * @VIPS_INTERPRETATION_YXY: pixels are CIE Yxy * @VIPS_INTERPRETATION_RGB16: generic 16-bit RGB * @VIPS_INTERPRETATION_GREY16: generic 16-bit mono * @VIPS_INTERPRETATION_MATRIX: a matrix * * How the values in an image should be interpreted. For example, a * three-band float image of type #VIPS_INTERPRETATION_LAB should have its * pixels interpreted as coordinates in CIE Lab space. * * These values are set by operations as hints to user-interfaces built on top * of VIPS to help them show images to the user in a meaningful way. * Operations do not use these values to decide their action. * * The gaps in the numbering are historical and must be maintained. Allocate * new numbers from the end. */ /** * VipsBandFormat: * @VIPS_FORMAT_NOTSET: invalid setting * @VIPS_FORMAT_UCHAR: unsigned char format * @VIPS_FORMAT_CHAR: char format * @VIPS_FORMAT_USHORT: unsigned short format * @VIPS_FORMAT_SHORT: short format * @VIPS_FORMAT_UINT: unsigned int format * @VIPS_FORMAT_INT: int format * @VIPS_FORMAT_FLOAT: float format * @VIPS_FORMAT_COMPLEX: complex (two floats) format * @VIPS_FORMAT_DOUBLE: double float format * @VIPS_FORMAT_DPCOMPLEX: double complex (two double) format * * The format used for each band element. * * Each corresponnds to a native C type for the current machine. For example, * #VIPS_FORMAT_USHORT is unsigned short. */ /** * VipsCoding: * @VIPS_CODING_NONE: pixels are not coded * @VIPS_CODING_LABQ: pixels encode 3 float CIELAB values as 4 uchar * @VIPS_CODING_RAD: pixels encode 3 float RGB as 4 uchar (Radiance coding) * * How pixels are coded. * * Normally, pixels are uncoded and can be manipulated as you would expect. * However some file formats code pixels for compression, and sometimes it's * useful to be able to manipulate images in the coded format. * * The gaps in the numbering are historical and must be maintained. Allocate * new numbers from the end. */ /** * VipsProgress: * @run: Time we have been running * @eta: Estimated seconds of computation left * @tpels: Number of pels we expect to calculate * @npels: Number of pels calculated so far * @percent: Percent complete * @start: Start time * * A structure available to eval callbacks giving information on evaluation * progress. See #VipsImage::eval. */ /** * VipsImage: * * An image. These can represent an image on disc, a memory buffer, an image * in the process of being written to disc or a partially evaluated image * in memory. */ /** * VIPS_IMAGE_SIZEOF_ELEMENT: * @I: a #VipsImage * * Returns: sizeof() a band element. */ /** * VIPS_IMAGE_SIZEOF_PEL: * @I: a #VipsImage * * Returns: sizeof() a pixel. */ /** * VIPS_IMAGE_SIZEOF_LINE: * @I: a #VipsImage * * Returns: sizeof() a scanline of pixels. */ /** * VIPS_IMAGE_N_ELEMENTS: * @I: a #VipsImage * * Returns: The number of band elements in a scanline. */ /** * VIPS_IMAGE_N_PELS: * @I: a #VipsImage * * Returns: The number of pels in an image. A 64-bit unsigned int. */ /** * VIPS_IMAGE_ADDR: * @I: a #VipsImage * @X: x coordinate * @Y: y coordinate * * This macro returns a pointer to a pixel in an image, cast to a #VipsPel *. * It only works for * images which are fully available in memory, so memory buffers and small * mapped images only. * * If VIPS_DEBUG is defined, you get a version that checks bounds for you. * * See also: VIPS_REGION_ADDR(). * * Returns: The address of pixel (x,y) in the image. */ /** * VIPS_MATRIX: * @I: a #VipsImage * @X: x coordinate * @Y: y coordinate * * This macro returns a pointer to a pixel in an image, cast to a double*. The * image must have a single band, be #VIPS_FORMAT_DOUBLE and be * fully available in memory, so memory buffers and small * mapped images only. * * If VIPS_DEBUG is defined, you get a version that checks bounds and image * type for you. * * See also: VIPS_IMAGE_ADDR(). * * Returns: The address of pixel (x,y) in the image. */ /* Our signals. */ enum { SIG_PREEVAL, SIG_EVAL, SIG_POSTEVAL, SIG_WRITTEN, SIG_INVALIDATE, SIG_MINIMISE, SIG_LAST }; /* Progress feedback. Only really useful for testing, tbh. */ int vips__progress = 0; /* A string giving the image size (in bytes of uncompressed image) above which * we decompress to disc on open. Can be eg. "12m" for 12 megabytes. */ char *vips__disc_threshold = NULL; static guint vips_image_signals[SIG_LAST] = { 0 }; G_DEFINE_TYPE( VipsImage, vips_image, VIPS_TYPE_OBJECT ); static void vips_image_delete( VipsImage *image ) { if( image->delete_on_close ) { g_assert( image->delete_on_close_filename ); VIPS_DEBUG_MSG( "vips_image_delete: removing temp %s\n", image->delete_on_close_filename ); g_unlink( image->delete_on_close_filename ); VIPS_FREE( image->delete_on_close_filename ); image->delete_on_close = FALSE; } } static void vips_image_finalize( GObject *gobject ) { VipsImage *image = VIPS_IMAGE( gobject ); VIPS_DEBUG_MSG( "vips_image_finalize: %p\n", gobject ); /* Should be no regions defined on the image, since they all hold a * ref to their host image. */ g_assert( !image->regions ); /* Therefore there should be no windows. */ g_assert( !image->windows ); /* Junk generate functions. */ image->start_fn = NULL; image->generate_fn = NULL; image->stop_fn = NULL; image->client1 = NULL; image->client2 = NULL; /* No more upstream/downstream links. */ vips__link_break_all( image ); if( image->time ) { VIPS_FREEF( g_timer_destroy, image->time->start ); VIPS_FREE( image->time ); } /* Any image data? */ if( image->data ) { /* Buffer image. Only free stuff we know we allocated. */ if( image->dtype == VIPS_IMAGE_SETBUF ) { VIPS_DEBUG_MSG( "vips_image_finalize: " "freeing buffer\n" ); vips_tracked_free( image->data ); image->dtype = VIPS_IMAGE_NONE; } image->data = NULL; } /* If this is a temp, delete it. */ vips_image_delete( image ); VIPS_FREEF( vips_g_mutex_free, image->sslock ); VIPS_FREE( image->Hist ); VIPS_FREEF( vips__gslist_gvalue_free, image->history_list ); vips__meta_destroy( image ); G_OBJECT_CLASS( vips_image_parent_class )->finalize( gobject ); } static void vips_image_dispose( GObject *gobject ) { VipsImage *image = VIPS_IMAGE( gobject ); VIPS_DEBUG_MSG( "vips_image_dispose: %p\n", gobject ); vips_object_preclose( VIPS_OBJECT( gobject ) ); /* We have to junk the fd in dispose, since we run this for rewind and * we must close and reopen the file when we switch from write to * read. */ /* Any file mapping? */ if( image->baseaddr ) { /* MMAP file. */ VIPS_DEBUG_MSG( "vips_image_dispose: unmapping file\n" ); vips__munmap( image->baseaddr, image->length ); image->baseaddr = NULL; image->length = 0; /* This must have been a pointer to the mmap region, rather * than a setbuf. */ image->data = NULL; } /* Is there a file descriptor? */ if( image->fd != -1 ) { VIPS_DEBUG_MSG( "vips_image_dispose: closing output file\n" ); if( vips_tracked_close( image->fd ) == -1 ) vips_error( "VipsImage", "%s", _( "unable to close fd" ) ); image->fd = -1; } G_OBJECT_CLASS( vips_image_parent_class )->dispose( gobject ); } static VipsObject * vips_image_new_from_file_object( const char *string ) { VipsImage *image; vips_check_init(); /* We mustn't _build() the object here, so we can't just call * vips_image_new_from_file(). */ image = VIPS_IMAGE( g_object_new( VIPS_TYPE_IMAGE, NULL ) ); g_object_set( image, "filename", string, "mode", "r", NULL ); return( VIPS_OBJECT( image ) ); } static void vips_image_to_string( VipsObject *object, VipsBuf *buf ) { VipsImage *image = VIPS_IMAGE( object ); vips_buf_appends( buf, image->filename ); } static int vips_image_write_object( VipsObject *object, const char *string ) { return( vips_image_write_to_file( VIPS_IMAGE( object ), string ) ); } static void * print_field_fn( VipsImage *image, const char *field, GValue *value, void *a ) { VipsBuf *buf = (VipsBuf *) a; const char *extra; char *str_value; /* Look for known enums and decode them. */ extra = NULL; if( strcmp( field, "coding" ) == 0 ) extra = vips_enum_nick( VIPS_TYPE_CODING, g_value_get_int( value ) ); else if( strcmp( field, "format" ) == 0 ) extra = vips_enum_nick( VIPS_TYPE_BAND_FORMAT, g_value_get_int( value ) ); else if( strcmp( field, "interpretation" ) == 0 ) extra = vips_enum_nick( VIPS_TYPE_INTERPRETATION, g_value_get_int( value ) ); str_value = g_strdup_value_contents( value ); vips_buf_appendf( buf, "%s: %s", field, str_value ); g_free( str_value ); if( extra ) vips_buf_appendf( buf, " - %s", extra ); vips_buf_appendf( buf, "\n" ); return( NULL ); } static void vips_image_dump( VipsObject *object, VipsBuf *buf ) { VipsImage *image = VIPS_IMAGE( object ); vips_buf_appendf( buf, ngettext( "%dx%d %s, %d band, %s", "%dx%d %s, %d bands, %s", vips_image_get_bands( image ) ), vips_image_get_width( image ), vips_image_get_height( image ), vips_enum_nick( VIPS_TYPE_BAND_FORMAT, vips_image_get_format( image ) ), vips_image_get_bands( image ), vips_enum_nick( VIPS_TYPE_INTERPRETATION, vips_image_get_interpretation( image ) ) ); vips_buf_appendf( buf, ", %s", vips_enum_nick( VIPS_TYPE_IMAGE_TYPE, image->dtype ) ); VIPS_OBJECT_CLASS( vips_image_parent_class )->dump( object, buf ); vips_buf_appendf( buf, "\n" ); (void) vips_image_map( image, print_field_fn, (void *) buf ); vips_buf_appendf( buf, "Hist: %s", vips_image_get_history( image ) ); } static void vips_image_summary( VipsObject *object, VipsBuf *buf ) { VipsImage *image = VIPS_IMAGE( object ); const char *p; vips_buf_appendf( buf, "%dx%d", vips_image_get_width( image ), vips_image_get_height( image ) ); if( vips_image_get_coding( image ) == VIPS_CODING_NONE ) { vips_buf_appendf( buf, ngettext( " %s, %d band, %s", " %s, %d bands, %s", vips_image_get_bands( image ) ), vips_enum_nick( VIPS_TYPE_BAND_FORMAT, vips_image_get_format( image ) ), vips_image_get_bands( image ), vips_enum_nick( VIPS_TYPE_INTERPRETATION, vips_image_get_interpretation( image ) ) ); } else { vips_buf_appendf( buf, ", %s", vips_enum_nick( VIPS_TYPE_CODING, vips_image_get_coding( image ) ) ); } if( vips_image_get_typeof( image, VIPS_META_LOADER ) && !vips_image_get_string( image, VIPS_META_LOADER, &p ) ) vips_buf_appendf( buf, ", %s", p ); VIPS_OBJECT_CLASS( vips_image_parent_class )->summary( object, buf ); } static void * vips_image_sanity_upstream( VipsImage *up, VipsImage *down ) { if( !g_slist_find( up->downstream, down ) || !g_slist_find( down->upstream, up ) ) return( up ); return( NULL ); } static void * vips_image_sanity_downstream( VipsImage *down, VipsImage *up ) { return( vips_image_sanity_upstream( up, down ) ); } static void vips_image_sanity( VipsObject *object, VipsBuf *buf ) { VipsImage *image = VIPS_IMAGE( object ); if( !image->filename ) vips_buf_appends( buf, "NULL filename\n" ); /* All 0 means im has been inited but never used. */ if( image->Xsize != 0 || image->Ysize != 0 || image->Bands != 0 ) { if( image->Xsize <= 0 || image->Ysize <= 0 || image->Bands <= 0 ) vips_buf_appends( buf, "bad dimensions\n" ); if( image->BandFmt < -1 || image->BandFmt > VIPS_FORMAT_DPCOMPLEX || (image->Coding != -1 && image->Coding != VIPS_CODING_NONE && image->Coding != VIPS_CODING_LABQ && image->Coding != VIPS_CODING_RAD) || image->Type > VIPS_INTERPRETATION_scRGB || image->dtype > VIPS_IMAGE_PARTIAL || image->dhint > VIPS_DEMAND_STYLE_ANY ) vips_buf_appends( buf, "bad enum\n" ); if( image->Xres < 0 || image->Yres < 0 ) vips_buf_appends( buf, "bad resolution\n" ); } /* Must lock around inter-image links. */ g_mutex_lock( vips__global_lock ); if( vips_slist_map2( image->upstream, (VipsSListMap2Fn) vips_image_sanity_upstream, image, NULL ) ) vips_buf_appends( buf, "upstream broken\n" ); if( vips_slist_map2( image->downstream, (VipsSListMap2Fn) vips_image_sanity_downstream, image, NULL ) ) vips_buf_appends( buf, "downstream broken\n" ); g_mutex_unlock( vips__global_lock ); VIPS_OBJECT_CLASS( vips_image_parent_class )->sanity( object, buf ); } static void vips_image_rewind( VipsObject *object ) { VipsImage *image = VIPS_IMAGE( object ); char *filename; char *mode; /* This triggers a dispose. Copy filename/mode across the dispose. */ filename = g_strdup( vips_image_get_filename( image ) ); mode = g_strdup( vips_image_get_mode( image ) ); VIPS_OBJECT_CLASS( vips_image_parent_class )->rewind( object ); g_assert( image->filename == NULL ); g_assert( image->mode == NULL ); image->filename = filename; image->mode = mode; } /* Delayed save. */ /* If we write to (eg.) TIFF, actually do the write * to a "p" and on "written" do im_vips2tiff() or whatever. */ /* From "written" callback: save to image->filename using VipsForeign. */ static void vips_image_save_cb( VipsImage *image, int *result ) { if( vips_foreign_save_options( image, image->filename, NULL ) ) *result = -1; } /* Progress feedback. */ static int vips_image_preeval_cb( VipsImage *image, VipsProgress *progress, int *last ) { int tile_width; int tile_height; int nlines; *last = -1; vips_get_tile_size( image, &tile_width, &tile_height, &nlines ); printf( _( "%s %s: %d x %d pixels, %d threads, %d x %d tiles, " "%d lines in buffer" ), g_get_prgname(), image->filename, image->Xsize, image->Ysize, vips_concurrency_get(), tile_width, tile_height, nlines ); printf( "\n" ); return( 0 ); } static int vips_image_eval_cb( VipsImage *image, VipsProgress *progress, int *last ) { if( progress->percent != *last ) { printf( _( "%s %s: %d%% complete" ), g_get_prgname(), image->filename, progress->percent ); printf( "\r" ); fflush( stdout ); *last = progress->percent; /* Needs DEBUG in region.c vips_region_dump_all(); */ } return( 0 ); } static int vips_image_posteval_cb( VipsImage *image, VipsProgress *progress ) { /* Spaces at end help to erase the %complete message we overwrite. */ printf( _( "%s %s: done in %.3gs \n" ), g_get_prgname(), image->filename, g_timer_elapsed( progress->start, NULL ) ); return( 0 ); } /* Attach progress feedback, if required. */ static void vips_image_add_progress( VipsImage *image ) { if( vips__progress || g_getenv( "IM_PROGRESS" ) ) { /* Keep the %complete we displayed last time here. */ int *last = VIPS_NEW( image, int ); g_signal_connect( image, "preeval", G_CALLBACK( vips_image_preeval_cb ), last ); g_signal_connect( image, "eval", G_CALLBACK( vips_image_eval_cb ), last ); g_signal_connect( image, "posteval", G_CALLBACK( vips_image_posteval_cb ), NULL ); vips_image_set_progress( image, TRUE ); } } static int vips_image_build( VipsObject *object ) { VipsImage *image = VIPS_IMAGE( object ); const char *filename = image->filename; const char *mode = image->mode; guint32 magic; guint64 sizeof_image; VIPS_DEBUG_MSG( "vips_image_build: %p\n", image ); if( VIPS_OBJECT_CLASS( vips_image_parent_class )->build( object ) ) return( -1 ); /* Parse the mode string. */ switch( mode[0] ) { case 'v': /* Used by 'r' for native open of vips, see below. Also by * vips_image_rewind_output(). */ if( vips_image_open_input( image ) ) return( -1 ); break; case 'r': if( (magic = vips__file_magic( filename )) ) { /* We may need to byteswap. */ guint32 us = vips_amiMSBfirst() ? VIPS_MAGIC_INTEL : VIPS_MAGIC_SPARC; if( magic == us ) { /* Native open. */ if( vips_image_open_input( image ) ) return( -1 ); } else { VipsImage *t; VipsImage *t2; /* Open the image in t, then byteswap to this * image. */ if( !(t = vips_image_new_mode( filename, "v" )) ) return( -1 ); if( vips_copy( t, &t2, "swap", TRUE, NULL ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); image->dtype = VIPS_IMAGE_PARTIAL; if( vips_image_write( t2, image ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); } } else { VipsImage *t; if( mode[1] == 's' ) { if( vips_foreign_load_options( filename, &t, "access", VIPS_ACCESS_SEQUENTIAL, NULL ) ) return( -1 ); } else { if( vips_foreign_load_options( filename, &t, NULL ) ) return( -1 ); } image->dtype = VIPS_IMAGE_PARTIAL; if( vips_image_write( t, image ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); } break; case 'w': { const char *file_op; /* Make sure the vips saver is there ... strange things will * happen if this type is renamed or removed. */ g_assert( g_type_from_name( "VipsForeignSaveVips" ) ); if( !(file_op = vips_foreign_find_save_options( filename )) ) return( -1 ); /* If this is the vips saver, just save directly ourselves. * Otherwise save with VipsForeign when the image has been * written to. */ if( strcmp( file_op, "VipsForeignSaveVips" ) == 0 ) image->dtype = VIPS_IMAGE_OPENOUT; else { image->dtype = VIPS_IMAGE_PARTIAL; g_signal_connect( image, "written", G_CALLBACK( vips_image_save_cb ), NULL ); } } break; case 't': image->dtype = VIPS_IMAGE_SETBUF; image->dhint = VIPS_DEMAND_STYLE_ANY; break; case 'p': image->dtype = VIPS_IMAGE_PARTIAL; break; case 'a': /* Ban crazy numbers. */ if( image->sizeof_header > 1000000 ) { vips_error( "VipsImage", "%s", _( "bad parameters" ) ); return( -1 ); } if( (image->fd = vips__open_image_read( filename )) == -1 ) return( -1 ); image->dtype = VIPS_IMAGE_OPENIN; image->dhint = VIPS_DEMAND_STYLE_THINSTRIP; if( image->Bands == 1 ) image->Type = VIPS_INTERPRETATION_B_W; else if( image->Bands == 3 ) image->Type = VIPS_INTERPRETATION_RGB; else image->Type = VIPS_INTERPRETATION_MULTIBAND; /* Read the real file length and check against what we think * the size should be. */ if( (image->file_length = vips_file_length( image->fd )) == -1 ) return( -1 ); /* Very common, so a special message. */ sizeof_image = VIPS_IMAGE_SIZEOF_IMAGE( image ) + image->sizeof_header; if( image->file_length < sizeof_image ) { vips_error( "VipsImage", _( "unable to open \"%s\", file too short" ), image->filename ); return( -1 ); } /* Just weird. Only print a warning for this, since we should * still be able to process it without coredumps. */ if( image->file_length > sizeof_image ) vips_warn( "VipsImage", _( "%s is longer than expected" ), image->filename ); break; case 'm': if( image->Bands == 1 ) image->Type = VIPS_INTERPRETATION_B_W; else if( image->Bands == 3 ) image->Type = VIPS_INTERPRETATION_RGB; else image->Type = VIPS_INTERPRETATION_MULTIBAND; image->dtype = VIPS_IMAGE_SETBUF_FOREIGN; image->dhint = VIPS_DEMAND_STYLE_ANY; break; default: vips_error( "VipsImage", _( "bad mode \"%s\"" ), mode ); return( -1 ); } vips_image_add_progress( image ); return( 0 ); } static void * vips_region_invalidate( VipsRegion *reg ) { reg->invalid = TRUE; return( NULL ); } static void vips_image_real_invalidate( VipsImage *image ) { VIPS_DEBUG_MSG( "vips_image_real_invalidate: %p\n", image ); VIPS_GATE_START( "vips_image_real_invalidate: wait" ); g_mutex_lock( image->sslock ); VIPS_GATE_STOP( "vips_image_real_invalidate: wait" ); (void) vips_slist_map2( image->regions, (VipsSListMap2Fn) vips_region_invalidate, NULL, NULL ); g_mutex_unlock( image->sslock ); } static void vips_image_real_minimise( VipsImage *image ) { VIPS_DEBUG_MSG( "vips_image_real_minimise: %p\n", image ); } static void vips_image_real_written( VipsImage *image, int *result ) { VIPS_DEBUG_MSG( "vips_image_real_written: %p\n", image ); /* For vips image write, append the xml after the data. */ if( image->dtype == VIPS_IMAGE_OPENOUT && vips__writehist( image ) ) *result = -1; } static void vips_image_class_init( VipsImageClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); VIPS_DEBUG_MSG( "vips_image_class_init:\n" ); /* Pass in a nonsense name for argv0 ... this init world is only here * for old programs which are missing a vips_init() call. We must * have threads set up before we can process. */ if( vips_init( "vips" ) ) vips_error_clear(); gobject_class->finalize = vips_image_finalize; gobject_class->dispose = vips_image_dispose; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->new_from_string = vips_image_new_from_file_object; vobject_class->to_string = vips_image_to_string;; vobject_class->output_needs_arg = TRUE; vobject_class->output_to_arg = vips_image_write_object; vobject_class->nickname = "image"; vobject_class->description = _( "image class" ); vobject_class->dump = vips_image_dump; vobject_class->summary = vips_image_summary; vobject_class->sanity = vips_image_sanity; vobject_class->rewind = vips_image_rewind; vobject_class->build = vips_image_build; class->invalidate = vips_image_real_invalidate; class->written = vips_image_real_written; class->minimise = vips_image_real_minimise; /* Create properties. */ /* It'd be good to have these as set once at construct time, but we * can't :-( * * For example, a "p" image might be made with vips_image_new() and * constructed, then passed to im_copy() of whatever to be written to. * That operation will then need to set width/height etc. * * We can't set_once either, since im_copy_set() etc. need to update * xoffset and friends on the way through. */ VIPS_ARG_INT( class, "width", 2, _( "Width" ), _( "Image width in pixels" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Xsize ), 1, 1000000000, 1 ); VIPS_ARG_INT( class, "height", 3, _( "Height" ), _( "Image height in pixels" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Ysize ), 1, 1000000000, 1 ); VIPS_ARG_INT( class, "bands", 4, _( "Bands" ), _( "Number of bands in image" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Bands ), 1, 1000000000, 1 ); VIPS_ARG_ENUM( class, "format", 5, _( "Format" ), _( "Pixel format in image" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, BandFmt ), VIPS_TYPE_BAND_FORMAT, VIPS_FORMAT_UCHAR ); VIPS_ARG_ENUM( class, "coding", 6, _( "Coding" ), _( "Pixel coding" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Coding ), VIPS_TYPE_CODING, VIPS_CODING_NONE ); VIPS_ARG_ENUM( class, "interpretation", 7, _( "Interpretation" ), _( "Pixel interpretation" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Type ), VIPS_TYPE_INTERPRETATION, VIPS_INTERPRETATION_MULTIBAND ); VIPS_ARG_DOUBLE( class, "xres", 8, _( "Xres" ), _( "Horizontal resolution in pixels/mm" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Xres ), -0.0, 1000000, 0 ); VIPS_ARG_DOUBLE( class, "yres", 9, _( "Yres" ), _( "Vertical resolution in pixels/mm" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Yres ), -0.0, 1000000, 0 ); VIPS_ARG_INT( class, "xoffset", 10, _( "Xoffset" ), _( "Horizontal offset of origin" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Xoffset ), -1000000, 1000000, 0 ); VIPS_ARG_INT( class, "yoffset", 11, _( "Yoffset" ), _( "Vertical offset of origin" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, Yoffset ), -1000000, 1000000, 0 ); VIPS_ARG_STRING( class, "filename", 12, _( "Filename" ), _( "Image filename" ), VIPS_ARGUMENT_SET_ONCE | VIPS_ARGUMENT_CONSTRUCT, G_STRUCT_OFFSET( VipsImage, filename ), NULL ); VIPS_ARG_STRING( class, "mode", 13, _( "Mode" ), _( "Open mode" ), VIPS_ARGUMENT_SET_ONCE | VIPS_ARGUMENT_CONSTRUCT, G_STRUCT_OFFSET( VipsImage, mode ), "p" ); VIPS_ARG_BOOL( class, "kill", 14, _( "Kill" ), _( "Block evaluation on this image" ), VIPS_ARGUMENT_SET_ALWAYS, G_STRUCT_OFFSET( VipsImage, kill ), FALSE ); VIPS_ARG_ENUM( class, "demand", 15, _( "Demand style" ), _( "Preferred demand style for this image" ), VIPS_ARGUMENT_CONSTRUCT, G_STRUCT_OFFSET( VipsImage, dhint ), VIPS_TYPE_DEMAND_STYLE, VIPS_DEMAND_STYLE_SMALLTILE ); VIPS_ARG_UINT64( class, "sizeof_header", 16, _( "Size of header" ), _( "Offset in bytes from start of file" ), VIPS_ARGUMENT_SET_ONCE | VIPS_ARGUMENT_CONSTRUCT, G_STRUCT_OFFSET( VipsImage, sizeof_header ), 0, 1000000, VIPS_SIZEOF_HEADER ); VIPS_ARG_POINTER( class, "foreign_buffer", 17, _( "Foreign buffer" ), _( "Pointer to foreign pixels" ), VIPS_ARGUMENT_SET_ONCE | VIPS_ARGUMENT_CONSTRUCT, G_STRUCT_OFFSET( VipsImage, data ) ); /* Create signals. */ vips_image_signals[SIG_PREEVAL] = g_signal_new( "preeval", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET( VipsImageClass, preeval ), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER ); vips_image_signals[SIG_EVAL] = g_signal_new( "eval", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET( VipsImageClass, eval ), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER ); vips_image_signals[SIG_POSTEVAL] = g_signal_new( "posteval", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET( VipsImageClass, posteval ), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER ); vips_image_signals[SIG_WRITTEN] = g_signal_new( "written", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET( VipsImageClass, written ), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER ); vips_image_signals[SIG_INVALIDATE] = g_signal_new( "invalidate", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET( VipsImageClass, invalidate ), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0 ); vips_image_signals[SIG_MINIMISE] = g_signal_new( "minimise", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET( VipsImageClass, minimise ), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0 ); } static void vips_image_init( VipsImage *image ) { VIPS_DEBUG_MSG( "vips_image_init: %p\n", image ); /* Default to native order. */ image->magic = vips_amiMSBfirst() ? VIPS_MAGIC_SPARC : VIPS_MAGIC_INTEL; image->Xsize = 1; image->Ysize = 1; image->Bands = 1; image->Xres = 1.0; image->Yres = 1.0; image->fd = -1; /* since 0 is stdout */ image->sslock = vips_g_mutex_new(); image->sizeof_header = VIPS_SIZEOF_HEADER; image->mode = g_strdup( "p" ); } int vips_image_written( VipsImage *image ) { int result; VIPS_DEBUG_MSG( "vips_image_written: %p\n", image ); result = 0; g_signal_emit( image, vips_image_signals[SIG_WRITTEN], 0, &result ); return( result ); } void vips_image_invalidate( VipsImage *image ) { VIPS_DEBUG_MSG( "vips_image_invalidate: %p\n", image ); g_signal_emit( image, vips_image_signals[SIG_INVALIDATE], 0 ); } static void * vips_image_invalidate_all_cb( VipsImage *image ) { vips_image_invalidate( image ); return( NULL ); } /** * vips_image_invalidate_all: * @image: #VipsImage to invalidate * * Invalidate all pixel caches on an @image and any downstream images, that * is, images which depend on this image. * * The "invalidate" callback is triggered for all invalidated images. */ void vips_image_invalidate_all( VipsImage *image ) { (void) vips__link_map( image, FALSE, (VipsSListMap2Fn) vips_image_invalidate_all_cb, NULL, NULL ); } void vips_image_minimise( VipsImage *image ) { VIPS_DEBUG_MSG( "vips_image_minimise: %p\n", image ); g_signal_emit( image, vips_image_signals[SIG_MINIMISE], 0 ); } static void * vips_image_minimise_all_cb( VipsImage *image ) { vips_image_minimise( image ); return( NULL ); } /** * vips_image_minimise_all: * @image: #VipsImage to minimise * * Minimise memory use on this image and any upstream images, that is, images * which this image depends upon. * * The "minimise" callback is triggered for all minimised images. */ void vips_image_minimise_all( VipsImage *image ) { (void) vips__link_map( image, TRUE, (VipsSListMap2Fn) vips_image_minimise_all_cb, NULL, NULL ); } /* Attach a new time struct, if necessary, and reset it. */ static int vips_progress_add( VipsImage *image ) { VipsProgress *progress; VIPS_DEBUG_MSG( "vips_progress_add: %p\n", image ); if( !(progress = image->time) ) { if( !(image->time = VIPS_NEW( NULL, VipsProgress )) ) return( -1 ); progress = image->time; progress->im = image; progress->start = NULL; } if( !progress->start ) progress->start = g_timer_new(); g_timer_start( progress->start ); progress->run = 0; progress->eta = 0; progress->tpels = VIPS_IMAGE_N_PELS( image ); progress->npels = 0; progress->percent = 0; return( 0 ); } static void vips_progress_update( VipsProgress *progress, guint64 processed ) { float prop; VIPS_DEBUG_MSG( "vips_progress_update: %p\n", progress ); g_assert( progress ); progress->run = g_timer_elapsed( progress->start, NULL ); progress->npels = processed; prop = (float) progress->npels / (float) progress->tpels; progress->percent = 100 * prop; /* Don't estimate eta until we are 10% in. */ if( prop > 0.1 ) progress->eta = (1.0 / prop) * progress->run - progress->run; } void vips_image_preeval( VipsImage *image ) { if( image->progress_signal ) { VIPS_DEBUG_MSG( "vips_image_preeval: %p\n", image ); g_assert( vips_object_sanity( VIPS_OBJECT( image->progress_signal ) ) ); (void) vips_progress_add( image ); /* For vips7 compat, we also have to make sure ->time on the * image that was originally marked with * vips_image_set_progress() is valid. */ (void) vips_progress_add( image->progress_signal ); g_signal_emit( image->progress_signal, vips_image_signals[SIG_PREEVAL], 0, image->progress_signal->time ); } } /* Updated the number of pixels that have been processed. */ void vips_image_eval( VipsImage *image, guint64 processed ) { if( image->progress_signal ) { VIPS_DEBUG_MSG( "vips_image_eval: %p\n", image ); g_assert( vips_object_sanity( VIPS_OBJECT( image->progress_signal ) ) ); vips_progress_update( image->time, processed ); /* For vips7 compat, update the ->time on the signalling image * too, even though it may have a different width/height to * the image we are actually generating. */ if( image->progress_signal->time != image->time ) vips_progress_update( image->progress_signal->time, processed ); g_signal_emit( image->progress_signal, vips_image_signals[SIG_EVAL], 0, image->time ); } } void vips_image_posteval( VipsImage *image ) { if( image->progress_signal ) { VipsProgress *progress = image->progress_signal->time; VIPS_DEBUG_MSG( "vips_image_posteval: %p\n", image ); g_assert( progress ); g_assert( vips_object_sanity( VIPS_OBJECT( image->progress_signal ) ) ); g_signal_emit( image->progress_signal, vips_image_signals[SIG_POSTEVAL], 0, progress ); } } /** * vips_image_set_progress: * @image: image to signal progress on * @progress: turn progress reporting on or off * * vips signals evaluation progress via the "preeval", "eval" and "posteval" * signals. Progress is signalled on the most-downstream image for which * vips_image_set_progress() was called. */ void vips_image_set_progress( VipsImage *image, gboolean progress ) { if( progress && !image->progress_signal ) { VIPS_DEBUG_MSG( "vips_image_set_progress: %p %s\n", image, image->filename ); image->progress_signal = image; } else image->progress_signal = NULL; } gboolean vips_image_iskilled( VipsImage *image ) { gboolean kill; kill = image->kill; /* Has kill been set for this image? If yes, abort evaluation. */ if( image->kill ) { VIPS_DEBUG_MSG( "vips_image_iskilled: %s (%p) killed\n", image->filename, image ); vips_error( "VipsImage", _( "killed for image \"%s\"" ), image->filename ); /* We've picked up the kill message, it's now our caller's * responsibility to pass the message up the chain. */ vips_image_set_kill( image, FALSE ); } return( kill ); } void vips_image_set_kill( VipsImage *image, gboolean kill ) { if( image->kill != kill ) VIPS_DEBUG_MSG( "vips_image_set_kill: %s (%p) %d\n", image->filename, image, kill ); image->kill = kill; } /* Make a name for a filename-less image. Use immediately, don't free the * result. */ static const char * vips_image_temp_name( void ) { static int serial = 0; static char name[256]; vips_snprintf( name, 256, "temp-%d", serial++ ); return( name ); } /** * vips_image_new: * * vips_image_new() creates a "glue" descriptor you can use to join two image * processing operations together. * * It is the equivalent of vips_image_new_mode("xxx", "p"). * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new( void ) { VipsImage *image; vips_check_init(); image = VIPS_IMAGE( g_object_new( VIPS_TYPE_IMAGE, NULL ) ); g_object_set( image, "filename", vips_image_temp_name(), "mode", "p", NULL ); if( vips_object_build( VIPS_OBJECT( image ) ) ) { VIPS_UNREF( image ); return( NULL ); } return( image ); } /** * vips_image_new_mode: * @filename: file to open * @mode: mode to open with * * vips_image_new_mode() examines the mode string and creates an * appropriate #VipsImage. * * * * * "t" * creates a temporary memory buffer image. * * * * * "p" * creates a "glue" descriptor you can use to join operations, see also * vips_image_new(). * * * * * "r" * opens the named file for reading. If the file is not in the native * VIPS format for your machine, vips_image_new_mode() * automatically converts the file for you. * * Some formats (eg. tiled tiff) are read directly. * * Some formats (eg. strip tiff) do not support random access and can't * be processed directly. Small images are decompressed to memory and * loaded from there, large images are decompressed to a disc file and * processed from that. * * If the operations you intend to perform are sequential, that is, they * operate in a strict top-to-bottom manner, you can use sequential mode * instead, see "rs" below, * or you can use the lower-level * API and control the loading process yourself. See * #VipsForeign. * * See vips_image_new_temp_file() for an explanation of how VIPS selects a * location for the temporary file. * * The disc threshold can be set with the "--vips-disc-threshold" * command-line argument, or the IM_DISC_THRESHOLD environment variable. * The value is a simple integer, but can take a unit postfix of "k", * "m" or "g" to indicate kilobytes, megabytes or gigabytes. * * For example: * * |[ * vips --vips-disc-threshold 500m copy fred.tif fred.v * ]| * * will copy via disc if "fred.tif" is more than 500 Mbytes * uncompressed. The default threshold is 100 MB. * * Note that "r" mode works in at least two stages. * It should return quickly and let you check header fields. It will * only actually read in pixels when you first access them. * * * * * "rs" * opens the named file for reading sequentially. It reads the source * image top-to-bottom and serves up pixels to the pipeline as required. * Provided the operations that connect to the image all demand pixels * only top-to-bottom as well, everything is fine and you avoid the * separate decompress stage. * * * * * "w" * opens the named file for writing. It looks at the file name * suffix to determine the type to write -- for example: * * |[ * vips_image_new_mode( "fred.tif", "w" ) * ]| * * will write in TIFF format. * * * * * "rw" * opens the named file for reading and writing. This will only work for * VIPS files in a format native to your machine. It is only for * paintbox-type applications. * * * * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new_mode( const char *filename, const char *mode ) { VipsImage *image; g_assert( filename ); g_assert( mode ); vips_check_init(); image = VIPS_IMAGE( g_object_new( VIPS_TYPE_IMAGE, NULL ) ); g_object_set( image, "filename", filename, "mode", mode, NULL ); if( vips_object_build( VIPS_OBJECT( image ) ) ) { VIPS_UNREF( image ); return( NULL ); } return( image ); } /** * vips_image_new_buffer: * * vips_image_new_buffer() creates a new VipsImage which when written to will * create a memory buffer. It is a convenience function for * vips_image_new_mode(vips_image_temp_name(), "t"). * * See also: vips_image_new(). * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new_buffer( void ) { return( vips_image_new_mode( vips_image_temp_name(), "t" ) ); } /** * vips_image_new_from_file: * @filename: file to open * * vips_image_new_from_file() opens @filename for reading in mode "r". See * vips_image_new_mode() for details. * * See also: vips_image_new_mode(). * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new_from_file( const char *filename ) { return( vips_image_new_mode( filename, "r" ) ); } /** * vips_image_new_from_file_raw: * @filename: filename to open * @xsize: image width * @ysize: image height * @bands: image bands (or bytes per pixel) * @offset: bytes to skip at start of file * * This function maps the named file and returns a #VipsImage you can use to * read it. * * It returns an 8-bit image with @bands bands. If the image is not 8-bit, use * im_copy_set() to transform the descriptor after loading it. * * See also: im_copy_set(), im_raw2vips(), vips_image_new_from_file(). * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new_from_file_raw( const char *filename, int xsize, int ysize, int bands, guint64 offset ) { VipsImage *image; vips_check_init(); image = VIPS_IMAGE( g_object_new( VIPS_TYPE_IMAGE, NULL ) ); g_object_set( image, "filename", filename, "mode", "a", "width", xsize, "height", ysize, "bands", bands, "sizeof_header", offset, NULL ); if( vips_object_build( VIPS_OBJECT( image ) ) ) { VIPS_UNREF( image ); return( NULL ); } return( image ); } /** * vips_image_new_from_memory: * @buffer: start of memory area * @xsize: image width * @ysize: image height * @bands: image bands (or bytes per pixel) * @bandfmt: image format * * This function wraps an #IMAGE around a memory buffer. VIPS does not take * responsibility for the area of memory, it's up to you to make sure it's * freed when the image is closed. See for example #VipsObject::close. * * See also: im_binfile(), im_raw2vips(), vips_image_new(). * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new_from_memory( void *buffer, int xsize, int ysize, int bands, VipsBandFormat bandfmt ) { VipsImage *image; vips_check_init(); image = VIPS_IMAGE( g_object_new( VIPS_TYPE_IMAGE, NULL ) ); g_object_set( image, "filename", vips_image_temp_name(), "mode", "m", "foreign_buffer", buffer, "width", xsize, "height", ysize, "bands", bands, "format", bandfmt, NULL ); if( vips_object_build( VIPS_OBJECT( image ) ) ) { VIPS_UNREF( image ); return( NULL ); } return( image ); } /** * vips_image_new_matrix: * @width: image width * @height: image height * * This convenience function makes an image which is a matrix: a one-band * VIPS_FORMAT_DOUBLE image held in memory. * * Use VIPS_IMAGE_ADDR(), or VIPS_MATRIX() to address pixels in the image. * * Use vips_image_set_double() to set "scale" and "offset", if required. * * See also: vips_image_new_matrixv() * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new_matrix( int width, int height ) { VipsImage *image; vips_check_init(); image = VIPS_IMAGE( g_object_new( VIPS_TYPE_IMAGE, NULL ) ); g_object_set( image, "filename", "vips_image_new_matrix", "mode", "t", "width", width, "height", height, "bands", 1, "format", VIPS_FORMAT_DOUBLE, "interpretation", VIPS_INTERPRETATION_MATRIX, NULL ); if( vips_object_build( VIPS_OBJECT( image ) ) ) { VIPS_UNREF( image ); return( NULL ); } if( vips_image_write_prepare( image ) ) { g_object_unref( image ); return( NULL ); } return( image ); } /** * vips_image_new_matrixv: * @width: image width * @height: image height * @...: matrix coefficients * * As vips_image_new_matrix(), but initialise the matrix from the argument * list. After @height should be @width * @height double constants which are * used to set the matrix elements. * * See also: vips_image_new_matrix() * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new_matrixv( int width, int height, ... ) { va_list ap; VipsImage *matrix; int x, y; vips_check_init(); matrix = vips_image_new_matrix( width, height ); va_start( ap, height ); for( y = 0; y < height; y++ ) for( x = 0; x < width; x++ ) *VIPS_MATRIX( matrix, x, y ) = va_arg( ap, double ); va_end( ap ); return( matrix ); } /** * vips_image_set_delete_on_close: * @image: image to set * @delete_on_close: format of file * * Sets the delete_on_close flag for the image. If this flag is set, when * @image is finalized, the filename held in @image->filename at the time of * this call is unlinked. * * This function is clearly extremely dangerous, use with great caution. * * See also: vips__temp_name(), vips_image_new_temp_file(). */ void vips_image_set_delete_on_close( VipsImage *image, gboolean delete_on_close ) { VIPS_DEBUG_MSG( "vips_image_set_delete_on_close: %d %s\n", delete_on_close, image->filename ); image->delete_on_close = delete_on_close; VIPS_FREE( image->delete_on_close_filename ); if( delete_on_close ) VIPS_SETSTR( image->delete_on_close_filename, image->filename ); } /** * vips_image_new_temp_file: * @format: format of file * * Make a "w" disc #VipsImage which will be automatically unlinked when it is * destroyed. @format is something like "%s.v" for a vips file. * * The file is created in the temporary directory, see vips__temp_name(). * * See also: vips__temp_name(). * * Returns: the new #VipsImage, or %NULL on error. */ VipsImage * vips_image_new_temp_file( const char *format ) { char *name; VipsImage *image; if( !(name = vips__temp_name( format )) ) return( NULL ); if( !(image = vips_image_new_mode( name, "w" )) ) { g_free( name ); return( NULL ); } g_free( name ); vips_image_set_delete_on_close( image, TRUE ); return( image ); } static int vips_image_write_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsRect *r = &or->valid; /* printf( "vips_image_write_gen: %p " "left = %d, top = %d, width = %d, height = %d\n", or->im, r->left, r->top, r->width, r->height ); */ /* Copy with pointers. */ if( vips_region_prepare( ir, r ) || vips_region_region( or, ir, r, r->left, r->top ) ) return( -1 ); return( 0 ); } /** * vips_image_write: * @image: image to write * @out: write to this image * * Write @image to @out. Use vips_image_new_mode() and friends to create the * #VipsImage you want to write to. * * See also: vips_image_new_mode(), vips_copy(), vips_image_write_to_file(). * * Returns: 0 on success, or -1 on error. */ int vips_image_write( VipsImage *image, VipsImage *out ) { if( vips_image_pio_input( image ) || vips_image_pipelinev( out, VIPS_DEMAND_STYLE_THINSTRIP, image, NULL ) ) return( -1 ); /* We generate from @image partially, so we need to keep it about as * long as @out is about. */ g_object_ref( image ); vips_object_local( out, image ); if( vips_image_generate( out, vips_start_one, vips_image_write_gen, vips_stop_one, image, NULL ) ) return( -1 ); return( 0 ); } /** * vips_image_write_to_file: * @image: image to write * @filename: write to this file * * A convenience function to write @image to a file. * * Returns: 0 on success, or -1 on error. */ int vips_image_write_to_file( VipsImage *image, const char *filename ) { VipsImage *out; g_assert( filename ); if( !(out = vips_image_new_mode( filename, "w" )) ) return( -1 ); if( vips_image_write( image, out ) ) { g_object_unref( out ); return( -1 ); } g_object_unref( out ); return( 0 ); } /** * vips_image_isMSBfirst: * @image: image to test * * Return %TRUE if @image is in most-significant- * byte first form. This is the byte order used on the SPARC * architecture and others. */ gboolean vips_image_isMSBfirst( VipsImage *image ) { if( image->magic == VIPS_MAGIC_SPARC ) return( 1 ); else return( 0 ); } /** * vips_image_isfile: * @image: image to test * * Return %TRUE if @image represents a file on disc in some way. */ gboolean vips_image_isfile( VipsImage *image ) { switch( image->dtype ) { case VIPS_IMAGE_MMAPIN: case VIPS_IMAGE_MMAPINRW: case VIPS_IMAGE_OPENOUT: case VIPS_IMAGE_OPENIN: return( 1 ); case VIPS_IMAGE_PARTIAL: case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_SETBUF_FOREIGN: case VIPS_IMAGE_NONE: return( 0 ); default: g_assert( FALSE ); return( 0 ); } } /** * vips_image_ispartial: * @image: image to test * * Return %TRUE if @im represents a partial image (a delayed calculation). */ gboolean vips_image_ispartial( VipsImage *image ) { if( image->dtype == VIPS_IMAGE_PARTIAL ) return( 1 ); else return( 0 ); } /** * vips_image_write_prepare: * @image: image to prepare * * Call this after setting header fields (width, height, and so on) to * allocate resources ready for writing. * * Normally this function is called for you by vips_image_generate() or * vips_image_write_line(). You will need to call it yourself if you plan to * write directly to the ->data member of a "t" image. * * Returns: 0 on success, or -1 on error. */ int vips_image_write_prepare( VipsImage *image ) { g_assert( vips_object_sanity( VIPS_OBJECT( image ) ) ); if( image->Xsize <= 0 || image->Ysize <= 0 || image->Bands <= 0 ) { vips_error( "VipsImage", "%s", _( "bad dimensions" ) ); return( -1 ); } /* We don't use this, but make sure it's set in case any old programs * are expecting it. */ image->Bbits = vips_format_sizeof( image->BandFmt ) << 3; if( image->dtype == VIPS_IMAGE_PARTIAL ) { VIPS_DEBUG_MSG( "vips_image_write_prepare: " "old-style output for %s\n", image->filename ); image->dtype = VIPS_IMAGE_SETBUF; } switch( image->dtype ) { case VIPS_IMAGE_MMAPINRW: case VIPS_IMAGE_SETBUF_FOREIGN: break; case VIPS_IMAGE_SETBUF: if( !image->data && !(image->data = vips_tracked_malloc( VIPS_IMAGE_SIZEOF_IMAGE( image ))) ) return( -1 ); break; case VIPS_IMAGE_OPENOUT: if( vips_image_open_output( image ) ) return( -1 ); break; default: vips_error( "VipsImage", "%s", _( "bad image descriptor" ) ); return( -1 ); } return( 0 ); } /** * vips_image_write_line: * @image: image to write to * @ypos: vertical position of scan-line to write * @linebuffer: scanline of pixels * * Write a line of pixels to an image. This function must be called repeatedly * with @ypos increasing from 0 to @YSize - * @linebuffer must be VIPS_IMAGE_SIZEOF_LINE() bytes long. * * See also: vips_image_generate(). * * Returns: 0 on success, or -1 on error. */ int vips_image_write_line( VipsImage *image, int ypos, VipsPel *linebuffer ) { int linesize = VIPS_IMAGE_SIZEOF_LINE( image ); /* Is this the start of eval? */ if( ypos == 0 ) { if( vips__image_wio_output( image ) ) return( -1 ); /* Always clear kill before we start looping. See the * call to vips_image_iskilled() below. */ vips_image_set_kill( image, FALSE ); vips_image_write_prepare( image ); vips_image_preeval( image ); } /* Possible cases for output: FILE or SETBUF. */ switch( image->dtype ) { case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_SETBUF_FOREIGN: memcpy( VIPS_IMAGE_ADDR( image, 0, ypos ), linebuffer, linesize ); break; case VIPS_IMAGE_OPENOUT: /* Don't use ypos for this. */ if( vips__write( image->fd, linebuffer, linesize ) ) return( -1 ); break; default: vips_error( "VipsImage", _( "unable to output to a %s image" ), vips_enum_string( VIPS_TYPE_IMAGE_TYPE, image->dtype ) ); return( -1 ); } /* Trigger evaluation callbacks for this image. */ vips_image_eval( image, ypos * image->Xsize ); if( vips_image_iskilled( image ) ) return( -1 ); /* Is this the end of eval? */ if( ypos == image->Ysize - 1 ) { vips_image_posteval( image ); if( vips_image_written( image ) ) return( -1 ); } return( 0 ); } /* Rewind an output file. VIPS images only. */ static int vips_image_rewind_output( VipsImage *image ) { int fd; g_assert( image->dtype == VIPS_IMAGE_OPENOUT ); #ifdef DEBUG_IO printf( "vips_image_rewind_output: %s\n", image->filename ); #endif/*DEBUG_IO*/ /* We want to keep the fd across rewind. * * On Windows, we open temp files with _O_TEMPORARY. We mustn't close * the file since this will delete it. * * We could open the file again to keep a reference to it alive, but * this is also problematic on Windows. */ fd = image->fd; image->fd = -1; /* Free any resources the image holds and reset to a base * state. */ vips_object_rewind( VIPS_OBJECT( image ) ); /* And reopen ... recurse to get a mmaped image. * * We use "v" mode to get it opened as a vips image, byopassing the * file type checks. They will fail on Windows becasue you can't open * fds more than once. */ image->fd = fd; g_object_set( image, "mode", "v", NULL ); if( vips_object_build( VIPS_OBJECT( image ) ) ) { vips_error( "VipsImage", _( "auto-rewind for %s failed" ), image->filename ); return( -1 ); } /* Now we've finished writing and reopened as read, we can * delete-on-close. * * On *nix-like systems, this will unlink the file * from the filesystem and when we exit, for whatever reason, the file * we be reclaimed. * * On Windows this will fail because the file is open and you can't * delete open files. However, on Windows we set O_TEMP, so the file * will be deleted when the fd is finally closed. */ vips_image_delete( image ); return( 0 ); } /** * vips_image_wio_input: * @image: image to transform * * Check that an image is readable via the VIPS_IMAGE_ADDR() macro, that is, * that the entire image is in memory and all pixels can be read with * VIPS_IMAGE_ADDR(). * * If it * isn't, try to transform it so that VIPS_IMAGE_ADDR() can work. * * See also: vips_image_wio_output(), vips_image_pio_input(), * vips_image_inplace(), VIPS_IMAGE_ADDR(). * * Returns: 0 on succeess, or -1 on error. */ int vips_image_wio_input( VipsImage *image ) { VipsImage *t1; g_assert( vips_object_sanity( VIPS_OBJECT( image ) ) ); #ifdef DEBUG_IO printf( "vips_image_wio_input: wio input for %s\n", image->filename ); #endif/*DEBUG_IO*/ switch( image->dtype ) { case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_SETBUF_FOREIGN: /* Should have been written to. */ if( !image->data ) { vips_error( "vips_image_wio_input", "%s", _( "no image data" ) ); return( -1 ); } break; case VIPS_IMAGE_MMAPIN: case VIPS_IMAGE_MMAPINRW: /* Can read from all these, in principle anyway. */ break; case VIPS_IMAGE_PARTIAL: #ifdef DEBUG_IO printf( "vips_image_wio_input: " "converting partial image to WIO\n" ); #endif/*DEBUG_IO*/ /* Change to VIPS_IMAGE_SETBUF. First, make a memory * buffer and copy into that. */ t1 = vips_image_new_buffer(); if( vips_image_write( image, t1 ) ) { g_object_unref( t1 ); return( -1 ); } /* Copy new stuff in. We can't unref and free stuff, as this * would kill of lots of regions and cause dangling pointers * elsewhere. */ image->dtype = VIPS_IMAGE_SETBUF; image->data = t1->data; t1->data = NULL; /* Close temp image. */ g_object_unref( t1 ); break; case VIPS_IMAGE_OPENIN: #ifdef DEBUG_IO printf( "vips_image_wio_input: " "converting openin image for wio input\n" ); #endif/*DEBUG_IO*/ /* just mmap() the whole thing. */ if( vips_mapfile( image ) ) return( -1 ); image->data = image->baseaddr + image->sizeof_header; image->dtype = VIPS_IMAGE_MMAPIN; break; case VIPS_IMAGE_OPENOUT: /* Close file down and reopen as input. I guess this will only * work for vips files? */ if( vips_image_rewind_output( image ) || vips_image_wio_input( image ) ) return( -1 ); break; default: vips_error( "vips_image_wio_input", "%s", _( "image not readable" ) ); return( -1 ); } return( 0 ); } int vips__image_wio_output( VipsImage *image ) { #ifdef DEBUG_IO printf( "vips__image_wio_output: WIO output for %s\n", image->filename ); #endif/*DEBUG_IO*/ switch( image->dtype ) { case VIPS_IMAGE_PARTIAL: /* Make sure nothing is attached. */ if( image->generate_fn ) { vips_error( "vips__image_wio_output", "%s", _( "image already written" ) ); return( -1 ); } /* Cannot do old-style write to PARTIAL. Turn to SETBUF. */ image->dtype = VIPS_IMAGE_SETBUF; break; case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_OPENOUT: case VIPS_IMAGE_SETBUF_FOREIGN: /* Can write to this ok. * * We used to check that ->data was null and warn about * writing twice, but we no longer insist that this is called * before vips_image_write_prepare(), so we can't do that any * more. */ break; default: vips_error( "vips__image_wio_output", "%s", _( "image not writeable" ) ); return( -1 ); } return( 0 ); } /** * vips_image_inplace: * @image: image to make read-write * * Gets @image ready for an in-place operation, such as im_insertplace(). * After calling this function you can both read and write the image with * VIPS_IMAGE_ADDR(). * * See also: im_insertplace(), vips_image_wio_input(). * * Returns: 0 on succeess, or -1 on error. */ int vips_image_inplace( VipsImage *image ) { /* Do an vips_image_wio_input(). This will rewind, generate, etc. */ if( vips_image_wio_input( image ) ) return( -1 ); /* Look at the type. */ switch( image->dtype ) { case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_SETBUF_FOREIGN: case VIPS_IMAGE_MMAPINRW: /* No action necessary. */ break; case VIPS_IMAGE_MMAPIN: /* Try to remap read-write. */ if( vips_remapfilerw( image ) ) return( -1 ); break; default: vips_error( "vips_image_inplace", "%s", _( "bad file type" ) ); return( -1 ); } return( 0 ); } /** * vips_image_pio_input: * @image: image to check * * Check that an image is readable with vips_region_prepare() and friends. * If it isn't, try to transform the image so that vips_region_prepare() can * work. * * See also: vips_image_pio_output(), vips_region_prepare(). * * Returns: 0 on succeess, or -1 on error. */ int vips_image_pio_input( VipsImage *image ) { g_assert( vips_object_sanity( VIPS_OBJECT( image ) ) ); #ifdef DEBUG_IO printf( "vips_image_pio_input: enabling partial input for %s\n", image->filename ); #endif /*DEBUG_IO*/ switch( image->dtype ) { case VIPS_IMAGE_SETBUF: case VIPS_IMAGE_SETBUF_FOREIGN: /* Should have been written to. */ if( !image->data ) { vips_error( "vips_image_pio_input", "%s", _( "no image data" ) ); return( -1 ); } /* Should be no generate functions now. */ image->start_fn = NULL; image->generate_fn = NULL; image->stop_fn = NULL; break; case VIPS_IMAGE_PARTIAL: /* Should have had generate functions attached. */ if( !image->generate_fn ) { vips_error( "vips_image_pio_input", "%s", _( "no image data" ) ); return( -1 ); } break; case VIPS_IMAGE_MMAPIN: case VIPS_IMAGE_MMAPINRW: case VIPS_IMAGE_OPENIN: break; case VIPS_IMAGE_OPENOUT: /* Free any resources the image holds and reset to a base * state. */ if( vips_image_rewind_output( image ) ) return( -1 ); break; default: vips_error( "vips_image_pio_input", "%s", _( "image not readable" ) ); return( -1 ); } return( 0 ); } /** * vips_image_pio_output: * @image: image to check * * Check that an image is writeable with vips_image_generate(). If it isn't, * try to transform the image so that vips_image_generate() can work. * * See also: vips_image_pio_input(). * * Returns: 0 on succeess, or -1 on error. */ int vips_image_pio_output( VipsImage *image ) { #ifdef DEBUG_IO printf( "vips_image_pio_output: enabling partial output for %s\n", image->filename ); #endif /*DEBUG_IO*/ switch( image->dtype ) { case VIPS_IMAGE_SETBUF: if( image->data ) { vips_error( "vips_image_pio_output", "%s", _( "image already written" ) ); return( -1 ); } break; case VIPS_IMAGE_PARTIAL: if( image->generate_fn ) { vips_error( "im_poutcheck", "%s", _( "image already written" ) ); return( -1 ); } break; case VIPS_IMAGE_OPENOUT: case VIPS_IMAGE_SETBUF_FOREIGN: break; default: vips_error( "vips_image_pio_output", "%s", _( "image not writeable" ) ); return( -1 ); } return( 0 ); } /** * vips_band_format_isint: * @format: format to test * * Return %TRUE if @format is one of the integer types. */ gboolean vips_band_format_isint( VipsBandFormat format ) { switch( format ) { case VIPS_FORMAT_UCHAR: case VIPS_FORMAT_CHAR: case VIPS_FORMAT_USHORT: case VIPS_FORMAT_SHORT: case VIPS_FORMAT_UINT: case VIPS_FORMAT_INT: return( TRUE ); case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_COMPLEX: case VIPS_FORMAT_DPCOMPLEX: return( FALSE ); default: g_assert( 0 ); return( -1 ); } } /** * vips_band_format_isuint: * @format: format to test * * Return %TRUE if @format is one of the unsigned integer types. */ gboolean vips_band_format_isuint( VipsBandFormat format ) { switch( format ) { case VIPS_FORMAT_UCHAR: case VIPS_FORMAT_USHORT: case VIPS_FORMAT_UINT: return( 1 ); case VIPS_FORMAT_INT: case VIPS_FORMAT_SHORT: case VIPS_FORMAT_CHAR: case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_COMPLEX: case VIPS_FORMAT_DPCOMPLEX: return( 0 ); default: g_assert( 0 ); return( -1 ); } } /** * vips_band_format_is8bit: * @format: format to test * * Return %TRUE if @format is uchar or schar. */ gboolean vips_band_format_is8bit( VipsBandFormat format ) { switch( format ) { case VIPS_FORMAT_UCHAR: case VIPS_FORMAT_CHAR: return( TRUE ); case VIPS_FORMAT_USHORT: case VIPS_FORMAT_SHORT: case VIPS_FORMAT_UINT: case VIPS_FORMAT_INT: case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_COMPLEX: case VIPS_FORMAT_DPCOMPLEX: return( FALSE ); default: g_assert( 0 ); return( -1 ); } } /** * vips_band_format_isfloat: * @format: format to test * * Return %TRUE if @format is one of the float types. */ gboolean vips_band_format_isfloat( VipsBandFormat format ) { switch( format ) { case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_DOUBLE: return( 1 ); case VIPS_FORMAT_UCHAR: case VIPS_FORMAT_CHAR: case VIPS_FORMAT_USHORT: case VIPS_FORMAT_SHORT: case VIPS_FORMAT_UINT: case VIPS_FORMAT_INT: case VIPS_FORMAT_COMPLEX: case VIPS_FORMAT_DPCOMPLEX: return( 0 ); default: g_assert( 0 ); return( -1 ); } } /** * vips_band_format_iscomplex: * @format: format to test * * Return %TRUE if @fmt is one of the complex types. */ gboolean vips_band_format_iscomplex( VipsBandFormat format ) { switch( format ) { case VIPS_FORMAT_COMPLEX: case VIPS_FORMAT_DPCOMPLEX: return( 1 ); case VIPS_FORMAT_UCHAR: case VIPS_FORMAT_CHAR: case VIPS_FORMAT_USHORT: case VIPS_FORMAT_SHORT: case VIPS_FORMAT_UINT: case VIPS_FORMAT_INT: case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_DOUBLE: return( 0 ); default: g_assert( 0 ); return( -1 ); } } vips-7.38.5/libvips/iofuncs/util.c0000644000175000017500000010372712303140253013762 00000000000000/* Some basic util functions. */ /* Copyright (C) 1991-2003 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #ifdef OS_WIN32 #include #endif /*OS_WIN32*/ #include #include #include /* Try to make an O_BINARY ... sometimes need the leading '_'. */ #ifdef BINARY_OPEN #ifndef O_BINARY #ifdef _O_BINARY #define O_BINARY _O_BINARY #endif /*_O_BINARY*/ #endif /*!O_BINARY*/ #endif /*BINARY_OPEN*/ /* If we have O_BINARY, add it to a mode flags set. */ #ifdef O_BINARY #define BINARYIZE(M) ((M) | O_BINARY) #else /*!O_BINARY*/ #define BINARYIZE(M) (M) #endif /*O_BINARY*/ /* Open mode for image write ... on some systems, have to set BINARY too. */ #define MODE_WRITE BINARYIZE (O_WRONLY | O_CREAT | O_TRUNC) /* Mode for read/write. This is if we might later want to mmaprw () the file. */ #define MODE_READWRITE BINARYIZE (O_RDWR) /* Mode for read only. This is the fallback if READWRITE fails. */ #define MODE_READONLY BINARYIZE (O_RDONLY) /* Temp buffer for snprintf() layer on old systems. */ #define MAX_BUF (100000) /* Test two lists for eqality. */ gboolean vips_slist_equal( GSList *l1, GSList *l2 ) { while( l1 && l2 ) { if( l1->data != l2->data ) return( FALSE ); l1 = l1->next; l2 = l2->next; } if( l1 || l2 ) return( FALSE ); return( TRUE ); } /* Map over an slist. _copy() the list in case the callback changes it. */ void * vips_slist_map2( GSList *list, VipsSListMap2Fn fn, void *a, void *b ) { GSList *copy; GSList *i; void *result; copy = g_slist_copy( list ); result = NULL; for( i = copy; i && !(result = fn( i->data, a, b )); i = i->next ) ; g_slist_free( copy ); return( result ); } /* Map backwards. We _reverse() rather than recurse and unwind to save stack. */ void * vips_slist_map2_rev( GSList *list, VipsSListMap2Fn fn, void *a, void *b ) { GSList *copy; GSList *i; void *result; copy = g_slist_copy( list ); copy = g_slist_reverse( copy ); result = NULL; for( i = copy; i && !(result = fn( i->data, a, b )); i = i->next ) ; g_slist_free( copy ); return( result ); } void * vips_slist_map4( GSList *list, VipsSListMap4Fn fn, void *a, void *b, void *c, void *d ) { GSList *copy; GSList *i; void *result; copy = g_slist_copy( list ); result = NULL; for( i = copy; i && !(result = fn( i->data, a, b, c, d )); i = i->next ) ; g_slist_free( copy ); return( result ); } void * vips_slist_fold2( GSList *list, void *start, VipsSListFold2Fn fn, void *a, void *b ) { void *c; GSList *this, *next; for( c = start, this = list; this; this = next ) { next = this->next; if( !(c = fn( this->data, c, a, b )) ) return( NULL ); } return( c ); } /* Remove all occurences of an item from a list. */ GSList * vips_slist_filter( GSList *list, VipsSListMap2Fn fn, void *a, void *b ) { GSList *tmp; GSList *prev; prev = NULL; tmp = list; while( tmp ) { if( fn( tmp->data, a, b ) ) { GSList *next = tmp->next; if( prev ) prev->next = next; if( list == tmp ) list = next; tmp->next = NULL; g_slist_free( tmp ); tmp = next; } else { prev = tmp; tmp = tmp->next; } } return( list ); } static void vips_slist_free_all_cb( void * thing, void * dummy ) { vips_free( thing ); } /* Free a g_slist of things which need vips_free()ing. */ void vips_slist_free_all( GSList *list ) { g_slist_foreach( list, vips_slist_free_all_cb, NULL ); g_slist_free( list ); } void * vips_map_equal( void *a, void *b ) { if( a == b ) return( a ); return( NULL ); } typedef struct { void *a; void *b; VipsSListMap2Fn fn; void *result; } Pair; static gboolean vips_hash_table_predicate( const char *key, void *value, Pair *pair ) { return( (pair->result = pair->fn( value, pair->a, pair->b )) != NULL ); } /* Like slist map, but for a hash table. */ void * vips_hash_table_map( GHashTable *hash, VipsSListMap2Fn fn, void *a, void *b ) { Pair pair; pair.a = a; pair.b = b; pair.fn = fn; pair.result = NULL; g_hash_table_find( hash, (GHRFunc) vips_hash_table_predicate, &pair ); return( pair.result ); } /* Like strncpy(), but always NULL-terminate, and don't pad with NULLs. * If @n is 100 and @src is more than 99 characters, 99 are copied and the * final byte of @dest is set to '\0'. */ char * vips_strncpy( char *dest, const char *src, int n ) { int i; g_assert( n > 0 ); for( i = 0; i < n - 1; i++ ) if( !(dest[i] = src[i]) ) break; dest[i] = '\0'; return( dest ); } /* Find the rightmost occurrence of needle in haystack. */ char * vips_strrstr( const char *haystack, const char *needle ) { int haystack_len = strlen( haystack ); int needle_len = strlen( needle ); int i; for( i = haystack_len - needle_len; i >= 0; i-- ) if( strncmp( needle, haystack + i, needle_len ) == 0 ) return( (char *) haystack + i ); return( NULL ); } /* Test for string b ends string a. */ gboolean vips_ispostfix( const char *a, const char *b ) { int m = strlen( a ); int n = strlen( b ); if( n > m ) return( FALSE ); return( strcmp( a + m - n, b ) == 0 ); } /* Test for string a starts string b. */ gboolean vips_isprefix( const char *a, const char *b ) { int n = strlen( a ); int m = strlen( b ); int i; if( m < n ) return( FALSE ); for( i = 0; i < n; i++ ) if( a[i] != b[i] ) return( FALSE ); return( TRUE ); } /* Like strtok(). Give a string and a list of break characters. Then: * - skip initial break characters * - EOS? return NULL * - skip a series of non-break characters * - write a '\0' over the next break character and return a pointer to the * char after that * * The idea is that this can be used in loops as the iterator. Example: * * char *p = " 1 2 3 "; // mutable * char *q; * int i; * int v[...]; * * for( i = 0; (q = vips_break_token( p, " " )); i++, p = q ) * v[i] = atoi( p ); * * will set * v[0] = 1; * v[1] = 2; * v[2] = 3; * * or with just one pointer, provided your atoi() is OK with trailing chars * and you know there is at least one item there * * char *p = " 1 2 3 "; // mutable * int i; * int v[...]; * * for( i = 0; p; p = vips_break_token( p, " " ) ) * v[i] = atoi( p ); */ char * vips_break_token( char *str, const char *brk ) { char *p; /* Is the string empty? If yes, return NULL immediately. */ if( !str || !*str ) return( NULL ); /* Skip initial break characters. */ p = str + strspn( str, brk ); /* No item? */ if( !*p ) return( NULL ); /* We have a token ... search for the first break character after the * token. */ p += strcspn( p, brk ); /* Is there string left? */ if( *p ) { /* Write in an end-of-string mark and return the start of the * next token. */ *p++ = '\0'; p += strspn( p, brk ); } return( p ); } /* Wrapper over (v)snprintf() ... missing on old systems. */ int vips_vsnprintf( char *str, size_t size, const char *format, va_list ap ) { #ifdef HAVE_VSNPRINTF return( vsnprintf( str, size, format, ap ) ); #else /*HAVE_VSNPRINTF*/ /* Bleurg! */ int n; static char buf[MAX_BUF]; if( size > MAX_BUF ) vips_error_exit( "panic: buffer overflow " "(request to write %d bytes to buffer of %d bytes)", size, MAX_BUF ); n = vsprintf( buf, format, ap ); if( n > MAX_BUF ) vips_error_exit( "panic: buffer overflow " "(%d bytes written to buffer of %d bytes)", n, MAX_BUF ); vips_strncpy( str, buf, size ); return( n ); #endif /*HAVE_VSNPRINTF*/ } int vips_snprintf( char *str, size_t size, const char *format, ... ) { va_list ap; int n; va_start( ap, format ); n = vips_vsnprintf( str, size, format, ap ); va_end( ap ); return( n ); } /* Split filename into name / mode components. name and mode should both be * FILENAME_MAX chars. * * We look for the ':' splitting the name and mode by searching for the * rightmost occurence of the regexp ".[A-Za-z0-9]+:". Example: consider the * horror that is * * c:\silly:dir:name\fr:ed.tif:jpeg:95,,,,c:\icc\srgb.icc * */ void vips_filename_split( const char *path, char *name, char *mode ) { char *p; vips_strncpy( name, path, FILENAME_MAX ); /* Search back towards start stopping at each ':' char. */ for( p = name + strlen( name ) - 1; p > name; p -= 1 ) if( *p == ':' ) { char *q; for( q = p - 1; isalnum( *q ) && q > name; q -= 1 ) ; if( *q == '.' ) break; } if( *p == ':' ) { vips_strncpy( mode, p + 1, FILENAME_MAX ); *p = '\0'; } else strcpy( mode, "" ); } /* Skip any leading path stuff. Horrible: if this is a filename which came * from win32 and we're a *nix machine, it'll have '\\' not '/' as the * separator :-( * * Try to fudge this ... if the file doesn't contain any of our native * separators, look for the opposite one as well. If there are none of those * either, just return the filename. */ const char * vips_skip_dir( const char *path ) { char name[FILENAME_MAX]; char mode[FILENAME_MAX]; const char *p; const char *q; const char native_dir_sep = G_DIR_SEPARATOR; const char non_native_dir_sep = native_dir_sep == '/' ? '\\' : '/'; /* Remove any trailing save modifiers: we don't want '/' or '\' in the * modifier confusing us. */ vips_filename_split( path, name, mode ); /* The '\0' char at the end of the string. */ p = name + strlen( name ); /* Search back for the first native dir sep, or failing that, the first * non-native dir sep. */ for( q = p; q > name && q[-1] != native_dir_sep; q-- ) ; if( q == name ) for( q = p; q > name && q[-1] != non_native_dir_sep; q-- ) ; return( path + (q - name) ); } /* Extract suffix from filename, ignoring any mode string. Suffix should be * FILENAME_MAX chars. Include the "." character, if any. */ void vips_filename_suffix( const char *path, char *suffix ) { char name[FILENAME_MAX]; char mode[FILENAME_MAX]; char *p; vips_filename_split( path, name, mode ); if( (p = strrchr( name, '.' )) ) strcpy( suffix, p ); else strcpy( suffix, "" ); } /* Does a filename have one of a set of suffixes. Ignore case. */ int vips_filename_suffix_match( const char *path, const char *suffixes[] ) { char suffix[FILENAME_MAX]; const char **p; vips_filename_suffix( path, suffix ); for( p = suffixes; *p; p++ ) if( g_ascii_strcasecmp( suffix, *p ) == 0 ) return( 1 ); return( 0 ); } /* p points to the start of a buffer ... move it on through the buffer (ready * for the next call), and return the current option (or NULL for option * missing). ',' characters inside options can be escaped with a '\'. */ char * vips_getnextoption( char **in ) { char *p; char *q; p = *in; q = p; if( !p || !*p ) return( NULL ); /* Find the next ',' not prefixed with a '\'. If the first character * of p is ',', there can't be a previous escape character. */ for(;;) { if( !(p = strchr( p, ',' )) ) break; if( p == q ) break; if( p[-1] != '\\' ) break; p += 1; } if( p ) { /* Another option follows this one .. set up to pick that out * next time. */ *p = '\0'; *in = p + 1; } else { /* This is the last one. */ *in = NULL; } if( strlen( q ) > 0 ) return( q ); else return( NULL ); } /* Get a suboption string, or NULL. */ char * vips_getsuboption( const char *buf ) { char *p, *q, *r; if( !(p = strchr( buf, ':' )) ) /* No suboption. */ return( NULL ); /* Step over the ':'. */ p += 1; /* Need to unescape any \, pairs. Shift stuff down one if we find one. */ for( q = p; *q; q++ ) if( q[0] == '\\' && q[1] == ',' ) for( r = q; *r; r++ ) r[0] = r[1]; return( p ); } /* Get file length ... 64-bitally. -1 for error. */ gint64 vips_file_length( int fd ) { #ifdef OS_WIN32 struct _stati64 st; if( _fstati64( fd, &st ) == -1 ) { #else /*!OS_WIN32*/ struct stat st; if( fstat( fd, &st ) == -1 ) { #endif /*OS_WIN32*/ vips_error_system( errno, "vips_file_length", "%s", _( "unable to get file stats" ) ); return( -1 ); } return( st.st_size ); } /* Wrap write() up */ int vips__write( int fd, const void *buf, size_t count ) { do { size_t nwritten = write( fd, buf, count ); if( nwritten == (size_t) -1 ) { vips_error_system( errno, "vips__write", "%s", _( "write failed" ) ); return( -1 ); } buf = (void *) ((char *) buf + nwritten); count -= nwritten; } while( count > 0 ); return( 0 ); } /* Does a filename contain a directory separator? */ static gboolean filename_hasdir( const char *filename ) { char *dirname; gboolean hasdir; dirname = g_path_get_dirname( filename ); hasdir = (strcmp( dirname, "." ) != 0); g_free( dirname ); return( hasdir ); } /* Open a file. We take an optional fallback dir as well and will try opening * there if opening directly fails. * * This is used for things like finding ICC profiles. We try to open the file * directly first, and if that fails and the filename does not contain a * directory separator, we try looking in the fallback dir. */ FILE * vips__file_open_read( const char *filename, const char *fallback_dir, gboolean text_mode ) { char *mode; FILE *fp; #ifdef BINARY_OPEN if( text_mode ) mode = "r"; else mode = "rb"; #else /*BINARY_OPEN*/ mode = "r"; #endif /*BINARY_OPEN*/ if( (fp = fopen( filename, mode )) ) return( fp ); if( fallback_dir && !filename_hasdir( filename ) ) { char *path; path = g_build_filename( fallback_dir, filename, NULL ); fp = fopen( path, mode ); g_free( path ); if( fp ) return( fp ); } vips_error( "vips__file_open_read", _( "unable to open file \"%s\" for reading" ), filename ); return( NULL ); } FILE * vips__file_open_write( const char *filename, gboolean text_mode ) { char *mode; FILE *fp; #ifdef BINARY_OPEN if( text_mode ) mode = "w"; else mode = "wb"; #else /*BINARY_OPEN*/ mode = "w"; #endif /*BINARY_OPEN*/ if( !(fp = fopen( filename, mode )) ) { vips_error( "vips__file_open_write", _( "unable to open file \"%s\" for writing" ), filename ); return( NULL ); } return( fp ); } /* Load up a file as a string. */ char * vips__file_read( FILE *fp, const char *filename, unsigned int *length_out ) { long len; size_t read; char *str; /* Find length. */ fseek( fp, 0L, 2 ); len = ftell( fp ); if( len > 20 * 1024 * 1024 ) { /* Seems crazy! */ vips_error( "vips__file_read", _( "\"%s\" too long" ), filename ); return( NULL ); } if( len == -1 ) { int size; /* Can't get length: read in chunks and realloc() to end of * file. */ str = NULL; len = 0; size = 0; do { char *str2; size += 1024; if( !(str2 = realloc( str, size )) ) { free( str ); vips_error( "vips__file_read", "%s", _( "out of memory" ) ); return( NULL ); } str = str2; /* -1 to allow space for an extra NULL we add later. */ read = fread( str + len, sizeof( char ), (size - len - 1) / sizeof( char ), fp ); len += read; } while( !feof( fp ) ); #ifdef DEBUG printf( "read %ld bytes from unseekable stream\n", len ); #endif /*DEBUG*/ } else { /* Allocate memory and fill. */ if( !(str = vips_malloc( NULL, len + 1 )) ) return( NULL ); rewind( fp ); read = fread( str, sizeof( char ), (size_t) len, fp ); if( read != (size_t) len ) { vips_free( str ); vips_error( "vips__file_read", _( "error reading from file \"%s\"" ), filename ); return( NULL ); } } str[len] = '\0'; if( length_out ) *length_out = len; return( str ); } /* Load from a filename as a string. Used for things like reading in ICC * profiles, ie. binary objects. */ char * vips__file_read_name( const char *filename, const char *fallback_dir, unsigned int *length_out ) { FILE *fp; char *buffer; if( !(fp = vips__file_open_read( filename, fallback_dir, FALSE )) ) return( NULL ); if( !(buffer = vips__file_read( fp, filename, length_out )) ) { fclose( fp ); return( NULL ); } fclose( fp ); return( buffer ); } /* Like fwrite(), but returns non-zero on error and sets error message. */ int vips__file_write( void *data, size_t size, size_t nmemb, FILE *stream ) { size_t n; if( !data ) return( 0 ); if( (n = fwrite( data, size, nmemb, stream )) != nmemb ) { vips_error( "vips__file_write", _( "write error (%zd out of %zd blocks written) " "... disc full?" ), n, nmemb ); return( -1 ); } return( 0 ); } /* Read a few bytes from the start of a file. For sniffing file types. * Filename may contain a mode. */ int vips__get_bytes( const char *filename, unsigned char buf[], int len ) { char name[FILENAME_MAX]; char mode[FILENAME_MAX]; int fd; /* Split off the mode part. */ im_filename_split( filename, name, mode ); /* File may not even exist (for tmp images for example!) * so no hasty messages. And the file might be truncated, so no error * on read either. */ if( (fd = open( name, MODE_READONLY )) == -1 ) return( 0 ); if( read( fd, buf, len ) != len ) { close( fd ); return( 0 ); } close( fd ); return( 1 ); } /* Alloc/free a GValue. */ static GValue * vips__gvalue_new( GType type ) { GValue *value; value = g_new0( GValue, 1 ); g_value_init( value, type ); return( value ); } static GValue * vips__gvalue_copy( GValue *value ) { GValue *value_copy; value_copy = vips__gvalue_new( G_VALUE_TYPE( value ) ); g_value_copy( value, value_copy ); return( value_copy ); } static void vips__gvalue_free( GValue *value ) { g_value_unset( value ); g_free( value ); } GValue * vips__gvalue_ref_string_new( const char *text ) { GValue *value; value = vips__gvalue_new( VIPS_TYPE_REF_STRING ); vips_value_set_ref_string( value, text ); return( value ); } /* Free a GSList of GValue. */ void vips__gslist_gvalue_free( GSList *list ) { g_slist_foreach( list, (GFunc) vips__gvalue_free, NULL ); g_slist_free( list ); } /* Copy a GSList of GValue. */ GSList * vips__gslist_gvalue_copy( const GSList *list ) { GSList *copy; const GSList *p; copy = NULL; for( p = list; p; p = p->next ) copy = g_slist_prepend( copy, vips__gvalue_copy( (GValue *) p->data ) ); copy = g_slist_reverse( copy ); return( copy ); } /* Merge two GSList of GValue ... append to a all elements in b which are not * in a. Return the new value of a. Works for any vips refcounted type * (string, blob, etc.). */ GSList * vips__gslist_gvalue_merge( GSList *a, const GSList *b ) { const GSList *i, *j; GSList *tail; tail = NULL; for( i = b; i; i = i->next ) { GValue *value = (GValue *) i->data; g_assert( G_VALUE_TYPE( value ) == VIPS_TYPE_REF_STRING ); for( j = a; j; j = j->next ) { GValue *value2 = (GValue *) j->data; g_assert( G_VALUE_TYPE( value2 ) == VIPS_TYPE_REF_STRING ); /* Just do a pointer compare ... good enough 99.9% of * the time. */ if( vips_value_get_ref_string( value, NULL ) == vips_value_get_ref_string( value2, NULL ) ) break; } if( !j ) tail = g_slist_prepend( tail, vips__gvalue_copy( value ) ); } a = g_slist_concat( a, g_slist_reverse( tail ) ); return( a ); } /* Make a char* from GSList of GValue. Each GValue should be a ref_string. * free the result. Empty list -> "", not NULL. Join strings with '\n'. */ char * vips__gslist_gvalue_get( const GSList *list ) { const GSList *p; size_t length; char *all; char *q; /* Need to estimate length first. */ length = 0; for( p = list; p; p = p->next ) { GValue *value = (GValue *) p->data; size_t l2; g_assert( G_VALUE_TYPE( value ) == VIPS_TYPE_REF_STRING ); /* +1 for the newline we will add for each item. */ (void) vips_value_get_ref_string( value, &l2 ); length += l2 + 1; } if( length == 0 ) return( NULL ); /* More than 10MB of history? Madness! */ g_assert( length < 10 * 1024 * 1024 ); /* +1 for '\0'. */ if( !(all = vips_malloc( NULL, length + 1 )) ) return( NULL ); q = all; for( p = list; p; p = p->next ) { GValue *value = (GValue *) p->data; size_t l2; strcpy( q, vips_value_get_ref_string( value, &l2 ) ); q += l2; strcpy( q, "\n" ); q += 1; } g_assert( (size_t) (q - all) == length ); return( all ); } /* Need our own seek(), since lseek() on win32 can't do long files. */ int vips__seek( int fd, gint64 pos ) { #ifdef OS_WIN32 { HANDLE hFile = (HANDLE) _get_osfhandle( fd ); LARGE_INTEGER p; p.QuadPart = pos; if( !SetFilePointerEx( hFile, p, NULL, FILE_BEGIN ) ) { vips_error_system( GetLastError(), "vips__seek", "%s", _( "unable to seek" ) ); return( -1 ); } } #else /*!OS_WIN32*/ if( lseek( fd, pos, SEEK_SET ) == (off_t) -1 ) { vips_error( "vips__seek", "%s", _( "unable to seek" ) ); return( -1 ); } #endif /*OS_WIN32*/ return( 0 ); } /* Need our own ftruncate(), since ftruncate() on win32 can't do long files. DANGER ... this moves the file pointer to the end of file on win32, but not on *nix; don't make any assumptions about the file pointer position after calling this */ int vips__ftruncate( int fd, gint64 pos ) { #ifdef OS_WIN32 { HANDLE hFile = (HANDLE) _get_osfhandle( fd ); LARGE_INTEGER p; p.QuadPart = pos; if( vips__seek( fd, pos ) ) return( -1 ); if( !SetEndOfFile( hFile ) ) { vips_error_system( GetLastError(), "vips__ftruncate", "%s", _( "unable to truncate" ) ); return( -1 ); } } #else /*!OS_WIN32*/ if( ftruncate( fd, pos ) ) { vips_error_system( errno, "vips__ftruncate", "%s", _( "unable to truncate" ) ); return( -1 ); } #endif /*OS_WIN32*/ return( 0 ); } /* Test for file exists. */ int vips_existsf( const char *name, ... ) { va_list ap; char *path; int result; va_start( ap, name ); path = g_strdup_vprintf( name, ap ); va_end( ap ); result = access( path, R_OK ); g_free( path ); return( !result ); } #ifdef OS_WIN32 #define popen(b,m) _popen(b,m) #define pclose(f) _pclose(f) #endif /*OS_WIN32*/ /* Do popen(), with printf-style args. */ FILE * vips_popenf( const char *fmt, const char *mode, ... ) { va_list args; char buf[VIPS_PATH_MAX]; FILE *fp; va_start( args, mode ); (void) vips_vsnprintf( buf, VIPS_PATH_MAX, fmt, args ); va_end( args ); #ifdef DEBUG printf( "vips_popenf: running: %s\n", buf ); #endif /*DEBUG*/ if( !(fp = popen( buf, mode )) ) { vips_error( "popenf", "%s", strerror( errno ) ); return( NULL ); } return( fp ); } /* Make a directory. */ int vips_mkdirf( const char *name, ... ) { va_list ap; char *path; va_start( ap, name ); path = g_strdup_vprintf( name, ap ); va_end( ap ); if( g_mkdir( path, 0755 ) ) { vips_error( "mkdirf", _( "unable to create directory \"%s\", %s" ), path, strerror( errno ) ); g_free( path ); return( -1 ); } g_free( path ); return( 0 ); } /* Break a command-line argument into tokens separated by whitespace. * * Strings can't be adjacent, so "hello world" (without quotes) is a single * string. Strings are written (with \" escaped) into @string. If the string * is larger than @size, it is silently null-terminated and truncated. * * Return NULL for end of tokens. */ const char * vips__token_get( const char *p, VipsToken *token, char *string, int size ) { const char *q; int ch; int n; int i; /* Parse this token with p. */ if( !p ) return( NULL ); /* Skip initial whitespace. */ p += strspn( p, " \t\n\r" ); if( !p[0] ) return( NULL ); switch( (ch = p[0]) ) { case '{': case '[': case '(': case '<': *token = VIPS_TOKEN_LEFT; p += 1; break; case ')': case ']': case '}': case '>': *token = VIPS_TOKEN_RIGHT; p += 1; break; case '=': *token = VIPS_TOKEN_EQUALS; p += 1; break; case ',': *token = VIPS_TOKEN_COMMA; p += 1; break; case '"': case '\'': /* Parse a quoted string. Copy up to ", interpret any \", * error if no closing ". */ *token = VIPS_TOKEN_STRING; do { /* Number of characters until the next quote * character or end of string. */ if( (q = strchr( p + 1, ch )) ) n = q - p + 1; else n = strlen( p + 1 ); /* How much can we copy to the buffer? */ i = VIPS_MIN( n, size ); vips_strncpy( string, p + 1, i ); /* We might have stopped at an escaped quote. If the * string was not truncated, swap the preceding * backslash for a quote. */ if( p[n + 1] == ch && p[n] == '\\' && i == n ) string[i - 1] = ch; string += i; size -= i; p += n + 1; } while( p[0] && p[-1] == '\\' ); p += 1; break; default: /* It's an unquoted string: read up to the next non-string * character. We don't allow two strings next to each other, * so the next break must be bracket, equals, comma. */ *token = VIPS_TOKEN_STRING; n = strcspn( p, "<[{()}]>=," ); i = VIPS_MIN( n, size ); vips_strncpy( string, p, i + 1 ); p += n; /* We remove leading whitespace, so we trim trailing * whitespace from unquoted strings too. Only if the string * hasn't been truncated. */ if( i == n ) while( i > 0 && isspace( string[i - 1] ) ) { string[i - 1] = '\0'; i--; } break; } return( p ); } /* We expect a token. */ const char * vips__token_must( const char *p, VipsToken *token, char *string, int size ) { if( !(p = vips__token_get( p, token, string, size )) ) { vips_error( "get_token", "%s", _( "unexpected end of string" ) ); return( NULL ); } return( p ); } /* We expect a certain token. */ const char * vips__token_need( const char *p, VipsToken need_token, char *string, int size ) { VipsToken token; if( !(p = vips__token_must( p, &token, string, size )) ) return( NULL ); if( token != need_token ) { vips_error( "get_token", _( "expected %s, saw %s" ), vips_enum_nick( VIPS_TYPE_TOKEN, need_token ), vips_enum_nick( VIPS_TYPE_TOKEN, token ) ); return( NULL ); } return( p ); } /* Maximum number of tokens we allow in a filename. Surely this will be * plenty. */ #define MAX_TOKENS (1000) /* Find the start of the right-most pair of brackets in the string. * * A string can be of the form: * * "hello world! (no really).tif[fred=12]" * * we need to be able to find the fred=12 at the end. * * We lex the whole string noting the position of each token, then, if the * final token is a right-bracket, search left for the matching left-bracket. * * This can get confused if the lefts are hidden inside another token :-( But * a fixing that would require us to write a separate right-to-left lexer, * argh. */ const char * vips__find_rightmost_brackets( const char *p ) { const char *start[MAX_TOKENS]; VipsToken tokens[MAX_TOKENS]; char str[VIPS_PATH_MAX]; int n, i; int nest; start[0] = p; for( n = 0; n < MAX_TOKENS && (p = vips__token_get( start[n], &tokens[n], str, VIPS_PATH_MAX )); n++, start[n] = p ) ; /* Too many tokens? */ if( n == MAX_TOKENS ) return( NULL ); /* No rightmost close bracket? */ if( n == 0 || tokens[n - 1] != VIPS_TOKEN_RIGHT ) return( NULL ); nest = 0; for( i = n - 1; i >= 0; i-- ) { if( tokens[i] == VIPS_TOKEN_RIGHT ) nest += 1; else if( tokens[i] == VIPS_TOKEN_LEFT ) nest -= 1; if( nest == 0 ) break; } /* No matching left bracket? */ if( nest != 0 ) return( NULL ); /* This should be the matching left. */ return( start[i] ); } /* True if an int is a power of two ... 1, 2, 4, 8, 16, 32, etc. Do with just * integer arithmetic for portability. A previous Nicos version using doubles * and log/log failed on x86 with rounding problems. Return 0 for not * power of two, otherwise return the position of the set bit (numbering with * bit 1 as the lsb). */ int vips_ispoweroftwo( int p ) { int i, n; /* Count set bits. Could use a LUT, I guess. */ for( i = 0, n = 0; p; i++, p >>= 1 ) if( p & 1 ) n++; /* Should be just one set bit. */ if( n == 1 ) /* Return position of bit. */ return( i ); else return( 0 ); } /* Test this processor for endianness. True for SPARC order. */ int vips_amiMSBfirst( void ) { int test; unsigned char *p = (unsigned char *) &test; test = 0; p[0] = 255; if( test == 255 ) return( 0 ); else return( 1 ); } /* Return the tmp dir. On Windows, GetTempPath() will also check the values of * TMP, TEMP and USERPROFILE. */ static const char * vips__temp_dir( void ) { const char *tmpd; if( !(tmpd = g_getenv( "TMPDIR" )) ) { #ifdef OS_WIN32 static gboolean done = FALSE; static char buf[256]; if( !done ) { if( !GetTempPath( 256, buf ) ) strcpy( buf, "C:\\temp" ); } tmpd = buf; #else /*!OS_WIN32*/ tmpd = "/tmp"; #endif /*!OS_WIN32*/ } return( tmpd ); } /* Make a temporary file name. The format parameter is something like "%s.jpg" * and will be expanded to something like "/tmp/vips-12-34587.jpg". * * You need to free the result. A real file will also be created, though we * delete it for you. */ char * vips__temp_name( const char *format ) { static int serial = 1; char file[FILENAME_MAX]; char file2[FILENAME_MAX]; char *name; int fd; vips_snprintf( file, FILENAME_MAX, "vips-%d-XXXXXX", serial++ ); vips_snprintf( file2, FILENAME_MAX, format, file ); name = g_build_filename( vips__temp_dir(), file2, NULL ); if( (fd = g_mkstemp( name )) == -1 ) { vips_error( "tempfile", _( "unable to make temporary file %s" ), name ); g_free( name ); return( NULL ); } close( fd ); g_unlink( name ); return( name ); } /* Strip off any of a set of old suffixes (eg. [".v", ".jpg"]), add a single * new suffix (eg. ".tif"). */ void vips__change_suffix( const char *name, char *out, int mx, const char *new, const char **olds, int nolds ) { char *p; int i; int len; /* Copy start string. */ vips_strncpy( out, name, mx ); /* Drop all matching suffixes. */ while( (p = strrchr( out, '.' )) ) { /* Found suffix - test against list of alternatives. Ignore * case. */ for( i = 0; i < nolds; i++ ) if( g_ascii_strcasecmp( p, olds[i] ) == 0 ) { *p = '\0'; break; } /* Found match? If not, break from loop. */ if( *p ) break; } /* Add new suffix. */ len = strlen( out ); vips_strncpy( out + len, new, mx - len ); } typedef struct { const char unit; int multiplier; } Unit; guint64 vips__parse_size( const char *size_string ) { static Unit units[] = { { 'k', 1024 }, { 'm', 1024 * 1024 }, { 'g', 1024 * 1024 * 1024 } }; guint64 size; int n; int i; char *unit; /* An easy way to alloc a buffer large enough. */ unit = g_strdup( size_string ); n = sscanf( size_string, "%d %s", &i, unit ); size = i; if( n > 1 ) { int j; for( j = 0; j < VIPS_NUMBER( units ); j++ ) if( tolower( unit[0] ) == units[j].unit ) { size *= units[j].multiplier; break; } } g_free( unit ); VIPS_DEBUG_MSG( "parse_size: parsed \"%s\" as %" G_GUINT64_FORMAT "\n", size_string, size ); return( size ); } /* Look up the const char * for an enum value. */ const char * vips_enum_string( GType enm, int v ) { GEnumValue *value; if( !(value = g_enum_get_value( g_type_class_ref( enm ), v )) ) return( "(null)" ); return( value->value_name ); } const char * vips_enum_nick( GType enm, int v ) { GEnumValue *value; if( !(value = g_enum_get_value( g_type_class_ref( enm ), v )) ) return( "(null)" ); return( value->value_nick ); } int vips_enum_from_nick( const char *domain, GType type, const char *nick ) { GTypeClass *class; GEnumClass *genum; GEnumValue *enum_value; int i; char str[1000]; VipsBuf buf = VIPS_BUF_STATIC( str ); if( !(class = g_type_class_ref( type )) ) { vips_error( domain, "%s", _( "no such enum type" ) ); return( -1 ); } genum = G_ENUM_CLASS( class ); if( (enum_value = g_enum_get_value_by_name( genum, nick )) ) return( enum_value->value ); if( (enum_value = g_enum_get_value_by_nick( genum, nick )) ) return( enum_value->value ); /* -1 since we always have a "last" member. */ for( i = 0; i < genum->n_values - 1; i++ ) { if( i > 0 ) vips_buf_appends( &buf, ", " ); vips_buf_appends( &buf, genum->values[i].value_nick ); } vips_error( domain, _( "enum '%s' has no member '%s', " "should be one of: %s" ), g_type_name( type ), nick, vips_buf_all( &buf ) ); return( -1 ); } vips-7.38.5/libvips/iofuncs/sinkscreen.c0000644000175000017500000006265712303141142015155 00000000000000/* aynchronous screen sink * * 1/1/10 * - from im_render.c * 25/11/10 * - in synchronous mode, use a single region for input and save huge * mem use */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Verbose debugging output. #define VIPS_DEBUG */ /* Trace allocate/free. #define VIPS_DEBUG_AMBER */ /* Trace reschedule #define VIPS_DEBUG_GREEN */ /* Trace serious problems. #define VIPS_DEBUG_RED */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #ifdef VIPS_DEBUG_AMBER static int render_num_renders = 0; #endif /*VIPS_DEBUG_AMBER*/ /* A tile in our cache. */ typedef struct { struct _Render *render; VipsRect area; /* Place here (unclipped) */ VipsRegion *region; /* VipsRegion with the pixels */ /* The tile contains calculated pixels. Though the region may have been * invalidated behind our backs: we have to check that too. */ gboolean painted; /* The tile is on the dirty list. This saves us having to search the * dirty list all the time. */ gboolean dirty; /* Time of last use, for LRU flush */ int ticks; } Tile; /* Per-call state. */ typedef struct _Render { /* Reference count this, since we use these things from several * threads. We can't easily use the gobject ref count system since we * need a lock around operations. */ int ref_count; GMutex *ref_count_lock; /* Parameters. */ VipsImage *in; /* Image we render */ VipsImage *out; /* Write tiles here on demand */ VipsImage *mask; /* Set valid pixels here */ int tile_width; /* Tile size */ int tile_height; int max_tiles; /* Maximum number of tiles */ int priority; /* Larger numbers done sooner */ VipsSinkNotify notify; /* Tell caller about paints here */ void *a; /* Lock here before reading or modifying the tile structure. */ GMutex *lock; /* Tile cache. */ GSList *all; /* All our tiles */ int ntiles; /* Number of tiles */ int ticks; /* Inc. on each access ... used for LRU */ /* List of dirty tiles. Most recent at the front. */ GSList *dirty; /* Hash of tiles with positions. Tiles can be dirty or painted. */ GHashTable *tiles; } Render; /* Our per-thread state. */ typedef struct _RenderThreadState { VipsThreadState parent_object; /* The tile that should be calculated. */ Tile *tile; } RenderThreadState; typedef struct _RenderThreadStateClass { VipsThreadStateClass parent_class; } RenderThreadStateClass; G_DEFINE_TYPE( RenderThreadState, render_thread_state, VIPS_TYPE_THREAD_STATE ); /* The BG thread which sits waiting to do some calculations. */ static GThread *render_thread = NULL; /* Number of renders with dirty tiles. render_thread queues up on this. */ static VipsSemaphore render_dirty_sem; /* All the renders with dirty tiles. */ static GMutex *render_dirty_lock = NULL; static GSList *render_dirty_all = NULL; /* Set this to make the bg thread stop and reschedule. */ static gboolean render_reschedule = FALSE; static void render_thread_state_class_init( RenderThreadStateClass *class ) { VipsObjectClass *object_class = VIPS_OBJECT_CLASS( class ); object_class->nickname = "renderthreadstate"; object_class->description = _( "per-thread state for render" ); } static void render_thread_state_init( RenderThreadState *state ) { state->tile = NULL; } static VipsThreadState * render_thread_state_new( VipsImage *im, void *a ) { return( VIPS_THREAD_STATE( vips_object_new( render_thread_state_get_type(), vips_thread_state_set, im, a ) ) ); } static void * tile_free( Tile *tile ) { VIPS_DEBUG_MSG_AMBER( "tile_free\n" ); VIPS_UNREF( tile->region ); vips_free( tile ); return( NULL ); } static int render_free( Render *render ) { VIPS_DEBUG_MSG_AMBER( "render_free: %p\n", render ); g_assert( render->ref_count == 0 ); g_mutex_lock( render_dirty_lock ); if( g_slist_find( render_dirty_all, render ) ) { render_dirty_all = g_slist_remove( render_dirty_all, render ); /* We could vips_semaphore_upn( &render_dirty_sem, -1 ), but * what's the point. We'd just wake up the bg thread * for no reason. */ } g_mutex_unlock( render_dirty_lock ); vips_g_mutex_free( render->ref_count_lock ); vips_g_mutex_free( render->lock ); vips_slist_map2( render->all, (VipsSListMap2Fn) tile_free, NULL, NULL ); VIPS_FREEF( g_slist_free, render->all ); render->ntiles = 0; VIPS_FREEF( g_slist_free, render->dirty ); VIPS_FREEF( g_hash_table_destroy, render->tiles ); vips_free( render ); #ifdef VIPS_DEBUG_AMBER render_num_renders -= 1; #endif /*VIPS_DEBUG_AMBER*/ return( 0 ); } /* Ref and unref a Render ... free on last unref. */ static int render_ref( Render *render ) { g_mutex_lock( render->ref_count_lock ); g_assert( render->ref_count != 0 ); render->ref_count += 1; g_mutex_unlock( render->ref_count_lock ); return( 0 ); } static int render_unref( Render *render ) { int kill; g_mutex_lock( render->ref_count_lock ); g_assert( render->ref_count > 0 ); render->ref_count -= 1; kill = render->ref_count == 0; g_mutex_unlock( render->ref_count_lock ); if( kill ) render_free( render ); return( 0 ); } /* Wait for a render with dirty tiles. */ static Render * render_dirty_get( void ) { Render *render; /* Wait for a render with dirty tiles. */ vips_semaphore_down( &render_dirty_sem ); g_mutex_lock( render_dirty_lock ); /* Just take the head of the jobs list ... we sort when we add. If * render_free() is called between our semaphore letting us in * and the _lock(), render_dirty_all can be NULL. */ render = NULL; if( render_dirty_all ) { render = (Render *) render_dirty_all->data; /* Ref the render to make sure it can't die while we're * working on it. */ render_ref( render ); render_dirty_all = g_slist_remove( render_dirty_all, render ); } g_mutex_unlock( render_dirty_lock ); return( render ); } /* Get the next tile to paint off the dirty list. */ static Tile * render_tile_dirty_get( Render *render ) { Tile *tile; if( !render->dirty ) tile = NULL; else { tile = (Tile *) render->dirty->data; g_assert( tile->dirty ); render->dirty = g_slist_remove( render->dirty, tile ); tile->dirty = FALSE; } return( tile ); } /* Pick a dirty tile to reuse. We could potentially get the tile that * render_work() is working on in the background :-( but I don't think we'll * get a crash, just a mis-paint. It should be vanishingly impossible anyway. */ static Tile * render_tile_dirty_reuse( Render *render ) { Tile *tile; if( !render->dirty ) tile = NULL; else { tile = (Tile *) g_slist_last( render->dirty )->data; render->dirty = g_slist_remove( render->dirty, tile ); g_assert( tile->dirty ); tile->dirty = FALSE; VIPS_DEBUG_MSG( "render_tile_get_dirty_reuse: " "reusing dirty %p\n", tile ); } return( tile ); } /* Add a tile to the dirty list. */ static void tile_dirty_set( Tile *tile ) { Render *render = tile->render; if( !tile->dirty ) { g_assert( !g_slist_find( render->dirty, tile ) ); render->dirty = g_slist_prepend( render->dirty, tile ); tile->dirty = TRUE; tile->painted = FALSE; } else g_assert( g_slist_find( render->dirty, tile ) ); } /* Bump a tile to the front of the dirty list, if it's there. */ static void tile_dirty_bump( Tile *tile ) { Render *render = tile->render; if( tile->dirty ) { g_assert( g_slist_find( render->dirty, tile ) ); render->dirty = g_slist_remove( render->dirty, tile ); render->dirty = g_slist_prepend( render->dirty, tile ); } else g_assert( !g_slist_find( render->dirty, tile ) ); } static int render_allocate( VipsThreadState *state, void *a, gboolean *stop ) { Render *render = (Render *) a; RenderThreadState *rstate = (RenderThreadState *) state; Tile *tile; g_mutex_lock( render->lock ); if( render_reschedule || !(tile = render_tile_dirty_get( render )) ) { VIPS_DEBUG_MSG_GREEN( "render_allocate: stopping\n" ); *stop = TRUE; rstate->tile = NULL; } else rstate->tile = tile; g_mutex_unlock( render->lock ); return( 0 ); } static int render_work( VipsThreadState *state, void *a ) { Render *render = (Render *) a; RenderThreadState *rstate = (RenderThreadState *) state; Tile *tile = rstate->tile; g_assert( tile ); VIPS_DEBUG_MSG( "calculating tile %p %dx%d\n", tile, tile->area.left, tile->area.top ); if( vips_region_prepare_to( state->reg, tile->region, &tile->area, tile->area.left, tile->area.top ) ) { VIPS_DEBUG_MSG_RED( "render_work: " "vips_region_prepare_to() failed: %s\n", vips_error_buffer() ); return( -1 ); } tile->painted = TRUE; /* Now clients can update. */ if( render->notify ) render->notify( render->out, &tile->area, render->a ); return( 0 ); } static int render_dirty_sort( Render *a, Render *b ) { return( b->priority - a->priority ); } /* Add to the jobs list, if it has work to be done. */ static void render_dirty_put( Render *render ) { g_mutex_lock( render_dirty_lock ); if( render->dirty ) { if( !g_slist_find( render_dirty_all, render ) ) { render_dirty_all = g_slist_prepend( render_dirty_all, render ); render_dirty_all = g_slist_sort( render_dirty_all, (GCompareFunc) render_dirty_sort ); /* Ask the bg thread to stop and reschedule, if it's * running. */ VIPS_DEBUG_MSG_GREEN( "render_dirty_put: " "reschedule\n" ); render_reschedule = TRUE; vips_semaphore_up( &render_dirty_sem ); } } g_mutex_unlock( render_dirty_lock ); } /* Main loop for RenderThreads. */ static void * render_thread_main( void *client ) { for(;;) { Render *render; if( (render = render_dirty_get()) ) { /* Ignore errors, I'm not sure what we'd do with them * anyway. */ VIPS_DEBUG_MSG_GREEN( "render_thread_main: " "threadpool start\n" ); render_reschedule = FALSE; if( vips_threadpool_run( render->in, render_thread_state_new, render_allocate, render_work, NULL, render ) ) VIPS_DEBUG_MSG_RED( "render_thread_main: " "threadpool_run failed\n" ); VIPS_DEBUG_MSG_GREEN( "render_thread_main: " "threadpool return\n" ); /* Add back to the jobs list, if we need to. */ render_dirty_put( render ); /* _get() does a ref to make sure we keep the render * alive during processing ... unref before we loop. * This can kill off the render. */ render_unref( render ); } } return( NULL ); } /* Create our set of RenderThread. Assume we're single-threaded here. */ static int render_thread_create( void ) { if( !render_dirty_lock ) { render_dirty_lock = vips_g_mutex_new(); vips_semaphore_init( &render_dirty_sem, 0, "render_dirty_sem" ); } if( !render_thread ) { if( !(render_thread = vips_g_thread_new( "sink_screen", render_thread_main, NULL )) ) return( -1 ); } return( 0 ); } static guint tile_hash( gconstpointer key ) { VipsRect *rect = (VipsRect *) key; int x = rect->left / rect->width; int y = rect->top / rect->height; return( x << 16 ^ y ); } static gboolean tile_equal( gconstpointer a, gconstpointer b ) { VipsRect *rect1 = (VipsRect *) a; VipsRect *rect2 = (VipsRect *) b; return( rect1->left == rect2->left && rect1->top == rect2->top ); } static int render_close_cb( VipsImage *image, Render *render ) { VIPS_DEBUG_MSG_AMBER( "render_close_cb\n" ); render_unref( render ); /* If this render is being worked on, we want to jog the bg thread, * make it drop it's ref and think again. */ VIPS_DEBUG_MSG_GREEN( "render_close_cb: reschedule\n" ); render_reschedule = TRUE; return( 0 ); } static Render * render_new( VipsImage *in, VipsImage *out, VipsImage *mask, int tile_width, int tile_height, int max_tiles, int priority, VipsSinkNotify notify, void *a ) { Render *render; /* Don't use auto-free for render, we do our own lifetime management * with _ref() and _unref(). */ if( !(render = VIPS_NEW( NULL, Render )) ) return( NULL ); render->ref_count = 1; render->ref_count_lock = vips_g_mutex_new(); render->in = in; render->out = out; render->mask = mask; render->tile_width = tile_width; render->tile_height = tile_height; render->max_tiles = max_tiles; render->priority = priority; render->notify = notify; render->a = a; render->lock = vips_g_mutex_new(); render->all = NULL; render->ntiles = 0; render->ticks = 0; render->tiles = g_hash_table_new( tile_hash, tile_equal ); render->dirty = NULL; /* Both out and mask must close before we can free the render. */ g_signal_connect( out, "close", G_CALLBACK( render_close_cb ), render ); if( mask ) { g_signal_connect( mask, "close", G_CALLBACK( render_close_cb ), render ); render_ref( render ); } VIPS_DEBUG_MSG_AMBER( "render_new: %p\n", render ); #ifdef VIPS_DEBUG_AMBER render_num_renders += 1; #endif /*VIPS_DEBUG_AMBER*/ return( render ); } /* Make a Tile. */ static Tile * tile_new( Render *render ) { Tile *tile; VIPS_DEBUG_MSG_AMBER( "tile_new\n" ); /* Don't use auto-free: we need to make sure we free the tile after * Render. */ if( !(tile = VIPS_NEW( NULL, Tile )) ) return( NULL ); tile->render = render; tile->area.left = 0; tile->area.top = 0; tile->area.width = render->tile_width; tile->area.height = render->tile_height; tile->region = NULL; tile->painted = FALSE; tile->dirty = FALSE; tile->ticks = render->ticks; if( !(tile->region = vips_region_new( render->in )) ) { (void) tile_free( tile ); return( NULL ); } render->all = g_slist_prepend( render->all, tile ); render->ntiles += 1; return( tile ); } /* Search the cache for a tile by position. */ static Tile * render_tile_lookup( Render *render, VipsRect *area ) { return( (Tile *) g_hash_table_lookup( render->tiles, area ) ); } /* Add a new tile to the table. */ static void render_tile_add( Tile *tile, VipsRect *area ) { Render *render = tile->render; g_assert( !render_tile_lookup( render, area ) ); tile->area = *area; tile->painted = FALSE; /* Ignore buffer allocate errors, there's not much we could do with * them. */ if( vips_region_buffer( tile->region, &tile->area ) ) VIPS_DEBUG_MSG_RED( "render_tile_add: " "buffer allocate failed\n" ); g_hash_table_insert( render->tiles, &tile->area, tile ); } /* Move a tile to a new position. */ static void render_tile_move( Tile *tile, VipsRect *area ) { Render *render = tile->render; g_assert( render_tile_lookup( render, &tile->area ) ); if( tile->area.left != area->left || tile->area.top != area->top ) { g_assert( !render_tile_lookup( render, area ) ); g_hash_table_remove( render->tiles, &tile->area ); render_tile_add( tile, area ); } } /* We've looked at a tile ... bump to end of LRU and front of dirty. */ static void tile_touch( Tile *tile ) { Render *render = tile->render; tile->ticks = render->ticks; render->ticks += 1; tile_dirty_bump( tile ); } /* Queue a tile for calculation. */ static void tile_queue( Tile *tile, VipsRegion *reg ) { Render *render = tile->render; VIPS_DEBUG_MSG( "tile_queue: adding tile %p %dx%d to dirty\n", tile, tile->area.left, tile->area.top ); tile->painted = FALSE; tile_touch( tile ); if( render->notify ) { /* Add to the list of renders with dirty tiles. The bg * thread will pick it up and paint it. It can be already on * the dirty list. */ tile_dirty_set( tile ); render_dirty_put( render ); } else { /* no notify ... paint the tile ourselves * sychronously. No need to notify the client since they'll * never see black tiles. */ VIPS_DEBUG_MSG( "tile_queue: " "painting tile %p %dx%d synchronously\n", tile, tile->area.left, tile->area.top ); /* While we're computing, let other threads use the cache. * This tile won't get pulled out from under us since it's not * marked as "painted", and it's not on the dirty list. */ g_mutex_unlock( render->lock ); if( vips_region_prepare_to( reg, tile->region, &tile->area, tile->area.left, tile->area.top ) ) VIPS_DEBUG_MSG_RED( "tile_queue: prepare failed\n" ); g_mutex_lock( render->lock ); tile->painted = TRUE; } } static void tile_test_clean_ticks( VipsRect *key, Tile *value, Tile **best ) { if( value->painted ) if( !*best || value->ticks < (*best)->ticks ) *best = value; } /* Pick a painted tile to reuse. Search for LRU (slow!). */ static Tile * render_tile_get_painted( Render *render ) { Tile *tile; tile = NULL; g_hash_table_foreach( render->tiles, (GHFunc) tile_test_clean_ticks, &tile ); if( tile ) { VIPS_DEBUG_MSG( "render_tile_get_painted: " "reusing painted %p\n", tile ); } return( tile ); } /* Ask for an area of calculated pixels. Get from cache, request calculation, * or if we've no threads or no notify, calculate immediately. */ static Tile * render_tile_request( Render *render, VipsRegion *reg, VipsRect *area ) { Tile *tile; VIPS_DEBUG_MSG( "render_tile_request: asking for %dx%d\n", area->left, area->top ); if( (tile = render_tile_lookup( render, area )) ) { /* We already have a tile at this position. If it's invalid, * ask for a repaint. */ if( tile->region->invalid ) tile_queue( tile, reg ); else tile_touch( tile ); } else if( render->ntiles < render->max_tiles || render->max_tiles == -1 ) { /* We have fewer tiles than teh max. We can just make a new * tile. */ if( !(tile = tile_new( render )) ) return( NULL ); render_tile_add( tile, area ); tile_queue( tile, reg ); } else { /* Need to reuse a tile. Try for an old painted tile first, * then if that fails, reuse a dirty tile. */ if( !(tile = render_tile_get_painted( render )) && !(tile = render_tile_dirty_reuse( render )) ) { VIPS_DEBUG_MSG( "render_tile_request: " "no tiles to reuse\n" ); return( NULL ); } render_tile_move( tile, area ); tile_queue( tile, reg ); } return( tile ); } /* Copy what we can from the tile into the region. */ static void tile_copy( Tile *tile, VipsRegion *to ) { VipsRect ovlap; /* Find common pixels. */ vips_rect_intersectrect( &tile->area, &to->valid, &ovlap ); g_assert( !vips_rect_isempty( &ovlap ) ); /* If the tile is painted, copy over the pixels. Otherwise, fill with * zero. */ if( tile->painted && !tile->region->invalid ) { int len = VIPS_IMAGE_SIZEOF_PEL( to->im ) * ovlap.width; int y; VIPS_DEBUG_MSG( "tile_copy: " "copying calculated pixels for %p %dx%d\n", tile, tile->area.left, tile->area.top ); for( y = ovlap.top; y < VIPS_RECT_BOTTOM( &ovlap ); y++ ) { VipsPel *p = VIPS_REGION_ADDR( tile->region, ovlap.left, y ); VipsPel *q = VIPS_REGION_ADDR( to, ovlap.left, y ); memcpy( q, p, len ); } } else { VIPS_DEBUG_MSG( "tile_copy: zero filling for %p %dx%d\n", tile, tile->area.left, tile->area.top ); vips_region_paint( to, &ovlap, 0 ); } } static void * image_start( IMAGE *out, void *a, void *b ) { Render *render = (Render *) a; return( vips_region_new( render->in ) ); } /* Loop over the output region, filling with data from cache. */ static int image_fill( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) { Render *render = (Render *) a; VipsRegion *reg = (VipsRegion *) seq; VipsRect *r = &out->valid; int x, y; /* Find top left of tiles we need. */ int xs = (r->left / render->tile_width) * render->tile_width; int ys = (r->top / render->tile_height) * render->tile_height; VIPS_DEBUG_MSG( "image_fill: left = %d, top = %d, " "width = %d, height = %d\n", r->left, r->top, r->width, r->height ); g_mutex_lock( render->lock ); /* FIXME ... if r fits inside a single tile, we could skip the copy. */ for( y = ys; y < VIPS_RECT_BOTTOM( r ); y += render->tile_height ) for( x = xs; x < VIPS_RECT_RIGHT( r ); x += render->tile_width ) { VipsRect area; Tile *tile; area.left = x; area.top = y; area.width = render->tile_width; area.height = render->tile_height; tile = render_tile_request( render, reg, &area ); if( tile ) tile_copy( tile, out ); else VIPS_DEBUG_MSG_RED( "image_fill: argh!\n" ); } g_mutex_unlock( render->lock ); return( 0 ); } static int image_stop( void *seq, void *a, void *b ) { VipsRegion *reg = (VipsRegion *) seq; g_object_unref( reg ); return( 0 ); } /* The mask image is 255 / 0 for the state of painted for each tile. */ static int mask_fill( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) { Render *render = (Render *) a; VipsRect *r = &out->valid; int x, y; /* Find top left of tiles we need. */ int xs = (r->left / render->tile_width) * render->tile_width; int ys = (r->top / render->tile_height) * render->tile_height; VIPS_DEBUG_MSG( "mask_fill: left = %d, top = %d, " "width = %d, height = %d\n", r->left, r->top, r->width, r->height ); g_mutex_lock( render->lock ); for( y = ys; y < VIPS_RECT_BOTTOM( r ); y += render->tile_height ) for( x = xs; x < VIPS_RECT_RIGHT( r ); x += render->tile_width ) { VipsRect area; Tile *tile; int value; area.left = x; area.top = y; area.width = render->tile_width; area.height = render->tile_height; tile = render_tile_lookup( render, &area ); value = (tile && tile->painted && !tile->region->invalid) ? 255 : 0; /* Only mark painted tiles containing valid pixels. */ vips_region_paint( out, &area, value ); } g_mutex_unlock( render->lock ); return( 0 ); } /** * vips_sink_screen: * @in: input image * @out: output image * @mask: mask image indicating valid pixels * @tile_width: tile width * @tile_height: tile height * @max_tiles: maximum tiles to cache * @priority: rendering priority * @notify: pixels are ready notification callback * @a: client data for callback * * This operation renders @in in the background, making pixels available on * @out as they are calculated. The @notify callback is run every time a new * set of pixels are available. Calculated pixels are kept in a cache with * tiles sized @tile_width by @tile_height pixels and with at most @max_tiles * tiles. * If @max_tiles is -1, the cache is of unlimited size (up to the maximum image * size). * The @mask image is a one-band uchar image and has 255 for pixels which are * currently in cache and 0 for uncalculated pixels. * * Only a single sink is calculated at any one time, though many may be * alive. Use @priority to indicate which renders are more important: * zero means normal * priority, negative numbers are low priority, positive numbers high * priority. * * Calls to vips_region_prepare() on @out return immediately and hold * whatever is * currently in cache for that #VipsRect (check @mask to see which parts of the * #VipsRect are valid). Any pixels in the #VipsRect which are not in * cache are added * to a queue, and the @notify callback will trigger when those pixels are * ready. * * The @notify callback is run from one of the background threads. In the * callback * you need to somehow send a message to the main thread that the pixels are * ready. In a glib-based application, this is easily done with g_idle_add(). * * If @notify is %NULL then vips_sink_screen() runs synchronously. * vips_region_prepare() on @out will always block until the pixels have been * calculated. * * See also: vips_tilecache(), vips_region_prepare(), * vips_sink_disc(), vips_sink(). * * Returns: 0 on sucess, -1 on error. */ int vips_sink_screen( VipsImage *in, VipsImage *out, VipsImage *mask, int tile_width, int tile_height, int max_tiles, int priority, VipsSinkNotify notify, void *a ) { Render *render; /* Make sure the bg work threads are ready. */ if( render_thread_create() ) return( -1 ); if( tile_width <= 0 || tile_height <= 0 || max_tiles < -1 ) { vips_error( "vips_sink_screen", "%s", _( "bad parameters" ) ); return( -1 ); } if( vips_image_pio_input( in ) || vips_image_pipelinev( out, VIPS_DEMAND_STYLE_SMALLTILE, in, NULL ) ) return( -1 ); if( mask ) { if( vips_image_pipelinev( mask, VIPS_DEMAND_STYLE_SMALLTILE, in, NULL ) ) return( -1 ); mask->Bands = 1; mask->BandFmt = VIPS_FORMAT_UCHAR; mask->Type = VIPS_INTERPRETATION_B_W; mask->Coding = VIPS_CODING_NONE; } if( !(render = render_new( in, out, mask, tile_width, tile_height, max_tiles, priority, notify, a )) ) return( -1 ); VIPS_DEBUG_MSG( "vips_sink_screen: max = %d, %p\n", max_tiles, render ); if( vips_image_generate( out, image_start, image_fill, image_stop, render, NULL ) ) return( -1 ); if( mask && vips_image_generate( mask, NULL, mask_fill, NULL, render, NULL ) ) return( -1 ); return( 0 ); } void vips__print_renders( void ) { #ifdef VIPS_DEBUG_AMBER printf( "%d active renders\n", render_num_renders ); #endif /*VIPS_DEBUG_AMBER*/ printf( "%d dirty renders\n", g_slist_length( render_dirty_all ) ); } vips-7.38.5/libvips/iofuncs/object.c0000644000175000017500000017470012303141142014250 00000000000000/* abstract base class for all vips objects * * Edited from nip's base class, 15/10/08 */ /* Copyright (C) 1991-2003 The National Gallery This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG #define VIPS_DEBUG #define DEBUG_REF */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include /** * SECTION: object * @short_description: the VIPS base object class * @stability: Stable * @see_also: operation * @include: vips/vips.h * * The #VipsObject class and associated types and macros. * * #VipsObject is the base class for all objects in libvips. It has the * following major features: * * Functional class creation Vips objects have a very * regular * lifecycle: initialise, build, use, destroy. They behave rather like * function calls and are free of side-effects. * * Run-time introspection Vips objects can be fully * introspected at * run-time. There is not need for a separate source-code analysis. * * Command-line interface Vips objects have an * automatic command-line * line interface with a set of virtual methods. * */ /* Our signals. */ enum { SIG_PRECLOSE, SIG_CLOSE, SIG_POSTCLOSE, SIG_LAST }; /* Table of all objects, handy for debugging. */ static GHashTable *vips__object_all = NULL; static GMutex *vips__object_all_lock = NULL; static guint vips_object_signals[SIG_LAST] = { 0 }; int _vips__argument_id = 1; G_DEFINE_ABSTRACT_TYPE( VipsObject, vips_object, G_TYPE_OBJECT ); void vips_object_preclose( VipsObject *object ) { if( !object->preclose ) { object->preclose = TRUE; #ifdef DEBUG printf( "vips_object_preclose: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_signal_emit( object, vips_object_signals[SIG_PRECLOSE], 0 ); } } static void vips_object_close( VipsObject *object ) { if( !object->close ) { object->close = TRUE; #ifdef DEBUG printf( "vips_object_close: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_signal_emit( object, vips_object_signals[SIG_CLOSE], 0 ); } } static void vips_object_postclose( VipsObject *object ) { if( !object->postclose ) { object->postclose = TRUE; #ifdef DEBUG printf( "vips_object_postclose: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_signal_emit( object, vips_object_signals[SIG_POSTCLOSE], 0 ); } } static void * vips_object_check_required( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); int *result = (int *) a; VipsArgumentFlags *iomask = (VipsArgumentFlags *) b; VIPS_DEBUG_MSG( "vips_object_check_required: %s\n", g_param_spec_get_name( pspec ) ); VIPS_DEBUG_MSG( "\trequired: %d\n", argument_class->flags & VIPS_ARGUMENT_REQUIRED ); VIPS_DEBUG_MSG( "\tconstruct: %d\n", argument_class->flags & VIPS_ARGUMENT_CONSTRUCT ); VIPS_DEBUG_MSG( "\tinput: %d\n", argument_class->flags & VIPS_ARGUMENT_INPUT ); VIPS_DEBUG_MSG( "\toutput: %d\n", argument_class->flags & VIPS_ARGUMENT_OUTPUT ); VIPS_DEBUG_MSG( "\tassigned: %d\n", argument_instance->assigned ); if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && !(argument_class->flags & VIPS_ARGUMENT_DEPRECATED) && (argument_class->flags & *iomask) && !argument_instance->assigned ) { vips_error( class->nickname, _( "parameter %s not set" ), g_param_spec_get_name( pspec ) ); *result = -1; } return( NULL ); } int vips_object_build( VipsObject *object ) { VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( object ); /* Input and output args must both be set. */ VipsArgumentFlags iomask = VIPS_ARGUMENT_INPUT | VIPS_ARGUMENT_OUTPUT; int result; #ifdef DEBUG printf( "vips_object_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ if( object_class->build( object ) ) return( -1 ); /* Check all required arguments have been supplied, don't stop on 1st * error. */ result = 0; (void) vips_argument_map( object, vips_object_check_required, &result, &iomask ); /* ... more checks go here. */ object->constructed = TRUE; return( result ); } /** * vips_object_summary_class: (skip) * */ void vips_object_summary_class( VipsObjectClass *class, VipsBuf *buf ) { class->summary_class( class, buf ); } /** * vips_object_summary: (skip) * */ void vips_object_summary( VipsObject *object, VipsBuf *buf ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); class->summary( object, buf ); } /** * vips_object_dump: (skip) * */ void vips_object_dump( VipsObject *object, VipsBuf *buf ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); class->dump( object, buf ); } void vips_object_print_summary_class( VipsObjectClass *class ) { char str[2048]; VipsBuf buf = VIPS_BUF_STATIC( str ); vips_object_summary_class( class, &buf ); printf( "%s\n", vips_buf_all( &buf ) ); } void vips_object_print_summary( VipsObject *object ) { char str[2048]; VipsBuf buf = VIPS_BUF_STATIC( str ); vips_object_summary( object, &buf ); printf( "%s\n", vips_buf_all( &buf ) ); } void vips_object_print_dump( VipsObject *object ) { char str[32768]; VipsBuf buf = VIPS_BUF_STATIC( str ); vips_object_dump( object, &buf ); printf( "%s\n", vips_buf_all( &buf ) ); } void vips_object_print_name( VipsObject *object ) { printf( "%s (%p)", G_OBJECT_TYPE_NAME( object ), object ); } gboolean vips_object_sanity( VipsObject *object ) { VipsObjectClass *class; char str[1000]; VipsBuf buf = VIPS_BUF_STATIC( str ); if( !object ) { printf( "vips_object_sanity: null object\n" ); return( FALSE ); } class = VIPS_OBJECT_GET_CLASS( object ); class->sanity( object, &buf ); if( !vips_buf_is_empty( &buf ) ) { printf( "sanity failure: " ); vips_object_print_name( object ); printf( " %s\n", vips_buf_all( &buf ) ); return( FALSE ); } return( TRUE ); } /* On a rewind, we dispose the old contents of the object and * reconstruct. This is used in things like im_pincheck() where a "w" * image has to be rewound and become a "p" image. * * Override in subclasses if you want to preserve some fields, see image.c. */ void vips_object_rewind( VipsObject *object ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); class->rewind( object ); } /* Extra stuff we track for properties to do our argument handling. */ /* Free a VipsArgumentInstance ... VipsArgumentClass can just be g_free()d. */ static void vips_argument_instance_free( VipsArgumentInstance *argument_instance ) { if( argument_instance->close_id ) { g_signal_handler_disconnect( argument_instance->object, argument_instance->close_id ); argument_instance->close_id = 0; } g_free( argument_instance ); } VipsArgument * vips__argument_table_lookup( VipsArgumentTable *table, GParamSpec *pspec ) { VipsArgument *argument; g_mutex_lock( vips__global_lock ); argument = (VipsArgument *) g_hash_table_lookup( table, pspec ); g_mutex_unlock( vips__global_lock ); return( argument ); } static void vips_argument_table_replace( VipsArgumentTable *table, VipsArgument *argument ) { g_hash_table_replace( table, argument->pspec, argument ); } static void vips_argument_table_destroy( VipsArgumentTable *table ) { g_hash_table_destroy( table ); } /** * vips_argument_map: (skip) * @object: object whose args should be enumerated * @fn: call this function for every argument * @a: client data * @b: client data * * Loop over the vips_arguments to an object. Stop when @fn returns non-%NULL * and return that value. * * Returns: %NULL if @fn returns %NULL for all arguments, otherwise the first * non-%NULL value from @fn. */ void * vips_argument_map( VipsObject *object, VipsArgumentMapFn fn, void *a, void *b ) { /* Make sure we can't go during the loop. This can happen if eg. we * flush an arg that refs us. */ g_object_ref( object ); VIPS_ARGUMENT_FOR_ALL( object, pspec, argument_class, argument_instance ) { void *result; /* argument_instance should not be NULL. */ g_assert( argument_instance ); if( (result = fn( object, pspec, argument_class, argument_instance, a, b )) ) { g_object_unref( object ); return( result ); } } VIPS_ARGUMENT_FOR_ALL_END g_object_unref( object ); return( NULL ); } /** * vips_argument_class_map: (skip) * * And loop over a class. Same as ^^, but with no VipsArgumentInstance. */ void * vips_argument_class_map( VipsObjectClass *object_class, VipsArgumentClassMapFn fn, void *a, void *b ) { GSList *p; for( p = object_class->argument_table_traverse; p; p = p->next ) { VipsArgumentClass *arg_class = (VipsArgumentClass *) p->data; VipsArgument *argument = (VipsArgument *) arg_class; GParamSpec *pspec = argument->pspec; void *result; if( (result = fn( object_class, pspec, arg_class, a, b )) ) return( result ); } return( NULL ); } /* Create a VipsArgumentInstance for each installed argument property. Ideally * we'd do this during _init() but g_object_class_find_property() does not seem * to work then :-( so we have to delay it until first access. See * vips__argument_get_instance(). */ static void vips_argument_init( VipsObject *object ) { if( !object->argument_table ) { #ifdef DEBUG printf( "vips_argument_init: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ object->argument_table = g_hash_table_new_full( g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) vips_argument_instance_free ); /* Make a VipsArgumentInstance for each installed argument * property. We can't use vips_argument_map() since that does * some sanity checks that won't pass until all arg instance * are built. */ VIPS_ARGUMENT_FOR_ALL( object, pspec, argument_class, argument_instance ) { #ifdef DEBUG printf( "vips_argument_init: " "adding instance argument for %s\n", g_param_spec_get_name( pspec ) ); #endif /*DEBUG*/ /* argument_instance should be NULL since we've not * set it yet. */ g_assert( argument_instance == NULL ); argument_instance = g_new( VipsArgumentInstance, 1 ); ((VipsArgument *) argument_instance)->pspec = pspec; argument_instance->argument_class = argument_class; argument_instance->object = object; /* SET_ALWAYS args default to assigned. */ argument_instance->assigned = argument_class->flags & VIPS_ARGUMENT_SET_ALWAYS; argument_instance->close_id = 0; vips_argument_table_replace( object->argument_table, (VipsArgument *) argument_instance ); } VIPS_ARGUMENT_FOR_ALL_END } } /** * vips__argument_get_instance: (skip) * * Convenience ... given the VipsArgumentClass, get the VipsArgumentInstance. */ VipsArgumentInstance * vips__argument_get_instance( VipsArgumentClass *argument_class, VipsObject *object ) { /* Make sure the instance args are built. */ vips_argument_init( object ); return( (VipsArgumentInstance *) vips__argument_table_lookup( object->argument_table, ((VipsArgument *) argument_class)->pspec ) ); } /** * vips_object_get_argument: (skip) * @object: the object to fetch the args from * @name: arg to fetch * @pspec: (transfer none): the pspec for this arg * @argument_class: (transfer none): the argument_class for this arg * @argument_instance: (transfer none): the argument_instance for this arg * * Look up the three things you need to work with a vips argument. * * Returns: 0 on success, or -1 on error. */ int vips_object_get_argument( VipsObject *object, const char *name, GParamSpec **pspec, VipsArgumentClass **argument_class, VipsArgumentInstance **argument_instance ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); if( !(*pspec = g_object_class_find_property( G_OBJECT_CLASS( class ), name )) ) { vips_error( class->nickname, _( "no property named `%s'" ), name ); return( -1 ); } if( !(*argument_class = (VipsArgumentClass *) vips__argument_table_lookup( class->argument_table, *pspec )) ) { vips_error( class->nickname, _( "no vips argument named `%s'" ), name ); return( -1 ); } if( argument_class && !(*argument_instance = vips__argument_get_instance( *argument_class, object )) ) { vips_error( class->nickname, _( "argument `%s' has no instance" ), name ); return( -1 ); } return( 0 ); } /** * vips_object_argument_isset: * @object: the object to fetch the args from * @name: arg to fetch * * Convenience: has an argument been assigned. Useful for bindings. * * Returns: %TRUE if the argument has been assigned. */ gboolean vips_object_argument_isset( VipsObject *object, const char *name ) { GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; if( vips_object_get_argument( object, name, &pspec, &argument_class, &argument_instance ) ) return( FALSE ); return( argument_instance->assigned ); } /** * vips_object_get_argument_flags: * @object: the object to fetch the args from * @name: arg to fetch * * Convenience: get the flags for an argument. Useful for bindings. * * Returns: The #VipsArgmentFlags for this argument. */ VipsArgumentFlags vips_object_get_argument_flags( VipsObject *object, const char *name ) { GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; if( vips_object_get_argument( object, name, &pspec, &argument_class, &argument_instance ) ) return( 0 ); return( argument_class->flags ); } /** * vips_object_get_argument_priority: * @object: the object to fetch the args from * @name: arg to fetch * * Convenience: get the priority for an argument. Useful for bindings. * * Returns: The priority of this argument. */ int vips_object_get_argument_priority( VipsObject *object, const char *name ) { GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; if( vips_object_get_argument( object, name, &pspec, &argument_class, &argument_instance ) ) return( 0 ); return( argument_class->priority ); } static void vips_object_clear_member( VipsObject *object, GParamSpec *pspec, GObject **member ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsArgumentClass *argument_class = (VipsArgumentClass *) vips__argument_table_lookup( class->argument_table, pspec ); VipsArgumentInstance *argument_instance = vips__argument_get_instance( argument_class, object ); if( *member ) { if( argument_class->flags & VIPS_ARGUMENT_INPUT ) { #ifdef DEBUG_REF printf( "vips_object_clear_member: vips object: " ); vips_object_print_name( object ); printf( " no longer refers to gobject %s (%p)\n", G_OBJECT_TYPE_NAME( *member ), *member ); printf( " count down to %d\n", G_OBJECT( *member )->ref_count - 1 ); #endif /*DEBUG_REF*/ /* We reffed the object. */ g_object_unref( *member ); } else if( argument_class->flags & VIPS_ARGUMENT_OUTPUT ) { #ifdef DEBUG_REF printf( "vips_object_clear_member: gobject %s (%p)\n", G_OBJECT_TYPE_NAME( *member ), *member ); printf( " no longer refers to vips object: " ); vips_object_print_name( object ); printf( " count down to %d\n", G_OBJECT( object )->ref_count - 1 ); #endif /*DEBUG_REF*/ /* The object reffed us. Stop listening link to the * object's "close" signal. We can come here from * object being closed, in which case the handler * will already have been disconnected for us. */ if( g_signal_handler_is_connected( object, argument_instance->close_id ) ) g_signal_handler_disconnect( object, argument_instance->close_id ); argument_instance->close_id = 0; g_object_unref( object ); } *member = NULL; } } /* Free any args which are holding resources. */ static void * vips_object_dispose_argument( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { g_assert( ((VipsArgument *) argument_class)->pspec == pspec ); g_assert( ((VipsArgument *) argument_instance)->pspec == pspec ); if( G_IS_PARAM_SPEC_OBJECT( pspec ) || G_IS_PARAM_SPEC_BOXED( pspec ) ) { #ifdef DEBUG printf( "vips_object_dispose_argument: " ); vips_object_print_name( object ); printf( ".%s\n", g_param_spec_get_name( pspec ) ); #endif /*DEBUG*/ g_object_set( object, g_param_spec_get_name( pspec ), NULL, NULL ); } return( NULL ); } /* Free all args on this object which may be holding resources. * * Note that this is not the same as vips_object_unref_outputs(). That * looks for output objects which may have been created during _build() which * hold refs to this object and unrefs them. * * This function looks for objects which this object holds refs to and which * may be holding sub-resources and zaps them. */ static void vips_argument_dispose_all( VipsObject *object ) { #ifdef DEBUG printf( "vips_argument_dispose_all: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ vips_argument_map( object, vips_object_dispose_argument, NULL, NULL ); } /* Free any args which are holding memory. */ static void * vips_object_free_argument( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { g_assert( ((VipsArgument *) argument_class)->pspec == pspec ); g_assert( ((VipsArgument *) argument_instance)->pspec == pspec ); if( G_IS_PARAM_SPEC_STRING( pspec ) ) { #ifdef DEBUG printf( "vips_object_free_argument: " ); vips_object_print_name( object ); printf( ".%s\n", g_param_spec_get_name( pspec ) ); #endif /*DEBUG*/ g_object_set( object, g_param_spec_get_name( pspec ), NULL, NULL ); } return( NULL ); } /* Free args which hold memory. Things like strings need to be freed right at * the end in case anyone is still using them. */ static void vips_argument_free_all( VipsObject *object ) { #ifdef DEBUG printf( "vips_argument_free_all: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ vips_argument_map( object, vips_object_free_argument, NULL, NULL ); } static void vips_object_dispose( GObject *gobject ) { VipsObject *object = VIPS_OBJECT( gobject ); #ifdef DEBUG printf( "vips_object_dispose: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ /* Our subclasses should have already called this. Run it again, just * in case. */ #ifdef DEBUG if( !object->preclose ) printf( "vips_object_dispose: pre-close missing!\n" ); #endif /*DEBUG*/ vips_object_preclose( object ); /* Clear all our arguments: they may be holding resources we should * drop. */ vips_argument_dispose_all( object ); vips_object_close( object ); vips_object_postclose( object ); vips_argument_free_all( object ); VIPS_FREEF( vips_argument_table_destroy, object->argument_table ); G_OBJECT_CLASS( vips_object_parent_class )->dispose( gobject ); } static void vips_object_finalize( GObject *gobject ) { VipsObject *object = VIPS_OBJECT( gobject ); #ifdef DEBUG printf( "vips_object_finalize: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ /* I'd like to have post-close in here, but you can't emit signals * from finalize, sadly. */ g_mutex_lock( vips__object_all_lock ); g_hash_table_remove( vips__object_all, object ); g_mutex_unlock( vips__object_all_lock ); G_OBJECT_CLASS( vips_object_parent_class )->finalize( gobject ); } static void vips_object_arg_close( GObject *argument, VipsArgumentInstance *argument_instance ) { VipsObject *object = argument_instance->object; GParamSpec *pspec = ((VipsArgument *) argument_instance)->pspec; /* Argument had reffed us ... now it's being closed, so we NULL out * the pointer to unref. */ g_object_set( object, g_param_spec_get_name( pspec ), NULL, NULL ); } /* Set a member to an object. Handle the ref counts and signal * connect/disconnect. */ void vips__object_set_member( VipsObject *object, GParamSpec *pspec, GObject **member, GObject *argument ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsArgumentClass *argument_class = (VipsArgumentClass *) vips__argument_table_lookup( class->argument_table, pspec ); VipsArgumentInstance *argument_instance = vips__argument_get_instance( argument_class, object ); g_assert( argument_instance ); vips_object_clear_member( object, pspec, member ); g_assert( !*member ); *member = argument; if( *member ) { if( argument_class->flags & VIPS_ARGUMENT_INPUT ) { #ifdef DEBUG_REF printf( "vips_object_set_member: vips object: " ); vips_object_print_name( object ); printf( " refers to gobject %s (%p)\n", G_OBJECT_TYPE_NAME( *member ), *member ); printf( " count up to %d\n", G_OBJECT( *member )->ref_count ); #endif /*DEBUG_REF*/ /* Ref the argument. */ g_object_ref( *member ); } else if( argument_class->flags & VIPS_ARGUMENT_OUTPUT ) { #ifdef DEBUG_REF printf( "vips_object_set_member: gobject %s (%p)\n", G_OBJECT_TYPE_NAME( *member ), *member ); printf( " refers to vips object: " ); vips_object_print_name( object ); printf( " count up to %d\n", G_OBJECT (object)->ref_count ); #endif /*DEBUG_REF*/ /* The argument reffs us. */ g_object_ref( object ); /* FIXME ... could use a NULLing weakref */ g_assert( !argument_instance->close_id ); argument_instance->close_id = g_signal_connect( *member, "close", G_CALLBACK( vips_object_arg_close ), argument_instance ); } } } /* Is a value NULL? We allow multiple sets of NULL so props can be cleared. * The pspec gives the value type, for consistency with the way value types * are detected in set and get. */ gboolean vips_value_is_null( GParamSpec *pspec, const GValue *value ) { if( G_IS_PARAM_SPEC_STRING( pspec ) && !g_value_get_string( value ) ) return( TRUE ); if( G_IS_PARAM_SPEC_OBJECT( pspec ) && !g_value_get_object( value ) ) return( TRUE ); if( G_IS_PARAM_SPEC_POINTER( pspec ) && !g_value_get_pointer( value ) ) return( TRUE ); if( G_IS_PARAM_SPEC_BOXED( pspec ) && !g_value_get_boxed( value ) ) return( TRUE ); return( FALSE ); } /* Also used by subclasses, so not static. */ void vips_object_set_property( GObject *gobject, guint property_id, const GValue *value, GParamSpec *pspec ) { VipsObject *object = VIPS_OBJECT( gobject ); VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( gobject ); VipsArgumentClass *argument_class = (VipsArgumentClass *) vips__argument_table_lookup( class->argument_table, pspec ); VipsArgumentInstance *argument_instance = vips__argument_get_instance( argument_class, object ); g_assert( argument_instance ); if( !argument_class ) { G_OBJECT_WARN_INVALID_PROPERTY_ID( gobject, property_id, pspec ); return; } #ifdef DEBUG printf( "vips_object_set_property: " ); vips_object_print_name( object ); printf( ".%s\n", g_param_spec_get_name( pspec ) ); /* This can crash horribly with some values, have it as a separate * chunk so we can easily commenmt it out. */ { char *str_value; str_value = g_strdup_value_contents( value ); printf( "\t%s\n", str_value ); g_free( str_value ); } #endif /*DEBUG*/ g_assert( ((VipsArgument *) argument_class)->pspec == pspec ); g_assert( ((VipsArgument *) argument_instance)->pspec == pspec ); /* If this is a construct-only argument, we can only set before we've * built. */ if( argument_class->flags & VIPS_ARGUMENT_CONSTRUCT && object->constructed && !vips_value_is_null( pspec, value ) ) { g_warning( "%s: %s can't assign '%s' after construct", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_param_spec_get_name( pspec ) ); return; } /* If this is a set-once argument, check we've not set it before. */ if( argument_class->flags & VIPS_ARGUMENT_SET_ONCE && argument_instance->assigned && !vips_value_is_null( pspec, value ) ) { g_warning( "%s: %s can only assign '%s' once", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_param_spec_get_name( pspec ) ); return; } /* We can't use a switch since some param specs don't have fundamental * types and are hence not compile-time constants, argh. */ if( G_IS_PARAM_SPEC_STRING( pspec ) ) { char **member = &G_STRUCT_MEMBER( char *, object, argument_class->offset ); if( *member ) g_free( *member ); *member = g_value_dup_string( value ); } else if( G_IS_PARAM_SPEC_OBJECT( pspec ) ) { GObject **member = &G_STRUCT_MEMBER( GObject *, object, argument_class->offset ); vips__object_set_member( object, pspec, member, g_value_get_object( value ) ); } else if( G_IS_PARAM_SPEC_INT( pspec ) ) { int *member = &G_STRUCT_MEMBER( int, object, argument_class->offset ); *member = g_value_get_int( value ); } else if( G_IS_PARAM_SPEC_UINT64( pspec ) ) { guint64 *member = &G_STRUCT_MEMBER( guint64, object, argument_class->offset ); *member = g_value_get_uint64( value ); } else if( G_IS_PARAM_SPEC_BOOLEAN( pspec ) ) { gboolean *member = &G_STRUCT_MEMBER( gboolean, object, argument_class->offset ); *member = g_value_get_boolean( value ); } else if( G_IS_PARAM_SPEC_ENUM( pspec ) ) { int *member = &G_STRUCT_MEMBER( int, object, argument_class->offset ); *member = g_value_get_enum( value ); } else if( G_IS_PARAM_SPEC_FLAGS( pspec ) ) { int *member = &G_STRUCT_MEMBER( int, object, argument_class->offset ); *member = g_value_get_flags( value ); } else if( G_IS_PARAM_SPEC_POINTER( pspec ) ) { gpointer *member = &G_STRUCT_MEMBER( gpointer, object, argument_class->offset ); *member = g_value_get_pointer( value ); } else if( G_IS_PARAM_SPEC_DOUBLE( pspec ) ) { double *member = &G_STRUCT_MEMBER( double, object, argument_class->offset ); *member = g_value_get_double( value ); } else if( G_IS_PARAM_SPEC_BOXED( pspec ) ) { gpointer *member = &G_STRUCT_MEMBER( gpointer, object, argument_class->offset ); if( *member ) { g_boxed_free( G_PARAM_SPEC_VALUE_TYPE( pspec ), *member ); *member = NULL; } /* Copy the boxed into our pointer (will use eg. * vips__object_vector_dup()). */ *member = g_value_dup_boxed( value ); } else { g_warning( "%s: %s.%s unimplemented property type %s", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_param_spec_get_name( pspec ), g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ) ); } /* Note that it's now been set. */ argument_instance->assigned = TRUE; } /* Also used by subclasses, so not static. */ void vips_object_get_property( GObject *gobject, guint property_id, GValue *value, GParamSpec *pspec ) { VipsObject *object = VIPS_OBJECT( gobject ); VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( gobject ); VipsArgumentClass *argument_class = (VipsArgumentClass *) vips__argument_table_lookup( class->argument_table, pspec ); VipsArgumentInstance *argument_instance = vips__argument_get_instance( argument_class, object ); if( !argument_class ) { G_OBJECT_WARN_INVALID_PROPERTY_ID( gobject, property_id, pspec ); return; } g_assert( ((VipsArgument *) argument_class)->pspec == pspec ); if( !argument_instance->assigned ) { g_warning( "%s: %s.%s attempt to read unset %s property", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_param_spec_get_name( pspec ), g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ) ); return; } if( G_IS_PARAM_SPEC_STRING( pspec ) ) { char *member = G_STRUCT_MEMBER( char *, object, argument_class->offset ); g_value_set_string( value, member ); } else if( G_IS_PARAM_SPEC_OBJECT( pspec ) ) { GObject **member = &G_STRUCT_MEMBER( GObject *, object, argument_class->offset ); g_value_set_object( value, *member ); } else if( G_IS_PARAM_SPEC_INT( pspec ) ) { int *member = &G_STRUCT_MEMBER( int, object, argument_class->offset ); g_value_set_int( value, *member ); } else if( G_IS_PARAM_SPEC_UINT64( pspec ) ) { guint64 *member = &G_STRUCT_MEMBER( guint64, object, argument_class->offset ); g_value_set_uint64( value, *member ); } else if( G_IS_PARAM_SPEC_BOOLEAN( pspec ) ) { gboolean *member = &G_STRUCT_MEMBER( gboolean, object, argument_class->offset ); g_value_set_boolean( value, *member ); } else if( G_IS_PARAM_SPEC_ENUM( pspec ) ) { int *member = &G_STRUCT_MEMBER( int, object, argument_class->offset ); g_value_set_enum( value, *member ); } else if( G_IS_PARAM_SPEC_FLAGS( pspec ) ) { int *member = &G_STRUCT_MEMBER( int, object, argument_class->offset ); g_value_set_flags( value, *member ); } else if( G_IS_PARAM_SPEC_POINTER( pspec ) ) { gpointer *member = &G_STRUCT_MEMBER( gpointer, object, argument_class->offset ); g_value_set_pointer( value, *member ); } else if( G_IS_PARAM_SPEC_DOUBLE( pspec ) ) { double *member = &G_STRUCT_MEMBER( double, object, argument_class->offset ); g_value_set_double( value, *member ); } else if( G_IS_PARAM_SPEC_BOXED( pspec ) ) { gpointer *member = &G_STRUCT_MEMBER( gpointer, object, argument_class->offset ); /* Copy the boxed into our pointer (will use eg. * vips__object_vector_dup ()). */ g_value_set_boxed( value, *member ); } else { g_warning( "%s: %s.%s unimplemented property type %s", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_param_spec_get_name( pspec ), g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ) ); } } static int vips_object_real_build( VipsObject *object ) { VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( object ); /* Only test input args, output ones can be set by our subclasses as * they build. See vips_object_build() above. */ VipsArgumentFlags iomask = VIPS_ARGUMENT_INPUT; int result; #ifdef DEBUG printf( "vips_object_real_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_assert( !object->constructed ); /* It'd be nice if this just copied a pointer rather than did a * strdup(). Set these here rather than in object_init, so that the * class gets a chance to set them. */ g_object_set( object, "nickname", object_class->nickname, "description", object_class->description, NULL ); /* Check all required input arguments have been supplied, don't stop * on 1st error. */ result = 0; (void) vips_argument_map( object, vips_object_check_required, &result, &iomask ); return( result ); } static void vips_object_real_summary_class( VipsObjectClass *class, VipsBuf *buf ) { vips_buf_appendf( buf, "%s", G_OBJECT_CLASS_NAME( class ) ); if( class->nickname ) vips_buf_appendf( buf, " (%s)", class->nickname ); if( class->description ) vips_buf_appendf( buf, ", %s", class->description ); } static void vips_object_real_summary( VipsObject *object, VipsBuf *buf ) { } static void vips_object_real_dump( VipsObject *object, VipsBuf *buf ) { vips_buf_appendf( buf, " %s (%p)", G_OBJECT_TYPE_NAME( object ), object ); if( object->local_memory ) vips_buf_appendf( buf, " %zd bytes", object->local_memory ); } static void vips_object_real_sanity( VipsObject *object, VipsBuf *buf ) { } static void vips_object_real_rewind( VipsObject *object ) { #ifdef DEBUG printf( "vips_object_real_rewind\n" ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_object_run_dispose( G_OBJECT( object ) ); object->constructed = FALSE; object->preclose = FALSE; object->close = FALSE; object->postclose = FALSE; } static VipsObject * vips_object_real_new_from_string( const char *string ) { GType type; vips_check_init(); /* The main arg selects the subclass. */ if( !(type = vips_type_find( NULL, string )) ) { vips_error( "VipsObject", _( "class \"%s\" not found" ), string ); return( NULL ); } return( VIPS_OBJECT( g_object_new( type, NULL ) ) ); } static void vips_object_real_to_string( VipsObject *object, VipsBuf *buf ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); /* Just "bicubic" or whatever. */ vips_buf_appends( buf, class->nickname ); } static void transform_string_double( const GValue *src_value, GValue *dest_value ) { g_value_set_double( dest_value, g_ascii_strtod( g_value_get_string( src_value ), NULL ) ); } static void vips_object_class_init( VipsObjectClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); if( !vips__object_all ) { vips__object_all = g_hash_table_new( g_direct_hash, g_direct_equal ); vips__object_all_lock = vips_g_mutex_new(); } gobject_class->dispose = vips_object_dispose; gobject_class->finalize = vips_object_finalize; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; class->build = vips_object_real_build; class->summary_class = vips_object_real_summary_class; class->summary = vips_object_real_summary; class->dump = vips_object_real_dump; class->sanity = vips_object_real_sanity; class->rewind = vips_object_real_rewind; class->new_from_string = vips_object_real_new_from_string; class->to_string = vips_object_real_to_string; class->nickname = "object"; class->description = _( "base class" ); /* Table of VipsArgumentClass ... we can just g_free() them. */ class->argument_table = g_hash_table_new_full( g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) g_free ); class->argument_table_traverse = NULL; /* For setting double arguments from the command-line. */ g_value_register_transform_func( G_TYPE_STRING, G_TYPE_DOUBLE, transform_string_double ); VIPS_ARG_STRING( class, "nickname", 1, _( "Nickname" ), _( "Class nickname" ), VIPS_ARGUMENT_SET_ONCE, G_STRUCT_OFFSET( VipsObject, nickname ), "" ); VIPS_ARG_STRING( class, "description", 2, _( "Description" ), _( "Class description" ), VIPS_ARGUMENT_SET_ONCE, G_STRUCT_OFFSET( VipsObject, description ), "" ); vips_object_signals[SIG_PRECLOSE] = g_signal_new( "preclose", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET( VipsObjectClass, preclose ), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0 ); vips_object_signals[SIG_CLOSE] = g_signal_new( "close", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET( VipsObjectClass, close ), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0 ); vips_object_signals[SIG_POSTCLOSE] = g_signal_new( "postclose", G_TYPE_FROM_CLASS( class ), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET( VipsObjectClass, postclose ), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0 ); } static void vips_object_init( VipsObject *object ) { #ifdef DEBUG printf( "vips_object_init: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_mutex_lock( vips__object_all_lock ); g_hash_table_insert( vips__object_all, object, object ); g_mutex_unlock( vips__object_all_lock ); } static gint traverse_sort( gconstpointer a, gconstpointer b ) { VipsArgumentClass *class1 = (VipsArgumentClass *) a; VipsArgumentClass *class2 = (VipsArgumentClass *) b; return( class1->priority - class2->priority ); } /* Add a vipsargument ... automate some stuff with this. */ void vips_object_class_install_argument( VipsObjectClass *object_class, GParamSpec *pspec, VipsArgumentFlags flags, int priority, guint offset ) { VipsArgumentClass *argument_class = g_new( VipsArgumentClass, 1 ); GSList *argument_table_traverse; #ifdef DEBUG printf( "vips_object_class_install_argument: %p %s %s\n", object_class, g_type_name( G_TYPE_FROM_CLASS( object_class ) ), g_param_spec_get_name( pspec ) ); #endif /*DEBUG*/ /* object_class->argument* is shared, so we must lock. */ g_mutex_lock( vips__global_lock ); /* Must be a new one. */ g_assert( !g_hash_table_lookup( object_class->argument_table, pspec ) ); /* Mustn't have INPUT and OUTPUT both set. */ g_assert( !( (flags & VIPS_ARGUMENT_INPUT) && (flags & VIPS_ARGUMENT_OUTPUT)) ); ((VipsArgument *) argument_class)->pspec = pspec; argument_class->object_class = object_class; argument_class->flags = flags; argument_class->priority = priority; argument_class->offset = offset; vips_argument_table_replace( object_class->argument_table, (VipsArgument *) argument_class ); /* If this is the first argument for a new subclass, we need to clone * the traverse list we inherit. */ if( object_class->argument_table_traverse_gtype != G_TYPE_FROM_CLASS( object_class ) ) { #ifdef DEBUG printf( "vips_object_class_install_argument: " "cloning traverse\n" ); #endif /*DEBUG*/ object_class->argument_table_traverse = g_slist_copy( object_class->argument_table_traverse ); object_class->argument_table_traverse_gtype = G_TYPE_FROM_CLASS( object_class ); } /* We read argument_table_traverse without a lock (eg. see * vips_argument_map()), so we must be very careful updating it. */ argument_table_traverse = g_slist_copy( object_class->argument_table_traverse ); argument_table_traverse = g_slist_prepend( argument_table_traverse, argument_class ); argument_table_traverse = g_slist_sort( argument_table_traverse, traverse_sort ); VIPS_SWAP( GSList *, argument_table_traverse, object_class->argument_table_traverse ); g_slist_free( argument_table_traverse ); #ifdef DEBUG { GSList *p; printf( "%d items on traverse %p\n", g_slist_length( object_class->argument_table_traverse ), &object_class->argument_table_traverse ); for( p = object_class->argument_table_traverse; p; p = p->next ) { VipsArgumentClass *argument_class = (VipsArgumentClass *) p->data; printf( "\t%p %s\n", argument_class, g_param_spec_get_name( ((VipsArgument *) argument_class)->pspec ) ); } } #endif /*DEBUG*/ g_mutex_unlock( vips__global_lock ); } static void vips_object_no_value( VipsObject *object, const char *name ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; if( vips_object_get_argument( object, name, &pspec, &argument_class, &argument_instance ) ) g_assert( 0 ); if( strcmp( name, g_param_spec_get_name( pspec ) ) == 0 ) vips_error( class->nickname, _( "no value supplied for argument '%s'" ), name ); else vips_error( class->nickname, _( "no value supplied for argument '%s' ('%s')" ), name, g_param_spec_get_name( pspec ) ); } /* Set a named arg from a string. */ int vips_object_set_argument_from_string( VipsObject *object, const char *name, const char *value ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; VipsObjectClass *oclass; GType otype; GValue gvalue = { 0 }; VIPS_DEBUG_MSG( "vips_object_set_argument_from_string: %s = %s\n", name, value ); if( vips_object_get_argument( object, name, &pspec, &argument_class, &argument_instance ) ) return( -1 ); otype = G_PARAM_SPEC_VALUE_TYPE( pspec ); g_assert( argument_class->flags & VIPS_ARGUMENT_INPUT ); if( g_type_is_a( otype, VIPS_TYPE_IMAGE ) ) { VipsImage *out; VipsOperationFlags flags; VipsAccess access; flags = 0; if( VIPS_IS_OPERATION( object ) ) flags = vips_operation_get_flags( VIPS_OPERATION( object ) ); if( !value ) { vips_object_no_value( object, name ); return( -1 ); } /* Read the filename. vips_foreign_load_options() * handles embedded options. */ if( flags & VIPS_OPERATION_SEQUENTIAL_UNBUFFERED ) access = VIPS_ACCESS_SEQUENTIAL_UNBUFFERED; else if( flags & VIPS_OPERATION_SEQUENTIAL ) access = VIPS_ACCESS_SEQUENTIAL; else access = VIPS_ACCESS_RANDOM; if( vips_foreign_load_options( value, &out, "access", access, NULL ) ) return( -1 ); g_value_init( &gvalue, VIPS_TYPE_IMAGE ); g_value_set_object( &gvalue, out ); /* Setting gvalue will have upped @out's count again, * go back to 1 so that gvalue has the only ref. */ g_object_unref( out ); } else if( g_type_is_a( otype, VIPS_TYPE_OBJECT ) && (oclass = g_type_class_ref( otype )) ) { VipsObject *new_object; if( !value ) { vips_object_no_value( object, name ); return( -1 ); } if( !(new_object = vips_object_new_from_string( oclass, value )) ) return( -1 ); /* Not necessarily a VipsOperation subclass so we don't use * the cache. We could have a separate case for this. */ if( vips_object_build( new_object ) ) { g_object_unref( new_object ); return( -1 ); } g_value_init( &gvalue, G_TYPE_OBJECT ); g_value_set_object( &gvalue, new_object ); /* The GValue now has a ref, we can drop ours. */ g_object_unref( new_object ); } else if( G_IS_PARAM_SPEC_BOOLEAN( pspec ) ) { gboolean b; b = TRUE; if( value && (strcasecmp( value, "false" ) == 0 || strcasecmp( value, "no" ) == 0 || strcmp( value, "0" ) == 0) ) b = FALSE; g_value_init( &gvalue, G_TYPE_BOOLEAN ); g_value_set_boolean( &gvalue, b ); } else if( G_IS_PARAM_SPEC_INT( pspec ) ) { int i; if( !value ) { vips_object_no_value( object, name ); return( -1 ); } if( sscanf( value, "%d", &i ) != 1 ) { vips_error( class->nickname, _( "'%s' is not an integer" ), value ); return( -1 ); } g_value_init( &gvalue, G_TYPE_INT ); g_value_set_int( &gvalue, i ); } else if( G_IS_PARAM_SPEC_UINT64( pspec ) ) { /* Not allways the same as guint64 :-( argh. */ long long l; if( !value ) { vips_object_no_value( object, name ); return( -1 ); } if( sscanf( value, "%Ld", &l ) != 1 ) { vips_error( class->nickname, _( "'%s' is not an integer" ), value ); return( -1 ); } g_value_init( &gvalue, G_TYPE_UINT64 ); g_value_set_uint64( &gvalue, l ); } else if( G_IS_PARAM_SPEC_DOUBLE( pspec ) ) { double d; if( !value ) { vips_object_no_value( object, name ); return( -1 ); } if( sscanf( value, "%lg", &d ) != 1 ) { vips_error( class->nickname, _( "'%s' is not a double" ), value ); return( -1 ); } g_value_init( &gvalue, G_TYPE_DOUBLE ); g_value_set_double( &gvalue, d ); } else if( G_IS_PARAM_SPEC_ENUM( pspec ) ) { int i; if( !value ) { vips_object_no_value( object, name ); return( -1 ); } if( (i = vips_enum_from_nick( class->nickname, otype, value )) < 0 ) return( -1 ); g_value_init( &gvalue, otype ); g_value_set_enum( &gvalue, i ); } else if( G_IS_PARAM_SPEC_FLAGS( pspec ) ) { /* Hard to set from a symbolic name. Just take an int. */ int i; if( !value ) { vips_object_no_value( object, name ); return( -1 ); } if( sscanf( value, "%d", &i ) != 1 ) { vips_error( class->nickname, _( "'%s' is not an integer" ), value ); return( -1 ); } g_value_init( &gvalue, otype ); g_value_set_flags( &gvalue, i ); } else { if( !value ) { vips_object_no_value( object, name ); return( -1 ); } g_value_init( &gvalue, G_TYPE_STRING ); g_value_set_string( &gvalue, value ); } g_object_set_property( G_OBJECT( object ), name, &gvalue ); g_value_unset( &gvalue ); return( 0 ); } /* Does an vipsargument need an argument to write to? For example, an image * output needs a filename, a double output just prints. */ gboolean vips_object_argument_needsstring( VipsObject *object, const char *name ) { GParamSpec *pspec; GType otype; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; VipsObjectClass *oclass; #ifdef DEBUG printf( "vips_object_argument_needsstring: %s\n", name ); #endif /*DEBUG*/ if( vips_object_get_argument( object, name, &pspec, &argument_class, &argument_instance ) ) return( -1 ); if( G_IS_PARAM_SPEC_BOOLEAN( pspec ) ) /* Bools, input or output, don't need args. */ return( FALSE ); else if( argument_class->flags & VIPS_ARGUMENT_INPUT ) /* All other inputs need something. */ return( TRUE ); if( (otype = G_PARAM_SPEC_VALUE_TYPE( pspec )) && g_type_is_a( otype, VIPS_TYPE_OBJECT ) && (oclass = g_type_class_ref( otype )) ) /* For now, only vipsobject subclasses can ask for args. */ return( oclass->output_needs_arg ); else return( FALSE ); } static void vips_object_print_arg( VipsObject *object, GParamSpec *pspec, VipsBuf *buf ) { GType type = G_PARAM_SPEC_VALUE_TYPE( pspec ); const char *name = g_param_spec_get_name( pspec ); GValue value = { 0, }; char *str_value; g_value_init( &value, type ); g_object_get_property( G_OBJECT( object ), name, &value ); str_value = g_strdup_value_contents( &value ); vips_buf_appends( buf, str_value ); g_free( str_value ); g_value_unset( &value ); } /* Write a named arg to the string. If the arg does not need a string (see * above), arg will be NULL. */ int vips_object_get_argument_to_string( VipsObject *object, const char *name, const char *arg ) { GParamSpec *pspec; GType otype; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; VipsObjectClass *oclass; #ifdef DEBUG printf( "vips_object_get_argument_to_string: %s -> %s\n", name, arg ); #endif /*DEBUG*/ if( vips_object_get_argument( object, name, &pspec, &argument_class, &argument_instance ) ) return( -1 ); otype = G_PARAM_SPEC_VALUE_TYPE( pspec ); g_assert( argument_class->flags & VIPS_ARGUMENT_OUTPUT ); if( g_type_is_a( otype, VIPS_TYPE_IMAGE ) ) { VipsImage *in; /* Pull out the image and write it. * vips_foreign_save_options() handles embedded options. */ g_object_get( object, name, &in, NULL ); if( vips_foreign_save_options( in, arg, NULL ) ) { g_object_unref( in ); return( -1 ); } g_object_unref( in ); } else if( g_type_is_a( otype, VIPS_TYPE_OBJECT ) && (oclass = g_type_class_ref( otype )) && oclass->output_to_arg ) { VipsObject *value; g_object_get( object, name, &value, NULL ); if( oclass->output_to_arg( value, arg ) ) { g_object_unref( value ); return( -1 ); } g_object_unref( value ); } else { char str[1000]; VipsBuf buf = VIPS_BUF_STATIC( str ); vips_object_print_arg( object, pspec, &buf ); printf( "%s\n", vips_buf_all( &buf ) ); } return( 0 ); } static void * vips_argument_is_required( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && (argument_class->flags & VIPS_ARGUMENT_INPUT) && !argument_instance->assigned ) return( pspec ); return( NULL ); } /* Find the first unassigned required input arg. */ static GParamSpec * vips_object_find_required( VipsObject *object ) { return( (GParamSpec *) vips_argument_map( object, vips_argument_is_required, NULL, NULL ) ); } /** * vips_object_new: (skip) * @type: object to create * @set: set arguments with this * @a: client data * @b: client data * * g_object_new() the object, set any arguments with @set, call * vips_object_build() and return the complete object. * * Returns: the new object */ VipsObject * vips_object_new( GType type, VipsObjectSetArguments set, void *a, void *b ) { VipsObject *object; vips_check_init(); object = VIPS_OBJECT( g_object_new( type, NULL ) ); if( set && set( object, a, b ) ) { g_object_unref( object ); return( NULL ); } if( vips_object_build( object ) ) { g_object_unref( object ); return( NULL ); } return( object ); } /** * vips_object_set_valist: * @object: object to set arguments on * @ap: %NULL-terminated list of argument/value pairs * * See vips_object_set(). * * Returns: 0 on success, -1 on error */ int vips_object_set_valist( VipsObject *object, va_list ap ) { char *name; VIPS_DEBUG_MSG( "vips_object_set_valist:\n" ); for( name = va_arg( ap, char * ); name; name = va_arg( ap, char * ) ) { GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; VIPS_DEBUG_MSG( "\tname = '%s' (%p)\n", name, name ); if( vips_object_get_argument( VIPS_OBJECT( object ), name, &pspec, &argument_class, &argument_instance ) ) return( -1 ); VIPS_ARGUMENT_COLLECT_SET( pspec, argument_class, ap ); g_object_set_property( G_OBJECT( object ), name, &value ); VIPS_ARGUMENT_COLLECT_GET( pspec, argument_class, ap ); VIPS_ARGUMENT_COLLECT_END } return( 0 ); } /** * vips_object_set: * @object: object to set arguments on * @...: %NULL-terminated list of argument/value pairs * * Set a list of vips object arguments. For example: * * |[ * vips_object_set (operation, * "input", in, * "output", &out, * NULL); * ]| * * Input arguments are given in-line, output arguments are given as pointers * to where the output value should be written. * * See also: vips_object_set_valist(). * * Returns: 0 on success, -1 on error */ int vips_object_set( VipsObject *object, ... ) { va_list ap; int result; va_start( ap, object ); result = vips_object_set_valist( object, ap ); va_end( ap ); return( result ); } /* Set object args from a string. @p should be the initial left bracket and * there should be no tokens after the matching right bracket. */ static int vips_object_set_args( VipsObject *object, const char *p ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); VipsToken token; char string[VIPS_PATH_MAX]; char string2[VIPS_PATH_MAX]; GParamSpec *pspec; VipsArgumentClass *argument_class; VipsArgumentInstance *argument_instance; if( !(p = vips__token_need( p, VIPS_TOKEN_LEFT, string, VIPS_PATH_MAX )) ) return( -1 ); do { if( !(p = vips__token_need( p, VIPS_TOKEN_STRING, string, VIPS_PATH_MAX )) ) return( -1 ); /* We have to look for a '=', ')' or a ',' to see if string is * a param name or a value. */ if( !(p = vips__token_must( p, &token, string2, VIPS_PATH_MAX )) ) return( -1 ); if( token == VIPS_TOKEN_EQUALS ) { if( !(p = vips__token_need( p, VIPS_TOKEN_STRING, string2, VIPS_PATH_MAX )) ) return( -1 ); if( vips_object_set_argument_from_string( object, string, string2 ) ) return( -1 ); if( !(p = vips__token_must( p, &token, string2, VIPS_PATH_MAX )) ) return( -1 ); } else if( g_object_class_find_property( G_OBJECT_GET_CLASS( object ), string ) && !vips_object_get_argument( object, string, &pspec, &argument_class, &argument_instance ) && (argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) && (argument_class->flags & VIPS_ARGUMENT_INPUT) && G_IS_PARAM_SPEC_BOOLEAN( pspec ) ) { /* The string is the name of an optional * input boolean ... set it! */ if( !argument_instance->assigned ) g_object_set( object, string, TRUE, NULL ); } else if( (pspec = vips_object_find_required( object )) ) { if( vips_object_set_argument_from_string( object, g_param_spec_get_name( pspec ), string ) ) return( -1 ); } else { vips_error( class->nickname, _( "unable to set '%s'" ), string ); return( -1 ); } /* Now must be a , or a ). */ if( token != VIPS_TOKEN_RIGHT && token != VIPS_TOKEN_COMMA ) { vips_error( class->nickname, "%s", _( "not , or ) after parameter" ) ); return( -1 ); } } while( token != VIPS_TOKEN_RIGHT ); if( (p = vips__token_get( p, &token, string, VIPS_PATH_MAX )) ) { vips_error( class->nickname, "%s", _( "extra tokens after ')'" ) ); return( -1 ); } return( 0 ); } VipsObject * vips_object_new_from_string( VipsObjectClass *object_class, const char *p ) { const char *q; char str[VIPS_PATH_MAX]; VipsObject *object; g_assert( object_class ); g_assert( object_class->new_from_string ); /* Find the start of the optional args on the end of the string, take * everything before that as the principal arg for the constructor. */ if( (q = vips__find_rightmost_brackets( p )) ) vips_strncpy( str, p, VIPS_MIN( VIPS_PATH_MAX, q - p + 1 ) ); else vips_strncpy( str, p, VIPS_PATH_MAX ); if( !(object = object_class->new_from_string( str )) ) return( NULL ); /* More tokens there? Set any other args. */ if( q && vips_object_set_args( object, q ) ) { g_object_unref( object ); return( NULL ); } return( object ); } static void * vips_object_to_string_required( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsBuf *buf = (VipsBuf *) a; gboolean *first = (gboolean *) b; if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) ) { if( *first ) { vips_buf_appends( buf, "(" ); *first = FALSE; } else { vips_buf_appends( buf, "," ); } vips_object_print_arg( object, pspec, buf ); } return( NULL ); } static void * vips_object_to_string_optional( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsBuf *buf = (VipsBuf *) a; gboolean *first = (gboolean *) b; if( !(argument_class->flags & VIPS_ARGUMENT_REQUIRED) && argument_instance->assigned ) { if( *first ) { vips_buf_appends( buf, "(" ); *first = FALSE; } else { vips_buf_appends( buf, "," ); } vips_buf_appends( buf, g_param_spec_get_name( pspec ) ); vips_buf_appends( buf, "=" ); vips_object_print_arg( object, pspec, buf ); } return( NULL ); } /** * vips_object_to_string: (skip) * @object: object to stringify * @buf: write string here * * The inverse of vips_object_new_from_string(): turn an object into eg. * "VipsInterpolateSnohalo1(blur=.333333)". */ void vips_object_to_string( VipsObject *object, VipsBuf *buf ) { VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( object ); gboolean first; g_assert( object_class->to_string ); /* Nicknames are not guaranteed to be unique, so use the full type * name. */ object_class->to_string( object, buf ); first = TRUE; (void) vips_argument_map( object, vips_object_to_string_required, buf, &first ); (void) vips_argument_map( object, vips_object_to_string_optional, buf, &first ); if( !first ) vips_buf_appends( buf, ")" ); } typedef struct { VipsSListMap2Fn fn; void *a; void *b; void *result; } VipsObjectMapArgs; static void vips_object_map_sub( VipsObject *key, VipsObject *value, VipsObjectMapArgs *args ) { if( !args->result ) args->result = args->fn( key, args->a, args->b ); } /** * vips_object_map: (skip) * @fn: function to call for all objects * @a: client data * @b: client data * * Call a function for all alive objects. * Stop when @fn returns non-%NULL and return that value. * * Returns: %NULL if @fn returns %NULL for all arguments, otherwise the first * non-%NULL value from @fn. */ void * vips_object_map( VipsSListMap2Fn fn, void *a, void *b ) { VipsObjectMapArgs args; args.fn = fn; args.a = a; args.b = b; args.result = NULL; /* We must test vips__object_all before we lock because the lock is * only created when the first object is created. */ if( vips__object_all ) { g_mutex_lock( vips__object_all_lock ); g_hash_table_foreach( vips__object_all, (GHFunc) vips_object_map_sub, &args ); g_mutex_unlock( vips__object_all_lock ); } return( args.result ); } /** * vips_type_map: (skip) * @base: base type * @fn: call this function for every type * @a: client data * @b: client data * * Map over a type's children. Stop when @fn returns non-%NULL * and return that value. * * Returns: %NULL if @fn returns %NULL for all arguments, otherwise the first * non-%NULL value from @fn. */ void * vips_type_map( GType base, VipsTypeMap2Fn fn, void *a, void *b ) { GType *child; guint n_children; unsigned int i; void *result; child = g_type_children( base, &n_children ); result = NULL; for( i = 0; i < n_children && !result; i++ ) result = fn( child[i], a, b ); g_free( child ); return( result ); } /** * vips_type_map_all: (skip) * @base: base type * @fn: call this function for every type * @a: client data * * Map over a type's children, direct and indirect. Stop when @fn returns * non-%NULL and return that value. * * Returns: %NULL if @fn returns %NULL for all arguments, otherwise the first * non-%NULL value from @fn. */ void * vips_type_map_all( GType base, VipsTypeMapFn fn, void *a ) { void *result; if( !(result = fn( base, a )) ) result = vips_type_map( base, (VipsTypeMap2Fn) vips_type_map_all, fn, a ); return( result ); } /** * vips_class_map_all: (skip) * * Loop over all the subclasses of a base type. Non-abstract classes only. */ void * vips_class_map_all( GType type, VipsClassMapFn fn, void *a ) { void *result; /* Avoid abstract classes. Use type_map_all for them. */ if( !G_TYPE_IS_ABSTRACT( type ) ) { /* We never unref this ref, but we never unload classes * anyway, so so what. */ if( (result = fn( VIPS_OBJECT_CLASS( g_type_class_ref( type ) ), a )) ) return( result ); } if( (result = vips_type_map( type, (VipsTypeMap2Fn) vips_class_map_all, fn, a )) ) return( result ); return( NULL ); } /* How deeply nested is a class ... used to indent class lists. */ int vips_type_depth( GType type ) { int depth; depth = 0; while( type != VIPS_TYPE_OBJECT && (type = g_type_parent( type )) ) depth += 1; return( depth ); } static void * test_name( VipsObjectClass *class, const char *nickname ) { if( strcasecmp( class->nickname, nickname ) == 0 ) return( class ); /* Check the class name too, why not. */ if( strcasecmp( G_OBJECT_CLASS_NAME( class ), nickname ) == 0 ) return( class ); return( NULL ); } /** * vips_class_find: (skip) * @basename: name of base class * @nickname: search for a class with this nickname * * Search below basename, return the first class whose name or nickname * matches. * * Returns: the found class. */ VipsObjectClass * vips_class_find( const char *basename, const char *nickname ) { const char *classname = basename ? basename : "VipsObject"; VipsObjectClass *class; GType base; if( !(base = g_type_from_name( classname )) ) return( NULL ); class = vips_class_map_all( base, (VipsClassMapFn) test_name, (void *) nickname ); return( class ); } GType vips_type_find( const char *basename, const char *nickname ) { VipsObjectClass *class; if( !(class = vips_class_find( basename, nickname )) ) return( 0 ); return( G_OBJECT_CLASS_TYPE( class ) ); } /* The vips_object_local() macro uses this as its callback. */ void vips_object_local_cb( VipsObject *vobject, GObject *gobject ) { VIPS_FREEF( g_object_unref, gobject ); } typedef struct { VipsObject **array; int n; } VipsObjectLocal; static void vips_object_local_array_cb( GObject *parent, VipsObjectLocal *local ) { int i; for( i = 0; i < local->n; i++ ) VIPS_FREEF( g_object_unref, local->array[i] ); VIPS_FREEF( g_free, local->array ); VIPS_FREEF( g_free, local ); } /** * vips_object_local_array: (skip) * @parent: objects unref when this object unrefs * @n: array size * * Make an array of NULL VipsObject pointers. When @parent closes, every * non-NULL pointer in the array will be unreffed and the array will be * freed. Handy for creating a set of temporary images for a function. * * The array is NULL-terminated, ie. contains an extra NULL element at the * end. * * Example: * * |[ * VipsObject **t; * * t = vips_object_local_array( a, 5 ); * if( * vips_add( a, b, &t[0], NULL ) || * vips_invert( t[0], &t[1], NULL ) || * vips_add( t[1], t[0], &t[2], NULL ) || * vips_costra( t[2], out, NULL ) ) * return( -1 ); * ]| * * See also: vips_object_local(). * * Returns: an array of NULL pointers of length @n */ VipsObject ** vips_object_local_array( VipsObject *parent, int n ) { VipsObjectLocal *local; local = g_new( VipsObjectLocal, 1 ); local->n = n; /* Make the array 1 too long so we can be sure there's a NULL * terminator. */ local->array = g_new0( VipsObject *, n + 1 ); g_signal_connect( parent, "close", G_CALLBACK( vips_object_local_array_cb ), local ); return( local->array ); } void vips_object_set_static( VipsObject *object, gboolean static_object ) { object->static_object = static_object; } static void * vips_object_n_static_cb( VipsObject *object, int *n ) { if( object->static_object ) *n += 1; return( NULL ); } static int vips_object_n_static( void ) { int n; n = 0; vips_object_map( (VipsSListMap2Fn) vips_object_n_static_cb, &n, NULL ); return( n ); } static void * vips_object_print_all_cb( VipsObject *object, int *n ) { VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); char str[32768]; VipsBuf buf = VIPS_BUF_STATIC( str ); fprintf( stderr, "%d) %s (%p)", *n, G_OBJECT_TYPE_NAME( object ), object ); if( object->local_memory ) fprintf( stderr, " %zd bytes", object->local_memory ); fprintf( stderr, "\n" ); vips_object_summary_class( class, &buf ); vips_buf_appends( &buf, " " ); vips_object_summary( object, &buf ); fprintf( stderr, "%s\n", vips_buf_all( &buf ) ); *n += 1; return( NULL ); } void vips_object_print_all( void ) { if( vips__object_all && g_hash_table_size( vips__object_all ) > vips_object_n_static() ) { int n; fprintf( stderr, "%d objects alive:\n", g_hash_table_size( vips__object_all ) ); n = 0; vips_object_map( (VipsSListMap2Fn) vips_object_print_all_cb, &n, NULL ); } } static void * vips_object_sanity_all_cb( VipsObject *object ) { (void) vips_object_sanity( object ); return( NULL ); } void vips_object_sanity_all( void ) { vips_object_map( (VipsSListMap2Fn) vips_object_sanity_all_cb, NULL, NULL ); } static void * vips_object_unref_outputs_sub( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { if( (argument_class->flags & VIPS_ARGUMENT_OUTPUT) && G_IS_PARAM_SPEC_OBJECT( pspec ) && argument_instance->assigned ) { GObject *value; g_object_get( object, g_param_spec_get_name( pspec ), &value, NULL ); /* Doing the get refs the object, so unref the get, then unref * again since this an an output object of the operation. */ g_object_unref( value ); g_object_unref( value ); } return( NULL ); } /* Unref all assigned output objects. * * After an object is built, all output args are owned by the caller. If * something goes wrong before then, we have to unref the outputs that have * been made so far. And this function can also be useful for callers when * they've finished processing outputs themselves. */ void vips_object_unref_outputs( VipsObject *object ) { (void) vips_argument_map( object, vips_object_unref_outputs_sub, NULL, NULL ); } vips-7.38.5/libvips/deprecated/0000755000175000017500000000000012303146330013343 500000000000000vips-7.38.5/libvips/deprecated/im_gfadd.c0000644000175000017500000002351512303140253015165 00000000000000/* @(#) Generalised addition of two vasari images. Result (double or float) * @(#)depends on inputs * @(#) Function im_gfadd() assumes that the both input files * @(#) are either memory mapped or in a buffer. * @(#) Images must have the same no of bands and can be of any type * @(#) No check for overflow is carried out. If in doubt use im_clip2... * @(#) Result at eachpoint is a*in1 + b*in2 + c * @(#) * @(#) int im_gfadd(a, in1, b, in2, c, out) * @(#) double a, b, c; * @(#) IMAGE *in1, *in2, *out; * @(#) * @(#) Returns 0 on success and -1 on error * @(#) * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 15/6/93 J.Cupitt * - externs removed * - casts added to please ANSI C * - includes rationalised */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* uchar char ushort short uint int float double */ static int array[8][8] = { /* uchar */ { 0, 0, 0, 0, 0, 0, 0, 1 }, /* char */ { 0, 0, 0, 0, 0, 0, 0, 1 }, /* ushort */ { 0, 0, 0, 0, 0, 0, 0, 1 }, /* short */ { 0, 0, 0, 0, 0, 0, 0, 1 }, /* uint */ { 0, 0, 0, 0, 0, 0, 0, 1 }, /* int */ { 0, 0, 0, 0, 0, 0, 0, 1 }, /* float */ { 0, 0, 0, 0, 0, 0, 0, 1 }, /* double */ { 1, 1, 1, 1, 1, 1, 1, 1 } }; #define select_outdouble(IN2, OUT)\ switch(tmp1->BandFmt) {\ case IM_BANDFMT_DOUBLE: loop(double, IN2, OUT); break;\ default: im_error("im_gfadd","Wrong tmp1 format(d)");\ free( line); return( -1 );\ } #define outfloat_2uchar(IN2, OUT)\ case IM_BANDFMT_UCHAR: loop(unsigned char, IN2, OUT); break;\ case IM_BANDFMT_CHAR: loop(signed char, IN2, OUT); break;\ case IM_BANDFMT_USHORT: loop(unsigned short, IN2, OUT); break;\ case IM_BANDFMT_SHORT: loop(signed short, IN2, OUT); break;\ case IM_BANDFMT_UINT: loop(unsigned int, IN2, OUT); break;\ case IM_BANDFMT_INT: loop(signed int, IN2, OUT); break;\ case IM_BANDFMT_FLOAT: loop(float, IN2, OUT); break; #define outfloat_2char(IN2, OUT)\ case IM_BANDFMT_CHAR: loop(signed char, IN2, OUT); break;\ case IM_BANDFMT_USHORT: loop(unsigned short, IN2, OUT); break;\ case IM_BANDFMT_SHORT: loop(signed short, IN2, OUT); break;\ case IM_BANDFMT_UINT: loop(unsigned int, IN2, OUT); break;\ case IM_BANDFMT_INT: loop(signed int, IN2, OUT); break;\ case IM_BANDFMT_FLOAT: loop(float, IN2, OUT); break; #define outfloat_2ushort(IN2, OUT)\ case IM_BANDFMT_USHORT: loop(unsigned short, IN2, OUT); break;\ case IM_BANDFMT_SHORT: loop(signed short, IN2, OUT); break;\ case IM_BANDFMT_UINT: loop(unsigned int, IN2, OUT); break;\ case IM_BANDFMT_INT: loop(signed int, IN2, OUT); break;\ case IM_BANDFMT_FLOAT: loop(float, IN2, OUT); break; #define outfloat_2short(IN2, OUT)\ case IM_BANDFMT_SHORT: loop(signed short, IN2, OUT); break;\ case IM_BANDFMT_UINT: loop(unsigned int, IN2, OUT); break;\ case IM_BANDFMT_INT: loop(signed int, IN2, OUT); break;\ case IM_BANDFMT_FLOAT: loop(float, IN2, OUT); break; #define outfloat_2uint(IN2, OUT)\ case IM_BANDFMT_UINT: loop(unsigned int, IN2, OUT); break;\ case IM_BANDFMT_INT: loop(signed int, IN2, OUT); break;\ case IM_BANDFMT_FLOAT: loop(float, IN2, OUT); break; #define outfloat_2int(IN2, OUT)\ case IM_BANDFMT_INT: loop(signed int, IN2, OUT); break;\ case IM_BANDFMT_FLOAT: loop(float, IN2, OUT); break; #define outfloat_2float(IN2, OUT)\ case IM_BANDFMT_FLOAT: loop(float, IN2, OUT); break; /** * im_gfadd: * * Deprecated. */ int im_gfadd(a, in1, b, in2, c, out) double a, b, c; IMAGE *in1, *in2, *out; { static int fmt[] = { IM_BANDFMT_FLOAT, IM_BANDFMT_DOUBLE }; int y, x; int first, second, result; IMAGE *tmp1, *tmp2; PEL *line; int os; /* size of a line of output image */ /* fd, data filename must have been set before the function is called * Check whether they are set properly */ if ((im_iocheck(in1, out) == -1) || (im_iocheck(in2, out) == -1)) { im_error("im_gfadd"," im_iocheck failed"); return( -1 ); } /* Checks the arguments entered in in and prepares out */ if ( (in1->Xsize != in2->Xsize) || (in1->Ysize != in2->Ysize) || (in1->Bands != in2->Bands) || (in1->Coding != in2->Coding) ) { im_error("im_gfadd"," Input images differ"); return( -1 );} if (in1->Coding != IM_CODING_NONE) { im_error("im_gfadd"," images are coded"); return( -1 ); } switch(in1->BandFmt) { case IM_BANDFMT_UCHAR: first = 0; break; case IM_BANDFMT_CHAR: first = 1; break; case IM_BANDFMT_USHORT: first = 2; break; case IM_BANDFMT_SHORT: first = 3; break; case IM_BANDFMT_UINT: first = 4; break; case IM_BANDFMT_INT: first = 5; break; case IM_BANDFMT_FLOAT: first = 6; break; case IM_BANDFMT_DOUBLE: first = 7; break; default: im_error("im_gfadd"," unable to accept image1"); return( -1 ); } switch(in2->BandFmt) { case IM_BANDFMT_UCHAR: second = 0; break; case IM_BANDFMT_CHAR: second = 1; break; case IM_BANDFMT_USHORT: second = 2; break; case IM_BANDFMT_SHORT: second = 3; break; case IM_BANDFMT_UINT: second = 4; break; case IM_BANDFMT_INT: second = 5; break; case IM_BANDFMT_FLOAT: second = 6; break; case IM_BANDFMT_DOUBLE: second = 7; break; default: im_error("im_gfadd"," unable to accept image2"); return( -1 ); } /* Define the output */ result = array[first][second]; /* Prepare output */ if ( im_cp_desc(out, in1) == -1) { im_error("im_gfadd"," im_cp_desc failed"); return( -1 ); } out->BandFmt = fmt[result]; if( im_setupout(out) == -1) { im_error("im_gfadd"," im_setupout failed"); return( -1 ); } /* Order in1 and in2 */ if ( first >= second ) { tmp1 = in1; tmp2 = in2; } else { tmp1 = in2; tmp2 = in1; } /* Define what we do for each band element type. */ #define loop(IN1, IN2, OUT)\ { IN1 *input1 = (IN1 *) tmp1->data;\ IN2 *input2 = (IN2 *) tmp2->data;\ \ for (y=0; y Ysize; y++) {\ OUT *cpline = (OUT*)line;\ for (x=0; xXsize * out->Bands; line = (PEL *) calloc ( (unsigned)os, sizeof(double) ); if (line == NULL) { im_error("im_gfadd"," unable to calloc"); return( -1 ); } switch (out->BandFmt) { case IM_BANDFMT_DOUBLE: switch (tmp2->BandFmt) { case IM_BANDFMT_UCHAR: select_outdouble(unsigned char, double); break; case IM_BANDFMT_CHAR: select_outdouble(signed char, double); break; case IM_BANDFMT_USHORT: select_outdouble(unsigned short, double); break; case IM_BANDFMT_SHORT: select_outdouble(signed short, double); break; case IM_BANDFMT_UINT: select_outdouble(unsigned int, double); break; case IM_BANDFMT_INT: select_outdouble(signed int, double); break; case IM_BANDFMT_FLOAT: select_outdouble(float, double); break; case IM_BANDFMT_DOUBLE: select_outdouble(double, double); break; default: im_error("im_gfadd","Wrong tmp2 format(d)"); free( line ); return( -1 ); } break; case IM_BANDFMT_FLOAT : switch (tmp2->BandFmt) { case IM_BANDFMT_UCHAR: switch (tmp1->BandFmt) { outfloat_2uchar(unsigned char, float); default: im_error("im_gfadd"," Error (a)"); free( line ); return( -1 ); } break; case IM_BANDFMT_CHAR: switch (tmp1->BandFmt) { outfloat_2char(signed char, float); default: im_error("im_gfadd"," Error (b)"); free( line); return( -1 ); } break; case IM_BANDFMT_USHORT: switch (tmp1->BandFmt) { outfloat_2ushort(unsigned short, float); default: im_error("im_gfadd"," Error (c)"); free( line); return( -1 ); } break; case IM_BANDFMT_SHORT: switch (tmp1->BandFmt) { outfloat_2short(signed short, float); default: im_error("im_gfadd"," Error (d)"); free( line); return( -1 ); } break; case IM_BANDFMT_UINT: switch (tmp1->BandFmt) { outfloat_2uint(unsigned int, float); default: im_error("im_gfadd"," Error (e)"); free( line); return( -1 ); } break; case IM_BANDFMT_INT: switch (tmp1->BandFmt) { outfloat_2int(signed int, float); default: im_error("im_gfadd"," Error (f)"); free( line ); return( -1 ); } break; case IM_BANDFMT_FLOAT: switch (tmp1->BandFmt) { outfloat_2float(float, float); default: im_error("im_gfadd"," Error (g)"); free( line ); return( -1 ); } break; default: im_error("im_gfadd"," Wrong tmp2 format(f)"); free( line ); return( -1 ); } break; default: im_error("im_gfadd"," Impossible output state"); free( line ); return( -1 ); } free( line ); return( 0 ); } vips-7.38.5/libvips/deprecated/format_dispatch.c0000644000175000017500000002477512303140253016613 00000000000000/* VIPS function dispatch tables for image format load/save. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include static int jpeg2vips_vec( im_object *argv ) { char *in = argv[0]; IMAGE *out = argv[1]; if( im_jpeg2vips( in, out ) ) return( -1 ); return( 0 ); } static im_arg_desc jpeg2vips_args[] = { IM_INPUT_STRING( "in" ), IM_OUTPUT_IMAGE( "out" ) }; static im_function jpeg2vips_desc = { "im_jpeg2vips", /* Name */ "convert from jpeg", /* Description */ 0, /* Flags */ jpeg2vips_vec, /* Dispatch function */ IM_NUMBER( jpeg2vips_args ), /* Size of arg list */ jpeg2vips_args /* Arg list */ }; static int vips2dz_vec( im_object *argv ) { IMAGE *in = argv[0]; char *out = argv[1]; if( im_vips2dz( in, out ) ) return( -1 ); return( 0 ); } static im_arg_desc vips2dz_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_STRING( "out" ) }; static im_function vips2dz_desc = { "im_vips2dz", /* Name */ "save as deepzoom", /* Description */ 0, /* Flags */ vips2dz_vec, /* Dispatch function */ IM_NUMBER( vips2dz_args ), /* Size of arg list */ vips2dz_args /* Arg list */ }; static int vips2jpeg_vec( im_object *argv ) { IMAGE *in = argv[0]; char *out = argv[1]; if( im_vips2jpeg( in, out ) ) return( -1 ); return( 0 ); } static im_arg_desc vips2jpeg_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_STRING( "out" ) }; static im_function vips2jpeg_desc = { "im_vips2jpeg", /* Name */ "convert to jpeg", /* Description */ 0, /* Flags */ vips2jpeg_vec, /* Dispatch function */ IM_NUMBER( vips2jpeg_args ), /* Size of arg list */ vips2jpeg_args /* Arg list */ }; static int vips2mimejpeg_vec( im_object *argv ) { IMAGE *in = argv[0]; int qfac = *((int *) argv[1]); if( im_vips2mimejpeg( in, qfac ) ) return( -1 ); return( 0 ); } static im_arg_desc vips2mimejpeg_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_INT( "qfac" ) }; static im_function vips2mimejpeg_desc = { "im_vips2mimejpeg", /* Name */ "convert to jpeg as mime type on stdout", /* Description */ 0, /* Flags */ vips2mimejpeg_vec, /* Dispatch function */ IM_NUMBER( vips2mimejpeg_args ), /* Size of arg list */ vips2mimejpeg_args /* Arg list */ }; /* Args for vips2png. */ static im_arg_desc vips2png_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_STRING( "out" ) }; /* Call im_vips2png via arg vector. */ static int vips2png_vec( im_object *argv ) { return( im_vips2png( argv[0], argv[1] ) ); } /* Description of im_vips2png. */ static im_function vips2png_desc = { "im_vips2png", /* Name */ "convert VIPS image to PNG file", /* Description */ 0, vips2png_vec, /* Dispatch function */ IM_NUMBER( vips2png_args ), /* Size of arg list */ vips2png_args /* Arg list */ }; /* Args for png2vips. */ static im_arg_desc png2vips_args[] = { IM_INPUT_STRING( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_png2vips via arg vector. */ static int png2vips_vec( im_object *argv ) { return( im_png2vips( argv[0], argv[1] ) ); } /* Description of im_png2vips. */ static im_function png2vips_desc = { "im_png2vips", /* Name */ "convert PNG file to VIPS image", /* Description */ 0, png2vips_vec, /* Dispatch function */ IM_NUMBER( png2vips_args ), /* Size of arg list */ png2vips_args /* Arg list */ }; /* Args for exr2vips. */ static im_arg_desc exr2vips_args[] = { IM_INPUT_STRING( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_exr2vips via arg vector. */ static int exr2vips_vec( im_object *argv ) { return( im_exr2vips( argv[0], argv[1] ) ); } /* Description of im_exr2vips. */ static im_function exr2vips_desc = { "im_exr2vips", /* Name */ "convert an OpenEXR file to VIPS", /* Description */ 0, exr2vips_vec, /* Dispatch function */ IM_NUMBER( exr2vips_args ), /* Size of arg list */ exr2vips_args /* Arg list */ }; /* Args for vips2tiff. */ static im_arg_desc vips2tiff_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_STRING( "out" ) }; /* Call im_vips2tiff via arg vector. */ static int vips2tiff_vec( im_object *argv ) { return( im_vips2tiff( argv[0], argv[1] ) ); } /* Description of im_vips2tiff. */ static im_function vips2tiff_desc = { "im_vips2tiff", /* Name */ "convert VIPS image to TIFF file", /* Description */ 0, vips2tiff_vec, /* Dispatch function */ IM_NUMBER( vips2tiff_args ), /* Size of arg list */ vips2tiff_args /* Arg list */ }; /* Args for magick2vips. */ static im_arg_desc magick2vips_args[] = { IM_INPUT_STRING( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_magick2vips via arg vector. */ static int magick2vips_vec( im_object *argv ) { return( im_magick2vips( argv[0], argv[1] ) ); } /* Description of im_magick2vips. */ static im_function magick2vips_desc = { "im_magick2vips", /* Name */ "load file with libMagick", /* Description */ 0, magick2vips_vec, /* Dispatch function */ IM_NUMBER( magick2vips_args ), /* Size of arg list */ magick2vips_args /* Arg list */ }; /* Args for tiff2vips. */ static im_arg_desc tiff2vips_args[] = { IM_INPUT_STRING( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_tiff2vips via arg vector. */ static int tiff2vips_vec( im_object *argv ) { return( im_tiff2vips( argv[0], argv[1] ) ); } /* Description of im_tiff2vips. */ static im_function tiff2vips_desc = { "im_tiff2vips", /* Name */ "convert TIFF file to VIPS image", /* Description */ 0, tiff2vips_vec, /* Dispatch function */ IM_NUMBER( tiff2vips_args ), /* Size of arg list */ tiff2vips_args /* Arg list */ }; static int analyze2vips_vec( im_object *argv ) { const char *in = argv[0]; IMAGE *out = argv[1]; return( im_analyze2vips( in, out ) ); } static im_arg_desc analyze2vips_arg_types[] = { IM_INPUT_STRING( "filename" ), IM_OUTPUT_IMAGE( "im" ) }; static im_function analyze2vips_desc = { "im_analyze2vips", /* Name */ "read a file in analyze format",/* Description */ 0, /* Flags */ analyze2vips_vec, /* Dispatch function */ IM_NUMBER( analyze2vips_arg_types ),/* Size of arg list */ analyze2vips_arg_types /* Arg list */ }; static int csv2vips_vec( im_object *argv ) { const char *in = argv[0]; IMAGE *out = argv[1]; return( im_csv2vips( in, out ) ); } static im_arg_desc csv2vips_arg_types[] = { IM_INPUT_STRING( "filename" ), IM_OUTPUT_IMAGE( "im" ) }; static im_function csv2vips_desc = { "im_csv2vips", /* Name */ "read a file in csv format",/* Description */ 0, /* Flags */ csv2vips_vec, /* Dispatch function */ IM_NUMBER( csv2vips_arg_types ),/* Size of arg list */ csv2vips_arg_types /* Arg list */ }; static int vips2csv_vec( im_object *argv ) { IMAGE *in = argv[0]; const char *filename = argv[1]; return( im_vips2csv( in, filename ) ); } static im_arg_desc vips2csv_arg_types[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_STRING( "filename" ) }; static im_function vips2csv_desc = { "im_vips2csv", /* Name */ "write an image in csv format", /* Description */ 0, /* Flags */ vips2csv_vec, /* Dispatch function */ IM_NUMBER( vips2csv_arg_types ),/* Size of arg list */ vips2csv_arg_types /* Arg list */ }; static int ppm2vips_vec( im_object *argv ) { const char *in = argv[0]; IMAGE *out = argv[1]; return( im_ppm2vips( in, out ) ); } static im_arg_desc ppm2vips_arg_types[] = { IM_INPUT_STRING( "filename" ), IM_OUTPUT_IMAGE( "im" ) }; static im_function ppm2vips_desc = { "im_ppm2vips", /* Name */ "read a file in pbm/pgm/ppm format", /* Description */ 0, /* Flags */ ppm2vips_vec, /* Dispatch function */ IM_NUMBER( ppm2vips_arg_types ),/* Size of arg list */ ppm2vips_arg_types /* Arg list */ }; static int vips2ppm_vec( im_object *argv ) { IMAGE *im = argv[0]; const char *filename = argv[1]; return( im_vips2ppm( im, filename ) ); } static im_arg_desc vips2ppm_arg_types[] = { IM_INPUT_IMAGE( "im" ), IM_INPUT_STRING( "filename" ) }; static im_function vips2ppm_desc = { "im_vips2ppm", /* Name */ "write a file in pbm/pgm/ppm format", /* Description */ 0, /* Flags */ vips2ppm_vec, /* Dispatch function */ IM_NUMBER( vips2ppm_arg_types ),/* Size of arg list */ vips2ppm_arg_types /* Arg list */ }; static int fits2vips_vec( im_object *argv ) { char *in = argv[0]; IMAGE *out = argv[1]; if( im_fits2vips( in, out ) ) return( -1 ); return( 0 ); } static im_arg_desc fits2vips_args[] = { IM_INPUT_STRING( "in" ), IM_OUTPUT_IMAGE( "out" ) }; static im_function fits2vips_desc = { "im_fits2vips", /* Name */ "convert from fits", /* Description */ 0, /* Flags */ fits2vips_vec, /* Dispatch function */ IM_NUMBER( fits2vips_args ), /* Size of arg list */ fits2vips_args /* Arg list */ }; /* Package up all these functions. */ static im_function *list[] = { &csv2vips_desc, &fits2vips_desc, &jpeg2vips_desc, &magick2vips_desc, &png2vips_desc, &exr2vips_desc, &ppm2vips_desc, &analyze2vips_desc, &tiff2vips_desc, &vips2csv_desc, &vips2dz_desc, &vips2jpeg_desc, &vips2mimejpeg_desc, &vips2png_desc, &vips2ppm_desc, &vips2tiff_desc }; /* Package of functions. */ im_package im__format = { "format", IM_NUMBER( list ), list }; vips-7.38.5/libvips/deprecated/rotmask.c0000644000175000017500000000661212303140253015112 00000000000000/* Functions to create offsets for rotating square masks. * * Author: N. Dessipris (Copyright, N. Dessipris 1991) * Written on: 08/05/1991 * Modified on: 28/05/1991 * 12/10/95 JC * - small revisions, needs rewriting really * 7/8/96 JC * - absolutely foul desp code revised * - many bugs and mem leaks fixed * 1/3/99 JC * - oops, fns were not preserving scale and offset * 1/12/10 * - allow any size mask for the 90 degree rotates by using im_rot90(). */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define PIM_RINT 1 */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* The type of the vips operations we support. */ typedef int (*vips_fn)( IMAGE *in, IMAGE *out ); /* Pass a mask through a vips operation, eg. im_rot90(). */ static INTMASK * vapplyimask( INTMASK *in, const char *name, vips_fn fn ) { IMAGE *x; IMAGE *t[2]; DOUBLEMASK *d[2]; INTMASK *out; if( !(x = im_open( name, "p" )) ) return( NULL ); if( !(d[0] = im_local_dmask( x, im_imask2dmask( in, name ) )) || im_open_local_array( x, t, 2, name, "p" ) || im_mask2vips( d[0], t[0] ) || fn( t[0], t[1] ) || !(d[1] = im_local_dmask( x, im_vips2mask( t[1], name ) )) || !(out = im_dmask2imask( d[1], name )) ) { im_close( x ); return( NULL ); } im_close( x ); out->scale = in->scale; out->offset = in->offset; return( out ); } static DOUBLEMASK * vapplydmask( DOUBLEMASK *in, const char *name, vips_fn fn ) { IMAGE *x; IMAGE *t[2]; DOUBLEMASK *out; if( !(x = im_open( name, "p" )) ) return( NULL ); if( im_open_local_array( x, t, 2, name, "p" ) || im_mask2vips( in, t[0] ) || fn( t[0], t[1] ) || !(out = im_vips2mask( t[1], name )) ) { im_close( x ); return( NULL ); } im_close( x ); out->scale = in->scale; out->offset = in->offset; return( out ); } INTMASK * im_rotate_imask90( INTMASK *in, const char *filename ) { return( vapplyimask( in, filename, im_rot90 ) ); } DOUBLEMASK * im_rotate_dmask90( DOUBLEMASK *in, const char *filename ) { return( vapplydmask( in, filename, im_rot90 ) ); } static int im_rot45( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_rot45( in, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } INTMASK * im_rotate_imask45( INTMASK *in, const char *filename ) { return( vapplyimask( in, filename, im_rot45 ) ); } DOUBLEMASK * im_rotate_dmask45( DOUBLEMASK *in, const char *filename ) { return( vapplydmask( in, filename, im_rot45 ) ); } vips-7.38.5/libvips/deprecated/tone.c0000644000175000017500000001016012303140253014370 00000000000000/* Various functions relating to tone curve adjustment. * * Author: John Cupitt * Written on: 18/7/1995 * 17/9/96 JC * - restrictions on Ps, Pm, Ph relaxed * - restrictions on S, M, H relaxed * 25/7/01 JC * - patched for im_extract_band() change * 11/7/04 * - generalised to im_tone_build_range() ... so you can use it for any * image, not just LabS * 26/3/10 * - cleanups * - gtkdoc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /** * im_tone_map: * @in: input image * @out: output image * @lut: look-up table * * Map the first channel of @in through @lut. If @in is IM_CODING_LABQ, unpack * to LABS, map L and then repack. * * @in should be a LABS or LABQ image for this to work * sensibly. * * See also: im_maplut(). * * Returns: 0 on success, -1 on error */ int im_tone_map( IMAGE *in, IMAGE *out, IMAGE *lut ) { IMAGE *t[8]; if( im_check_hist( "im_tone_map", lut ) || im_open_local_array( out, t, 8, "im_tone_map", "p" ) ) return( -1 ); /* If in is IM_CODING_LABQ, unpack. */ if( in->Coding == IM_CODING_LABQ ) { if( im_LabQ2LabS( in, t[0] ) ) return( -1 ); } else t[0] = in; /* Split into bands. */ if( im_extract_band( t[0], t[1], 0 ) ) return( -1 ); if( t[0]->Bands > 1 ) { if( im_extract_bands( t[0], t[2], 1, t[0]->Bands - 1 ) ) return( -1 ); } /* Map L. */ if( im_maplut( t[1], t[3], lut ) ) return( -1 ); /* Recombine bands. */ if( t[0]->Bands > 1 ) { if( im_bandjoin( t[3], t[2], t[4] ) ) return( -1 ); } else t[4] = t[3]; /* If input was LabQ, repack. */ if( in->Coding == IM_CODING_LABQ ) { if( im_LabS2LabQ( t[4], t[5] ) ) return( -1 ); } else t[5] = t[4]; return( im_copy( t[4], out ) ); } /** * im_tone_analyse: * @in: input image * @out: output image * @Ps: shadow point (eg. 0.2) * @Pm: mid-tone point (eg. 0.5) * @Ph: highlight point (eg. 0.8) * @S: shadow adjustment (+/- 30) * @M: mid-tone adjustment (+/- 30) * @H: highlight adjustment (+/- 30) * * As im_tone_build(), but analyse the histogram of @in and use it to * pick the 0.1% and 99.9% points for @Lb and @Lw. * * See also: im_tone_build(). * * Returns: 0 on success, -1 on error */ int im_tone_analyse( IMAGE *in, IMAGE *out, double Ps, double Pm, double Ph, double S, double M, double H ) { IMAGE *t[4]; int low, high; double Lb, Lw; if( im_open_local_array( out, t, 4, "im_tone_map", "p" ) ) return( -1 ); /* If in is IM_CODING_LABQ, unpack. */ if( in->Coding == IM_CODING_LABQ ) { if( im_LabQ2LabS( in, t[0] ) ) return( -1 ); } else t[0] = in; /* Should now be 3-band short. */ if( im_check_uncoded( "im_tone_analyse", t[0] ) || im_check_bands( "im_tone_analyse", t[0], 3 ) || im_check_format( "im_tone_analyse", t[0], IM_BANDFMT_SHORT ) ) return( -1 ); if( im_extract_band( t[0], t[1], 0 ) || im_clip2fmt( t[1], t[2], IM_BANDFMT_USHORT ) ) return( -1 ); if( im_mpercent( t[2], 0.1 / 100.0, &high ) || im_mpercent( t[2], 99.9 / 100.0, &low ) ) return( -1 ); Lb = 100 * low / 32768; Lw = 100 * high / 32768; im_diag( "im_tone_analyse", "set Lb = %g, Lw = %g", Lb, Lw ); return( im_tone_build( out, Lb, Lw, Ps, Pm, Ph, S, M, H ) ); } vips-7.38.5/libvips/deprecated/radiance.c0000644000175000017500000000420512303140253015174 00000000000000/* Read Radiance (.hdr) files * * 20/12/11 * - just a compat stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include int im_rad2vips( const char *filename, IMAGE *out ) { VipsImage *t; if( vips_radload( filename, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static int israd( const char *filename ) { return( vips_foreign_is_a( "radload", filename ) ); } int im_vips2rad( IMAGE *in, const char *filename ) { return( vips_radsave( in, filename, NULL ) ); } static const char *rad_suffs[] = { ".hdr", NULL }; typedef VipsFormat VipsFormatRad; typedef VipsFormatClass VipsFormatRadClass; static void vips_format_rad_class_init( VipsFormatRadClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "rad"; object_class->description = _( "Radiance" ); format_class->is_a = israd; format_class->load = im_rad2vips; format_class->save = im_vips2rad; format_class->suffs = rad_suffs; } static void vips_format_rad_init( VipsFormatRad *object ) { } G_DEFINE_TYPE( VipsFormatRad, vips_format_rad, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_vips2jpeg.c0000644000175000017500000000467012303140253016032 00000000000000/* Convert 8-bit VIPS images to/from JPEG. * * 30/11/11 * - now just a stub calling the new system */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include int im_vips2jpeg( IMAGE *in, const char *filename ) { int qfac = 75; /* profile has to default to NULL, meaning "no param". If we default * to "none" we will not attach the profile from the metadata. */ char *profile = NULL; char *p, *q; char name[FILENAME_MAX]; char mode[FILENAME_MAX]; char buf[FILENAME_MAX]; /* Parse mode from filename. */ im_filename_split( filename, name, mode ); strcpy( buf, mode ); p = &buf[0]; if( (q = im_getnextoption( &p )) ) { if( strcmp( q, "" ) != 0 ) qfac = atoi( mode ); } if( (q = im_getnextoption( &p )) ) { if( strcmp( q, "" ) != 0 ) profile = q; } if( (q = im_getnextoption( &p )) ) { im_error( "im_vips2jpeg", _( "unknown extra options \"%s\"" ), q ); return( -1 ); } return( vips_jpegsave( in, name, "Q", qfac, "profile", profile, NULL ) ); } int im_vips2bufjpeg( IMAGE *in, IMAGE *out, int qfac, char **obuf, int *olen ) { size_t len; if( vips_jpegsave_buffer( in, (void **) obuf, &len, "Q", qfac, NULL ) ) return( -1 ); if( out ) im_add_callback( out, "close", (im_callback_fn) vips_free, obuf, NULL ); if( olen ) *olen = len; return( 0 ); } int im_vips2mimejpeg( IMAGE *in, int qfac ) { return( vips_jpegsave_mime( in, "Q", qfac, NULL ) ); } vips-7.38.5/libvips/deprecated/im_maxpos_avg.c0000644000175000017500000001407412303140253016264 00000000000000/* im_maxpos_avg.c * * Copyright: 2006, The Nottingham Trent University * Copyright: 2006, Tom Vajzovic * * Author: Tom Vajzovic * * Written on: 2006-09-25 * 15/10/07 JC * - changed spelling of occurrences * - check for !occurrences before using val * - renamed avg as sum, a bit clearer * 2/9/09 * - gtkdoc comment * 8/9/08 * - rewrite from im_maxpos() * - now handles many bands, complex, faster */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include /* Get the value of pixel (0, 0). Use this to init the min/max value for * im_max()/im_stats()/etc. */ int im__value( IMAGE *im, double *value ) { IMAGE *t; if( !(t = im_open( "im__value", "p" )) ) return( -1 ); if( im_extract_areabands( im, t, 0, 0, 1, 1, 0, 1 ) || im_avg( t, value ) ) { im_close( t ); return( -1 ); } im_close( t ); return( 0 ); } /* A position and maximum. */ typedef struct _Maxposavg { int xpos; int ypos; double max; int occurences; } Maxposavg; /* New sequence value. */ static void * maxposavg_start( IMAGE *in, void *a, void *b ) { Maxposavg *global_maxposavg = (Maxposavg *) b; Maxposavg *maxposavg; if( !(maxposavg = IM_NEW( NULL, Maxposavg )) ) return( NULL ); *maxposavg = *global_maxposavg; return( (void *) maxposavg ); } /* Merge the sequence value back into the per-call state. */ static int maxposavg_stop( void *seq, void *a, void *b ) { Maxposavg *global_maxposavg = (Maxposavg *) b; Maxposavg *maxposavg = (Maxposavg *) seq; /* Merge. */ if( maxposavg->max > global_maxposavg->max ) *global_maxposavg = *maxposavg; im_free( seq ); return( 0 ); } #define LOOP( TYPE ) { \ TYPE *p = (TYPE *) in; \ TYPE m; \ \ m = max; \ \ for( x = 0; x < sz; x++ ) { \ TYPE v = p[x]; \ \ if( v == m ) { \ xpos += r->left + x / reg->im->Bands; \ ypos += r->top + y; \ occurences += 1; \ } \ else if( v > m ) { \ m = v; \ xpos = r->left + x / reg->im->Bands; \ ypos = r->top + y; \ occurences = 1; \ } \ } \ \ max = m; \ } #define CLOOP( TYPE ) { \ TYPE *p = (TYPE *) in; \ \ for( x = 0; x < sz; x++ ) { \ double mod, re, im; \ \ re = p[0]; \ im = p[1]; \ p += 2; \ mod = re * re + im * im; \ \ if( mod == max ) { \ xpos += r->left + x / reg->im->Bands; \ ypos += r->top + y; \ occurences += 1; \ } \ else if( mod > max ) { \ max = mod; \ xpos = r->left + x / reg->im->Bands; \ ypos = r->top + y; \ occurences = 1; \ } \ } \ } /* Loop over region, adding to seq. */ static int maxposavg_scan( REGION *reg, void *seq, void *a, void *b, gboolean *stop ) { const Rect *r = ®->valid; const int sz = IM_REGION_N_ELEMENTS( reg ); Maxposavg *maxposavg = (Maxposavg *) seq; int x, y; double max; int xpos, ypos, occurences; xpos = maxposavg->xpos; ypos = maxposavg->ypos; max = maxposavg->max; occurences = maxposavg->occurences; for( y = 0; y < r->height; y++ ) { VipsPel *in = VIPS_REGION_ADDR( reg, r->left, r->top + y ); switch( reg->im->BandFmt ) { case IM_BANDFMT_UCHAR: LOOP( unsigned char ); break; case IM_BANDFMT_CHAR: LOOP( signed char ); break; case IM_BANDFMT_USHORT: LOOP( unsigned short ); break; case IM_BANDFMT_SHORT: LOOP( signed short ); break; case IM_BANDFMT_UINT: LOOP( unsigned int ); break; case IM_BANDFMT_INT: LOOP( signed int ); break; case IM_BANDFMT_FLOAT: LOOP( float ); break; case IM_BANDFMT_DOUBLE: LOOP( double ); break; case IM_BANDFMT_COMPLEX: CLOOP( float ); break; case IM_BANDFMT_DPCOMPLEX: CLOOP( double ); break; default: g_assert( 0 ); } } maxposavg->xpos = xpos; maxposavg->ypos = ypos; maxposavg->max = max; maxposavg->occurences = occurences; return( 0 ); } /** * im_maxpos_avg: * @im: image to scan * @xpos: returned X position * @ypos: returned Y position * @out: returned value * * Function to find the maximum of an image. Returns coords and value at * double precision. In the event of a draw, returns average of all * drawing coords. * * See also: im_maxpos(), im_min(), im_stats(). * * Returns: 0 on success, -1 on error */ int im_maxpos_avg( IMAGE *in, double *xpos, double *ypos, double *out ) { Maxposavg *global_maxposavg; if( im_pincheck( in ) || im_check_uncoded( "im_maxpos_avg", in ) ) return( -1 ); if( !(global_maxposavg = IM_NEW( in, Maxposavg )) ) return( -1 ); if( im__value( in, &global_maxposavg->max ) ) return( -1 ); global_maxposavg->xpos = 0; global_maxposavg->ypos = 0; global_maxposavg->occurences = 1; /* We use square mod for scanning, for speed. */ if( vips_bandfmt_iscomplex( in->BandFmt ) ) global_maxposavg->max *= global_maxposavg->max; if( vips_sink( in, maxposavg_start, maxposavg_scan, maxposavg_stop, in, global_maxposavg ) ) return( -1 ); /* Back to modulus. */ if( vips_bandfmt_iscomplex( in->BandFmt ) ) global_maxposavg->max = sqrt( global_maxposavg->max ); if( xpos ) *xpos = (double) global_maxposavg->xpos / global_maxposavg->occurences; if( ypos ) *ypos = (double) global_maxposavg->ypos / global_maxposavg->occurences; if( out ) *out = global_maxposavg->max; return( 0 ); } vips-7.38.5/libvips/deprecated/im_magick2vips.c0000644000175000017500000000456112303140253016337 00000000000000/* Read a file using libMagick * * 17/12/11 * - just a stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Turn on debugging output. #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include "../foreign/magick.h" int im_magick2vips( const char *filename, IMAGE *out ) { #ifdef HAVE_MAGICK /* Old behaviour was always to read all frames. */ return( vips__magick_read( filename, out, TRUE ) ); #else vips_error( "im_magick2vips", "%s", _( "no libMagick support in your libvips" ) ); return( -1 ); #endif /*HAVE_MAGICK*/ } static int ismagick( const char *filename ) { return( vips_foreign_is_a( "magickload", filename ) ); } static const char *magick_suffs[] = { NULL }; /* magick format adds no new members. */ typedef VipsFormat VipsFormatMagick; typedef VipsFormatClass VipsFormatMagickClass; static void vips_format_magick_class_init( VipsFormatMagickClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "magick"; object_class->description = _( "libMagick-supported" ); format_class->is_a = ismagick; format_class->load = im_magick2vips; format_class->suffs = magick_suffs; /* This can be very slow :-( Use our own jpeg/tiff/png etc. loaders in * preference if we can. */ format_class->priority = -1000; } static void vips_format_magick_init( VipsFormatMagick *object ) { } G_DEFINE_TYPE( VipsFormatMagick, vips_format_magick, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_csv2vips.c0000644000175000017500000000517012303140253015674 00000000000000/* Read a csv file. * * 16/12/11 * - just a stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "../foreign/csv.h" int im_csv2vips( const char *filename, IMAGE *out ) { /* Read options. */ int start_skip = 0; char *whitespace = " "; char *separator = ";,\t"; int lines = -1; char name[FILENAME_MAX]; char mode[FILENAME_MAX]; char *p, *q, *r; /* Parse mode string. */ im_filename_split( filename, name, mode ); p = &mode[0]; while( (q = im_getnextoption( &p )) ) { if( im_isprefix( "ski", q ) && (r = im_getsuboption( q )) ) start_skip = atoi( r ); else if( im_isprefix( "whi", q ) && (r = im_getsuboption( q )) ) whitespace = r; else if( im_isprefix( "sep", q ) && (r = im_getsuboption( q )) ) separator = r; else if( im_isprefix( "lin", q ) && (r = im_getsuboption( q )) ) lines = atoi( r ); } if( vips__csv_read( name, out, start_skip, lines, whitespace, separator ) ) return( -1 ); return( 0 ); } static const char *csv_suffs[] = { ".csv", NULL }; /* csv format adds no new members. */ typedef VipsFormat VipsFormatCsv; typedef VipsFormatClass VipsFormatCsvClass; static void vips_format_csv_class_init( VipsFormatCsvClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "csv"; object_class->description = _( "CSV" ); format_class->load = im_csv2vips; format_class->save = im_vips2csv; format_class->suffs = csv_suffs; } static void vips_format_csv_init( VipsFormatCsv *object ) { } G_DEFINE_TYPE( VipsFormatCsv, vips_format_csv, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_vips2csv.c0000644000175000017500000000274112303140253015675 00000000000000/* Write a csv file. * * 16/12/11 * - just a stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include int im_vips2csv( IMAGE *in, const char *filename ) { char *separator = "\t"; char name[FILENAME_MAX]; char mode[FILENAME_MAX]; char *p, *q, *r; /* Parse mode string. */ im_filename_split( filename, name, mode ); p = &mode[0]; while( (q = im_getnextoption( &p )) ) { if( im_isprefix( "sep", q ) && (r = im_getsuboption( q )) ) separator = r; } if( vips_csvsave( in, name, "separator", separator, NULL ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/deprecated/im_setbox.c0000644000175000017500000000315512303140253015422 00000000000000/* @(#) Copies the coordinates of a box to an IMAGE_BOX * @(#) * @(#) Right call: * @(#) void im_setbox(pbox, xst, yst, xsiz, ysiz, ch_select) * @(#) IMAGE_BOX *pbox; * @(#) int xst, yst, xsiz, ysiz, ch_select; * @(#) ch_select could be 0, 1, 2 or 3 corresponding to * @(#) a, r , g or b respectively. * @(#) * * Copyright: Nicos Dessipris * Written on: 13/02/1990 * Modified on : 04/04/1990 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include void im_setbox(pbox, xst, yst, xsiz, ysiz, ch_select) IMAGE_BOX *pbox; int xst, yst, xsiz, ysiz, ch_select; { pbox->xstart = xst; pbox->ystart = yst; pbox->xsize = xsiz; pbox->ysize = ysiz; pbox->chsel = ch_select; } vips-7.38.5/libvips/deprecated/im_printlines.c0000644000175000017500000000733512303140253016311 00000000000000/* @(#) Function which prints in stdout the values of a picture * @(#) * @(#) For debuging only * @(#) is either memory mapped or in a buffer. * @(#) * @(#) void im_printlines( in ) * @(#) IMAGE *in; * @(#) * * Copyright: 1991 N. Dessipris * * Author: N. Dessipris * Written on: 18/03/1991 * Modified on: * 15/4/93 J.Cupitt * - returns int, not void now, so error messages work * - detects im->data invalid. * 23/7/93 JC * - im_incheck() added */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /* Useful: Call a macro with the name, type pairs for all VIPS functions. */ #define im_for_all_types() \ case IM_BANDFMT_UCHAR: loopuc(unsigned char); break; \ case IM_BANDFMT_CHAR: loop(char); break; \ case IM_BANDFMT_USHORT: loop(unsigned short); break; \ case IM_BANDFMT_SHORT: loop(short); break; \ case IM_BANDFMT_UINT: loop(unsigned int); break; \ case IM_BANDFMT_INT: loop(int); break; \ case IM_BANDFMT_FLOAT: loop(float); break; \ case IM_BANDFMT_DOUBLE: loop(double); break; \ case IM_BANDFMT_COMPLEX: loopcmplx(float); break; \ case IM_BANDFMT_DPCOMPLEX: loopcmplx(double); break; int im_printlines( IMAGE *in ) { if( im_incheck( in ) ) return( -1 ); if( in->Coding != IM_CODING_NONE ) { im_error( "im_printlines", "%s", _( "input must be uncoded" ) ); return( -1 ); } if( !in->data ) { im_error( "im_debugim", "%s", _( "unsuitable image type" ) ); return( -1 ); } /* What type? First define the loop we want to perform for all types. */ #define loopuc(TYPE) \ { TYPE *p = (TYPE *) in->data; \ int x, y, z; \ \ for ( y=0; yYsize; y++ ) {\ fprintf(stderr, "line:%5d\n", y); \ for ( x=0; xXsize; x++ ) {\ fprintf(stderr, "%5d", x); \ for ( z=0; zBands; z++ ) {\ fprintf(stderr, "\t%4d", (TYPE)*p++ );\ } \ fprintf(stderr, "\n"); \ } \ } \ } #define loop(TYPE) \ { TYPE *p = (TYPE *) in->data; \ int x, y, z; \ \ for ( y=0; yYsize; y++ ) {\ fprintf(stderr, "line:%5d\n", y); \ for ( x=0; xXsize; x++ ) {\ fprintf(stderr, "%5d", x); \ for ( z=0; zBands; z++ ) {\ fprintf(stderr, "\t%f", (double)*p++ );\ } \ fprintf(stderr, "\n"); \ } \ } \ } #define loopcmplx(TYPE) \ { TYPE *p = (TYPE *) in->data; \ int x, y, z; \ \ for ( y=0; yYsize; y++ ) {\ fprintf(stderr, "line:%5d\n", y); \ for ( x=0; xXsize; x++ ) {\ fprintf(stderr, "%5d", x); \ for ( z=0; zBands; z++ ) {\ fprintf(stderr,"\t%f",(double)*p++);\ fprintf(stderr,"\t%f",(double)*p++);\ } \ fprintf(stderr, "\n");\ } \ } \ } /* Now generate code for all types. */ switch( in->BandFmt ) { im_for_all_types(); default: { im_error( "im_printlines", "%s", _( "unknown input format" ) ); return( -1 ); } } return( 0 ); } vips-7.38.5/libvips/deprecated/hist_dispatch.c0000644000175000017500000004602312303140253016260 00000000000000/* VIPS function dispatch tables for histogram_lut. * * J. Cupitt, 24/5/95. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * SECTION: histograms_lut * @short_description: find, manipulate and apply histograms and lookup tables * @stability: Stable * @see_also: image * @include: vips/vips.h * * Histograms and look-up tables are 1xn or nx1 images, where n is less than * 256 or less than 65536, corresponding to 8- and 16-bit unsigned int images. * They are * tagged with a #VipsType of IM_TYPE_HISTOGRAM and usually displayed by * user-interfaces such as nip2 as plots rather than images. * * These functions can be broadly grouped as things to find or build * histograms (im_histgr(), im_buildlut(), in_identity()), operations that * manipulate histograms in some way (im_histcum(), im_histnorm()), operations * to apply histograms (im_maplut()), and a variety of utility * operations. * * A final group of operations build tone curves. These are useful in * pre-press work for adjusting the appearance of images. They are designed * for CIELAB images, but might be useful elsewhere. */ /* One image in, one out. */ static im_arg_desc one_in_one_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Args for im_gammacorrect. */ static im_arg_desc gammacorrect_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "exponent" ) }; /* Call im_gammacorrect via arg vector. */ static int gammacorrect_vec( im_object *argv ) { double exp = *((double *) argv[2]); return( im_gammacorrect( argv[0], argv[1], exp ) ); } /* Description of im_gammacorrect. */ static im_function gammacorrect_desc = { "im_gammacorrect", /* Name */ "gamma-correct image", /* Description */ IM_FN_PIO, /* Flags */ gammacorrect_vec, /* Dispatch function */ IM_NUMBER( gammacorrect_args ), /* Size of arg list */ gammacorrect_args /* Arg list */ }; /* Image plus number in, image out. */ static im_arg_desc heq_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "band_number" ) }; /* Call im_heq via arg vector. */ static int heq_vec( im_object *argv ) { int bn = *((int *) argv[2]); return( im_heq( argv[0], argv[1], bn ) ); } /* Description of im_heq. */ static im_function heq_desc = { "im_heq", /* Name */ "histogram-equalise image", /* Description */ IM_FN_PIO, /* Flags */ heq_vec, /* Dispatch function */ IM_NUMBER( heq_args ), /* Size of arg list */ heq_args /* Arg list */ }; static im_arg_desc histindexed_args[] = { IM_INPUT_IMAGE( "index" ), IM_INPUT_IMAGE( "value" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_histindexed via arg vector. */ static int histindexed_vec( im_object *argv ) { return( im_hist_indexed( argv[0], argv[1], argv[2] ) ); } /* Description of im_histindexed. */ static im_function histindexed_desc = { "im_hist_indexed", /* Name */ "make a histogram with an index image", /* Description */ IM_FN_PIO, /* Flags */ histindexed_vec, /* Dispatch function */ IM_NUMBER( histindexed_args ), /* Size of arg list */ histindexed_args /* Arg list */ }; /* Call im_hist via arg vector. */ static int hist_vec( im_object *argv ) { int bn = *((int *) argv[2]); return( im_hist( argv[0], argv[1], bn ) ); } /* Description of im_hist. */ static im_function hist_desc = { "im_hist", /* Name */ "find and graph histogram of image", /* Description */ IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ hist_vec, /* Dispatch function */ IM_NUMBER( heq_args ), /* Size of arg list */ heq_args /* Arg list */ }; /* Call im_histcum via arg vector. */ static int histcum_vec( im_object *argv ) { return( im_histcum( argv[0], argv[1] ) ); } /* Description of im_histcum. */ static im_function histcum_desc = { "im_histcum", /* Name */ "turn histogram to cumulative histogram",/* Description */ IM_FN_PIO, /* Flags */ histcum_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_histnorm via arg vector. */ static int histnorm_vec( im_object *argv ) { return( im_histnorm( argv[0], argv[1] ) ); } /* Description of im_histcum. */ static im_function histnorm_desc = { "im_histnorm", /* Name */ "form normalised histogram",/* Description */ IM_FN_PIO, /* Flags */ histnorm_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_histeq via arg vector. */ static int histeq_vec( im_object *argv ) { return( im_histeq( argv[0], argv[1] ) ); } /* Description of im_histeq. */ static im_function histeq_desc = { "im_histeq", /* Name */ "form histogram equalistion LUT",/* Description */ IM_FN_PIO, /* Flags */ histeq_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_histgr via arg vector. */ static int histgr_vec( im_object *argv ) { int bn = *((int *) argv[2]); return( im_histgr( argv[0], argv[1], bn ) ); } /* Description of im_histgr. */ static im_function histgr_desc = { "im_histgr", /* Name */ "find histogram of image", /* Description */ IM_FN_TRANSFORM, /* Flags */ histgr_vec, /* Dispatch function */ IM_NUMBER( heq_args ), /* Size of arg list */ heq_args /* Arg list */ }; /* Call im_histnD() via arg vector. */ static int histnD_vec( im_object *argv ) { int bins = *((int *) argv[2]); return( im_histnD( argv[0], argv[1], bins ) ); } /* Args for im_histnD(). */ static im_arg_desc histnD_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "bins" ) }; /* Description of im_histnD(). */ static im_function histnD_desc = { "im_histnD", /* Name */ "find 1D, 2D or 3D histogram of image", /* Description */ IM_FN_TRANSFORM, /* Flags */ histnD_vec, /* Dispatch function */ IM_NUMBER( histnD_args ), /* Size of arg list */ histnD_args /* Arg list */ }; /* Call im_histplot via arg vector. */ static int histplot_vec( im_object *argv ) { return( im_histplot( argv[0], argv[1] ) ); } /* Description of im_histplot. */ static im_function histplot_desc = { "im_histplot", /* Name */ "plot graph of histogram", /* Description */ IM_FN_PIO, /* Flags */ histplot_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args for im_histspec. */ static im_arg_desc histspec_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_IMAGE( "ref" ), IM_OUTPUT_IMAGE( "out" ), }; /* Call im_histspec via arg vector. */ static int histspec_vec( im_object *argv ) { return( im_histspec( argv[0], argv[1], argv[2] ) ); } /* Description of im_histspec. */ static im_function histspec_desc = { "im_histspec", /* Name */ "find histogram which will make pdf of in match ref", 0, /* Flags */ histspec_vec, /* Dispatch function */ IM_NUMBER( histspec_args ), /* Size of arg list */ histspec_args /* Arg list */ }; /* Call im_hsp via arg vector. */ static int hsp_vec( im_object *argv ) { return( im_hsp( argv[0], argv[1], argv[2] ) ); } /* Description of im_hsp. */ static im_function hsp_desc = { "im_hsp", /* Name */ "match stats of in to stats of ref", 0, /* Flags */ hsp_vec, /* Dispatch function */ IM_NUMBER( histspec_args ), /* Size of arg list */ histspec_args /* Arg list */ }; /* Args for im_identity. */ static im_arg_desc identity_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "nbands" ) }; /* Call im_identity via arg vector. */ static int identity_vec( im_object *argv ) { int nb = *((int *) argv[1]); return( im_identity( argv[0], nb ) ); } /* Description of im_identity. */ static im_function identity_desc = { "im_identity", /* Name */ "generate identity histogram", 0, /* Flags */ identity_vec, /* Dispatch function */ IM_NUMBER( identity_args ), /* Size of arg list */ identity_args /* Arg list */ }; /* Args for im_identity_ushort. */ static im_arg_desc identity_ushort_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "nbands" ), IM_INPUT_INT( "size" ) }; /* Call im_identity_ushort via arg vector. */ static int identity_ushort_vec( im_object *argv ) { int nb = *((int *) argv[1]); int sz = *((int *) argv[2]); return( im_identity_ushort( argv[0], nb, sz ) ); } /* Description of im_identity_ushort. */ static im_function identity_ushort_desc = { "im_identity_ushort", /* Name */ "generate ushort identity histogram", 0, /* Flags */ identity_ushort_vec, /* Dispatch function */ IM_NUMBER( identity_ushort_args ), /* Size of arg list */ identity_ushort_args /* Arg list */ }; /* Args for im_lhisteq. */ static im_arg_desc lhisteq_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ) }; /* Call im_lhisteq via arg vector. */ static int lhisteq_vec( im_object *argv ) { int xw = *((int *) argv[2]); int yw = *((int *) argv[3]); return( im_lhisteq( argv[0], argv[1], xw, yw ) ); } /* Description of im_lhisteq. */ static im_function lhisteq_desc = { "im_lhisteq", /* Name */ "local histogram equalisation", IM_FN_PIO, /* Flags */ lhisteq_vec, /* Dispatch function */ IM_NUMBER( lhisteq_args ), /* Size of arg list */ lhisteq_args /* Arg list */ }; /* Args for im_maplut. */ static im_arg_desc maplut_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMAGE( "lut" ) }; /* Call im_maplut via arg vector. */ static int maplut_vec( im_object *argv ) { return( im_maplut( argv[0], argv[1], argv[2] ) ); } /* Description of im_maplut. */ static im_function maplut_desc = { "im_maplut", /* Name */ "map image through LUT", IM_FN_PIO, /* Flags */ maplut_vec, /* Dispatch function */ IM_NUMBER( maplut_args ), /* Size of arg list */ maplut_args /* Arg list */ }; /* Call im_project() via arg vector. */ static int project_vec( im_object *argv ) { return( im_project( argv[0], argv[1], argv[2] ) ); } /* Args for im_project(). */ static im_arg_desc project_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "hout" ), IM_OUTPUT_IMAGE( "vout" ) }; /* Description of im_project(). */ static im_function project_desc = { "im_project", /* Name */ "find horizontal and vertical projections of an image", IM_FN_TRANSFORM, /* Flags */ project_vec, /* Dispatch function */ IM_NUMBER( project_args ), /* Size of arg list */ project_args /* Arg list */ }; /* Args for im_stdif. */ static im_arg_desc stdif_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "a" ), IM_INPUT_DOUBLE( "m0" ), IM_INPUT_DOUBLE( "b" ), IM_INPUT_DOUBLE( "s0" ), IM_INPUT_INT( "xw" ), IM_INPUT_INT( "yw" ) }; /* Call im_stdif via arg vector. */ static int stdif_vec( im_object *argv ) { double a = *((double *) argv[2]); double m0 = *((double *) argv[3]); double b = *((double *) argv[4]); double s0 = *((double *) argv[5]); int xw = *((int *) argv[6]); int yw = *((int *) argv[7]); return( im_stdif( argv[0], argv[1], a, m0, b, s0, xw, yw ) ); } /* Description of im_stdif. */ static im_function stdif_desc = { "im_stdif", /* Name */ "statistical differencing", IM_FN_PIO, /* Flags */ stdif_vec, /* Dispatch function */ IM_NUMBER( stdif_args ), /* Size of arg list */ stdif_args /* Arg list */ }; /* Args for im_buildlut. */ static im_arg_desc buildlut_args[] = { IM_INPUT_DMASK( "xyes" ), IM_OUTPUT_IMAGE( "lut" ) }; /* Call im_buildlut via arg vector. */ static int buildlut_vec( im_object *argv ) { im_mask_object *mi = argv[0]; return( im_buildlut( mi->mask, argv[1] ) ); } /* Description of im_buildlut. */ static im_function buildlut_desc = { "im_buildlut", /* Name */ "generate LUT table from set of x/y positions", 0, /* Flags */ buildlut_vec, /* Dispatch function */ IM_NUMBER( buildlut_args ),/* Size of arg list */ buildlut_args /* Arg list */ }; /* Args for im_invertlut. */ static im_arg_desc invertlut_args[] = { IM_INPUT_DMASK( "measures" ), IM_OUTPUT_IMAGE( "lut" ), IM_INPUT_INT( "lut_size" ) }; /* Call im_invertlut via arg vector. */ static int invertlut_vec( im_object *argv ) { im_mask_object *mi = argv[0]; int lut_size = *((int *) argv[2]); return( im_invertlut( mi->mask, argv[1], lut_size ) ); } /* Description of im_invertlut. */ static im_function invertlut_desc = { "im_invertlut", /* Name */ "generate correction table from set of measures", 0, /* Flags */ invertlut_vec, /* Dispatch function */ IM_NUMBER( invertlut_args ),/* Size of arg list */ invertlut_args /* Arg list */ }; /* Args for im_tone_build. */ static im_arg_desc tone_build_args[] = { IM_OUTPUT_IMAGE( "hist" ), IM_INPUT_DOUBLE( "Lb" ), IM_INPUT_DOUBLE( "Lw" ), IM_INPUT_DOUBLE( "Ps" ), IM_INPUT_DOUBLE( "Pm" ), IM_INPUT_DOUBLE( "Ph" ), IM_INPUT_DOUBLE( "S" ), IM_INPUT_DOUBLE( "M" ), IM_INPUT_DOUBLE( "H" ) }; /* Call im_tone_build via arg vector. */ static int tone_build_vec( im_object *argv ) { double Lb = *((double *) argv[1]); double Lw = *((double *) argv[2]); double Ps = *((double *) argv[3]); double Pm = *((double *) argv[4]); double Ph = *((double *) argv[5]); double S = *((double *) argv[6]); double M = *((double *) argv[7]); double H = *((double *) argv[8]); return( im_tone_build( argv[0], Lb, Lw, Ps, Pm, Ph, S, M, H ) ); } /* Description of im_tone_build. */ static im_function tone_build_desc = { "im_tone_build", /* Name */ "create LUT for tone adjustment of LabS images", 0, /* Flags */ tone_build_vec, /* Dispatch function */ IM_NUMBER( tone_build_args ), /* Size of arg list */ tone_build_args /* Arg list */ }; /* Args for im_tone_build_range. */ static im_arg_desc tone_build_range_args[] = { IM_OUTPUT_IMAGE( "hist" ), IM_INPUT_INT( "in_max" ), IM_INPUT_INT( "out_max" ), IM_INPUT_DOUBLE( "Lb" ), IM_INPUT_DOUBLE( "Lw" ), IM_INPUT_DOUBLE( "Ps" ), IM_INPUT_DOUBLE( "Pm" ), IM_INPUT_DOUBLE( "Ph" ), IM_INPUT_DOUBLE( "S" ), IM_INPUT_DOUBLE( "M" ), IM_INPUT_DOUBLE( "H" ) }; /* Call im_tone_build_range via arg vector. */ static int tone_build_range_vec( im_object *argv ) { int in_max = *((int *) argv[1]); int out_max = *((int *) argv[2]); double Lb = *((double *) argv[3]); double Lw = *((double *) argv[4]); double Ps = *((double *) argv[5]); double Pm = *((double *) argv[6]); double Ph = *((double *) argv[7]); double S = *((double *) argv[8]); double M = *((double *) argv[9]); double H = *((double *) argv[10]); return( im_tone_build_range( argv[0], in_max, out_max, Lb, Lw, Ps, Pm, Ph, S, M, H ) ); } /* Description of im_tone_build_range. */ static im_function tone_build_range_desc = { "im_tone_build_range", /* Name */ "create LUT for tone adjustment", 0, /* Flags */ tone_build_range_vec, /* Dispatch function */ IM_NUMBER( tone_build_range_args ),/* Size of arg list */ tone_build_range_args /* Arg list */ }; /* Args for im_tone_analyse. */ static im_arg_desc tone_analyse_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "hist" ), IM_INPUT_DOUBLE( "Ps" ), IM_INPUT_DOUBLE( "Pm" ), IM_INPUT_DOUBLE( "Ph" ), IM_INPUT_DOUBLE( "S" ), IM_INPUT_DOUBLE( "M" ), IM_INPUT_DOUBLE( "H" ) }; /* Call im_tone_analyse via arg vector. */ static int tone_analyse_vec( im_object *argv ) { double Ps = *((double *) argv[2]); double Pm = *((double *) argv[3]); double Ph = *((double *) argv[4]); double S = *((double *) argv[5]); double M = *((double *) argv[6]); double H = *((double *) argv[7]); return( im_tone_analyse( argv[0], argv[1], Ps, Pm, Ph, S, M, H ) ); } /* Description of im_tone_analyse. */ static im_function tone_analyse_desc = { "im_tone_analyse", /* Name */ "analyse in and create LUT for tone adjustment", 0, /* Flags */ tone_analyse_vec, /* Dispatch function */ IM_NUMBER( tone_analyse_args ), /* Size of arg list */ tone_analyse_args /* Arg list */ }; /* Args for im_ismonotonic. */ static im_arg_desc ismonotonic_args[] = { IM_INPUT_IMAGE( "lut" ), IM_OUTPUT_INT( "mono" ) }; /* Call im_ismonotonic via arg vector. */ static int ismonotonic_vec( im_object *argv ) { int *res = (int *) argv[1]; return( im_ismonotonic( argv[0], res ) ); } /* Description of im_ismonotonic. */ static im_function ismonotonic_desc = { "im_ismonotonic", /* Name */ "test LUT for monotonicity", 0, /* Flags */ ismonotonic_vec, /* Dispatch function */ IM_NUMBER( ismonotonic_args ), /* Size of arg list */ ismonotonic_args /* Arg list */ }; /* Args for im_tone_map */ static im_arg_desc tone_map_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMAGE( "lut" ) }; /* Call im_tone_map via arg vector. */ static int tone_map_vec( im_object *argv ) { return( im_tone_map( argv[0], argv[1], argv[2] ) ); } /* Description of im_tone_map. */ static im_function tone_map_desc = { "im_tone_map", /* Name */ "map L channel of LabS or LabQ image through LUT", IM_FN_PIO, /* Flags */ tone_map_vec, /* Dispatch function */ IM_NUMBER( tone_map_args ),/* Size of arg list */ tone_map_args /* Arg list */ }; /* Args for im_mpercent. */ static im_arg_desc mpercent_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_DOUBLE( "percent" ), IM_OUTPUT_INT( "thresh" ) }; /* Call im_mpercent via arg vector. */ static int mpercent_vec( im_object *argv ) { double percent = *((double *) argv[1]); return( im_mpercent( argv[0], percent, argv[2] ) ); } /* Description of im_mpercent. */ static im_function mpercent_desc = { "im_mpercent", /* Name */ "find threshold above which there are percent values", 0, /* Flags */ mpercent_vec, /* Dispatch function */ IM_NUMBER( mpercent_args ), /* Size of arg list */ mpercent_args /* Arg list */ }; /* Package up all these functions. */ static im_function *hist_list[] = { &gammacorrect_desc, &heq_desc, &hist_desc, &histcum_desc, &histeq_desc, &histindexed_desc, &histgr_desc, &histnD_desc, &histnorm_desc, &histplot_desc, &histspec_desc, &hsp_desc, &identity_desc, &identity_ushort_desc, &ismonotonic_desc, &lhisteq_desc, &mpercent_desc, &invertlut_desc, &buildlut_desc, &maplut_desc, &project_desc, &stdif_desc, &tone_analyse_desc, &tone_build_desc, &tone_build_range_desc, &tone_map_desc }; /* Package of functions. */ im_package im__histograms_lut = { "histograms_lut", IM_NUMBER( hist_list ), hist_list }; vips-7.38.5/libvips/deprecated/im_slice.c0000644000175000017500000000754112303140253015220 00000000000000/* @(#) Slices an image using two thresholds. Works for any non-complex type. * @(#) Output has three levels 0 128 and 255. Values below or = t1 are 0, * @(#) above t2 are 255 and the remaining are 128. * @(#) Input is either memory mapped or in a buffer. * @(#) It is implied that t1 is less than t2; however the program checks * @(#) if they are the wrong way and swaps them * @(#) * @(#) int im_slice(in, out, t1, t2) * @(#) IMAGE *in, *out; * @(#) double t1, t2; * @(#) * @(#) Returns 0 on success and -1 on error * * Copyright: 1991, N. Dessipris * * Author: N. Dessipris * Written on: 15/03/1991 * Modified on : */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #define BRIGHT 255 #define GREY 128 #define DARK 0 /* Useful: Call a macro with the name, type pairs for all VIPS functions. */ #define im_for_all_types(A) \ case IM_BANDFMT_UCHAR: A(unsigned char); break; \ case IM_BANDFMT_CHAR: A(signed char); break; \ case IM_BANDFMT_USHORT: A(unsigned short); break; \ case IM_BANDFMT_SHORT: A(signed short); break; \ case IM_BANDFMT_UINT: A(unsigned int); break; \ case IM_BANDFMT_INT: A(signed int); break; \ case IM_BANDFMT_FLOAT: A(float); break; /* Replacement for im_slice */ int im_slice( in, out, t1, t2 ) IMAGE *in, *out; double t1, t2; { int x, y, z; PEL *bu; /* Buffer we write to */ int s, epl; /* Size and els per line */ double thresh1, thresh2; /* Check our args. */ if( im_iocheck( in, out ) ) { im_error( "im_slice", "%s", _( "im_iocheck failed") ); return( -1 ); } if( in->Coding != IM_CODING_NONE ) { im_error( "im_slice", "%s", _( "input should be uncoded") ); return( -1 ); } /* Set up the output header. */ if( im_cp_desc( out, in ) ) { im_error( "im_slice", "%s", _( "im_cp_desc failed") ); return( -1 ); } out->BandFmt = IM_BANDFMT_UCHAR; if( im_setupout( out ) ) { im_error( "im_slice", "%s", _( "im_setupout failed") ); return( -1 ); } if ( t1 <= t2 ) { thresh1 = t1; thresh2 = t2; } else { thresh1 = t2; thresh2 = t1; } /* Make buffer for building o/p in. */ epl = in->Xsize * in->Bands; s = epl * sizeof( PEL ); if( (bu = (PEL *) im_malloc( out, (unsigned)s )) == NULL ) return( -1 ); /* Define what we do for each band element type. */ #define im_slice_loop(TYPE)\ { TYPE *a = (TYPE *) in->data;\ \ for( y = 0; y < in->Ysize; y++ ) {\ PEL *b = bu;\ \ for( x = 0; x < in->Xsize; x++ )\ for( z = 0; z < in->Bands; z++ ) {\ double f = (double) *a++;\ if ( f <= thresh1)\ *b++ = (PEL)DARK;\ else if ( f > thresh2 )\ *b++ = (PEL)BRIGHT;\ else \ *b++ = (PEL)GREY;\ }\ \ if( im_writeline( y, out, bu ) )\ return( -1 );\ }\ } /* Do the above for all image types. */ switch( in->BandFmt ) { im_for_all_types( im_slice_loop ); default: im_error( "im_slice", "%s", _( "Unknown input format") ); return( -1 ); } return( 0 ); } vips-7.38.5/libvips/deprecated/im_print.c0000644000175000017500000000232212303140253015245 00000000000000/* im_print(): print a string to stdout */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /* Print a string to stdout, with a "\n". Sometimes useful for debugging * language bindings. */ int im_print( const char *message ) { printf( "%s\n", message ); return( 0 ); } vips-7.38.5/libvips/deprecated/im_convsub.c0000644000175000017500000002216212303140253015574 00000000000000/* @(#) Function which convolves and subsamples VASARI format picture * @(#) with a mask stored in a file argument. * @(#) * @(#) int im_convsub( in, out, mask, xskip, yskip ) * @(#) IMAGE *in, *out; * @(#) INTMASK *mask; details in vips.h * @(#) int xskip, yskip; is the subsamping factor along both directions * @(#) * @(#) Returns either 0 (sucess) or -1 (fail) * @(#) * @(#) Picture can have any number of channels (max 64). * @(#) It is assummed that the output picture is subsampled on * @(#) both directions by a factor of xskip horizontally and yskip vertically. * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 29/04/1991 * Modified on: */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* Create multiplication luts for all non zero elements of the original mask; * which is kept in buffer of length buffersize * cnt is needed for freeing luts */ static int im__create_int_luts( int *buffer, int buffersize, int **orig_luts, int **luts, int *cnt ) { int *pbuffer; int *buf1, *buf2, *pbuf1, *pbuf2; int i, j; int min, max; int mark; /* used to mark the buffer mark = max+1 */ int counter; /* counts the no of unique elms in mask; returned in cnt*/ buf1 = (int*)calloc( (unsigned)buffersize, sizeof(int) ); buf2 = (int*)calloc( (unsigned)buffersize, sizeof(int) ); if ( ( buf1 == NULL ) || ( buf2 == NULL ) ) { im_error( "im_create_int_luts", "%s", _( "calloc failed (1)") ); return( -1 ); } pbuffer = buffer; pbuf1 = buf1; /* find max and copy mask to buf1 */ max = *pbuffer; for ( i=0; i < buffersize; i++ ) { if ( *pbuffer > max ) max = *pbuffer; *pbuf1++ = *pbuffer++; } mark = max + 1; pbuf1 = buf1; pbuf2 = buf2; counter = 0; /* find a min at a time; put it into buf2 and mark all values of * buf1 equal to found min, to INT_MAX */ for ( i=0; i < buffersize; i++ ) { min = mark + 1; /* force min to be greater than mark */ pbuf1 = buf1; /* find a min */ for ( j=0; j < buffersize; j++ ) { if ( *pbuf1 < min ) min = *pbuf1; pbuf1++; } if ( min == mark ) /* all min are found */ break; *pbuf2++ = min; counter++; pbuf1 = buf1; for ( j=0; j < buffersize; j++ ) /* mark values equal to min */ { if ( *pbuf1 == min ) *pbuf1 = mark; pbuf1++; } } /* buf2 should keep now counter unique values of the mask, descending order * Malloc counter luts and initialise them */ pbuf2 = buf2; for ( i=0; ixsize * m->ysize */ int **lut_orig, **lut; int lutcnt = 0; int rounding, sum; int tempsize; /* Check input, output and vars */ if ((xskip < 1)||(yskip < 1)) { im_error( "im_convsub", "%s", _( "xskip and yskip must be >= 1") ); return(-1); } if (im_iocheck(in, out) == -1) return( -1 ); if ( (in->Coding != IM_CODING_NONE)|| (in->BandFmt != IM_BANDFMT_UCHAR) ) { im_error( "im_convsub", "%s", _( "nput should be unsigned char uncoded") ); return(-1); } /* Prepare output */ if (im_cp_desc(out, in) == -1) return( -1 ); tempsize = in->Xsize/xskip; while ( 1 ) { if ( tempsize * xskip + m->xsize < in->Xsize ) break; else tempsize--; if ( tempsize < 0 ) break; } out->Xsize = tempsize; tempsize = in->Ysize/yskip; while ( 1 ) { if ( tempsize * yskip + m->ysize < in->Ysize ) break; else tempsize--; if ( tempsize < 0 ) break; } out->Ysize = tempsize; if ( ( out->Xsize < 2 )||( out->Ysize < 2 ) ) { im_error( "im_convsub", "%s", _( "too small output sizes") ); return(-1); } if( im_setupout(out) == -1) return(-1); /* Malloc one line of output data */ os = out->Xsize * out->Bands; if ( (line=(PEL*)calloc( (unsigned)os, sizeof(char))) == NULL) { im_error( "im_convsub", "%s", _( "unable to calloc(1)") ); return(-1); } /* Malloc pointers and put them at correct location */ ms = m->xsize * m->ysize; count = 0; /* exclude the non-zero elms */ pm = m->coeff; for ( i=0; idata; pm = m->coeff; pnewm = newm; for (y=0; yysize; y++) { for (x=0; xxsize; x++) { if ( *pm != 0 ) { *pnewm++ = *pm; pnt[i] = (input +(x + y*in->Xsize) * in->Bands); i++; } pm++; } } if ( i != count ) { im_error( "im_convsub", "%s", _( "impossible state") ); return(-1); } /* Malloc pointers; not all lut_orig are used necessarily */ lut_orig = (int**)calloc((unsigned)count, sizeof(int**) ); lut = (int**)calloc((unsigned)count, sizeof(int**) ); if ( (lut == NULL) || (lut_orig == NULL) ) { im_error( "im_conv", "%s", _( "unable to calloc(1)") ); return(-1); } /* Create luts; count is needed for freeing pointers. Not all lut_orig are used * if zero elms are detected. */ if ( im__create_int_luts(newm, count, lut_orig, lut, &lutcnt ) == -1 ) { im_error( "im_convsub", "%s", _( "im_create_int_luts failed") ); return(-1); } rounding = m->scale/2; /* Output out->Ysize processed lines */ for(y=0; y < out->Ysize; y++) { cpline = line; for (i=0; iXsize * in->Bands * yskip ); } /* process out->Xsize points */ for( x = 0; x < out->Xsize; x++ ) { for (i=0; iBands; } for ( b=0; bBands; b++ ) { sum = 0; for (i=0; iscale ) + m->offset; if ( sum < (int)0 ) { n_clipped++; sum = (int)0; } else if ( sum > (int)255) { p_clipped++; sum = (int)255; } *cpline++ = (unsigned char)sum; } } /* Output the calculated line */ if ( im_writeline(y, out, (PEL*)line) == -1 ) { free((char*)line); free((char*)newm); free((char*)pnts); free((char*)cpnt1s); free((char*)cpnt2s); for ( i=0; i #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include int im_fits2vips( const char *filename, VipsImage *out ) { VipsImage *t; if( vips_fitsload( filename, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_vips2fits( VipsImage *in, const char *filename ) { if( vips_fitssave( in, filename, NULL ) ) return( -1 ); return( 0 ); } static int isfits( const char *name ) { return( vips_foreign_is_a( "fitsload", name ) ); } static const char *fits_suffs[] = { ".fits", NULL }; /* fits format adds no new members. */ typedef VipsFormat VipsFormatFits; typedef VipsFormatClass VipsFormatFitsClass; static void vips_format_fits_class_init( VipsFormatFitsClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "fits"; object_class->description = _( "FITS" ); format_class->is_a = isfits; format_class->load = im_fits2vips; format_class->save = im_vips2fits; format_class->suffs = fits_suffs; } static void vips_format_fits_init( VipsFormatFits *object ) { } G_DEFINE_TYPE( VipsFormatFits, vips_format_fits, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/matlab.c0000644000175000017500000000403512303140253014667 00000000000000/* Read matlab save files with libmatio * * 20/12/11 * - just a compat stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include int im_mat2vips( const char *filename, IMAGE *out ) { VipsImage *t; if( vips_matload( filename, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static int ismat( const char *filename ) { return( vips_foreign_is_a( "matload", filename ) ); } static const char *mat_suffs[] = { ".mat", NULL }; typedef VipsFormat VipsFormatMat; typedef VipsFormatClass VipsFormatMatClass; static void vips_format_mat_class_init( VipsFormatMatClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "mat"; object_class->description = _( "Matlab" ); format_class->is_a = ismat; format_class->load = im_mat2vips; format_class->save = NULL; format_class->suffs = mat_suffs; } static void vips_format_mat_init( VipsFormatMat *object ) { } G_DEFINE_TYPE( VipsFormatMat, vips_format_mat, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_analyze2vips.c0000644000175000017500000000440212303140253016541 00000000000000/* Read a Analyze file. Old-style header (so called 7.5 format). * * 14/12/11 * - just a compat stub now */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include "../foreign/dbh.h" #include "../foreign/analyze2vips.h" static VipsFormatFlags analyze_flags( const char *filename ) { return( (VipsFormatFlags) vips_foreign_flags( "analyzeload", filename ) ); } static int isanalyze( const char *filename ) { return( vips_foreign_is_a( "analyzeload", filename ) ); } int im_analyze2vips( const char *filename, IMAGE *out ) { return( vips__analyze_read( filename, out ) ); return( 0 ); } static const char *analyze_suffs[] = { ".img", ".hdr", NULL }; typedef VipsFormat VipsFormatAnalyze; typedef VipsFormatClass VipsFormatAnalyzeClass; static void vips_format_analyze_class_init( VipsFormatAnalyzeClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "analyze"; object_class->description = _( "Analyze 6.0" ); format_class->is_a = isanalyze; format_class->load = im_analyze2vips; format_class->get_flags = analyze_flags; format_class->suffs = analyze_suffs; } static void vips_format_analyze_init( VipsFormatAnalyze *object ) { } G_DEFINE_TYPE( VipsFormatAnalyze, vips_format_analyze, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/colour_dispatch.c0000644000175000017500000005727112303140253016623 00000000000000/* Function dispatch tables for arithmetic. * * J. Cupitt, 8/4/93. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /* One image in, one out. */ static im_arg_desc one_in_one_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Two images in, one out. */ static im_arg_desc two_in_one_out[] = { IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_sRGB2XYZ via arg vector. */ static int sRGB2XYZ_vec( im_object *argv ) { return( im_sRGB2XYZ( argv[0], argv[1] ) ); } /* Description of im_sRGB2XYZ. */ static im_function sRGB2XYZ_desc = { "im_sRGB2XYZ", /* Name */ "convert sRGB to XYZ", /* Description */ IM_FN_PIO, /* Flags */ sRGB2XYZ_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_XYZ2sRGB via arg vector. */ static int XYZ2sRGB_vec( im_object *argv ) { return( im_XYZ2sRGB( argv[0], argv[1] ) ); } /* Description of im_XYZ2sRGB. */ static im_function XYZ2sRGB_desc = { "im_XYZ2sRGB", /* Name */ "convert XYZ to sRGB", /* Description */ IM_FN_PIO, /* Flags */ XYZ2sRGB_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_LCh2Lab via arg vector. */ static int LCh2Lab_vec( im_object *argv ) { return( im_LCh2Lab( argv[0], argv[1] ) ); } /* Description of im_LCh2Lab. */ static im_function LCh2Lab_desc = { "im_LCh2Lab", /* Name */ "convert LCh to Lab", /* Description */ IM_FN_PIO, /* Flags */ LCh2Lab_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_LabQ2XYZ via arg vector. */ static int LabQ2XYZ_vec( im_object *argv ) { return( im_LabQ2XYZ( argv[0], argv[1] ) ); } /* Description of im_LabQ2XYZ. */ static im_function LabQ2XYZ_desc = { "im_LabQ2XYZ", /* Name */ "convert LabQ to XYZ", /* Description */ IM_FN_PIO, /* Flags */ LabQ2XYZ_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_LCh2UCS via arg vector. */ static int LCh2UCS_vec( im_object *argv ) { return( im_LCh2UCS( argv[0], argv[1] ) ); } /* Description of im_LCh2UCS. */ static im_function LCh2UCS_desc = { "im_LCh2UCS", /* Name */ "convert LCh to UCS", /* Description */ IM_FN_PIO, /* Flags */ LCh2UCS_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_Lab2LCh via arg vector. */ static int Lab2LCh_vec( im_object *argv ) { return( im_Lab2LCh( argv[0], argv[1] ) ); } /* Description of im_Lab2LCh. */ static im_function Lab2LCh_desc = { "im_Lab2LCh", /* Name */ "convert Lab to LCh", /* Description */ IM_FN_PIO, /* Flags */ Lab2LCh_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_Lab2LabQ() via arg vector. */ static int Lab2LabQ_vec( im_object *argv ) { return( im_Lab2LabQ( argv[0], argv[1] ) ); } /* Description of im_Lab2LabQ. */ static im_function Lab2LabQ_desc = { "im_Lab2LabQ", /* Name */ "convert Lab to LabQ", /* Description */ IM_FN_PIO, /* Flags */ Lab2LabQ_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_Lab2XYZ() via arg vector. */ static int Lab2XYZ_vec( im_object *argv ) { return( im_Lab2XYZ( argv[0], argv[1] ) ); } /* Description of im_Lab2XYZ. */ static im_function Lab2XYZ_desc = { "im_Lab2XYZ", /* Name */ "convert D65 Lab to XYZ", /* Description */ IM_FN_PIO, /* Flags */ Lab2XYZ_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; static int icc_present_vec( im_object *argv ) { int *present = ((int *) argv[0]); *present = im_icc_present(); return( 0 ); } static im_arg_desc icc_present_args[] = { IM_OUTPUT_INT( "present" ) }; /* Description of im_icc_present. */ static im_function icc_present_desc = { "im_icc_present", /* Name */ "test for presence of ICC library", /* Description */ 0, /* Flags */ icc_present_vec, /* Dispatch function */ IM_NUMBER( icc_present_args ), /* Size of arg list */ icc_present_args /* Arg list */ }; static int icc_transform_vec( im_object *argv ) { int intent = *((int *) argv[4]); return( im_icc_transform( argv[0], argv[1], argv[2], argv[3], intent ) ); } static im_arg_desc icc_transform_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_STRING( "input_profile" ), IM_INPUT_STRING( "output_profile" ), IM_INPUT_INT( "intent" ) }; /* Description of im_icc_transform. */ static im_function icc_transform_desc = { "im_icc_transform", /* Name */ "convert between two device images with a pair of ICC profiles", /* Description */ IM_FN_PIO, /* Flags */ icc_transform_vec, /* Dispatch function */ IM_NUMBER( icc_transform_args ), /* Size of arg list */ icc_transform_args /* Arg list */ }; static int icc_import_embedded_vec( im_object *argv ) { int intent = *((int *) argv[2]); return( im_icc_import_embedded( argv[0], argv[1], intent ) ); } static im_arg_desc icc_import_embedded_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "intent" ) }; /* Description of im_icc_import_embedded. */ static im_function icc_import_embedded_desc = { "im_icc_import_embedded", /* Name */ "convert a device image to float LAB using the embedded profile", /* Description */ IM_FN_PIO, /* Flags */ icc_import_embedded_vec, /* Dispatch function */ IM_NUMBER( icc_import_embedded_args ), /* Size of arg list */ icc_import_embedded_args /* Arg list */ }; static int icc_import_vec( im_object *argv ) { int intent = *((int *) argv[3]); return( im_icc_import( argv[0], argv[1], argv[2], intent ) ); } static im_arg_desc icc_import_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_STRING( "input_profile" ), IM_INPUT_INT( "intent" ) }; /* Description of im_icc_import. */ static im_function icc_import_desc = { "im_icc_import", /* Name */ "convert a device image to float LAB with an ICC profile", /* Description */ IM_FN_PIO, /* Flags */ icc_import_vec, /* Dispatch function */ IM_NUMBER( icc_import_args ), /* Size of arg list */ icc_import_args /* Arg list */ }; static int icc_export_depth_vec( im_object *argv ) { int intent = *((int *) argv[4]); int depth = *((int *) argv[2]); return( im_icc_export_depth( argv[0], argv[1], depth, argv[3], intent ) ); } static im_arg_desc icc_export_depth_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "depth" ), IM_INPUT_STRING( "output_profile" ), IM_INPUT_INT( "intent" ) }; /* Description of im_icc_export_depth. */ static im_function icc_export_depth_desc = { "im_icc_export_depth", /* Name */ "convert a float LAB to device space with an ICC profile", /* Description */ IM_FN_PIO, /* Flags */ icc_export_depth_vec, /* Dispatch function */ IM_NUMBER( icc_export_depth_args ), /* Size of arg list */ icc_export_depth_args /* Arg list */ }; static int icc_ac2rc_vec( im_object *argv ) { return( im_icc_ac2rc( argv[0], argv[1], argv[2] ) ); } static im_arg_desc icc_ac2rc_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_STRING( "profile" ) }; /* Description of im_icc_ac2rc. */ static im_function icc_ac2rc_desc = { "im_icc_ac2rc", /* Name */ "convert LAB from AC to RC using an ICC profile", /* Description */ IM_FN_PIO, /* Flags */ icc_ac2rc_vec, /* Dispatch function */ IM_NUMBER( icc_ac2rc_args ), /* Size of arg list */ icc_ac2rc_args /* Arg list */ }; static int Lab2XYZ_temp_vec( im_object *argv ) { double X0 = *((double *) argv[2]); double Y0 = *((double *) argv[3]); double Z0 = *((double *) argv[4]); return( im_Lab2XYZ_temp( argv[0], argv[1], X0, Y0, Z0 ) ); } static im_arg_desc temp_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "X0" ), IM_INPUT_DOUBLE( "Y0" ), IM_INPUT_DOUBLE( "Z0" ) }; /* Description of im_Lab2XYZ_temp. */ static im_function Lab2XYZ_temp_desc = { "im_Lab2XYZ_temp", /* Name */ "convert Lab to XYZ, with a specified colour temperature", /* Description */ IM_FN_PIO, /* Flags */ Lab2XYZ_temp_vec, /* Dispatch function */ IM_NUMBER( temp_args ), /* Size of arg list */ temp_args /* Arg list */ }; /* Call im_Lab2UCS() via arg vector. */ static int Lab2UCS_vec( im_object *argv ) { return( im_Lab2UCS( argv[0], argv[1] ) ); } /* Description of im_Lab2UCS. */ static im_function Lab2UCS_desc = { "im_Lab2UCS", /* Name */ "convert Lab to UCS", /* Description */ IM_FN_PIO, /* Flags */ Lab2UCS_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_LabQ2Lab() via arg vector. */ static int LabQ2Lab_vec( im_object *argv ) { return( im_LabQ2Lab( argv[0], argv[1] ) ); } /* Description of im_LabQ2Lab. */ static im_function LabQ2Lab_desc = { "im_LabQ2Lab", /* Name */ "convert LabQ to Lab", /* Description */ IM_FN_PIO, /* Flags */ LabQ2Lab_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_rad2float() via arg vector. */ static int rad2float_vec( im_object *argv ) { return( im_rad2float( argv[0], argv[1] ) ); } /* Description of im_rad2float. */ static im_function rad2float_desc = { "im_rad2float", /* Name */ "convert Radiance packed to float", /* Description */ IM_FN_PIO, /* Flags */ rad2float_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_float2rad() via arg vector. */ static int float2rad_vec( im_object *argv ) { return( im_float2rad( argv[0], argv[1] ) ); } /* Description of im_float2rad */ static im_function float2rad_desc = { "im_float2rad", /* Name */ "convert float to Radiance packed", /* Description */ IM_FN_PIO, /* Flags */ float2rad_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_LabQ2LabS() via arg vector. */ static int LabQ2LabS_vec( im_object *argv ) { return( im_LabQ2LabS( argv[0], argv[1] ) ); } /* Description of im_LabQ2LabS. */ static im_function LabQ2LabS_desc = { "im_LabQ2LabS", /* Name */ "convert LabQ to LabS", /* Description */ IM_FN_PIO, /* Flags */ LabQ2LabS_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_Lab2LabS() via arg vector. */ static int Lab2LabS_vec( im_object *argv ) { return( im_Lab2LabS( argv[0], argv[1] ) ); } /* Description of im_Lab2LabS. */ static im_function Lab2LabS_desc = { "im_Lab2LabS", /* Name */ "convert Lab to LabS", /* Description */ IM_FN_PIO, /* Flags */ Lab2LabS_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_LabS2Lab() via arg vector. */ static int LabS2Lab_vec( im_object *argv ) { return( im_LabS2Lab( argv[0], argv[1] ) ); } /* Description of im_LabS2Lab. */ static im_function LabS2Lab_desc = { "im_LabS2Lab", /* Name */ "convert LabS to Lab", /* Description */ IM_FN_PIO, /* Flags */ LabS2Lab_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_LabS2LabQ() via arg vector. */ static int LabS2LabQ_vec( im_object *argv ) { return( im_LabS2LabQ( argv[0], argv[1] ) ); } /* Description of im_LabS2LabQ. */ static im_function LabS2LabQ_desc = { "im_LabS2LabQ", /* Name */ "convert LabS to LabQ", /* Description */ IM_FN_PIO, /* Flags */ LabS2LabQ_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_UCS2XYZ() via arg vector. */ static int UCS2XYZ_vec( im_object *argv ) { return( im_UCS2XYZ( argv[0], argv[1] ) ); } /* Description of im_UCS2XYZ. */ static im_function UCS2XYZ_desc = { "im_UCS2XYZ", /* Name */ "convert UCS to XYZ", /* Description */ IM_FN_PIO, /* Flags */ UCS2XYZ_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_UCS2LCh() via arg vector. */ static int UCS2LCh_vec( im_object *argv ) { return( im_UCS2LCh( argv[0], argv[1] ) ); } /* Description of im_UCS2LCh. */ static im_function UCS2LCh_desc = { "im_UCS2LCh", /* Name */ "convert UCS to LCh", /* Description */ IM_FN_PIO, /* Flags */ UCS2LCh_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_UCS2Lab() via arg vector. */ static int UCS2Lab_vec( im_object *argv ) { return( im_UCS2Lab( argv[0], argv[1] ) ); } /* Description of im_UCS2Lab. */ static im_function UCS2Lab_desc = { "im_UCS2Lab", /* Name */ "convert UCS to Lab", /* Description */ IM_FN_PIO, /* Flags */ UCS2Lab_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_Yxy2XYZ via arg vector. */ static int Yxy2XYZ_vec( im_object *argv ) { return( im_Yxy2XYZ( argv[0], argv[1] ) ); } /* Description of im_Yxy2XYZ. */ static im_function Yxy2XYZ_desc = { "im_Yxy2XYZ", /* Name */ "convert Yxy to XYZ", /* Description */ IM_FN_PIO, /* Flags */ Yxy2XYZ_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_XYZ2Yxy via arg vector. */ static int XYZ2Yxy_vec( im_object *argv ) { return( im_XYZ2Yxy( argv[0], argv[1] ) ); } /* Description of im_XYZ2Yxy. */ static im_function XYZ2Yxy_desc = { "im_XYZ2Yxy", /* Name */ "convert XYZ to Yxy", /* Description */ IM_FN_PIO, /* Flags */ XYZ2Yxy_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_XYZ2Lab via arg vector. */ static int XYZ2Lab_vec( im_object *argv ) { return( im_XYZ2Lab( argv[0], argv[1] ) ); } /* Description of im_XYZ2Lab. */ static im_function XYZ2Lab_desc = { "im_XYZ2Lab", /* Name */ "convert D65 XYZ to Lab", /* Description */ IM_FN_PIO, /* Flags */ XYZ2Lab_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; static int XYZ2Lab_temp_vec( im_object *argv ) { double X0 = *((double *) argv[2]); double Y0 = *((double *) argv[3]); double Z0 = *((double *) argv[4]); return( im_XYZ2Lab_temp( argv[0], argv[1], X0, Y0, Z0 ) ); } /* Description of im_XYZ2Lab_temp. */ static im_function XYZ2Lab_temp_desc = { "im_XYZ2Lab_temp", /* Name */ "convert XYZ to Lab, with a specified colour temperature", /* Description */ IM_FN_PIO, /* Flags */ XYZ2Lab_temp_vec, /* Dispatch function */ IM_NUMBER( temp_args ), /* Size of arg list */ temp_args /* Arg list */ }; /* Call im_XYZ2UCS() via arg vector. */ static int XYZ2UCS_vec( im_object *argv ) { return( im_XYZ2UCS( argv[0], argv[1] ) ); } /* Description of im_XYZ2UCS. */ static im_function XYZ2UCS_desc = { "im_XYZ2UCS", /* Name */ "convert XYZ to UCS", /* Description */ IM_FN_PIO, /* Flags */ XYZ2UCS_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args to XYZ2disp and disp2XYZ. */ static im_arg_desc XYZ2disp_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DISPLAY( "disp" ) }; /* Call im_XYZ2disp() via arg vector. */ static int XYZ2disp_vec( im_object *argv ) { return( im_XYZ2disp( argv[0], argv[1], argv[2] ) ); } /* Description of im_XYZ2disp. */ static im_function XYZ2disp_desc = { "im_XYZ2disp", /* Name */ "convert XYZ to displayble", /* Description */ IM_FN_PIO, /* Flags */ XYZ2disp_vec, /* Dispatch function */ IM_NUMBER( XYZ2disp_args ), /* Size of arg list */ XYZ2disp_args /* Arg list */ }; /* Call im_Lab2disp() via arg vector. */ static int Lab2disp_vec( im_object *argv ) { return( im_Lab2disp( argv[0], argv[1], argv[2] ) ); } /* Description of im_Lab2disp. */ static im_function Lab2disp_desc = { "im_Lab2disp", /* Name */ "convert Lab to displayable", /* Description */ IM_FN_PIO, /* Flags */ Lab2disp_vec, /* Dispatch function */ IM_NUMBER( XYZ2disp_args ), /* Size of arg list */ XYZ2disp_args /* Arg list */ }; /* Call im_LabQ2disp() via arg vector. */ static int LabQ2disp_vec( im_object *argv ) { return( im_LabQ2disp( argv[0], argv[1], argv[2] ) ); } /* Description of im_LabQ2disp. */ static im_function LabQ2disp_desc = { "im_LabQ2disp", /* Name */ "convert LabQ to displayable", /* Description */ IM_FN_PIO, /* Flags */ LabQ2disp_vec, /* Dispatch function */ IM_NUMBER( XYZ2disp_args ), /* Size of arg list */ XYZ2disp_args /* Arg list */ }; /* Call im_dE00_fromLab() via arg vector. */ static int dE00_fromLab_vec( im_object *argv ) { return( im_dE00_fromLab( argv[0], argv[1], argv[2] ) ); } /* Description of im_dE00_fromLab. */ static im_function dE00_fromLab_desc = { "im_dE00_fromLab", /* Name */ "calculate delta-E CIE2000 for two Lab images", IM_FN_PIO, /* Flags */ dE00_fromLab_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_dECMC_fromLab() via arg vector. */ static int dECMC_fromLab_vec( im_object *argv ) { return( im_dECMC_fromLab( argv[0], argv[1], argv[2] ) ); } /* Description of im_dECMC_fromLab. */ static im_function dECMC_fromLab_desc = { "im_dECMC_fromLab", /* Name */ "calculate delta-E CMC(1:1) for two Lab images", IM_FN_PIO, /* Flags */ dECMC_fromLab_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_dE_fromXYZ() via arg vector. */ static int dE_fromXYZ_vec( im_object *argv ) { return( im_dE_fromXYZ( argv[0], argv[1], argv[2] ) ); } /* Description of im_dE_fromXYZ. */ static im_function dE_fromXYZ_desc = { "im_dE_fromXYZ", /* Name */ "calculate delta-E for two XYZ images", IM_FN_PIO, /* Flags */ dE_fromXYZ_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_dE_fromLab() via arg vector. */ static int dE_fromLab_vec( im_object *argv ) { return( im_dE_fromLab( argv[0], argv[1], argv[2] ) ); } /* Description of im_dE_fromLab. */ static im_function dE_fromLab_desc = { "im_dE_fromLab", /* Name */ "calculate delta-E for two Lab images", IM_FN_PIO, /* Flags */ dE_fromLab_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Two images in, one out. */ static im_arg_desc dE_fromdisp_args[] = { IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DISPLAY( "disp" ) }; /* Call im_dE_fromdisp() via arg vector. */ static int dE_fromdisp_vec( im_object *argv ) { return( im_dE_fromdisp( argv[0], argv[1], argv[2], argv[3] ) ); } /* Description of im_dE_fromdisp. */ static im_function dE_fromdisp_desc = { "im_dE_fromdisp", /* Name */ "calculate delta-E for two displayable images", IM_FN_PIO, /* Flags */ dE_fromdisp_vec, /* Dispatch function */ IM_NUMBER( dE_fromdisp_args ), /* Size of arg list */ dE_fromdisp_args /* Arg list */ }; /* Call im_dECMC_fromdisp() via arg vector. */ static int dECMC_fromdisp_vec( im_object *argv ) { return( im_dECMC_fromdisp( argv[0], argv[1], argv[2], argv[3] ) ); } /* Description of im_dECMC_fromdisp. */ static im_function dECMC_fromdisp_desc = { "im_dECMC_fromdisp", /* Name */ "calculate delta-E CMC(1:1) for two displayable images", IM_FN_PIO, /* Flags */ dECMC_fromdisp_vec, /* Dispatch function */ IM_NUMBER( dE_fromdisp_args ), /* Size of arg list */ dE_fromdisp_args /* Arg list */ }; /* Call im_disp2XYZ() via arg vector. */ static int disp2XYZ_vec( im_object *argv ) { return( im_disp2XYZ( argv[0], argv[1], argv[2] ) ); } /* Description of im_disp2XYZ. */ static im_function disp2XYZ_desc = { "im_disp2XYZ", /* Name */ "convert displayable to XYZ", /* Description */ IM_FN_PIO, /* Flags */ disp2XYZ_vec, /* Dispatch function */ IM_NUMBER( XYZ2disp_args ), /* Size of arg list */ XYZ2disp_args /* Arg list */ }; /* Call im_disp2Lab() via arg vector. */ static int disp2Lab_vec( im_object *argv ) { return( im_disp2Lab( argv[0], argv[1], argv[2] ) ); } /* Description of im_disp2Lab. */ static im_function disp2Lab_desc = { "im_disp2Lab", /* Name */ "convert displayable to Lab", /* Description */ IM_FN_PIO, /* Flags */ disp2Lab_vec, /* Dispatch function */ IM_NUMBER( XYZ2disp_args ), /* Size of arg list */ XYZ2disp_args /* Arg list */ }; static im_arg_desc morph_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DMASK( "greyscale" ), IM_INPUT_DOUBLE( "L_offset" ), IM_INPUT_DOUBLE( "L_scale" ), IM_INPUT_DOUBLE( "a_scale" ), IM_INPUT_DOUBLE( "b_scale" ) }; static int morph_vec( im_object *argv ) { im_mask_object *mo = argv[2]; double L_offset = *((double *) argv[3]); double L_scale = *((double *) argv[4]); double a_scale = *((double *) argv[5]); double b_scale = *((double *) argv[6]); return( im_lab_morph( argv[0], argv[1], mo->mask, L_offset, L_scale, a_scale, b_scale ) ); } static im_function morph_desc = { "im_lab_morph", /* Name */ "morph colourspace of a LAB image", IM_FN_PIO | IM_FN_PTOP, /* Flags */ morph_vec, /* Dispatch function */ IM_NUMBER( morph_args ), /* Size of arg list */ morph_args /* Arg list */ }; /* Package up all these functions. */ static im_function *colour_list[] = { &LCh2Lab_desc, &LCh2UCS_desc, &Lab2LCh_desc, &Lab2LabQ_desc, &Lab2LabS_desc, &Lab2UCS_desc, &Lab2XYZ_desc, &Lab2XYZ_temp_desc, &Lab2disp_desc, &LabQ2LabS_desc, &LabQ2Lab_desc, &LabQ2XYZ_desc, &LabQ2disp_desc, &LabS2LabQ_desc, &LabS2Lab_desc, &UCS2LCh_desc, &UCS2Lab_desc, &UCS2XYZ_desc, &XYZ2Lab_desc, &XYZ2Lab_temp_desc, &XYZ2UCS_desc, &XYZ2Yxy_desc, &XYZ2disp_desc, &XYZ2sRGB_desc, &Yxy2XYZ_desc, &dE00_fromLab_desc, &dECMC_fromLab_desc, &dECMC_fromdisp_desc, &dE_fromLab_desc, &dE_fromXYZ_desc, &dE_fromdisp_desc, &disp2Lab_desc, &disp2XYZ_desc, &float2rad_desc, &icc_ac2rc_desc, &icc_export_depth_desc, &icc_import_desc, &icc_import_embedded_desc, &icc_present_desc, &icc_transform_desc, &morph_desc, &rad2float_desc, &sRGB2XYZ_desc }; /* Package of functions. */ im_package im__colour = { "colour", IM_NUMBER( colour_list ), colour_list }; vips-7.38.5/libvips/deprecated/im_clamp.c0000644000175000017500000000661612303140253015217 00000000000000/* @(#) Function to perform black level correction given black image * @(#) designed for PAD camera single field black to apply in blocks * @(#) as each is reused for higher resolution pels (eg: 6 8 for Progres) * @(#) IM_BANDFMT_UCHAR images only. Always writes UCHAR. * @(#) int im_clamp(in, w, out, hstep, vstep) * @(#) IMAGE *in, *w, *out; int hstep, vstep; * @(#) - Compute clip(image - (black)) ie subtract black no negatives * @(#) scales for low res Progres images to replicate black value * @(#) Returns 0 on success and -1 on error * fiddle at your peril - nasty code * Copyright: 1993 KM * 20/8/93 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include int im_clamp( in, out,black, hstep, vstep ) IMAGE *in, *black, *out; int hstep, vstep; { PEL *p, *blk, *bline, *bexp; PEL *q, *outbuf; int rep; int x, y, bnd; int temp, blacky, newblacky; if( im_iocheck( in, out ) ) return( -1 ); if( in->Bbits != 8 || in->Coding != IM_CODING_NONE || in->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im_clamp", "%s", _( "bad input format" ) ); return( -1 ); } if( black->Bbits != 8 || black->Coding != IM_CODING_NONE || black->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im_clamp", "%s", _( "bad black format" ) ); return( -1 ); } /* Set up the output header. */ if( im_cp_desc( out, in ) ) return( -1 ); if( im_setupout( out ) ) return( -1 ); /* Make buffer for expanded black line */ if( !(bline = (PEL *) im_malloc( out, black->Bands * hstep * in->Xsize )) ) return( -1 ); /* Make buffer we write to. */ if( !(outbuf = (PEL *) im_malloc( out, out->Bands * out->Xsize )) ) return( -1 ); blacky = -1; p = (PEL *) in->data; for( y = 0; y < in->Ysize; y++ ) { /* calc corresponding black line - get new one if different */ newblacky = (vstep * black->Ysize - in->Ysize + y)/vstep; if( newblacky != blacky){ blacky = newblacky; /* time to expand a new black line */ blk = (PEL *) (black->data + black->Xsize * black->Bands * blacky); for(bexp = bline, x = 0; x < black->Xsize; x++){ for(rep = 0; rep < hstep; rep++) for(q=blk, bnd = 0; bnd < in->Bands; bnd++) *bexp++ = *q++; blk += black->Bands; } } /* correct a line of image */ bexp = bline; q = outbuf; for( x = 0; x < (out->Bands * out->Xsize); x++ ) { temp = ((int) *p++ - *bexp++); if( temp < 0 ) temp = 0; *q++ = (PEL)temp; } if( im_writeline( y, out, outbuf ) ) return( -1 ); } /* end of a line */ return( 0 ); } vips-7.38.5/libvips/deprecated/im_jpeg2vips.c0000644000175000017500000001075112303140253016027 00000000000000/* Convert 1 or 3-band 8-bit VIPS images to/from JPEG. * * 30/11/11 * - now just a stub * 10/7/12 * - use jpeg funcs directly rather than going though vips_jpegload() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG_VERBOSE #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #ifdef HAVE_JPEG #include "../foreign/vipsjpeg.h" #endif /*HAVE_JPEG*/ static int jpeg2vips( const char *name, IMAGE *out, gboolean header_only ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; char *p, *q; int shrink; int seq; gboolean fail_on_warn; /* By default, we ignore any warnings. We want to get as much of * the user's data as we can. */ fail_on_warn = FALSE; /* Parse the filename. */ im_filename_split( name, filename, mode ); p = &mode[0]; shrink = 1; seq = 0; if( (q = im_getnextoption( &p )) ) { shrink = atoi( q ); if( shrink != 1 && shrink != 2 && shrink != 4 && shrink != 8 ) { im_error( "im_jpeg2vips", _( "bad shrink factor %d" ), shrink ); return( -1 ); } } if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "fail", q ) ) fail_on_warn = TRUE; } if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "seq", q ) ) seq = 1; } /* Don't use vips_jpegload() ... we call the jpeg func directly in * order to avoid the foreign.c mechanisms for load-via-disc and stuff * like that. */ /* We need to be compatible with the pre-sequential mode * im_jpeg2vips(). This returned a "t" if given a "p" image, since it * used writeline. * * If we're writing the image to a "p", switch it to a "t". */ if( !header_only && !seq && out->dtype == VIPS_IMAGE_PARTIAL ) { if( vips__image_wio_output( out ) ) return( -1 ); } #ifdef HAVE_JPEG if( vips__jpeg_read_file( filename, out, header_only, shrink, fail_on_warn, TRUE ) ) return( -1 ); #else vips_error( "im_jpeg2vips", "%s", _( "no JPEG support in your libvips" ) ); return( -1 ); #endif /*HAVE_JPEG*/ return( 0 ); } int im_jpeg2vips( const char *name, IMAGE *out ) { return( jpeg2vips( name, out, FALSE ) ); } /* By having a separate header func, we get lazy.c to open via disc/mem. */ static int im_jpeg2vips_header( const char *name, IMAGE *out ) { return( jpeg2vips( name, out, TRUE ) ); } int im_bufjpeg2vips( void *buf, size_t len, IMAGE *out, gboolean header_only ) { VipsImage *t; /* header_only is now automatic ... this call will only decompress on * pixel access. */ if( vips_jpegload_buffer( buf, len, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static int isjpeg( const char *name ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; im_filename_split( name, filename, mode ); return( vips_foreign_is_a( "jpegload", filename ) ); } static const char *jpeg_suffs[] = { ".jpg", ".jpeg", ".jpe", NULL }; /* jpeg format adds no new members. */ typedef VipsFormat VipsFormatJpeg; typedef VipsFormatClass VipsFormatJpegClass; static void vips_format_jpeg_class_init( VipsFormatJpegClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "jpeg"; object_class->description = _( "JPEG" ); format_class->is_a = isjpeg; format_class->header = im_jpeg2vips_header; format_class->load = im_jpeg2vips; format_class->save = im_vips2jpeg; format_class->suffs = jpeg_suffs; } static void vips_format_jpeg_init( VipsFormatJpeg *object ) { } G_DEFINE_TYPE( VipsFormatJpeg, vips_format_jpeg, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_exr2vips.c0000644000175000017500000000513112303140253015674 00000000000000/* Convert OpenEXR to VIPS * * 17/12/11 * - just a stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include "../foreign/openexr2vips.h" int im_exr2vips( const char *filename, IMAGE *out ) { #ifdef HAVE_OPENEXR return( vips__openexr_read( filename, out ) ); #else vips_error( "im_exr2vips", "%s", _( "no OpenEXR support in your libvips" ) ); return( -1 ); #endif /*HAVE_OPENEXR*/ } static const char *exr_suffs[] = { ".exr", NULL }; static VipsFormatFlags exr_flags( const char *name ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; im_filename_split( name, filename, mode ); return( (VipsFormatFlags) vips_foreign_flags( "openexrload", filename ) ); } static int isexr( const char *name ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; im_filename_split( name, filename, mode ); return( vips_foreign_is_a( "openexrload", filename ) ); } /* exr format adds no new members. */ typedef VipsFormat VipsFormatExr; typedef VipsFormatClass VipsFormatExrClass; static void vips_format_exr_class_init( VipsFormatExrClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "exr"; object_class->description = _( "OpenEXR" ); format_class->is_a = isexr; format_class->load = im_exr2vips; format_class->get_flags = exr_flags; format_class->suffs = exr_suffs; } static void vips_format_exr_init( VipsFormatExr *object ) { } G_DEFINE_TYPE( VipsFormatExr, vips_format_exr, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_fav4.c0000644000175000017500000000442712303140253014761 00000000000000/* @(#) Optimised 4 frame average Copyright (C) 1992, Kirk Martinez, History of Art Dept, Birkbeck College */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #define ARGS "fav4: frame average 4 frames\nARGS: im1 im2 im3 im4 outfile" #define NFRAMES 4 /** * im_fav4: * @in: array of 4 input #IMAGE s * @out: output #IMAGE * * Average four identical images. * * Deprecated. */ int im_fav4( IMAGE **in, IMAGE *out) { PEL *result, *buffer, *p1, *p2, *p3, *p4; int x,y; int linebytes, PICY; /* check IMAGEs parameters */ if(im_iocheck(in[1], out)) return(-1); /* BYTE images only! */ if( (in[0]->BandFmt != IM_BANDFMT_CHAR) && (in[0]->BandFmt != IM_BANDFMT_UCHAR)) return(-1); if ( im_cp_desc(out, in[1]) == -1) /* copy image descriptors */ return(-1); if ( im_setupout(out) == -1) return(-1); linebytes = in[0]->Xsize * in[0]->Bands; PICY = in[0]->Ysize; buffer = (PEL*)im_malloc(NULL,linebytes); memset(buffer, 0, linebytes); p1 = (PEL*)in[0]->data; p2 = (PEL*)in[1]->data; p3 = (PEL*)in[2]->data; p4 = (PEL*)in[3]->data; for (y = 0; y < PICY; y++) { result = buffer; /* average 4 pels with rounding, for whole line*/ for (x = 0; x < linebytes; x++) { *result++ = (PEL)((int)((int)*p1++ + (int)*p2++ + (int)*p3++ + (int)*p4++ +2) >> 2); } im_writeline(y,out, buffer); } im_free(buffer); return(0); } vips-7.38.5/libvips/deprecated/mask_dispatch.c0000644000175000017500000003230512303140253016242 00000000000000/* VIPS function dispatch tables for matricies. * * J. Cupitt, 14/2/95. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /* One matrix in, one out. */ static im_arg_desc one_in_one_out[] = { IM_INPUT_DMASK( "in" ), IM_OUTPUT_DMASK( "out" ) }; /* Two matricies in, one out. */ static im_arg_desc two_in_one_out[] = { IM_INPUT_DMASK( "in1" ), IM_INPUT_DMASK( "in2" ), IM_OUTPUT_DMASK( "out" ) }; /* Call im_matinv via arg vector. */ static int matinv_vec( im_object *argv ) { im_mask_object *in = argv[0]; im_mask_object *out = argv[1]; if( !(out->mask = im_matinv( in->mask, out->name )) ) return( -1 ); return( 0 ); } /* Description of im_matinv. */ static im_function matinv_desc = { "im_matinv", /* Name */ "invert matrix", 0, /* Flags */ matinv_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_mattrn via arg vector. */ static int mattrn_vec( im_object *argv ) { im_mask_object *in = argv[0]; im_mask_object *out = argv[1]; if( !(out->mask = im_mattrn( in->mask, out->name )) ) return( -1 ); return( 0 ); } /* Description of im_mattrn. */ static im_function mattrn_desc = { "im_mattrn", /* Name */ "transpose matrix", 0, /* Flags */ mattrn_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_matcat via arg vector. */ static int matcat_vec( im_object *argv ) { im_mask_object *in1 = argv[0]; im_mask_object *in2 = argv[1]; im_mask_object *out = argv[2]; if( !(out->mask = im_matcat( in1->mask, in2->mask, out->name )) ) return( -1 ); return( 0 ); } /* Description of im_matcat. */ static im_function matcat_desc = { "im_matcat", /* Name */ "append matrix in2 to the end of matrix in1", 0, /* Flags */ matcat_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_matmul via arg vector. */ static int matmul_vec( im_object *argv ) { im_mask_object *in1 = argv[0]; im_mask_object *in2 = argv[1]; im_mask_object *out = argv[2]; if( !(out->mask = im_matmul( in1->mask, in2->mask, out->name )) ) return( -1 ); return( 0 ); } /* Description of im_matmul. */ static im_function matmul_desc = { "im_matmul", /* Name */ "multiply matrix in1 by matrix in2", 0, /* Flags */ matmul_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Args for im_read_dmask() */ static im_arg_desc read_dmask_args[] = { IM_INPUT_STRING( "filename" ), IM_OUTPUT_DMASK( "mask" ) }; /* Call im_read_dmask via arg vector. */ static int read_dmask_vec( im_object *argv ) { im_mask_object *mo = argv[1]; if( !(mo->mask = im_read_dmask( argv[0] )) ) return( -1 ); return( 0 ); } /* Description of im_read_dmask(). */ static im_function read_dmask_desc = { "im_read_dmask", /* Name */ "read matrix of double from file", 0, /* Flags */ read_dmask_vec, /* Dispatch function */ IM_NUMBER( read_dmask_args ), /* Size of arg list */ read_dmask_args /* Arg list */ }; /* Args for im_gauss_dmask. */ static im_arg_desc gauss_dmask_args[] = { IM_OUTPUT_DMASK( "mask" ), IM_INPUT_DOUBLE( "sigma" ), IM_INPUT_DOUBLE( "min_amp" ) }; /* Call im_gauss_dmask via arg vector. */ static int gauss_dmask_vec( im_object *argv ) { im_mask_object *mo = argv[0]; double sigma = *((double *) argv[1]); double min_amp = *((double *) argv[2]); if( !(mo->mask = im_gauss_dmask( mo->name, sigma, min_amp )) ) return( -1 ); return( 0 ); } /* Description of im_gauss_dmask. */ static im_function gauss_dmask_desc = { "im_gauss_dmask", /* Name */ "generate gaussian DOUBLEMASK", 0, /* Flags */ gauss_dmask_vec, /* Dispatch function */ IM_NUMBER( gauss_dmask_args ), /* Size of arg list */ gauss_dmask_args /* Arg list */ }; /* Call im_gauss_dmask_sep via arg vector. */ static int gauss_dmask_sep_vec( im_object *argv ) { im_mask_object *mo = argv[0]; double sigma = *((double *) argv[1]); double min_amp = *((double *) argv[2]); if( !(mo->mask = im_gauss_dmask_sep( mo->name, sigma, min_amp )) ) return( -1 ); return( 0 ); } /* Description of im_gauss_dmask_sep. */ static im_function gauss_dmask_sep_desc = { "im_gauss_dmask_sep", /* Name */ "generate separable gaussian DOUBLEMASK", 0, /* Flags */ gauss_dmask_sep_vec, /* Dispatch function */ IM_NUMBER( gauss_dmask_args ), /* Size of arg list */ gauss_dmask_args /* Arg list */ }; /* Args for im_gauss_imask. */ static im_arg_desc gauss_imask_args[] = { IM_OUTPUT_IMASK( "mask" ), IM_INPUT_DOUBLE( "sigma" ), IM_INPUT_DOUBLE( "min_amp" ) }; /* Call im_gauss_imask via arg vector. */ static int gauss_imask_vec( im_object *argv ) { im_mask_object *mo = argv[0]; double sigma = *((double *) argv[1]); double min_amp = *((double *) argv[2]); if( !(mo->mask = im_gauss_imask( mo->name, sigma, min_amp )) ) return( -1 ); return( 0 ); } /* Description of im_gauss_imask. */ static im_function gauss_imask_desc = { "im_gauss_imask", /* Name */ "generate gaussian INTMASK", 0, /* Flags */ gauss_imask_vec, /* Dispatch function */ IM_NUMBER( gauss_imask_args ), /* Size of arg list */ gauss_imask_args /* Arg list */ }; /* Call im_gauss_imask_sep via arg vector. */ static int gauss_imask_sep_vec( im_object *argv ) { im_mask_object *mo = argv[0]; double sigma = *((double *) argv[1]); double min_amp = *((double *) argv[2]); if( !(mo->mask = im_gauss_imask_sep( mo->name, sigma, min_amp )) ) return( -1 ); return( 0 ); } /* Description of im_gauss_imask_sep. */ static im_function gauss_imask_sep_desc = { "im_gauss_imask_sep", /* Name */ "generate separable gaussian INTMASK", 0, /* Flags */ gauss_imask_sep_vec, /* Dispatch function */ IM_NUMBER( gauss_imask_args ), /* Size of arg list */ gauss_imask_args /* Arg list */ }; /* Args for im_log_imask. */ static im_arg_desc log_imask_args[] = { IM_OUTPUT_IMASK( "mask" ), IM_INPUT_DOUBLE( "sigma" ), IM_INPUT_DOUBLE( "min_amp" ) }; /* Call im_log_imask via arg vector. */ static int log_imask_vec( im_object *argv ) { im_mask_object *mo = argv[0]; double sigma = *((double *) argv[1]); double min_amp = *((double *) argv[2]); if( !(mo->mask = im_log_imask( mo->name, sigma, min_amp )) ) return( -1 ); return( 0 ); } /* Description of im_log_imask. */ static im_function log_imask_desc = { "im_log_imask", /* Name */ "generate laplacian of gaussian INTMASK", 0, /* Flags */ log_imask_vec, /* Dispatch function */ IM_NUMBER( log_imask_args ), /* Size of arg list */ log_imask_args /* Arg list */ }; /* Args for im_log_dmask. */ static im_arg_desc log_dmask_args[] = { IM_OUTPUT_DMASK( "maskfile" ), IM_INPUT_DOUBLE( "sigma" ), IM_INPUT_DOUBLE( "min_amp" ) }; /* Call im_log_dmask via arg vector. */ static int log_dmask_vec( im_object *argv ) { im_mask_object *mo = argv[0]; double sigma = *((double *) argv[1]); double min_amp = *((double *) argv[2]); if( !(mo->mask = im_log_dmask( mo->name, sigma, min_amp )) ) return( -1 ); return( 0 ); } /* Description of im_log_dmask. */ static im_function log_dmask_desc = { "im_log_dmask", /* Name */ "generate laplacian of gaussian DOUBLEMASK", 0, /* Flags */ log_dmask_vec, /* Dispatch function */ IM_NUMBER( log_dmask_args ), /* Size of arg list */ log_dmask_args /* Arg list */ }; static im_arg_desc imask_args[] = { IM_INPUT_IMASK( "in" ), IM_OUTPUT_IMASK( "out" ) }; static im_arg_desc dmask_args[] = { IM_INPUT_DMASK( "in" ), IM_OUTPUT_DMASK( "out" ) }; /* Call im_rotate_imask45 via arg vector. */ static int rotate_imask45_vec( im_object *argv ) { im_mask_object *min = argv[0]; im_mask_object *mout = argv[1]; if( !(mout->mask = im_rotate_imask45( min->mask, mout->name )) ) return( -1 ); return( 0 ); } /* Description of im_rotate_imask45. */ static im_function rotate_imask45_desc = { "im_rotate_imask45", /* Name */ "rotate INTMASK clockwise by 45 degrees", 0, /* Flags */ rotate_imask45_vec, /* Dispatch function */ IM_NUMBER( imask_args ), /* Size of arg list */ imask_args /* Arg list */ }; /* Call im_rotate_imask90 via arg vector. */ static int rotate_imask90_vec( im_object *argv ) { im_mask_object *min = argv[0]; im_mask_object *mout = argv[1]; if( !(mout->mask = im_rotate_imask90( min->mask, mout->name )) ) return( -1 ); return( 0 ); } /* Description of im_rotate_imask90. */ static im_function rotate_imask90_desc = { "im_rotate_imask90", /* Name */ "rotate INTMASK clockwise by 90 degrees", 0, /* Flags */ rotate_imask90_vec, /* Dispatch function */ IM_NUMBER( imask_args ), /* Size of arg list */ imask_args /* Arg list */ }; /* Call im_rotate_dmask45 via arg vector. */ static int rotate_dmask45_vec( im_object *argv ) { im_mask_object *min = argv[0]; im_mask_object *mout = argv[1]; if( !(mout->mask = im_rotate_dmask45( min->mask, mout->name )) ) return( -1 ); return( 0 ); } /* Description of im_rotate_dmask45. */ static im_function rotate_dmask45_desc = { "im_rotate_dmask45", /* Name */ "rotate DOUBLEMASK clockwise by 45 degrees", 0, /* Flags */ rotate_dmask45_vec, /* Dispatch function */ IM_NUMBER( dmask_args ), /* Size of arg list */ dmask_args /* Arg list */ }; /* Call im_rotate_dmask90 via arg vector. */ static int rotate_dmask90_vec( im_object *argv ) { im_mask_object *min = argv[0]; im_mask_object *mout = argv[1]; if( !(mout->mask = im_rotate_dmask90( min->mask, mout->name )) ) return( -1 ); return( 0 ); } /* Description of im_rotate_dmask90. */ static im_function rotate_dmask90_desc = { "im_rotate_dmask90", /* Name */ "rotate DOUBLEMASK clockwise by 90 degrees", 0, /* Flags */ rotate_dmask90_vec, /* Dispatch function */ IM_NUMBER( dmask_args ), /* Size of arg list */ dmask_args /* Arg list */ }; static int imask_xsize_vec( im_object *argv ) { *( (int*) argv[1] )= ( (INTMASK*) ( ( (im_mask_object*) argv[0] )-> mask ) )-> xsize; return 0; } static int imask_ysize_vec( im_object *argv ) { *( (int*) argv[1] )= ( (INTMASK*) ( ( (im_mask_object*) argv[0] )-> mask ) )-> ysize; return 0; } static int dmask_xsize_vec( im_object *argv ) { *( (int*) argv[1] )= ( (DOUBLEMASK*) ( ( (im_mask_object*) argv[0] )-> mask ) )-> xsize; return 0; } static int dmask_ysize_vec( im_object *argv ) { *( (int*) argv[1] )= ( (DOUBLEMASK*) ( ( (im_mask_object*) argv[0] )-> mask ) )-> ysize; return 0; } static im_arg_desc imask_size_args[] = { IM_INPUT_IMASK( "mask" ), IM_OUTPUT_INT( "size" ) }; static im_arg_desc dmask_size_args[] = { IM_INPUT_DMASK( "mask" ), IM_OUTPUT_INT( "size" ) }; static im_function imask_xsize_desc = { "im_imask_xsize", /* Name */ "horizontal size of an intmask", /* Description */ 0, /* Flags */ imask_xsize_vec, /* Dispatch function */ IM_NUMBER( imask_size_args ), /* Size of arg list */ imask_size_args /* Arg list */ }; static im_function imask_ysize_desc = { "im_imask_ysize", /* Name */ "vertical size of an intmask", /* Description */ 0, /* Flags */ imask_ysize_vec, /* Dispatch function */ IM_NUMBER( imask_size_args ), /* Size of arg list */ imask_size_args /* Arg list */ }; static im_function dmask_xsize_desc = { "im_dmask_xsize", /* Name */ "horizontal size of a doublemask", /* Description */ 0, /* Flags */ dmask_xsize_vec, /* Dispatch function */ IM_NUMBER( dmask_size_args ), /* Size of arg list */ dmask_size_args /* Arg list */ }; static im_function dmask_ysize_desc = { "im_dmask_ysize", /* Name */ "vertical size of a doublemask", /* Description */ 0, /* Flags */ dmask_ysize_vec, /* Dispatch function */ IM_NUMBER( dmask_size_args ), /* Size of arg list */ dmask_size_args /* Arg list */ }; /* Package up all these functions. */ static im_function *mask_list[] = { &gauss_dmask_desc, &gauss_dmask_sep_desc, &log_dmask_desc, &log_imask_desc, &gauss_imask_desc, &gauss_imask_sep_desc, &dmask_xsize_desc, &dmask_ysize_desc, &imask_xsize_desc, &imask_ysize_desc, &read_dmask_desc, &rotate_dmask45_desc, &rotate_dmask90_desc, &rotate_imask45_desc, &rotate_imask90_desc, &matcat_desc, &matinv_desc, &matmul_desc, &mattrn_desc }; /* Package of functions. */ im_package im__mask = { "mask", IM_NUMBER( mask_list ), mask_list }; vips-7.38.5/libvips/deprecated/convol_dispatch.c0000644000175000017500000002652512303140253016616 00000000000000/* VIPS function dispatch tables for convolution. * * J. Cupitt, 14/2/95. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /* One image in, one out. */ static im_arg_desc one_in_one_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Two images in, one out. */ static im_arg_desc two_in_one_out[] = { IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_OUTPUT_IMAGE( "out" ) }; /* Args to im_addgnoise. */ static im_arg_desc addgnoise_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "sigma" ) }; /* Call im_addgnoise via arg vector. */ static int addgnoise_vec( im_object *argv ) { double sigma = *((double *) argv[2]); return( im_addgnoise( argv[0], argv[1], sigma ) ); } /* Description of im_addgnoise. */ static im_function addgnoise_desc = { "im_addgnoise", /* Name */ "add gaussian noise with mean 0 and std. dev. sigma", IM_FN_PIO, /* Flags */ addgnoise_vec, /* Dispatch function */ IM_NUMBER( addgnoise_args ), /* Size of arg list */ addgnoise_args /* Arg list */ }; /* Args to im_contrast_surface. */ static im_arg_desc contrast_surface_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "half_win_size" ), IM_INPUT_INT( "spacing" ) }; /* Call im_contrast_surface via arg vector. */ static int contrast_surface_vec( im_object *argv ) { int half_win_size = *((int *) argv[2]); int spacing = *((int *) argv[3]); return( im_contrast_surface( argv[0], argv[1], half_win_size, spacing ) ); } /* Description of im_contrast_surface. */ static im_function contrast_surface_desc = { "im_contrast_surface", /* Name */ "find high-contrast points in an image", IM_FN_PIO, /* Flags */ contrast_surface_vec, /* Dispatch function */ IM_NUMBER( contrast_surface_args ),/* Size of arg list */ contrast_surface_args /* Arg list */ }; /* Args to im_sharpen. */ static im_arg_desc sharpen_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "mask_size" ), IM_INPUT_DOUBLE( "x1" ), IM_INPUT_DOUBLE( "y2" ), IM_INPUT_DOUBLE( "y3" ), IM_INPUT_DOUBLE( "m1" ), IM_INPUT_DOUBLE( "m2" ) }; /* Call im_sharpen via arg vector. */ static int sharpen_vec( im_object *argv ) { int mask_size = *((int *) argv[2]); double x1 = *((double *) argv[3]); double x2 = *((double *) argv[4]); double x3 = *((double *) argv[5]); double m1 = *((double *) argv[6]); double m2 = *((double *) argv[7]); return( im_sharpen( argv[0], argv[1], mask_size, x1, x2, x3, m1, m2 ) ); } /* Description of im_sharpen. */ static im_function sharpen_desc = { "im_sharpen", /* Name */ "sharpen high frequencies of L channel of LabQ", IM_FN_PIO, /* Flags */ sharpen_vec, /* Dispatch function */ IM_NUMBER( sharpen_args ), /* Size of arg list */ sharpen_args /* Arg list */ }; /* Args for convolver with imask. */ static im_arg_desc conv_imask[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMASK( "matrix" ) }; /* Args for convolver with dmask. */ static im_arg_desc conv_dmask[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DMASK( "matrix" ) }; /* Call im_compass via arg vector. */ static int compass_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_compass( argv[0], argv[1], mo->mask ) ); } /* Description of im_compass. */ static im_function compass_desc = { "im_compass", /* Name */ "convolve with 8-way rotating integer mask", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ compass_vec, /* Dispatch function */ IM_NUMBER( conv_imask ), /* Size of arg list */ conv_imask /* Arg list */ }; /* Call im_conv via arg vector. */ static int conv_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_conv( argv[0], argv[1], mo->mask ) ); } /* Description of im_conv. */ static im_function conv_desc = { "im_conv", /* Name */ "convolve", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ conv_vec, /* Dispatch function */ IM_NUMBER( conv_imask ), /* Size of arg list */ conv_imask /* Arg list */ }; /* Call im_conv_f via arg vector. */ static int conv_f_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_conv_f( argv[0], argv[1], mo->mask ) ); } /* Description of im_conv_f. */ static im_function conv_f_desc = { "im_conv_f", /* Name */ "convolve, with DOUBLEMASK", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ conv_f_vec, /* Dispatch function */ IM_NUMBER( conv_dmask ), /* Size of arg list */ conv_dmask /* Arg list */ }; /* Call im_convsep via arg vector. */ static int convsep_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_convsep( argv[0], argv[1], mo->mask ) ); } /* Description of im_convsep. */ static im_function convsep_desc = { "im_convsep", /* Name */ "seperable convolution", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ convsep_vec, /* Dispatch function */ IM_NUMBER( conv_imask ), /* Size of arg list */ conv_imask /* Arg list */ }; /* Call im_convsep_f via arg vector. */ static int convsep_f_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_convsep_f( argv[0], argv[1], mo->mask ) ); } /* Description of im_convsep_f. */ static im_function convsep_f_desc = { "im_convsep_f", /* Name */ "seperable convolution, with DOUBLEMASK", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ convsep_f_vec, /* Dispatch function */ IM_NUMBER( conv_dmask ), /* Size of arg list */ conv_dmask /* Arg list */ }; /* Call im_fastcor via arg vector. */ static int fastcor_vec( im_object *argv ) { return( im_fastcor( argv[0], argv[1], argv[2] ) ); } /* Description of im_fastcor. */ static im_function fastcor_desc = { "im_fastcor", /* Name */ "fast correlate in2 within in1", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ fastcor_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_grad_x via arg vector. */ static int grad_x_vec( im_object *argv ) { return( im_grad_x( argv[0], argv[1] ) ); } /* Description of im_grad_x. */ static im_function grad_x_desc = { "im_grad_x", /* Name */ "horizontal difference image", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ grad_x_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_grad_y via arg vector. */ static int grad_y_vec( im_object *argv ) { return( im_grad_y( argv[0], argv[1] ) ); } /* Description of im_grad_y. */ static im_function grad_y_desc = { "im_grad_y", /* Name */ "vertical difference image", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ grad_y_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_gradcor via arg vector. */ static int gradcor_vec( im_object *argv ) { return( im_gradcor( argv[0], argv[1], argv[2] ) ); } /* Description of im_gradcor. */ static im_function gradcor_desc = { "im_gradcor", /* Name */ "non-normalised correlation of gradient of in2 within in1", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ gradcor_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_gradient via arg vector. */ static int gradient_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_gradient( argv[0], argv[1], mo->mask ) ); } /* Description of im_gradient. */ static im_function gradient_desc = { "im_gradient", /* Name */ "convolve with 2-way rotating mask", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ gradient_vec, /* Dispatch function */ IM_NUMBER( conv_imask ), /* Size of arg list */ conv_imask /* Arg list */ }; /* Call im_lindetect via arg vector. */ static int lindetect_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_lindetect( argv[0], argv[1], mo->mask ) ); } /* Description of im_lindetect. */ static im_function lindetect_desc = { "im_lindetect", /* Name */ "convolve with 4-way rotating mask", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ lindetect_vec, /* Dispatch function */ IM_NUMBER( conv_imask ), /* Size of arg list */ conv_imask /* Arg list */ }; /* Call im_spcor via arg vector. */ static int spcor_vec( im_object *argv ) { return( im_spcor( argv[0], argv[1], argv[2] ) ); } /* Description of im_spcor. */ static im_function spcor_desc = { "im_spcor", /* Name */ "normalised correlation of in2 within in1", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ spcor_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Args for im_aconv(). */ static im_arg_desc aconv_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DMASK( "matrix" ), IM_INPUT_INT( "n_layers" ), IM_INPUT_INT( "cluster" ) }; /* Call im_aconv via arg vector. */ static int aconv_vec( im_object *argv ) { im_mask_object *mo = argv[2]; int n_layers = *((int *) argv[3]); int cluster = *((int *) argv[4]); return( im_aconv( argv[0], argv[1], mo->mask, n_layers, cluster ) ); } /* Description of im_aconv. */ static im_function aconv_desc = { "im_aconv", /* Name */ "approximate convolution", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ aconv_vec, /* Dispatch function */ IM_NUMBER( aconv_args ), /* Size of arg list */ aconv_args /* Arg list */ }; /* Args for im_aconvsep(). */ static im_arg_desc aconvsep_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DMASK( "matrix" ), IM_INPUT_INT( "n_layers" ) }; /* Call im_aconvsep via arg vector. */ static int aconvsep_vec( im_object *argv ) { im_mask_object *mo = argv[2]; int n_layers = *((int *) argv[3]); return( im_aconvsep( argv[0], argv[1], mo->mask, n_layers ) ); } /* Description of im_aconvsep. */ static im_function aconvsep_desc = { "im_aconvsep", /* Name */ "approximate separable convolution", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ aconvsep_vec, /* Dispatch function */ IM_NUMBER( aconvsep_args ), /* Size of arg list */ aconvsep_args /* Arg list */ }; /* Package up all these functions. */ static im_function *convol_list[] = { &aconvsep_desc, &aconv_desc, &addgnoise_desc, &compass_desc, &contrast_surface_desc, &conv_desc, &conv_f_desc, &convsep_desc, &convsep_f_desc, &fastcor_desc, &gradcor_desc, &gradient_desc, &grad_x_desc, &grad_y_desc, &lindetect_desc, &sharpen_desc, &spcor_desc, }; /* Package of functions. */ im_package im__convolution = { "convolution", IM_NUMBER( convol_list ), convol_list }; vips-7.38.5/libvips/deprecated/im_point_bilinear.c0000644000175000017500000000551112303140253017112 00000000000000/* im_point_bilinear.c * * Copyright: 2006, The Nottingham Trent University * * Author: Tom Vajzovic * * Written on: 2006-09-26 * * 9/9/09 * - rewrite in terms of im_affinei() and im_avg() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include /** * im_point: * @im: image to read from * @interpolate: interpolator to sample points with * @x: x position to interpolate * @y: y position to interpolate * @band: band to read * @out: return interpolated value * * Find the value at (@x, @y) in given band of image. * Non-integral values are calculated using the supplied @interpolate. * * See also: im_avg(), #VipsInterpolate * * Returns: 0 on success, -1 on error */ int im_point( IMAGE *im, VipsInterpolate *interpolate, double x, double y, int band, double *out ) { IMAGE *mem; IMAGE *t[2]; if( band >= im->Bands || x < 0.0 || y < 0.0 || x > im->Xsize || y > im->Ysize ) { im_error( "im_point_bilinear", "%s", _( "coords outside image" ) ); return( -1 ); } if( !(mem = im_open( "im_point", "p" )) ) return( -1 ); if( im_open_local_array( mem, t, 2, "im_point", "p" ) || im_extract_band( im, t[0], band ) || im_affinei( t[0], t[1], interpolate, 1, 0, 0, 1, x - floor( x ), y - floor( y ), floor( x ), floor( y ), 1, 1 ) || im_avg( t[1], out ) ) { im_close( mem ); return( -1 ); } im_close( mem ); return( 0 ); } /** * im_point_bilinear: * @im: image to read from * @x: x position to interpolate * @y: y position to interpolate * @band: band to read * @out: return interpolated value * * Find the value at (@x,@y) in given band of image. * Use bilinear interpolation if @x or @y are non-integral. * * See also: im_avg(), im_point(). * * Returns: 0 on success, -1 on error */ int im_point_bilinear( IMAGE *im, double x, double y, int band, double *out ) { return( im_point( im, vips_interpolate_bilinear_static(), x, y, band, out ) ); } vips-7.38.5/libvips/deprecated/im_dif_std.c0000644000175000017500000000634112303140253015532 00000000000000/* @(#) Program to calculate the stdev of the differnce image * @(#) at a given displacement vector * * Written : 25/11/1987 * Author : N. Dessipris * Updated : 2/12/1991 * 22/7/93 JC * - im_incheck() added */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include static int im__mean_std_int_buffer( int *buffer, int size, double *pmean, double *pstd ) { double mean, std; register int i; int sumf; int temp; int *pbuffer; int sumf2; double correction; /* calulates the correction term for the variance */ double variance; /* = (sumf2 - correction)/n */ if (size <= 0) { im_error( "im_mean_std_int_buffer", "%s", _( "wrong args") ); return(-1); } mean = 0.0; std = 0.0; sumf = 0; sumf2 = 0; pbuffer = buffer; for (i=0; iBands != 1)||(im->BandFmt != IM_BANDFMT_UCHAR)) { im_error( "im_dif_std", "%s", _( "Unable to accept input") ); return(-1);} if ( (xpos + xsize + dx > im->Xsize)|| (ypos + ysize + dy > im->Ysize) ) { im_error( "im_dif_std", "%s", _( "wrong args") ); return(-1); } bufsize = xsize * ysize; buf = (int *)calloc( (unsigned)bufsize, sizeof(int) ); if ( buf == NULL ) { im_error( "im_dif_std", "%s", _( "calloc failed") ); return(-1); } input = (PEL*)im->data; input += ( ypos * im->Xsize + xpos ); ofst = dy * im->Xsize + dx; pbuf = buf; for ( y=0; yXsize; for ( x=0; x #endif /*HAVE_CONFIG_H*/ #include #include #include #include /* Useful: Call a macro with the name, type pairs for all VIPS functions. */ #define BRIGHT 255 #define DARK 0 #define im_for_all_types(A) \ case IM_BANDFMT_UCHAR: A(unsigned char); break; \ case IM_BANDFMT_CHAR: A(signed char); break; \ case IM_BANDFMT_USHORT: A(unsigned short); break; \ case IM_BANDFMT_SHORT: A(signed short); break; \ case IM_BANDFMT_UINT: A(unsigned int); break; \ case IM_BANDFMT_INT: A(signed int); break; \ case IM_BANDFMT_FLOAT: A(float); break; \ case IM_BANDFMT_DOUBLE: A(double); break; /* Replacement for im_thresh */ int im_thresh( in, out, threshold ) IMAGE *in, *out; double threshold; { int x, y; PEL *bu; /* Buffer we write to */ int s, epl; /* Size and els per line */ /* Check our args. */ if( im_iocheck( in, out ) ) return( -1 ); if( in->Coding != IM_CODING_NONE ) { im_error( "im_thresh", "%s", _( "input should be uncoded") ); return(-1); } /* Set up the output header. */ if( im_cp_desc( out, in ) ) return( -1 ); out->BandFmt = IM_BANDFMT_UCHAR; if( im_setupout( out ) ) return( -1 ); /* Make buffer for building o/p in. */ epl = in->Xsize * in->Bands; s = epl * sizeof( PEL ); if( (bu = (PEL *) im_malloc( out, (unsigned)s )) == NULL ) return( -1 ); /* Define what we do for each band element type. */ #define im_thresh_loop(TYPE)\ { TYPE *a = (TYPE *) in->data;\ \ for( y = 0; y < in->Ysize; y++ ) {\ PEL *b = bu;\ \ for( x = 0; x < epl; x++ ) {\ double f = (double) *a++;\ if ( f >= threshold)\ *b++ = (PEL)BRIGHT;\ else\ *b++ = (PEL)DARK;\ }\ \ if( im_writeline( y, out, bu ) ) \ return( -1 );\ }\ } /* Do the above for all image types. */ switch( in->BandFmt ) { im_for_all_types( im_thresh_loop ); default: im_error( "im_thresh", "%s", _( "Unknown input format") ); return( -1 ); } return( 0 ); } vips-7.38.5/libvips/deprecated/freq_dispatch.c0000644000175000017500000001720112303140253016242 00000000000000/* Function dispatch tables for freq_filt. * * J. Cupitt, 23/2/95 * 22/4/97 JC * - oops, im_freqflt() was wrong */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /* One image in, one out. */ static im_arg_desc one_in_one_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Two images in, one out. */ static im_arg_desc two_in_one_out[] = { IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_OUTPUT_IMAGE( "out" ) }; /* Args to im_create_fmask(). */ static im_arg_desc create_fmask_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ), IM_INPUT_INT( "type" ), IM_INPUT_DOUBLE( "p1" ), IM_INPUT_DOUBLE( "p2" ), IM_INPUT_DOUBLE( "p3" ), IM_INPUT_DOUBLE( "p4" ), IM_INPUT_DOUBLE( "p5" ) }; /* Call im_create_fmask via arg vector. */ static int create_fmask_vec( im_object *argv ) { int width = *((int *) argv[1]); int height = *((int *) argv[2]); int type = *((int *) argv[3]); double p1 = *((double *) argv[4]); double p2 = *((double *) argv[5]); double p3 = *((double *) argv[6]); double p4 = *((double *) argv[7]); double p5 = *((double *) argv[8]); return( im_create_fmask( argv[0], width, height, type, p1, p2, p3, p4, p5 ) ); } /* Description of im_create_fmask. */ static im_function create_fmask_desc = { "im_create_fmask", /* Name */ "create frequency domain filter mask", 0, /* Flags */ create_fmask_vec, /* Dispatch function */ IM_NUMBER( create_fmask_args ), /* Size of arg list */ create_fmask_args /* Arg list */ }; /* Args to im_flt_image_freq(). */ static im_arg_desc flt_image_freq_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "type" ), IM_INPUT_DOUBLE( "p1" ), IM_INPUT_DOUBLE( "p2" ), IM_INPUT_DOUBLE( "p3" ), IM_INPUT_DOUBLE( "p4" ), IM_INPUT_DOUBLE( "p5" ) }; /* Call im_flt_image_freq via arg vector. */ static int flt_image_freq_vec( im_object *argv ) { int type = *((int *) argv[2]); double p1 = *((double *) argv[3]); double p2 = *((double *) argv[4]); double p3 = *((double *) argv[5]); double p4 = *((double *) argv[6]); double p5 = *((double *) argv[7]); return( im_flt_image_freq( argv[0], argv[1], type, p1, p2, p3, p4, p5 ) ); } /* Description of im_flt_image_freq. */ static im_function flt_image_freq_desc = { "im_flt_image_freq", /* Name */ "frequency domain filter image", 0, /* Flags */ flt_image_freq_vec, /* Dispatch function */ IM_NUMBER( flt_image_freq_args ), /* Size of arg list */ flt_image_freq_args /* Arg list */ }; /* Args to im_fractsurf(). */ static im_arg_desc fractsurf_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "size" ), IM_INPUT_DOUBLE( "dimension" ) }; /* Call im_fractsurf via arg vector. */ static int fractsurf_vec( im_object *argv ) { int size = *((int *) argv[1]); double dim = *((double *) argv[2]); return( im_fractsurf( argv[0], size, dim ) ); } /* Description of im_fractsurf. */ static im_function fractsurf_desc = { "im_fractsurf", /* Name */ "generate a fractal surface of given dimension", IM_FN_TRANSFORM, /* Flags */ fractsurf_vec, /* Dispatch function */ IM_NUMBER( fractsurf_args ), /* Size of arg list */ fractsurf_args /* Arg list */ }; /* Args to im_freqflt(). */ static im_arg_desc freqflt_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_IMAGE( "mask" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_freqflt via arg vector. */ static int freqflt_vec( im_object *argv ) { return( im_freqflt( argv[0], argv[1], argv[2] ) ); } /* Description of im_freqflt. */ static im_function freqflt_desc = { "im_freqflt", /* Name */ "frequency-domain filter of in with mask", IM_FN_TRANSFORM, /* Flags */ freqflt_vec, /* Dispatch function */ IM_NUMBER( freqflt_args ), /* Size of arg list */ freqflt_args /* Arg list */ }; /* Call im_disp_ps via arg vector. */ static int disp_ps_vec( im_object *argv ) { return( im_disp_ps( argv[0], argv[1] ) ); } /* Description of im_disp_ps. */ static im_function disp_ps_desc = { "im_disp_ps", /* Name */ "make displayable power spectrum", IM_FN_TRANSFORM, /* Flags */ disp_ps_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_rotquad via arg vector. */ static int rotquad_vec( im_object *argv ) { return( im_rotquad( argv[0], argv[1] ) ); } /* Description of im_rotquad. */ static im_function rotquad_desc = { "im_rotquad", /* Name */ "rotate image quadrants to move origin to centre", IM_FN_TRANSFORM, /* Flags */ rotquad_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_fwfft via arg vector. */ static int fwfft_vec( im_object *argv ) { return( im_fwfft( argv[0], argv[1] ) ); } /* Description of im_fwfft. */ static im_function fwfft_desc = { "im_fwfft", /* Name */ "forward fast-fourier transform", IM_FN_TRANSFORM, /* Flags */ fwfft_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_invfft via arg vector. */ static int invfft_vec( im_object *argv ) { return( im_invfft( argv[0], argv[1] ) ); } /* Description of im_invfft. */ static im_function invfft_desc = { "im_invfft", /* Name */ "inverse fast-fourier transform", IM_FN_TRANSFORM, /* Flags */ invfft_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_invfftr via arg vector. */ static int invfftr_vec( im_object *argv ) { return( im_invfftr( argv[0], argv[1] ) ); } /* Description of im_invfftr. */ static im_function invfftr_desc = { "im_invfftr", /* Name */ "real part of inverse fast-fourier transform", IM_FN_TRANSFORM, /* Flags */ invfftr_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_phasecor_fft via arg vector. */ static int phasecor_fft_vec( im_object *argv ) { return( im_phasecor_fft( argv[0], argv[1], argv[2] ) ); } /* Description of im_phasecor_fft. */ static im_function phasecor_fft_desc = { "im_phasecor_fft", /* Name */ "non-normalised correlation of gradient of in2 within in1", IM_FN_TRANSFORM, /* Flags */ phasecor_fft_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Package up all these functions. */ static im_function *freq_list[] = { &create_fmask_desc, &disp_ps_desc, &flt_image_freq_desc, &fractsurf_desc, &freqflt_desc, &fwfft_desc, &rotquad_desc, &invfft_desc, &phasecor_fft_desc, &invfftr_desc }; /* Package of functions. */ im_package im__freq_filt = { "freq_filt", IM_NUMBER( freq_list ), freq_list }; vips-7.38.5/libvips/deprecated/im_matmul.c0000644000175000017500000000444412303140253015417 00000000000000/* Multiply two matrices. * * Copyright: 1990, K. Martinez and J. Cupitt * * 23/10/10 * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * im_matmul: * @in1: input matrix * @in2: input matrix * @filename: name for output matrix * * Multiplies two DOUBLEMASKs. Result matrix is made and returned. * Pass the filename to set for the output. * * The scale and offset members of @in1 and @in2 are ignored. * * See also: im_mattrn(), im_matinv(). * * Returns: the result matrix on success, or %NULL on error. */ DOUBLEMASK * im_matmul( DOUBLEMASK *in1, DOUBLEMASK *in2, const char *name ) { int xc, yc, col; double sum; DOUBLEMASK *mat; double *out, *a, *b; double *s1, *s2; /* Check matrix sizes. */ if( in1->xsize != in2->ysize ) { im_error( "im_matmul", "%s", _( "bad sizes" ) ); return( NULL ); } /* Allocate output matrix. */ if( !(mat = im_create_dmask( name, in2->xsize, in1->ysize )) ) return( NULL ); /* Multiply. */ out = mat->coeff; s1 = in1->coeff; for( yc = 0; yc < in1->ysize; yc++ ) { s2 = in2->coeff; for( col = 0; col < in2->xsize; col++ ) { /* Get ready to sweep a row. */ sum = 0.0; a = s1; b = s2; for( sum = 0.0, xc = 0; xc < in1->xsize; xc++ ) { sum += *a++ * *b; b += in2->xsize; } *out++ = sum; s2++; } s1 += in1->xsize; } return( mat ); } vips-7.38.5/libvips/deprecated/arith_dispatch.c0000644000175000017500000006714112303140253016424 00000000000000/* Function dispatch tables for arithmetic. * * J. Cupitt, 8/4/93. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /* One image in, one out. */ static im_arg_desc one_in_one_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Two images in, one out. */ static im_arg_desc two_in_one_out[] = { IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_OUTPUT_IMAGE( "out" ) }; /* Image in, number out. */ static im_arg_desc image_in_num_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_DOUBLE( "value" ) }; /* Args for im_recomb. */ static im_arg_desc recomb_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DMASK( "matrix" ) }; /* Call im_recomb via arg vector. */ static int recomb_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_recomb( argv[0], argv[1], mo->mask ) ); } /* Description of im_recomb. */ static im_function recomb_desc = { "im_recomb", /* Name */ "linear recombination with mask", IM_FN_PIO, /* Flags */ recomb_vec, /* Dispatch function */ IM_NUMBER( recomb_args ), /* Size of arg list */ recomb_args /* Arg list */ }; /* Call im_abs via arg vector. */ static int abs_vec( im_object *argv ) { return( im_abs( argv[0], argv[1] ) ); } /* Description of im_abs. */ static im_function abs_desc = { "im_abs", /* Name */ N_( "absolute value" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ abs_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_add via arg vector. */ static int add_vec( im_object *argv ) { return( im_add( argv[0], argv[1], argv[2] ) ); } /* Description of im_add. */ static im_function add_desc = { "im_add", /* Name */ N_( "add two images" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ add_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_avg via arg vector. */ static int avg_vec( im_object *argv ) { double f; if( im_avg( argv[0], &f ) ) return( -1 ); *((double *) argv[1]) = f; return( 0 ); } /* Description of im_avg. */ static im_function avg_desc = { "im_avg", /* Name */ N_( "average value of image" ), /* Description */ IM_FN_PIO, /* Flags */ avg_vec, /* Dispatch function */ IM_NUMBER( image_in_num_out ), /* Size of arg list */ image_in_num_out /* Arg list */ }; /* Args to im_point. */ static im_arg_desc point_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_INTERPOLATE( "interpolate" ), IM_INPUT_DOUBLE( "x" ), IM_INPUT_DOUBLE( "y" ), IM_INPUT_INT( "band" ), IM_OUTPUT_DOUBLE( "out" ) }; /* Call im_point via arg vector. */ static int point_vec( im_object *argv ) { VipsInterpolate *interpolate = VIPS_INTERPOLATE( argv[1] ); double x = *((double *) argv[2]); double y = *((double *) argv[3]); int band = *((double *) argv[4]); return( im_point( argv[0], interpolate, x, y, band, argv[5] ) ); } /* Description of im_point. */ static im_function point_desc = { "im_point", "interpolate value at single point", IM_FN_PIO, point_vec, IM_NUMBER( point_args ), point_args }; /* Args to im_point_bilinear. */ static im_arg_desc point_bilinear_args[] = { IM_INPUT_IMAGE ("in"), IM_INPUT_DOUBLE("x"), IM_INPUT_DOUBLE("y"), IM_INPUT_INT("band"), IM_OUTPUT_DOUBLE("val") }; /* Call im_point_bilinear via arg vector. */ static int point_bilinear_vec( im_object *argv ) { return im_point_bilinear( argv[0], *(double*)argv[1], *(double*)argv[2], *(int*)argv[3], argv[4] ); } /* Description of im_point_bilinear. */ static im_function point_bilinear_desc = { "im_point_bilinear", "interpolate value at single point, linearly", IM_FN_PIO, point_bilinear_vec, IM_NUMBER( point_bilinear_args ), point_bilinear_args }; /* Call im_deviate via arg vector. */ static int deviate_vec( im_object *argv ) { double f; if( im_deviate( argv[0], &f ) ) return( -1 ); *((double *) argv[1]) = f; return( 0 ); } /* Description of im_deviate. */ static im_function deviate_desc = { "im_deviate", /* Name */ N_( "standard deviation of image" ), /* Description */ IM_FN_PIO, /* Flags */ deviate_vec, /* Dispatch function */ IM_NUMBER( image_in_num_out ), /* Size of arg list */ image_in_num_out /* Arg list */ }; /* Call im_exp10tra via arg vector. */ static int exp10tra_vec( im_object *argv ) { return( im_exp10tra( argv[0], argv[1] ) ); } /* Description of im_exp10tra. */ static im_function exp10tra_desc = { "im_exp10tra", /* Name */ N_( "10^pel of image" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ exp10tra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_exptra via arg vector. */ static int exptra_vec( im_object *argv ) { return( im_exptra( argv[0], argv[1] ) ); } /* Description of im_exptra. */ static im_function exptra_desc = { "im_exptra", /* Name */ N_( "e^pel of image" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ exptra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args for im_powtra(). */ static im_arg_desc powtra_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "x" ) }; /* Call im_expntra via arg vector. */ static int expntra_vec( im_object *argv ) { double a = *((double *) argv[2]); return( im_expntra( argv[0], argv[1], a ) ); } /* Description of im_expntra. */ static im_function expntra_desc = { "im_expntra", /* Name */ N_( "x^pel of image" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ expntra_vec, /* Dispatch function */ IM_NUMBER( powtra_args ), /* Size of arg list */ powtra_args /* Arg list */ }; /* Args for im_expntra_vec(). */ static im_arg_desc expntra_vec_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLEVEC( "v" ) }; /* Call im_expntra_vec() via arg vector. */ static int expntra_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_expntra_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_expntra_vec. */ static im_function expntra_vec_desc = { "im_expntra_vec", /* Name */ N_( "[x,y,z]^pel of image" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ expntra_vec_vec, /* Dispatch function */ IM_NUMBER( expntra_vec_args ), /* Size of arg list */ expntra_vec_args /* Arg list */ }; /* Call im_divide via arg vector. */ static int divide_vec( im_object *argv ) { return( im_divide( argv[0], argv[1], argv[2] ) ); } /* Description of im_divide. */ static im_function divide_desc = { "im_divide", /* Name */ N_( "divide two images" ), IM_FN_PIO, /* Flags */ divide_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_invert via arg vector. */ static int invert_vec( im_object *argv ) { return( im_invert( argv[0], argv[1] ) ); } /* Description of im_invert. */ static im_function invert_desc = { "im_invert", /* Name */ N_( "photographic negative" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ invert_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args for im_lintra(). */ static im_arg_desc lintra_args[] = { IM_INPUT_DOUBLE( "a" ), IM_INPUT_IMAGE( "in" ), IM_INPUT_DOUBLE( "b" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_lintra() via arg vector. */ static int lintra_vec( im_object *argv ) { double a = *((double *) argv[0]); double b = *((double *) argv[2]); return( im_lintra( a, argv[1], b, argv[3] ) ); } /* Description of im_lintra(). */ static im_function lintra_desc = { "im_lintra", /* Name */ N_( "calculate a*in + b = outfile" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ lintra_vec, /* Dispatch function */ IM_NUMBER( lintra_args ), /* Size of arg list */ lintra_args /* Arg list */ }; /* Args for im_lintra_vec(). */ static im_arg_desc lintra_vec_args[] = { IM_INPUT_DOUBLEVEC( "a" ), IM_INPUT_IMAGE( "in" ), IM_INPUT_DOUBLEVEC( "b" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_lintra_vec() via arg vector. */ static int lintra_vec_vec( im_object *argv ) { im_doublevec_object *dva = (im_doublevec_object *) argv[0]; im_doublevec_object *dvb = (im_doublevec_object *) argv[2]; if( dva->n != dvb->n ) { im_error( "im_lintra_vec", "%s", _( "vectors not equal length" ) ); return( -1 ); } return( im_lintra_vec( dva->n, dva->vec, argv[1], dvb->vec, argv[3] ) ); } /* Description of im_lintra_vec(). */ static im_function lintra_vec_desc = { "im_lintra_vec", /* Name */ N_( "calculate a*in + b -> out, a and b vectors" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ lintra_vec_vec, /* Dispatch function */ IM_NUMBER( lintra_vec_args ), /* Size of arg list */ lintra_vec_args /* Arg list */ }; /* Call im_log10tra via arg vector. */ static int log10tra_vec( im_object *argv ) { return( im_log10tra( argv[0], argv[1] ) ); } /* Description of im_log10tra. */ static im_function log10tra_desc = { "im_log10tra", /* Name */ N_( "log10 of image" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ log10tra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_logtra via arg vector. */ static int logtra_vec( im_object *argv ) { return( im_logtra( argv[0], argv[1] ) ); } /* Description of im_logtra. */ static im_function logtra_desc = { "im_logtra", /* Name */ N_( "ln of image" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ logtra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_tantra via arg vector. */ static int tantra_vec( im_object *argv ) { return( im_tantra( argv[0], argv[1] ) ); } /* Description of im_tantra. */ static im_function tantra_desc = { "im_tantra", /* Name */ N_( "tan of image (angles in degrees)" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ tantra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_atantra via arg vector. */ static int atantra_vec( im_object *argv ) { return( im_atantra( argv[0], argv[1] ) ); } /* Description of im_atantra. */ static im_function atantra_desc = { "im_atantra", /* Name */ N_( "atan of image (result in degrees)" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ atantra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_costra via arg vector. */ static int costra_vec( im_object *argv ) { return( im_costra( argv[0], argv[1] ) ); } /* Description of im_costra. */ static im_function costra_desc = { "im_costra", /* Name */ N_( "cos of image (angles in degrees)" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ costra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_acostra via arg vector. */ static int acostra_vec( im_object *argv ) { return( im_acostra( argv[0], argv[1] ) ); } /* Description of im_acostra. */ static im_function acostra_desc = { "im_acostra", /* Name */ N_( "acos of image (result in degrees)" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ acostra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_ceil via arg vector. */ static int ceil_vec( im_object *argv ) { return( im_ceil( argv[0], argv[1] ) ); } /* Description of im_ceil. */ static im_function ceil_desc = { "im_ceil", /* Name */ N_( "round to smallest integer value not less than" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ ceil_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_floor via arg vector. */ static int floor_vec( im_object *argv ) { return( im_floor( argv[0], argv[1] ) ); } /* Description of im_floor. */ static im_function floor_desc = { "im_floor", /* Name */ N_( "round to largest integer value not greater than" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ floor_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_rint via arg vector. */ static int rint_vec( im_object *argv ) { return( im_rint( argv[0], argv[1] ) ); } /* Description of im_rint. */ static im_function rint_desc = { "im_rint", /* Name */ N_( "round to nearest integer value" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ rint_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_sintra via arg vector. */ static int sintra_vec( im_object *argv ) { return( im_sintra( argv[0], argv[1] ) ); } /* Description of im_sintra. */ static im_function sintra_desc = { "im_sintra", /* Name */ N_( "sin of image (angles in degrees)" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ sintra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_bandmean via arg vector. */ static int bandmean_vec( im_object *argv ) { return( im_bandmean( argv[0], argv[1] ) ); } /* Description of im_bandmean. */ static im_function bandmean_desc = { "im_bandmean", /* Name */ N_( "average image bands" ), IM_FN_PIO, /* Flags */ bandmean_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_sign via arg vector. */ static int sign_vec( im_object *argv ) { return( im_sign( argv[0], argv[1] ) ); } /* Description of im_sign. */ static im_function sign_desc = { "im_sign", /* Name */ N_( "unit vector in direction of value" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ sign_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_asintra via arg vector. */ static int asintra_vec( im_object *argv ) { return( im_asintra( argv[0], argv[1] ) ); } /* Description of im_asintra. */ static im_function asintra_desc = { "im_asintra", /* Name */ N_( "asin of image (result in degrees)" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ asintra_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_max via arg vector. */ static int max_vec( im_object *argv ) { double f; if( im_max( argv[0], &f ) ) return( -1 ); *((double *) argv[1]) = f; return( 0 ); } /* Description of im_max. */ static im_function max_desc = { "im_max", /* Name */ N_( "maximum value of image" ), /* Description */ IM_FN_PIO, /* Flags */ max_vec, /* Dispatch function */ IM_NUMBER( image_in_num_out ), /* Size of arg list */ image_in_num_out /* Arg list */ }; /* Args for maxpos (and minpos). */ static im_arg_desc maxpos_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_COMPLEX( "position" ) }; /* Call im_maxpos via arg vector. */ static int maxpos_vec( im_object *argv ) { double f; int x, y; if( im_maxpos( argv[0], &x, &y, &f ) ) return( -1 ); ((double *) argv[1])[0] = x; ((double *) argv[1])[1] = y; return( 0 ); } /* Description of im_maxpos. */ static im_function maxpos_desc = { "im_maxpos", /* Name */ N_( "position of maximum value of image" ), 0, /* Flags */ maxpos_vec, /* Dispatch function */ IM_NUMBER( maxpos_args ), /* Size of arg list */ maxpos_args /* Arg list */ }; /* Args to im_maxpos_avg. */ static im_arg_desc maxpos_avg_args[] = { IM_INPUT_IMAGE ("in"), IM_OUTPUT_DOUBLE("x"), IM_OUTPUT_DOUBLE("y"), IM_OUTPUT_DOUBLE("out") }; /* Call im_maxpos_avg via arg vector. */ static int maxpos_avg_vec( im_object *argv ) { return im_maxpos_avg( argv[0], argv[1], argv[2], argv[3] ); } /* Description of im_maxpos_avg. */ static im_function maxpos_avg_desc = { "im_maxpos_avg", N_( "position of maximum value of image, averaging in case of draw" ), IM_FN_PIO, maxpos_avg_vec, IM_NUMBER( maxpos_avg_args ), maxpos_avg_args }; /* Args to im_min/maxpos_vec. */ static im_arg_desc maxpos_vec_args[] = { IM_INPUT_IMAGE ("in"), IM_INPUT_INT ("n"), IM_OUTPUT_INTVEC("xes"), IM_OUTPUT_INTVEC("yes"), IM_OUTPUT_DOUBLEVEC("maxima") }; /* Call im_maxpos_vec via arg vector. */ static int maxpos_vec_vec( im_object *argv ) { int n = *((int *) argv[1]); im_intvec_object *xes = argv[2]; im_intvec_object *yes = argv[3]; im_doublevec_object *maxima = argv[4]; xes->vec = IM_ARRAY( NULL, n, int ); xes->n = n; yes->vec = IM_ARRAY( NULL, n, int ); yes->n = n; maxima->vec = IM_ARRAY( NULL, n, double ); maxima->n = n; if( !xes->vec || !yes->vec || !maxima->vec || im_maxpos_vec( argv[0], xes->vec, yes->vec, maxima->vec, n ) ) return -1; return 0; } /* Description of im_maxpos_vec. */ static im_function maxpos_vec_desc = { "im_maxpos_vec", N_( "position and value of n maxima of image" ), IM_FN_PIO, maxpos_vec_vec, IM_NUMBER( maxpos_vec_args ), maxpos_vec_args }; /* Call im_minpos_vec via arg vector. */ static int minpos_vec_vec( im_object *argv ) { int n = *((int *) argv[1]); im_intvec_object *xes = argv[2]; im_intvec_object *yes = argv[3]; im_doublevec_object *minima = argv[4]; xes->vec = IM_ARRAY( NULL, n, int ); xes->n = n; yes->vec = IM_ARRAY( NULL, n, int ); yes->n = n; minima->vec = IM_ARRAY( NULL, n, double ); minima->n = n; if( !xes->vec || !yes->vec || !minima->vec || im_minpos_vec( argv[0], xes->vec, yes->vec, minima->vec, n ) ) return -1; return 0; } /* Description of im_minpos_vec. */ static im_function minpos_vec_desc = { "im_minpos_vec", N_( "position and value of n minima of image" ), IM_FN_PIO, minpos_vec_vec, IM_NUMBER( maxpos_vec_args ), maxpos_vec_args }; /* Args for measure. */ static im_arg_desc measure_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_DMASK( "mask" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_INT( "w" ), IM_INPUT_INT( "h" ), IM_INPUT_INT( "h_patches" ), IM_INPUT_INT( "v_patches" ) }; /* Call im_measure via arg vector. */ static int measure_vec( im_object *argv ) { im_mask_object *mo = argv[1]; int x = *((int *) argv[2]); int y = *((int *) argv[3]); int w = *((int *) argv[4]); int h = *((int *) argv[5]); int u = *((int *) argv[6]); int v = *((int *) argv[7]); if( !(mo->mask = im_measure_area( argv[0], x, y, w, h, u, v, NULL, 0, mo->name )) ) { return( -1 ); } return( 0 ); } /* Description of im_measure. */ static im_function measure_desc = { "im_measure", /* Name */ N_( "measure averages of a grid of patches" ), IM_FN_PIO, /* Flags */ measure_vec, /* Dispatch function */ IM_NUMBER( measure_args ), /* Size of arg list */ measure_args /* Arg list */ }; /* Call im_min via arg vector. */ static int min_vec( im_object *argv ) { double f; if( im_min( argv[0], &f ) ) return( -1 ); *((double *) argv[1]) = f; return( 0 ); } /* Description of im_min. */ static im_function min_desc = { "im_min", /* Name */ N_( "minimum value of image" ), /* Description */ IM_FN_PIO, /* Flags */ min_vec, /* Dispatch function */ IM_NUMBER( image_in_num_out ), /* Size of arg list */ image_in_num_out /* Arg list */ }; /* Call im_minpos via arg vector. */ static int minpos_vec( im_object *argv ) { double f; int x, y; if( im_minpos( argv[0], &x, &y, &f ) ) return( -1 ); ((double *) argv[1])[0] = x; ((double *) argv[1])[1] = y; return( 0 ); } /* Description of im_minpos. */ static im_function minpos_desc = { "im_minpos", /* Name */ N_( "position of minimum value of image" ), 0, /* Flags */ minpos_vec, /* Dispatch function */ IM_NUMBER( maxpos_args ), /* Size of arg list */ maxpos_args /* Arg list */ }; /* Call im_remainder via arg vector. */ static int remainder_vec( im_object *argv ) { return( im_remainder( argv[0], argv[1], argv[2] ) ); } /* Description of im_remainder. */ static im_function remainder_desc = { "im_remainder", /* Name */ N_( "remainder after integer division" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ remainder_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_remainderconst via arg vector. */ static int remainderconst_vec( im_object *argv ) { double c = *((double *) argv[2]); return( im_remainderconst( argv[0], argv[1], c ) ); } /* Args for im_remainderconst(). */ static im_arg_desc remainderconst_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "x" ) }; /* Description of im_remainderconst. */ static im_function remainderconst_desc = { "im_remainderconst", /* Name */ N_( "remainder after integer division by a constant" ),/* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ remainderconst_vec, /* Dispatch function */ IM_NUMBER( remainderconst_args ),/* Size of arg list */ remainderconst_args /* Arg list */ }; /* Call im_remainder_vec via arg vector. */ static int remainder_vec_vec( im_object *argv ) { im_doublevec_object *dv = (im_doublevec_object *) argv[2]; return( im_remainder_vec( argv[0], argv[1], dv->n, dv->vec ) ); } /* Args for im_remainder_vec(). */ static im_arg_desc remainder_vec_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLEVEC( "x" ) }; /* Description of im_remainder_vec. */ static im_function remainder_vec_desc = { "im_remainder_vec", /* Name */ N_( "remainder after integer division by a vector of constants" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ remainder_vec_vec, /* Dispatch function */ IM_NUMBER( remainder_vec_args ),/* Size of arg list */ remainder_vec_args /* Arg list */ }; /* Call im_multiply via arg vector. */ static int multiply_vec( im_object *argv ) { return( im_multiply( argv[0], argv[1], argv[2] ) ); } /* Description of im_multiply. */ static im_function multiply_desc = { "im_multiply", /* Name */ N_( "multiply two images" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ multiply_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_powtra() via arg vector. */ static int powtra_vec( im_object *argv ) { double a = *((double *) argv[2]); return( im_powtra( argv[0], argv[1], a ) ); } /* Description of im_powtra(). */ static im_function powtra_desc = { "im_powtra", /* Name */ N_( "pel^x of image" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ powtra_vec, /* Dispatch function */ IM_NUMBER( powtra_args ), /* Size of arg list */ powtra_args /* Arg list */ }; /* Call im_powtra_vec() via arg vector. */ static int powtra_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_powtra_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_powtra_vec(). */ static im_function powtra_vec_desc = { "im_powtra_vec", /* Name */ N_( "pel^[x,y,z] of image" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ powtra_vec_vec, /* Dispatch function */ IM_NUMBER( expntra_vec_args ), /* Size of arg list */ expntra_vec_args /* Arg list */ }; /* Args for im_stats. */ static im_arg_desc stats_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_DMASK_STATS( "statistics" ) }; /* Call im_stats() via arg vector. */ static int stats_vec( im_object *argv ) { im_mask_object *mo = argv[1]; if( !(mo->mask = im_stats( argv[0] )) ) return( -1 ); return( 0 ); } /* Description of im_stats(). */ static im_function stats_desc = { "im_stats", /* Name */ N_( "many image statistics in one pass" ), IM_FN_PIO, /* Flags */ stats_vec, /* Dispatch function */ IM_NUMBER( stats_args ), /* Size of arg list */ stats_args /* Arg list */ }; /* Call im_subtract via arg vector. */ static int subtract_vec( im_object *argv ) { return( im_subtract( argv[0], argv[1], argv[2] ) ); } /* Description of im_subtract. */ static im_function subtract_desc = { "im_subtract", /* Name */ N_( "subtract two images" ), /* Description */ IM_FN_PIO, /* Flags */ subtract_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Args for im_linreg. */ static im_arg_desc linreg_args[] = { IM_INPUT_IMAGEVEC( "ins" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLEVEC( "xs" ) }; /* Call im_linreg() via arg vector. */ static int linreg_vec( im_object *argv ) { #define FUNCTION_NAME "im_linreg_vec" im_imagevec_object *ins_vec= (im_imagevec_object*) argv[0]; im_doublevec_object *xs_vec= (im_doublevec_object*) argv[2]; IMAGE *out= (IMAGE*) argv[1]; IMAGE **ins= IM_ARRAY( out, ins_vec-> n + 1, IMAGE* ); int i; if( ! ins ) return -1; for( i= 0; i < ins_vec-> n; ++i ) ins[ i ]= ins_vec-> vec[ i ]; ins[ ins_vec-> n ]= NULL; if( xs_vec-> n != ins_vec-> n ){ im_error( FUNCTION_NAME, "image vector and x vector differ in length" ); return -1; } return im_linreg( ins, out, xs_vec-> vec ); #undef FUNCTION_NAME } /* Description of im_linreg(). */ static im_function linreg_desc = { "im_linreg", /* Name */ N_( "pixelwise linear regression" ), IM_FN_PIO | IM_FN_PTOP, /* Flags */ linreg_vec, /* Dispatch function */ IM_NUMBER( linreg_args ), /* Size of arg list */ linreg_args /* Arg list */ }; /* Call im_cross_phase via arg vector. */ static int cross_phase_vec( im_object *argv ) { return( im_cross_phase( argv[0], argv[1], argv[2] ) ); } /* Description of im_cross_phase. */ static im_function cross_phase_desc = { "im_cross_phase", /* Name */ N_( "phase of cross power spectrum of two complex images" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ cross_phase_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Package up all these functions. */ static im_function *arith_list[] = { &abs_desc, &acostra_desc, &add_desc, &asintra_desc, &atantra_desc, &avg_desc, &point_desc, &point_bilinear_desc, &bandmean_desc, &ceil_desc, &costra_desc, &cross_phase_desc, &deviate_desc, ÷_desc, &exp10tra_desc, &expntra_desc, &expntra_vec_desc, &exptra_desc, &floor_desc, &invert_desc, &lintra_desc, &linreg_desc, &lintra_vec_desc, &log10tra_desc, &logtra_desc, &max_desc, &maxpos_desc, &maxpos_avg_desc, &maxpos_vec_desc, &measure_desc, &min_desc, &minpos_desc, &minpos_vec_desc, &multiply_desc, &powtra_desc, &powtra_vec_desc, &recomb_desc, &remainder_desc, &remainderconst_desc, &remainder_vec_desc, &rint_desc, &sign_desc, &sintra_desc, &stats_desc, &subtract_desc, &tantra_desc }; /* Package of functions. */ im_package im__arithmetic = { "arithmetic", IM_NUMBER( arith_list ), arith_list }; vips-7.38.5/libvips/deprecated/im_gadd.c0000644000175000017500000000571012303140253015014 00000000000000/* @(#) Generalised addition of two vasari images using the routines * @(#) im_gaddim or im_gfadd * @(#) Convention to ease the complilation time. * @(#) Function im_gadd() assumes that the both input files * @(#) are either memory mapped or in a buffer. * @(#) Images must have the same no of bands and must not be complex * @(#) No check for overflow is carried out. * @(#) * @(#) int im_gadd(a, in1, b, in2, c, out) * @(#) IMAGE *in1, *in2, *out; * @(#) double a, b, c; * @(#) * @(#) Returns 0 on success and -1 on error * @(#) * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include extern int im_gfadd(); extern int im_gaddim(); /* This function works on either mmaped files or on images in buffer */ /** * im_gadd: * * Deprecated. */ int im_gadd(a, in1, b, in2, c, out) IMAGE *in1, *in2, *out; double a, b, c; { int flagint = 0; int flagfloat = 0; int value = 0; switch(in1->BandFmt) { case IM_BANDFMT_UCHAR: case IM_BANDFMT_CHAR: case IM_BANDFMT_USHORT: case IM_BANDFMT_SHORT: case IM_BANDFMT_UINT: case IM_BANDFMT_INT: flagint = 1; break; case IM_BANDFMT_FLOAT: case IM_BANDFMT_DOUBLE: flagfloat = 1; break; default: im_error("im_gadd","%s", _("Unable to accept image1")); return(-1); } switch(in2->BandFmt) { case IM_BANDFMT_UCHAR: case IM_BANDFMT_CHAR: case IM_BANDFMT_USHORT: case IM_BANDFMT_SHORT: case IM_BANDFMT_UINT: case IM_BANDFMT_INT: flagint = 1; break; case IM_BANDFMT_FLOAT: case IM_BANDFMT_DOUBLE: flagfloat = 1; break; default: im_error("im_gadd","%s", _("Unable to accept image1")); return(-1); } /* Select output routines */ if (flagfloat == 1) { value = im_gfadd(a, in1, b, in2, c, out); if (value == -1) return(-1); } else if (flagint == 1) { value = im_gaddim(a, in1, b, in2, c, out); if (value == -1) return(-1); } else assert( 0 ); return(0); } vips-7.38.5/libvips/deprecated/im_png2vips.c0000644000175000017500000000644412303140253015672 00000000000000/* Convert 1 to 4-band 8 or 16-bit VIPS images to/from PNG. * * 19/12/11 * - just a stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include "../foreign/vipspng.h" static int png2vips( const char *name, IMAGE *out, gboolean header_only ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; char *p, *q; int seq; im_filename_split( name, filename, mode ); seq = 0; p = &mode[0]; if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "seq", q ) ) seq = 1; } /* We need to be compatible with the pre-sequential mode * im_png2vips(). This returned a "t" if given a "p" image, since it * used writeline. * * If we're writing the image to a "p", switch it to a "t". * * Don't do this for header read, since we don't want to force a * malloc if all we are doing is looking at fields. */ if( !header_only && !seq && out->dtype == VIPS_IMAGE_PARTIAL ) { if( vips__image_wio_output( out ) ) return( -1 ); } #ifdef HAVE_PNG if( header_only ) { if( vips__png_header( filename, out ) ) return( -1 ); } else { if( vips__png_read( filename, out, TRUE ) ) return( -1 ); } #else vips_error( "im_png2vips", _( "no PNG support in your libvips" ) ); return( -1 ); #endif /*HAVE_PNG*/ return( 0 ); } int im_png2vips( const char *name, IMAGE *out ) { return( png2vips( name, out, FALSE ) ); } /* By having a separate header func, we get lazy.c to open via disc/mem. */ static int im_png2vips_header( const char *name, IMAGE *out ) { return( png2vips( name, out, TRUE ) ); } static int ispng( const char *filename ) { return( vips_foreign_is_a( "pngload", filename ) ); } static const char *png_suffs[] = { ".png", NULL }; typedef VipsFormat VipsFormatPng; typedef VipsFormatClass VipsFormatPngClass; static void vips_format_png_class_init( VipsFormatPngClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "png"; object_class->description = _( "PNG" ); format_class->is_a = ispng; format_class->header = im_png2vips_header; format_class->load = im_png2vips; format_class->save = im_vips2png; format_class->suffs = png_suffs; } static void vips_format_png_init( VipsFormatPng *object ) { } G_DEFINE_TYPE( VipsFormatPng, vips_format_png, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_vips2png.c0000644000175000017500000000415312303140253015665 00000000000000/* Convert 1 to 4-band 8 or 16-bit VIPS images to/from PNG. * * 19/12/11 * - just a stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include int im_vips2png( IMAGE *in, const char *filename ) { int compression; int interlace; char *p, *q; char name[FILENAME_MAX]; char mode[FILENAME_MAX]; char buf[FILENAME_MAX]; /* Extract write mode from filename and parse. */ im_filename_split( filename, name, mode ); strcpy( buf, mode ); p = &buf[0]; compression = 6; interlace = 0; if( (q = im_getnextoption( &p )) ) compression = atoi( q ); if( (q = im_getnextoption( &p )) ) interlace = atoi( q ); return( vips_pngsave( in, name, "compression", compression, "interlace", interlace, NULL ) ); } int im_vips2bufpng( IMAGE *in, IMAGE *out, int compression, int interlace, char **obuf, size_t *olen ) { if( vips_pngsave_buffer( in, (void **) obuf, olen, "compression", compression, "interlace", interlace, NULL ) ) return( -1 ); if( out ) im_add_callback( out, "close", (im_callback_fn) vips_free, obuf, NULL ); return( 0 ); } vips-7.38.5/libvips/deprecated/im_tiff2vips.c0000644000175000017500000000775012303140253016037 00000000000000/* vips7 compat stub for tiff loading ... see foreign/tiff2vips for the * replacement * * 6/12/11 * - just a stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include "../foreign/tiff.h" static int tiff2vips( const char *name, IMAGE *out, gboolean header_only ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; char *p, *q; int page; int seq; im_filename_split( name, filename, mode ); page = 0; seq = 0; p = &mode[0]; if( (q = im_getnextoption( &p )) ) { page = atoi( q ); } if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "seq", q ) ) seq = 1; } /* We need to be compatible with the pre-sequential mode * im_tiff2vips(). This returned a "t" if given a "p" image, since it * used writeline. * * If we're writing the image to a "p", switch it to a "t". And only * for non-tiled (strip) images which we write with writeline. * * Don't do this for header read, since we don't want to force a * malloc if all we are doing is looking at fields. */ #ifdef HAVE_TIFF if( !header_only && !seq && !vips__istifftiled( filename ) && out->dtype == VIPS_IMAGE_PARTIAL ) { if( vips__image_wio_output( out ) ) return( -1 ); } if( header_only ) { if( vips__tiff_read_header( filename, out, page ) ) return( -1 ); } else { if( vips__tiff_read( filename, out, page, TRUE ) ) return( -1 ); } #else vips_error( "im_tiff2vips", _( "no TIFF support in your libvips" ) ); return( -1 ); #endif /*HAVE_TIFF*/ return( 0 ); } int im_tiff2vips( const char *name, IMAGE *out ) { return( tiff2vips( name, out, FALSE ) ); } /* By having a separate header func, we get lazy.c to open via disc/mem. */ static int im_tiff2vips_header( const char *name, IMAGE *out ) { return( tiff2vips( name, out, TRUE ) ); } static VipsFormatFlags tiff_flags( const char *name ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; im_filename_split( name, filename, mode ); return( (VipsFormatFlags) vips_foreign_flags( "tiffload", filename ) ); } static int istiff( const char *name ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; im_filename_split( name, filename, mode ); return( vips_foreign_is_a( "tiffload", filename ) ); } static const char *tiff_suffs[] = { ".tif", ".tiff", NULL }; typedef VipsFormat VipsFormatTiff; typedef VipsFormatClass VipsFormatTiffClass; static void vips_format_tiff_class_init( VipsFormatTiffClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "tiff"; object_class->description = _( "TIFF" ); format_class->is_a = istiff; format_class->header = im_tiff2vips_header; format_class->load = im_tiff2vips; format_class->save = im_vips2tiff; format_class->get_flags = tiff_flags; format_class->suffs = tiff_suffs; } static void vips_format_tiff_init( VipsFormatTiff *object ) { } G_DEFINE_TYPE( VipsFormatTiff, vips_format_tiff, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_resize_linear.c0000644000175000017500000001104212303140253016743 00000000000000/* im_lowpass() * History: * 27/10/94 JC * - IM_ARRAY modified to use local allocation * - im_iscomplex() call added * 17/2/95 JC * - modernised a little * 18/8/95 JC * - name changed to reflect function more closely * 2/6/04 * - was detecting edges incorrectly, segv for some images (thanks Javi) */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* What we do for each pel. */ #define LOOP( TYPE ) \ if( Xint >= 0 && Yint >=0 && \ Xint < in->Xsize-1 && Yint < in->Ysize-1 ) \ for( bb = 0; bb < in->Bands; bb++ ) { \ TYPE s1 = *((TYPE *) p); \ TYPE s2 = *((TYPE *) (p + ips)); \ TYPE s3 = *((TYPE *) (p + ils)); \ TYPE s4 = *((TYPE *) (p + ips + ils)); \ TYPE *t = (TYPE *) q; \ \ *t = (1-dx)*(1-dy)*s1 + dx*(1-dy)*s2 + \ dy*(1-dx)*s3 + dx*dy*s4; \ \ p += ies; \ q += oes; \ } \ else if( Xint == in->Xsize-1 && Yint >= 0 && Yint < in->Ysize - 1 ) \ for( bb = 0; bb < in->Bands; bb++ ) { \ TYPE s1 = *((TYPE *) p); \ TYPE s3 = *((TYPE *) (p + ils)); \ TYPE *t = (TYPE *) q; \ \ *t = (1-dy)*s1 + dy*s3; \ \ p += ies; \ q += oes; \ } \ else if( Yint == in->Ysize-1 && Xint >= 0 && Xint < in->Xsize - 1 ) \ for( bb = 0; bb < in->Bands; bb++ ) { \ TYPE s1 = *((TYPE *) p); \ TYPE s2 = *((TYPE *) (p + ips)); \ TYPE *t = (TYPE *) q; \ \ *t = (1-dx)*s1 + dx*s2; \ \ p += ies; \ q += oes; \ } \ else \ for( bb = 0; bb < in->Bands; bb++ ) { \ unsigned char s1 = *((unsigned char *) p); \ TYPE *t = (TYPE *) q; \ \ *t = s1; \ \ p += ies; \ q += oes; \ } int im_resize_linear( IMAGE *in, IMAGE *out, int X, int Y ) { double dx, dy, xscale, yscale; double Xnew, Ynew; /* inv. coord. of the interpolated pt */ int x, y; int Xint, Yint; int bb; PEL *input, *opline; PEL *q, *p; int ils, ips, ies; /* Input and output line, pel and */ int ols, oes; /* element sizes */ if( im_iocheck( in, out ) ) return( -1 ); if( vips_bandfmt_iscomplex( in->BandFmt ) ) { im_error( "im_lowpass", "%s", _( "non-complex input only" ) ); return( -1 ); } if( in->Coding != IM_CODING_NONE ) { im_error("im_lowpass: ", "%s", _( "put should be uncoded") ); return( -1 ); } if( im_cp_desc( out, in ) ) return( -1 ); out->Xsize = X; out->Ysize = Y; if( im_setupout( out ) ) return( -1 ); ils = IM_IMAGE_SIZEOF_LINE( in ); ips = IM_IMAGE_SIZEOF_PEL( in ); ies = IM_IMAGE_SIZEOF_ELEMENT( in ); ols = IM_IMAGE_SIZEOF_LINE( out ); oes = IM_IMAGE_SIZEOF_ELEMENT( out ); /* buffer lines ***************/ if( !(opline = IM_ARRAY( out, ols, PEL )) ) return( -1 ); /* Resampling *************/ input = (PEL*) in->data; xscale = ((double)in->Xsize-1)/(X-1); yscale = ((double)in->Ysize-1)/(Y-1); for (y=0; yBandFmt ) { case IM_BANDFMT_UCHAR: LOOP( unsigned char); break; case IM_BANDFMT_USHORT: LOOP( unsigned short ); break; case IM_BANDFMT_UINT: LOOP( unsigned int ); break; case IM_BANDFMT_CHAR: LOOP( signed char ); break; case IM_BANDFMT_SHORT: LOOP( signed short ); break; case IM_BANDFMT_INT: LOOP( signed int ); break; case IM_BANDFMT_FLOAT: LOOP( float ); break; case IM_BANDFMT_DOUBLE: LOOP( double ); break; default: im_error( "im_lowpass", "%s", _( "unsupported image type" ) ); return( -1 ); /*NOTREACHED*/ } } if (im_writeline(y, out, opline) ) return(-1); } return(0); } vips-7.38.5/libvips/deprecated/glds_funcs.c0000644000175000017500000001364212303140253015562 00000000000000/* @(#) Calculates the spatial grey level differnce * @(#) matrix of an image and some of its * @(#) features. The 256x1 difference matrix of im is held by m * @(#) There should be enough margin around the box so the (dx,dy) can * @(#) access neighbouring pixels outside the box * @(#) * @(#) Usage: * @(#) int im_glds_matrix(im, m, xpos, ypos, xsize, ysize, dx, dy) * @(#) IMAGE *im, *m; * @(#) int xpos, ypos, xsize, ysize; location of the box within im * @(#) int dx, dy; displacements * @(#) * @(#) int im_glds_asm(m, asmoment) * @(#) IMAGE *m; * @(#) double *asmoment; * @(#) * @(#) int im_glds_contrast(m, contrast) * @(#) IMAGE *m; * @(#) double *contrast; * @(#) * @(#) int im_glds_entropy(m, entropy) * @(#) IMAGE *m; * @(#) double *entropy; * @(#) * @(#) int im_glds_mean(m, mean) * @(#) IMAGE *m; * @(#) double *mean; * @(#) * @(#) All functions return 0 on success and -1 on error * * Copyright: N. Dessipris, 1991 * Written on: 2/12/1991 * Modified on: * 22/7/93 JC * - im_incheck() added */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* Keep the greylevel difference matrix as a 256x1 double image */ int im_glds_matrix( IMAGE *im, IMAGE *m, int xpos, int ypos, int xsize, int ysize, int dx, int dy ) { PEL *in, *cpin; int *b, *pb; double *l, *pl; int x, y; int ofs; int tmp; int norm; if (im_iocheck(im, m) == -1) return( -1 ); if ((im->Bands != 1)||(im->BandFmt != IM_BANDFMT_UCHAR)) { im_error( "im_glds_matrix", "%s", _( "Wrong input") ); return(-1); } if ( (xpos + xsize + dx > im->Xsize)|| (ypos + ysize + dy > im->Ysize) ) { im_error( "im_glds_matrix", "%s", _( "wrong args") ); return(-1); } if (im_cp_desc(m, im) == -1) return( -1 ); m->Xsize = 256; m->Ysize = 1; m->BandFmt = IM_BANDFMT_DOUBLE; m->Type = IM_TYPE_B_W; if (im_setupout(m) == -1) return( -1 ); b = (int *)calloc( (unsigned)m->Xsize, sizeof(int) ); l = (double *)calloc( (unsigned)m->Xsize, sizeof(double)); if ( (b == NULL) || (l == NULL) ) { im_error( "im_glds_matrix", "%s", _( "calloc failed") ); return(-1); } in = (PEL*)im->data; in += ( ypos * im->Xsize + xpos ); ofs = dy * im->Xsize + dx; for ( y=0; yXsize; for ( x=0; xXsize; x++) *pl++ = ((double)(*pb++))/(double)norm; if (im_writeline( 0, m, (PEL *) l ) == -1) return( -1 ); free((char*)b); free((char*)l); return(0); } /* @(#) Calculates the asmoment of the sglds matrix held by m */ int im_glds_asm( IMAGE *m, double *asmoment ) { double temp, tmpasm, *in; int i; if( im_incheck( m ) ) return( -1 ); if (m->Xsize != 256 || m->Ysize != 1 || m->Bands != 1 || m->BandFmt != IM_BANDFMT_DOUBLE) { im_error( "im_glds_asm", "%s", _( "unable to accept input") ); return(-1);} tmpasm = 0.0; in = (double*)m->data; for(i=0; iXsize; i++) { temp = *in++; tmpasm += (temp*temp); } *asmoment = tmpasm; return(0); } /* @(#) Calculates the contrast of the coocurence matrix passed in buffer */ int im_glds_contrast( IMAGE *m, double *contrast ) { double tmpcon, *in; int i; if( im_incheck( m ) ) return( -1 ); if (m->Xsize != 256 || m->Ysize != 1 || m->Bands != 1 || m->BandFmt != IM_BANDFMT_DOUBLE) { im_error( "im_glds_contrast", "%s", _( "wrong input") ); return(-1); } tmpcon = 0.0; in = (double*)m->data; for(i=0; iXsize; i++) { tmpcon += ( ((double)i)*((double)i)*(*in) ); in++; } *contrast = tmpcon; return(0); } /* @(#) Calculates the entropy of the glds vector passed in buffer * @(#) Function returns the entropy based on log base 2. */ int im_glds_entropy( IMAGE *m, double *entropy ) { double tmpent, dtemp, *in; int i; if( im_incheck( m ) ) return( -1 ); if (m->Xsize != 256 || m->Ysize != 1 || m->Bands != 1 || m->BandFmt != IM_BANDFMT_DOUBLE) { im_error( "im_glds_entropy", "%s", _( "wrong input") ); return(-1); } tmpent = 0.0; in = (double*)m->data; for(i=0; iXsize; i++) { if(*in != 0) { dtemp = *in; tmpent += (dtemp*log10(dtemp)); } in++; } *entropy = ((-1)*tmpent/log10(2.0)); return(0); } /* @(#) Calculates the mean of the sglds matrix passed in m */ int im_glds_mean( IMAGE *m, double *mean ) { double tmpmean, *in; int i; if( im_incheck( m ) ) return( -1 ); if (m->Xsize != 256 || m->Ysize != 1 || m->Bands != 1 || m->BandFmt != IM_BANDFMT_DOUBLE) { im_error( "im_glds_mean", "%s", _( "wrong input") ); return(-1); } tmpmean = 0.0; in = (double*)m->data; for(i=0; iXsize; i++) { tmpmean += ( ((double)i)*(*in) ); in++; } tmpmean = tmpmean/((double)m->Xsize); *mean = tmpmean; return(0); } vips-7.38.5/libvips/deprecated/rw_mask.c0000644000175000017500000005725112303140253015102 00000000000000/* read and write masks */ /* Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 29/04/1991 * Modified on: 10/8/1992, J.Cupitt * - Mask reading routines no longer fail if scale and offset are missing. * Instead, they set default values of scale=1, offset=0. * - Code tidied up, better error recovery. * - Bugs fixed in im_dup_*mask. No longer coredump. * - Bugs fixed in im_write_*mask. Now work for non-square matricies. * - im_copy_*mask_matrix, im_copy_matrix_*mask added: copy VIPS mask * structures into Numerical Recipies in C style matricies and vice * versa. Both structures should have been built before copy attempted. * See im_create_*mask, im_*mat_alloc. The matrix should be indexed by 0 * to size-1. * 9/7/93 JC * - some ANSIfication and tidies * - im_free_*mask() now return zero, so they can be used as close * callbacks. * 7/10/94 JC * - new IM_NEW(), IM_ARRAY() macros added * 27/4/95 JC * - oops! forgot to init IM_ARRAY() memory to zero * 7/8/96 JC * - im_scale_dmask() rewritten * 7/5/98 JC * - im_read_*mask() rewritten, now more robust * - im_write_*mask() rewritten * - new functions im_write_*mask_name() * 28/7/99 JC * - im_create_imaskv(), im_create_dmaskv() make masks and init from * varargs * - tabs allowed as column separators * 9/2/05 * - "," allowed as column separator ... helps CSV read * 31/5/06 * - use g_ascii_strtod() and friends * 2006-09-08 tcv * - add im_norm_dmask() * 1/9/09 * - move im_print_*mask() here * 12/11/09 * - reading a float mask with im_read_imask() produced an incorrect * error messagge * 21/10/10 * - gtk-doc * - you can use commas to separate header fields * - small cleanups * 30/11/10 * - im_scale_dmask() normalises to 20, not 100 ... we hit the fast * conv path more often * 24/1/10 * - oops, missing braces in write dmask removed spaces between items */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include /** * SECTION: mask * @short_description: load, save and process mask (matrix) objects * @stability: Stable * @include: vips/vips.h * * These operations load, save and process mask objects. Masks are used as * paramaters to convolution and morphology operators, and to represent * matrices. There are two types of matrix: integer #INTMASK and double * precision floating point #DOUBLEMASK. * * This API is horrible and clunky. Surely it will be replaced soon. */ /** * INTMASK: * @xsize: mask width * @ysize: mask height * @scale: mask scale factor * @offset: mask offset * @coeff: array of mask elements * @filename: the file this mask was read from, or should be written to * * An integer mask. * * @scale lets the mask represent fractional values: for * example, in integer convolution (see im_conv()) the result of the * convolution is divided by @scale and then added to @offset before being * written to the output image. * * @scale and @offset default to 1 and 0. Various functions, such as * im_conv(), will fail if @scale is zero. * * You can read and write the matrix elements in @coeff. */ /** * DOUBLEMASK: * @xsize: mask width * @ysize: mask height * @scale: mask scale factor * @offset: mask offset * @coeff: array of mask elements * @filename: the file this mask was read from, or should be written to * * A floating-point mask. * * As with #INTMASK, in convolution (see im_convf()) the result of the * convolution is divided by @scale and then added to @offset before being * written to the output image. * * @scale and @offset default to 1.0 and 0.0. Various functions, such as * im_conv(), will fail if @scale is zero. * * You can read and write the matrix elements in @coeff. */ /* Size of line buffer for reading. */ #define MAX_LINE (32768) /** * im_free_imask: * @in: mask to free * * Free mask structure and any attached arrays. Return zero, so we can use * these functions as close callbacks. * * See also: im_free_dmask(). * * Returns: zero. */ int im_free_imask( INTMASK *in ) { if( !in ) return( 0 ); IM_FREE( in->coeff ); IM_FREE( in->filename ); IM_FREE( in ); return( 0 ); } /** * im_free_dmask: * @in: mask to free * * Free mask structure and any attached arrays. Return zero, so we can use * these functions as close callbacks. * * See also: im_free_dmask(). * * Returns: zero. */ int im_free_dmask( DOUBLEMASK *in ) { if( !in ) return( 0 ); IM_FREE( in->coeff ); IM_FREE( in->filename ); IM_FREE( in ); return( 0 ); } /** * im_create_imask: * @filename: set mask filename to this * @xsize: mask width * @ysize: mask height * * Create an empty imask. You need to loop over @coeff to set the values. * * See also: im_create_imaskv(). * * Returns: The newly-allocated mask. */ INTMASK * im_create_imask( const char *filename, int xsize, int ysize ) { INTMASK *out; int size = xsize * ysize; /* Check args. */ if( xsize <= 0 || ysize <= 0 || filename == NULL ) { im_error( "im_create_imask", "%s", _( "bad arguments" ) ); return( NULL ); } /* Allocate and initialise structure. */ if( !(out = IM_NEW( NULL, INTMASK )) ) return( NULL ); out->coeff = NULL; out->filename = NULL; out->scale = 1; out->offset = 0; out->xsize = 0; out->ysize = 0; if( !(out->coeff = IM_ARRAY( NULL, size, int )) ) { im_free_imask( out ); return( NULL ); } (void) memset( (char *) out->coeff, 0, size * sizeof( int ) ); if( !(out->filename = im_strdup( NULL, filename )) ) { im_free_imask( out ); return( NULL ); } out->xsize = xsize; out->ysize = ysize; return( out ); } /** * im_create_imaskv: * @filename: set mask filename to this * @xsize: mask width * @ysize: mask height * @Varargs: values to set for the mask * * Create an imask and initialise it from the function parameter list. * * See also: im_create_imask(). * * Returns: The newly-allocated mask. */ INTMASK * im_create_imaskv( const char *filename, int xsize, int ysize, ... ) { va_list ap; INTMASK *out; int i; if( !(out = im_create_imask( filename, xsize, ysize )) ) return( NULL ); va_start( ap, ysize ); for( i = 0; i < xsize * ysize; i++ ) out->coeff[i] = va_arg( ap, int ); va_end( ap ); return( out ); } /** * im_create_dmask: * @filename: set mask filename to this * @xsize: mask width * @ysize: mask height * * Create an empty dmask. You need to loop over @coeff to set the values. * * See also: im_create_dmaskv(), im_vips2mask(). * * Returns: The newly-allocated mask. */ DOUBLEMASK * im_create_dmask( const char *filename, int xsize, int ysize ) { DOUBLEMASK *out; int size = xsize * ysize; /* Check args. */ if( xsize <= 0 || ysize <= 0 || filename == NULL ) { im_error( "im_create_dmask", "%s", _( "bad arguments" ) ); return( NULL ); } /* Allocate and initialise structure. */ if( !(out = IM_NEW( NULL, DOUBLEMASK )) ) return( NULL ); out->coeff = NULL; out->filename = NULL; out->scale = 1.0; out->offset = 0.0; out->xsize = 0; out->ysize = 0; if( !(out->coeff = IM_ARRAY( NULL, size, double )) ) { im_free_dmask( out ); return( NULL ); } (void) memset( (char *) out->coeff, 0, size * sizeof( double ) ); if( !(out->filename = im_strdup( NULL, filename )) ) { im_free_dmask( out ); return( NULL ); } out->xsize = xsize; out->ysize = ysize; return( out ); } /** * im_create_dmaskv: * @filename: set mask filename to this * @xsize: mask width * @ysize: mask height * @Varargs: values to set for the mask * * Create a dmask and initialise it from the function parameter list. * * See also: im_create_dmask(). * * Returns: The newly-allocated mask. */ DOUBLEMASK * im_create_dmaskv( const char *filename, int xsize, int ysize, ... ) { va_list ap; DOUBLEMASK *out; int i; if( !(out = im_create_dmask( filename, xsize, ysize )) ) return( NULL ); va_start( ap, ysize ); for( i = 0; i < xsize * ysize; i++ ) out->coeff[i] = va_arg( ap, double ); va_end( ap ); return( out ); } /* Read a line from a file! */ static int get_line( FILE *fp, char *buf ) { if( !fgets( buf, MAX_LINE, fp ) ) { im_error( "read_mask", "%s", _( "unexpected EOF" ) ); return( -1 ); } return( 0 ); } /* width, height, optional scale, optional offset. */ static int read_header( FILE *fp, int *xs, int *ys, double *scale, double *offset ) { char buf[MAX_LINE]; char *p, *q; double v[4]; int i; /* Read the first line: should contain size and optional * scale + offset. */ if( get_line( fp, buf ) ) return( -1 ); /* Read as space separated doubles. \n is in the break list because * our line will (usually) have a trailing \n which we want to count * as whitespace. */ p = buf; for( i = 0, p = buf; i < 4 && (q = im_break_token( p, " \";,\t\n" )); i++, p = q ) v[i] = g_ascii_strtod( p, NULL ); if( (i != 2 && i != 4) || ceil( v[0] ) != v[0] || ceil( v[1] ) != v[1] || v[0] <= 0 || v[1] <= 0 ) { im_error( "read_header", "%s", _( "error reading matrix header" ) ); return( -1 ); } if( i == 4 && v[2] == 0 ) { im_error( "read_header", "%s", _( "scale should be non-zero" ) ); return( -1 ); } *xs = v[0]; *ys = v[1]; if( i == 2 ) { *scale = 1.0; *offset = 0.0; } else { *scale = v[2]; *offset = v[3]; } return( 0 ); } /** * im_read_dmask: * @filename: read matrix from this file * * Reads a matrix from a file. * * Matrix files have a simple format that's supposed to be easy to create with * a text editor or a spreadsheet. * * The first line has four numbers for width, height, scale and * offset (scale and offset may be omitted, in which case they default to 1.0 * and 0.0). Scale must be non-zero. Width and height must be positive * integers. The numbers are separated by any mixture of spaces, commas, * tabs and quotation marks ("). The scale and offset fields may be * floating-point, and must use '.' * as a decimal separator. * * Subsequent lines each hold one line of matrix data, with numbers again * separated by any mixture of spaces, commas, * tabs and quotation marks ("). The numbers may be floating-point, and must * use '.' * as a decimal separator. * * Extra characters at the ends of lines or at the end of the file are * ignored. * * See also: im_read_imask(), im_gauss_dmask(). * * Returns: the loaded mask on success, or NULL on error. */ DOUBLEMASK * im_read_dmask( const char *filename ) { FILE *fp; double sc, off; int xs, ys; DOUBLEMASK *out; int x, y, i; char buf[MAX_LINE]; if( !(fp = im__file_open_read( filename, NULL, TRUE )) ) return( NULL ); if( read_header( fp, &xs, &ys, &sc, &off ) ) { fclose( fp ); return( NULL ); } if( !(out = im_create_dmask( filename, xs, ys )) ) { fclose( fp ); return( NULL ); } out->scale = sc; out->offset = off; for( i = 0, y = 0; y < ys; y++ ) { char *p; if( get_line( fp, buf ) ) { im_free_dmask( out ); fclose( fp ); return( NULL ); } for( p = buf, x = 0; p && x < xs; x++, i++, p = im_break_token( p, " \t,\";" ) ) out->coeff[i] = g_ascii_strtod( p, NULL ); } fclose( fp ); return( out ); } /** * im_read_imask: * @filename: read matrix from this file * * Reads an integer matrix from a file. * * This function works exactly as im_read_dmask(), but the loaded matrix is * checked for 'int-ness'. All coefficients must be integers, and scale and * offset must be integers. * * See also: im_read_dmask(). * * Returns: the loaded mask on success, or NULL on error. */ INTMASK * im_read_imask( const char *filename ) { DOUBLEMASK *dmask; INTMASK *imask; int i; if( !(dmask = im_read_dmask( filename )) ) return( NULL ); if( ceil( dmask->scale ) != dmask->scale || ceil( dmask->offset ) != dmask->offset ) { im_error( "im_read_imask", "%s", _( "scale and offset should be int" ) ); im_free_dmask( dmask ); return( NULL ); } for( i = 0; i < dmask->xsize * dmask->ysize; i++ ) if( ceil( dmask->coeff[i] ) != dmask->coeff[i] ) { im_error( "im_read_imask", _( "ceofficient at " "position (%d, %d) is not int" ), i % dmask->xsize, i / dmask->xsize ); im_free_dmask( dmask ); return( NULL ); } if( !(imask = im_create_imask( filename, dmask->xsize, dmask->ysize )) ) { im_free_dmask( dmask ); return( NULL ); } imask->scale = dmask->scale; imask->offset = dmask->offset; for( i = 0; i < dmask->xsize * dmask->ysize; i++ ) imask->coeff[i] = dmask->coeff[i]; im_free_dmask( dmask ); return( imask ); } /** * im_scale_dmask: * @in: mask to scale * @filename: filename for returned mask * * Scale the dmask to make an imask with a maximum value of 20. * * See also: im_norm_dmask(). * * Returns: the converted mask, or NULL on error. */ INTMASK * im_scale_dmask( DOUBLEMASK *in, const char *filename ) { const int size = in->xsize * in->ysize; INTMASK *out; double maxval, dsum; int i; int isum; if( im_check_dmask( "im_scale_dmask", in ) || !(out = im_create_imask( filename, in->xsize, in->ysize )) ) return( NULL ); /* Find mask max. */ maxval = in->coeff[0]; for( i = 0; i < size; i++ ) if( in->coeff[i] > maxval ) maxval = in->coeff[i]; /* Copy and scale, setting max to 20. */ for( i = 0; i < size; i++ ) out->coeff[i] = IM_RINT( in->coeff[i] * 20.0 / maxval ); out->offset = in->offset; /* Set the scale to match the adjustment to max. */ isum = 0; dsum = 0.0; for( i = 0; i < size; i++ ) { isum += out->coeff[i]; dsum += in->coeff[i]; } if( dsum == in->scale ) out->scale = isum; else if( dsum == 0.0 ) out->scale = 1.0; else out->scale = IM_RINT( in->scale * isum / dsum ); return( out ); } /** * im_dmask2imask: * @in: mask to convert * @filename: filename for returned mask * * Make an imask from the dmask, rounding to nearest. * * See also: im_scale_dmask(). * * Returns: the converted mask, or NULL on error. */ INTMASK * im_dmask2imask( DOUBLEMASK *in, const char *filename ) { const int size = in->xsize * in->ysize; INTMASK *out; int i; if( im_check_dmask( "im_dmask2imask", in ) || !(out = im_create_imask( filename, in->xsize, in->ysize )) ) return( NULL ); for( i = 0; i < size; i++ ) out->coeff[i] = IM_RINT( in->coeff[i] ); out->offset = IM_RINT( in->offset ); out->scale = IM_RINT( in->scale ); return( out ); } /** * im_imask2dmask: * @in: mask to convert * @filename: filename for returned mask * * Make a dmask from the imask. * * See also: im_dmask2imask(). * * Returns: the converted mask, or NULL on error. */ DOUBLEMASK * im_imask2dmask( INTMASK *in, const char *filename ) { const int size = in->xsize * in->ysize; DOUBLEMASK *out; int i; if( im_check_imask( "im_imask2dmask", in ) || !(out = im_create_dmask( filename, in->xsize, in->ysize )) ) return( NULL ); for( i = 0; i < size; i++ ) out->coeff[i] = in->coeff[i]; out->offset = in->offset; out->scale = in->scale; return( out ); } /** * im_norm_dmask: * @mask: mask to scale * * Normalise the dmask. Apply the scale and offset to each element to make * a mask with scale 1, offset zero. * * See also: im_scale_dmask(). * * Returns: 0 on success, or -1 on error. */ void im_norm_dmask( DOUBLEMASK *mask ) { const int n = mask->xsize * mask->ysize; const double scale = (mask->scale == 0) ? 0 : (1.0 / mask->scale); int i; if( im_check_dmask( "im_norm_dmask", mask ) || (1.0 == scale && 0.0 == mask->offset) ) return; for( i = 0; i < n; i++ ) mask->coeff[i] = mask->coeff[i] * scale + mask->offset; mask->scale = 1.0; mask->offset = 0.0; } /** * im_dup_imask: * @in: mask to duplicate * @filename: filename to set for the new mask * * Duplicate an imask. * * See also: im_dup_dmask(). * * Returns: the mask copy, or NULL on error. */ INTMASK * im_dup_imask( INTMASK *in, const char *filename ) { INTMASK *out; int i; if( im_check_imask( "im_dup_imask", in ) || !(out = im_create_imask( filename, in->xsize, in->ysize )) ) return( NULL ); out->offset = in->offset; out->scale = in->scale; for( i = 0; i < in->xsize * in->ysize; i++ ) out->coeff[i] = in->coeff[i]; return( out ); } /** * im_dup_dmask: * @in: mask to duplicate * @filename: filename to set for the new mask * * Duplicate a dmask. * * See also: im_dup_imask(). * * Returns: the mask copy, or NULL on error. */ DOUBLEMASK * im_dup_dmask( DOUBLEMASK *in, const char *filename ) { DOUBLEMASK *out; int i; if( im_check_dmask( "im_dup_dmask", in ) || !(out = im_create_dmask( filename, in->xsize, in->ysize )) ) return( NULL ); out->offset = in->offset; out->scale = in->scale; for( i = 0; i < in->xsize * in->ysize; i++ ) out->coeff[i] = in->coeff[i]; return( out ); } /* Write to file. */ static int write_line( FILE *fp, const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); if( !vfprintf( fp, fmt, ap ) ) { im_error( "write_mask", "%s", _( "write error, disc full?" ) ); return( -1 ); } va_end( ap ); return( 0 ); } static int write_double( FILE *fp, double d ) { char buf[G_ASCII_DTOSTR_BUF_SIZE]; fprintf( fp, "%s", g_ascii_dtostr( buf, sizeof( buf ), d ) ); return( 0 ); } /** * im_write_imask_name: * @in: mask to write * @filename: filename to write to * * Write an imask to a file. See im_read_dmask() for a description of the mask * file format. * * See also: im_write_imask(). * * Returns: 0 on success, or -1 on error. */ int im_write_imask_name( INTMASK *in, const char *filename ) { FILE *fp; int x, y, i; if( im_check_imask( "im_write_imask_name", in ) || !(fp = im__file_open_write( filename, TRUE )) ) return( -1 ); if( write_line( fp, "%d %d", in->xsize, in->ysize ) ) { fclose( fp ); return( -1 ); } if( in->scale != 1 || in->offset != 0 ) write_line( fp, " %d %d", in->scale, in->offset ); write_line( fp, "\n" ); for( i = 0, y = 0; y < in->ysize; y++ ) { for( x = 0; x < in->xsize; x++, i++ ) write_line( fp, "%d ", in->coeff[i] ); if( write_line( fp, "\n" ) ) { fclose( fp ); return( -1 ); } } fclose( fp ); return( 0 ); } /** * im_write_imask: * @in: mask to write * * Write an imask to a file. * * See also: im_write_imask_name(). * * Returns: 0 on success, or -1 on error. */ int im_write_imask( INTMASK *in ) { if( !in->filename ) { im_error( "im_write_imask", "%s", _( "filename not set" ) ); return( -1 ); } return( im_write_imask_name( in, in->filename ) ); } /** * im_write_dmask_name: * @in: mask to write * @filename: filename to write to * * Write a dmask to a file. See im_read_dmask() for a description of the mask * file format. * * See also: im_write_dmask(). * * Returns: 0 on success, or -1 on error. */ int im_write_dmask_name( DOUBLEMASK *in, const char *filename ) { FILE *fp; int x, y, i; if( im_check_dmask( "im_write_dmask_name", in ) || !(fp = im__file_open_write( filename, TRUE )) ) return( -1 ); if( write_line( fp, "%d %d", in->xsize, in->ysize ) ) { fclose( fp ); return( -1 ); } if( in->scale != 1.0 || in->offset != 0.0 ) { write_line( fp, " " ); write_double( fp, in->scale ); write_line( fp, " " ); write_double( fp, in->offset ); } write_line( fp, "\n" ); for( i = 0, y = 0; y < in->ysize; y++ ) { for( x = 0; x < in->xsize; x++, i++ ) { write_double( fp, in->coeff[i] ); write_line( fp, " " ); } if( write_line( fp, "\n" ) ) { fclose( fp ); return( -1 ); } } fclose( fp ); return( 0 ); } /** * im_write_dmask: * @in: mask to write * * Write a dmask to a file. See im_read_dmask() for a description of the mask * file format. * * See also: im_write_dmask_name(). * * Returns: 0 on success, or -1 on error. */ int im_write_dmask( DOUBLEMASK *in ) { if( !in->filename ) { im_error( "im_write_dmask", "%s", _( "filename not set" ) ); return( -1 ); } return( im_write_dmask_name( in, in->filename ) ); } /* Copy an imask into a matrix. Only used internally by matrix package for * invert. */ void im_copy_imask_matrix( INTMASK *mask, int **matrix ) { int x, y; int *p = mask->coeff; for( y = 0; y < mask->ysize; y++ ) for( x = 0; x < mask->xsize; x++ ) matrix[x][y] = *p++; } /* Copy a matrix into an imask. */ void im_copy_matrix_imask( int **matrix, INTMASK *mask ) { int x, y; int *p = mask->coeff; for( y = 0; y < mask->ysize; y++ ) for( x = 0; x < mask->xsize; x++ ) *p++ = matrix[x][y]; } /* Copy a dmask into a matrix. */ void im_copy_dmask_matrix( DOUBLEMASK *mask, double **matrix ) { int x, y; double *p = mask->coeff; for( y = 0; y < mask->ysize; y++ ) for( x = 0; x < mask->xsize; x++ ) matrix[x][y] = *p++; } /* Copy a matrix to a dmask. */ void im_copy_matrix_dmask( double **matrix, DOUBLEMASK *mask ) { int x, y; double *p = mask->coeff; for( y = 0; y < mask->ysize; y++ ) for( x = 0; x < mask->xsize; x++ ) *p++ = matrix[x][y]; } /** * im_print_imask: * @in: mask to print * * Print an imask to stdout. * * See also: im_print_dmask(). */ void im_print_imask( INTMASK *in ) { int i, j, k; printf( "%s: %d %d %d %d\n", in->filename, in->xsize, in->ysize, in->scale, in->offset ); for( k = 0, j = 0; j < in->ysize; j++ ) { for( i = 0; i < in->xsize; i++, k++ ) printf( "%d\t", in->coeff[k] ); printf( "\n" ); } } /** * im_print_dmask: * @in: mask to print * * Print a dmask to stdout. * * See also: im_print_imask(). */ void im_print_dmask( DOUBLEMASK *in ) { int i, j, k; printf( "%s: %d %d %f %f\n", in->filename, in->xsize, in->ysize, in->scale, in->offset ); for( k = 0, j = 0; j < in->ysize; j++ ) { for( i = 0; i < in->xsize; i++, k++ ) printf( "%f\t", in->coeff[k] ); printf( "\n" ); } } /** * im_local_dmask: * @out: image to make the mask local to * @mask: mask to local-ize * * @out takes ownership of @mask: when @out is closed, @mask will be closed * for you. If im_local_dmask() itself fails, the mask is also freed. * * See also: im_local_imask(). * * Returns: the mask, or NULL on error. */ DOUBLEMASK * im_local_dmask( VipsImage *out, DOUBLEMASK *mask ) { if( im_check_dmask( "im_local_dmask", mask ) ) return( NULL ); if( im_add_close_callback( out, (im_callback_fn) im_free_dmask, mask, NULL ) ) { im_free_dmask( mask ); return( NULL ); } return( mask ); } /** * im_local_imask: * @out: image to make the mask local to * @mask: mask to local-ize * * @out takes ownership of @mask: when @out is closed, @mask will be closed * for you. If im_local_imask() itself fails, the mask is also freed. * * See also: im_local_dmask(). * * Returns: the mask, or NULL on error. */ INTMASK * im_local_imask( VipsImage *out, INTMASK *mask ) { if( im_check_imask( "im_local_dmask", mask ) ) return( NULL ); if( im_add_close_callback( out, (im_callback_fn) im_free_imask, mask, NULL ) ) { im_free_imask( mask ); return( NULL ); } return( mask ); } vips-7.38.5/libvips/deprecated/im_vips2tiff.c0000644000175000017500000001375412303140253016040 00000000000000/* vips7 compat stub for im_vips2tiff.c * * 4/12/11 * - just a stub calling vips_tiffsave() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Turn on IM_REGION_ADDR() range checks, don't delete intermediates. #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include int im_vips2tiff( IMAGE *in, const char *filename ) { char *p, *q, *r; char name[FILENAME_MAX]; char mode[FILENAME_MAX]; char buf[FILENAME_MAX]; VipsForeignTiffCompression compression = VIPS_FOREIGN_TIFF_COMPRESSION_NONE; int Q = 75; VipsForeignTiffPredictor predictor = VIPS_FOREIGN_TIFF_PREDICTOR_NONE; char *profile = NULL; gboolean tile = FALSE; int tile_width = 128; int tile_height = 128; gboolean pyramid = FALSE; gboolean squash = FALSE; VipsForeignTiffResunit resunit = VIPS_FOREIGN_TIFF_RESUNIT_CM; double xres = in->Xres * 10.0; double yres = in->Yres * 10.0; gboolean bigtiff = FALSE; im_filename_split( filename, name, mode ); strcpy( buf, mode ); p = &buf[0]; if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "none", q ) ) compression = VIPS_FOREIGN_TIFF_COMPRESSION_NONE; else if( im_isprefix( "packbits", q ) ) compression = VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS; else if( im_isprefix( "ccittfax4", q ) ) compression = VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4; else if( im_isprefix( "lzw", q ) ) { compression = VIPS_FOREIGN_TIFF_COMPRESSION_LZW; if( (r = im_getsuboption( q )) ) { int i; if( sscanf( r, "%d", &i ) != 1 ) { im_error( "im_vips2tiff", "%s", _( "bad predictor " "parameter" ) ); return( -1 ); } predictor = i; } } else if( im_isprefix( "deflate", q ) ) { compression = VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE; if( (r = im_getsuboption( q )) ) { int i; if( sscanf( r, "%d", &i ) != 1 ) { im_error( "im_vips2tiff", "%s", _( "bad predictor " "parameter" ) ); return( -1 ); } predictor = i; } } else if( im_isprefix( "jpeg", q ) ) { compression = VIPS_FOREIGN_TIFF_COMPRESSION_JPEG; if( (r = im_getsuboption( q )) ) if( sscanf( r, "%d", &Q ) != 1 ) { im_error( "im_vips2tiff", "%s", _( "bad JPEG quality " "parameter" ) ); return( -1 ); } } else { im_error( "im_vips2tiff", _( "unknown compression mode " "\"%s\"\nshould be one of \"none\", " "\"packbits\", \"ccittfax4\", \"lzw\", " "\"deflate\" or \"jpeg\"" ), q ); return( -1 ); } } if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "tile", q ) ) { tile = TRUE; if( (r = im_getsuboption( q )) ) { if( sscanf( r, "%dx%d", &tile_width, &tile_height ) != 2 ) { im_error( "im_vips2tiff", "%s", _( "bad tile sizes" ) ); return( -1 ); } } } else if( im_isprefix( "strip", q ) ) tile = FALSE; else { im_error( "im_vips2tiff", _( "unknown layout mode " "\"%s\"\nshould be one of \"tile\" or " "\"strip\"" ), q ); return( -1 ); } } if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "pyramid", q ) ) pyramid = TRUE; else if( im_isprefix( "flat", q ) ) pyramid = FALSE; else { im_error( "im_vips2tiff", _( "unknown multi-res mode " "\"%s\"\nshould be one of \"flat\" or " "\"pyramid\"" ), q ); return( -1 ); } } if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "onebit", q ) ) squash = TRUE; else if( im_isprefix( "manybit", q ) ) squash = FALSE; else { im_error( "im_vips2tiff", _( "unknown format " "\"%s\"\nshould be one of \"onebit\" or " "\"manybit\"" ), q ); return( -1 ); } } if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "res_cm", q ) ) resunit = VIPS_FOREIGN_TIFF_RESUNIT_CM; else if( im_isprefix( "res_inch", q ) ) resunit = VIPS_FOREIGN_TIFF_RESUNIT_INCH; else { im_error( "im_vips2tiff", _( "unknown resolution unit " "\"%s\"\nshould be one of \"res_cm\" or " "\"res_inch\"" ), q ); return( -1 ); } if( (r = im_getsuboption( q )) ) { if( sscanf( r, "%lfx%lf", &xres, &yres ) != 2 ) { if( sscanf( r, "%lf", &xres ) != 1 ) { im_error( "im_vips2tiff", "%s", _( "bad resolution values" ) ); return( -1 ); } yres = xres; } /* vips resolutions are always in pixels/mm. If the * user specifies ",res_inch:72x72" then they are * using pixels/inch instead and we must convert. */ if( resunit == VIPS_FOREIGN_TIFF_RESUNIT_INCH ) { xres /= 2.54; yres /= 2.54; } } } if( (q = im_getnextoption( &p )) && strcmp( q, "" ) != 0 ) profile = im_strdup( NULL, q ); if( (q = im_getnextoption( &p )) && strcmp( q, "8" ) == 0 ) bigtiff = TRUE; if( (q = im_getnextoption( &p )) ) { im_error( "im_vips2tiff", _( "unknown extra options \"%s\"" ), q ); return( -1 ); } if( vips_tiffsave( in, name, "compression", compression, "Q", Q, "predictor", predictor, "profile", profile, "tile", tile, "tile_width", tile_width, "tile_height", tile_height, "pyramid", pyramid, "squash", squash, "resunit", resunit, "xres", xres, "yres", yres, "bigtiff", bigtiff, NULL ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/deprecated/im_openslide2vips.c0000644000175000017500000000663712303141142017072 00000000000000/* read with openslide * * 17/12/11 * - just a stub * 11/4/12 * - support :level,associated in filenames * 20/9/12 * - add Leica filename suffix */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include static int im_openslide2vips( const char *name, IMAGE *out ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; char *p, *q; char *associated; int level; char *endptr; VipsImage *t; im_filename_split( name, filename, mode ); level = 0; associated = NULL; p = &mode[0]; if( (q = im_getnextoption( &p )) ) { level = strtoul( q, &endptr, 10 ); if( *endptr ) { vips_error( "openslide2vips", "%s", _( "level must be a number" ) ); return( -1 ); } } if( (q = im_getnextoption( &p )) ) associated = q; if( vips_openslideload( filename, &t, "level", level, "associated", associated, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static const char *openslide_suffs[] = { ".svs", /* Aperio */ ".vms", ".vmu", ".ndpi", /* Hamamatsu */ ".scn", /* Leica */ ".mrxs", /* MIRAX */ ".tif", /* Trestle */ NULL }; static VipsFormatFlags openslide_flags( const char *name ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; im_filename_split( name, filename, mode ); return( (VipsFormatFlags) vips_foreign_flags( "openslideload", filename ) ); } static int isopenslide( const char *name ) { char filename[FILENAME_MAX]; char mode[FILENAME_MAX]; im_filename_split( name, filename, mode ); return( vips_foreign_is_a( "openslideload", filename ) ); } /* openslide format adds no new members. */ typedef VipsFormat VipsFormatOpenslide; typedef VipsFormatClass VipsFormatOpenslideClass; static void vips_format_openslide_class_init( VipsFormatOpenslideClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "im_openslide"; object_class->description = _( "Openslide" ); format_class->priority = 100; format_class->is_a = isopenslide; format_class->load = im_openslide2vips; format_class->get_flags = openslide_flags; format_class->suffs = openslide_suffs; } static void vips_format_openslide_init( VipsFormatOpenslide *object ) { } G_DEFINE_TYPE( VipsFormatOpenslide, vips_format_openslide, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_gaddim.c0000644000175000017500000001606612303140253015350 00000000000000/* @(#) Generalised addition of two vasari images. * @(#)Inputs, outputs are neither float nor double * @(#) Result at each point is a*in1 + b*in2 + c * @(#) Result depends on inputs, rounding is carried out; * @(#) Function im_gaddim() assumes that the both input files * @(#) are either memory mapped or in a buffer. * @(#) Images must have the same no of bands and must not be complex * @(#) No check for overflow is done; * @(#) * @(#) int im_gaddim(a, in1, b, in2, c, out) * @(#) double a, b, c; * @(#) IMAGE *in1, *in2, *out; * @(#) * @(#) Returns 0 on success and -1 on error * @(#) * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* This function works on either mmaped files or on images in buffer */ /* uchar char ushort short uint int */ static int array[6][6] = { /* uchar */ { 2, 3, 2, 3, 4, 5 }, /* char */ { 3, 3, 3, 3, 5, 5 }, /* ushort */ { 2, 3, 2, 3, 4, 5 }, /* short */ { 3, 3, 3, 3, 5, 5 }, /* uint */ { 4, 5, 4, 5, 4, 5 }, /* int */ { 5, 5, 5, 5, 5, 5 } }; #define select_tmp2_for_out_int(OUT) \ case IM_BANDFMT_UCHAR: select_tmp1_for_out_int(unsigned char, OUT); break; \ case IM_BANDFMT_CHAR: select_tmp1_for_out_int(signed char, OUT); break; \ case IM_BANDFMT_USHORT: select_tmp1_for_out_int(unsigned short, OUT); break; \ case IM_BANDFMT_SHORT: select_tmp1_for_out_int(signed short, OUT); break; \ case IM_BANDFMT_UINT: select_tmp1_for_out_int(unsigned int, OUT); break; \ case IM_BANDFMT_INT: select_tmp1_for_out_int(signed int, OUT); break; \ \ default: \ im_error("im_gaddim","Wrong tmp2 format(1)"); \ free( line); \ return(-1); #define select_tmp1_for_out_int(IN2, OUT) \ switch(tmp1->BandFmt) { \ case IM_BANDFMT_UINT: loop(unsigned int, IN2, OUT); break; \ case IM_BANDFMT_INT: loop(int, IN2, OUT); break; \ default: im_error("im_gaddim","Wrong tmp2 format(2)");\ free( line);\ return(-1); \ } #define select_tmp2_for_out_short(OUT) \ case IM_BANDFMT_UCHAR: select_tmp1_for_out_short(unsigned char, OUT); break; \ case IM_BANDFMT_CHAR: select_tmp1_for_out_short(signed char, OUT); break; \ case IM_BANDFMT_USHORT: select_tmp1_for_out_short(unsigned short, OUT); break; \ case IM_BANDFMT_SHORT: select_tmp1_for_out_short(signed short, OUT); break; \ default: g_assert( 0 ); #define select_tmp1_for_out_short(IN2, OUT) \ switch(tmp1->BandFmt) { \ case IM_BANDFMT_UCHAR: loop(unsigned char, IN2, OUT); break; \ case IM_BANDFMT_CHAR: loop(signed char, IN2, OUT); break; \ case IM_BANDFMT_USHORT: loop(unsigned short, IN2, OUT); break; \ case IM_BANDFMT_SHORT: loop(signed short, IN2, OUT); break; \ default: im_error("im_gaddim","Wrong image1 format(4)");\ free( line);\ return(-1); \ } /** * im_gaddim: * * Deprecated. */ int im_gaddim(a, in1, b, in2, c, out) IMAGE *in1, *in2, *out; double a, b, c; { static int fmt[] = { IM_BANDFMT_UCHAR, IM_BANDFMT_CHAR, IM_BANDFMT_USHORT, IM_BANDFMT_SHORT, IM_BANDFMT_UINT, IM_BANDFMT_INT }; int y, x; int first, second, result; IMAGE *tmp1, *tmp2; PEL *line; int os; /* size of a line of output image */ /* fd, data filename must have been set before the function is called * Check whether they are set properly */ if ((im_iocheck(in1, out) == -1) || (im_iocheck(in2, out) == -1)) { return(-1); } /* Checks the arguments entered in in and prepares out */ if ( (in1->Xsize != in2->Xsize) || (in1->Ysize != in2->Ysize) || (in1->Bands != in2->Bands) || (in1->Coding != in2->Coding) ) { im_error("im_gaddim"," Input images differ"); return(-1); } if (in1->Coding != IM_CODING_NONE) { im_error("im_gaddim"," images must be uncoded"); return(-1);} switch(in1->BandFmt) { case IM_BANDFMT_UCHAR: first = 0; break; case IM_BANDFMT_CHAR: first = 1; break; case IM_BANDFMT_USHORT: first = 2; break; case IM_BANDFMT_SHORT: first = 3; break; case IM_BANDFMT_UINT: first = 4; break; case IM_BANDFMT_INT: first = 5; break; default: im_error("im_gaddim"," Unable to accept image1"); return(-1); } switch(in2->BandFmt) { case IM_BANDFMT_UCHAR: second = 0; break; case IM_BANDFMT_CHAR: second = 1; break; case IM_BANDFMT_USHORT: second = 2; break; case IM_BANDFMT_SHORT: second = 3; break; case IM_BANDFMT_UINT: second = 4; break; case IM_BANDFMT_INT: second = 5; break; default: im_error("im_gaddim"," Unable to accept image2"); return(-1); } /* Define the output */ result = array[first][second]; /* Prepare the output header */ if ( im_cp_desc(out, in1) == -1) { im_error("im_gaddim"," im_cp_desc failed"); return(-1); } out->BandFmt = fmt[result]; if( im_setupout(out) == -1) { im_error("im_gaddim"," im_setupout failed"); return(-1); } /* Order in1 and in2 */ if ( first >= second ) { tmp1 = in1; tmp2 = in2; } else { tmp1 = in2; tmp2 = in1; } /* Define what we do for each band element type. */ #define loop(IN1, IN2, OUT) \ { IN1 *input1 = (IN1 *) tmp1->data; \ IN2 *input2 = (IN2 *) tmp2->data; \ \ for (y=0; y Ysize; y++) {\ OUT *cpline = (OUT*)line; \ for (x=0; xXsize * out->Bands; line = (PEL *) calloc ( (unsigned)os, sizeof(double) ); if (line == NULL) { im_error("im_gaddim"," Unable to calloc"); return(-1); } switch (out->BandFmt) { case IM_BANDFMT_INT: switch (tmp2->BandFmt) { select_tmp2_for_out_int(int); } break; case IM_BANDFMT_UINT: switch (tmp2->BandFmt) { select_tmp2_for_out_int(unsigned int); } break; case IM_BANDFMT_SHORT: switch (tmp2->BandFmt) { select_tmp2_for_out_short(short); } break; case IM_BANDFMT_USHORT: switch (tmp2->BandFmt) { select_tmp2_for_out_short(unsigned short); } break; default: im_error("im_gaddim"," Impossible output state"); free( line); return(-1); } free( line); return(0); } vips-7.38.5/libvips/deprecated/im_simcontr.c0000644000175000017500000000642012303140253015752 00000000000000/* creates a pattern showing the similtaneous constrast effect * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 19/07/1991 * Modified on: * 22/7/93 JC * - externs removed * - im_outcheck() added * 1/2/11 * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /** * im_simcontr: * @out: output image * @xsize: image size * @ysize: image size * * Creates a pattern showing the similtaneous constrast effect. * * See also: im_eye(). * * Returns: 0 on success, -1 on error */ int im_simcontr( IMAGE *out, int xsize, int ysize ) { int x, y; unsigned char *line1, *line2, *cpline; /* Check input args */ if( im_outcheck( out ) ) return( -1 ); /* Set now image properly */ im_initdesc(out, xsize, ysize, 1, IM_BBITS_BYTE, IM_BANDFMT_UCHAR, IM_CODING_NONE, IM_TYPE_B_W, 1.0, 1.0, 0, 0 ); /* Set up image checking whether the output is a buffer or a file */ if (im_setupout( out ) == -1 ) return( -1 ); /* Create data */ line1 = (unsigned char *)calloc((unsigned)xsize, sizeof(char)); line2 = (unsigned char *)calloc((unsigned)xsize, sizeof(char)); if ( (line1 == NULL) || (line2 == NULL) ) { im_error( "im_simcontr", "%s", _( "calloc failed") ); return(-1); } cpline = line1; for (x=0; x #endif /*HAVE_CONFIG_H*/ #include #include #include #include int im_remainderconst_vec( IMAGE *in, IMAGE *out, int n, double *c ) { return( im_remainder_vec( in, out, n, c ) ); } int im_and_vec( IMAGE *in, IMAGE *out, int n, double *c ) { return( im_andimage_vec( in, out, n, c ) ); } int im_or_vec( IMAGE *in, IMAGE *out, int n, double *c ) { return( im_orimage_vec( in, out, n, c ) ); } int im_eor_vec( IMAGE *in, IMAGE *out, int n, double *c ) { return( im_eorimage_vec( in, out, n, c ) ); } int im_andconst( IMAGE *in, IMAGE *out, double c ) { return( im_andimageconst( in, out, c ) ); } int im_orconst( IMAGE *in, IMAGE *out, double c ) { return( im_orimageconst( in, out, c ) ); } int im_eorconst( IMAGE *in, IMAGE *out, double c ) { return( im_eorimageconst( in, out, c ) ); } void im_errormsg( const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); im_verror( "untranslated", fmt, ap ); va_end( ap ); } void im_verrormsg( const char *fmt, va_list ap ) { im_verror( "untranslated", fmt, ap ); } void im_errormsg_system( int err, const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); im_verror_system( err, "untranslated", fmt, ap ); va_end( ap ); } void im_diagnostics( const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); im_vdiag( "untranslated", fmt, ap ); va_end( ap ); } void im_warning( const char *fmt, ... ) { va_list ap; va_start( ap, fmt ); im_vwarn( "untranslated", fmt, ap ); va_end( ap ); } int im_affine( IMAGE *in, IMAGE *out, double a, double b, double c, double d, double dx, double dy, int ox, int oy, int ow, int oh ) { return( im_affinei( in, out, vips_interpolate_bilinear_static(), a, b, c, d, dx, dy, ox, oy, ow, oh ) ); } int im_similarity_area( IMAGE *in, IMAGE *out, double a, double b, double dx, double dy, int ox, int oy, int ow, int oh ) { return( im_affinei( in, out, vips_interpolate_bilinear_static(), a, -b, b, a, dx, dy, ox, oy, ow, oh ) ); } int im_similarity( IMAGE *in, IMAGE *out, double a, double b, double dx, double dy ) { return( im_affinei_all( in, out, vips_interpolate_bilinear_static(), a, -b, b, a, dx, dy ) ); } DOUBLEMASK * im_measure( IMAGE *im, IMAGE_BOX *box, int h, int v, int *sel, int nsel, const char *name ) { return( im_measure_area( im, box->xstart, box->ystart, box->xsize, box->ysize, h, v, sel, nsel, name ) ); } int im_extract( IMAGE *in, IMAGE *out, IMAGE_BOX *box ) { if( box->chsel == -1 ) return( im_extract_areabands( in, out, box->xstart, box->ystart, box->xsize, box->ysize, 0, in->Bands ) ); else return( im_extract_areabands( in, out, box->xstart, box->ystart, box->xsize, box->ysize, box->chsel, 1 ) ); } /* The public proto has this in the argument. */ typedef void (*notify_fn)( IMAGE *, Rect *, void * ); int im_render_fade( IMAGE *in, IMAGE *out, IMAGE *mask, int width, int height, int max, int fps, int steps, int priority, notify_fn notify, void *client ) { return( im_render_priority( in, out, mask, width, height, max, priority, notify, client ) ); } int im_render( IMAGE *in, IMAGE *out, IMAGE *mask, int width, int height, int max, notify_fn notify, void *client ) { return( im_render_priority( in, out, mask, width, height, max, 0, notify, client ) ); } int im_makerw( IMAGE *im ) { return( im_rwcheck( im ) ); } int im_icc_export( IMAGE *in, IMAGE *out, const char *output_profile_filename, int intent ) { return( im_icc_export_depth( in, out, 8, output_profile_filename, (VipsIntent) intent ) ); } int im_segment( IMAGE *test, IMAGE *mask, int *segments ) { return( im_label_regions( test, mask, segments ) ); } int im_convf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { return( im_conv_f( in, out, mask ) ); } int im_convf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { return( im_conv_f_raw( in, out, mask ) ); } int im_convsepf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { return( im_convsep_f( in, out, mask ) ); } int im_convsepf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { return( im_convsep_f_raw( in, out, mask ) ); } gboolean im_isint( IMAGE *im ) { return( vips_bandfmt_isint( im->BandFmt ) ); } gboolean im_isuint( IMAGE *im ) { return( vips_bandfmt_isuint( im->BandFmt ) ); } gboolean im_isfloat( IMAGE *im ) { return( vips_bandfmt_isfloat( im->BandFmt ) ); } gboolean im_iscomplex( IMAGE *im ) { return( vips_bandfmt_iscomplex( im->BandFmt ) ); } gboolean im_isscalar( IMAGE *im ) { return( !im_iscomplex( im ) ); } int im_c2ps( IMAGE *in, IMAGE *out ) { return( im_abs( in, out ) ); } int im_clip( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_UCHAR ) ); } int im_clip2c( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_CHAR ) ); } int im_clip2us( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_USHORT ) ); } int im_clip2s( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_SHORT ) ); } int im_clip2ui( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_UINT ) ); } int im_clip2i( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_INT ) ); } int im_clip2f( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_FLOAT ) ); } int im_clip2d( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_DOUBLE ) ); } int im_clip2cm( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_COMPLEX ) ); } int im_clip2dcm( IMAGE *in, IMAGE *out ) { return( im_clip2fmt( in, out, IM_BANDFMT_DPCOMPLEX ) ); } int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture ) { switch( architecture ) { case IM_ARCH_NATIVE: return( im_copy( in, out ) ); case IM_ARCH_BYTE_SWAPPED: return( im_copy_swap( in, out ) ); case IM_ARCH_LSB_FIRST: return( im_amiMSBfirst() ? im_copy_swap( in, out ) : im_copy( in, out ) ); case IM_ARCH_MSB_FIRST: return( im_amiMSBfirst() ? im_copy( in, out ) : im_copy_swap( in, out ) ); default: im_error( "im_copy_from", _( "bad architecture: %d" ), architecture ); return( -1 ); } } /* Check whether arch corresponds to native byte order. */ gboolean im_isnative( im_arch_type arch ) { switch( arch ) { case IM_ARCH_NATIVE: return( TRUE ); case IM_ARCH_BYTE_SWAPPED: return( FALSE ); case IM_ARCH_LSB_FIRST: return( !im_amiMSBfirst() ); case IM_ARCH_MSB_FIRST: return( im_amiMSBfirst() ); default: g_assert( 0 ); } /* Keep -Wall happy. */ return( -1 ); } int im_iterate( IMAGE *im, im_start_fn start, im_generate_fn generate, im_stop_fn stop, void *b, void *c ) { return( vips_sink( im, start, (VipsGenerateFn) generate, stop, b, c ) ); } int im_render_priority( IMAGE *in, IMAGE *out, IMAGE *mask, int width, int height, int max, int priority, notify_fn notify, void *client ) { return( vips_sink_screen( in, out, mask, width, height, max, priority, notify, client ) ); } /** * im_circle: * @im: image to draw on * @cx: centre of circle * @cy: centre of circle * @radius: circle radius * @intensity: value to draw * * Draws a circle on a 1-band 8-bit image. * * This an inplace operation, so @im is changed. It does not thread and will * not work well as part of a pipeline. On 32-bit machines it will be limited * to 2GB images. * * See also: im_fastline(). * * Returns: 0 on success, or -1 on error. */ int im_circle( IMAGE *im, int cx, int cy, int radius, int intensity ) { PEL ink[1]; if( im_rwcheck( im ) || im_check_uncoded( "im_circle", im ) || im_check_mono( "im_circle", im ) || im_check_format( "im_circle", im, IM_BANDFMT_UCHAR ) ) return( -1 ); ink[0] = intensity; return( im_draw_circle( im, cx, cy, radius, FALSE, ink ) ); } /* A flood blob we can call from nip. Grr! Should be a way to wrap these * automatically. Maybe nip could do it if it sees a RW image argument? */ int im_flood_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink ) { IMAGE *t; if( !(t = im_open_local( out, "im_flood_blob_copy", "t" )) || im_copy( in, t ) || im_flood( t, x, y, ink, NULL ) || im_copy( t, out ) ) return( -1 ); return( 0 ); } int im_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink ) { IMAGE *t; if( !(t = im_open_local( out, "im_flood_blob_copy", "t" )) || im_copy( in, t ) || im_flood_blob( t, x, y, ink, NULL ) || im_copy( t, out ) ) return( -1 ); return( 0 ); } int im_flood_other_copy( IMAGE *test, IMAGE *mark, IMAGE *out, int x, int y, int serial ) { IMAGE *t; if( !(t = im_open_local( out, "im_flood_other_copy", "t" )) || im_copy( mark, t ) || im_flood_other( test, t, x, y, serial, NULL ) || im_copy( t, out ) ) return( -1 ); return( 0 ); } int im_paintrect( IMAGE *im, Rect *r, PEL *ink ) { return( im_draw_rect( im, r->left, r->top, r->width, r->height, 1, ink ) ); } int im_insertplace( IMAGE *main, IMAGE *sub, int x, int y ) { return( im_draw_image( main, sub, x, y ) ); } int im_fastline( IMAGE *im, int x1, int y1, int x2, int y2, PEL *pel ) { return( im_draw_line( im, x1, y1, x2, y2, pel ) ); } int im_fastlineuser( IMAGE *im, int x1, int y1, int x2, int y2, int (*fn)(), void *client1, void *client2, void *client3 ) { return( im_draw_line_user( im, x1, y1, x2, y2, fn, client1, client2, client3 ) ); } int im_plotmask( IMAGE *im, int ix, int iy, PEL *ink, PEL *mask, Rect *r ) { IMAGE *mask_im; if( !(mask_im = im_image( mask, r->width, r->height, 1, IM_BANDFMT_UCHAR )) ) return( -1 ); if( im_draw_mask( im, mask_im, ix + r->left, iy + r->top, ink ) ) { im_close( mask_im ); return( -1 ); } im_close( mask_im ); return( 0 ); } int im_readpoint( IMAGE *im, int x, int y, PEL *pel ) { return( im_read_point( im, x, y, pel ) ); } int im_plotpoint( IMAGE *im, int x, int y, PEL *pel ) { return( im_draw_point( im, x, y, pel ) ); } /* Smear a section of an IMAGE. As above, but shift it left a bit. */ int im_smear( IMAGE *im, int ix, int iy, Rect *r ) { int x, y, a, b, c; int ba = im->Bands; int el = ba * im->Xsize; Rect area, image, clipped; double total[ 256 ]; if( im_rwcheck( im ) ) return( -1 ); /* Don't do the margins. */ area = *r; area.left += ix; area.top += iy; image.left = 0; image.top = 0; image.width = im->Xsize; image.height = im->Ysize; im_rect_marginadjust( &image, -1 ); image.left--; im_rect_intersectrect( &area, &image, &clipped ); /* Any left? */ if( im_rect_isempty( &clipped ) ) return( 0 ); /* What we do for each type. */ #define SMEAR(TYPE) \ for( y = clipped.top; y < clipped.top + clipped.height; y++ ) \ for( x = clipped.left; \ x < clipped.left + clipped.width; x++ ) { \ TYPE *to = (TYPE *) im->data + x * ba + y * el; \ TYPE *from = to - el; \ TYPE *f; \ \ for( a = 0; a < ba; a++ ) \ total[a] = 0.0; \ \ for( a = 0; a < 3; a++ ) { \ f = from; \ for( b = 0; b < 3; b++ ) \ for( c = 0; c < ba; c++ ) \ total[c] += *f++; \ from += el; \ } \ \ for( a = 0; a < ba; a++ ) \ to[a] = (40 * (double) to[a+ba] + total[a]) \ / 49.0; \ } /* Loop through the remaining pixels. */ switch( im->BandFmt ) { case IM_BANDFMT_UCHAR: SMEAR(unsigned char); break; case IM_BANDFMT_CHAR: SMEAR(char); break; case IM_BANDFMT_USHORT: SMEAR(unsigned short); break; case IM_BANDFMT_SHORT: SMEAR(short); break; case IM_BANDFMT_UINT: SMEAR(unsigned int); break; case IM_BANDFMT_INT: SMEAR(int); break; case IM_BANDFMT_FLOAT: SMEAR(float); break; case IM_BANDFMT_DOUBLE: SMEAR(double); break; /* Do complex types too. Just treat as float and double, but with * twice the number of bands. */ case IM_BANDFMT_COMPLEX: /* Twice number of bands: double size and bands. */ ba *= 2; el *= 2; SMEAR(float); break; case IM_BANDFMT_DPCOMPLEX: /* Twice number of bands: double size and bands. */ ba *= 2; el *= 2; SMEAR(double); break; default: im_error( "im_smear", "%s", _( "unknown band format" ) ); return( -1 ); } return( 0 ); } int im_smudge( VipsImage *image, int ix, int iy, Rect *r ) { return( im_draw_smudge( image, r->left + ix, r->top + iy, r->width, r->height ) ); } int im_flood( IMAGE *im, int x, int y, PEL *ink, Rect *dout ) { return( im_draw_flood( im, x, y, ink, dout ) ); } int im_flood_blob( IMAGE *im, int x, int y, PEL *ink, Rect *dout ) { return( im_draw_flood_blob( im, x, y, ink, dout ) ); } int im_flood_other( IMAGE *test, IMAGE *mark, int x, int y, int serial, Rect *dout ) { return( im_draw_flood_other( mark, test, x, y, serial, dout ) ); } int vips_check_coding_rad( const char *domain, VipsImage *im ) { return( vips_check_coding( domain, im, VIPS_CODING_RAD ) ); } int vips_check_coding_labq( const char *domain, VipsImage *im ) { return( vips_check_coding( domain, im, VIPS_CODING_LABQ ) ); } int vips_check_bands_3ormore( const char *domain, VipsImage *im ) { return( vips_check_bands_atleast( domain, im, 3 ) ); } vips-7.38.5/libvips/deprecated/resample_dispatch.c0000644000175000017500000001433212303140253017117 00000000000000/* Function dispatch tables for mosaicing. * * J. Cupitt, 23/2/95 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /** * SECTION: resample * @short_description: shrink, expand, rotate with a choice of interpolators * @stability: Stable * @include: vips/vips.h * * Resample an image in various ways, using a #VipsInterpolator to generate * intermediate values. */ /* Args to im_rightshift_size. */ static im_arg_desc rightshift_size_args[] = { IM_INPUT_IMAGE ("in"), IM_OUTPUT_IMAGE ("out"), IM_INPUT_INT ("xshift"), IM_INPUT_INT ("yshift"), IM_INPUT_INT ("band_fmt") }; /* Call im_rightshift_size via arg vector. */ static int rightshift_size_vec (im_object * argv) { IMAGE *in = (IMAGE *) argv[0]; IMAGE *out = (IMAGE *) argv[1]; int *xshift = (int *) argv[2]; int *yshift = (int *) argv[3]; int *band_fmt = (int *) argv[4]; return im_rightshift_size (in, out, *xshift, *yshift, *band_fmt ); } /* Description of im_rightshift_size. */ static im_function rightshift_size_desc = { "im_rightshift_size", /* Name */ "decrease size by a power-of-two factor", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ rightshift_size_vec, /* Dispatch function */ IM_NUMBER (rightshift_size_args), /* Size of arg list */ rightshift_size_args /* Arg list */ }; /* affinei args */ static im_arg_desc affinei_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INTERPOLATE( "interpolate" ), IM_INPUT_DOUBLE( "a" ), IM_INPUT_DOUBLE( "b" ), IM_INPUT_DOUBLE( "c" ), IM_INPUT_DOUBLE( "d" ), IM_INPUT_DOUBLE( "dx" ), IM_INPUT_DOUBLE( "dy" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_INT( "w" ), IM_INPUT_INT( "h" ) }; /* Call im_affinei via arg vector. */ static int affinei_vec( im_object *argv ) { VipsInterpolate *interpolate = VIPS_INTERPOLATE( argv[2] ); double a = *((double *) argv[3]); double b = *((double *) argv[4]); double c = *((double *) argv[5]); double d = *((double *) argv[6]); double dx = *((double *) argv[7]); double dy = *((double *) argv[8]); int x = *((int *) argv[9]); int y = *((int *) argv[10]); int w = *((int *) argv[11]); int h = *((int *) argv[12]); return( im_affinei( argv[0], argv[1], interpolate, a, b, c, d, dx, dy, x, y, w, h ) ); } /* Description of im_affinei. */ static im_function affinei_desc = { "im_affinei", /* Name */ "affine transform", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ affinei_vec, /* Dispatch function */ IM_NUMBER( affinei_args ), /* Size of arg list */ affinei_args /* Arg list */ }; /* affinei_all args */ static im_arg_desc affinei_all_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INTERPOLATE( "interpolate" ), IM_INPUT_DOUBLE( "a" ), IM_INPUT_DOUBLE( "b" ), IM_INPUT_DOUBLE( "c" ), IM_INPUT_DOUBLE( "d" ), IM_INPUT_DOUBLE( "dx" ), IM_INPUT_DOUBLE( "dy" ) }; /* Call im_affinei_all via arg vector. */ static int affinei_all_vec( im_object *argv ) { VipsInterpolate *interpolate = VIPS_INTERPOLATE( argv[2] ); double a = *((double *) argv[3]); double b = *((double *) argv[4]); double c = *((double *) argv[5]); double d = *((double *) argv[6]); double dx = *((double *) argv[7]); double dy = *((double *) argv[8]); return( im_affinei_all( argv[0], argv[1], interpolate, a, b, c, d, dx, dy ) ); } /* Description of im_affinei_all. */ static im_function affinei_all_desc = { "im_affinei_all", /* Name */ "affine transform of whole image", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ affinei_all_vec, /* Dispatch function */ IM_NUMBER( affinei_all_args ), /* Size of arg list */ affinei_all_args /* Arg list */ }; /* Args for im_shrink. */ static im_arg_desc shrink_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "xfac" ), IM_INPUT_DOUBLE( "yfac" ) }; /* Call im_shrink via arg vector. */ static int shrink_vec( im_object *argv ) { double xshrink = *((double *) argv[2]); double yshrink = *((double *) argv[3]); return( im_shrink( argv[0], argv[1], xshrink, yshrink ) ); } /* Description of im_shrink. */ static im_function shrink_desc = { "im_shrink", /* Name */ "shrink image by xfac, yfac times", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ shrink_vec, /* Dispatch function */ IM_NUMBER( shrink_args ), /* Size of arg list */ shrink_args /* Arg list */ }; /* Args to im_stretch3. */ static im_arg_desc stretch3_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "xdisp" ), IM_INPUT_DOUBLE( "ydisp" ) }; /* Call im_stretch3 via arg vector. */ static int stretch3_vec( im_object *argv ) { double xdisp = *((int *) argv[2]); double ydisp = *((int *) argv[3]); return( im_stretch3( argv[0], argv[1], xdisp, ydisp ) ); } /* Description of im_stretch3. */ static im_function stretch3_desc = { "im_stretch3", /* Name */ "stretch 3%, sub-pixel displace by xdisp/ydisp", IM_FN_PIO, /* Flags */ stretch3_vec, /* Dispatch function */ IM_NUMBER( stretch3_args ), /* Size of arg list */ stretch3_args /* Arg list */ }; /* Package up all these functions. */ static im_function *resample_list[] = { &rightshift_size_desc, &shrink_desc, &stretch3_desc, &affinei_desc, &affinei_all_desc }; /* Package of functions. */ im_package im__resample = { "resample", IM_NUMBER( resample_list ), resample_list }; vips-7.38.5/libvips/deprecated/im_freq_mask.c0000644000175000017500000001176312303140253016072 00000000000000/* Create masks and filter with them. * * Copyright: N. Dessipris 1991, * Written on: Nov 1991 * Updated on: Dec 1991 * 20/9/95 JC * - modernised * 22/3/10 * - gtkdoc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include /* Make a mask image. */ static int build_freq_mask( IMAGE *out, int xs, int ys, ImMaskType flag, va_list ap ) { /* May be fewer than 4 args ... but extract them all anyway. Should be * safe. */ double p0 = va_arg( ap, double ); double p1 = va_arg( ap, double ); double p2 = va_arg( ap, double ); double p3 = va_arg( ap, double ); double p4 = va_arg( ap, double ); VipsImage *t; switch( flag ) { case IM_MASK_IDEAL_HIGHPASS: if( vips_mask_ideal( &t, xs, ys, p0, "reject", TRUE, NULL ) ) return( -1 ); break; case IM_MASK_IDEAL_LOWPASS: if( vips_mask_ideal( &t, xs, ys, p0, NULL ) ) return( -1 ); break; case IM_MASK_BUTTERWORTH_HIGHPASS: if( vips_mask_butterworth( &t, xs, ys, p0, p1, p2, "reject", TRUE, NULL ) ) return( -1 ); break; case IM_MASK_BUTTERWORTH_LOWPASS: if( vips_mask_butterworth( &t, xs, ys, p0, p1, p2, NULL ) ) return( -1 ); break; case IM_MASK_GAUSS_HIGHPASS: if( vips_mask_gaussian( &t, xs, ys, p0, p1, "reject", TRUE, NULL ) ) return( -1 ); break; case IM_MASK_GAUSS_LOWPASS: if( vips_mask_gaussian( &t, xs, ys, p0, p1, NULL ) ) return( -1 ); break; case IM_MASK_IDEAL_RINGPASS: if( vips_mask_ideal_ring( &t, xs, ys, p0, p1, NULL ) ) return( -1 ); break; case IM_MASK_IDEAL_RINGREJECT: if( vips_mask_ideal_ring( &t, xs, ys, p0, p1, "reject", TRUE, NULL ) ) return( -1 ); break; case IM_MASK_BUTTERWORTH_RINGPASS: if( vips_mask_butterworth_ring( &t, xs, ys, p0, p1, p2, p3, NULL ) ) return( -1 ); break; case IM_MASK_BUTTERWORTH_RINGREJECT: if( vips_mask_butterworth_ring( &t, xs, ys, p0, p1, p2, p3, "reject", TRUE, NULL ) ) return( -1 ); break; case IM_MASK_GAUSS_RINGPASS: if( vips_mask_gaussian_ring( &t, xs, ys, p0, p1, p2, NULL ) ) return( -1 ); break; case IM_MASK_GAUSS_RINGREJECT: if( vips_mask_gaussian_ring( &t, xs, ys, p0, p1, p2, "reject", TRUE, NULL ) ) return( -1 ); break; case IM_MASK_FRACTAL_FLT: if( vips_mask_fractal( &t, xs, ys, p0, NULL ) ) return( -1 ); break; case IM_MASK_IDEAL_BANDPASS: if( vips_mask_ideal_band( &t, xs, ys, p0, p1, p2, NULL ) ) return( -1 ); break; case IM_MASK_IDEAL_BANDREJECT: if( vips_mask_ideal_band( &t, xs, ys, p0, p1, p2, "reject", TRUE, NULL ) ) return( -1 ); break; case IM_MASK_BUTTERWORTH_BANDPASS: if( vips_mask_butterworth_band( &t, xs, ys, p0, p1, p2, p3, p4, NULL ) ) return( -1 ); break; case IM_MASK_BUTTERWORTH_BANDREJECT: if( vips_mask_butterworth_band( &t, xs, ys, p0, p1, p2, p3, p4, "reject", TRUE, NULL ) ) return( -1 ); break; case IM_MASK_GAUSS_BANDPASS: if( vips_mask_gaussian_band( &t, xs, ys, p0, p1, p2, p3, NULL ) ) return( -1 ); break; case IM_MASK_GAUSS_BANDREJECT: if( vips_mask_gaussian_band( &t, xs, ys, p0, p1, p2, p3, "reject", TRUE, NULL ) ) return( -1 ); break; default: im_error( "im_freq_mask", "%s", _( "unimplemented mask type" ) ); return( -1 ); } if( im_copy( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_flt_image_freq( IMAGE *in, IMAGE *out, ImMaskType flag, ... ) { IMAGE *mask = im_open_local( out, "tempmask", "p" ); va_list ap; if( !mask ) return( -1 ); /* Generate mask. */ va_start( ap, flag ); if( build_freq_mask( mask, in->Xsize, in->Ysize, flag, ap ) ) return( -1 ); va_end( ap ); if( im_freqflt( in, mask, out ) ) return( -1 ); return( 0 ); } int im_create_fmask( IMAGE *out, int xsize, int ysize, ImMaskType flag, ... ) { va_list ap; va_start( ap, flag ); if( build_freq_mask( out, xsize, ysize, flag, ap ) ) return( -1 ); va_end( ap ); return( 0 ); } vips-7.38.5/libvips/deprecated/im_vips2dz.c0000644000175000017500000000563012303140253015517 00000000000000/* vips7 compat stub for vips_dzsave() * * 11/6/13 * - from im_vips2tiff() */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* Turn on IM_REGION_ADDR() range checks, don't delete intermediates. #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include int im_vips2dz( IMAGE *in, const char *filename ) { char *p, *q; char name[FILENAME_MAX]; char mode[FILENAME_MAX]; char buf[FILENAME_MAX]; int i; VipsForeignDzLayout layout = VIPS_FOREIGN_DZ_LAYOUT_DZ; char *suffix = ".jpeg"; int overlap = 0; int tile_size = 256; VipsForeignDzDepth depth = VIPS_FOREIGN_DZ_DEPTH_1PIXEL; gboolean centre = FALSE; VipsAngle angle = VIPS_ANGLE_0; /* We can't use im_filename_split() --- it assumes that we have a * filename with an extension before the ':', and filename here is * actually a dirname. * * Just split on the first ':'. */ im_strncpy( name, filename, FILENAME_MAX ); if( (p = strchr( name, ':' )) ) { *p = '\0'; im_strncpy( mode, p + 1, FILENAME_MAX ); } strcpy( buf, mode ); p = &buf[0]; if( (q = im_getnextoption( &p )) ) { if( (i = vips_enum_from_nick( "im_vips2dz", VIPS_TYPE_FOREIGN_DZ_LAYOUT, q )) < 0 ) return( -1 ); layout = i; } if( (q = im_getnextoption( &p )) ) suffix = g_strdup( q ); if( (q = im_getnextoption( &p )) ) overlap = atoi( q ); if( (q = im_getnextoption( &p )) ) tile_size = atoi( q ); if( (q = im_getnextoption( &p )) ) { if( (i = vips_enum_from_nick( "im_vips2dz", VIPS_TYPE_FOREIGN_DZ_DEPTH, q )) < 0 ) return( -1 ); depth = i; } if( (q = im_getnextoption( &p )) ) { if( im_isprefix( "cen", q ) ) centre = TRUE; } if( (q = im_getnextoption( &p )) ) { if( (i = vips_enum_from_nick( "im_vips2dz", VIPS_TYPE_ANGLE, q )) < 0 ) return( -1 ); angle = i; } if( vips_dzsave( in, name, "layout", layout, "suffix", suffix, "overlap", overlap, "tile_size", tile_size, "depth", depth, "centre", centre, "angle", angle, NULL ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/deprecated/format.c0000644000175000017500000003703612303140253014726 00000000000000/* VIPS function dispatch tables for image format load/save. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /** * SECTION: format * @short_description: load and save in a variety of formats * @stability: Stable * @see_also: image * @include: vips/vips.h * * VIPS has a simple system for representing image load and save operations in * a generic way. * You can ask for a loader for a certain file or select a saver based on a * filename. Once you have found a format, you can use it to load a file of * that type, save an image to a file of that type, query files for their type * and fields, and ask for supported features. You can also call the * converters directly, if you like. * * If you define a new format, support for * it automatically appears in all VIPS user-interfaces. It will also be * transparently supported by im_open(). * * VIPS comes with VipsFormat for TIFF, JPEG, PNG, Analyze, PPM, OpenEXR, CSV, * Matlab, Radiance, RAW, VIPS and ones that wrap libMagick and OpenSlide. */ /** * VipsFormatFlags: * @VIPS_FORMAT_NONE: no flags set * @VIPS_FORMAT_PARTIAL: the image may be read lazilly * @VIPS_FORMAT_BIGENDIAN: image pixels are most-significant byte first * * Some hints about the image loader. * * @VIPS_FORMAT_PARTIAL means that the image can be read directly from the * file without needing to be unpacked to a temporary image first. * * @VIPS_FORMAT_BIGENDIAN means that image pixels are most-significant byte * first. Depending on the native byte order of the host machine, you may * need to swap bytes. See im_copy_swap(). */ /** * VipsFormat: * * Actually, we never make %VipsFormat objects, we just use virtual methods on * the class object. It is defined as: * * |[ * typedef struct _VipsFormatClass { * VipsObjectClass parent_class; * * gboolean (*is_a)( const char *filename ); * int (*header)( const char *filename, IMAGE *out ); * int (*load)( const char *filename, IMAGE *out ); * int (*save)( IMAGE *in, const char *filename ); * VipsFormatFlags (*get_flags)( const char *filename ); * int priority; * const char **suffs; * } VipsFormatClass; * ]| * * Add a new format to VIPS by subclassing VipsFormat. Subclasses need to * implement at least load() or save(). * * These members are: * * * * * is_a() This function should return %TRUE if the file * contains an image of this type. If you don't define this function, VIPS * will use the list of suffixes you supply instead. * * * * * header() This function should load the image header, * but not load any pixel data. If you don't define it, VIPS will use your * load() method instead. Return 0 for success, -1 for error, setting * im_error(). * * * * * load() This function should load the image, or perhaps use im_generate() to * attach something to load sections of the image on demand. * Users can embed * load options in the filename, see (for example) im_jpeg2vips(). * If you don't * define this method, you can still define save() and have a save-only * format. * Return 0 for success, -1 for error, setting * im_error(). * * * * * save() This function should save the image to the file. * Users can embed * save options in the filename, see (for example) im_vips2tiff(). * If you don't * define this method, you can still define load() and have a load-only * format. * Return 0 for success, -1 for error, setting * im_error(). * * * * * get_flags() This function should return a hint about the properties of this * loader on this file. If you don't define it, users will always see '0', or * no flags. * * * * * priority Where this format should fit in this * list of * supported formats. 0 is a sensible value for most formats. Set a negative * value if you want to be lower on the list, positive to move up. * * * * * suffs A %NULL-terminated list of possible file * name * suffixes, for example: * |[ * static const char *tiff_suffs[] = { ".tif", ".tiff", NULL }; * ]| * The suffix list is used to select a format to save a file in, and to pick a * loader if you don't define is_a(). * * * * * You should also define nickname and * description in #VipsObject. * * At the command-line, use: * * |[ * vips --list classes | grep Format * ]| * * To see a list of all the supported formats. * * For example, the TIFF format is defined like this: * |[ typedef VipsFormat VipsFormatTiff; typedef VipsFormatClass VipsFormatTiffClass; static void vips_format_tiff_class_init( VipsFormatTiffClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "tiff"; object_class->description = _( "TIFF" ); format_class->is_a = istiff; format_class->header = tiff2vips_header; format_class->load = im_tiff2vips; format_class->save = im_vips2tiff; format_class->get_flags = tiff_flags; format_class->suffs = tiff_suffs; } static void vips_format_tiff_init( VipsFormatTiff *object ) { } G_DEFINE_TYPE( VipsFormatTiff, vips_format_tiff, VIPS_TYPE_FORMAT ); ]| * * Then call vips_format_tiff_get_type() somewhere in your init code to link * the format into VIPS (though of course the tiff format is linked in for you * already). * */ /* To iterate over supported formats, we build a temp list of subclasses of * VipsFormat, sort by priority, iterate, and free. */ static void * format_add_class( VipsFormatClass *format, GSList **formats ) { if( !G_TYPE_IS_ABSTRACT( G_OBJECT_CLASS_TYPE( format ) ) ) /* Append so we don't reverse the list of formats. */ *formats = g_slist_append( *formats, format ); return( NULL ); } static gint format_compare( VipsFormatClass *a, VipsFormatClass *b ) { return( b->priority - a->priority ); } /** * vips_format_map: (skip) * @fn: function to apply to each #VipsFormatClass * @a: user data * @b: user data * * Apply a function to every %VipsFormatClass that VIPS knows about. Formats * are presented to the function in priority order. * * Like all VIPS map functions, if @fn returns %NULL, iteration continues. If * it returns non-%NULL, iteration terminates and that value is returned. The * map function returns %NULL if all calls return %NULL. * * See also: im_slist_map(). * * Returns: the result of iteration */ void * vips_format_map( VSListMap2Fn fn, void *a, void *b ) { GSList *formats; void *result; formats = NULL; (void) vips_class_map_all( g_type_from_name( "VipsFormat" ), (VipsClassMapFn) format_add_class, (void *) &formats ); formats = g_slist_sort( formats, (GCompareFunc) format_compare ); result = im_slist_map2( formats, fn, a, b ); g_slist_free( formats ); return( result ); } /* Abstract base class for image formats. */ G_DEFINE_ABSTRACT_TYPE( VipsFormat, vips_format, VIPS_TYPE_OBJECT ); static void vips_format_summary_class( VipsObjectClass *object_class, VipsBuf *buf ) { VipsFormatClass *class = VIPS_FORMAT_CLASS( object_class ); VIPS_OBJECT_CLASS( vips_format_parent_class )-> summary_class( object_class, buf ); vips_buf_appends( buf, ", " ); if( class->suffs ) { const char **p; vips_buf_appends( buf, "(" ); for( p = class->suffs; *p; p++ ) { vips_buf_appendf( buf, "%s", *p ); if( p[1] ) vips_buf_appends( buf, ", " ); } vips_buf_appends( buf, ") " ); } if( class->is_a ) vips_buf_appends( buf, "is_a " ); if( class->header ) vips_buf_appends( buf, "header " ); if( class->load ) vips_buf_appends( buf, "load " ); if( class->save ) vips_buf_appends( buf, "save " ); if( class->get_flags ) vips_buf_appends( buf, "get_flags " ); } static void vips_format_class_init( VipsFormatClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; object_class->nickname = "format"; object_class->description = _( "VIPS file formats" ); object_class->summary_class = vips_format_summary_class; } static void vips_format_init( VipsFormat *object ) { } /** * vips_format_get_flags: * @format: format to test * @filename: file to test * * Get a set of flags for this file. * * Returns: flags for this format and file */ VipsFormatFlags vips_format_get_flags( VipsFormatClass *format, const char *filename ) { return( format->get_flags ? format->get_flags( filename ) : 0 ); } /* VIPS format class. */ static const char *vips_suffs[] = { ".v", NULL }; int im_isvips( const char *filename ) { unsigned char buf[4]; if( im__get_bytes( filename, buf, 4 ) ) { if( buf[0] == 0x08 && buf[1] == 0xf2 && buf[2] == 0xa6 && buf[3] == 0xb6 ) /* SPARC-order VIPS image. */ return( 1 ); else if( buf[3] == 0x08 && buf[2] == 0xf2 && buf[1] == 0xa6 && buf[0] == 0xb6 ) /* INTEL-order VIPS image. */ return( 1 ); } return( 0 ); } static int file2vips( const char *filename, IMAGE *out ) { IMAGE *im; if( !(im = im_open_local( out, filename, "r" )) || im_copy( im, out ) ) return( -1 ); return( 0 ); } static VipsFormatFlags vips_flags( const char *filename ) { VipsFormatFlags flags; unsigned char buf[4]; flags = VIPS_FORMAT_PARTIAL; if( im__get_bytes( filename, buf, 4 ) && buf[0] == 0x08 && buf[1] == 0xf2 && buf[2] == 0xa6 && buf[3] == 0xb6 ) flags |= VIPS_FORMAT_BIGENDIAN; return( flags ); } /* Vips format adds no new members. */ typedef VipsFormat VipsFormatVips; typedef VipsFormatClass VipsFormatVipsClass; static void vips_format_vips_class_init( VipsFormatVipsClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "vips"; object_class->description = _( "VIPS" ); format_class->priority = 200; format_class->is_a = im_isvips; format_class->header = file2vips; format_class->load = file2vips; format_class->save = vips_image_write_to_file; format_class->get_flags = vips_flags; format_class->suffs = vips_suffs; } static void vips_format_vips_init( VipsFormatVips *object ) { } G_DEFINE_TYPE( VipsFormatVips, vips_format_vips, VIPS_TYPE_FORMAT ); /* Called on startup: register the base vips formats. */ void im__format_init( void ) { extern GType vips_format_csv_get_type(); extern GType vips_format_ppm_get_type(); extern GType vips_format_analyze_get_type(); extern GType vips_format_rad_get_type(); vips_format_vips_get_type(); #ifdef HAVE_JPEG extern GType vips_format_jpeg_get_type(); vips_format_jpeg_get_type(); #endif /*HAVE_JPEG*/ #ifdef HAVE_PNG extern GType vips_format_png_get_type(); vips_format_png_get_type(); #endif /*HAVE_PNG*/ vips_format_csv_get_type(); vips_format_ppm_get_type(); vips_format_analyze_get_type(); #ifdef HAVE_OPENEXR extern GType vips_format_exr_get_type(); vips_format_exr_get_type(); #endif /*HAVE_OPENEXR*/ #ifdef HAVE_MATIO extern GType vips_format_mat_get_type(); vips_format_mat_get_type(); #endif /*HAVE_MATIO*/ #ifdef HAVE_CFITSIO extern GType vips_format_fits_get_type(); vips_format_fits_get_type(); #endif /*HAVE_CFITSIO*/ vips_format_rad_get_type(); #ifdef HAVE_MAGICK extern GType vips_format_magick_get_type(); vips_format_magick_get_type(); #endif /*HAVE_MAGICK*/ #ifdef HAVE_TIFF extern GType vips_format_tiff_get_type(); vips_format_tiff_get_type(); #endif /*HAVE_TIFF*/ extern GType vips_format_openslide_get_type(); vips_format_openslide_get_type(); } /* Can this format open this file? */ static void * format_for_file_sub( VipsFormatClass *format, const char *name, const char *filename ) { if( format->is_a ) { if( format->is_a( filename ) ) return( format ); } else if( im_filename_suffix_match( filename, format->suffs ) ) return( format ); return( NULL ); } /** * vips_format_for_file: * @filename: file to find a format for * * Searches for a format you could use to load a file. * * See also: vips_format_read(), vips_format_for_name(). * * Returns: a format on success, %NULL on error */ VipsFormatClass * vips_format_for_file( const char *filename ) { char name[FILENAME_MAX]; char options[FILENAME_MAX]; VipsFormatClass *format; /* Break any options off the name ... eg. "fred.tif:jpeg,tile" * etc. */ im_filename_split( filename, name, options ); if( !im_existsf( "%s", name ) ) { im_error( "VipsFormat", _( "file \"%s\" not found" ), name ); return( NULL ); } if( !(format = (VipsFormatClass *) vips_format_map( (VSListMap2Fn) format_for_file_sub, (void *) filename, (void *) name )) ) { im_error( "VipsFormat", _( "file \"%s\" not a known format" ), name ); return( NULL ); } return( format ); } /* Can we write this filename with this format? Ignore formats without a save * method. */ static void * format_for_name_sub( VipsFormatClass *format, const char *name ) { if( format->save && im_filename_suffix_match( name, format->suffs ) ) return( format ); return( NULL ); } /** * vips_format_for_name: * @filename: name to find a format for * * Searches for a format you could use to save a file. * * See also: vips_format_write(), vips_format_for_file(). * * Returns: a format on success, %NULL on error */ VipsFormatClass * vips_format_for_name( const char *filename ) { VipsFormatClass *format; if( !(format = (VipsFormatClass *) vips_format_map( (VSListMap2Fn) format_for_name_sub, (void *) filename, NULL )) ) { im_error( "VipsFormat", _( "\"%s\" is not a supported image format." ), filename ); return( NULL ); } return( format ); } /** * vips_format_read: * @filename: file to load * @out: write the file to this image * * Searches for a format for this file, then loads the file into @out. * * See also: vips_format_write(). * * Returns: 0 on success, -1 on error */ int vips_format_read( const char *filename, IMAGE *out ) { VipsFormatClass *format; if( !(format = vips_format_for_file( filename )) || format->load( filename, out ) ) return( -1 ); return( 0 ); } /** * vips_format_write: * @in: image to write * @filename: file to write to * * Searches for a format for this name, then saves @im to it. * * See also: vips_format_read(). * * Returns: 0 on success, -1 on error */ int vips_format_write( IMAGE *in, const char *filename ) { VipsFormatClass *format; if( !(format = vips_format_for_name( filename )) || format->save( in, filename ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/deprecated/im_bernd.c0000644000175000017500000000414312303140253015206 00000000000000/* @(#) Extract a tile from a pyramid as a jpeg * @(#) * @(#) int * @(#) im_bernd( const char *tiffname, * @(#) int x, int y, int w, int h ) * @(#) * @(#) * @(#) Returns 0 on success and -1 on error * @(#) * * 7/5/99 JC * - from im_tiff2vips and im_vips2jpeg, plus some stuff from Steve * 11/7/01 JC * - page number now in filename * 12/5/09 * - fix signed/unsigned warning */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include static int extract( IMAGE *in, int x, int y, int w, int h ) { IMAGE *t1; int len; char *buf; if( !(t1 = im_open_local( in, "im_bernd:2", "p" )) || im_extract_area( in, t1, x, y, w, h ) || im_vips2bufjpeg( t1, in, 75, &buf, &len ) ) return( -1 ); if( fwrite( buf, sizeof( char ), len, stdout ) != (size_t) len ) { im_error( "im_bernd", "%s", _( "error writing output" ) ); return( -1 ); } fflush( stdout ); return( 0 ); } int im_bernd( const char *tiffname, int x, int y, int w, int h ) { IMAGE *in; if( !(in = im_open( "im_bernd:1", "p" )) ) return( -1 ); if( im_tiff2vips( tiffname, in ) || extract( in, x, y, w, h ) ) { im_close( in ); return( -1 ); } im_close( in ); return( 0 ); } vips-7.38.5/libvips/deprecated/im_lab_morph.c0000644000175000017500000001545712303140253016071 00000000000000/* Morph a lab image. * * 8/3/01 * - added * 2/11/09 * - cleanups * - gtkdoc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include int im__colour_unary( const char *domain, IMAGE *in, IMAGE *out, VipsType type, im_wrapone_fn buffer_fn, void *a, void *b ) { IMAGE *t[1]; if( im_check_uncoded( domain, in ) || im_check_bands( domain, in, 3 ) || im_open_local_array( out, t, 1, domain, "p" ) || im_clip2fmt( in, t[0], IM_BANDFMT_FLOAT ) ) return( -1 ); if( im_cp_desc( out, t[0] ) ) return( -1 ); out->Type = type; if( im_wrapone( t[0], out, (im_wrapone_fn) buffer_fn, a, b ) ) return( -1 ); return( 0 ); } typedef struct { IMAGE *in, *out; double L_scale, L_offset; double a_offset[101], b_offset[101]; double a_scale, b_scale; } Params; static int morph_init( Params *parm, IMAGE *in, IMAGE *out, double L_scale, double L_offset, DOUBLEMASK *mask, double a_scale, double b_scale ) { int i, j; parm->in = in; parm->out = out; parm->L_scale = L_scale; parm->L_offset = L_offset; parm->a_scale = a_scale; parm->b_scale = b_scale; if( mask->xsize != 3 || mask->ysize < 1 || mask->ysize > 100 ) { im_error( "im_lab_morph", "%s", _( "bad greyscale mask size" ) ); return( -1 ); } for( i = 0; i < mask->ysize; i++ ) { double L = mask->coeff[i*3]; double a = mask->coeff[i*3 + 1]; double b = mask->coeff[i*3 + 2]; if( L < 0 || L > 100 || a < -120 || a > 120 || b < -120 || b > 120 ) { im_error( "im_lab_morph", _( "bad greyscale mask value, row %d" ), i ); return( -1 ); } } /* Generate a/b offsets. */ for( i = 0; i <= 100; i++ ) { double L_low = 0; double a_low = 0; double b_low = 0; double L_high = 100; double a_high = 0; double b_high = 0; /* Search for greyscale L just below i. Don't assume sorted by * L*. */ for( j = 0; j < mask->ysize; j++ ) { double L = mask->coeff[j*3]; double a = mask->coeff[j*3 + 1]; double b = mask->coeff[j*3 + 2]; if( L < i && L > L_low ) { L_low = L; a_low = a; b_low = b; } } /* Search for greyscale L just above i. */ for( j = mask->ysize - 1; j >= 0; j-- ) { double L = mask->coeff[j*3]; double a = mask->coeff[j*3 + 1]; double b = mask->coeff[j*3 + 2]; if( L >= i && L < L_high ) { L_high = L; a_high = a; b_high = b; } } /* Interpolate. */ parm->a_offset[i] = a_low + (a_high - a_low) * ((i - L_low) / (L_high - L_low)); parm->b_offset[i] = b_low + (b_high - b_low) * ((i - L_low) / (L_high - L_low)); } return( 0 ); } static void morph_buffer( float *in, float *out, int width, Params *parm ) { int x; for( x = 0; x < width; x++ ) { double L = in[0]; double a = in[1]; double b = in[2]; L = IM_CLIP( 0, L, 100 ); a -= parm->a_offset[(int) L]; b -= parm->b_offset[(int) L]; L = (L + parm->L_offset) * parm->L_scale; L = IM_CLIP( 0, L, 100 ); a *= parm->a_scale; b *= parm->b_scale; out[0] = L; out[1] = a; out[2] = b; in += 3; out += 3; } } /** * im_lab_morph: * @in: input image * @out: output image * @mask: cast correction table * @L_offset: L adjustment * @L_scale: L adjustment * @a_scale: a scale * @b_scale: b scale * * Morph an image in CIELAB colour space. Useful for certain types of gamut * mapping, or correction of greyscales on some printers. * * We perform three adjustments: * * * * * cast * * Pass in @mask containing CIELAB readings for a neutral greyscale. For * example: * * * * * 3 * 4 * * * 14.23 * 4.8 * -3.95 * * * 18.74 * 2.76 * -2.62 * * * 23.46 * 1.4 * -1.95 * * * 27.53 * 1.76 * -2.01 * * * * * Interpolation from this makes cast corrector. The top and tail are * interpolated towards [0, 0, 0] and [100, 0, 0], intermediate values are * interpolated along straight lines fitted between the specified points. * Rows may be in any order (ie. they need not be sorted on L*). * * Each pixel is displaced in a/b by the amount specified for that L in the * table. * * * * * L* * * Pass in scale and offset for L. L' = (L + offset) * scale. * * * * * saturation * * scale a and b by these amounts, eg. 1.5 increases saturation. * * * * * Find the top two by generating and printing a greyscale. Find the bottom * by printing a Macbeth and looking at a/b spread * * Returns: 0 on success, -1 on error. */ int im_lab_morph( IMAGE *in, IMAGE *out, DOUBLEMASK *mask, double L_offset, double L_scale, double a_scale, double b_scale ) { Params *parm; /* Recurse for coded images. */ if( in->Coding == IM_CODING_LABQ ) { IMAGE *t[2]; if( im_open_local_array( out, t, 2, "im_lab_morph", "p" ) || im_LabQ2Lab( in, t[0] ) || im_lab_morph( t[0], t[1], mask, L_offset, L_scale, a_scale, b_scale ) || im_Lab2LabQ( t[1], out ) ) return( -1 ); return( 0 ); } if( !(parm = IM_NEW( out, Params )) || morph_init( parm, in, out, L_scale, L_offset, mask, a_scale, b_scale ) ) return( -1 ); return( im__colour_unary( "im_lab_morph", in, out, IM_TYPE_LAB, (im_wrapone_fn) morph_buffer, parm, NULL ) ); } vips-7.38.5/libvips/deprecated/conver_dispatch.c0000644000175000017500000007346612303140253016620 00000000000000/* VIPS function dispatch tables for conversion. * * J. Cupitt, 8/4/93. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include static int system_vec( im_object *argv ) { IMAGE *in = argv[0]; char *cmd = argv[1]; char **out = (char **) &argv[2]; if( im_system( in, cmd, out ) ) return( -1 ); return( 0 ); } static im_arg_desc system_args[] = { IM_INPUT_IMAGE( "im" ), IM_INPUT_STRING( "command" ), IM_OUTPUT_STRING( "output" ) }; static im_function system_desc = { "im_system", /* Name */ "run command on image", /* Description */ 0, /* Flags */ system_vec, /* Dispatch function */ IM_NUMBER( system_args ), /* Size of arg list */ system_args /* Arg list */ }; static int system_image_vec( im_object *argv ) { IMAGE *in = argv[0]; IMAGE *out = argv[1]; char *in_format = argv[2]; char *out_format = argv[3]; char *cmd = argv[4]; char **log = (char **) &argv[5]; IMAGE *out_image; if( !(out_image = im_system_image( in, in_format, out_format, cmd, log )) ) { im_error( "im_system_image", "%s", *log ); return( -1 ); } if( im_copy( out_image, out ) || im_add_close_callback( out, (im_callback_fn) im_close, out_image, NULL ) ) { im_close( out_image ); return( -1 ); } return( 0 ); } static im_arg_desc system_image_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_STRING( "in_format" ), IM_INPUT_STRING( "out_format" ), IM_INPUT_STRING( "command" ), IM_OUTPUT_STRING( "log" ) }; static im_function system_image_desc = { "im_system_image", /* Name */ "run command on image, with image output",/* Description */ 0, /* Flags */ system_image_vec, /* Dispatch function */ IM_NUMBER( system_image_args ), /* Size of arg list */ system_image_args /* Arg list */ }; static int subsample_vec( im_object *argv ) { IMAGE *in = argv[0]; IMAGE *out = argv[1]; int xsh = *((int *) argv[2]); int ysh = *((int *) argv[3]); if( im_subsample( in, out, xsh, ysh ) ) return( -1 ); return( 0 ); } static im_arg_desc subsample_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xshrink" ), IM_INPUT_INT( "yshrink" ) }; static im_function subsample_desc = { "im_subsample", /* Name */ "subsample image by integer factors", /* Description */ IM_FN_PIO, /* Flags */ subsample_vec, /* Dispatch function */ IM_NUMBER( subsample_args ), /* Size of arg list */ subsample_args /* Arg list */ }; /* Args for im_gaussnoise. */ static im_arg_desc gaussnoise_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xsize" ), IM_INPUT_INT( "ysize" ), IM_INPUT_DOUBLE( "mean" ), IM_INPUT_DOUBLE( "sigma" ) }; /* Call im_gaussnoise via arg vector. */ static int gaussnoise_vec( im_object *argv ) { int xsize = *((int *) argv[1]); int ysize = *((int *) argv[2]); double mean = *((double *) argv[3]); double sigma = *((double *) argv[4]); if( im_gaussnoise( argv[0], xsize, ysize, mean, sigma ) ) return( -1 ); return( 0 ); } /* Description of im_gaussnoise. */ static im_function gaussnoise_desc = { "im_gaussnoise", /* Name */ "generate image of gaussian noise with specified statistics", IM_FN_PIO, /* Flags */ gaussnoise_vec, /* Dispatch function */ IM_NUMBER( gaussnoise_args ), /* Size of arg list */ gaussnoise_args /* Arg list */ }; /* Args to im_extract. */ static im_arg_desc extract_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "left" ), IM_INPUT_INT( "top" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ), IM_INPUT_INT( "band" ) }; /* Call im_extract via arg vector. */ static int extract_vec( im_object *argv ) { int left = *((int *) argv[2]); int top = *((int *) argv[3]); int width = *((int *) argv[4]); int height = *((int *) argv[5]); int band = *((int *) argv[6]); return( im_extract_areabands( argv[0], argv[1], left, top, width, height, band, 1 ) ); } /* Description of im_extract. */ static im_function extract_desc = { "im_extract", /* Name */ "extract area/band", /* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ extract_vec, /* Dispatch function */ IM_NUMBER( extract_args ), /* Size of arg list */ extract_args /* Arg list */ }; /* Args to im_extract_area. */ static im_arg_desc extract_area_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "left" ), IM_INPUT_INT( "top" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ) }; /* Call im_extract_area via arg vector. */ static int extract_area_vec( im_object *argv ) { int x = *((int *) argv[2]); int y = *((int *) argv[3]); int w = *((int *) argv[4]); int h = *((int *) argv[5]); return( im_extract_area( argv[0], argv[1], x, y, w, h ) ); } /* Description of im_extract_area. */ static im_function extract_area_desc = { "im_extract_area", /* Name */ "extract area", /* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ extract_area_vec, /* Dispatch function */ IM_NUMBER( extract_area_args ), /* Size of arg list */ extract_area_args /* Arg list */ }; /* Args to im_extract_bands. */ static im_arg_desc extract_bands_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "band" ), IM_INPUT_INT( "nbands" ), }; /* Call im_extract_bands via arg vector. */ static int extract_bands_vec( im_object *argv ) { int chsel = *((int *) argv[2]); int nbands = *((int *) argv[3]); return( im_extract_bands( argv[0], argv[1], chsel, nbands ) ); } /* Description of im_extract_bands. */ static im_function extract_bands_desc = { "im_extract_bands", /* Name */ "extract several bands", /* Description */ IM_FN_PIO, /* Flags */ extract_bands_vec, /* Dispatch function */ IM_NUMBER( extract_bands_args ),/* Size of arg list */ extract_bands_args /* Arg list */ }; /* Args to im_extract_band. */ static im_arg_desc extract_band_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "band" ) }; /* Call im_extract_band via arg vector. */ static int extract_band_vec( im_object *argv ) { int chsel = *((int *) argv[2]); return( im_extract_band( argv[0], argv[1], chsel ) ); } /* Description of im_extract_band. */ static im_function extract_band_desc = { "im_extract_band", /* Name */ "extract band", /* Description */ IM_FN_PIO, /* Flags */ extract_band_vec, /* Dispatch function */ IM_NUMBER( extract_band_args ), /* Size of arg list */ extract_band_args /* Arg list */ }; /* Args to im_extract_areabands. */ static im_arg_desc extract_areabands_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "left" ), IM_INPUT_INT( "top" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ), IM_INPUT_INT( "band" ), IM_INPUT_INT( "nbands" ) }; /* Call im_extract_areabands via arg vector. */ static int extract_areabands_vec( im_object *argv ) { int left = *((int *) argv[2]); int top = *((int *) argv[3]); int width = *((int *) argv[4]); int height = *((int *) argv[5]); int band = *((int *) argv[6]); int nbands = *((int *) argv[7]); return( im_extract_areabands( argv[0], argv[1], left, top, width, height, band, nbands ) ); } /* Description of im_extract_areabands. */ static im_function extract_areabands_desc = { "im_extract_areabands", /* Name */ "extract area and bands", /* Description */ IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ extract_areabands_vec, /* Dispatch function */ IM_NUMBER( extract_areabands_args ),/* Size of arg list */ extract_areabands_args /* Arg list */ }; /* One image in, one out. */ static im_arg_desc one_in_one_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; /* Two images in, one out. */ static im_arg_desc two_in_one_out[] = { IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_bandjoin via arg vector. */ static int bandjoin_vec( im_object *argv ) { return( im_bandjoin( argv[0], argv[1], argv[2] ) ); } /* Description of im_bandjoin. */ static im_function bandjoin_desc = { "im_bandjoin", /* Name */ "bandwise join of two images", /* Description */ IM_FN_PIO, /* Flags */ bandjoin_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; static im_arg_desc gbandjoin_args[] = { IM_INPUT_IMAGEVEC( "in" ), IM_OUTPUT_IMAGE( "out" ) }; static int gbandjoin_vec( im_object *argv ) { im_imagevec_object *iv = (im_imagevec_object *) argv[0]; return( im_gbandjoin( iv->vec, argv[1], iv->n ) ); } static im_function gbandjoin_desc = { "im_gbandjoin", /* Name */ "bandwise join of many images", /* Description */ IM_FN_PIO, /* Flags */ gbandjoin_vec, /* Dispatch function */ IM_NUMBER( gbandjoin_args ), /* Size of arg list */ gbandjoin_args /* Arg list */ }; /* Args to im_text. */ static im_arg_desc text_args[] = { IM_OUTPUT_IMAGE( "out" ), IM_INPUT_STRING( "text" ), IM_INPUT_STRING( "font" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "alignment" ), IM_INPUT_INT( "dpi" ) }; /* Call im_text via arg vector. */ static int text_vec( im_object *argv ) { int width = *((int *) argv[3]); int alignment = *((int *) argv[4]); int dpi = *((int *) argv[5]); return( im_text( argv[0], argv[1], argv[2], width, alignment, dpi ) ); } /* Description of im_text. */ static im_function text_desc = { "im_text", /* Name */ "generate text image", /* Description */ IM_FN_PIO, /* Flags */ text_vec, /* Dispatch function */ IM_NUMBER( text_args ), /* Size of arg list */ text_args /* Arg list */ }; /* Args to im_black. */ static im_arg_desc black_args[] = { IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "x_size" ), IM_INPUT_INT( "y_size" ), IM_INPUT_INT( "bands" ) }; /* Call im_black via arg vector. */ static int black_vec( im_object *argv ) { int xs = *((int *) argv[1]); int ys = *((int *) argv[2]); int bands = *((int *) argv[3]); return( im_black( argv[0], xs, ys, bands ) ); } /* Description of im_black. */ static im_function black_desc = { "im_black", /* Name */ "generate black image", /* Description */ IM_FN_PIO, /* Flags */ black_vec, /* Dispatch function */ IM_NUMBER( black_args ), /* Size of arg list */ black_args /* Arg list */ }; /* Args to im_clip2fmt. */ static im_arg_desc clip2fmt_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "ofmt" ) }; /* Call im_clip2fmt via arg vector. */ static int clip2fmt_vec( im_object *argv ) { int ofmt = *((int *) argv[2]); return( im_clip2fmt( argv[0], argv[1], ofmt ) ); } /* Description of im_clip2fmt. */ static im_function clip2fmt_desc = { "im_clip2fmt", /* Name */ "convert image format to ofmt", /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ clip2fmt_vec, /* Dispatch function */ IM_NUMBER( clip2fmt_args ), /* Size of arg list */ clip2fmt_args /* Arg list */ }; /* Call im_c2rect via arg vector. */ static int c2rect_vec( im_object *argv ) { return( im_c2rect( argv[0], argv[1] ) ); } /* Description of im_c2rect. */ static im_function c2rect_desc = { "im_c2rect", /* Name */ "convert phase and amplitude to real and imaginary", IM_FN_PTOP | IM_FN_PIO, /* Flags */ c2rect_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_c2amph via arg vector. */ static int c2amph_vec( im_object *argv ) { return( im_c2amph( argv[0], argv[1] ) ); } /* Description of im_c2amph. */ static im_function c2amph_desc = { "im_c2amph", /* Name */ "convert real and imaginary to phase and amplitude", IM_FN_PTOP | IM_FN_PIO, /* Flags */ c2amph_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_ri2c via arg vector. */ static int ri2c_vec( im_object *argv ) { return( im_ri2c( argv[0], argv[1], argv[2] ) ); } /* Description of im_ri2c. */ static im_function ri2c_desc = { "im_ri2c", /* Name */ "join two non-complex images to form complex", IM_FN_PTOP | IM_FN_PIO, /* Flags */ ri2c_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_c2imag via arg vector. */ static int c2imag_vec( im_object *argv ) { return( im_c2imag( argv[0], argv[1] ) ); } /* Description of im_c2imag. */ static im_function c2imag_desc = { "im_c2imag", /* Name */ "extract imaginary part of complex image", IM_FN_PTOP | IM_FN_PIO, /* Flags */ c2imag_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_c2real via arg vector. */ static int c2real_vec( im_object *argv ) { return( im_c2real( argv[0], argv[1] ) ); } /* Description of im_c2real. */ static im_function c2real_desc = { "im_c2real", /* Name */ "extract real part of complex image", IM_FN_PTOP | IM_FN_PIO, /* Flags */ c2real_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args to im_copy_set. */ static im_arg_desc copy_set_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "Type" ), IM_INPUT_DOUBLE( "Xres" ), IM_INPUT_DOUBLE( "Yres" ), IM_INPUT_INT( "Xoffset" ), IM_INPUT_INT( "Yoffset" ) }; /* Call im_copy_set via arg vector. */ static int copy_set_vec( im_object *argv ) { int Type = *((int *) argv[2]); float Xres = *((double *) argv[3]); float Yres = *((double *) argv[4]); int Xoffset = *((int *) argv[5]); int Yoffset = *((int *) argv[6]); return( im_copy_set( argv[0], argv[1], Type, Xres, Yres, Xoffset, Yoffset ) ); } /* Description of im_copy_set. */ static im_function copy_set_desc = { "im_copy_set", /* Name */ "copy image, setting informational fields", /* Can't set PTOP ... we don't want to zap the LUT, we want the real * image. */ IM_FN_PIO, /* Flags */ copy_set_vec, /* Dispatch function */ IM_NUMBER( copy_set_args ), /* Size of arg list */ copy_set_args /* Arg list */ }; /* Args to im_copy_set_meta. */ static im_arg_desc copy_set_meta_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_STRING( "field" ), IM_INPUT_GVALUE( "value" ) }; /* Call im_copy_set_meta via arg vector. */ static int copy_set_meta_vec( im_object *argv ) { const char *field = argv[2]; GValue *value = argv[3]; return( im_copy_set_meta( argv[0], argv[1], field, value ) ); } /* Description of im_copy_set_meta. */ static im_function copy_set_meta_desc = { "im_copy_set_meta", /* Name */ "copy image, setting a meta field", /* Can't set PTOP ... we don't want to zap the LUT, we want the real * image. */ IM_FN_PIO, /* Flags */ copy_set_meta_vec, /* Dispatch function */ IM_NUMBER( copy_set_meta_args ),/* Size of arg list */ copy_set_meta_args /* Arg list */ }; /* Args to im_copy_morph. */ static im_arg_desc copy_morph_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "Bands" ), IM_INPUT_INT( "BandFmt" ), IM_INPUT_INT( "Coding" ) }; /* Call im_copy_morph via arg vector. */ static int copy_morph_vec( im_object *argv ) { int Bands = *((int *) argv[2]); int BandFmt = *((int *) argv[3]); int Coding = *((int *) argv[4]); return( im_copy_morph( argv[0], argv[1], Bands, BandFmt, Coding ) ); } /* Description of im_copy_morph. */ static im_function copy_morph_desc = { "im_copy_morph", /* Name */ "copy image, setting pixel layout", /* Can't set PTOP ... we don't want to zap the LUT, we want the real * image. */ IM_FN_PIO, /* Flags */ copy_morph_vec, /* Dispatch function */ IM_NUMBER( copy_morph_args ), /* Size of arg list */ copy_morph_args /* Arg list */ }; /* Call im_copy via arg vector. */ static int copy_vec( im_object *argv ) { return( im_copy( argv[0], argv[1] ) ); } /* Description of im_copy. */ static im_function copy_desc = { "im_copy", /* Name */ "copy image", /* Can't set PTOP ... we don't want to zap the LUT, we want the real * image. * * Don't cache, since we use copy to stop sharing. */ IM_FN_PIO | IM_FN_NOCACHE, copy_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_copy_file via arg vector. */ static int copy_file_vec( im_object *argv ) { return( im_copy_file( argv[0], argv[1] ) ); } /* Description of im_copy_file. */ static im_function copy_file_desc = { "im_copy_file", /* Name */ "copy image to a file and return that", /* Can't set PTOP ... we don't want to zap the LUT, we want the real * image. */ IM_FN_PIO, /* Flags */ copy_file_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_copy_swap via arg vector. */ static int copy_swap_vec( im_object *argv ) { return( im_copy_swap( argv[0], argv[1] ) ); } /* Description of im_copy_swap. */ static im_function copy_swap_desc = { "im_copy_swap", /* Name */ "copy image, swapping byte order", /* Can't set PTOP ... we don't want to zap the LUT, we want the real * image. */ IM_FN_PIO, /* Flags */ copy_swap_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_fliphor via arg vector. */ static int fliphor_vec( im_object *argv ) { return( im_fliphor( argv[0], argv[1] ) ); } /* Description of im_fliphor. */ static im_function fliphor_desc = { "im_fliphor", /* Name */ "flip image left-right", IM_FN_PIO, /* Flags */ fliphor_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_flipver via arg vector. */ static int flipver_vec( im_object *argv ) { return( im_flipver( argv[0], argv[1] ) ); } /* Description of im_flipver. */ static im_function flipver_desc = { "im_flipver", /* Name */ "flip image top-bottom", IM_FN_PIO, /* Flags */ flipver_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_falsecolour via arg vector. */ static int falsecolour_vec( im_object *argv ) { return( im_falsecolour( argv[0], argv[1] ) ); } /* Description of im_falsecolour. */ static im_function falsecolour_desc = { "im_falsecolour", /* Name */ "turn luminance changes into chrominance changes", IM_FN_PTOP | IM_FN_PIO, /* Flags */ falsecolour_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args for im_insert. */ static im_arg_desc insert_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_IMAGE( "sub" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ) }; /* Call im_insert via arg vector. */ static int insert_vec( im_object *argv ) { int x = *((int *) argv[3]); int y = *((int *) argv[4]); return( im_insert( argv[0], argv[1], argv[2], x, y ) ); } /* Description of im_insert. */ static im_function insert_desc = { "im_insert", /* Name */ "insert sub-image into main image at position", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ insert_vec, /* Dispatch function */ IM_NUMBER( insert_args ), /* Size of arg list */ insert_args /* Arg list */ }; /* Args for im_insertset. */ static im_arg_desc insertset_args[] = { IM_INPUT_IMAGE( "main" ), IM_INPUT_IMAGE( "sub" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INTVEC( "x" ), IM_INPUT_INTVEC( "y" ) }; /* Call im_insertplaceset via arg vector. */ static int insertset_vec( im_object *argv ) { im_intvec_object *xv = (im_intvec_object *) argv[3]; im_intvec_object *yv = (im_intvec_object *) argv[4]; if( xv->n != yv->n ) { im_error( "im_insertset", "%s", _( "vectors not same length" ) ); return( -1 ); } if( im_insertset( argv[0], argv[1], argv[2], xv->n, xv->vec, yv->vec ) ) return( -1 ); return( 0 ); } /* Description of im_insertset. */ static im_function insertset_desc = { "im_insertset", /* Name */ "insert sub into main at every position in x, y", 0, /* Flags */ insertset_vec, /* Dispatch function */ IM_NUMBER( insertset_args ), /* Size of arg list */ insertset_args /* Arg list */ }; /* Call im_insert_noexpand via arg vector. */ static int insert_noexpand_vec( im_object *argv ) { int x = *((int *) argv[3]); int y = *((int *) argv[4]); return( im_insert_noexpand( argv[0], argv[1], argv[2], x, y ) ); } /* Description of im_insert_noexpand. */ static im_function insert_noexpand_desc = { "im_insert_noexpand", /* Name */ "insert sub-image into main image at position, no expansion", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ insert_noexpand_vec, /* Dispatch function */ IM_NUMBER( insert_args ), /* Size of arg list */ insert_args /* Arg list */ }; /* Call im_rot180 via arg vector. */ static int rot180_vec( im_object *argv ) { return( im_rot180( argv[0], argv[1] ) ); } /* Description of im_rot180. */ static im_function rot180_desc = { "im_rot180", /* Name */ "rotate image 180 degrees", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ rot180_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_rot90 via arg vector. */ static int rot90_vec( im_object *argv ) { return( im_rot90( argv[0], argv[1] ) ); } /* Description of im_rot90. */ static im_function rot90_desc = { "im_rot90", /* Name */ "rotate image 90 degrees clockwise", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ rot90_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_rot270 via arg vector. */ static int rot270_vec( im_object *argv ) { return( im_rot270( argv[0], argv[1] ) ); } /* Description of im_rot270. */ static im_function rot270_desc = { "im_rot270", /* Name */ "rotate image 270 degrees clockwise", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ rot270_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_lrjoin via arg vector. */ static int lrjoin_vec( im_object *argv ) { return( im_lrjoin( argv[0], argv[1], argv[2] ) ); } /* Description of im_lrjoin. */ static im_function lrjoin_desc = { "im_lrjoin", /* Name */ "join two images left-right", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ lrjoin_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_tbjoin via arg vector. */ static int tbjoin_vec( im_object *argv ) { return( im_tbjoin( argv[0], argv[1], argv[2] ) ); } /* Description of im_tbjoin. */ static im_function tbjoin_desc = { "im_tbjoin", /* Name */ "join two images top-bottom", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ tbjoin_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_scale via arg vector. */ static int scale_vec( im_object *argv ) { return( im_scale( argv[0], argv[1] ) ); } /* Description of im_scale. */ static im_function scale_desc = { "im_scale", /* Name */ "scale image linearly to fit range 0-255", IM_FN_PIO, /* Flags */ scale_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_scaleps via arg vector. */ static int scaleps_vec( im_object *argv ) { return( im_scaleps( argv[0], argv[1] ) ); } /* Description of im_scaleps. */ static im_function scaleps_desc = { "im_scaleps", /* Name */ "logarithmic scale of image to fit range 0-255", 0, /* Flags */ scaleps_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args to im_grid. */ static im_arg_desc grid_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "tile_height" ), IM_INPUT_INT( "across" ), IM_INPUT_INT( "down" ) }; /* Call im_grid via arg vector. */ static int grid_vec( im_object *argv ) { int tile_height = *((int *) argv[2]); int across = *((int *) argv[3]); int down = *((int *) argv[4]); return( im_grid( argv[0], argv[1], tile_height, across, down ) ); } /* Description of im_grid. */ static im_function grid_desc = { "im_grid", /* Name */ "chop a tall thin image into a grid of images", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ grid_vec, /* Dispatch function */ IM_NUMBER( grid_args ), /* Size of arg list */ grid_args /* Arg list */ }; /* Args to im_replicate. */ static im_arg_desc replicate_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "across" ), IM_INPUT_INT( "down" ) }; /* Call im_replicate via arg vector. */ static int replicate_vec( im_object *argv ) { int across = *((int *) argv[2]); int down = *((int *) argv[3]); return( im_replicate( argv[0], argv[1], across, down ) ); } /* Description of im_replicate. */ static im_function replicate_desc = { "im_replicate", /* Name */ "replicate an image horizontally and vertically", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ replicate_vec, /* Dispatch function */ IM_NUMBER( replicate_args ), /* Size of arg list */ replicate_args /* Arg list */ }; /* Args to im_zoom. */ static im_arg_desc zoom_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "xfac" ), IM_INPUT_INT( "yfac" ) }; /* Call im_zoom via arg vector. */ static int zoom_vec( im_object *argv ) { int xfac = *((int *) argv[2]); int yfac = *((int *) argv[3]); return( im_zoom( argv[0], argv[1], xfac, yfac ) ); } /* Description of im_zoom. */ static im_function zoom_desc = { "im_zoom", /* Name */ "simple zoom of an image by integer factors", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ zoom_vec, /* Dispatch function */ IM_NUMBER( zoom_args ), /* Size of arg list */ zoom_args /* Arg list */ }; /* Call im_msb via arg vector. */ static int msb_vec (im_object * argv) { return im_msb (argv[0], argv[1]); } /* Description of im_msb. */ static im_function msb_desc = { "im_msb", /* Name */ "convert to uchar by discarding bits", IM_FN_PIO | IM_FN_PTOP, /* Flags */ msb_vec, /* Dispatch function */ IM_NUMBER (one_in_one_out), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args to im_msb_band. */ static im_arg_desc msb_band_args[] = { IM_INPUT_IMAGE ("in"), IM_OUTPUT_IMAGE ("out"), IM_INPUT_INT ("band") }; /* Call im_msb_band via arg vector. */ static int msb_band_vec (im_object * argv) { IMAGE *in = (IMAGE *) argv[0]; IMAGE *out = (IMAGE *) argv[1]; int *band = (int *) argv[2]; return im_msb_band (in, out, *band); } /* Description of im_msb_band. */ static im_function msb_band_desc = { "im_msb_band", /* Name */ "convert to single band uchar by discarding bits", IM_FN_PIO | IM_FN_PTOP, /* Flags */ msb_band_vec, /* Dispatch function */ IM_NUMBER (msb_band_args), /* Size of arg list */ msb_band_args /* Arg list */ }; /* Args to im_wrap. */ static im_arg_desc wrap_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ) }; /* Call im_wrap via arg vector. */ static int wrap_vec (im_object * argv) { return im_wrap( argv[0], argv[1], *(int*)argv[2], *(int*)argv[3] ); } /* Description of im_wrap. */ static im_function wrap_desc = { "im_wrap", /* Name */ "shift image origin, wrapping at sides", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ wrap_vec, /* Dispatch function */ IM_NUMBER (wrap_args), /* Size of arg list */ wrap_args /* Arg list */ }; /* Args for im_embed. */ static im_arg_desc embed_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "type" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ) }; /* Call im_embed via arg vector. */ static int embed_vec( im_object *argv ) { int type = *((int *) argv[2]); int x = *((int *) argv[3]); int y = *((int *) argv[4]); int width = *((int *) argv[5]); int height = *((int *) argv[6]); return( im_embed( argv[0], argv[1], type, x, y, width, height ) ); } /* Description of im_embed. */ static im_function embed_desc = { "im_embed", /* Name */ "embed in within a set of borders", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ embed_vec, /* Dispatch function */ IM_NUMBER( embed_args ), /* Size of arg list */ embed_args /* Arg list */ }; /* Package up all these functions. */ static im_function *conv_list[] = { &gaussnoise_desc, &bandjoin_desc, &black_desc, &c2amph_desc, &c2imag_desc, &c2real_desc, &c2rect_desc, &clip2fmt_desc, ©_desc, ©_file_desc, ©_morph_desc, ©_swap_desc, ©_set_desc, ©_set_meta_desc, &extract_area_desc, &extract_areabands_desc, &extract_band_desc, &extract_bands_desc, &extract_desc, &falsecolour_desc, &fliphor_desc, &flipver_desc, &gbandjoin_desc, &grid_desc, &insert_desc, &insertset_desc, &insert_noexpand_desc, &embed_desc, &lrjoin_desc, &msb_desc, &msb_band_desc, &replicate_desc, &ri2c_desc, &rot180_desc, &rot270_desc, &rot90_desc, &scale_desc, &scaleps_desc, &subsample_desc, &system_desc, &system_image_desc, &tbjoin_desc, &text_desc, &wrap_desc, &zoom_desc }; /* Package of functions. */ im_package im__conversion = { "conversion", IM_NUMBER( conv_list ), conv_list }; vips-7.38.5/libvips/deprecated/im_measure.c0000644000175000017500000001245412303140253015561 00000000000000/* im_measure.c * * Modified: * 19/8/94 JC * - now uses doubles for addressing * - could miss by up to h pixels previously! * - ANSIfied * - now issues warning if any deviations are greater than 20% of the * mean * 31/10/95 JC * - more careful about warning for averages <0, or averages near zero * - can get these cases with im_measure() of IM_TYPE_LAB images * 28/10/02 JC * - number bands from zero in error messages * 7/7/04 * - works on labq * 18/8/08 * - add gtkdoc comments * - remove deprecated im_extract() * 30/11/09 * - changes for im_extract() broke averaging * 9/11/11 * - moved to deprecated, the new VipsMeasure does not have the * select-patches thing, so we have to keep this around */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /* Measure into array. */ static int measure_patches( IMAGE *im, double *coeff, int left, int top, int width, int height, int u, int v, int *sel, int nsel ) { IMAGE *tmp; int patch; int i, j; int m, n; double avg, dev; int x, y, w, h; /* How large are the patches we are to measure? */ double pw = (double) width / (double) u; double ph = (double) height / (double) v; /* Set up sub to be the size we need for a patch. */ w = (pw + 1) / 2; h = (ph + 1) / 2; /* Loop through sel, picking out areas to measure. */ for( j = 0, patch = 0; patch < nsel; patch++ ) { /* Sanity check. Is the patch number sensible? */ if( sel[patch] <= 0 || sel[patch] > u * v ) { im_error( "im_measure", _( "patch %d is out of range" ), sel[patch] ); return( 1 ); } /* Patch coordinates. */ m = (sel[patch] - 1) % u; n = (sel[patch] - 1) / u; /* Move sub to correct position. */ x = left + m * pw + (pw + 2) / 4; y = top + n * ph + (ph + 2) / 4; /* Loop through bands. */ for( i = 0; i < im->Bands; i++, j++ ) { /* Make temp buffer to extract to. */ if( !(tmp = im_open( "patch", "t" )) ) return( -1 ); /* Extract and measure. */ if( im_extract_areabands( im, tmp, x, y, w, h, i, 1 ) || im_avg( tmp, &avg ) || im_deviate( tmp, &dev ) ) { im_close( tmp ); return( -1 ); } im_close( tmp ); /* Is the deviation large compared with the average? * This could be a clue that our parameters have * caused us to miss the patch. Look out for averages * <0, or averages near zero (can get these if use * im_measure() on IM_TYPE_LAB images). */ if( dev * 5 > fabs( avg ) && fabs( avg ) > 3 ) im_warn( "im_measure", _( "patch %d, band %d: " "avg = %g, sdev = %g" ), patch, i, avg, dev ); /* Save results. */ coeff[j] = avg; } } return( 0 ); } static DOUBLEMASK * internal_im_measure_area( IMAGE *im, int left, int top, int width, int height, int u, int v, int *sel, int nsel, const char *name ) { DOUBLEMASK *mask; if( im_check_uncoded( "im_measure", im ) || im_check_noncomplex( "im_measure", im ) ) return( NULL ); /* Default to all patches if sel == NULL. */ if( sel == NULL ) { int i; nsel = u * v; if( !(sel = IM_ARRAY( im, nsel, int )) ) return( NULL ); for( i = 0; i < nsel; i++ ) sel[i] = i + 1; } /* What size mask do we need? */ if( !(mask = im_create_dmask( name, im->Bands, nsel )) ) return( NULL ); /* Perform measure and return. */ if( measure_patches( im, mask->coeff, left, top, width, height, u, v, sel, nsel ) ) { im_free_dmask( mask ); return( NULL ); } return( mask ); } DOUBLEMASK * im_measure_area( IMAGE *im, int left, int top, int width, int height, int u, int v, int *sel, int nsel, const char *name ) { DOUBLEMASK *mask; VipsImage *t; /* The old im_measure() worked on labq. */ if( im->Coding == IM_CODING_LABQ ) { if( !(t = im_open( "measure-temp", "p" )) ) return( NULL ); if( im_LabQ2Lab( im, t ) || !(mask = im_measure_area( t, left, top, width, height, u, v, sel, nsel, name )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( mask ); } if( sel ) return( internal_im_measure_area( im, left, top, width, height, u, v, sel, nsel, name ) ); else { if( vips_measure( im, &t, u, v, "left", left, "top", top, "width", width, "height", height, NULL ) ) return( NULL ); if( !(mask = im_vips2mask( t, name )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( mask ); } } vips-7.38.5/libvips/deprecated/im_spatres.c0000644000175000017500000000747312303140253015606 00000000000000/* @(#) Function which changes the spatial resolution of an image according to * @(#) step * @(#) * @(#) int im_spatres(in, out, step) * @(#) IMAGE *in, *out; * @(#) int step; * @(#) Returns either 0 (sucess) or -1 (fail) * @(#) * @(#) Picture can have any number of channels (max 64). * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 08/11/1989. * Modified on: 19/01/1990. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include int im_spatres( IMAGE *in, IMAGE *out, int step ) { int x, y; /* horizontal and vertical direction */ int z; /* 0 <= z < channel */ int i, j; int rounding, step2, sum; unsigned char *values; unsigned char *input, *cpinput, *cp2input, *line, *cpline, *pnt, *cpnt; int os; /* Check args */ if ( step < 1 ) { im_error( "im_spatres", _( "Invalid step %d" ), step ); return(-1);} if ( (in->Xsize/step == 0)||(in->Ysize/step == 0) ) {im_error("im_spatres", _( "Invalid step %d" ), step);return(-1);} if (im_iocheck(in, out) == -1) return( -1 ); if((in->Coding != IM_CODING_NONE)||(in->BandFmt !=IM_BANDFMT_UCHAR)) { im_error( "im_spatres", "%s", _( "wrong input") ); return(-1); } /* Prepare output */ if (im_cp_desc(out, in) == -1) return( -1 ); out->Xsize = in->Xsize - in->Xsize%step; out->Ysize = in->Ysize - in->Ysize%step; if( im_setupout(out) == -1) return( -1 ); /* Malloc buffer for one 'line' of input data */ os = in->Xsize * in->Bands; line = (unsigned char *)calloc((unsigned)os, sizeof(char)); /* Malloc space for values */ values = (unsigned char *)calloc((unsigned)out->Bands, sizeof(char)); if ( line == NULL || values == NULL ) { im_error( "im_spatres", "%s", _( "calloc failed") ); return(-1); } step2 = step * step; rounding = step2/2; input = (unsigned char *)in->data; for ( y = 0; y < out->Ysize; y += step ) { cpinput = input; input += os * step; /* do the x loop out->Xsize / step times */ cpline = line; for (x = 0; x < out->Xsize; x += step) { cp2input = cpinput; cpinput += step * out->Bands; /* ??? */ for ( z = 0; z < out->Bands; z++ ) { pnt = cp2input + z; sum = 0; for ( j = 0; j < step; j++ ) { cpnt = pnt; pnt += os; for ( i = 0; i < step; i++ ) { sum += (int)*cpnt; cpnt += out->Bands; } } *(values + z) = (PEL)((sum + rounding)/step2); } /* for this x, write step*bands data */ for ( j = 0; j < step; j++ ) for ( z = 0; z < out->Bands; z++ ) *cpline++ = *(values + z); } /* line is now ready. Write now step lines */ for (j = 0; j < step; j++) if ( im_writeline ( y+j, out, (PEL *)line ) == -1 ) { free ( (char *)line ); free ( (char *)values ); return( -1 ); } } /* end of the for (..y..) loop */ free ( (char *)line ); free ( (char *)values ); return(0); } vips-7.38.5/libvips/deprecated/im_zerox.c0000644000175000017500000001052012303140253015257 00000000000000/* detect zero-crossings * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 12/02/1990 * Modified on : * 1/2/95 JC * - rewritten for PIO * - some bugs removed * 11/5/06 * - small clean ups * 11/11/10 * - small cleanups * - gtkdoc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #define LOOP( TYPE ) { \ for( i = 0; i < ne; i++ ) { \ TYPE p1 = ((TYPE *)p)[i]; \ TYPE p2 = ((TYPE *)p)[i + ba]; \ \ if( flag == 1 && p1 > 0 && p2 <= 0 ) \ q[i] = 255; \ else if( flag == -1 && p1 < 0 && p2 >= 0 ) \ q[i] = 255; \ else \ q[i] = 0; \ } \ } /* Zerox generate function. */ static int zerox_gen( REGION *or, void *seq, void *a, void *b ) { REGION *ir = (REGION *) seq; IMAGE *in = (IMAGE *) a; int flag = GPOINTER_TO_INT( b ); Rect irect; Rect *r = &or->valid; /* Range of pixels we loop over. */ int le = r->left; int to = r->top; int bo = IM_RECT_BOTTOM( r ); int ba = in->Bands; int ne = ba * r->width; int i, y; /* We need to be able to see one pixel to the right. */ irect.top = r->top; irect.left = r->left; irect.width = r->width + 1; irect.height = r->height; if( im_prepare( ir, &irect ) ) return( -1 ); for( y = to; y < bo; y++ ) { VipsPel *p = IM_REGION_ADDR( ir, le, y ); VipsPel *q = IM_REGION_ADDR( or, le, y ); switch( in->BandFmt ) { case IM_BANDFMT_CHAR: LOOP( signed char ); break; case IM_BANDFMT_SHORT: LOOP( signed short ); break; case IM_BANDFMT_INT: LOOP( signed int ); break; case IM_BANDFMT_FLOAT: LOOP( float ); break; case IM_BANDFMT_DOUBLE: LOOP( double ); break; default: g_assert( 0 ); } } return( 0 ); } /** * im_zerox: * @in: input image * @out: output image * @sign: detect positive or negative zero crossings * * im_zerox() detects the positive or negative zero crossings @in, * depending on @sign. If @sign is -1, negative zero crossings are returned, * if @sign is 1, positive zero crossings are returned. * * The output image is byte with zero crossing set to 255 and all other values * set to zero. Input can have any number of channels, and be any non-complex * type. * * See also: im_conv(), im_rot90. * * Returns: 0 on success, -1 on error */ int im_zerox( IMAGE *in, IMAGE *out, int sign ) { IMAGE *t1; if( sign != -1 && sign != 1 ) { im_error( "im_zerox", "%s", _( "flag not -1 or 1" ) ); return( -1 ); } if( in->Xsize < 2 ) { im_error( "im_zerox", "%s", _( "image too narrow" ) ); return( -1 ); } if( !(t1 = im_open_local( out, "im_zerox" , "p" )) || im_piocheck( in, t1 ) || im_check_uncoded( "im_zerox", in ) || im_check_noncomplex( "im_zerox", in ) ) return( -1 ); if( vips_bandfmt_isuint( in->BandFmt ) ) /* Unsigned type, therefore there will be no zero-crossings. */ return( im_black( out, in->Xsize, in->Ysize, in->Bands ) ); /* Force output to be BYTE. Output is narrower than input by 1 pixel. */ if( im_cp_desc( t1, in ) ) return( -1 ); t1->BandFmt = IM_BANDFMT_UCHAR; t1->Xsize -= 1; /* Set hints - THINSTRIP is ok with us. */ if( im_demand_hint( t1, IM_THINSTRIP, NULL ) ) return( -1 ); /* Generate image. */ if( im_generate( t1, im_start_one, zerox_gen, im_stop_one, in, GINT_TO_POINTER( sign ) ) ) return( -1 ); /* Now embed it in a larger image. */ if( im_embed( t1, out, 0, 0, 0, in->Xsize, in->Ysize ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/deprecated/dispatch_types.c0000644000175000017500000004214312303140253016454 00000000000000/* Define built-in VIPS types. * * J. Cupitt, 8/4/93. * * Modified: * 21/5/07 * - any length vector (Tom) * 23/8/10 * - add IM_TYPE_RW flag for im__rw_image */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include /* String containing each of the characters which can be used within a * single command line argument to separate the elements of a vector. */ #define VEC_SEPS " " /* Init function for input displays. Just a stub nowadays. */ static int input_display_init( im_object *obj, char *str ) { *obj = NULL; return( 0 ); } /* Input display type. */ im_type_desc im__input_display = { IM_TYPE_DISPLAY, /* It's a display */ 0, /* No storage needed */ IM_TYPE_ARG, /* It requires a command-line arg */ input_display_init, /* Init function */ NULL /* Destroy function */ }; /* Output display type. */ im_type_desc im__output_display = { IM_TYPE_DISPLAY, /* It's a display */ sizeof( void * ), /* Memory to allocate */ IM_TYPE_OUTPUT, /* Output object */ NULL, /* Init function */ NULL /* Destroy function */ }; /* Init function for input images. */ static int input_image_init( im_object *obj, char *str ) { IMAGE **im = (IMAGE **) obj; return( !(*im = vips__deprecated_open_read( str, FALSE )) ); } /* Input image type. */ im_type_desc im__input_image = { IM_TYPE_IMAGE, /* It's an image */ 0, /* No storage needed */ IM_TYPE_ARG, /* It requires a command-line arg */ (im_init_obj_fn) input_image_init,/* Init function */ (im_dest_obj_fn) im_close /* Destroy function */ }; /* Init function for output images. */ static int output_image_init( im_object *obj, char *str ) { IMAGE **im = (IMAGE **) obj; return( !(*im = vips__deprecated_open_write( str )) ); } /* Output image type. */ im_type_desc im__output_image = { IM_TYPE_IMAGE, /* It's an image */ 0, /* No storage to be allocated */ IM_TYPE_OUTPUT | IM_TYPE_ARG, /* Flags! */ (im_init_obj_fn) output_image_init,/* Init function */ (im_dest_obj_fn) im_close /* Destroy function */ }; /* Init function for RW images. */ static int rw_image_init( im_object *obj, char *str ) { IMAGE **im = (IMAGE **) obj; return( !(*im = im_open( str, "rw" )) ); } /* RW image type. */ im_type_desc im__rw_image = { IM_TYPE_IMAGE, /* It's an image */ 0, /* No storage to be allocated */ IM_TYPE_ARG | IM_TYPE_RW, /* Read-write object, needs an arg */ (im_init_obj_fn) rw_image_init, /* Init function */ (im_dest_obj_fn) im_close /* Destroy function */ }; /* im_imagevec_object destroy function. */ static int imagevec_dest( im_object obj ) { im_imagevec_object *iv = obj; if( iv->vec ) { int i; for( i = 0; i < iv->n; i++ ) if( iv->vec[i] ) { im_close( iv->vec[i] ); iv->vec[i] = NULL; } g_free( iv->vec ); iv->vec = NULL; iv->n = 0; } return( 0 ); } /* Init function for imagevec input. */ static int input_imagevec_init( im_object *obj, char *str ) { im_imagevec_object *iv = *obj; char **strv; int nargs; int i; strv = g_strsplit( str, VEC_SEPS, -1 ); nargs = g_strv_length( strv ); if( !(iv->vec = VIPS_ARRAY( NULL, nargs, IMAGE * )) ) { g_strfreev( strv ); return( -1 ); } iv->n = nargs; /* Must NULL them out in case we fail halfway though opening them all. */ for( i = 0; i < nargs; i++ ) iv->vec[i] = NULL; for( i = 0; i < nargs; i++ ) if( !(iv->vec[i] = im_open( strv[i], "rd" )) ) { g_strfreev( strv ); return( -1 ); } g_strfreev( strv ); return( 0 ); } /* Input image vector type. */ im_type_desc im__input_imagevec = { IM_TYPE_IMAGEVEC, /* It's an array of IMAGE */ sizeof( im_imagevec_object ), /* Memory to allocate in vec build */ IM_TYPE_ARG, /* It requires a command-line arg */ input_imagevec_init, /* Init function */ imagevec_dest /* Destroy function */ }; /* Init function for masks. "str" can be NULL for output masks. */ static int mask_init( im_object *obj, char *str ) { im_mask_object *mo = *obj; /* Install string, clear mask. */ if( str && !(mo->name = im_strdup( NULL, str )) ) return( -1 ); mo->mask = NULL; return( 0 ); } /* Init function for input dmasks. As above, but read in the mask. */ static int dmask_init( im_object *obj, char *str ) { im_mask_object *mo = *obj; if( mask_init( obj, str ) ) return( -1 ); if( !(mo->mask = im_read_dmask( str )) ) return( -1 ); return( 0 ); } /* Init function for input imasks. */ static int imask_init( im_object *obj, char *str ) { im_mask_object *mo = *obj; if( mask_init( obj, str ) ) return( -1 ); if( !(mo->mask = im_read_imask( str )) ) return( -1 ); return( 0 ); } /* DOUBLEMASK destroy function. */ static int dmask_dest( im_object obj ) { im_mask_object *mo = obj; VIPS_FREE( mo->name ); VIPS_FREEF( im_free_dmask, mo->mask ); return( 0 ); } /* INTMASK destroy function. */ static int imask_dest( im_object obj ) { im_mask_object *mo = obj; VIPS_FREE( mo->name ); VIPS_FREEF( im_free_imask, mo->mask ); return( 0 ); } /* As above, but save the mask first. */ static int save_dmask_dest( im_object obj ) { im_mask_object *mo = obj; if( mo->mask && im_write_dmask( mo->mask ) ) return( -1 ); return( dmask_dest( obj ) ); } /* As above, but save the mask first. */ static int save_imask_dest( im_object obj ) { im_mask_object *mo = obj; if( mo->mask && im_write_imask( mo->mask ) ) return( -1 ); return( imask_dest( obj ) ); } /* Output dmask type. */ im_type_desc im__output_dmask = { IM_TYPE_DMASK, /* It's a mask */ sizeof( im_mask_object ), /* Storage for mask object */ IM_TYPE_OUTPUT | IM_TYPE_ARG, /* Flags */ mask_init, /* Init function */ save_dmask_dest /* Save and destroy function */ }; /* Input dmask type. */ im_type_desc im__input_dmask = { IM_TYPE_DMASK, /* It's a mask */ sizeof( im_mask_object ), /* Storage for mask object */ IM_TYPE_ARG, /* It requires a command-line arg */ dmask_init, /* Init function */ dmask_dest /* Destroy function */ }; /* Output imask type. */ im_type_desc im__output_imask = { IM_TYPE_IMASK, /* It's a mask */ sizeof( im_mask_object ), /* Storage for mask object */ IM_TYPE_OUTPUT | IM_TYPE_ARG, /* Flags */ mask_init, /* Init function */ save_imask_dest /* Save and destroy function */ }; /* Input imask type. */ im_type_desc im__input_imask = { IM_TYPE_IMASK, /* It's a mask */ sizeof( im_mask_object ), /* Storage for mask object */ IM_TYPE_ARG, /* It requires a command-line arg */ imask_init, /* Init function */ imask_dest /* Destroy function */ }; /* Output dmask to screen type. Set a `print' function to get actual output. * Used for things like "stats". */ im_type_desc im__output_dmask_screen = { IM_TYPE_DMASK, /* It's a mask */ sizeof( im_mask_object ), /* Storage for mask object */ IM_TYPE_OUTPUT, /* It's an output argument */ mask_init, /* Init function */ dmask_dest /* Destroy function */ }; /* Init function for double input. */ static int input_double_init( im_object *obj, char *str ) { double *d = (double *) *obj; *d = g_ascii_strtod( str, NULL ); return( 0 ); } /* Input double type. */ im_type_desc im__input_double = { IM_TYPE_DOUBLE, /* It's a double */ sizeof( double ), /* Memory to allocate */ IM_TYPE_ARG, /* It requires a command-line arg */ input_double_init, /* Init function */ NULL /* Destroy function */ }; /* im_doublevec_object destroy function. */ static int doublevec_dest( im_object obj ) { im_doublevec_object *dv = obj; if( dv->vec ) { g_free( dv->vec ); dv->vec = NULL; dv->n = 0; } return( 0 ); } /* Init function for doublevec input. */ static int input_doublevec_init( im_object *obj, char *str ) { im_doublevec_object *dv = *obj; char **strv; int nargs; int i; strv = g_strsplit( str, VEC_SEPS, -1 ); nargs = g_strv_length( strv ); if( !(dv->vec = VIPS_ARRAY( NULL, nargs, double )) ) { g_strfreev( strv ); return( -1 ); } dv->n = nargs; for( i = 0; i < nargs; i++ ) { dv->vec[i] = g_ascii_strtod( strv[i], NULL ); if( errno ) { vips_error_system( errno, "input_doublevec_init", _( "bad double \"%s\"" ), strv[i] ); g_strfreev( strv ); return( -1 ); } } g_strfreev( strv ); return( 0 ); } /* Input double vector type. */ im_type_desc im__input_doublevec = { IM_TYPE_DOUBLEVEC, /* It's an array of double */ sizeof( im_doublevec_object ), /* Memory to allocate in vec build */ IM_TYPE_ARG, /* It requires a command-line arg */ input_doublevec_init, /* Init function */ doublevec_dest /* Destroy function */ }; /* Print function for doublevec output. */ int im__dvprint( im_object obj ) { im_doublevec_object *dv = obj; int i; for( i = 0; i < dv->n; i++ ) printf( "%G ", dv->vec[i] ); printf( "\n" ); return( 0 ); } /* Output double vector type. */ im_type_desc im__output_doublevec = { IM_TYPE_DOUBLEVEC, /* It's an array of double */ sizeof( im_doublevec_object ), /* Memory to allocate in vec build */ IM_TYPE_OUTPUT, /* Output type */ NULL, /* Init function */ doublevec_dest /* Destroy function */ }; /* im_intvec_object destroy function. */ static int intvec_dest( im_object obj ) { im_intvec_object *iv = obj; if( iv->vec ) { g_free( iv->vec ); iv->vec = NULL; iv->n = 0; } return( 0 ); } /* Init function for intvec input. */ static int input_intvec_init( im_object *obj, char *str ) { im_intvec_object *iv = *obj; char **strv; int nargs; int i; strv = g_strsplit( str, VEC_SEPS, -1 ); nargs = g_strv_length( strv ); if( !(iv->vec = VIPS_ARRAY( NULL, nargs, int )) ) { g_strfreev( strv ); return( -1 ); } iv->n = nargs; for( i = 0; i < nargs; i++ ) { long int val= strtol( strv[i], NULL, 10 ); if( errno ) { vips_error_system( errno, "input_intvec_init", _( "bad integer \"%s\"" ), strv[i] ); g_strfreev( strv ); return( -1 ); } if( INT_MAX < val || INT_MIN > val ) { vips_error( "input_intvec_init", "%ld overflows integer type", val ); } iv->vec[i] = (int) val; } g_strfreev( strv ); return( 0 ); } /* Input int vector type. */ im_type_desc im__input_intvec = { IM_TYPE_INTVEC, /* It's an array of int */ sizeof( im_intvec_object ), /* Memory to allocate in vec build */ IM_TYPE_ARG, /* It requires a command-line arg */ input_intvec_init, /* Init function */ intvec_dest /* Destroy function */ }; /* Print function for intvec output. */ int im__ivprint( im_object obj ) { im_intvec_object *iv = obj; int i; for( i = 0; i < iv->n; i++ ) printf( "%d ", iv->vec[i] ); printf( "\n" ); return( 0 ); } /* Output int vector type. */ im_type_desc im__output_intvec = { IM_TYPE_INTVEC, /* It's an array of int */ sizeof( im_intvec_object ), /* Memory to allocate in vec build */ IM_TYPE_OUTPUT, /* Output arg */ (im_init_obj_fn)NULL, /* Init function */ (im_dest_obj_fn)intvec_dest /* Destroy function */ }; /* Init function for int input. */ static int input_int_init( im_object *obj, char *str ) { int *i = (int *) *obj; if( sscanf( str, "%d", i ) != 1 ) { vips_error( "input_int", "%s", _( "bad format" ) ); return( -1 ); } return( 0 ); } /* Input int type. */ im_type_desc im__input_int = { IM_TYPE_INT, /* It's an int */ sizeof( int ), /* Memory to allocate */ IM_TYPE_ARG, /* It requires a command-line arg */ input_int_init, /* Init function */ NULL /* Destroy function */ }; /* Init function for string input. */ static int input_string_init( im_object *obj, char *str ) { if( !(*obj = (im_object) im_strdup( NULL, str )) ) return( -1 ); return( 0 ); } /* Input string type. */ im_type_desc im__input_string = { IM_TYPE_STRING, /* It's a string */ 0, /* Memory to allocate */ IM_TYPE_ARG, /* It requires a command-line arg */ input_string_init, /* Init function */ vips_free /* Destroy function */ }; /* Output string type. */ im_type_desc im__output_string = { IM_TYPE_STRING, /* It's a string */ 0, /* Memory to allocate */ IM_TYPE_OUTPUT, /* It's an output argument */ NULL, /* Init function */ vips_free /* Destroy function */ }; /* Output double type. */ im_type_desc im__output_double = { IM_TYPE_DOUBLE, /* It's a double */ sizeof( double ), /* Memory to allocate */ IM_TYPE_OUTPUT, /* It's an output argument */ NULL, /* Init function */ NULL /* Destroy function */ }; /* Output complex type. */ im_type_desc im__output_complex = { IM_TYPE_COMPLEX, /* It's a complex */ 2 * sizeof( double ), /* Memory to allocate */ IM_TYPE_OUTPUT, /* It's an output argument */ NULL, /* Init function */ NULL /* Destroy function */ }; /* Output int type. */ im_type_desc im__output_int = { IM_TYPE_INT, /* It's an int */ sizeof( int ), /* Memory to allocate */ IM_TYPE_OUTPUT, /* It's an output argument */ NULL, /* Init function */ NULL /* Destroy function */ }; /* Print function for int output. */ int im__iprint( im_object obj ) { int *i = (int *) obj; printf( "%d\n", *i ); return( 0 ); } /* Print function for string output. */ int im__sprint( im_object obj ) { char *s = (char *) obj; printf( "%s\n", s ); return( 0 ); } /* Print function for double output. */ int im__dprint( im_object obj ) { double *d = (double *) obj; printf( "%G\n", *d ); return( 0 ); } /* Print function for complex output. */ int im__cprint( im_object obj ) { double *d = (double *) obj; printf( "%G %G\n", d[0], d[1] ); return( 0 ); } /* Statistics to stdout. */ int im__dmsprint( im_object obj ) { DOUBLEMASK *mask = ((im_mask_object *) obj)->mask; double *row; int i, j; /* Print statistics band stats eg: 2 bands:b 0,1 */ printf( "band minimum maximum sum " "sum^2 mean deviation\n" ); for( j = 0; j < mask->ysize; j++ ) { row = mask->coeff + j * mask->xsize; if( j == 0 ) printf( "all" ); else printf( "%2d ", j ); for( i = 0; i < 6; i++ ) printf( "%12g", row[i] ); printf( "\n" ); } return( 0 ); } /* GValue */ /* Init function for input gvalue. Just make a string ... will get cast to * whatever later. */ static int input_gvalue_init( im_object *obj, char *str ) { GValue *value = *obj; g_value_init( value, G_TYPE_STRING ); g_value_set_string( value, str ); return( 0 ); } static int gvalue_free( im_object obj ) { GValue *value = obj; /* If it's just zeros (built but not used) we'll get an error if we * unset(). */ if( G_IS_VALUE( value ) ) g_value_unset( value ); return( 0 ); } /* Input GValue type. */ im_type_desc im__input_gvalue = { IM_TYPE_GVALUE, sizeof( GValue ), /* Need some storage */ IM_TYPE_ARG, /* It requires a command-line arg */ (im_init_obj_fn) input_gvalue_init, /* Init function */ (im_dest_obj_fn) gvalue_free /* Destroy function */ }; int im__gprint( im_object obj ) { GValue *value = obj; char *str_value; str_value = g_strdup_value_contents( value ); printf( "%s\n", str_value ); g_free( str_value ); return( 0 ); } /* Init function for output gvalue. Just init to zero. */ static int output_gvalue_init( im_object *obj ) { GValue *value = *obj; memset( value, 0, sizeof( GValue ) ); return( 0 ); } im_type_desc im__output_gvalue = { IM_TYPE_GVALUE, sizeof( GValue ), /* Need some storage */ IM_TYPE_OUTPUT, /* No arg needed (just print) */ (im_init_obj_fn) output_gvalue_init, /* Init function */ (im_dest_obj_fn) gvalue_free /* Destroy function */ }; /* Init function for input interpolate. * * This is used as a helper function by the C++ interface, so amke it public. */ int vips__input_interpolate_init( im_object *obj, char *str ) { GType type = g_type_from_name( "VipsInterpolate" ); VipsObjectClass *class = VIPS_OBJECT_CLASS( g_type_class_ref( type ) ); VipsObject *object; g_assert( class ); if( !(object = vips_object_new_from_string( class, str )) ) return( -1 ); if( vips_object_build( object ) ) { g_object_unref( object ); return( -1 ); } *obj = object; return( 0 ); } static int input_interpolate_dest( im_object obj ) { g_object_unref( (GObject *) obj ); return( 0 ); } im_type_desc im__input_interpolate = { IM_TYPE_INTERPOLATE, 0, /* No storage required */ IM_TYPE_ARG, /* It requires a command-line arg */ vips__input_interpolate_init, /* Init function */ input_interpolate_dest /* Destroy function */ }; vips-7.38.5/libvips/deprecated/im_mask2vips.c0000644000175000017500000000463312303140253016037 00000000000000/* im_mask2vips * * Author: J.Cupitt * Written on: 6/6/94 * Modified on: * 7/10/94 JC * - new IM_ARRAY() * 1/2/10 * - gtkdoc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /** * im_mask2vips: * @in: input mask * @out: output image * * Write a one-band, %IM_BANDFMT_DOUBLE image to @out based on mask @in. * * See also: im_vips2mask(). * * Returns: 0 on success, -1 on error */ int im_mask2vips( DOUBLEMASK *in, IMAGE *out ) { int x, y; double *buf, *p, *q; /* Check the mask. */ if( !in || !in->coeff ) { im_error( "im_mask2vips", "%s", _( "bad input mask" ) ); return( -1 ); } /* Make the output image. */ im_initdesc( out, in->xsize, in->ysize, 1, IM_BBITS_DOUBLE, IM_BANDFMT_DOUBLE, IM_CODING_NONE, IM_TYPE_B_W, 1.0, 1.0, 0, 0 ); if( im_setupout( out ) ) return( -1 ); /* Make an output buffer. */ if( !(buf = IM_ARRAY( out, in->xsize, double )) ) return( -1 ); /* Write! */ for( p = in->coeff, y = 0; y < out->Ysize; y++ ) { q = buf; for( x = 0; x < out->Xsize; x++ ) *q++ = *p++; if( im_writeline( y, out, (void *) buf ) ) return( -1 ); } vips_image_set_double( out, "scale", in->scale ); vips_image_set_double( out, "offset", in->offset ); return( 0 ); } int im_imask2vips( INTMASK *in, IMAGE *out ) { DOUBLEMASK *d; int result; if( !(d = im_imask2dmask( in, in->filename )) ) return( -1 ); result = im_mask2vips( d, out ); im_free_dmask( d ); return( result ); } vips-7.38.5/libvips/deprecated/im_matinv.c0000644000175000017500000003056312303140253015417 00000000000000/* solve and invert matrices * * Author: Tom Vajzovic * Copyright: 2006, Tom Vajzovic * Written on: 2006-09-08 * * undated: * - page 43-45 of numerical recipes in C 1998 * * 2006-09-08 tcv: * - complete rewrite; algorithm unchanged * * 22/10/10 * - gtkdoc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /** HEADERS **/ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include /** CONSTANTS **/ #define TOO_SMALL ( 2.0 * DBL_MIN ) /* DBL_MIN is smallest *normalized* double precision float */ /** MACROS **/ #define MATRIX( mask, i, j ) ( (mask)-> coeff[ (j) + (i) * (mask)-> xsize ] ) /* use DOUBLEMASK or INTMASK as matrix type */ /** LOCAL FUNCTION DECLARATIONS **/ static int mat_inv_lu( DOUBLEMASK *inv, const DOUBLEMASK *lu ); static int mat_inv_direct( DOUBLEMASK *inv, const DOUBLEMASK *mat, const char *function_name ); /** EXPORTED FUNCTION DEFINITIONS **/ /** * im_lu_decomp: * @mat: matrix to decompose * @filename: name for output matrix * * This function takes any square NxN #DOUBLEMASK. * It returns a #DOUBLEMASK which is (N+1)xN. * * It calculates the PLU decomposition, storing the upper and diagonal parts * of U, together with the lower parts of L, as an NxN matrix in the first * N rows of the new matrix. The diagonal parts of L are all set to unity * and are not stored. * * The final row of the new #DOUBLEMASK has only integer entries, which * represent the row-wise permutations made by the permuatation matrix P. * * The scale and offset members of the input #DOUBLEMASK are ignored. * * See: * * PRESS, W. et al, 1992. Numerical Recipies in C; The Art of Scientific * Computing, 2nd ed. Cambridge: Cambridge University Press, pp. 43-50. * * See also: im_mattrn(), im_matinv(). * * Returns: the decomposed matrix on success, or NULL on error. */ DOUBLEMASK * im_lu_decomp( const DOUBLEMASK *mat, const char *name ){ #define FUNCTION_NAME "im_lu_decomp" int i, j, k; double *row_scale; DOUBLEMASK *lu; if( mat-> xsize != mat-> ysize ){ im_error( FUNCTION_NAME, "non-square matrix" ); return NULL; } #define N ( mat -> xsize ) lu= im_create_dmask( name, N, N + 1 ); row_scale= IM_ARRAY( NULL, N, double ); if( ! row_scale || ! lu ){ im_free_dmask( lu ); im_free( row_scale ); return NULL; } /* copy all coefficients and then perform decomposition in-place */ memcpy( lu-> coeff, mat-> coeff, N * N * sizeof( double ) ); #define LU( i, j ) MATRIX( lu, (i), (j) ) #define perm ( lu-> coeff + N * N ) for( i= 0; i < N; ++i ){ row_scale[ i ]= 0.0; for( j= 0; j < N; ++j ){ double abs_val= fabs( LU( i, j ) ); /* find largest in each ROW */ if( abs_val > row_scale[ i ] ) row_scale[ i ]= abs_val; } if( ! row_scale[ i ] ){ im_error( FUNCTION_NAME, "singular matrix" ); im_free_dmask( lu ); im_free( row_scale ); return NULL; } /* fill array with scaling factors for each ROW */ row_scale[ i ]= 1.0 / row_scale[ i ]; } for( j= 0; j < N; ++j ){ /* loop over COLs */ double max= -1.0; int i_of_max; /* not needed, but stops a compiler warning */ i_of_max= 0; /* loop over ROWS in upper-half, except diagonal */ for( i= 0; i < j; ++i ) for( k= 0; k < i; ++k ) LU( i, j )-= LU( i, k ) * LU( k, j ); /* loop over ROWS in diagonal and lower-half */ for( i= j; i < N; ++i ){ double abs_val; for( k= 0; k < j; ++k ) LU( i, j )-= LU( i, k ) * LU( k, j ); /* find largest element in each COLUMN scaled so that */ /* largest in each ROW is 1.0 */ abs_val= row_scale[ i ] * fabs( LU( i, j ) ); if( abs_val > max ){ max= abs_val; i_of_max= i; } } if( fabs( LU( i_of_max, j ) ) < TOO_SMALL ){ /* divisor is near zero */ im_error( FUNCTION_NAME, "singular or near-singular matrix" ); im_free_dmask( lu ); im_free( row_scale ); return NULL; } if( i_of_max != j ){ /* swap ROWS */ for( k= 0; k < N; ++k ){ double temp= LU( j, k ); LU( j, k )= LU( i_of_max, k ); LU( i_of_max, k )= temp; } row_scale[ i_of_max ]= row_scale[ j ]; /* no need to copy this scale back up - we won't use it */ } /* record permutation */ perm[ j ]= i_of_max; /* divide by best (largest scaled) pivot found */ for( i= j + 1; i < N; ++i ) LU( i, j )/= LU( j, j ); } im_free( row_scale ); return lu; #undef N #undef LU #undef perm #undef FUNCTION_NAME } /** * im_lu_solve: * @lu: matrix to solve * @vec: name for output matrix * * Solve the system of linear equations Ax=b, where matrix A has already * been decomposed into LU form in DOUBLEMASK *lu. Input vector b is in * vec and is overwritten with vector x. * * See: * * PRESS, W. et al, 1992. Numerical Recipies in C; The Art of Scientific * Computing, 2nd ed. Cambridge: Cambridge University Press, pp. 43-50. * * See also: im_mattrn(), im_matinv(). * * Returns: the decomposed matrix on success, or NULL on error. */ int im_lu_solve( const DOUBLEMASK *lu, double *vec ){ #define FUNCTION_NAME "im_lu_solve" int i, j; if( lu-> xsize + 1 != lu-> ysize ){ im_error( FUNCTION_NAME, "not an LU decomposed matrix" ); return -1; } #define N ( lu -> xsize ) #define LU( i, j ) MATRIX( lu, (i), (j) ) #define perm ( lu-> coeff + N * N ) for( i= 0; i < N; ++i ){ int i_perm= perm[ i ]; if( i_perm != i ){ double temp= vec[ i ]; vec[ i ]= vec[ i_perm ]; vec[ i_perm ]= temp; } for( j= 0; j < i; ++j ) vec[ i ]-= LU( i, j ) * vec [ j ]; } for( i= N - 1; i >= 0; --i ){ for( j= i + 1; j < N; ++j ) vec[ i ]-= LU( i, j ) * vec [ j ]; vec[ i ]/= LU( i, i ); } return 0; #undef LU #undef perm #undef N #undef FUNCTION_NAME } /** * im_matinv: * @mat: matrix to invert * @filename: name for output matrix * * Allocate, and return a pointer to, a DOUBLEMASK representing the * inverse of the matrix represented in @mat. Give it the filename * member @filename. Returns NULL on error. Scale and offset are ignored. * * See also: im_mattrn(). * * Returns: the inverted matrix on success, or %NULL on error. */ DOUBLEMASK * im_matinv( const DOUBLEMASK *mat, const char *filename ){ #define FUNCTION_NAME "im_matinv" DOUBLEMASK *inv; if( mat-> xsize != mat-> ysize ){ im_error( FUNCTION_NAME, "non-square matrix" ); return NULL; } #define N ( mat -> xsize ) inv= im_create_dmask( filename, N, N ); if( ! inv ) return NULL; if( N < 4 ){ if( mat_inv_direct( inv, (const DOUBLEMASK *) mat, FUNCTION_NAME ) ){ im_free_dmask( inv ); return NULL; } return inv; } else { DOUBLEMASK *lu= im_lu_decomp( mat, "temp" ); if( ! lu || mat_inv_lu( inv, (const DOUBLEMASK*) lu ) ){ im_free_dmask( lu ); im_free_dmask( inv ); return NULL; } im_free_dmask( lu ); return inv; } #undef N #undef FUNCTION_NAME } /** * im_matinv_inplace: * @mat: matrix to invert * * Invert the matrix represented by the DOUBLEMASK @mat, and store * it in the place of @mat. Scale and offset * are ignored. * * See also: im_mattrn(). * * Returns: 0 on success, or -1 on error. */ int im_matinv_inplace( DOUBLEMASK *mat ){ #define FUNCTION_NAME "im_matinv_inplace" int to_return= 0; if( mat-> xsize != mat-> ysize ){ im_error( FUNCTION_NAME, "non-square matrix" ); return -1; } #define N ( mat -> xsize ) if( N < 4 ){ DOUBLEMASK *dup= im_dup_dmask( mat, "temp" ); if( ! dup ) return -1; to_return= mat_inv_direct( mat, (const DOUBLEMASK*) dup, FUNCTION_NAME ); im_free_dmask( dup ); return to_return; } { DOUBLEMASK *lu; lu= im_lu_decomp( mat, "temp" ); if( ! lu || mat_inv_lu( mat, (const DOUBLEMASK*) lu ) ) to_return= -1; im_free_dmask( lu ); return to_return; } #undef N #undef FUNCTION_NAME } /* Invert a square size x size matrix stored in matrix[][] * result is returned in the same matrix */ int im_invmat( double **matrix, int size ){ DOUBLEMASK *mat= im_create_dmask( "temp", size, size ); int i; int to_return= 0; for( i= 0; i < size; ++i ) memcpy( mat-> coeff + i * size, matrix[ i ], size * sizeof( double ) ); to_return= im_matinv_inplace( mat ); if( ! to_return ) for( i= 0; i < size; ++i ) memcpy( matrix[ i ], mat-> coeff + i * size, size * sizeof( double ) ); im_free_dmask( mat ); return to_return; } /** LOCAL FUNCTION DEFINITIONS **/ static int mat_inv_lu( DOUBLEMASK *inv, const DOUBLEMASK *lu ){ #define N ( lu-> xsize ) #define INV( i, j ) MATRIX( inv, (i), (j) ) int i, j; double *vec= IM_ARRAY( NULL, N, double ); if( ! vec ) return -1; for( j= 0; j < N; ++j ){ for( i= 0; i < N; ++i ) vec[ i ]= 0.0; vec[ j ]= 1.0; im_lu_solve( lu, vec ); for( i= 0; i < N; ++i ) INV( i, j )= vec[ i ]; } im_free( vec ); inv-> scale= 1.0; inv-> offset= 0.0; return 0; #undef N #undef INV } static int mat_inv_direct( DOUBLEMASK *inv, const DOUBLEMASK *mat, const char *function_name ){ #define N ( mat -> xsize ) #define MAT( i, j ) MATRIX( mat, (i), (j) ) #define INV( i, j ) MATRIX( inv, (i), (j) ) inv-> scale= 1.0; inv-> offset= 0.0; switch( N ){ case 1: { if( fabs( MAT( 0, 0 ) ) < TOO_SMALL ){ im_error( function_name, "singular or near-singular matrix" ); return -1; } INV( 0, 0 )= 1.0 / MAT( 0, 0 ); return 0; } case 2: { double det= MAT( 0, 0 ) * MAT( 1, 1 ) - MAT( 0, 1 ) * MAT( 1, 0 ); if( fabs( det ) < TOO_SMALL ){ im_error( function_name, "singular or near-singular matrix" ); return -1; } INV( 0, 0 )= MAT( 1, 1 ) / det; INV( 0, 1 )= -MAT( 0, 1 ) / det; INV( 1, 0 )= -MAT( 1, 0 ) / det; INV( 1, 1 )= MAT( 0, 0 ) / det; return 0; } case 3: { double det= MAT( 0, 0 ) * ( MAT( 1, 1 ) * MAT( 2, 2 ) - MAT( 1, 2 ) * MAT( 2, 1 ) ) - MAT( 0, 1 ) * ( MAT( 1, 0 ) * MAT( 2, 2 ) - MAT( 1, 2 ) * MAT( 2, 0 ) ) + MAT( 0, 2 ) * ( MAT( 1, 0 ) * MAT( 2, 1 ) - MAT( 1, 1 ) * MAT( 2, 0 ) ); if( fabs( det ) < TOO_SMALL ){ im_error( function_name, "singular or near-singular matrix" ); return -1; } INV( 0, 0 )= ( MAT( 1, 1 ) * MAT( 2, 2 ) - MAT( 1, 2 ) * MAT( 2, 1 ) ) / det; INV( 0, 1 )= ( MAT( 0, 2 ) * MAT( 2, 1 ) - MAT( 0, 1 ) * MAT( 2, 2 ) ) / det; INV( 0, 2 )= ( MAT( 0, 1 ) * MAT( 1, 2 ) - MAT( 0, 2 ) * MAT( 1, 1 ) ) / det; INV( 1, 0 )= ( MAT( 1, 2 ) * MAT( 2, 0 ) - MAT( 1, 0 ) * MAT( 2, 2 ) ) / det; INV( 1, 1 )= ( MAT( 0, 0 ) * MAT( 2, 2 ) - MAT( 0, 2 ) * MAT( 2, 0 ) ) / det; INV( 1, 2 )= ( MAT( 0, 2 ) * MAT( 1, 0 ) - MAT( 0, 0 ) * MAT( 1, 2 ) ) / det; INV( 2, 0 )= ( MAT( 1, 0 ) * MAT( 2, 1 ) - MAT( 1, 1 ) * MAT( 2, 0 ) ) / det; INV( 2, 1 )= ( MAT( 0, 1 ) * MAT( 2, 0 ) - MAT( 0, 0 ) * MAT( 2, 1 ) ) / det; INV( 2, 2 )= ( MAT( 0, 0 ) * MAT( 1, 1 ) - MAT( 0, 1 ) * MAT( 1, 0 ) ) / det; return 0; } default: return -1; } #undef N #undef MAT #undef INV } vips-7.38.5/libvips/deprecated/im_mattrn.c0000644000175000017500000000347112303140253015424 00000000000000/* matrix transpose * * Copyright: 1990, K. Martinez and J. Cupitt * */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * im_mattrn: * @in: input matrix * @filename: name for output matrix * * Transposes the input matrix. * Pass the filename to set for the output. * * See also: im_matmul(), im_matinv(). * * Returns: the result matrix on success, or %NULL on error. */ DOUBLEMASK * im_mattrn( DOUBLEMASK *in, const char *name ) { int xc, yc; DOUBLEMASK *mat; double *out, *a, *b; /* Allocate output matrix. */ if( !(mat = im_create_dmask( name, in->ysize, in->xsize )) ) return( NULL ); mat->scale = in->scale; mat->offset = in->offset; /* Transpose. */ out = mat->coeff; a = in->coeff; for( yc = 0; yc < mat->ysize; yc++ ) { b = a; for( xc = 0; xc < mat->xsize; xc++ ) { *out++ = *b; b += in->xsize; } a++; } return( mat ); } vips-7.38.5/libvips/deprecated/wrapvips7.c0000644000175000017500000005031112303141142015365 00000000000000/* wrap a vips7 operation as a vips8 class * * 12/7/11 * - quick hack */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* TODO: - masks would be hard, vips8 won't really have these - keep for testing, mostly ... iofuncs/init.c has a commeted-out call to init this thing */ /* #define DEBUG #define VIPS_DEBUG #define DEBUG_REF */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #define VIPS_WRAP7_PREFIX "VipsWrap7_" static GHashTable *vips_wrap7_subclass_types = NULL; /* VipsWrap7 is an abstract type ... subclass for each operation we wrap with * no extra members. */ typedef struct _VipsWrap7 { VipsOperation parent_object; /* vips7 dispatch spine we build. */ im_object *vargv; /* Set if we get an error during construct. */ gboolean error; } VipsWrap7; typedef struct _VipsWrap7Class { VipsOperationClass parent_class; /* Look this up from the class name. */ im_function *fn; /* Set if we can't wrap this im_function for some reason. */ gboolean not_supported; } VipsWrap7Class; #define VIPS_TYPE_WRAP7 (vips_wrap7_get_type()) #define VIPS_WRAP7( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), VIPS_TYPE_WRAP7, VipsWrap7 )) #define VIPS_WRAP7_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), VIPS_TYPE_WRAP7, VipsWrap7Class)) #define VIPS_IS_WRAP7( obj ) \ (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_WRAP7 )) #define VIPS_IS_WRAP7_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_WRAP7 )) #define VIPS_WRAP7_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), VIPS_TYPE_WRAP7, VipsWrap7Class )) typedef enum { VIPS_WRAP7_NONE = -1, VIPS_WRAP7_DOUBLE = 0, VIPS_WRAP7_INT, VIPS_WRAP7_COMPLEX, VIPS_WRAP7_STRING, VIPS_WRAP7_IMAGE, VIPS_WRAP7_DOUBLEVEC, VIPS_WRAP7_DMASK, VIPS_WRAP7_IMASK, VIPS_WRAP7_IMAGEVEC, VIPS_WRAP7_INTVEC, VIPS_WRAP7_GVALUE, VIPS_WRAP7_INTERPOLATE } VipsWrap7Type; /* Order must match VipsWrap7Type enums. */ static char *vips_wrap7_supported[] = { IM_TYPE_DOUBLE, IM_TYPE_INT, IM_TYPE_COMPLEX, IM_TYPE_STRING, IM_TYPE_IMAGE, IM_TYPE_DOUBLEVEC, IM_TYPE_DMASK, IM_TYPE_IMASK, IM_TYPE_IMAGEVEC, IM_TYPE_INTVEC, IM_TYPE_GVALUE, IM_TYPE_INTERPOLATE }; /* Turn a vips7 type name to an enum. */ static VipsWrap7Type vips_wrap7_lookup_type( im_arg_type type ) { int i; for( i = 0; i < VIPS_NUMBER( vips_wrap7_supported ); i++ ) if( strcmp( type, vips_wrap7_supported[i] ) == 0 ) return( (VipsWrap7Type) i ); return( VIPS_WRAP7_NONE ); } G_DEFINE_ABSTRACT_TYPE( VipsWrap7, vips_wrap7, VIPS_TYPE_OPERATION ); /* Drop any refs vargv may hold. */ static void vips_wrap7_vargv_dispose( im_function *fn, im_object *vargv ) { int i; for( i = 0; i < fn->argc; i++ ) { im_arg_desc *arg = &fn->argv[i]; im_type_desc *type = arg->desc; im_arg_type vt = type->type; switch( vips_wrap7_lookup_type( vt ) ) { case VIPS_WRAP7_NONE: /* IM_TYPE_DISPLAY */ case VIPS_WRAP7_DOUBLE: case VIPS_WRAP7_INT: case VIPS_WRAP7_COMPLEX: case VIPS_WRAP7_DOUBLEVEC: case VIPS_WRAP7_INTVEC: case VIPS_WRAP7_DMASK: case VIPS_WRAP7_IMASK: /* Do nothing. */ break; case VIPS_WRAP7_INTERPOLATE: case VIPS_WRAP7_IMAGE: if( vargv[i] ) VIPS_UNREF( vargv[i] ); break; case VIPS_WRAP7_IMAGEVEC: { im_imagevec_object *iv = vargv[i]; int j; for( j = 0; j < iv->n; j++ ) if( iv->vec[j] ) VIPS_UNREF( iv->vec[j] ); } break; case VIPS_WRAP7_GVALUE: g_value_unset( vargv[i] ); break; default: g_assert( FALSE ); } } } static void vips_wrap7_dispose( GObject *gobject ) { VipsWrap7 *wrap7 = VIPS_WRAP7( gobject ); VipsWrap7Class *class = VIPS_WRAP7_GET_CLASS( wrap7 ); #ifdef DEBUG printf( "vips_wrap7_dispose: " ); vips_object_print_name( VIPS_OBJECT( wrap7 ) ); printf( "\n" ); #endif /*DEBUG*/ vips_wrap7_vargv_dispose( class->fn, wrap7->vargv ); G_OBJECT_CLASS( vips_wrap7_parent_class )->dispose( gobject ); } /* Junk stuff we may have attached to vargv. */ static void vips_wrap7_vargv_finalize( im_function *fn, im_object *vargv ) { int i; for( i = 0; i < fn->argc; i++ ) { im_arg_desc *arg = &fn->argv[i]; im_type_desc *type = arg->desc; im_arg_type vt = type->type; switch( vips_wrap7_lookup_type( vt ) ) { case VIPS_WRAP7_NONE: /* IM_TYPE_DISPLAY */ case VIPS_WRAP7_DOUBLE: case VIPS_WRAP7_INT: case VIPS_WRAP7_COMPLEX: case VIPS_WRAP7_GVALUE: case VIPS_WRAP7_INTERPOLATE: case VIPS_WRAP7_IMAGE: /* Do nothing. */ break; case VIPS_WRAP7_STRING: VIPS_FREE( vargv[i] ); break; case VIPS_WRAP7_IMAGEVEC: VIPS_FREE( ((im_imagevec_object *) vargv[i])->vec ); break; case VIPS_WRAP7_DOUBLEVEC: VIPS_FREE( ((im_doublevec_object *) vargv[i])->vec ); break; case VIPS_WRAP7_INTVEC: VIPS_FREE( ((im_intvec_object *) vargv[i])->vec ); break; case VIPS_WRAP7_DMASK: VIPS_FREE( ((im_mask_object *) vargv[i])->name ); VIPS_FREEF( im_free_dmask, ((im_mask_object *) vargv[i])->mask ); break; case VIPS_WRAP7_IMASK: VIPS_FREE( ((im_mask_object *) vargv[i])->name ); VIPS_FREEF( im_free_imask, ((im_mask_object *) vargv[i])->mask ); break; default: g_assert( FALSE ); } } } static void vips_wrap7_finalize( GObject *gobject ) { VipsWrap7 *wrap7 = VIPS_WRAP7( gobject ); VipsWrap7Class *class = VIPS_WRAP7_GET_CLASS( wrap7 ); #ifdef DEBUG printf( "vips_wrap7_finalize: " ); vips_object_print_name( VIPS_OBJECT( wrap7 ) ); printf( "\n" ); #endif /*DEBUG*/ if( wrap7->vargv ) { vips_wrap7_vargv_finalize( class->fn, wrap7->vargv ); im_free_vargv( class->fn, wrap7->vargv ); VIPS_FREE( wrap7->vargv ); } G_OBJECT_CLASS( vips_wrap7_parent_class )->finalize( gobject ); } /* Like the one in object.c, but write to vargv instead. Use offset to record * the index in vargv we set. */ static void vips_wrap7_object_set_property( GObject *gobject, guint property_id, const GValue *value, GParamSpec *pspec ) { VipsObject *object = VIPS_OBJECT( gobject ); VipsObjectClass *oclass = VIPS_OBJECT_GET_CLASS( gobject ); VipsArgumentClass *argument_class = (VipsArgumentClass *) vips__argument_table_lookup( oclass->argument_table, pspec ); VipsArgumentInstance *argument_instance = vips__argument_get_instance( argument_class, object ); VipsWrap7 *wrap7 = VIPS_WRAP7( gobject ); VipsWrap7Class *class = VIPS_WRAP7_GET_CLASS( wrap7 ); int i; im_arg_desc *arg; im_type_desc *type; im_arg_type vt; g_assert( argument_instance ); if( !argument_class ) { G_OBJECT_WARN_INVALID_PROPERTY_ID( gobject, property_id, pspec ); return; } i = argument_class->offset; arg = &class->fn->argv[i]; type = arg->desc; vt = type->type; #ifdef DEBUG { char *str_value; str_value = g_strdup_value_contents( value ); printf( "vips_object_set_property: " ); vips_object_print_name( object ); printf( ".%s = %s\n", g_param_spec_get_name( pspec ), str_value ); g_free( str_value ); } #endif /*DEBUG*/ g_assert( ((VipsArgument *) argument_class)->pspec == pspec ); g_assert( ((VipsArgument *) argument_instance)->pspec == pspec ); /* If this is a construct-only argument, we can only set before we've * built. */ if( argument_class->flags & VIPS_ARGUMENT_CONSTRUCT && object->constructed && !vips_value_is_null( pspec, value ) ) { g_warning( "%s: %s can't assign '%s' after construct", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_param_spec_get_name( pspec ) ); return; } /* If this is a set-once argument, check we've not set it before. */ if( argument_class->flags & VIPS_ARGUMENT_SET_ONCE && argument_instance->assigned && !vips_value_is_null( pspec, value ) ) { g_warning( "%s: %s can only assign '%s' once", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_param_spec_get_name( pspec ) ); return; } switch( vips_wrap7_lookup_type( vt ) ) { case VIPS_WRAP7_DOUBLE: *((double*)wrap7->vargv[i]) = g_value_get_double( value ); break; case VIPS_WRAP7_INT: *((int*)wrap7->vargv[i]) = g_value_get_int( value ); break; case VIPS_WRAP7_STRING: IM_SETSTR( wrap7->vargv[i], g_value_get_string( value ) ); break; case VIPS_WRAP7_GVALUE: g_value_init( wrap7->vargv[i], G_VALUE_TYPE( value ) ); g_value_copy( value, wrap7->vargv[i] ); break; case VIPS_WRAP7_IMAGE: case VIPS_WRAP7_INTERPOLATE: vips__object_set_member( object, pspec, (GObject **) &wrap7->vargv[i], g_value_get_object( value ) ); break; default: wrap7->error = TRUE; break; } /* Note that it's now been set. */ argument_instance->assigned = TRUE; } static void vips_wrap7_object_get_property( GObject *gobject, guint property_id, GValue *value, GParamSpec *pspec ) { VipsObject *object = VIPS_OBJECT( gobject ); VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( gobject ); VipsArgumentClass *argument_class = (VipsArgumentClass *) vips__argument_table_lookup( class->argument_table, pspec ); VipsArgumentInstance *argument_instance = vips__argument_get_instance( argument_class, object ); VipsWrap7 *wrap7 = VIPS_WRAP7( gobject ); VipsWrap7Class *wclass = VIPS_WRAP7_GET_CLASS( wrap7 ); int i; im_arg_desc *arg; im_type_desc *type; im_arg_type vt; if( !argument_class ) { G_OBJECT_WARN_INVALID_PROPERTY_ID( gobject, property_id, pspec ); return; } i = argument_class->offset; arg = &wclass->fn->argv[i]; type = arg->desc; vt = type->type; g_assert( ((VipsArgument *) argument_class)->pspec == pspec ); if( !argument_instance->assigned ) { g_warning( "%s: %s attempt to read unset property %s", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ) ); return; } switch( vips_wrap7_lookup_type( vt ) ) { case VIPS_WRAP7_DOUBLE: g_value_set_double( value, *((double*)wrap7->vargv[i]) ); break; case VIPS_WRAP7_INT: g_value_set_int( value, *((int*)wrap7->vargv[i]) ); break; case VIPS_WRAP7_STRING: g_value_set_string( value, wrap7->vargv[i] ); break; case VIPS_WRAP7_IMAGE: case VIPS_WRAP7_INTERPOLATE: case VIPS_WRAP7_GVALUE: g_value_set_object( value, wrap7->vargv[i] ); break; default: g_warning( "%s: %s unimplemented property type %s", G_STRLOC, G_OBJECT_TYPE_NAME( gobject ), g_type_name( G_PARAM_SPEC_VALUE_TYPE( pspec ) ) ); break; } } /* Init an output slot in vargv. */ static void * vips_wrap7_build_output( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { VipsWrap7 *wrap7 = VIPS_WRAP7( object ); VipsWrap7Class *class = VIPS_WRAP7_GET_CLASS( wrap7 ); int i; im_arg_desc *arg; im_type_desc *type; im_arg_type vt; /* We want required, construct-time, unassigned output args. */ if( !(argument_class->flags & VIPS_ARGUMENT_REQUIRED) || !(argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) || argument_instance->assigned || !(argument_class->flags & VIPS_ARGUMENT_OUTPUT) ) return( NULL ); /* argument_class->offset is only the argv slot for true params. We * can't do this before we've tested the arg class. */ i = argument_class->offset; arg = &class->fn->argv[i]; type = arg->desc; vt = type->type; /* Provide output objects for the operation to write to. */ switch( vips_wrap7_lookup_type( vt ) ) { case VIPS_WRAP7_DOUBLE: case VIPS_WRAP7_INT: case VIPS_WRAP7_COMPLEX: case VIPS_WRAP7_STRING: break; case VIPS_WRAP7_IMAGE: g_object_set( object, arg->name, vips_image_new(), NULL ); break; case VIPS_WRAP7_DMASK: case VIPS_WRAP7_IMASK: break; case VIPS_WRAP7_GVALUE: { GValue *value = wrap7->vargv[i]; memset( value, 0, sizeof( GValue ) ); break; } case VIPS_WRAP7_DOUBLEVEC: case VIPS_WRAP7_INTVEC: default: wrap7->error = TRUE; break; } return( NULL ); } /* Mark an output as assigned. */ static void * vips_wrap7_note_assigned( VipsObject *object, GParamSpec *pspec, VipsArgumentClass *argument_class, VipsArgumentInstance *argument_instance, void *a, void *b ) { /* We want required, construct-time, output args. */ if( !(argument_class->flags & VIPS_ARGUMENT_REQUIRED) || !(argument_class->flags & VIPS_ARGUMENT_CONSTRUCT) || !(argument_class->flags & VIPS_ARGUMENT_OUTPUT) ) return( NULL ); if( !argument_instance->assigned ) { argument_instance->assigned = TRUE; VIPS_DEBUG_MSG( "vips_wrap7_note_assigned: " "marking %s as assigned\n", g_param_spec_get_name( pspec ) ); } return( NULL ); } static int vips_wrap7_build( VipsObject *object ) { VipsWrap7 *wrap7 = VIPS_WRAP7( object ); VipsWrap7Class *class = VIPS_WRAP7_GET_CLASS( wrap7 ); VipsObjectClass *oclass = VIPS_OBJECT_CLASS( class ); if( wrap7->error ) { vips_error( "wrap7", _( "error constructing vips7 operation %s" ), oclass->nickname ); return( -1 ); } if( class->not_supported ) { vips_error( "wrap7", _( "vips7 operation %s not supported by vips8" ), oclass->nickname ); return( -1 ); } #ifdef DEBUG printf( "vips_wrap7_build: " ); vips_object_print_name( VIPS_OBJECT( wrap7 ) ); printf( " building output\n" ); #endif /*DEBUG*/ /* Init all the output args. */ (void) vips_argument_map( VIPS_OBJECT( wrap7 ), vips_wrap7_build_output, NULL, NULL ); if( VIPS_OBJECT_CLASS( vips_wrap7_parent_class )->build( object ) ) return( -1 ); /* Run the operation. */ if( class->fn->disp( wrap7->vargv ) ) return( -1 ); /* The vips7 operation will have written any outputs (such as the * output double for im_max(), for example) to varg. g_object_get() * fetches directly from vargv (see vips_wrap7_object_get_property()) * so we don't need to do any copying, we just need to tell vips that * all outputs now have values. */ (void) vips_argument_map( VIPS_OBJECT( wrap7 ), vips_wrap7_note_assigned, NULL, NULL ); return( 0 ); } static void vips_wrap7_summary_class( VipsObjectClass *oclass, VipsBuf *buf ) { VipsWrap7Class *class = VIPS_WRAP7_CLASS( oclass ); im_function *fn = class->fn; if( fn ) vips_buf_appends( buf, fn->name ); else vips_buf_appends( buf, G_OBJECT_CLASS_NAME( class ) ); if( oclass->description ) vips_buf_appendf( buf, " - %s", oclass->description ); } static void vips_wrap7_dump( VipsObject *object, VipsBuf *buf ) { VipsWrap7Class *class = VIPS_WRAP7_GET_CLASS( object ); im_function *fn = class->fn; im_package *pack = im_package_of_function( fn->name ); VIPS_OBJECT_CLASS( vips_wrap7_parent_class )->dump( object, buf ); if( pack ) vips_buf_appendf( buf, "from package \"%s\"", pack->name ); vips_buf_appendf( buf, "\n" ); /* Print any flags this function has. */ vips_buf_appendf( buf, "flags: " ); if( fn->flags & IM_FN_PIO ) vips_buf_appendf( buf, "(PIO function) " ); else vips_buf_appendf( buf, "(WIO function) " ); if( fn->flags & IM_FN_TRANSFORM ) vips_buf_appendf( buf, "(coordinate transformer) " ); else vips_buf_appendf( buf, "(no coordinate transformation) " ); if( fn->flags & IM_FN_PTOP ) vips_buf_appendf( buf, "(point-to-point operation) " ); else vips_buf_appendf( buf, "(area operation) " ); if( fn->flags & IM_FN_NOCACHE ) vips_buf_appendf( buf, "(nocache operation) " ); else vips_buf_appendf( buf, "(result can be cached) " ); vips_buf_appendf( buf, "\n" ); } static void vips_wrap7_class_init( VipsWrap7Class *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *vobject_class = (VipsObjectClass *) class; gobject_class->dispose = vips_wrap7_dispose; gobject_class->finalize = vips_wrap7_finalize; vobject_class->nickname = "wrap7"; vobject_class->description = _( "vips7 operations as vips8 classes" ); vobject_class->build = vips_wrap7_build; vobject_class->summary_class = vips_wrap7_summary_class; vobject_class->dump = vips_wrap7_dump; } static void vips_wrap7_init( VipsWrap7 *wrap7 ) { } /* Build a subclass of vips7 for every vips7 operation. */ static void vips_wrap7_subclass_class_init( VipsWrap7Class *class ) { GObjectClass *gobject_class = (GObjectClass *) class; VipsObjectClass *vobject_class = (VipsObjectClass *) class; /* The name of the vips operation we wrap is hidden in our class name. */ const char *name = G_OBJECT_CLASS_NAME( class ) + strlen( VIPS_WRAP7_PREFIX ); im_function *fn = im_find_function( name ); int i; g_assert( !class->fn ); g_assert( fn ); gobject_class->set_property = vips_wrap7_object_set_property; gobject_class->get_property = vips_wrap7_object_get_property; vobject_class->nickname = im_strdup( NULL, name ); vobject_class->description = fn->desc; class->fn = fn; for( i = fn->argc - 1; i >= 0; i-- ) { im_arg_desc *arg = &fn->argv[i]; im_type_desc *type = arg->desc; im_arg_type vt = type->type; GParamSpec *pspec; switch( vips_wrap7_lookup_type( vt ) ) { case VIPS_WRAP7_DOUBLEVEC: case VIPS_WRAP7_DMASK: case VIPS_WRAP7_IMASK: case VIPS_WRAP7_IMAGEVEC: case VIPS_WRAP7_INTVEC: case VIPS_WRAP7_GVALUE: case VIPS_WRAP7_INTERPOLATE: case VIPS_WRAP7_COMPLEX: case VIPS_WRAP7_STRING: case VIPS_WRAP7_NONE: /* Can't wrap this function. class_init can't fail, so * set a flag to block _build(). */ class->not_supported = TRUE; pspec = NULL; break; case VIPS_WRAP7_INT: pspec = g_param_spec_int( arg->name, arg->name, arg->name, -G_MAXINT, G_MAXINT, 0, G_PARAM_READWRITE ); break; case VIPS_WRAP7_DOUBLE: pspec = g_param_spec_double( arg->name, arg->name, arg->name, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE ); break; case VIPS_WRAP7_IMAGE: pspec = g_param_spec_object( arg->name, arg->name, arg->name, VIPS_TYPE_IMAGE, G_PARAM_READWRITE ); break; default: g_assert( 0 ); /* Keep -Wall happy. */ return; } if( pspec ) { g_object_class_install_property( gobject_class, i + 1, pspec ); vips_object_class_install_argument( vobject_class, pspec, (type->flags & IM_TYPE_OUTPUT) ? VIPS_ARGUMENT_REQUIRED_OUTPUT : VIPS_ARGUMENT_REQUIRED_INPUT, i, i ); } } } static void vips_wrap7_subclass_init( VipsWrap7 *wrap7 ) { VipsWrap7Class *class = VIPS_WRAP7_GET_CLASS( wrap7 ); im_function *fn = class->fn; if( !(wrap7->vargv = IM_ARRAY( NULL, fn->argc + 1, im_object )) || im_allocate_vargv( fn, wrap7->vargv ) ) { wrap7->error = TRUE; return; } } static GType vips_wrap7_subclass_get_type( im_function *fn ) { static const GTypeInfo info = { sizeof( VipsWrap7Class ), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) vips_wrap7_subclass_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof( VipsWrap7 ), 32, /* n_preallocs */ (GInstanceInitFunc) vips_wrap7_subclass_init, }; char name[256]; GType type; if( !vips_wrap7_subclass_types ) vips_wrap7_subclass_types = g_hash_table_new( g_direct_hash, g_direct_equal ); if( (type = (GType) g_hash_table_lookup( vips_wrap7_subclass_types, fn )) ) return( type ); im_snprintf( name, 256, VIPS_WRAP7_PREFIX "%s", fn->name ); type = g_type_register_static( VIPS_TYPE_WRAP7, name, &info, 0 ); g_hash_table_insert( vips_wrap7_subclass_types, fn, (gpointer) type ); return( type ); } static void * vips_wrap7_build_package( im_package *package ) { int i; for( i = 0; i < package->nfuncs; i++ ) (void) vips_wrap7_subclass_get_type( package->table[i] ); return( NULL ); } /* Walk the whole of the vips7 operation table building classes. */ void vips__init_wrap7_classes( void ) { (void) im_map_packages( (VSListMap2Fn) vips_wrap7_build_package, NULL ); } vips-7.38.5/libvips/deprecated/im_litecor.c0000644000175000017500000001641512303140253015562 00000000000000/* @(#) Function to perform lighting correction. * @(#) One band IM_BANDFMT_UCHAR images only. Always writes UCHAR. * @(#) * @(#) Function im_litecor() assumes that imin * @(#) is either memory mapped or in a buffer. * @(#) * @(#) int im_litecor(in, w, out, clip, factor) * @(#) IMAGE *in, *w, *out; * @(#) int clip; * @(#) double factor; * @(#) * @(#) clip==1 * @(#) - Compute max(white)*factor*(image/white), Clip to 255. * @(#) clip==0 * @(#) - Compute factor for you. * @(#) * @(#) * @(#) * @(#) * @(#) Returns 0 on success and -1 on error * * Copyright: 1990, J. Cupitt, 1991 N. Dessipris * * Author: J. Cupitt, N. Dessipris * Written on: 02/08/1990 * Modified on : 6/11/1991, by ND to produce a UCHAR output * 1/4/93 J.Cupitt * - bugs if white is smaller than image fixed * - im_warning() now called * - clip==0 case not tested or changed! do not use! */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /* If maximum output is > 255 scale output between minout and maxout, * by normalising maxout to 255. * If maximum output is < 255 do the light correction without scaling */ static int im_litecor0( in, white, out ) IMAGE *in, *white, *out; { PEL *p, *w; PEL *q, *bu; int c; int x, y; float xrat = (float) in->Xsize / white->Xsize; float yrat = (float) in->Ysize / white->Ysize; int xstep = (int) xrat; int ystep = (int) yrat; double max; int wtmp, maxw, maxout, temp; /* Check white is some simple multiple of image. */ if( xrat < 1.0 || xrat != xstep || yrat < 1.0 || yrat != ystep ) { im_error( "im_litecor", "white not simple scale of image" ); return( -1 ); } /* Find the maximum of the white. */ if( im_max( white, &max ) ) return( -1 ); maxw = (int)max; /* Set up the output header. */ if( im_cp_desc( out, in ) ) return( -1 ); if( im_setupout( out ) ) return( -1 ); /* Make buffer for outputting to. */ if( !(bu = (PEL *) im_malloc( out, out->Xsize )) ) return( -1 ); /* Find largest value we might generate if factor == 1.0 */ maxout = -1; p = (PEL *) in->data; for( y = 0; y < in->Ysize; y++ ) { /* Point w to the start of the line in the white * corresponding to the line we are about to correct. c counts * up to xstep; each time it wraps, we should move w on one. */ w = (PEL *) (white->data + white->Xsize * (int)(y/ystep)); c = 0; /* Scan along line. */ for( x = 0; x < out->Xsize; x++ ) { wtmp = (int)*w; temp = ( maxw * (int) *p++ + (wtmp>>1) ) / wtmp; if (temp > maxout ) maxout = temp; /* Move white pointer on if necessary. */ c++; if( c == xstep ) { w++; c = 0; } } } /* Do exactly the same as above by scaling the result with respect to * maxout */ p = (PEL *) in->data; if (maxout <= 255 ) /* no need for rescaling output */ { for( y = 0; y < in->Ysize; y++ ) { q = bu; w = (PEL *) (white->data + white->Xsize * (int)(y/ystep)); c = 0; /* Scan along line. */ for( x = 0; x < in->Xsize; x++ ) { wtmp = (int)*w; *q++ = (PEL) ( ( maxw * (int) *p++ + (wtmp>>1) ) / wtmp ); /* Move white pointer on if necessary. */ c++; if( c == xstep ) { w++; c = 0; } } if( im_writeline( y, out, bu ) ) { im_error("im_litecor", "im_writeline failed"); return( -1 ); } } } else /* rescale output wrt maxout */ { for( y = 0; y < in->Ysize; y++ ) { q = bu; w = (PEL *) (white->data + white->Xsize * (int)(y/ystep)); c = 0; /* Scan along line. */ for( x = 0; x < in->Xsize; x++ ) { wtmp = maxout * ((int)*w); *q++ = (PEL) ( ( maxw * (int) *p++ * 255 + (wtmp>>1)) / wtmp ); /* Move white pointer on if necessary. */ c++; if( c == xstep ) { w++; c = 0; } } if( im_writeline( y, out, bu ) ) { im_error("im_litecor", "im_writeline failed"); return( -1 ); } } } return( 0 ); } /* Clip all corrected values above 255, if any. */ static int im_litecor1( in, white, out, factor ) IMAGE *in, *white, *out; double factor; { PEL *p, *w; PEL *q, *bu; int c; int x, y; float xrat = (float) in->Xsize / white->Xsize; float yrat = (float) in->Ysize / white->Ysize; int xstep = (int) xrat; int ystep = (int) yrat; double max; double maxw, temp; int nclipped = 0; /* Check white is some simple multiple of image. */ if( xrat < 1.0 || xrat != xstep || yrat < 1.0 || yrat != ystep ) { im_error( "im_litecor", "white not simple scale of image" ); return( -1 ); } /* Find the maximum of the white. */ if( im_max( white, &max ) ) return( -1 ); maxw = max; /* Set up the output header. */ if( im_cp_desc( out, in ) ) return( -1 ); if( im_setupout( out ) ) return( -1 ); /* Make buffer we write to. */ if( !(bu = (PEL *) im_malloc( out, out->Xsize )) ) return( -1 ); /* Loop through sorting max output */ p = (PEL *) in->data; for( y = 0; y < in->Ysize; y++ ) { q = bu; w = (PEL *) (white->data + white->Xsize * (int)(y / ystep)); c = 0; for( x = 0; x < out->Xsize; x++ ) { temp = ((factor * maxw * (int) *p++)/((int) *w)) + 0.5; if( temp > 255.0 ) { temp = 255; nclipped++; } *q++ = temp; /* Move white pointer on if necessary. */ c++; if( c == xstep ) { w++; c = 0; } } if( im_writeline( y, out, bu ) ) return( -1 ); } if( nclipped ) im_warn( "im_litecor", "%d pels over 255 clipped", nclipped ); return( 0 ); } /* Lighting correction. One band uchar images only. * Assumes the white is some simple multiple of the image in size; ie. the * white has been taken with some smaller or equal set of resolution * parameters. */ int im_litecor( in, white, out, clip, factor ) IMAGE *in, *white, *out; int clip; double factor; { /* Check our args. */ if( im_iocheck( in, out ) ) return( -1 ); if( in->Bands != 1 || in->Coding != IM_CODING_NONE || in->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im_litecor", "bad input format" ); return( -1 ); } if( white->Bands != 1 || white->Coding != IM_CODING_NONE || white->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im_litecor", "bad white format" ); return( -1 ); } switch( clip ) { case 1: return( im_litecor1( in, white, out, factor ) ); case 0: return( im_litecor0( in, white, out ) ); default: im_error( "im_litecor", "unknown flag %d", clip ); return( -1 ); } } vips-7.38.5/libvips/deprecated/vips7compat.c0000644000175000017500000023672612303141142015717 00000000000000/* compat stuff for vips7 * * 4/3/11 * - hacked up */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include VipsImage * im_open( const char *filename, const char *mode ) { VipsImage *image; /* Pass in a nonsense name for argv0 ... this init path is only here * for old programs which are missing an vips_init() call. We need * i18n set up before we can translate. */ if( vips_init( "giant_banana" ) ) vips_error_clear(); /* We have to go via the old VipsFormat system so we can support the * "filename:option" syntax. * * Use "rs" to turn on seq mode. */ if( strcmp( mode, "r" ) == 0 || strcmp( mode, "rd" ) == 0 ) { if( !(image = vips__deprecated_open_read( filename, FALSE )) ) return( NULL ); } else if( strcmp( mode, "rs" ) == 0 ) { if( !(image = vips__deprecated_open_read( filename, TRUE )) ) return( NULL ); } else if( strcmp( mode, "w" ) == 0 ) { if( !(image = vips__deprecated_open_write( filename )) ) return( NULL ); } else { if( !(image = vips_image_new_mode( filename, mode )) ) return( NULL ); } return( image ); } /* Just for compatibility. New code should use vips_object_local() directly. */ VipsImage * im_open_local( VipsImage *parent, const char *filename, const char *mode ) { VipsImage *image; if( !(image = im_open( filename, mode )) ) return( NULL ); vips_object_local( parent, image ); return( image ); } /* Just for compatibility. New code should use vips_object_local_array(). */ int im_open_local_array( VipsImage *parent, VipsImage **images, int n, const char *filename, const char *mode ) { int i; for( i = 0; i < n; i++ ) if( !(images[i] = im_open_local( parent, filename, mode )) ) return( -1 ); return( 0 ); } typedef struct { im_callback_fn fn; void *a; void *b; } Callback; static void im_add_callback_cb( VipsImage *im, Callback *callback ) { if( callback->fn( callback->a, callback->b ) ) vips_image_set_kill( im, TRUE ); } int im_add_callback( VipsImage *im, const char *name, im_callback_fn fn, void *a, void *b ) { Callback *callback; callback = VIPS_NEW( VIPS_OBJECT( im ), Callback ); callback->fn = fn; callback->a = a; callback->b = b; g_signal_connect( im, name, G_CALLBACK( im_add_callback_cb ), callback ); return( 0 ); } static void im_add_callback_cb1( VipsImage *im, void *x, Callback *callback ) { if( callback->fn( callback->a, callback->b ) ) vips_image_set_kill( im, TRUE ); } int im_add_callback1( VipsImage *im, const char *name, im_callback_fn fn, void *a, void *b ) { Callback *callback; callback = VIPS_NEW( VIPS_OBJECT( im ), Callback ); callback->fn = fn; callback->a = a; callback->b = b; g_signal_connect( im, name, G_CALLBACK( im_add_callback_cb1 ), callback ); return( 0 ); } /* Make something local to an image descriptor ... pass in a constructor * and a destructor, plus three args. */ void * im_local( IMAGE *im, im_construct_fn cons, im_callback_fn dest, void *a, void *b, void *c ) { void *obj; if( !im ) { im_error( "im_local", "%s", _( "NULL image descriptor" ) ); return( NULL ); } if( !(obj = cons( a, b, c )) ) return( NULL ); if( im_add_close_callback( im, (im_callback_fn) dest, obj, a ) ) { dest( obj, a ); return( NULL ); } return( obj ); } /* Make an array of things local to a descriptor ... eg. make 6 local temp * images. */ int im_local_array( IMAGE *im, void **out, int n, im_construct_fn cons, im_callback_fn dest, void *a, void *b, void *c ) { int i; for( i = 0; i < n; i++ ) if( !(out[i] = im_local( im, cons, dest, a, b, c )) ) return( -1 ); return( 0 ); } int im_close( VipsImage *im ) { g_object_unref( im ); return( 0 ); } /* edvips.c needs this */ VipsImage * im_init( const char *filename ) { VipsImage *image; image = vips_image_new(); IM_SETSTR( image->filename, filename ); return( image ); } /* We can't do this with a rename macro since the C++ interface needs * this entrypoint, see VImage.h. * * As a result our fancy ABI check will not work with the vips7 interface. */ int im_init_world( const char *argv0 ) { return( vips_init( argv0 ) ); } /* Prettyprint various header fields. Just for vips7 compat, use * vips_enum_value() instead. */ const char *im_Type2char( VipsInterpretation type ) { return( vips_enum_string( VIPS_TYPE_INTERPRETATION, type ) ); } const char *im_BandFmt2char( VipsBandFormat format ) { return( vips_enum_string( VIPS_TYPE_BAND_FORMAT, format ) ); } const char *im_Coding2char( VipsCoding coding ) { return( vips_enum_string( VIPS_TYPE_CODING, coding ) ); } const char *im_dtype2char( VipsImageType n ) { return( vips_enum_string( VIPS_TYPE_IMAGE_TYPE, n ) ); } const char *im_dhint2char( VipsDemandStyle style ) { return( vips_enum_string( VIPS_TYPE_DEMAND_STYLE, style ) ); } /* Old names for enums, for compat. */ static const char *im_Type[] = { "IM_TYPE_MULTIBAND", /* 0 */ "IM_TYPE_B_W", /* 1 */ "LUMINACE", /* 2 */ "XRAY", /* 3 */ "IR", /* 4 */ "YUV", /* 5 */ "RED_ONLY", /* 6 */ "GREEN_ONLY", /* 7 */ "BLUE_ONLY", /* 8 */ "POWER_SPECTRUM", /* 9 */ "IM_TYPE_HISTOGRAM", /* 10 */ "LUT", /* 11 */ "IM_TYPE_XYZ", /* 12 */ "IM_TYPE_LAB", /* 13 */ "CMC", /* 14 */ "IM_TYPE_CMYK", /* 15 */ "IM_TYPE_LABQ", /* 15 */ "IM_TYPE_RGB", /* 17 */ "IM_TYPE_UCS", /* 18 */ "IM_TYPE_LCH", /* 19 */ "IM_TYPE_LABS", /* 20 */ "", /* 21 */ "IM_TYPE_sRGB", /* 22 */ "IM_TYPE_YXY", /* 23 */ "IM_TYPE_FOURIER", /* 24 */ "IM_TYPE_RGB16", /* 25 */ "IM_TYPE_GREY16", /* 26 */ NULL }; static const char *im_BandFmt[] = { "IM_BANDFMT_UCHAR", "IM_BANDFMT_CHAR", "IM_BANDFMT_USHORT", "IM_BANDFMT_SHORT", "IM_BANDFMT_UINT", "IM_BANDFMT_INT", "IM_BANDFMT_FLOAT", "IM_BANDFMT_COMPLEX", "IM_BANDFMT_DOUBLE", "IM_BANDFMT_DPCOMPLEX", NULL }; static const char *im_Coding[] = { "IM_CODING_NONE", "COLQUANT8", "IM_CODING_LABQ", "IM_CODING_LABQ_COMPRESSED", "RGB_COMPRESSED", "LUM_COMPRESSED", "IM_CODING_RAD", NULL }; static const char *im_dtype[] = { "IM_NONE", "IM_SETBUF", "IM_SETBUF_FOREIGN", "IM_OPENIN", "IM_MMAPIN", "IM_MMAPINRW", "IM_OPENOUT", "IM_PARTIAL", NULL }; static const char *im_dhint[] = { "IM_SMALLTILE", "IM_FATSTRIP", "IM_THINSTRIP", "IM_ANY", NULL }; /* enum string to int, try the GEnum first, then use a compat *char[] for old * names. */ static int lookup_enum( GType type, const char *names[], const char *name ) { GEnumClass *class; GEnumValue *value; int i; class = g_type_class_ref( type ); if( (value = g_enum_get_value_by_nick( class, name )) ) return( value->value ); if( (value = g_enum_get_value_by_name( class, name )) ) return( value->value ); for( i = 0; names[i]; i++ ) if( strcasecmp( names[i], name ) == 0 ) return( i ); return( -1 ); } VipsInterpretation im_char2Type( const char *str ) { return( lookup_enum( VIPS_TYPE_INTERPRETATION, im_Type, str ) ); } VipsBandFormat im_char2BandFmt( const char *str ) { return( lookup_enum( VIPS_TYPE_BAND_FORMAT, im_BandFmt, str ) ); } VipsCoding im_char2Coding( const char *str ) { return( lookup_enum( VIPS_TYPE_CODING, im_Coding, str ) ); } VipsImageType im_char2dtype( const char *str ) { return( lookup_enum( VIPS_TYPE_IMAGE_TYPE, im_dtype, str ) ); } VipsDemandStyle im_char2dhint( const char *str ) { return( lookup_enum( VIPS_TYPE_DEMAND_STYLE, im_dhint, str ) ); } /* Totally useless now. */ const char *im_Compression2char( int n ) { return( "NONE" ); } int im_char2Compression( const char *str ) { return( -1 ); } /* Wrap one / many is being replaced by a class thing. */ typedef struct { im_wrapmany_fn fn; /* Function we call */ void *a, *b; /* User values for function */ } Bundle; /* Maximum number of input images -- why not? */ #define MAX_INPUT_IMAGES (64) /* Convert a VipsRegion. */ static int process_region( VipsRegion *or, void *seq, void *a, void *b ) { VipsRegion **ir = (VipsRegion **) seq; Bundle *bun = (Bundle *) b; PEL *p[MAX_INPUT_IMAGES], *q; int i, y; /* Prepare all input regions and make buffer pointers. */ for( i = 0; ir[i]; i++ ) { if( vips_region_prepare( ir[i], &or->valid ) ) return( -1 ); p[i] = (PEL *) VIPS_REGION_ADDR( ir[i], or->valid.left, or->valid.top ); } p[i] = NULL; q = (PEL *) VIPS_REGION_ADDR( or, or->valid.left, or->valid.top ); /* Convert linewise. */ for( y = 0; y < or->valid.height; y++ ) { PEL *p1[MAX_INPUT_IMAGES]; /* Make a copy of p[] which the buffer function can mess up if * it wants. */ for( i = 0; ir[i]; i++ ) p1[i] = p[i]; /* Bizarre double-cast stops a bogus gcc 4.1 compiler warning. */ bun->fn( (void **) ((void *)p1), q, or->valid.width, bun->a, bun->b ); /* Move pointers on. */ for( i = 0; ir[i]; i++ ) p[i] += VIPS_REGION_LSKIP( ir[i] ); q += VIPS_REGION_LSKIP( or ); } return( 0 ); } /* Make a copy of an array of input images. */ static IMAGE ** dupims( IMAGE *out, IMAGE **in ) { IMAGE **new; int i, n; for( n = 0; in[n]; n++ ) ; new = VIPS_ARRAY( VIPS_OBJECT( out ), n + 1, IMAGE * ); for( i = 0; i < n; i++ ) new[i] = in[i]; new[n] = NULL; return( new ); } int im_wrapmany( IMAGE **in, IMAGE *out, im_wrapmany_fn fn, void *a, void *b ) { Bundle *bun; int i, n; /* Count input images. */ for( n = 0; in[n]; n++ ) ; if( n >= MAX_INPUT_IMAGES - 1 ) { vips_error( "im_wrapmany", "%s", _( "too many input images" ) ); return( -1 ); } /* Save args. */ bun = VIPS_NEW( VIPS_OBJECT( out ), Bundle ); if( !(in = dupims( out, in )) ) return( -1 ); bun->fn = fn; bun->a = a; bun->b = b; /* Check descriptors --- make sure that our caller has done this * correctly. */ for( i = 0; i < n; i++ ) { if( in[i]->Xsize != out->Xsize || in[i]->Ysize != out->Ysize ) { vips_error( "im_wrapmany", "%s", _( "descriptors differ in size" ) ); return( -1 ); } /* Check io style. */ if( vips_image_pio_input( in[i] ) ) return( -1 ); } vips__demand_hint_array( out, VIPS_DEMAND_STYLE_THINSTRIP, in ); /* Generate! */ if( vips_image_generate( out, vips_start_many, (VipsGenerateFn) process_region, vips_stop_many, in, bun ) ) return( -1 ); return( 0 ); } static void wrapone_gen( void **ins, void *out, int width, Bundle *bun, void *dummy ) { ((im_wrapone_fn) (bun->fn)) (ins[0], out, width, bun->a, bun->b ); } int im_wrapone( IMAGE *in, IMAGE *out, im_wrapone_fn fn, void *a, void *b ) { Bundle *bun; IMAGE *invec[2]; /* Heh, yuk. We cast back above. */ bun = VIPS_NEW( VIPS_OBJECT( out ), Bundle ); bun->fn = (im_wrapmany_fn) fn; bun->a = a; bun->b = b; invec[0] = in; invec[1] = NULL; return( im_wrapmany( invec, out, (im_wrapmany_fn) wrapone_gen, bun, NULL ) ); } static void wraptwo_gen( void **ins, void *out, int width, Bundle *bun, void *dummy ) { ((im_wraptwo_fn) (bun->fn)) (ins[0], ins[1], out, width, bun->a, bun->b ); } int im_wraptwo( IMAGE *in1, IMAGE *in2, IMAGE *out, im_wraptwo_fn fn, void *a, void *b ) { Bundle *bun; IMAGE *invec[3]; bun = VIPS_NEW( VIPS_OBJECT( out ), Bundle ); bun->fn = (im_wrapmany_fn) fn; bun->a = a; bun->b = b; invec[0] = in1; invec[1] = in2; invec[2] = NULL; return( im_wrapmany( invec, out, (im_wrapmany_fn) wraptwo_gen, bun, NULL ) ); } /* Save a bit of typing. */ #define UC IM_BANDFMT_UCHAR #define C IM_BANDFMT_CHAR #define US IM_BANDFMT_USHORT #define S IM_BANDFMT_SHORT #define UI IM_BANDFMT_UINT #define I IM_BANDFMT_INT #define F IM_BANDFMT_FLOAT #define X IM_BANDFMT_COMPLEX #define D IM_BANDFMT_DOUBLE #define DX IM_BANDFMT_DPCOMPLEX /* For two integer types, the "largest", ie. one which can represent the * full range of both. */ static int bandfmt_largest[6][6] = { /* UC C US S UI I */ /* UC */ { UC, S, US, S, UI, I }, /* C */ { S, C, I, S, I, I }, /* US */ { US, I, US, I, UI, I }, /* S */ { S, S, I, S, I, I }, /* UI */ { UI, I, UI, I, UI, I }, /* I */ { I, I, I, I, I, I } }; /* For two formats, find one which can represent the full range of both. */ static VipsBandFmt im__format_common( VipsBandFmt in1, VipsBandFmt in2 ) { if( vips_bandfmt_iscomplex( in1 ) || vips_bandfmt_iscomplex( in2 ) ) { /* What kind of complex? */ if( in1 == IM_BANDFMT_DPCOMPLEX || in2 == IM_BANDFMT_DPCOMPLEX ) /* Output will be DPCOMPLEX. */ return( IM_BANDFMT_DPCOMPLEX ); else return( IM_BANDFMT_COMPLEX ); } else if( vips_bandfmt_isfloat( in1 ) || vips_bandfmt_isfloat( in2 ) ) { /* What kind of float? */ if( in1 == IM_BANDFMT_DOUBLE || in2 == IM_BANDFMT_DOUBLE ) return( IM_BANDFMT_DOUBLE ); else return( IM_BANDFMT_FLOAT ); } else /* Must be int+int -> int. */ return( bandfmt_largest[in1][in2] ); } int im__formatalike_vec( IMAGE **in, IMAGE **out, int n ) { int i; VipsBandFmt fmt; g_assert( n >= 1 ); fmt = in[0]->BandFmt; for( i = 1; i < n; i++ ) fmt = im__format_common( fmt, in[i]->BandFmt ); for( i = 0; i < n; i++ ) if( im_clip2fmt( in[i], out[i], fmt ) ) return( -1 ); return( 0 ); } int im__formatalike( IMAGE *in1, IMAGE *in2, IMAGE *out1, IMAGE *out2 ) { IMAGE *in[2]; IMAGE *out[2]; in[0] = in1; in[1] = in2; out[0] = out1; out[1] = out2; return( im__formatalike_vec( in, out, 2 ) ); } /* Make an n-band image. Input 1 or n bands. */ int im__bandup( const char *domain, IMAGE *in, IMAGE *out, int n ) { IMAGE *bands[256]; int i; if( in->Bands == n ) return( im_copy( in, out ) ); if( in->Bands != 1 ) { im_error( domain, _( "not one band or %d bands" ), n ); return( -1 ); } if( n > 256 || n < 1 ) { im_error( domain, "%s", _( "bad bands" ) ); return( -1 ); } for( i = 0; i < n; i++ ) bands[i] = in; return( im_gbandjoin( bands, out, n ) ); } int im__bandalike_vec( const char *domain, IMAGE **in, IMAGE **out, int n ) { int i; int max_bands; g_assert( n >= 1 ); max_bands = in[0]->Bands; for( i = 1; i < n; i++ ) max_bands = IM_MAX( max_bands, in[i]->Bands ); for( i = 0; i < n; i++ ) if( im__bandup( domain, in[i], out[i], max_bands ) ) return( -1 ); return( 0 ); } int im__bandalike( const char *domain, IMAGE *in1, IMAGE *in2, IMAGE *out1, IMAGE *out2 ) { IMAGE *in[2]; IMAGE *out[2]; in[0] = in1; in[1] = in2; out[0] = out1; out[1] = out2; if( im__bandalike_vec( domain, in, out, 2 ) ) return( -1 ); return( 0 ); } int im__sizealike_vec( VipsImage **in, VipsImage **out, int n ) { int i; int width_max; int height_max; g_assert( n >= 1 ); width_max = in[0]->Xsize; height_max = in[0]->Ysize; for( i = 1; i < n; i++ ) { width_max = VIPS_MAX( width_max, in[i]->Xsize ); height_max = VIPS_MAX( height_max, in[i]->Ysize ); } for( i = 0; i < n; i++ ) if( im_embed( in[i], out[i], 0, 0, 0, width_max, height_max ) ) return( -1 ); return( 0 ); } int im__sizealike( VipsImage *in1, VipsImage *in2, VipsImage *out1, VipsImage *out2 ) { IMAGE *in[2]; IMAGE *out[2]; in[0] = in1; in[1] = in2; out[0] = out1; out[1] = out2; return( im__sizealike_vec( in, out, 2 ) ); } /* The common part of most binary arithmetic, relational and boolean * operators. We: * * - check in and out * - cast in1 and in2 up to a common format * - cast the common format to the output format with the supplied table * - equalise bands * - equalise size * - run the supplied buffer operation passing one of the up-banded, * up-casted and up-sized inputs as the first param */ int im__arith_binary( const char *domain, IMAGE *in1, IMAGE *in2, IMAGE *out, int format_table[10], im_wrapmany_fn fn, void *b ) { IMAGE *t[7]; if( im_piocheck( in1, out ) || im_pincheck( in2 ) || im_check_bands_1orn( domain, in1, in2 ) || im_check_uncoded( domain, in1 ) || im_check_uncoded( domain, in2 ) ) return( -1 ); /* Cast our input images up to a common format and bands. */ if( im_open_local_array( out, t, 6, domain, "p" ) || im__formatalike( in1, in2, t[0], t[1] ) || im__bandalike( domain, t[0], t[1], t[2], t[3] ) || im__sizealike( t[2], t[3], t[4], t[5] ) ) return( -1 ); /* Generate the output. */ if( im_cp_descv( out, t[4], t[5], NULL ) ) return( -1 ); /* What number of bands will we write? Same as up-banded input. */ out->Bands = t[4]->Bands; /* What output type will we write? */ out->BandFmt = format_table[t[4]->BandFmt]; /* And process! The buffer function gets one of the input images as a * sample. */ t[6] = NULL; if( im_wrapmany( t + 4, out, fn, t[4], b ) ) return( -1 ); return( 0 ); } VipsVector * im__init_program( VipsVector *vectors[IM_BANDFMT_LAST], VipsBandFmt format_table[IM_BANDFMT_LAST], VipsBandFmt fmt ) { int isize = im__sizeof_bandfmt[fmt]; int osize = im__sizeof_bandfmt[format_table[fmt]]; VipsVector *v; v = vips_vector_new( "binary arith", osize ); vips_vector_source_name( v, "s1", isize ); vips_vector_source_name( v, "s2", isize ); vips_vector_temporary( v, "t1", osize ); vips_vector_temporary( v, "t2", osize ); vectors[fmt] = v; return( v ); } void im__compile_programs( VipsVector *vectors[IM_BANDFMT_LAST] ) { int fmt; for( fmt = 0; fmt < IM_BANDFMT_LAST; fmt++ ) { if( vectors[fmt] && !vips_vector_compile( vectors[fmt] ) ) IM_FREEF( vips_vector_free, vectors[fmt] ); } #ifdef DEBUG printf( "im__compile_programs: " ); for( fmt = 0; fmt < IM_BANDFMT_LAST; fmt++ ) if( vectors[fmt] ) printf( "%s ", im_BandFmt2char( fmt ) ); printf( "\n" ); #endif /*DEBUG*/ } int im_add( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_call( "add", in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_subtract( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_call( "subtract", in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_multiply( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_call( "multiply", in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_divide( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_call( "divide", in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_avg( IMAGE *in, double *out ) { return( vips_avg( in, out, NULL ) ); } int im_deviate( IMAGE *in, double *out ) { return( vips_deviate( in, out, NULL ) ); } int im_generate( VipsImage *im, im_start_fn start, im_generate_fn generate, im_stop_fn stop, void *a, void *b ) { return( vips_image_generate( im, start, (VipsGenerateFn) generate, stop, a, b ) ); } int im_minpos( IMAGE *in, int *xpos, int *ypos, double *out ) { return( vips_min( in, out, "x", xpos, "y", ypos, NULL ) ); } int im_min( IMAGE *in, double *out ) { return( im_minpos( in, NULL, NULL, out ) ); } int im_maxpos( IMAGE *in, int *xpos, int *ypos, double *out ) { return( vips_max( in, out, "x", xpos, "y", ypos, NULL ) ); } int im_max( IMAGE *in, double *out ) { return( im_maxpos( in, NULL, NULL, out ) ); } #define MAX_IMAGES 100 int im_demand_hint (IMAGE * im, VipsDemandStyle hint, ...) { va_list ap; int i; IMAGE *ar[MAX_IMAGES]; va_start (ap, hint); for (i = 0; i < MAX_IMAGES && (ar[i] = va_arg (ap, IMAGE *)); i++) ; va_end (ap); if (i == MAX_IMAGES) { im_error ("im_demand_hint", "%s", _("too many images")); return (-1); } vips__demand_hint_array (im, hint, ar); return (0); } int im_cp_descv (IMAGE * im, ...) { va_list ap; int i; IMAGE *ar[MAX_IMAGES]; va_start (ap, im); for (i = 0; i < MAX_IMAGES && (ar[i] = va_arg (ap, IMAGE *)); i++) ; va_end (ap); if (i == MAX_IMAGES) { im_error ("im_cp_descv", "%s", _("too many images")); return (-1); } return (vips__image_copy_fields_array (im, ar)); } int im_cp_desc(IMAGE *out, IMAGE *in ) { return( im_cp_descv( out, in, NULL)); } int im_copy_set( IMAGE *in, IMAGE *out, VipsType type, float xres, float yres, int xoffset, int yoffset ) { VipsImage *x; if( vips_copy( in, &x, "interpretation", type, "xres", xres, "yres", yres, "xoffset", xoffset, "yoffset", yoffset, NULL ) ) return( -1 ); if( vips_image_write( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_copy_morph( IMAGE *in, IMAGE *out, int bands, VipsBandFmt bandfmt, VipsCoding coding ) { VipsImage *x; if( vips_copy( in, &x, "bands", bands, "format", bandfmt, "coding", coding, NULL ) ) return( -1 ); if( vips_image_write( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_copy( IMAGE *in, IMAGE *out ) { return( vips_image_write( in, out ) ); } int im_copy_swap( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_copy( in, &x, "swap", TRUE, NULL ) ) return( -1 ); if( vips_image_write( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_copy_set_meta( IMAGE *in, IMAGE *out, const char *field, GValue *value ) { if( im_copy( in, out ) ) return( -1 ); im_meta_set( out, field, value ); return( 0 ); } int im_copy_native( IMAGE *in, IMAGE *out, gboolean is_msb_first ) { if( is_msb_first != im_amiMSBfirst() ) return( im_copy_swap( in, out ) ); else return( im_copy( in, out ) ); } int im_embed( IMAGE *in, IMAGE *out, int type, int x, int y, int width, int height ) { VipsImage *t; if( vips_embed( in, &t, x, y, width, height, "extend", type, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_fliphor( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_flip( in, &t, VIPS_DIRECTION_HORIZONTAL, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_rot90( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_rot( in, &t, VIPS_ANGLE_90, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_rot180( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_rot( in, &t, VIPS_ANGLE_180, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_rot270( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_rot( in, &t, VIPS_ANGLE_270, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_flipver( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_flip( in, &t, VIPS_DIRECTION_VERTICAL, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_insert( IMAGE *main, IMAGE *sub, IMAGE *out, int x, int y ) { VipsImage *t; if( vips_insert( main, sub, &t, x, y, "expand", TRUE, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_insert_noexpand( IMAGE *main, IMAGE *sub, IMAGE *out, int x, int y ) { VipsImage *t; if( vips_insert( main, sub, &t, x, y, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_lrjoin( IMAGE *left, IMAGE *right, IMAGE *out ) { VipsImage *t; if( vips_join( left, right, &t, VIPS_DIRECTION_HORIZONTAL, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_tbjoin( IMAGE *left, IMAGE *right, IMAGE *out ) { VipsImage *t; if( vips_join( left, right, &t, VIPS_DIRECTION_VERTICAL, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_extract_area( IMAGE *in, IMAGE *out, int left, int top, int width, int height ) { VipsImage *t; if( vips_extract_area( in, &t, left, top, width, height, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_extract_bands( IMAGE *in, IMAGE *out, int band, int nbands ) { VipsImage *t; if( vips_extract_band( in, &t, band, "n", nbands, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_extract_band( IMAGE *in, IMAGE *out, int band ) { return( im_extract_bands( in, out, band, 1 ) ); } int im_extract_areabands( IMAGE *in, IMAGE *out, int left, int top, int width, int height, int band, int nbands ) { VipsImage *t1, *t2; if( vips_extract_area( in, &t1, left, top, width, height, NULL ) ) return( -1 ); if( vips_extract_band( t1, &t2, band, "n", nbands, NULL ) ) { g_object_unref( t1 ); return( -1 ); } g_object_unref( t1 ); if( vips_image_write( t2, out ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); return( 0 ); } int im_replicate( IMAGE *in, IMAGE *out, int across, int down ) { VipsImage *t; if( vips_replicate( in, &t, across, down, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_clip2fmt( IMAGE *in, IMAGE *out, VipsBandFmt fmt ) { VipsImage *t; if( vips_cast( in, &t, fmt, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } size_t im_ref_string_get_length( const GValue *value ) { size_t length; (void) vips_value_get_ref_string( value, &length ); return( length ); } int im_bandjoin( VipsImage *in1, VipsImage *in2, VipsImage *out ) { VipsImage *t; if( vips_bandjoin2( in1, in2, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_gbandjoin( VipsImage **in, VipsImage *out, int n ) { VipsImage *t; if( vips_bandjoin( in, &t, n, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_rank_image( VipsImage **in, VipsImage *out, int n, int index ) { VipsImage *t; if( vips_bandrank( in, &t, n, "index", index, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_maxvalue( IMAGE **in, IMAGE *out, int n ) { return( im_rank_image( in, out, n, n - 1 ) ); } int im_invert( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_invert( in, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_sign( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_sign( in, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_abs( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_abs( in, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_bandmean( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_bandmean( in, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_lintra( double a, IMAGE *in, double b, IMAGE *out ) { VipsImage *t; if( vips_linear1( in, &t, a, b, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_lintra_vec( int n, double *a, IMAGE *in, double *b, IMAGE *out ) { VipsImage *t; if( vips_linear( in, &t, a, b, n, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_black( IMAGE *out, int x, int y, int bands ) { VipsImage *t; if( vips_black( &t, x, y, "bands", bands, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_identity_ushort( VipsImage *lut, int bands, int sz ) { VipsImage *t; if( vips_identity( &t, "bands", bands, "ushort", TRUE, "size", sz, NULL ) ) return( -1 ); if( vips_image_write( t, lut ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_identity( VipsImage *lut, int bands ) { VipsImage *t; if( vips_identity( &t, "bands", bands, NULL ) ) return( -1 ); if( vips_image_write( t, lut ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_gaussnoise( VipsImage *out, int x, int y, double mean, double sigma ) { VipsImage *t; if( vips_gaussnoise( &t, x, y, "mean", mean, "sigma", sigma, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_grid( VipsImage *in, VipsImage *out, int tile_height, int across, int down ) { VipsImage *t; if( vips_grid( in, &t, tile_height, across, down, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_scale( VipsImage *in, VipsImage *out ) { VipsImage *t; if( vips_scale( in, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_msb( VipsImage *in, VipsImage *out ) { VipsImage *t; if( vips_msb( in, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_msb_band( VipsImage *in, VipsImage *out, int band ) { VipsImage *t; if( vips_msb( in, &t, "band", band, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_make_xy( IMAGE *out, const int xsize, const int ysize ) { VipsImage *t; if( vips_xyz( &t, xsize, ysize, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_zone( IMAGE *out, int size ) { VipsImage *t; if( vips_zone( &t, size, size, "uchar", TRUE, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_fzone( IMAGE *out, int size ) { VipsImage *t; if( vips_zone( &t, size, size, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_sines( IMAGE *out, int xsize, int ysize, double horfreq, double verfreq ) { VipsImage *t; if( vips_sines( &t, xsize, ysize, "hfreq", horfreq, "vfreq", verfreq, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_text( IMAGE *out, const char *text, const char *font, int width, int align, int dpi ) { VipsImage *t; if( vips_text( &t, text, "font", font, "width", width, "align", align, "dpi", dpi, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_system( VipsImage *im, const char *cmd, char **out ) { char *str; if( vips_system( cmd, "in", im, "in_format", "%s.v", "log", &str, NULL ) ) return( -1 ); if( out ) *out = str; return( 0 ); } VipsImage * im_system_image( VipsImage *im, const char *in_format, const char *out_format, const char *cmd_format, char **log ) { char *str; VipsImage *out; if( vips_system( cmd_format, "in", im, "out", &out, "in_format", in_format, "out_format", out_format, "log", &str, NULL ) ) return( NULL ); if( log ) *log = str; return( out ); } int im_wrap( IMAGE *in, IMAGE *out, int x, int y ) { VipsImage *t; if( vips_wrap( in, &t, "x", x, "y", y, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_rotquad( IMAGE *in, IMAGE *out ) { return( im_wrap( in, out, in->Xsize / 2, in->Ysize / 2 ) ); } int im_scaleps( VipsImage *in, VipsImage *out ) { VipsImage *t; if( vips_scale( in, &t, "log", TRUE, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_zoom( VipsImage *in, VipsImage *out, int xfac, int yfac ) { VipsImage *t; if( vips_zoom( in, &t, xfac, yfac, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_subsample( VipsImage *in, VipsImage *out, int xfac, int yfac ) { VipsImage *t; if( vips_subsample( in, &t, xfac, yfac, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static int vips__math( VipsImage *in, VipsImage *out, VipsOperationMath math ) { VipsImage *t; if( vips_math( in, &t, math, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_sintra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_SIN ) ); } int im_costra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_COS ) ); } int im_tantra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_TAN ) ); } int im_asintra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_ASIN ) ); } int im_acostra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_ACOS ) ); } int im_atantra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_ATAN ) ); } int im_logtra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_LOG ) ); } int im_log10tra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_LOG10 ) ); } int im_exptra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_EXP ) ); } int im_exp10tra( IMAGE *in, IMAGE *out ) { return( vips__math( in, out, VIPS_OPERATION_MATH_EXP10 ) ); } DOUBLEMASK * im_stats( VipsImage *in ) { VipsImage *t; DOUBLEMASK *msk; if( vips_stats( in, &t, NULL ) ) return( NULL ); if( !(msk = im_vips2mask( t, "im_stats" )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( msk ); } DOUBLEMASK * im_gauss_dmask( const char *filename, double sigma, double min_ampl ) { VipsImage *t; DOUBLEMASK *msk; if( vips_gaussmat( &t, sigma, min_ampl, NULL ) ) return( NULL ); if( !(msk = im_vips2mask( t, filename )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( msk ); } DOUBLEMASK * im_gauss_dmask_sep( const char *filename, double sigma, double min_ampl ) { VipsImage *t; DOUBLEMASK *msk; if( vips_gaussmat( &t, sigma, min_ampl, "separable", TRUE, NULL ) ) return( NULL ); if( !(msk = im_vips2mask( t, filename )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( msk ); } INTMASK * im_gauss_imask( const char *filename, double sigma, double min_ampl ) { VipsImage *t; INTMASK *msk; if( vips_gaussmat( &t, sigma, min_ampl, "integer", TRUE, NULL ) ) return( NULL ); if( !(msk = im_vips2imask( t, filename )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( msk ); } INTMASK * im_gauss_imask_sep( const char *filename, double sigma, double min_ampl ) { VipsImage *t; INTMASK *msk; if( vips_gaussmat( &t, sigma, min_ampl, "integer", TRUE, "separable", TRUE, NULL ) ) return( NULL ); if( !(msk = im_vips2imask( t, filename )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( msk ); } INTMASK * im_log_imask( const char *filename, double sigma, double min_ampl ) { VipsImage *t; INTMASK *msk; if( vips_logmat( &t, sigma, min_ampl, "integer", TRUE, NULL ) ) return( NULL ); if( !(msk = im_vips2imask( t, filename )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( msk ); } DOUBLEMASK * im_log_dmask( const char *filename, double sigma, double min_ampl ) { VipsImage *t; DOUBLEMASK *msk; if( vips_logmat( &t, sigma, min_ampl, NULL ) ) return( NULL ); if( !(msk = im_vips2mask( t, filename )) ) { g_object_unref( t ); return( NULL ); } g_object_unref( t ); return( msk ); } int im_recomb( IMAGE *in, IMAGE *out, DOUBLEMASK *recomb ) { VipsImage *t1, *t2; if( !(t1 = vips_image_new()) || im_mask2vips( recomb, t1 ) ) return( -1 ); if( vips_recomb( in, &t2, t1, NULL ) ) { g_object_unref( t1 ); return( -1 ); } g_object_unref( t1 ); if( vips_image_write( t2, out ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); return( 0 ); } int im_compass( VipsImage *in, VipsImage *out, INTMASK *mask ) { VipsImage *t1, *t2; if( !(t1 = vips_image_new()) || im_imask2vips( mask, t1 ) ) return( -1 ); if( vips_compass( in, &t2, t1, "times", 8, NULL ) ) { g_object_unref( t1 ); return( -1 ); } g_object_unref( t1 ); if( vips_image_write( t2, out ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); return( 0 ); } int im_lindetect( IMAGE *in, IMAGE *out, INTMASK *mask ) { VipsImage *t1, *t2; if( !(t1 = vips_image_new()) || im_imask2vips( mask, t1 ) ) return( -1 ); if( vips_compass( in, &t2, t1, "times", 4, NULL ) ) { g_object_unref( t1 ); return( -1 ); } g_object_unref( t1 ); if( vips_image_write( t2, out ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); return( 0 ); } int im_gradient( IMAGE *in, IMAGE *out, INTMASK *mask ) { VipsImage *t1, *t2; if( !(t1 = vips_image_new()) || im_imask2vips( mask, t1 ) ) return( -1 ); if( vips_compass( in, &t2, t1, "times", 2, "angle", VIPS_ANGLE45_90, "combine", VIPS_COMBINE_SUM, NULL ) ) { g_object_unref( t1 ); return( -1 ); } g_object_unref( t1 ); if( vips_image_write( t2, out ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); return( 0 ); } int im_convsep_raw( IMAGE *in, IMAGE *out, INTMASK *mask ) { im_error( "im_convsep_raw", "no compat function" ); return( -1 ); } int im_convsep( IMAGE *in, IMAGE *out, INTMASK *mask ) { VipsImage *t1, *t2; if( !(t1 = vips_image_new()) || im_imask2vips( mask, t1 ) ) return( -1 ); if( vips_convsep( in, &t2, t1, NULL ) ) { g_object_unref( t1 ); return( -1 ); } g_object_unref( t1 ); if( vips_image_write( t2, out ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); return( 0 ); } int im_convsep_f_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { im_error( "im_convsep_raw", "no compat function" ); return( -1 ); } int im_convsep_f( IMAGE *in, IMAGE *out, DOUBLEMASK *mask ) { VipsImage *t1, *t2; if( !(t1 = vips_image_new()) || im_mask2vips( mask, t1 ) ) return( -1 ); if( vips_convsep( in, &t2, t1, "precision", VIPS_PRECISION_FLOAT, NULL ) ) { g_object_unref( t1 ); return( -1 ); } g_object_unref( t1 ); if( vips_image_write( t2, out ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); return( 0 ); } int im_addgnoise( IMAGE *in, IMAGE *out, double sigma ) { IMAGE *t; if( !(t = im_open_local( out, "im_addgnoise", "p" )) || im_gaussnoise( t, in->Xsize, in->Ysize, 0, sigma ) || im_add( in, t, out ) ) return( -1 ); return( 0 ); } int im_contrast_surface_raw( IMAGE *in, IMAGE *out, int half_win_size, int spacing ) { im_error( "im_contrast_surface_raw", "no compat function" ); return( -1 ); } /* This replaces some custom code in 7.36 and earlier. The hand-made one was * slower for spacing == 1, though faster for large values of spacing. * * Not worth maintaining a special operator for. */ int im_contrast_surface( IMAGE *in, IMAGE *out, int half_win_size, int spacing ) { VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 10 ); int size = half_win_size * 2; int x, y; t[0] = vips_image_new_matrixv( 1, 2, -1.0, 1.0 ); t[1] = vips_image_new_matrixv( 2, 1, -1.0, 1.0 ); t[8] = vips_image_new_matrix( size, size ); for( y = 0; y < size; y++ ) for( x = 0; x < size; x++ ) *VIPS_MATRIX( t[8], x, y ) = 1.0; if( vips_conv( in, &t[2], t[0], NULL ) || vips_conv( in, &t[3], t[1], NULL ) || vips_abs( t[2], &t[4], NULL ) || vips_abs( t[3], &t[5], NULL ) || vips_add( t[4], t[5], &t[6], NULL ) || vips_conv( t[6], &t[7], t[8], NULL ) || vips_subsample( t[7], &t[9], spacing, spacing, NULL ) || vips_image_write( t[9], out ) ) return( -1 ); return( 0 ); } int im_spcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out ) { im_error( "im_spcor_raw", "no compat function" ); return( -1 ); } int im_spcor( IMAGE *in, IMAGE *ref, IMAGE *out ) { VipsImage *x; if( vips_call( "spcor", in, ref, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_fastcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out ) { im_error( "im_fastcor_raw", "no compat function" ); return( -1 ); } int im_fastcor( IMAGE *in, IMAGE *ref, IMAGE *out ) { VipsImage *x; if( vips_call( "fastcor", in, ref, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_sharpen( IMAGE *in, IMAGE *out, int mask_size, double x1, double y2, double y3, double m1, double m2 ) { VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 2 ); /* im_sharpen() always recoded as labq and im_benchmark() depends * upon this behaviour. */ if( vips_call( "sharpen", in, &t[0], "radius", mask_size / 2, "x1", x1, "y2", y2, "y3", y3, "m1", m1, "m2", m2, NULL ) || vips_colourspace( t[0], &t[1], VIPS_INTERPRETATION_LABQ, NULL ) || vips_image_write( t[1], out ) ) return( -1 ); return( 0 ); } static int vips__round( VipsImage *in, VipsImage *out, VipsOperationRound round ) { VipsImage *t; if( vips_round( in, &t, round, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_rint( IMAGE *in, IMAGE *out ) { return( vips__round( in, out, VIPS_OPERATION_ROUND_RINT ) ); } int im_floor( IMAGE *in, IMAGE *out ) { return( vips__round( in, out, VIPS_OPERATION_ROUND_FLOOR ) ); } int im_ceil( IMAGE *in, IMAGE *out ) { return( vips__round( in, out, VIPS_OPERATION_ROUND_CEIL ) ); } static int vips__relational( IMAGE *in1, IMAGE *in2, IMAGE *out, VipsOperationRelational relational ) { VipsImage *t; if( vips_relational( in1, in2, &t, relational, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_equal( IMAGE *in1, IMAGE *in2, IMAGE *out ) { return( vips__relational( in1, in2, out, VIPS_OPERATION_RELATIONAL_EQUAL ) ); } int im_notequal( IMAGE *in1, IMAGE *in2, IMAGE *out ) { return( vips__relational( in1, in2, out, VIPS_OPERATION_RELATIONAL_NOTEQUAL ) ); } int im_less( IMAGE *in1, IMAGE *in2, IMAGE *out ) { return( vips__relational( in1, in2, out, VIPS_OPERATION_RELATIONAL_LESS ) ); } int im_lesseq( IMAGE *in1, IMAGE *in2, IMAGE *out ) { return( vips__relational( in1, in2, out, VIPS_OPERATION_RELATIONAL_LESSEQ ) ); } int im_more( IMAGE *in1, IMAGE *in2, IMAGE *out ) { return( vips__relational( in1, in2, out, VIPS_OPERATION_RELATIONAL_MORE ) ); } int im_moreeq( IMAGE *in1, IMAGE *in2, IMAGE *out ) { return( vips__relational( in1, in2, out, VIPS_OPERATION_RELATIONAL_MOREEQ ) ); } static int vips__relational_vec( IMAGE *in, IMAGE *out, VipsOperationRelational relational, double *c, int n ) { VipsImage *t; if( vips_relational_const( in, &t, relational, c, n, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_equal_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__relational_vec( in, out, VIPS_OPERATION_RELATIONAL_EQUAL, c, n ) ); } int im_notequal_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__relational_vec( in, out, VIPS_OPERATION_RELATIONAL_NOTEQUAL, c, n ) ); } int im_less_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__relational_vec( in, out, VIPS_OPERATION_RELATIONAL_LESS, c, n ) ); } int im_lesseq_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__relational_vec( in, out, VIPS_OPERATION_RELATIONAL_LESSEQ, c, n ) ); } int im_more_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__relational_vec( in, out, VIPS_OPERATION_RELATIONAL_MORE, c, n ) ); } int im_moreeq_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__relational_vec( in, out, VIPS_OPERATION_RELATIONAL_MOREEQ, c, n ) ); } int im_equalconst( IMAGE *in, IMAGE *out, double c ) { return( im_equal_vec( in, out, 1, &c ) ); } int im_notequalconst( IMAGE *in, IMAGE *out, double c ) { return( im_notequal_vec( in, out, 1, &c ) ); } int im_lessconst( IMAGE *in, IMAGE *out, double c ) { return( im_less_vec( in, out, 1, &c ) ); } int im_lesseqconst( IMAGE *in, IMAGE *out, double c ) { return( im_lesseq_vec( in, out, 1, &c ) ); } int im_moreconst( IMAGE *in, IMAGE *out, double c ) { return( im_more_vec( in, out, 1, &c ) ); } int im_moreeqconst( IMAGE *in, IMAGE *out, double c ) { return( im_moreeq_vec( in, out, 1, &c ) ); } int im_remainder( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *t; if( vips_remainder( in1, in2, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_remainder_vec( IMAGE *in, IMAGE *out, int n, double *c ) { VipsImage *t; if( vips_remainder_const( in, &t, c, n, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_remainderconst( IMAGE *in, IMAGE *out, double c ) { return( im_remainder_vec( in, out, 1, &c ) ); } static int vips__boolean( IMAGE *in1, IMAGE *in2, IMAGE *out, VipsOperationBoolean boolean ) { VipsImage *t; if( vips_boolean( in1, in2, &t, boolean, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_andimage( VipsImage *in1, VipsImage *in2, VipsImage *out ) { return( vips__boolean( in1, in2, out, VIPS_OPERATION_BOOLEAN_AND ) ); } int im_orimage( VipsImage *in1, VipsImage *in2, VipsImage *out ) { return( vips__boolean( in1, in2, out, VIPS_OPERATION_BOOLEAN_OR ) ); } int im_eorimage( VipsImage *in1, VipsImage *in2, VipsImage *out ) { return( vips__boolean( in1, in2, out, VIPS_OPERATION_BOOLEAN_EOR ) ); } static int vips__boolean_vec( IMAGE *in, IMAGE *out, VipsOperationBoolean boolean, double *c, int n ) { VipsImage *t; if( vips_boolean_const( in, &t, boolean, c, n, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_andimage_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__boolean_vec( in, out, VIPS_OPERATION_BOOLEAN_AND, c, n ) ); } int im_orimage_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__boolean_vec( in, out, VIPS_OPERATION_BOOLEAN_OR, c, n ) ); } int im_eorimage_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__boolean_vec( in, out, VIPS_OPERATION_BOOLEAN_EOR, c, n ) ); } int im_shiftleft_vec( IMAGE *in, IMAGE *out, int n, double *c ) { return( vips__boolean_vec( in, out, VIPS_OPERATION_BOOLEAN_LSHIFT, c, n ) ); } int im_shiftright_vec( IMAGE *in, IMAGE *out, int n, double *c ) { return( vips__boolean_vec( in, out, VIPS_OPERATION_BOOLEAN_RSHIFT, c, n ) ); } int im_andimageconst( IMAGE *in, IMAGE *out, double c ) { return( im_andimage_vec( in, out, 1, &c ) ); } int im_orimageconst( IMAGE *in, IMAGE *out, double c ) { return( im_orimage_vec( in, out, 1, &c ) ); } int im_eorimageconst( IMAGE *in, IMAGE *out, double c ) { return( im_eorimage_vec( in, out, 1, &c ) ); } int im_shiftleft( IMAGE *in, IMAGE *out, int n ) { double c = n; return( im_shiftleft_vec( in, out, 1, &c ) ); } int im_shiftright( IMAGE *in, IMAGE *out, int n ) { double c = n; return( im_shiftright_vec( in, out, 1, &c ) ); } static int vips__math2_vec( IMAGE *in, IMAGE *out, VipsOperationMath2 math2, double *c, int n ) { VipsImage *t; if( vips_math2_const( in, &t, math2, c, n, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_powtra_vec( VipsImage *in, VipsImage *out, int n, double *c ) { return( vips__math2_vec( in, out, VIPS_OPERATION_MATH2_POW, c, n ) ); } int im_powtra( IMAGE *in, IMAGE *out, double c ) { return( im_powtra_vec( in, out, 1, &c ) ); } int im_expntra_vec( IMAGE *in, IMAGE *out, int n, double *c ) { return( vips__math2_vec( in, out, VIPS_OPERATION_MATH2_WOP, c, n ) ); } int im_expntra( IMAGE *in, IMAGE *out, double c ) { return( im_expntra_vec( in, out, 1, &c ) ); } int im_ifthenelse( VipsImage *c, VipsImage *a, VipsImage *b, VipsImage *out ) { VipsImage *t; if( vips_ifthenelse( c, a, b, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_blend( VipsImage *c, VipsImage *a, VipsImage *b, VipsImage *out ) { VipsImage *t; if( vips_ifthenelse( c, a, b, &t, "blend", TRUE, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static int vips__complex( VipsImage *in, VipsImage *out, VipsOperationComplex cmplx ) { VipsImage *t; if( vips_complex( in, &t, cmplx, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_c2amph( IMAGE *in, IMAGE *out ) { return( vips__complex( in, out, VIPS_OPERATION_COMPLEX_POLAR ) ); } int im_c2rect( IMAGE *in, IMAGE *out ) { return( vips__complex( in, out, VIPS_OPERATION_COMPLEX_RECT ) ); } static int vips__complexget( VipsImage *in, VipsImage *out, VipsOperationComplexget get ) { VipsImage *t; if( vips_complexget( in, &t, get, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_c2real( IMAGE *in, IMAGE *out ) { return( vips__complexget( in, out, VIPS_OPERATION_COMPLEXGET_REAL ) ); } int im_c2imag( IMAGE *in, IMAGE *out ) { return( vips__complexget( in, out, VIPS_OPERATION_COMPLEXGET_IMAG ) ); } int im_ri2c( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_call( "complexform", in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_cache( VipsImage *in, VipsImage *out, int width, int height, int max ) { return( vips_sink_screen( in, out, NULL, width, height, max, 0, NULL, NULL ) ); } int im_argb2rgba( VipsImage *in, VipsImage *out ) { /* No longer exists, just a null op. */ return( im_copy( in, out ) ); } int im_shrink( VipsImage *in, VipsImage *out, double xshrink, double yshrink ) { VipsImage *x; if( vips_shrink( in, &x, xshrink, yshrink, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_eye( IMAGE *out, const int xsize, const int ysize, const double factor ) { VipsImage *x; if( vips_eye( &x, xsize, ysize, "factor", factor, "uchar", TRUE, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_feye( IMAGE *out, const int xsize, const int ysize, const double factor ) { VipsImage *x; if( vips_eye( &x, xsize, ysize, "factor", factor, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_grey( IMAGE *out, const int xsize, const int ysize ) { VipsImage *x; if( vips_grey( &x, xsize, ysize, "uchar", TRUE, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_fgrey( IMAGE *out, const int xsize, const int ysize ) { VipsImage *x; if( vips_grey( &x, xsize, ysize, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_buildlut( DOUBLEMASK *input, VipsImage *out ) { VipsImage *mat; VipsImage *x; mat = vips_image_new(); if( im_mask2vips( input, mat ) ) return( -1 ); if( vips_buildlut( mat, &x, NULL ) ) { g_object_unref( mat ); return( -1 ); } g_object_unref( mat ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_invertlut( DOUBLEMASK *input, VipsImage *out, int size ) { VipsImage *mat; VipsImage *x; mat = vips_image_new(); if( im_mask2vips( input, mat ) ) return( -1 ); if( vips_invertlut( mat, &x, "size", size, NULL ) ) { g_object_unref( mat ); return( -1 ); } g_object_unref( mat ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_tone_build_range( IMAGE *out, int in_max, int out_max, double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ) { VipsImage *t; if( vips_tonelut( &t, "in_max", in_max, "out_max", out_max, "Lb", Lb, "Lw", Lw, "Ps", Ps, "Pm", Pm, "Ph", Ph, "S", S, "M", M, "H", H, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_tone_build( IMAGE *out, double Lb, double Lw, double Ps, double Pm, double Ph, double S, double M, double H ) { IMAGE *t1; if( !(t1 = im_open_local( out, "im_tone_build", "p" )) || im_tone_build_range( t1, 32767, 32767, Lb, Lw, Ps, Pm, Ph, S, M, H ) || im_clip2fmt( t1, out, IM_BANDFMT_SHORT ) ) return( -1 ); return( 0 ); } int im_rightshift_size( IMAGE *in, IMAGE *out, int xshift, int yshift, int band_fmt ) { VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 2 ); if( vips_shrink( in, &t[0], 1 << xshift, 1 << yshift, NULL ) || vips_cast( t[0], &t[1], band_fmt, NULL ) || vips_image_write( t[1], out ) ) return( -1 ); return( 0 ); } int im_Lab2XYZ_temp( IMAGE *in, IMAGE *out, double X0, double Y0, double Z0 ) { VipsArea *temp; VipsImage *x; temp = (VipsArea *) vips_array_double_newv( 3, X0, Y0, Z0 ); if( vips_Lab2XYZ( in, &x, "temp", temp, NULL ) ) { vips_area_unref( temp ); return( -1 ); } vips_area_unref( temp ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_Lab2XYZ( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_Lab2XYZ( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_XYZ2Lab_temp( IMAGE *in, IMAGE *out, double X0, double Y0, double Z0 ) { double ary[3]; VipsArea *temp; VipsImage *x; ary[0] = X0; ary[1] = Y0; ary[2] = Z0; temp = (VipsArea *) vips_array_double_new( ary, 3 ); if( vips_XYZ2Lab( in, &x, "temp", temp, NULL ) ) { vips_area_unref( temp ); return( -1 ); } vips_area_unref( temp ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_XYZ2Lab( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_XYZ2Lab( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_Lab2LCh( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_Lab2LCh( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_LCh2Lab( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_LCh2Lab( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_LCh2UCS( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_LCh2CMC( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_UCS2LCh( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_CMC2LCh( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_XYZ2Yxy( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_XYZ2Yxy( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_Yxy2XYZ( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_Yxy2XYZ( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_float2rad( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_float2rad( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_rad2float( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_rad2float( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_Lab2LabQ( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_Lab2LabQ( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_LabQ2Lab( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_LabQ2Lab( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_Lab2LabS( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_Lab2LabS( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_LabS2Lab( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_LabS2Lab( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_LabQ2LabS( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_LabQ2LabS( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_LabS2LabQ( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_LabS2LabQ( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_Lab2disp( IMAGE *in, IMAGE *out, struct im_col_display *disp ) { IMAGE *t[1]; if( im_open_local_array( out, t, 1, "im_Lab2disp:1", "p" ) || im_Lab2XYZ( in, t[0] ) || im_XYZ2disp( t[0], out, disp ) ) return( -1 ); return( 0 ); } int im_dECMC_fromdisp( IMAGE *im1, IMAGE *im2, IMAGE *out, struct im_col_display *d ) { IMAGE *t[4]; if( im_open_local_array( out, t, 4, "im_dECMC_fromdisp:1", "p" ) || im_disp2XYZ( im1, t[0], d ) || im_XYZ2Lab( t[0], t[1] ) || im_disp2XYZ( im2, t[2], d ) || im_XYZ2Lab( t[2], t[3] ) || im_dECMC_fromLab( t[1], t[3], out ) ) return( -1 ); return( 0 ); } int im_dE_fromdisp( IMAGE *im1, IMAGE *im2, IMAGE *out, struct im_col_display *d ) { IMAGE *t[2]; if( im_open_local_array( out, t, 2, "im_dE_fromdisp:1", "p" ) || im_disp2XYZ( im1, t[0], d ) || im_disp2XYZ( im2, t[1], d ) || im_dE_fromXYZ( t[0], t[1], out ) ) return( -1 ); return( 0 ); } int im_disp2Lab( IMAGE *in, IMAGE *out, struct im_col_display *d ) { VipsImage *t[1]; if( im_open_local_array( out, t, 1, "im_disp2Lab:1", "p" ) || im_disp2XYZ( in, t[0], d ) || im_XYZ2Lab( t[0], out ) ) return( -1 ); return( 0 ); } int im_sRGB2XYZ( IMAGE *in, IMAGE *out ) { VipsImage **t = (VipsImage **) vips_object_local_array( (VipsObject *) out, 2 ); if( vips_sRGB2scRGB( in, &t[0], NULL ) || vips_scRGB2XYZ( t[0], &t[1], NULL ) || im_copy( t[1], out ) ) return( -1 ); return( 0 ); } int im_XYZ2sRGB( IMAGE *in, IMAGE *out ) { VipsImage **t = (VipsImage **) vips_object_local_array( (VipsObject *) out, 2 ); if( vips_XYZ2scRGB( in, &t[0], NULL ) || vips_scRGB2sRGB( t[0], &t[1], NULL ) || im_copy( t[1], out ) ) return( -1 ); return( 0 ); } int im_LabQ2sRGB( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_LabQ2sRGB( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_icc_transform( VipsImage *in, VipsImage *out, const char *input_profile_filename, const char *output_profile_filename, VipsIntent intent ) { VipsImage *x; if( vips_icc_transform( in, &x, output_profile_filename, "input_profile", input_profile_filename, "intent", intent, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_icc_import( VipsImage *in, VipsImage *out, const char *input_profile_filename, VipsIntent intent ) { VipsImage *x; if( vips_icc_import( in, &x, "input_profile", input_profile_filename, "intent", intent, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_icc_import_embedded( VipsImage *in, VipsImage *out, VipsIntent intent ) { VipsImage *x; if( vips_icc_import( in, &x, "embedded", TRUE, "intent", intent, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_icc_export_depth( VipsImage *in, VipsImage *out, int depth, const char *output_profile_filename, VipsIntent intent ) { VipsImage *x; if( vips_icc_export( in, &x, "output_profile", output_profile_filename, "depth", depth, "intent", intent, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } /** * im_LabQ2XYZ: * @in: input image * @out: output image * * Convert an image from LabQ (Coding == IM_CODING_LABQ) to XYZ. * * Returns: 0 on success, -1 on error. */ int im_LabQ2XYZ( IMAGE *in, IMAGE *out ) { IMAGE *t[1]; if( im_open_local_array( out, t, 1, "im_LabQ2XYZ:1", "p" ) || im_LabQ2Lab( in, t[0] ) || im_Lab2XYZ( t[0], out ) ) return( -1 ); return( 0 ); } int im_Lab2UCS( IMAGE *in, IMAGE *out ) { IMAGE *t[1]; if( im_open_local_array( out, t, 1, "im_Lab2UCS:1", "p" ) || im_Lab2LCh( in, t[0] ) || im_LCh2UCS( t[0], out ) ) return( -1 ); return( 0 ); } int im_UCS2Lab( IMAGE *in, IMAGE *out ) { IMAGE *t[1]; if( im_open_local_array( out, t, 1, "im_UCS2Lab:1", "p" ) || im_UCS2LCh( in, t[0] ) || im_LCh2Lab( t[0], out ) ) return( -1 ); return( 0 ); } int im_UCS2XYZ( IMAGE *in, IMAGE *out ) { IMAGE *t[1]; if( im_open_local_array( out, t, 1, "im_UCS2XYZ:1", "p" ) || im_UCS2Lab( in, t[0] ) || im_Lab2XYZ( t[0], out ) ) return( -1 ); return( 0 ); } int im_XYZ2UCS( IMAGE *in, IMAGE *out ) { IMAGE *t[1]; if( im_open_local_array( out, t, 1, "im_XYZ2UCS:1", "p" ) || im_XYZ2Lab( in, t[0] ) || im_Lab2UCS( t[0], out ) ) return( -1 ); return( 0 ); } int im_dE_fromXYZ( IMAGE *in1, IMAGE *in2, IMAGE *out ) { IMAGE *t[2]; if( im_open_local_array( out, t, 2, "im_dE_fromXYZ:1", "p" ) || im_XYZ2Lab( in1, t[0] ) || im_XYZ2Lab( in2, t[1] ) || im_dE_fromLab( t[0], t[1], out ) ) return( -1 ); return( 0 ); } int im_dE_fromLab( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_dE76( in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_dECMC_fromLab( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_dECMC( in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_dE00_fromLab( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_dE00( in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_icc_ac2rc( VipsImage *in, VipsImage *out, const char *profile_filename ) { VipsImage *x; if( vips_icc_ac2rc( in, &x, profile_filename ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_quadratic( IMAGE *in, IMAGE *out, IMAGE *coeff ) { VipsImage *x; if( vips_quadratic( in, &x, coeff, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_maxpos_vec( VipsImage *im, int *xpos, int *ypos, double *maxima, int n ) { double max; VipsArrayDouble *out_array; VipsArrayInt *x_array; VipsArrayInt *y_array; if( vips_max( im, &max, "size", n, "out_array", &out_array, "x_array", &x_array, "y_array", &y_array, NULL ) ) return( -1 ); memcpy( xpos, vips_area_get_data( x_array, NULL, NULL, NULL, NULL ), n * sizeof( int ) ); memcpy( ypos, vips_area_get_data( y_array, NULL, NULL, NULL, NULL ), n * sizeof( int ) ); memcpy( maxima, vips_area_get_data( out_array, NULL, NULL, NULL, NULL ), n * sizeof( double ) ); vips_area_unref( (VipsArea *) out_array ); vips_area_unref( (VipsArea *) x_array ); vips_area_unref( (VipsArea *) y_array ); return( 0 ); } int im_minpos_vec( VipsImage *im, int *xpos, int *ypos, double *minima, int n ) { double min; VipsArrayDouble *out_array; VipsArrayInt *x_array; VipsArrayInt *y_array; if( vips_min( im, &min, "size", n, "out_array", &out_array, "x_array", &x_array, "y_array", &y_array, NULL ) ) return( -1 ); memcpy( xpos, vips_area_get_data( x_array, NULL, NULL, NULL, NULL ), n * sizeof( int ) ); memcpy( ypos, vips_area_get_data( y_array, NULL, NULL, NULL, NULL ), n * sizeof( int ) ); memcpy( minima, vips_area_get_data( out_array, NULL, NULL, NULL, NULL ), n * sizeof( double ) ); vips_area_unref( (VipsArea *) out_array ); vips_area_unref( (VipsArea *) x_array ); vips_area_unref( (VipsArea *) y_array ); return( 0 ); } int im_cross_phase( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_call( "cross_phase", in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_maplut( IMAGE *in, IMAGE *out, IMAGE *lut ) { VipsImage *x; if( vips_maplut( in, &x, lut, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_ismonotonic( IMAGE *lut, int *out ) { gboolean monotonic; if( vips_hist_ismonotonic( lut, &monotonic, NULL ) ) return( -1 ); *out = monotonic ? 255 : 0; return( 0 ); } int im_histcum( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_hist_cum( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_histnorm( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_hist_norm( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_histeq( IMAGE *in, IMAGE *out ) { IMAGE *t1; if( !(t1 = im_open_local( out, "im_histeq", "p" )) || im_histcum( in, t1 ) || im_histnorm( t1, out ) ) return( -1 ); return( 0 ); } int im_heq( VipsImage *in, VipsImage *out, int bandno ) { VipsImage *x; if( vips_hist_equal( in, &x, "band", bandno, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_hist( IMAGE *in, IMAGE *out, int bandno ) { IMAGE *hist; if( !(hist = im_open_local( out, "im_hist", "p" )) || im_histgr( in, hist, bandno ) || im_histplot( hist, out ) ) return( -1 ); return( 0 ); } int im_histgr( IMAGE *in, IMAGE *out, int bandno ) { VipsImage *x; if( vips_hist_find( in, &x, "band", bandno, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_stdif( IMAGE *in, IMAGE *out, double a, double m0, double b, double s0, int width, int height ) { VipsImage *x; if( vips_stdif( in, &x, width, height, "a", a, "b", b, "m0", m0, "s0", s0, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_lhisteq( VipsImage *in, VipsImage *out, int width, int height ) { VipsImage *x; if( vips_hist_local( in, &x, width, height, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_histnD( VipsImage *in, VipsImage *out, int bins ) { VipsImage *x; if( vips_hist_find_ndim( in, &x, "bins", bins, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_hist_indexed( VipsImage *index, VipsImage *value, VipsImage *out ) { VipsImage *x; if( vips_hist_find_indexed( value, index, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_project( IMAGE *in, IMAGE *hout, IMAGE *vout ) { VipsImage *x, *y; if( vips_project( in, &x, &y, NULL ) ) return( -1 ); if( im_copy( x, hout ) ) { g_object_unref( x ); g_object_unref( y ); return( -1 ); } g_object_unref( x ); if( im_copy( y, vout ) ) { g_object_unref( y ); return( -1 ); } g_object_unref( y ); return( 0 ); } int im_profile( IMAGE *in, IMAGE *out, int dir ) { VipsImage *columns, *rows; VipsImage *t1, *t2; if( vips_profile( in, &columns, &rows, NULL ) ) return( -1 ); if( dir == 0 ) { t1 = columns; g_object_unref( rows ); } else { t1 = rows; g_object_unref( columns ); } if( vips_cast( t1, &t2, VIPS_FORMAT_USHORT, NULL ) ) { g_object_unref( t1 ); return( -1 ); } g_object_unref( t1 ); if( im_copy( t2, out ) ) { g_object_unref( t2 ); return( -1 ); } g_object_unref( t2 ); return( 0 ); } int im_mpercent( IMAGE *in, double percent, int *out ) { if( vips_percent( in, percent * 100.0, out, NULL ) ) return( -1 ); return( 0 ); } int im_mpercent_hist( IMAGE *in, double percent, int *out ) { /* Hard to do this in a wrapper. */ vips_error( "im_mpercent_hist", "%s", _( "no compat implemented" ) ); return( -1 ); } int im_hsp( IMAGE *in, IMAGE *ref, IMAGE *out ) { IMAGE *t[3]; if( im_open_local_array( out, t, 3, "im_hsp", "p" ) || im_histgr( in, t[0], -1 ) || im_histgr( ref, t[1], -1 ) || im_histspec( t[0], t[1], t[2] ) || im_maplut( in, out, t[2] ) ) return( -1 ); return( 0 ); } static int match( VipsImage *in, VipsImage *ref, VipsImage *out ) { VipsImage *x; if( vips_hist_match( in, ref, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_histspec( IMAGE *in, IMAGE *ref, IMAGE *out ) { IMAGE *t[5]; guint64 px; int fmt; if( im_check_uint( "im_histspec", in ) || im_check_uint( "im_histspec", ref ) ) return( -1 ); if( im_open_local_array( out, t, 5, "im_histspec", "p" ) || im_histeq( in, t[0] ) || im_histeq( ref, t[2] ) || match( t[0], t[2], t[4] ) ) return( -1 ); px = VIPS_IMAGE_N_PELS( t[4] ); if( px <= 256 ) fmt = IM_BANDFMT_UCHAR; else if( px <= 65536 ) fmt = IM_BANDFMT_USHORT; else fmt = IM_BANDFMT_UINT; if( im_clip2fmt( t[4], out, fmt ) ) return( -1 ); return( 0 ); } int im_falsecolour( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_falsecolour( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_gammacorrect( IMAGE *in, IMAGE *out, double exponent ) { VipsImage *x; if( vips_gamma( in, &x, "exponent", 1.0 / exponent, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } /* This is used by the carrierwave shrinker to cache the * output of shrink before doing the final affine. * * We use the vips8 threaded tilecache to avoid a deadlock: suppose thread1, * evaluating the top block of the output is delayed, and thread2, evaluating * the second block gets here first (this can happen on a heavily-loaded * system). * * With an unthreaded tilecache (as we had before), thread2 will get * the cache lock and start evaling the second block of the shrink. When it * reaches the png reader it will stall until the first block has been used ... * but it never will, since thread1 will block on this cache lock. * * This function is only used in this place (I think), so it's OK to * hard-wire this to be a sequential threaded cache. */ int im_tile_cache( IMAGE *in, IMAGE *out, int tile_width, int tile_height, int max_tiles ) { VipsImage *x; if( vips_tilecache( in, &x, "tile_width", tile_width, "tile_height", tile_height, "max_tiles", max_tiles, "access", VIPS_ACCESS_SEQUENTIAL, "threaded", TRUE, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } static int im__affinei( VipsImage *in, VipsImage *out, VipsInterpolate *interpolate, VipsTransformation *trn ) { VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( out ), 2 ); VipsArea *oarea; gboolean repack; oarea = (VipsArea *) vips_array_int_newv( 4, trn->oarea.left, trn->oarea.top, trn->oarea.width, trn->oarea.height ); /* vips7 affine would repack labq and im_benchmark() depends upon * this. */ repack = in->Coding == IM_CODING_LABQ; if( vips_affine( in, &t[0], trn->a, trn->b, trn->c, trn->d, "interpolate", interpolate, "oarea", oarea, "odx", trn->odx, "ody", trn->ody, NULL ) ) { vips_area_unref( oarea ); return( -1 ); } vips_area_unref( oarea ); in = t[0]; if( repack ) { if( vips_colourspace( in, &t[1], VIPS_INTERPRETATION_LABQ, NULL ) ) return( -1 ); in = t[1]; } if( vips_image_write( in, out ) ) return( -1 ); return( 0 ); } int im_affinei( VipsImage *in, VipsImage *out, VipsInterpolate *interpolate, double a, double b, double c, double d, double odx, double ody, int ox, int oy, int ow, int oh ) { VipsTransformation trn; trn.iarea.left = 0; trn.iarea.top = 0; trn.iarea.width = in->Xsize; trn.iarea.height = in->Ysize; trn.oarea.left = ox; trn.oarea.top = oy; trn.oarea.width = ow; trn.oarea.height = oh; trn.a = a; trn.b = b; trn.c = c; trn.d = d; trn.idx = 0; trn.idy = 0; trn.odx = odx; trn.ody = ody; return( im__affinei( in, out, interpolate, &trn ) ); } int im_affinei_all( VipsImage *in, VipsImage *out, VipsInterpolate *interpolate, double a, double b, double c, double d, double odx, double ody ) { VipsTransformation trn; trn.iarea.left = 0; trn.iarea.top = 0; trn.iarea.width = in->Xsize; trn.iarea.height = in->Ysize; trn.a = a; trn.b = b; trn.c = c; trn.d = d; trn.idx = 0; trn.idy = 0; trn.odx = odx; trn.ody = ody; vips__transform_set_area( &trn ); return( im__affinei( in, out, interpolate, &trn ) ); } /* Still needed by some parts of mosaic. */ int vips__affine( VipsImage *in, VipsImage *out, VipsTransformation *trn ) { return( im__affinei( in, out, vips_interpolate_bilinear_static(), trn ) ); } int im_copy_file( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_copy_file( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_video_v4l1( IMAGE *im, const char *device, int channel, int brightness, int colour, int contrast, int hue, int ngrabs ) { im_error( "im_video_v4l1", "%s", _( "compiled without im_video_v4l1 support" ) ); return( -1 ); } int im_fwfft( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_fwfft( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_invfft( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_invfft( in, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_invfftr( IMAGE *in, IMAGE *out ) { VipsImage *x; if( vips_invfft( in, &x, "real", TRUE, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_freqflt( IMAGE *in, IMAGE *mask, IMAGE *out ) { VipsImage *x; if( vips_freqmult( in, mask, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_disp_ps( IMAGE *in, IMAGE *out ) { VipsImage *t; if( vips_spectrum( in, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_fractsurf( IMAGE *out, int size, double frd ) { VipsImage *t; if( vips_fractsurf( &t, size, size, frd, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_phasecor_fft( IMAGE *in1, IMAGE *in2, IMAGE *out ) { VipsImage *x; if( vips_phasecor( in1, in2, &x, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_cntlines( VipsImage *im, double *nolines, int flag ) { return( vips_countlines( im, nolines, flag == 0 ? VIPS_DIRECTION_HORIZONTAL : VIPS_DIRECTION_VERTICAL, NULL ) ); } int im_rank( IMAGE *in, IMAGE *out, int width, int height, int index ) { VipsImage *x; if( vips_rank( in, &x, width, height, index, NULL ) ) return( -1 ); if( im_copy( x, out ) ) { g_object_unref( x ); return( -1 ); } g_object_unref( x ); return( 0 ); } int im_rank_raw( IMAGE *in, IMAGE *out, int width, int height, int index ) { im_error( "im_rank_raw", "no compat function" ); return( -1 ); } vips-7.38.5/libvips/deprecated/package.c0000644000175000017500000006171612303140253015033 00000000000000/* VIPS package handling. * * J. Cupitt, 8/4/93. * * 18/2/04 JC * - now uses g_module_*() instead of dlopen() * 9/8/04 * - uses glib dir scanning stuff instead of dirent.h * 20/5/08 * - note_dependencies() does IMAGEVEC as well as IMAGE * 5/8/08 * - silent success in loading plugins if the dir isn't there */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #ifdef HAVE_SYS_PARAM_H #include #endif /*HAVE_SYS_PARAM_H*/ #include #include #include #include #include #include /* Standard VIPS packages. */ extern im_package im__arithmetic; extern im_package im__cimg; extern im_package im__colour; extern im_package im__conversion; extern im_package im__convolution; extern im_package im__deprecated; extern im_package im__format; extern im_package im__freq_filt; extern im_package im__histograms_lut; extern im_package im__inplace; extern im_package im__mask; extern im_package im__morphology; extern im_package im__mosaicing; extern im_package im__other; extern im_package im__resample; extern im_package im__video; /* im_guess_prefix() args. */ static im_arg_desc guess_prefix_args[] = { IM_INPUT_STRING( "argv0" ), IM_INPUT_STRING( "env_name" ), IM_OUTPUT_STRING( "PREFIX" ) }; /* Call im_guess_prefix() via arg vector. */ static int guess_prefix_vec( im_object *argv ) { const char *prefix = vips_guess_prefix( argv[0], argv[1] ); if( !prefix ) { argv[2] = NULL; return( -1 ); } argv[2] = im_strdup( NULL, prefix ); return( 0 ); } /* Description of im_guess_prefix. */ static im_function guess_prefix_desc = { "im_guess_prefix", /* Name */ "guess install area", /* Description */ 0, /* Flags */ guess_prefix_vec, /* Dispatch function */ VIPS_NUMBER( guess_prefix_args ), /* Size of arg list */ guess_prefix_args /* Arg list */ }; /* im_guess_libdir() args. */ static im_arg_desc guess_libdir_args[] = { IM_INPUT_STRING( "argv0" ), IM_INPUT_STRING( "env_name" ), IM_OUTPUT_STRING( "LIBDIR" ) }; /* Call im_guess_libdir() via arg vector. */ static int guess_libdir_vec( im_object *argv ) { const char *libdir = vips_guess_libdir( argv[0], argv[1] ); if( !libdir ) { argv[2] = NULL; return( -1 ); } argv[2] = im_strdup( NULL, libdir ); return( 0 ); } /* Description of im_guess_libdir. */ static im_function guess_libdir_desc = { "im_guess_libdir", /* Name */ "guess library area", /* Description */ 0, /* Flags */ guess_libdir_vec, /* Dispatch function */ VIPS_NUMBER( guess_libdir_args ),/* Size of arg list */ guess_libdir_args /* Arg list */ }; /* im_header_int() args. */ static im_arg_desc header_int_args[] = { IM_INPUT_STRING( "field" ), IM_INPUT_IMAGE( "image" ), IM_OUTPUT_INT( "value" ) }; /* Call im_header_int() via arg vector. */ static int header_int_vec( im_object *argv ) { return( im_header_int( (IMAGE *) argv[1], (const char *) argv[0], (int *) argv[2] ) ); } /* Description of im_header_int(). */ static im_function header_int_desc = { "im_header_int", /* Name */ "extract int fields from header", /* Description */ 0, /* Flags */ header_int_vec, /* Dispatch function */ VIPS_NUMBER( header_int_args ), /* Size of arg list */ header_int_args /* Arg list */ }; /* im_header_get_typeof() args. */ static im_arg_desc header_get_typeof_args[] = { IM_INPUT_STRING( "field" ), IM_INPUT_IMAGE( "image" ), IM_OUTPUT_INT( "gtype" ) }; /* Call im_header_get_typeof() via arg vector. */ static int header_get_typeof_vec( im_object *argv ) { int *out = (int *) argv[2]; *out = im_header_get_typeof( (IMAGE *) argv[1], (const char *) argv[0] ); return( 0 ); } /* Description of im_header_get_typeof(). */ static im_function header_get_typeof_desc = { "im_header_get_typeof", /* Name */ "return field type", /* Description */ 0, /* Flags */ header_get_typeof_vec, /* Dispatch function */ VIPS_NUMBER( header_get_typeof_args ),/* Size of arg list */ header_get_typeof_args /* Arg list */ }; /* im_header_double() args. */ static im_arg_desc header_double_args[] = { IM_INPUT_STRING( "field" ), IM_INPUT_IMAGE( "image" ), IM_OUTPUT_DOUBLE( "value" ) }; /* Call im_header_double() via arg vector. */ static int header_double_vec( im_object *argv ) { return( im_header_double( (IMAGE *) argv[1], (const char *) argv[0], (double *) argv[2] ) ); } /* Description of im_header_double(). */ static im_function header_double_desc = { "im_header_double", /* Name */ "extract double fields from header", /* Description */ 0, /* Flags */ header_double_vec, /* Dispatch function */ VIPS_NUMBER( header_double_args ), /* Size of arg list */ header_double_args /* Arg list */ }; /* im_header_string() args. */ static im_arg_desc header_string_args[] = { IM_INPUT_STRING( "field" ), IM_INPUT_IMAGE( "image" ), IM_OUTPUT_STRING( "value" ) }; /* Call im_header_string() via arg vector. */ static int header_string_vec( im_object *argv ) { char **out = (char **) &argv[2]; /* Actually, we call im_header_as_string(), so we can do any field and * not just the string-valued ones. */ if( im_header_as_string( (IMAGE *) argv[1], (const char *) argv[0], out ) ) return( -1 ); return( 0 ); } /* Description of im_header_string(). */ static im_function header_string_desc = { "im_header_string", /* Name */ "extract fields from headers as strings", /* Description */ 0, /* Flags */ header_string_vec, /* Dispatch function */ VIPS_NUMBER( header_string_args ),/* Size of arg list */ header_string_args /* Arg list */ }; /* im_history_get() args. */ static im_arg_desc history_get_args[] = { IM_INPUT_IMAGE( "image" ), IM_OUTPUT_STRING( "history" ) }; /* Call im_history_get() via arg vector. */ static int history_get_vec( im_object *argv ) { char **out = (char **) &argv[1]; const char *str; if( !(str = im_history_get( (IMAGE *) argv[0] )) || !(*out = im_strdup( NULL, str )) ) return( -1 ); return( 0 ); } /* Description of im_history_get(). */ static im_function history_get_desc = { "im_history_get", /* Name */ "return the image history as a string", /* Description */ 0, /* Flags */ history_get_vec, /* Dispatch function */ VIPS_NUMBER( history_get_args ),/* Size of arg list */ history_get_args /* Arg list */ }; /* im_getext() args. */ static im_arg_desc getext_args[] = { IM_INPUT_IMAGE( "image" ), IM_OUTPUT_STRING( "history" ) }; /* Call im_getext() via arg vector. */ static int getext_vec( im_object *argv ) { void **out = (void **) &argv[1]; int size; /* void/char confusion is fine. */ if( !(*out = im__read_extension_block( (IMAGE *) argv[0], &size )) ) return( -1 ); return( 0 ); } /* Description of im_getext(). */ static im_function getext_desc = { "im_getext", /* Name */ "return the image metadata XML as a string", /* Description */ 0, /* Flags */ getext_vec, /* Dispatch function */ VIPS_NUMBER( getext_args ), /* Size of arg list */ getext_args /* Arg list */ }; /* im_printdesc() args. */ static im_arg_desc printdesc_args[] = { IM_INPUT_IMAGE( "image" ), }; /* Call im_printdesc() via arg vector. */ static int printdesc_vec( im_object *argv ) { vips_object_print_dump( VIPS_OBJECT( argv[0] ) ); return( 0 ); } /* Description of im_printdesc(). */ static im_function printdesc_desc = { "im_printdesc", /* Name */ "print an image header to stdout", /* Description */ 0, /* Flags */ printdesc_vec, /* Dispatch function */ VIPS_NUMBER( printdesc_args ), /* Size of arg list */ printdesc_args /* Arg list */ }; /* im_version_string() args. */ static im_arg_desc version_string_args[] = { IM_OUTPUT_STRING( "version" ) }; /* Call im_version_string() via arg vector. */ static int version_string_vec( im_object *argv ) { if( !(argv[0] = im_strdup( NULL, vips_version_string() )) ) return( -1 ); return( 0 ); } /* Description of im_version_string. */ static im_function version_string_desc = { "im_version_string", /* Name */ "VIPS version string", /* Description */ 0, /* Flags */ version_string_vec, /* Dispatch function */ VIPS_NUMBER( version_string_args ),/* Size of arg list */ version_string_args /* Arg list */ }; /* im_version() args. */ static im_arg_desc version_args[] = { IM_INPUT_INT( "flag" ), IM_OUTPUT_INT( "version" ) }; /* Call im_version() via arg vector. */ static int version_vec( im_object *argv ) { int flag = *((int *) argv[0]); int *out = ((int *) argv[1]); int version = vips_version( flag ); if( version < 0 ) return( -1 ); *out = version; return( 0 ); } /* Description of im_version. */ static im_function version_desc = { "im_version", /* Name */ "VIPS version number", /* Description */ 0, /* Flags */ version_vec, /* Dispatch function */ VIPS_NUMBER( version_args ), /* Size of arg list */ version_args /* Arg list */ }; /* im_concurrency_get() args. */ static im_arg_desc concurrency_get_args[] = { IM_OUTPUT_INT( "concurrency" ) }; /* Call im_concurrency_get() via arg vector. */ static int concurrency_get_vec( im_object *argv ) { int *out = ((int *) argv[0]); *out = vips_concurrency_get(); return( 0 ); } /* Description of im_concurrency_get. */ static im_function concurrency_get_desc = { "im_concurrency_get", /* Name */ "get concurrency level", /* Description */ 0, /* Flags */ concurrency_get_vec, /* Dispatch function */ VIPS_NUMBER( concurrency_get_args ), /* Size of arg list */ concurrency_get_args /* Arg list */ }; /* im_cache() args. */ static im_arg_desc cache_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "tile_width" ), IM_INPUT_INT( "tile_height" ), IM_INPUT_INT( "max_tiles" ) }; /* Call im_cache() via arg vector. */ static int cache_vec( im_object *argv ) { int tile_width = *((int *) argv[2]); int tile_height = *((int *) argv[3]); int max_tiles = *((int *) argv[4]); return( im_cache( argv[0], argv[1], tile_width, tile_height, max_tiles ) ); } /* Description of im_cache. */ static im_function cache_desc = { "im_cache", /* Name */ "cache results of an operation",/* Description */ 0, /* Flags */ cache_vec, /* Dispatch function */ VIPS_NUMBER( cache_args ), /* Size of arg list */ cache_args /* Arg list */ }; /* im_binfile() args. */ static im_arg_desc binfile_args[] = { IM_INPUT_STRING( "filename" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ), IM_INPUT_INT( "bands" ), IM_INPUT_INT( "offset" ) }; /* Call im_binfile() via arg vector. */ static int binfile_vec( im_object *argv ) { int width = *((int *) argv[2]); int height = *((int *) argv[3]); int bands = *((int *) argv[4]); int offset = *((int *) argv[5]); VipsImage *im; if( !(im = vips_image_new_from_file_raw( argv[0], width, height, bands, offset )) ) return( -1 ); vips_object_local( argv[1], im ); if( im_copy( im, argv[1] ) ) return( -1 ); return( 0 ); } /* Description of im_binfile. */ static im_function binfile_desc = { "im_binfile", /* Name */ "open a headerless binary file",/* Description */ 0, /* Flags */ binfile_vec, /* Dispatch function */ VIPS_NUMBER( binfile_args ), /* Size of arg list */ binfile_args /* Arg list */ }; /* Package up iofuncs functions. */ static im_function *iofuncs_list[] = { &binfile_desc, &cache_desc, &concurrency_get_desc, &getext_desc, &guess_prefix_desc, &guess_libdir_desc, &header_get_typeof_desc, &header_int_desc, &header_double_desc, &header_string_desc, &history_get_desc, &printdesc_desc, &version_desc, &version_string_desc }; /* Package of io functions. */ static im_package im__iofuncs = { "iofuncs", VIPS_NUMBER( iofuncs_list ), iofuncs_list }; /* List of built-in VIPS packages. */ static im_package *built_in[] = { &im__arithmetic, #ifdef ENABLE_CXX &im__cimg, #endif /*ENABLE_CXX*/ &im__colour, &im__conversion, &im__convolution, &im__deprecated, &im__format, &im__freq_filt, &im__histograms_lut, &im__inplace, &im__iofuncs, &im__mask, &im__morphology, &im__mosaicing, &im__other, &im__resample, &im__video }; /* How we represent a loaded plugin. */ typedef struct _Plugin { GModule *module; /* As loaded by g_module_open() */ char *name; /* Name we loaded */ im_package *pack; /* Package table */ } Plugin; /* List of loaded plugins. */ static GSList *plugin_list = NULL; /* Free a plugin. */ static int plugin_free( Plugin *plug ) { char *name = plug->name ? plug->name : ""; if( plug->module ) { if( !g_module_close( plug->module ) ) { vips_error( "plugin", _( "unable to close plugin \"%s\"" ), name ); vips_error( "plugin", "%s", g_module_error() ); return( -1 ); } plug->module = NULL; } VIPS_FREE( plug->name ); plug->pack = NULL; g_free( plug ); plugin_list = g_slist_remove( plugin_list, plug ); return( 0 ); } /* Load a plugin. */ im_package * im_load_plugin( const char *name ) { Plugin *plug; #ifdef DEBUG printf( "im_load_plugin: \"%s\"\n", name ); #endif /*DEBUG*/ if( !g_module_supported() ) { vips_error( "plugin", "%s", _( "plugins not supported on this platform" ) ); return( NULL ); } /* Build a new plugin. */ plug = VIPS_NEW( NULL, Plugin ); plug->module = NULL; plug->name = g_strdup( name ); plug->pack = NULL; plugin_list = g_slist_prepend( plugin_list, plug ); /* Open library. */ if( !(plug->module = g_module_open( name, 0 )) ) { vips_error( "plugin", _( "unable to open plugin \"%s\"" ), name ); vips_error( "plugin", "%s", g_module_error() ); plugin_free( plug ); return( NULL ); } /* Find package. */ /* Bizarre double-cast stops a bogus gcc 4.1 compiler warning. */ if( !g_module_symbol( plug->module, "package_table", (gpointer *) ((void *) &plug->pack) ) ) { vips_error( "plugin", _( "unable to find symbol \"package_table\" " "in plugin \"%s\"" ), name ); vips_error( "plugin", "%s", g_module_error() ); plugin_free( plug ); return( NULL ); } /* Sanity check. */ if( !plug->pack->name || plug->pack->nfuncs < 0 || plug->pack->nfuncs > 10000 ) { vips_error( "plugin", _( "corrupted package table in plugin \"%s\"" ), name ); plugin_free( plug ); return( NULL ); } #ifdef DEBUG printf( "added package \"%s\"\n", plug->pack->name ); #endif /*DEBUG*/ return( plug->pack ); } /* Load all plugins in a directory ... look for '.plg' suffix. Error if we had * any probs. */ int im_load_plugins( const char *fmt, ... ) { va_list ap; char dir_name[VIPS_PATH_MAX]; GDir *dir; const char *name; int result; /* Silently succeed if we can't do modules. */ if( !g_module_supported() ) return( 0 ); va_start( ap, fmt ); (void) im_vsnprintf( dir_name, VIPS_PATH_MAX - 1, fmt, ap ); va_end( ap ); #ifdef DEBUG printf( "im_load_plugins: searching \"%s\"\n", dir_name ); #endif /*DEBUG*/ if( !(dir = g_dir_open( dir_name, 0, NULL )) ) /* Silent success for dir not there. */ return( 0 ); result = 0; while( (name = g_dir_read_name( dir )) ) if( im_ispostfix( name, ".plg" ) ) { char path[VIPS_PATH_MAX]; im_snprintf( path, VIPS_PATH_MAX - 1, "%s" G_DIR_SEPARATOR_S "%s", dir_name, name ); if( !im_load_plugin( path ) ) result = -1; } g_dir_close( dir ); return( result ); } /* Close all loaded plugins. */ int im_close_plugins( void ) { while( plugin_list ) if( plugin_free( (Plugin *) plugin_list->data ) ) return( -1 ); return( 0 ); } /* Apply a user-function to a plugin package. */ static void * apply_plugin( Plugin *plug, VSListMap2Fn fn, void *a ) { if( !plug->pack ) return( NULL ); else return( fn( plug->pack, a, NULL ) ); } /* Map a function over all packages. Map over plugins first, to allow * overriding of VIPS functions. */ void * im_map_packages( VSListMap2Fn fn, void *a ) { void *r = im_slist_map2( plugin_list, (VSListMap2Fn) apply_plugin, (void *) fn, a ); /* If not there, try main VIPS package list. */ if( !r ) { int i; for( i = 0; i < VIPS_NUMBER( built_in ); i++ ) if( (r = fn( built_in[i], a, NULL )) ) return( r ); } return( r ); } /* Search a package for a function. */ static im_function * search_package( im_package *pack, const char *name ) { int i; for( i = 0; i < pack->nfuncs; i++ ) if( strcmp( pack->table[i]->name, name ) == 0 ) return( pack->table[i] ); return( NULL ); } /* Search all packages for a function. */ im_function * im_find_function( const char *name ) { im_function *fn = im_map_packages( (VSListMap2Fn) search_package, (void *) name ); if( !fn ) { vips_error( "im_find_function", _( "\"%s\" not found" ), name ); return( NULL ); } return( fn ); } /* Test for package is of name. */ static im_package * package_name( im_package *pack, const char *name ) { if( strcmp( pack->name, name ) == 0 ) return( pack ); return( NULL ); } /* Find a package. */ im_package * im_find_package( const char *name ) { im_package *pack = im_map_packages( (VSListMap2Fn) package_name, (void *) name ); if( !pack ) { vips_error( "im_find_package", _( "\"%s\" not found" ), name ); return( NULL ); } return( pack ); } /* Test for package contains a function. */ static im_package * package_function( im_package *pack, const char *name ) { if( search_package( pack, name ) ) return( pack ); else return( NULL ); } /* Find a function's package by name. */ im_package * im_package_of_function( const char *name ) { im_package *pack = im_map_packages( (VSListMap2Fn) package_function, (void *) name ); if( !pack ) { vips_error( "im_package_of_function", _( "\"%s\" not found" ), name ); return( NULL ); } return( pack ); } /* Free any store we allocated for the argument list. */ int im_free_vargv( im_function *fn, im_object *vargv ) { int i; int vargc = fn->argc; /* Free all elements. */ for( i = 0; i < vargc; i++ ) if( vargv[i] ) { /* If there is local storage, free it. */ if( fn->argv[i].desc->size != 0 ) vips_free( vargv[i] ); /* NULL out pointer. */ vargv[i] = NULL; } return( 0 ); } /* Allocate any local store the args will need; NULL out all others. */ int im_allocate_vargv( im_function *fn, im_object *vargv ) { int i; int vargc = fn->argc; /* NULL out all pointers. */ for( i = 0; i < vargc; i++ ) vargv[i] = NULL; /* Allocate any space we will need. */ for( i = 0; i < vargc; i++ ) { int sz = fn->argv[i].desc->size; if( sz != 0 ) if( !(vargv[i] = vips_malloc( NULL, sz )) ) { /* Free anything we did allocate. */ (void) im_free_vargv( fn, vargv ); return( -1 ); } /* Zero memory. */ memset( vargv[i], 0, sz ); } return( 0 ); } /* Destroy the objects in the arg list. */ static int destroy_args( im_function *fn, im_object *vargv ) { int i; int vargc = fn->argc; /* Destroy all elements with destroy functions. */ for( i = 0; i < vargc; i++ ) if( vargv[i] ) /* If there's a destroy function for this type, * trigger it. */ if( fn->argv[i].desc->dest && fn->argv[i].desc->dest( vargv[i] ) ) return( -1 ); return( 0 ); } /* Init an im_object array from a set of command-line arguments. */ static int build_args( im_function *fn, im_object *vargv, int argc, char **argv ) { im_arg_desc *arg = fn->argv; int vargc = fn->argc; char *str; int i, j; /* Loop, constructing each im_arg. */ for( i = 0, j = 0; i < vargc; i++ ) { /* Find type for this arg. */ im_type_desc *type = arg[i].desc; /* Do we need to use up a command line argument? */ if( type->flags & IM_TYPE_ARG ) { if( !argv[j] ) { vips_error( "im_run_command", "%s", _( "too few arguments" ) ); return( -1 ); } str = argv[j++]; /* Init object. */ if( type->init && type->init( &vargv[i], str ) ) return( -1 ); } else { /* Init object with no arg. */ if( type->init && type->init( &vargv[i], "no arg" ) ) return( -1 ); } } /* Have we used up all the command-line args? */ if( argv[j] ) { vips_error( "im_run_command", "%s", _( "too many arguments" ) ); return( -1 ); } return( 0 ); } /* Make a region on sub, closed by callback on main. */ static int region_local_image( IMAGE *main, IMAGE *sub ) { VipsRegion *reg; if( !(reg = vips_region_new( sub )) ) return( -1 ); vips_object_local( main, reg ); return( 0 ); } /* vargv[i] is an output image on a PIO function ... make all input images * depend on it. */ static int note_dependencies( im_function *fn, im_object *vargv, int i ) { int j; for( j = 0; j < fn->argc; j++ ) { im_type_desc *type = fn->argv[j].desc; if( !(type->flags & IM_TYPE_OUTPUT) ) { if( strcmp( type->type, IM_TYPE_IMAGE ) == 0 ) { if( region_local_image( vargv[i], vargv[j] ) ) return( -1 ); } else if( strcmp( type->type, IM_TYPE_IMAGEVEC ) == 0 ) { im_imagevec_object *iv = vargv[j]; int k; for( k = 0; k < iv->n; k++ ) if( region_local_image( vargv[i], iv->vec[k] ) ) return( -1 ); } } } return( 0 ); } /* Call all defined print functions. */ static int print_args( im_function *fn, im_object *vargv ) { int i; int vargc = fn->argc; /* Print all elements. */ for( i = 0; i < vargc; i++ ) if( fn->argv[i].print && vargv[i] ) if( fn->argv[i].print( vargv[i] ) ) return( -1 ); return( 0 ); } /* Add to the hist of all output images. */ static int add_hist( im_function *fn, im_object *vargv, int argc, char **argv ) { int i; int vargc = fn->argc; /* Search for output images. */ for( i = 0; i < vargc; i++ ) if( strcmp( fn->argv[i].desc->type, IM_TYPE_IMAGE ) == 0 && (fn->argv[i].desc->flags & IM_TYPE_OUTPUT) ) if( im_updatehist( vargv[i], fn->name, argc, argv ) ) return( -1 ); return( 0 ); } /* Call a VIPS function. */ static int dispatch_function( im_function *fn, im_object *vargv, int argc, char **argv ) { /* Init memory from command line arguments. */ if( build_args( fn, vargv, argc, argv ) ) return( -1 ); /* If this is a PIO function, we need to make sure that we close * the input images after the output images, since the output image * may include delayed image conversion filters which will not run * until the output is closed. * * Do this by: * - for each output image * - for each input image * - create a region on the input, closed by a * close callback on the output image */ if( fn->flags & IM_FN_PIO ) { int i; for( i = 0; i < fn->argc; i++ ) { im_type_desc *type = fn->argv[i].desc; if( type->flags & IM_TYPE_OUTPUT && strcmp( type->type, IM_TYPE_IMAGE ) == 0 ) if( note_dependencies( fn, vargv, i ) ) return( -1 ); } } /* Call function. */ if( fn->disp( vargv ) ) return( -1 ); /* Print output. */ if( print_args( fn, vargv ) ) return( -1 ); /* Add to history of all output images. */ if( add_hist( fn, vargv, argc, argv ) ) return( -1 ); /* All ok! */ return( 0 ); } /* Run a command. */ int im_run_command( char *name, int argc, char **argv ) { static im_object object_array[IM_MAX_ARGS]; im_object *vargv = object_array; im_function *fn; /* Search packages for a matching function. */ if( !(fn = im_find_function( name )) ) return( -1 ); /* Allocate space for arguments. */ if( im_allocate_vargv( fn, vargv ) ) return( -1 ); /* Call it. */ if( dispatch_function( fn, vargv, argc, argv ) ) { destroy_args( fn, vargv ); im_free_vargv( fn, vargv ); return( -1 ); } /* Clean up and exit. */ if( destroy_args( fn, vargv ) ) return( -1 ); im_free_vargv( fn, vargv ); return( 0 ); } /** * im_version_string: * * Get the VIPS version as a static string, including a build date and time. * Do not free. * * Returns: a static version string */ const char * im_version_string( void ) { return( IM_VERSION_STRING ); } /** * im_version: * @flag: which field of the version to get * * Get the major, minor or micro library version, with @flag values 0, 1 and * 2. * * Returns: library version number */ int im_version( int flag ) { switch( flag ) { case 0: return( IM_MAJOR_VERSION ); case 1: return( IM_MINOR_VERSION ); case 2: return( IM_MICRO_VERSION ); default: vips_error( "im_version", "%s", _( "flag not 0, 1, 2" ) ); return( -1 ); } } vips-7.38.5/libvips/deprecated/im_vips2mask.c0000644000175000017500000001120712303140253016032 00000000000000/* im_vips2mask * * Author: J.Cupitt * Written on: 6/6/94 * Modified on: * * 16/10/06 * - allow 1xn-band images too * 23/2/07 * - oop, broken for nx1 m-band images * - now casts to double for you * 1/2/10 * - gtkdoc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** * im_vips2mask: * @in: input image * @filename: name for output mask * * Make a mask from an image. All images are cast to %IM_BANDFMT_DOUBLE * before processing. There are two cases for handling bands: * * If the image has a single band, im_vips2mask() will write a mask the same * size as the image. * * If the image has more than one band, it must be one pixel high or wide. In * this case the output mask uses that axis to represent band values. * * See also: im_mask2vips(), im_measure_area(). * * Returns: a #DOUBLEMASK with @outname set as the name, or NULL on error */ DOUBLEMASK * im_vips2mask( IMAGE *in, const char *filename ) { int width, height; DOUBLEMASK *out; /* double* only: cast if necessary. */ if( in->BandFmt != IM_BANDFMT_DOUBLE ) { IMAGE *t; if( !(t = im_open( "im_vips2mask", "p" )) ) return( NULL ); if( im_clip2fmt( in, t, IM_BANDFMT_DOUBLE ) || !(out = im_vips2mask( t, filename )) ) { im_close( t ); return( NULL ); } im_close( t ); return( out ); } /* Check the image. */ if( im_incheck( in ) || im_check_uncoded( "im_vips2mask", in ) ) return( NULL ); if( in->Bands == 1 ) { width = in->Xsize; height = in->Ysize; } else if( in->Xsize == 1 ) { width = in->Bands; height = in->Ysize; } else if( in->Ysize == 1 ) { width = in->Xsize; height = in->Bands; } else { im_error( "im_vips2mask", "%s", _( "one band, nx1, or 1xn images only" ) ); return( NULL ); } if( !(out = im_create_dmask( filename, width, height )) ) return( NULL ); if( in->Bands > 1 && in->Ysize == 1 ) { double *data = (double *) in->data; int x, y; /* Need to transpose: the image is RGBRGBRGB, we need RRRGGGBBB. */ for( y = 0; y < height; y++ ) for( x = 0; x < width; x++ ) out->coeff[x + y * width] = data[x * height + y]; } else memcpy( out->coeff, in->data, width * height * sizeof( double ) ); out->scale = vips_image_get_scale( in ); out->offset = vips_image_get_offset( in ); return( out ); } INTMASK * im_vips2imask( IMAGE *in, const char *filename ) { int width, height; INTMASK *out; double *data; int x, y; /* double* only: cast if necessary. */ if( in->BandFmt != IM_BANDFMT_DOUBLE ) { IMAGE *t; if( !(t = im_open( "im_vips2imask", "p" )) ) return( NULL ); if( im_clip2fmt( in, t, IM_BANDFMT_DOUBLE ) || !(out = im_vips2imask( t, filename )) ) { im_close( t ); return( NULL ); } im_close( t ); return( out ); } /* Check the image. */ if( im_incheck( in ) || im_check_uncoded( "im_vips2imask", in ) ) return( NULL ); if( in->Bands == 1 ) { width = in->Xsize; height = in->Ysize; } else if( in->Xsize == 1 ) { width = in->Bands; height = in->Ysize; } else if( in->Ysize == 1 ) { width = in->Xsize; height = in->Bands; } else { im_error( "im_vips2imask", "%s", _( "one band, nx1, or 1xn images only" ) ); return( NULL ); } data = (double *) in->data; if( !(out = im_create_imask( filename, width, height )) ) return( NULL ); for( y = 0; y < height; y++ ) for( x = 0; x < width; x++ ) if( in->Bands > 1 && in->Ysize == 1 ) /* Need to transpose: the image is RGBRGBRGB, * we need RRRGGGBBB. */ out->coeff[x + y * width] = VIPS_RINT( data[x * height + y] ); else out->coeff[x + y * width] = VIPS_RINT( data[x + y * width] ); out->scale = vips_image_get_scale( in ); out->offset = vips_image_get_offset( in ); return( out ); } vips-7.38.5/libvips/deprecated/morph_dispatch.c0000644000175000017500000001547512303140253016445 00000000000000/* VIPS function dispatch tables for morphology. * * J. Cupitt, 19/9/95 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /* Args to im_profile. */ static im_arg_desc profile_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "direction" ) }; /* Call im_profile via arg vector. */ static int profile_vec( im_object *argv ) { int dir = *((int *) argv[2]); return( im_profile( argv[0], argv[1], dir ) ); } /* Description of im_profile. */ static im_function profile_desc = { "im_profile", /* Name */ "find first horizontal/vertical edge", /* Descr. */ IM_FN_TRANSFORM, /* Flags */ profile_vec, /* Dispatch function */ IM_NUMBER( profile_args ), /* Size of arg list */ profile_args /* Arg list */ }; /* Args to im_erode. */ static im_arg_desc erode_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMASK( "mask" ) }; /* Call im_dilate via arg vector. */ static int dilate_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_dilate( argv[0], argv[1], mo->mask ) ); } /* Description of im_dilate. */ static im_function dilate_desc = { "im_dilate", /* Name */ "dilate image with mask, adding a black border", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ dilate_vec, /* Dispatch function */ IM_NUMBER( erode_args ), /* Size of arg list */ erode_args /* Arg list */ }; /* Call im_erode via arg vector. */ static int erode_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_erode( argv[0], argv[1], mo->mask ) ); } /* Description of im_erode. */ static im_function erode_desc = { "im_erode", /* Name */ "erode image with mask, adding a black border", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ erode_vec, /* Dispatch function */ IM_NUMBER( erode_args ), /* Size of arg list */ erode_args /* Arg list */ }; /* Args to im_cntlines. */ static im_arg_desc cntlines_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_DOUBLE( "nlines" ), IM_INPUT_INT( "direction" ) }; /* Call im_cntlines via arg vector. */ static int cntlines_vec( im_object *argv ) { double *out = (double *) argv[1]; int dir = *((int *) argv[2]); return( im_cntlines( argv[0], out, dir ) ); } /* Description of im_cntlines. */ static im_function cntlines_desc = { "im_cntlines", /* Name */ "count horizontal or vertical lines", 0, /* Flags */ cntlines_vec, /* Dispatch function */ IM_NUMBER( cntlines_args ), /* Size of arg list */ cntlines_args /* Arg list */ }; /* Args to im_rank. */ static im_arg_desc rank_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xsize" ), IM_INPUT_INT( "ysize" ), IM_INPUT_INT( "n" ) }; /* Call im_rank via arg vector. */ static int rank_vec( im_object *argv ) { int xsize = *((int *) argv[2]); int ysize = *((int *) argv[3]); int n = *((int *) argv[4]); return( im_rank( argv[0], argv[1], xsize, ysize, n ) ); } /* Description of im_rank. */ static im_function rank_desc = { "im_rank", /* Name */ "rank filter nth element of xsize/ysize window", IM_FN_PIO, /* Flags */ rank_vec, /* Dispatch function */ IM_NUMBER( rank_args ), /* Size of arg list */ rank_args /* Arg list */ }; /* Args for im_zerox. */ static im_arg_desc zerox_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "flag" ) }; /* Call im_zerox via arg vector. */ static int zerox_vec( im_object *argv ) { int flag = *((int *) argv[2]); return( im_zerox( argv[0], argv[1], flag ) ); } /* Description of im_zerox. */ static im_function zerox_desc = { "im_zerox", /* Name */ "find +ve or -ve zero crossings in image", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ zerox_vec, /* Dispatch function */ IM_NUMBER( zerox_args ), /* Size of arg list */ zerox_args /* Arg list */ }; static im_arg_desc maxvalue_args[] = { IM_INPUT_IMAGEVEC( "in" ), IM_OUTPUT_IMAGE( "out" ) }; static int maxvalue_vec( im_object *argv ) { im_imagevec_object *iv = (im_imagevec_object *) argv[0]; return( im_maxvalue( iv->vec, argv[1], iv->n ) ); } static im_function maxvalue_desc = { "im_maxvalue", /* Name */ "point-wise maximum value", /* Description */ IM_FN_PIO, /* Flags */ maxvalue_vec, /* Dispatch function */ IM_NUMBER( maxvalue_args ), /* Size of arg list */ maxvalue_args /* Arg list */ }; static im_arg_desc rank_image_args[] = { IM_INPUT_IMAGEVEC( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "index" ) }; static int rank_image_vec( im_object *argv ) { im_imagevec_object *iv = (im_imagevec_object *) argv[0]; int index = *((int *) argv[2]); return( im_rank_image( iv->vec, argv[1], iv->n, index ) ); } static im_function rank_image_desc = { "im_rank_image", /* Name */ "point-wise pixel rank", /* Description */ IM_FN_PIO, /* Flags */ rank_image_vec, /* Dispatch function */ IM_NUMBER( rank_image_args ), /* Size of arg list */ rank_image_args /* Arg list */ }; /* Args for im_label_regions(). */ static im_arg_desc label_regions_args[] = { IM_INPUT_IMAGE( "test" ), IM_OUTPUT_IMAGE( "mask" ), IM_OUTPUT_INT( "segments" ) }; /* Call im_label_regions() via arg vector. */ static int label_regions_vec( im_object *argv ) { IMAGE *test = argv[0]; IMAGE *mask = argv[1]; int *serial = (int *) argv[2]; return( im_label_regions( test, mask, serial ) ); } /* Description of im_label_regions(). */ static im_function label_regions_desc = { "im_label_regions", /* Name */ "number continuous regions in an image", 0, /* Flags */ label_regions_vec, /* Dispatch function */ IM_NUMBER( label_regions_args ),/* Size of arg list */ label_regions_args /* Arg list */ }; /* Package up all these functions. */ static im_function *morph_list[] = { &cntlines_desc, &dilate_desc, &rank_desc, &rank_image_desc, &maxvalue_desc, &label_regions_desc, &zerox_desc, &erode_desc, &profile_desc }; /* Package of functions. */ im_package im__morphology = { "morphology", IM_NUMBER( morph_list ), morph_list }; vips-7.38.5/libvips/deprecated/Makefile.in0000644000175000017500000007100412303144055015334 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvips/deprecated DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdeprecated_la_LIBADD = am_libdeprecated_la_OBJECTS = tone.lo freq_dispatch.lo im_linreg.lo \ im_point_bilinear.lo resample_dispatch.lo im_openslide2vips.lo \ im_lab_morph.lo deprecated_dispatch.lo morph_dispatch.lo \ colour_dispatch.lo convol_dispatch.lo im_zerox.lo \ arith_dispatch.lo hist_dispatch.lo im_maxpos_avg.lo \ wrapvips7.lo lazy.lo im_dif_std.lo im_simcontr.lo \ im_spatres.lo im_stretch3.lo im_clamp.lo cooc_funcs.lo \ glds_funcs.lo im_fav4.lo im_gadd.lo im_gaddim.lo im_gradcor.lo \ im_cmulnorm.lo im_printlines.lo im_convsub.lo im_line.lo \ im_measure.lo im_resize_linear.lo im_debugim.lo im_gfadd.lo \ im_setbox.lo rename.lo vips7compat.lo dispatch_types.lo \ package.lo im_bernd.lo im_thresh.lo im_slice.lo im_print.lo \ im_litecor.lo im_mask2vips.lo im_vips2mask.lo rotmask.lo \ rw_mask.lo im_matcat.lo im_matinv.lo im_matmul.lo im_mattrn.lo \ matalloc.lo mask_dispatch.lo fits.lo format.lo \ format_dispatch.lo im_analyze2vips.lo im_csv2vips.lo \ im_exr2vips.lo im_jpeg2vips.lo im_magick2vips.lo \ im_png2vips.lo im_ppm2vips.lo im_tiff2vips.lo im_vips2csv.lo \ im_vips2jpeg.lo im_vips2png.lo im_vips2ppm.lo im_vips2tiff.lo \ conver_dispatch.lo im_vips2dz.lo im_freq_mask.lo matlab.lo \ radiance.lo raw.lo libdeprecated_la_OBJECTS = $(am_libdeprecated_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdeprecated_la_SOURCES) DIST_SOURCES = $(libdeprecated_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ noinst_LTLIBRARIES = libdeprecated.la libdeprecated_la_SOURCES = \ tone.c \ freq_dispatch.c \ im_linreg.c \ im_point_bilinear.c \ resample_dispatch.c \ im_openslide2vips.c \ im_lab_morph.c \ deprecated_dispatch.c \ morph_dispatch.c \ colour_dispatch.c \ convol_dispatch.c \ im_zerox.c \ arith_dispatch.c \ hist_dispatch.c \ im_maxpos_avg.c \ wrapvips7.c \ lazy.c \ im_dif_std.c \ im_simcontr.c \ im_spatres.c \ im_stretch3.c \ im_clamp.c \ cooc_funcs.c \ glds_funcs.c \ im_fav4.c \ im_gadd.c \ im_gaddim.c \ im_gradcor.c \ im_cmulnorm.c \ im_printlines.c \ im_convsub.c \ im_line.c \ im_measure.c \ im_resize_linear.c \ im_debugim.c \ im_gfadd.c \ im_setbox.c \ rename.c \ vips7compat.c \ dispatch_types.c \ package.c \ im_bernd.c \ im_thresh.c \ im_slice.c \ im_print.c \ im_litecor.c \ im_mask2vips.c \ im_vips2mask.c \ rotmask.c \ rw_mask.c \ im_matcat.c \ im_matinv.c \ im_matmul.c \ im_mattrn.c \ matalloc.c \ mask_dispatch.c \ fits.c \ format.c \ format_dispatch.c \ im_analyze2vips.c \ im_csv2vips.c \ im_exr2vips.c \ im_jpeg2vips.c \ im_magick2vips.c \ im_png2vips.c \ im_ppm2vips.c \ im_tiff2vips.c \ im_vips2csv.c \ im_vips2jpeg.c \ im_vips2png.c \ im_vips2ppm.c \ im_vips2tiff.c \ conver_dispatch.c \ im_vips2dz.c \ im_freq_mask.c \ matlab.c \ radiance.c \ raw.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libvips/deprecated/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libvips/deprecated/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdeprecated.la: $(libdeprecated_la_OBJECTS) $(libdeprecated_la_DEPENDENCIES) $(EXTRA_libdeprecated_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdeprecated_la_OBJECTS) $(libdeprecated_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colour_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conver_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convol_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cooc_funcs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deprecated_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch_types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freq_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glds_funcs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_analyze2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_bernd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_clamp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_cmulnorm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_convsub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_csv2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_debugim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_dif_std.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_exr2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_fav4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_freq_mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_gadd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_gaddim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_gfadd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_gradcor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_jpeg2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_lab_morph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_linreg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_litecor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_magick2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_mask2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_matcat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_matinv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_matmul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_mattrn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_maxpos_avg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_measure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_openslide2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_png2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_point_bilinear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_ppm2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_printlines.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_resize_linear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_setbox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_simcontr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_slice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_spatres.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_stretch3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_thresh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_tiff2vips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_vips2csv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_vips2dz.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_vips2jpeg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_vips2mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_vips2png.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_vips2ppm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_vips2tiff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_zerox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lazy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matalloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matlab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/morph_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/package.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radiance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resample_dispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rw_mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tone.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vips7compat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapvips7.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/libvips/deprecated/im_linreg.c0000644000175000017500000004077312303140253015405 00000000000000/* im_linreg.c * * Copyright: 2006, The Nottingham Trent University * * Author: Tom Vajzovic * * Written on: 2006-12-26 * * 12/5/09 * - make x_anal() static, fix some signed/unsigned warnings * 3/9/09 * - gtkdoc comment */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /** HEADERS **/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include /** TYPES **/ typedef struct { unsigned int n; double *xs; double *difs; double mean; double nsig2; double err_term; } x_set; #define LINREG_SEQ( TYPE ) typedef struct { \ REGION **regs; \ TYPE **ptrs; \ size_t *skips; \ } linreg_seq_ ## TYPE LINREG_SEQ( gint8 ); LINREG_SEQ( guint8 ); LINREG_SEQ( gint16 ); LINREG_SEQ( guint16 ); LINREG_SEQ( gint32 ); LINREG_SEQ( guint32 ); LINREG_SEQ( float ); LINREG_SEQ( double ); /** LOCAL FUNCTION DECLARATIONS **/ static x_set *x_anal( IMAGE *im, double *xs, unsigned int n ); #define LINREG_START_DECL( TYPE ) static void * linreg_start_ ## TYPE( IMAGE *, void *, void * ); #define LINREG_GEN_DECL( TYPE ) static int linreg_gen_ ## TYPE( REGION *, void *, void *, void * ); #define LINREG_STOP_DECL( TYPE ) static int linreg_stop_ ## TYPE( void *, void *, void * ); #define INCR_ALL_DECL( TYPE ) static void incr_all_ ## TYPE( TYPE **ptrs, unsigned int n ) #define SKIP_ALL_DECL( TYPE ) static void skip_all_ ## TYPE( TYPE **ptrs, size_t *skips, unsigned int n ) LINREG_START_DECL( gint8 ); LINREG_START_DECL( guint8 ); LINREG_START_DECL( gint16 ); LINREG_START_DECL( guint16 ); LINREG_START_DECL( gint32 ); LINREG_START_DECL( guint32 ); LINREG_START_DECL( float ); LINREG_START_DECL( double ); LINREG_GEN_DECL( gint8 ); LINREG_GEN_DECL( guint8 ); LINREG_GEN_DECL( gint16 ); LINREG_GEN_DECL( guint16 ); LINREG_GEN_DECL( gint32 ); LINREG_GEN_DECL( guint32 ); LINREG_GEN_DECL( float ); LINREG_GEN_DECL( double ); LINREG_STOP_DECL( gint8 ); LINREG_STOP_DECL( guint8 ); LINREG_STOP_DECL( gint16 ); LINREG_STOP_DECL( guint16 ); LINREG_STOP_DECL( gint32 ); LINREG_STOP_DECL( guint32 ); LINREG_STOP_DECL( float ); LINREG_STOP_DECL( double ); INCR_ALL_DECL( gint8 ); INCR_ALL_DECL( guint8 ); INCR_ALL_DECL( gint16 ); INCR_ALL_DECL( guint16 ); INCR_ALL_DECL( gint32 ); INCR_ALL_DECL( guint32 ); INCR_ALL_DECL( float ); INCR_ALL_DECL( double ); SKIP_ALL_DECL( gint8 ); SKIP_ALL_DECL( guint8 ); SKIP_ALL_DECL( gint16 ); SKIP_ALL_DECL( guint16 ); SKIP_ALL_DECL( gint32 ); SKIP_ALL_DECL( guint32 ); SKIP_ALL_DECL( float ); SKIP_ALL_DECL( double ); /** EXPORTED FUNCTION DEFINITION **/ /** * im_linreg: * @ins: NULL-terminated array of input images * @out: results of analysis * @xs: X position of each image (pixel value is Y) * * Function to find perform pixelwise linear regression on an array of * single band images. The output is a seven-band douuble image * * TODO: figure out how this works and fix up these docs! */ int im_linreg( IMAGE **ins, IMAGE *out, double *xs ){ #define FUNCTION_NAME "im_linreg" int n; x_set *x_vals; if( im_poutcheck( out ) ) return( -1 ); for( n= 0; ins[ n ]; ++n ){ /* if( ! isfinite( xs[ n ] ) ){ im_error( FUNCTION_NAME, "invalid argument" ); return( -1 ); } */ if( im_pincheck( ins[ n ] ) ) return( -1 ); if( 1 != ins[ n ]-> Bands ){ im_error( FUNCTION_NAME, "image is not single band" ); return( -1 ); } if( ins[ n ]-> Coding ){ im_error( FUNCTION_NAME, "image is not uncoded" ); return( -1 ); } if( n ){ if( ins[ n ]-> BandFmt != ins[ 0 ]-> BandFmt ){ im_error( FUNCTION_NAME, "image band formats differ" ); return( -1 ); } } else { if( vips_bandfmt_iscomplex( ins[ 0 ]->BandFmt ) ){ im_error( FUNCTION_NAME, "image has non-scalar band format" ); return( -1 ); } } if( n && ( ins[ n ]-> Xsize != ins[ 0 ]-> Xsize || ins[ n ]-> Ysize != ins[ 0 ]-> Ysize ) ){ im_error( FUNCTION_NAME, "image sizes differ" ); return( -1 ); } } if( n < 3 ){ im_error( FUNCTION_NAME, "not enough input images" ); return( -1 ); } if( im_cp_desc_array( out, ins ) ) return( -1 ); out-> Bands= 7; out-> BandFmt= IM_BANDFMT_DOUBLE; out-> Type= 0; if( im_demand_hint_array( out, IM_THINSTRIP, ins ) ) return( -1 ); x_vals= x_anal( out, xs, n ); if( ! x_vals ) return( -1 ); switch( ins[ 0 ]-> BandFmt ){ #define LINREG_RET( TYPE ) return im_generate( out, linreg_start_ ## TYPE, linreg_gen_ ## TYPE, linreg_stop_ ## TYPE, ins, x_vals ) case IM_BANDFMT_CHAR: LINREG_RET( gint8 ); case IM_BANDFMT_UCHAR: LINREG_RET( guint8 ); case IM_BANDFMT_SHORT: LINREG_RET( gint16 ); case IM_BANDFMT_USHORT: LINREG_RET( guint16 ); case IM_BANDFMT_INT: LINREG_RET( gint32 ); case IM_BANDFMT_UINT: LINREG_RET( guint32 ); case IM_BANDFMT_FLOAT: LINREG_RET( float ); case IM_BANDFMT_DOUBLE: LINREG_RET( double ); default: /* keep -Wall happy */ return( -1 ); } #undef FUNCTION_NAME } /** LOCAL FUNCTION DECLARATIONS **/ static x_set *x_anal( IMAGE *im, double *xs, unsigned int n ){ unsigned int i; x_set *x_vals= IM_NEW( im, x_set ); if( ! x_vals ) return( NULL ); x_vals-> xs= IM_ARRAY( im, 2 * n, double ); if( ! x_vals-> xs ) return( NULL ); x_vals-> difs= x_vals-> xs + n; x_vals-> n= n; x_vals-> mean= 0.0; for( i= 0; i < n; ++i ){ x_vals-> xs[ i ]= xs[ i ]; x_vals-> mean+= xs[ i ]; } x_vals-> mean/= n; x_vals-> nsig2= 0.0; for( i= 0; i < n; ++i ){ x_vals-> difs[ i ]= xs[ i ] - x_vals-> mean; x_vals-> nsig2+= x_vals-> difs[ i ] * x_vals-> difs[ i ]; } x_vals-> err_term= ( 1.0 / (double) n ) + ( ( x_vals-> mean * x_vals-> mean ) / x_vals-> nsig2 ); return( x_vals ); } #define LINREG_START_DEFN( TYPE ) static void *linreg_start_ ## TYPE( IMAGE *out, void *a, void *b ){ \ IMAGE **ins= (IMAGE **) a; \ x_set *x_vals= (x_set *) b; \ linreg_seq_ ## TYPE *seq= IM_NEW( out, linreg_seq_ ## TYPE ); \ \ if( ! seq ) \ return NULL; \ \ seq-> regs= im_start_many( NULL, ins, NULL ); \ seq-> ptrs= IM_ARRAY( out, x_vals-> n, TYPE* ); \ seq-> skips= IM_ARRAY( out, x_vals-> n, size_t ); \ \ if( ! seq-> ptrs || ! seq-> regs || ! seq-> skips ){ \ linreg_stop_ ## TYPE( seq, NULL, NULL ); \ return NULL; \ } \ return (void *) seq; \ } #define N ( (double) n ) #define y(a) ( (double) (* seq-> ptrs[(a)] ) ) #define x(a) ( (double) ( x_vals-> xs[(a)] ) ) #define xd(a) ( (double) ( x_vals-> difs[(a)] ) ) #define Sxd2 ( x_vals-> nsig2 ) #define mean_x ( x_vals-> mean ) #define mean_y ( out[0] ) #define dev_y ( out[1] ) #define y_x0 ( out[2] ) #define d_y_x0 ( out[3] ) #define dy_dx ( out[4] ) #define d_dy_dx ( out[5] ) #define R ( out[6] ) #define LINREG_GEN_DEFN( TYPE ) static int linreg_gen_ ## TYPE( REGION *to_make, void *vseq, void *unrequired, void *b ){ \ linreg_seq_ ## TYPE *seq= (linreg_seq_ ## TYPE *) vseq; \ x_set *x_vals= (x_set *) b; \ unsigned int n= x_vals-> n; \ double *out= (double*) IM_REGION_ADDR_TOPLEFT( to_make ); \ size_t out_skip= IM_REGION_LSKIP( to_make ) / sizeof( double ); \ double *out_end= out + out_skip * to_make-> valid. height; \ double *out_stop; \ size_t out_n= IM_REGION_N_ELEMENTS( to_make ); \ unsigned int i; \ \ out_skip-= out_n; \ \ if( im_prepare_many( seq-> regs, & to_make-> valid ) ) \ return -1; \ \ for( i= 0; i < n; ++i ){ \ seq-> ptrs[ i ]= (TYPE*) IM_REGION_ADDR( seq-> regs[ i ], to_make-> valid. left, to_make-> valid. top ); \ seq-> skips[ i ]= ( IM_REGION_LSKIP( seq-> regs[ i ] ) / sizeof( TYPE ) ) - IM_REGION_N_ELEMENTS( seq-> regs[ i ] ); \ } \ \ for( ; out < out_end; out+= out_skip, skip_all_ ## TYPE( seq-> ptrs, seq-> skips, n ) ) \ for( out_stop= out + out_n; out < out_stop; out+= 7, incr_all_ ## TYPE( seq-> ptrs, n ) ){ \ double Sy= 0.0; \ double Sxd_y= 0.0; \ double Syd2= 0.0; \ double Sxd_yd= 0.0; \ double Se2= 0.0; \ \ for( i= 0; i < n; ++i ){ \ Sy+= y(i); \ Sxd_y+= xd(i) * y(i); \ } \ mean_y= Sy / N; \ dy_dx= Sxd_y / Sxd2; \ y_x0= mean_y - dy_dx * mean_x; \ \ for( i= 0; i < n; ++i ){ \ double yd= y(i) - mean_y; \ double e= y(i) - dy_dx * x(i) - y_x0; \ Syd2+= yd * yd; \ Sxd_yd+= xd(i) * yd; \ Se2+= e * e; \ } \ dev_y= sqrt( Syd2 / N ); \ Se2/= ( N - 2.0 ); \ d_dy_dx= sqrt( Se2 / Sxd2 ); \ d_y_x0= sqrt( Se2 * x_vals-> err_term ); \ R= Sxd_yd / sqrt( Sxd2 * Syd2 ); \ } \ return 0; \ } #define LINREG_STOP_DEFN( TYPE ) static int linreg_stop_ ## TYPE( void *vseq, void *a, void *b ){ \ linreg_seq_ ## TYPE *seq = (linreg_seq_ ## TYPE *) vseq; \ if( seq-> regs ) \ im_stop_many( seq-> regs, NULL, NULL ); \ return 0; \ } #define INCR_ALL_DEFN( TYPE ) static void incr_all_ ## TYPE( TYPE **ptrs, unsigned int n ){ \ TYPE **stop= ptrs + n; \ for( ; ptrs < stop; ++ptrs ) \ ++*ptrs; \ } #define SKIP_ALL_DEFN( TYPE ) static void skip_all_ ## TYPE( TYPE **ptrs, size_t *skips, unsigned int n ){ \ TYPE **stop= ptrs + n; \ for( ; ptrs < stop; ++ptrs, ++skips ) \ *ptrs+= *skips; \ } LINREG_START_DEFN( gint8 ); LINREG_START_DEFN( guint8 ); LINREG_START_DEFN( gint16 ); LINREG_START_DEFN( guint16 ); LINREG_START_DEFN( gint32 ); LINREG_START_DEFN( guint32 ); LINREG_START_DEFN( float ); LINREG_START_DEFN( double ); LINREG_GEN_DEFN( gint8 ); LINREG_GEN_DEFN( guint8 ); LINREG_GEN_DEFN( gint16 ); LINREG_GEN_DEFN( guint16 ); LINREG_GEN_DEFN( gint32 ); LINREG_GEN_DEFN( guint32 ); LINREG_GEN_DEFN( float ); LINREG_GEN_DEFN( double ); LINREG_STOP_DEFN( gint8 ); LINREG_STOP_DEFN( guint8 ); LINREG_STOP_DEFN( gint16 ); LINREG_STOP_DEFN( guint16 ); LINREG_STOP_DEFN( gint32 ); LINREG_STOP_DEFN( guint32 ); LINREG_STOP_DEFN( float ); LINREG_STOP_DEFN( double ); INCR_ALL_DEFN( gint8 ); INCR_ALL_DEFN( guint8 ); INCR_ALL_DEFN( gint16 ); INCR_ALL_DEFN( guint16 ); INCR_ALL_DEFN( gint32 ); INCR_ALL_DEFN( guint32 ); INCR_ALL_DEFN( float ); INCR_ALL_DEFN( double ); SKIP_ALL_DEFN( gint8 ); SKIP_ALL_DEFN( guint8 ); SKIP_ALL_DEFN( gint16 ); SKIP_ALL_DEFN( guint16 ); SKIP_ALL_DEFN( gint32 ); SKIP_ALL_DEFN( guint32 ); SKIP_ALL_DEFN( float ); SKIP_ALL_DEFN( double ); vips-7.38.5/libvips/deprecated/Makefile.am0000644000175000017500000000262712303141142015322 00000000000000noinst_LTLIBRARIES = libdeprecated.la libdeprecated_la_SOURCES = \ tone.c \ freq_dispatch.c \ im_linreg.c \ im_point_bilinear.c \ resample_dispatch.c \ im_openslide2vips.c \ im_lab_morph.c \ deprecated_dispatch.c \ morph_dispatch.c \ colour_dispatch.c \ convol_dispatch.c \ im_zerox.c \ arith_dispatch.c \ hist_dispatch.c \ im_maxpos_avg.c \ wrapvips7.c \ lazy.c \ im_dif_std.c \ im_simcontr.c \ im_spatres.c \ im_stretch3.c \ im_clamp.c \ cooc_funcs.c \ glds_funcs.c \ im_fav4.c \ im_gadd.c \ im_gaddim.c \ im_gradcor.c \ im_cmulnorm.c \ im_printlines.c \ im_convsub.c \ im_line.c \ im_measure.c \ im_resize_linear.c \ im_debugim.c \ im_gfadd.c \ im_setbox.c \ rename.c \ vips7compat.c \ dispatch_types.c \ package.c \ im_bernd.c \ im_thresh.c \ im_slice.c \ im_print.c \ im_litecor.c \ im_mask2vips.c \ im_vips2mask.c \ rotmask.c \ rw_mask.c \ im_matcat.c \ im_matinv.c \ im_matmul.c \ im_mattrn.c \ matalloc.c \ mask_dispatch.c \ fits.c \ format.c \ format_dispatch.c \ im_analyze2vips.c \ im_csv2vips.c \ im_exr2vips.c \ im_jpeg2vips.c \ im_magick2vips.c \ im_png2vips.c \ im_ppm2vips.c \ im_tiff2vips.c \ im_vips2csv.c \ im_vips2jpeg.c \ im_vips2png.c \ im_vips2ppm.c \ im_vips2tiff.c \ conver_dispatch.c \ im_vips2dz.c \ im_freq_mask.c \ matlab.c \ radiance.c \ raw.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ vips-7.38.5/libvips/deprecated/deprecated_dispatch.c0000644000175000017500000015223512303140253017414 00000000000000/* Function dispatch tables for deprecated operations. */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /* One image in, one out. */ static im_arg_desc one_in_one_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ) }; static im_arg_desc quadratic_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMAGE( "coeff" ) }; static int quadratic_vec( im_object *argv ) { return( im_quadratic( argv[0], argv[1], argv[2] ) ); } static im_function quadratic_desc = { "im_quadratic", /* Name */ "transform via quadratic", IM_FN_PIO, /* Flags */ quadratic_vec, /* Dispatch function */ IM_NUMBER( quadratic_args ), /* Size of arg list */ quadratic_args /* Arg list */ }; /* Two images in, one out. */ static im_arg_desc two_in_one_out[] = { IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_clip via arg vector. */ static int clip_vec( im_object *argv ) { return( im_clip( argv[0], argv[1] ) ); } /* Description of im_clip. */ static im_function clip_desc = { "im_clip", /* Name */ "convert to unsigned 8-bit integer", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_c2ps via arg vector. */ static int c2ps_vec( im_object *argv ) { return( im_c2ps( argv[0], argv[1] ) ); } /* Description of im_c2ps. */ static im_function c2ps_desc = { "im_c2ps", /* Name */ "find power spectrum of complex image", IM_FN_PTOP | IM_FN_PIO, /* Flags */ c2ps_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args for im_lhisteq. */ static im_arg_desc lhisteq_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ) }; /* Args for im_stdif. */ static im_arg_desc stdif_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "a" ), IM_INPUT_DOUBLE( "m0" ), IM_INPUT_DOUBLE( "b" ), IM_INPUT_DOUBLE( "s0" ), IM_INPUT_INT( "xw" ), IM_INPUT_INT( "yw" ) }; /* Args to im_erode. */ static im_arg_desc erode_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMASK( "mask" ) }; /* Args to im_rank. */ static im_arg_desc rank_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "xsize" ), IM_INPUT_INT( "ysize" ), IM_INPUT_INT( "n" ) }; /* Args for convolver with imask. */ static im_arg_desc conv_imask[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMASK( "matrix" ) }; /* Args for convolver with dmask. */ static im_arg_desc conv_dmask[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DMASK( "matrix" ) }; /* Call im_cmulnorm via arg vector. */ static int cmulnorm_vec( im_object *argv ) { return( im_cmulnorm( argv[0], argv[1], argv[2] ) ); } /* Description of im_cmulnorm. */ static im_function cmulnorm_desc = { "im_cmulnorm", /* Name */ N_( "multiply two complex images, normalising output" ), IM_FN_PIO, /* Flags */ cmulnorm_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Four images in, one out. */ static im_arg_desc fav4_args[] = { IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_INPUT_IMAGE( "in3" ), IM_INPUT_IMAGE( "in4" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_fav4 via arg vector. */ static int fav4_vec( im_object *argv ) { IMAGE *buf[4]; buf[0] = argv[0]; buf[1] = argv[1]; buf[2] = argv[2]; buf[3] = argv[3]; return( im_fav4( &buf[0], argv[4] ) ); } /* Description of im_fav4. */ static im_function fav4_desc = { "im_fav4", /* Name */ N_( "average of 4 images" ), 0, /* Flags */ fav4_vec, /* Dispatch function */ IM_NUMBER( fav4_args ), /* Size of arg list */ fav4_args /* Arg list */ }; /* Args for im_gadd(). */ static im_arg_desc gadd_args[] = { IM_INPUT_DOUBLE( "a" ), IM_INPUT_IMAGE( "in1" ), IM_INPUT_DOUBLE( "b" ), IM_INPUT_IMAGE( "in2" ), IM_INPUT_DOUBLE( "c" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_gadd() via arg vector. */ static int gadd_vec( im_object *argv ) { double a = *((double *) argv[0]); double b = *((double *) argv[2]); double c = *((double *) argv[4]); return( im_gadd( a, argv[1], b, argv[3], c, argv[5] ) ); } /* Description of im_gadd(). */ static im_function gadd_desc = { "im_gadd", /* Name */ N_( "calculate a*in1 + b*in2 + c = outfile" ), 0, /* Flags */ gadd_vec, /* Dispatch function */ IM_NUMBER( gadd_args ), /* Size of arg list */ gadd_args /* Arg list */ }; /* Args for im_litecor(). */ static im_arg_desc litecor_args[] = { IM_INPUT_IMAGE( "in" ), IM_INPUT_IMAGE( "white" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "clip" ), IM_INPUT_DOUBLE( "factor" ) }; /* Call im_litecor() via arg vector. */ static int litecor_vec( im_object *argv ) { int clip = *((int *) argv[3]); double factor = *((double *) argv[4]); return( im_litecor( argv[0], argv[1], argv[2], clip, factor ) ); } /* Description of im_litecor(). */ static im_function litecor_desc = { "im_litecor", /* Name */ N_( "calculate max(white)*factor*(in/white), if clip == 1" ), 0, /* Flags */ litecor_vec, /* Dispatch function */ IM_NUMBER( litecor_args ), /* Size of arg list */ litecor_args /* Arg list */ }; /* affine args */ static im_arg_desc affine_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "a" ), IM_INPUT_DOUBLE( "b" ), IM_INPUT_DOUBLE( "c" ), IM_INPUT_DOUBLE( "d" ), IM_INPUT_DOUBLE( "dx" ), IM_INPUT_DOUBLE( "dy" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_INT( "w" ), IM_INPUT_INT( "h" ) }; /* Call im_affine via arg vector. */ static int affine_vec( im_object *argv ) { double a = *((double *) argv[2]); double b = *((double *) argv[3]); double c = *((double *) argv[4]); double d = *((double *) argv[5]); double dx = *((double *) argv[6]); double dy = *((double *) argv[7]); int x = *((int *) argv[8]); int y = *((int *) argv[9]); int w = *((int *) argv[10]); int h = *((int *) argv[11]); return( im_affine( argv[0], argv[1], a, b, c, d, dx, dy, x, y, w, h ) ); } /* Description of im_affine. */ static im_function affine_desc = { "im_affine", /* Name */ "affine transform", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ affine_vec, /* Dispatch function */ IM_NUMBER( affine_args ), /* Size of arg list */ affine_args /* Arg list */ }; /* similarity args */ static im_arg_desc similarity_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "a" ), IM_INPUT_DOUBLE( "b" ), IM_INPUT_DOUBLE( "dx" ), IM_INPUT_DOUBLE( "dy" ) }; /* Call im_similarity via arg vector. */ static int similarity_vec( im_object *argv ) { double a = *((double *) argv[2]); double b = *((double *) argv[3]); double dx = *((double *) argv[4]); double dy = *((double *) argv[5]); return( im_similarity( argv[0], argv[1], a, b, dx, dy ) ); } /* Description of im_similarity. */ static im_function similarity_desc = { "im_similarity", /* Name */ "similarity transformation", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ similarity_vec, /* Dispatch function */ IM_NUMBER( similarity_args ), /* Size of arg list */ similarity_args /* Arg list */ }; /* similarity_area args */ static im_arg_desc similarity_area_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "a" ), IM_INPUT_DOUBLE( "b" ), IM_INPUT_DOUBLE( "dx" ), IM_INPUT_DOUBLE( "dy" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ), IM_INPUT_INT( "w" ), IM_INPUT_INT( "h" ) }; /* Call im_similarity_area via arg vector. */ static int similarity_area_vec( im_object *argv ) { double a = *((double *) argv[2]); double b = *((double *) argv[3]); double dx = *((double *) argv[4]); double dy = *((double *) argv[5]); int x = *((int *) argv[6]); int y = *((int *) argv[7]); int w = *((int *) argv[8]); int h = *((int *) argv[9]); return( im_similarity_area( argv[0], argv[1], a, b, dx, dy, x, y, w, h ) ); } /* Description of im_similarity_area. */ static im_function similarity_area_desc = { "im_similarity_area", /* Name */ "output area xywh of similarity transformation", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ similarity_area_vec, /* Dispatch function */ IM_NUMBER( similarity_area_args ), /* Size of arg list */ similarity_area_args /* Arg list */ }; static int icc_export_vec( im_object *argv ) { int intent = *((int *) argv[3]); return( im_icc_export( argv[0], argv[1], argv[2], intent ) ); } static im_arg_desc icc_export_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_STRING( "output_profile" ), IM_INPUT_INT( "intent" ) }; /* Description of im_icc_export. */ static im_function icc_export_desc = { "im_icc_export", /* Name */ "convert a float LAB to an 8-bit device image with an ICC profile", /* Description */ IM_FN_PIO, /* Flags */ icc_export_vec, /* Dispatch function */ IM_NUMBER( icc_export_args ), /* Size of arg list */ icc_export_args /* Arg list */ }; /* Args for im_segment(). */ static im_arg_desc segment_args[] = { IM_INPUT_IMAGE( "test" ), IM_OUTPUT_IMAGE( "mask" ), IM_OUTPUT_INT( "segments" ) }; /* Call im_segment() via arg vector. */ static int segment_vec( im_object *argv ) { IMAGE *test = argv[0]; IMAGE *mask = argv[1]; int *serial = (int *) argv[2]; return( im_segment( test, mask, serial ) ); } /* Description of im_segment(). */ static im_function segment_desc = { "im_segment", /* Name */ "number continuous regions in an image", 0, /* Flags */ segment_vec, /* Dispatch function */ IM_NUMBER( segment_args ),/* Size of arg list */ segment_args /* Arg list */ }; static int print_vec( im_object *argv ) { const char *message = argv[0]; char **out = (char **) &argv[1]; if( im_print( message ) ) return( -1 ); *out = im_strdup( NULL, "printed" ); return( 0 ); } static im_arg_desc print_arg_types[] = { IM_INPUT_STRING( "message" ), IM_OUTPUT_STRING( "result" ) }; static im_function print_desc = { "im_print", /* Name */ "print string to stdout", /* Description */ 0, /* Flags */ print_vec, /* Dispatch function */ IM_NUMBER( print_arg_types ), /* Size of arg list */ print_arg_types /* Arg list */ }; /* Call im_clip2dcm via arg vector. */ static int clip2dcm_vec( im_object *argv ) { return( im_clip2dcm( argv[0], argv[1] ) ); } /* Description of im_clip2dcm. */ static im_function clip2dcm_desc = { "im_clip2dcm", /* Name */ "convert to double complex", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2dcm_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_clip2cm via arg vector. */ static int clip2cm_vec( im_object *argv ) { return( im_clip2cm( argv[0], argv[1] ) ); } /* Description of im_clip2cm. */ static im_function clip2cm_desc = { "im_clip2cm", /* Name */ "convert to complex", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2cm_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_clip2us via arg vector. */ static int clip2us_vec( im_object *argv ) { return( im_clip2us( argv[0], argv[1] ) ); } /* Description of im_clip2us. */ static im_function clip2us_desc = { "im_clip2us", /* Name */ "convert to unsigned 16-bit integer", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2us_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_clip2ui via arg vector. */ static int clip2ui_vec( im_object *argv ) { return( im_clip2ui( argv[0], argv[1] ) ); } /* Description of im_clip2ui. */ static im_function clip2ui_desc = { "im_clip2ui", /* Name */ "convert to unsigned 32-bit integer", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2ui_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_clip2s via arg vector. */ static int clip2s_vec( im_object *argv ) { return( im_clip2s( argv[0], argv[1] ) ); } /* Description of im_clip2s. */ static im_function clip2s_desc = { "im_clip2s", /* Name */ "convert to signed 16-bit integer", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2s_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_clip2i via arg vector. */ static int clip2i_vec( im_object *argv ) { return( im_clip2i( argv[0], argv[1] ) ); } /* Description of im_clip2i. */ static im_function clip2i_desc = { "im_clip2i", /* Name */ "convert to signed 32-bit integer", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2i_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_clip2d via arg vector. */ static int clip2d_vec( im_object *argv ) { return( im_clip2d( argv[0], argv[1] ) ); } /* Description of im_clip2d. */ static im_function clip2d_desc = { "im_clip2d", /* Name */ "convert to double-precision float", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2d_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_clip2f via arg vector. */ static int clip2f_vec( im_object *argv ) { return( im_clip2f( argv[0], argv[1] ) ); } /* Description of im_clip2f. */ static im_function clip2f_desc = { "im_clip2f", /* Name */ "convert to single-precision float", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2f_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Call im_clip2c via arg vector. */ static int clip2c_vec( im_object *argv ) { return( im_clip2c( argv[0], argv[1] ) ); } /* Description of im_clip2c. */ static im_function clip2c_desc = { "im_clip2c", /* Name */ "convert to signed 8-bit integer", IM_FN_PTOP | IM_FN_PIO, /* Flags */ clip2c_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Args to im_thresh. */ static im_arg_desc thresh_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_DOUBLE( "threshold" ) }; /* Call im_thresh via arg vector. */ static int thresh_vec( im_object *argv ) { double t1 = *((double *) argv[2]); return( im_thresh( argv[0], argv[1], t1 ) ); } /* Description of im_thresh. */ static im_function thresh_desc = { "im_thresh", /* Name */ "slice an image at a threshold", 0, /* Flags */ thresh_vec, /* Dispatch function */ IM_NUMBER( thresh_args ), /* Size of arg list */ thresh_args /* Arg list */ }; /* Args to im_slice. */ static im_arg_desc slice_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_DOUBLE( "thresh1" ), IM_INPUT_DOUBLE( "thresh2" ) }; /* Call im_slice via arg vector. */ static int slice_vec( im_object *argv ) { double t1 = *((double *) argv[2]); double t2 = *((double *) argv[3]); return( im_slice( argv[0], argv[1], t1, t2 ) ); } /* Description of im_slice. */ static im_function slice_desc = { "im_slice", /* Name */ "slice an image using two thresholds", 0, /* Flags */ slice_vec, /* Dispatch function */ IM_NUMBER( slice_args ), /* Size of arg list */ slice_args /* Arg list */ }; /* Args for im_convsub. */ static im_arg_desc convsub_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_IMASK( "matrix" ), IM_INPUT_INT( "xskip" ), IM_INPUT_INT( "yskip" ) }; /* Call im_convsub via arg vector. */ static int convsub_vec( im_object *argv ) { im_mask_object *mo = argv[2]; int xskip = *((int *) argv[3]); int yskip = *((int *) argv[4]); return( im_convsub( argv[0], argv[1], mo->mask, xskip, yskip ) ); } /* Description of im_convsub. */ static im_function convsub_desc = { "im_convsub", /* Name */ "convolve uchar to uchar, sub-sampling by xskip, yskip", IM_FN_TRANSFORM, /* Flags */ convsub_vec, /* Dispatch function */ IM_NUMBER( convsub_args ), /* Size of arg list */ convsub_args /* Arg list */ }; /* Args to im_bernd. */ static im_arg_desc bernd_args[] = { IM_INPUT_STRING( "tiffname" ), IM_INPUT_INT( "left" ), IM_INPUT_INT( "top" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ) }; /* Call im_bernd via arg vector. */ static int bernd_vec( im_object *argv ) { char *name = argv[0]; int left = *((int *) argv[1]); int top = *((int *) argv[2]); int width = *((int *) argv[3]); int height = *((int *) argv[4]); return( im_bernd( name, left, top, width, height ) ); } /* Description of im_bernd. */ static im_function bernd_desc = { "im_bernd", /* Name */ "extract from pyramid as jpeg", /* Description */ 0, /* Flags */ bernd_vec, /* Dispatch function */ IM_NUMBER( bernd_args ), /* Size of arg list */ bernd_args /* Arg list */ }; /* Args for im_line. */ static im_arg_desc line_args[] = { IM_RW_IMAGE( "im" ), IM_INPUT_INT( "x1" ), IM_INPUT_INT( "y1" ), IM_INPUT_INT( "x2" ), IM_INPUT_INT( "y2" ), IM_INPUT_INT( "pelval" ) }; /* Call im_line via arg vector. */ static int line_vec( im_object *argv ) { int x1 = *((int *) argv[1]); int y1 = *((int *) argv[2]); int x2 = *((int *) argv[3]); int y2 = *((int *) argv[4]); int pel = *((int *) argv[5]); return( im_line( argv[0], x1, y1, x2, y2, pel ) ); } /* Description of im_line. */ static im_function line_desc = { "im_line", /* Name */ "draw line between points (x1,y1) and (x2,y2)", 0, /* Flags */ line_vec, /* Dispatch function */ IM_NUMBER( line_args ), /* Size of arg list */ line_args /* Arg list */ }; /* Args for im_resize_linear. */ static im_arg_desc resize_linear_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "X" ), IM_INPUT_INT( "Y" ) }; /* Call im_resize_linear via arg vector. */ static int resize_linear_vec( im_object *argv ) { int X = *((int *) argv[2]); int Y = *((int *) argv[3]); return( im_resize_linear( argv[0], argv[1], X, Y ) ); } /* Description of im_resize_linear. */ static im_function resize_linear_desc = { "im_resize_linear", /* Name */ "resize to X by Y pixels with linear interpolation", 0, /* Flags */ resize_linear_vec, /* Dispatch function */ IM_NUMBER( resize_linear_args ), /* Size of arg list */ resize_linear_args /* Arg list */ }; /* Args for im_insertplaceset. */ static im_arg_desc insertplaceset_args[] = { IM_INPUT_IMAGE( "main" ), IM_INPUT_IMAGE( "sub" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INTVEC( "x" ), IM_INPUT_INTVEC( "y" ) }; /* Call im_insertplaceplaceset via arg vector. */ static int insertplaceset_vec( im_object *argv ) { im_intvec_object *xv = (im_intvec_object *) argv[3]; im_intvec_object *yv = (im_intvec_object *) argv[4]; if( xv->n != yv->n ) { im_error( "im_insertplaceset", "%s", _( "vectors not same length" ) ); return( -1 ); } if( im_insertset( argv[0], argv[1], argv[2], xv->n, xv->vec, yv->vec ) ) return( -1 ); return( 0 ); } /* Description of im_insertplaceset. */ static im_function insertplaceset_desc = { "im_insertplaceset", /* Name */ "insert sub into main at every position in x, y", 0, /* Flags */ insertplaceset_vec, /* Dispatch function */ IM_NUMBER( insertplaceset_args ), /* Size of arg list */ insertplaceset_args /* Arg list */ }; /* Call im_spcor_raw via arg vector. */ static int spcor_raw_vec( im_object *argv ) { return( im_spcor_raw( argv[0], argv[1], argv[2] ) ); } /* Description of im_spcor_raw. */ static im_function spcor_raw_desc = { "im_spcor_raw", /* Name */ "normalised correlation of in2 within in1, no black padding", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ spcor_raw_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_gradcor_raw via arg vector. */ static int gradcor_raw_vec( im_object *argv ) { return( im_gradcor_raw( argv[0], argv[1], argv[2] ) ); } /* Description of im_gradcor_raw. */ static im_function gradcor_raw_desc = { "im_gradcor_raw", /* Name */ "non-normalised correlation of gradient of in2 within in1, no padding", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ gradcor_raw_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_fastcor_raw via arg vector. */ static int fastcor_raw_vec( im_object *argv ) { return( im_fastcor_raw( argv[0], argv[1], argv[2] ) ); } /* Description of im_fastcor_raw. */ static im_function fastcor_raw_desc = { "im_fastcor_raw", /* Name */ "fast correlate in2 within in1, no border", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ fastcor_raw_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_convsepf_raw via arg vector. */ static int convsepf_raw_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_convsepf_raw( argv[0], argv[1], mo->mask ) ); } /* Description of im_convsepf_raw. */ static im_function convsepf_raw_desc = { "im_convsepf_raw", /* Name */ "seperable convolution, with DOUBLEMASK, no border", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ convsepf_raw_vec, /* Dispatch function */ IM_NUMBER( conv_dmask ), /* Size of arg list */ conv_dmask /* Arg list */ }; /* Call im_convsep_raw via arg vector. */ static int convsep_raw_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_convsep_raw( argv[0], argv[1], mo->mask ) ); } /* Description of im_convsep_raw. */ static im_function convsep_raw_desc = { "im_convsep_raw", /* Name */ "seperable convolution, no border", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ convsep_raw_vec, /* Dispatch function */ IM_NUMBER( conv_imask ), /* Size of arg list */ conv_imask /* Arg list */ }; /* Call im_convf_raw via arg vector. */ static int convf_raw_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_convf_raw( argv[0], argv[1], mo->mask ) ); } /* Description of im_convf_raw. */ static im_function convf_raw_desc = { "im_convf_raw", /* Name */ "convolve, with DOUBLEMASK, no border", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ convf_raw_vec, /* Dispatch function */ IM_NUMBER( conv_dmask ), /* Size of arg list */ conv_dmask /* Arg list */ }; /* Call im_conv_raw via arg vector. */ static int conv_raw_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_conv_raw( argv[0], argv[1], mo->mask ) ); } /* Description of im_conv_raw. */ static im_function conv_raw_desc = { "im_conv_raw", /* Name */ "convolve, no border", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ conv_raw_vec, /* Dispatch function */ IM_NUMBER( conv_imask ), /* Size of arg list */ conv_imask /* Arg list */ }; /* Args to im_contrast_surface_raw. */ static im_arg_desc contrast_surface_raw_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "half_win_size" ), IM_INPUT_INT( "spacing" ) }; /* Call im_contrast_surface_raw via arg vector. */ static int contrast_surface_raw_vec( im_object *argv ) { int half_win_size = *((int *) argv[2]); int spacing = *((int *) argv[3]); return( im_contrast_surface_raw( argv[0], argv[1], half_win_size, spacing ) ); } /* Description of im_contrast_surface_raw. */ static im_function contrast_surface_raw_desc = { "im_contrast_surface_raw", /* Name */ "find high-contrast points in an image", IM_FN_PIO, /* Flags */ contrast_surface_raw_vec, /* Dispatch function */ IM_NUMBER( contrast_surface_raw_args ),/* Size of arg list */ contrast_surface_raw_args /* Arg list */ }; /* Call im_stdif_raw via arg vector. */ static int stdif_raw_vec( im_object *argv ) { double a = *((double *) argv[2]); double m0 = *((double *) argv[3]); double b = *((double *) argv[4]); double s0 = *((double *) argv[5]); int xw = *((int *) argv[6]); int yw = *((int *) argv[7]); return( im_stdif_raw( argv[0], argv[1], a, m0, b, s0, xw, yw ) ); } /* Description of im_stdif. */ static im_function stdif_raw_desc = { "im_stdif_raw", /* Name */ "statistical differencing, no border", IM_FN_PIO, /* Flags */ stdif_raw_vec, /* Dispatch function */ IM_NUMBER( stdif_args ), /* Size of arg list */ stdif_args /* Arg list */ }; /* Call im_lhisteq_raw via arg vector. */ static int lhisteq_raw_vec( im_object *argv ) { int xw = *((int *) argv[2]); int yw = *((int *) argv[3]); return( im_lhisteq_raw( argv[0], argv[1], xw, yw ) ); } /* Description of im_lhisteq_raw. */ static im_function lhisteq_raw_desc = { "im_lhisteq_raw", /* Name */ "local histogram equalisation, no border", IM_FN_PIO, /* Flags */ lhisteq_raw_vec, /* Dispatch function */ IM_NUMBER( lhisteq_args ), /* Size of arg list */ lhisteq_args /* Arg list */ }; /* Call im_rank_raw via arg vector. */ static int rank_raw_vec( im_object *argv ) { int xsize = *((int *) argv[2]); int ysize = *((int *) argv[3]); int n = *((int *) argv[4]); return( im_rank_raw( argv[0], argv[1], xsize, ysize, n ) ); } /* Description of im_rank_raw. */ static im_function rank_raw_desc = { "im_rank_raw", /* Name */ "rank filter nth element of xsize/ysize window, no border", IM_FN_PIO, /* Flags */ rank_raw_vec, /* Dispatch function */ IM_NUMBER( rank_args ), /* Size of arg list */ rank_args /* Arg list */ }; /* Call im_erode_raw via arg vector. */ static int erode_raw_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_erode_raw( argv[0], argv[1], mo->mask ) ); } /* Description of im_erode_raw. */ static im_function erode_raw_desc = { "im_erode_raw", /* Name */ "erode image with mask", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ erode_raw_vec, /* Dispatch function */ IM_NUMBER( erode_args ), /* Size of arg list */ erode_args /* Arg list */ }; /* Call im_dilate_raw via arg vector. */ static int dilate_raw_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_dilate_raw( argv[0], argv[1], mo->mask ) ); } /* Description of im_dilate_raw. */ static im_function dilate_raw_desc = { "im_dilate_raw", /* Name */ "dilate image with mask", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ dilate_raw_vec, /* Dispatch function */ IM_NUMBER( erode_args ), /* Size of arg list */ erode_args /* Arg list */ }; /* Call im_convsepf via arg vector. */ static int convsepf_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_convsepf( argv[0], argv[1], mo->mask ) ); } /* Description of im_convsepf. */ static im_function convsepf_desc = { "im_convsepf", /* Name */ "seperable convolution, with DOUBLEMASK", IM_FN_PIO | IM_FN_TRANSFORM, /* Flags */ convsepf_vec, /* Dispatch function */ IM_NUMBER( conv_dmask ), /* Size of arg list */ conv_dmask /* Arg list */ }; /* Call im_convf via arg vector. */ static int convf_vec( im_object *argv ) { im_mask_object *mo = argv[2]; return( im_convf( argv[0], argv[1], mo->mask ) ); } /* Description of im_convf. */ static im_function convf_desc = { "im_convf", /* Name */ "convolve, with DOUBLEMASK", IM_FN_TRANSFORM | IM_FN_PIO, /* Flags */ convf_vec, /* Dispatch function */ IM_NUMBER( conv_dmask ), /* Size of arg list */ conv_dmask /* Arg list */ }; /* Args for im_circle. */ static im_arg_desc circle_args[] = { IM_RW_IMAGE( "image" ), IM_INPUT_INT( "cx" ), IM_INPUT_INT( "cy" ), IM_INPUT_INT( "radius" ), IM_INPUT_INT( "intensity" ) }; /* Call im_circle via arg vector. */ static int circle_vec( im_object *argv ) { int cx = *((int *) argv[1]); int cy = *((int *) argv[2]); int radius = *((int *) argv[3]); int intensity = *((int *) argv[4]); return( im_circle( argv[0], cx, cy, radius, intensity ) ); } /* Description of im_circle. */ static im_function circle_desc = { "im_circle", /* Name */ "plot circle on image", 0, /* Flags */ circle_vec, /* Dispatch function */ IM_NUMBER( circle_args ), /* Size of arg list */ circle_args /* Arg list */ }; /* Args for im_flood_blob_copy(). */ static im_arg_desc flood_blob_copy_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "start_x" ), IM_INPUT_INT( "start_y" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_flood_blob_copy() via arg vector. */ static int flood_blob_copy_vec( im_object *argv ) { IMAGE *in = argv[0]; IMAGE *out = argv[1]; int start_x = *((int *) argv[2]); int start_y = *((int *) argv[3]); im_doublevec_object *dv = (im_doublevec_object *) argv[4]; PEL *ink; if( !(ink = im__vector_to_ink( "im_flood_blob_copy", in, dv->n, dv->vec )) ) return( -1 ); return( im_flood_blob_copy( in, out, start_x, start_y, ink ) ); } /* Description of im_flood_blob_copy(). */ static im_function flood_blob_copy_desc = { "im_flood_blob_copy", /* Name */ "flood with ink from start_x, start_y while pixel == start pixel", 0, /* Flags */ flood_blob_copy_vec, /* Dispatch function */ IM_NUMBER( flood_blob_copy_args ),/* Size of arg list */ flood_blob_copy_args /* Arg list */ }; /* Args for im_flood_copy(). */ static im_arg_desc flood_copy_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "start_x" ), IM_INPUT_INT( "start_y" ), IM_INPUT_DOUBLEVEC( "ink" ) }; /* Call im_flood_copy() via arg vector. */ static int flood_copy_vec( im_object *argv ) { IMAGE *in = argv[0]; IMAGE *out = argv[1]; int start_x = *((int *) argv[2]); int start_y = *((int *) argv[3]); im_doublevec_object *dv = (im_doublevec_object *) argv[4]; PEL *ink; if( !(ink = im__vector_to_ink( "im_flood_copy", in, dv->n, dv->vec )) ) return( -1 ); return( im_flood_copy( in, out, start_x, start_y, ink ) ); } /* Description of im_flood_copy(). */ static im_function flood_copy_desc = { "im_flood_copy", /* Name */ "flood with ink from start_x, start_y while pixel == start pixel", 0, /* Flags */ flood_copy_vec, /* Dispatch function */ IM_NUMBER( flood_copy_args ),/* Size of arg list */ flood_copy_args /* Arg list */ }; /* Args for im_flood_other_copy(). */ static im_arg_desc flood_other_copy_args[] = { IM_INPUT_IMAGE( "test" ), IM_INPUT_IMAGE( "mark" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "start_x" ), IM_INPUT_INT( "start_y" ), IM_INPUT_INT( "serial" ) }; /* Call im_flood_other_copy() via arg vector. */ static int flood_other_copy_vec( im_object *argv ) { IMAGE *test = argv[0]; IMAGE *mark = argv[1]; IMAGE *out = argv[2]; int start_x = *((int *) argv[3]); int start_y = *((int *) argv[4]); int serial = *((int *) argv[5]); return( im_flood_other_copy( test, mark, out, start_x, start_y, serial ) ); } /* Description of im_flood_other_copy(). */ static im_function flood_other_copy_desc = { "im_flood_other_copy", /* Name */ "flood mark with serial from start_x, start_y while pixel == start pixel", 0, /* Flags */ flood_other_copy_vec, /* Dispatch function */ IM_NUMBER( flood_other_copy_args ),/* Size of arg list */ flood_other_copy_args /* Arg list */ }; /* Args for im_insertplace. */ static im_arg_desc insertplace_args[] = { IM_RW_IMAGE( "main" ), IM_INPUT_IMAGE( "sub" ), IM_INPUT_INT( "x" ), IM_INPUT_INT( "y" ) }; /* Call im_insertplace via arg vector. */ static int insertplace_vec( im_object *argv ) { int x = *((int *) argv[2]); int y = *((int *) argv[3]); return( im_insertplace( argv[0], argv[1], x, y ) ); } /* Description of im_insertplace. */ static im_function insertplace_desc = { "im_insertplace", /* Name */ "draw image sub inside image main at position (x,y)", 0, /* Flags */ insertplace_vec, /* Dispatch function */ IM_NUMBER( insertplace_args ), /* Size of arg list */ insertplace_args /* Arg list */ }; /* Used to be called im_remainderconst_vec, stupidly. */ static int remainderconst_vec_vec( im_object *argv ) { im_doublevec_object *dv = (im_doublevec_object *) argv[2]; return( im_remainder_vec( argv[0], argv[1], dv->n, dv->vec ) ); } static im_arg_desc remainderconst_vec_args[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLEVEC( "x" ) }; static im_function remainderconst_vec_desc = { "im_remainderconst_vec", /* Name */ N_( "remainder after integer division by a vector of constants" ), /* Description */ IM_FN_PIO | IM_FN_PTOP, /* Flags */ remainderconst_vec_vec, /* Dispatch function */ IM_NUMBER( remainderconst_vec_args ),/* Size of arg list */ remainderconst_vec_args /* Arg list */ }; /* Args to im_mask2vips. */ static im_arg_desc mask2vips_args[] = { IM_INPUT_DMASK( "input" ), IM_OUTPUT_IMAGE( "output" ), }; /* Call im_mask2vips via arg vector. */ static int mask2vips_vec( im_object *argv ) { im_mask_object *mo = argv[0]; return( im_mask2vips( mo->mask, argv[1] ) ); } /* Description of im_mask2vips. */ static im_function mask2vips_desc = { "im_mask2vips", /* Name */ "convert DOUBLEMASK to VIPS image", 0, /* Flags */ mask2vips_vec, /* Dispatch function */ IM_NUMBER( mask2vips_args ), /* Size of arg list */ mask2vips_args /* Arg list */ }; /* Args to im_vips2mask. */ static im_arg_desc vips2mask_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_DMASK( "output" ), }; /* Call im_vips2mask via arg vector. */ static int vips2mask_vec( im_object *argv ) { im_mask_object *mo = argv[1]; if( !(mo->mask = im_vips2mask( argv[0], mo->name )) ) return( -1 ); return( 0 ); } /* Description of im_vips2mask. */ static im_function vips2mask_desc = { "im_vips2mask", /* Name */ "convert VIPS image to DOUBLEMASK", 0, /* Flags */ vips2mask_vec, /* Dispatch function */ IM_NUMBER( vips2mask_args ), /* Size of arg list */ vips2mask_args /* Arg list */ }; /* One image plus one constant in, one image out. */ static im_arg_desc int_in_one_out[] = { IM_INPUT_IMAGE( "in1" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_INT( "c" ) }; /* One image plus one constant in, one image out. */ static im_arg_desc double_in_one_out[] = { IM_INPUT_IMAGE( "in1" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLE( "c" ) }; /* One image plus doublevec in, one image out. */ static im_arg_desc vec_in_one_out[] = { IM_INPUT_IMAGE( "in" ), IM_OUTPUT_IMAGE( "out" ), IM_INPUT_DOUBLEVEC( "vec" ) }; /* Call im_andimage via arg vector. */ static int andimage_vec( im_object *argv ) { return( im_andimage( argv[0], argv[1], argv[2] ) ); } /* Description of im_andimage. */ static im_function andimage_desc = { "im_andimage", /* Name */ "bitwise and of two images", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ andimage_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_andimageconst via arg vector. */ static int andimageconst_vec( im_object *argv ) { int c = *((int *) argv[2]); return( im_andimageconst( argv[0], argv[1], c ) ); } /* Description of im_andconst. */ static im_function andimageconst_desc = { "im_andimageconst", /* Name */ "bitwise and of an image with a constant", IM_FN_PTOP | IM_FN_PIO, /* Flags */ andimageconst_vec, /* Dispatch function */ IM_NUMBER( int_in_one_out ), /* Size of arg list */ int_in_one_out /* Arg list */ }; /* Call im_andimage_vec via arg vector. */ static int andimage_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_andimage_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_andimageconst. */ static im_function andimage_vec_desc = { "im_andimage_vec", /* Name */ "bitwise and of an image with a vector constant", IM_FN_PTOP | IM_FN_PIO, /* Flags */ andimage_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_orimage via arg vector. */ static int orimage_vec( im_object *argv ) { return( im_orimage( argv[0], argv[1], argv[2] ) ); } /* Description of im_orimage. */ static im_function orimage_desc = { "im_orimage", /* Name */ "bitwise or of two images", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ orimage_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_orimageconst via arg vector. */ static int orimageconst_vec( im_object *argv ) { int c = *((int *) argv[2]); return( im_orimageconst( argv[0], argv[1], c ) ); } /* Description of im_orimageconst. */ static im_function orimageconst_desc = { "im_orimageconst", /* Name */ "bitwise or of an image with a constant", IM_FN_PTOP | IM_FN_PIO, /* Flags */ orimageconst_vec, /* Dispatch function */ IM_NUMBER( int_in_one_out ), /* Size of arg list */ int_in_one_out /* Arg list */ }; /* Call im_orimage_vec via arg vector. */ static int orimage_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_orimage_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_orimage_vec. */ static im_function orimage_vec_desc = { "im_orimage_vec", /* Name */ "bitwise or of an image with a vector constant", IM_FN_PTOP | IM_FN_PIO, /* Flags */ orimage_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_eorimage via arg vector. */ static int eorimage_vec( im_object *argv ) { return( im_eorimage( argv[0], argv[1], argv[2] ) ); } /* Description of im_eorimage. */ static im_function eorimage_desc = { "im_eorimage", /* Name */ "bitwise eor of two images", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ eorimage_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_eorimageconst via arg vector. */ static int eorimageconst_vec( im_object *argv ) { int c = *((int *) argv[2]); return( im_eorimageconst( argv[0], argv[1], c ) ); } /* Description of im_eorimageconst. */ static im_function eorimageconst_desc = { "im_eorimageconst", /* Name */ "bitwise eor of an image with a constant", IM_FN_PTOP | IM_FN_PIO, /* Flags */ eorimageconst_vec, /* Dispatch function */ IM_NUMBER( int_in_one_out ), /* Size of arg list */ int_in_one_out /* Arg list */ }; /* Call im_eorimage_vec via arg vector. */ static int eorimage_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_eorimage_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_eorimage_vec. */ static im_function eorimage_vec_desc = { "im_eorimage_vec", /* Name */ "bitwise eor of an image with a vector constant", IM_FN_PTOP | IM_FN_PIO, /* Flags */ eorimage_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_shiftleft via arg vector. */ static int shiftleft_vec( im_object *argv ) { int n = *((int *) argv[2]); return( im_shiftleft( argv[0], argv[1], n ) ); } /* Description of im_shiftleft. */ static im_function shiftleft_desc = { "im_shiftleft", /* Name */ "shift image n bits to left", IM_FN_PTOP | IM_FN_PIO, /* Flags */ shiftleft_vec, /* Dispatch function */ IM_NUMBER( int_in_one_out ), /* Size of arg list */ int_in_one_out /* Arg list */ }; /* Call im_shiftleft_vec via arg vector. */ static int shiftleft_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_shiftleft_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_shiftleft_vec. */ static im_function shiftleft_vec_desc = { "im_shiftleft_vec", /* Name */ "shift image array bits to left", IM_FN_PTOP | IM_FN_PIO, /* Flags */ shiftleft_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_shiftright via arg vector. */ static int shiftright_vec( im_object *argv ) { int n = *((int *) argv[2]); return( im_shiftright( argv[0], argv[1], n ) ); } /* Description of im_shiftright. */ static im_function shiftright_desc = { "im_shiftright", /* Name */ "shift integer image n bits to right", IM_FN_PTOP | IM_FN_PIO, /* Flags */ shiftright_vec, /* Dispatch function */ IM_NUMBER( int_in_one_out ), /* Size of arg list */ int_in_one_out /* Arg list */ }; /* Call im_shiftright_vec via arg vector. */ static int shiftright_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_shiftright_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_shiftright_vec. */ static im_function shiftright_vec_desc = { "im_shiftright_vec", /* Name */ "shift image array bits to right", IM_FN_PTOP | IM_FN_PIO, /* Flags */ shiftright_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_equal via arg vector. */ static int equal_vec( im_object *argv ) { return( im_equal( argv[0], argv[1], argv[2] ) ); } /* Description of im_equal. */ static im_function equal_desc = { "im_equal", /* Name */ "two images equal in value", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ equal_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_equalconst via arg vector. */ static int equalconst_vec( im_object *argv ) { double c = *((double *) argv[2]); return( im_equalconst( argv[0], argv[1], c ) ); } /* Description of im_equalconst. */ static im_function equalconst_desc = { "im_equalconst", /* Name */ "image equals const", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ equalconst_vec, /* Dispatch function */ IM_NUMBER( double_in_one_out ), /* Size of arg list */ double_in_one_out /* Arg list */ }; /* Call im_equal_vec via arg vector. */ static int equal_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_equal_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_equal_vec. */ static im_function equal_vec_desc = { "im_equal_vec", /* Name */ "image equals doublevec", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ equal_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_notequal via arg vector. */ static int notequal_vec( im_object *argv ) { return( im_notequal( argv[0], argv[1], argv[2] ) ); } /* Description of im_notequal. */ static im_function notequal_desc = { "im_notequal", /* Name */ "two images not equal in value",/* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ notequal_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_notequalconst via arg vector. */ static int notequalconst_vec( im_object *argv ) { double c = *((double *) argv[2]); return( im_notequalconst( argv[0], argv[1], c ) ); } /* Description of im_notequalconst. */ static im_function notequalconst_desc = { "im_notequalconst", /* Name */ "image does not equal const", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ notequalconst_vec, /* Dispatch function */ IM_NUMBER( double_in_one_out ), /* Size of arg list */ double_in_one_out /* Arg list */ }; /* Call im_notequal_vec via arg vector. */ static int notequal_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_notequal_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_notequal_vec. */ static im_function notequal_vec_desc = { "im_notequal_vec", /* Name */ "image does not equal doublevec", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ notequal_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_less via arg vector. */ static int less_vec( im_object *argv ) { return( im_less( argv[0], argv[1], argv[2] ) ); } /* Description of im_less. */ static im_function less_desc = { "im_less", /* Name */ "in1 less than in2 in value", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ less_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_lessconst via arg vector. */ static int lessconst_vec( im_object *argv ) { double c = *((double *) argv[2]); return( im_lessconst( argv[0], argv[1], c ) ); } /* Description of im_lessconst. */ static im_function lessconst_desc = { "im_lessconst", /* Name */ "in less than const", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ lessconst_vec, /* Dispatch function */ IM_NUMBER( double_in_one_out ), /* Size of arg list */ double_in_one_out /* Arg list */ }; /* Call im_less_vec via arg vector. */ static int less_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_less_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_less_vec. */ static im_function less_vec_desc = { "im_less_vec", /* Name */ "in less than doublevec", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ less_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_more via arg vector. */ static int more_vec( im_object *argv ) { return( im_more( argv[0], argv[1], argv[2] ) ); } /* Description of im_more. */ static im_function more_desc = { "im_more", /* Name */ "in1 more than in2 in value", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ more_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_moreconst via arg vector. */ static int moreconst_vec( im_object *argv ) { double c = *((double *) argv[2]); return( im_moreconst( argv[0], argv[1], c ) ); } /* Description of im_moreconst. */ static im_function moreconst_desc = { "im_moreconst", /* Name */ "in more than const", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ moreconst_vec, /* Dispatch function */ IM_NUMBER( double_in_one_out ), /* Size of arg list */ double_in_one_out /* Arg list */ }; /* Call im_more_vec via arg vector. */ static int more_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_more_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_more_vec. */ static im_function more_vec_desc = { "im_more_vec", /* Name */ "in more than doublevec", /* Description */ IM_FN_PTOP | IM_FN_PIO, /* Flags */ more_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_moreeq via arg vector. */ static int moreeq_vec( im_object *argv ) { return( im_moreeq( argv[0], argv[1], argv[2] ) ); } /* Description of im_moreeq. */ static im_function moreeq_desc = { "im_moreeq", /* Name */ "in1 more than or equal to in2 in value", IM_FN_PTOP | IM_FN_PIO, /* Flags */ moreeq_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_moreeqconst via arg vector. */ static int moreeqconst_vec( im_object *argv ) { double c = *((double *) argv[2]); return( im_moreeqconst( argv[0], argv[1], c ) ); } /* Description of im_moreeqconst. */ static im_function moreeqconst_desc = { "im_moreeqconst", /* Name */ "in more than or equal to const", IM_FN_PTOP | IM_FN_PIO, /* Flags */ moreeqconst_vec, /* Dispatch function */ IM_NUMBER( double_in_one_out ), /* Size of arg list */ double_in_one_out /* Arg list */ }; /* Call im_moreeq_vec via arg vector. */ static int moreeq_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_moreeq_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_moreeq_vec. */ static im_function moreeq_vec_desc = { "im_moreeq_vec", /* Name */ "in more than or equal to doublevec", IM_FN_PTOP | IM_FN_PIO, /* Flags */ moreeq_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* Call im_lesseq via arg vector. */ static int lesseq_vec( im_object *argv ) { return( im_lesseq( argv[0], argv[1], argv[2] ) ); } /* Description of im_lesseq. */ static im_function lesseq_desc = { "im_lesseq", /* Name */ "in1 less than or equal to in2 in value", IM_FN_PTOP | IM_FN_PIO, /* Flags */ lesseq_vec, /* Dispatch function */ IM_NUMBER( two_in_one_out ), /* Size of arg list */ two_in_one_out /* Arg list */ }; /* Call im_lesseqconst via arg vector. */ static int lesseqconst_vec( im_object *argv ) { double c = *((double *) argv[2]); return( im_lesseqconst( argv[0], argv[1], c ) ); } /* Description of im_lesseqconst. */ static im_function lesseqconst_desc = { "im_lesseqconst", /* Name */ "in less than or equal to const", IM_FN_PTOP | IM_FN_PIO, /* Flags */ lesseqconst_vec, /* Dispatch function */ IM_NUMBER( double_in_one_out ), /* Size of arg list */ double_in_one_out /* Arg list */ }; /* Call im_lesseq_vec via arg vector. */ static int lesseq_vec_vec( im_object *argv ) { im_doublevec_object *rv = (im_doublevec_object *) argv[2]; return( im_lesseq_vec( argv[0], argv[1], rv->n, rv->vec ) ); } /* Description of im_lesseq_vec. */ static im_function lesseq_vec_desc = { "im_lesseq_vec", /* Name */ "in less than or equal to doublevec", IM_FN_PTOP | IM_FN_PIO, /* Flags */ lesseq_vec_vec, /* Dispatch function */ IM_NUMBER( vec_in_one_out ), /* Size of arg list */ vec_in_one_out /* Arg list */ }; /* If-then-else args. */ static im_arg_desc ifthenelse_args[] = { IM_INPUT_IMAGE( "cond" ), IM_INPUT_IMAGE( "in1" ), IM_INPUT_IMAGE( "in2" ), IM_OUTPUT_IMAGE( "out" ) }; /* Call im_blend via arg vector. */ static int blend_vec( im_object *argv ) { return( im_blend( argv[0], argv[1], argv[2], argv[3] ) ); } /* Description of im_blend. */ static im_function blend_desc = { "im_blend", /* Name */ "use cond image to blend between images in1 and in2", IM_FN_PTOP | IM_FN_PIO, /* Flags */ blend_vec, /* Dispatch function */ IM_NUMBER( ifthenelse_args ), /* Size of arg list */ ifthenelse_args /* Arg list */ }; /* Call im_ifthenelse via arg vector. */ static int ifthenelse_vec( im_object *argv ) { return( im_ifthenelse( argv[0], argv[1], argv[2], argv[3] ) ); } /* Description of im_ifthenelse. */ static im_function ifthenelse_desc = { "im_ifthenelse", /* Name */ "use cond image to choose pels from image in1 or in2", IM_FN_PTOP | IM_FN_PIO, /* Flags */ ifthenelse_vec, /* Dispatch function */ IM_NUMBER( ifthenelse_args ), /* Size of arg list */ ifthenelse_args /* Arg list */ }; /* Call im_argb2rgba() via arg vector. */ static int argb2rgba_vec( im_object *argv ) { return( im_argb2rgba( argv[0], argv[1] ) ); } /* Description of im_argb2rgba. */ static im_function argb2rgba_desc = { "im_argb2rgba", /* Name */ "convert pre-multipled argb to png-style rgba", /* Description */ IM_FN_PIO, /* Flags */ argb2rgba_vec, /* Dispatch function */ IM_NUMBER( one_in_one_out ), /* Size of arg list */ one_in_one_out /* Arg list */ }; /* Package up all these functions. */ static im_function *deprecated_list[] = { &argb2rgba_desc, &flood_copy_desc, &flood_blob_copy_desc, &flood_other_copy_desc, &clip_desc, &c2ps_desc, &resize_linear_desc, &cmulnorm_desc, &fav4_desc, &gadd_desc, &icc_export_desc, &litecor_desc, &affine_desc, &clip2c_desc, &clip2cm_desc, &clip2d_desc, &clip2dcm_desc, &clip2f_desc, &clip2i_desc, &convsub_desc, &convf_desc, &convsepf_desc, &clip2s_desc, &clip2ui_desc, &insertplaceset_desc, &clip2us_desc, &print_desc, &slice_desc, &bernd_desc, &segment_desc, &line_desc, &thresh_desc, &convf_raw_desc, &conv_raw_desc, &contrast_surface_raw_desc, &convsepf_raw_desc, &convsep_raw_desc, &fastcor_raw_desc, &gradcor_raw_desc, &spcor_raw_desc, &lhisteq_raw_desc, &stdif_raw_desc, &rank_raw_desc, &dilate_raw_desc, &erode_raw_desc, &similarity_area_desc, &similarity_desc, &remainderconst_vec_desc, &mask2vips_desc, &vips2mask_desc, &insertplace_desc, &circle_desc, &andimage_desc, &andimageconst_desc, &andimage_vec_desc, &orimage_desc, &orimageconst_desc, &orimage_vec_desc, &eorimage_desc, &eorimageconst_desc, &eorimage_vec_desc, &shiftleft_vec_desc, &shiftleft_desc, &shiftright_vec_desc, &shiftright_desc, &blend_desc, &equal_desc, &equal_vec_desc, &equalconst_desc, &ifthenelse_desc, &less_desc, &less_vec_desc, &lessconst_desc, &lesseq_desc, &lesseq_vec_desc, &lesseqconst_desc, &more_desc, &more_vec_desc, &moreconst_desc, &moreeq_desc, &moreeq_vec_desc, &moreeqconst_desc, ¬equal_desc, ¬equal_vec_desc, ¬equalconst_desc, &quadratic_desc }; /* Package of functions. */ im_package im__deprecated = { "deprecated", IM_NUMBER( deprecated_list ), deprecated_list }; vips-7.38.5/libvips/deprecated/im_vips2ppm.c0000644000175000017500000000323112303140253015671 00000000000000/* Write a ppm file. * * 20/12/11 * - just a compat stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include int im_vips2ppm( IMAGE *in, const char *filename ) { int ascii; char name[FILENAME_MAX]; char mode[FILENAME_MAX]; /* Default to binary output ... much smaller. */ ascii = 0; /* Extract write mode from filename. */ im_filename_split( filename, name, mode ); if( strcmp( mode, "" ) != 0 ) { if( im_isprefix( "binary", mode ) ) ascii = 0; else if( im_isprefix( "ascii", mode ) ) ascii = 1; else { im_error( "im_vips2ppm", "%s", _( "bad mode string, " "should be \"binary\" or \"ascii\"" ) ); return( -1 ); } } return( vips_ppmsave( in, name, "ascii", ascii, NULL ) ); } vips-7.38.5/libvips/deprecated/im_line.c0000644000175000017500000000654612303140253015054 00000000000000/* @#) line drawer. adapted to draw for graphics system * @(#) Modified to be compatible with the vasari library * @(#) In order to use this function, the input file should have been set by * @(#) im_mmapinrw() * * Copyright: N. Dessipris * Written: 02/01/1990 * Modified : * 22/7/93 JC * - im_incheck() added * - externs removed * 16/8/94 JC * - im_incheck() changed to im_makerw() * 5/12/06 * - im_invalidate() after paint */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include int im_line(image, x1, y1, x2, y2, pelval) IMAGE *image; int x1, x2, y1, y2, pelval; { double x, y, dx, dy, m; long offset; double signx, signy; if( im_rwcheck( image ) ) return( -1 ); /* check coordinates */ if ( (x1 > image->Xsize)||(x1<0)||(y1 > image->Ysize)||(y1<0) ||(x2 > image->Xsize)||(x2<0)||(y2 > image->Ysize)||(y2<0) ) { im_error( "im_line", "%s", _( "invalid line cooordinates") ); return(-1); } if ((pelval > 255)||(pelval < 0)) { im_error( "im_line", "%s", _( "line intensity between 0 and 255") ); return(-1); } if (image->Bands != 1) { im_error( "im_line", "%s", _( "image should have one band only") ); return(-1); } dx = (double)(x2 - x1); dy = (double)(y2 - y1); if (dx < 0.0) signx = -1.0; else signx = 1.0; if (dy < 0.0) signy = -1.0; else signy = 1.0; if (dx == 0.0) { x = x1; y = y1; while (y != y2) { offset = (int)(x+.5) + ((int)(y +.5)) * image->Xsize; *(image->data + offset) = (PEL)pelval; y += signy; } /* Draw point (x2, y2) */ offset = x2 + y2 * image->Xsize; *(image->data + offset) = (PEL)pelval; return(0); } if (dy == 0.0) { y = y1; x = x1; while (x != x2) { offset = (int)(x+.5) + ((int)(y +.5)) * image->Xsize; *(image->data + offset) = (PEL)pelval; x += signx; } /* Draw point (x2, y2) */ offset = x2 + y2 * image->Xsize; *(image->data + offset) = (PEL)pelval; return(0); } if (fabs(dy) < fabs(dx)) { m = fabs(dy/dx)*signy; y = y1; x = x1; while (x != x2) { offset = (int)(x+.5) + ((int)(y +.5)) * image->Xsize; *(image->data + offset) = (PEL)pelval; x += signx; y += m; } } else { m = fabs(dx/dy)*signx; x = x1; y = y1; while (y != y2) { offset = (int)(x+.5) + ((int)(y +.5)) * image->Xsize; *(image->data + offset) = (PEL)pelval; x += m; y += signy; } } /* Draw point (x2, y2) */ offset = x2 + y2 * image->Xsize; *(image->data + offset) = (PEL)pelval; im_invalidate( image ); return(0); } vips-7.38.5/libvips/deprecated/im_matcat.c0000644000175000017500000000430212303140253015362 00000000000000/* matrix catenate * * 1994, K. Martinez * * 22/10/10 * - gtk-doc */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /** * im_matcat: * @top: input matrix * @bottom: input matrix * @filename: filename for output * * Matrix catenations. Returns a new matrix which is the two source matrices * joined together top-bottom. They must be the same width. * * See also: im_mattrn(), im_matmul(), im_matinv(). * * Returns: the joined mask on success, or NULL on error. */ DOUBLEMASK * im_matcat( DOUBLEMASK *top, DOUBLEMASK *bottom, const char *filename ) { int newxsize, newysize; DOUBLEMASK *mat; double *out; /* matrices must be same width */ if( top->xsize != bottom->xsize ) { im_error( "im_matcat", "%s", _( "matrices must be same width" ) ); return( NULL ); } newxsize = top->xsize; newysize = top->ysize + bottom->ysize; /* Allocate output matrix. */ if( !(mat = im_create_dmask( filename, newxsize, newysize )) ) return( NULL ); /* copy first matrix then add second on the end */ memcpy( mat->coeff, top->coeff, top->xsize * top->ysize * sizeof( double ) ); out = mat->coeff + top->xsize * top->ysize; memcpy( out, bottom->coeff, bottom->xsize * bottom->ysize * sizeof( double ) ); return( mat ); } vips-7.38.5/libvips/deprecated/raw.c0000644000175000017500000000277412303140253014230 00000000000000/* Read raw image. Just a wrapper over im_binfile(). * * 15/12/11 * - just a compat stub now */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include int im_raw2vips( const char *filename, IMAGE *out, int width, int height, int bpp, int offset ) { VipsImage *t; if( vips_rawload( filename, &t, width, height, bpp, "offset", offset, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } int im_vips2raw( IMAGE *in, int fd ) { return( vips_rawsave_fd( in, fd, NULL ) ); } vips-7.38.5/libvips/deprecated/lazy.c0000644000175000017500000001723512303140253014414 00000000000000/* lazy open/save ... compat funcs for old im_open() behaviour * * 30/11/11 * - cut from old image.c */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define VIPS_DEBUG */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include static gboolean vips_format_is_vips( VipsFormatClass *format ) { return( strcmp( VIPS_OBJECT_CLASS( format )->nickname, "vips" ) == 0 ); } /* Lazy open. */ /* What we track during a delayed open. */ typedef struct { VipsImage *image; VipsFormatClass *format;/* Read in pixels with this */ char *filename; /* Get pixels from here */ gboolean sequential; /* Sequential read requested */ VipsImage *real; /* The real decompressed image */ } Lazy; static void lazy_free_cb( VipsImage *image, Lazy *lazy ) { VIPS_DEBUG_MSG( "lazy_free: %p \"%s\"\n", lazy, lazy->filename ); g_free( lazy->filename ); VIPS_UNREF( lazy->real ); g_free( lazy ); } static Lazy * lazy_new( VipsImage *image, VipsFormatClass *format, const char *filename, gboolean sequential ) { Lazy *lazy; lazy = g_new( Lazy, 1 ); VIPS_DEBUG_MSG( "lazy_new: %p \"%s\"\n", lazy, filename ); lazy->image = image; lazy->format = format; lazy->filename = g_strdup( filename ); lazy->sequential = sequential; lazy->real = NULL; g_signal_connect( image, "close", G_CALLBACK( lazy_free_cb ), lazy ); return( lazy ); } static size_t disc_threshold( void ) { static gboolean done = FALSE; static size_t threshold; if( !done ) { const char *env; done = TRUE; /* 100mb default. */ threshold = 100 * 1024 * 1024; if( (env = g_getenv( "IM_DISC_THRESHOLD" )) ) threshold = vips__parse_size( env ); if( vips__disc_threshold ) threshold = vips__parse_size( vips__disc_threshold ); VIPS_DEBUG_MSG( "disc_threshold: %zd bytes\n", threshold ); } return( threshold ); } /* Make the real underlying image: either a direct disc file, or a temp file * somewhere. */ static VipsImage * lazy_real_image( Lazy *lazy ) { VipsImage *real; /* We open via disc if: * - 'sequential' is not set * - disc_threshold() has not been set to zero * - the format does not support lazy read * - the uncompressed image will be larger than disc_threshold() */ real = NULL; if( !lazy->sequential && disc_threshold() && !(vips_format_get_flags( lazy->format, lazy->filename ) & VIPS_FORMAT_PARTIAL) && VIPS_IMAGE_SIZEOF_IMAGE( lazy->image ) > disc_threshold() ) if( !(real = vips_image_new_temp_file( "%s.v" )) ) return( NULL ); /* Otherwise, fall back to a "p". */ if( !real && !(real = vips_image_new()) ) return( NULL ); return( real ); } /* Our start function ... do the lazy open, if necessary, and return a region * on the new image. */ static void * open_lazy_start( VipsImage *out, void *a, void *dummy ) { Lazy *lazy = (Lazy *) a; if( !lazy->real ) { if( !(lazy->real = lazy_real_image( lazy )) || lazy->format->load( lazy->filename, lazy->real ) || vips_image_pio_input( lazy->real ) ) { VIPS_UNREF( lazy->real ); return( NULL ); } } return( vips_region_new( lazy->real ) ); } /* Just copy. */ static int open_lazy_generate( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop ) { VipsRegion *ir = (VipsRegion *) seq; VipsRect *r = &or->valid; /* Ask for input we need. */ if( vips_region_prepare( ir, r ) ) return( -1 ); /* Attach output region to that. */ if( vips_region_region( or, ir, r, r->left, r->top ) ) return( -1 ); return( 0 ); } /* Lazy open ... init the header with the first OpenLazyFn, delay actually * decoding pixels with the second OpenLazyFn until the first generate(). */ static int vips_image_open_lazy( VipsImage *image, VipsFormatClass *format, const char *filename, gboolean sequential ) { Lazy *lazy; lazy = lazy_new( image, format, filename, sequential ); /* Is there a ->header() function? We need to do a lazy load. */ if( format->header ) { /* Read header fields to init the return image. */ if( format->header( filename, image ) ) return( -1 ); /* Then 'start' creates the real image and 'gen' paints 'image' * with pixels from the real image on demand. */ vips_image_pipelinev( image, image->dhint, NULL ); if( vips_image_generate( image, open_lazy_start, open_lazy_generate, vips_stop_one, lazy, NULL ) ) return( -1 ); } else if( format->load ) { if( format->load( filename, image ) ) return( -1 ); } else g_assert( 0 ); return( 0 ); } /* Lazy save. */ /* If we write to (eg.) TIFF, actually do the write * to a "p" and on "written" do im_vips2tiff() or whatever. Track save * parameters here. */ typedef struct { int (*save_fn)(); /* Save function */ char *filename; /* Save args */ } SaveBlock; /* From "written" callback: invoke a delayed save. */ static void vips_image_save_cb( VipsImage *image, int *result, SaveBlock *sb ) { if( sb->save_fn( image, sb->filename ) ) *result = -1; g_free( sb->filename ); g_free( sb ); } static void vips_attach_save( VipsImage *image, int (*save_fn)(), const char *filename ) { SaveBlock *sb; sb = g_new( SaveBlock, 1 ); sb->save_fn = save_fn; sb->filename = g_strdup( filename ); g_signal_connect( image, "written", G_CALLBACK( vips_image_save_cb ), sb ); } IMAGE * vips__deprecated_open_read( const char *filename, gboolean sequential ) { VipsFormatClass *format; if( !(format = vips_format_for_file( filename )) ) return( NULL ); if( vips_format_is_vips( format ) ) { /* For vips format, we can just the main vips path. */ return( vips_image_new_mode( filename, "rd" ) ); } else { /* For non-vips formats we must go via the old VipsFormat * system to make sure we support the "filename:options" * syntax. */ IMAGE *image; image = vips_image_new(); if( vips_image_open_lazy( image, format, filename, sequential ) ) { g_object_unref( image ); return( NULL ); } /* Yuk. Can't g_object_set() filename since it's after * construct. Just zap the new filename in. */ VIPS_FREE( image->filename ); image->filename = g_strdup( filename ); return( image ); } } IMAGE * vips__deprecated_open_write( const char *filename ) { VipsFormatClass *format; if( !(format = vips_format_for_name( filename )) ) return( NULL ); if( vips_format_is_vips( format ) ) /* For vips format, we can just the main vips path. */ return( vips_image_new_mode( filename, "w" ) ); else { /* For non-vips formats we must go via the old VipsFormat * system to make sure we support the "filename:options" * syntax. */ IMAGE *image; if( !(image = vips_image_new()) ) return( NULL ); vips_attach_save( image, format->save, filename ); return( image ); } } vips-7.38.5/libvips/deprecated/im_debugim.c0000644000175000017500000000652712303140253015540 00000000000000/* @(#) Function which prints in stdout the values of a picture * @(#) * @(#) For debuging only * @(#) is either memory mapped or in a buffer. * @(#) * @(#) void * @(#) im_debugim( in ) * @(#) IMAGE *in; * @(#) * * Copyright: 1991 N. Dessipris * * Author: N. Dessipris * Written on: 18/03/1991 * Modified on: * 15/4/93 J.Cupitt * - returns int, not void now, so error messages work * - detects im->data invalid. * 15/4/93 J.Cupitt * - uses %g format, not %f for printf() * 23/7/93 JC * - im_incheck() added */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include int im_debugim( IMAGE *in ) { /* Check our args. */ if( im_incheck( in ) ) return( -1 ); if( in->Coding != IM_CODING_NONE ) { im_error( "im_debugim", "%s", _( "input must be uncoded" ) ); return( -1 ); } /* What type? First define the loop we want to perform for all types. */ #define loopuc(TYPE) \ { TYPE *p = (TYPE *) in->data; \ int x, y, z; \ \ for ( y=0; yYsize; y++ ) {\ for ( x=0; xXsize; x++ ) {\ for ( z=0; zBands; z++ ) {\ fprintf(stderr, "%4d", (TYPE)*p++ );\ } \ } \ fprintf(stderr, "\n");\ } \ } #define loop(TYPE) \ { TYPE *p = (TYPE *) in->data; \ int x, y, z; \ \ for ( y=0; yYsize; y++ ) {\ for ( x=0; xXsize; x++ ) {\ for ( z=0; zBands; z++ ) {\ fprintf(stderr, "%g\t", (double)*p++ );\ } \ } \ fprintf(stderr, "\n");\ } \ } #define loopcmplx(TYPE) \ { TYPE *p = (TYPE *) in->data; \ int x, y, z; \ \ for ( y=0; yYsize; y++ ) {\ for ( x=0; xXsize; x++ ) {\ for ( z=0; zBands; z++ ) {\ fprintf(stderr,"re=%g\t",(double)*p++);\ fprintf(stderr,"im=%g\t",(double)*p++);\ } \ } \ fprintf(stderr, "\n");\ } \ } /* Now generate code for all types. */ switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: loopuc(unsigned char); break; case IM_BANDFMT_CHAR: loop(char); break; case IM_BANDFMT_USHORT: loop(unsigned short); break; case IM_BANDFMT_SHORT: loop(short); break; case IM_BANDFMT_UINT: loop(unsigned int); break; case IM_BANDFMT_INT: loop(int); break; case IM_BANDFMT_FLOAT: loop(float); break; case IM_BANDFMT_DOUBLE: loop(double); break; case IM_BANDFMT_COMPLEX: loopcmplx(float); break; case IM_BANDFMT_DPCOMPLEX: loopcmplx(double); break; default: im_error( "im_debugim", "%s", _( "unknown input format") ); return( -1 ); } return( 0 ); } vips-7.38.5/libvips/deprecated/matalloc.c0000644000175000017500000001120412303140253015217 00000000000000/* @(#) Programs for allocating and freeing matrices * @(#) pages 705- of numerical recipes in C 1998 * @(#) */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #define TINY 1.0e-200 /* @(#) Allocates and returns an pointer at the beginning of * @(#) an integer array array[nl,nh] or * @(#) float array array[nl,nh] or * @(#) double array array[nl,nh] * @(#) * @(#) Right call * @(#) int *im_ivector(nl, nh) * @(#) int nl, nh; * @(#) returns a pointer to an int array or NULL on error * @(#) * @(#) Right call * @(#) float *im_fvector(nl, nh) * @(#) int nl, nh; * @(#) returns a pointer to a float array or NULL on error * @(#) * @(#) Right call * @(#) double *im_dvector(nl, nh) * @(#) int nl, nh; * @(#) returns a pointer to a double array or NULL on error * @(#) * @(#) The following functions free the array allocated by the functions above * @(#) * @(#) void im_free_ivector(v, nl, nh) * @(#) int *v; * @(#) int nl, nh; * @(#) * @(#) void im_free_fvector(v, nl, nh) * @(#) float *v; * @(#) int nl, nh; * @(#) * @(#) void im_free_dvector(v, nl, nh) * @(#) double *v; * @(#) int nl, nh; * @(#) */ int * im_ivector(nl, nh) int nl, nh; { int *v; v = (int *)im_malloc(NULL,(unsigned)(nh - nl + 1) * sizeof(int)); if (v == NULL) return(NULL); else return(v-nl); } float *im_fvector(nl, nh) int nl, nh; { float *v; v = (float *)im_malloc(NULL,(unsigned)(nh - nl + 1) * sizeof(float)); if (v == NULL) return(NULL); else return(v-nl); } double *im_dvector(nl, nh) int nl, nh; { double *v; v = (double *)im_malloc(NULL,(unsigned)(nh - nl + 1) * sizeof(double)); if (v == NULL) return(NULL); else return(v-nl); } void im_free_ivector(v, nl, nh) int *v; int nl, nh; { im_free((char*) (v+nl)); } void im_free_fvector(v, nl, nh) float *v; int nl, nh; { im_free((char*) (v+nl)); } void im_free_dvector(v, nl, nh) double *v; int nl, nh; { im_free((char*) (v+nl)); } /* @(#) Allocates and returns an pointer at the beginning of * @(#) an int, float or double, two dimensional matrix[nrl,nrh][ncl,nch] * @(#) * @(#) Right call * @(#) int **im_imat_alloc(nrl, nrh, ncl, nch) * @(#) int nrl, nrh, ncl, nch; * @(#) returns a pointer to an int matrix or NULL on error * @(#) * @(#) float **im_fmat_alloc(nrl, nrh, ncl, nch) * @(#) int nrl, nrh, ncl, nch; * @(#) returns a pointer to an int matrix or NULL on error * @(#) * @(#) double **im_dmat_alloc(nrl, nrh, ncl, nch) * @(#) int nrl, nrh, ncl, nch; * @(#) returns a pointer to a double matrix or NULL on error * @(#) * @(#) The following routines free the matrix allocated by the functions above * @(#) void im_free_imat(m, nrl, nrh, ncl, nch) * @(#) int **m; * @(#) int nrl, nrh, ncl, nch; * @(#) * @(#) void im_free_fmat(m, nrl, nrh, ncl, nch) * @(#) float **m; * @(#) int nrl, nrh, ncl, nch; * @(#) * @(#) void im_free_dmat(m, nrl, nrh, ncl, nch) * @(#) double **m; * @(#) int nrl, nrh, ncl, nch; * @(#) */ int **im_imat_alloc(nrl, nrh, ncl, nch) int nrl, nrh, ncl, nch; { int i; int **m; m = (int**)im_malloc(NULL,(unsigned)(nrh-nrl+1) * sizeof(int *)); if (m == NULL) return(NULL); m -= nrl; for (i=nrl; i<=nrh; i++) { m[i] = (int *)im_malloc(NULL,(unsigned) (nch-ncl+1) * sizeof(int)); if (m[i] == NULL) return(NULL); m[i] -= ncl; } return (m); } void im_free_imat(m, nrl, nrh, ncl, nch) int **m; int nrl, nrh, ncl, nch; { int i; for (i=nrh; i>=nrl; i--) im_free((char*) (m[i]+ncl)); im_free((char*) (m+nrl)); } float **im_fmat_alloc(nrl, nrh, ncl, nch) int nrl, nrh, ncl, nch; { int i; float **m; m = (float**)im_malloc(NULL,(unsigned)(nrh-nrl+1) * sizeof(float *)); if (m == NULL) return(NULL); m -= nrl; for (i=nrl; i<=nrh; i++) { m[i] = (float *)im_malloc(NULL,(unsigned) (nch-ncl+1) * sizeof(float)); if (m[i] == NULL) return(NULL); m[i] -= ncl; } return (m); } void im_free_fmat(m, nrl, nrh, ncl, nch) float **m; int nrl, nrh, ncl, nch; { int i; for (i=nrh; i>=nrl; i--) im_free((char*) (m[i]+ncl)); im_free((char*) (m+nrl)); } double **im_dmat_alloc(nrl, nrh, ncl, nch) int nrl, nrh, ncl, nch; { int i; double **m; m = (double**)im_malloc(NULL,(unsigned)(nrh-nrl+1) * sizeof(double *)); if (m == NULL) return(NULL); m -= nrl; for (i=nrl; i<=nrh; i++) { m[i] = (double *)im_malloc(NULL,(unsigned) (nch-ncl+1) * sizeof(double)); if (m[i] == NULL) return(NULL); m[i] -= ncl; } return (m); } void im_free_dmat(m, nrl, nrh, ncl, nch) double **m; int nrl, nrh, ncl, nch; { int i; for (i=nrh; i>=nrl; i--) im_free((char*) (m[i]+ncl)); im_free((char*) (m+nrl)); } vips-7.38.5/libvips/deprecated/im_stretch3.c0000644000175000017500000001651512303140253015661 00000000000000/* Function to stretch an image by 3%, and displace in x and y. Cubic * interpolation with a seperable mask. Displacements are: * * 0 <= xdisp < 1.0. * 0 <= ydisp < 1.0. * * Each horizontal block of 33 pixels is stretched to 34. * * Written by Ahmed Abbood * August-1994 * * Any unsigned short image. Output image is 3 pixels smaller because of * convolution, but x is larger by 3%: * * out->Xsize = 34*(in->Xsize / 33) + in->Xsize%33 - 3; * out->Ysize = in->Ysize - 3; * * 20/10/95 JC * - was not freeing regions correctly * - tidied up * 29/3/96 JC * - completely rewritten ... now produces correct result, and is 2x * faster * 18/9/97 JC * - added to VIPS library as im_stretch3 */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include /* Data for the cubic interpolation function. */ typedef struct { IMAGE *in; double dx, dy; int xoff, yoff; /* Mask we start with for this disp. */ int mask[34][4]; /* Fixed-point masks for each output pixel */ } StretchInfo; /* Per-thread info. */ typedef struct seq_info { StretchInfo *sin; REGION *ir; unsigned short *buf; int lsk; } SeqInfo; static int stretch_stop( void *vseq, void *a, void *b ) { SeqInfo *seq = (SeqInfo *) vseq; IM_FREEF( im_region_free, seq->ir ); return( 0 ); } static void * stretch_start( IMAGE *out, void *a, void *b ) { IMAGE *in = (IMAGE *) a; StretchInfo *sin = (StretchInfo *) b; SeqInfo *seq; if( !(seq = IM_NEW( out, SeqInfo )) ) return( NULL ); seq->sin = sin; seq->ir = im_region_create( in ); seq->lsk = IM_IMAGE_N_ELEMENTS( out ); seq->buf = IM_ARRAY( out, 4*seq->lsk, unsigned short ); if( !seq->buf || !seq->ir ) { stretch_stop( seq, NULL, NULL ); return( NULL ); } return( (void *)seq ); } /* Stretch a line of pels into a line in the buffer. */ static void make_xline( StretchInfo *sin, unsigned short *p, unsigned short *q, int w, int m ) { int bands = sin->in->Bands; int tot; int x, b; /* Offsets for subsequent pixels. */ int o1 = 1*bands; int o2 = 2*bands; int o3 = 3*bands; for( x = 0; x < w; x++ ) { int *mask = &sin->mask[m][0]; unsigned short *p1 = p; /* Loop for this pel. */ for( b = 0; b < bands; b++ ) { tot = p1[0]*mask[0] + p1[o1]*mask[1] + p1[o2]*mask[2] + p1[o3]*mask[3]; tot = IM_MAX( 0, tot ); p1++; *q++ = (tot + 16384) >> 15; } /* Move to next mask. */ m++; if( m == 34 ) /* Back to mask 0, reuse this input pel. */ m = 0; else /* Move to next input pel. */ p += bands; } } /* As above, but do the vertical resample. lsk is how much we add to move down * a line in p, boff is [0,1,2,3] for which buffer line is mask[3]. */ static void make_yline( StretchInfo *sin, int lsk, int boff, unsigned short *p, unsigned short *q, int w, int m ) { int bands = sin->in->Bands; int we = w * bands; int *mask = &sin->mask[m][0]; int tot; int x; /* Offsets for subsequent pixels. Down a line each time. */ int o0 = lsk*boff; int o1 = lsk*((boff + 1) % 4); int o2 = lsk*((boff + 2) % 4); int o3 = lsk*((boff + 3) % 4); for( x = 0; x < we; x++ ) { tot = p[o0]*mask[0] + p[o1]*mask[1] + p[o2]*mask[2] + p[o3]*mask[3]; tot = IM_MAX( 0, tot ); p++; *q++ = (tot + 16384) >> 15; } } static int stretch_gen( REGION *or, void *vseq, void *a, void *b ) { SeqInfo *seq = (SeqInfo *) vseq; StretchInfo *sin = (StretchInfo *) b; REGION *ir = seq->ir; Rect *r = &or->valid; Rect r1; int x, y; /* What mask do we start with? */ int xstart = (r->left + sin->xoff) % 34; /* What part of input do we need for this output? */ r1.left = r->left - (r->left + sin->xoff) / 34; r1.top = r->top; x = IM_RECT_RIGHT( r ); x = x - (x + sin->xoff) / 34 + 3; r1.width = x - r1.left; r1.height = r->height + 3; if( im_prepare( ir, &r1 ) ) return( -1 ); /* Fill the first three lines of the buffer. */ for( y = 0; y < 3; y++ ) { unsigned short *p = (unsigned short *) IM_REGION_ADDR( ir, r1.left, y + r1.top ); unsigned short *q = seq->buf + seq->lsk*y; make_xline( sin, p, q, r->width, xstart ); } /* Loop for subsequent lines: stretch a new line of x pels, and * interpolate a line of output from the 3 previous xes plus this new * one. */ for( y = 0; y < r->height; y++ ) { /* Next line of fresh input pels. */ unsigned short *p = (unsigned short *) IM_REGION_ADDR( ir, r1.left, y + r1.top + 3 ); /* Next line we fill in the buffer. */ int boff = (y + 3)%4; unsigned short *q = seq->buf + boff*seq->lsk; /* Line we write in output. */ unsigned short *q1 = (unsigned short *) IM_REGION_ADDR( or, r->left, y + r->top ); /* Process this new xline. */ make_xline( sin, p, q, r->width, xstart ); /* Generate new output line. */ make_yline( sin, seq->lsk, boff, seq->buf, q1, r->width, sin->yoff ); } return( 0 ); } int im_stretch3( IMAGE *in, IMAGE *out, double dx, double dy ) { StretchInfo *sin; int i; /* Check our args. */ if( in->Coding != IM_CODING_NONE || in->BandFmt != IM_BANDFMT_USHORT ) { im_error( "im_stretch3", "%s", _( "not uncoded unsigned short" ) ); return( -1 ); } if( dx < 0 || dx >= 1.0 || dy < 0 || dy >= 1.0 ) { im_error( "im_stretch3", "%s", _( "displacements out of range [0,1)" ) ); return( -1 ); } if( im_piocheck( in, out ) ) return( -1 ); /* Prepare the output image. */ if( im_cp_desc( out, in ) ) return( -1 ); out->Xsize = 34*(in->Xsize / 33) + in->Xsize%33 - 3; out->Ysize = in->Ysize - 3; if( im_demand_hint( out, IM_FATSTRIP, in, NULL ) ) return( -1 ); if( !(sin = IM_NEW( out, StretchInfo )) ) return( -1 ); /* Save parameters. */ sin->in = in; sin->dx = dx; sin->dy = dy; /* Generate masks. */ for( i = 0; i < 34; i++ ) { double d = (34.0 - i)/34.0; double y0 = 2.0*d*d - d - d*d*d; double y1 = 1.0 - 2.0*d*d + d*d*d; double y2 = d + d*d - d*d*d; double y3 = -d*d + d*d*d; sin->mask[i][0] = IM_RINT( y0 * 32768 ); sin->mask[i][1] = IM_RINT( y1 * 32768 ); sin->mask[i][2] = IM_RINT( y2 * 32768 ); sin->mask[i][3] = IM_RINT( y3 * 32768 ); } /* Which mask do we start with to apply these offsets? */ sin->xoff = (dx * 33.0) + 0.5; sin->yoff = (dy * 33.0) + 0.5; if( im_generate( out, stretch_start, stretch_gen, stretch_stop, in, sin ) ) return( -1 ); return( 0 ); } vips-7.38.5/libvips/deprecated/im_ppm2vips.c0000644000175000017500000000440612303140253015676 00000000000000/* Read a ppm file. * * 20/12/11 * - just a compat stub */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include int im_ppm2vips( const char *filename, IMAGE *out ) { VipsImage *t; if( vips_ppmload( filename, &t, NULL ) ) return( -1 ); if( vips_image_write( t, out ) ) { g_object_unref( t ); return( -1 ); } g_object_unref( t ); return( 0 ); } static int isppm( const char *filename ) { return( vips_foreign_is_a( "ppmload", filename ) ); } static VipsFormatFlags ppm_flags( const char *filename ) { return( (VipsFormatFlags) vips_foreign_flags( "ppmload", filename ) ); } static const char *ppm_suffs[] = { ".ppm", ".pgm", ".pbm", ".pfm", NULL }; /* ppm format adds no new members. */ typedef VipsFormat VipsFormatPpm; typedef VipsFormatClass VipsFormatPpmClass; static void vips_format_ppm_class_init( VipsFormatPpmClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "ppm"; object_class->description = _( "PPM/PBM/PNM/PFM" ); format_class->is_a = isppm; format_class->load = im_ppm2vips; format_class->save = im_vips2ppm; format_class->get_flags = ppm_flags; format_class->suffs = ppm_suffs; } static void vips_format_ppm_init( VipsFormatPpm *object ) { } G_DEFINE_TYPE( VipsFormatPpm, vips_format_ppm, VIPS_TYPE_FORMAT ); vips-7.38.5/libvips/deprecated/im_gradcor.c0000644000175000017500000005763712303140253015555 00000000000000/* im_gradcor * * Copyright: 2007 Nottingham Trent University * * Author: Tom Vajzovic * Written on: 2007-06-07 * 3/2/10 * - gtkdoc * - cleanups */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /** HEADERS **/ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include /** LOCAL TYPES **/ typedef struct { REGION *reg; int *region_xgrad; int *region_ygrad; size_t region_xgrad_area; size_t region_ygrad_area; } gradcor_seq_t; /** LOCAL FUNCTION DECLARATIONS **/ static void *gradcor_start( IMAGE *out, void *vptr_large, void *unrequired ); static int gradcor_stop( void *vptr_seq, void *unrequired, void *unreq2 ); static int gradcor_gen( REGION *to_make, void *vptr_seq, void *unrequired, void *vptr_grads ); #define XGRAD_GEN_DECLARATION( TYPE ) static int xgrad_gen_ ## TYPE( REGION *to_make, void *vptr_make_from, void *unrequired, void *unreq2 ) #define YGRAD_GEN_DECLARATION( TYPE ) static int ygrad_gen_ ## TYPE( REGION *to_make, void *vptr_make_from, void *unrequired, void *unreq2 ) XGRAD_GEN_DECLARATION( guint8 ); YGRAD_GEN_DECLARATION( guint8 ); XGRAD_GEN_DECLARATION( gint8 ); YGRAD_GEN_DECLARATION( gint8 ); XGRAD_GEN_DECLARATION( guint16 ); YGRAD_GEN_DECLARATION( guint16 ); XGRAD_GEN_DECLARATION( gint16 ); YGRAD_GEN_DECLARATION( gint16 ); XGRAD_GEN_DECLARATION( guint32 ); YGRAD_GEN_DECLARATION( guint32 ); XGRAD_GEN_DECLARATION( gint32 ); YGRAD_GEN_DECLARATION( gint32 ); #if 0 XGRAD_GEN_DECLARATION( float ); YGRAD_GEN_DECLARATION( float ); XGRAD_GEN_DECLARATION( double ); YGRAD_GEN_DECLARATION( double ); #endif /** EXPORTED FUNCTION DEFINITIONS **/ int im_gradcor_raw( IMAGE *large, IMAGE *small, IMAGE *out ){ #define FUNCTION_NAME "im_gradcor_raw" if( im_piocheck( large, out ) || im_pincheck( small ) ) return -1; if( im_check_uncoded( "im_gradcor", large ) || im_check_mono( "im_gradcor", large ) || im_check_uncoded( "im_gradcor", small ) || im_check_mono( "im_gradcor", small ) || im_check_format_same( "im_gradcor", large, small ) || im_check_int( "im_gradcor", large ) ) return( -1 ); if( large-> Xsize < small-> Xsize || large-> Ysize < small-> Ysize ){ im_error( FUNCTION_NAME, "second image must be smaller than first" ); return -1; } if( im_cp_desc( out, large ) ) return -1; out-> Xsize= 1 + large-> Xsize - small-> Xsize; out-> Ysize= 1 + large-> Ysize - small-> Ysize; out-> BandFmt= IM_BANDFMT_FLOAT; if( im_demand_hint( out, IM_FATSTRIP, large, NULL ) ) return -1; { IMAGE *xgrad= im_open_local( out, FUNCTION_NAME ": xgrad", "t" ); IMAGE *ygrad= im_open_local( out, FUNCTION_NAME ": ygrad", "t" ); IMAGE **grads= im_allocate_input_array( out, xgrad, ygrad, NULL ); return ! xgrad || ! ygrad || ! grads || im_grad_x( small, xgrad ) || im_grad_y( small, ygrad ) || im_generate( out, gradcor_start, gradcor_gen, gradcor_stop, (void*) large, (void*) grads ); } #undef FUNCTION_NAME } /** * im_gradcor: * @in: input image * @ref: reference image * @out: output image * * Calculate a correlation surface. * * @ref is placed at every position in @in and a correlation coefficient * calculated. One-band, integer images only. @in and @ref must have the * same #VipsBandFmt. The output * image is always %IM_BANDFMT_FLOAT. @ref must be smaller than @in. The output * image is the same size as the input. * * The method takes the gradient images of the two images then takes the * dot-product correlation of the two vector images. * The vector expression of this method is my (tcv) own creation. It is * equivalent to the complex-number method of: * * ARGYRIOU, V. et al. 2003. Estimation of sub-pixel motion using * gradient cross correlation. Electronics Letters, 39 (13). * * See also: im_spcor(). * * Returns: 0 on success, -1 on error */ int im_gradcor( IMAGE *in, IMAGE *ref, IMAGE *out ) { #define FUNCTION_NAME "im_gradcor" IMAGE *t1 = im_open_local( out, FUNCTION_NAME " intermediate", "p" ); if( !t1 || im_embed( in, t1, 1, ref->Xsize / 2, ref->Ysize / 2, in->Xsize + ref->Xsize - 1, in->Ysize + ref->Ysize - 1 ) || im_gradcor_raw( t1, ref, out ) ) return( -1 ); out->Xoffset = 0; out->Yoffset = 0; return( 0 ); #undef FUNCTION_NAME } /** * im_grad_x: * @in: input image * @out: output image * * Find horizontal differences between adjacent pixels. * * Generates an image where the value of each pixel is the difference between * it and the pixel to its right. The output has the same height as the input * and one pixel less width. One-band integer formats only. The result is * always %IM_BANDFMT_INT. * * This operation is much faster than (though equivalent to) im_conv() with the * mask [[-1, 1]]. * * See also: im_grad_y(), im_conv(). * * Returns: 0 on success, -1 on error */ int im_grad_x( IMAGE *in, IMAGE *out ){ #define FUNCTION_NAME "im_grad_x" if( im_piocheck( in, out ) ) return -1; if( im_check_uncoded( "im_grad_x", in ) || im_check_mono( "im_grad_x", in ) || im_check_int( "im_grad_x", in ) ) return( -1 ); if( im_cp_desc( out, in ) ) return -1; -- out-> Xsize; out-> BandFmt= IM_BANDFMT_INT; /* do not change without updating im_gradcor() */ if( im_demand_hint( out, IM_THINSTRIP, in, NULL ) ) return -1; #define RETURN_GENERATE( TYPE ) return im_generate( out, im_start_one, xgrad_gen_ ## TYPE, im_stop_one, (void*) in, NULL ) switch( in-> BandFmt ){ case IM_BANDFMT_UCHAR: RETURN_GENERATE( guint8 ); case IM_BANDFMT_CHAR: RETURN_GENERATE( gint8 ); case IM_BANDFMT_USHORT: RETURN_GENERATE( guint16 ); case IM_BANDFMT_SHORT: RETURN_GENERATE( gint16 ); case IM_BANDFMT_UINT: RETURN_GENERATE( guint32 ); case IM_BANDFMT_INT: RETURN_GENERATE( gint32 ); #if 0 case IM_BANDFMT_FLOAT: RETURN_GENERATE( float ); case IM_BANDFMT_DOUBLE: RETURN_GENERATE( double ); #endif #undef RETURN_GENERATE default: g_assert( 0 ); } /* Keep gcc happy. */ return 0; #undef FUNCTION_NAME } /** * im_grad_y: * @in: input image * @out: output image * * Find vertical differences between adjacent pixels. * * Generates an image where the value of each pixel is the difference between * it and the pixel below it. The output has the same width as the input * and one pixel less height. One-band integer formats only. The result is * always %IM_BANDFMT_INT. * * This operation is much faster than (though equivalent to) im_conv() with the * mask [[-1], [1]]. * * See also: im_grad_x(), im_conv(). * * Returns: 0 on success, -1 on error */ int im_grad_y( IMAGE *in, IMAGE *out ){ #define FUNCTION_NAME "im_grad_y" if( im_piocheck( in, out ) ) return -1; if( im_check_uncoded( "im_grad_y", in ) || im_check_mono( "im_grad_y", in ) || im_check_int( "im_grad_y", in ) ) return( -1 ); if( im_cp_desc( out, in ) ) return -1; -- out-> Ysize; out-> BandFmt= IM_BANDFMT_INT; /* do not change without updating im_gradcor() */ if( im_demand_hint( out, IM_FATSTRIP, in, NULL ) ) return -1; #define RETURN_GENERATE( TYPE ) return im_generate( out, im_start_one, ygrad_gen_ ## TYPE, im_stop_one, (void*) in, NULL ) switch( in-> BandFmt ){ case IM_BANDFMT_UCHAR: RETURN_GENERATE( guint8 ); case IM_BANDFMT_CHAR: RETURN_GENERATE( gint8 ); case IM_BANDFMT_USHORT: RETURN_GENERATE( guint16 ); case IM_BANDFMT_SHORT: RETURN_GENERATE( gint16 ); case IM_BANDFMT_UINT: RETURN_GENERATE( guint32 ); case IM_BANDFMT_INT: RETURN_GENERATE( gint32 ); #if 0 case IM_BANDFMT_FLOAT: RETURN_GENERATE( float ); case IM_BANDFMT_DOUBLE: RETURN_GENERATE( double ); #endif #undef RETURN_GENERATE default: g_assert( 0 ); } /* Keep gcc happy. */ return 0; #undef FUNCTION_NAME } /** LOCAL FUNCTION DEFINITIONS **/ static void *gradcor_start( IMAGE *out, void *vptr_large, void *unrequired ){ gradcor_seq_t *seq= IM_NEW( NULL, gradcor_seq_t ); if( ! seq ) return NULL; seq-> region_xgrad= (int*) NULL; seq-> region_ygrad= (int*) NULL; seq-> region_xgrad_area= 0; seq-> region_ygrad_area= 0; seq-> reg= im_region_create( (IMAGE*) vptr_large ); if( ! seq-> reg ){ im_free( (void*) seq ); return NULL; } return (void*) seq; } static int gradcor_stop( void *vptr_seq, void *unrequired, void *unreq2 ){ gradcor_seq_t *seq= (gradcor_seq_t*) vptr_seq; if( seq ){ im_free( (void*) seq-> region_xgrad ); im_free( (void*) seq-> region_ygrad ); im_region_free( seq-> reg ); seq-> region_xgrad= (int*) NULL; seq-> region_ygrad= (int*) NULL; seq-> reg= (REGION*) NULL; im_free( (void*) seq ); } return 0; } static int gradcor_gen( REGION *to_make, void *vptr_seq, void *unrequired, void *vptr_grads ){ gradcor_seq_t *seq= (gradcor_seq_t*) vptr_seq; REGION *make_from= seq-> reg; IMAGE **grads= (IMAGE**) vptr_grads; IMAGE *small_xgrad= grads[0]; IMAGE *small_ygrad= grads[1]; Rect require= { to_make-> valid. left, to_make-> valid. top, to_make-> valid. width + small_xgrad-> Xsize, to_make-> valid. height + small_ygrad-> Ysize }; size_t region_xgrad_width= require. width - 1; size_t region_ygrad_height= require. height - 1; if( im_prepare( make_from, &require ) ) return -1; #define FILL_BUFFERS( TYPE ) /* fill region_xgrad */ \ { \ TYPE *reading= (TYPE*) IM_REGION_ADDR( make_from, require. left, require. top ); \ size_t read_skip= ( IM_REGION_LSKIP( make_from ) / sizeof(TYPE) ) - region_xgrad_width; \ size_t area_need= region_xgrad_width * require. height; \ \ if( seq-> region_xgrad_area < area_need ){ \ free( seq-> region_xgrad ); \ seq-> region_xgrad= malloc( area_need * sizeof(int) ); \ if( ! seq-> region_xgrad ) \ return -1; \ seq-> region_xgrad_area= area_need; \ } \ { \ int *writing= seq-> region_xgrad; \ int *write_end= writing + area_need; \ int *write_stop; \ for( ; writing < write_end; reading+= read_skip ) \ for( write_stop= writing + region_xgrad_width; writing < write_stop; ++reading, ++writing ) \ *writing= reading[1] - reading[0]; \ } \ } \ { /* fill region_ygrad */ \ TYPE *reading= (TYPE*) IM_REGION_ADDR( make_from, require. left, require. top ); \ size_t read_line= IM_REGION_LSKIP( make_from ) / sizeof(TYPE); \ size_t read_skip= read_line - require. width; \ size_t area_need= require. width * region_ygrad_height; \ \ if( seq-> region_ygrad_area < area_need ){ \ free( seq-> region_ygrad ); \ seq-> region_ygrad= malloc( area_need * sizeof(int) ); \ if( ! seq-> region_ygrad ) \ return -1; \ seq-> region_ygrad_area= area_need; \ } \ { \ int *writing= seq-> region_ygrad; \ int *write_end= writing + area_need; \ int *write_stop; \ for( ; writing < write_end; reading+= read_skip ) \ for( write_stop= writing + require. width; writing < write_stop; ++reading, ++writing ) \ *writing= reading[ read_line ] - reading[0]; \ } \ } switch( make_from-> im-> BandFmt ){ case IM_BANDFMT_UCHAR: FILL_BUFFERS( unsigned char ) break; case IM_BANDFMT_CHAR: FILL_BUFFERS( signed char ) break; case IM_BANDFMT_USHORT: FILL_BUFFERS( unsigned short int ) break; case IM_BANDFMT_SHORT: FILL_BUFFERS( signed short int ) break; case IM_BANDFMT_UINT: FILL_BUFFERS( unsigned int ) break; case IM_BANDFMT_INT: FILL_BUFFERS( signed int ) break; default: g_assert( 0 ); } { /* write to output */ size_t write_skip= IM_REGION_LSKIP( to_make ) / sizeof( float ); float *writing= (float*) IM_REGION_ADDR_TOPLEFT( to_make ); float *write_end= writing + write_skip * to_make-> valid. height; float *write_stop; size_t write_width= to_make-> valid. width; size_t small_xgrad_width= small_xgrad-> Xsize; size_t small_ygrad_width= small_ygrad-> Xsize; int *small_xgrad_end= (int*) small_xgrad-> data + small_xgrad_width * small_xgrad-> Ysize; int *small_ygrad_end= (int*) small_ygrad-> data + small_ygrad_width * small_ygrad-> Ysize; int *region_xgrad_start= seq-> region_xgrad; int *region_ygrad_start= seq-> region_ygrad; size_t region_xgrad_start_skip= region_xgrad_width - write_width; size_t region_ygrad_start_skip= require. width - write_width; size_t region_xgrad_read_skip= region_xgrad_width - small_xgrad_width; size_t region_ygrad_read_skip= require. width - small_ygrad_width; write_skip-= write_width; for( ; writing < write_end; writing+= write_skip, region_xgrad_start+= region_xgrad_start_skip, region_ygrad_start+= region_ygrad_start_skip ) for( write_stop= writing + write_width; writing < write_stop; ++writing, ++region_xgrad_start, ++region_ygrad_start ){ gint64 sum= 0; { int *small_xgrad_read= (int*) small_xgrad-> data; int *small_xgrad_stop; int *region_xgrad_read= region_xgrad_start; for( ; small_xgrad_read < small_xgrad_end; region_xgrad_read+= region_xgrad_read_skip ) for( small_xgrad_stop= small_xgrad_read + small_xgrad_width; small_xgrad_read < small_xgrad_stop; ++small_xgrad_read, ++region_xgrad_read ) sum+= *small_xgrad_read * *region_xgrad_read; } { int *small_ygrad_read= (int*) small_ygrad-> data; int *small_ygrad_stop; int *region_ygrad_read= region_ygrad_start; for( ; small_ygrad_read < small_ygrad_end; region_ygrad_read+= region_ygrad_read_skip ) for( small_ygrad_stop= small_ygrad_read + small_ygrad_width; small_ygrad_read < small_ygrad_stop; ++small_ygrad_read, ++region_ygrad_read ) sum+= *small_ygrad_read * *region_ygrad_read; } *writing= sum; } } return 0; } #define XGRAD_GEN_DEFINITION( TYPE ) \ static int xgrad_gen_ ## TYPE( REGION *to_make, void *vptr_make_from, void *unrequired, void *unreq2 ){ \ \ REGION *make_from= (REGION*) vptr_make_from; \ Rect require= { \ to_make-> valid. left, \ to_make-> valid. top, \ to_make-> valid. width + 1, \ to_make-> valid. height \ }; \ if( im_prepare( make_from, &require ) ) \ return -1; \ \ { \ int *writing= (int*) IM_REGION_ADDR_TOPLEFT( to_make ); \ size_t write_skip= IM_REGION_LSKIP( to_make ) / sizeof(int); \ int *write_end= writing + write_skip * to_make-> valid. height; \ size_t write_width= to_make-> valid. width; \ int *write_stop; \ \ TYPE *reading= (TYPE*) IM_REGION_ADDR( make_from, require. left, require. top ); \ size_t read_skip= ( IM_REGION_LSKIP( make_from ) / sizeof(TYPE) ) - write_width; \ \ write_skip-= write_width; \ \ for( ; writing < write_end; writing+= write_skip, reading+= read_skip ) \ for( write_stop= writing + write_width; writing < write_stop; ++writing, ++reading ) \ *writing= (int)( reading[1] - reading[0] ); \ } \ return 0; \ } #define YGRAD_GEN_DEFINITION( TYPE ) \ static int ygrad_gen_ ## TYPE( REGION *to_make, void *vptr_make_from, void *unrequired, void *unreq2 ){ \ \ REGION *make_from= (REGION*) vptr_make_from; \ Rect require= { \ to_make-> valid. left, \ to_make-> valid. top, \ to_make-> valid. width, \ to_make-> valid. height + 1 \ }; \ if( im_prepare( make_from, &require ) ) \ return -1; \ \ { \ int *writing= (int*) IM_REGION_ADDR_TOPLEFT( to_make ); \ size_t write_skip= IM_REGION_LSKIP( to_make ) / sizeof(int); \ int *write_end= writing + write_skip * to_make-> valid. height; \ size_t write_width= to_make-> valid. width; \ int *write_stop; \ \ TYPE *reading= (TYPE*) IM_REGION_ADDR( make_from, require. left, require. top ); \ size_t read_line= IM_REGION_LSKIP( make_from ) / sizeof(TYPE); \ size_t read_skip= read_line - write_width; \ \ write_skip-= write_width; \ \ for( ; writing < write_end; writing+= write_skip, reading+= read_skip ) \ for( write_stop= writing + write_width; writing < write_stop; ++writing, ++reading ) \ *writing= (int)( reading[ read_line ] - reading[0] ); \ } \ return 0; \ } XGRAD_GEN_DEFINITION( guint8 ) YGRAD_GEN_DEFINITION( guint8 ) XGRAD_GEN_DEFINITION( gint8 ) YGRAD_GEN_DEFINITION( gint8 ) XGRAD_GEN_DEFINITION( guint16 ) YGRAD_GEN_DEFINITION( guint16 ) XGRAD_GEN_DEFINITION( gint16 ) YGRAD_GEN_DEFINITION( gint16 ) XGRAD_GEN_DEFINITION( guint32 ) YGRAD_GEN_DEFINITION( guint32 ) XGRAD_GEN_DEFINITION( gint32 ) YGRAD_GEN_DEFINITION( gint32 ) #if 0 XGRAD_GEN_DEFINITION( float ) YGRAD_GEN_DEFINITION( float ) XGRAD_GEN_DEFINITION( double ) YGRAD_GEN_DEFINITION( double ) #endif vips-7.38.5/libvips/deprecated/cooc_funcs.c0000644000175000017500000002562612303140253015561 00000000000000/* @(#) Calculates the cooccurrence matrix of an image and some of its * @(#) features. The 256x256 cooccurrence matrix of im is held by m * @(#) There should be enough margin around the box so the (dx,dy) can * @(#) access neighbouring pixels outside the box * @(#) * @(#) Usage: * @(#) int im_cooc_matrix(im, m, xpos, ypos, xsize, ysize, dx, dy, sym_flag) * @(#) IMAGE *im, *m; * @(#) int xpos, ypos, xsize, ysize; location of the box within im * @(#) int dx, dy; displacements * @(#) int sym_flag; * @(#) * @(#) int im_cooc_asm(m, asmoment) * @(#) IMAGE *m; * @(#) double *asmoment; * @(#) * @(#) int im_cooc_contrast(m, contrast) * @(#) IMAGE *m; * @(#) double *contrast; * @(#) * @(#) int im_cooc_correlation(m, correlation) * @(#) IMAGE *m; * @(#) double *correlation; * @(#) * @(#) int im_cooc_entropy(m, entropy) * @(#) IMAGE *m; * @(#) double *entropy; * @(#) * @(#) All functions return 0 on success and -1 on error * * Copyright: N. Dessipris 1991 * Written on: 2/12/1991 * Updated on: 2/12/1991 * 22/7/93 JC * - extern decls removed * - im_incheck() calls added * 28/5/97 JC * - protos added :( */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include static int im_cooc_sym(im, m, xpos, ypos, xsize, ysize, dx, dy) IMAGE *im, *m; int xpos, ypos, xsize, ysize; /* location of the box within im */ int dx, dy; /* displacements */ { VipsPel *input, *cpinput; int *buf, *pnt, *cpnt; double *line, *cpline; int x, y; int offset; int bufofst; int tempA, tempB; int norm; if (im_iocheck(im, m) == -1) return( -1 ); if ((im->Bands != 1)||(im->BandFmt != IM_BANDFMT_UCHAR)) { im_error( "im_cooc_sym", "%s", _( "Unable to accept input") ); return(-1); } if ( (xpos + xsize + dx > im->Xsize)|| (ypos + ysize + dy > im->Ysize) ) { im_error( "im_cooc_sym", "%s", _( "wrong args") ); return(-1); } if (im_cp_desc(m, im) == -1) return( -1 ); m->Xsize = 256; m->Ysize = 256; m->BandFmt = IM_BANDFMT_DOUBLE; m->Type = IM_TYPE_B_W; if (im_setupout(m) == -1) return( -1 ); /* malloc space to keep the read values */ buf = (int *)calloc( (unsigned)m->Xsize*m->Ysize, sizeof(int) ); line = (double *)calloc( (unsigned)m->Xsize * m->Bands, sizeof(double)); if ( (buf == NULL) || (line == NULL) ) { im_error( "im_cooc_sym", "%s", _( "calloc failed") ); return(-1); } input = im->data; input += ( ypos * im->Xsize + xpos ); offset = dy * im->Xsize + dx; for ( y=0; yXsize; for ( x=0; xXsize * tempB; (*(buf + bufofst))++; bufofst = tempB + m->Xsize * tempA; (*(buf + bufofst))++; cpinput++; } } norm = xsize * ysize * 2; pnt = buf; for ( y=0; yYsize; y++ ) { cpnt = pnt; pnt += m->Xsize; cpline = line; for (x=0; xXsize; x++) *cpline++ = (double)(*cpnt++)/(double)norm; if (im_writeline( y, m, (VipsPel *) line ) == -1) { im_error( "im_cooc_sym", "%s", _( "unable to im_writeline") ); return(-1); } } free((char*)buf); free((char*)line); return(0); } static int im_cooc_ord(im, m, xpos, ypos, xsize, ysize, dx, dy) IMAGE *im, *m; int xpos, ypos, xsize, ysize; /* location of the box within im */ int dx, dy; /* displacements */ { VipsPel *input, *cpinput; int *buf, *pnt, *cpnt; double *line, *cpline; int x, y; int offset; int bufofst; int tempA, tempB; int norm; if (im_iocheck(im, m) == -1) return( -1 ); if ((im->Bands != 1)||(im->BandFmt != IM_BANDFMT_UCHAR)) { im_error( "im_cooc_ord", "%s", _( "Unable to accept input") ); return(-1); } if ( (xpos + xsize + dx > im->Xsize)|| (ypos + ysize + dy > im->Ysize) ) { im_error( "im_cooc_ord", "%s", _( "wrong args") ); return(-1); } if (im_cp_desc(m, im) == -1) return( -1 ); m->Xsize = 256; m->Ysize = 256; m->BandFmt = IM_BANDFMT_DOUBLE; if (im_setupout(m) == -1) return( -1 ); /* malloc space to keep the read values */ buf = (int *)calloc( (unsigned)m->Xsize*m->Ysize, sizeof(int) ); line = (double *)calloc( (unsigned)m->Xsize * m->Bands, sizeof(double)); if ( (buf == NULL) || (line == NULL) ) { im_error( "im_cooc_ord", "%s", _( "calloc failed") ); return(-1); } input = im->data; input += ( ypos * im->Xsize + xpos ); offset = dy * im->Xsize + dx; for ( y=0; yXsize; for ( x=0; xXsize * tempB; (*(buf + bufofst))++; cpinput++; } } norm = xsize * ysize; pnt = buf; for ( y=0; yYsize; y++ ) { cpnt = pnt; pnt += m->Xsize; cpline = line; for (x=0; xXsize; x++) *cpline++ = (double)(*cpnt++)/(double)norm; if (im_writeline( y, m, (PEL *) line ) == -1) { im_error( "im_cooc_ord", "%s", _( "unable to im_writeline") ); return(-1); } } free((char*)buf); free((char*)line); return(0); } /* Keep the coocurrence matrix as a 256x256x1 double image */ int im_cooc_matrix( IMAGE *im, IMAGE *m, int xp, int yp, int xs, int ys, int dx, int dy, int flag ) { if (flag == 0) return( im_cooc_ord(im, m, xp, yp, xs, ys, dx, dy) ); else if (flag == 1) /* symmetrical cooc */ return( im_cooc_sym(im, m, xp, yp, xs, ys, dx, dy) ); else { im_error( "im_cooc_matrix", "%s", _( "wrong flag!") ); return(-1); } } /* Calculate contrast, asmoment, entropy and correlation */ int im_cooc_asm( IMAGE *m, double *asmoment ) { double temp, tmpasm, *pnt; int i; if( im_incheck( m ) ) return( -1 ); if (m->Xsize != 256 || m->Ysize != 256 || m->Bands != 1 || m->BandFmt != IM_BANDFMT_DOUBLE) { im_error( "im_cooc_asm", "%s", _( "unable to accept input") ); return(-1); } tmpasm = 0.0; pnt = (double*)m->data; for(i=0; iXsize * m->Ysize; i++) { temp = *pnt++; tmpasm += temp * temp; } *asmoment = tmpasm; return(0); } int im_cooc_contrast( IMAGE *m, double *contrast ) { double dtemp, tmpcon, *pnt, *cpnt; int x, y; if( im_incheck( m ) ) return( -1 ); if (m->Xsize != 256 || m->Ysize != 256 || m->Bands != 1 || m->BandFmt != IM_BANDFMT_DOUBLE) { im_error( "im_cooc_contrast", "%s", _( "unable to accept input") ); return(-1); } tmpcon = 0.0; pnt = (double*)m->data; for(y=0; yYsize; y++) { cpnt = pnt; pnt += m->Xsize; for(x=0; xXsize; x++) { dtemp = (double)( (y-x)*(y-x) ); tmpcon += dtemp * (*cpnt); cpnt++; } } *contrast = tmpcon; return(0); } static void stats(buffer, size, pmean, pstd) double *buffer; /* buffer contains the frequency distributions f[i] */ int size; /* Note that sum(f[i]) = 1.0 and that the */ /* cooccurence matrix is symmetrical */ double *pmean, *pstd; { double mean, std; register int i; double sumf; /* calculates the sum of f[i] */ double temp; /* temporary variable */ double *pbuffer; double sumf2; /* calculates the sum of f[i]^2 */ double correction; /* calulates the correction term for the variance */ double variance; /* = (sumf2 - correction)/n, n=sum(f[i]) = 1 */ mean = 0.0; std = 0.0; sumf = 0.0; sumf2 = 0.0; pbuffer = buffer; for (i=0; iXsize != 256 || m->Ysize != 256 || m->Bands != 1 || m->BandFmt != IM_BANDFMT_DOUBLE) { im_error( "im_cooc_correlation", "%s", _( "unable to accept input") ); return(-1); } row = (double*)calloc( (unsigned)m->Ysize, sizeof(double)); col = (double*)calloc( (unsigned)m->Xsize, sizeof(double)); if ( row == NULL || col == NULL ) { im_error( "im_cooc_correlation", "%s", _( "unable to calloc") ); return(-1); } pbuf = (double*)m->data; for(j=0; jYsize; j++) { cpbuf = pbuf; pbuf += m->Xsize; sum=0.0; for(i=0; iXsize; i++) sum += *cpbuf++; *(row+j) = sum; } pbuf = (double*)m->data; for(j=0; jYsize; j++) { cpbuf = pbuf; pbuf++; sum=0.0; for(i=0; iXsize; i++) { sum += *cpbuf; cpbuf += m->Xsize; } *(col+j) = sum; } stats(row, m->Ysize, &mrow, &stdrow); stats(col, m->Ysize ,&mcol, &stdcol); #ifdef DEBUG fprintf(stderr, "rows: mean=%f std=%f\ncols: mean=%f std=%f\n", mrow, stdrow, mcol, stdcol); #endif tmpcor = 0.0; pbuf = (double*)m->data; for(j=0; jYsize; j++) { cpbuf = pbuf; pbuf += m->Xsize; for(i=0; iXsize; i++) { dtemp = *cpbuf; tmpcor += ( ((double)i)*((double)j)*dtemp); cpbuf++; } } #ifdef DEBUG fprintf(stderr, "tmpcor=%f\n", tmpcor); #endif if ( (stdcol==0.0)||(stdrow==0) ) { im_error( "im_cooc_correlation", "%s", _( "zero std") ); return(-1); } tmpcor = (tmpcor-(mcol*mrow))/(stdcol*stdrow); *correlation = tmpcor; free((char*)row); free((char*)col); return(0); } int im_cooc_entropy( IMAGE *m, double *entropy ) { double *pbuf, *pbufstart; double *cpbuf; register int i,j; double tmpent, dtemp; double val; if( im_incheck( m ) ) return( -1 ); if (m->Xsize != 256 || m->Ysize != 256 || m->Bands != 1 || m->BandFmt != IM_BANDFMT_DOUBLE) { im_error( "im_cooc_entropy", "%s", _( "unable to accept input") ); return(-1); } pbufstart = (double*)m->data; tmpent = 0.0; pbuf = pbufstart; for(j=0; jYsize; j++) { cpbuf = pbuf; pbuf += m->Xsize; for(i=0; iXsize; i++) { if(*cpbuf != 0) { dtemp = *cpbuf; tmpent += (dtemp*log10(dtemp)); } cpbuf++; } } val = tmpent*(-1); #ifdef DEBUG fprintf(stderr,"ENT=%f\nwhich is %f bits\n", val, val/log10(2.0) ); #endif *entropy = (val/log10(2.0)); return(0); } vips-7.38.5/libvips/deprecated/im_cmulnorm.c0000644000175000017500000000376512303140253015761 00000000000000/* im_cmulnorm.c * * Copyright: 1990, N. Dessipris. * * Author: Nicos Dessipris * Written on: 02/05/1990 * Modified on: * 15/4/97 JC * - thrown away and redone in terms of im_multiply() * 9/7/02 JC * - im_sign() broken out, done in terms of that * 28/8/09 * - gtkdoc * - tiny polish */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include /** * im_cmulnorm * @in1: input #IMAGE 1 * @in2: input #IMAGE 2 * @out: output #IMAGE * * im_cmulnorm() multiplies two complex images. The complex output is * normalised to 1 by dividing both the real and the imaginary part of each * pel with the norm. This is useful for phase correlation. * * This operation used to be important, but now simply calls im_multiply() * then im_sign(). * * See also: im_multiply(), im_sign(). * * Returns: 0 on success, -1 on error */ int im_cmulnorm( IMAGE *in1, IMAGE *in2, IMAGE *out ) { IMAGE *t1; if( !(t1 = im_open_local( out, "im_cmulnorm:1", "p" )) || im_multiply( in1, in2, t1 ) || im_sign( t1, out ) ) return( -1 ); return( 0 ); } vips-7.38.5/doc/0000755000175000017500000000000012303146331010341 500000000000000vips-7.38.5/doc/pdf/0000755000175000017500000000000012303145652011117 500000000000000vips-7.38.5/doc/pdf/vipsmanual.pdf0000644000175000017500000130011212303145652013707 00000000000000%PDF-1.5 %ÐÔÅØ 3 0 obj << /Length 444 /Filter /FlateDecode >> stream xÚuSÝŽÔ ½Ÿ§à²M,ò_z©ÆÝì“56{£^°SfÛØÂHÁd|z)0“Qcš†S8ßùÎú`ðß{`ŠïZÈQ+[ ‡ˆ É€Óà>íP$"pÿßñm¿{}‡%  A8è€p ;Á@Kl[ÐàKõôðø¹nGÕGe‚šëoý>Õa ;ÎIªbLaÇ.u5ƸÒn¬Éõ-¤r« eS ÖE¾Ìü½ ï]8MÞ¿Ê&÷ýÒÞùÉè_W±X±õo0ÇP4$šÂòçUÓº¸:ç´ñó9OEý¬¯`ÝPÄ’Á­-eÕ>Ia‰8+L&Ϫ2¾y|È Þ)³N>†Mb´êGýE­yb°‡°Dz(îL^o!a·~Qµúiž‹u»œfíõ¥ýw2íAÌŸÎ"Ç^Ãéd]V癚@£OÆ"°¦€³ ¬£ s¡‡UoI0*I┄(ƒéFÓX_¤tÃUýj`QçҦĊð0*óRˆÏúh]Á%nÚÎ-hÉIÛ› ýxi¿ä›™pÔX”¿Æ¿ÓÏ.(W:^®Õvª›ð?Åû~÷&Ù) endstream endobj 9 0 obj << /Length 105 /Filter /FlateDecode >> stream xÚ+T0THbw…< 4µ4×350·0W°01Õ301³0Q(JUHSä2*4Ppçr áÒw3´P°Ô³432SIS05Ö316Q073Ö³01VIQˆÖÈÌÔŒ ñ‚kB§]C¸CO­ endstream endobj 12 0 obj << /Length 1056 /Filter /FlateDecode >> stream xÚíZÙŽâF}ﯨ·Ø¹¦öåqÂ,"R”5šé¿þû$ž$&Œ”ö€Ÿ8r±&-Öƒ|¾X–q£úë(/ì_•Ä#ë K"K[dïÊÜijdUª½jüÔ{Ä›nˆwc«6=CPia/PÏþ2œWŒ¸Öˆ*Hy7mü–*Åñ5x §q{ q\@J•C\§÷Ö¥±Ö37ìJûôú¬šD;µÿ˜®²éØê=[yJSÔò/0ö9®!_¥[“ÿ™Œ7òë2«l¤k,=´´â`4³ÚwE‘β¹­¨_œ[ùÿÀ-ÂÍ·¬bšÍš@þ7-ï{2®Öá#2.‡JtÓ*»©ÈõÐr¶E\>DËÇï&]³a’bùPL)•ýç }ÙB=  {s§Åsê?¸:ÊѳSý¯qñWŸ¼Ø:LêC/ö¦ýéãRú¼¯?ÞÈEš¼:“y¡Ç¡¥Þd^nö“¹/ HˆD—®íQŽÃƒÕ_íxL™â.¼tŠ¡Rkc¿ô­Giù"1ñJ‰®~ߤoiìR"$T¸ŒˆƒŒ¼÷Œ\”‘UqðÛ²´’ÕèUÞîÙÎ-/Ýó\(7裊~JQð>-ñcÏZ¨,+&;u{‘uÁùzNçL(H´Ë™¯΃7r‘ö•À@‹«­rô=ýéè‹Sôçƒ1¹Ù—‰å«Øf¼”úœÂ\½Ï¨w׆ð*t&À‘ µ—¡óaKŸR"ï“$fk=†¯®Fv(°bàè fj«×ë‡Yšdãd;Ü«#ì£Ýöíµ^èˆJ¨¸ªS1¥m &nGtHx`ƒz³ûuÑtIÏL<Ÿ'•ÊS‚„ 0=²š\w?ô…ó ýnés¹éir–DyNÎÍI_5N6zuïÊØ”Ë…µS{üÏ·&6 _y¬¦µ¢^“¤›tÑ[*¨GûÌÛ \Ý×X±:åDA¬Hzš¦[³?ŒnþP{*P endstream endobj 17 0 obj << /Length 1546 /Filter /FlateDecode >> stream xÚí›IsÚH†ïü á€Üû2—©ŒÇNœª‰1“’dAm–D<üûé–º…`¹¼”ã r¹¬2@Oý~[÷¹ú}ëÄP?Tr—.¸#ua‚8™ï\;@ ÎÛÁ“ÁÑ)Žt%CÌ™\;»‡3ì ‚ÉÌù2 FˆŒ¾MÞ"ÙLpcêVå¸ãó“““K=²þˆÖýǘ!W¡.+ ©Þ‰\äâÑ"†ï|oæg£1¢`ø䇳|4f’ Ýјª¯ý‘ò©ïÙî|C(ÁÒÍGñu¥ž‹œäç©ñ¼bîųêb&yù_Žðc~ _jøžüçEiè+3¦ô—1ã—1jÑ èù…7ó OÙ/—=ôç…έxy‘d+Åœ‚žùãÑ#؉^X‘ù¡Ý´ñöÂðÊ›~Wš#9ì©?nipÿ©ä%}ã+³e)ïúò:1ÁËÌϧYªõ ^ÁŒá2…@ †ºÁ›e‘D^L T?O–ÙÔ·8•I'SõrëÏÃ=ÁAX<É2k~ È…eü&d/»÷E»Q£ õû$XÍIêg¥e(’¹_,t£òÃŽ“ÛHÇH…¤ V§@‘;]ÆÓj‰—‹>ÈS¯˜.Z©I.çã@æBöIIv+)Ù`ÍkÖ.4^ì2ЉÉj`¸û#H‡UÖ¢¾´à=ãcÖ¡ØEf”d†ñ4QHåÄlà°Zþ´Zñ|¾Mv´…¡7³Y­·±¯ƒÝ[#¶«T_RŠÞ±=‚³­ý“ט¯ïc++£yN+Û.ßÀÈk⸠†÷r\Ä8®É¬ñOg—ÕÕ•—Ûuzyþ›)¡6ë¡KjK¨Ÿ‚4?¿úןÕØÚ)î$Âý%³ë»'EùzŒZ“)t ’[³R»¸‹LgE %‚ÚW%³$P‡ŠÚõ+PðCû7?üØæqVStQ¢>°hн_¤LàœEÞܯk*oÖeÉ@^jBöÌG-5ï’FTâ5§Æ¸ÌÜ6ÒÌÏý¸Œ™¤Z¤CMh­&µsmâ,êh,0í-ùñ¨m˜}Äë8»eÄœ‹õãQ“ÞG>Ý=>’Y©46K“Ð3UxÈ=¾Ð”ì®9±=^2¶Ùäz¢îp–?aÿ ‰g—‚°v)÷Öe¼É×Üû~¹ÈƒÕîðsmw¸Îð뺿©D-llRxßG mSp¿™{­^6‚b8_FÊâ•`ÁçB¶ ïÄb]×…öY*üjlÚ÷„EÒ üÚ-om{SÔšÛÞ¸+¨Pî »žeË£mb;ðhÇ…GC,wT… )÷ÑmÌTUà70KfË©íšöéáÓ‹‰ìÎÕ„ÔþïóbD‡«jŽ—y£hø»îòžþðƒmâÖKž?Y¬Ê} ËÞòŸýx·Í##BY2ϼ(ªEîóÙù¶ÆqAûe͘€ûÈ ªeå,N—&ø¸Î’¨å•«Z¡¼;IƒmÈVIΗEM¹Žk6ÿ [|Ÿ5êDmï‹$\EI–.‚\³`½8?ñqÆûÄùŠs£ %X/ݤ÷€®%úÄËW-Æ·A±ØÑ–È%ÛVo•Ÿs2Ü `y¶:Pªq¥Nˆ8ÓhðåpfêÅ÷Žî) ç¶9êÛ©®Bçrð±:ó³Ùƒ–ÒÅ•·Èɹͼ4‰ý¯ÊDÔ/Ü‘xPæ¢ò¾åx½7kG{›¹‚ó»ž êLŸâ9êûãí爼xuǃ0ærÎ^¼¯¾«ÝMX{-3¬umÛ˜õP—;ŠæëMÍ]È‹^7÷®fÑá›Ö[‘­×`v•kÙÔ,í$èMBô|ïÇ×V—.Ó0(Ö5‘ ¶±Vîß,u›Do÷"¤Çª±ÊN¬ôŽèuÃT)¤½>t𦴓·=‚v¼>„Óü{vê¼>ø•GÐÊܬqdÄX»>ËäÙ{4t¥â^IÙ—$ñ8 ½ýjNyŸlnÿU1ðÿýü‘_ endstream endobj 21 0 obj << /Length 644 /Filter /FlateDecode >> stream xÚíØOoÚ0ð;ŸÂÇäÔvü÷¸¢Ò1­em³]º"0!ZH¨ “úíçÄ¡DЉ­À*!«BFÈ<Ãï½<^úHÍãš?*yH!BCH˜ @+0w=h6BpÝ»Œ{, %à ÄS dˆ(œE¡ ˆ'àÑënã«ÛøÁÿº ÑÙN92±š¿ê/ÁMdÖÙ´{ƒ‡’ûâBè}~yðL¡§}$<5Uv-ƪŽiÎÁ!Çb}•¯|–€`s€ù’B¡¤´=!Dõ&ò°¨t9Y«¬,ü€Bæ…õÏz!Rž(t7ÕàјKØæeó2ÜÎns±É÷"ÿLRµôÁ„KÅñs€Íå†v. Ü\ØDù ³j6WU6ö‰¸C?Má7¥_{ß«<©[P’ûA$¤«õØzmØ£–ý²,s•˜ÆOήÆß¥Õÿ‰¾Sñ¤¥ï—y¹Ò¦»pìäÿ‹<}‘/|Í\†¨§ô²|˜$ÎýMîd¯;kÝo’Jg㬞j8Ž\ÑŸVoW;†^™¯ìœAéÄßÏ÷‹~X‹<1·jÍD_.”n&Sý” ý¯ÂéE¶Â­žVæn¸näÏ–ù;„8¯”ΊÔ4uÌ󕌠éÔ&ÀÇlY•©NæK‹œûäó׸¹EŶ+öÃ" {SêÅÌÌésû׌-×ÒËÄÌuWÀ\¸¡ãu÷«GV½?œ§¶SLWÅxýëçÄIM,õ¨š)}ƃõû”:Þ;‹ jý‡£B—> stream xÚ+T0THbw…< 4µ4×350·0W°01Õ301³0Q(JUHSä2*4PpÇ B¸ôÝ -,õ,ÍŒÌBÒŒÌMõ, L õŒ") Ñe™š±!^pM®!\&ˆ° endstream endobj 27 0 obj << /Length 1211 /Filter /FlateDecode >> stream xÚíš[o›H†ïó+¸4ª s>\¶Q“fÕj³­·½èîrÆfV¼€Óößw0Ì;Ø8g%F–#ô¼ß|'øßƒÞÌ|ϼÔæC%)à‚{‚Ð&ˆ—+oêýuÌDà¹ã»ñÑñ)b"¡™½ñÔ2„zŒÂ2ì/½ï£º(ýQ0ʦõñTÏ–¹ÅHþ¿ã?ŽO¡ðd(™YˬI( ñCa½†Y®ž‰Ú3 %$æ^Vstz¥ò²cA,BL™¶È³YÍë;Ñi}äY´ªN«E&YZ® ¤€§ÝK¡ëÂ6·Ï .ÎÿÜ?æ0J϶M z »'ý¶¥‡µ©ó’Ä>tØ@øur%w€N0L~+}Ôcòâžô;LžràÐqt9@xè¤ÇÏØ*Ù‘ÖEeðrÊg)#(ëÙö¨ÓaóŒãA›ûˆÂwµ=ˆk{¼ÍuÏUiŸ¬L—é¤i) 9ô8níŽÈÄõ8>«dÕ¸·¢E3>Xüàãø¶›ñ.Ë×îo“uöþ´q WrãMŸI–d˦³P,¢‰²ÃíQèê+‰Èü·`ïN‰ˆë6œ´·Œ]Ò!°Þ‹?í1væøß´å -Gƒ·£Ïzèóýéw5v ß„Î{\Ží7|ŠÊ\ÿì͆”þd=¶/7mQ–,ËNã|Pávøe~Û‹8OƒEâRšö»:œŠaÜ…=}ì›NÃiåïMÚ£ÕÍ̇K9Ð\€¨áƒ.V¯mÎ?þ=îð<ÃÓ¬^ÔëÏWÜß°è„P ü•Ök³ß~ÎÙ‡A endstream endobj 31 0 obj << /Length 318 /Filter /FlateDecode >> stream xÚíÑMkÂ@à{~Å“CÖý˜Éî^[Œ¤´H5=Ib ¨±Ñö÷wÛ±Fì¡"µH–É»ð>¯ `êÞ,»‡¬fĵÑ`ÇÄ 4”ðp·È¡ÜäA',³‰L /C… Å *È_`¾WU=çwTÚU¥¥Û•.èkë>æQ,‰‡ýÔÏ4ë= ºÃÏ_·7î]+Ò q’YD…L¨(&ñP7«Y=¯§Õd<÷©åÛr²©êå:еÁ¹EÎ/w µ' Û-F±–‡Z|?æàΙ%ÚV¾êÛl1m7|ÉÕž¹ýcê'òýͬh(ˆ«Â9¯õ[(Õ¿&ø£ Úƒ¤‘ °nãM Æ^ ~c€‡ ’­ñƒb=^¬æEK€^«?Aõû³›Ièï endstream endobj 34 0 obj << /Length 431 /Filter /FlateDecode >> stream xÚí–AOã0…ïýsL63ŽíxŽËŠ"Ю"â‚8šv#µ $íjù÷ M©¥ Áe©¢hgòïóäåfržB(‡ãT;LC Á:Ö MS¸¡4"œõ8cµôdS¬ÉxGš8@6›èWÙ.ceFõ´«YÌ&ÊïæEßfçGc Àš½H‰YÍÖ‚ò¤SßKˆZ¬åÕ볋«NäO‘OŠ&V‰‘Ž•Cü¯‹eþ"iA0 …Ež1²Û«ŠH³s¦ÇqQ·m) ;$cã¢|¾®ëûiÝt€Í`DmѵØq^MÆ‹åž ›È¡Ûô}Æï¢x—Ž’‘ÓlÒ’ß@J>ÒÏzRV³=Œ¬Õ˜$ßœÑGP‰aVæhgžìç¡ÊžŠ=  kä§÷Qs»ÔÄ=G”jÔ‡’BéGSˆf«EQõI·|°¾Zä÷M-ü&‡ zÛ}’ð1é«ôYûžv¾ÛÁ÷ße{_ÌçyUÔ«~DšzÖä‹ÃÙ Ãi[ËÃcƒò(ß •„ Ïñå¿­î“lô f‚ î endstream endobj 37 0 obj << /Length 2777 /Filter /FlateDecode >> stream xÚ¥kÛÆñ»……˜k.¹\’FQÀ¹Ø× êâÚÜqPÒJbL‘*wÖ¿ï¼H=Žwv[çÎÎîÎÎÌÎKÿžéÙþ®gÕ,€q–¨8HÒd–šXƦfÖ¸Ùzö·³ëGã÷w/^½ í, ”µa<»[ÏÒLéXÏlbUªÃÙÝjö³wµÍ÷kæ~žžÿr÷#¯2 NÓ¸*˜ù&ƒ/øpsûS¯›¹N½zÇ_Wß}Ç@^­¸=tÛºÂ-G¦homTdl({ÇF¥qÂ{k¥ç¾‚À»©:Þ}Õ/»‚wyõN§³Leöàµa¨¬‰yíݶháÜ(ó–ã•àcåÚeS,œÌu[dz À›ÛÖusA#W¨Øå‡<à©Z«,–S÷M½tm[T¼sê•ŢɛÃÜÆžšûQd€/ÇS" TN€†1—Ñ­çaì} ‚pY¸ª;ŸìÆ}¦ø(*¸ñz®AüK¤ ¯«yÄ[¼dp1¯ïøƒN‡‘WáÝC`!o ÝÉ}ë^”/å®ney^–¼dÙ8Š¥õ†[ÒB׈&aÅH@J®iHî€Û²dIÂDѶ=i ©wBâæÚ[MÈË;Ô½ØbßÕ;`d ÜŠRp¬ á=ŒæGèÌ VKð…Tu“Ôp*çá~®ñþj‹Ý¾”}š|¿§ÛàW½æåZ)²à<œð/¢ ½«\“wnÅøóëÅCÑmyò§Ü\+FÞtB¿ZµŒÉ'ååÐÞ€"5`EYtþØ9­Mc¯ª™À/\Yó%ê6‹NŒ j0Óæ¡h²ÑÂÝJ±þ¢é¶¢7R8Å Þ—?i{;°†Ê¼Úôø>é«=T]þYžŒ¼M˜);x2ð6G³ËÁÛÕý·x§{äIv…7°ÎÔ¨«Iç¤3Ä©X×<ÅÛûÆj¯ÝŠéëä#ôvýrËèá"L'"Àþ!²ÈR@»$âIû ­ê²ÞíIºQ`¼wŦàP…*fÍÇ=,G{¢‰½0à ô —ëI–²zÊQ’‚48‘P±Ý ‹§UÈ¿¼ô”œ~wâhóPòÌ€J–ó#~üØ 3óFTyØM‹Í¸(EÍàˆDÏ£W9j~uàý7M.pWl¶ìó4ì„¿S#|„±l0Ê îmÁ"‹êÞ5Z.ùó£Ž ]G„z&ÜßöŸ6þ²®Öņ©ï‹}{uå'J§Ï-·¼Ü÷—ë2ß´LêûÄÚß&ŒÚבÊLJ 'Úœ8N¼ô'~.à"žöñA¿¾È`ƒË`ž Røèä’ü”„"˜ âÍ5útù6ò~ï)BTT˲_9ñ§ËmyƒÖÿ¥õ ÿûÓÄ¥mª¢d<ë#„>Þ½ã|ƒ W1´qxwYw8—3‡LS4Íà!~͘ë–'8’ºrn…Ezo‡ #†t…ГÏy,È쇛áý'®Ze=UðèÚ=øiõœ2ýX« Ì@¥JBý?¨”ŒÊ˜H ÅѦqû’¢I¤ˆF‘"¢VгÔ#ൻvJ:¤ÓIñ¤à¿…£›÷o®ßNÈ'ÂD9¨ü«k'v‹2•Ä£É}¸Ê‹í HÌŽÛQ–d2ˆ;²ÐCŸKÒJ±´›=·4[”qt" /q„F{Ìd–ª$OÿðCÑ‚¬Sl&êxé—S/ oÇÞçí§)ÙE*IâÓË>ÞÈ×iq4:WÙ‡·”6Nl«ÔŽ?o¥PI¥ÿ—•²1HìN BÔ{ÌÜ ámAQ— Û-\3™‘õÕRÖdiJFãôûEÁ¤úË&«$H²e™·²;û2„Àù¸—“ÂÀ)§é…ðé¤ApÀÈ›ÍýÏú 4A¬'˜ÐA ìÈ,Ô Õ¶bš0¤x8΄&Œ)PA>¾èD|=wÝ1½9ƒ%0¯­¿»%„È!'"e!HNÃjCµWÓ ANè¦ßQ-Ft5EUtE^Rš‹ËŠnÒ¯€„Ø¥èÖ÷˜##ˆ‡”]) ‹´æœÝpÊ\1„Y~;"øÓ™ò=VeÑø(8±@æžÐ=n}|ݾ ¬÷°-07¼ÊÜC僑O˜h Rm¿h¢¾UÅIt.ÉûÁÙëúß~ä<£Ž²;†‚‡¦èÜsÚÐ*5щ6,ð)ÚÀƒh}Ëð {ö‹ÎÙk\Û—’¡rCƒÓÚú"½EË”,˜Mõy7Ê.Ëðhùÿm¬·´sÄFˆÂ¾lF=ˆ–Q”a~^º½øIı'³Yö„_= ׋̅« tj VOxº˜> É$Pb·)掖Z𒻥^ÓW H΄ nšøræƒRTèd(ïÊq°Þ"_ñ·8YKÔã1R®% *ÇŽ„L1C°òTƒyÔH)¥Î—Ʀל÷Ue æò‘J3é0þá´žaø÷bÇÀ…8Ù@â×L$v5‹ ÷Üåݯ0üº.J®.&‹#œå%ßÀ¹ß0XÕݰM?æg­IP¥ÂÈIJŽƒPúcÕsl‡²¤f¤62ødã2´ö¬¡š†Þ–z})Ä*›ÃJ¨{ì5áÔÐk™ñhÀ³\ú«”A€,dcic ¦šlÚµÅÊq-#lYŽz8nk*Ž­aï!ÕϪo¤gQs¡ï(ëÁ·`²‹Úl™O–'m.í–Øs\â DAB5=â˜!„øŠ2»fÙ6ÔhÊ«ûaxìNá¹8\E{rbÇ"ï¬Yf{2D<€l06Dz$b)J!Š9Ì.¢íù½Ï~QºÝ2ú)A@V´_ìל8k)¤¡¤®õ "û„$ç “Ñ%A+<&5݈ñ„õ‹#ðn_x/¡ÄÃ) À<ç[ôs-Ïp· ¡…ë¨á.»=Õß<×s'bqä&·õînÞ½ÃVÙKFÿxûöZÀÛ¿ŽÐ÷ï_Ý^Ãßí{FpÆzþáïjJªCŸí€®É«û`UGÔ("Ù3ĽéHB«à¨t(Ķ‚cciŸl5¦ \ìè8ÆVã´ÇØÂñ®y¢“˜*+Ä7Ää[²Ki šGó$–=[&j»].‚H€"g„5þâ@׃9æ7Å<´Þ=Úá„0y[,‡‡É(¸_Z\Ô½<Ëñ¥I¢àª€LºÅ¨MoÞ€“jæ“iQ ôo8m?nlÐÛO㟀èTŒž+`‡gÌ»|Ò‚ä·¥Xú,0öm?ôàã¡åÇCå`ñ™Ì¼äÏ{ä!/ù˜Ú44V =œ:¾‰xôAc^X8õTO|ŠöX‹Õ )}ÐàŸ4_XëÝÓr[€ÉTòÝmÙãi°÷zØj¤&{j7¤§—|”yAy¥h¯tëÎïj¿‘ލ~4ØŸÞãÔ¢îºz§XîoÖüs’P ­zÂK£ž0 $w[Ì¢¬—ŸäêQ5¥ŠÔç…¯¾ÿ ’C#ˆ‘M¶¬ÉxŸ;8¼ÉÏ’™Ÿ(U¨ý–TÚúŒäíÝ‹ÿ­ÛŒ» endstream endobj 41 0 obj << /Length 705 /Filter /FlateDecode >> stream xÚµT]oÚ0}çW¸í ´‹ñg¾ÚMêXi;i-ë¢JSËC Tæ¶jÚŸƒ °²‡ ǹ÷ß{îý0˜©ç$©÷È‘ã:Àe"f» H¦às)G.;ïƒNˆ]àAÏ&6¦€SÈ(ŽM¡Ë(&à¡KzãàcH¼šárLÊÚepu> .îzᨋaÏâ6êÞ_¾è/ûCÝÛOz789Ñ/ç7ôËèkpu{SSQÛµ*u¾VIÄâzÑtŽâ$z^NDϲêžÅi–KÎß'( cèq»Õw/²~ñW9 =¬}ã$o@pýyƉDNëM(gÑý=…r‰ ‡\eÒÂÐaL‡k“F¬ÀJ!âµÙÂÔLÕ°qô¯zhÃO7” &zwðV¯´ÂmÄÚ¯¡fùÄ÷#!¥I×™^—Y8¾Ù4mÅ-Ðx+@/q2ŸMêÓe^l1eÉái[ž¥È—²–i\\âÔd§…ì囹VÈ\¾´ia÷½ Eøþýõ\]S˜J1idxõ€ÇBMáÎ0NVB曘Âþq.¶pÈx¯‹me' óèiƒd_H™šb‰ªæ{_[À…ØTÑÞk9خڅa×0j}ߘSX¥Ž;6°(†®«†ñl)E9ƒ°oÆV=ŒÙÐŬœZ¦ k·:u!U4ŒÛB¦3Î5pÑéåÛg^íœ[ÔV®.`{jJ›†?:è/3Ùÿ'ýÅKþ”&4–Ch¾HKe/Y›¦2k‡Bƒi6¨kMUú˜CfÌ—¥0&B ¶ª_ü" 5¼™,ºG`½UŠj+¦°Ö$m2 ÷ê ˆŒk³±M»?#±0`º  ^ÌLþ?Ⱦ:U§î”&e±¿I“ü_iŽ*鼪ʋ ózó endstream endobj 44 0 obj << /Length 4730 /Filter /FlateDecode >> stream xÚ­[m“Û6’þî_¡Ê—ÕÜZ  è«ûà8Žw¶œ¬»¶â}©:ŽÄ±x‘D…¤Ö™Owƒ©¡4NfjjŠ   _žn´~©Ù'ü¿™íf1þl–F6N}:ó‰âÄùdV³ÛÙÏbtŒgož}óáÙ×ßél–E™Ónöávæ³HY5K‰|bfV³ÎUd¢«…uñüÃ_^_ýûÃ_¿þ.Qƒo¯0 ÷þûõ÷/ß„n£¡Œu]·Wo_¾/½”ör.ÊRÓu3Ô¥§w¶H’4JÕlat”%‰ô)·ù§âj¡•›o‹6_åmþ¯ZÏ›Ãr- yCO;¿~õJ*öuõ¯8Ö›"4仕4 F[—M{¥æÕÕBÍkî®\2ˆ"P³P*ʬ>^)Ï«¾3z¾ÌwT0óCSHM».¤fYm·˜j±)w¡ „|ªómذáV(G6é·b]ä«¢žÚ2)¯»nm%ãWXÕo ¦v¡2¥Úމnë|Ù^a+3¡Ïh?ÿùû·Rs[W[©¢ÅPMØ*ÒfMÐ FHŒï)Vÿ)÷ͽà1“ é¥1ëb¿É—E ×«È¦é˜Þ²¥cµñ¼) )ȶ¢°åGa9"ž#èHg©Œða]LЭã(Å\žwûb‚h ¢3Ûu"Ö)6+ÐãbÅdÜ61‘Kúa®‹©½Ð&ÊzÑùzЏèHÚÇ3cL‘ÖÚ˜¯­‰Ï¹P6‹ˆåh§®no›¢˜+Q¬.ìúÃýx~ m N‰+X=Ïë"ÀBMUCî,äná “¿~÷^·y¹ ìíi\sÂÝh²¥—µÿs¥!ë›C!¯ÿŠm\ÞJùŽÅ…eµ»JbtE¹¨Û @vÒØ«Kœ+ÊP… Õ‘ïeàÕuЄj¨0•Ý ìÛÐÃÌXóyêá¢ÔÏÀ?Êöûc&J"ë¡ ýò‰±l¤û#ƒÝL –D:=7؈¯°gXCB I–¾ËjSê Ã{v.~.Ûõ#¥ÄII·K%kÈg¯?<ûõ™bû¦°×I³6ƒ˜E1¬ÂrûìŸÿŽg+4BCG&ó³ÏÜu ®ÌÓPD>T·ùͦë¢"ýœ&ÊÈ‘*aGôWQBžMfyã¹êÕŸÁM>ËÄZùù»»vÍ’‡ò.ߊ‘µ¯|/ì(Ž„ïÌ‘Th6å§u»¹“OWÀ èx[ÔÄ‘JŽîtþÞ¬[RÕšÀXu‘7ÕNP/NÉÍä+M'€1 )̤så°»P)qãø·ûC$íÑPÕÛ¼B™DMA&;N-±&¥ ŸŠš×âÊuÞœñT¢dÆÞ陟ìb˜µš„³YÌeÄ>“†-VQ û›8à“øqØ!N"—iÊ`(YÏß¾½þáÍļRžbÞ$ÁÚñ¼?üí‡×ùàùÔkáy*Ï’Ëtªôï¤t[m6"eÅJd4õQv ]nîHZшv¾Éá0û¹(UÔÖu:‹Ðs_þÆ6tCžŠÁnòrºÚ0JqÛ.ÚjQ“°p7Ví©jJBnª¶­¶´:ëç¯sòýM–g’WÀûà$qp!©ºÙË’UÔJ*v‡í [xôÑSóA%@ì&MÂt:Õ\K%ÅŒÏU-[(XòBFsQE÷ í6 ÁÅ4%ã†/—“ÆmKš(EÈOÍÆŸž~A°¦\¹…Ôâ žF/nÊVêÊ]ËðôS å@âò®çMùiGäQ[5iÕ;éÓ!%­ùô=´DySH™&§çª:Ütu°½Ë²“×ëׯ_K‰¼‰ *IÏ€©J¶Ù™ïΞMnœÌ„ƒË¥}Ÿ—¡‚Y.EuµÔõd£YòÙM-8P×ô0˨‚^ry,+û û¥"i/Øü—ŒùÓxd,`ÅXP©{> ”ÉÄQ#ó-U¬«¦]lÁ}宸MÔHý޶±Gª"¸Ýìƒ5u\N{Qup,óÌí:{^6¼×0p mÛ–( V`–†]oÏlž®âl"I2ljy9âóþÝU¦ç/z%¯µ@Áùø·Xº†56a:@ªÞÀú‘|-¦ØeL |: Ãˆ¸Iõ5äa#ÅÒù·¯_QÁ÷S§GW¹¾•¦]±œÔE@Ù¹.X4\§hT‡]QÚ”75uâñý¨” Åp0ð›Ðxs׋Fäþ"8( «CÝs'ÂêKá ðà=˜NB_ ²C ¿vC­‚bk¤e®¬ÉÍUà'4Ž@ž|) Ó!,åáð³@bÑu¼Ç–¥8ÕÌÛ€j°U]còÒöûªn'a ,«I’K>´Ö~÷3 (;û8oC˜C¥‘wö2ÔÐ÷“ÌêÒ(AѬ𡜎>ƒ6Ó®ÃBÇP:9ˆK M©8{ ¦%$ôEí)¦ m8íO/¿}0úMí\£Ì%cë1¹mØWç@?xÓÃÿz ý Û†#¢¡œJØ7hG…E=żû§ãyϳÜ1Îζ²™oÂõ±ýƒAW)Nú|b¶”‚žñ Ê'ËÀ=zâídê4¤œ%½|Lä6c¯l8#ëߺȅ*ÅÀæÄèq6[דC•š“°Gtsé)N£*Oß‘‚ râ)§D¥áeºrôÕ"u=Ô“Æ2ÏÆw’€ÔtÜÏêJ ½ÔHBi´)‰í6å8†cv©A;M.ÕyA¿0/Ì…p Áï;ôDåxÞÕåòº)Û–<©Ÿ X¯¤ÑD!øõÞW[ŠÙÄY@*9F   ï¸ãOSÕ¿„×U ÿ‰cZü*>Twß=O±…Q@Žé̦@(L5c  Ï,Eÿ8{”M60ë±Ê0Tù,»lÓà$û<ͼ)ðgªÆóž³i€=^~ѵ6ü¯Ù!›ºJ#sTNS·e‰ …v}‚•ÀD1¤x´’â7I(¸7±…ÞL²'™ØÆ§q21tT~áŽÎX­Ã¨8)`ùÔL8QóË»Ü0Ð ý5uÝE¥à¸¡T¿J¾sÀ ;bTàk<;V(›^-ž^l{wInJ4¤¨snNW,‡ñ[jxXÎé§ãzè¢jjæ3w°:Žt|ñÖXi Û­Í£0Ÿ±.Þã¡bÓa¾üæÇ‡.a!+©ÞÛ‰ÓÔÿ$”†+hmö°bP&oØ?fy \¯y¨8}Híx¨ø O1/¹½tBÃy§}wìÝÃPÚ‚€^¢~‚u™¿™ºPE?çû~“ˆOA5ØÞëù™"Îó”¼eæÿ˜°ipDѸAÖVw›Òž%c¬‘°çåÁ0 Çzx&”CÔ–M“Km%~éSäkYݵ“Ø¢YçÁÓ.›ßíç¢ØÉKÀ*T¨9«)çËu¾ÛŽ,Cí >K mp¹iï6¡?,›ÉmÃsÇÑyz†Ûc;ÿ)_•ùŽ30P}Ëxa[nB7¹Ovƒ»Xz#4é/ßþt& e„‘“j¶Ûj'^¶£ ¥pkæxœ>ÃËŒ@únõ¨ïV,wçµ'‰~b´ŸŠ]Qç-OFW°|–£0Ù¦ÊCc—B&„Ð 4Þ› f ¡"czl–¹>¡º\^;l&U'Ø,áÛ iì±4“ v¥¹.Á’ ™¶#d¦­ i‡vˆËèíËèMPÙ½(&“^ b%^q®Í²ÈfúQèÁ'œkCCÁíº¬-tú<Á´–îÀâl<í´\hÂFMðöÚi…ùØ\´—) ´±õiä°å“&ò°—4Þe–ÀåÔîI&NTihíÑÄ_‚ÂÜ S*ÕÁóv:›\ÔÜ.Ñê&‰ÜIÄ!8VFRЃ0ªb.¹TÑ0®[‡^½â8öcØE¬ ­>‡Ø–÷.Ñ;v!³MÅd‘/²Ib ‘tZÎD©~TT’(Σ¡¬§Uç+} Ý×^82ç#}ŒlŸ )¥™ÄéZGÀ¥ZÀI3Jõyãá.¡OkIÌð3nþ˜7Þ%-ŽnY†~ËMÞ4“á}بé5ŠS§ßY“hªèv÷‹0=¦bùŠ­XÐØ#¿ n½?½v¥Ã þü gÊK§Ô/Ýë<ÞñI—€á1?¬9ñ¬ä¤¨$¾Fß–Æaîr•/š& 8šº2Sèieïåõv’Ô%IõZàx= ¶‚#™ ±Ñ¸÷xµ°öª·ÉÂðƺí¤âfŒ «“rœ8è¦]וÒì”Éï+LÜÝ€ó@Á|1½ìU!®ãaÓ†â`³£KË¥LŒ‰Ä`RøêóïXôË N¢O¿ÀžSÔ²G]!mSä…vDÇœM¼æÙÎYD—Ï5Ü8~ÑMïÚ ròÙÚåDÌéÞ¤Aþk]0&e}6K©á› Ûñ¥=IF£`¹ùËw']:—M{.ù Û„SLK¹ó“‰ÆžóªØØ–?p–íï9ËFÒo§3;(û?î}†À$÷ý1á€Øòƒ€oúh-?< ›ÞŸ(O^]"báh;³Sü ‹%ñð'pá÷6“$=:ØAâËJª8£ËrÚ=€5ö•¤Ñë¶ØÒ ˜ÏÂàãD^f—>Ü'šý¾#Ûÿ.Ã,’ù¥‘¤;ªcÆeÀ—ÿÝçu‹·?Ékˆ§`YvþBÛЗ~]¸8«nÄí6YzÌP“WJb¬¡ùʼ-º t‘d©%]/ ¿ xšŽÃÀ ü_ÅÇ‘†ŸêpªÝÎIK[}*8[IR-¶ž~‘(ÌŒ€q{ÛôÛä¥l¢{ÅEHÐÊ!q¡Œ§;Ù}çJ£IÔWòÿ9^´– endstream endobj 52 0 obj << /Length 2927 /Filter /FlateDecode >> stream xÚÅœÛrÛ¶†ïý¼´§Û(·}g;v“ŽO±•N2M/d›v4cK®$·Iž~/R„J (RkfO§#9†ù-à_?€Eú;cÙüÿ[6Î(ü§œ!Šk2+¡R[™Móì1û¸G¡!Í~Û;ìýzÆlæˆÓ\gƒÇL "…ÌŒÄJ‘ ²?÷åÁ_ƒß=ã.hÇ'Š ¸JÙääýÑõàôæà+ºÏÈÁ¡Òtÿ×·‹9»9tÿêbñÓÉ/¿,Þ]¾[¼¹þ2xuY`–¡5½žöþÞceYƸƒp]f¸"šéìþeïÏ¿hö¿ü=£D8›ý[6}É¥DÛ⟳۽±‹0è»f©‹@sFœRÕ56‡ E$3p-#nƒsücžÏÊÎՃךÊp¸†nl{“¿NóY>žo²È'[(K„uuöJûñð%ß @ JïÁëÆ5ßQ|Ê£G|*‰vr1ô+çZ$ÔÇ{õCðJ—áÓè¾ãíå.Ÿ.Þ¥ŠŽÆ‹÷ßò¦ö¿ÿgñµ‹×G^½êÅ놿a‰lêÜ—Í„Øá^KmaŠ£h©'®¹˜ -M³–(àJËø2mò¸x}ÍŸgþ]õ«o“éèçd<>/~~óPëy©òS>MËØ³<6)Ôºñy6úÙ<tÇF¤7†0gp¤·”[¹ÉÒ3–ЃìµÉ1ícBÏú(Ý/è¸ÒaÐ_ÒJwÆF”ÖŠp‰drm‰åU’2^J­Rc ½Ô!:&õÝpüÐKÚ~AÆ¥ ƒ<.j”¶36"-lB¹E2±ÒÄšj#Ët)­KH‹öÒ†èOã·Yþ°Òñy¡âÚÞï~´¨Ù/®¸ša\Çw£yBÍÎØˆš’!Œ*%q¬ÚbòrkÅ{+´W3D¨¶F“éËp¾Òu!+©*¦ðB¦G®|Áôáb3l®QJJÆ’{ N(Iµæ µ’r-j¨·Î.‘,ƒí±³ ,¨ ά?ݾ¿º,Æd­t Vk?&-è'fÜëbž½Ì›MÐ1¼ ƒ4¥ AWþååž”§6¥ho‚}2yŸ©?ÿñšocíÄ“6„ŠH‚°tQ×îC¤tkA_½ûpù[ë o ±¸NW |Ƚ¼º<€Ô-ó¿ŸŽñüèØ˜þ¹‘ôg ǹµ¢9#”ú5 Ü—‹Ô¾íÓ?D,Ýß2í%Y:í9L½ª$pjvJ?n +§œ0Ø/×§1¯q¢¥A¡ÂÚ¥…®SÏŽ#9‚8!¶Lú~êÅ“¾6 …r)ß™Iy éª5NÊSG¨ªì*ÊúD¤ê ´Oùý~­ìœæ³ÉóÛ|4¯Lð•R1Ϋ;I¯£ï…)–·*^^ª„L’FØ’¹C¡Ê.Ÿ”.Zš ¡&œŸ8,’ZÅÒá²ÃÚ…’éÕo¤âéŽÔçižØUw¦n¦—‚õJ1œµø €ºÊ¢¬‘D¢FBAWéUCÿqÀÛϧóÑ=v†IAäÿ#ÁzŽU4Ájcõ%•`Ý©‘³¬,FPÌÂâ&yuµ,Ûd¢lCAû Ñ;á=㊋ÆužŸæßšåìÌÈYì¼)Ò|a`lM%gY€ÈÄr„‚ör†è]åìW\Î0®“ÉKñÁÛ¬˜µ5í h Ž–HÕ°Þ¢å E% Úk¢wÕ´_\qMøÎóòçf5;c#jJØA;1¥ƒ‘õ-K$•(‘0È^˼¾]œ<pµÿ8Ëçõ[ÜÐìi4NˆÚ+¾¸¦a|Ÿ'e0ªvåFD‚¡pT†^å£*«•šv1Ð^ÖÙ¦õV¶_Œqiÿ´IÛÑêIƒsb@Aõ/t•–ªœ}Sg0È^Ù|V̰“ê¨Ç·ùÛ´º»±8ð:Ïj;ñás¥ÿÏ|:™-oˆWG &ENüÛ2_wíɦ’ý¯ {¬.HšPñâ"Ï$lÁ5Ôx«[EûçÜŸbÿ=8,äÓ­N@ÅOBA€ÆAB- å[²/`KEì0Œ¿”K=ΤÔlÉ(ä*ü^J “¨j¹ÕeE_ò†ÔÖÁË#gËn®Ì¿ù\ŽQÜB™ÇPbBBйzP‹‰tøüƒkA¸B‚Ã^“ó5øE>Çoû*[Ù>äX"qâ¨Û1ÁèF)œl„dÍ÷a³±-*Év¹%Ê`Z±ÎÔ™ŸÁ1 ­X+áøòjp{:H8a”½óB.t¶ ½4X?tÜ`!û%ŒÕ±È×Xf7$ÒLË9l„ô¹ •U(¹2Ûsìs;:yt“Hí‡Ø'v…ž6p—y݇ÏêLI½;ѯµñ…}ßÓØ—åöðnTíóG±³ÅKwt &â Èl+%Ž;…ÍÞ63?4Lo ¶6Gˆl7Çî\ïÛb „öæ©ÐÓoôÇÝ’SS>Óû#dÞöqGç`6ý!œ$Ö:Ài¶X=Š†Ú ¬5f«A0À•CjàÕ餸G0F¹òH[, hï’žè¨KjlÞìfå’ú8×V¦·4J÷x"F±g!U‘(¾ÅBR44Å'!²Ý'»s½MBn›K†Ø»$ÄBWÛLÒ7Iˆ “`0½Ij£ÜË"£‰XÄPâ ÒZb`4µÚÂ"ÐÐhœµ$d¶{ìM‚?}¸LyaŒ½GBj±’DÁK‹ôÇ-’eÂ"Lo‘Ú×ÖÁ·5Içx"&kQŽ´ŽhÚláhgQnD…Äv‡ìŽõ ;š´Âèz{LèfÚý°qs\•ðÒ{#@Þö2Fç`"ƆP´z((„Õ6«4´J¢X#d¶{ìÍ‚ÏίŽRþ@dïöbÐ@^Z¤9n‘­Á`z„ÌÐNOOýç™å©Â„M:DZ‰(°86–˜-Lͬs(&YÛ-‚€õYaO®.®ÏO?',‚0ÀÞ"+lq7«‰¼´H?rÜ"+´Iƒè Œñäåuqêêûê“~^3É,þ¡þÒ)‹8… ÂÎ#‚CA,·YP ¡“8 JÈlw Ø»%¿»út|~š° Â({»„\èlzé—~è¸_B¶M8ƒé2µŒ-)“·âÌG³O:‡ñ +ÝAZQÅn ›@;gq–”Ùî®wIÀ}wݾ¬ Œ²÷I@.lrݾ²ôƒÇÐ]Â(Ho”™Z[ni[Z:· ¥²Ë¡”æã^ÌÁ©\Æm¡®k8ïÅ«ó^דÙl´ü÷ŠrÅñŸàèÜæ³ƒŒSÿTJx„ªçI±âËtÆ¥$Ú¦¿3KÂHR=›S]Dp¢Ängè$ˆ=¸ÐåÓçɇR™seÔ=ÁõƒbT­Å¸ÏI±âK‹œD JP˜r ¯•<)V> stream xÚ½\ksÛ6ýž_Áñ—Ê[ %³3;“d“Ô]g›ÆN¶Ù¶Ó¡%*bVU’Šã¿/ ´!êQìN'5HB8ÀÅ=ç^€‚þˆpô þ½ŽVQ ÿ±,E,NE‰„¡8á"‰ê"šE?=‰¡b½~òüæÉw¯He(ã„G7³Hd3¥œ"‘Ðèfý2ˆ¢ó1ãñèæû—ç¿ÝüðÝ«;ŸI¢Cƒªö‡Ë7Ï^›j½¦©@”q[íÅÕ³ëk] ·ç(K©­Æd•®¿»þ¾¼yòǬF#L9Á’qN£ÉòÉ/¿ÅÑþňf"ºSU—eAãh]?ùÉ×`C1ÔTÇ(cÌ´¡MêŽKûJJ Š3¦Çus¿.ÔÐz]'0Q8IN…í’0Œ0Á}Øß~{>&,å«©.¼½oçÕJ—WùÒÓ)špÄ Ò)Ê‚)éõéÃ9Æx”/6>la‚a‹‘´ý¦ÈWåêÓcà$KONq¿Ñ8ûsŽˆ9“…qDœ¡Ʀ,pùæñà1KDUÌ’!L‚2±í¶’¥H¤¸yóñíK¨€Þ¥YPÁå¢úæýÕÍåógÿüûëظcÝØ¹NÃö’Ë…Ž8ÒpÊ…¼®@E”ž,7‹¶¼í¤¦\柊ªÝMâá, C“8E©àÐ*f‚ቋ¹‡'P-Q\ÔçÈ ,Ù@H˜ìŒ’>ä¿8`B;Nî&Ià1LÂ!÷€&ö ³£ÿiÃôÒß…ÄôièïBnéß@d]˜òá*pt·«Ï"IDxÆ KðÓ"Ѓ Fz ß_^ßüøúݳ7»‰ÂÆ–˜‡b[¶œˆícKDË ˜š.ýá–M[}ªó¥fGUë¿Wïovsäø¾x8"bDD˜HɬÓ"%,AQœ‰”=Ì=$ €jY⢾úñý»Ë—ï8ÀÆGBîr²—!.0IÓ0¤çP*`èØaª¯Î1U›º, ]šu>*ÇwÍC«8(¨¤PTR³„/.ä¾üyPKôçÿ JëvTÙ‹ÚÑä4T/M\PLhrfB<4q1_\¾Ô\0#~Ä,Èm»­6©@ŸÃ¸st=Üa\yVî0yÀÈÁ1l\Ì=ä €jÙã¢^={>ÀžöíØ³µcÏi¨^ö¸ ˜°ç4L/{\LÉMÜ› ”òÌ’æÊÔ€îÊ-j!kpXøDql‚Õ¯qL= %ˆ‰hìÔË=m1D8?¥±[Oc qWcî¤á^kÇhÃѳáц$A WâCÂ*Ô#Ã;²Kƒ¹G€Zep@_¼ùøe`ÝNö¢vÊpªWPÌ„!À@­08åÒ™eH ^”Ä Ü7m9™xG0¢IL’@@ïc_×UÝþ³þáÂmeá)A óNC›1;$€Š„y—ÑÃÜCù¨–ò.*„åŸ8ÀÀç÷Ãv¤? ÖKzóÖ‡À4¬w1)ß–­y×Mz»€Û½ëþÓY;0гá¬!=¥±]Yó5¶CŽ6¿GHŒ¦aä¤íðÕH&üo÷HAL+[Ìw¯‡V,ÛéÀÌNNÃôŠÀ§ÑHÀqûÃ;ÜŽGƒ{ ÄX xˆ Lý!ñ*Ò$L+ß>xÇŸîøsnÇ Óp½ raÉÀ›¾ ˜†A.&æ*×Ü¿éw|<”€¿‚ (I ä>$ Èq8L@q1÷P"ª¥„‹úúÝ˃œ`⎇w¤8 ØK — ¼ ‚iHábº¤XV«j2¯«åP¸8º~np"Ž8/×;ÏÚ?™P”@ðd1p›­7ç"å·ölFÉÓó1ÅñèmÕ4ewÿË9aê\b£¯gUm޵ö|“ÈíaCkw°s×YUˆåÔùø˜¤ JÀû¡(ïQ­œÕwg½VK ±]þ>“ä|ÔÎ Oå FÖÕ=«Ï<é|!ºô`YM‹ h2Ű8%ñhÓnÛW…Ò|%—§£Ò`/óõº˜šÇ«¶’ Ѧ Ç4«7KÙ{•z@â2ʧӺh}¡óU¬‹|:¾«Ës—‚ņ,:¾¢¥Ï§˜cHÙD¿SÒ«=íru˜ÊiT¡ #½f9Qo1lXÀЦŠšÁª‹úÄ9VÚb}­Ø'¦®”÷Ü·#Î*?P×ã¿ù¼`Ëͽ?$œÁ¢•D”0X/d†a&¤†›zÃàÿÃa<òLä¹-IÞ7¾µLŽÉa®ZÄ;•‘„£ ¨°$Ìù?Üà–Ín꺔‚ êÜVrÅ ŸU·Ÿ!=Ö·2ŸŸ™L},ŠÙNµåR­; ãÚ®;âD²ü ²Xèë¦(tA†—˜Ž•©¨ò×XæUkÕUG‰:æ`}]²G~ÒDä³öNû1Fb(PIÐŽJ:SX怪\Èu ÙR>PR& sccÈĤ`ÄBž,ó•ñ°†q¿ËÖØR¼嬿ÔWrÉÕ‹Y_Í`ât«f€'£0Ã: •0Ž^CAY ËJVý¢.\ë Ñ”Wª¯PÒ±C}PƼGÂöÙÄt¹š31Ð~L‡G‹ò¶Î¥ƒ©Å –Ý­ äòES™5¥Y¶:ÊxW…«‰LÚ/|¢uÖMÚ—rÝü.»ÿûÛË«ßÕºóñ<ã8Elûé¿àìf I(ÄÙM-–²(ý•Š´fò¡„©Syý ¥Ö·ú¸«Šsr1©ÿ˜€l~Oáb»|Ë[sÑÊí]ªËõ¢8H»c-iOhgôìÉ«Gzå“q¥‘¤Î\ÈÎîXÜA®œe´/i×…ššmÏäÉwéV±vR“ňnÓ¬ é4¶S'ûÝ‹JfwçœéÔ ÚåÆ4ÄDnPHûÇrgû kä|Œc0Ê«Òî?A>zž(%€¦nÀew®‚Ó4µs§<$ ´™¸ÜMÑ·´fr!Y¶…¹§+­6Ë[•eFEáï´´‰Q±jõ-¹¼X˜¥†ª~²ÍmâÕJ®RžBªç¼T{<³áA»æ lZ²¼9³#W÷õfPÊäu+/¿uŽí¦yGþ¼™ÙˆÑÈkwÑ›/.O¡KÒ‹ËÊ£?—KgG2È)ú¼þt6¼¢‹ûn®wºˆÈ yPOˆÑ'˵Þ,“OôÈDgAßú$CÌ]xè®ø˜g©èeù6¡R«U#Bøƒ fíB-¹Y!%Õ.Æ;×L»íC¸Ùm>Àm=(¸ù(+—ØZúa¹€dbês=#•u¡üvbÕЩÝËžä‹Eáã}†UT4Öø¬Ï=”üe”ö`¾Ÿ$ü/¥I– endstream endobj 60 0 obj << /Length 3067 /Filter /FlateDecode >> stream xÚÍÛŽã¶õ}¿ÂÈKì&fDêF¥@É6³;E’&ÓmM1mÊV"KŽ$ïdúõ=‡‡Ômhw›Åb1$E“ç~å¯3>ÛÂÿW³ræÁ¿0‰YèÅ2žÉ d^É`V«Y6ûë 6z³W/¾º{ñÅ5—³„%‘ˆfwÙ,ôYà³8ò™ üÙÝföy´øçÝ_¾¸É`Ÿ ¹§è-/__ÝÞ}ýýb)BoÎÙbFÞüíÍí´rýý"ðæo¾¥ÙËÏ>£ÁÕw¦Áí»»×o¾Ãk:Ð&p-E†|¶ôK‚€®}shóªl°èÍÓZÁ€'óCÚ4jC‹mEkíNÑÂOž' ³1«ê}ÚÒúº*Æ÷ ÎUݪڜªöK„k¶Ô°Ì–œ³$ éú•Úlð"D!/鯾tQ™îÃÛ€xtUÓW…“ßÒý¡P_ŽðîñCü= €Ç„Ïéæ·7ût Ež7¯ŽíO^èÑ䓟UÉÚ<ûr£²"mÕ'Ÿ›õ‡Oh[ù‰¡Üu  þ^çm^nX)5…Œ n°°QͺÎ-`C¢1<‰{‚ Á­hxŽëà®8‘vÏC^tò:=6ŠnKiåîæúšr³f>óx2f‡h»2xZeùb>nòfm>çíά)`–Ô¢éºÚjÕ4 ZL_ç`ý 7¾¡ öiyL‹ ÜšÕÌI¢D‚–Yäóý}uP%òÐGî8¨ Æ“Äþ ÓB‡oT›æEC“*3¤‰=&Ü€ÑOR¤¯DF‚°×X$=hh’–Œ5¢1І;—E8OóŸéª@Id±÷ 8Þ˜l@$€6N,…âä…Â%BXŒßæ‡æZyŽJÒcœP .HéOQ!ĪFè—€:Ì·‚6\ÝÞ ú 8Cþ°Ë×(.@ºBµ ñù±:ÒЪ­+Ãý}U+Zžè#$¡á-ÒÇp^«tCª¤¾ƒn:¢¸¦mJ#Í+m}úk®†QsÌ[d Í2kwŠ´^p9ߎŒTà ¢]*¬ELpg>óKî¹Õ‡T?«5Ú_sű\“5v.Y$é¤+´‡Ñ¼Q- øw¯ö+`÷§Ù-CF ˆ{!¹±öar»Ÿ€­ì¶C]!×ßçEg§ë5(»a=hZ #·]™vUlš– Uõǘõ¼lÉJÿØäÿR(ë¹î$"šl}wzk8ÙúÈKsvën¹ÞöÃäü/^V$½øŸß÷x0Ž Gg÷fE•Z‚€A>KÁÞw'÷N ò*·íî9ü:o`‘ìÎþ²ÙUuwÏ{U\ÒU–f\¶ùcó3~}§jåÐ%Ðtþ¸ƒ§ç1“½sÿÜ¥–1‹;m³âá8ˆëó⃴Ü8ްÖì2æsrP bI,ÏpöéÁ±d`úì¹N¢M e¡*{W¤ã³¤£˜ŒL¿6ǘ{m3p¥ìÌG´'ö› v<ÆÐSpíÃþÞ“‡Æô,Âp®r`rÖ–l5ŒÌ(dqâo."³@tÂÁD#tª„ßÅ;¸ÂiA#èkfqHX$c¥ øP¤eÚûíÑ·ép°ôh&¸Ïü o¼DÝh»}1ô'`mçÛ¼wÿ´Áxýµ5?"‹ },o6k¿ vyAðcŸ!Là{Š} š ÿmΰzœxŽ>cºycÜøcÓª=û_b4}½Ku`5ÊK‰²Úd2º?èbÅñl°œå„䨸,ýÉ(#ö§¿Z³T€/K<1öˆï™aVÄ}ÈJl1vÀæ»BBÕÖ)M÷qQÀ„³ž8{Àð’‡ÅòÒH+žt¿í­­+Ntù3ƈG̱ݣmÎ&,Ž»CA¯E"æw;'-ÇG?êFŒ.›Ñ-XðiêôêmZ±“d~Ø]^­0äk>7²©”ÜÛpy±5\‘EFÑ0¹VäE’¿LÀ&M%ç}•oÈKiL+®7Æ…v‚Ì!åxL’L%YÎËY2dëžr3éCˆ8 ð^ÿfœ£üsæ…r,u4¶„†ïFÿó­Ñ¸_W‡Çgp±RÖÇ~™ûÖg0BîJÿ2¯s@"3‘Äca¹Â '#‚ísàï(.sU®}ú˜®0©<æx¹þyI­ËÂaç¤v0O#RO&}ŠhEJpo R8«U{¬uÀìQSÖx"»]—]¸×ÕŒ º ½I“Öuú8® òߺ6Ψ;Òq£«¯h]\Lù`~Œììˆj½srFWX¢)glSGW=†MÓ’3thLgkÒ:ÚbÙîhÅ4ÝWDzmÆäûþêÛq ä<ä½t,¹úóÛÇv‡ŒÔͳ ó™tm7¤›Mã’$_j”<ÛJY³LÕ®2‡Ë$>¨ÙC)¨~¶Z ÖKÏG´8q çÕAÕ©Iäâ Z…³Õ$ÀË 5|„ß7œ¬±âE>É*¶ªD°zÛW Ò*­uâÝÐ'êÏJ-Õ%mQ9ŒkZ…lóH_ò¶ÿ‘£‘@*I•Ú®3<8 ¸]ÓWO‰ÒàÕü(™Û"ïC&‡Œ †ùñ0=ÎŽ2-ë:£ÎP²3eô˜ÊOO¥ÕT<ÿÖ8mYÂxïÏÈJÈY 6Ž¶Ù ·cl‚K”É×u®]#îYá#"‰‘ÆEž)óxDz,Óç ùÀûYëÇêø)Þ [ö’ÊlÄDüÃçEe6ê¾)±œ@JÇ.ßîh?Xd[¢žÐL¾Mñø Òa\òKt×c^ ÆwáÏ›ƒR: !{ñõÍa°3ä5uxXÑN@èçÝkÈ“B1QKhÝÔB#5i‡×*²“rÒ×Ný›gC0jdÇ‚ÆÔ¿€ÁÞ„Auà\+fc6ÕÕžF¦ƒß|^ºÊ;lÒÔÀ ¬Žã¢- ®ô-8/òU¢|{âXW{kõ)¶uÚMeFôçØæÅÒÙ+lµ)豫Óúàêºf×íÍ7÷ûjá/ xÿ>?¸Zú”öÄ}ÿÀðì+ ?Ê¥¿ «¦¹ƒdòŠÆ8j¸Ð>_°U/¢­vZÓÖÈG;qz ÀèÙXÜÃÙÒFRÆm/ÿD‘?Á=~΂ðºÂw–$“@‹BRÝ×j*—®a&ÓEQÚIm‹Qül—AÆñð¸“vO×7-V$ñZ%ïBÀ‡F,–`Í  Ù? Ìó+åm¹Weë€ å3ažUÆÓ¯6$DZ}2€›Rk8ð‹òL7—Óî^tP€=ñÂOµZbùÖd:}RàƒàHÛ+_ú]dŠ…šöQ7XÃŒ1¦6_£fFþàQ~<ê3§ä}Aƒçx´ ›4î‡"_ß½ø7QT•Z endstream endobj 63 0 obj << /Length 3502 /Filter /FlateDecode >> stream xÚÅZY“ܶ~ׯ˜ò7ÒÀ8yØ•I¶l%v¬”Öv¥¢”‹;ÃÑÐâ1!9Zm~}ºÑ¯Åh×O®­-6îF£Ñýucþ»›÷ðÿݦÙpø3Y OÒd“jøŽS½éŠÍaóÏ':òÍwO^\?ùò•Ì6Ëbo®›4cˆM+–jµ¹Þoþ ¦ØÕÖÄ<ºþþÛ«ÿ\ÿíËWZÌÆhÉT*`BÛû—×?>ÿÎu[L­R¦L컽üáùÛ·ÔK¤ó^q̲Dùn vù]a…ùØ­Ö KÄf«$Ë´öüÔùûâjsºbÿŽN¥/°È>~A%¨_ãj0óV–s‚ßËz6JááR±LÐh\ƒzüuœâëÀ¾-#%“Ê ½>–ýÕÝ–UET~Ú:Ê]^UwX•D»ªí jŽŽxǹ¬ wóe„Ñ,‘Ò‹—$:ÃÒØønÏ`ÖÌDy³·;ÜJΙљ“SLêüÕàp 3E¬ÈLF¯$ŒìÊü&ÈP¢™ÔjÎO€³TŽªsjËfp«´´ˆ[ME¥=«À21ÓÓ¶íÁ…v-YÊÇ]—ÍÖmWp&³x©ýPä{¸Äý¢ŽE5™ž-ÚUs^ZÂ@üË(™ïÔ´(ö[87.½ÀDÙ¯Õ ú¼vÔÙoWäYîv_tÕ]Ù¼)î¤lÉöæ÷b70;Òé°Œ+wû^7CÑ5VYcƒz¤áòÀA/•Êãb—Ob-“já]ÑÚD¿Ÿ{W“ÓÇî¾è¨÷Om´U®™ÉÔr¯]q(º¢ÙÛ]{nÚu¢¢›ªÝ}x†tÝËÝIX¸¡æáÜ9êØVûžÈœúxæÅª°I qnæÂNAoÞ–i˜#ñ’˜ݵFë©×pw*@e•ÒÑ¿®\ÖöŒk€ É›‘ Ø~ÛN>2aZè%ÇÅu MÌ®,šÁÚ!G§¼ï|‚'Ñ<~ð`Á;d"^lO“ÎÆÑáÜ솲mluݸuÉÀTçâ™?SðGR.yÆ‹eõµ+ì9.«Ï—>†Ï™ùÄ©s÷õ|úûs5ôÌ-oˆ-iV*˜AñJØ=ØÓÑÝš+Ø8‹—m}:ã½»-½“9›G ÛIˆùå‚°I®ÆMöýmEŒ·¯ F×ñôýl•ÑRÎ yêÚ]Ñ÷–M,·§¢ËÝIa9ï\Ǻ¨o·`v¶Öªè‹—" Rg¤yÜQBÙU Ÿ¨ü ö¯®pÙÑ>åõ©*¾ ¢5Ê\à!gí}õŸŒ2æ£Iá˜Ã²°k{œ§ Ú§剤U~½Ò`û-Az:ÁÕ\¤˜©™­ƒ…‡.×¾¿T  spÝ.P0‘¤ƒ-ñ¶@`bUÓ2Ý8#‘€a\~ïÖ4Ú÷¢sd‘[KÔ©ü„ºRTTDƒ_²Ü@ÀFËÆÑVƒ—œÌ©möÛÐù;ãù"X,C¶Êpó? â¾F§‘¡†¦Î÷{"†c>¸ÕH¶2x `[Í„2.á(™±4oó( J²ù«rü•ŸNoøPëºq­Ç¢r=(!¡‹Õ¸w7×C"rœ ‘“J–H†,ŸiQ¹Éзcq_Ôà]¶û®DGôÑ^C=¼8¡×ÜFbS0EDEý­é®Û\6·tRFD%lugÝAÑS-®S‡Ó’W„.UéQ8v „À[D„¶*ß ç¼"t-¨ŒE…³ E– ˆ7vç*0˜QB¢!ây5Ûóû#õ¸C,A]"νL`úKôø€NÖ&’„èêÞI™„°PÌx–-›½€SyUŸ±;:ˆqØÁ:X„äêÁ0à, ¸`‰&ÐYऌÂ_íI‰,&) ðˆTÛo»r(4$ ¬ó Ž4büæÓèªð´áÈÒ(Ò¹ä\èÕ·â%ÀºÑõR‘n¶T*jŠÂbR¨œ›1(Žø 5Eª$êÏÖàASt"°’ŽF¶.›ÏˆØZ‚t2È3K°B•V`¨]Ráœe}®©0ò‡K 2ká/£Äò—Žºät7 :·^ ´Ãø%”NBA­÷Ø2N™03ù•äîRSFÞö@«E¦‰ðj|¨•ت¼Ã!èJ êüú0-`bµ ’QÝvŽ‚e¢ÚÆU½|ó3¥ki;7ü¸#”˜ñû‡êªÍ÷nHb ƒb{@XÐ"ÄKG54 ŽM”{YÙØªcoæÚ¡V¬„ObÀˆºÈ›ÞÏ’Á ¯‹¨ÞŽâÎlA¹*kk¹ãÚ¨/ÿçFÙÓæÆ7Å£ñÀJ:T¨$ Å-·ÛÐ}Â-8Àèü&²nÁ%Ç>…‚T¦åèý4“4Ù3 FÐ ™Œjª²·1âëç°÷Ú~ÐNåi‚ÝÜ‚Yž‚„‹Þ‡kDgK‘¾/Ðwç<»sUø`ÑÛï†7;€ï¸HÖCî'±øÜaJ•.R5ym¹ò¦Ø9Ó•F/Ÿ>%ÂE @gÖ'\¼¬ʃ¹vÓi¸[bÕ¾kO'ëj±"0fЧˆpjÈ|AŸ);7­Ô'¸RF¦SâåÁ‹C§Õ †(S<½À 8’)ž¬âðL*§X?xV.O«3€‰SÖ- ¥äÞÌh¥â)å'L <¾w_ƒ9Æù²¿},v¡ý$LÍ$ëWÅD3€Ô1@CÌ> Ð,¢w¹¥}8Šff}«%°P—`f-6j¦Å'ÿîs !QàÑÆƒ ¹I•0>Æ4OkK²™£„{§.¤!2—Vx«àåVÊÀ”<Š÷ ;ÏãÆ‡<{ ]¿00©±’4IfãôG[˜ñ¼®Ãê—2¡ôc²†§ëL¢ŒÉ¿à×çøbë°Ž‚^êf-3e5œâÁ‰õ*ódM™ŠÅ,-„%Jí Ÿ²ÿt˜º´­ à|G"ÿ¨÷i6u~8‘‚ÀÔ¸lWO—$7ÓRXhϬÅ(=ŠàÄuí\çÒnZW®ƒöxL[Ö×±ÜhÒ±ƒó@ûbWåc.{½ÅvfŸ§ðÅãÁpŸM¡}*f²˜Ñ©‹3'ƒ’. JÀã ÔÌ&¸¨/ºp RLOÌ'u\l¸Åx ! ¦ ¼¦P?±~AñNúÏӳܧg¹ŸNŠ.2>tmMÔ›;Ç\¿) ¤c(ûG¥¶0©”؇¢íy™G¢ËÄæÙ¦¹iXëÄÇõø²fN˜Ó`\ä‚T=;Ê¿% ò¤GíDRF$Ûn߇Î1†Û¨FcÁfÇxÉ<*6=A؈­§ݽ“Q&sôˆŠ3.ï½LI ÊìóËÎÙ<ÎLÍòÍw^#l²}‘uö*’wW"ÞŸkìsøn›%,5ˆð@yµ¸håEûûú×?>û÷7ãLL/Va7Ø*™œÑ7?ýüâ‡o/L~KÈtþŠ›N:üò‘Z0'«$ëyÿ!lGŒ^åôŸ…ý¢0ñ"µYý¶/ûS•ß…¬86µfÛÄ °íÍ@L¦—¶$5›PÕ/ß\\d¯„XíæóšBÜ õƒšpÙ¿-¦Ü—6Ò$‹^â'ž¿yMÄ,¿ƒÍÖ¨!Qç'"ðÂØï1œå°O•¸?*#4w69Dc"fÃ¥„Ä~X|~JÊ–ndlX2aÆga2{òšÍv cV5Š/¢>@”F]dõ¾œƒ—¶ÄHMbGÅn¿hålˈ.î?}Ð\ë·µK²Ò‰uÅ£ƒ†ÃH,lÛê8£ÓC¢+ªÒÆp@Û°¿³Üæ,(œ‹3—˜”Ÿ87?¦.û]WÖe“…Ï·EÑŒ–¸/–t=[ä_¥²àqþû ŽwgsÚ%¼G€ «ŠXc7ƒ5~EÞ”1…êå/7Æ5WhѹsøÀ?ÿdŽí ´Ï‡ü&ïJÀ}KÕÀ·ÇjSä@»¬BBÙsøžOᠺݬÅú5cZ¸jБ|$èÓ(!êPǺ@àFõ6 Ðv=÷6”nP:L&_/ÉÄ¥´àƒŠã”˱—øFi&Øý„—Ð_S‚¸ìýTFYŸŽIw*A'˜Ç5åÔt æƒÜ6¦×BŸt÷®w|ŠØUç}0(› óÝ}9émW°Ç=Nb ¢„Õd­’?ùuÒ?O–ÓðKDØx@Ƨ_J=/ä+¿¤×X?mÃ’ÈD:{EÝ+ú¯p¶ãº…Gô&†œ"…waÃO a˜y×>±¯W Z¬q¯2{JïS.ë âõôÉGÛ;oˆŸ´½³øu¦mZÁ bz@Úþ(o& ê¢ÑÎ8Ó±XÀÚÏ``€Mé”—±ïYôz 5÷¯ÞýÚ‡¶ªèG(f‡Ž%³·²nmW?>¹ Àã¨HnÈcNV"+‹Ñ•…˜vŠ¿Ø¡]º™U7T,µ.‘aZ$—ïÀЇyÓóÜ¿Lñg&šéuðwè—Ô”ö€c‰çq|le‹Xþ²¦$…wê‰ü8ÿÎíÞfm‰•Çþ¢)&Ädâžî£"K{6øliŸȦ_Že.<šÚDÔŸŠ]yE™`Z ,ÇÇýFÇe$þÕÇ·×Oþáü¹ endstream endobj 66 0 obj << /Length 2681 /Filter /FlateDecode >> stream xÚ­k“Û¶ñ»…êOT}Bˆ_vÓ'g'×Ö&ªg2I>ð$èD["U’òùú뻋Ÿ‚N’ÇssC<» ìb_Ð'|rÿ?Mò‰A±Àâh«€ù*ŒÕ¤Ô“ÕäßO|ô'?=ùaþä»×<ž$, E8™¯&dJªIJ+9™/'¿{ñôÏù?¾{-’œ ¸,äÇŸ_¾Ÿ¿úe:ïq6¡ï}¸yÿ+¼þeª|ïÝêýøì5^¾½¦Æûßæ?¿{‹dZÖÆ_ ßçsÖ00“‚%Jn¶éžÎBß÷V¥^þá>õžb—}~J=ç/ žqÎ’ 8Dð1ÛöÖCZ·ûÕJ—O¯ìxíB)$K¸Å˜u?Óçûv…\Qï}”@Dì¾ÌjÝQo‰·TFbÃmÄŒóˆˆÎ×Y5)á{‹R§µ6î¥4Vëí®(Óòº[½-¨Í½Û) ìWSx°I‹"Ýl€KÒ>Qáûpô¼Ñdò3±DŠæÊœÐL³q$íÙ‡4—æp2”°I_l6v”—Õ4xŸÕk©×š†J]í7vºXÑdº\fù)aÔ׸­ÏSx÷‹S»ì‹éo\ÊåŽMsŸ‰nϤUŽmË€ÅaØ€1Ú¶ WÁÈÜì&‰Í®ótƒÈ[å–†ac‡LD!‹ºË×* j‡ƒ¸ý±?„®ˆLÝ·JjÆ J‰g÷KEñéFeðîŽTîùMyb£Ôõ¾Ì+êÔë´fvKá„ «Â"b±´W™3É¢éŒû õói¤¼‡& ‹"G* HYe >v#ÂØžò4ö½{\» CØ¥A‡­]Т3ii!–ÚÈF/Ÿ?\+ÅÞ®MslÄШj‡œÜÖÅ¡-1“A«-(s€.õ‹ï ?\¿I«O'¶’x ³TÌï.ꇛc˜Q±ƒbŸ´Õ¼ICUìt™ÖEI†vÒ(±Ó6Ü,qŠ-iiÆíe«¬6’¶9’ÒNT›uù~¤Ä¹ÖËæðÌgSÔÓŠ¾Û)÷̽ø Ýœ†~o ¯¶pCxìÝé|‘iK¹È7Ó0ðz·B1©ÂæV×\ Õ\‰µÕ#pÒ=ð apWv""U! E+ÃÅ&­\7…Lù 6!˜ÃÎ^9\gÂÂcÝ ’dHwDÒËì¯Sw=½­ê2]Ôp¢ !+ð‚Ú[JÐÆzaÇLA†Epýî??üëÕ›—¿þÓÁ 詌EÿÚ8o`ò°07oçGpÕUí£¹1Mx÷ël±¦æ]Öy$; Öhf ¯îÕ€{‚Í3×#ý¬Ò•nÌí<#@õéhZ—ÙBW̱±¾¾†')@ÍÚsZ§¨É ÷êÆÂŠÚßÎŒˆuuå +&Äæ&ËqR "æ§Mâ¡á"ÁÀJðDvgIÝæø°§Ì¡âh–×årîƒFŒT°±,ö·›0íôbæ²muO¬Á#>R1n Â`Éêr¿y†;\ëÆÜµvoUìËÖÁv¨ì\é:x¡@8üŽœ‘({](ÄçgyÁaQ ½Oç>Èd(bl|©²ÿé«ÑàžL.ÆHѰE2 =-\Ñ÷ÁâbµªtmGccÎf.”߆¿ðþ§TÕËçÏ?kÔ­¿üßiÁ¢Ð«ÕWíÂèªm®ÓÒ2,x XÈ¢&‡ý«™ Xî±7œ§[í ›0¼pG×€ëo®S×ßPfd‹ÅÖÿ:ͺþ†š —'ô‹–\®bת˜r«˜ºXÅc`‡qØCHEÁù%“ JÀÆF½”RðĤ”%ònΦ”8ÜÖpC.ÔÛ]ý@Mãå¾`'”Í»q¸nÐv^Ìĸ£]dHceCê”munrªÓ™ ›qÂL¥á\ TØd»0šåY¥›¬2ñ ¤ô!–\_•®õ >ŸÑ“¦eJvEƒ€±¤ = * ~ ÜdÐ+—Ô³løÈ\m¿¾å€¿XX$ë`“ƒXYO¾0ÙŠˆ©<㨅Ȟѣ8<éûöpݰ9ql›½áúvµiIMS&ÑlÀEØ/*„A¯¨¶Ç ÃÛô“Éž+ê¦Í(ø\YÜ~æi´)¼^^Ð,®FÖ]ûДÝOÍ,Œ¥)"’buHÉ)4Á©S-lÜ—éngt :YNß÷õºÈõÑžÅBDÅì›ÜN3ð‡bF>4A_§K°ƒÎë5‚7S&äû’nw}V‚±ä?<±%”A-ÐÚÌFPmuPZÛ×|¹ýúÇüï³hÐè,Ó@Z† ŠGÀ¾p„õÏ®Ü4ŒRg¦æG¥Yw¡ª°¡ê{#÷U¬MPVû|Q/åŸùÊžÜKFˆw”¦ôß­ÞÞbjˆí]â _%SÑ)HÂ|Þ&|»’Ñl© wº€„ ²f=Är¶¦èÒj1›eÕ¨ØhšlÝ%:%FA™ñ»mA°sb/ÜUξc¾x•ñÑ'WÃFòàçsyà0`Q ωñVÙF£ÙV êÞšJyEQË¢Øa˜ae,l© †ÓŽ®™°!&Ìì ¬¥”ø¢0«êÒ Ã?úz›æu¶¨¬oþmʱö´·Ž<µVÕ¼vØ Ym_)lý6£è+ mßOž1†:ùÈØ­þ˜m]†í{ß÷‘GJÜ`·âþßX¹J—¶IžE4£ëÎ t†gë5ñ×>äÆ#3ó܆dRú42$Òň…wS]NÎxrƒ– û/n§˜cSß ~ ãYQïŽæ³0”?fÂ#Ý™ª fÏD¢¶CYmŽâ”Â}࿌ØFãØá·‡Ô=x€K%!ö£Ê¤­&lΗºÜ<´ 6³4Fò›½­(cn ¶q¿5À7¨…PaóÊ–ø» À§'§_4Ûm4©Jà'äŒáûqáBÀÍ[ ´:‰”~›NßgÅl¥^éRç =[ûÜêx$½ÛM±ø„‚’¦/`3&†Ã ô¦µ.(À‹è^Lëú‹‰·A6úGŽý#IĤj5äÈ;„ˆ˜ßUVñ!žÁUÏbJnŸ2-°û¢ÔÍ3„bJŒJ$£$vƒ¯é‰ðvíCÒðfŒwôQ±J¾е"¼ô$-Q=to-ÙV í¯ ’˜%~äøqA÷íàRIƃøŒÀCv/l-—¦’^ S™†þH¡r?”¾š?ù?;1ýr endstream endobj 69 0 obj << /Length 1986 /Filter /FlateDecode >> stream xÚÅY[oÛ6~ï¯úRy‹’"EiéÚdí2lX·†®(›v´êâIôâì×ï𢛫ØîÖv(RQÔ¹ò~<<þÓ#Þ þ^z¥‡áOâXÄ‹G˜E1ójé-½_a ÄÞËGϯ¾ ‰— $¢‘w½ôâN<…(f¡w½ðÞøq4 x„ýëï¿›½½þáô#FQh¨__\^½úñÙo–p$œc’ŽðüÇgWW–ŠÄªƒµ0ãÈMÒY #”pN5qÀ˜@‚xAHQÂXk0ClŒ±^ëÊÊÕ, ûw™ºu.„C9„RD‰èœø)mÞOØ´tIuëóÛŒìW›Y&ØŸ§¥ÓH·C œ¡8LZ=oÞN(!Öž·$ª²âVRY©²EªêlFü­}•¹,d©š“YÀhä—›âFÖr¡å{ÀH‡?°[Á¹\ª@UA­npÑ0ek=uS)UôsÿY®d]¦*›Qîÿ5#TÝÏ"î;ži?IÌeÝ‚þŽ9†?2å.&ÉÐ]r?]Öt’Ĉ³ÈÙYªE-›ÆF´õÛ¾ÝÜ; Ã! )k5lÏ 5"áßOÙ"PÌ;ÊuÕd*«J½áÚ÷ªvjõË6-Ö¹üf”¡ƒLeNB±Ρ0rn¼¾4yD¨K–^%ûö¸€íX¯Û™Y lØpΰ/«ºçÈJåöñ­}à³ÑìÓ^Ú6Ùß² LKöõ×½R£Ó(gŽæ~“½é!ôlj¿8nx`!,÷]–çv Òz n¥üŽ1­7›g¥›®–;t&÷·n²²OBOì -G…»`ˆ¸þ]0öÅb;‹íq±ØîEÔÇBómO“!GáO›\¦‹GYºªÊ4ß 2v%,\Î\ßJÀ‰ ŒQ•OfÀƾÞÍ4zÖïõ[ìßImžÏJû|u¯n«òD£\ì7•«jùdÆ¹ßØ‰ÔQÛ}é°£µc»ªNÁÖ˜ú…Ô9cpl¦1'zöî0š 8îÎ+„€Òw·ÙüÖjr‹ #ƒáz ­ÕO^öe»åˆDüð (ŽÆÎööñÛaœº°á±Þå#¦.ߨ‹â–~˜\WRîncƒ€²Ä_nʹ¶µr™WúÀ¹³¯Ëw+y7\Ë:µ,E»*§Ž&Šõã¨"'g§ø€Ê‡éâ#Bh_|ð©#„c½¤ƒþ ©,B˜vŠÇNîF<&(NBWn§µk–»5ì¶í@š…ÊÚÑ.¤†Þê…n¹'ªBÎ&]Ø©àÀÓ¨%;îx$I‚!ã<=µIvž6.õ4Òèç¬ïÝäe‘®d Σ<0~ëê™{´=Ì`À0€ÿÖÒç›,wÖ¬ÒMÓdz§ŒÌ«U»¥š÷ÍH·ƒôFAˆæ­æÞO#°?dÕæ&—'׉#jèÔ^Áï¹þÂÁß;±®¿V ~2´C]µ¡b|:´ÑC >&´×uZ6€¨­ùYù—¬•{ù£Êv]lr•­óûI£é«ê²;\ÌÄÙ!м7y‡´óTõË?üððú ˆÀ‡ÜS{g€KP} ‹Ñh’Ñ yñIA2†KЗÆÈ‹Ï‘î£ä F^þŒ¼ü„y$GÈ)¬¹ø\yñ@lbÏí1þÃq v5O[kÛ4ËJárt¶6š3;*¾_)ÿ/Œäÿ#wÁK/[Œ0€¡píªŸ7j½Qã[o· v [HÉnJ3™6”‘2h%õ°q5¾i6p¡›€4Zú¾ÝÓ§ÓMÆ¢12ÀýlP93¨–#[9k˜Ä\@é"ß5Ý2h|îN‡ž'HÄ=´fÍ:Oï§ä (ñYG9ÏÓfòd !ÜP©nÊÀ³mÊtºwúY0$ÓºGB9A4NƪƒÅ~æžæ¦ žô¦Ë¨¹óØ•¾ºÚ[mgLhôàõå«« £t_òqjfÅ»y•¿[> stream xÚµY[sÛ¸~ϯàø!Cu#^Üíƒí$Þt&×U³u7;Z„,nDR%)Ëžýï=¸¼ˆ¶è^&ñÎõ;пâÜÁߥ“;þñ(@aà„Œ#Ìü9¥pVÎ_^a ÄÎå«óÅ«·HèD(ò©ï,V÷ó˜ø ™ç,çg—àÙ/‹?¿ý@£!åqâEsñÃÙÕâýõlN9v šÍ¹Ý/¯þªg>\Ïv?Òoß}§g?¾Óƒ«›ÅŸ”ÛXÙ‚Í)ƒ 9qæEczÛOñ·Á®¨Œ„Ý/<Œ0÷W¥H4Q-•:â Q<›{>q·eñcºúuU”r€Ý,þ–æwz2Íâ;ØVsý¬®/ÏåÎܶÔsæ„ ˆs#AQfqýH1wã<™EˆÚHókšIŒQèû‰iĺÓˆ»¥Ø–¢y­Ä•Ù£~Šò[UÇuZäZÚ#„}i“´ÚnâÇ™Ï])2¡n\I‘[¬ô“â·ôm‚­ÝÅZj c·Ë§Hä‘Ûä*¬Uu¹[Ö S¹7îïšY{*·ˆsýÜåižÖi¼I+‘詎|ÈhÒw4+*ÕŒiˆ˜ßø0âˆÎæƒ W匄nñ«X*(v«]®ÞªKC䇚Ó|ÈcÖz ÔÏLd·¢Ôã–[Crhk† lü|ygÎs¸=ÇhÖ)ÀÒ3ÂÝû4šy)âD›‘A”ô5çFaû2­…Qër)*£âº0ϵY”~$6‰YNóÁòPï6^Û¸¥åQ‚|bv¹Žµái„ÂPú š<óµÀQNg:3ñs äú¤‡àýƒ6\™š>òÙïUw6ZíI„|4º0¹èŸ"¯Å1ÿ¥Ê˜Dþ@c2M&b¥UÔñ-ÑÏÞ/ðâA?ÈÚ¤àóš‚G"ªe™nu­õ×X@®o6z Š‹´µGÒ)XÕòÑhRqlk¥37RtmfÑЭœJˆAËâ|oôx @΀ J uˆpZdÿüûÍ?(@½&~ÆÜê—gc¢P‚Pí½”@ÀÔsÏCÜœâ”"•ú ê`ç3¡ÀÊòå}YZ™{Ü9ÀÏ¢‹å&®Æ h :0ÞœRD}£>»3àNLÇ6îqdyëï ø)¿eœkÈ »&çÔPîîs½tû8 U¦×ÀBfý(Tí„G˜{võQök!}‡p… åŒPòª¡”D>Q‰lV°ç~¬‡Ëe*…º—.-ÃL²[•E6¢›A–­êäôT<,ŶÁØ-…>"üŒµ«¬s*¼~nõp/^p‡dÀ:"Æ­.Z~ë.TÊ× ¦Ôº…Ð/Ë.·gcÈCGÝG;›ë&V¢0ÍV€Häwwªs™2 ˆª"=QêÁ“µ²eq¤Hv÷Um¨JeeUë—¦¢îàz­Ú›ˆèö&sÊaq+Û=î÷<0±OëõaÒ3âjïaÌ­¶b™ªLš˜ ul™ oÉ üj=2ÒÁ¨•^”tðÙ¶~4ÃÆlC]i±ŸlÄä7.%}ñ׈u>Ðow˜­&t;KÈñJÝ>Žùp{ÓðÿâÃR7‹Xß—Tpi'µm“ÏQÀ½'Ú¦°Û6í׃~f˜û} †²ÓÛòfFdpïLt7ýw¼©Š¦”6ýd£Ê8ÑUFŽ¢FhYÄc—Œ¨k¦n<ï,Dt¥âÛìóZë¬ØŠ2†Äôý÷* <üz¾1Ún¯<þõ S ]¼†C?÷lÎͶ»ÚúYƺ´wR·,Âäx’œ7„½T= Mµ»xœÚû“î}„\ÚÈ» 9ÿ(--gâíVVNŠÈD^ÚÚ°ÓfƽRÏéÄ{€Ãül:Øý™L]?Ô“2õ³Ž%mƒ™XóXR·¨VZOÈ—‡8ÛnÄ´ØaØx_d·qý|ûœëÇŸôƒPK­OÇ»âƒzÇ?ÙUµËN —Âàú¢4ýP½Ž ë“V)hL”Û¼CÜßÏñ ¯ÄcùÉSÆó›ºUû–…>Æó&j|ÉȶO7›&­ iRÓHfâ Ï὞K¬áh.Áâ»’FºÔïÅjš+„!äg¿ï “MDh_»/$Ìl>`~ØÖÌ‘ÌÍáäö²Qt!ÐØÝ$E,ŒÚ»ÉTå ¹Æî°W‹©(ăœAq¶d›‘[q6±2A~(võQ›Ù{O¯i]u’o×–Ë"íÏ“ŒÉ v‘¾¶ï‹4ÑVjUw‰l1'ÌCL Ü‚u«¹QPg¾sûI ¹c*ýwÔ8¶ó“k“±¶??ÕÜ«kø<ùR pÖ„¦ACÍ¥eÅ;¬`A±šwÜ †Þ•Û2x/ž‰Qܶš-tå㘰Fä…ªkꢾzÛÐÐ@Gôq6 -Œ—kr{Ô¸¢úÔ¤§J¿§€˜çžì=WzBÕc9ØÚ~}´Ï4Þvr2"?tô[H¥»"Í ¬hžçÛ4½±§úM«KV¬ €7uwÓ]n[s³ñ!>0˜zF¡³]Éó¯DÙüºPÕ"NÐ ÄC-J“[ß¿SÛ>SKO†åé@Œ÷‹Wÿ¥UW‘ endstream endobj 78 0 obj << /Length 2281 /Filter /FlateDecode >> stream xÚ¥XmÛ8þÞ_aXÔ¹í¸’üÞû´íµƒ¹Ãn»èÜvÇQ_;k˓ο?R¤;ñÌu{dLËERäCR¿{ÒÛÀïÚk<qž±H³ÔË¢8Q’E^§½µ÷ó3…w}ñ|sûìÕ{•xJI¢bïvíey cé%idRy·+ïÿí¶ØÝ-®T,|µøíö¯´* `7‰«„wå° ¤ÿ¸ùø‰f¯*ö[^ú–ûn!3¿ÝtÅn§»ù%²Œe„Q¢˜qYœcÈÅ•Bø7!6«¡4UÛT2óò O€­U*PIBko·U¿¸ Eä—NŸP„¾^ÈØÿ²¯‹ªáÏÛ…>ÐgÓòš¢®i„”ñõÐØ½yݺkw(n,eǼ1ª ’î;«rÀkžû7††W­î‰jZ;”ŽE¢/G‰ð%Âç¡«Œæ•zô½Ú-¤_lôD”˜DJÝ÷U³‘eä·{ÝNú¿ŠXôZ³1£‘1¥Èƒ8”ÀÐ2ú2cï(ˆTæ&„xRv‹†ž{Énæ°| /¡€ÏõMpJ¢Ø tRçSé­æYÂg¡²Ø7[MCmc­”Ù†(öB˜j£Iï«•FóG`¥›5}zhš}XHá ¯l5cHçáÙØ ì+:¥Þ~ÿ=îàAc•ÞÆË¢!BW ‡‘Üz8½Ù³#]#áW 8ïÚŠ[òèUvÕR¯ðUúÀ?ØÐ‹Ü¦@Ц0Çt \¹åû®²Ø,R@·zÿ衲„qÚ˜]„ÿ‡góÿ?ÈûjßÏäyH =xÞë'ÖÐ{³˜`FY1Ÿ ¿Z¯y¢i÷Dª•Ù¹ÕÕfËß—`n—V/ù0[X3xQdj  #y*ÝÊnû°×D=·Pö|HH‰ogpRó©åÈÝÍ28Zç׌úÆgñGYð1Ø#üC ®Æ‡;ÇyZÑéâò}IïT¹ µ/ÊÏ.5ÍyÌó²mî¡r‡8}þ¸_­ëbÓ³¿#¤|¼ùÀ1l8Œ™ÝW”mÛ­*@4V„oz@dèŽkÅå2TŒmäàÄM¿tOAê ¡‰°:ñèt?Ôl¨Ò!õR»r«WGfµÇgåu×!ðÐʺ¶ }l‡9=º¡¹c¬|íâ¼å•úàÎp3ìtcúcS6íBÀkçBÐ qïô¶µ­“žte?|¼y´‡Š²iNCë†ø\b2Th«0åj? )è°É8Å쌗6ãGª{‘¤*J ðÆš)cëñöÈd.0·U¹Å6"QþÖaF\±i—ÿÑ¥á àKƀÿÀ*±È©ÅÄñFch!…å*®éQ„§Úhtÿ¯®ÄFþkkB.£ª¦2w‡¶«™ã-T’Å·•ú2Í-â_É "âó'û%ò4óFï÷â˜ÁäŸglÈUox37¤˜<9^¡óKŽ!ð‹ÓÓ,tlBy°s”[äŧu'$¸ê_ ,/Šý0€Ö~¼÷/â·y}ò VrzNp¶€ÓÀ'_fÐ Ý™ôø’AÕÐ[LÅßø´2"±mñâœl} ^ñº&KK\Í•>Fï°†Oœë©oIlšä®‡êP™íœæBIšŽÚœÍmõݾÓëê˽ŽJÅÉdTCŸƒ*ô&Ökγ7m¾ªº'7I)C£èrÆv@ZdkV46IT8`íBÄì&Ò¬ È‚\jì~çsÞ‰ëQ$‡1ÞM6/Ðý ó(6Ý¥NA hä>Pë6]Vâ‹]õc _)—¤{×­v<|œÎ@#½;PQ£ÕÞ0¾˜IehÕNÇ|ŠO©ÄçëŃð¤\%4× `LýÏP”‡?ŠcdLW@€¢˜xBˆ»yLò×]ñ@]±ÔÎ$ äÙek1º¹qne³q Ý^â}­Óœ œj¾x)×—™¯Ýãqõ7,×,‡ë®¥Œæ¥iŠŒÀ<œóð”ÚÜ‘wäpJ÷mµ:ú‘XS„Ìà ‰ ÆBÈLòýä´½xwû쿬v“H endstream endobj 81 0 obj << /Length 271 /Filter /FlateDecode >> stream xÚËNÃ0E÷þŠY&‹Lü~°+% EªÚ¦Ä¢ Ié¢T Aü>nÒ@$„„,kì;×Wãsû° x–r5Ö€• ©ÔVB[CBƒ‘BAn=IsfÁ¡Ó\ƒo@ ”B‚Ñ­à_à)b<~öiÎÝÄÈ5Emyˆé=óûÙÚgeœpE#Žq¢4ëí ä«kk>”uK­Šr¶\fåö’ÿ=Ô_5ó„õcàã€;:Œ_É™ uB †É±oI*ú‹0bÓÅ‘Á݉lÈ1=¹Æ'“üߤ8å( $a ùaÿÑÖ#v'‚M9¼Ÿšî3ÒntíÚêõÐÕUwy÷O _Ã#j> endstream endobj 74 0 obj << /Type /XObject /Subtype /Image /Width 403 /Height 373 /BitsPerComponent 8 /ColorSpace /DeviceRGB /SMask 82 0 R /Length 17038 /Filter /FlateDecode >> stream xÚí”E…‹Œ D$ˆ’Q‚H”Œ JÁL”œƒdIŠ I% Š `üE1T$(‚(Q2’­ÿ¾©¦'ì²ÌîöôöìÞwîÙS[S]ÝS]õõ{ÝÕ5Z'S´™¦ÑhäñE£Ñ⇬¬JÝ«T;¥†+5Сה£Tg¥Pê&â‹FKRj¥Vê>¥+uƒ [k}¿Šì¢Ñ\§Ö]J}C %B*õ¨RiÈ.Íja¬ #yüÕÌdaj!ÀYDà8ªMJå%»h´ˆ+•R3‰šèG¥2‘]4ZdÜ­n„LÄôŽïº@pÑhÎR+¿RçI˜Hê>:]4šÓàz“l‰°¶+•‘à¢ÑœWq‚ŵ ¸h4çÜ­>¤Š+ZÂh‘Fs\?“*né:‚‹Fs\ד'.ª&ÁE£9®Âä osÑhÑ®Ê䉋êNpÑhN€ë^òÄE ¸h4'ÀU‡¨.”-[&ªXQ?ÿ¼€«kWýõ×zÚ4}ÓMVamòd½nþüsÝ¢…•Ù²¥7N÷飿ùFOªsæŒ\=¦—.•2¨Ödâ0P92È~«U“¿Ë—ë:uü¶k'ǀ̦MýàÂVæ+tì¨GŽÔƒëo¿Õ&è믷¶Ê’E/X ÇùÊ+ºG=thÀ5˜à¢ÑœWøŽ¾áÃýàª__Ÿ?¯o¾Y¿û® s“Y¡‚>{V2{ö”aŒCÊ¢'ô† zÈýý÷’0å?ø@<(þØûïë3gtóæ’ùòËúØ1½~½äÇ…3±‚kÏ=eŠž7OŸ>­»u“Lðä·ß,ÎÀàNš$\E͹rI~«Vúßõ;ï”vïöƒ [Íž-»Æ×Á®7oÖŸ}fí¡ñÎ’¹b…°óã£A渪Çwô=û¬>uJ¼©O?ÕGêU«$óŽ;V·Þ*éE‹,ˆåÉ#;JÚÚpüx¡xbÊ#}õÕúÚk}ð¬Lø3€•ñNžÔéÓKúî»%6m,àš>ÝJÃ}2q(Â@p’¦Àï¿ë-þØÌ»`8.l‹Äœ9ò½Ìa?ôÄÅHÜy§”„ÿf6üóOñã®æ¸ªÅwô!Œ2àzí5ÿ@†àÁ±jà´i ¸@‰­[ýåÁ«J•$‚ûï?Ë‚‚ H€H¨Ðd¢NXÌ'’W“&þ{òpÛŒCF!‘5«leX !œœ;Wý¥G¶2kÕòƒ [a[$PlíZ«@Þ¼RUµo/k8] ׂ‹Fs\Uã;úF²"ăÈ@öí³rn¼Qvd{J/¾¨·l W¡BR!§Éüè# n¯¾ª7n W‘"±€ ›I¿ù¦Ä}HŒ.Ç€øÖ[’رCBK“Ùµk¸°-(f‡½6¸î¿_‹ø×äã‹|ñEÀÕŸà¢Ñœ×]ñ}cÆÄ.xVÿü£Ño¼áÏÄ¿ö3¾‰õ¯¿«JI8p`6V¨ 5Ïž-™¯¿®øáÊàÚ°A&_,¨wíÒ‹[‘ìÎ~påËg^³FÏŸ/ ü…Sÿ-sfÉ´Á…­°­)€üÀù¨ øÝ¿_îóßt“î×Oâ\#ÇSý.Í pU‰ïè;6vp_åÜ9] €?gÚ4½w¯Y<"7ÉcWƒR!Ê 1šÁÈŒ¡¡bÑ¢±€kéRa#0? ‘©‰d ¸®»N¶ÊŸß*Œšß~[×_¯ùEîÈ>,›‚ Û"bv¨hæK *3_bϹ±¿y³íÿK¸ú\4šàrò%kŒe;ÈŠ¯J—öß銗2eÒ%KÆ{«bÅ,%L ­™tOõ!¸h4ï€ëî»åaâ©SòNr}Óðå—åqäÂ…Û"(ŽujÙ•Ô‹à¢ÑœWEGuÓ¦29³qãäüŠôwÊÔS€küx={Â*éIpÑhÞžz\4šàª@ž¸¨næ¸Ê'.ª%ÁE£9®ü䉋ªGpÑhN€++yâ¢î$¸h4'À•J©DŠ[ÊApÑhN€ ÖHqEKùKÖ4šsì*Bª¸¢†æh´¸`‰°+u-©E£9-"["¬út·h´°kñ1-W*=©E£E\Y‹™hRÙènÑhcWf¥¾&jÕ¥ Z4Z„ÙuµR“‡ôR9I-Ív¥Qê^ßS0’'1êè» Z4škì2®WS¥~'‚â©“¾Õs6%»æ"»`©•Ê£Ôý¾õX¦(µJ©ï¨`­Uê ßbòàü-J¥ iAv*-‰ðEKˆ±#ÑhÄ‘E£Ñ1ŠF£Ñh4F£Ñh4F£Ñh4F£Ñh4F£Ñh4F£Ñh4F£Ñh4Œ/!Fï‹<|Û”¼¢EË(`ã“`DVÀïhPª¬RwRÁ*çûUÊl¾E“xÄvâRûŽ­ï8y²BTÖ׫3_É‹Z•ª¥Ô‹JàšÌaè_¥f+õ R×¹?b »ë|G2ÛwT<5WÔ_?¯åëódWôR+­RÍ•ÚÍ. VªÈuÜEjeöíý4OD‚„>ÿ¯ÿ“]Qçh!¬ØÀ>œhTênØ|îîöí—ŸHmðº^Q®ÚJg×uN]•J¹þpâRùöÅwJÇ}càŠ jÕe€»®Álê¨.ÙåyjUêûjdÔ8ý?àÜ5f#GF§|ã‚ìò,¸2*µ5b:ãûÉE'ûµnñÕÏF޶Ù‰ ï¹[­ÙE#¬¹×\6o„ÕšN—'Á•‰¢\Q逫4Ö•Ä™.ï« ;§+ïÔ…;ÀÝφuEM.ïʼnóØ3]Ñ!{f£Cç.­¯N6¬ šÇhÑcàºJ©óì™n©Œ£à*“à#iÚT¿ù¦þßÿôÌ™ºZ5O7Ú¾}ºhÑÐÌNôW_I"U*}èΟ?Ò‡qÞ7R.ï€+yâ¢9 ®F ;Œ ô‰zÎ=t¨~ë-}ô¨®UË»vႾýöÐ̧ŸÖ[¶Xàš=[gÍê‘ä#¸¼®²ä‰‹jç(¸Ú%àZ·ÖgÏê;ïôçäË'2é6môĉºK&•Ó¤‰.[Vþ>ÿ¼®\YrðïÈ‘º|y ½zéœ9uú™gtž<ÖV#FH¦)¼<ð€~á©ä®»übG¹réÎõ€úÚkýù¨døpÝ¿¿Ôp•*ú-ð‘—ÙûÕW[ndéÒ²£Q£B}0dN˜ %3fLð¹+Kpy \w“'îÏ¢wèÜ%d¶ü_èÏ>‹ý£•+Åûà}ø°Þ°ÁÊDˆøõWÙðôiÁÑ®]zéR}ü¸2Ä*ûñG½j•篽¦þY¯^­OžÔÅŠIFôO?‰·b…lØ¡ƒµ!*DþúõzÍ}옾áÉ,P@8 ÿ]ú©ÞºU_¼ ¸”}!ÀÂn¹EÒ7Ê¡nß.!0öòè£Vá>’pòý÷õ¶mòi† ;wu./«y⢆; ®á 8†ß~Ó¯¿K~Æú¿ÿtñâ’¾þz}îœxP†€’)óÍ7‚ãÞŒ¯×­óƒ ~éÒIPÈäcÛÑ£Cw4eŠÞ´É.Ð̤7o? ‰¹sýÞ8 ƒRÉ AÂ4\·Þ*é~`šóæ ‘xè!}æŒåB{÷Š[Hp\T|4ÌQp KÀ1€ 6+…Hj÷nÿ¿ bàóÊ+VæŒúûï­t³fâ˜ÙàªXÑJëyî9+ýÎ;zÙ2+Tœ4I@·¿þ硇 .8c&½x±Èøx³fY™)¬L]²¤°zóMÉ<8p°/½dmدŸ ‰éÓå8á¼ÁÏ„K¹oŸ^¸àJàªíàÀ¬\Y.špãïc8¢¡CE1ó”+n%pºvµîÀØCÃ]=ã(¸žIÀ1|ò‰>záý×_±ð n >2™ˆ¿þÚJ7n¬ñƒË~ðžØgjþ|‰ÚèÙSBÈZµôUW R€/\Õ«[i„r~h €2™@–êŸ6M4yr\ಙ٫—Þ¹S¯¾*@nÞܯð;L°j\^W-G†döìrOãÄ ¹ª~û­\ã>þ8´L¦LqÕ÷§pûç¢õëuáäW_é7ÞD«Vzùò$×PGÁ54ÇP³¦>^wëæÏÁX.[VßwŸ„ŠH˜»L(Ó¥‹Eß”DŒ‰hѾiôhìà²c±·ßW ø]K–X™@ß~pÙ§î.CH˜Û·‹“†ô¸qR¹9ª \;\… Iú§Ÿ¤¼)Чþãë8/^ za?wˆ§j\^WMG†$0…~R° ŸBö[£lÙäaV5 w¥K¸p9F:uôu×ùóo¼ÑÚ ™Ø)Ò1g%ÝpƒŒV  hàºo?ðÊ›W>ÊŸ_)´2á Ü|³$PÆ!p q\CvÆÉmsøTŸ.·¸»'déR!É—_êS§ü€¸EÚ¡âåÀen›Põۡ⊒hÑBöˆÁ Ú´)\85& ²™‹]ž<KÂýþpxèwÜúÀFÀÍWáÂ’FͶsØ·¯.èÝw­;o¸Z!³wï„»š——ÀU#ñãñúëå™uûöW(“pZˆ 0Äþþ[ê0ÀÊÇØiÚÔz"†~~èôù}ûd¤ØœŒdnÞ,ó-M an€€u0\ëõ?îƒÀº;ô¿ÿJ…ˆ­`×\“Lž*Ô;J`…¿_í¡‡ävú“Oúsà‰Ýv›•†çsÏ=Väì1+ýÔSr-°'Œ@+ú*\@àmkŸ–-ý—¡*UtÕªþÊ”¸>K™¡ÓÇ.°£½×¯¯K”°2o¹EöègŽ!²?þªApy \Õ?Ñ…`¹s_\çÎ]\éÓ_öSØÜ\Á"¸9rHúØ1kHÀy@ Z²¤u¡ÿâ IÀ ÀVæ¾ø†PÈÜÚB ñûï~páBŒ]cŒ 6ŒSs¸ðÿÙg‚k £àÈç.ª:Áå%pUKü9}üqaBàB[¸(ƒ<”1iÈ\ø6ôçÀìt³f±„¢fÞ”9³à¨U+ \Í›[Ó“ ¬ÌužWQÀ®ÞÚìÙV aÀ…ª`õêY¾ûNîåš9&¨4s2a±~»øk€£à@ž¸¨jW2×­·J…ÆW ÙÀéÓån|à§øï¾׿ÀNêÔ—ý´wo‰ ÇŒ‘ÙbˆælŒÀƒ*SÆzPع³•Yº´(L„8$€£Õ®õø t5nØâÅþ[Ï<ã6ZµªÜæ7NÞ.Äj¥¾Ž‚«¯;c¶_?™"G„ü¥ÂŸT GýèѸ.X^R‚ËKàªÌ‹iLa(G®F ñ»ì7Ž­ÞŽ‚«·;­Ñ ÿUšX5eŠþå—øÕ‰‹¼â‚fåy[• ./«1ë4þ¿þ’IÂR3Ë õr\½Üi;î°fу6ˆ²o¸A|ב#­ÙSùò‰›½g|4p µÉí·Ëk×p¼íùÀpŒ»vgxòdqá^{MÖ`ã7l(7fÎ šBasøÆ³g[ÅìUQrÈ6­›½¢Áå%pU$¦\TOGÁÕÓÃF„nÎ^sì}Û6yqëV‰òÀ®rå$}ø°¼–øþûR €‚7…èòÛo…ü&„ëP~ÿ~ÉÐð÷ÂÙ¾Ü7 ÷–/?îX;{VÂÉ%K¬|ÌKßÿü#ò÷îõgº¢Š——ÀU-ù£Fùßm4o>ež0Ár¥à¹ý÷ŸÄ€÷ß/‰•¸>ýT ¬]+/×£òcÇ®ðÄÇQ•'¸¼®Â䉋zÐQp=èÎa.û}j Ã,ÙÐ/\Îĉþ©ÅO=%ù£GË<»NpÉÒð£žxB7l(»€7U¯žÔS©RБ BüãÍP•*®»Â——À•“aÚå{‘*-©ÍøÊ T ¥zð"¶Æû?ÉÜŒÊõ§|ÇPÁw<<)aºÇ=|½=‘•,Øeß?Áu<‡R”*HÅP.¥2)•&fÃyàÜ¥ñ[.ž¦ØTÀ׫¯ ¼Ij%;|Ñâaú¨þåÿ¿¥Kë’%;à;îðƒëž{töìÔùÈ#ALp\—÷ÁµgOPN‰úÅýÿ¾ð‚.WNmÚè¶muŸ>zùrÝ«—?FKZ"™Ÿ}¦ûõÓÙ²éU«ô?ÿèyóô[oIöíõ“Oú±óÎ;zåJ©6C+nÞwê™3õ¢EºV­Ø5`s戋eƒkâD]ª”$òåÓ£FÉ,]*‰œ ôóÏëfÍôGé·ßÖÅ‹[›Ô¬)•à.ÔU«JNàC¦Xƒr0ÈŸ1C páØ°-Žÿ®».‚‹àJJuê¤÷ï×åË[ ½ÿ~½k—¿Ào¿‰C‚ĬYúÀýÞ{ºC½i“ž>Ý*žìÜ© ÒM›ê‘#uÆŒzÊ©á±ÇÄõBpÃD … é“'Øé¶múóÏ­NœÐ›7ëÑ£õˆ¥bÅB,:vL'õÿþ{P¨/‰?–ÓZ¶¨Ð¡Ú ähq„‡[üx{÷Ö< ÐC=E‹ÊOž,Uá€!”Á&Çë7ÞbØcÁ‚¸~úI®ÇŒÑÿþ«o¼1Å‚«Áå%p}”bÁuîœÞ±ÃR‹—×ìÙRÀdb€ƒs ‚Ç5uªõ4!ð€AT„“1ÁU¸0ÁEp\XÕ¬)iG°8À…˜ ”ÃðϘQþ͓ǚ^…±Í5¡àjÓFj.WN¼šI“ÄÊ”IòOž B˃Ä~á eÏ®³fÕ_} ¸ÌãÒÝ»-pÁ îªWºÞs|5xYføT`ÑK/INÌ>à%K$85·¶ðM>ÁuI5 .‚+ÉÕ¥K(¸ Ñ£å)bÀeˬÛì!à*SÆ— -QHõûïzÝ:ÿÜ­¿ÿ–[âH/Xàg͆ fPËž‚®™3cW®\âGÁ1vPC ¸š6µnaW÷vìЭ[[à‚Ÿ¶j•<3=Þò¬ þý…´8Ô_•ÐÕ€ š7OøÈkÆìêÕrœÛ·KaóD2\ :3áà¢%\pŠN 2dˆßt÷›o¶\”+ áç'¾‡„]Ø3(b*_>)`ÿÛª•`ÇP~Z`ÉôéuÞ¼WÞ¶*Y2®=¦TÕ ¸.*B‚ßeÀE\-*WNæ\±®ä®%ì“Ep\•Uàò¸^eŸ¤¨0T†àò»²ORTÊOpy \O°ORTº–àò¸J±ORÔ•´’¿«è1p¥Vj{&EÅ©6—÷îÏgϤ(ÞàŠ6våQê;'E]F¯ÒÝòªÓ5ˆý“¢bÓy¥ò’Z^eW&¥~b/¥¨jOwËÛNW¥Ž²£RT€^R*©åyv•#»(ê’–(•‘îV”°ëf¥~f§¥R¼žU*©UìÊì»Wž½—J‘úÉ^ì”ÔŠ6vÁnTêÎM¥R’>Qª±RiI­(g—™W_R©–J ðݨ\múãÑEm‹¶î1W©±JuWªRÙct~R+Úñ½Ö”¸Øýh4‚+zÔƒà¢ÑœWcò„à¢Ñ.êòêNpÑhN€ëòÄEu#¸h4‚‹à¢ÑR$¸‘'.ª+ÁE£\FpQV‚‹Fs\ ÉÕ™à¢ÑœWò„à¢Ñ.Šà¢Ñ" ®ú䉋êDpÑhW´©#Á•ͽF.Õz?yíàâÐpsø°%“ö,\I¡NŸ>š{Çíæ|]ªã>ò$ºÀÅnŸ$Ã'ÆÖ9”j®Ô«¾ÙªÔq¥NPÁúG©J-öýlA5¥Ò;zù ¸ÜÔSŽ^ñÓûúÃX_ߨèë',!:î£Ê'>Â4÷Ñ&!c'x£ŠJ-cgŽ¿Ž*5N©Ü‰d×¥Më±I£\Ác'·¯ðGÕ e>ò„;v‚›=ŸR‹Ø†‰ÓißÒ¦O0»®¤P»Ä,ãe ò}6fb´ÈG¡+ã+ He¥±éÒŠÀ_»KÐX¨Ëfô8¸ÆNvßg3:¢C>Å5vZ¾‘RÙhŽj‡ï7µãÍ.‚+)Ô6¡§Éürú¶¡£ºè#Rìc' åË(uŽÍ­Qêê„Þo¼— è¢Ú$ôžðÕ¾³Ìt\ç|\Šeì\Ê˦Ô_l¨ˆiZBÁu[/À5­1ýå£SÐy hùál¢«l¼ØEp%…ZÇÿ)ß™eÓETÃCÆÎ¥ÿò2HŒ¼>S*UüÇÅÝl:oƒ+•ï̲é"0æµOMÀ%c Ç•'¸¼­Vñ?AåÙn®hLŒù½i”ÚË–qE#Â/¬ÃvsQ-ãyv”Ý\Ð^©­›Å-í ?Z$¸’BOÆóì¤òS¶›;* ®‡¢î+Üt“Ι3J?g<‡FmöXƒ+g}» tñâQ}v WÇw‘*•þúkݬYPfçÎzéRI,Z¤;u’DÕªú§ŸDkÖè1ct‘"VÉZµô¼yz×.ÑgŸé2eBëÿè#=mZ”6~1‚ËÃz"žg§˜³з¯ž;7(gíZŽT^­š>v,ªÏN`pÄ^/Ö+WålÚdÑfófÁ< ÏÓ ê'Ÿ@íÝ+ÄKŸ^<(%+TÐ+ê‘#…o!•ã£Ûn‹ÒƯÏ¡Q‹rä •÷ê%¬C¢zu=a‚~øaýÉ'zÎ !±£·ßÖóçë’%ýøoðá§ÝwŸ¿’»ïÖË–é?–Ì7ÞÐE‹Zùp?ø@¨ûôÓ‘hü»ã94j’'—ÃÏ|_z)paP þ9q¢^½Z/_®ŸxÂú }ûË/åBŸ)“•‰Î_¥ŠüE7¬ªP!=s¦•~õU]£† ™O?Õ?.| ¤Ûµ“´‰+Ÿ{N¯X¡W­Ò/¼ î„Ùðª«dÛ/¾L\D“à ’#yë-?„ÎÎÀýñ‡1ÂJ¿ù¦Þ°ÁJÇ .|ÙóçuåÊ:OqÃfÍà˜6Œ)ÐfútItì¨(u﮿ÿ^ÿðƒ^·N¨,ÿÍîÙSª›4‘óþï¿âÅ™3~ò¤çˆUÁØ:u$¿woñ÷pR@uÒ$‚+Eé1Ï‚ëÛoõ;ïH7FŸGoGÎí·KçGhÙ¦ {|amÛ¦'OÖ­[U…«<Ê›ôzûv=nœ~ñE€!Ø¿¿tþ¶m-a >ö˜îÚUoÙ¢ß}×Ú(Cå8€E‹ôáò!2³dÑûöÉ  B- ½«¯ŽbpÁ£Ì-/4˜\hä3äŒüý·ÿ”¡¹ÚÃCC àBÈÇ.Ô#‡¤ï½WzT«V’N“FÎ8¼/{xt¥JÉÍ4Ã"\z@9ó<.0¤ÿúKlåã :äx³Ô‰çШAž¸¨G“ö™oàBW?zï=ÿݘìÙåâ[©’®Q£b©<\S¦øÇãúõV°‘·*RDwëf „›oÖÿý'…ù@3à ýí7ÿ&¶;»®Éê HÞy§ø¢'Nèk®ñ7¼P$|Ð`b·†-àhøpiêAƒB?Ûá—píØaeæÊ%=*[6ëßß·Ntƒ¨ݻå/® p¡‘ùùçâš’ N:ÀB‚–þ)¾þ‚¥È·d‚+葤×Ô©âÿ>äBHbÀ'´Á…õ•Wt¾|’ƒ’à ú*ú6º+§–--p!r‰Y9bÃ@paô™ôÿþçÔ5dˆD.¶{€ÊýUv„:‘Ó°¡Ä)v…o¿mkɹío ö_.gg²;à‚àÁ‚á¸.¼ÿ¾? ¶Áe‡Š—ø'ùràêÔIWt°Ì™ýà2N/N„>x\hmS-ât“ —Ûö¸p³o DFñWuò$å€ Áøc_+ëÔ‘}•-ký›6­Ü¨G6#âË/­«pˆ™X]…€ ²ÁOϤ‡µÀ…±c»p< ¸Ê•“ã¹åÿhúä+~Y·Î…³®I‘ÛWûöúŸÄoA®çŸ¿,¸p²ìÇ(7Ý$—˜{Œ!àB¨n2sæŒ\¸˜Ù8qçÎYàÂU N bÒܹåzGëž{$''.o^«’X¯\‰Síxj䉋z8i'«”,)]täH1£Dè™pûeö¤ Dað‚è×OüsÏÖPÅ/p<¨5²ÒŸ~ª_~9\v~üQ×]'O ¸àbX-\(Ñ ¼;x_\uëJ{úȆa³3É5páqäˆÜ¥Ì´ÁÕ¤I,àµСMö재]«o¼1´Ì²eúµ×¬“¸Úµ³nÎã4á +ä~š)0q¢Ûþýróôi™bLì § 1;k&ž\)F-’|–]Ÿ>Ò-A$ ôXóü°Uøõ×¥¢³½{åÓk¯ \5k^\ÏóŒ54Ú··2—,ñ/obzï˜1â8=+‹—Ö†ñuü¸Ô`XÁkR¾µ=1jàªm­ž Gkÿ~qØfͲÁãê®Ò¥­ôÇK0…¼A³¶ž‰4“¸ì— áÂÃ4K.ƒ?õë[ù Xï¡C`ZœÇ§h¨[o ª ~,¢ÎXwtýõ‚&œ;®‡KöøãÒÌ"i6¸2g–æµßí¸pC¾ÜìÙV&ü$os¹®Òñ?5×oÈÓêÒk¶@M·n’Ušü™3­þ¬.-› g©J9¶rå‚jÃøºÜš3Y²ˆ#}™!`ªjÑBÖ«1wlBÀeÇ56¸0¸œšL›»à¹ÎÏö¹ ˆ4ÀŽS`n(‚ ß@»÷^ñ¯&L2yòåpšÐææMgã µl)X³sÜ~»ðªP!ÿ]z ¨ÄÇ~9½wo‹œýû[÷ ¸ìMpÙ2gí…„{÷ß/Q*p1pU‹ÿèH)O~“TŸ(•:þ§¦Z„Àeß'Aôqú´µr` ¸6”Ì #GJ `nÕX/ã˜QƒzPÒ^*ªxqY–¹`A«NèÝwÅÃè»ë.+ç©§,rvêäGh ¸–.µ–CŒcÖ$„‡öí·Ò2ö’PÐ8×ÀõÎ;B{¸©hs´­¹pp>fÅåm‹˜¡½}o d3ñ 6·Ý6³nýÔz]4U*y¸|à€µ#3û • dß¾òk³ØÑȑ֎jÕ’W­ÅüZøJBd¹®‡–éÓèä;æ-9hÅ y䀲nRVݺb Óôj“‰!0a‚¼Èvò¤,…xäï¿¥Bôù¤@:ÒÏOŸ–­0èƒ>o^þ5žÀþýRçúõÖ"¨™2II +ü…ì&«TIæÌ>,c;u\£"·¯¢EeêïŒB ó*´Y Ã7íØQüÙºÕz±paZû†¤ý±áwZ…’¹Á7Ý$³æ:t˜»ê*iÿ³ge Óë¯KëeÉbý<"ΗYÂëÙgY]»Ê{ÓÈܰÁšÔ é¯REzvd^°µfΔPOÓ¦j“ÊN¢Ì5L¹¼°vÞ¼2RæÍ“QƒË.úg±b’¼ 3÷è!¤2/á¢0p4mš¼ Ò­›®QÃ* .aŒ ƒQ!FJ† 2ç£# £fòd™……Þn^²F¨h~tB}úñPÀ`íºëä‹Ã1¨YSÞgñJ”üU«dº&j€š7(¸F¹®‰ý“iÍ« £FIW“åË­|œˆs礧O—ëËm·ÉOÁ¢aQƼ1 pÙ ÎåË'­ G§ÆÌÉûúk0 Ÿš›]öÒmÚHËçÌië¬ü;¬5:€2TbÎ{ÄApÑ\³ˆ‚ !€½¬y?Î Ä^dÌÅ‹r‘EäW £¦ti5¿þj½Â†ÂðЫÁzõ’qqð µ ¶ ‘6àí¥'p‡/nËvÿl߇„sÏ=.„Š!à¹}½û®åäÁ¹zã \fm ã•Ápqùè#Ñ/¿øe&â\¶kZÄwpJçÌ*š?.D‚vlkÀÇØ^vެzuy©f/pjŸ¯R¥ô'Ÿ]wíò»ÜÍepÍš%Øþ÷ÇÅ¥1,ÂÅÝdæÈa-±`¸a£æÅ­Â?3ýöÛò2/P6w®Ä€æ#ŒÁÀái„;ýwéá­Yà²_òÅ%ÇiÆ/F.RÄ{ßÄh¤kàB‚E&>½D‚æ†Àe‡Ãð໦N-và@,•\vƒ(`½oå€cl˜†^ ¸Ì©ùé'ÿŽ™þ÷Ÿµ Ìþmqœ/{}ZóæãsÏɉˆûåÊ„ªÁ•ŒÀU)£fĹzbD˜—ÈŰÈ+Ú·ž€*&îH›6´¶<å0ô÷™aˆÊÛÇÀ^”8p ÀƒZ½ÚÊ|ôQù¾EŠÄ.{(S-)Æf$%6\ÏF\à Z ´GT¾t©8Àf!,€ëðañjêÕ“Hͼ™U° àÂ,m ¶ <7 £° å̻بŽnÉ’B¤óç-p5h Þ×OXKsØàBIœw4).Ø‘[¸pÑ1ç }'î7âY¸jvÏ!¸hn‚+W.éä‹˨ÁpÀ2÷á·lçjð`™m…Ь<…Ì?–[O(†1uï½Va\Àà6z´Ü+ƒw„QcÀ…†m[µ²š=ºv¸=û¬ OÔc–Ë3ಟ£!À1àÂUŽF Æ{XE@Ϻ.¨Y3ùî‡IPlÿÎ|ÑW_•Á7E4m/ì€Æÿî;‰ÁáÍ®YcÝœ ÚµóWˆSƒ³¿Q'ΗY‚s‹K¶Búí¥V¡É“%´ÄŽà'›wáóæ•urì‹ÔÂ…VÈ¿l™µîÂv³ 7ÁEs\fM'\|1j0v̺͆EˆÎ€tQ8<öb˜•+Ë™5ë×[S¯¨=‚&:ÂC4÷Ö[òs öè˜0AFœ ízü!u®Ze-±•)“Œ{¨¢=-Y"£c‡¸êNäÁ5Âý)—íD¥0U$¸’¸*ºÙy.sç6¥jÁEpÑ¢\÷ÛS<¸†» ÄÌjüà S<º¨f Óð$W V‚+«»tÒkÛ„à¢\ž×0‚+éTžàJFà*Ï.tàz†mâ>¸RÚË}‰€ƒ—àrSÏ\—g U/p\I®¡lÕ_©ºнªç[ž¥¨R9W3NvÅ C*ßQõa½àÃöB3ög—vQC .ê2úE©Î¾5íÝÆW dòÉ/<)ÔeÀ5„mBÅÐ4¥ò¹Æ®à™Ï·wž*DC‚ûÉ`¶ u=‘˜ŸÂ‰?µRùöÈf§bÕ`‚‹ [ã|?D)vÿÜí8686¸±M¨85I©Ô‘`W@'LíÛ ›šŠCƒ.*žjapµf#Sñ×@¶ †Š8Ë®€X„ÍK…¡ÁàÀ6¡ÂÐbûF½£àJå«™ÍK]Q‚ÁÅItT˜*p•eÃRaOÞ&¸¨h”SÑ¢;¿ŽG%kp=Í6¡ÂÓq¥Ò; ®ô¾:Ù°T8zšà¢ªŽ‚«›”J(¸ú±M¨°UÃQpÕ`“Ra«_0¸ú²M¨°ÕÌQp5c“Ra«/ÁE%TW6)•Ppõa›Pa«³£àêÌ&¥ÂVŸ`põf›Pa«“£àêÄ&¥ÂVo‚‹"¸¨(W/¶ ¶:: ®ŽlR*lõ WO¶ Å›ó”çÕ“à¢.*ÊÁÕƒmB…­öŽ‚«=›” [=‚ÁÕmB…­§×SlR*lu'¸(‚‹Šrpuc›Pa«£àjÇ&¥ÂV·`pue›Pa«­£àjË&¥ÂV×`pua›Påyu!¸¨„ª£àjÃ&¥ .¾èJ…¯ÖŽ‚‹¿JF…¯ÎÁàâûbÁEy_.*¡jå(¸Z±I©„‚‹³—©ðÕÂQpµ`“Rñ}kã’Õg›Pa«¶£àªÍ&¥ÂVý`p•g›Pa«Œ£à*Ã&¥ÂVù`påg›PaëGÁu›” [ùƒÁ•F©¿Ù,TZ_²^ˆ¥ÂÐß>R…¢¤ÂQÓ€‹¿PF…£Ž}ïR27[† CÙ¡V0»²³a©0”;°ïñGʨø¾ìã4¸øâuEõ‰Ù÷.edUê0›ˆºŒv+u­ƒÔ î{×úêg#S±ê°N¡}/àÂWŒ­D]F7;ënÅè{ØÈÔeTìr}/ ÿÔaCQ1T!ÔŠÑ÷*°©©ªGß ~ÂXJ©Ól1ʧcJµbt¿¢¾=²Ù)í£P©@0]©ó˜iï³éR¼(•óŠ=ÇQp)ß°ñS¼Þ·§:_±ï÷ŸÔ>Üqr`ÊÔj¥nS*• ÔŠ­ï¥òí}5ODJä\ÊÇŸøõ½øÊ­T=¥^Qj+[5Yk³RS”ºÛç󸇬8ñ•ÓwÚ¤NpßS—µ´J]C%G¥½Ü)×îûû^"ûž¢¥lÓIgl|ö=ö"Z´ðŠ}}F£Ñh4F£Ñh4F£Ñh4F£Ñh4F£Ñh4F£Ñh4F£Ñh4F£Ñh)Üøö=ë*Ð+£Y4ñEd]²,J5Tj¢ï§C6(µ¢’‹~RêC¥^VªEÈO2‘]ÑL­R¾ßººÀß# R†>Uª:ñÍÈÊ­ÔëìÉTŠÔR¥ ‘]Q®rJíe¦R°N*u/ÁUÔª«Ô9v]ŠRª5Ù%Ô*¡ÔiöXŠº¤šd—çÁuR;ÙW)*@Ç”ÊOpyÛÝÁŽJQ14—N—‡Á•O©ó쥛J\^u·†²RÔe4N—'Á•Šw·(êò:¥TF‚Ë{à*ÊÎIQqª*Áå=p5bϤ¨8Õàò¸:°gRTœCpy\#Ù3)*NÍæýyïk*{&EÅ© .ïk {&EÅ©.ïk2{¦SÊœY—.­3d·ü­·êìÙÙnÞׂË{àšÄžiôÞ{zÓ¦ œÊ•õÅ‹ºBýÒKzûv+óða}á‚>wNÿö›~óM Swß­7lÐ'NèƒõéÓzΜÐÊ7–ªì ÐGŽè£Gõ©SzçN}ï½—%Kt<§Ni1Áå=pMdÏ4ÂH[J–ôç¼óŽÞ²E/¿¬wìðƒ«o_I´h¡³ÒëÖé?ÖW]%é¼yõƒ†VŽ\}úÜ:ttªTzútù7p¿‰×ßë'žà9uJï\Þ׋왶àDÍše¥0jäHI¿òŠ\ð”ž~ÚJú©þæ)ùsç¸jnÒÄ®ýûõ[o} OoÅŠÐMà†­_/^´x±…ÇnÝü~þY?òˆN“F˜¹w¯>~\œ·›n×!|¿¿þÒcÇZþÞæÍR`÷nݵ«µùêÕzÜ8ýë¯Rÿòå:S&ýÅòíV®ÔÅ‹³3ê=‚Ë{àÏžik½oŸ•îØQ¡,Y$=mš0ÍWÿþ’ÀH¦L‘ôçŸKþûïëV­b¯¹iSýß’È‘C¿Y³ Oátýùgè&ˆ=gÌ/îºë¬ò¯½&°2Ÿ¶m+ÀIŸ^(P-P@§N-€Bal‚oEŠW'NÔ¹s rÏœÑåË[”F±'ŸÔuꢾáÃY hÌP7ekÁå=p½Àži+W.}ö¬nÞ\ÒkÖŽl°‚ cÿž:%nLž<’™6­Ü¶úé'ÙaZ§N¡5ƒ<\+Jããoà§£FIÔ²ÉÆâU«æÏÉ—Oê7Ûâð.”ÄàÁâÂa`”]D²úê«z×.}ûíúŽ;YðʦN•üß× XeàkmÛæ?;Mù´àò¸Æ±gêë¯õgŸ‰s‚h ˜=ö1ÌmpÍŸ¯Ûµ“2±¢¸Û³'4ÿ¡‡,p]}µÄŒmÚ} < Ù¤\998KÀNŸ>VæW_‰_wË-B0@x…H¤:qB>B ¸Z·¶6Y¶L|30ÖÖóÏK>ö8l˜U¡(öeÒˆFm·“òé]‚Ë{àzž=3P X+pð"F³Á W pu`7Þ” /΀ BdÇþ!œ4ã>ÅTÆŒzÒ$¹=e*°éÙ³ý1£­ûî“cëÕ˺9P×vŒ¥f€ ±¡ýÒW÷îWˆ\Þ×sì™!:tHnÙwé¡×_÷{D€¢³ÀòprÖ®G¥D ݲ¥ÜîŽ9ð[´ðƒ«iS©aZ… º~}ýý÷úÀ-[è&àUéÒ27l„ ixƒˆLÍ¿ ¨G®NñQ¡¹ç¶r¥nØP,(³ÅÕ~ø¡DEŠè¡CuÍšRæ?ôˆV%| åMºG‚+Dï\Þ×Xö̽ô’Ü |²ÏÄ×7ÊñÀòp™€pLÛ¿_¢9s÷;ä¡ý\Òü»aƒõà5›e!B>jCD¯7óß|Snˆ™|°ëÇ%ëLfõêrHÛ·ë1c¬if8l„\¿ÞºK¸Ù÷âð•Q­Iéûö[vƒ@Í'¸¼®Ñì™Ñ¥-[ô¼yl75àò¸F±gF‹ºwWnX¦Ll 7õÁå=pqY›¨QÙ²rçß)·Äßúñ ¸øÃd·æ\Þ×3왥¸`”«={&Eũї÷Àu?{&EÅ©ö¤–÷ÀUŽ=“¢âT}‚Ë{àÊÆžIQq*/Áå=p)ß:i윫~öýÚ;ÁåApÝËþIQ—Ñã¼3ïUvePj+»(EÅÐ ¥2“Zvº*²—RT =@wËÛìJÍ_Í ¨`} TzRËóN×UJ­bw¥(Ÿv)uÝ­(aW6¥¾`§¥R¼¶+•‡ÔŠ6¿‹‹9S)Yóíò¤VT±+µRe”ÚÀ>L¥0íVªºRiI­¨e,RwùÞ‹g¦RÂ}øZ¾yAŠÔŠ~vˤTQ¥*û ·Rê ŠŠ~¡'7ñ]š‹+•5f§' ’ ¾h´aþÄFdyÊþ½íÊ endstream endobj 82 0 obj << /Type /XObject /Subtype /Image /Width 403 /Height 373 /BitsPerComponent 8 /ColorSpace /DeviceGray /Length 13122 /Filter /FlateDecode >> stream xÚíÝTc÷/pìx7eÛɦž}Ùä$ûç$9»//g÷ìnö%[R·Ä%¶ãŒg<3±Çv†F !`($DG^ÔEôÞ{ï½wM¤ß»ÒxÆ$Á H÷Êóûœã{¯þ÷ïýÿ_ÛŒ ü¯“ÓÙù¾Gfôlh©=—õ;¡ù”ËØÇBÄ×°ÜÇûÄ¥)¢XÚ‰¾Ö:ªmîÕÏÙºõ–üçÆÊä2;(èÑŒ|‹nÕwú¦ò%ö¢ì׃æi,»_Ÿ}Cº=íÀþ“Xx‹>Ó ºÂTûR¬ÁÚw±ô–¤€¡8ÙÞ2µÐÿ7X{óþ@c‚ý© à…Å7ë¡XŽ‘ 6¾‚å7çyµ€ ©:Åò›#†™8r´Á–ߌOj 2†2€ÿƒõK€„(’l8êÐDÜ«ð3Òr à(L‡‘¥j1€£R¡M–Ŏʃ¶{6#¶1€£ÔÐD–,Ðbæ"i 8^(×⩨@Ó.$ü@k`t@@xÈ1wUb$æ#i¹uHÊøx_6ûΧ€uáuõ‘DSB{}øzçÅx'ÊÄY·¼½ýÊ»sS$G„‘˜¤‘~ˆd‘NÚ (k§ÓÙº€dHJòÏÜèÉèî¡Ó«–åÚ8zަ+½¯ívïýYUñN"=cœî£Y»~tÁN©r˜ôñ z¡¦=}¨NïžHoÐ}Fb>’Ú![%uk´ Ý[´ÒVšxÒh2-ƒ¤¥Ó÷i´öšjË‹ÆÙô4õÞWÑhÕý´´1Ri´ñZg=&:m,–¿æI‹Z¥± ”F›>ú ŒÄ|$õ‡¤m«‚‰}wm=ÖÃnzxH‡ˆÏ{A¡†‡Gæ”GV·‡ |M½÷Ã=<’–ï0íæV6è¦ìtsóS¯ýD77Õ¤[ò¨ nnÍynÃj77ÜtMvËkvsc-ÔàíæÖäAi‰…H\rI^p1q]ZQ»•—Œ>â`ï–Ëx¥›ß‚Ê%³ÃÅå0L½öÛ<¼Æ ]G]ÜÁÓÅ¥)Ç%g‚îÞn.£‰.9M..žàî:Wæ)ÐÖº’‚‘˜¤Æù¤…T:±•ÌhØé½ÄÁž¯sÐüú^£«³¼ÝÙÙ¼LöK–wú=œFœoÀMgçÆlg·nír1¸:$8g7:;ß„ά‰­ž†²#ÂH,DògKJ뎶yÝ8ÒtÝóp ÍÅÌÝæ2·$b$æ#©~ß<Ÿì ¯÷Oè½c¤–ªFæ¯nÇHÌGRõ®y~ ßwÏÊÍd¥èÏGZE‰ùH*ÿDFb>’ò?’ãí·y‰9R¨~‹,‰0Ýo’%š0€£\aæ ²”@6pÔï`ÿí×I2  à¨ÏïAÄÈñÀÏ13J æ÷äH‚µ¿Âú›ñ.ìð þ0©X~s>3Õ/‘A†Âò›õ/Øße $`ñÍ{¸4ü­½½<š¯cñ-øæ"ŒŸ{Ö¾~[ †g±ôýTóWŸ¶§ßwx`á­xav¢ŸýµÝÐç±ìVýß)€YÖs¿²â—gåI×íëXôc|U 'êTêzéE[~Q?ÿgÿü5(û–üx?È{éÄ%mNèëï¬Ú<ŽíFÏb©ïé¿åÿ÷üÌv~úƒÏc‰B!„B!„M=þ‹óna6\:0Òë­gîõî_æ-¯HŽ)Ìíü/§h_~·Pgÿ5ßìù½é{žÍö’®ðÝ/S/Ïzo·»¾0oC«;â!†äožhLßL6õÞYµåÖwßôþ,Åyv`o²!KnkŠê‘­çCÇé!O-ÀÎHµÂæcÊj˜Ü˜§ÖO̸@?e§weÈZ‰ZËŽ[pþodDr­2;)k@wêò`9;Ã~dc­Ö¿¦>Þ 0&³ã˜²—DQ%/böâ4»j3@Á'¬ é`h³ïÄÄß'Ty1Á‹N±·z€p+c ¨·û˜†Áð"%ùÛ5˜ON´»>€ÿ±8¦ÿè³ÿ’çaýo© tñö—°-–þÕýP ,%0¦ °)È·v¡EH†<€×,Œé5€<èÚnÙ žœêÞUÏ·m儆ÂXÏÔBåxïNlhÊXMç–,4twlh`3"4jm®sÊÀ3=M5 Q!#3íÛé!!-ëMÓ3ì#cjÙ‘¨¡E•…õ¸´ :Òw¦üö>¢Xœ=9kh„ÅêÝ e °XPÈ Þíc±†óL]ŠGY¬Ý*k\ɪž`±r ÆÔœ5É †HÖð‹UÓÄJÖqY¬åì#Ïi5ù‘´’%Ëb$YGúŽWÞÞçÏ›ÑÊÀ¡âÀÀ²ÀÀDM` ÄNæÖ4ô¯¬/îÆ6ÔVFBTdUUy r"0‡‹åÓ%š¶öŽåÚ#Ïi¥D$þ–DË3c,žôW(nï¢4çeø‹ÊüODa1Å‘¾Íý·÷¹ Äf¬Ü0×ß¿¸Ëß_¤ñ÷®¿ÿ8qIe‹¿d6.P¶âï¯õ÷¯mð¨ô÷„HnQQ¾æ„„ùåøûKfü‹çŒo¥:òJDÒìk^`ûVO×z½éØÿnëGGµu·÷=Q.ë(òMlô=¹ÅHäGúFï§[!7¸¾!û©¾Ù¾¾…¾¾¯/°}}ljK*š}j}};—}}µÄ jê|K'|}UÄF²q_?õTùúfLû áD›ß‘ç4S"¦yuÓ,&ÓOb<ô×Ým5øÜ9ª©õ‰ºEì}˜·ü|"Lm‘ÌöB¦o“Ä 15E°ˆcód#‘™é¼=Ò<ºƬӶmw0™*&³€Øó4L&O#.)obò·›¦—™Lm$“Y]Ç \˜ë5pL7Ž3} ˜9˜Åd¦O3™ÚΆé´#¡D$M ³üôñëî¼ïU÷®ÎëÒ M,£©}eaÇ`(öç‡  ¨\Ûhg0nï¬ÔƒùGH-F"5Ó; !3Áx£8¹€ØF3¡Äø F<“Áˆ b08\#P{‹‰Ð—Á #N§'ùŠn?>(ÆÔÓxa`,ñ9\*8ú”&*DÒàiV$øÞ=fêîêéwŽªtOù–çz´gÃf gq“g€.Þ3Êï™6îé 5tïõpÏ’1_z=0Ì?Bl1±'Y(ÉM³b ^·¢GFF ###œ›\b Ä_‘¦öÊ¡›7麸›ë‘7ˆ{Ä.ßLY'šgÕ7SÇnÒ!ìæÍÕÍÑÜ›7ãÀËü#2,F’q“,”ˆ¤ÞÝ,`ß>`òxÂ=Çp÷&¶>çmj¯h!6«"÷õ÷ú"ww®Æ]%qwgÍü#Ò,F’æN–z*Drøewô7·þÆÍMÝÝV½Û£òeW×p] s­+puåh\#ô4W·פQW »º6æº67ÉwóOH±IŠ+Yê¨Iíuó–z¥â¦^ã¡»în«ÞõÎQÙZ[êTûõëkœëµùׯ‡j®_NîYϾž0zÝ <¯_o̹¸ÕU37Ì?!Ùb$É×ÉRK…Hj®Yà&«ª–Ü0¹äÜmT;ß9ЉM¬Ér¹vMɸƼvžE\‘[Íq¯¦_»žïzíš0üÚ5_yoÓÂ’,F’tíX±w=¼Ÿô®\¿v_j¨Iõ÷âý{ógÖûÌö& ',F’pü@üÓî)¥ãÐ?Xç\ÿþTS!’ª«6ôÁ¸f£ÉÝÂI‘ÅHDÇßù&çê{<ç8ÞûW]ÊÆxQW¯z$¤Ò͉‘i:^ÈUßT1ËØ‘ž$ !vlqÌ{'p"©|‡,B‹‘¿˜7üÎ{ÐÝÔ¹tÕ£s¡ ëеæªÐwb–¦«’«ö ¯ªKW3Þy'VÛ™ÝýÎ;ó…Ý'S%"©¸bk–^—Á·‰àø›Æ_yÒ®\™ ½’ÐN|žN¿rE2x%èW®xio÷á¬^yG“b<ŠÒ\½òÎ:÷Ø!ý±‚üH²¡ü2Y°fvLk 8þâè¡ËWÀíòåZÙeQÛåËïA]eUûæåÈEâMKlâjgç oÓ ÎÆÞ¹óUÕK’ão[Nþ« øÐr‰,bè5;¦^qÔÐ¥·áýK—*å—„­—.½kˆñóóó½>BœóЭy_¹ —Ý ×½sz‰³~׿m ðÉŽÄF/’E %fÇTêã/޼ø\½x±Rv‘5D|S›7/rGˆ›öâÅ„¶‹¥péÒJ²±wÈîUÓéc‚7Ù‘\† çIÒÉfÇ” MÇ_Ì<þtþ|…ôü›óÝ%ç+Cyuç9ÃÄ9×óçßݬjkƒ7·l÷æ ž?_´UY4ásì]/lÀe²#ù!ý9ÞØ·ÌŽé-ØyãØ«ÿD;÷ú­ çι~@|pež;÷+ÖÿsW<‰oú7Ÿ7nûw9Ñ®ÄÎ-*Âùø1ÑÈ_çp”¯‘ƒ†¯šÒW À"iLJ!ÿg‚Ù°|Ž”—e¼RµÆT õä éÜ2~›áûûø;2¸àm cz )ö¿O~$Nмþ¢ý½Ô}XÒ#}Ðõ cz] $âôwÛÐôÂóv—ð[‹cú-@ºý‡ôBlÿ"!þ5™ÏÙ[ Áêk—RÁh÷1e‚Å•ÚטÉ3vÅÖAç¬ éS  cÛwHÆD¸IÄé*€–Wž²Ÿgå#_³:¦¯ÈŸµã˜^iP}‰2™„l Ÿ{ò¶_ÙØ“~Se_wƒ“’n;iQžoýøÞVóyèÇoyF¥ÙpL)œ稚B!„B!„BÙÂC_ùî–ø,…ãøÖŸ‹ÇuðàYï<ûi*òóx€mEPî5?ÿX@Œkil «ýAÓ;4µAL^ãùJ%òÆ.Àf_}݃ªyr ùQèkz0€¶¿öÖ8 0û/”‰ÄŸø×PC¢j*èÓÃÚw)’È« ÕU¨U}Q"‘'¶a½ªUVv “‘(`·¶ üùW€¾ò£²û f ¼4.6O<âÒ»6€§IOä ûÐU‚îX鑼ú²btÇ ,’þ X*BwÕü;Ù‘tÀH!¹ (e.’Étç£hÀƒäD1@“}dÑê{jíá1€Ú<ô‘ÒÿÈõ8@MîÇOÎ}›xò#©>á`³ÏP~¾¥39ÅÙÙE¹Çß¡øLÇó‘i*DR¥:s5K„Aó犉Íè ¥KKöTªóç ?:6ªl‚‘Tf¹ÆêêêRóçêVˆMq‘¥K‹÷²²*òÌŸ«]ùèØPe”ˆ¤Byæ7ÛÂbÓ]¬¬¯o™lV)•Yí“Ó-9³ÚáaeCRY<2ÝM´Ž–}x]ÝäPÕžRÙS¤TwNOÖ+Kºª'F ”ʲ¡ÙÑRåíK••£³9JCÙÐHéÙ\9E…HÊg®a›øáì q¸^£ÜmXîS(&5­UY=55Šá~…Z7Ú°6™©[éhßSgÕív¶¯ïefnTfŽVÔ6eÖèë'´ªÌ¦¦Šî=µÒxifýnE{^¦a©­c/'óÌQ"’2ù™«×¯­­U•iˆÃµ*ùÀš\^½*/„Bã¹êeb3Ô'ï%ö…P ×µÉåS­¦ËzåòÎ=¹|£B¾Þhl¨<¹|«…8Rª[äÕ+ÄÑz©¯¡I.Ÿk<û¡OR!’RÙ™«Û0nK5Äf­J60(“©÷dµÛ¦sUËÄf¨O6ÕGìµU2]¡LÖ7h:µ])“•éd2M¹¬jc³'GV½E´Ž ÈÊÖç·ºM—Ê %¦¾†<™l¸÷ì‡N‰HJ¤g®vø-Ü–JeÚJiÿ€Tš·'-Ó+Œ­•ËÄf¨W:ïD%߀~¼¦P‘qÿ„ad‰»ÿAKrÊZ׈É/\}ĉbþ9÷ÔË£5rÈR|Ú¡Ïø<êDA½šÚ6§?M$l²œ&’í‘*¿~ȉº>ñØã÷©BO#ä aâ~‡Må¥O«êƒÉRcNÈ\$,²`$æ#© " Fb)’@²äc$æ#©õ'‹#±É-²äa$æ#©ñ# Fb)_²äb$æ#©ö¹oÌÓÉÁHÌGRåM–lŒÄB$ ²`$"©¤“E…‘XˆÄ‹,‰…H*hdQR7’‡¿ü?ÿ•íüì;Z‹¤ü&Y¬Fòèw~fÚüü¿ü°Å8þ- {Ïö¯Ã)~ï#ñ ‹ÂR$ßx¯xËæ5Ùëø73±<ôʰÝÞR”÷Có‘”¹“ÅB$?̳[M†_9üÉŸ4¿e9\W¦VeÙNvaeËÌ>€^𳑸ݟ§&7ÉWz€ý™–ÊÂlÖD¥.«Þ6~›ûàÏ®^%ê4[–iYM›?2I©+YÌEò£ €Í¦,û¥l–Hÿê_|‰ÐTÈíFѶ[/š‰Ä…,²£‘¼¸ûm û¥Bs÷+ `F)³§âmÐýìH$%×Ér4’Ÿé`»Ø®5Qΰ>|úyâ‹‹Ôβ7`é[G"q&‹ôp$ßZ‚l{…øÖyÓÓ¿· óR‰½©uÐòð¡HŠÿLÉ¡Hnã¢Rv&‡Ý﯀m¥Ùb›ª8w(’¢È">É9€*ÛNßlŕ۠0þñ—øãWæ`ô¯Eò>YEò×£0GJMM¿Æ¥†õŒt2¨ k¿ ß#KÆÁH.€AMJM2ÖAíô¨jIZ-k”‡"¹zïÞ=é#QÂ4I5©Ý£¯€^JÒjYu°ý™‘¼C–´‘|fêHª‰T¯ˆ`–¬¥«¤xê@$ù"ËÁHžƒ”¬¢Ì‚¨zO±ú•$ã4kgmÀÕƒ‘\!KêH®ÂÆ}Ï)U~ºõÄz¡t𬭸5‘oÜ– %õ•%©ææ¦dIIÙÝ««£™¦Óƒm§YNlnŒäd9É-X°<èÊ.ãv*ÛÂi•ötK¬5ÁÀ”[[ñ«Ô¸kMœ¯OÌÛÏ-Ñ$&m¶*uY¦Ó Ùi–áHÔ—É’| !Œ[tË´q«Ë·p:5ïtK¬•Ã@‰µ¿²÷ÓäiÂ|]Bî^BBò®ºpç£Óå… ÊÆü¡Îtyw—4!AÙ5>C4«rÚ% êþ‘J+7‚ô‘ä½E–ƒ‘¤ÃåA7O·»êIãØPAB‚´k¬%9!¡[ÑÕoM’•z›")¶º:XüH´Y&Í׊rô­]ëS"‘z°^›`:Ûß"*Ò'‹² @¿+%%¢¶‘HJÑz¥HT¸iùÞƒ‡"É}“,‡#´<è¦)ãv7O´Y`<艒÷å"}ÍíÓŠ‘h£‘¨Ñ­½ÇØ’Q²)JƒL¢i@T»D4¬[«¸é·&‹¬®d–ª—æi„ÂùZa¶¾µAnjLªÒV˜ú›…EKBa2$ …ËùBÕÌê´¦C8Ü*Šöñ†Õ•Õõýx‹÷>ÉÅ{ôÆYI8‰å‚4η{¹Â’µ¦TáÌæÊêª._¨—}¸lÝŽP¸‘MÌ­I(¬œ"*´2?£ªv‰SÂÞ¢·¶ÖJ½‹L‘X_‡m´u¨›ØÍÕT{µv›vý͂ ₥|Ád¹@0Þ!è2 S°›gýÖ‡"ɹ@–Ñ Xt™N$d‚X f F:n7ë3nïå;ÁF1·F bR¿(äébH%*3 h8nÙ;S$…Ö×aËßÚÏ$vs5|Õž©AžÍç'­õ˜Žûšø |~ˆøü%5¥€/Ûïàgks{ ™üþÉ$>_bùÖ‡#É>O–øÃ‘XtÚ~•0¡gM Ìàó çù%;ÄÅB¾>ýöiÙŸ¿¡$æÖÀç—Oò+¦ùñ#z¢8]‰yÚ~~¦^Åç§$Z)w¡1’ë ±ñ·–»¹j^Öž©Aµ®]5Œ'šŽûšx <^<ˆx¼%5¯hcyy ƒÇ«ÝÒÔéļđýÅÍ^Ë·>Éëd9‰•‚oïì-gòD›+ó‹Ù<^ÓÞêúЧO»}VºÃãm(‰¹5ðx哼øÙõÍ&='ž×NövóxeZÍêz†•»˜"¹çÅÙÒ„––mK¼s”µ/ ¶‹=úE¢:GÑ¡Hú­Î?9Þ´Kº=Y^j¼µÎ‰ü;GKÕÆmJ¢Õ{›"É?ûÕãê;·ïv8’¬×È"<ÉYW¤¤³~v]t‚ŽùÆHÔg¿ ž¢º:óÝŽDò{²GrÖI,­+⟤£Ú i ïõŽäU²ޤ´š˜"É#må½Ã‘(_! ÿp$¤ÕÄô#¯¹g¹š^¬è:‰äe²‰„¤ŠDFæš"9ËU÷òfî¡sïHj!ów§öÒý‰ƒÑ‘ôž]E²ï©»)’œð3ÄO»‡Î#Éõ‹dI…¶ƒ‘œ]Ex÷Ô=ÇI¶õe ³rŠú룸Üú”¦>®¨m¨–8æö –p¹¼†Á†X.7½q¸=+¬êÉ䦖s#ÚÛÚ’ˆNÊþ¶ä6kë8öˆ„ /%Ô"é±V‘Lu~c —[›Ú0Ä´ ÕGù½Cå\nlý`S—›Z?Ü‘ÌåW öfq“ª¸ÜÖÄ–ö¢“¼¯=¹-Êj¹³M‘X_ö°a«/{f<,ls±6+v»'{f",¬cµDV³Ù¦èYàFnŠ ÒÂFZ$ªœ°œé°˜,®ÔE…Iµ5…³aåÖ#aÀðód©=ðº$"k©ÞÌžœ []ªÏŽÚì77¯•I+âÖ;+ááš±ZÖß.ÉÊ S,„…¦KËu±aiÚúüiˆ±ZnS$*ëËÖk8$q6«9œŠe‡i|H7ž©žàp¶¤ Û|ã§ …q›3Í ‡lgZÅlãpò!ÜÊ­»Dòì½ö[r<¿×DÒm­"Õ;N´!³ÚÀákŒÇÒƒÌx¦l–ج+Z¡ñÓJŽq›¹Àáò9œ15§‡¸m6D[-·ÊI–õeëûˆÍJ{3ƒÍîl'ŽWsd;¦3}›‹KËZ5»^;¥æ²³×Wª¢ÙÙÓìpˆf³»+Ù ¹l¶¸lËKÿŒä ûÀzŽîß9‰åA³ÙUÃÄäçóØ«r6»¥‡8^(Hß 3V¤s‹¨ÈN1»Z;SÎV¬®ÕIJ3ØlŸÍn«gO²ÙqeµÜYÆH”Ö—L¬› åèÄ¡›É¡¡ £¡¡a{²dCŒñLkχ]ÂUË%!!¡Cƒ!ª©0ˆ 鮯 ‘ÇÊŠŠ#q*…ÚgÉ¡‚^§ƒ‘X[²r˜ìNfÈJzHHÕ”ñ8KüvE¢ŒaEsLE2S‘ìuëåÎ4F"·¾ìaMó}®—2XÚ¹£´Öãp$N%°ûÞ“ööæô|êp$Ö†]Þq¿KH•¶oçZï"7F" °*MpŸ$%ù|«ŽDòÅXþã¯ìëü,ÿƒÓáH¬ ;Yv¿—Žé"3EBÚ"—‡#qú¾¶½iO××aᅵGÒAZML‘HI[äòh$N?žƒúµ_ØË ’=Xý¥ÓÑHH«‰Ô‰älV¬LºçKÌDâôµìòÿØÃ…ø €Þï8™‰ä,*’sIL‘œz±Ê´§¥î¸¿ëÌFâäô˜ß¬Ö’YŽøª¹‘œ²"ªÞû½ÒøjÈ8fuÐøé­I>“Ù¦Ûèd2ã†7g’‰Ê‘í ü…­ÙT&O³3×ÏlLg2 —7:XÌ ¹ôù™L&3²k}½ÆÚÛÌGâäôпøåw­Ú4 MoQèÏ>aþñéÐfµ"‚É­i“Ù”=²ÑÍb2£7f‰É7©†¶99ó[óbfÔºvn˜Y#c2ó–6ºC˜~sé³sYL&·sMÓh½Ú¦H¬/¼[Tºè=±–>ÚêÍÚÉòOÛåxO¬¤0ƒ|2tÁÞù~¾Þƒ o™&9l°×›Ý\án€wW¡¯_œµ[[ŒäÃÿšÿ”íüµµ‘XvàvIPán°÷&%l°Û;p+/ y7Ü{h=#À'>Ø'EÇñÎî#*ғ뾕Æîööƒ¾¾6Ä»¥Ì×—g½Ü¦HÒ­/šµÊ`xoËu Fò#o*8”=©bLTO¤*Ö“¹íÄá ‚1PË`ˆàVÄ0ãbFW×ú­‰„4D$Ö†-Û$6ë*ÆP ƒ!4ø(çƒCØ#ùŒ¡FãIÿÅrCÙCöä0º›ŒX`ù‚€(P&£¥+⸵XÓ‘¤Y_´¬‡ØŒäÓ'tzT¯ dôq1Ñ\5]_¸"¦ç¶ǃ™ô99~ ÂÁ›NïΡ×mO¥X»u+e#iµ6ì‚AbÓWJÊ¥Óý ´Tc¬ˆ’>Dˆ^2ÓP´¨ +ŒE#J0‘M§3õѾp‹No+ UoÎfX/wš1’T닃*Ö¼¼;¯‰z/¯d={ñvóxº——ÿN€s7Ã+«ƒhÌôê«óò|€áåÕM´ÿ†²rk Gb­"â-º—׆Òkˆè%Ô{Ë×è¦æ!¹——ïN°c+ÓKÖçe*AG‹—Wú€1ÛcEÒw|¬–;Õ‰§U·vŠCª7|=ÇW“¸c ž·¶ÊBýSØžãižžŒÍÔÀº½tψ•¸PϹgêFZÄh»§?Ð==»³=e,†xÖËÊ­)‰µŠøl–‡”mßòÔ¤r†Ú<}׫8·’¸žƒ2OO¯5I@åžÜ3tÇ6– ~+ƒ;ÔëÉ_b¶ùžÒ`Fê"Ýj¹M‘¤³`kÔàr?—FÏîYlô¦ÑØK m,ZŸ8•44[) Ñ”]m´ŠM1µXǤùŽzÒh%)´ê¹Å¦(kwn¡l$-V+Þ¿<I£ ª»[|h´àöÅ…ŽZeÉþ¥1E"°ÕzÈ6\×Wª‡¥'¬&òÄè¥6­Š&0FÂ?ÝØÈYØ7bú·’Èãý°AÎÐNWN¾1ÞIžs•j8û ¶ü¯‡Õ°Ï¡Ü˜ORhž)’³^Ù>Òî¼ÆÀœóiŽ4™"0EûŽcê€ÉO[HäÓ“Ðá ³Š5Eò'Çä­ ‘¸€ÞÛAgeŠ$抃ª…v ‘´C­£N*ÆIôTÀ7Í&òM€0GT´)’·ÔŸ¶à}³‘¼[rÔI™"‰ºì¨-üÏýthtØ9E#‰|ËQ©¡Ül$å vØ9Eš"¹ä¨Ò¡ßl$ýî°s2Eñ¦£âÆl$à9ìœ"Œ‘„_tT1 5‰bvNá¦HÞpTV"qØ9™"á^pTÑ#‰vØ9q‘„wTQ#‰rØ9…™"yÝQY‰ÄaçdŠ„sÎQEZŒ$ÒaçÄ1FÂþƒ£Š°I„ÃΉmŒ$ô5Ge%‡S¨)’ß;ªp‹‘„;ìœL‘„¼ê¨¸#á:ìœBŒ‘¿â¨¬Dâ°s 6Eò²£ ³I˜ÃÎÉ ëwŽŠc1ŽÃΉeŒ$è%Ge%‡S)’Ûb$l‡“)’ÀU¨ÅHBvN»ô¼£ ‡%³‘,A¸ÃÎ)vG÷[G•f#é€$‡F«@þG• f#)€l‡“ªÒ¡î9GÕ|³‘ð¡ÃaçTéoÃ΋Ï:¦×ôð²ÙH^ýk:§wàí¯€ùŒ£8¸z?v5É£»À>ØÕafÈÃלê åij9éªÿÝ^`õ—ÔÐ}Ò›Plî-Pgz‚ÇS$øõiùn.ïÃäGòÈ ¤½Šn‹ý—(ðsÚq°~áedôû ï°³³¿×‚â%dÄé‰S0è\NûÔç?ÞÖ@*%qúü,]ø zy–¿AHœ~´C¯?û û]3ìÿ·U¼l€Åžv(gþ²·7ÇÞs¢Ž—·@'}ñÉ×s‚MØ{ljJ~4 ^øåƒé÷1K+ÿíD-ŸÖÀ¨JäExùó}€}Þß9QÎßÇ­<°Ëqm¦>áDIü';¯cùKc­» òןtB!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„,ÿ¿sÓ endstream endobj 85 0 obj << /Length 3552 /Filter /FlateDecode >> stream xÚ­Z{oÛÈÿ?ŸB0ŠV*"†»Ëg-à¶qêŠä£hÑ+4µ’x¡H–¤âè>}çµ$%ÓNÒ†±³îcfö7Õ¿j±ƒÿ·‹jáÃ_˜Æ^èÇI¼H‚Ðóƒ( ­]l?¼ða ¿xûâw/^Ýèt‘zi¤£ÅÝv‘¤ž Õ"ŽŒ—fq·Yüs©=í­Öaä/ÿøî¯oVkÅÅõûÛÕ¿î¾u£’É$A ½X'°}¯ Ž]¬ýQ´XC™úÇJ)YWë@ûË<«€PéòØYné÷EÇME¿ç¶·ïš¾¨+Psw“µî›S}l™jÚz»X¬i›‹µR^†¼ô®Í¿Y…áÐp̼>²j³.‹Êb‹ZfíJ%ËÝñ`«¾f˜@-o{m6ò,«Ãå§• —¶ÍJþ°=–´¶¾ìßnß`6þèû&Ûu/¹VTyyÜÕŽY«§¬MÏ÷SÇÙõúSÑtë¼®òcÛÚ*?ÍHCù iä¾ñ˜ * ½$¼VÆÓAÂ}7ÅîØâ‘Ó¥ÎòË&ÛQW¸T·tûüÐqõ¾F¹ Õïm'ÓlUŽ2’1Eõ¤€Q¨fA´¼Þ­ÂeVT/‘Ñ Î„NGq,»þ¸Åշ܇ÊeMCù8¤ÈÍ?»ž©ÒöÝsÒˆP HÄË®>Xnq3*6²va hêÇ+ŒšŒ}]Y»a ÏóX²n;o§8üTTEÿÓCÝ–›ýЇ5#ÝTÃ… œpû}}Üí=™>Zð5\ËȵÁî6ˆYù¾¿¼=°€A7¶ËÛ¢éë¶›Yvª•§ŒìôÅ£ƒxyŸuB•“‹€×dZo¹«w£…ß@ݾzÇDwêz{`XŠŸ*`/3ÜR©ò‚xPêÛ¿\¿}3³Õµw&êÉñ<†‡kÔñ$®3€lmÓ‚W=‰ îO\f\Œ“pýÎÔJ¸sºKÄ3·6RéÒr3i5´mŠ.µ|÷”­Í˜Bâàƒ=Ôí‰Ûú}Ö3µÏfõúÞZœÈÀ*Ë:Ïèöͱgš7Lˆ ض±ev‚)gV…O3¼øVr}@ŽËŽˆÓå{¾A7ó]Á¨ùÇî[?Ñ Fd–Z–+µ<Í­û±bXB¹aSUŠÄˆìZàYG¹?ãb"ØÀ_"&§úì[Ãwʪ–©;+s€Ýàq3ûBñ©öG–#½±}V”¨†:Uþ*XQ{†‡Ði¡ñ[TÌ-ü¥yÇIQR€°âå{Á›>E:ô‚Tžº\`½M<Ø¢ ÛÀ’Š• b/‰•™tŠZ“:µËX鬴3éµ%™Vì.Myb:gXjÛÖ¦Vôp¿Ü ¥}ÒÞìm¶±ík09¡&ò ƒÉ Cåi»~žsu¼`âèš¢ŠÆJ!%|ë€È¤~,K¦ ÷-p‚ö`Gáùæ3ú*òåò†éÀ/P¥ôöεW¤¸Ÿ{NlF"k¥ÿ†t°¢¼Áˆœ'q?«Í¼p›È0c¹7£Yià…á 3Û¢´Uv°3ŒÖàžÈ@²îQà…›‡_Qbdœ&Ã&ƒ|¤ aX›™†âSb›ƒe sžºQ½€qGÛr'3%½„õ}–ÓÕžECT?YŠiԈnjv9ó>Ë?r_KÉ{J`yÆêÈÓz4þÅ,'aP:ZʦqwçKe¼Ö ¨;ÅS!\Ûssk cº6 xˈí]_ä8]-öE¾ç.rß‘ ó}àÜm¤å4´´ÈÂ5ìǶÛ¸LYnçMŽ;%"„IØ!5©ó [&NwlÁ0k±;»¯=“ƒå«˜úNfßÎma*µcÆwTÃ)~Ô:fjAbð¯F5þ"‚ ?–ð|n…fðHÀéÂ'3Q¡A\E!›'°Ü[Lê‰cQ–fG^Dx<5—EYΫ µ!Ã髺ZÿbÛ×5ʉ΄àe|äFg ©½)‹U'¶žÉR—Ñzÿ±»Á¹ÇeÀ¥Ì¤t JR¤ƒÝàã ‚OûaV(*N¼Hé/I%žJEi^DÌ)ÄOÆóMz¾éfð Á‚Ò8gwÙ?߀‡‰ØK×IûÁÔàA'á3M[Œº×K#9RøÑ0Œ/Rä§ú‚ËO?ByÜ( ýˆ·ÏÚö2;ø£#QßɊa,Ÿà‹1Ã"Å‘f´@"Ësº‡1àù^&Æö‘5X³ÿ»žMÑÚ¼GÏ¿Ao1ëž ®B\­ÿ÷®øeÖð/N‡ ‰¾8xlDo4¦8#VüÑbNé”0ðøÓ¥^JWÌÜEYè2êãsCð×uÔÇÚض…­È0ÀÞÜ«“ódã¯ÏÒ1®¼Üž uâ™DËöªžïUñIm¼T=±y{xÉıüJj¿.¸Ä~7wDVZ{þxqZëò4feJˆ#s6L=åÌwuÈšçX ¶4ÔS¼Ã%ʺn¿”, çv¢Ð3*™ó*‘çjPÛ—\E1=Þ-XˆP©Ç»ÝÙþ§þÔÌ©(Ü`Jp†Í0oÉ™½zD)íEþ…ïH³‚Ë’°ïåÄwŒCƒŒîdÄ$}ƒÕŠºý(¤øi2zO Ħ}6g@'è̤|°e)Y¯§í§J¾É~F<ÙO(GLV‰÷”柡¨½%jÆ©‘î8s ˜÷®±Ûxwùò²î†¤Ý%øÁÚ‘$Ùþ4I®¬tKÑÈ!Ò§ð+OÀ†ÒÚó£d¢/5ìæ½&˜IÇìß:‰“i²×ÍœQ‹C/‰âËPƒ¢u¸v°½ S$ðŽiNÇ"%±¥äc‡‘Äfé§„¬RßKý RyÁ§°ª9[€d œ: ¶¼ØÒ³såúýmÇ Ì\”&{³Ö¹Y¡J$½ö5öå‹R´IÒixƒ*t¨[ÑUλ(:òŒ¾Êõ䪳úM’Ör¥úöô•X/X«  }ÿ£3æ—™*‹NÀ?/³®³Ý3˜óˆE{UAÀ±±h8´ « ä„‰â¤ Ôyv¤(þ‡’"\Á'ÄoŽMS·œScú iV¸Îû¿ˆ&¤G ®;G(!À~Ún4Y;”P”:  ;ãz×· *Ó‰ò ¶#õ/|ÞS¡êP|ˈâ0ëlÜY2ŸD¡Ø4ø†(ÂÑíæ«”Â?—ãZÄ4)^ìÞn~Kp¢8YLš'¼ÍCâ”hŸ±U*õÂP}Í|.]ðÒ…§xëãˤãã%€×`Ö¾fæ·sKæÊ1À©ÎysçÄÐÔ]WÜ—Rsá¢a >÷(U@œsa¼ºhñù›yÕ^]|r·ipÈõå4ž$›aOüVˆ60ؾ®+Ž*ñÆHÒÆsÒC>`*ãÃA‰áÁÓ¹•¦CbY“÷€á‰3`—Dä'f”ï0µk¹ï¡-úÞV\!{ÎßaqÈò=>Ï͸bbÍ96 ø¥ÜǪç¦ûSï2ï-x[póæ,‰õ ÆŸ\‡ ùA"k~mKÍ¥a=öõ4VðSÔ^L:‹›Ù³_ôÜIé¨WðÍø¾Â}’„Š¡3{ÜnŸLÝa®ãÈÜ–'Æ“Œ°ô¦¶’á,7À\ií(ûŠ Çm³n_èÿþÍ[|H]•—q…Y©80äT´’£M­ÔRªœhÀA÷.aç”ðâéÅqÑnÜ»ª\?~>‰\–?L3zª¶ÆÄ’Å2±s|L<:>HKïó§ÚpÑ€ÌÒ:Œ•sºPÁ³ï%mÜUßÖ%Wãµ{*à çï'½çšÓq‚ ÚÝÐÂò¾uÏ+³¼·-¥ Î=ÜÛ͆S )sΗ—X$øˆÅ¿ëޱ& ÿÖXMMÑ—üÞ`Û⺿sä…¹Â!^_l_ë«—bEè,ggB |6Ät£ÏV—D–1"u¤$†JsAì7ì½@q8–}±GÝÝÞܬq«¬´ËÅ –u³3 ë×™½‰ž³`FSR»ˆùêáLÅu5‡€hê‹AÀ>­f‚ÀŠDdmBŽÑ 6’C™€h[ /ñE¢j°:BD#ÙÆˆm„e²)>ó‹3ò/çÚñM•[ 7ÉºÆæ…¦›§‚ÖÒJ:åzHféÌ~;ŸmÀNt³†×µLÜtq'®ÙÆ–Øñ é„òñP&~ÆT²ùDM.!èøØüY†Ö\‚ÙöÀ¿f‘fNÛ?i=Ú’¢'ò AA³QìH@SUs}ºz&Öœ3Ú=2ëé®çòì¥-‹9u4 <¾AÓ®¼OWs™kJI <GNâjxŒy÷XŽ*ÆËR)"êÂÜ:E5Z=J©³fäyKú ¯GHPü™QP„qsͭܲSÜ—èhì çpÎâSØå¹*bulE„íŽ]@’4Pv¶5Wé8Ã\Èà GJrB80›3Éâ ZÈ@­f\­cav£%šŽD FÕ‘]XAgŸ“fßÞœe›xCìtfËþç¼éiË~nv¯Óð9cöpiÌíäÍÝ‹ÿû7À endstream endobj 88 0 obj << /Length 853 /Filter /FlateDecode >> stream xÚV[OÛ0~çW˜N@‹ˆq.ÎelH µ… Ú®tÛ (´nˆÔ&™“râ¿Ï‰ÖiŠªÔ·ãï|>7ûPϾ.b?ìX#˶€m`ˆ Ó6%` ~í &ˆ@wçÇh縣ÚÀŽ©™`4X‡†nËÔ¡mè`4·MÕhÝ~w4GÔLM[c0¹ÌùÅÙ`Ô¶ £¦[ 6QóÏåà†Ïtúbéœ7ƒaË@Í~wxv}ÝÞdøKRu-# 3U Š­A cÎãKŽg‹ i)&BÍoI: "øxš)` ŠªB§Fô)ˆ“ãìO×tè¨\:I½4sYÿ!ŠfÄ ù(¦A˜ºIº˜NO¶lìöã4ˆÂv˜ÒW>åÉí=~çÍ[Ž#ÈrÒ&G{ã\iãˆâÑC¢íºýÁè²ßsφ]·×ïµÅü¾DöhS‰° Gç;îTÝh<’Ù,âãçˆÎ&»ùl¡¾÷ûêŠ÷Þ9¦Rú¶!\/û^eÈŒ’ìFa‘¹„w#ºäíQ,ø=ÊϪaˆY+*´Šà><”Í -0€'a„UÁU· ÁÒhí`uvî>”¼pò¶MÓ(3È0t,KÖ?滸%CÓP×àÛ”Füd†š§kk¬ÃÚ@š&ù9Ø2-†mM-[}*wîaºy ¬¦3KÝ¢{ÉXe³UÅqNÃ%/AºÂi,Bïa&ò1ñÆÒ‡ —f失Â>)ÇÄY˜®tJß婿ŠE7$Ï’j…·ó×"§#Ÿzó mk%dÔ›LÜ, ]ÂR< ÉJƒ¨O:Q DÌ62”úÃn%áÓhWh/ü蓴ض-»î¤*ÙähØÝP{4!uJ÷¥ŒÌúOE_ŠÈµà©«…x“L%HýÖi^á¤ýì¢`…ñ÷’¬À…EËÁ•Ó9IÏ'[c‚Çö”RËïw¾WÙ½2]–—H^÷>PV­ãRöswÇÔ½9©óô'ÈÔ\ù¨¥ì+™©¦¬HwÒG•Ch_÷¿œŽÖo§pK¥<(ITº?ÐçÍ"=LJO(;PC¬ë¬(Û|C'ð”¯#ík‹-¢æ¿V³É¿-›=y>œfÁ’uò'Ôg^GíÑÎòÓE endstream endobj 91 0 obj << /Length 996 /Filter /FlateDecode >> stream xÚÕWÛnÛF}÷WðÑ* ÷½$Oqj».œÆI„ A[”µ’ó¢’”»è¿w–KJ”,ê–´@a\‘3gÏýÓ#Þÿ¯½Ôóñ/Ð_*é)€Ï…â^n¼‰÷áÌGCß»>»ž ®¨ö4hA…7œxJ ˆ'Å™7{¿S ÐëÂ?ûþãe¯O¹Ç›»›ÞßWDµ@8§ ©Â)*X›å¤]OdÒé7(}°@9°òinÆfÒë ß?/Ê|q_ºñ_v2Ð]è@8Aõ!--ÈfY?Tï+ËÀk½¿ŠL<.è$Ï7Š’pjÜpf±ɡrï×þ}Â@hÕF¶3Ê6ð`ÃÃ=«OQZ¯â×"z6¯{}©ð‡s œô îw&®™ÏMîq”šÊZ!C%¶À¸­yI”ZÙ(ÒÁô˦¼ƒiýþiÕ7€b‹Ójùú¢°©è u¦ãâtZ¿,’Q³sY­²‘…¬ìu‚Ó#¨Ò@‚Ï:¹Ž¢ò¸^ ÷F°-ÕÁæÛƒÍw[lÙÕ«¤D®Bœ$L P§T–'aY™I4`äE2¤3ôo³q”Ní~Ò“8:‡eËÌ¿Áqˆ¸ÈPñ“ZïumN¢¸æ)Aúºƒ§ÜÊK½ÏÖyNâ,l*ÑGSìØË=Úü)Ë£ç,-ÃØ¡å¦–j”6’‹A’8÷ NäjeD€"´“ü—o"ÿÙäetu®Ý¯Œø ïȳ[“NËÙé~?*²Ø”µH~÷‘. 3Æq.>6Z£¡@ëS ˜eù2ë’9nQe)òfþÿ…÷­y4ñéí¿b¼ê ²É¤0»JðUßeETb”Ö æé…í\’shHŽýšîêÆÖÖ·{3rZSö£É£GÓ!­­œ59Ÿ„Oõ!hšÄ k‡ÑSc\ÂH}ßî~æ®Õ ”:ä¼°¥; {ðVPÉFØ©Æõz,Ž›Eƒ”G5y”‘›¢K¾–Qb¾–/0w×8ëd—³*^íci>‡Q²<~±IpóØ”a¬Çñ(¼øewS©Qï8•÷ÿdj˜2«£‘¥ýg“gëoGq†ìW«ªÀ¤FÕ1 á>ÞŠèz6€^vYqÖô†ËDGñ×›:Ç\ ›ÒÕN&[ÀÖ3æóÍݧUHêDnïárêY†ÞÆÌ1ˆÐ´°YÎþvÆ7ïÞ\_¾^»nÜ! vΊ)9L¨FïÓEnÜÍ“{Õ³a=ÎŒ»ƒ®]‰iT_A«ù¶ÜTÂHÝXMqŸGóÒ­tï…õrxöM4¬ endstream endobj 94 0 obj << /Length 3412 /Filter /FlateDecode >> stream xÚ­Z[“Û¶~÷¯ÐìCCu,^’§­»Þn&N{›i¦í8EIl(‘!)¯·¿¾çR¤LÉk7ãñ<œûwö÷™šmàÿíl?“ðÏÆ¡°2ŒÂYd¬&ˆÌ¬ÎfëÙOÏ$L”³Ûg¹öõKÍb:˜Ý¯gÖÆ7³0ðEdüÙýjöOOóß÷õK&ê@Š Ò° Íyñ·ë×÷7oæ m¥§Å|aéý|÷ú-S^þè^½àŸ×oæFz?Þ¾¹~õêæÍ[\¿?ÔɉÚHÚp¶ðµˆáýê¼ÍØFj¯-Ýù†Ÿ-dl»ã­ëlÅ“FkëHÄ2î&=äEÁ+Òê8T^”ï^ßÜ2á!o·Lû‰ ±¸ôl*!¥™-”±µ¼æõfn½$ß?¾#å5,«Cãµ[7Ø%{X¯J6ÈÒÖeÍ´~VZîQ`ïçÊzYÝä¥ûh}ا Ú]Ž÷maJòæÕ`°ÊÚ$/q"mPó@Ú ÆÚò¯ y±«öê’†4èE™NŠ×¸mÀgÿX- q«{‰_=\MiE Ýœ]¹ÊPzAì-çZz‡–ׯ²‚v H[m¶wÛ–Çíéí*kÒ:¯XJ ‹fq¢£¶Ž–ÿ6 nÉb_1)ßóoÂ?m¶«Ê:©ùq—íÊnÌÇ]Ï5è)«çÖz_ úê3D¿ÍA$~¨½´Îò?ôñ¤Hkª,Í“‚ª¤nû‡|¶>„¡÷y=¾ôá¥lÅcÉ9“5øJÌïРŒÓPþS’È€ââÐÊ*«“ÎFiî&Õhä¨l«°m˜Ã'fþaÂ|Œ0`rN$Zh¡4ë£tšCOsÊ¿¬m„oýÔ—U‰(Vco.xƒíç^Õç¼bø‰7„rè áÑÜI—LËÝÞ»¤ªH)øzÏÑ[» ¬¶Ëòâi‹Œ?KªÉhXyÚ››o¼‡mžny¸ÏH40"{…ßU^gi‹GÃ'`"_»1…jØÙùËÄF¯ÊâkYÚÔÉYÕÆk¶å¡XñfD›36¡t ´‰>"•PÖ‚×f±ÁÚ½×* #ýüֹġ­­Ë_¸Dm œ"Q[3s@âl²ìŸ™Y˜”&¨W’cd ÇŠ6KÙbëïI‰dï2Kµ‡z?ÅQ qÈïÕýÃß¿ÿ~Ê&|È}0S˜"¸ú¹@ô úD¼M h«l‘PµYaâ“z_æÀo åèL˜ƒþCÃmR“8ÁÎ…Qÿ”;ô÷gzcEF³yUîj9Ã…1ãÈ3µ~`]ú¼¼?½¼#ƒsí’ö9/„àÁ9“|ÀÇã]u ­%Žá#©k q¹s®"osØeû–_S„„ß„'ô¤MŽxâ}ÿÌ“öÉÎ-NÒ½š¿í–>Ö#PÒò¨NrNܶæ0èÔ —ò?8ñTÀNMïoWΧÂTaÜ;æ1H0ën sÀ‡¤\axT`È3”7ŠÞ†NœušÁqÀæ°l²ß,ÔÀŽÄÜ𔇹‚XÿÆ`ã}˜L '?‚$0å ¾¾ì«@]íú‚cALŽôÀU¡tPÞž3ò3 ïÆêê’/…m:ñÔ.ß¡µ)}‚Î@ +tÙX;•Æ~oJHÄHç@§ä7œºŸ+¨âùUQnà¤Æ½_æ åvà™)¥E˜Ž)ÉdØf.æÑvgâaËvÐv˜¢ñ„Ñ)f6: fï–‡5`í ¢WR‰àìÅ“™V•$£@ö©`r9V=ýÄXW†¾o~] 1M #@y8ˆ¿4UÁ:{ÃäNóD-™æ‚ •7L$V7Sê[NZ&)¸Jd 0-KDž‘‰X…Hã H4Œ@Hêß±z©6d@®;± WJÅÖEƒ¼¥Ç€*]ävO()TØçG–kß^ªê1)ãûì¹S¹ Ž)ƒ$ûfˆ ì ßÉ–…Ò☞›v….8;$T‰}R¦H`Q¥Y½Ë÷Tôqô $¤M;ï©bt:p1E>òÆ”°%aE‡aÔ“|FžËúcí\Èûù ŠøœÄìWÂOÿd¶v“Gg­)Á„\Þâ ¤*†[$ÄHvA¢6†Y[PKÁ)žˆãæÐT¾ÔÂÉí´ì’ªT\öckX$!Ô<ÍÙX„ǶŠÃüPŠ(Çgø+·LÚñ½Q>³o”öÒ¢$˜€Ä³‘9¡ £>ã` À” q—mÒt„pà´`(ú͘c¾o{ Ú)w¯®ooØ¡ì·VŸ‰æá8šÍ Oi¹bmûiaæ3é„Ñ•PðGžäîý*<¤)UäøÀE öå~ñ߬.û¹ÜšÔØ Ën“Ï0˜ñ|Íåø•g6Œ…oÃc{ÅBì”Àû @7ÀgÍShãÀácO x**¡hïp|ü+ÇÐ{™oµ+÷ÝÜ0àØ5¢b¦pçŽ[ ¤[$žñ°‡|uŒw®ôÚfùfÛŽã\çˆ]GÛà]°ë&AºMÙ™ˆßñ^÷óHzeIwU^dðÉ]55æ)FŸdÓ‹nC(t\‘¦l‡¿V¿mU×ù† ïóªY„Bg§Ê7ÎÆ9î ½X¤ë"Ù4T,EFÅŒ’ûØ¿maëÖ=Ö˼å5NÛu{ÐbAü%o„Éw¯àËë¹{·7“=®—(ÊtQt¢)B¹{ñ‚_ÆÀ2"½ÑÞÍ?î^â«ÐkÁºÑy~.ùûçñžOúî•Ö«a!Gß8(òß°¢ÃV¤’P³,%+ºÛQF y ¡G­ßé¸q4²OÀR˜¹¯H9AšCRpKQyTGÓhé(iYá¹'kO®×Ð:¹‚j(sWpüÒýÍŒ’C[ÊS·Ì^b¸IÝwE™¸ò7¹½cqH]:Äx¼ØsnÛ+ &nû´v®mß·¹¶íÏuí·8@LS'uï5V© ò ›ÔƵŒñ÷¨D|ÂŒ¿îñ=ÚERÜ7$#ãs¯À\òõ#êã\ðÁ& "MˆRטÊðÆ³‘K+H]åíÁ©“/º §áù¨œW—Âpª¼ýjJY\‚Ó-Uë²Éª<,ûÔÒ—ÿÃä·,Ê%I`Gÿ>ÉNOÅYƒt4„Y(ûwÀÂ; N¢­·Oáýpˆ÷;¤ßw‡Máÿ«*_çY±r¾þðhnßömjêýó„ÉÍ™¼ )'™ücú˜'L^üÚm; ÷âø€WB=†oú!+&ÔåÇUù¥('_e{Ö²òcñª*ËêÊ==êcÈ>…]¨“8WGEÀ¡¾»”űf42z‰7n«‰z Êßï#33±³o¡Ž †­UCÝC·Oâ¶iÊ;Ÿš‰”Xœ¹i_èÓë"ä¿*›&_R²öîn«CÔÀ!Ã!Z%ãÞä{žœ¸ß.ÕÃ@s›pò¥Çl1•sëâZ rÐÄÍfA1<Õa††½ç)«|2ø¶ðÁ¯Fš>†‚o;~èVæ¼Ùnžf¶ÊŸf¶Áh¶×]~è“Jß>¤J|4î‚ûƒgK¡cÓXňùQà0"‰Oµ¤:ö7:7¿P<Ç…©Aol¢“§e@ñ´“×éãÂúx³w¼š¥.jÚF¢pµ'<,¦÷ÐÛŸI~8H‹PÚq£»yÔ‰_2ú$¼xo©±duwÿª¹•„W Y}¦•¤ðï|ýy²Ž£©ž·0J7D'ÍãC÷‡5ÿAºl%‘ŠÙH"¬Ð2ÌwH¢~ƒ4ëu¤-3B78¬ê¬¡«ŸHŸ½D˜BpCÇÄîÒ¥ž®ÒÃ?f™O¾B$ìšØ’ëLD«XHÛwûîþ—×7ïî~¸Ÿ¾ùVÂF'òäF¼ŽÌ…úaô9ƒo…xé“"^uo°AîZó#öèé·aú¾t„U†ÚÙsZ£{ŒøôF¶ÿã´cC„¬º‡øÅá›ûgÿÞVPx endstream endobj 98 0 obj << /Length 684 /Filter /FlateDecode >> stream xÚµVmoÚ0þίp™*AÕ;±ó²®•º “¦² M›Z„2bÀI˜ÚiÓþûœ8“†nCL|ñŸ»{îræÀ`.¿}$?Ôs EŽë—Pˆˆí ˜w $ è7^žéz¶iƒÑ ¸ÄǶ K,0 À]Ë„&lÔF­›Û÷ݶaR)©åz8hGo:=ìj „˜Ð1]é"?Ìfãtß*#ÑAŒÅÀ&ÔsØ M—뀵 ¡Ö«$ x W™‰b` =JkMø*éd?š¹iA+k¥u ¡Ï£{D‘ÉŒrÁóé¹§ _ä'±I!•l:„¨ãggJ¥5…xPç%:Î l9È*íðSP[io¯ûÝ\kQèÚT9.ЦüRè9.жyx¡|œXg £y ¥¥Pìß,Øô놎uÈ¢4E&e¸´=¯‘£Ñ©œÐRç3ùpÂ#žNc± ¶Ûwh¬1¹Ëi,"ö§[œæ:ò¿,‹VIcµ&©/Šz ?4·Ø5AÛOƒÎºDI'—j5Ž/ñçì¥z8MÔ:ãKù!kžï!£æsµ&{j]ìß®X´uzœ*×v’‰ò ]ì°~©-Ÿ/ÒŠî[$*“ç¡qõ)á?˜öü9{®ÒQÜCçÍ2Nj[Ï­çÁú×3Íè;{ÇŠªça=•{)›êO T8Òi,] íu@Ï¥"¼_;wpåÂÆ–*«`É[¡`³ÇçkÁÔ5oB"G…‘ìÆü Ì6‹žÉD? ”P6K&dzR©VÊ öWÿº£ÆoôöM endstream endobj 101 0 obj << /Length 742 /Filter /FlateDecode >> stream xÚU[oÚ0~çW¸L“’Š;‰sY×I]¬“ªví¥«ª ±Ö&Ì1tÓºÿ>'vÀdÀè„‚/çœÏŸÏÍß3ù @ü‘8„…Q"Ÿ@ä‘8Sð©…¤"ƒÖûQ«ÛLja¸Mñ ïù <ùMÀ­…#ûnô±ÛwcCÑ  "WÂT:çήG½¡í¸Y.´ ëóÅõÚé_iѹ®‡¶¬«Áðìò²7¼)ñW¤v’€ÉÔ©8Øw!Ñ\_±lü°˜PÛ ²ÞbÂr˜¾+ Æ0&ÁVÕ%›ÝòÏPw=c¥Í2±BÔöc²/ˆ R*U“„ÏÆ5§ ¯,±K ‘>t0 k×+‘B4`©ì%:®”ì…ЗAÜ ðËØ\\ž z•Ô#0 ˆ:Ø×Wã0Æ6Ë:•@]üƒ|!N»PîzXûL;­km\{Ç­ÏS:þ¶òàâ‘f¢€úòõ =ÄQ“Sh¢t†OØÔÖã=˘¸ÊùÃd½]zþÝÎß Ã6XÊyÎïé&Ö8íE–|}ÐÙ%r5"á:EÊâh¯±O#]&–šªÑÛÇ/ØÇ¯HfôZ¼.êž²š³ m¹hwvø¥Áب•—†ýjN³:&’“æ2͹špšL4‡LOž8´Ss^R.ôb1Ÿ$¢vzª')+DÎjS&Òú‚|KnÅ;¸ú«Â,: 6ㇼ ð_Xë<õ_”§Gå”i®r7—Nkd-¾ÓÌÚÜȬu??ïÌêñNqW§<í;¥Ñ(«j+evËÎ*Óšå¶D¸ŒèHÚwþ껺µŠ Éì-·\eU™èßMã "ÓUÆ©Xp#8è fò{ã­m¼þØ ïË¢õ0Œt“í³Ù‚Óúa'²axX>è¬Lþrožæ"Ÿñdž²±Úɨ‰5³‰•f»ÄZ–kzÐ#ßµþ1M#º endstream endobj 104 0 obj << /Length 3432 /Filter /FlateDecode >> stream xÚ­Z[ã¶~ϯ0òR¹X³"EŠbû”¶›t‹¶I›E‚")[žÖ–IÞÍüûžeÉÖÌìÅ` êâå\¿sè_Vzuÿ߬šU .xåR_øUaJm^ØUW­ö«~‘ÂÀtõÍ|ûÅï¾6aTÈM¾z»_Ai§W>ÏTa³ÕÛÝê§Ä(£Ö—§ÉŸ¾ý×ëõÆ8hñã«ïÞ¬ÿóö¯¿ûZ“I¬5Ê›– ïuÀ1㢰b¾ÒZç ŽÞÄá›Ì¨`íeQ¿Þè4M“¿ÔýÐv +¥«.T(ôÛï¾_ol–&CWnß÷Ò~¨ aBò óµÝó³løYËûê´½ƒ/ÊA¨ýHª˜ÒWÜ-‡Èyé_ÎU³…!™Îhjzžª®ê¶éñÝ$êíw=”k“&ÖÚ%òÑ¡Úqchåù =Û®¢YxèÕÉ~¶9=žÄ¤žO3!Oþ½ÖÎzÆž"ÙÆ!êjm\ò‘ßJîeî3üfí\Òs×È9ìýXLÖ:]’\̵\&;{¨Ê]Õ-iJªR¢¢lÛã±lvÈñÜ&m‡RÓ¼ÜíEªŠÔÄO›údæ7™ ZÇAr¢Û¹4Ì•Ûø¡®€19*ÞSûÞhçT3ÏŽy¬š3Z ¨ÚUC,fÃQ2cIB™É’òt:ÔÛ(T €¢ìÛîØKw¶ÅÀŽÌš¤–dÞ?´çÃÑá¬UCíœD ¤C » ê$Rú‡êp`R¿íêÓÀdT:¤‘Ò!á"q ¢â¢¨—vðqM Æ›HãIøEf£)Òâ3)š‰ø ³¥µçÙÞÒ”¾¤m‹[»•˜ÍU|”X}|w>íÊ¡Â]ÿœºþõ‚Ø‚Q®Èǯ^êëúþÜU¼ºÇd nr£-xëæ§>°uš”Ÿån×KK šx¿hÑd_â"Ÿñ¥i‡º¹¿Ül–øþH;*‘ìvA†c ´m`Š88$Õ‘„êQöLìÎ y˜ HÇ„Çò‘‡—‡¾eÒÏij`¥} ÈyÜ~FðÞ*cF?&pÚŸ ù›&oÖÌÜ%iíã©úý,dMB×Ì È´ƒL¢å‡¶Þ±÷˜ïŒioþþÕ7¯‰«:óÊBHÞhåc¤ý-õ8|±šk «b¦1¤Ï°…ø2ðìÛ‡’¼Õ*wÊ»Œç¶Ës y^ñÇJ)n<ÁÃM‘©¬OëÀnésb^–'hó%ê—É+RgŠÆ}å²ÿõÊåsêêfØ?#N—*ÖO IË‘”…LèªÑäg¦~sèÈÒPÞ¸÷JÜûÁ‰çS%SÍ]rë¿\ÔZàE!r契N³àJ”ÑÀ[þT¼ÛÄÕnu¾}w_=ëø ZÙQÿÑ-¬‹ÂË3»Î‚|¡“cdVwÒF¢öC™lć?c³#®Ê¬—ZI ÜÎb7Ðabøõ–IME¨Èˆ…/÷]µè•FuU> êSì7Ë5ÿƒ!Á6•Z;mž’Ç­ÕG ^²z?·ú‹9þAbœµ Ênp¥l:Aë…ç×Èû˜3Rï? ¤óm6òW8 ÝnÏ+:Gпï+Á»ÚN¤..³ÑÀ~]‚ºÊ^R¢L/•dqA@qŽ)à—¢ÛÏomÿØv¢ñ» ŽpxÒ%À±P t(¦Ó!0Ë#m Û]u‚Œ£Úù}wfg‰hÆ3ƒv “æS¿œæ1íÈ“»ŠŸçžüm꒻ǑÒ! Ù€çIj»•Ñ‚bz~# Ïûú"-¦ìÁY,B%<¯ Ï»ö<\yxš¾ê%ø3NNΩ–l0½5¾ Æ÷gK ,ÝùPÉ{œ³Þh/›¥ØÊÕ|eTä]³»eeÓ¬dµÙõñ=ƒ²NBêÚ“µÍæ ¦7óp¯¯†ü´qé˱›i„•çá4r;næúÔ2´9<ÆÖ¶ºZyœÂBäñgìáùõÄÂóÅñu3nRQä–ì ÑpÿüƲ6¦ƒáiÊ.غÌÈ&¤"›Vòcº[ꦺöŒ°šf8aM ‚ÝT;3FY [S§Çi;ž¬…‰—’ªBùt„U_~ürA#µW!Ëâ˜WK³€¾ŽPãËaiàš5Ù¿-`Â\þ²™ÓË›¹b?¸Í 2ŒµS!Ù„d£¿²©!YöOL*ù}*"÷LýAR½’¼G‘=%ŸÀk´Ý—eå¡yáN÷2—Ûn¹ðá‹p™fQäó"Ê2²ù I‚ñ;Ø_æ$©w‹<ƒ@1O%ºçéuM,×£i`/Àœ Ø4A|Y—©(ŸÄF¾Û<Éñ¾ÂªÝ€2άcgÖ’ÄPöüNPÞI¸j‰ÀjŸëç-Çh•åcŽ3õû¼Xó Á>™'Ýç¡…«Æ0- 0js?qöKÒ5*wös´ä­”ÈTê±:U‘(Ê«\…FDl¨êA ¢–ЄSÙ÷„!f_ͬHÇS\‡oKÏÕÌß|Ë „Öý"ËñCóÉ@ ¶6£•º§0œf’yeFKæ…-vkÐy(‰Æ´WÚV2 »ÜädYK®Çz£1#¯Òe&‰3µ:ØÈ '— @’¼©:1öÍ$Ncù¹=´òå;ªåâgÝ«ÇsÈô%§3°YÀ­ãÉwü*gÅ1„,MÄFØša<ü¶[®cÞºÔ®:Te}ê>‚DàÿEGæåƒ\ÙB|âßdOó¢Ñ§àû¹ìMn§‰.r%§¢2v\Lß"«°II/ŽDÁ4ù¦ïzr*ÇN¼gÀ¸À•¨EΈñÖ"GÓ%¿Ö½Ô¨¡GnšŒX ÔnRŸÇ]½£ÉŸ+SeJç£é?X«&•öªàó©UZ“`+–c-&ƒ€–»O+À^íÿ¦¬cœr&|^1BUÜçsŸŸ{ùfS+YÁCW¦ÿŸÕbD£Ï‰=à?c¯XŽ~lᮚB<Â=A´ªÜ2 sér…{î‹+}z®BÌÕ¹1MÙdÞÊRÛê$ûg°H±pbVÌy¶CC¯g¤ÁeÉ ¨(äî¸É®3×ï+CË­}–1s‚f^*^Œ•Û×® Í›\3¶¸ún°¢Ôºåöd/·Ì5)$H—ë‘ú¸„$¬Ò†ÖÑ2ìu¸R1Úé¼5Añº-Ë`Q,cì…O©‚a—á'”Œn4ñqq€øëØäª´úóñ¶&5½#§Rc‡)‚Á¢ôžIäÌP*ö~\)Õ• ƒ¥C¯®t±SOsŽõ‚ɬ\f‚¹ ` Y¾Ñ{ß´ä¨ÒéÉŠ¤9ïh%hÓŒð¤ Ù±ÚÕˆB;çv ؤnOá©Ò«ì³œX6µ®¡q' QÔ=lSTÄâêY²£;ùQÆR☖åE„ ð ŽY؈|±1Þð½ŸèµþöË÷ÿ©a7–õ>þfÞÇ( s3¢–ÄnŸ]˜éIxÇxé!( ×ùãatexy> stream xÚ­Wmo›0þž_áåS²ÇŒ¡['eUÛuRÔ®ö¥«*HƒJ #Ъj÷ßg°ãͪ*ŠìœÍ½Ä¡ jS`›"Ó²Mø` ~»ˆÀÑàÛ|09Ä6p cé˜/1 i˜€Z´MÌ=p1ÒÑørþcr¨;ÒEÝBвu¦¦¸³ÿ}z:?8k:A#Ž5b¡Ñ¯ãÓs.9<Gû|9=›htrt6ÍÎÎsý•S]+s@öT+=ÐRÌݘ䚥@Ö!|,äC‡X@’O=o¬YÜ(NW~Âk÷ÆçÛ4ëJÜÅ"[g¡›ú^y#uCXèׄ ÐrlÙtî’-[žHOj-Ž6©› áJ”‘r%[ã߈ ~éx6=:(®QfÁÀ> stream xÚÍZYsÜÆ~÷¯ØòKÀ”vŒ™Áé7Y%9LÙ²#ÓIœ£,vÈEŒÖV ýëÓ×àX‚”œ§”ŠÂ`ÎFO_wï/½¹ƒ¿¯7Í&„qžª8L³t“E± £$‹6ÛÜnþôYÃÍן}uóÙoL¾ÉUž˜dss»Ér¥c½I«²Ènnö›¿Fuµ“0xõÝ»×W[C‹/¿¿¾úçÍ¿x£³Ù&QdTj28‚×kœ3zù æ‹·~õÖ•Gïñ¡­ö¸ËÆä*Ë`P«ÔÓ÷{ˆUž¦›Ywu|,êº-ÿÆáÕ6 ÃàúÛ—_¿¦Ù:Ô*Ñùûdó}^ðÚ¾úÕ½¸ ;ê•ïÞjkU¼ÙX^} K¬I‚öäºbp=¾Å»ÒqðŸ¢ê.d`88î臢ÙÝžYpHGZŹõì>ò ²b­Â$òÓ_ñþuµ¥ÏÝšÐ'´Êã„'íº¢Ê"·ç¦ª¶6D±§¼t§‡‡C1¶7ŠÎÜjoùytÇÖïWÑô8(ê+0 ¡óáð5Ì©(7A%O쬱iƒ¡å®¢‘)Çâ΄êЦÁõí*Ç"`ö,XHÆLKC•Ä£Ì,©td–Ð{nŠ]혖‘¶š¿‚)–ïOb¦86ÌèÜpîš~dÐÀ8M<oüæ›*UùøYо¾å½Ú3­³TEY²$úTôkÇ‚è&&úØ©™²iUÓ®ØÃ¡QÎ7eAÁ¯® Þtµç^º)Ù»¾ìªÓÐvWQˆl‰ò E¨Y!j_HÈ'^`–ÄžH M±/„Úwu»ƒay­ãÆÈ>ÙhAÀñÜlo;ç¸UI,ìzWßò[!½}{”y Ù(®¸7Q»Ô¼›«, Ú˽=½Øf <ÕUY¡ù`¡ÂsïÖÉ€ìOW ¬ÃmŸ3V¥ù(ù_®ÚîË BKÁ¿,L_Õˆ¹œÉ£5×!ø¨À«H‰“à–5&á g×ÜDÙÀ9,/=ê èÅÛvµ(3/Ö¤ðÜÔ•·&˜i²LØ ác~%‰ŠGŸQ~aXZ L<£®Eâ93ir8gߺÞÛôT™0Z’Ý´"ïUS àˆÞ«ÒAœ¹zýêºöÿH]FA»T˜eQ°;¿Qub~z©9oª†ÀÁ†Ç÷Lž›™ž¼ýñÛ¯^¿{æî“\Ùl´ó“ÅL$"@óÜœ;2™ Çøtµ·ÙZ[emºÔtxi„­¤µl-m4Þ¹åÍph~?4Ûs7Æj(aü@ ¦°ÈÀàÑïs&G Ò­¨xäÞu•ë—æY"¸ã©v½à/T\ž.8LGsÛhëÿY‹›U4‹š•UZ67q"ôŒ-@àryÉâÂu¬Ò“¨(—ø¾\(“ Šö¤x4²_!Ù9Ÿ[ E±kñ«½ÖlÜ~*«ôYDÓ:™_!wð"ñ^pö}5xhð{þùúû¸U¶[\‚H‚7kÒ ¨3š‡uÅ~ÿ¾¬ÛÞ½÷(êÉÕã¢h>åOÈÃÝÒC9ÆÊ˜ ,ÇÐBØw ×b6cx¦î$˜Óf Þ0Pàñ–`PÃÝrIØì\sÈ3 üƒ^ ˜Á‘´Êg–³ûÀF+×M48œ‹øâ¨GÐþ‡1)·zR\q(Ë™D&ñ[9þÖ þo ®«O“„òdãíj\ϦԒÖºƒ{Ý4ö»ŽÕUs÷Qù|Y×(Az”%3—na³Äc!wµòÚŸËÒõ2 ö6m³EG"Û5kßíºnŒ^1wÓ»aé]ÈiêÏC0ZúÉèƒû0xÙ³W+ø¨§w¿œ]S:!à^Âg$3Rú± ~e&ÙØLŠEý,¸UÝN%Ü}ËOrƸ®qNpò Cw®¡ìÏp àS ¶½ïÉ”á KŸÍ91÷4z´ Ü>u-àà¡AV²{o½r&&ç? $À“ušÀ hª~Àip gX1gñR7.çÆÞ ¬GЖÓ{(ÉÁ:M³ô—(¬?ð2ó)èRL&zh,|ɞ眊üþàd ùFc¦‰³=V=ÚÜ„£ðám[ù ÚÇ™ lcËrªÌêß Ë ¦qý|’ؼvtJê œç: -(€^ÒþsÓJ¸ˆæá~Š<ÙÑq’ç^­¢½‰´û¶‰S€/Ьâa؉ØTíÉp„h¿–‡ÅÐ%®•Y|•P³´Ód‘vú°•pÞÛ¹/W˜°ùŒÙ÷E×ènVÓÇ™ 'À{î«âî“óAs¤1ù¾T“» Q¾p‘,7{26G;ÇOp 4"œÃ®šŒ1¶vµgy.’u ¨çep÷Õªš!:¦K+r¾ƒ…˜Y°‰^» É”9ƒO@ ‚ë~ùbu° dIΠMÎÁ$HGêþ#Ö t¦‹lO/AZ»r)i ¸{4øý°Gòø.l¬²d•ôg‡È)L<³?ŸN€˜µð¾{˜pvv)}lDÃdô^”â"œéJ0O~îCÕµ ç­°““»]…ÙotQi¼9ƒŸu¼G¿è%¾»¸‚!°Z4Î`öê»åx5‡‡¨VDÚ ¬¡Â°yσCWœND4¾ñ¦»~¨Ì”Õr®ÞX½8‘°Ý5ÙšËù;Çï˜4#962\€î4ž 'ˆxƒUz@úëì$†~``{ /c‰fp—ÑïˆÎ$8èŸÂ\6R¹Žg˜Ëæú#~` á51qHT}çI®¢0Î ŸOдí”fŽ·è¨pPJØ F‘ïó£ñ™·x…¤mŒÒÞò“óeÜòÚÇÜÖ¡ÀÌ‹ZpZzÊ@B-Cç¦BK¡ñöÞ šß­R@RŽÙ(ÂÎiÐ!Aô˜HPµÀˆž»Gl-AkÅŒö¸½€ß$±@Äzøó¸*òM±3ûª?=cÎ3­ôhÍo»Ü¥„*åB—Oà$„‹Ðøs` “ð7\@F•&GJ–ƒÁ™@è%³bÆzvUò‘™»ª0Qq6ú¿Wׯåƒô|F€áëUv“¨<µ!•f«øJBhW6Šà,P•i^±²D`€ÿ‡Ív+›EʤOm¶ð*ÖÎw+Ûš°Î'¡É¾ñSAÖ~â„b¼ûú+v¢žýq4Ë:òû±¹l=&NÝR`>DÓËàQQÐGвUe!«M©SM€—PüñX`Vãth{øëx‚äã#0än(Iñ6µŒ3h—wäÞòл·ð±_[+«(LfØøø¦.Öt%³™M^¹;—èßœûhÙD|ûÔ’‰¼0cféQÁ, •5Ñ#FzþúÓßLw·{F‡)u8«û²BgŠ¥iÀŒ:Ÿ¥n,æ¨O®¬V3½Q>‡˜ŸŸ>_+ø†*7ÓÚ½ì:F/ø‘ æhùÂl¨=¸ ¥L’si¤ç  1 ©:yÁf_šÍËÄôÎ{š”m8ö0ó¡Ae™£4;øžiŠ“hvÕ? Ðé¥Á¿îê³ëÇ/âm“Y½K?™N~R¢HØ¿`8N+}-ù±ÿ_“ÑXÙÈÌdôŒ:ÀÇ4Ìg¸ÐèD$6^ïUÓW{™ˆþnàæ}ÅÑ„,V…ñ…)a\DF½?׳Î]9xÿýÞ†]Ûœ)¤Óš}|6ÌÏŽèlèá`€í‡ß­m¤ëÕ÷?>cWÍ£´O{<1Âù;´çbÆc¾¶“ÔiõïĦç¡…¨°*9æÂ¡`w±_e5é%åC’ýrâ–#MnеaJEã‚’ï5EL5tmí÷«zÙ°XñÀÉX~wuõ«ÿ |3§â±µî)³üÓ¼`úê»·¯~|÷îõÛW?­yÊT…é˜x¸ %= Áù^\Ì<†\­Gå* ó…ÃnJŠàˇ÷²>—Þ—_‰LF1öå̦2°µÎÂPöâWSÛí‡êÔogD¬ ÆŽ°$ pÁ~[W$©Xí…³Ë᪔¢:1¼ì±©“Pï²´-’\¥fŽùäìÇÜG¶ÀJKQª“ñ¯2ÿÐòoh¿òÚÓ4d‰?—ÇÏMcÇÌËq¼è¹~²çn²˜ž?',¬ãßW¬f¾•déG±N6O¹?“LUl.įÂFÍfl†JÇ£RzŒÞWïuÍxªL.ÀŽñR=Ó ~ƒ8ôÐéBÅG&Ä£41—B¹“ÓWÐ…[º:?Ë /¸%ÅœèÒÇÉðø#\Þ´«h_\°†· n‘g7±ÂY2UÐëEs¿/ÖipÍ?%¤œ´àœÆÂp¥Ÿ¨ÃÃÈõSóþ=ç—}ÂY6›bN›ó‡îUyà&Iâj©D2áÒ6ê‚“ñy*²—ÌÊ!ø+$·ˆU ü G¿Ê9͆SX 1Ir*„®ÂŸù>VwiîÄ(`qùyé‹*‡Î¥à‡/åórÐ ‘ÍT' æ<¡ŒûüŽ+*è1J¦ðâ~Må@¹`–½À˜b>¡É`ä¦"Äçê"ƒ»™¬ðâ®c.¼ÜìÕ[±ÔUõ¥M-õ¬‰šä§ÿ»µÃë›Ïþ žDi endstream endobj 113 0 obj << /Length 3294 /Filter /FlateDecode >> stream xÚ¥YY“ÛÆ~ׯ`ô¦D˜‡SyPIQ*Ži+ާ\Xp¸„E4¯¶âü÷ô5Èe»Rª3=WO_÷ü°ŠWwð÷zU¯"øgó4´Qš¥«ÌØ02IfV­[íV{c´zýä7Ož¿Š³Uæ‰JV7»•Õ¡Ñf•&:ÌŒ^ÝlWÿ ”ZÿûæÏÏ_©|ƨ’(L2ÓÏ—zñîæåûõFÙ(Pázc“(øû›w¸åÕ[éú’Þ½_›(xûúý‹¯¾zùþÎ?nêÚ/l`¾ÓßÁFå¡ÍÞGU÷8 ØÄq˜[+ÍÇïþRܪmÕ¾l´Þ$Q¼ùêÅë—ÄÇ:´©1aj ù-õØ0OÓÕ¬¹ªŸ]޶y˜¦É•ÁÙ|p3ô2ºëۡ왆͕Íá;ÜÜ¡xà %q¨sûK6„Ãx8YL<mU˜Ë@DóêS:ÌãsáL'Ñ6Ì9‰^^Ušûøw¼”‰IQ6~v¹ç‹k8¿èü&Z×m=M·™ñ‹Xå83©^Š®™ïþ¿g–uaëqdÂ$Ê@]à3YæUu7´ÎÛqúÅz£àfEÁý¨†»ªcqç6§¶)]×Uõ·Âµ¶E_5uÇßß7Uí¶L÷Íë÷®]´uØõ¸¾Jtûv­¢`Ø­• v®Å£‚´Mœ˜ŽÎlà°ëGü¯8 Eï:n®ŽG·­àûðÀ E½•ž¾[ {†zI Pô|Œ]Ó–NŽÇabi2’ÇŽ‹zÛàA˜‹öP±.\Zl³0Ÿ|**<1ÝšŠB£´ç¡{èBV€8ÉCƒÆ«Ðæ¹X7ìÅXË›5ÖÀfa/ŸŠãéวZÇ0ùÛG>¸}¶’à~Ï7G,MËÝuÓsƒ?möy.»Sõ ܤf²,(h,.xAØ(š„Ê‚Ÿ°b½$ £Ã潺7· mü¨s»ÆÝè8t U5ذ·´•Žá„·ˆKˆc³uÌYI×ý¾*÷KÍ4øÊÌoÜÄÒMªP)ãyȺŠNL9B{!Htšn‹±ÕªàÍnaY“„I®fÕVMG¢9ÀAŠC× [à†SÑöUqàÒ2PmI5sÖ°NL›OÒ0Wçï¾:ÀT*QÁ­ã_{9ÀD·üý-l ) ²ízWlŸá—Åí`÷©:¹8þ"»‚_0ˆ<ÏfÑtÅ©Üï¶N»€–ú(Ó6 áÖí+ôÈÄæ ] ‚—9 ß[ô}QîaÜҚ͒ND¡2ñç/'Ñéñ½Yg¡Š•Xu&x ”Ô$ø¶CGÂBï˜%€–D‘§úg5RGf®FçxFgd®Ü@êÀ$…÷}Ñ3KÕÉ\å]ý%jËM¨t~.®§÷WM½i—%šÆÉè.û§×$:ºT !ÊÑce´Ü³Œ"Uã!±UtËhÕÀK62¢º¹êr#€|8ÜÒ™úKx±)Éká$(ø4ùµ9æ¸â×Ò4L£l~2^‚µ)¸äÓÐ3M[EÂÕ}Õ ÍÉJEa”Ù_¦Ç6Q¿FQây&?TÈ”ˆ.Óc8¤Vô:“Í’DZ §ÿü?`[N ÜçÖ9¡O š[ŒK*ÕA×·OûD¦Ê1 šœ¶µÍ][ñ°–mð[ÖK¢3Ó˨À0‚œ4QKÎ_‡Z§¿<°â0Bãßv¨Åó$àyŒ9Ç_³Ý(C®~ÄPü“3a? ۆݦñ¦EbUæn{&Εü³™*-×pÚœ8w­b²IüeEWñ,dà£r—åÐKãˆIÁ•bx‡Ö åGRRšó¸RÈû©,¶E_0ÕïÛf¸Ûûéï ”™&ŸmG>%¬EÐJƒ7b,M½¸vç~\]R4NÇ`“bÞëZ½Ø’ 2ä^‚\Øx¬Å +ÃE»Ž±yñ˜Çf¨Ù3¾m±s͉A"93"iÁóL"& Ž"_whðæïù ¬·dêÍsõvi'0ó¶;WÒ[Þà›’á@¯'3…ýP¸0±¢ª:Nfðšß<Ë¡!èݺ#ìz³m+ÖSÔššY@z…‘ _}U=Q7Ï¢vÐ2cBÕ~ì¸Ã³²¡öBØÒìü$¾aJ¹'ÒÖ(•jÚmU³†D0G[ÔvóxÔCH€¾ÆTO8Êf8ª(‰Owk‚OˆIB€}jy/+•F1ØfêJd1aç3÷^ìv`ÁŸqî‰ Skf—fTN ƒ0‡ÜL R–êóàŒ€°èhÛÛ ¤Ò>ðgÛô’ÌQ'ê1\&G©šg××>À%ƒYß9ˆ•Õ·ë“ÚIø«lÚÖ•=ãºP„•œÇ !;‘‚Ì»ªßtÅJî‰}°¢w ²ÃÁW¤xÊñÁºŒ‰ƒ;úU2¶ð͈¿œDôxC‘BOÁÍ,‡ÀaÚÛ‚hn["H•ø&“$âiàø‘° muoîˆÚ«mÜì¥ýØt=Sk«fX44D¥­lYi<47ñ¢CQOÚØÓñÃPõÒ]º¶/*a¸ß{Ö²9ôbíY,x(‡ò0¥!À yš¤AZûâÙæzY ‡"aЀjO ùôh”wË€V:qÏYÔKÕ¨ª&¨rMQš ²ôS\ˆƒDÝ1“ ¨ÊÿvÓðºêö¥àµG&Éä‚áwGȦ\,×òXxâ1½/:&ètƒê±[Žæõü|p=º3ˆ£l8šÇ‘w¼0®uÝpè—UBJ7Û¢¾;Œ…­SCÖã°z;Öu˜‰º¡áŽ ÁVì6ÛáxzLÊë}³ŽÉ! ÞIù~•ÂzÈ<ôÜË@j×6GfdEáªÔ>MÕºÝp`.T–kê Гh´Ï+¶W¼q–‡I2K_7Ö&X©d¥D#‹»+:nÃ院5˜ä ¹Iª$?W[˜nLsT>U*ìð‚˜å“Õç­ã†ŽŠ\Ø"š¦|D…&±í Kx„AÊâ/ÙÖ·AD‘vF‚é´G¤I™“Œ"á2Öðo±´øh*¡bþݱÁ¨¥Ag΋¦kké" ;ŸT ‡lfgc‚†šR ¤ú†oe•N¾KD‹[ ý¤jÚXÑ@m`B€°âõ±C æp}FwmóÄ2è£yƒ%Gt9\[{äŠkŠ·àÞ}9¢6ÎÅϳE9vPæÇ½€|ÚêUšR„ `LäC ‡€…å'ÃÊä¦à÷8퉀ªÜLP·æ²9!×ÃRé4Ü~ïJÓ£eXyÙ,9n,Jƒá_*ÓLBû_gB±‘WÆkˆ ‹ä¤8ÊFãKP³{RQL´ÁsqÊâ„C²öÜ3OÄ…C\ᎯgXzÜj¸à¡,ÄO›Íh¢±¨Éî˜ês˜â2þ\ž1€¾’ËLјS¨£Ôç×>„#!ÞûJ1!ùŇÊYUKÙ\ÐØ÷^‡œŽóïÂÿ2ä»ÐÐUõG™`̘±}VQŸE/’"ÿvâækï#x§º/¡åñµãó ÿåÙEàr÷Ué~^ãñ±DE‰Ç—@•U[GX’HVmyJ!¶‚Ù|%åŒ8¶én… Üü¢º¾|í4dµã|ŽÉ˜ "d¢]{'§,ÿ:€ñnÞTùës•€e؉‘Óÿ;ºBÆŽJÊ\~7 ;]•øl×k+z‹øà›ÏûiТSãCå™àÄÔ'sØ4I® >î¡L\(DzûÜW*€è\Ï}䵡!š*‹O¿\AAý¹k\Qëu׿ñPVC]ö¯§¼Ú¬d¡¬½ â›Â0ÂòSQ­ºÛ÷à«-µ[æáǤF/‹ü茫-?Ô¥” Я÷] ØOŒõü¥a6a¿Å"¥ ólt¾÷”ª™È.Ö%ñuy*h.×%Õ‹1¬J’‡Öî ‚ÓC]äß2ð°Šès3hÚduz~ܩܜzæ\p׳РXa ©èÍ^8¤|<Ëå‹TÃ…êyùâǻϦeÀùSÙT Йâ÷f&¥æ£®¼]ó³Ø9£¯õgÓ ½ [¯óÓ—7Oþy¾d: endstream endobj 117 0 obj << /Length 3141 /Filter /FlateDecode >> stream xÚYëÛÆÿî¿Bð‡–*¬5÷ÁWpv¯Hm¾4(âÂàQ«cŠTH*¥éÿÞyìR$rÒâpØáìkvw¿ý¸’«{øµªW!üEY"¢0I“Uj"š85«Ö®v«¿? a`¸zõä‹Û'Ï_ªl•‰,Vñêv·J3!#¹Jb-R£W·ÛÕ÷Z¬7Q/¿}ýåíÍ›×ëŠÂà«›wo×™ ^¬¥”Áí—aö‹×_1ñö›o_mn^¿[ÿëö¯Ï_Êt´1J$*!xc±®µ ëx‘_e£2¥1¯UÖ=.6RŠ,Š˜Ýï[Ûí›jû!ï?l^¿£p½‰Ã0¸ùÛ‹W_Ói2at3Eb OüõD"KÒÕˆ]ÖÏæ³£L$I|er2žÜœzž BH²QJ ™8™ÝQþM]J‹LN³mNw•å%ð,ŸûóXpw9ayøÿt?úöÂÿgD!ê×_¯í ëšÖMÝõ «Á±ž]„š/;œuö2­íOíè96£ñŸ»ËaQ¨‘˳Âk“Æ[ýg¢f3”**Ò«–"MyÂËòþÔZVg%ÒÏÖз^—¸ŠmyÈïÝØ¼ç¶ß;_R?­UäÕÉ.ª<È;ˆ¡Àh/ÚÛ༠ÔAÙck`™ŠùZb'È–Ÿ×q»pÌifü€½myì›¶CSÁ~äQ™ƒêJTß3 U|͒ƇBÇ™_ý#ú»Ç"¨ž-™½¯[»{OC!gš‚¶®U€ãÜ2Eª²ào‰Y£+BÔ*|³[ÔàL&»hÎæÏWd¤³Á&Ñåá6íœÀ|*0^\uSo~±-Êš&—ØFgTèl ÇÁÙáÒÏ<ì7oß1Û€Ž?ýmÁŒ Ëj0= ‡’‘ÐfЗ6Œ° jۃݖP#1n­ePñûÚ²âÁe¿ŸN·mÛ´Ll×yEGc¢]'âÝî)ŠhøNµ;UHƒ[Ç…³E½Ül,Aa¹ï¡-çf¿W*aª;MçÆÀ­Jðíí’ËŸ/ 7K²@ ûS¦èmQñª@’ÏÀá:é] ‡áAUš 'mƒB6ƒP–“WÃ?œºž)ÔÜÅcI—àÅ¢ ä¹fÍq†X0x RüÅ–a$¯öa [[Y-4/Â;}fx%$õt)Uz*v±/«mK$`Üì±uÀ½Á;ê]KCö%ñÊêûŠïÇ7¤÷qHBþu}~]»¦ªÒÚíïpãß”‡’R·p3Çýºéïð½)é°š#Äu^‡zœÂp*ój3‚Ò-ÂßHQ4%¬ ãÑ-ÇMÇè›N6ÁoBªHäÜÀínX$üJDÈÄÍó7Ltƒ4% JðõÒŽÞÅÒ©•8’T%V—¾²f\†$›’{²\£á–‚DŒˆÎ<Ë¥ÝýRv“¹mU09'|ˆ,É£epS3ËÇ,À#ÞÝp¹Å¤Ç ç¦[B »òp¤t&D›3ì踫n˜ÀÚ‡ý2É'"ËâSÿœÃ*K4l›óˆ—Øn¢\v8·k À.¯;XéÀH™ÑdúÛSá@uÝ0Ócbäê=?asÇ¢7 œm 6F.³C¢Ù]s6„méQÅ‚ã1ZÄÙ`îv»OËX‹0̦aš€l둺ÂõÌÏù{Ðzä5G§Ã@bòN;La eCåÐX2 §Nä ú»°¶ò5Pá Õ¯”Òì'›¶=3ÂN~wét‘ô¤?-3ñ®\LÇÑäbÑ\©0pÁBi0ÖÞíÎ=s%)JaÁáP¬Ç#¢<8êŒÈ…¨Q5G\Ü}6¼;†E?o‹SOé ã+V>/¸p°Ç™ní§²?^S~Êo †OpâUdƒA(b˜!,G€ÓxÍÓ£pÊú }í©âaøày&`Ä ôæšo¡‚¿îH3gyÚ >ŸMô}•“(,iŠP95’b:äûMæêª& —I5×U5¶8ü¤XÃ;~·-Ò»áhïg™G%]%L¤¥&ŒG!>\H4a4Êè\)ĸÔ)[KE¦‡tøéñ鼃­“øq¾è6î<¶©º9±>ªÄTÑåÀ½:¾L ÔøœyA:™-Ÿþ´_”.FééFÎd”YOŠP?|âi5ÅT¥gΔÌuô´ðÉÙK8yZ-“lmî8hˆ/¯¿î㛈êßx%È»ÁÑ>¾W3Ɉ2Êÿwq*ÑѡŊ¶u$zÙ!šÆÑoŸ1H|ú­¥zÈZÑ)?ãÀƸî%…¬kó¶*)Qt1Rú ­DbRúwð}œÝ()ü¨[Àó°û~ù—á¯oŸüéuÑ endstream endobj 120 0 obj << /Length 2873 /Filter /FlateDecode >> stream xÚ¥kÛ¸ñûþ #Eqr±V$QÏ\[àšKÒ—ì^²)P$AÊ•èµ.²è“äìm‹ûï)ɲ¼yAÖÃáCÎ ç¥_þâþ?[Ô þEYâF^’&‹4Œ\/ŒÓpѨÅzñó™„ÞâÙÙß®Î>õÓEæfq/®Ö‹H¸¡I,Ü4‹«bñÖ Âåû«<|d# öÜ8 `¢yü÷.¯ž¼Z®‚Èsw¹ŠbÏùçóË׌yza¦óÏå«eè9Ï^ýðâÅ“W¯qÿþP“­,§•Ü, ™ß¾UÍ2ŠäÆÎ“OK?rTs·ªÔéÊ­B(s$#jµ "ç–qz§Ù•ºæ¹²5¤E¡Šs€ÃÔ!òñžs„sÂW¾ïfQÄ')ëN5ë¥ï92¦A7U´ §ÓŒºV<–…Üuª`ä» H š¿èkßnÊ|ø\Ö 4rWÕÝÜ®U®ñÆ(Ú}½•µ¼QòºR.“,aˆ/ÉxÁÕ2õ²Ã#j[t›Ò@»FÃ[°&*ë¼ÚÊIþiËí®RÄle¹ŽWÈN^ËU*3wQì´np+Dã5é÷ºí™wLœò¦ÜmÁ´^óÄ¡†æô²!€Hü ¯’à Ëú%é Öd™óUK3ÊlÏà»%è6pÎn¹„ÙOÌ"Ìœv§òRV¬’\ŠÑ·eCÊXiž†Ý·Œ[ë†%IýÑè¬çlcfKÆz1kàŽaºD£o– ÌN!.B<9èG².ØTÝñàv#»¹Kâ& ð;>Ù;Ï p9]a¸Š±Âþ}ž²@¢LâñkÄáp>¡1â/ñý­Su[’Y¯Dš:ÿZú (½g~'¸ƒ¢“6ÇÁŒå‹Ú‰ ÎŒ,¬fÌÁÂîn§ŽÖÀ[2³¤Sù(šQâƒBëJ‚®+F ‚±›jyò¶¬*†`óš!¹ïôˆrY¡ö µ[Í1Ü)‰¶•ú`ü+i;Œ›NÖ Ñø!0î¶ì6 ÕšZÉCxg7ÜÎòßš×¾u—SïPžp.«ýMI·„[w—*/x̦# 4X*a›}^ÿÑÜ+¹ÝX òUj;Ùt¬¿È);FVZ­Ñ$JGX“F`g‰ƒ²žÌÒÎ3÷®ÊëF6æÉÈFI×ÓxÁd9X$B×Sq]áúË•ïyžóš}+­ç#0¬~“ÖéN"&l@È Ì ~h s»K‹Ï­‚wUêéJ¥Y±Þ×9ࣃø<Äé`Ê5q=‘0×?˜@±\Åp‰?·]QjwóW+¢@¸™?Kù©ÜµñÏ<õCÂEàH´›Ø„àO„7ZáÉÏàÆö2<º5ØB­Ë “Ò"ÿ0;®|áÆYv‚—I”ÖÞòzÍÁÚ™Á®ù÷NïÍäã&éýLänWÁ{çðõ™Õ(¦t¼øáhEt”ÇÌÙo¡÷àq? ?¸QÍ;/òøäHnþ…)nƒÿ÷ˆŸe£º}S·$Ò8r“H°rÅý²ÖßóÍÒÌãðð¿Ÿx#±ëùÁ8šӂjrs4€=%%½!F˜½O¢¥g„{*cx4MÈÈ^vâ©úø‰`5âb^äNæ!­¹?ªŠLPpnÚŽm§v Q®›¯q¼•ÑÇ›E’*y‡Æ‹ Æ˜,‹1|-„úu*ÎÚ$6‹lìÊâGÄ£ãÅßJë*‡ù˜òb@‚³® Ù<2ñ ¦íÜS!–¥^»l;#B]OR•µ®*Mq—C‰¹ƒð7ñ{`AáȂ̅ɊŒ9¾óüä¾R!a+&RU(’‘c Eê´½¯ ž¹VŒƒ·¶ú„'”ÕžJ”0 MêTüŒ˜Ò›Ù±€ðÞîóœ2}áŸrÀÖº^ýG5šG†b;¤¶ÄJ<ßyÞ™MÌ‘¦U‰f“·u˜ˆ ½ð¡['1­:37Ib+÷>±¯b >t½à[åg!®§™Óõ6Š3Ò€uTÕ,ýÔ¹Ùo!e~4'rX“%iÊ£pÀ92"åŒÈRáFö€/ßüôÓŒŒ(ú–hÛBJ%©–¤]›FÞ1#3Ç ™HÜ68ð7 }ý ø§ö+µrœ hÉ}7JÓE”d®ˆÒoPÓ¬€Ž¯n4H¡?þÜécWd½Pe*r¿>xrׇªä)ªebväÚ’Ôͼxò¦zãP0¡i«’c¾€jKï»Ý¾ã9mpe (²BSi 3DÀÃÛ2„µãl]¢WG… (¯ïø—7 × \q§ë‚ü¢àN!#~=ù(¹ûßx;k㢉¼¾×£ÚnÅjƒyÛc×'“3ÚÆÜ|!ÊÚ® 3F³%$i»fŸƒ‹ÃjëT¨êefpÝ»rVtt¨h,<à?ÅÀ¦ÒÞã¹4÷/Û/N…c7ñ’/NY£qÊú#_AÙTÔPpæ‘}y‡ôn>g=`vQ+›}‘ÉšÜîœ! ÄÊ’YÓ6tŸåø5)(„y(eÍÞÛ²¹ù€ê4GÕÜoß3â/ü3“_šíž¿øðüåå›+ø{5d™ÊúÁ6žÏ>,¼xsu¼îþ`’ìÎÞã÷ïÇùÙèaLOt"¦‰õUTÁ±ôS7èIŽÎ{bßL¸!vãÆø·ÀËÜÉ{ÚʼÑð’Ðïû)“¸NãW YݘK¸¢l!Ê7¦Œ›Åžž×»gNY T‘~4=Èaœ¹•Œ›1ì.”lï R󯽼ú üÊûiœ1ל àØÎ£œ«¬°•Úð TPªÂ¦—ƃ tëåè6Kä=šzG“œ–ÃŒqÒ©y󈢣2’ð1U-·†Š»£é»f|åÄ†ÞЂÂlöjäËr[¨`ƒNß( ­¦Ýo˜Û5z5WÛ`kO.Lù!¨ÇLF‰ÅN¬•*®¡ÆÁ¾L$LŽ „­Þ*lï˜õ²e4+¨)AðKìFÍ(’îC¦ÌTyuÃÝŽ0eåagÖ+€º£–"àPÉŒêìʱðZ³CËSa3{ÃN‚ÃpöMp@Í˲5tT8!Yß¡E´i/š 3Çzô$öƒQË[“}*ð¾U-Z!*‡„'ôlSÔô&quØfØ·ªÂâ×ck\‘‰,ã¶”ÕIdj¸Q2ÞíÕeƒ×ýª¼ó%‘¾Nô≩£ÏpëFa¯GÜŒ#'£ÇÜ|êèûÂ1 n6£ë$ÛŸÇ-U1þpÈ|#ñSˆjèSøb‰Ý$žãf.1Æ ¹OyS²UzŽ·ÊfýZß±ï;õ5Ƚ…äÑŒ{ž<ü7IîÉÕÙ¯g>}Vô!È^áBÄÂõ‘oÏÞ¾÷L?ȺÓÅ-‘nàöÒ  jñúìç™Ïaº"ða+lb˜rî»û @_@±<°+˜DÉ·ë8+îËmµY`cMñ 1`TŸe¥ÃtÜ[æ|×Û$›é8ÙLÂÃs&œú¨ãQ•#‹â¾òÙs£°¥IM„QqN^2GY¸^è.á§û¥9¯ð ù3:4Ýé?rº„ C«ªvC†Ws‘ÉõYŸËÚ·@Ðç¢sBgÔ˜óN»Ï¤-;$ØèãáƒùϽÁÿ±Z÷©ó­žÍ.é­¹ÕV’°¢5)ûЄ6Í“ý×9» ÖüvëJÞ´§¥‰fyùüâ°9Õ FâÚ:×àñ©ƒanÓȺÅ"X~nꪬ:½"ÀÈÑ~,³ ì\Øÿš— endstream endobj 123 0 obj << /Length 2374 /Filter /FlateDecode >> stream xÚ­\[W7~çWì£ÝsPu_©onB(- mOÛ—8)-`jL/ÿ¾³¶w‘°,iµsrr Dì7—ï›É»ûWŪÏð÷¸z¨(üQ¶&ŠÖ¦®ŒT„JmdµœWŸªï(,¤ÕñÁ×Óƒ/ßq[Yb5×ÕôSe,aŠUµÄHQM?V?8d|¨4½»:{3=9?rEGoO./Æ–&cÆØhúæ›Í'go7ß\œ^žœ]Ž~ûå;f)9©¹#6ªYÓ™µïëÑô௶vŽUŒKR^i¦‰U²º¹?øùWZ}„ÿü¶¢DXSý³^z_ È7iuW]|º…¯ÖÆ.Ë©í5Ö¡ó|b‚’ZÃ¥ Fo{?»Y.Ö¾y¶s ±–kFhÍ^áÎg·Ÿw‘…QDêbdî" a•¯oïwA%ÄZ¹^¨ŒŠrbÍK¢v1%…lác.~ûc~³ ÐLÀ"¥[–ý>{Úsõßã|×J—挄&Ì'=Œ’Êrˆ®”¡-%•Õ„ ¾‰ÂÉû]×™D0¾^Èaá€1©‰ ìæÙÅÕ4[kÒÔ' ØÚ’zÇÕ³é~íÆ7¨=õáñyµ!ÚíÃj¿1ÜJÐ3`‹ZqP«©ÛJþÅ~Ö÷·&@YC‰H Ê ‘­3( 9,Ä ¬‡™ ,lKYvz}ô&ÂÚ²‡Yë¿°öï1S#(¨‹åæß‹O9lFÈ}Çf×°XCAÈBÛP|̇Õßó›.® .N åã¾4²J²õ–«ÞÞѨWCw E½5'Œç4X(8CQ¯‡™P/l«^ßÕÉåwñ–E8,^×o9ëofËå쿈^²ÝéÕµ%ª×áqïôêbÞÏžþ   ¶ªD´\¬½C«Ò0J£hUSÂtN§……Bk­º˜çWÓ°X ìµBÁÒ×J¼ò5:Å7¬TÏÙçUæt8<Á<]áL3¶¯1ÂJØqœî" X•Ó]`¡d8ÝÅÃLtض»ø°‰Ù°,ÄaÒºÀ.iˆC„äwlv-‹6›ái蚇™pÛáÐÅÝÓo2ÔÛ;úù Nt¢^V©œ~ ¥Âé7.f²ß à¶ýÆ÷5>E8,^ÏÝWÇ7‡a‹Í×_(åw󈆇3 “°k_TÂÃSÑIØÅLÌ‹¨ÛyÑ-×oßÈäËA{ §ûÂ%M¥õ Åé¾f¢û"À¶Ý×…}{~õõéQD¿e! Øó÷es÷qñü[T£iîDêÚðÜw¯ÓÛ¢y©iˆ‡Á];A©3¸ •T(Üõ0ÜE€m¹ëÂn¸‹‚f¯çqú\1ÉêáùïHíší<Ã3Ñus9ŸÝí™-‘Xq@¹\~ZÑ7ú»–VC%Š‚ió{9Ý*‹"`2!àᨭ~]Ô·ñѱ0¾añzÞî´žœ£EŒtw‚u͉ vpä;½º‰Iq8èvPt1‹¥Ú?ð­ C«ÒÀFXdtÛf¡(ÝÖÃLíô0p·;=75*Æ8¨Wßag¯—ꪉnUê±gVLïsú[ o͉±(­FBM—&£Õ4 µAa¯ ™dïpØ–¼.lƬXä0=—3“¼F`@Çk׸X÷ž‹¶ûxÉiw;,z¸ÅGýƒ°¦Ä œ¤%Q<§Ášãt 3©aÜVÄ.nj`, qXÀž¿» ¨ô¼ƒŽ]£:žNÈ.f|ŒÄ@ÝÌ‘h¹Š{‡> biÀdœF %*çƒfÎ`.bRÂÃQ[;¨ûÌš;%-(g–pø‰ z9L/#U£,¥áªáF8¿h<Ý,çó‡HÑèmb€ý®Ñ±_Ô„rœ&)ÑLeÐ&Qøïb&€€Û*ÀÅ}sþþâôèÇË‚æ£ç±CÈ›Åý#fÑ#´CHw׫\KŠÏÝû[ 1‡8×…ÄvÚ9s¬38ÇvdüÔu{lç¢^N?œœGø[ß0]o_NížVËèc )îˆë˜póûl¹¹ÍÈcL6k{›`-„1”[ã$tÛšæ”Þæ$ŠSz]ÌdéEÀmK¯‹›dnYŒÃÌõv*o’»‰î¸ë$oÆÔÜÛžy)#Lã”Üæ1¦îÂ:+qJ® ™(¹¨mÉõÇ^ËÂæ­ ëÜ}?ûÛÕ"$¸#mÈñJ(b  ç’¶·=»¤¶¥â …Íf°¶Yh-JÅõ1ã´Å€ÝÒö•«¾è™kaƒÔõ ¯×OïïèôIý´ŸÕ hY½—½´Žðº¿E^×5á ¥ {$Ø·§ym E¥{˜©Iw;I¼ò5Z Cfµç¯{×c¼$c¤¹#oÐw¼é)¸¿AîjE¸Å©ÉvGFfpW[B@ᮋùᇦj¶lSovÖ¯üŒó¶,¼aÞz¾ÎgÿYÞ®æyÜEHsÇÝ ÿ}¹ÛÛ wðIrî*Ø ñœº«jÂ8ʇ¸>fbž@€mç ¶y5Çéä§Ëb&°ç°sËÐíÓã]ìF!ŒDwìuˆ}ăòö#ófqåŠ(&P@¹!ŠrÔ q%kbxöóþýcªdD”§B„„ý`Ód¤"¬Æi2.fr@BÀm$7­Ô² ‡•êyì~ì’”*Bª;©ºVD¥:<æT]̸T@[©º û¤šÞ£÷}@ªÜ)pzª„²œž 9Ãé©f¢§"À¶=Õ…=¾žœ^Åf²‡…êùûÒR7»õÙÝsl(DÈu§U?-pÏ ú[`0«‰¬qš ‡(ëœf ¹Æi6.f²Ù à¶ÍÆÅMR¸,Æa {;½&ÃÙî8쇠”ý- p˜Bá8U˜Z¨Éà0,§ {˜‰*ŒÛVavzôáâüt2ñ¸,Îa{è/¥øz¬a{þøtò°š/w³UŒÎ‰ïèìt½kAeÑ2#ÐÛ´0¯}^x罂Ò¼lÞh*^ƒàèö¡éØÐѬ»5ˆöÕøP0:š,ÇÌŒ>?ßÏÛg›×o÷[wß¼}ñ)÷Õ’ÿá$Ï+ endstream endobj 126 0 obj << /Length 2516 /Filter /FlateDecode >> stream xÚ½Ymoܸþî_!h¡-"Fõš¢|iœKÇ>ÇW È†¬åîêN+)¢Ö>ãÐÿÞ©•vµk;u‹Àሢ8Ùá3/ûÍò¬%ü}°*Ë…a³Ð“ØJ‚¹A”V+¬…õÓ‰ ]ëÃÉ×'oμÄJYù‘u½°BÎXqÄYpëzn}±ýhöõúoÎüt°Ð\%>l£Ö¼ûñôòúýÕÌñC×öÙÌ #×þçÇËÏ4sv¡_½£áòj¸öŇ«Óóó÷WŸqÿ^(3‚dÁ€!~Çbßr¸ÏÒ ¶¿¸^<úxç8Hq#ã¿fžçÚõfæðÈ·åªÞ”s¢ëv.Z"³væ%ör³U'iê¾èVD•ú­ Ç¢j6’Ü®o”X9žÇÒ0$–¿ŠwñƒDuýVv¯é©[‰Š¨zÓ©]}«>Ø[“U3/´èA ý{×f¤J#ð$} ?õàŒzlºbC%ÁJçöîgÞÒæÙº)Åkmõ¡>=?e±›ë’äÝ/nèŸGߌlà˜F’­2IòÃ)‰XÔeYÏüô]-iJŠoQåzA½ŸXîí߉ Zñ–zÚ¡ðO3'r]û®h$QÎJ” ‘Û“ÔÑøÉ[Z˜µKCjw@ÒéR,4ÕÕÚMëa¤ûbŽ^†ËV¢X®ô'ù*«*QªÏœÉïV¢on;©Ð§D5*iAÔ«b-Å«)äyhUmOìóªKÑNJ€Jûo¾(ö;wÚã;·0f|Ö“ö6^©Odon³jþšžm½&ªÉòßÀ$û~¡Íò*¯«;ÑÊ¢®Ž0[”ÙRv.¼ô—/4ïM•w°A]àâªÖ^]âUÖésÑ*¹¨ÛuöØM *rºÚQ„Öc#Úч»äÃ&0C #Çõ ÍÀ‚Ó“,0Œ ïð?ˆ ûP˜rFžAÂy½¹-Ŷß4LC}Ø»qÏ·›¶v´Ò”yÑŽžïŠy‰Û˜JaIbE#ro3r™ÁÌûU‘ëUEGcn–çYY>>=æ¦>ß(QC–Æ1ÈÉb“'üeè(ƒùwÀÇÀb;vƒÀ™ögÔÇNÉY”¦Ø}0¢ø©7ªnÙcûà1’á6o_Ù›åì'#ƒö`Ž>ÐÇ-˜œ{˜–MhŽ4:˜†ØrG[ôWN³2¹‘`Áâêspý<“!ÏBÛäo=c×ìB£§®Ä5áñî‹ûõ¯$¼r~ïQ ƒ£ªM<š1 Yò§ì²#¢gDô\E^Šé&‹Â`ú˜$Ù}‹—Êh¥3’G÷*yO¾‚ÑÐ §å}ö ÃŽÜä¹óá͈ôÍHŽºÆ‘›ÑŠnÓV[—w÷1ñÕ¿§ð©1ÞœA¤(ˇY"^a‚9£€ ¼Èîîïjzh ‘ I4FW‹ª,4Rª¤3ðâìÙÑ܇7³L ‘=2o‹†vòSø¸šÓÊaa‘Ë‘ÝC)èÅçðí}›5rŒÉøÖó­ïå,´³¼¹Î•ë¥Àçîkt½åOqÙÿåÿ>ÔÎ0½ߊÿ ¯oÆQEóE5Œn釓¢±¨¯^Oª ÊcÜ­0N“Ñ·Rª>Hl7Ú5·;9» “¯?žß|úùü‡÷WÛ»øuƒ)¤ÜÞ¹×S¡i»îð…¤Ëjî ËÂ0žà{ µ‰b–ºa_b×-£aåmM¤ÉI€$ÜÐ+éQmÖ·”sYN³$ŠwŠ,ãÈ¥0n*ìÄÙŒãjªm3…Pòò$†äOL·ŸüDm«7ÈÜw}µ•g€ãìÓ>OȶYêx ž^È’ óÄrèH?Ê÷UâŽjðËA O`g51pŠÒ~¤TÁ…„|X“«ñ€¹±¿_.I¡}ÔJóö]±ß'\<`ß7y8ãºÿ¢Kƒ…¥¢¡€ó'…'˜’X&Þ¼!âÌu“ñ†x»É¼áxoò¼¾:ýôùìâêü˜O„ ‹“—ðmz ¾Ó¦TÖËrS9F°#ßSeËã&Ó¤~ø AŒÀÝ^ÂD°U[=n¢àiL4äyy}qyôÆ&,Iý±y|€` o±½Û—À¹¾/ÈêãeÎ:ó1Eh'p™»[±í–é&lESBP˜ïUÿ4”uý›³i4ˆgÜ/lt´_Äè0z> stream xÚÍÙrÛÈñÝ_RUpK€p ޏò ò2eKŠMå(Û¥!‰]àâÄÝÍ¿§{z†I@V”‡M©TÓè¹zúîæÏš­-áÿVhü±(0™„zÌ´¿|CÀõû›wÆôòÓäëì¯gvØ»Æó3pB ‚npÍŽ,Íð\˜÷}Í€1ògïY?l~ZIY,²%­½Ë6µ˜¶#·Éb/ëÄ ÖþæÍº]šêæ’F+‰CŽ^¯âЧGg ¡®JË„bnÖËý2`Cä ¦y¾Tãš‚üÚ‰aG>IÅŽ˜^”‡é÷„mkN§íqßL°"©«ÞëÛ ÖL-EñÒ¹p™Íô-ÝX.Ù¬8!þ>½þ$yæF&cÁòm6kPÕ&+ Ttæé÷«,YX·›MY5øáê‹¶HpM¥Y½‰›dÊê;Ž~$”­äÛÓŒ!¹ ýïZ‰ª$¥‹ÍŠ#±‰ï/¶ëÊšß‚õò%¯hèæ¨z9ÞЃvtËKšz_Mþ±â@*³‹€ê&®ššàvsŠÎÐ׳†ë²üIÎ-½Ä4¤Y΢¬¶øé‚u0BPhël^ŸÁe¬¿çÐ]•+¨m;¦o{J։Ì0Ü9]x†ÚRIñø $:$ ¥O´ÁaËö‰þQ<×µ@½Sò¬P¸;T7^Õ¤µˆ)Ú|¹EŽ—=4¼ OIÆxÞ€ ÑGã6éÀ B $• GxIÅižž'‘ÔíMw> 13pÀîØ4béŽkFön رãúú'åú"ß´ÜPRïÓ"¡"=Yè$¼×ó=-g0ŽˆqGpVŽheG÷T?!¢¿ä€}gm]~)/ï¼ B¹é윬ëGâUÄÏ٬↠4SJCgíÑQíC0F)y>ØKÛ”9x8q…!a ßb¡¢Ñd mªrЗ-«8—±¶”QXØr»1%¿|éxåÐ"Óñƒ.ñHh[ ’ç2ƒíP—É@Ræäš‘PDHW3ÀW$,4#7êç2 $Wsé²ñcÕÄ“ºâ‚²­ £ h,gÔv–ßò‡¦Š“æ‹Å,ø·è R¹;þÓŒ½&©9¶gv´ÏÈ^d\/åuReD€ê{‘«Ÿ¯ó²nhVØ&jSMŸ™ÜM~€]Ü;´óÎúú*ž8Ê›FÝ^V5!¾8@èÙ‚0[ ó C (êV¡V*òãÎfbëå1÷UÖ ¸Ý½ºãFý×c¦çÁËÉ@±¬­[Rc\Ìã:ãÈœA-FdRn&‹l [œÐ‹ªÌ#²ÔÜ,ÏÖqE@ð++Tj)5S±ÐgºùŒP~&È`f ùšJÁ¿ëB5N‡?¯–2Ø72=ë”ÐìÅkSÓW×|·»&ìŸv6áÁzÁK쮈«å-Šã8ƒðUì4àÂúóWÚ÷~bõôÃíôòúfv;ýpþî-Ú->ÉŠMۜȜLêtd÷ÕÍlh{Ù6OÛ/o¿œõ6¯ùâ¹[›róÌ÷YÚ¬F÷úî]ñl¹z.ÉÉ*. ¾îíW‡¿TS<~–ò¾k_iUË„¤R’_ÿ…J»=šŽŒPsìÈtGcŒ,Ðñ¢NiI­œŽs@=U§ôN70=(ù9pdoðº»#n{.äÄ ߯£™ºÐ÷ÛWWÿ¤sæåþd¤ho>ˆ¬LX!Qê>ÊFÐ,Å—™!¶ w;í,ï>;_ñR¾Õa&s"’ºý Õ}©uö ߣ”ü°øƒ¾ø£ôqÅ9 ÔÛ£ÔÆRÖbêïO){¥Éªæëß™RÒ¾MU¼i«bÏ ôÒ¿Q‹§[_O{wÙêëðúžCØA’ òµûŽøy~˜õ_þ¦Ë«èJl”ŒçìéŽ÷I¹Ä.£ã˜rº"áøf&qÒQ}2þNöB $ªñÙê­“±@{qy{=½¢Õ¿Ñ@ØÙÇóËOW?œ~#T Î_Þ|xõöc§>ýŒé|oé7bôP©š®ïw¥–«J­4ÍŠ%屿—™ívÃëѺÊUY…ùo¨z7áF‚rŽ©EVçô)š°¡Óï@`g êË×ojì7á4»V»R¡Önèqš©<ÕøA4èS!¸†‚ÆÀ¦VµÀ2 NhUЇâÅž-çxÕIJƒt(õ‚†Ìù1bï²”«áà>Fɺ,j¹lG_ʱAR¨ÊV¼…Ìo }õ½è·ˆkêƒJDž“uÅ ˜õq a×™õJØ~jØeefÀvÝ®'µ* ìꄞå­ilÄC¹#Êí{¨¹Œ^27$UC()ó\ZzÔ6‘ ¹¬ð¹. ¥réë¦j•ûÏÌ@çEÏ@uÿž¼Š8çÒÕ‹¸up"éè ¯~RôxpÃ-òäúûö'o*PTÌco2 ÌËGüËQ5øò‘N/JßëœÅ@3%2½®†¬êþ L;mEçkì”ELŽÔå #RˆCinNV*ºàze°Àt\oŸ_#öá`o/:¦Î ôM ̬ ?‰9ÂÁà@êDÝøTv‹žX¬^ɉ½÷P>@÷iªh”{²;lQãgà×Û ­5 i¼ÉõÌ08~+:i0Æè> stream xÚ­YmsÛ¸þž_Áê¦SêÆb¾óÒ~PÇuŸ}¶’»L¯ã¡$HBB‘ AÚQïúß»x£вD÷Æã!»‹Åî³/üj c ÿFfØðçÇ¡åÛa‘ç[¶DžQ`caüô†…¶qñâõäÅËw(2b+œÀ˜, ßµ<×3ÂÀµ"Ï5&sã_¦ ÿ=ùÇËwNÜXè¶DákÞü}|39¿Žß6k8òÛüxys'fÞ]ËŸÞˆÇÍíгÍë‹ÛñÕÕùí£_ Õ~㦄#Åyä:Vìy‚ÿKFÂð­8 ²B%û÷|!+ö£1WÍf˜Òá(°m3ÏÄ3QÏbY­qVZâu²"r!<¹‘¤7B®ÄÑÓœfIšâ¹Ü¿Ïr…åÄ:YÊá¦È™D$[ö籨²YIÔ1(;žSu(Éœ®ò*•ã)î``"U\QuŒ2Ï_mß^ä…xÁß’õ&Å0‡ÔHVög“Wå¦ÕÙÈ®:jêàec‡_?ùOåvƒçXêž UKÏ÷„¡ÚQ‡Ùìñ ë{~ªû|úù~‘ñ³r®!,r‘Εӗ·Ì6à™d ãZôJŠmű ¶mïÜv1Áïç˜Î„jžz–ãÔþÇ,”9Ö.Àv2vSì5¡?túVÛ§"ÏB‚ÿ3]ê-ÈY©4çD<p£³ô¸U¯ß­Ò²¨”~Û ØÚ*ßæjÝ %nÀ®Å+••PòŸÖ _¿žEš,¥«ñá¡Å$#Ên”!’òÐb¸s}1›xuXÿ­ ­6™W6ÃGú-ÿ¼Â–øÞ\êÄ2Pm^ Åí“ "ËzÇLñ$KDvÄBÝöLÑ{C&õgÉS‰ãŸòJ ÖÉViuA2¹r›WE´’’åÙ™„ÔªÔA~«Øpª8£»8@ñY¼‡}Y‹IÝk†uœ™V$-G$ëÏJw`1šåÙ.J\Ð?Ô¡¿k^ÇåÕýäÓÍùýåÕøâüãù1;àóÏ]ŽÓIàíõ‡×ïæy5M÷IOÉðã¤!AV>ƒ¿ÆüôÍÀyÇ/qqúÖ7×W7ïÏ‘Ûg9 ÎßNß~7¹½üñBît…¼¤‡ØWã»î_'ôËéÚ~ÛØ,ôµ¿ÿ¨Å4Í¥Ç]]ÞݼRÌ Ý¤ÉöôíÇï?(Öˇ$­ºyk‘k¶Jн4Ä{Ò‡hÜ…ò£ÐµB§Í/0Ü(4órˆLÀ|ñö8D€FÅœˆy2 ûõ/Cß3)[˜Ÿ+ZŠQ"vSD QÌ‚‡$Ëqˆ/›ÏÅL"]†œæñAmެG.r¸.€¹ë(0'™Â(Ã,|¸ñœ“ÍÌVyÎ൨A¯ÊÈ×Jþ.dí¼ æ¸"<Àȉáäp&×öÌ×r""Oèî™Xl(WI©FrJrácû`3ÏyäsíšY½ð¹è’jºeŠˆÌvž¤ yE…f6IQRñ lŠáò™˜â>›£¹˜ÈDöϦJ9ÅÒ2öüÕqÜUµ†Ã™Ù¨Ë% œÌð9Xè1 Vÿ`Â!ž»<Ùáñ¼À'å–öÿÊYˆ”AŒ”ª¦)T -v5É—Ü®e…Ò»ðX'_Úa³‘Û‘LËkU&ÔÅœ§È›2/¬NÕŠ-7D†` M5-[ù¾™ä6âµÂ¢ë“›“dr€K½r#ٜ̒·‚q÷üýòLæ<9Óø#QD²VåÖIóØA<ý ãÛ yŠÉ£”þ1ÙR=‘‚»Ó çc§‘ÚR«BF’)W­2šM:xEGx©äi½b£´ @š´Âéf—áõç•æ¤±ìfн#iì{[Bí„åª?%_ê˜XGáÕÓ³þlWd&.ð׊z¹ )(¾ç÷'2`uIR°âà ËUrŸ¸¿•qѶ†„'É2¥ZO1Sà¨j²~—.@‡°¦YSIàVùêCž>`úÛJsÀŽš…‹…,ë¨ß?Y €:®£Ž ƒrö û@Z:ê‰Õû:ë¾´Ö;-`?\gï þŽB›µsËñC±uœÉB˜]Í~½íz¤9u 6ÙAÖ ,Ï®1HÚ'„+‚Øj×§,òm-ºuÑ®:ˆ=ƒ;\3²¢(àGu=ÔŽñѡΑ³jla­’¾aÉÔêïáå ¬è=^vwYyýé}ØG’¦Ò½ó²î»Êíf“<ZÕ­ƒFSZg¢‚ZmÙí֛߻¡ôo¨Æ'6T}±þýTÎM­íâjÍšéç³VÑåÇV§ˆ ¦³ßµõ}ËCѳ•s´Ìkôÿ°fs»ZT­ç&VQQt1KbOCÒÐ"ýIH¾þþ»._gØÕ®URü«ÌFÛô“~-(úg#\y±“xP[Ûàìà7±Á4™×εNÊA+\ìyúùäÅÿ¡ö# endstream endobj 136 0 obj << /Length 2536 /Filter /FlateDecode >> stream xÚÅYmoÛÈþž_!äЖ*¬ w¹$w{¸éå’ºÈ9nm÷P4…Áˆ”ÍžDª$ŸïÿÞ™]Š”V²(‡û¾³óòÌ‹þ;á“ø{3©&!ü‹uÊâ0UéDɘ…2QrÒ“ÅäoÏBXNÞ<ûó峯…žh¦‘L.¥ù$M"¦d4¹Ì'ÿ ‹Øt'aðúêìûËÓwgÓ™ˆÃàÕéÅùT‹àå”s\~ÿ~yöŠço¯ÞÌNÏ.¦ÿ¾üë‹×\ ®‘R°T( ‚nи¦' h.žI®˜‚ý³H0-%íiŠnÓTïÃ8œÎ’0 fœ¾0¿Åã&3ΙŽãþk¶}2Sád&"¦¹ÿ¨ð3N²G½0ƒ1Ói «YêxøG3n·ÆÏ›²êèºÅ¦šwe]Ù^ÝPcSµåMUäÔÃÕcŠ"–huü’zÓ­7ólÔÃHµ2ûäð1ÞÇ·]Ö•ó1MáxÉÆ¯×ø¾-gËÕuýá?ÅÜ>Ú[VÎHèŒß†/ŸîeKš²4TÎoßf‡KÚø=1…™ˆo@ªý·(`Js‹y—{ªÓ¥³„ë‘6-¶|zþ»ü=dõü¤çOHŒ$6ñˆ£m r—„t(Är_™£”Iƒ‘â~ ìØ¶iÁá@|Ͳ³z*âàn:‹¸ î üFÁ<«¨‘ïÃPTMw·v¾»_Û¡²k‹å1(úiªÂÀN¬²Ÿ§Üö`ÃvjšªDµ¥fH4ÜЀö^ˆ”Zue‡Œáac+{ì3±6­ÊZ7Öu‚í(Ȫ|x¬Çó<Ö1°É÷à_8fæS!æ,[V7Sµì!ÙSæ#pðM^,ÊÊ^sùÏó®¯NÏ.­.#<÷ÀîÞC䇨ñSäó!P<ú.ý¹ïÁÜêϿ΋¶> èzÓ_ÿ}ƒVÏЩ`é »4bq*%ÍÓ®¥[²j JIÌÒX¥Ô÷^ˆD²óÞò×¢àÐ>#*œXÚeĤ±°‡øc±ª›{3)¹‰/üøåsB"Œ˜ˆÔ˜ÜÓ¯ K_þý p4Jü}€ª³¢ÈO›"B³4Mž@ל y`Y•Ýi?¨ò%IWh¦”z E g‘ŽÇîôìêíÛéLÉÏÒ¼WEÛ5µ_Ê”àOR6dÐúö+ Â;¤_äÂAû£p!ùЏð‡ÀÐÇ6F+ÇLí ‘áê Ãç“ëáÝÕåù²•)[Iª_‘£hŒ@XúÿE†ø1Èð-‡áx`êE†dˆ GK ¯Ë*[.ï§IœPÒygÂ.NÑ%l£Kìõ1"®Yeó¦níDMßmH‰+à]›9ÆE{0š„@“ÀpÕ= Þ¢É(v‰.€øŠý&Š àŽ]K(œ¼iýaâa#‡l9‘j§šEqê ÔNÏÀ6 îlíúbQ òƒÍov“MS~¿ˆìé¶>=2z$‹ýªT ÙmsÓq;ÒÖ€H0§oSF.< ² j8üK¶Z/‹õPÈ -ìœÉg°a±Ä¿¥¡…;Ê.RÁ‡©@ê–ݬ¬ªÜ?NÏ/¶JGÚÂO,3„K4“<ÙÖp$ `½jËêÂ%É5ìåe»Îºù-õJ;z¹›I°—­g†®(f*!Gª¥ÍÖËrž™ã<Üì7(æ/½#ÒòßYø±Ëˆ^Œ&Ú¢£>š8Ší2ÃAÏòܼ A•(ÝÄN9CŸùR°ì™I¼}^´ÄìîQLÐÙÌ–ÿƒ•´0Ϻìd…<(N|ùç–ùbxM$£àÃ= W¯™h6¡lçæ€rûû0#VipQ¾Ûˆ\iÕ&[R{ ¶ˆ×ãËb³\:¬ì²r9P¨qš2)¬c{iÙ»(ç…F3 OŽú±ŸÞ>óq¹®QÞãå:›ÿŒ’êsœGŰqYgùõz¹¹)©¬a¬©ìŒšmæ·YóÄ›ª>½îk%»ªŸF,Ò"‰ønK;–ý°W¯ £œ»BHhnÈ©‰´4Ú ÞY3¿-ì9ÐyÆ"`¶ ÚûÕ‡E®´=|ßoAĽ/²B¸ý^ž'šº›v«µ²z¡Œm¶¶U¡™ßS_>s%)ðQÉNþäLPÅæqøÅ÷ƒy³­Ìœ$ó„9ÒwhXó„ÖÀôîÊî–Z÷Íé<ÊÊwù¼ÎmÒä4H0εS_¼::ìQ±¥r ¬b]ƒ—-3² ­ncÃY·é)ãÎÖe>®uˆnÑ„ˆ’?c®°3™Ánh8­CŠˆbe]*yµy^ÙÓšzu¬:ŠRè½\8òra<4#¡%dH4<½ ªºšýZ45õh§ÜaôqsÖ‚îd~Û;’Þ¡ èA§eéyŠ{¡;ŒLvs¨ãå ð*[;§Ôn U0FœDT¶Ù°p?ëT'}8^@Û˘²£ 4ã1‡\ëCR u{Ù¢5l ~šQÃó›Íª@íò˜œyÉÞæ¾°'L„Â-éjË,,¿ð¸7A›Å6 …T²E‡ÂªÄúEh8ÁcÑD`®–5I0Ih7Xñzëý¡ª)æðÜ%Þ™hh¦¡»=ITð²¥æd7$g<fzNø¨$df¯êý¦åŽb*> stream xÚY{Û¸ÿ?ŸÂPTn×\ñ!QJ¹ ›¦Í]ÒÜöŠ¢W,d›^ëÖ–|’¼[ß!ß½3CR–´²ã‚ )>†3Ãyü†þyÂ'÷ð÷nRLBø¥šE¡Nô$Q Uœ¨Ie&«Éß_„°0œ¼{ñÍí‹ëžLR–Æ"žÜ®&‘dJª‰Ž%K”œÜ.'ÿd8ýÏí_¯oDÚY(âʼn2´æÍ_^º}ûy:Q6EqüðþÓ÷v俣›zc›OŸ§* >¾ûüúÛoß~þé·L [8¸ËáÌŸ<“‚¥JÙóë&kòÅt‡aðXæK¤8ÑœiÉ'3h¼, ‰Y;2Á…ÚUyÑÜí²ÅCvoîŠlk~ £Ð’Ì·~‚öó$b2ŒF(G,Õɤ3ŒÛ®ì¡\§L‚,3ÎYEvþæý‡·4-R–$É%$W;˰Ç-e¥Y"xŸð¯–S;Ò›A±PG´Ÿ(­HöÕQÞÕîêùöØné4ñÊqÁ¥zù»šü¯xi·†ýCqÓìϨÕ#órzq‡ÉRnW_w$®·¡3þ¦,š¼Ø;ڵɪŚõ©sÉâ4*VÕ=u6¦³Ê4ûª8*è»|øpR®¶¾xet¤5Ö¡¾ºÖXní…‹ˆEà’³ŽCƒQ§ †Kޱá·[ 8Ä6Ûõù;e08 ë7yÝЦUÑ2rNhrÁ+oÏ”mõÙÛþÅÆ©^@£¬Lrwû6,É$ –àâ¡(L Ÿ: šueŒY”F¨Ç)Sä¦X¸‰Õ¾X4yYÔösžÕfi»°Ã†É^´rçwÙÑWÈ€y*¦yìƒìÓ:_¬á0΃:ßî6ùêà¾ÈàóâÞ~®ÊÊ]³Ûß;¾Þ™EŽr/l,n%z5†…¤K%ZQüö¯DÜ(eZÇýˆ‹»óbÙ’8ZùbY¸ÔLAâºÀÊû±Å) Š˜âú™þ»Á<Ž˜ŽäÈ 3H†:Mϼϳ£0ʲ÷­1–õWYV)¤à´ïBgX–§YÃÍwåꬲµdò¢¬öœq0“¸k÷<åL$À£Ð,©iÛ7û|³$3À©< î÷[S48"!0VûÚ)OtJZU,ídµ/ ·W‚ngcd Ëë í˜',ÑþZ‘ØVî³êþ±z†þ €Uq.ÿárþ“Y4v³÷’1ªºK•øÚŽÖL‡Ã:’e›M¹Èš®t§Bþ9ÏþJ¶ñò7é¥âž÷”q±rÃq*²¡ÞYþíÚÔ`§BEAó„ÆVâ‡êqœój±_58‹që Úh„ØYQ†À9Ê"$'ò ûbfd­iÇ<ÀìW.æBqäËŽOF¼Ü*œæ(Äl ë‘ôŽd$y&§Ä Óq‹ÛЈ E‡ú*0ïìGÝ”•oÖYã{~è°£ô ÝÊX—œ¹#z¬ý¼Ï‘ŠH#ÂV¡)ê¾ÆKIc0ԼɳMþ Òé¼±mSÚöS•(hQ©Ø*Ç݉žÅtóÓ¾FÞÓä¤2UÈ"z͸@pF“\Ô®'[AòG奚”‡Q›fœú`˜Œ1«ÝнÓ\š0)“~ìÇkYZ0ë-M°Ð‹õ]I—&#O]ÆAar¸ŸÊ—+;ØX_À¡.†«GÃŒ(‚]«¸¤UX0æÖ\á AÑvà&KSR‹™n-Ôb™!Gœñ°U=ÁÆ:P Æ ýuœòŠõíÄ™2u¬)c÷G!´ŸÍšßO# ö{¿s㥠r`4b0åž-iOä$ÈA±E¤ŸÇoHwù0É¥ï9\”¿}VRPò?ƒ¨þP»‹«Á9IÊâXõ9U˜}=ló 3Ž3¥S¸óºNíײ4nÜLEäàyuhû2¿aðÞ-5+\±‚Tsu ð@½ËÅ)¿„‰¼x4UóÒéF\L¤¿º=L–ìÑo Oqü>Ö“_¾¢.–¦Ò²™8.[€2þ›-L41×jI`œ¥T„ãÖt‹BêCݘmGù®n­ÓªÄl$­[uR7­.–Ùs2ŸŠ0Ø;ŠÒ¶»ª\˜Ú©£5 ²zÀhëb(áT®˜D›ïˆ)%‹”c êHÔ!pD9†ÇZ¸¢º¶æ£.äåMVÛºéúL¾CbÐ苚¥Ò9à­-úJéw~qÜ+U#MâP[`» ­ÐøAÁÚm‰Æðh+Bø¦4mV¸u– êÛKí¥Lwº/n¹/nekÛ(üî¤hŠÓc¢[‡ƒpÿšrd{KAœA§2Ù¼Ä ÆÁi ªÛ8ÕýóGíÀºJHt“Ï«¬r®’y× \w·û£í=™y7æââ¸c¤ë¦Ù½º¾~zzb÷Í+«ûãþç4{…¬ã ÀÚ”J„!%Þ Œè#ª¥ù‚‚â“ûª÷s¼Ú)̶>‰T}0¼Zz÷šE»½)«m6v¹qÌÑ&YÄuÏ©¡p2í’{BT»rƒó9MÊ0­ÁØW'(lÐ ©mÊK^ T™j~Á FŒE²’Vx'Æ BA‹fÚH£4h¸¤NŒqžF×´´CdD¸hAÀ‡ŽÅEq8x óÀ#UA‡Z…¨ƒ°® ^»éÌ6•©÷›f g¥dr™˜ʳöm)w'ÔM¾ÙØî²“c7ånæŸTe(5Ä ÷Α×wÂï&·Ñ×'¥ÆÅj@Žs¶¼x_as™sÊÊl D¢>înÁBŒ&oVÀÈ~‹<–föë¼6n¥)ÊýýÚö1hÆêT”sšóz•L·Öã‚+à|[Ç`»1í(úAgOÈ<\TO;å*~,M•¯béŠ,:¦ÇÖëOïI몛UÂÂ7À}ÄJB7{ºk[– *V3µTð”ûI@t1[Öf´¸jZ¼æ¦~“Íó *½“zi—ðÑ2a¾Â‡¤Ë¸K»Ÿ¨|.w'rSèØ¾ÞÄ>`~pFΕó?PU…å ác‹~8ê6PÊõÔ¹ëMCÙu$œÙ=ZÍ6ÎYbÎb%ž»;³¥×1 Š(µI;µ¡«K0¹{%ÐÄr_9WKÛN;¡¬¡·38{ôç—£Ahi£˜ÐÀõªÁ2Çlõˆ½] èùKx—?˜ÙfÛ±I)ô„™ÌSvEð˜­ä[çæþø(@Cˆç:s€îL,ÀÔYbÐs(`)>å@îñå/ŽWû©á•h°p 9ßi™5#èÔBlYµ¼0>œB`äÇÚÖiµ*ÕÑu¤tq³%òC=Û´I—íÖ„Eqœ+´åÜjwTÿÄ¢>\p‡¨lBc`~%G`KÖô@Á]BÑU¹Ù”t¼û­!A¿§ î°)ŒåM='7ùʼy+Æ8CpË>”åÃ~wâ± œÞ•=XzÜ¡+Ñ{ü™gš4eaÚsX Á>Ã&>ñ;ÌëN\FÞa!”¥Ö‡’À1^R¬ìó@l/+–äêv`~°-ê†:d'ûŒŽ !ÇÁuƒ¼]Cwê©)Wx`ê6æ]7¸½¬z%!ÂÆqüúööÅÿ†–6ý endstream endobj 142 0 obj << /Length 2870 /Filter /FlateDecode >> stream xÚZYÛF~÷¯ŒB-Fv7Ï,üà¶1¯å,I0Ë‘Z3Ü¡H¥IÚÖþú­£yi¨ñÄ0lVWßÕu|UòŸ ¹¸¿¯å‡?a‹Ð“x‘¡ðƒ( Ö,v‹>ña ¿xõäÇõ“ï_ªt‘Š4RÑb½[$©¡\Ä‘I ëíâ7O‰P,Waä{—ož/ß{õb¹R¡ï½|÷ 0¤”ÞúÃòõÏß¿”Éh­ P"V ìDËh‰cú½O¿pñäU7{¥•Hƒ€×xµ>Ìrù¾×ôÔ3\w!¥HÃp±r_þ)?ÔW8ðj——ÛßýÐçO…ŽË²1öPYcž^8þu^ä¥ÉìSnà ù™›u›¬ˆI¹³ýîûªÜÖËU†^†ŸÈ«ÛëM‘ÕŽYíx­ÉE-‚ ÒÉÁföN¡ºÑe¾¹+³½Ù’V2ŽEkMdðŸîNßÁ#ÊPkïßðd¾WµpÇ0ñ6YÉDQUwLµüÆ$âšY×Gþ6·&·LîÚ¢ }ýé†x P—Xã}᫼MÕÚÚ ŒCí]/•ïµ €åj7˜Î£¯ÃfÐk™nËϹ)–ÒÛ綤—½/Z-´ŒÏHöG'• ËÀ:酜ùT*á¬yÍÔ&£Ûh_z»Ê2Ï,eè}Y¹‡´ˆÒtzÈl( j”pGF{Â…˜^ñØŸìR&ž™×¼|*ÂÄý±Í‹-BÇŠ¿yY7Y¹1ØŠ¼Ïys;#T =(ÞÍUuý_³i®JóʼnÙ´5‚Ý$Bˆ¼—xwìÆ‚Èö(bð=:˜Šñì389"J%zxÀwtFZ9 EjXWÄwø;u„"“ňÍûŠU˜Š8ަ‡:•Ààf.Î:˜§õmf¥©ëÎ…H%ü‹‰Žºgzûñõë¯y ž.q^ÅÝz0Vl$HÔ¦AB㓃¼ÌEƒÃ/Žcо[‚ó©yüÁVc›ÜÔ<"/O¦lªÒ=lz‰º±í¦§†éñƒñµtÔhóe“—­áVSq7û©ppØ]Vް&ÛºÃÅ€_áñ¤g猸ч%¶I :Uü&uëÕÎ<¨óøá™Rù×õ!ü6}NõA+ç4‘ç}@ ž/ý ÿAç‰}ݘ©2 Çš?ÛÜBøpã¶n‰C“WeVÜWƒNä™'¾´fAŸñ0Q$‚ÎUP(ÎìM»7esµÏ8 ã`ð2÷ý%øhÀ˜‰ÛdWøUùŽ\cú˜AÂ'ËA™ƒhh\§Œ8vÔ§a¥Ãjî¹DWÒüÞ#ACN„I½·Ú?¡c]SºálBREøúï«ñ=ätùôxÉ?ÊjVݤ‘ñä¥ó·³›s׉?W¾J'gz|ΡŸ7ž4 ÄØzÖÃeª½”|nmnÍæŽz“d sI; ÇEbòVÐ>y*˜M/uÎnÈkëÜde-\¡8r“-/Qà_3ÛÔ̤M‘讋ôç%Z¿½ËËð¿1øßˆ§ZÓ´¶¬g¸ôÿ[±±âÉ;Z Žà¼s›p8ðØ73 %ái4d Ú_ÑÜ+ˆ0á!uò¥ˆdú !+?€÷ÚñÇú¸gMò˜ÔËG¦>/òÊj©B1©™?•_ï6r¨0”* ÄHÄ,kê¶hf»³Õ„j˜S\£µ‘V¨Ÿ»øKrÇ/ÃZÄ'¯BHíýëÖ¸!Ǫ7íÃÖ<ŽR ¸šônAË0®yÛ¹ó¦Çä󱵂E]\´fg¬a|ÍÆ)†A-äÉίùΈoœm ;ÆÎ³[9rXKáÒ„Vñ"„ä&Nû”² tˆ°ÔO Ø€Œ¯÷êL¼>£K‰ˆ¥Üz™øN7 UóÕh.5ë@D¾;r‹± 834â#q‹h»‹¸ðZµøk~ è*×#L,YD=Œßgw$8w*1 eîM°\iœ‰SpoCÑü6ßtjä!s.¢OgiÎnÒɉ(‘×YíÞ€†?Z…+IùU´¯ÇÁajP ¼š/”TåY8 µv º¹åÜðüÎCžáØxk‚C~s‹IŠP¥Yíð•ø¦d,$øB Dšªq|S*Ž=G$Ù#kˆyÔlkz/s}œÑϹàòÍÕåÛ÷×ðïúÅ/ïß½~¾~ñv‚ñ†~Ÿ/"päÂ= å¡w}àXgÝÔSàÙkVµßƒÙ­0wzHI3#Lô© ‚©î±l²/Vÿð Ù[ø]~ëŸÇy·0®äÊó£bÎsg—³ùcÊqÄj8Ç3‡³²¢5³yÆ™ ÇËíϬ7h SÌâ,Ð>=Õ££Oè`p¡sá³Ï«nSÿø%1ùœ¨N¦8 u6W­ìÖôø&¡Z庑«P!õŒ?ýA±»øtN$\v © œœsNÊGÂ~̱%CT¬ý„".rržp¸÷h#p‰½ûìÈñ"† mEEF‹\rmÕ–³h Kƒ7­EøCŽÙf3ŒFŒƒû^´©ŠpÁz€‰õDvagìfH”‡ª+…¾¨E°œ7¶2ŠB)åÝ˜ÒØ¬¡Ú…RgSìj±2ÁM>)Óü–Jê ã fûõÀ< E'—v•¤„;­d§"‘ÁyÙ>\qƒ¤|Pà?Û쀠$T¦ 'd0.©s¬?pWœqkˆ/'…á @\†*:Š] %œ ØÌ壂²F‘┘#°c9aéÏz#ˆ9ôx©{< âØŠCQ:‰Q)CSøfM“&§ßÔqê)4—²¤WÎmß#7òHaçL‚!#OC2»”Џ\¯¡±%svdÓyÑÚn;Y5ì!Öœ;®.#«Û X'›çÄ $x ª7À|Ò( Ð™Â}Õ‹µHu8.ÁÌ(&^²¯vOÃ*.}°Õ 8&näu§PZø~:½Ó-L<žÔàŠ¼f%søÑý¦àðãL®)#ûj\µ´íqÄ_êгÇG–.âHþ™ú¿ ¥ ¦ðÈ!œ5uŸÇJHz‚H9§¡Šª¨ÿÑÌå'—ûì¦ËHP*»Ïš39 Cû.Šþzùþ\)H@®haAŠHÛ”GëÆì¹›„ŽÌlË© 2Ѽ*ÛpG?bN3Ã.½§ó~DygA4E<7V0Y3öQÖŒ²úŽ ><ö5Õ°gIý:æ3 {\ÍÙÇ‹0:Œ8V†±WT”‡4Ýáʼn/ré‚£iµ)¸80LtDΰ„h g¶ÂŒÀÝSìL5æœ'öÝ|Ĩ}ñ8 GÉhþÈef ˆÊÊ«½ ‡Íå›ç¯^Ì[z’$#0Žë1Ö9·n"Ô0ãܺZQUÆ?9èèR,å½ísÎXvÅ ;½gÑò RQŠŠM/¹Ð_Ö4¤ð7Jü’y8zk¸vB(" ÂÏûâø!«…Ö¬WšA/éôCóÀ%kIÈP) ètÐÄ*cQ˜‚[Ïß_2Á™Ñ)nKE§£Ò\u0åpÂ¥Ë#H5IWo ÆïSèqC¿ÌýÂ/ÕÿÀª„Ÿ´*»ºC""žæp7Î&$þ¿ 2ç,-öJ0Ýy6¤sg6vmÑuhÏnÖ.¨L6ãR2*§…Ê+jpMUÒ«‹ª¯ˆ¸Ÿ¬°äyÁäµÙdmíf´GÂUú€Êø³5õÆæ¬ûTv6 ½X?ù?­ © endstream endobj 145 0 obj << /Length 3707 /Filter /FlateDecode >> stream xÚµZ_“Û¶÷§Ð#Õ9!‚dòäz|Ž;qì:×ÌtšŽ‡'Q'6:R%)Ÿ/Ÿ¾»Ø JÔù♎çÌ ì¿ß.øß…ZÜÁß›E½ð/ÉS‘È4K™I„463‹¶\l!a \¼yñ×›ß]«l‘‹Üj»¸Ù.’X˜Ø,R‹ÌÄ‹›Íâ_Q¬—ÿ¾ùÛw×:j+…Í4LãÆ¼úñ凛×—+ÈH‹å*±2úõí‡_¨åú=w½¢Ç‡K#£÷o>¾|÷îõÇ_pþ©ŽV~¥U¬En ­×7ËUlMôÐV}‰d<4õ†ˆŽÖMÝ·ÍžF횥N¢‡“¡»²-‰ìwLlÊus¿BÖ€­•R"OZüЖ]Wâ«‰Šªûâ®d²£ç®ÜoŸY¸ˆÒÆYuÿ©9”õo2‘ð§hüT©Ðy:ŒçÙ]¹=î‰Þ6­ç‚8]©Ä£Õ”aà_¶0®Æ§ÆvÕzGí뢦¶Û’ž›ª-×ýþ‘ºÛ²ØPû¶mî©mSu뫹cêªz³h=6G$`©j¿§¦b ÿ}ÆÿšjC=ÖÍa©àgÔ}ÕÔ<Ɖ Ú‰Sp8àzI’,È1R*úMJ½/A]”Ñï¯êþX—4dX¿£N”WW–,.ˆK|¥R^^_f$вÉü#´ÈHjZ*°»œ™·Ôï¶œ™è@ –%‘MQS®€]•²ì¡µ\ª$úRÜö%wñ)C_S;ÑÁ,x¦Mû;ý ÄêF͘«ÓñŽé-=H‘}œÓu%dœþ ]Ešç~¼·» †´óʑŎ+‡§¦¡Z$B-WJ‚lp“ÄWA-Ú»ÓvæŸ÷Ñ.U•zte݃AŸ³…G’ ó‘üR¢VÄ1ëRl¢{TCl!)!…‚9?,©µ~ƒ¿V‡îš¸:_Ôj1h‘“²›õˆ2Å%7e_Tûî ÙèMèØ³õ›Td°ÊDŽ·mU‚¢ÇK›DW4q-½÷Ò:g—@4ØMWuèpP³¥VÚ´ºß“­ê;ž¨/ï»ïOyhŽÙÒ§ìÅ“*}Ê÷#û“x‰rË¢º¸G5×V‘„©…¨~GRÎÈ; qëºò¨cÇßñÈÆ¿Á¯‚·“üÔõfÎ$ÐC©8ÚWKu=ýÀÓ‰•ŽM×U·û’ZɳkØÛ"bó´WçݸDÎh ªº±ƒýˆÌî\Qt,òAS®Ðfì`fr >,ØLÄiz²tÞ/‰mEB%²L}›Üb |ë5»q™!:úÒ)¶ïÐVÐo:Djº-®a³ bÒ‹ÛM/‚L£5»QPj<ųš 'fäÄDû¦ØtDþçèÄ+=b±¯l‰v2—‰ëœQÏ7¸u'`ÖK‰ÞL¡½P7FÔŽú-Æš¾ržºöÕïèÎJê}¨6ýŽ:\ DbWVw»~VQ ÙdѦ¡ÐŸFuÓS“âzБGúq¨H1÷4|Sô…Ó é_¡Çp†3k󉢓åE’-M†ëàO\çÙú§¿Ñody ueÐAÁÒQ&‘,ê9£Ô©ˆ³Á(ß¾{ùæõŒUNMíóœ§Áé1¨0QÕÞ8¥PÉ fÎk;„‰ÿŸ‰¢tM¬wu±G\`0JPëxtø‹û=ò¨jT2ì,Æyp—8¨šU2«8ÂÒ¤eÔÚ²?¶ˆ¸°cWqÇ?ªzS­9_¿G<?\Â1ãÀù÷Âs›²pâ†TΠ ‘áƒ(|…X¡Öªž¼ Øù8ã„x»- ´ •¿íÈAƒÃõðlj¹“顃ݜ£J"Ç4Cv‹¡nfeÄ]˜«8s,þ¨(Ÿc+P0´ŠGh¥ZÝ êx‚§Öû¢ëž@Nêé}H*@ZíAlhr&b=¨²¢»Ç ¿ÛÑÀMéÕm šoyzôövV]ßkµet[t%QÁ&ÖnS8‘gáµ$ijGìº2¹Š®QÎC–ëtÇ[ZÊýêwUÇÖ^ÅævÆë”cô½ÓüÙ5ëä‚Zj)œ÷¡´<áSF¢v6›Y2 ˜9»ûÓá3gåm¾££½/øŒoYDûrËúù?ýD1 'þV{çŠÂi§Ò¾/€=ŽpsÙGCX“­©‡§”{áuÇÃaïð­ÀÀGï·ÈÛŽQkqŽsÇÉñgÎ LÇŒ%ƒæ8W¹P©ÈÇÊ…ï”Íé2‡‡4ÇD±£Zźik>ÒSt„ÂqŸ&hú('å¬ß ¶‹íT o‰Î±šñ(Û9áB(Uô‡ó¹&d\B?Ÿš|‡£½‘éé4rÂþîÔ»ƒu©5ÁÝžàd*b_º l4â’-d@Ž1ö©¶úýù,x·5¤ßs‘Ÿ…]8ñçOðU.Úa° _“@âÒ?I ì…¯IÂÈoý¨dL2Ü7%ƲZ«è›l¡ª®¡œxþƒ²ÀÝÌDÌÓR:™|Yâæ>rí{¥rªvR0?7ÉâxøÜd•ªôìË’,v5)è³'º£ñðYЃˮ˜@ÎbÑÙ*,Èǘ?µa)³Šò] ¡ñ˜/Ô˜~ÑÂY‹69IéŸý™K¡ÿä],:ÂéQi4Eϰ&—’sƒ½äU˜FTWÝÕE·sÕÛ &.žs¿¬ðûmWðVêIYõ´h©…‘ƒ`ïJÈ«zÓ<|êª?ʯä¨V 14·2†Ôk5Þ®K}òé‹¿^¶‰¿TM\¹ V£΋‡½dËa— ¥{Úà%ò—.…G‚Õ¯²tŸJX¾Q±Òß`¬çÚX€¢\qC”9ñÝ#æ‚ï€NªxÃõ’Õ~ªÛj¹ZÑzN&鯔M®¤ºZ÷N1åYŽñúæÅÿZkj€ endstream endobj 149 0 obj << /Length 986 /Filter /FlateDecode >> stream xÚ•Wm›8þ¾¿Âʇ*95^ Ø·j¥Þ]²ÚjßnËUªöVˆC|M ²mTõ¿ŸÁ$BRª(²ãñ<3Ïxfì|Äò{ €äÇb´C@‰±)øû É\žýážÏ d¶a7”AlaàØ&¤ÄnÇ´ádjÙh|uëÎîï®ßM0Æcw‚éøîáÃäÉ}>ÇTƒ!Ä€ŽA¥‘ Á4Ë={³ÇFé‹2Ý¡L -j+¬¼ð L¦6Bã Mò¢ž.ü¬40’´™ ¦:„(ß*‰™C¶¼Úzù&ŠòÇ'…ñF ßÕ0‚+>z­æ·ÿ\_«Ù‹ kб -‡HßLÈ0>ôM$Eµ•{!³,µEäÞj¥ÙÊ/þE:Áƒ˜Ø†âavy8@[ŽÄ’'þŠ+ ‹k ƒÄdm¾+tµÒ’l’\Ä 5GªÙó&z4ž.vl*Â5™¨á VžóÂ{Þ6ô-ŠZHÈ÷‚àvÂØÉx±É’† n¶ïSC1ÐÕUBG•tS?Z!¯¡ÎÏ•®»yâ*›ÔÜÃz5Ië‘U“_=ó,‡}¤Šíš‡¼ßG±Îçfóû¦ÎÜ‹_Àøséçù1 JØ—Yz%½¤"l¬³âEÂy g_S^P"z"Zy±[ašÉs¬Ì¨^fAä©1“ØÐZa¥#wÏÿñ@s€YÐ&xˆý´Òô47Þì½A}ИahPsH iª"hŽDö] ©ÃIÌ;QÔIœî¹ú1õ’èB·H~d ½ŠôXNß&"øÜ4ÐÚ¡Ñ.§F½éÞFydb]ˆ4ixMŽn¶z½Žº- ]zœ¦oå­á·pµk¤×»¶ú‚û!ÏZòîS«Ô—©v•3©|ÑW•mÕÜá]Õ¯™(ø³åm-ý8ïì@Ö™H¥½m #4@µztmW‹¿Ú³Ov3ëD7ûY«€ ‡È7Ræ*i»=Ì 2b÷u1tŠZ»ôþšÍ¯ngžûé~vÊÙúâï#Z‹>^ݨ`¼ùÝÃÍ;÷X‰Ô–÷o%ù>¤”ö`º— h`C‰bo•†›%÷‚>wb|ySÉTëqLhZCâšóetðúr4ÁwÃî^Ïx,òbW­Å¢.Ÿòvœ6e” %­co [;QíÞzÆc“•!ä-‡e•Â\Ä›L:eXò Ùï)Dã>ÁÖXy.’X‰}5ìÞ'å\$-Ñz¹‰åÒ?3÷ìðÊg endstream endobj 152 0 obj << /Length 1752 /Filter /FlateDecode >> stream xÚ­X[oÛ6~ï¯úRyˆY^DQÚ°‡¬K² M“¥Y‡a Å–mµ²äéÒ4ûõ;ä¡I–d(‚€¯çòs>ú‡9+ø?s2‡ÂŸ ‘TÊ ¾¸8¹~¯Ïo…H4å%J*g*8 =ï+ë¢Èël‘d+81 nµŽ±³Í“¬‚® Ý*Ç¡[;5ÒyFU¼8ÒÊÍ œˆ°ávù}ó bHSÆH(%^|—d‹|Â¥{7ñ¥{„ê”9¶IOþmo×éû·qk¦Þ^WoÝ >#‚2¼ü#eê­p‹uÉ%('s“¥n­…ô@WJýRš¥%.çYYEYêy”¹÷yóó(ÃNGNÝ/&ÝØ¢£+ÈÀh«¸š™[ïfú²TRøg¸±§£’¾ßèðî÷·oAî»Q¶Ðå~ªË ‡ÊØv´fÚUÓfwïr„ƒÔÒ‚ÎQZ ,|ˆÍYGdô%à±53±§ù^ÊóçD2À,%žu'>„1J©{lQm¶©Eˆ¦ dî^¬­!l ko î§@ko|5G‚ã„îi²ª‹g9aT÷„›ÛõÛheç„- Ôà¼nQ»ª só±ˆ(̽«¤ÔòU"l²¸ F½F5;Ò[½MëU’Z“îØQX;þQ$¦Ÿ™ƒ ±YòO¾‹¨J´¾z¢ZG•íEŸµ¥ãÒè#4h$(% ¿xI”íñ Š\Ú¶QÁ,YÕ›°¶ë·i{ƒöžÍª—pÚØžoq-<ÙJ‡ãÑZCNª~H¶åykÞ1Ćœß®ì7pH±<µ!HB"Bû6~f6Ù-+tðö}/+=d§aRà‚øBuâÒ'&›Y´\&YœÌ¢4ÕÉÇÏ/ŽÏNŒTLJp?”FTS¾33 ¬ œÎp’ wË(%Ÿ²9¯AIcÎ$a¡è›aÄÐN(‰È4‡‹ñÃE«o³ó¨IWŒø,ì‡Ó"¯ouNÐ:DV—îØíÈØ|dlq4¬½_ǶÝc«óócX†Ã´]À“<´f»™@µÔ%PQáÖel{X’u¯üPøuzÌ7kwÑm*ïËýL?ëXð` Þ¶%äIМ6›¡6 |É“ZcìzœÃoÜß uœ+ õÔ¿:ykO†à| Ø ’€×'gç—ïÌ* ı:1¸<ŠHy:‹÷ñ²ÖDƒ«ÀMóü³é*·ÞâEMÐ5 lâj/p5&¡îòüöS<¯°¯ÉÂøÿ¥6s'Õ ™Ç!ÐH»yCÜ÷ç„A>Ö$ˆ‡>’ Ý)»ÈŒ 0zM®“¹îåËÁ”VÙè ýÄžÔœ˜d™©¡¸l‹€hê‘Ðj=8œN½øCÌÎ4 CŠ%ˆÏ ¨/RzýàÆ:ÏdsÔä`|„Ý»ooJæ{ò½ê‹Ä8Þ!t’Hx ™ˆg™È•.ÙQY6âYŸzƧC¡GõÓÄ¬ÂÆp–}\äÆDv‘oú¯Òdþ9‹6O{²LíaúW˜ßâ°Ïn–Éë_^lwX÷BEö²ÉÞÙn2 b$e_«SPþïÓ®¡ìßÎL;¥ùÇq&Þ7ßË,_Giþò1VÚ„»‘WíTMÆÜyŽsYùÇ€#Ø+â%NFKüÕg_MLá÷B'S³ÈÖ;Æl$BDzÕ.IõŸÁíVMA¬3å@ØYƒw«ÚñåÉÍ‹ÿÑú¯ endstream endobj 156 0 obj << /Length 955 /Filter /FlateDecode >> stream xÚ­VmÚ8þ¾¿"ÚOpjŒíĉݪ•öºQ-ËD•úrŠØ` WHhîUýïgbC0[ZU%™?óâg<þj!k.þ=+µ øæ}ê[Ô%ºu­œ[3ë¯+( ¡Õ»ú3¼êt1³`ö¬pfQA–ï9€ºŽN­O- <ж‰[ýû0= ïnÚ¡VØF´5Û‡ï:]D5×ÅÀÇT8©²³9¸=÷±è öÅ&PÏ—XNÛö l…‹¤oIZò|-'e–KÉd:Uº4SOþŸ|YñÕ#Ï ° H8µŒ ]n×|ÊgÒð}².úd.…ƒ­îìÕÏ‚¼]NŠÂ„T)pØ I´^ttû÷A~x>CM«_¨ÔLÂ÷ý‡qµ8:l^H•€CMŸÊiQNÊ$–FÿfÉÔ”fÓYTð:Êãî`°`DŽþž`T˜O-M¬a¾¨,lìQÀDi‘<w¹ªÚ¸Ù¦TŽþð¾²ò…sn¹ß K­žf›Ç¥"Æ“A¶­Ë,ÃGPt$óšá«tJÒÐ(¢l ËX]s¬Jׄ{­b@ ¾«F/˜ ½Ä‹9)‡R@„‰N3½´ö›4‰¿¤“ouݤٵqš6q¦¼ˆód]&YÚ€Šjb^¶§·‚ë ¼“ê‰^;>ð^›†¬>÷^?~G#òg:PVèìÐKæ‚,ëIóA0"¦æ;:ªL Å‹I.ã`€RŸìƒ ?XªæÑ*›n–¢ð 9J²7¨t²|8ä’ì ¾œÌ^Ÿû—ÎÞý-3çó¤e–_åB‘awÉ3Õåˆs^F;Ó]B†yBí&ܸN#ìâ‰s( \ÐMæ›\„ƒ 7t_¶…V\ix‘– :IçR?Iå³yS–e!ëåf.D—\Öƒðêª F\ endstream endobj 159 0 obj << /Length 163 /Filter /FlateDecode >> stream xÚ…ŽÍ Â0„ïyŠ=&‡Æm~6ɱ–¶*”Ö4xoZo‚¾ÿÁhE¼É2 Ì| {‡®YÜóÙà¤Eçxc%ò˜aÏ0ƒ['¶jKARi«¥Ñié†t†#×$Ni·jUø¡$¯òÌ›©7Õ˜š( e‘+) KÈÛqZ’vøTõbcùÐŪï›8½ö¿Oýó&±'2`2 endstream endobj 162 0 obj << /Length 2705 /Filter /FlateDecode >> stream xÚYY“ÛÆ~ׯà#X^B˜—ó’KE—íÝ”WY¥â< ÉáÀhiÿ}ú PØHN©Vèé¹{º¿>øûB-áïÝ¢ZDð/ÎÓ0ŽÒ,]d6#›dvÑúÅ~ñ÷ Œï¾ø¾¾ñò­N: “DÇ‹ûý"ËC«E’&a¦ôâ~·øWðæàšÞ·Ë•Ž£À,ÿ}ÿ#ϲ!ì¦pV´XÙ&žðÐ}Q=ò„¬ï~eªn|ëú¢®:\ã| ZLÙÐØDËb± ³8åÅL¨–+EQ°®úv©² Þ¶¸ ŸDe‹<ÌXƒçjÆpš{(:Øæn‡;¨<üRÅÁç¦tE%݇z©ãàw÷53?Á5<³Š£{ôÌmÚz뻎ïá­VxÜZ©0cÞú|Õ•‰ÓàÄã‘ìž  R²:’ë—·LüÅQQ5§~UŸzø@[qO÷ÔÍîØûc¸\Y›oñ~5>X·ýøØÖ§jwó£4xªOÜÓêS¹C:Á[mܦ|âžÞ}\ª(ðÜrü)ëúãܾ®—‡°£‡PQ˜ZCiÈç™§²¡ÕÙ0@‡t¹$€W¥K6"‘$Pn•è\“äÕqWwjšºó;lÍÜLtÂ>õu[¸ò†Î¾Rq¨@iù ï^ìá†6ÉQy\Tƒ(w¾wEÉ­8(ª}Ýéa™1|]…"âFãھ؞J×òûSµ1Xç†mãÔy&H=ÈZªUYTÒxÿËúSGW\É4 © ÏÉK6dt¨Mr¶¡³=†£Ž·Eeüë¼A)lY^h’Šr‘¼|î(ì=MÎj(/è)^Z¥—U}Ï„ãOu:nÀXgDVïù¼_ùߢH÷Ý÷_‚Él˜h=àˆw;4Ç鼩ræarQ_¼µQ ž·ej[Á&½´®câX·ž©þà*¦êJXoîÞ‹êáMê¶°rˆlxN.e?³'ø;è9úªÿv‹“0ô ܹîŠ!T|Îââ<Ô:,îµß:2-+± þ†¬Y~Ê€®g[À¡Ð"½¥½ø+“‡_³¸kÒtªÚо¨6Zíà]±‡vE¢À×C!̉ˆÝ’M¹„±vXv©At\¥âa¤v°WlLÐúSŸ—¦wÝÓª¯gÃ!}Ûõ®Bx4#•5Q2°]‰þ‘Âäì‰ËŸ²î™ Gn(nèü÷ϼü©$Ùåj:I§¨ŒU@`ì‡Îò"„²LWgïÖ”ñCž³6™¢»ä3—½§ yý½RP »YP ‹ÉïùšSDæ„ £N•¾ûJXb}Î9dƒsÈç ά­’1«£¬Z/¯!>‰£|æñË'¬ nÑ0¬á¼í;掛Õ¤Gõ<¯ eÏÍøÚÏâ ª·VT!¥ß½fG­!ÅDþX1°½&ö|”aÕœÇ8ŸVCÚ0Þ[Ç™ì=¬l±(0 ^hÁžIÕ€-:Œ–E/«Ö2ÕÍë #·js˜¹Úº[tÛxŽ¡Rì ø#ÀvE: U´ÌÜ>´²/7¼û ¾‰–4bx¤8⃢l]ÕAHÈø7kº ùÅæÍÑ»$–Û|ŒhúhØÞcêŠ#`óY?=–—š+Xa˜1œ'â·Ú–'6޹Ǻ“q"aíöØÃPvQ3Û€kξÍÁ×&RÊxµé@tÛ¯:¤84V V.oýXNJbgê —Gʵ­{’n ªà ÉÔJüRZ•L•ò¬Ž«ä0ù…=k9à>N{á1²< þF9±ÌÂ]ðÛút 4 כK6ÅãKHQzŒUâÜMµ+«‰eoûò~ýöíËï~xÇ䥉æCÜÌV[úm(°× ¤ŠÝÎWLïÛúȠ䟻5ø’vï¶_è4Œ³óÓÝR€«µR þp €¢µT]ÑZ¼7âO 'Ñ´ñéq¢<¤NÃ$N®Ë0äç1Óy¿VdÎ “/rFHÂ!W‚ÄHØ¢æUL=ʾMœ5¬s² TAòA”u$&uƒ[%ûŠÏ¡bœs…&Þ½_?§/RÛ‹Ø„pÀAÂUÑ虪…6a®ÎÏ žÂ@Ì;‚8¹œb@úp.ˆ3vRjAÎä"Ìzæ$Ê&až«M÷ÜYÆG‘:ˆÒê:ݱŠ:þ¼ùî;iwOý¡~u·þóz|‡jé6âÓÿÄ¡(LU>Å!çWx-±1vPå-âJŠf8¼b.á-ã,œÛëø¢àd ã hð³Ûr„xû+?ðGÂÏÜÍ©ª$%#Ta«wÅ÷tGq»?ÃáÁbÌjgêm—ô#õÔ—ª›j×T‹1Õy’hg¦Ò–…úK¥J ì2Q0Ñç ‹K†­÷“Õ9P•RÙ¸Š~­X/“ÊñuéW(‚öð°¾”ù9ýQQFgóZ|ªøHê``9nžƒ.ŠdF|¿ïúðŠ(¾‚% ƒ9q…çJ¬€½ç^~FXŠmð@A1°èr«I>–Ä_¯èkÈ×Ï@s™<'̤.|>”D)ÝoH¹qB÷ãÈËVÜK©;Ï<Î&üÕH,jmcóèu;VWÙ é“$S©„ÅH`¦&ªQ?Ý UçŒà‹c4ƒ±4¾usÂá SG˜u5¥hQSÂʤÆ=8¤ÿÉÈÕ÷…+ŸÕÒ»oÑÒ$L£sÅmheñ øW†hPWsrªÑKü»Ê`‘쪖6Ui©ã”}Äß ˜"ßš ¿aËR&RŠ´­©±ÊW:*úЬz.£!=aäü:I4zftãÅ‘Ò ÓÇI9gŒ8t’_àUAVÿÜÇ2¥œ1Ë2Âv•ÉÏo& úáþÅœù_ endstream endobj 165 0 obj << /Length 3471 /Filter /FlateDecode >> stream xÚiÛÆõ»…â"·XÑsðlÚN²ÞªHl×ÞÖh›Â $jņ"»Þ4ýï}×P”–²ÝÂXóÍ›ëÍ›w~šéÙ-ü]Ϫ™‚aû¡Š“x–¡¯‚( fM>ÛÌþüDÁ@5»~òõÍ“g/t2Ký42Ñìf3 ­Ø`GÖO;»YÏþáÙäâŸ7zö¤£&Ò¾aòÍŸ¿¾¹zs17¡ò¬1#å½{³¸Y¼¼fä_¯ß2ôêõÕ›çZkïfñêå[\{ 脚¹ ´oL8›[ã§AÀ›uõmÞmó—³^Qu5C~o_ìó²¨òKn»ì6oyÄJÙú„Þ=·»mS÷·[Kî d®µŸ†!oWTЯ×î²²dp_䫼ŠŒòî‹nËè¡–b ÞçMÖuÕrÛ­•¹u˜Ô©mó zð¿|ÕwEuËÜË:þò´ÙN ®Øåþ ;#vj€‘›ðÉà}Õ|_f«üc÷`S?îúwâH(š5‚‘×v¥` Ìâ–Ûp–á=!f)#›<“éYµ&1â¾)º.ưjV!GîáúqK±‡B¼pÝ1JfÉ@`Ó%}ë#¹q Ø}›¯ ¼åchD°8#ªpü#üáÂq œéW[˜µ¢FcΞÊÚîý&k;”‰T¨àOó¤£ëˆc?V©»Ð6«Bïo RÊ«{{í¶îË5‘WWåcá@Œ*:FlêFÆìç|²ö±(Žd8ñî·ÅŠ>5¢-i#èùWßvܱÌSìöuÛK"ðp® (¢YyÕMI>ë³¢‹Ñ(/œêÃΛ]¨}Ó&:‚âÙú|Bä£Ó¢ü$ ÷nñ ˜˜¨#}Åv†RfíåYûÀ(¤¿û¦¾m²^³¶Þò,AßqW[:#ƒSᦠ<µ-h’XÕK¸Y‡QÜm Æ ±Ë|UïrÆ—Ysì½}ŸGÊx¯éÐ1:Àgé8hø¶Y³fNÏ™Ïð5‡´«¬”™÷99@fbTÇVhœØz ¸¹”w‰¬ ‰5s&Âgú®ÞÁ`C”Dí³`'ÎeôRzX mœØtñì•ÀCÛå;€ñ5ˆÂ/6ȽÈ{@õA^¯²Š1”"ÖîÕ µŽ˜Ã̆§fåm ‚»ÝqǰÒR.—/{~V$öM޲݉,7¡o"›ëìá" ‰‰©¢¡Ëé  ~O¨Ä9OL̺“þÐÖmR$@û`Á5_%¨+ø¯Bn2`™B,sŠÌÀS(CŦ$ òÚ«¦5 ƒ8—}#ÃÁÝCˆpßd@ãG#ë§îËñ@'ËêÈlr²ì.«>¶.‚ÚÍA1?0X«ü08‘dYŸY¡#5e?¢%£‡î€l!^(ÅÈé9m3V3rP³ ¦¶=Z#4¤l%º üÒm @iÈRf{FQP¡DÉV¾üÙôe9_Šk¯G~?©ÉÈ ‡}›Ëõê`œr)_›§&¸ø.ÊúÖ×îˆåÚ“ò!D¾Üt4Ó~ÇPàp3ÕYLï"·¹˜k¥”÷š\3yÿÝhPLD»yÒà¼Æø&ŠÆ”ؤhgR@%C@°jh±[:< ØËU· ø’©µ ”Xe’çxÔB›Š-Ò¼>|íÒG^š;Š\Úf(jìì#VQƒ3«K‰cœÂ>NÅèÆƒePVƼ¤(3Žö-#%š‰õEetóÈjïRDçKÎ.-Ce¹œJ`2L ¬Ì雂Ü6„‰ƒ#áþ±›‚^º3@÷•§88D0|ݯ‰éÜÞÔÉû ‚ÓW]Q2XjËA£B—^ïÂÞÉÀ^J 2t$å´¹q²˜øÖâzB¾8Lß°¬ï$›®F‹N‹·Nü(q©2¬—&,å:™, ?TÊ´"RÎñø•>ç‚iØ:ë2A¶üÝekv$)“BÎ7dLÊá»u¼„ècïŠL†Mº­€aƒŸ ’3ÁD>ìaê–SÆ«ÒE7_çíª)öHjz’qi æÇÆÇ'¸¹H(?#õœ*ʵ.¨ÐT*x`­ C»i[9eå`F³Á¡ðƒrµI."Ÿœ@º„` N3+6~G#‡YT¯~ü˜¿Ô~lÛþÛ£˨HsTóÒA@Õ™£ µ@[)u²-ãß?¿¾¢ói«y.ìëÊw¿¡žÐOãx6B;ž|†r¸´Ø †`2Ì! 6qÊúŒ™n¿ZAÔL¥°$ÐMÞõ Õ `¬¢Î˜Œð0¾œZeëú˜ +Uu5ÿ9oêI+GA¥ƒ™wSµúœöp_yÓÔÍGn+LÇŒUL­½W(Y:⣶ßÙ¡þ›ßöŸV]ž·“· W¬WÉ,„Ø l·”8(v 7 <T¥ÀŠÇDD…öd´1—°C4°åÕ¿¬uó‚A!ÚU™Ê½êªËHa cg+Skn¢  6qɹ !ÖBîOþ/´Îg’!Y‚¡F¼“n‚êC‘’ B ) Ö ÇŽMCF;RçLY_ÙOÛ²P™Ç¶,"EP’i9¹µ:¡P'%ÉC} #ƒ±3±@öÈ;£ ¡t#)¼–ÄgpƒW«š–t&ŒÙ”ü— ÎO:G–-kçéÌõ×ÎyЉƒ\î8¿5¾ëD‹I}böÑ´Tn"hˆË¸ÔUSËò=8%/÷ eëuÃdAìèª?_é(‡ªâ(–å,ê³,¥Äžizb"ß¿'‹øþíâïW¯^¼¿úîêû«—7Sö·otÈö2ÛK!t„wFwÕ¾ŽOC¾3»¿¾únÒR'¡oÕÿº3øa¶?sçï/¯&·NµosnëèÌ¡èä‹Ç•òG{¿tì~ûÉSÛ3§¶ŸsêÕ6cãÙq’$ŸãñŸûí›IêLè‡&=³V2^ëR( C?8+ .Åg;ÄÃ'\./BRmìðÚ‚ÉO&ƒæ%a̪Ub…hÂjëGjx¯Aµ¯7s{‘o£!¾Ëx³%™ÿ„“ ¯YÃ4>Ñã|—Wk­1É™§A€¯>Xö"ˆ‘Ž-¤]?£’~zþ¢ô)2µõ?ýT2!qgÓ½ î[ÄÎc"Põ»%¦H±%*ø¤2ñØmÑi°ÐyI§F fš.¦å´Ä3ÝþG…ÃõIå¤TÈøÓú)ßË¥À#36ÀS’›ãº˜—©·’6SL•šÅfŠr0Á!@úöêë¿\OR,ã=ª¡_çèu«|}yœ®ë\F€ ã:†âé5‰®®Ï:°ÅmOo‚6ô¨B‚@MÁQ$ÄÒS´üÍøã<¦ôŽfÕ—¦\˜¼…á£ÏøF舟 SoTPh8HJ8Ã¥¦Š¿}Õ·•ýq-4nÓ5¾¨ 1ÞC3åªåVÅãPðJzxņ”u•d¤—œQñ+ÛÉàÄ©ÇT¶¿á¬õ‚j|Êž+r=äŸQä2¾•³’´–‹\†¿üx‰¹m¾ÚVÅO= IWŠáŠ,ž:/+¿ÒCÛ½pªÐ=B r`+¶x 5zZÆÑ#¾{Øã™4âÈoŠ{£÷î]q»]Xæ‡D4_»ÂÅiÑbôÜrx%ý"§_AFYöX|@ïô»¶[µ¿ýÃ͇–År4ÖX?Õ“CïŠ}û ÿ;-Ãïêb=µã¦¨Öï³;ÒƒÓÜ?:»ìô'ýEuµ±ÆR? õñ–ÿG$'NÇÅ Õ%ÑTøv—x~Å{š~Ss´àºî)¯Cª²»Û¯¦8SlçþA—ºÿ~( €(U‡AxP =ž6OG¦cSë—_Îñ«‹¬õk pÄ¿ñBư*ëöh‘Ó™Ã<*™C’þ>ÿPt‡ÙO7YQ‚uÿbt˜¯ÜJÌ4bؾˆkÄ´§ÏïÄôb -¢mðôË–>BdËß/¯Y=½<ˤ‡˜"D±ÍøÏùâ¹ õÞÑ›‘ÑZ^)p?Кµ^U1ÞCÆ¿6ºä__È2æ#OOà®:yÆ—/%âøÐ[‹ã•ŸVÙáG\ÖÛôÕÊ;®úñpz\ .2e“®nžü¹Éü endstream endobj 168 0 obj << /Length 897 /Filter /FlateDecode >> stream xÚµVmoÚ0þίHÙ²6ÆNb'Y»J”·1è(Ó4uJ!@Ô°„ttíþûœØ‡… µš*ë|w~üÜã³JHšÑ_[ò%Hÿ°e ÓL¨S—BGšJ_J:B©]º–ª-Õ’,`•HédZa$D¦®IÉtSÑ€ dX¹È:¬ôÛƒZ·ÛéµeEŰò­ÓgƒþUsP“B•a§ß»–o‡Ÿ«-d Ùu]†jÒµYb+ñÙ Ù÷¥Å$J–EÁ*0‰Ár½sý±OY!V΢ÕÄ ÀüÒ)óå—7ëÛ yÚ&_8 ¯l¡¶7Ž={Å¥ÏÏúÛ{^á¡0 ïeA$ì‚ßZ ¤*¬›c!‰;¸ Œ‚€fáƒÅæ%Ñbg21ÐàÛ®¯ëxœ\0G‡“­ïï'¤¸©ÂÃ{ªðè̽\6®Qíi˜¼¦-w'ï’äí«ôA¦“Z“û5±Ù² +2•TO̘\ºÉ—]º‡<›ÃÒ_êÔI endstream endobj 171 0 obj << /Length 3230 /Filter /FlateDecode >> stream xÚ­ZYsÛÈ~÷¯à:!Sâ,æÀµ9ª´Û«T­­ØJ\©lJ‘Cµ¸€’•lþ{ú€J²wË%cИ£§§¯{øï™œmáïͬ˜yðÏCá{aÎ"ã Ï‘™Õv¶™ýõ…½Ù›ß^½øúµŒf±ˆÌ®63_ £Í, ´ˆŒž]­gÿœoñ¯«¿|ýZŃŽ*Bú0 uùîûóË«WïKå{s-K?ðæß_\]¼}ÃÄ¿_\~àÖ»ËWïÏRÊùÕÅ»·pîž¡#n–n•¥V"6†×JÛÅRK=ßÔeέvg‡ÃÁ&ÆÈŽÃÛ´j¸Óh O÷öEºPþüv!ý¹­›$ãùó$-¸UÕå¶Nò3xSñ¼¬‘jžäd‚TC5[J)bß絊´RS ×^ÏPZ´¶Þ,¤7OVVàÞüƒukH3<¸P(¯?O3aTØuPBòi”?«dk¹%áüxÁŒV´‰(Qi8“HHíTC %Ôb)=ÎußVû–çhK~&nö4ÇéòäL"D<Û·vSÖÀ…™&mkóªM‹-¾ûóïøCIËÀ ?èΣáOÍ®Ügkî¿J²lâ(¼ñ!¤ù5Ì·ÚÙÕO?z¾r‚Ë0¡u¢sÇpᶺK·çûÊ~3ÒæƒV©Ï·”±£þ ËÀóŽ9bâÅço^áÔ3©CaÀ—R„Aü޾ø"†Éä4çÁ'6µ”´2P#6.62“žð¡Ÿ÷9"‹¤t¯ŽÍ~µ²vÝà©éÎèØÌ·û¤N@ÇmÃïí.ii7Ë44ǧE:@J;PµÔ‰¿±E“Þd–”—8ÑãÑ—½®(£{]Á6X-ê©Q0Iˤ=OÙlí:§Eß‘=Ð^ór¾ªÓjéX¬ðÚ-º ¥$ËM-»Q#öpß " Ã/Ðö>rœuAqÍ­móJ3ƒÓ_ßssC.hÖpJ¯RcïriQ22–óOAÆŠµ(C¤Þ¥ínbC‘Z7D$K û˜º‚¼¢``¿ ì÷j—6¼n›ü„hÅvv‚íDÇâÕÐý˜†`P• ìaqåÊf‡ïŒ9¡¾¸ ~H]oÖYx£ZfvÓ.w¬³ðmUÖ…­¹]n&ý k|È>W!\'‰A ³®Èwã»3‡°û^•ÏøðàJ‘[èÈ©7’˜bãËÄi?7:IGí>ßsPp,ŒYé¡öE'`F8†g<ïâï¶@ÃÇ·Õ.©y\9Eò'§ªHÅ,sö}µˆÀHPëJç)@™ÀÅ1Š/R[¬œ Ù싪¹‘€é ºÇ[ôŽIš%7™íÝ =s§Ó<ª…`”ÍÈïD meÒWëYºÝµÙ=¿Ù¤IAm|.&¬²6é ÑVZ>‰O!½Ó½—IÝ¢ûÆnö·Ñ™8ƒ\eÆîã¢UÌïvéjÇÍö°ñ¹°LN Æ>ØtèšìÕ"Âäëýj0hBçÝ8Óc9p$±3@0—æŠ Ûìø'ü±öD ~Z<)©@(Ù wÚÏ/•PÀÿÒL!þ•3…ø¤™Tã!š‘˜ýŸ@3áÍgÇ£}X/ ž…Ê}û„ÉÆ$†þØdw¦bÀÛ`¬klGÓf‹:³å·UY¥¶á!m7Ï– ym—'í’`7 WŒ‘áÄu‡Š±™Û6Y'mÂ}fPÍ!ȵ³(¦rÎd² lôIî±¶‰R±s,JØó$4« ô ¤zt6Œ´;ÎR0ÚqºÒí^ý.Íh=¿é²Œ4?W3‘r¥ìC [2ö!‰S Õ­¬{ Ü¶‰éø×=÷ŽÒ _ÙVÕ5Šóª|I„ñðÀ¡ožg0«¼‚ÄHÉ*_ÛßâQ;'dÍŒõ=<Èa÷Ÿ‹2ëê9|fÐÈ“A­ÇÁI‰åߌ5æuºÝ3 ±Âà ¶¿ÈŠb4?Sgv ¿R–Ž Nóileë¤3áÐ…˜Sж\pæmwµ+[ SŒåOeÃÛDívP¶ã”>Í(x?€|#pB­4_NÙ ktø'ªmƬUOUÛ¢Cµ ¢.è« "’£ b'G¤(ÉOBüØH\Úà§*K '<?U¢YšXy æ®Ïß¿?ÿÇs¡ˆ”‚x°Yñؾæ^†DSL&aª®ËŽƒ=BÒUBÜ:c`”¥«nrÌn 7™v O¸Ö®U8óÃXh?äÉ Û¯-Ûçšv–b÷§©#~Ø5Ko}•±œìŠ¥ä¯ñ¿ãÞ®ûm™®§VܤÅúº°[Øýí˜2¸ ,¶>Ëu1»ýY!»xP¿ˆ¥PÑ‘%þ÷×M N{ºUV6£ìñKGNì¡W»#x`뺬¯í§t°…—ÈÉ }5`ÝiE§Hƒåÿ7áì\ˆQ±¡Ó¬i§.±æ~–S¹ŒFÕ Ùùt¤ OÇç†ïˆbòHxàÓiü†Ÿ\‘€Þ]Åuo"6G¹ÈtýËêpÝõ@!N•sbæ ¦.~bèîá%\$L.~´»ø¹Äô¹ÌîsØ+¤;¡›|ú®GATÎUÿP6 ‘ßáfhÊ.k&|ŽŸúHÔðwTC¤“ °AcBÁ—× auχÔ¥O-žÐvo™Xh:êÆ5`×ÛéÐð„Ö’®><-´ì• bñ·çoÿüú‡«ë¿}÷ýùû)5õE`ÔÄùO0cô •Qé½Ü×L`5J K¶ëzS"AЙCW°yT >;N²{ñöjŠ[Ðþ¨¿ß±íJ ‚a`âIzÞ=÷Í4úÞ‘ëe‡?½‡Þ6·Ekéî!àÚ%µVåÚr«¶=ˆø¼‚qú€ŸÐÅÈsÊ6I‹fREʲÂB»Öyi3Ò?ü`×Á÷Üå§”®Eà#ê RHyðB%ŒÝ )[›X•‘íÔe¼h?]Ýt©UWŒGHUKU’Îâäš[ìZ°3V¤ÜggKÔlÝsr÷Ûd.Æwf€w:Çã£Ê'>£¡Öa–òF°ÎÉöÓè°#ìrµÏè&cªRo„§{§c?U8(Í<»¾\'N†ãîŒAøG·ìTK†\ŒÓ\x&îÙe­ —‹ Ó8٠ΜÝvý\sz3ðƒžÁu¹ÇúáÄ>'ùà €ò›™oî&`½Œ”0G¨ìô‘ðT_ëëj*ŽÝC¾gœ²á³÷px–\Œ zQËU‰çL'ÎÄ®B:ug]tâ%Çõ†›ç N2+ùª÷ø÷±ˆ¢Ñ]»0û:fö»óÕX êYDÆŒd‰j*édËm:rx¼è>Oúl û µ~žff6a0ŽÊuÄ—Ñ|$D +ûü†¯%"W©ÈˆÖëìÞ¹P?ô¹B†ß&Ç„}CN‚÷uº´ª±TÍ×v:¿f×è190Wœ=0x=¬£6Ìö§Ï¹òƒ˜‹¼6×]ÅPÓƒ „þO„aøÂ[³+o,“z®ùµ/ߣ÷ W8ð{K›'Ä™)©ô%F7Fh¼­eT‚W€žêpMjÌÀÊxNñ³ÕË„i ã‹PêA±Sùºÿ ”î¦-,èLR£µ9S]¡X£˜ðщ ÛTØÀOk¾°€øFÈÇ @=%„ïèÞW®ÀÒt³Ïó¤Nº®•îbMv•tkDå|Ü+²‰Õüݸt~cáeÜÙ¡å< Ö¾jW’JøqÓÝæe÷…4-&˯®^üzWáo endstream endobj 175 0 obj << /Length 931 /Filter /FlateDecode >> stream xÚµW[sÚ8~ϯPÒØÆÂ7ùÒt;C°ì³%ô¡ív<Ô¢©‘Yc§I/ÿ}eKƲ-d2Äž£s޾s¾OÇö@+úTú‡\"Õvlà˜ª¦å˜ Á¼=S©£ †g׳³Î@w ]K·Àl jH¶e@Ç4Àl>¶ hÀ¶‚,µõÏ´mª­ÉpÚGÞ°­èˆGv3xçõf£‰w×þ4û»3Ð!¯iêÐÖºk‘ÒÔrŸŽCW NL¢”Y݅ȱX®˜Q¶ÛŠ¥ª­×Ûtcxÿ&߀&Q4 ºrðgÁW7 «iRß¼ÙvòÇ¥.ܳGÍìÌ“T–“‡0IÿU‘ÊÒŒÆÝa¿pt hÑ‚ ڦɜÿ(tmfL.›ÁÈ…¶Ž ޳”S E4!hj6Ê{þ½XãÐ%ð ÆÓ•¬ÒŒlñŠ„ æÜÏ“½2 9Rnþœ-—aÂr+Tµ–eÖ:ÜÂö çP{ï> ¾04x=_…[ÈË/k¤È\· ÉStB¿ð²"¯}ùv‚­$­N@ Y»“0ÍR%R„ + $ÁC”7×s²¬ùÖç–ò¯»ÞÍ`<óßõþêN™õÇ*¬/0YíEõ&7t:øÞÄë7‹ù…pÖ~˜$qR»`Çá‚·æ"#A¼(%“šøâý#ÑÓE³êIzöS6%ödf·ç_ÂÓ›’좙à¹àŒÃ‚CRÁnƒÊFw¿,y|VÁÉÀ–fÙP 5@Ï…ãWSá7tu£(æ)§lÎ.&ÜÀ†_$\™ëÅÛ,áw˜÷Gå+Ë$ÜMÁ8I žN3z$J8ÏoEÐÕ™íN§Ý÷ }ìõž“IÝ‹‡‹7úП üÛ‘×çIÅטdÚï\$|«ÏBõo·q¼áµ?”íIïCသŸ’–¥8éžjl¨W5ëëjÞ¾ßâoa¹úòåÃÕ:ÑãvSC˜#?R£mA¶yLÎ øNPÝ››©ä©¨^Ö:"¯«.Ô5«Æ|­µÒÖ>ÖZ»ÛÞóû·ýqß›ÝÉå\F×ZhB±söññS ŽW1»l¨ÃÕÑsük‚Ó0Ÿ?‚v.›]<à§›¦¬Á5Uý”¼Ù63©Ç?[…×þÚ·ƒfçž@14è8|›^Ã5ÿî0 þªMW)‘$ÿ>yhk¨E_Øêœ°kq„úêèÏÎþ“š1b endstream endobj 5 0 obj << /Type /ObjStm /N 100 /First 826 /Length 1249 /Filter /FlateDecode >> stream xÚÍZÁnÜ6½ë+æ "9’€‘C8È¡h`ûP ÈÁu…"ê5Öë"ùû>nãtíÙ³ZJÞÓJäˆóæÍ#5Û“#¦¢”‰¥P"/‘˜É 8 ˜a%I8RL˜p¤Šg`sçåÉ{*!W*YÉc—#˜±z¬Eì• `<|Á(`íèÏ+Ø`²îK ¼[;£IuðGÍ©Ñ@˜GFÝr×bô¦ÓC®ÅhCÚhc$8‘øcÞáTôÁæéáu\6Gì1^Zå,šwdÜëeô[g3¾„ºó 0̶‰±E¤r{ú¼ÕÔòL©|tº*I5®ò är²-§jâ“ÈÓÿ1ÃýšæÊÓŽÜ<:^¾ï¿‘ñ%s4¦½ŽÆŽ#O)›8´E;JŠGgÚÖ³qdÙ”©Œˆ£·\ÜßÖ.Ë÷¨Öþ¾÷ýåòêæî¶>tý•úÓ‹þíðÏçëáüÝêßÓjy?ü|ÉúÛ¯¿ÿ5\ÿgõþo¦ôLÅ#D}úñ)94I鎮gú2ÍF¦YgÙnc[FŽ¹Ì’ƒ±xMµ[öªvK}œMVò£™¢-bš*ìŒhJ™% £‹í¡ù))Þ8^š~œ²³í5š{vqžEÞ»¶éÏ|ጎÖ6¶y¯ºŸY^®Ê[º·ûµowÂýRÝ6·ºã> stream xÚ­Vmsš@þÚ/Ú 'ÜM›5jí$š&´ýÐvh˜àAyé˜iúß{p%Žíd—ÝgŸÝ}ûN2û`S‡XÖ †²F ÄX‚O-™9Ê`ÒX­ÞÀ„&Q°–«PS5 š ,|ëhJ÷‡õ±7VLÁQ!"ÌP —á‡þ•5ºîJ –;*ìJ˜È¯×Sk:›pã—éÕ ¿›_®û]„PÇšÎg79ö¡ç®,¹ÈR*³K(œÃkŸ:Aæz]‰Èrç]’º~ïÎr|†Á\¡‰ñs®{œïÚNïOE…&Bž¿ü(éå?ÇîYê»èÜ»WØ04uÁ@]Ó¸ýMa/p ì£MR¦¾ðilÓdÆkXDHeˆ„THLSË“"VOˆÀO‘Å#Ÿ¦Mµy›ˆåû.c™'Ÿ^ö'£ÂÑ`é ÂKP›³ªôÉn06¡®ãc‚Ã,åÁŒ*éc 5¤×‰þÞ¶ןä•›’ÆÃiS¥Müõ\îãÜÙñ^™ÚÁæÞfË¥slÉ0!!Z]V=!n¿ò’‹`ÞyÎ=§ãz‰ûQÆ Ü™a>uc—˜.â4M½êÍr;Z½ðC'Ï)تÑÕÇPHpì¥YL·@’tz$* C×§+þÿÕûJE‹áüœíG‹Ù|6â¶ÇÇm ‰®£ÀÛˆHÜ‹»ºY/¼8ã-N›¯†vÙ“vFЭCC*•™Ë–Ñࡽ[µ\_uÿÙ¦?÷ã¹}‹r½´ï½§ÙFÕxýµ½òš$f6KLûW‰9Ñ"óÖÆ²ŸÓÞ|È‹Jl`Sw¼N÷46èÏÎÇ—Öâ|þyp1:Bò¬´}°ñżoݬ„•1ÜZ·^v oæÚù!™í`*‚†Qjl쯲ثêÛ.{*w†vàdzåéB„14Uµ:]°õ“S©ï¤T¨êfåËÞp<‘MùµæQ‡Œ‘Õú ‚@H endstream endobj 182 0 obj << /Length 1069 /Filter /FlateDecode >> stream xÚ­W[sÚF~÷¯Øº…ÆZ¯î’ÝfÛ@Ô1¢ñ&*‹Åh*$¬Kí$“ÿÞ•vuP§ ì´—ósöÛïhŸÉ |€ÈOÖU(#US&ÉIŠ&ƒ5øã ‘‰ŒÏn¬³Ë‘ ꊠk 4ò2TE„š$k>ôD(Â>'+¨÷û¬/¡Þt<L&†9îs‚L:)}-Ì[˘šóþ'ë·Ë¯UìJ’UA#¨™IILç~ìk‰sU#œ$"¨ª"à j‚@m]¦¦€ uUÕÜퟳ~ž‡º¬€JÿÀóÇŽqŸSêÙ´ñ\Ÿu<$ë5a¶˜c«9^„Š®Uí¦xZÕìee…\´Ù»þˆdDÍÿ>R Úñ+mŒÉr0› Þ—3ƒ$¾(ÆŒÉ`<\Î?‡ÓÑòÞ0‡å<×§-éáÙ‚ÄÜG¯è›³±ÃrJú/ßÊ5|qœ„~‰ÂU]ÓPêò¢ôó;r}‡om' "ú¼±ÿÉí,ˆœ…žÇÌù¯w5È©›’v¬×»‰+%î+¼.Fº/) “E9]X%™¾2z,ìåÙ»’PŸkôG×µÞ_ò åÞ¾Ü/8}ó¦BÝ㸠Å5L:¤B];xIùZéÞÕ|£Ag3%•è¿ÇDMJ‹Ó;¸»›U-K#º¨…NX=(NU¡Šôz6Iú³Av »ôÔŠ*7!‹P%,{UXTÃZž’¢(RÝÓbàÃK'^j|(Ri.‡÷ÃÉдæÝ:˜¯nóå AŸ>¼|ª¹_v%À®íÜ£cÊïn—Ï¡ãô”VŽÁESí«Å¡!ÖÇ©~X¶›ç¢âñ·ÎIBsRŸ°[ÿ¥=µ˜õÏŸÝØÙ4”½ÃBm31¦Ï¬Ë±ý\Tý•‡»êµþ½õ:ʼª2‹{{C`FÛ¸-?û¸äØy‰ ¬½˜w£‰µ\ܾÌ®êzº¯d3:¬½ÀŽ[›øbûïë®CÕ‰Ë`y¡…{j¤ÅüÝtf] .Úa|JL Ù•Õï‚R…g˜Vw"ë1ºþI#d¨Z õÄ8£ûé ;“™ùSBÝM7÷ÃQVAòàá‹êË+pÈ׊xñÕÞ3I$‡aµêœ…CûœAž“|âз™e“Ï›¾è5’[ýRnK(úê™8Ž¢WhßñO¾f4¨LWÙùV»Î5î~¼ A1½µ‰<ÔØ·ìÈ}LBLï"”åDõnmÏI¼ôn–Ý k—?MÉŠ»@²Âœ_aˆ¢@õ|nVXR ´d¤­»µvjÄ ü87tôJ:´Îþp ¼[ endstream endobj 185 0 obj << /Length 2638 /Filter /FlateDecode >> stream xÚÍÛrÛ¶òÝ_Áæ<”:5$xiÚθ®“ºÓ:i¢ž<¤%A¦©T¶ÿ~X@¼ˆ–¥æåLÆÁ…‹]`ï»úàPçþ^8¹ãÃ?žÆ„ûq;IȉFIè”™;¿žùè;/ξŸ=}N'%iÄ"gûpF5èC“€Äsâ€?MéêìÝ{ß™ÁÇŸŸiâÜkЕœõ¥óæìWdd\“x>I—&z_fë"¿û܇?jøÚyr”æ'ö–Y>z‹G£ˆ0Ã$ÆÄžä‡$ˆ'¦10’~Þ“üˆ¥€+‚=Ö—"Ÿ  ‰1wfÜ‹ÒÍq`^]xêqD—ÙV”`zq ×ô†Á¸£¥Àâ­FoÕ “ù&¯e‘WFKÛ¥`aÂ[ºÔìŽÄ!Þì)v¯Ç|P­8é¾À DËâ˜ÄáÍ /‚Í0t ¬Ê¨Á5È>w[lJ5 ­b©MÝTT•Ìïð0aª$ Œ0°nr™×¢•Vý%GšúJ=Í+Šr&sP– ÄÊ¢¸œÕjơْsÜÀ{±Ha\o ”ÖmµWlêݦ¾weÊAé£4A‡«l¥gÔ­ä•r©MÄ ‘M8Ûáȵü¤•e‰Ÿfb-òYeàòå¡6 ø‡I' hèm¶Üè¥Öc½m¾+å/€e¦Ù®¾µ)ÃX«!w(-g`…7@¿(1à —Îqòݬ8ÕBÖª®—Š•¸oQ€HP¡¬l[êt çäL”Ïô ÷õš3B£xg.ùGQÖT9LIÑÖ€ÛÛ!Í=Ÿ*Åî6ú¦°Ž…¥¡û\–U}ŽšH5;’®.Þ.²³Ç¤Àñ¾”µè1ddfø”)¨YfG<3Qx7ÖY©…ײªAÙ~ÝÉZ9A›7p–AüMrò/™O—›™ ¾ûMUÏdAß ‘Ù]ÊI Ц”Â~”ëê©ú¯ŽÐOõÏ¥"2xs¹ë}ÃüÖþÑ® p!Îï#Œj˜læŠwz®®Áå'±4à÷ 9]X!kô*ˆlž±GؤN¹3D€:9Çõ‡‡¯¤u u©“©Þ›óÕ¢Ø, }£cüà6ËÚ73AÝwóÓ ËªG!߬&{lÝ1u yM#ÄuˆjÉóiëï*]Ugµœ"þ…œ )&ÊâÙ«Ü‚oÀ¯ÜåV`ÓE†¬Õ'Ð3Ô¿¶šY7It†]¢`‡ 8J"Äc7Ûέ&ÕV@z°> p@¾ÈÓ¨K÷Oó’AŸ ‘|6d’àŒÞH¾ÅÁÖÙýÆÜÇî~õUïfš:ëRÿðN¾ï eœãÄ3Úx1/à$‰z‚þ{À›hÁ xa&]¾)”_¼ÇšE†»®8ðCm{òœmÖæ‹v»j§É”Õj]Ê•¬¥ÂÞ RƒJi•f{f'&74Ô6¡Fm0œ”­´´¬ ÐRòzwFy=â€uÀ[¯®ªAˆPoG‰ï¬&SÝ÷ìYߣI%cÔFJÀ \Ï âeEIß½®qk‘™ _o×⨀ã°£tuÈ’;wF½¹þåâŪÝΆŒ+éx®ü¼š§$޲LHáY~sÉÛ¹±Ù¹%·sQ4ˆ!ùkÖ?ƾsrÒµË~ÙÈ b§P2 Îß/ éþ'™ÂCÞWKª¿N›êò EÃ9¨rUÁ|„ äÛy@b6§ 9NI {CÎtD Hz ‰aÁu´'ÙQuDP’$‰ÃÕKlƒ [®ŠJY-Tö˜†ÂÄT1i¤í÷´EÈeL' ú4:'U±–.Ù¤U*UfswŒ©0kÊ™¡Ê8ŽT‡»*w@­7•óp¬z5M©T)½×âOº×0еnG°+¼‰îª/M[K­t[KCáºAu3@}–¦uBÅØ^ÛRXA^0ßö~È áæW†“’͇ºÇ„• ã_'."Îmo¶S€/ûÅ‚”'ø|ÛMìÛ^gÕ^ˆn·>’44 Üî³äÿ³U{¸^î¶jùñ­ÚøŸµj ¹$%Qv5¾©Kt›3:¦Ó,óGêý«ñÙÿ:é–à endstream endobj 188 0 obj << /Length 2731 /Filter /FlateDecode >> stream xÚ½Zm“Û¶þî_¡øK¨æà{ÓtæìøÜëÄg×>·ìÌ EA'Ž)R!©»\ü÷îbФ YNÒŒÇ&´‹}yvø§ ŸÜÂß“r⟠‰XàFq4‰ý€¹~û“ZN–“=ra ;yñèéõ£'"™$, E8¹^Nâ„ñ€O¢Ðc±ïM®“÷ŽÇ<6¡ë¼~3õ]çÕ‹7ç/_^^½˜ÎDÄËWÔ¸xwõìúòÕÕÛé×ÿ|rÁã_ß,1¬ªXúŽéä!úƒgfôÌ,ñ}šó §LxÄOLfœ³$¨'/Ûé,t]'ÿVqt7ÿ¥ïwô)Õà0`Qàà ™ ÿ…V"=z^Îþþ4- -3‹"¹Éd&<–p²¬ênàjq˹ߨ32ò7ßPæóÝV=½—øÿô>ÿqÀU5fôÙÀ-ž°8 †ºøÕbÕ‚]ÀN᫆ýg»Ž$³®·MK­´h*M«ùòx LGL¸Â˜9/ïdÝ¢B̦Æn±Xp3ü¯§8äÜ÷YZ`¾³±ÕôFÒÎåËóÏÕÀØca’Ùý¾Ù–DѤGÎ˳ñä aQthrÜŸ\mÛ‘Ug<˜Ï£¡];÷“ãSœôÙJfµ/¤uº–­¬¦—¦Ñ3›Ob»à^Y#ãP©Ëž‹ë¸Xë}~õQÖÍÓó«ï/^^ß¼{öó7Dýå—}ÏvÁõ ܪ¼ÝcôìÕ÷€67W¯®ž÷”©ZŸV×ÊÌ×7²®û‘ø˜á±¶äãyºÐò¯Ó[ùxÇÕ µl·u¹ã6ãã 3ÛŽ~5¼zø°gMÿ€55ý­Ôz]æ²X4FéôçÚÿR±™99êŸ63‡3¯o²ÍÍB6ÙŽ«Ÿ åٙŎa_®Îß¡¹×u•ɦùŠx_¯¤ÑcÝh•mYϺùœêöWȵ9ZûܮçÀˆ´³¤ïó…QÓ]UÜÉÅÿÓJ÷uº©JÙгž¹™Çïfß,Ñ:œbæf¾].e}f‡WÍüêÝ?ô÷0ÿx–kŸ$†Úù\ºÓÌÁ;jÌv¡pÒ)wL»½ŸrPþàN“ß–ù×YŠõö¯òÅB–ÔÝ‚êMfP0y¾ï\ ·!9@€#Aµ}9›|¡²­ gÂÆ|*ÀE—S8Kt*xΆ|Za$ŽYnˬͫ²9£þ‡jKëôUYèV-ó,æP ò$t²ªleÙ6ø+Pþ‹Tݨh!Ò.­X îAJ÷»B/µì 3 \ظ„Ìó3fnaB1¢àöݶªíc£¬ZíaÌÜ8ný¾Î[Ô6Oœ­,T,¯Áv"IÀ)0À‘¨¾0h.³Ô@?ª’:Sú¹Þm>{öúQ×iŽ´) ÞãN)­ñ¼À¼wS8²N ðá6¹l°í++ vVeäðcÖ÷ Üy͸ϋ¶ø7ƒ·oq'±P0Ž´oQÈ‚¨„ˆˆž/‰‚.?†ÙhhJ›±qf 4à0DÚifWF«ƒüD¥ôc®‰YµÞ²ÕáÞºÜ6°KŒ4;—K¢ëð@år¡¹¡`éYJ[¹ÐógpšD!ÔñèSXÃVNqiô2ÀƒøTÔ™U[Äœ„~¬hµÜTµ&V8Ìëƒy:<5,wß nYµ@ò'‘0óõ6†X“Ä~–8 B¶.–†ø äŽ÷<Þ‹ÏMpÕ¯ë”-aµUŠžEŽIâ(“—ü† m)´DÌ‚hZÝ¡°yhZ¹¦¶r0uŽ(4Ñ·Uý@­…lÓ¼8Ó“¥>ƒÌeAŠ›Rþì£h`Š%ðŠ Bàü8‚Gûx ´ž‚®MäP/(4ETÿ\î#¸^;Ãð9æáµ\äi+IðÐ(ο/_¿¥~ÅØç6›)àG"*˜h…éÖèÿ¤è¼3›ónSØc…~éM+ÊpÅ ã•-D–ê)*Ü4¶Ò%V?ª_Å+Ò2e"EªN9” 3šA”0/ˆO<ýœžñÄUŠx é±Lš…Qäœ+²‡8K½ -X×wRD $çz2F½¤<7#öCŒ©0/GŽ,›­šêã¦Ó–Z*ö°Qöq™H*}ªVZ*ôkW¸@A¿Öóõh JÛ‚}à¡èû–J0¤“'bi1ŒK4—TÀäZ*¥y~@å.ç²±ŒUe£¸ŠP'¿°Ó >,NÙ/tÌ׌"º4ÀFQe˜¼° æ%dš xtµUÝœÙ|·Ùf+¼Xÿ¶•XIð>¸7—7j±#N•L$üxy!\ær¿Çy­$=ÂUÝu¾ª+x€GþP³T6x}²Ù¢ îÒ"o²mÓ P Y9 YÞ¶+=´$šÒ.¹Ëæbˆ„Ö B™ˆà–6â÷·1γ‘Ÿmw2Ì‘ 'f•Æî 3©ç‹j±®âñÙþ¤Ä2îw5jÌ÷=G%bltP¦;îW9z6Ûô#º³¤_”±u­S7)(k U>–’2u^ª“4ÒôI’œ§1©ª*™^ë2!¥ŽF%"™ø=³(Ƶªd–ÇtB7Œ½2zçÂÆUý±¡ŸTµ€4FÕK±)¿ÝaÄÜa "T…ç REºðÈ0©íÃFµ<äf©Ý]ÎÜ]ž¶ÑØe‘èÛjŠüv…¶¢:#æ€|¨ÆEn@Ž.'ݺÊE¡(µ_†V©Ç€œ?ˆ‚á…Üák㣈žýöÑë.ÏÌùÖƒÜzЋàЮo8ÌrwUN™ûóUÁb[npí—ŽçªÚSf·§þ=3€ÚAï<z. ]]$t ¹û7Go|ö.I†º@9v–Û© •À]Ýö Zo~»éÇ¢$>åÖ¸g·$b"<ð$±·‚.ÏOØï1SŸ9ß»’öâ‹â–nQtà Fˆv#sø&uÁ:> stream xÚµYmsÛ¸þž_¡Ë—R­Éà ÈfÚÛç8î\ìÔVzÓ¹»ÑPdñB‘*IÅõõúß»‹ø"AŠí»NÆÁ/‹Åb÷Ù]è_#ot—£bä¿0áNèò˜â tÜ ŠƒQ%FËÑß_¹0Ñ]¾:›¼zó΋G‰“D,M–£Ðw?ñÈwâÀM£¬ ÿ4ùÛ›w,éMd‘çx!p‘SÎߟ~œ\ÜŽmº–ïŒí0r­ïo¯&W×—Ôù«wDÝ|¼¸={žgM®n®ïw+lÒ—Æfï0lŸ9IÐfopÉ(tžÃµœ”ýžç$a8êõŸ¯ÄüóØŽ\×Ú¤Uº¨j‡:¾Ô.Êâ ‘… ¢šRr´KÛó(‰o6ï6kV©b™yÔ¦…âœ1ÕQ =W5È÷ü]ëìq¢X¯§UºY§Åãn蟧(ê]Á–eeØ,9°™Òÿ”÷•Ex9q͛ފ¨måP¶D9µ¢ì¿ž–Þ­•€ßü…Ú«Ó³Óëoß}˜L?±ÝRﯿ’ˆÜI|¿•‡¸§ór‘÷{ŒÎo¾³œ^ß\_ ظ;ØKd10ùb(•ÔCZ:ÕÝ]óŒLÖSQUeÕiúuºXL·óUZ½V†óz–jë,^w\ßø©;«D³­ŠŽ›íí.°M—ò_Í‹ùNâízsLÞ·¾;¡m7¹>~VP[n›ÍV;Ý:½ÊÍOëç›yV Y)5Ítçƒò؇´P=)5ŸîÞßÜNþ>²žÎ7Ó…¨ç]œûd5AH꛼ð"a¿ç0ø†TÃ[“9ÒòYÖÔ{‹Ï®&wÓáÊß`,«r.êúâ?Ñ »ÌªZɽ­Ee·aáV¢7«w¼Ø®gÀˆ®e©l¦sÔ¬øRæ_ÄÂy>ÈÃR1W\êÅ]úî;Ä_gEÚèè•VUúØÊñ‚݆æÿ;~Ø;ËîOƒûÏÀä´’`ÔÛeF[¢¹l8b®GêGÊÞÖ'=¯:ä9¸Dq( 1]¢yª³ír)ª3–ŸtòôS÷Å.*=Å3/sÍ«˜¡! ‹”E0LÃÐi9Çw )Ûž ìnÅ}V”Ø!$UÙ¦)«š¸ 2K¢W!‰^%—Ìê¦Jç€:J\òÿ“L¸ã±gõšÛ“ÂD@˜€EnªÓÂÁ·GÞ†mJM½NóœHކ()ÎÑkTÈðYh­DR,Œöˆºóck-ÖeõHt%Ò…"1?“Ć€ òeŒPTšÛ‰Šß(*¶ ñ£ë²±€ù HîYõŸ©ö”[]WVÔ3æÄ\áaŒ¨FÊX§óªTz’@-‰1¾¥YžÎrÕ­JÊ=C üü973Oóù6Oߟz <âÃËhµéåíÅùdz{uù~ÒF- ªï{ U;!vNœÀOÜ©Þùìf2¹ù`ÜZ/7mÙzGƒ¶†N€ÞÔ¿Ì# 'í¥ìéçÀ „ÖÞåµ;Àcž‡vmºr:õ¤?™|À¡•QZ¼‰MâÄqˆ@ÝfÉb¾“·™fr?ÞÕDw_‡Td$S$÷ÒÉÜ^1ßanpøT^u69€ðàhq ¹Ê.†'ÜqÈù,U&NÈã]0¶˜ËfSJÓ¡¦ŒA¹Žó@•°•LŠéà&teªÜb[ÉJÃw2Ù2g ´à#KO#»A+¼æ/ Ç`xø¤ï†;etJ4Oü‚$ÙàJ’17¸ÒÓõ 8Óº¹t æY³<->ù#cœ(ôv䑾æeѤ²Ä‚¢ìTŠüvH1Á…Ê J§´ÁBÏåTL`×<-в!z¦¦a•FÓ–U¹¦>¬°}¨²¦ 7%V—±oÝ cJ©7iWð2Óy¹ÝäjD¦áˆÔB#0Πâº!QÊk"Ѩp sYuì«ØEö b89!€Ô¾B¨ÈT±£v*­0fXbºø(”Jᔩ߇©e%ŽY@:Q—Õè«æwB¨6uÛ²_ÇèD€¾<%y÷_Iß"îøœ Aè´X`ÕÃ}K+Š¡.…P&ûX48àR#Ë&hëíŸ èCš3EYØ¿ˆªÎ\‚ðmŒÙk!È$:¢iT©»´!Ÿì’¹þ΂+ò^ô±£0±þ9ö°ôØÂn·Ö[|ª…ÚÁ ŠÞ_¢¡i+çæ`+ÁPüGäÅX¢b©|Añ­«%uv£yY "Ó‚Z H¢I—ø"Š(ŠüMGN–Žz²ñ¯ïQ8(5£@]@¨kc ôã^ Áƒî¤™bô³Ô Rò™«úŒN(ŒM,|¬Ï¶/ˆÆ·¢Hejkj û°äƒX§}ìVK‡z[4YNOn´ Œù—Ïùð…G´çR¯ 4ƒ8QùöÎÄŠRˬÜV´`%òEÈîM%#(½þàŠû\Þ›Ÿ0ñE!`í!u”LJq¹=´t|XdKÜO…©š%·‡v’öiªT«A26¼iÌ²Ž–æ#ß89 ¾¤j=™¬!Ä}0V¤kˆjöLä%¥QH izÇ…:)èžq}õŒ{¥l /Þý‘”(N¢=ˆÖÏ O»P¥ùÊÔÎp ܈΋Ä]*p¹Š›ØEq©”šNx%Ao5ý&ªÙÌÑàAsû ´ÿÓ'XÆ¢ÕâàPÜÕgôƪƒ(Òô,=¿UJ.GÚ"R‘ÔxŒ!I"“Úb Û‹ÃÛR½CîG(Uˆ<-Bì> stream xÚÅ:YoãÈÑïû+ô(ÓdwóH€ó%ž“#k' $ù0 ¤¶Ì,E*<ÆãüúÔÅK¢l9/a¨X}WU×ÙÿZø‹üX 6‰<«¢8ZÄÆzÊ„±YTnñ°øó :ªÅ‡þïþ‡_¿’Eâ%a.îqâùÖ_D¡öb£÷ÛÅß—ÚÓÞÕʆjùå§+£–Ÿ?üôîãÇÛO®VäígÞÿåÓïïo?º»úÿû?þú½æ5&𢠆UiJaŸ~‹•ÑІ‹ü&Æp¯w•Ky®`Ú  ƒÍ¬J;ÔQÒQÁAP¬–Ù•¿lܤ·Âzv™VÏüõP•{†êlÈ›nÿÙÖMVìxl]îí@M?”YѸª¾QÍ$˦Êv;WÑðŠÐàpi^?o;B@hOù³†±D @QvIªÉBÞÃC[lp¦ïOl—·0@ nÿ•kÚª¨ù£n7W×m' íòzF}“x¡îe?Û‘ù‡² þýù\uƒ&äÙµÀn %4@ €ÒÝTå ùlä tBÛ_ºù†ìë»?üá§x“X/4½éÔ¾ZÞ6¼\ýùà&Ö®û=Ú˜°}>R8ñ´/ LY³À‹Ã+ŒØå_QËß}ºý«U¨Ô’‘4Æ×‘gb{Élp™¯EBÞèˆÅ cyöï×üÛ#žùç¬Rò’DOŽ Ò‚\þ–mÑÒiÛé$„H™3ˆú~ýLó"'}Œ4 >£6}m/RPtYút6¼^)ÔË¥&¦Aý^: 5Ú­ƒÎt1 !]ΓMæ ½Xõ›%^ó‚þ¨hA¸¿ÿö 9 ì9™Ì· Ìh²¹ÝO&ã›?OwÛ-ÛhíËä""¢ru›7ŒM3ãx…^ä‡o¿‘@ÛÏ{(q^ľÀw¢(p{qdy{p¼%ø ãÒ¼ÄS Vš-H\!QK"˜ƒŽ†¯4:q°¬!9g;ç›<—-ŒKÀ65h­ª2vÑâÄÁÔÂ… £àrI¶#õÚ"_ædÚϘèœLÿx÷§Û//ÞWƃ€£[Œ¼­$™p€1Û]¬§‚¿RþA‚^£úôÁ¿’Žk'š½›z²³œ§A?É›#SâÙо]|"XaêÉÃÍ# _=B¶µOá—v{õ!æòí‘ÜVNl{¿ìGºãT´i.ÀKfõ3ït1´šað#@-(ñd³<]çŽÛé¯KkÁ¤ÛmE–G-Ý´yzÞœ¢#û›K ™š¨õÞ ÌÓ©aêmÌœaŠ ÓÔ  C¨jϨaùO_o~¼ùxóéþn~ Aø_n!P1êøÕ=ÜÝþíæóû¯?Þ~º™ÝÄ0,gæ-´9³‹cS¨Ä H(®Ü?:’£a˜ 0ÒÔFT"‹v¿&!3¬ä·~nÈÒ1JÐ4Eôôž'xÕµ~‹Š×CôOŠñ‘¢ÌHÑ g¤(š îîàà¨ÐóÔ©'*  É!†ß5‡å¹Üí]ÑÔüE7Q`ž; ¦Ž+vêÆJžÐ3F¢‹.…ì”èÖx-ü?²Åï³]KÚÁÚ¥ö,¸'mCÒ5ŒA9Ä_ ¥ %åO¦jUg<ÂÎóÓ':T=cÒo®‚‰_ŒKá²Ûð(¢àL Ès„*¶fh8b‡HY"L¡A?c& ¬8´ <_Çþòþ ¸ýt®y9Gf4´»ú7È Kw¡ª ãÂåÅBɲ~,Û µÓœ)¯ÿ¶5z:s$ÑžßÛêoº}…ž¿¼@“Ðz‘ÕçóŒ{…öƒÇ›ñŠ º|ŸKÄyfHÃafÏÀa­â‰qÚÊoÎ 0ÂÇûdLß4i±Ck‚Íi¾së*å «h1Ó‘¨dyç6«n÷^¨®²Øv9Ž•VvYPD$}Xñ$ŒñæÄhœGÀPbîG·y‰º±òÿ¶!Yµ˜wŠbO™c‹²ÿúúR(h8õØO>ñäH)¿í§¢ž{u¶+RLÎ0ûô8^YRÁQ&/ˆQñ²~®·G8’#–ÜRÈ• €¾Ü~^¥xéIkÔ§·®QBb¸Ÿ”B›¿ ꄈä>ŒŃ7ߢbÐ*eOÊ v÷U“nøž­³Ìu~#Š­§€’žC…UpmBràÅÆõ?~FL%+œŒÉA#DY8F¬]CYD²QG¬Ô('Áಇ®— íK:ì¼ðl£PFÏe¸»‡U[Ô 1o˜91íÆ,ï¦-³ÇnØ™÷“® †°q[ºrœ#ÿ|ù”{qY2Ûr¯>]ŠM`Á!ô„°LÜcûÊU¤Y^nÈH+‰^U_ERz$+FBUêJ”ÆÎ°Õu©.©(’Ÿ×ðš3ƒ=·ñ{Ämm}ªQ¹0CÊT(ƒ Ôž2s ²&PÀ©p`0~ˆzB ºKRž°#OÈ>= èwĈbˆ&‹t\£<^þI„ÑNLÕ©úÀí:ä®a!S½ÌBCîÒB:‘”Â/{B¢ï1S'† …/BcÚFzD[ÃþþÃÚšdD[ú$g‹YZs±ÅL€T€î;CŠ•‰Öó²üE ìô6úì_V¿!©f£@‚É’S¾çëB«¾EA L+’Eº ÇE·üëC^Ú©ºýøîà gËÄw~rÉTàÖv¥¤~Ј’³Gz9õ•JÑ©j"/üK†®O’‡*òlžfîf”ÈÛÉ(7á„ã¼#ò×o,ÊÑ ÿJ¾<#Ü€cZJ!ì‚ÃͳᒑëKS¸37oŽ f~5ÓÉry8á@¿é8ñÂÐ\";¯ëåM¼D¬—G®_Ió‘ç›XôÄçåÅ`Jgb3c=íÑäìó`x_p6Ü “>Ü\Ÿ™dX¥’mÒªÊ8”Ã"FÙ“â['æ -¥T_žË¶’0>ölO¯g[ŸEÞ£ß̦-Þçpj Wͧ‡‹Ì¸ÐzQô‡}´+IM\r«µ{I_d]æÙ7˜%;ªópæÀFÑbÚˆìñ¶E[…-EÉH1áˆ5{@M» m,´Côa(¯×¯çgÞž¬ì_÷˜mòâ"·’'–®/žL¶Ä¨¿ê–NN Ô$žÑ™¢¬èô'½„8Ê’á´âÃâ*dg=ìøÁŽã5컓¯³ÝïÈCáiËÃl·ÿ©!<Ö*I$oÇF,‘ iUcH@|º¤àÏršnŒÉc<‰&N)t·Û‰•ð=ß_*Ñ 5 )Údpë*­=5袮Ô>-iÕkµQäRÄÉó¾$4«Kƒ¡ô|ÁÌ]^h(re‘Ÿ‘šAsl¯9ON>â9"1*﹤’ enq“ˆD'_º1bËÞP53ø…Öк{¥w<¶‰ðñãW„ø-¹d-¯m6“ÚÍ×}îÁŽg†TýÄyz!Y¬úZ §&U—’&‘(õ”û‚.•¨úh„¿8æ`›Õ¢ãx¤#ÄÆüƒNd=>¤wJ1(ôZPnX—^³B[ÿœ?cBâ.Gc% ƒ6Þ#"ׂÁøÅmç &s‡ÖÅד (!è~!0h“¤KQÓ>í"ü¢”7üJ¸hüx¾$w=xù‰?*úÄ€9+†A:HoSebÈÜ´W?KW4FåvÔ¼œJ@å!-&Nù»¬¶®¢j ÷iº_5_3¢Scøäµ.7yÛ?A£9¹ u’¸’\Çø½¶¤i¬š((+•ÒrmÓJÑ*áÚ&o둸žõ`ÞQpÝg»QvYž‡2e<â)¶H>ð`W@kÉ`+Ýlh›æñƒ3yü¹|êeþPà¯'®=º _Íî3|—;JÉt)xÕ¿j¡’®0=}¹K&OÑe±ùìö`¼òl]Ñ[óéËœ¬Ë}÷&ªãÓ>ël>Ñ)óg0V‡GÊ®Îy77÷?üSé­‰ endstream endobj 198 0 obj << /Length 715 /Filter /FlateDecode >> stream xÚU]oÚ0}çW¸ì%™ÇI¶µ¥À˜T`4Û¶ ¥‰¨´!éTµûïsbS šP°s}î½Ç÷žØ÷¹xú ¦øQ׆Դ8„B“0‡€”ƒøÜ0ÐýÆ…×hõ\è2‹o(†`3 ‚‚ïqôŸÞ§VÏr+@‹!ˆ¨ˆRB:Ûc¯;Ñ ‹š†ºA™©}› ¼Á°/_ãk9»“¶ŽÒ¼Áhx]Ä~!thÉ«, •Ý@Ì„„)žo¢8Xæ!× fšÚ‡uF \œ D!èRzºŒnŽÃ>DwëVñ· g‡á)ŸGI\q°0t‘ÄGq¶/«ÿÀSΘԔ‘Wí~·D:.dŒ8´ ‘è·å…®mƒŠ9ZJç0Éo–¼1 mz”w’gÒ[@%DÔۆضêTŸÊ5dCãúJ±·2B–dþRq‰Ôøø~_ù&ݾPE¹BP©Á’)ÞÏT™E}e0ƒØÐÙ¡7ábá§Ü?ÝáPh§Z¶… £ZçZ2¯Ë©(TìnU VPT¢ „!sÝýLH5ÝÖ£ZçÙV'Ñjz'$Xäª+¬÷´ì›UoBʳ<·îFÅIգ涗†q~áÇao¥Šr¶Ññô¢=¼ì]yÓ/âØ˜HëóóÖ­“„Q<åÕ]ŠÓd: »»›yz½“ ¥Õ”§i’n‰5Õ—ÕT2læq„<”oy°ðÓ ZËy/›»5Øùbÿ³h¿kgÂ!iáÒRö+ÿV8¾䉳!_Á¯E,ÔTy¾Âäke™%é&’_´cŸ^¿~9Gêõ¤˜ ºòíìEÄrÓ@äÏø~%ÿKÍÇ6¦rÍÔ.C$vi¹ XœDŽjM/šç)ßÜtô.VMaM×™4Ž#9ñuËÔtDµRpÒ˜ÌäXªë¨»¯ë5þ 8ãÄ endstream endobj 201 0 obj << /Length 918 /Filter /FlateDecode >> stream xÚ­V[oÚ0~ï¯ð^&XcçædÝ*µEL¶6Ó6uÊŠ«°´»hÿ}N옚ª E6öññw.ßñù0˜ð¯"€øÏñ tñðl"ÛõlP0÷D ³wìµÎLøÐwMcàù;ׂžm`®´`Óp\ÔøpÑ´Qcй8îõºýNÓ0¾ØˆÉÙ§þiÐô/›×ÁûÖöjzmÛ„Äôø­…JÛÏeV86\]‰a›6$¾ âBBˆÐÕÊUúƤ„ýªXÇúŽjë½øŽ6 ¡F˜ÐPÌøR"féTn²y8)§‘1B?ù'þ,èLLn¦Yt»„Åm†¼ÎÀt}[¬³ùp‘ÐGñ 9ˆX(¼g³RõŒ-$ÔIÈ¢eº†‘Ž&t)-kñÿ7¨q,‘m7Iø¼v¸U;á®Æb+ÓPZõV è°F« ¹D‘y™Ð‰qtÎØH+GÞ³Q:UŽñ V!†SÊ&Óô¡„F!7?Fíp/Öak6ß”N7޾.ÙoªÚ¯.“"æEô-k”§›±T»50_˜üÓ‚>Ö¸¯:§ÇWÌþ(ÎrŸÆ¼³Ubó°–¹^†ŽóI›qž>ã¬Í'cãÊ}*ÕVd–U… ²xÝv]ˆ8À~œ\Ÿ%7çYIåqBéq9.G/v!ÙD>G 7_hæ÷).¨ŒÕÓ‘¦YU' ¼~ÀÐ9æo©K$Ý“œu—¼©ªs³p4b‘DŸÆR.+‹x^lžµ|)dü¥01Ž8Õ-ÉÀnoxÑ> †'ƒ ôj~¯;QœÛßß=í²hÉ&•ïO˜¢·Ðs5L|Àµ¢(;üá¿{w¡#71¯еà]ƒëÚJ´‡1mÕb}U èÛçí^»\nÌTq^ñÙ†W{wÊò¶¸b׸‹6G“»F]—«ì”!y,··õ á­dû2Käìžn) ðYJ‚ó”’P˜ŠŸZõ#™©!ç1oJvªòdS•ßí]ˆ3õ¥Ì ÅÙ÷­VKV%Åó°Û;î´µiÈæëç{Ð#þNŽX55æXØ…6•dZ¯¹h÷’[뜕ö[¼q&N~ô<\fR$_Þ»s¾nò]Þų$œ”Î>lš¨q×ÄN£ XÌ;Î|”r>Í1ßÄQ KÿlíðÛÁÞ?ÍÊX endstream endobj 204 0 obj << /Length 973 /Filter /FlateDecode >> stream xÚ­VmoÛ6þž_¡¡_ì­¢IIÔ˶È'óÐ%i¢.¶¡àdÚæ`K.EÅ+Šý÷’&%Q²•ØÃ`È¢ŽÇ»çxwùÑAÎR>×Nî@ùÃI0Œâȉ `ÆÃ©³pÞ]@©ë‹Ó‹ÉŠ$¡:éÂÁ>üÀ‰BÄï¤sç÷†ã?Ó_&W^b)z!K+{•Ÿ~¾¼K§÷c×Ãp䃱‹C8z¼Ÿ¥³›k-ümv÷ G·wÓûË1Bh”Îno”íÐÐ[:·QºÆ»{ ÂXcxÅòl]ÍéØ !}_Š9+Àêe_ÚpɰêšýušîÛ–õw†:§KVäÖÏ Òú“½ ƒ$Ф!–½—ï-‡Ž%„ m|Q噆ÍWÁõ€ð{¬6Ì'Ô(~¾F›ÓÃddS‰JÞ>é/ú¼ë”쉚(Ë¢Kð1õ´ãLžëÝœ/„žºÈì½Ø1±j˜3[“rÅòe;eðæa!k‰7§M?8pÒy…utE4”ÇoÞhDÑ©dx)’Ru)¨Ïgðt6³nÖû? bUdò ŠMv®Ø²Rù×wûèÛ±œ„Rš«°”ðnv«dìI’#<¢úb¤„êâ¢Þl£D§Üö§éÅÄœ.j endstream endobj 207 0 obj << /Length 834 /Filter /FlateDecode >> stream xÚ­VmoÚ0þÞ_áOY×yqâ¬]¥¾b*ÐÑìSW¡ Ô&Y•ªjÿ}—Ø!v–ŽN›²9ûîž{î¸ód¡5|‡(A>4ð1%>ós)&®Ç\”s´B_\$hxpì8ðl…+ÄlQ ùžƒ™ë p‰îzv°aRônf†KzÓáì|<M††iSަb3ø6¹ GÓÉ­q~9XL±ëº6öm^+“Ô*ïìp¼µ8ÕˆY[1-‡`êSa츴…(|N°ïºBþ±’[(EŠü&O|³1LÞj›,Š8Mä¯4›è™çÑš'”À×ÂB¦Eô(¶ÅC,-ä| úGR/YV^Méb/þ (Z.k£Q!wЧ´>äb³á?¶> stream xÚµVmoÓ0þ¾_aöµhqí8Î ÓºÒŽ¢­-[B€¢¦mDš'ñöß±c·uª TU¾œï|wÏïü`0çÿ3ÄÔs EŽë×¢Y¶kƒxu€¸ g§þAg€]àAÏ6màÏ%Ð"pl]‹ Þµ¨Ùþà¿ì LO4m 1å§T"½݉߿l&E-ÛµQëÍåÐŽÎ$óõpr%©ñ¤ÙmcŒ[þp<ºgoÚ·r㺗†²n`„ Í#¬œèˆ£…žãðèX–ä?©øCÚ@ã’lÚ6l„Zá—˜…óX~ä3¹&K΂•®¡” L íyú±Âœ«ŸÚÑ4èV³ÚJ²²ÚDÛ튭¬¿GIËËîY¿’t=hÛ–Œ†4Í:@c'Ë#©<Í×Ó¸²)tè´óu)µ¹X`;8fÝÕJz„Ôwî>ÕaêFÑz¹NÃR¡>gá&e^†©$1«¥€Þ;t—iO³r"t¼ÉŽI ‡ñžÀÈžÀÂâUÈâM Éu–3IL†cI°8œ&Ùü¦àÜ›ƒ#·7ÛÕP² VI-âè“ÎÔ²\Ïw•ÓF¶Y\®Y¶S74¥cå†R{b=á¤rPe')T),EÎÊúõ,>I~UBQ˜IbÅò(.Šÿ®ñì”×ë`©œzt²¹¹Áiwô|pá×¼'^JîÏŸ{!'õòé6í Þø9ïžÁh<ê7³öã¦6Â33–³›‡ª³ªÖp¸Î¢|«k¶Ž!ÓZ‚<ÏÒo‡Í<£z#û‹ÂÐ=üU»_÷+–ó<_)Gyp*©âP䦒˜—‚`ÛbVyQ$Óo Ù…i§ÿ¶ãhuó%YA‘dµ+yôgqصÁeÈÊ£Ú¨ T‰7¸E™¯Žn*ŽÇ²ß)ñÑõùùÞN€Öî7zaiÓ@Åó°DÜ2¯›£ïd’3t‡>,:;1~I«QŒ‚þyÿ¢?ò¯öôZa™ ºônU.ÚÂÛ"ùk(Ó„ŽWC¹™t÷k¨=­j@L8d67C0t]¼y)Í×b¤É×÷´Íw‘x? P³k‚Û&/ó6¦-õ¢LѲŪ®§ …ÏQž•pÏ­OÀ¾ð¯ëŸ endstream endobj 214 0 obj << /Length 3256 /Filter /FlateDecode >> stream xÚ­ZY“ÛÆ~ׯà#˜`Ì…ÃyRlIÙT鈼ÎKœÚšÀ%l PòV*ÿ=}Ì€KÑNJ¥bOÏ`Žž>¾îÙ_Wbõÿß®šU ÿLžF&N³t•iÅ:Éôª«V›Õß_Ä00^½}ñ—Ûß¼‘ù*òD&«ÛÍ*Ë#aÄ*MT”iµº-Wÿ T¤¢uh’8øøi­ãàÃÛO¯Þ½»yÿvJÌ›L¼ùñýw·7Þÿ°þ×íß¾y#²É¼ZË(•¬JS…cÆ}¬B­ ?IV!üæZó¨ÛmÕUëPè$ ¬£²À:NÑ;Ïl7Žûy- ®íP·Mï{Þ’œn)$r åÆðŠõþîÐUXì§ØÄð_,œ%Qª„?Ê·ëPç:xlëPi¶aâØW «$sÿñi½»¡½°d(,:ßëÐÂéâD›¶+*¢U𥫇ºyp=nˆ"™!Vê⸳ë8ìlQ½„†L@lM¹°ãø9Ý Û®²å…m G&O‹ÛIcM’!‚'¨JnUxu|»cˆÓÁÊn†ÙènA%•ˆƒªŠµoØ:b€ÄÁ>T}äN”¬xéŽò” è£‚H Ê}ÇÁMÙòo·YP=B==$Ê'é¬åSµ&àÁ¡†c‘æ"w3T 7pnü­]ûçc?¸ž­ßÛ½ÿr 'µ§~XZ†fGIÝÊÈ,Øtí©4øIÊ”y÷ü;j 6hG0ÌróÐÖÍPun’öظù¾ÔÃÖ}°Á¶º 1 ïåæÝݧ×oÁ1ܽúþûOÔ%Ï"¡¤×–½-º6Z2Ü Æ¡1ÈHã}âàÏõ¡¿ëëæ—Kv ª”ŒÓ—m…”)¸ºqIÑÓÁŠ“ÅƒÀr `‚3`}¨+¼Q ÒÅ´B§ „^:ÎÞ²ôÜA“OGZnlÝ1ƒ;4^CSÚ®[Ý¢#mÈ-35¹lÂáå}® 8'ZœÃÒu$X ÚÕ÷í¿ý:Jƒ`Í®m.ÁLE⥿œ1ÎD:Kb.Ï›‚Äc¦÷$DnÈ™ŠŠ ü„>s´¶ïèSŽÉßxʱP1»Þqñ.f½¹¶–p—S–ÿÌÛ ½Ù^•] SŽ…CIy75‚Q"÷À€$džA=ìh€(+<_Sq\ yê3ñ\…ëbèœÁ2^ç`-¨ðµ„cOI!—µè)æË#cÄ5 ˆ0ßÙçäöÕ5_cp›BLÒÒHž¡™ó¦Ò(Wò<Ž]s:¬£ð®€à2´³•FêÏnÑ…©ÿ³œDNA ØÕ¹¶sn-79¹âßq)}õë¹Jð¡2ÿß»éªÉþæ+]-׉Í-Ake–¯ ØŠ2é 3º”Z¸Rà6ÇÒa=böõžÊNHO<36¿lkÂyX-Àù~;TÅð׾×qâà !$w–¦`çýãb¾/"‘˜ßW” (›¢,ÉLŠ,ÊÒ³¸q;9ŽEMç‹"g"Û¯û- .»˜‡`Ó$ÆTØA*…ÜE¸E©,“sYEjaV4ÈK˜p ¶ c‰•3újëo,H³± u­±8ïÄ?—Šq™<™B˜ ?mÇÄY`w}ËKˆ¾=Rééåí„~Öó]íá’ñš 2ªü«0 bâDªß†Î— wšDFË™OÀ {;‹ŽÑÕÔi±Ÿ6:R:;O «Þµººø¥Ÿ'“ƒRbª4wÒCŠ-*Í)+v¬%p–¦5»²=(ï¶$/y=Cót‰IžNò‘k;z¾ËI¡ô 虤tSBwÀ §TäÇ~¨ö˜³×îUÏ…Xéõ–FµÏ$¼<Ÿ$ýö€Wà·Ûªd^ö@þ€{'ê´Ml1Wƒ#>@ƒ. ¹XÝÅCÍIÄÒ¢ÇÃ7†}*Œd!¶¯ fú}!ÍUgn½íùq"wÉ EÛu'i }¹´*=«ÈXŸSÊ…eg÷vÀ-`«Ú ÝÐÄ8¨uŸ³p±º~à¬<æ Yt¤HTàVèa¡°ñ•W}ȱcª¬[ïž}”€jÄäQ"qߦß[0”gž@Ó3þŠ3? ArWáiˆô4…,; \ˆº§¤1äaM°ƒYeÕ]}à"裥K¹eCÆrƒ¦dV2ÀÒ/üIÚê `˜¬é±hÔ—%åJ^°ìniÕ/[ Œ*ƒ¢ê@žÔþùˆâ&´EWj rª„QÄ.ë‰}Ë”˜Èd) oý söÄ®+.]å&þ–‹ùýÿK9æ8°¸Èy/ßíZï@‹«UcrYÓËYw¢Ôh[``íXîÂîu †ÜW›¶s•K۸ϜÒ`ÅueÑ~qË%¹–d.ÐçðM$Ɉ·ÉYQ½ È Èiàˆöþg°hçÏÜöS,Sú¾-jK—¤æñÛRDT2âl“äÁ+Š'jfØä ´ð·î\Æ}Ž(ølˆn¢”]ø¸¶+»ÐÀö샱O“¹cúa® €¤Ë8Ô¢¯ +°`ð$v#$‡1PÑŒ?&3¨°$íšÚ€g·Tr„QÎÐ0Ñ/íý"Zs7ƒEW¿e¢l6Qä»7E_šmù×a9íî×=¼š ¾‘'gt û›î­‰iáU¹µïúÇŠº`J5·çG1Ígq€™0•£W½è3hæÇÅ¿€T6¢0[–wd-w^ /N•Gi¢¦/ì5Ìý±¶i>‡`’4Ò¹9®¼ÒµEp+F»äß%K·®rþåRŽ+Þ‰ÕžN,N¥€ñáhöbxùåèÉ›«–¾tb˜ðO¥ iÒ(VϽµ={WOŠ^¾òtÅ®]¡ÓD*6O ´~‘»MórIç.tå´Ta›ÈIÍåôÜ«ÜTI^¡Íãß§ ^xÐQ<«ÿî\Ÿ€ç×q!_Ù]|mPùh1_Ùyý²±™ȧ…§£IÎ2iöwh‹ä®e ÖÖuuå-´ã¿­ÀÀ$Ô$Ý_j`C$ïÓqÓBø,—£ û&o'õšç_q.ãü1Å!;ÿRri…´òäyöƒ48@G¿=eK? s¶v| ¤0¨ #íâñ#¤F”s¥î™Þe"Ëî&•Ç"Ù§c¦,æc–²äA_ß¾ø/ÁÛ.î endstream endobj 217 0 obj << /Length 893 /Filter /FlateDecode >> stream xÚ­V[OÛ0~çWdš4µƒ¸vç²2$…uÚµÑöÀPR·X„$8) Mûïsb‡Æ½Q4TµNsýÎwŽ}¯!mÊ¿§Z¬AþÁž0t\Gs-  e»–ƈ6Ѿï@.µÓ#§u‚\ÍžmØš?Ѱ ,ÓÒÛ®ejþX»l`«yåk^Mа@˜[)E¾|=ìûAS70l˜ ©c6~º~÷âTlþèö‡â©×ï ›¡†ßí] ÛÏ­[¹óz”ºô®#hÛÆ"ˆ÷4£Ù˜4uÂÆ~–in ܈ŽððZш^o'û@Ó¬Uü¼Bœ‘)Mâš‚a!¡Ð*71ð‡[NûÇr¿4mkµý>KB’eÂþd‡9·-ÿ%L<Ðø°üÄ›G3Åc~#ãKéoe•’X¹‘³.]ëȶçnjÂ’»ÓAš²$e4È7ø¢ ¼ä¬@Æ­ûjÕ4° ~–9 +ùªúhF©@±€Hˆ:§œŽ"=Óï–²ÖêXävÂö–Ôm ln£Me¹Š"‰¤ „òÌg> stream xÚÍVmoÚ0þίpùScâ$Î˦MZ(S M?mS”ÖÀɜЩj÷ßçÄI )lU»JB±Î¾»çž{Ñý,ÄPÅ;Īe[À60T Ó6'`¾4TñPÃFÏktš蘚 ¼9°ˆ0–©CÛÐ7_[:Ôa[Á¦Úº˜¶ µ5N»ãñȶ áh"ƒ+·ï&îeû»÷¹3@vÅ®ahÐÒlá57‰qöæÇ¡¯W5¢”VÇ€’¦:™%€¡cY@AÐ*Q¿ËåAcP‘Ø ái[1Uµ0ù¥ë`A`®  Ò¡éØU[™»jªSÓßüв4¿TëâÌù7«ÒñhÜžæmáÎ6eFÝ«*bÊŽëÊØ–uHÙ®*G›"tð1†²vÞIö,èèZqcÖù¶ŸÄwIÂÒçŒ$!§qñD æ—‡¼†²C­ã ¥×tEÓÛ—eĬQ?ßÒN×~L£0CV–¼îr´ËVΈ¾k™“tÃÙÖRQúP*Ô4:èÆGVÿÂ*S>õ6¬ pGËBõ{]÷d0öü«þYw*¥÷÷[µ~4£lñH«?9cÆw'îi=#wÓ!’K8øXS¶]³ÈosÃÂhFf!á2à2‹ÒŒØê¶YÏ£úìÄWÕ~—¶òj@Ïk«‡"¥lI8MËŽâѺVÎAquMD…×ì©0ö³ßÊÈãÍl©K’–ƒi-êVž—bt×Ç“ˆãõºfíK÷~æyw¢¼³‘{éMGǵäºWççoÙÞ†®fµiZ–@LIH’²8KÚã(Ièõê¶ö6àÁjEVGOgß8̾¹—ýa„)©Qÿ—ñ’¤Oýˆ‘‡ldãÅy$+#ËßE±|¶wxJ Õ—eíWS÷ki{æTeÛYè)¶A¶¢#hd@Nä2¨C„Þ·ÅmeAYëãMáV¾‚e² T±–!ÿs)<õÏ¢ endstream endobj 223 0 obj << /Length 2588 /Filter /FlateDecode >> stream xÚ­Yëo¹ÿž¿Bq?tUX›}q×ö€ÜÁI]4±› zMaP+Jâe_·û”^ÿ÷΃”Vò:q€Â°—ÉáÌo¤™ù³ ü¾žU3~D–¸ÂKÒd–FÂõ¢8f­š­gæ£7{ý쇛g/^ùé,s³8ˆg7ë™Ý(ŒfIºiÎnV³9"žÿûæ¯/^Ùˆ1ˆ}×° ±üø——×7ïæ‹@xNèÎ"öœï.o.ß¾fâ?.¯ßsëêúâÝ˹ïûÎÍåÕÛ÷¸ö^ if—E¸Yñ^«z¾ð3áÈjî g×ouµaJoFú­â†.åF4A8×­Ê‹º3#¹,Š¥Ì?uf­ÖÐ7ƒleµ@¡@ …ï»™¼o¯ÔjŽÑ>A8KÅ_\lî;juŽ}”l’Ñ'F^$pJÿ«Ìûbǃu•£¬a$œ÷ʬŒ'™¥”Õ `ñ§#rk]·ÆPcÆT—XCéòV®V·QÆ­ÕÃGOxðëóÇF0+I€{‘5×CQpk¥z©‹Î52Ä£%@üÐs;ùânî{Ž4ó¦x¸7L <×|žx³Uh@el1ÁÓA÷Ö˜H¹ßê|;悆®æ‘çÜÍÏ©?áîhdnT«ë•F!vGªŽyËåÁüŠ8tVCKˆCªšW›ƒìu]ý@(*³Øãqo+;nÈ|d¹ê€!N"ÂNœÀÂüéúvÈá =wóºmW$öu)aœ„03—õ`ØÁQÓÖ›–vL½Ø©×ø‡\ƒû9C§ÀÜÌLÀ[TëBW½j×dY8ÅÔvKätBe`”3C/i aÍÔµË$òlOã Å>ûH…}ô~gÊNÄ0> îdñüûaèfÙÞƒž‚|Þ- ï±Ó1†%QÊ‹„nè& ®çyÎUÖíŽWiêܘûíÜO9RÜéN÷Ú¯úȇ­‚Éa9;ÔG=p‡\L¤ÎÏC×óÀÞà›¢^rKM¸lµ\ªÃ@rÎI%æ½Ý¡ÍvŸØP³2°à&Ã,³S§S¿ Š g e¶Ä‚ ¢íÍZdyøDÄ (^O¡}3”бÇOÈEÁ8!‚Ñ>xéGÏ ZÒM÷áɃäp`à±çAŽšIP¶uÜÆ-œÏiã…Ýy\‡í“®I™ÛºXuÆdžØfGÈl•ÈŠ»RAšêlb‰1 &Œž¦lSR² !·CÚÄ<ÍqTN€Á4IÙæHÀbM‚SpuüîÅÁN«äjQW'…‡=&A •B[qkI=€À0X™04À'¸QSþÀ?ä\@aÏ€ÆÈÆ'H¸aûºm=+n“¿ò”2dmÒ•:椥Yå|Ia”À™ ª¡‘˜Êqf'(¯IÍÁ!¬Ã 6IÓð•¼P§"‰Ux~rL¨¿tL¬*Í ô²ÓC.B—?¨\b˜˜2+é5ÌBÎ Ü´¤¦Õ‡Ú«§A.qPšij/v„ì™Ìñ6ãˆÓî[Ý÷ªš”¡F9ÃÌyoN{ö΂§Âr [öPÆY¨‚@:ß‘ìuè —f£PÓw¨-bž.J¡gÁ£y¾É!žgN”^q“Îï™  V®…µ:Ðd4ã}e…©ÓBV*GÅZäBN ì=%qSÚ*-25Ú5bP,˲$·O2̼‹¦ b¥b Ð ’ äHÜ,4K±'.W–9€‚00Õ¡ äFüVäåPäJ&`ØB1©š¦&ÂW @=HFä‘¡ûXæ±ùYbC 6k¸$±³Òpw¤K«ŸÅ”]*Í— z”—:˺7 P › ªBñ:DŽΆßS×m]r‹ ÎåÈ jÉ[Ýôxh¹Óòˆ8d/'¯=5ÝUæP#DPr´ ½ˆ]Ñ£×úò5½Çš‰êM—­6ª­ÃÉe¡c° ¸çU«b2PÍø º YÈOGI è|KÚtÜ#Ì‹ ­@¡K›,¹s¯é‚uJ+»--o ³¸>–ÍÜ£·û‘ïi6Iæ†"á W„ B“_#›ÇÂ!i‡ŒòÛÈÃ+™fnœø£g‰ö>ߪ/?DøL:P×¼0ôT÷‚ã$ãÐûWvJ`F¸ÎXS¸Y’~“ô „±0ë[®T@f€ %(? Ý4Œ”Ähɘ|>cÐc=kÇ͵¥¼zÆ¡è,s^!Ð,£y‚‚Ûš)·N¯€å4öé¾ÔÀf^(H +îH3n뤔K*ü. zÿÀ¦¹NUMl›¶8ÿvßMBôáý>€%|Õß™¨9_ĺÿÔõ+]»Ûï§NxÂÊ%ň¢ræû“¼wºé^àŸSv ËI¿#UÉ@ˆ^íòÍË×ÄïÂf7±/ž †Üˆ¬Kžl‡o >>ùkô?¼.&£“úçÅh]Ú/ïg8Gôâ¼'_±uo’#°ñîƒa©ù«9×î·)Ý8K§Ž%³Ç8ö÷õAmÇŽgi#­ëÇ$äã' Õmu˜¾Mú£‘ÂLƒá[U÷“l¬â”•üäùÿS3€ÞNõcM,¾ÇxÎ]ïüQ%\¾¹%Þ¾¿üéâêÕíß.ß^<¢QZ"öÝ0]†<7°ÊBAþÙéÏêIª=µˆ7=ëËÿ¹¦ä§Øž^kÆï"Þþ™gtÇÙ?Ö#3"’lhjøk¿ÂcÕb,Ô7¬ø1ÖB/§#зū»Z¯¦ÖgÙL‘o%ßE)U<%HUT¯‡©X¸‰Ÿ¥±1nÇþ†»&c/Ñ¥ ä~ü?ÖQdçØ´øþó>¨@Á; ÁøÐY{v8Í!ÄüöÛ£¾õHĦ̫‡¼Xp|ÛJôÙF (g_Y5Þ¯JÿÿyRØ<}mÛº½U¿ê‘8gk©‹¡UÏÏ8+ML8ëO¹¸yö?Ü<‰¾ endstream endobj 226 0 obj << /Length 2161 /Filter /FlateDecode >> stream xÚ­kä¶íûýŠÁ¡<ÈO’eÙ¾o×C.Ýi.ȶhÑÆ£™q×c;~ìÞüû"íy¬w“Û‹…)‰¤øEq~YÈÅþ¿YT q–„±HÒd‘ê8Ú¤zѺÅvñý+ˆbñÍ£ïßn_½ý¨ÌB‰Ð/n·‹4 e,&1a*Õâv³ø_ðao›ÞµË•ŠE —?Ýþƒ¨t»I¤‹•΀ "‚ß|ú°Û¥L·uô­r‡ÔÓþžÔa¤b6±òD6:”Ë•B7Uï9Ô›!"dºÈÂÌ¢U*T&!Ú·ëíré„e‰t´(‡—Á/lê|8¸ª·ž¡Ç(:Z*xÜï·iëÜuÍÖ[Ü7”2Ìâ˜6ìŠ>ßÕ7YÐ×ðMD°ëï`£(MüÝ–ÛÕ¦®ál5ز£mQlŠ®o‹õR‰`èÝfn/Øjö5^»7ÚjCJ-ãàˆ£8èöõPòÊÚ1jYÀ²àÒñDìÊ3ùÜ—û¥Ôx„ZÍj6 ý‚÷/Z¼©PÅ„yœ­úâàPòDÂ|ÑFí%€”Ô®,vû¾<òúÐo,ÅrˆK’fu¾+‹4EìÞv¬«*ݶ'h¨€Kµó,a¸mëAl¾wK(êùÜ£e\;¯3ï~Ë:I/%ÉbDVßb;^d“ÀÆ "Ï[´ô=îk‹Ò®K7’ŸÈžÒ›±vçäöá‰ã²X·¶=.M@l-ƒ¨TÝÒòÆõ°/%‚ÝŠj[·;ëx>< Ž…ÿÂY±m_äCi[šŸ4{CgÉCZÂC‚$tÎ`â_ÿ¼ùÏÈmU•›Û’Ž ;4ìðtI|]M.ÿQÄb[ó€ÙšÒÁ¼|w‘‚ÎRÑU6‘i˜hÚÑõ_ÁRŒ`ŠÃÏvÝÍä¢Ñ+'“0lK2NŒß)ÞF{qž=ç+• 5˜ASÚuE½fäÐI˜*9¢S¬®d¢!ÅšK›¾ÇŒ¥»"Mƒ¼=7ä¿r_4AuãZËÁЍÅHÝ´àî]Ù#áÙiîsßÚ¼Ÿ‹­¡ƒ€z÷ «f`2ÂÈŠù\¤>J4ˆØ× ų7‚{‡Éà5¦æßµ'ò½ÛLä³3ëéÚS Q–¥¿ÏUž“2@;T?CRĬøn<Ò5Sº‡Ñ];_SvO䫋쬴 Uš-´ŠC™òFßùúTië€2)XtÐÒ¶|}‹–gFÙý$‘Âtåãùzf†ÎW]Zy¤§ò³7±Š3o ‚Šž ®hkø| T»Ö ]Ö9ÇW’>¿Â"­Æ;éóÜ­jÈ댠ð €ük–¨ñ5 n"#tùªˆ&md”…"™Q'JV'JR¯Î:}øê+|(ŸŽý¾fÂgŠ#P(þÝ ITÈoSÑ6¤ÎHÒ‡ÔˆSP#ºÔƒüëÑ?zò&ÿÀwô‹Ä«[2‹C-³QšªhÔŒÄXgè‡ ¯ÿ%cðã‰&2aœ©3Æ„ü-Uk3V1ðZ3g›xWÆþþ÷&P˜òÊ•?ܼÿÐ2@´5û"÷• !°éy‚ ¶Ý.¡š°PòbÑ)$Õ™d @Ž5Þ€™.ÿ0{KùâHLuªðeÒÁ§ýHdK"åBó^À(5“±|¥1ë…,ø€A¥¤Óxª”(XŒ ¸zu½ |R"•ë§¿ÌA8P}±ÝŽÙóÞs*”!Ì\ÕóuûGd¦N3çlzÞìÅïåç~ñOƒkéÔEÍÔs¼Eõ ÁútñnKÞø’MÅuR‡%~Ô¹ž€¡!dËcˆÞ–QŠÞÑ÷Réóñ95÷)V3/rÔ;|iÊ*Ë"GÒŒÉDŽ/u˜"ƒàÔ)¿Ã€ž3°…xl²à¿K)±&ÒðˆTÏ–Küàáç­ðÊ¥?³V¤¾4>Í5—/ŽÊGr<ŠÅߺ[|2€=E½%è³õ˜18ÅäâŽFc`HYSàýYUuO0&Χꔳˆiù[Y/ ³ Ówøù¦Ñ6¹…dO˜.xÞúáXñ£YúpãæÈµwªX^ú¬ÃòuG%RF·†NO[*n r{ FdZí/È´þT%ø«XÙ¦)á‚¢—ò…mYÜáU5wG(Fñ…µÔæÿs© S_¤øš†XðB+qîZ%Xh‰VGÝ4Ž%øö|ÔáXލÃ2}Õósîªuq°ÕY[†Ûãs~;”Ü´¡îRNäËp…q-`Å-àSO™_>Ý‰Ü 5’+ ‰³‰|ê!¿o!ˆ®/òùî±LC“r‘1jö±Ø -Ú*ÑSdž+Q€À:OõÏvÔô¢ÏÕì:¿nïh‘8§Ô¸c j^ÂÜ–¾ÎúS +§ŽÁ̾®tx Xˆà¤ûL€¥OçÛú'Žªá°†Óû^`jbêáÊy§GGÆÎL 75]«¾^y€zz?*• dXbœû ~v6®qÕ¦£.yWÇñâ U¡*Ž<™øç‰8¹ÀùúöÕ¯Û«ƒ© endstream endobj 229 0 obj << /Length 1730 /Filter /FlateDecode >> stream xÚ­šIsÛ6Çïþ~H²hkÆ2ÛK% ™µ–J#¬åqF³n¶I6Ár™²›¥­|S&y}äå6ÇÃÛ}òߊˆs“?®ž~=J{¶½ÚPþ„à~hK…ïâÇl¾'ûjö2a7l[ørå=Ú¿1¦&ÝTóŽ}t|9Õìĺ)Ç9Ï6ÕÁY¥Æg! »Ø³ý‘ó2a7g[Ø ê!æû²È‚žm«4ƒzÎ=4gˆv­Á¾nšäf*¦—i»Y[ÚÓõ££ÜÚÖ}Q~¨“l¢bÏ6Ù¦/CO±Í¢ªë~RA–ɺiÛ²§xmòdEÅù÷C!.«¨+ÑYÔ—’}YlË(Ç;ÛF^"bÌ^¢£'ºmáœ@¼LÚØ’>þQFû=”„ÇcÇ7s¶5˜Ðc*ú‰b² šû$ß<·œ0-m;TÈÉ4£HC àqUŽÕl¨šU”Ä\6]·má·y”>Tà T™®ð÷V‘êW…¢srÑ&S—QiäJðÞݳmîn-mHýä×õMFfÊ­iöãà ;ÁÛŠ']Ì$ôºØšz7±âÎ7ÓÁZÝPúI)Â% èb,.Šx<¥Ú¡RxI©ê½‰ê¦œZæNØí[[ú2Jã&ê.­-ø·ó{\\q ?ç±éW¥º„k†QW϶Úájh´5ñ”NŠ ÍÞ„«/“u·eŸ_Œv¶}´Ð[ká)‹„>Ìõ0ÇmÛ˜g UÜOÙª/È¢ev;Õ–ž“EÛÒ´+ÑÃEjN^×åm’ ¼¾^QèÛP/ …Ù³r„箨ü„Ú¡ž …G‡,“u;Ä–ug™ô³íw ga®ü gIÖe•dq‘×ê ¥Ýøméw&+ràùè°¥Ië(7ESõL‹ªñÖ{¾q¶#¬=…5…Å_éžíäUùB]7X[÷½ÉMù4¬Á˜¦*’M­X›ªkÐöQ]›r|7{¾Æ8DPÚý0†qŠöñ ÖO—óeÊnʶ²›2˜“ôˆÁ®"µêÄ ä³~Žœi‰Hè'¬™†Õz´#òoM4‰|¡²ù@yˆ¼*²þݘEÎù9p†Áýà œ³ÛD[Gu¼s4Bí>ØÌÂaB_×IDÊÆe1q™¸p¶nÚ²—­ì`{°p_'Žúr¶e_*zâÅ—J P„/ó¥’ åÅ—¶ìÈÍ/rJ(/²ªmÇåPVç怜'¢hgwÙÊ×í½Ç~û&ë÷•ÁžÇýNýº0›mº#Ì$@¤Ÿ0“ iüÂ’!9"ØOɰeËf½víÙ@iE º:º¡€– u«1SQ¶ ³;ÊlÝÏ«â§|e½šm#xˆ˜ôT¯Œã]¥ÉvWOLp?õÊ–‹²4ñ”K—MØíR[ù²Sž¿=\í¢M’oLYå„Ïg›ïð9“ˆcOŃÁwº‹ê,©«f=Á~™°›½-|ÝÖe«\?» kÝ;<íÊ7õ¾©û]ãÁ&’T»äø2 »dö¬.¡qá) )´uÐáw®Lò]y¨ÖŽ¥ìui(×CÙɦÞM²éºÁÖýtœ®Ë§ÕÞÄI{Û>înùMì:ÛB‡SÁ!\{Ê3VØßÆÜ4ÙT‡½L×M×Ö=åSÏ6+òîÝMQÕ?¹™9ß.SŒ‘§gw†ž‚ªÓaºùgê"a7S[ø9Ó¬œpÙ™&õCß}¦ES¾œó\Sݘ'sì”b ë>býéÝ¡Z÷Í6ùeuÁH[{«Ø¤©½W×=rP9Ÿ/u> stream xÚÝZYsÛÈ~÷¯à#XeÂÀ ‡ßdfåuÖÞõÚÚT6Ù” ‚F$Ê$ÀÅaYùõécAJVR•rÉÎÑsu}ÍŸ ±¿·‹báÁ?•D®ò¢8ZÄr½ ŒƒE¥w‹__xÐÑ[¼}ñæêÅ«K‘,7 E¸¸º[ĉë+…Ò¹¸º]üÓ \á.W*ôœ¿½ûøy¹Ês>.á\,ÏYÿDŸ·?|^þë꯯.ýx@.„‰&#J*Á>Ýô‹•m_Iá&AÀ½ÚCY,W2N³ÕXNVV•®¡þ6/6Ü–‡¶á¢Þé½.XdDÎÅnÇÕxÊÓK_9ß2}h˜P¾ô Xù¾›(Å“¦ÐîÎ^ åÜã˜5­uÍõEÙè[.æ·òâ bŸmºãò!Ýè&ö¹Ï}¾3 ÷KßsÊê‹ù•7Û¹Uä{GìK§¼ãoZàðGà4ÍÕ¸»²:ê"}þ­i+=$Âãh]/á·ðæ‰×ù¿áxôìñ·|ñ4¾ý@øQ´û];ÜÀÚ%ZÄ@O¸Â˜ÞE'°×MžAo`Ÿò «´ÉË7øNS=pCSò÷÷¯«¯8©æ.P“åu޼‚n¸:/V4éÊÎ:ØEVé´fR–» `—/•OËǺ›¼©¹D÷=ì^¶ ³6â…ñÈû­žå¬Bgº®SØP¨àÑ8ñ·º€ýîvTW$H?‡ƒ@:wånWREÀScáâçÏï¸Ïš+²Òl×Nò¤|P…9Q%­¸À,¤$0kUîˆNþ"âR]òwßîšü°{ #£±ÀÌÉ,ìb(ì“}¿ûpýæâç¿\~¸ºþmýãŧxHWöè`™_Fxí »®Zð|<7€m,Óéþ°Ó/ÍU3Ñô°¹Û6#a‚3NgÖ ¨†}¸ÜÏ?þòéjf½¾XG<\0 T™šô ­Ë`ì„ñ.×â+Wˆá묬›*E!'49^K»±§ìb[/œÝ§=…úÞ}†Q¿#QÂ=ÆÈ€ü/Btàbv!¡p=9³ŽË÷¿\Ì-#‰]ŒOäGÛ_m5Os«ÍÚüÐsE4Y[“æ»z K$JT`$…Ȳ‹LUBŒ«L„€Ñ` ùX&ÈwÍvÃÏ/Œ@ØŠz=*–+ßfþ¤ww@äxß(H ‡#3î³6³^æ›Ö.)@R´±¢_—@wŸ‚ÝÁ´–wm‘ P7+÷Þ4œG§‹ŽKþ–$“Œ³Ü| jIX¥¤‘RPÕMZ45š*¡d‚­ifT´¨$üañúXЇ47%bzh± êq&._¤+=‘î×ü¹¬Àƒ>¼oSM5uº7U M‹9TmÓ¥°<ÃMãq3˜ÜiI3;ʈµ$W1üb%PÊM?ÒÛ\ܧÜ|›ß¡r¸ÓØÈë‚‚‘ÂyçX$#×÷Ã9h8…ر '?I˜@™,(ùæ Êœ_ÔÙ,¨žrƒ ™p G$»ãˆà¤k®2ä¤5ø°­Þ(é&–ŽPÊöänd˱~è'0»Y¦!K’åˆî·y¶ @†¶(ëNBMÕjk ‹ÉãÞÕl[‚é“Ú‹ÅàÊcçFóô&/´¹k³ud“­épS–;üc(ÝØ©<)­°Õ=ÈR°c ËÕ2¸ƒÙ8JrRø[=«Ð"éª`À)×ûôÛu¶²Fë2F ãxH=/ÎP"P¾íÎbx ¡~ÿð<÷x1šw\ bFß”?ƒÇnd¬! ºq&b»X+oÂäwh8¥ÀFl‡,–ZNƒë3ÅêîijEµòÆ\ÿsuŠ|†Na],Ä€÷‡¼m`Þ3aÛ # COËâ$—"ò#½8@À8f )Á üN4 "lW¾ bl•Úº38¤ïFI4¹â+ó|±‰4K´HŒõà΀q]s-Á߸u §¡Áö@ôάÍæ)7yF’*W`¼÷ß—>Zî-·fxXhçå7n¨Ô@ÂtY‘?+ÄfÔèP L1B#»×sö8ÜÆÐ¸§û1™¶½ge•„`@ÆÇâqYõճ¥E”u^Zd„pBs¯dì ……šèj €°í·9i26]°!/È®‚RcÜ1ê·OóÓÒC¦ÚÏ £/AR áHR#cê¡V¥Emd6ò{kšnts¯uÑ«û=Ú)¤O¥Šû«È©)¹ X_·‡CYq|~¢#]0ØôzÖñ[»›ÿôöÍÌ ß 5|€·´n ¬s*¹•†¥V´†0d«ÝÆ9>UÀ§Iǧ·y}˜[€t“‘Ây9C)q#™ØNõ‰ Í ]¿·Èþþû?æü¹ÈMú>ùýÛÃ3‰ݵ¼OožMÃùõ9G²èóFc¨}~5E!Q»¤õvްdÒí ÑzÎ"r½ sª[~ô|l¼.ŒlxG£ò’eo(ºÐÆJ  ²Öè©\yŒO• i¤8ì¤RÄj$´™ævPÍUž±ZŒz„–q õ¶‹VáOókNEuæsIîæ‡²Eö¹]]ó¦GUiP5Ú g¨ 0†‚“Óe€†= NO¿¯.Á8Ü8 Œ ƒ…ŠWZÝbùu0hÌ&À•=¯]QÀO‚3l¿&Ę€—Y~ M?y™2¤ý-Á ¯r¾®¬›²BÝÃ÷ ³…ÇÖ}Šáq€-ÖeÒ·ñk0uö¤n|i–îæn•hhÒã~üwÖ$àAÓ¡"_Ÿ¾ìpviAfFòA· –ˆ 0¸Ü™“<9âö]:ëÎYéH”1,§&#ÆÝÔcxº±ÇfbÍD˜‚ÍÄ$´æŸê®†jËbg‚Àì#׋¢±€\ –"†$…dùµ)ÏØMà8y²ßÃÅ›ëŸæ &Ÿr:C‹éwƒu¸±×&À¹ðâ1€~{ qŠ~àÆ(–_4¶5+Ëê6‡›·á¤ÎÍå‚¡e$;{ýî³i|w"ìÇô g’HƬq¢xf«ßùœžœ!ææ©ú~é -à&Xù3ˆÝÌ ( 9Ollª» ¶8$GÐGF® @ $ú˜TÑl+ ^ ÿ¸™WV¨6¼ >Ñ?9Ž„šFÈ}/;:ÌA†N(‹å‰Æ†xè±Â@AÏj‡¥È»tc*ÑoÂ*JÖø˜\IÀª×p+§SBKºéÚ4Y†ÄZƒuSäÀ@HÛ½dY¾ÑÒdÿ¬/í¬2ÝÃÉ7fÀŸmž}1esÌG1¹,k+à|„€²µ5‘=¤ äÓ]Ë)He1d§§"•Ia‰¼Œá„£™9·i5•¯yݦ»¼Ö€f3”Á„ddç ÆŒøº&~pÞ(„>^ÜákpÃÀhr ðâÐËAÏíQï,„O”Ùð)ðÄÎ@xb€AD-ë[ ¬)7‰'>ùˆ¹JÄRʉè€1ܨwžÊYÙ!Çén”Zp÷X] ùkå*êc’$»á@vC“ÔÄÊ 'TçØÝfÞ_sê(½å7h'c:“3IQ— à_Ê3=JóµÝÞã} ÖˆÞ‘.NAÈ(QI‚¶MëIÙHµÎ:Û”#Cß/‰ÆõŽ'%EFÇ'F»} ­³©¡»‘K,vrÉù”„#ö‚8?g9$ÛÓ,ÀÓR‚¾“”àÙ“OÐûü¿=ªHp‹Á‚Lüä謠¿=+(ŽÏ* MvCÑYEꑳ‚ÛH¼øtV&*qÒæUh¿$èMXüјÊy–*‚§„T&A|¤hü((YhÀ²­ðÈwé ù䉉7L2.m¦I Ú2Õt· •õCÝè}Í mÍ9~‚563J ÊìK—>zA‰úÄy · ¬±)Fæ³FÆZ à²vÝ+.ÙŒè sÊŸë—\`÷Ê·à2Ÿ5¨„ñ$ŽÐ*3#–ðz‡k̰ؔ³!:ßõ|u>D7 B`^ŸÚ ¾¬Y)ßwš¶¢œ{cjJþ}õîò’kìÛªéšð‰E8‡ë¯ù¡M~wwÆ}A©ÆáÈg:±ÈÞYUÀu…FQ!'À±#h&b9妺©ÚŒßja­I3bÔK•f³QþFW9=KSž½$Æ=ÊÌ.µoŒÀÞìé+ûRM ^ª)óRKóÎþÑË´kàƒk@NQmÎ9ücÔé\Ûœ¾A¼–U-¸iŒ¸¬Ìx0[èKT8þ„‰Ãà‚%Ñ™C“X¹AŸÕ~J\ÕešÖIûMù3xœB@I(ç4:«?l‚–|/¯ À$GOæko5%K¤Mâ#c@‘­t„¸Sg(¥ÇY ëúu9黪Üs nÍåðÄ|˜ëøöÑ›Íl›æðúÕ«ûû{—ÐÀ-«Í«§Y(*&vú4Uò>ÿ²$;¾_á»Jßi]àƒ‘ §FO÷$Ú/ó¦5Êab Gžë÷±®ù)p½ª×ü}ƒèS0HÊ&²)C¡\L´HmF:2‘:¤<±,°6dǶëå ä|;¿ý ކjy½vH™:1¶­IFKJUâìëI 248ڜ˪åÇþÃf§§¦&¾êð Õ-µmÀÞ©¿ßÆ5Qó§qÐ?u픸Ÿôæ+¾Oå¥A- Œ°F9T¬?¬ñÈü×¾IÕÉâä¾c_Åw5ÍôÛzâ»×i o^(Ç¡gaF²‘0<àÏm¾Ù"6`¹-r qΆ&x)ø”vd^î[ÔX{£›FWöñh:<“˜Hõ£ÿëØYâ¨Y_nålj 9çÒcó;â,Ã}J¯¼9I Pâ=ŽœõÜCI\ ‚CFÕ€ÏÂ_¬âó‰$ zˆ¾ÆrÙ 7îL ¤6O»Àô‘jøáêÅ3+?- endstream endobj 237 0 obj << /Length 1266 /Filter /FlateDecode >> stream xÚµX[£6~Ÿ_ÁC&mÂ@„Tj¥íjfÛ>TÛiÔ—ÝÕȇX2†Ú&Éô×ׯvÀæRFùû;>ÇþÇñLürˆã‰¿pµtCo/8]/ˆâÀ¡ÐÙ:Þx‚Ñs>Ýü²¾¹{ðcg客y䬷N¸pƒEà,£… g:_n#oòmýûÝÃ|Õb\øžEPSó|üõÃçõýãd6½ÛÀÌÂÈ»ýû·Ï)ÊãýÃýãý復“ù¡§0ÕöiflÍæ+7Œ#eñ»É,ò¼Û=*™zÈqõ(â»r”HsBåÌ÷ÝU*A”?Yy‚u¦%6¬À‡Z'À´D£F4)§@0F-qAToÅV=Q2­í«z² kïQÏfB&>ûCn¦é™›’ _ø¡hÙaCò ‘®¯Ì8ð¾¾rÐcKÿ[ûì,/{HOzÕêõXíWV"IO„€ ¸^ñÒ²À€wuí¶Hg†5­Ö55p”úðóŽ6€¤9Ôé餕+É=´Ê Dx2‹[nÓ¢"(',CÆ›¸2€;1‘B3V h¾>Î+L šÛ!"G¥ˆÛjRä%†Ç6j§Æ(Î!™G½j/+>dT—ßrÞ˜¼V}@®{)ÊZ0öT–9Mj¬y ꤗ0á´ÊmÞK)p%…{¤0Ø*.&Š+45ñHTkÈo ˜¢=J¡JC¿ÉÀcé{ªò[(ð½¯sß+!_ˆBQw9¾VÍÓ&ö²}9NŸ§ÿ~{ÂâàH-M²·`ØUjÕºQŒÈø…@Ø2¾XñÐl|Á‹b£Wk>«[P;Œà¤jvHP ν…;_ÄBÜ]š1âûúKè®–K§EFÄW’?è­®f üzþè—mù¹%Ÿ¨ÇO§½d‹°Z1‰,]ou‚BD,·W¸Ü¼È((wHk$"ƒí‡`‚u¯µ6¦«¹ ús˜ØÎR3š·rç~Øç…ÙYhèñ™=Ì4¾GrWdLn#ý0VQêâŠß}‘Î~>…:5ŠÕà]3 xAÙµ\p˜ÈÊio0gŽçà(;Æa'xO½¡ÁÍU4nt¤þ¶Ý8 ÇI‹ˆÜŒêX‘i.•zåõÒ+·f /pãpÙ ´Èz¶äš:~ÛìbÓÊΦ0`Z Jí%àÉn°½å2;py=p œ7[y¥‘N€ ¶=l_Á/blí”»päœs4þl*„ÓËg©CowЊô6>¯æ‘TÎ%aû|Óë¼nO“K=ç˜r–í´²åIAäœ4ƒÕ‹ž-Ü×jÅ¡x`éló*gÑûz ºâÙIE{5„*Ô_=MÊáÒlÙ¯š¡ŒØª+‚x×ÕÓ QAíêeÝ!ìÚ}ÇëN‡"‰œÙCxÈsÇ‚äCŒ£äÌBAÌ`CkÁªˆ&ávu[Ô‹ÕÝ€Í\δórínfD^Z7vÖ-¢ùn­äÍÇÊ‹”ÕýB]ú?NäµÞí‡æª®þ²­H½älÔEáýúæ?ô  endstream endobj 240 0 obj << /Length 758 /Filter /FlateDecode >> stream xÚµVM›0½çWøÐ`€ÞºÕfÕö²íF½TÕŠ$C‚Dì Í߯m _ù¨¢'¿7~ó°g‡l´fßgDÅ>^蛞å> \Ï´\¸(£Ÿ‹Zèyò8Ÿ<Ìœ…fˆŒæ1 BÓölä㩸S4_¡?šk:¦nxØÒ~{yÕ Ç³´=t´/ºki_”ç§WýïüûÃÌjp®ë˜¾0² Û<¦¢ïz²œê †B1°m†ž€ú¤ز´ä=£4É 1Ê Š„’(ål Ѱù:¹0Ù¾-R +Ýðlˆ5ûÄ`Iù%Ûh-ÿ,¨xʅ助…Ê<b‹AT§#ØíY’DŠ=Ç”qLnCZWô_,ôªCQý¦¸õ”_Ñ>š!Å…Ôlj]ÁQ©Tký†û2¦¶¶ Ÿ%ë=/ï[X/ó™‘Û–öëØ%”3ñž,ùï|T‹ÒÕªT ¶ézá`¯² 4æö·‰µGm*¹IqHÔEXu4n÷E{5rK5úá#rV³CRläd­L)¸ÏÍv;5ƒ,Ôk6ÍPW è2i%®Rv,øÕÂâSfy:w$¾@V8êÚe*¸NX8Qv4ü< m;‹ ÿYÜ|ÃZèâ“Ûºü[ö¬!;c%U¶yóæ)Ñzزd½9éüo¡p½G86½Þ|*OðGyv^q|?Í'ÿfå  endstream endobj 243 0 obj << /Length 2366 /Filter /FlateDecode >> stream xÚ­YësÛ¸ÿ®¿‚éiˆ/‚L§ǾúzI/±Ûi{¹¹¡$Jb…sÒ¿¾»X"eÊ3íÜd2X‹Åb¿]È_<îíáÿw^å…ðO'†éÐÄÆ‹•f¡Šbå5™·ó>®B` ½ïVoW¯ïxì%,‰Dä=î<-™’Ê3‘d±’ÞãÖûÉÄÕÏß¿¾É„QòE‘1–çæÏ×?>Þ~º „}Å®…þßï| ™O·w·Ÿn?ÜÜ¢¤ñøKãíãŠÛ+p/I˜1‰§A/c¤·)W_VÌ(-cË0!í’Š¥ýš“¯ïKὫWW§{Ò'>˜ÈnžDLEÆÓ‚³8tá»|ß7Ùp_õæ*‹Ln¼©‹ºoˆné&¦«+ú¿]qígM›Ãç’E¼€KÉB*J¾StèuQ˜ósì -ͤmۗ†w‘&"/Š¾Ì«´êž g\0Á9Éšê)ǮјÈßÖ8j¼6~¢¤§¡'íeì<.‰™¹¶QÂÖäI}N;é–hÕtèB»¼„Òfä±ìŒl ±O‹S¹i‹`誟:U¿ÈU¿÷)Uz\.zÑ‹E/¾Xôâ‹E*‡¦¾E({•AûiÓÞÎ×Íñµ~Ÿoð¦8UCú¤6±^]®p¸?ŠâSª`²=å#Çú`Œ C6Ço\þÑαw'o,&¹^w4T¤ ©#†Æ >b[)ZšÇJ‚£µÃWxq`…>[*¹À¹“B´@9,¬Ý&—˜÷Riÿ¡_Caàþ—Û`¤\Zœ÷`*ì 4•–ô3G—bpáYÂâÈŠ |Ö¡Ã$ÖœÊñ45*úDLGúaéP Â$vvåb¼4—îÒ@Ì. ÍÞÅÒd-~ÖU£cq»½ ˆß.=†L“¬´°›ž.àëÄAÄóê’½• LyEó àN eÚþêÞQŸ…0ËQà*—ýÁÅ’^Í–^Ngw ¼tA&LÅ$÷Å~Ööpkèüºç¿ @áÀÛŸ–~fáÌ@ó1#“¡” ·µ$THkv„¹ÛÇÕ—ñ×7È>¦Œð¤ÌžnÊÕO?‡Þá¦L&±÷dYKÏ*Œ_x«î7º©2–ð@¸ÔV¡ëÚS [¸¼Äy*ÇÒqÿaábë‡ÔY ÊfÝbÏ)4Õ ÐÙ™ø‘P˜Ä¬Z»`Õz¬¸Ð8Ž2o[¨OøäÓ‘•14`Úßf;ôwÚ[¦—+’œ…[ —"ÊYè2‰z#>h km6>°áˆ%WâöÑ+8 ÝÉæ{PäBøöögƒ$¤RAò05"h§Dâ?Ô4¶Äi߸IøìEE==0(Z_£Ñ}æ[Lq°Q÷mI¡ N‰D0 Ÿë¡«uÕ“~i}³X¼Ïºì]9ãî×tÐ$ Q¡…ó9­…gç[ã/pF3Îó —ežoXx_P@M.u]¹_mÐú2ö%}YëÃ(i&(VËKA»ù•˜R ,׉¦{Û˜!£ë ä³n8¸ä.4±Ï÷‡îwö£$û¸!yÁ®|fzþû±,ýáä¿WtÍ endstream endobj 231 0 obj << /Type /XObject /Subtype /Image /Width 483 /Height 251 /BitsPerComponent 8 /ColorSpace /DeviceRGB /SMask 244 0 R /Length 9954 /Filter /FlateDecode >> stream xÚíwÜEþÇ?½ùPÒõ@¤7AEQ@ª( x"‚bçDáô@ÑCQ~ÊéY°¢H³U)¢(xœ€ˆAz‘Þîû›ÙÄt5!„$méJÀg,í»ÃØŠ®&„$D}ðc–ö¥}@5ºšBmN?ë°¥}i)—¢&„ø-]ÇKûÒµlTBHü¢~ÏEQo SÔ„¨ë»hi_êÍF5!„ÄÓœ~ÀuQFQBˆeQgŠë©,Ež?ë¹nn[ÎëK<~ögF†ôë'%KÆ6m™22¾äÍùÝZµdäH=Z:vŒö 72¼sŒ£r¤µ8;ñRvög¡Bú­Ë.‹-êjÕô‘ FxkÂ9qBV­’Å‹åÐ!Y¾\ŠË~ØXFuºi*Ÿñ³~1p=0nÜkè4Jç$eEÊJ†ñ@K  p p¯1ïU@s  uMœÆ»³‹úòËýš™)íÛKóæºÉ&êš5¥I“¬#ûô‘3gäÖ[³Û¶MfÎÌ.ê7Òi¢©2ÆT-/ûM»wNKWeeË{a -ðd¬îÁÑ@ce êš8¹Â…õ»ÊÉÁ;‡ ‘}ûä¿ÿ•íÛeóf©QCï¬^]9{¶lØ »vÉ÷ßk™«ýK—ÊŠ!¿÷^9yRshlÍ`ö¼©Êã€ÓqÞ}X\¦ë4Ì{!``üÓüþ ô ÐÕÄî˜ü »¨;t ¿Š³º8>ûLÞ?KÔÓ¦éí¢EeÓ&yñE½­dþÒK!¯_?ÂwGÉÖTqàaàX7‹?7ºÒÆW¡=<=ŒÑþÉLí{}à \F8±#,ߊ)ê¼yåÑGeÞ<ÝÛ¬„üí·z§jW+j×öóüóºQ­6vî”I“"ôfwéÌÆ^µôÀÏ6íy8-|”÷ÒÀ,›òþñ{Ç '¶çØì¢¾âŠ{ã ùùg¹ï>éÖMÞ|SÖ®Íu™2þcÆÓ} jC½ûé§!ïÕKΞ•*UÂÂx1cØ“–îf÷<·zÜWAy¯übkÞד30ÎIòñy{LQoÜ(O<áßž;×/êš5õ‘}úø÷«öö‚zcâD9~\Î??ëãß|ãol‡¦—ÀÞ3Õ0gÆÌÿ'xE6¯æ½±±xœíy?bÌñÎP'I†èÕÙEýÅòÞ{þÔ³§n!oÙ"< ¯¿.»w뻊Qÿø£<ø î”>vL:wÖûóä‘•+õÍÇ)St3{ÍÙ»WwSg àº3U''Ÿoš|‹Í{y¯’Üò æi;P®&ÉEi•à Ê—Oß+ N7ݤŸyûm=(zÒ$¹æùÛßô‘j§z÷â‹eÆ ùüs¹á†¬/Q®=Z.ÔJ?}ZÚ¶½·^2ÕŽ­ìHCA<–ýâÀj‡ó¾ (€'ÉUÒåÎ…èܹòÛozˆH¶·Š3n=…íî›–®ñNÃ2(þ§¹’÷ lT“äõf×'úx‹Aë¥âV¹o2Æ'§¾ÜC—rv-ìyc‘$®U]õ WÏ”~)àw‹~ dô`øg.æý=Šš$×®˜àb¸~ äg¸z¦èïs÷7úPÔ3¢nãz¥)#Ÿ$Q[Ë§ÜŠÕælWx¦èó$÷^b©}jKßõuBƒÓ8?I.hïp%PÿÅ@õR¹×KÅTäSRüñ‚À!×󾇗“$¹¸ÍoÌhçh”®åCµûu‘XQV«&^¨Çaú^V¯®\µüñc©«öGÞ[%É%KJÓ¦R¤ˆ„ m½à©S'ë´DIMÿ$¹j[X꘥ÏÜËÓ¼®¾Zþ÷¿ûo¿]~ýUO‡¸w¯~uæLí¥nÐ8Å õ< êáÿ·‹/ÖÇ”(‘µgþ|ùäÿ¶úyúî;ýtÀž=ú$¨melµÿ¡‡äða}NÔy8rDFŒ0Éûͬ$éšû'`‹–>4¤¥½WÜ;£Y—.Dݳ§vÔĉºõ¨^V©¢ŸZ-XPn¼1^Q_ î„„ï¯åý™ˆÿÛ%—„‹zÁ™5Ko”.­ŸÌ]ºTÏ'©^ªŒ?õ” $åÊéÓr×]þã46mÌ'ªb- ÉWÞRÀǶZz=P“–ö^Y4)µk®‰ êÕ«ý3º„¥=´¨Ÿ~Z{Lµ*ÇŽÝÝŸ`?Û¢3"þomÛ†‹záB=ïºoé¢üó®§+®ÐçªN‹Õá%ÖbS$çFÚdé×LΣîÉ‚.gRp×^AÔ'Nèküˆ¢>{VÞzKÏLÞ¿¿œ:å_]"Ršc<ŸX©§¾1¨{CDQ/ºh‘Ì™£7¾üR§ì™*\X¯±c‡žž½[·˜}ÔóYˆ­­Ž&ÀWI(z‡±¨§O÷l)W0)¾®]#ˆZí0 ÂÁ={ê[_ˆJÊZ3ózÐK\Ü¢>×Xfëµ°òÒK#ˆzî\½ñÝwYÕaIý0©ß©Ÿ~òw_«ë‘èç–üÛ]­4{‰±$\¼5ÜxX˜1éÕ".lRˆ×]AÔ¿ÿ.ãÇG8ø¦›dÿþ¬—۷˰aÞïú˜ñ»è"}ð¹çfíY¶Ìïçùóý«f˜¤råô¼¾7š3••‚8ÒJ×5€›€E±ú¢uÃ֌ˌRÏ”oÔõj¯¿>‚¨Õ…ÿºu¶²omˆ0Qß}·¹Ð. Ä@êDùi\•£³g¥o߬=[¶ÈäÉzãá‡õ…CݺÎ@p3F4ÉûƒŒâd`愬bÌŠy±±8u;c^ôs[ÙŽùÍ<Ï)-ÙÑ|Ò­›>rР¬T¥ŠŠväˆ|õ•פ‰„¶m›6UïÞú.[°¨‡7u] Ï‹ºJ‚Ê jwì(ç'/¿¬{æëÕóÏß»v­î‹:T5Ò¹^²DFÒ‹AÏ«_V«¦‡5*±‡­ïšú2ò‰[ºŽM\_Ëóœ¢2:ÑG»vzýµà¤ÚØj‹ÚN{öè&ôúõz1Mµ³S'}½ø¬:@Y+º©Îî/§4ûQ'ú(_^W¿Aûöé.ê7+ðV±b2}ºI®ÚÌJÈo½%eËJ­Zz˜¢:^íTo©ÏªoˆžýfŒy’rc'óm<É®—fýTpš-ï%ŒÇÌŸŽÇ×ñÐ2LÑŒXBW»:=,7¿‹õ q] ÜfÌçÜÃh<7*ŽÎ…)ïê×§6Ðè ôFÓJ_iÌÝQ3ìòJ(Vä;‘,žÃdÖ#Ì©=E¹$ï„ÐÕ)·t¼'0—;Š~&„®NÓ3–›‹€áG]ÍsEÉa×ò„§ˆBñäBudû9ái!„ÐÕ´4!„ÐÕ<„:Šg€Bh*×2NKBèjZšBèjf–B}1›„B‰¹–;ZšBWÓÒ„BWóׇBWç¼yìY¬„ºÚ³Y ¥ !t5-M!tun» „,=Zš’Ë]íe²»ƒBW{Yƒ´4!„xÙ„T4!ÄÞæhvÒ1 6ž„ÿ%Zšâ´ŸÓËØñþ·Hw~8!$º‡òåº@e pºë:þìg%Ú@M Dº¦¥ !¶*:/иXlWF M{åÀ@ `:êÚ‚¢+½€·“¡Ù?üx蔳®_*šb“¢UËy°+›œ£¥#Àÿç§—®£ŸuíÐXa9û*-º?mfÙOÓN~BˆÇ, <`4%¡ô‚Ñ1’f íßè ¬M4ûß—EË>M±ÃÒ=‰:*NC ã¥ÝMFuñEÒÙWiP&»©hBHršR×ì÷Ûá¨@z(êq/…Zºð›}Ùß\öP$ýLIBSwlµ´/­2Ú¨iñ<àMÀi»³¯®,º° M±ÃQFDz8“–{¶]tÚ;–}%ÿ–t5!$iMtLS¾ôv`,„'³_8êdöÕéjBHšºÂaKûÒ½^3ÕÿÎ9ÀVç³ÿ#Pˆ¢&„$¤©‚ÀFWD}*xÌ^nºš¤Ûب&„$¤©[ÜÒ”J/{OÔåneÿ ñø9EM‰KSÅý.ŠZÃÕ<ó;5ÁÝìb£š§©®sWS*=åSõNŸv7û‡3¢0 !ÖÚ“Ó]õ>c ˆº£ëÙcö*Ššb½ßãlb¶)TH4HØTÍSkª ß©—lqoãÆ’?¿õãŸaï!IJ©Âñ¨QCÖ­“ŠcÛ¦];9z4ÂþÌLyçÙ¶Möî•õëåùç#~|„7D]À|Ö©U«¤KKî={Vê×ë–"EM±hªa¹ðBý®ÒuLÛ\~ydQô‘lÚ$×\#þ³ôï/“&Eüøs©5Õ¼œyU´*juêâi„£¨ !ÖLõHDQ׬²³U+y÷]Y¹R,Ûn u×®òÅ2¾tîìß¿u«<ûlLMÍNÉ<ŸÙ¦ýsLQòëKçž+Ó¦ÉòåòÕW2fLˆ¨{ö”Y³äË/eÈ+¢®BQB¬ùjj˜@4ˆ ê¡Cµ{ûô‘Ç—C‡¤W/½³}{9}Z¾ûNn½U&O–ãÇ¥Y3½_™jÇ5J*UŠæ¨ÝÀÝðªEý‘¹¨o¿=dÏ•WÊ+¯È€rï½²}»<óL–¨þYîºKyDޱâê5!Äš¨Ã5Õ°¡> V­n9ï<¹ì2™7OfÎÔ/;tÐG6oîWµ0?üPoT¯®Þ‡kwmܨ{?²ÝG+}Å®ÔQhm%êAƒ"ìWíju*^xAÖ®ÍõÈ‘þíW_•Õ«9ðƒb—¨Ÿ³"ê~ýdÏÙ¼YûGµ–•“ÕÎŽåäɬcT;ó›oB>¥˜?_Nœˆ¨ýwSµÄI蟭nŒ4kQ²G]5lݪOÂ?è&ô¯¿f‰ºukÿö_þ"»wÇu]Š: ë ¸†IEìH£FúÝÚµCvþò‹Œçß~ï=YºTo\q…üïR¸°ÿÈ¢Eá:Ê“GN w] E­†ÕŒÙGÖ‰¡.>ùÄ¿ýÈ#º÷# ê®]ýÛ=&[¶ÄuyÖñt÷3MÜ ÂîÙÇ+êÔ Ù©Ï=§7Î?_eËü½µŠ_ÔÛUªÈ¾}ZPjûÉ'³šÐÇk™_tQvM=áQ¥bŠZ5ƒ÷,_®ožª%ä§ŸBD­î^¾nþÙŠ%jN£—vŠÎcôÚ´êÁ“‡º&®„b³ˆ¢fôhmà“'õÐhÕPü÷¿µ¬Ô‘:éˆê¥Úyø°,\¨ÛÏjÿ’%º»cÏ}ù¯ön·…¦ÞG­*ÚN;ò©3¤{w}¯pçN­hõRý„D=k–î Ù¿_‹ºBsKÿÂJ&Š.f<»ú,°8i6ȧ…Œ‹P×ı€,±2î·lYÝ}ñ­òåõ͵°‡›5Ó#ýòå‹ö…µ=ódâÃñ>„˜™©sçûU KÅŠIݺV¾d8«³ç]ߘ]á”åÀ8¼f´·©kâDXŽw}¦‹¥É=p¦b®óX‹=léªÙ‡­Æ“&OºÎR&6g+×55ÔK³çå7øá@ú)Ð·É ô˜¥UûáN;fS<¼B šØÔû±ÞEM*yl>ê;ÜõM¬¿ž´tQàŸ¶ô 0˚آí\ÔÔÝÞ[ᥘù-E[ÓŽ÷ðd(|ï@q/ ,èÃ'IªºÿÌMí5&ê÷JÐÕÓkÜu;V[ïYZµ{:VâŸ?‡ËÓN’‹ÕêÀQç5ÕÖ««çÞw>û¯°wÚ{ÁŸ×­áh¹¿à…»ç$§¸º¹Ãáz«ÛAÙÏtæâ7–µeày¦ÜïråJª?‹žØ´] ÔñF…×b5(û²ÕèeUõZ¡—޹"êý@ –>±ÉTŠ^DéXc-ïj*töŸíÎþšÀìÓ¬§+î¿»xýƱÕÕ Œ)£íŠÏk<Û–ŽrŠoÛ—ý—‹¹ø²ÏÚ꙲®éî°ÌÓaXÄ&W«ëô“ŽÌµaOÔ¦ÏÈ ²cÄxßày{"žj^êJydî|Ô‹ä,Wg3ê/I´K¶£1”"ÍŒ”mý—Ç­’wJ‡eŸó­y ˆ3Œ1í.‹zu(ñ$³À˜wFVyIŸNZ Å×€g:Ò¥ÇÃÔ¢U€Ûu–kâ BÌìÓÕ©ïó¬èùçKÉ’þ™ÇªW·ÅÕ5+n»â$fÀ›ÄgÌ 5Ÿô5Ú»¬ 6¹:ð¤y]ãZþ¯À[ÆÄJb<Ð7øW8hÜ›VÒVDša<ùÞÙ˜øî`™Ñ³qÒ¸âxÞxÜòJc-€ ëÙgp¦´ÜZñêºuòÐCzcÊ=¯¢îž¤¨“ •hþ sxÄ[*Ù·M¾<šù£É.A[uÖØN×Õ.si6ug$“}6$RZôOXñêúõzߢϗ_nç ÉÔD+^“vx\¢Žv€•_‹7Уý?æg Zõ±ØžÏ‘0'-H”À¿ê\ö9$u¥ÿf4—Ö¯/³gëöówf‰zà@yüqÿ'êµ3V®”wß•¢EõžéÓåê«å£ô*u÷ßo.ê‰Élj•ž+Ò3i$›û6æu¨yë:®ëšÖ>O¸''GJ;MÿyïdŸ®v7VF[bß>yÿ}éß_/Ö«ùŒ¥÷Oê_ÓyÌÙµK¯8߯ŸÞYª”Þyè^ÿH)úž{äàA½(RtQl׺yóÕ$¢¬Ë9ù>jó~såZé±±òÏ[l¥³ê¥c§ÿ·œ^úÛ"ŠTyxëVÿvñâz-¶GÕÛ¯¼â_ÓY5ž×¬ñû9”¨'Lðo/›7›ˆzy¼El¥åW»×¼/ÅÊ…§õáLæ2æ±Ò¢Ž™ýh¢æb—9¬ßƒ®Î¡ðyD‘¾óNÈMÃ-[üK6¿úªMçzõdý*è÷ßûï3úDÝ»·ûÚkµÞ£‹ú_N‹ÚJYu¼€q}a\¢ŽiW+·DÍûƉ×*©o;]þU⌨'GéÔ©ÚÀ—{öøû1¦Mó¯éìK èq §NÉ€úåï¿ËСþ·n»M/p]Ô&f阸D-¦Ã?¬÷XµIÿF]1o%¹“P}tµ—Nì½EÚ©“n-·l©· ÒÇ£·ÿùOY±Bo´i# è°k%ê=¬ù† EIQúyÉA¢îb—¨ß|S6´rd'"!9Ûlì±ûLf:¶ OÄô  '$7´?éj»Oãµ.ŠºËŽÜÓKÀúnË/Ý«ÏÿÇK/ LbÆR $WÝIa­OÔÏÁ\`ÌX먥¦¡f‘’«ê»Aìsu{‡EÝš%EH®µ]°¢³½5À1K÷fB_Ññ¶¢#ÜæŒ¥3X@„°UIWÇTt`g¬#[¿Û¤è}@#'!´4O…-§"ÔÕL±œ¦KسD¡šxBl;ÙVÃl,HHÑszœ“J‰Ý ÅC¶µ››c€Ãü¼xhäad’›]ÄóãÂOv¤{ù:ÀõÀ0`’ñèŠÒò¿g;®@- '7&„–æGL©:÷ÍÎ-CO-Ís•æ2p+zº‰•ÔKêÀ[úªä×› $·VÒæõkÑ"ùøcÿv—.²gžýrþ|Y½ZÏE|çþ"¾üROÔóõײd‰>F}*VµËêé1WW~wÌÒÃiiB’¨¡ÃÌ«ØâÅz²µQº´6óŒþÉäUjÜXúôñÏÆóÛoR·®þüºi«æ¾ÁJê=W7Ž;`é‰@ް⦮ ‰§nþ=¦¨}Óï<ñ„:$E‹† öœ<)÷ßoå]ÉêéÉx¨¬²ÕÒ}Œ>ðeØC]«bƸ‹´d‰ú¥ë~ˆp@ûöú ë×·þgÅôd<(Š/Ø¡è}@csGkc³D ­oÄœ:Þ7ýÎܹ²jU„®ºJ¡éJ¦Ñj1k¥g£"Ãèù"QEúkŠ«”©kB"Õˆ1æ•dν1uªìÚá€Ê•õ" 7ßo]žÏúèù¦u EœÏ˜1æ³-ždouMHh]¸5¦¨U[Ú7Ú™3zô]à­|ùôNß"z«W‡ÌWܪUÌýkb:¸ÚÇŸ€vÀ³À™(¥¹ÔX¢ß®gv\T:™uéR½’©o{Ò$9}Z>ýTþö7½€é–-z•jµ¿E Ù¿_~úIOY g¢+ý\<­+£8Û%€°ôQà<Æ-ñ¦®C-ÝÔŽ*ð1«]Mœ ìLàu[-ý P™KRèêà‰¯Më œ¶)ìOÍrºš8ØêÂm°MáúBð}žd’Z]‡ÅahÌ?ãÀµäøhë&bST×ÞN"D¿š3J‰7um瓎Ýy˜U€8Ò¾ äã ägàr㎠¯ûˆwÛÕAÜâðx§î¬Äù¨Î0&Ùë ¼k-ÕÂny38‰·EÝÎùÇNÍXˆ‹±](Ô—áWÛwW”h‘4Œí‰Ë7­ ¬ªÀóO\¿fäS´$­£z°‹³Üôfí 16OIŸ`.rQÔ»€sXM!$ž&Ç-®OðÛ‹MB‰GÔ ]õlŠšB,‹º‚ë–ö¥25!„Xuh.½î:yþù=#FÈðáv‰ú*ŠšB¬‰ú¯Ñ\Zº´ìÙ#cÇú_¶k'GJÛ¶v‰ú/5!„X°´bª‰Nû÷×rnÔHòç—M›dʽ³CéÝÛ€Ú¯šÙ5jHrÑEYìÜY®¼Ò\ÔãØMM!ÖD½À¼é;{¶¬]+ӦɆ ’7¯ÞÓ¤‰üþ»ôí«·ßyG֯׺V_½:ëS;wÊ=÷˜‹úmŠšB¬‰z›¹¨K”Ý»åÄ iÝ:¤³zÿ~5J– ôžªUõ1ÍšùÛáj{›~ó ŠšB¬‰zyÌþä·ßi-ûÒ¼yú{‚ï-.^,￯7–.Õ-íX_;ƒ¢&„k¢þg¢.ZT¶nÕÝׯ½–µ³G9tHêÔ‘“'u÷H¬¯}Š¢&„k®þkLQOŸ.kÖ„ìùôSùá=D¹Ú×YíKÊÞëÖ…ÌQ„’œ¨{Å”ê;wÔ(Ý]«–Þ3FjÕüo=û¬þæûï·"ê.5!„Xuµ˜RmÕJºtÉzÙ½»Þx©ZÔù·‡×Ï—ÏŠ¨+QÔ¹<öœþHò_Î%žµâûä`ÉÌ”ž=eÛ6yõU+ÇÉêô ’Ü#êhÛ„¤ZÔ“õ¥—ÊÆ2w®(`åø>uZEHêE’Ö>C”x©&Vθ8Ó ÎÈ”¾¢6YÙÜÃVŽðmçù·¾3û¿dò×ÅÂrŒ ’Òš8ÒEQßΰO/K›øÐD­æßf¯¨£m[uÄwéjâÉúXÜ­E^vEðé·MZ×Ñ>SÔ1]jå‡Àü“Ÿ†ˆ?:Œ[â†SWWD}[&9 Emâ´˜¢ŽÙp5i3[ïW±xŒQ›wéâz•|ÈaKßEK§©¥­7>cŽs‹ÙüŽøm{6œÈEM “ïaèϸºð±–~ (LKçZQK<£>"~[¼wÍEm½‡¢&^uu~àA[-=Ìh«ÓÒ¹Nï„']­èIZÑ€¶Ú”«"‡gƒw]iŒyNìY˜cÀÍ@1Vá\6<„¤ÂÕŠRÆh½–ý«¡÷â|L€BÜÕu^ :p#ð°'›œwÓ뀪@*šBR§ëŒ6s9£{$?¶% ‡–ÅýN³ð(ɺæ|$Ž2 '±6š¢&$ycósQ[ŸLÉ!Q[ÙI!9æ—Ú¤¥SÔ‰õxXoŠ›#¦Ïï°ÕAÉa c‰çñm±0¹GªDs¢TBIßFµõU$éÕ ­´ä­Leq&j7!$Ý-m»¨-¶¨Í{*(jB-mî^ë+aEôØ~—EÍR&„°Em}±€x^4?†-jBEmQÔæJ´EÔb::Åär€¢&„»~)x!„¢&„óÿUéê endstream endobj 244 0 obj << /Type /XObject /Subtype /Image /Width 483 /Height 251 /BitsPerComponent 8 /ColorSpace /DeviceGray /Length 11408 /Filter /FlateDecode >> stream xÚíw@TÇöÇG욨‰1&¦h¢)¶MòMOü%1/É{éÑè³kbLÔQ@EDŠ*RE©R¥ HA:*H‘ÞËûýÝ-À¢À.(ì.œÏwî½Ãž;;_ö¶9sc÷ÉÓëÌiù ¯ø´‹ú[æ=¨óËCÿÝyÔ%*#ÒÙDí«QýEâÓÈ1pÖØ  “ëGÄkæç}mÄ«1HVœfÏÖˆåK lžünø}Û|òŸz ›µk'ô ‰#¥Ïa€Súm…hÅŸ—•\“vD¸î‰ZEiô,Íeù7S¯gÞ.®le¯¹¿±’ úB3•w²Ó¯gä †QQ­óh?8ô8ôqBPèœ8Î-M obΕÍg¸ÂXa•= _xªM3Pw3ê|ëÈvPR ÷›ÎX2¨Ç6Çìá4mÌóiµé{%¿ (WHÙÄÃ9]Žƒ°Ž7‹ò u ›SšqH÷zŠ`§3ï  0f)B“¿­jb]îؾp›ûÕ¹<ÜC›3Ó8S<î²y>ùú‹J.ñDà„‡.Ž }]¸K:Ò9{A§Ð_°ÓHT§ |.ÿ«ìã£>Þ¹ƒ‘mÿ ùåý¾ ÍéØ<ŸÑŒŠ¯•[âÇ8‰µ9t`&(ö¹Ä$ÝNÕÖÇammŸtíboÁN}œÄŸÊ½½Ã½"÷NF¶/szô¤‰ܽ•'6ëÀß®Ü×ãŒÇ^˜ ŠÀ‡ãAZ¡£¥åzS+3Z°Ó’@Pr÷âÄ=§:v:²í_‡ÊÙÝ6ú;wGîÒ©M×b`™RKœ/M-˜Š[ç45#34uaÁ•±šnõ¹I)‚*ÍÀy·v?×ÕÀ¶k-²Ÿì¦Í/›g×…Mûð>Rf‰ÃªÎ±QAAAf·mýŠÒÕ÷#ÃγÖX]ãZ©ç¹Ô’ƒ‚¿P?‹jy7v%ÞõÀ¶WbGtËæ«Õ(sèÒ¦c%J_Pb‰-£Æ±3@ÀQM¿C'5Í€CAÆ‚ÝöÑi‡Ô„„#AÎm}¼ÖRF¶ƒÝ2‰Ú³Rl:7ÀO‰%þüýª]š¯%,˰OÎm5EƒÔ‘ídT=Ñ ›?>Rm_*¯Ä#ªà¾M 7äÛÔMˆ–>°mÃE7îÐo G†Ñò;HVb?ã3¸±E‚pKÎ-uF•… #ÛÑh~If›‚ï$ƒMW`µòJü_Àt³t4°_¾ Ó€Y¶×CCf£Èi´ü&‚”øfnoÚ(•H”Êù õ/h¶”idû:®Êjó)>¼d²é‹¦Ç”WãwÛ?;`ƒ$º|l”s;-ÛÀ6wV*£Íõà™ÈdÓ´ +•ø¦úêuÖwÍÖ"¤•o+‡U#ÐàŽYp 3Ïvû ëdþw¼€´{m[ Š#æmû2áªÄO.D™êo]±!¼äÜÊ©ÀÉ–ñlˆÊsżòúËúvúí¸ #æ @ü™0ä–‰qúúæ™Me¼, ýó5å•un-6ÃpM™ßp½]‹œ¿ÖvκH`…¼ù>`¨'Æ®éÂ!=ã«ú¶zíH„3cÒýrF1•F¸ˆ?c nyí²Þ‘²d#=}?'ÃFg==3Ë›Þ(Uf‰Ùw|äîXÕ&@îo=w[ º-œ„°ÈLmZWx—–Ÿo­Õ½„LWï±R-ΉµáÎ âÏÇ!n™«ëSyH¸ÃFº8Ê=ä÷&Ô­èõ;€å ¹7ñoë´`aQï"Ú<ÕzÀ†g ®´ˆ,R×.“Ž6÷‡G„Ÿ2ÃAny5F'1QdF·¤0èDë¹z™ïá”Åàmì Ö85 ñOhá6j·`aÓ¢Í û´µKĺn×+8åt÷Kç'qî•S™B—[^ÖND?$»©Ä¢åG—•[b6%hðX»¤=Ë­Ë…Û³uZ-˜CXT»Š6-˹E¾mku0îD{Jáølz`&þŒ!ƒâ Z—¯·ÚÑÚ=»eõð°’KÌFì(ãD¾lñÇâV…U¥ÕlÁ-o{j:ðЬ pªh±y•Lù§] €Ÿ›âzêl@üÍ&#«õóâÚGóŸ–gë^ ÔŘB0þ³ïPu¼©Þé\Mó2n_¾uK­zŽÉh´n-Š¿i¨ëUw@]#½à”žùe{ÃKæ:Æ9W[ªýÂúÿæQ+á,Þ²Mb(\³)ç˜Ý>Fñà¤&F?K€‘ÚÁ˜¢Òt[5ƒn_ŒiKíÎ ™c„!¶åS»ƒs‹¯ ÆÈÕ/ä–çøíÖ¾t»,/xwKõø²~ˆ/4¹Ff\ö´Ôþi\»š!q(¿³k„ÜZæƒ$U™0^“ÑævT«ÉdsgÜ_àö?ÔßY?q¸Ü¿¼]2l‡"KV›/æ2Ù´&‰Y̺”%ò;úDîÞH–í­åГÙh""d-Eì@P˜ÍúzR’_d!ïoF¶ÏoÉlS{d°¹¿[„Äl(›˜°VnG°“>°½µÝxŠ(F´t›¯!ï!6P˜ÿ‡ÜŽíŒò¿¥Žl{‚÷R7lþ ¾®T› 0 Ó‡<»Y^‡~‡h)Ûë5âH·NLiÈß"Åæ¶bÄ ¨ 㢶ÉëÐZ€[—Û¿í¬Â­GºesARÖw=Zž†•{LøN9y#øÇºØ^ûW.*º;Cv=ڕ͵—€¥l€ñPˆ–œ$†&›N¶WmÏFãÿuÛª§ñºNmþ h±Ǩ9uŽó\6>[ÛÉȶ^5šzp[¤bÜØÒ‰Ím94ŒïŸC}|Ä!küËMgs@¶nGüø6£xANjͨ:µ¢›«Nsÿ5[Ø€døyþ<Ü$ËÔ&Dˆ|@U›D»¶—¬v®â§ôÐþç¥@¾ñÒ»l.5+Š?a”a.¦}èìóìgAÅÙ3ÅÆH±ß¶¸mdÛ0´¨Öî¹wÕóN| ÏcÏ’V›Kµ½îÍvϲË3}÷¬8Þß2Mb€ðÛ$a°­‹îÖFzÇ.$ F¶ëôï/JÖ/a¦(O;Óƒ¦öÞ±ÂQU—Yl 3ØöT_iüZÚïÌ«ÝÒ÷öe’9Ãø‘jOÝ÷QÞ1¾Ù.Yúá¹l€£rÒnpŸhQÖ»løÝŽ:C>Ôu ˪ã^ñ²X1ñi¶ªM`rʯœþçeF°AÇÏôÁ¬ÛÁ‡"»ø…öÆ?¥,’ÐØÄ¥×³û<`1œzZŽxôrÿ¿ž¶ŽzY¾ðéUo®Å™ó©åÍ^ÿÞ ÜJ¿¯$0‚Lè2¬è¼—qmsRWP*>ïd¼ÚãGëô·¨ÿ”73æ²w{r6¸H—a%áõŒ·.vÿ yB1]†•†ÙéÎÝýÌÜÔeÔq}Åàçæÿçž¿}øb²Þ .*¿{"Є׿\¥¾kå¯u0"5ˆ±¥ioRÏ÷ c²)i P㾺G¯'Øà¢Ä„'•y:‰ms âµÞl?jÎ[CŽ„áE>§naBÀya n÷ —óÓÁÂ{”â=O‘Š#· Î Ué¡Þ´á®Þa5ÜŽ;[¯' ÒþGß Òàô¬Žqk—„Û9\ cBN ïçÝšR}Û§ööËhnŠ/¾?–U¦'ü8ˆèý‹°PwöÞ,Üá•@ROS»®kÿÆù{zesG¾Éz,¥éš ùJ÷ÓÓ€Nfáv¸ÂGyò~³äNÑ>çööãNצƒ‹]M×á¾à™<4Çtš†; ¼{pêwr:3z¶0gON§ÎハFß.Òp»T¢¤ûçê=ÜÞ¦s£6܉ãoêû>zÙá ~@×i¸ë‘Öݤ˜K€Œ.žÊFó×Ôû}Â6 BJn¯f8tÏèä:äŸìÚ¨u1*è•G_0¡©RÓp_æu˪jOK3jǃõ`žµÔ4Üæ%ˆêÎÃë[|„JOî…¦Ù$@¯ór#¢eHÃ}XÔ «¡(3“!axuÿÉ›¢Àè£ÆL–<ÜÙ¸$»ÑWoYŒ ¬òåâdÊÃí ¾ìS5Qk$‹Q“zpêu^ dÁ¸¿Élõ*d2jŒÒ —Ùƒ*ý{18~ï¾4\Õè4àœ~ÇXn·é þÓ$Bï⇫Â,Û&9Fy¼­êD¥AdaEN hÝ…²]ž~«­ kÉ áücí† I„Þ% ÁÂ,Û&0”ȹmQ'*£òNÛù‰ÖÀ—uV÷?(n³Uç ™Í›o¢ÛŽÐLâ^¦îÂ,ÛÆfñ6 O¹j§£c^w"þŠ¥ŽNO[n à£}2üäFî]b‚mŸ«³,%' ŽÄ?hßV©“M¡W سlâ° °÷:åV}RÛ¬)ÍÆ·ÞXûZ¡³ž8 ÷O Êa„ L¿Yƒ¢ÖôÝÚµ¶‚¥yÀé3w¼´µù9εv­•Úi8N*ô*O·äá> =QºíC&Ñ—´Žâˆ–ÖÕ0­ƒ—køÙ'»mKê9‰SSd!¯¨¾~Hœ¿»ÖZT0ñÎÔÒâ;hi]HkKô}çH…^e8`-̲}…eÉíÔ;W4yܺo’`qlƒ°FÓ È‘åjüÁRÜjÍ®Y{J°<œw'-;_S“DSÓº¸µR3G©?ÆÎÿnýc­ß¿×èÁE˜e[ûEÎ9uõ +êFüÝêêÁ±ÂÆâÔßxî%Œ\÷ÒAÜhM ®^+üxL˜ºº}¾ºzóQuuÇÛmµPS˜¾˜¶1€×ê \ï³¾Ÿ¼x»‚ Â,ÛºÐù.jûÊâÕ à®¶§ÄNÍ‘Ûy’¯'ü‹Óh’5øóF«µRk)XÆG¨idå«©5G©íJ”¨Å2鉯ãÄÎÀ¥eu|ázÄgýAâóˆ¦ÙÖ~'[Û†ÛÙqª‡ë.eWEíP©/.¬:+JÄíí†Õs(ß"Ýê¶ØÈÿRUˆj—.\ŒÝjû”rk¬F i¹½×o,Åùn=bòà!ÕèzÔ>#ï¯ÿH2\»ôvç!n´RK<*×»NÃÍáÆ—ºeÕõZÒŒîoĹ}4{Kq1¾À‡‰rÿŒ—rk»Æ8Ü=££hK×F·—#G¹|DJu1ŽC£’ÏÌ1œVu…^.v7ø H_וÑõÙ¨‘R T—ê lYOå–x°'ø§WtÎÁ¤ïÉÉáêúÎþ™ŒæÿÈý«ÿð•ÁÅ8Pò4ÆÅ¡«—u‚csOf­1¶ÈßÑ™Qb`3{j™œ#1y @gà£ÅpRò‡ãG¼ÿ,éˆuQ@Jϲ€nhDÝÑ.µà¡A¢Ç9ã¨<³|\óæ×· k¬/8õ({)®0µR_Xý8êë²÷ út]NÑJ³1lSs}]ÖÖ¾x>Þ^Êu}EðQ­MË~úuƒÆï;Ü6Ϥ''ÒÁÿ„‹Ç–ÿ/š3Ò”xZwÛêŸ^«zÀ6¹™ÛöaëŸî¹­/·X‘tùÍñÐ ¾®×!‘ˆ½ûÆþy «{ƒ[®LdB‰×³'#Ì™Ÿ‘ õ–Xâ'ÙÜŠŸÛ”ÿ÷Ǧ±MlÐ[µ}2l9V«%Ózƒ¸,6ŸÒC‹c*Û~˜ÿ kk—_Hüí ¸YÉIâZ¸Jzüf»éµÐí_äßõÙá%3“2öÌ¥’²ÿ`£¹ÓÖ‹a“±­1·ý»Eb¶á »ÕxJ 1 ÒdCJ—‰÷p3–ö‹è¬Q”£Í^sߘ’üc_E¤ "˜-¸Tñ_6T#ù–Ù};ÍÜR'–·1~ï;*=±ñÑÅÚö‘.²½Óâ/“wòÇ»¬žx…­K—Ï‹þGëo_£˜kŽÙ.:vî::ÞÉ)átÂ,#“ε:ŸAó]çš.³íÜmöÔfý¯V?Ïücì È›ô“’alob«Ä6n̤èðg#Ú$~¹ì;6-yl6%/[euYÔ-‘ 9‡ÍoÜ3ø­ªìÍ)lZƇlVÕ¿UÆÏ`Úžã†[›>ˆ/>îå¿_0{BOoÞv ,Ê¿'ÀˆÉÿúúë·ží$¡õ¼¬%òx`$vöÕ-·N¨uÖö¿¦íZìdí@»ªÀéL¥k‹3ðqà®™9ÞÙÓµãÙTþhÆÂÿ˾½Â†¾!:1ÝüŽíuc"‰Ó‚Ó2g±Á+\‹«Vˆ%.,†cóùÜiÞøÊ•¯Ù¦Ã?Q¨æp A~ùÕÜéàänƦÿ².`Ó³Ö•,œ2å“E¸;ÿ&-̼»Ÿ™a ‡ ò|@Wìì뜧¥µ¯î¬–_‚VpšŽ`O•‡––kn‹3ð }¼ü§›mßž·M­æ6.üʆäþëÇËâ:Mw•ìÿˆ%6ø`ºè›©¬çIüÒÓš¹ãØ x޳òò•e¢µ£‘𯞷-MýÍ¿%¸K9Îv¥ìÛä€9ì>áÁßÇÇG\(¾K™ìÑý Æ0ó  }ÞÔiܯXììÏ-r4}4õn6¤8hjVYhjšÖµ8sOMíoÔ.s{OƵJÌ4­.¬×Miøµp(k=Q·<„cvëµØó0cé;›b‰õÝÄ6teíù5ÜYÝF“½ÂÝõ`º¢»ù2Iûóõ§ÙK=ùàšô>c=8!vöõJæ%gÔ}®råAOž…zå)uu«²g`Ô·ûè ŒŸO!Õ¯¶JüTUEë¶¿ðIBbÓ…OL2ÊÙ*ñkuO³…U;fN|»Ûûö¼åe¢dÍËžþ¿ÂAóy‡F}RõKÑõmÕöB壧Îa»cfŒ˜þ“Ü^’Øã·Uïd.íëÖ–ÂIìì{¤þ šÔ¼¯¨éíRÛYh§V™¸sçÕ¨g`Odµûä‹þ£ÅÞ•“gN½ÜÂïXkíWÁ3wŽŒ‰ÞÃÿ˜uÝVôŸÿH° ¾ÕáÕÜݳSfú…eCØÁÁö¢jftí†ÿÛl~ÆÊؘs¢õã´Ç÷FÌLeCÄÍ0¹Ïò[‘p ž ïë¨ÅWÜâî{¾6;鶪g¼ê…Š•‰»T+/æÝÚÛR} aÒ^—¾òàn2ö=èÚøûzÂv¬cFQ«¿ïÎÝ­kºãÊ#ª{Û¼K¡Óµ©ÍÉ'ØøØGïÓÂêŒ7ú²Áï‡:óÿ­8,±aHIm0sÎ|ÝÈr;Ö¼¢ÉiðfÀ[Š‹q0à3£2rö`-5éí\Õ#·ÝØ•j«ÂØiàd—.Æ6P¬`rQø˜ÓƒÿÍ­ÈìÍgá¿e?ÝAð(;,Í]¸[7Ãw §(Q±²ï.x+£×ÎŽ*‹SÌžâ.¢­GSÿ•8¯ Ç p…Ÿ¶Ü+†'^4í òWW즵»ñ R·wè ¼#ð}t€+<ÄÞR¥—L5 {âÁ[ýàÒù»¥Ñšƒþ¸Çø¯P>°_e€+<ôì±^t^–ùö¶8×'d~».|öü*á ¼dŸ#ûí@¿ÓæfØ«ößÈx ã£/9]þ¼ã‘‹qu¸åÕµ‹Û¡g)ˆ4T¸yÄ@Wx¸ç¡^>Âã!ÇØóØ3–I]$à»; íIÚñÐ@˜ôÓéýk½aøƒ™õ4ápú*)÷…/lô+Uãz­ŸÂˆÑZ}q˜¥™º¥|næc²Ý ŒÙµI¦pCŸšûéœI”«SÈCwöÍæ¦¯a#îvù›ò»Gj…àÇ»}ðC)’Œø;KãaR¬»Œ¹´µ¯5!È|Xœä3òc{“Ú_6Ë>îâ\¿:]o< ÖmÆEmêÇoƒˆä¶Ü{cµ*rò®Å„ø…D^ɨ¨ØIÆ¿A?_7§#=`|ìú><Ú›:¡ÅE_‰76”púf†¹:·á— xäñì(ÂÓÂ8‡H®žœ:ã×ôåá/¿PŠ$¡gØh )ÕýìÝ\â.Ì…÷„2|7Ôó5R«'LLXÞׇœq*S0/djíÑADÒ3NÑ<4mn÷™×¨Êûc(iÕ3¦g.Û±#Qb)5$éEàªíæ—è2Ü3ƱY™ò‹¢ÿà)5"©™y9bIßžòå÷¯f½'¿Ã_EŽ IM½€ÏI«ž1(uk–£MLÜe IjRJ™6eyËÐÑ©nkSÙÆOåçoúêe I‰ÂÁ$aç¼¢êy³¹—=uÞm×S§€—ò•üZë2E$5°> !;{*1Ëi7 [jÿmÛÏùxsÜZ9¶m,nâ£GÂ-¹¥÷9g/Á–Ÿ£g„Ö¥¥ØMZvÈëžÂŒŸ·Ó¢C£®¦fW 6¯¶ün_ÈÑ”ë“ælÀ¼5æhŽžž}½™y½½žÞÙ*cK9õ&-Õ™°$5;à™3| 29HröZ± ý§hnÑÛržõñ ×sT¯è‚~™·®®w©¾AåYá.‹z§Ö¤ñ ‘¥Oáø¨¨Žºg6¤àý¦ \šÖ˜£:'ꓳeæå«W…;—µÕ† ½‡MàÅŸíh6œ;_[ — wàŽv×øÆ‚Â°®BOPîËL’¨ô@)z7¦@ÅùNFaÏåáòÏðúJµZ9RWê#\¹!,.åë´UjyãIzÛì3ŽÂÚ%Nr'ø=5[É ?VD°’.Xž­9¬)A˜ÔHwŽøÈ±éj6Ø'ïF¾è´Äõ(ÔR¾¡Á­] ã¦õ-ÁJE\…#‰Ú޹u(¶éz6X,çVNŒÅ!GõêLÕÔÔï¸s«WB¹ÅíÚ,Ç[B’Þènö¿~Ï%TÛK…=™B9?4©ÂGrô€‘`¹ß„[>È-LŽ i IªÁÃ*RµýEÞRGaí›:ÉXÓwX g›LØ¢ùq’U‚¡¸-}Ö,õSäÛÐ…€öYHÀE’U’•Üí² £°–uò¢VïÍ2 ÎÃF’U_Ü”i6 %rvi<†:5B’†¡æ ’U‚q<\iö´Üó»>Q…é!I÷4Ó8S{– ÙT¶aØb¹g[ß…¦=RC’^/ÓÇø³Q$m ö¸Ù–ûñ¤·08ã{ÎD°eåyþ„DbȤ˹­£n£p‹”¤ÀJ? ¶à/r²…ˆ¶ÜI±zzÖåÅ×nTŸÓ;|½.ízyR[¥Ç]iläÀÇ<¤þÞeDRs>ÎîË/Ò{”´“߶܉1ºúUQÜŠ©­nL±‰®î·¶J@îSíWákºˆHºŸ‡î=Ì×mK&͇¿3j„SÛ@ëµhêÂÕ¼¶”"L€WäÞ^m ù¯N#’žjD¶0¼Ï0+öÈ´ÿ©ÀÜ]*`Ù6К¥™)Z5Ãíöè_Ƚ½ƒ%»;‰H ¤¿,~¡Ã=à={*žª…é]-ÛZ¯FjE%‹Vá V{ö+@‹©ESÐ_÷$ýßñ"À»}Š™W}æ’Æuplh½¡éS,ZÕá[i¶ÇxIZüÚM€ç³¾}@Ò¥†y_çž3ó§±vÏ t‰3áÕ6ÐIýP“·¢qH=5E0«ßVyPŒÐU#·–rrfœÝ¹HtiD €{Ô Ïì‹S x@¦‹Uk%.\MÍ¥1ÜÉ+ÇUí`i–û¹˜ì¶J'T*Ì+¹}B`^Qzlxâmá:: P+`ø¦,Õ‘YâcÈUmå´·8*(5Ýc£Ü5Û*#§8ÍõE~›K?/`ã´®þ#ö§¯ÀS`>te…Ý^ M…jù ×¿ûc߉3†Û—~*5ÃÎ3'®þ{ÀJ<¬2Ârů*ñ÷œíüÖ@ÕØ·e…ÝŽ åþ¢Çœ™&ßž:ÿ«yÏ÷«QŒ…€• £°{›”~ŒnÐ/)Fº~ÛU%¾¼W†oŸÙo4ÁÒCÆáŽò§²öWÖÎNŸé¶LËä‹Ë,­qýCâ7øp”: {XÛ¾ìØ}k:¼¹£)ˆŽÛ}9ÔßÓÕÓ?,î6Û.ë'©lÀ;(ev{úÉcÇS–×¾¹wï²b 1-ØEb^¦ËÅŒ& pQøÒo¢rg—£°n¡¦ÿ¼ìu>ô®%CÍé÷ÌË<ŸÑ ô‡(|³*¿±‹QØ5qà÷«tEF{QbóÉp ÿ|GÓ2ÏxÞ‚ûƒWö‚Fªw: »1ØÖ¿žý˜rt"{]tÏüxpÝ¡“y™)@jð ùµ Ç:I ¹»8ÄúC7diLÈø8ŒŒDshçÑqmÃùÖ¾ñÛ¹@ì¶òB®÷kDÝÒþøÎgÌÞ¬¤ÔטŠ3ÞÕ´ÌÓ‘À©þð…Ÿåî8ïÎ ¹ò\psNT˜=¼ÜëRç¨ñ]OË<™üÞ¾ñßó8‘“mÿnÍ ¹Þ"®¨Ñ×/f£>5ô¾^‘[ƒ iÑqOd£ä‘~ñGþ#Ѓ²Œhß3^©E‚Ãþ=ydZ$NK—i×Ôof,?üËéb‰ÈjÕnkŸdý›YMˆ”a^fxý'Ê;÷Ÿô‰ °=ôÏgÃY¿ÇUæ2ÌË´¨…#”‘Á…ˆ”i^f nSk¥äCà´Ló2íQw)#GP"Û´LƒrèRw)#×Ù2ñÒ6H°tsÓï˜8„Sw)#åðl™xy¤Ü[OϪÎJ¯cq“ºK  طμ´«;z /@×ÒFW÷À9ÃÓfÜ.+«ÖZ4Ðý–ò`Ö6õ2æFPö~“šÓ:áÙûý3¸=Åg[+O¨Ã”ù€^ÛÔKÝ’†£\áXá\m¨}¨ÁXÛºr_k¥10‹:Lù˜ ‘˜{œ&,¢aÇ-ã/j%„´Õ™OQ‡)ãK‰¹—©‚åž¼Ú \a^u€§ßVg‡fJ£ŒÔÀQ"n@Š`‘jPsœ+s3S$êÜ‘GÝ¥Œ¤Ã·m꥚2·°-×Vs(Û«¦æ k‰º`ÄPw)#§q£mꥪ®·0ÒåGuTU­ÊwHÔÝVšn?Ý=´ýP×)ãÇý,*ÇþÒ/%þ/ø{;žˆ©f˜ã.±¹_´’’ÕÅ3záì»v›9éê´Ÿò¨Yÿ÷?U½íKÌTÆü0œÄäXŒfÃþœÇ Ò¹k̪þm†(0ÕÀ“X‰ø%® y9cŸžP½‘üy«Ä[ÒDaÂ&4J$ò°XxÛv{úÒ/‰Ž*;ÒsNŽe!Éaìü«B‰ß»˜þ6u¨â1ï)6óö«ìû†5C,Ò"±›8ëáWuŽ!!Ï ?cͦ6}äáåéÏ=äb͆ç½>œ‰NÔÓŠç³w(u™òÊâu‘ëØ÷©ÜjÍs-jˆ*eKüeÈÆ^lP™*Hîð;cÓyCXî &–XÛvÊ”)‘ÿ¡U8_ݳ)bû>”[/žÙ"±½•¨ö“& G¤_ǧÖpë©ÿÌåš$!±Mš`ˆñKêQEcHÃÓŒùÝ#ñÒa…!£Ë– K‘ÄÛ¹_n½ÊÔjnÝïÆfÕ–XÇšzS1)ükä²Ú{$r1êÃIóì°•¿=ÿò3‘ÄY³Ç¹Y0¡Ä?§Ï˜àÍín“øùŠE£'þ4‘zTáX—°wË/ìCnÝmŠp—ÙBî±owü­K›G2¶ÐïÖ5+Q4׿œSf“¼¿Ç$ŒbììdÆìf²µÜ¥ù5׌DKºÝRjB~¤> ‰ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚èkþ:°EL endstream endobj 247 0 obj << /Length 965 /Filter /FlateDecode >> stream xÚµX[o›0~ï¯àa‰4(8@ o-K£n­Ô4Ù´î¢È“Z#À€ôòïgc“‰¹D™ªÊŽ¿óùœãÏŽÿJš´&ÿS)”TògØcÅPÇÖX²tCQuÓÒ¥I¾4;S‰¡*MÏ®gç×À–lÅ6)-|ɲÍФ±9R,}$-<éç@W€2” S|»¹Ÿe`¨ƒû¡ —C]8_òf:™/>Ÿ_kV N×2q–#™#j³s/j §2ˆ\ ÈºªØšÆ°> eSUÏ8NY/ÀiÆznDÛ„º"p²¦)¶a²Ax³¼užÀ-\Kj*#Âg”ðáÄ‚u²ˆ¿ æe0£öÕ™÷£æ0¸Ì\–ó.3#æ `p5Ëíº¢QûF¸yO¸¦©¶Ä­ŽV›Yûþø£ì“iPé81Eòu™¡M<”Gy’1Yïg<÷5iŒ\ìcäUÊ”&^P³m‚øx8ûd€Úð ®‚ÔO¬¡‹ag}2;‘xâÜÎxr»Ã5&uÆ£ØcºÂ8çË­ wÞg½ÍÛÃ8ïªSdñ´H [¤%kTÐ}0a‚)Xóâݧ—|ia¶S‚¢¦:£¶)Á!Äÿ¢”O³xîQo:ìñõ­5ƒµhÔ_\õµeV@Ó‡éUÐÜþ0G¾¥àX8:œ7QÕ¥ŸD›¼ê*¥wÀ ñY¢ ƒò„=87@¦Âü¨HüKT“q¼k” ];wNÉ·ÚÑ÷óK5TíB#v* ,é@?%‡²êváò ÝêÆ£ß¼Íº¯¼ŠŽ÷µ+Ú.óbÖÁ±Îz“X·ì>{€í:š£6ïåBTñôƒf ^ÃÖ›ÛT ‡aèr71tÿ1>œnìºKè‚ÄmÚÜ/¯¸+’,Ö»tjùó6Åášï!koþ-N" O”z#ê´Rwe&poÊ;n“­%¯pxôŒÝriìm\ÇR]z(¦ 8žp™]Jru vxÓ-‚ÈÔÑ>¯%Ú¬ç„Óò+U`öÄí«þÚiÆ JQ˜U5)CÅOð1»‚`ä×âàU“·†•—%0L ܦ¶Ç•C±BÙ Ba]óê‘I§±âDÀB$”9n¢$~ªJõ~´+máÖ’ÂrwØ Q7À)T ƒ‚v { ¦mÞÁê¢\º·©\þh¦­Œ4C’GšbYüÚæ¯éÉ6¿DÒã‚dU#'~¦oýmèf8 ÓNwE“ÅÙ?z endstream endobj 250 0 obj << /Length 1143 /Filter /FlateDecode >> stream xÚµX[s£6~ϯà¡öL!`Æ}ÛMíeÛn³n_: k•D÷×W É\baÜN'“ƒø¾s?GúËò¬Lü°°åŠ¿`½rw­¬È×#ߢÐJ­_ï\±Ðµ>ܽßÞÝ?z‘µvÖá"´¶©,é[«péDþÒÚ&ֳПÿ¹ýáþq±î,\z®†¾€iÖ<|÷îÓvó4·;ó¹„îì÷ï?}–Ož6›§ÍÏ›éLoº ª®L¶æ²}×Y{ždüjn‡®;{A%“w9b\ÞÅ¿@ÊÁ5€´=ÏY¡ü»=ÀÉ‚p³ÜÙò³úé1(ßÏH*¯üHä *@Y;h±!ÅÉÜ^E-0|åÄJ¸”’BÞ•' ”È@iñ¥„™ 9ñs9ƒRÀ•ÈjÁYDN¼Ey@‹HšL‰H!È•T8iñô¤L¡,Q€¶×y©Ï¯3} Ö§ïYhÀU-—vDL|¢i‘ߥH‹Y’#¤ò–•0æ´*nb ;,Ò`F…Z{þ'](¬^÷EÏm£6Ðç¨\Ä#ô›¡ CÙ{¤Š9Ì„ÁÇÐk„WൽFp’ R&¤ÚçÐ.…MQS(dtäp“—è¸è׌ðÉò¦“¬Š³)ò¡ >"¯ 7‰Dhœ¤þzÝ ËÅMáÀn„÷›à+4!Ú*|‹ƒ`©ØÍ ·éÐ/mà§ç#)OCôò4¡H‰U»‚к½ø‘ñ믕÷ ç"®UùB¯P¥œHÅÇ(Øíÿ*ƒXWž)ö'Ý) MFuß Ñ†‰sU„e‰ôÔå5E0O˜)HÑ®€Ìíåml@^ä·g.ƒNª퀨ü‚)44ªæõu„zPR㊥ß]äãÈûfµQ¶æõuÖ7d‚A‘ Ú5Dê§ïï߈Ôú69ƒ1ÉI%f ¿SÆxEUñΫB4\ëFq¸ž*uvê~wóâ¥u—%OEY8Ú—®_HQ½µéV !‹ ¶ßîÖXßfõðfðïlô[¼Ðuü ª8œ(Rç(«(Ô)á7óúøcö Œè Mæ^0SGÍŠ´Âqma6é`e³½ûŽæÿf endstream endobj 254 0 obj << /Length 2935 /Filter /FlateDecode >> stream xÚÙ’Û6òÝ_¡GjËDH€gÞœl&›Í¹åÙ}Ùl¹( ’S¤B¿~»Ñ/Q;åšÐݾé?7áæßoêMÿââ8C=í UÛ•¦Æ€€p|B¤×<#.ÉJžeÝiZ6´ X7æ>ß]8¡·lú w…‘·“ôÛki!…¶¿µým·aæ{¼ƒ hø;yZœª>^$À@»WÄNåD‰È,‡s–€¶Û<ä‡_Å-ÁÒ,vûÏ\ 4Ù=s^ KB–†Cúc$_*©!â?ý£Á—|šªª7=?hhÈ"°‡{èjPˣн±rqPÞ@4ÊÅ¿€óíh×D^T½ÔnWè¾<Ñja¡FyqÐô¿&ÖKø²íÿZ"Óm‘3‘ó¹wCUZñWª´`*ÀeŸõÌqÎÒtÐ.ÍÜ, œÚdú \ž¤ž–(Ï$1þSâp IˆY§Ø‚ UÓ#À|žî»hü%ª;fYly`•BUżˆ2ºßú—¶9¶Åù –@¿sžÒHK»œ Qè ô€Qî]Lx_QžeTK3¿O5* 8¿ý»=2|Gq @I’Ⱥ$L¼|JÃA˜Ž;]Ž;ó "ŠÌTÅ0ÈE@24#2 ž£½Qð6UßQôZ/‡'ÍÛ b²aÙa>l÷¯Ú˜A¬¤’ -qd:0±1È£± ƒ ƒ`Gª®¥†7Aí”Òù·Ò†Žy”Íià‚êÅv%ù°‚ŠÏôWäÙªšå)EDøíܱU¡"‚KQ¾wyÝjx),™;K¤¾TXAàœ_ã2€Þ•`çB٣Ƕé/ú&oªÕÝkt5‘5®4±¯šÞ I0ä$$á¹ÑÀ•úê&oy;¥WŒ*ú(Ê&ƃ糉ç©ÛÿtR&ö'… Œq½3†‰¡¿­qbÝqÝÔ¾³ JaßdèZa(¼îù‚hBH£À VÔ+,e ˃ô³BtžÌBêGO3+énîRgG®‡ž¤ wht<ÉÒÀ;YݵüÚ}sбâlAXR¢j¤‘aÐÉöacÝŸw²¥­ÆÃl««îÑ„³Àá@ ž`&½6ìEÞ¯‡Å>òt+ž•Ç,Oó/ÐŽ˜eáàT¯•‘yþ—0ƒ;êç¡[åSe«ãƒL_ÒÌ sCpK6Y¹aÛ,°­4L_’Y|€éނ˦meUàÊ×k|C!#âiê{(t‡î¹fìêˆ1‡°e*&Q, IJB6y*ßÛ>Cm{ÕvÏ.[¨|}ƒÊ8˜úb}¹O#„ë8Ø*‹ªì½£4Ì ×Î6ßµýPü%X‡ãdFš} ûšÊö>@×OÎéŠÚPÛ$ön>ÞÛæ,©œ™zœœÂ/mƒnû’{Z¢žBŽõCQ=Ó§„Ów€¯?ß±}’móñ¾è‚1E,!©C÷ÄyêáI¿lM·spû¦7f—M!ÈSR`œS¾·B˜½bIÙŽò… ŽF$c§+à&+Øõ¤Ÿñƒ¨&Á‘ÒMel”ŽQ"Fˆçm:"g¨ÜMíµ¼cÚTÇ_bµ ¯zFåXMi8K“lÖÄÁÒè}_¼#–PDÓäÝÇ¡?0ëêÙ©Uõ=÷žd€=šU ȲÁsÓÓ€ÜQoÃî¤%¸Ú†ñ-Vã,È㱓Ùf̵q¢tÂÇl”LåVG†óønK& nõdÒàæ“½ÁOà^%™5LR£¤,)FÕw¤"xBªY%«†…µ>¬ZûánÍb‡¼È~HôQ}Áù™z ñ˜a)w³éµsnåü`¿òÏ^ÖåóØé©:ÙåŪ´£ûÒÿ‚´©QbWhìð‰LØ~dß*Sifóâ1#§¹^EbÚ=<ÝýÔ8΢¿hCªþðöYþ5ÅB×:J“1Fá4v]P<4*ˆÉþÁ‰À4ÎZÈl e1/›Äø‰1³_—p f_û$»mˆÿE@ûÍ'Isγ=“0á‘÷Æ6ÃR¹þJâh¿ À3!ÃɃ‡Þ@YoÔ&­ìúÖ¤60±=d„š £KÑÚÆGs*'Öʨï_ý­¦S endstream endobj 257 0 obj << /Length 3554 /Filter /FlateDecode >> stream xÚ­k“Û¶ñ»…>t&TÇbH¼H曜cgâÄu.™všÎGá$ÖIóaçò뻋(’¦Tgšñœ±\¼û^@ï7ñæßnªMÿd–„2JÒd“ FB¥bÓšÍÃæoO"m¾}òüöÉ—/ât“…™bjsû°‘<\lÅÃTðÍí~óÏ@©í¿n¿ûòË&y…J XÆŽùúå³7·7o·;&£@„ÛTQðË«7?æíÍ‹›·7?|}ƒ+Û_ja«)M;¿×Že¡Líø—íNEQð¡h:‚Ê¢ë :é¾-~í`¹]‡™”4©8ÝAg®i`ìh‚nSíg“-\TŒ€¾víÑ0¯֦ųÍÕtó¢ú0ߦýLÊOC9Ÿ ˆ¾hÊÇu",pÿ¸~°‹›ôm5ߤouÕ5ug–DN$6Ó¢X 2’ Ó”Ö~Q†ÖxI¿Ú¢Xƒ×Ž(Ä> UÞuÕ­* P:®Ê@=ÉÕV€lc˜)äÕá)b’`‚É´fÜ‹eËØ›¥­û÷ƒÞã&v;gÆñD„q’ø)¨®¸õ©Æós,ù»8ÍB»ÍNaµ%àŒ°]CFçÎÜT½ jý¬Óò1´{X¢`r)hƒ«Æ ¦]QëønÁε®Ë®‰ÀCkަʑüGBíë“.*àžH`Ïž9,jçwží…›Ä Ÿˆ•½iÍ¿É(ïídB¸(v|,ú#Aš:Nº{GwÖršµ¢äùD$Ü4„¦2­îQD$ñØ+¢X˜er"ú¼5º7w¸ÎùÇ‘ • 3NÞ,JÏæŽÈI ôCWƒF –IÐX –P{Óë¢ìK"W~rèv§Áa8^t¨Ð2 î·, †žF= üX”å“èhÀStÞµ5 úht‡ ò˜Çâp\ YÐ’´’ ûòNú»5@%,í$~,rØ‹1äË#F{*¶ÅÞèÒÍøV]W Jcå´Ï‡Vý¸Ñžúc¸¶-¨7¥¢£V—³8íÜa«óž¤ãµÏš^ƒ>òlj|njÖÕÅ™jT‹ Ÿ8VÛƒ††mï‡6:g¥ƒI„E¹wËœw~„îÌÙàøüdxneѦ Wt\Äa”M½ÚùCÙ_÷nJŽV1zwäÐc`ÏÕXÕ¹òxàM¡bV ФY< oð ‘Ìû8õY“Ðw`«©q»]ídnõqMß&´s)ÉÝH<ÍßF¶ð_Q…«î! “lʺ²¿³»Z&^áàÎMùk˜ ÉÑhŠ£ú±Ìk¼¯FÐ:îý>ŒÊë¶5yOØ®øÝ#Àc=Xc—’krË“µì*I&|œ²Æ¾4Œc>Ys_tÍ]Ó][g5zUâç’¨¶Pôz–°PñEøxz´×§û¢ÒιŒ-3±“ 4³B]0€ZŠíI¿C«2´&$_êG}_®F †ªiÉkt H©NεÔ­«eø–© -İ,Â$¦UEÈÂ8R1;| w}hõÉ{0t¼|ÿóm·ÂL¤0ƒò"¡µ~2ÎÎ3Ø9?çHóq) @À—¼ž«4 åiMÓ‚§ª0‡Ãïã”H¡‘”uýn74ôÑ#Ý›‰‰dW¼\§OŽ(ëçm¸€—ô!/º c»«Þš²ÎÀùëý.g²QôÃ.u³½¦°}Í+Da ÓÒ¿[3ü”ýœƒúûAõêBq(ÏF÷+ëDÙ9Óè‰<«¬@xüÔgšy°lÎ7›3r áNªT¹“Âwµ£”q¾t@þÆ´(|ꨬ ÈõÛEÜäqßÅ]ÂèÓ¤H©Vù”K ü6O\ʇÓgÇЧ«1TejÉy8ƵE!–ŸµlmÑMLñÉm®Ž¡ëÿZ= “töéÂ¥®%)UªÎɤö¿l&ìP3Ýö#¨¼õ4èp‘]PòL,˜Ù”uÿÙÇÅ*4J¬•Ø45gÛ#…—½a¸‡M² ¶»¹È¼»Î©*¡Ép³1Ì.+–!ØäX'Ý\ç¶‚]ŠYêvA'žSeÂ"ÊS¡³bÖä 0©vP—ƒQÙ >.Q+@ÔrªÒPâU}Ñ?^M§Ý¬qëA¬0ÍV–¿ Þ·×ØCº„iØœ/1‹Bn5îúw«©ê—¨v‘„)C/Å‘[㯶C†Y’l&èk*ñc8°Y¥P¤V9úM'Q?Í{k;zô¥péKÁ b¡ŸŽ5ÃÒûga¢¦ëú}ñð'žJ†2V³Sq™]ºë‹\טûË4À]!6<@-_åEuðв0J?)ø/U9SùôueîþÄ“@:}öb“kŒxÚæÜP5À,1„\l\½’…Z!Uíò=yü¨« oG1ŠS’F¥ 4ß?{Nx…Šƒ}"8½¦Y­¡áCg†õ«¤Yqµ¸¡ìŒÏº"÷—(þ¤—о9šV=±«z^· åoŽuY/”9%ÓëUÿÜ*g¡D`P›×-í_XCCÔ”gðI<x¶'ÈæÕ¶5»ûuËZ+u^½¾{þì‡o^¼¾½ûùë—ÏÞ®œR8×3(ˆö¯ŠÜõzG0êéô;¯«^Õ9 Ä5æ&xÍÇP*|á@èwÓÖQN©ê~‡h´n‚ÎeŽìŒn)Ä#A“ÞÐèÓíõ Â"J ñjϪ|YClñ›MÔK‡ÇƒbÒR`~‰ÜG$Ý'#D™&î†%QãUê*XÖàÙ°FHR_̽߶‡I8ÀîÖì™ÓÇ‚GSÔŸù”Œiü š†ãÓÙ³×DMYŒ„XÍÀ™¨…‰¿ä¥ÑÕHŽ­¹¡E°+œÝ¤ ìf¿éSS8Þ,¡VÁÉß±`µ?Æž<6¦,ˆö÷r8*PºÇ®h˜{…Y¦Ø`'h‘.¡—¾´ÄÂü5õ­’»ÇqÆXÉß-ÝœX²~yStu©{ãŠÁ™üä˜ßLŸ_àØCÙ_t¯lIˆg¿4ôA«°< ÈQÖmGŸN‹Á]_»qO%ˆ¶uïfãÆZŒEG2îÂ7×òj‚ÄC™ˆsòªéâîç•Æg‰ y¼È6@¡(õå*sÊ‘Øaô8ˆƒƒžjMƒ·¤{èQÒn90©!L±v‘üH}ãåM2>P>^^M ,·i—Vä}÷Õv—¤’vÁ.»‹HS ˾ƒI¡‚¦*cá„^:J÷«Ö4ÛìÁð~‰¶YÓ«) ìÅsCÞP8Z½¿zÀ¯º‡lP‡O«`FtƒÞRçÂJaÿµ8ò¿_ Õ^£gÓV«yêîWÒà›âPг|¼òWÏið¦­sÓ¡Í|AˆûGjŸ…tó}\» mÈH £º»–7-¦á¹Ù½Ô–aˆ‹³4[Ü‚Mø‡š½ÑÝE{No»ö6ÐÆÞþÐ_¬è~qíD5Úý44pèìƒ÷¯ 6tvàüî¢ÑÑ›¸ˆ«ç'ñj̦ݛ'¾0tÝp‡<öÝýPçÜGE­¦I÷%¾P¬p_.m òü”7j’·ˆh|*‰œ÷FÔ¡˜š bìÛLäxbgÍÝöYw ìð¿X¿¤uש ܾK6ðCøt"õ.P ]6 AGD úR…TLNêÃqÆ‚˜¥k\'rŃ}]}•/(ˆ÷9ÞÎͤ$Ìl.ÉÄå6 Œš’@èq^¡¡[ýuÂò¬wocJ”¦:XWÈ4»#´¿ÀöA_)Æß0 cßÉÆgÉØ=cÂ<÷VQ­&Sî…óÞ\ùmÁ(Š~"2zìœ{˜ÙHËW«uÊ"Þ`vOŒˆâô«¾F0J×öZá pAÞc?>ޤnÂYðÓ"bJ#Æ£Â&ò Õ¤B Åœtô*¹xÍ©0•Ó_@ʼ7W‚«„2;‘ÓØš%þ L%ãå©%Ã=ðïb¥Â¥’ç°Ï<“ØMžO¬çª@Ù)ï>Ù8û¨ù!½;Üt©.¤î@—‹Õ+w# jãtöˆ9×µ[ª,ä"ž<| §Tóü ¿íO†”ÓL¹R= ÈšŸøz7æZ[ɇÉP._L 6±1ÄÑ1ó±"ö v‰9…t–`~ßB¨ºp×%ûJ X˜&ÙìÌîw%*,žûùe¢êü¬¤ãÒÊ ? :ÿÀÁ&\5å›Û'ÿF«›Ó endstream endobj 260 0 obj << /Length 1317 /Filter /FlateDecode >> stream xÚ½Xmo¤6þž_Á‡VÚU X¶ßî®It½k{§¤U«ªZyÁ€ÀœÍ¾å×ׯ6‹!ìKrWEŒ±ç™±gžû‹á)ûÝ¥a³?1·|{ÎÐó-Û BÏ ÐHŒÏW6hwWo®®oÝ…±°‰.,ÇwŒy0³Bof<ÄÆ?Ïr­©éöäÏ÷Ÿî§¦ëÛ“OÓ…;y3õìÉ»Íãîæ~úïÃ/×·NØçy®5wCÖH æ|L ?öd:u…˜JŠé.,? „¬ï¦f`Û“ ª¨håˆÖ¢árƒóupÉñ˜LÓq¬…ï‹™¨X‚8NKŒ(dvyl†)&²nÑHÁšRJñ&GòæÕ™hP}¶åäRN¦ul‰V 7²EQZM™ U&ÂE(·"8¨"lØ `Cs ö¢Ip jT¦â •5L!‘Êú8b:\@ë%]“D Àq° RVd(ÍL5XtU˜P§¬–ïHá™K¶bÖ7FÝLÍÐ{fMÇ'´ª &ý¨|A ¤‹N»àaû›´'vHGMaÉœ_AéÙñdL ©è2©ï{8Oä²a-'Ë>ƒNÜ^Œ"“¿7 ræ8g”´‚Jlk–Ê)óÿ1oK ˆ—;æÖG‚2FI ,#x:;6òöº<=OK 4iƒX(qi–˜€UfÊNå´<…èKÆ$ Xö"ð¨‘j £æªÒ‹¯ŠÕœ~ÇlEŸ¬õܱZïû¡W0xkT}à%ü}–xÊÇ¥ ©nÌ5U ¹m#©B;(¡ø”¿d™0†5Œêçk§þ‚{/Xð§Š1»:Gä ÊAÔ2ÂóxÌÌsϳ‘²WËÞQ¹í”·ÊSá—5«¡¤º;”Šd ,U"k¿ÕçQl‚xÐvË6Õ×+FÛ³_"uôcMéõ¨·¯jJ¹îêl†¼ ¨áÝÆ«áútÄ2âã9õ­ ¬£lÖ»`½âeö}ç´Ý©BbDyâí/>ï¾Þóÿ#Oà¾Ú‡ÔøƒÊ„X²©:ø4¹8³Ì^¦½+²¶\ï\«jw³ŽZ¾g˜3Ç C¡Î-J×<¹ò^ÏZüÄXÓ±'ïØª{,ÁN]¦‡¼þi†$ë2âoô¬[Ý›‡«ÿ~'ND endstream endobj 263 0 obj << /Length 2755 /Filter /FlateDecode >> stream xÚ½YÝoã8Ÿ¿"¬Ô^Ë_²؇»A»7ìÞÞlq/·‡BIäÄ;Ž‘ífúß)JŽœ8i»‡¢0õEQù#©|]°ÅþZ4‹þÒ‚iÈs¾È“4“,OJ.ÊÅ¿>„01\üôáo¾`ù¢Š,Êå"ƒ$N<‹ƒ<‰›Å¼,_þ÷ñß?D…31fae °Ñs>þý¯¿>Þ^úQzI°ôÓ,ôþýé×ߨçóýÃýçû_>Þ#§qûk_ØÊ•É·{ùQ¤yF;þeégaè=W‡Ž¨ºêz¢ªæP‹µÄ½€ŸÏXP¤)­ªöOëJ­k©g†žO+ukÖ:£^Û~{±rËFneݶ›§UÝ®žÖíá…®zŒÈ㮲\Õ7Yùãôíz¡zwt^òªé¤êél~숿QâèŠJL‡•UGWmäÅø^Tæ|ÂîÝvU_ÙSÿ¦á·»ø°+òÔU¼x4'!µ’ýQÊÆnQ5}çlÀî^˜Þ‚$i6ÎXt÷½²}'Aö4ùHà˜çÄeX,ŽÐLƒ›ª;<¡xîýíų×âE¬FÇi–kwë^ û+œËºÒ–þ„R.}æ˜èå¾ôy‡½ë¾T¹ô‡óV6xŸFZa·ƒ¹¢¶.©J}û]J³¬z¶¶¹©öœ<ð Ø€ìp¶©ÆÆù×Îbw²cǪ߽z;å±,Ñ`\}ŒÎOm­7LôÂ…5<ŽVª2æ'ײšõIò­ã®Zï,Nƒ\µö””*iã§JR‰áNº ä¿hìûÖÏ…nð+–d޲kµ—j{KÛ–¤éíÔŠeAÛ~õ>¶¹I.Ñ9£èìÂú#FƒFú Œfœˆ*“eïC‰²3!¹5ýê4 M͙ڦ*ƒ Æ Ó5q @À|’ ‚5öÞ8nÁÁ ‹w%¨™«Í×øsð‰0wà%<¶1=‹1ë1„önMXbà ·?EìÙr…¥1@V±4‡L‘6„Û¶•BüuRÝÆ8‚_ÌLÝöB‘ÞV'ÌÜ?†®'J4sž$Á&XÑ&賸ÚÔ;µ8`'¬íhPPÓ<þa~›•åóþyèubO“À,4 HÞÅÜÎ苜!6 $ EO&…)õèß­D-Ìë¾£¾mEÒð¼¤X£h²ÑÇ̆;) «Šò½¦ ¯TížúutÀpm¦ÁG̼ޒ9Àu5-µZTÝȹ™M&zÕêJgªgìIMè€!r( ”˜&©~Ù3¥‘ûC­cP’œ¦Ú“œÃ§V³g ÚWÓ³¸ÐÎGLW¢ð¡Ü]DlÜABæÓ`žƒ Ú.Ž"ï°kP”8ì0x­çNOJÅZ”Íl‚Ñ,6äQÀó×¶€7š"ìk|ÀSAð³dWç`ëbCž…4UG@Øœ—ZZwî0",QcÊ˨ºÏÅøÓ‚íil¾#û2yÐܳ˜ÐSþÚ1ÜÒ,!óáPýbÂîÎîŒpo_m6µ$£zF,õ /‚%KÝÔ5_Ÿ<Òœ#~„|ñÙ õ³0Џø“ö~oí€beÅäy¢H"ͨ®÷Íû v9516áZ©#S÷¶z_‰‹Ô#‰BÝ£žtDñĤà2ü¡É<º3¸“›7–’DÌç8Ä‚ta˜PŽ?Õè&˜¬6šË[¼ü­àmpÏŠWÞ*¤VYþ>¸¿H ð=ýF”¤áÈ>ãø„t–_ã» $#ôT4W¥¥ n•%Éšê40ÌŽöЂD'ö†êåzg ¶ßÏäkª¯^è!=8=£D܆³(ßÀ&÷ôzٷ我 úl¨Ï(KàÎßlf™Ÿ÷tù‹X`³ª±¹ñÆ—'î_lÞø>~Úog~˜í+’›¯},¹úÖ³ üýã‡ÿpê›K endstream endobj 266 0 obj << /Length 1001 /Filter /FlateDecode >> stream xÚµW]o¤6}ϯà¡3R`€ú¶Ýl²mSiW™ö¥ªFðlbL²Û__cÆLð„쪊"œs}}εóhyVÁo,l¹ü'LvNèîâ¡ãQXZ¹õùÂå]ëæâ—ýÅæÚO¬ÄI"?²ö¹'ŽzÖ.Ú:q°µö™õ÷*p|gm‡‘»úë×OwkÛÝÕ§uâ¯Þ­wõþ÷þsóánýÏþ·ÍµkpAà;;?æd=R”ˆ9#½éËcÒAl…b‡1ïô$ÖOk;rÝÕjZÙªPËd«ä-RPP·‡ªc‚’ÃÚžç$a(£úP€º)¡¦|ÙV¬³åò~ćDªA'@ÑTÂǵ¸Çõ#½ ;ÀÂ&c4e|Qr„3ÙªÁ1›ò„CþIòei'h{eųˆŒÈ/_ÑU€¡'x:ÍÌ"²óµ­ZÏ’ ùaˆ AÜþ¹?ƒ[ÐÜ1Eß™|eô®.eÿ ©ün¯ÞÈMU*f’#Æz¹dËSÝT„MñÆ].*¼%mÓ“My~.Q:0<£ª’­< Zi²ü$;XMaj…¹)–¶™úJ[Õ2ÀÚyl%Ü™)f.”AÌû6Ýw1¤€)ûês^ͤš}èÚ’P~"^lV3–’…Úš`ÂFüÄMÈ ªZ(¥t6¤Q-4óÁWÊÅz©¨H ªs6½Ï"(xžFº õR9D~ï Í 5e?AÊDá·ÃÀ”󡺅‡ûjÊ)"h!› ¨† í(l Ì÷ª²žØ¬¢ñ<–1~Ý RhH‹D¸&î4=³^ÎxŸ^•$mIIW”óåö¨¬†’/òö‹fë¡è_‚™:ºñŠ©Gã‰(}Ø“müznY†øôæáiq]Œ|F)Ä)ÂÅ9©;]g¡Þ"7n%xTßÄ=¯¿#ÆN½<™J)|)ŠÑ¤uX}éZVó²p.€^zÜYZ²¾ƒ`rF·àþN;¥Ö ”#=O22óü âÌ.• _*üv +ư2mDñòžÏ‹œ¡=I'ïZ/ˆ0ÚZöÖsâXy ^äó8p<ÿg®Ï]}TUmÓï_ŒæNG/¿ú6½ŠÇv¡Äþ«¯âšÐ¦$)LU?ŬB˜ôTF¤SÊ8u½JçÔôc^,ª”F­O?ŽgÄJuÈíÃ¥’I&œ.Ûƒ9+>,𩤑…@wé"z&¤$ƒÓ©ºþßÍô,//Ó%äD^ªs$.¤pöÑö… 6Óƒ‡™¬åFÓ„žã†Ê4Þ¬k¶ƒkþPb•ðow͇ýÅ¤Ä B endstream endobj 269 0 obj << /Length 1412 /Filter /FlateDecode >> stream xÚ­XßoÛ6~Ï_¡‡=XC¥Š"õÃ]‘tÐ5KŒÃ6²MÛÄ$Q£è´ùïw'’ŠËIšEáuäÝ}÷Ýñ”ÿ<âíàÿ'¯ö"ø—̳0‰²<ór–„Ksæ)îm½?Î"PŒ¼Og¿,ÎÞ_Ü›‡ó4N½ÅÖKhÈ(󲔆9£Þbãý5Ë"ÿŸÅoï/âù@‘’(LSÇt:ýpµ8¿öƒ8‰f,ôƒ$f_/¯nÌÊõùÅùõùïÏñ¤Þü©_05ô)p¶‚x&yj,þäiÍnEÓ©­6R%ÛB¬E½Ckpb@H8O³OTË¢»z¹*ê le1ìÌÆî…õžÁª¡(·VÍꈪØñ‘´·±–JñÒ²Áñ-/ÔzoÏP¼p’<Ô§±6ÂV*K¡Ý–~mz¯âÛñ.·¢Þ,K%o¹*‹ÆH>íTo¡ä[(±Û[DûCРÅcàþc.èÕó]в VRkY½‘ »R®ŠÒ^õ’³Aâ`§Ðb]”å;zuåfÈ(#zï¨GæÙØâvô+M¾³p•²p9:èæ O¸RªŠ«R:½wáa–Ê`Q“‹:>AykÃlèl…ju Õ†«g[ý‘´‚Õ{¤N‡6@ó5V ¸„ýHp¯´Û•ÿ²5”ˆÐAòo‹ª)ùƒ3[éú—ã…E¶—•rÍ¿9•¼=‚^MÔíÃÖø¢º=²ñTݾ½Õ (ŒLÔÏK¬“ŸËçË/]ãeÜN_Îí±ÝcáNî.Q—lG s¡v¢ å$ÛÊ;µp\` IUáLñF°d'aaO–|–J>KþµÏàËû#WÚè *økª´l¿…¥qS€…û d²Qw±c§ÀÞ!™¸Ùø3ž’Ìñúû2,dPmV!±é¥Ä öÀ ¥æ×”…ѨÅÚj|¸º´›1`µQÒˆ‘A0H2ÈC2ÅÔ3ÛÏ  §íÆ,™~‚Ìö­v}–9`e”ÀMÜëÚV[õT»Ï-FtÜuh²¨Gî«hÚ Ãµc“y˜e©S 'ÿ´ñÝ„¦pQ1zm˜$ó½3Kïë~„~¹¡G¦ùãÜΟËíHŽÛqï||2}ÝÈöÆiÌgT«50"Æéë© DªvÅóÅÙÿâh endstream endobj 273 0 obj << /Length 802 /Filter /FlateDecode >> stream xÚµVËr›0Ýû+´èž 0âÑ]’ƩۦI·›L†‘AÆš€p…Hí~}»8I3\s_ñ ˜ ÿ @!~Ðwuh¸ž <ê†íx6`,À·! p18 Ž'–|Ýw,ÌÀóušÀuƺgÁ,·C[·ô‘cøsz}3Ò,h ¯G¾5<ÙÆðìs5\œßŒîfŸŽ'¦×‚³mKw-OUH®YÚ4ô]£ð© ¢Õ(šc辯¼z7Kcø@V¹œ%$çr’4.‰˜fšº¡Óñõ± 66uÏ3¥ Ë2غi¿^˜¢Stµ¹(hÈIFóƒ’Ý•ô†ÛõuhÃ'“žñegÆæ˜†Ë1‘0ÛÚ&,Êä˜g)æË&ga–®"Ž#•ÄŒÉ Ç9/Íž`±vëòV4ôMiðFÔØõ¶ø1¦˜ ¹š^§'_?L.gÁ³'ßåî­qdAx§ˆþUg7Ǩt‘:KRãZg§¹¯õ ^ Q¥"DI'ç6Ô…ŒõÎÉ—«“™âÔÌ#óù¡¶h•£Î3y†öù‘þÉ(~e+T… f«¤9ÖÇ™¢{¬…ŸÐîb•Ç÷4jEÖ8Qï;J õ\ä©]žÕž±ˆÐíq¤Ë¯ê©þ¨{õÓê•O¨äóª’¯ÿ­ŸÖÁòI²’6ïÒBÅM‚wk˜­0ݹN–E˜%8Wèâb›æ"ê*OˆÂå^SÖ[bÊp^$\!f EHDE®º®ÊB8¬^µHn»‹ÆMBsŽÕTˆaÔ%MXBæa`â1k‚þlë™ÌUcðÍJŪÕ!ó‚Ñ:o8QÂ]Ùõ¢Êwï¼æ …u‰)oaæµrei»zýQVÌË60½ŽÚàu49gÕýÕIS¼æ³¼lšv–—ÕûQ?®¾ªŠt¾äìm¶žÄS¦}ªáBÝ6\%ª†£TczõÉ8Ÿ þ“g endstream endobj 276 0 obj << /Length 654 /Filter /FlateDecode >> stream xÚ­UM›0½çWøÐ 6zkWn¥nÓU•ª*ò&†¸å«@6›ýõ5H‚ɦBç½ÏóÌ€@ÈßHäéXª -Û¶aªÐÀ¶r ðeùFf“÷þdê!8ªƒ5 ü˜ºjè°°®Ú†ü5ø!YšüÓÿ8õ4çh£Ž Š±Áaê=wÞÍ}w!+š %C•CéÛýü«ø²p=wá>ܹRG?´rªã˜”–KáÙÈŒodC(=±¬VÄŠRXAšÇ¤¬¨8œ‚ê˜X8±x¹*ž´Î JŠpÉ)Y ‹4,¢Âb‰X¹ã ¼ÙÁÿÊhØà›Æ•&O4oãËÓXXÕî ˜„lõ»2´T”¶¡bܱrÓžÂã§Ús6KÂ3韄7˜õñËT¬¢¢õ©ðøè}Î/qæP?g4q¿/FùÎ×1ËâÛê˜=ÆÓ,äo_QO’hÿB*¿Šªq¾‚¦dApI6þ½çý[a*­ÕqG²ËYIOË"@nÍP«z86æñ×01‹©€Òá5P"ƒ¦TÎÍž}ÖXi“JQ®ÓíP¨©ù-oÿ°OB9½=#éµú;[‡ÿ#Þš§’ÖH5F“éIî¸y÷ÂXÕ \5kÕ¶E ·9mg²ÞÊU+—<™’»þl“UÉÒ¤¸j8 ‰.ÄgrÐÅ)‘Ó‚ÄÙ`H°„oµÞö[}D9IŠêôGýߌ_€ûKE§à<ˆPxÐHi“vÊé‹YD¸ìöKÂÛ™¬ û@ïH¶mÛuý·²ž÷»Í)פ©Šz‘™çvDzlX€H…hT€v#ÀE[ùäçú“¿ik|% endstream endobj 290 0 obj << /Length1 1786 /Length2 11064 /Length3 0 /Length 12192 /Filter /FlateDecode >> stream xÚ·P›ë.Lq)N)NÐâÁÝÝ][,@pÜÝÝÝ¥¸SŠ(^Úâ^œâRäÒ-gïsþæÞÉLò=ËŸw­õN> U f13ˆ XbefcaåH()ɱ±XY9XXYÙQih4­ ¶à¿å¨4Ú`'g+ˆ=ÿ¿,$œÀ è³L}6T‚Øä]ll6n~6~VV;++ß߆'~€$ÈÕÊ  Ä‡ØƒQi$ NV–Ðç<?èLél||wà_͵±‡¸Ù{ýÌ­ìÍÌÓ0sqjÙ[9º€å$ÿ²y¡þ#³C\¬¼<¼\°#ìnj ü@ÓÃü‡’í·ø™ƒ—Ä`þLìce~þAõr¹‚P'°×¿ÿPÙØfV¦P€ ØÂÊõŸèÏb°ùŸø¹ÿNVî€w¬ÏãÇ`ýýùÏ“Áó„™Aìm=þ1ÿ£Å@  %yqÆ¿(ÿG).qx1s°˜Ù¹Xl¬œ¼žçŸÿŽóŸø›ýRUÕ_Õý+¢œ½9ð;ÅoÏÇ÷7׿Fƒî¯½¡üw eÈó@ƒtÿÌ¿>+«éóÛÿóüáòÿ7ü¿£ü_çÿ+’v±µýCO÷§ÁÿG²³²õøËây ] ÏË¡y^ûÿ5Õÿ¹ÑJ`3+»ÿÕÊAAÏK"foñ<èÌlœ,¬œÊ­œ¥­ÜÁfªVPSË?‡éïn<ç°µ²«Bœ­~_<Ï^¬¬ÿ£{Þ=S›çËÅù¹gª@ÎÏ‹ý£½¿1øyÕþ»){SˆÙïd瓜@¨Ï#ñŒ¸^lÏËkvÿcæ@{ôÙðÌÙ`qBýÝhnnPü·èOÄJüƒø@©ÿ 6Pæôì§øÄ˪ÿƒx@ÝÐs½ÿ >Vðí?è9èôìgòzö3ýâúžï‡¬Ùž·þ|®Áü_´ü|Žmû|ÞX äŸàÏJ‡ç…˜ýËâÙßé_ tþ|¦ý|æáò/øÏõÈþÌÙý_ð9·Çð¿:iêâäôÜê?Vð¹Íã?®Z0ØlŠú}b*lÝÜyS'FìÆ¼=!ˆp’~£ËÎÀ&mhÝ£,îx“»òõÜk«‘¼ÉƒóŠ™\zׂÜ$~þéêÅ\’×5 å<æ˜Tq2þ2§AUÒ(¬^3‹A Lï7 ýß’ÜhñÊ¥yäC:•»{ëʳñIø´7Ô¡m&#šÛ\oò6ìâ‚6£õ#Ò”3)»oQÝj±Ö†GG–°Hû¢ä]·R‡B±¥FH$9‘jµ— 1îóÊ\2q¼LdpEÌ+WéSo”Ï,·Î (è’{y,“Í£Ù=oI±–ðÄÓò‹v"ÍsÃÈáZ‡…“®µû3¬d?®ToÚȇ…(x,ÌõO¯Ý»(¤É½› ¦cRJz¬Ú:ôi¦éŠq5…mS—н%ňŸM¿ïcT8Dm›³tE2§ÃþŽ7ݲSS¸t‰/¸Ý_›ƒÝÕ*½F Øüc©DïÊË“ó±ð¼»[œvÁ±6Ê>'Ús­qÉ;³¸àî„ ø©É4£>ZÂÓÍnýÊ»Ö}Ý@qØRâSíÙiÇu´ö;6 Ï}¿ßCÀÒAY½¸9~IVoS®œ_yw€ÿyÒ ÃêZ}wàùp› PFuhòD¨P}% =ÓcÁ=\8ˆ+üééT¸=MÅ_žÓNŒuüA£e¾oÄ«›±¿} ‡{=ÄÊe{R)yKEÓÒ‡w‘.=Om$h/1.ºSlí¢-/Š~¶žxîèeg¹P2 ßûÙÄDçÙBäïºÈŸLž F¯~Š“h¯Þ Ž!µœéP’Ânµäd}\íAÞJ;«$Ð'Óœ˜±Ÿµ¹E+wTÏÊ _Jú\þD^ÌIÔKÁèëLõ‘H_ ã/´­-ü}@f:Ö²-ï–§îR¢CÃE^VŽ,…öõR€Y E‹¿€ga‘f æw.~¦Í;W<*S…8†¥yFÏÉWHºÑµ8žè6€×Åj³«nƒÂ Ç!îm¶¹»¶ ,ÚðÔ—ë¡ð}ó¶ÁŸÖ ÷±³Ô6l¯VhŒ.ì¨ °2ø6™‚ò·_Û€Çüˆ–nÓ5'UÙ¼¦p‰ðìó#b¿äJ/x™hvwš#†nåW{E(ÎІ÷ö¢ŽêæðmŽ–®Ý]7¯ ‹à.l5iæ«»eή󣆑eÛNPg(í»¤$}ø¿Ž>`øç‡Awt ƒÚ)yüÏ¡Ákæw>½8;ÓÉôu¡¼ð곺)¯q³›Ø­ST ;׃ڱhz_Æiå´‡¬y ÏÅó«jßKØAV·Y'hª| _›ýð²ÄçŽÄ‰D2t“,ý) V»0ÀÛY™éM®‰ö4‹ ;¼´â il#ÿúE6|qùnš²ZÁtoÇõBøþÓ½&dZ¨˜÷ç±;bÿïT¸ˆÔZ$ Rÿÿ.5ö·ü9­Ä#‚z2Ó^l7O¦Úr„upÜtFNJ”7Ð3ÿ å åƒPvS+Ðúçù“Ð ég§ŒWÅZKC†>Y…ïõÞúßô"Üp›‰”Š8˜š"]¹|X*JøJ_×åQrƒ:›°1Àz{™>ñpÜïÙ}‚X´ëð':¢‘Çeܽ¾c¬g6â‰áC¶ÇÂn‰+ºû‚²z1uCðî®8]¸>þ[ÒÌÔY”Y&xtÍž6’jê&PÆaŒ=ëâ96h[Ê„WœÕ³ˆœ·«KOÖb YÆ3ajõ (t¥?ÆêÔеȃ%Lv?‹ ÜôKÀð÷h¥ßÑE¡Þ‡ÜÆß–ŠLÄ8ÁD¥w¶]Ô„ aϘ« ë¬LÁn–畻ܲ._'ÄØkhk¹._~š)¿mþò % žyUQOûm…É!§nî»qV—qk|a©9›ÿ ÝÁ^Åøî–›‚á­´º«¬M€R˜í¦,ɈýÌ£GÖXkhèéÞ9D ~);ÂA>ám@¨5ÈØÚ!öl XV®¡M!J–ù¢Å&ÚÊ䃞–{±?)í™L]Úí¯õ ¨ gûÕœÛÝq-ŸÅµÁͧ>PVØÈ@s·h’b“T{¯WïqŸj±®9Ns/jÐèJ‡Ó÷h¦·-Òž«½(ßBHv‹ÈH>Bl ɇï¹4nž^ï“öÕ\Žaù9¡¬>Ç,=Mçéû¬$ÇŠš:„}æ·Ñ„d¹òý¨²ô$NjWñͤj\WE~š&Š>@á .œC‚k!5·B•G|®ûp*bþ”¯L…ZFøŠª" Í㯕%jv4”®¾X|A_NÁÀš¼ß~¹}ÊÁðÕšJ§?GrŸw7ŠúlÖû,—¢U:rut<òÃ#ÑÞ‚b’€‘ª™Zª¼uK{j¿ÞÝ7|;uÇ]Üë"ùw‰¾æóXp|L©•ܯØîŠf}ÝhïI4˜DØâD‚ÑÎçÅæW=lé7_´MB;òÉáN´âqŽwQz +íDgðÅkâñÅ/JµÁ–è¨X0/¤Î÷EcÖÉî9ì`€dÉ(‘õ=‹>bgfÉ‚¥¬µ¼rØ"ÎÙÆƒ4ëS´f¸çmÆùœK CŠ^¢eÊuøYb]4*2È…5ì®(ù¹G,=²ÅïaP¹”tJ u”m>ä¾Ã.I—8nŸß°0Ÿ½hµS19ý>Ú½ÿ{gLÐÆ‹Ó rÙ¹Ô»÷ÌpU­‡—»Aåž]©ÛqN5˜ûk3Ô%âhаÀÈøüÄñ/ó+_iýeˆsg&Ø\¸Y œP/R¼3Û“èêñ9óVËèö~Š7<0cÛtv´å¥Ú”¬_üêP «±‹Z]1*{³óµ÷mûl/2µ:ÅnNò\uLoŒƒïØÏšŸhˆºKIb¼vbžß/dÛu+ Pneø N'–w;¬v^¥½ú@(!SŠáŸ¤<•W;°ê-P@:æÆê[½ž66Þê¶æ¢Á¾†yÛçÿô¨UJÃpÇM¬ÿí¼E|g=i!Apt[5šÚκڿwhÏ­ÂhU¾bUS,_1—Ûz?èÒ*û鼫מcâSˆªÿ*+±t2zK–D•\ßtŒ¢xY6_fÀU ÔwïO>xdñJ3­ ³½a- §+Ã_ð“@Ng<þLòäûÛÔÚS,PfµTE¢´lŒ ýêë•b„*èªú¶U–-5+» ŃD¿?ßÞ£ æ_ÅiÑGUÑÇd„ +-¿íÓÛÔfµY¡ðšÌ&܈:¾¾q—ybIEÆ< P¹Í|ul]»)§¹Ô9…ÎD : "R_¬»s6On**þ¦oçojégÜñCßY…÷ï“Ú39‰b’¨q<ï§ }ÐÅ=+ÊšK‡wêÒ_lùøéiã—:b울ÞîdöÚAäpr®¦6Ûü‹ÄÄ+Äú÷óm:W¡sç6ˆ…A#bùäXtß ”¶¿bc¢`á]-ÅTOQI©·]žœò"¹(7ôä’Š ô¤~ 3=Za³Ñˆtˆëû kYæäŒÒnŒ ÿ9éÑ&ª³m\FÊrŽvWäUP w­†Ø8%gS”/Š"¢/ª˜ÒL3P‡¢bzöÔ¾!bè»Öe–š&ÚI‚thšl,÷pmÕ¶öÜw±'w W*¸;rô—¬}2‚–‘VgíÅOyOë|¥ g-Ú‘J­mOf9a7\sj,áÏ£#•®ï.¨Ž/7Î Ô^þZìc§“½Ç|Ú¬´.6áélìlâŸýý¡ßùƒ(žQ’s'6-wS:¼'S%QêcešíqÔŠ¥¾Œ±É‹+oqf+5ÝÊÙˆ¡n­cfÓÜåÉæ¹eå“kOÔ‡KëGl˜‘ô¼»¥11ÒÙÖ.–rgþnƒabYöš®Ûž¦S<œ­GÕ’ë 0rÑâ>3”-ö8œ`"š’´ô`ó ¸íµŠ¸7 ÉšÈÇ Žû<·yXÂ+Cƒá0Ñùé`¨Ué”6åÎþá#µ©†ÿ1EEbn;kJ䯂hEj‹ï–$Ê,¯ÀK¿‚³¦§sgxÒ<Ãý:! ‰Ÿ… MË"·»_=‘bŒ ’:|Ÿß®e“j#€Ð{´þó]n‰÷<2±mé·Ÿˆù1oÅ…ø¨/‘N‡¨³Z¹.ïF,0/)‚PÈÁU»cþ3:ƒ,åf¾×2¬Réë(0Å+¢l[-%1îVu‘ÚŽ/Æ?ÔV&WcÍ;ü°(V~áæa°:¯Ÿ½äÌîhwü(’Ëò­D¡åîJÀëòR³3+´7ïc\™ráÉÖb·ÍÁÚ€Ùš{Ÿœ¥”ÐpPYx‰A¢@3±×½ýX.ð×Qû2a zI|Æãþà;”º4Ô/‰¦.mZê6kpñÏÿHšG#ˆ+?ô„{wêªÎåkw Òíy®LïÛy¹vÅö+CòÆO3M±`$3êljÑŒ 6s+ÌY9ûœ¤4ee-Òå·'„/o–ˆ^À‰©äÑÕ„:2¯§¡[úå0!¹(KÉN‹Î쉦pâ[a²yÁA!ä"u®¶—œ†Lw )(Ðh]70Úz·ú]nû–Ý´°eõ—X“E¨LÒgeáHÓ!ö¹ûö¯N8,¡Ë›<_$b %Äó×£vëð„–â§SÏð²m«éØ –{2”ÁÄ9 »É¬¤‡"e3l©×§h†1égx¯°U}5žÈ…–ŸD¤nwˆ³²hÏ#Šœô©ÙQ¨ß}ºÏ;ptÃlèiT9!43Àç;Þ_‹¡U'iñ Bâœ_’Ü¢K•\ÙÚ”™ˆÚ«1ž ¨'DÛç&F°{L†Öâoñ!ëØUØû¦ ­DUÉK´›â Åßí6š“;/eŠƒ–”×_Õ/$w¹Q&?lüóS².½ºûÉJâ^<Ü€; ×4Ë‚e9r»¤,á~ÞwÖXÓfß¾6|ù’—›¡NJøáñ‡F,=–›¥õžò¦Bî}û½Ï*[WQæ°q/4N=¥äµ'b&ûÃEM¿¶l«hl=/X3A¾Î?’$U%”9ô[–ÏvD¤¨NÕíg®S(÷×m¨–ó.E5òï¼åÑèŸ.dõá‰ñ|˜’g\µD$éýÇRO гŠS:~&Vm¬ìÉL c÷%!À´fjRïÊ)]­{DÁdòâs•H½ëZ{¨ò„Œ¹‰†` è¸¼6£dV…»ˆ‚&·)Ùym/P7óÂÉ„гàeýü‹n"7—¦G”üÃ?¦¾Æ£m{ÿJ¿0©Ý Ë@{ U ã®gM ÷žœÝïV!£_uœÚÆ’N¢¤ªäÁ ¹7”´"D- +5ÚzJÂz`L«QáÛó'(ÐG[÷0Ädr7Šî«ÔBèˆë]-àVA³_Øä  þ±-‰Ð“@ò.öÂC2ù{’N©U¢Iè)ÕÛ[Îx ³ºß ò 9w1³Èçh:PrŒˆ‰ÒîxˆváoÌC`{S!À«8è4š;ZÊù%ã8>Oˉì¤Ñšà›«³Š[æ‹ÆE›/\ifºÎw©²±õAf6:<ÛŽê3‚ÃdëîhBÌÙ®áð÷2“x>uzmÇž¦sµ“ÌôV°§vÚó«tUŠ™©›:Qï_<:Më1{hÙ¤5}¤ N;9 VË4hHh•>xÄéI'£˜Ün~(aDs{¥P„zÝ ©NÈF)’âÞ"µÕq Dä|¼Q5"2Ð Ïð}“îZKúKDÍÕz-d*·x=Ù¯-Ý›¹ÎT >ø¢I;ïØÓw6û‰XñŽ(”g®¤Z†ñmïXžxtýjdϾÐdÚñMžJ^_¿°xªô™µ¡Û”¼ä¯ZÈ»>XÊÿj-íË')¤³Žy2ÙfÀò†F3™Î$±â ²Ú¶žÔ5}vÔnwƒ©f›I¾. g “& :Kc.ï_l¼Åöó„p”,U6šUÁaIù%ý¥íÇ ü†8TV|ã§ØÆ"ÂÚ´ÌüesAÃXâ%L #X3³¿LФÍÁÚк2SÕÔQ1%™ùÉÉ¢âNížèþû4öF÷a~Õ˜¯‚ žÑ1k#EÀ<ä³T'èçø˜ÿ0¢N'ã|šBcgÏý¼&¼Û÷ÎŽašUÝ–ÜN ûgŠI´ü:z‘ €M‹ŠâfE3áèˆ0X¤,tÑ__ô5”ùy ŠðßXÀï•®"k‰¬ÐoÍ©›ÐLÿZ€D·ú§ï Gr£o ûÒ§£¨$¢V¾Öuãú ¤[÷¶É(§R Vä+»eÐ>¬%‘ _öå’°*]B¨,¦5÷hζ_0«çÓ —0Lܡ̔ްs…[vîž´{˱p¹ô«©]ÏÒŸ¾OSSnÙ£»GºæLâ"Hi4, Z ÄSZ­…„“"sÉ0‹|V—V*G_ë÷ü2n±»ïÐk¾° k÷ÓÍ5ĆiVUÜ–p¤0p€óNÕãƒ#J“xo u¿èÂðQî= ƒ5Ô‰ø;©W-Crm'Ü7L¿ä4û¨Ãb'<²¾‡'½Mu°jÛyÒ6µÌ5 °¥]\-î_æoûˆ¥R¼GM5‰L!É_… BC‹„"ØÌRrOz¦4RL»!ùh†ÃpÇ6ÏzÂnÀãNwØÎé€V£ÊÛÉ@ÂïÊEšëë&† Xß´H±ò¥±u¯€r]Ðîš„¸7]aï§ÚV¹³ŠœÕõ¬ÃwC´KÄqEx&;ç’}Ø8Q~'š¹=͈î%öŠ`…^J6YôøœŠv‰TÊÌõ„<•RíÌ6M^|“Eì0P@‰´Ø[ÈP¿¼U•mFXÖ4Îæ$+/Â^µé­¶Ã¾•AùÎñµñÞw§[[3̇O>{¾ :Ÿ¼—ÙÖÎS»AÑZS.=D–(øRìBCFþIW­ ’$FÄ“ÍîZȆIk”K²4çÖiS»¹¨3-Z)=Zá"I*nƒ_Ï+@,˜Ë¥HCI¼,$Á|ßÎ_hìûK-Ü|Ù ð]”u£-Xb3Îéq„a;Ïv¼ƒZœ‘¼ìà‡Y{æ¡ÎY|KÙ£PÞ~›Sý IÕýn”¬ŠÂçŽöíë”ô·*Üèä>ÍÚ ¢”Ý£>µûW¬ó³œL{m‰^ûcu‘ž&ÔÓuº«±¡1[É}/z¿:‡ÏÀkÍtw¶y3ëõ4]øÄŠèŸ4ÿÜT˜SÁ~ûôIÆÖ‰å º²’ü›v¼ÊCØŠ[â]^* rB8µš— U%I AáïYÔ5‘~¾à–,ÆŒ)ÂÒcfØÕÒöürÁŒñ ÈAÌp•äh¾'íjä¶àëZao/a {ó{wÝücN×;£¸I×xudž|åuÒÈ ðÞvý»``¢t‚n[¼õö6ÌÄò¸ò2ˆA.ÞrIò2GDH°Wc·"˜!†|jÁÐ{âÀg˜à$­uÊEp"k”Š5Ê©èBoôÉÔ·u`kju$”dî¿K±Rd:YÆæ»«ŸW³òŸ[Ð×´ (àÉr ½'Š—èÌï‚Ê÷G)Î_…Œ§ – —kê½L Ñ6ØìëqU.ÚÝ•ÀE)%gÌBùü¨»Ê;+͵`§É²Ù?ÅéO—ôÊìa½BÇ¿ô¥€ñfÑH¯h;;÷çZ.oQ¦½Ä2ò2U[Ûû’"ŒïñrQý•qæõt»Y‰èg[“KPXK+Hç>kuͶ2«‰Gò-,:WG–†´1…qš.,^·fYGA_Ö~˜Üÿô3ŸÁPÔ’gküNŒ“ ¾\Öˆ¢ñÔìV8z?>ÓVIÈ„U{=ÉWîEý~2.RÜÆ,L¨W/óÉê-„äТ3°úcË×^b¹í޹yÁŸšŽ¢—wÊ õÀI^áî;´.ëè ¦‘^è2ygþ®OOšÚx¢;öÍMqÍNq1óvñ×mõ§66¥¯Fò”pË®.…œ $YtùÆò&Ìë²Pð¯ÙP&øÀ1âŸÄAï¤Æö!2œù{èäc”‘@ÁÏØ½íâér‚èù&`”gSÛ=a;é—ü{“v´HxË{•‰½¹ø%Ôe;`JZ`ÖgÌÖD8tªó1ÏÚH…€ þcûn„ÖS³£œ¿ŽB}»b¬•2Žû†¥g~©Ã ¿Lrióïe÷I×J2Ø Zêt ÚÕƒ(TßÌ\8åf jtf´/8ÉâéܺTG=öÀaÀ«›XTQãÒ%_h"Öí†Kkoþdi}мß${¯´•mçwúB ’­|Ö±^6;ZDS«[õÃ{ØË©Ô,ÛÔoUêM4š2~¿nØ#õa ÛD†j:ÀÞ»m[¸íý¼XîD6õùûT¤·ÖFî«©8¦“/LÒ=ýin¹-^~¦Gr ©[ùñ¥~x“ðùµª)K³`ËÜžŽÄ~R€N«{nöJ‚è,,vÒykÕµUº¦fïñ°?Ü/å´aþλ®½u"N÷‰¾#¡ˆN(ߣDÜ¥0eÓ7…­%¦–z-"Îz˜ýêÔÀ¢ÜÕR90É~D++Š7 ë…ö2Ô|Ó§Lì6½Õ‹Ó©/IV:ñUUÖ¡C4,eÛl¯Ô+Î×¹ìPþ,øU€*ƒÝ]eâFðË1Ÿ¹ÔÇ&6ü#û.ÅxO8SÊ#ÄfYã·çëç„D%°õCVÄZkÄÊj„{ÏK¶ …Ž«Šx¹pÓ¼ò:sÙ«Ò¹ò¦T}TڎΕïTû û‡¥ØÑ+ai'l?@\ú·Ñàõ›ð3ÞS·Æiž Qâ?Š.&†‹ðÊÁ6©Urô? c¼gsWUVOKT¨‘ð“—ËÍjØ®ºÄ‹wÞ‰ò ïùª÷Ôx—`>JЂÖ^p cêÖz.µäpRªx‹Ž|ßpC_ sÁ_ ßûuˆÝFÍ»÷}¶Å—Ító.©gbÈár—L j«ö‰{:Ö¸S»!¼Á™ôؽV>@Îm™ä-ý×Me7ÁŽyÄ™.Ó5·¶3'¿íÇ)¯óWWð9ŒÇ 8°èa££Žv ýS$ 2„rŸ¾<ŒðvòY­£v35. Ä<?EÄd Ù…ϘŸô0—ТmÓüàTÄ(Fœ¾EÖþâ“ œ%lPÒÂìT¾6¯¾¨¿Ð’É7?Æž°pm’kK±Ù'x{«¼¾lg«­R˜ÀQ Yû97uîï$ʼž¦xàÓ¥ùYÏL‡QÖ¯ª§—¦‡õpõ„²LzÇõtMª«Ìu.éy[&RV}³>lµkZ7”êÝE8Ÿ^Í>MƒAŸA-k¥PŠàÈçÃö¹É1Õ Zñ®§¤ŽT×åjy*?;Ó}zÊpöØzH­ºõVt±“I>/Ù$Ùß]J{ÅhÜ–„SžéX!T ¯kÍ}kô)•áµì3‚Öi“r9qrùšQ5qd&ñ"ì˜ÖhysÜôøjZ–FÏHÃ9ƞ⣰m*ï0Ç´.hhSïFð¨heA\1|¿Ôás±›bHQnÈ[Ô¢H7+½øvÊؽ|H¼ ZfÒ¸Â8\‘39U¹ØîÜ.h^ìÓ$ʵï­KÁ¨ë‘+œ]¶ÌÛ2{‡wBb–€}׫Fu%æë€§[½8(Šn§æwC캱Bå-Ø3>ÌÙ_à(/•ŽÄ£YhÑ.b­}Ô[In:∡RÕBÅ ¥e_8Õ|yå(ÐìRÖÌ`KÿH‰ìóËÓþ&×r\FZ&M]'¼ƒÑìÖ×ÙqÉåôù Ž.KžV¶@Ó“—˜72òEÿefÀ¯Àè;”Ê9_Ž8ãþîÍïV'¥ÈVŸ–×ÊØ×oSêrÇD” Ÿ³‚ö°<,¾5¢ t„zò®Þ‹æé°¨Æ& Gµ­äAŒZÝ× Þ"š¼#È¢fX9:Q±ˆ>.G —žÎÓ¿ý¦–¡ Ô_/ ©Î~ùq#Ùr/lÿ=Åõò¤*¬Š§w퉯xêñ¤ ³ÐãIi¬ƒ"‡…—œáâFec7BÆz*˜Á…{âK7:%û²èZýÚ$BšùòzŒüIÔ›_9 ­f×?éšÚK¾Ç½k\Y3Ý×vbx¿ô",À"ž!O:IÆnÜ‚!‹«+MøGÙW““*7 î>&×…6òü¶VV¬®ž_÷](7,“HÅ-.òÖ)üÕL—„‹3ÀãèÅ÷¨oüß¾-ÉÖ"ϯdéÌWJÉGñ–¿Î4ËÈHu¢hÃ}ŽÍhh€ÛH&Î¥P•Ù í¡U¨—Z×ÕТðCaâ:äAÁ¾hú±ú‡“Ú_ˆ3NGÁÂ' ×O´f¸½ßÑe-3H0ˆ¶ m£ô # ƒŸæiK3; L6ÐÆ–À%¼§º?ì ¥q›Bý| ZN}Àfy<2-âàjéW—‰8>VÀ˜‹ËÖâ†á;ë;”ëÝd y}œ™ùÒâÖ$Õ‘Cä ?â³Xà,¤8;µ÷º7Æ6§¨a]âÅk£³ !]ÕL#ìÍX0œWöŸkMÃÂË2¢ E©§£Sn®²XLê @­¡g]”<³Q.. ±¡$jÞêŒáÐèÀ(ÃBäºWæî–ð˜*̆–¤Q}{Ð"W}E^³2Gý°×!¿ÆŸºŒ—«g2«âËÊMÎÒÛ’ÈcW`¯¼;D|Íl£<œ‹$†ï)Û§«=rÝNði‚M"_À/MÞž[ÕôjšÜ-¹h÷@a:ÕéqþÁ¹äÿÍøØŸ6Aâ‚K›Y•AÝž`󌇧³Í¯”üÚ‰þR\üަê=õ\M]w©qåêh…_æmQéÕ(§r½Ë0l¾EìVìæ Ïkó¢ÆÝqŠëÂsK¬«&%¬¼ÓÍyÁ óãõà×Dr¹átJ@DOåÁÄ$‹BAÇRÅ„þ¨lŒÛ. ~‚\ÄîÂýpC¡ºišâñÚùx¸7ígȺäý×ÜFeîÞèÛmUާhš&"-뱺wNçGÖ¬?½–~'/øEJLôë›*³ÉŸg|¯ú(ˆÒËC”ƒP‚ ÒrljŒF8‰¶’Z~c†‘h‘ZdG^ö Tî=œ×¡ü .¤xošT`@§Çb¿ÄÊ1Þ¼õ>ZõЦ뛫Ótׯsªå¾¢S\¾c|©–q‘× ÈcÔµÓnm~VÐáï‹8@no ê5þ dí´[T{¼À 6ª`•F䲜wÌ»õýÎH¸‘)Þ5±™fâü6D³n²? ãÁY] ³ZÞÐ4¼U²”ömeÌü,`®Í¦&0SÂç?¡a¸ÎD¥‘HçuAÿ[ZR=ë\Ë©#1ç¾Dr{¶!³š ňl¤v…Dòm´Øº ûÍÈÄ †/ƒ)HoKôS›i±¾é‘ùÚŰ%¬b¤öãKk¼Döï`8¹¼šRYž °Ï2ÅCs³l‹0á{ͳÅÅ~±šºY)˜*´æiµ†´5+æ=Þi‘Oåäæ?5ÆÄtÚÕäÇg(³%.¨–eÝ”ðYL@EêeƒsïÝ{‹cçÝc?µeVÃÙ·6ºtÔ-ÁçŒõ©¿2áe”Uù1€õ11„ò# /ÿ }/²9 8Iôò:anë >P—¼×§TÓÚ¢l—ïŒuÐô«` ºèPÝACÈG<øtz3Ø•ÃzꪅO¯|‹z„üÞ77€çæ#/‹N-{©ÊL2~éÎJ³y`à„æi*ÄíD¹x>bì˨úÚèð~âj›Ö'ë+î¦ú;‡ßƒ•™èœUw•¹WÛUYПá¯ÄÌR#ÞƒHΗß7!¬M_iÿü‚ãêÕ~19.Ê»­òùGÁòk"=—ðU#Z!äã~¯„(;Фˆ B“O‰’Ð×¼æF·q'3!u‘F2ÁÐÚŠ‚ƒJµ-E4C=7ýTFÏ—Œ˜X‘\~O/H‘(EúδÖ5AðsdéL`r¿Ë$ƒ¡ïë‚É;'oêl‚f‘ýµl¿”¿¸¹øVa©ûc²Eæ»4Dž%õh<šÉ÷Q¸>lÐð˜©SWâÍA¿VªmûÒüAô^ç$éϾkd\ÛõÔp[òV¯ªQ/¿W¥‚¶Pš,¹}Ômw8=ë˜ mËžý|&~çÒ,Raâ ãå—¹™5ŸPÊÚò0OÂþùB$uº€zóØs*ŠÖŽ—bÔȾ߿ð2±'*9Žñ±™¦û×Î^«Ñ µ=ï¼î[ÏÔÏ+—¶Ú9¼ª£bÖ"‹æö~øîoÅé4 Óu‚Š+Ç邵•o‘CiúA˜f Úu¢>Öâ¡*MfkzÍåbÙHnžáÍròJOè;Û8­éx‘™æ%¬GåK pˆµëBL†9h`1BF†onÙYη¦åÚ‰„ò'ª·»±ÊÓKï-X2ª²Þ¶m%ãz…“w…×1U7³Ÿ—·¨˜,رŒö¥­(Á>Ñ^I,He3Ò³9?]3_è7˜¹bp [gf"‹ü/GµrsÇ @B©ÓkhwYxawiZ=áož¬„ ^ñ¥Íftî< Ô5fȶojUÎ.T>@²@ {¹'B}S™¶ÕˆS[ü¢kÔmú¸pUðu[Ì>SÈ| RƼ«Á»°^èdÄ©®§vÑÌhܘ2s/;dË’Ž²”áæ$ŽJ•…¿ã¹,Ýéé1£§_w²²„MªG<°Ö¶{¦²×ÙÔÁ[¥¬ö<Ž7Þ;î»ÇwÍÊš_¿bøR%=GÎiueìlƒŽäR:žwÜlœã•à‡9ðZgH5ÍF÷¨Ì™¿a”3]«L…?tQ6nûˆ‡l¨•EJ£Ì«§}w]c•rNÞ°r“ Dü‘ìÅ1ãuk‡´ÆÐÍ›iOú6(L¹Ë3Ž!#72ΉKšS¤2}0×±ðJK½;¯Zg8õR9‰ÑY†‚ 0‡²c8^UíÉL¢-¨ÂQ[B¿£sæ¶À®òJ¦F/õÃvÃ;f€Sª°]`Al¥²8jt i¤@ƒ±Sæ°ôÇÀ>ÑБÏv ãf˜èQz&W²¶_ÛŽ@–˯»¤ÿôÓ; endstream endobj 292 0 obj << /Length1 1485 /Length2 6537 /Length3 0 /Length 7529 /Filter /FlateDecode >> stream xÚt4Ü[×>mDD/ †èцè¢÷.zƒ‘1ÃÌèD/Q¢…Dô -„DôDï-º¨!j”oRî½ï}ÿÿµ¾oÍZ¿9çÙåœgïgv=>y;„ DGóø%ŠÚ÷A‚@AAa~AA!;»! ƒüìÆ$ Š€Kþ‡ƒ"Fc1%0ë§€5Ü`@0$* “ Jüåˆ@J•ÀîP; 6?P‡ ìŠ/$ÔÁ=æ¯%Ë–’ãý”w† ¡¶`8PŒv„8cO´À[(íõ¯\ÒŽh´‹¤€€‡‡?ØÅ@:Èpó= hGà} ‚t‡Øê€!¿™ñ؆ŽPÔoÜaö#!@,ƒÚBà(l„Ü‚b¨ku] ðßÎZ¿xjñƒþN÷'úg"(üW0ØÖáì†{Aá@{( ÔUÑâG{¢y`¸ÝOG0 …ÀƃÝÁPØëðëæ` Š¼>Œ%ø‡Ê uA£øQPØOŠ?Ó`«¬ ·SD8;Càhàçý” Hˆ-¶ì^¿;ûŽð€ûüÙØCávö?Iع¹Á¡®nu¥?.XðæAEÅ$„W ÄÓÖQàgzC/È/#è'Œeàçã‚pÚcI@ü öìÀv‡ÑH7ˆŸÏþ½€@@;¨-hq€ÂÿdÇÂûß{ló‘PO ¹ V{  àÏßß«‡XyÙ!à0¯ÜõWÀÄ@KYÍìÎoÆÛž@¾»‚@>!A è§Èİ ¿§ù»‘ÿ…ê¡.÷Õáö ÄoØâýÅÃý,¸þŒ 7ðß'è °Z†¹þ‘¾… ˆ -öú?À¯ÿŸîfùߤÿßRqƒÁ~™¹~Ùÿ3Ø óú〕²;ÚìpÀÿÛÕò{”µ!vP7çÿ¶ª£ÁØñ‡;Àþ.#¥õ„ØéAÑ¶Ž¿5ôW°éaP8D‚þ|l€|؆ý— ;p¶° Û«_&vžþ}¤2Üa÷sð„DD`$ìÀ¶»ú€°jñü%m ?Ɔ±ôü€ö$àgGA@% þ‰þD±ÄÕ Ûˆ¿¬ž\°O±Gÿƒ‚þ ¿ü7,Œ…an¨q €7‰øüëê¶nHl8ú—¸°¼þÚÿz@ Oˆ-`ba+âTRüFþ¦ßrß½!öe“Ü|>Èn§× “¸ËÒ‚æ‡òI]Í7¦•¹ä&™Ï}6ÞW†×&ê×ýð=³Š¿?°\ï§iÿœ»!ÿ¶‘øŸ¡ÜŠï¹«¯qà#¼÷¸5س\Ýį뽢<öhUõ|Û†™ê ]Ö_)Õ$9à òÅE[æ³gۤб ù‰x(v=Ɇ‡(2?_2kÄßømÆçù<˜zz2â=Sl(„j¤g£@Ljw@Ñ3Àᣰ–¬A;æS7Ý>îù^:9“”÷ù4ß þ5¡Ô2èý(xuK¹{ÏDh)+ Ây³r)±¼°šÊ ɪK]VgE‰.~a\k°W˜©?4n²wz~kRbðí%p˜ÔÌq# ¦ÉçG¥ëLWw;ßQØóÚã®êîÅ&?“|Ù6Ù[ eGóÈé)ÉTÆçøtï•Fˆ:Õ ÞI÷$ñ3|p¨´OÐ7…SÐB® àqüÜž[Û"Y¾ßžú•Tíê4Ì“Á<(_‹ê\Ú||¾»›Kï(¬lÆ•ªÜô${6–S_ªR5ŒØ/¡áW*ôbÖJXÿÖÁ–wW]µey¬´+Ò"ÈËéD"‡۸Ĩ.N$GŸei3Нw­*°S!8´UâÐnmá°¨HÁ’za|²[â¡Ðõô‹¡XHö“†û™(ÝUù¨+¯GZˆmno*¸³8WÇ’™Þ;]ìm|}æÁ‹QWbçÌ›ÐnÓ\—÷x8®”×Bÿ&@ŽæÉAu€PÅÝc.œki7fž²§­LáݶúÐUmüí‚Aá¦áñ«ÛÞó8-cƒ½‹,ŸÙ|`%ùw[k€R"Ñ)x°x–±Å€—ûs÷¸¢#/ì#kf<ä+'o•§·Cæ6;{®*Ü&ü ,H%Ó·©Ì-äL›ÕÊ»Cu9š˜á´à.wÊ[s¯eQ1Ku Zt좄 —mNI6Âè+qÿÊ™hRæ §j¶>¼£èæËHú%hûè³ –±€–m¹yÆKòï‹yþÜ,Ñö¡¦AD¶käQD8‹Ò#œT±ÉßîSê +g³„ðI–“s’Ï_ôË_× +ãÇŸh­PÔèÃÑ@cp8Z|ÄâDË·û[ú7FFÕFn&îG v_Wsð`UyëñÍ ‚Í·ì2¡/Ý·Ú÷œ„dÀúñ;ét&`¡/QÊ¥tݺóNeõÉxÚl—ãîlVÈ\ÉzQUÕ›7©²]ôÖ²ûbÉ4$V=YøæI ûâžzÒwA#Œû÷ПÕp&ÉH¥DSÞ×ø!5Ý@ëÂ?^)âàC_ÒTª¡K*†ü½è˜F/Û2±[̹îXÔÖ®ÜÕ½ëÎbžju¤^ûêÍÎÛ²3êöÛ(Á9Æ¢=míL3ÁâžXwÑ9ºg£Ç-À+ÈL×®—¬Âô÷Žðž¥šiòOkÒ}íânâ¥UíÖôG(>PPÍø`bôšâº©ÉÖ"¤+8dü¼TT] öcý´¸†/‘vÞ¼‘ncÒÛuÜÁ@D¯Ù3Æ!Äîð̦Ì;üH£‡>…× ñX»X¨•Î{Ö-!%+|X”çeÏkÒ¶fÒ¢K‰}s²­9šÏhl¹é>}>úb±ë‰.á-\|ú¹õû8á†Ç‡Ä•z¶,; ÅšÔܾIÝÃÑÏry&BžÌkâ®,Zvƒ¥‹7—@ÆÑ ÷äÊ¿Ÿn±&4™e#¼OضNú:Ø[K>tQ{|™ý"ôi™–Z˪;~"s[ËVpÞV! •¬]'O¶#*ìô= jœœ2ª„ÐiÁE ö<8 ù6†Þ”e¨zH|¥»×É™°ÄÕs^¯~æ¨sZ9곤K¼þ„§ån;âL­zÝÈÑɪ½ùÕ¹U®Úd$¬„.·ÄyÚ†]pâ>Ï©õË ÂÖìĹDûƒ–tØv=e¡lI&cyn-i Ͷ%F1C>gî(&Uêó©‘„ëví¸)>\… •( çNˆ¸ÏýqDyS«!-×’•Éîù M_„6‰åèÐsò¹‹[ñH½–´×.EвÊ-?ÑÌDrº lt•oÌÏÞ {1ÝNY´%ÓÖëWm{p>cŽç\|Yëý9ZÅŸ€˜†9)bmÖ)…\7Vˆ5Q¸å·jÌwuÚ s JÏ›½8›¿sŸ‚¦†&ïCJLæƒ^:ÿÚ­«žÇW_ÓY™÷™GÓvì×Ï*#5Ô»3˜âÀ}aš5cc©ñìúÞˆ¡ë¤¥ºüºóPÞzqñ¢Q¦àÍ–°P‡Ì{÷æåXUæO5UŽ ³m~¼ˆo0| ã‚9”6¥OÚ –Ä̰ԬaF’G>Y|9?ßÕѾéy ,’Xp5ΫÉïÉ& ,m½BÙ=M…_÷Žo"",ÉYÍ•½¥•áMÿð)ù.I™÷ 쮣Ô¥­*&Á¦®½àH”w¸ùõÂ × ŽUÑ­Ú“Ö$^ÞÐëÍÕ}*/O×í–è?;{űZul¶YµêèËîz“ü5X5åÀ6ÈzZÜßíÎöâë龌Ô.¯¿wWå;QW6—å‰×)øD>ÚIOaRñü¼=¼ö|èpáSåiìuP5I>Îúð¶÷cºçù.î{M¤éŒañ)‡ãmüH‰'lÔð3ÅEÐi+c'wû¨@§ÿ‘Nøp”æܬ!©œÆ¯Ã‰°@•S.’ñhýÈ׸Ró_òì.Š›lá&”Ü8›ã©”n´ØFB‰ÁC5¾–®R%UT¶5^å8ÿ¡«•Z?±O%¡÷¡ua€<ØŸ ÷u@X¸þHObLbóA J"—Óz±„‰t9ir"©ó,o³5tÐñ¬šYŽÀ>øZš%£ÉL(‡Ð]ŠB˜7É Û°Ée…ÇLhû¦®„ÍeÎ2«îëLÊî^“Ї3¯­½0ÑúåÄ]Ï,ô“šoªð`¦¡†4ßbÖ,u€‡vV9ÚÖÁ¹aì†ouj5ÅbˈîÜOÝ4G楞uš´Qn™¹BüêËÇo]Ë‹:7 ×;ýèSÁ5R~µ¹½;¤Ü8B¦ÍYQ%ƒû@_®L}bÍž³t™œÖh^À-ÖÊÑp–åØO¿VN¿nÆ9<n~gØòÓé?<—"·‚'áiheÓq%Ë*V³>õ¿”Té0úhªTÍMíZ>Jµ™m†}L³e­U–óh œk”û¾Íç,‚Â}aGknºvåÕÝÄï lþ”HgùËmTUsûþüÁOJݽ£nÔÁ."•ÊFÎ'Þk”„ˆEQ‘9ʇ֖ˆßÄÿÁ»Í¦AZ8ɼK¨Jï…߀ÅaYßp*‡–´ËÇ«5d0Êk¾ï§VНòwµ&¿»cß×áíUàÌüŪBÁ»´;<3컬ûp=Á•¯ûõcá-¦¸àqú‘\g@òT8ƒÇ !€èXlY…ØLÎËàáão¡™WRJN`…ÑõâDbæätwÁ“µêH•gA×fæN· •çÀæAöÇzžwÔB³¨}¿šœUJM©2RÝ0£dVø.2±¶rüEÍ‚u¨Èœà”Ü—²e+¢s,q‘Ó¨S8߯B àmG¾sàú^èI­Ï{-c^º Þ›¨Šj« ”d¾Ï&ñP”Š#âÔÙ«”ZEéÞµîÔ|hR¥Õz_Á’ñ¾öqÃó­UÖ˜Yºd…ˆv~ÙÕ¹•í)ªHBʧu%dU7ý ~8å†Î·Md³øÍZ?ÛÞPâ0¹ЉYÕ7}ÏF 6—¿JÖƒVÏ-©'öïáŸ0»õMnN]„L¾aõ}>ØLDÚ {¶ˆ–×ÁçÓ"…'G=—ŷ𥱴 r J¨zœAÓ+cÍô¦«@S!|vWÒú®iš¹,¾ ól öQß%>Œ¡è•ÿwcØ»ô“ª¼=)BzÎk–ï$—ÐW5Êä¾Ry½ VæTí–ê«¥žÒw½ò´°ãÙ#CÎ÷»7¤2¤ã\oÂÇ—ÜÑ0-EP¢i+P¤—á9À5~¬Õu0/Pv)ªß¤hp§ñVލå1¤ëŠP/‰p‘F²ödwHŒëÛPS-¤KYÀÙEGDS ×äéËÝ25> ŽTK.™ð~¨ì®[Œ‘ßǶÖÕ–ïTFÀ–OÉfI›_qNX†qÕ‰†Í– †2é5Ù×ló”Ëj6™~¤ÞS˜èQx3À€t¼½?TKîx½Ç\?LËcÆ·ôØyáj뙩ŽôK1I\¹õðjá­MT¨œH@ÂÌÜà8-^†$½%¸ºKIÍ)üÕE5’:Ès:°Âß,3Ù?ZV–ýùÑóÒIX«GrÙméÕÉ—oö qÜöK*Þ©ÖÕÕ²¯Õmqä Ô8’¥/ñ붯BÜá8â”é*A·,Ë1Âmûày/¯úEÉoCw¨2lYrk_Œ>ù"`ï'<—œºñéuÇ"«ja2yÉ*§½6j€p˜ÙÔÄèÜïì°ªºÆ¬µ*Æ’$`xŒÝ©·ƒE­a'JWí’¨«÷)³ÕÉ»(©µðо=ÿø÷ìë§oØ&1dSœŠŽ²")Ò!tçŒu[ŸÞ4}“K,¡K'~ .® à£J‘÷· [‡!Lp+µ¹öb 8Õù·§¬Çúáf>NSÖ¾°+ֵœê°¬sÿùr–åʳìƒ!½æîMŸg¯”Ë^ìÜës¯Y’Ž;nè>³N¯ÞN]t9>½V"îæ5͆ÜKžÙOrØûÙº¶ÜiòzÌr>óp$ýôæqãæu#ÞÜt÷ TRm/«A7´uŠ«Ô ¢¸Î¨bÜpáÚO@#Sì¶6ßʧ*ñå[«wpFhªÚ öX£-÷ñF&Ò~ïEKºùO 1^ì:† 5ï„ïÑ•šnÌËÖ;Si$Óð ‡1BÇÔä¦ãí?Ÿ?ª¹Ï¿‘zpîÎÐáÌOÁÙk°Ø¬T×3ó:c¦K¤yuÍì`TñmI›óz•å»2U7+ÕTÂ㪠Ðëdhèa’‹ù˜ž…]ÀüÝ'å x„Õ%?‚;+ö G6ÆÓ‚6܇r;Ú'Öã–ƒïU5¥DŠr=:6ê®.©#]wä „íåƒæÌÈ¡nÅÍ3K-{v6)Ì7Ö•%cc&í˜ïçáÍåÑä×6ø0q¼TÜ µ`LnW­ãÂg óá|·K"ƒU: ÍúòVCÍB°)Û’‡CWâ;Ý`ó…+žQ7];‚s¼®ªs%_Ö;ÝÑÊǨ7ÚVùù:25²Å{+-P}nŽó¨3‹¹óá¼ødßÎjëçܶ4Ðǽ*˜ÿ¤ñf®µÛ±Ü߫śÌÔ£Ók•/Û-'Eon dx ü°ïfS¼î$4/닼a=ØÐ£œ‘ÓìÁЄ¿ fºy-Û{º§¡¥ðsê~³Ú%÷#'rÙ¯Íß“leÇä>aÊ2<õô… œçºÏõ2˜ìƒBïý¨¤nŠ(™šUñ-f>­ŽÎœx;šÖ2@ëÊöfëäWÛ3»PÙZ÷Ouí–gOx¨GÏõ»¿èØØ‡Þ™ªo˜ É@°ÇLä×{ì;|uè/=s«TÉH‘n¡4=õš©Á÷_9å©¿ÒépxyWÖTèasÜݵ—½¯RÇö^Z6õ»jAi/Œ¶ö_;ÊKHè“ÙänÏÝOQƒÇe\©-(‘c]÷Q »/- „>×nëø~‚Z~ðã‘„ºé÷ûœÂ´¼…ËÏç?îPN¼6UÞÌO¾ÑÉÿõ Kc +Æ”ØõÆI3¦2¢[kø;NS¤Œƒòk×î­D||_GD1Iqï Y'{™MԽ€ÁÐŒüÉí)ºR­ç—wûò·WeSq>snµœø«ÐÚ«jòÞY¥AQ«^äÎ[ ÔºV¶\í:ÄuŒn#+>9yÀTì¢Tˆ–»&|¡x™š¹¦=.'ãÄ-mâh½¤]!s9öªëòñÈü–±’ƈïóÚZS2¿|Edd'm»a§|ç‰=Ýù•9 Ïôü¤ð#Y‡ê5‡n÷ÅfU_W9:µXe8?²NÄcdÀ#‘J!nôýz¨dÑDªæ6,z©ßvÞÿ‚3]_¸ÓFÊóvÍSfá}fƒIŒ“ ùÖ{ Z#žP@¦;[÷r;i<ØLïùðÍ{‚zî…̦ª‡°ô<Dà óÕì~©¼:œ”ÐÂH‹rý&õ=µáÞïý̲†’[rã*;´«:—$„¦M3‚åÒÅÜuŽó&£îÚ¿WQªvŒâkx…ÛÒ€)îáwÎKñ@§F™º_÷{Ù‰IÌ}|H•wóðá®pý àÝ8zëâÂ싈u,­Êc«TϦ˜`<£ ß(NÓ„ªŽðU92£Ñ¢ê$Ì)!«Ó‡2g’]ÆV?®tÉŒ¼–àQô£ª²`õ§&Ú6šônÿÖ嶤’f×3‘z 7WÐÍ­!Ntf”—vêÁ]ºë@ù‰ÚuXrÞÎévÞû²iêGB×’¼´z‚”ï½\@OU,v‘µÄW¿?üÊ ætø`Ïåä—Óª5Ri@™'`q®Ïo–Þ‰Ý5 j½G?jþÖ®z<ñL#Íbú- SÉ­=ÛÍIº€³2_‚Oè'Ð@{ªü*ò"’º´q ô‚¾Gý™W“Ù—x¯2ôs’ñl\\àÅYª~H¥ùô¬´Q“©ä­«A“S²¶wÙçˉ·tê¦ D$ÂŽƒ›ÞâÆ`2X[F[ÓÞ:¬®×Ï,YÚš´LqUð°£=Š×¸©#£C-©tX%-fÞyÒya´ÈçRòvêŠ7­"ý|N@\Qo‹O°=²žóÈ4Í» <½š|ôc3&yËzQ½¥òUÎàVšÖéSÚ·ýƒ=Ê;BãýjzbM´eL[fK&]|*=%–uá õ¢óÎm¯ŽÈ²•¹hNV¿©Š„Ô®–FÏÚ1ðž’ô$-^¨íÕúÛ½<öÎ3Ü YBJIEh¾#å ŒÝR©>LÕàRuȸjw”®oªä~~?J Eã=U³cg¸ÎÝ]Á3¿NÇx^f½Ë8Oøã Ú4±9åå º"*a ÉÎA2Bñ˜—<îaÝ.3Z쉼T ËÏ-Žô¸ÛࡽÜêO]¾éH6 ?ïô2| ÿºûNï6íäÚä¯FƒP‰¦'€%ZÕ#õO‰Æ9ö_æ(Çn‰<[e÷í†H–©Zß ª0Ï=%íã[Ž|@²jÒ—Äk׶Ǥ…æqÅ 9[½oéLöCReh=;èTt‚TÑ“Ý{]ÜëÜ8ûhZ€÷%ØÙ}VûçªCZ"¨ëÁeŸüÁU}àuÞ¶3nnQåö §60:-m?W,³ûʨÀ=äJ#A¿‰YRrÓÅGcœÛÜíî÷C&‡®”ìÍ®'ä Ðþw›üÉMÔÍ«¼Ot{RØXÛa¤”½…jíÁ€æ±‘¯îtnÖ#âpºª3Ÿã‰ÖéÅ5_˜ËÏý”Ê¡$‰¤Ïú”Þpgi_;Eg¢8YÆëdYü„BH[·,r?ùÊÇo³¬¨5»ÂLWj0D6’ÑÎqʾª™ aT¦…IÎÒý¦ÉfžlнÚâó%ë8uêß²– .ììoË⌔ˆ¦´€_¼<¼­‘IÀRP²†ª¦VfùA³R¿‘‰ ‡šÌÅÚa’ó+©ÑFºêøk €õ´9Gfõ¡ùÉñò׺™òUYBË] Ô5&ÿ4ª endstream endobj 294 0 obj << /Length1 1379 /Length2 5946 /Length3 0 /Length 6883 /Filter /FlateDecode >> stream xÚVPÓݳ¥I ½HG~R”ž„*(½WéMZ$j”&*HSAªtEéÒ‰€H“"E©R”ªÒyѯ½ïÿÞÌ{“™äÞ=»gï¹»{'ÂçM-$ÕÝ0® ' •‚(𯿠"#Hƒ„…-‘8ÄV°5ëÄ •þ®‰EÀpD› Gt3Æ ƒ*@å•  J (þåˆÁ*Z°@¤`,`а&Æ7‹ôðijüµDà¢TQQAâw8 ŽB`‘p0†á<(bF8̰ÀÀ‘\È¿(D®xâp¾J`pPP å/…Áz¨ˆJAHœ'`ŽðG`nÀ/¹€ …ø-L $ Xz"ýÿ0[`ÜqA0, |pÚŸ€vC`bnÀB߸ê‹@ÿálô‡ƒðçÕP)èßtFÿ"B¢Ãàp ʆA¢=w¤¸ªc$… ÆI0´Û/G˜?† „!}`®D‡ß‡:êfŒ¨ïOuþp,Òç/åôù¥ü‹†xÉÚh7M …@ãüA¿Î§…Ä"àÄ[ÿ.«7„Æÿ±vG¢ÝÜIp ð[¡‘~}­?=ˆ&Ð?6ƒ@ Šá ‚ážà_ä–!¾ˆß ô—™xþp¼/Æp'J@„#ÝÄÞˆpØD8þ¿ÿÞ PÀ Ç®$ô;ÑŒpÿcO¬< \ƒ @~}þ^9{Ë ƒö ùÇýwqÁÚê–Fâ¿ÿ ih`‚¼¤´ )- Pii@¸ÿ7ËßúÿÒþÛj Cþy6È?Œúhw  ø‡âÝý%#ðÏžùs\Dg0ÁûˆüÓö9œøý7ÿïÿ­ç±ümÿŸçÑ ðñùŠü‚ÿ C!}Bþĉ]€#N„1†8èÿtµAü1ÄÆ7dê?Q}Œ8êhŸ¿/鯃 F¸™"qpÏ?è¯é}h„)Æùë™$¡È`ÄYƒ{Ÿb¥~Câ(ý;¥6Žqû5sÒrò ‹……€ˆ…'îä<”8œnˆàß} €¥Ð1 Ê Ü1XЯzÊ*`âcõËú1<‹%Ûï³þµÿ=ÙD0šÃÀ/ßôzyóõ^¥:Oäb¿ò°ð¢ÍQIü¶)à€*MôyVÔ vW=­§éã‚¶ÈŽÚ$ÿ1~µþUlCŠYãaØ‘s²ùÐb#h|ýÍÀ“Uõ* ¯¤¥ÚRر_˜õ oòzÒá\¿€K ¦ù¬{AºÁU„²©w1c‹fKÏå iÊÞKÞ±Jt¸Q<"œçúx”S€'ÉG-ƲÌ8²³;Ì’3pÊo, _»#Sˆ·Ÿ•¾»?úé©¥´+——='ùË»¡ x•tŽø’Â邇€¢x™­$Žºcó4 WBÉ—^¨v“Ÿ_ò˜û¹ÖB[׋–Ы˜L²t,Q~½Â—Lniù²“Ó}i?ÆWÆRóR å艂æÞ«‡gçåã# Ïs++ï\LåßÂÞž äW™ä×ÝæJ¯8¦ç7£×a0~Ap£Îñˆå!o‹d œG–¶å€ #åXUèG4n)NåÕ·x¸($¶£œòA¡ËÜïÅxh¾W‹Çy{–“y] Ziúè·FF³å}A"eÉY5òồž8ø9´ênQÿ¨M\ŠhvJúèm~ÖVî~>ò"š;ÞéK i.ëwìŸÕ¦v€·ïY°ÐÓ¦‹õ©¦US^‡‡Q}N]´!x`š“7’G¹ßV¼tmC^òDøï5Wš1"nö4ÈŠêä%ï³Ö½Ý}iJg½±XÂ>žÔê‹ôN®sñÚÝúìÒšYݦ]n%Š¡ÞøZm³Eë¥aâ~»mªµ.Ú´Ç2qœ²¡è=ÌYhó Ó3úž-7¶˜q™»fÔ»\öî!²t+Ù%Áí³E s3C&ûWNr¡ã<ïçólç¼Ó8†õ3ëU„yŽV‡¯ƒÆ/N-Z><-8+¤/Üê7{ßT_°JÒ˜%e`Å:Ø»Ÿ¡=˜°¦6ýzd*‹Õ~Æ@Þ3róÙü¤²§údåLÿ;J%¦Á$ŒëX`Ã4Ñìp̿͘·NÚžGàƒ¤ô¬œÙ›>ןóÝI”göjÜ  _?é>ºˆï€~hUsë׊±Å6§iU\µO*Ñî‘Hú¨¼š""ìTÒ–¶n­ã­kæ~üõ=¡ë³ÈÌÖ:j³Ë½‹ê ¯ù]i§Ët|­¥jLºûÙŒõ®Ñý·¼Qô¡†ãÆ|¨ü}…/ ³¶ŽÆiľÔªW½a´{OtƒùËy×ÖmkõƒÕÉz~ؼÊyBÕ}0ª<©Ù^Ö²*7Dº½y>(oØéK Ý>Ûxgáx`ªùö¬„dA¢ýÛëáÆjU°yüÂZ†ê]­*?„_[z;óã;å¼ÔU’y¹%ÔÁÚë€ÐÎÇwØ“òÅd0¯ç*DÙˆCðâ&RÇÕ‘•¸¸‹Ê¹7j»ô y;@îŽïb5ü}ÑQ•¹ÒQP¼Ì²öѤWÅ*™ìΈ½É[iÉóñ  ª'¤ÛìOV6Ó_åÆP(–q_Þ½¢P?#úÈ4„V!.ü£S5*€Gg#k¼Kú !/õiepJ¾òе“¡9¨õ½ŸO´ /1ê2íå->wÖv6kÄy51,¿Nè°xà’äàÄÈ}úèP¼Ð1[F°½hªé•:©K¥Ž)Ú q¹–Õ|èL{°ÉÀ˜óa•WoÉãƒûc‡¸rsÈæé Übï»,Ç™/'´­Â1‡yj‰4?®1è~r .è–S|ù¨&é[ Û¦:ÌÝ‹xÛL²ºh˜³‡iø|Ë4ç¸)÷~^nçþ­ä"ù ­¶’ܛ؅øýi{*ŸËùe/PëT±…aò™% »DAíEœÉ;hˆcG4’àËSÙ¹2·ÚA™³ç_=U‚ฌ@ç:òÕÏQMy…ãýdlœ4HJ/>þ$rÌÊiWHÒ퉆ŒÙtš¯Ü³˜S% `Ù'™ì¤;&[˰'ðWÖ¤ÅÝC&£_-Œ¾Užhª›Ìíz ºš‚¯ö®¼‚rˆº•ÖÀìã¤ëiÒÍ?N©v¸:+›‘äOLÑx 6e‚÷…ëqì‹,b_©k.’—äU?/®¢[ÔsëñYÙ•ù%Bãð™Ú»qkRcæÁ(Y®ï™%6’ ÖÌzˆñ>SyKÎÔÒœƒ6IWtºBöj†úáŽïñzn=ä ÷ fQeDŠ/>9g<¯µØmm+]ÓzX.•¾Òg~À©=Ü´AÚKïxãŽ;á`ÙúkÅhJù´—‚5ÌÖÓúcG@/¸>¼Î±TÌ#yãà,hWi™×õjÆÔµo¢ÌzÏ^S¨Û’Mj¯6¦vžÿ´òȹâ]íWLbÄÕQ¥Q¾4öVÌëép³'Ø~âE:¡3Íj“J()©°_†p™¯  æ¡wpÿ²`?—ÑÄ`˜³¸õÈ3õN`°#Š,UŽn}YL»±—^Û’xÙáÒ¦\@ÄÆâ5%~q]ÍH¥í—:â&L Áaî뫱öP\ê85‹°µÝÔ”¸re™u'«¥M®éà¬Ì÷°C²\_ÔCˆ@ca³•›Âr͇f®îkÖ¶Ù›iRE¸¦ç:o›Ã±£5!õv¹¯8Ý'«›G…ÏvGï…òïÜÒ5ž5‹Q¾kÚ»©5àCòyÛˆÙÒ·Ëî¯ÁÂ.Wœ3|Úì±ÒÆ ‰WÊ—…’¥Ñ ¿<;7ži¥×ANIÑÖjðJ 3ÏœñtÜ$³ñ«ÎÚ´¯+I^hŒ|ÔÖ‹ÎÕ$¼²"O½úÒKP¼k¾«Ûáá>¥/õzHÚrYšã`ãÕ½"î© mÄ}_jëÇaÀó°#}G{·§ËYêjLó’›µZEØæísM1‰´b_K¸›3C‚¶Ø™˜é sÎÏe€T¬¬Êì‘ûRdHéT8óÙª§çé„ïÞ–³Ñq"c O´Q–½šæ·DQ\|ݯ2º ‘G ¸u‚Õï‰èùÈ/T¬â¿D5½¾S@yRi§V²ßÐ]"wPºÂT‹×oº;N¦Âú.äÌrÔKÌ æ«OkÑüêÒÊ­ûª¯ÛÌã˜+AmÎ=5‡?ý¤´Ã4æÝ@†¥üe¤ªm‚ë;ÙèOÛḟˆìÖrN²‘ÉÓZ£hÄê…#7û¾ðmé›™ÌR«²Åw£¥6„ûÄ ùªØ{µ&Â6íU«Öo*ܼkÝ"}F'F¯uÅtÚëå¸?KjÐ̺—–û‰òë}¾olZÜ9ª¦Î§›¸AL^ßÄ´$£„‹ð²„Z>’iš¼3±¹·Qœl”*lm’ÇÃ’ïÒ]¾Þ?ÍJ¾8™;ÍeT­¦†©éGïyòn½–!X}Òï ’aý”“ñYÔÜ–Q¯®h?_±Ð?Tö›m¼ÀKA×yÆ r#|6œ$F'Òä ÉœõÅÌ7‰¹f #ɸú]Þ}iž–“èˆ ©õòhàfK/OZX™3áëçLR݉÷€È3S½pI,ûˆ×ŽDf_@ʃ$⋌…ÆøÓó}ßûü§/½¦ï_øCŸž†|P7ñEK¡¾‡]ë¨q¿â‡àâó©VŒö¡±)dâ[Š.{w[ÛáFçDÅ¡ø8ŸBú[gÚF³ŸÔ¡ÑæñôœH-ŒÆý,å°Ü\´¹´ëYëŽÌfþíÍj6ó­€­GNkõޝ¤cžµÄn=+°-ÖZh³7ÊU¤]ÍÜ´z«¤ŠyæGWÅdãÀxòöì·Eþ¿²"Ó’·¸+;g=IªÛ»úæÌ%Ÿ+ÜfÔv%‰",5ØË±)sï¨tdîgP=Ü"Œe±ížmô´`1W¯ZS‘Œ¦¾:ªêÃ(à7-Â8¤õõjLìN€÷¹¬s8ÿTW¶`)I¡‹IKÜĤœ*Š©ÑYsñ鄯•yårUë Pð¬éüúùØ‘ƒÞg¸¥b»Ì zKB T^TEß|ÐFU?]Ü÷Ø#Ë¢8ŸEô•4&¼ð Òà„*nu:Ù(’ŠT¿oñÖ[¹„%\çXÓ'²wQ:Sß*ÿ2´pž•®éf Ô£Ãè}ïúíLM@:MÍá¼µƲ޹\[(¦8b1²×\½áú•a–©ÿ^§h±`À ¢`åÓ,ÕŠØ•|&%!œ‡òô\xüí+×í_ÕBžnï¥9*Ôd, Wn§-µ0(3ÉÇï®Â#Î º<£À»ÔéÏ~¾¯«™À'Ìêß1oqg&}EeTOû¢"NegHÅ£iÏvK¸,ÕŸMÔ÷ýÀÏéà­ÝS½«ZæÖvwž³9ã2Vˆ¢l3y¯ûTLñç«é“‹p×íŒ$µ¿žF÷Ž×]RdT¼ò…ù¥ZºÙqóÑ|{Ýñp‹ÝFG«Â¨“$¶ë›±Kó„­ÄDÏ.†,´è Ý”‰cLÉÉÇCJM‹­|_×±Þá–îS‡î|Ü>SZ:S`yÁÀ|S3àÍ1XëŽ`%¢¹?%¬÷0üœÁáÍ/óÃ’˜Çœ™¡Wûí,Ó5—#]àƒ7_C.§ê¢X3JX·æ9d>‘ò2éÜ“Rª›.űë—AjU6šŸzzÇKÛéÍ2¥&é ­Ltd\­V1¿AÏ+®3õCŠVØðãzþé›IF†É/Ó6ögèÒà¼fLù‡£æwÙŠ’–-Ÿ@³«ŸŸT6±+Ñ»™éë ‰—uÏ鎻xÜ̧ô’PZàvvÝ6v¦ÿzDZ¯¤ Ø¼Ì ¥Ž=jðG™¹ú¦G¾÷­½båºìI.ÕÓYÝÚ¯ºØõ‘ÔŽãÞóîA‰âÞ¼‚Nö·Qí–E/5öø¦= üÓŠÁ$7;•)Õ)©G.ŽiºÚƒ©‹NâÑ„¼ åPÖiÿ¡;Ë)1sÁ¢ãç˜}Ùj`£çÖ[ù=›Ië·û2,°läŸÎbèihì§Œ›)5_:矀-c0ƒì’62ø›§és¥5Ê„¶± ]©ÁDB»ùœd:_\´u°rú“û•^QÙÀb·þ¤é–6ÊĉŒµ­kë[Í. Y™ÑÀÖ½ÄËÑøô5·«È‘ŸðéÕ>N=o¹ߦ”Á½sZôW<‰Ð'1ç»û+UàÛžSŸØ7…8Pì=MnP]¦ªª|¥®+¯¡ZÃO賜"œÎ³]("?Úw.]È`˜Po"mÓ+jÛ°¼Îø`êÔ©rùÕVá Lú²2œ»£X‹“€•§ŠC¨Æï§>ÍŸô Z“b>œè“[¢}‡›ËGõM®ùô.X•Àql ’`B¯†œ?-¯ŒDzÿ ]øøÒæuŽ+æXN}ˆ„÷^(§x¥øLû,]w ´›|vwSUS}˵ú,M°íE(âü|aä°¢™ÑrÞ˜©Ž‹Ö]Ç8ªðì³óö?“_Š>½wÉ7ªèZ,CЗº>1‘rÆkÊò•zÄÈclHöÑ$(?(©Àjj ý=Fyvoneõy ï  _––i‡N^q}Ù_£ý:;Ï#Îò’øç4tàñÈXG6%ie#F¹^þ)æEÉSŽïûOF*øÜGúœS’ìVÛ ¶z¥Â²•âÆSz丠uN`0±íö(µHø¾OäÎÉ×°‚c§`x² /^‚à:ð# ÒQò¨sOŸúÙ«hÁ‰…ܳžÆjÈ‹¦P´·³ô^ª¾Q”ÙØÑ’Ž$0Ê’g¦u&Û¤k`%LÍ¡I˜ü U BÓyM¥ƒUÈvç\ã{ÝEw<]a:ÇìÜK{“7Xóª{蜢pó¦$è4•F(ýÒ—‡΃Y‰-·/K2Skìx{- ¬~D¡½îó|+öÚK'F<]p½}oG»â–â8Á6t”ÝTérD˜‰–ï³ K^Ky{áo‡ƒz4p¦#Ϋì{¨LNÖ¤ÃY@,•© ià-T4ç»–ù&_¦c< ÿ";1V¶žLb8}ôÜ©ê:휌린·šP™±[ÍšÐ%‘Uÿ”Û¦omàEv§[JÒiC&¾û1Sô}”}°“$”*±¶ ¬j£WCYÏaDqébiÅUï•—Ê÷|V™÷Ço]¨­(U£· e¦û|øRðs0‹žž¸–pb }„ÍÕ;ªÖÔ2rZ[Ã7²I©rA×諱¨§ˆ¬¸ŒÕ½øñ‘#~n…{ËY»ª2^¯šS¸˜^zÁï°·µ1™éñÜÉ}D^©8½Ä–w‹>$zü H1®×áµéÌþšVL½Ó³.¨Ñ4ôÝM‡[B$L•šÍ:®›?|ŒÍHCïHñ7ôÎçméO='©¼TçHW.9Ñ?K&<™]xõư†¥õ} ½Ò);ñV_ƒp ÐLÏK”o³—LLIÝ­cX¾?ݧœvŠj1 3;£ SçkQz6,fîK€ËV3osÉݵkÁï¦Èï)ÈB|@ɹHÚ:•ÌP®à·,ã]‹ƒ½¾NÍj‚¯È.¸2IœA‰…—ù>k¿e’ŒotßÎÕŽŒSs7Éõ`È“âsq TG³p–<ÅÒÎ/2sûcdå¸-$;¬Øz˜8œƒ‘Ížº¼Ód˜YlIÂ÷“Ü»b5]bUè¸.Æ?ˆyaØ14U$âíRyð¢A^©´· !œñ™ÁßMë“‘—Œeõ)Q帱5íx‡Œn””ðêÇ…„8èú>}) ã‡W“/69P´˜Ô*îÏë+‚ßßO™ç¦^?(õ•ºöyÃê… W„ £*ØND‰ÜqltFNèàc¼`ïFLH~ÎÙZà/ù`híè~Ÿ}^öŠþû†—#É_yxõiò¿ò¼¡à¬þ¾xQAù¹žrb/™`®É§t_l*ά³kn·j¢褹"•W‹5ú¯bŠáõÇL 'Íû1&¢Òìa×:4ªÐ•Û®¯¹ê)˜— ‹€Fšì.DÆš¼1ÿð´Ë.ö~$¶é9Zª`ݶwòL &8—A\3YÔ>à•í±Çe½aÞ–'UWõìé¹LqsA·ªï¹]©©£ïûXšHœño ynéi¿V3ê`ñù€óWÆéÕ?&úJ¾ _ºÑTfî«Æ× + ”² ¡c/#=PT“cÁ*„ð {»Ë€l³„€Îæ›áÕFh®Ï‡ç7Ê endstream endobj 296 0 obj << /Length1 1424 /Length2 6232 /Length3 0 /Length 7200 /Filter /FlateDecode >> stream xÚx4Û}Û¿¢¨šµw¨­H¨½÷Þ»Š !•ØÔžµ÷VZ›¢ö.Š¢vÍ5j¯¢¨Ò¾iïÞÏóÜÏÿÎûžœ“ü¾×þ\×çú&'¬úFü öH;ˆ*æ %J:F …98Œah8äo9!‡)Ä C"$ÿÃBÉ b‹ÆÈ”mÑC$ é€„ QI˜$%þ6DºI”m=`ö€&Ar(!]½Ý`ŽhLž¿Ü`HBBìÞow€‚ Ä ¶EtlÑŽLF°-`„à hï„à–vD£]%===l]PH7Yž{OÚ`AAÜ< ö€_º¶.?Ð9ÆŽ0Ô_ #$íië`p‚@a\Üö7&;ÀHC ç Aüe¬ý—Á=ÀŸæ@ …ûãý+ ñÛÙ Fº¸Ú"¼a‡ôTµÐ^è{[„ý/C[8 ‰ñ·õ°…Ámí0¿K·¨*l1ÿàCÝ`®h” ÿ…QðWL›UöJH"üUŸ2Ì ÆôÝ[ðÏpHO„ïß'( aýÃÞÝUÐ{ìÑPþcƒþ[æAD€¢¢" ä1âvü•ÀØÛò[ù[ŒÁàïëŠt@10 þ0(óA苲õ€ÐnîßÿTüóDìa`4ÀâCþ;:F þuÆÌß æ°bè½þõd…a˜=÷þ·ùï *©k©›óýü/¥¢"Ò àË/$à—@ (@LLàÿÏ8ÿêÀßèKõmaªûˆ( ñL÷þâñ‡ÜÖ†ðÏ ºH Ÿ!îÓÿ!PƼþÏKðÛåÿÇý_QþWúÿwEªîpøo=÷_ÿÞÖ÷þcá³;³:H̆ þÛÔ ò×Bë@ìaî.ÿ­Õ@ÛbvDá€á9?è¾ðþ_rJæ±×‡¡ÁŽqéïa`rÀaˆ>ûuï`¼€ÀÿÒaV쌹[P˜‘ýVA0›õϼ*0Òþ× ‰ˆlÝÜl½ 1 ÀœD¾ Ì®ÚC¼~S (€@¢1. FéFøk° € ¦GÚc䉄€Af×~õKø„`w77ÌNþf¦š¿Ï¿/Ä &œŸA‚¥B^…¶_Ô(0xòÁ[^éŒJ°è‹AsÎ>óuÔÆÏR›|¬øÈ¾Šv8]®,|bÆ÷àbÔëawNÐRšz>K¥oMñˆ¿`ðÛI·„ÙIï0&–µF~˜hÀDúÈ×’+Ùlæ*L¬Gxó寋ëNÔæ‰]€  øŒŒ5«×¹‹ýÔ‚•}=dñ,e†»±†ÉØ5öSXܹb{ Ý7ï5˸̡ÅÅ·9ý}éÂÇ…Z½Õ¢Uát”>š¬yÃItT‰9šM(,NE‘3¥²Ô6º"—pÎ%œGbKß§ ûÛ„Ýt•‚në=y×è^‡™‘ÉëY:f´YÏ6þ&HLÛœåx¯&]‘£Úël(ã°Zžß‹KÍ À«ëüðSg YRzn¡½Ðƒÿ$DØzcœöâQlV"HÈ*U.>ðé¹¢¨>œÙuj¶p%   ç Ð×ÀÑeuZq¾{Oàëó>X…9K2ât«ùmûPOÄ’ý€‰j2(Á¼#k÷ÍNb“†ÈÙ{rS^Qt­Ö,²Ë†'>/~*À0?W¿­SMê¼ÄÜ8[¼©0i1ù¬±ö&V†î- É0…À)2 çƒ2¦— •¢ïžÉ7ˤŠŸ|?º¡l°OV»vÛ çÛMë;·#A!k­üÎŽJt¹4Ñ÷`» W[Š“AGb3KùŠ?Ll(JŸ<̇Æ~ûºyÚp˜o®Pù•Ò5°fóüSǃþ8ÆŒ×ã{½\©›^ê —g¸GvCj’l¡EðŠÆx‘V¥Å~ª(Ë~[íöÓf·žwÐÆÓoD Ës©ûëA®Ö[ º‡®ßË+*îrÍ…I¯UérJøâEš(¿Cl;Þ,4ƒÀr„6®Ãå´¨ w-ÙŸ6G“×]ª¹õ2.R´Ö2 jø€ÏqŠ‚UÅ¿{è ü$h®'úÖ[ÙU{ðdwÓÊì1ƒr°N ^¤Åýå’“ðfòB‹øéw…æú*GÚ×Bk6B-·«ZÊꩾ„ ¯I:ÊÁ®®vw:¿6$ñÅÙ¥™. “a–JÊqñ~fKüöéwΔµ 8‹êOê‡Ú䨆ޠ—̪yv_Š«Æüù"àÄJV€â¢=Ü¡ŒÐidtŒ6GgwŸ¥Îÿ.Çæ]Šd;¨²0¬Ü°*w _'{+ Õ*לŒcÕ¸ójêÕ÷MÚ¯†ä?lÐSfR™]ï¾d ¸Ësß-Gó¾+¡˜ºmò,Ç×oíëW[áϪ¥pœÔÎq/ÜJü“è$u3…ÒžªU©:ÖÓ¥ñÄJ­C”!¦Èºô­y{Ir=u),R)9µ2Ãeï…ö¯•Tt>d«øÖ˜šE3a¸ÓÃP)u®7Ç@Ù‘ŽdJÞæ^Þõpi‡óêX;(|SAãBß»¼.Ós>‹¢Ø^cPÝÇ™|.âõ=9z0hÏhÈD_£ê«5Z6‚¢#:±¨n/ØÜó莳,hù>Çܬ͡W ¿›©ž|GzIŸ+Nóùð‡Äé{ýìõlŽ&%:r§u»r+É®¼3¡b$³42ôA(ÿ55ÒdùºI"ÖG©QÆŸëÄ¡­ázoƒâˆ=žÐzâJ ØÔÆ$IØ­P5¢—I†>Ï)NN Û¾ãÖäÊŽO¥× }33WS‡wfü/_÷Ïç¡„ \J'ÞK«56/§^Ê[™Å“kôb¹Bè6nhE^ÝwÖ“¡ÙÿQ!?cH*ý¿·¨TyºD³áŒý>“—DŒà1Žå+ÞÞùeÓèÜÖÔCd[°õ,{gÌç“c+rqxjüzª…34´[0auÕš'‹Õøó›@[âì•ʃùñºê #¶©ø­Ô+wk,£(B‘ãLQEò…ˆ™ÆkU™ñµcílaçeV‚x#üþ¾‘ýƒòùSi|O³`$7®ËÀ¶£®ˆÁkõSŸ¦}ˉuË‚±9PßÊ·òX-³+º/¨ƒ×?Wš.¬„tÙ–eYnÉMß#ÂÞ?¶CÀ“3ÉDêEzôØ”àn¿«“H0XãèﳸžßêN`8oq=oï–*ª{¶ÕÕ¿î1Ç,áLäMGÝ žäí*E¯<8»Hv¢ÛåŒK†ZU.fÛù¨)ɱqûA‹žž4æñd|ÅœÇ7ûláÚ7ÒV”Ÿ}ƒÂFç]Ìõ#~ù:|àS¼k®Óœ±Úñ³2´Qéà R{¹ÅZs*\ î‹°7çκf ¯÷U礷ýëÒ¶ë>ôâ/îs/LY Íq±®®÷\BÛ°bFI·á~.!È©·{e÷é >·RU…xçRø%Ç/x°Ü9ä{’ð"ŸùMŠJ8îý«yœ$þÝYÁª3&ê]ô\Ε:$+|^_©~ÛC÷`“MMÔŸ¨xø??ϪT @“ð:&…Ïo³†{½ÅtúËr´Zi%\,X Ê`Fé³ä–o³/ó]Í—«üþp¸¹ ˜»‹¶7µ6üÎGðc]ã¼Ï¤vïƒP¿–(åÌý÷ùI¿­Uö]£é]6Ÿ( ¬DTDÖ½]¡›kVXOiéî@Ã;kGÕ¯ ,±Œƒ¼P£:…LaúQ¼õÏ ²øbhq'–§óB-ó…:ˆGŒ 4Æ;Þ{ÌdšûT_Ñk*ëºs'ÊçdS¼¿Ï¯«HÖþ§“·qVlPoƒ©ËÀFú Ýã’wJCt‰'‰‡s¯[³nHøÜlûl©´ øý¤5±/#üf ’‰w?]"¦ßmlZãiÒ©Úd_ëŒÂË© UàÖ=¼‘ >;PÍÌ«/D½ÙpeíCƒ8ÂAçúüäiûq—ô¸EÇ2„$xA“/ë"r7Ý>âË d\š¯•R¹,ûÕ[>¬ã‘¼Ï‘­XS7¢ßóë~Ú)©B‹Ç÷iy8,ƺæð‚¬)H‚f¢#sG{vk‰´M£žœ¾ýyuáBL ·%¶â Ü`+~”ÐVfóÒ  Æ@¿îúú¬/Žy•„-â-`Ã89ò’çËc¡qÁ>Vñ™=H+¿Ð¹¢â]´Ób@E!èCS®ö’i…åqTSü®m™™Á6‡Oè­æ«–9óô…=Âh oà›Îç¸Sw£ú,“ï¾` Q¾«ò>8ÉÕµZ•·¢ôkíR†Ç¡›Þ”ý(B qûù$T"„·šaÏ\òkç¦ì@{–$ïÈ’6{$–ªW"‰Ó6ÉIŠÉ—ª q‹g|A!É¡·F‹w'È\«ûƒi#—Ïüƒ“w L <·gc·ë¦ÛSÈ{3>h.“hîo[+ÃJ¯-‹$QÒ¹›…zX¿P.™D\úec¥ÝÅû&bº 0‰Þy¬ä~5é'ó3& ó{¦GDÏO¿o •%ñ¥„9Îýs2/!Ÿƒ«Bཚ{Ý2~NB"äJƒÁbÙ_§‰’ÓªÒçɶUK[†…ihÜ•Öhl6FO‘#=]‰~à3ÈúŒ‹ëñf²^¾¦v5-è§ÍÑŽÂd€pɪÕv—"³ééö# •ÂVê'§Vr€Š­\_Ï›Õ6¤"ÂçEªS]u÷s3·Ö³÷J+î¬t<~5v4Lʲüziâ~~4sÄ‹„ñÐK}(íû[•'÷fŒúòEO×Úo2>s{Qb™¸ØíñèQ{Cí÷XšÓ®¯s5öŸù ¡E;cþ-£·ß¥4•Ò|ëTÉL×Ôf%ËÐVuCYin°ðw” à nz⽉2oå–ŸŸšåC nîïÕåÔpIÏ[|.kÎúÖ%òeH~NMbö“mÒTI}ë"Wü½3ÍtâMiï‹]wbÛü¢ÒŽ>âþCl´n}Ñ›H¸Ð+²fg « Ò€F£ÂŸióˆúàX<¼ÌøiÎR^ë8¦D®+°<é*ígÓ Ÿôòhß‹ôóNæ úýš;?wæËùRÀ$UÒO¼¹\öPÒ™&ÛA®¬6Ø%í _×¹Šu³ÕêWnfÈ’`÷•޼v²ª¿ƒ86—Õ,ð‘›WÞ”ѽ»Ña‡ fŠõ}LcgÁ-Ë6/λõ´spĹÔ[ø¹}õx¥¾ÖC¯ì¹Úraõ"¨ƒ!j×þ™¯JÕPQïSÏ yº•Lrv*Ó•MGztΙ3»³3»ÕýÝj*Ü#0´¹à²š¬M ×,Mþxøä»pîYº+ Ü úY²ÁFf®ÝJ)• ëɆ“gŒÆÉ;U'Äqm~L+'u!v) Þãÿ,tÑŠóåô‘’žîÊà r9^³„‰½£®ßÍyþ…‹—úú±y ñ Ä1Zša:ÆùX@®LÈ…Ž'ox zÚR½Ÿº²Zxá}—{­úÇ‚o9Y k»sŽ µìÕr ÝT¬à«œv{z¨²|h‰žXpÐÓbŒ5xÎ~ÉþJ†’þSðlŽÜ޽¼0˜‡ÌJ¸œ>dgšq‹ƒWÇ_±—>s»(OJÉþùJÆÍA7׺¥Óu¾*9=YW$8 Å„NÝWã:_Uz˜Öêʃ[Ås†÷#dž%‹¼§vš»å2»¨á¶ŽN+aC](ñã~ÎÆê¡s¥åϺXÚPužÆúԨöÖ±š ý¼§|ü¹Ue&OÓkU¿š\è³µi†‡óU´OZtBÄ(ä€Ü©g0{†,íz)g|‰î;Üü 1ðG/¿H=š¦ÚÜP'P—¬ùlÅBÉ”ܰڦ>àÛì2`hm1‘EGrð»jéû4uåùcSz9×c|ï‰ôJý%U™¶àž~ż³ù³5­9}Ǻ'ºõ–͸C6;‘JGÆÔ>K“Ð[›·¤§ÒRb®‚n<ºùVVÍhrµ_¯,²?ò7¼…GŒ¿ð°4|UWÈZh{‚t×Î Û©?öXÙé: Ðú`曣3µ$,7[¦slõMÒŒNŠ’Üƒ%!Œ,ã¦ùªÔÍPE–¤[Q%æñú+Rrù¬Æ/"·›PÔ{8g&Vë/C’d&Ì£ܾN©è¨ƒ–õ–©ç] ²SÂé|bMÜîcPp«-€s5^ô§^Üxxz>—?Ȩ„½R ŸÌ)†F“bŸ¹«ùHi9Ü_8™ˆe–jrçaÛ®“ºüh”šÖãÑ1|tõUéI\—fH›`’*›¨‰@ Pvû”ÁT(ŽmhªbBf7è j{i?Ä ©iµ2[ÎúÎóJToQÀÿi^ zw8@„ü¨Ðtu¸¬Ž¯’¼¨©²êõ“Xt *8ëåLY¿÷æç¡7ÉøÆù1J"Wjn«&xoÈDÞ±ÇG¤ÇpúÕÄ7tEUè‰É9›]:–u`›Ws…¼:`*¦Î!¥ê‘6)y5«ûA\iïô5K"L!K”y—þKÚšË<ÕžJ‚OE¬öHw Ó>FÜ·Ïê8Æ¥%W0‚îvÿ²¼¶Ù8ª"{zº§Øáxig?X<‘®§Û™¬™*oôsÅTå´coœôI%V«Ø²»’£scFûæõâN¥­ âõÊ’…¿uñ*Þ® qG´á°7-kô“ìüÌ·ÑÃüxôž%ƒýõò£`~ *Á7EŸuê yrs݃;“5 7˜Éö×q¬¢‹íŽºn]o·íTØìIO\Œ¤õóá’í¡{Êk,Çrj#é4 ~”éÉ¿àÐIÔ^Ú&F7Ìyà…„O?¤o´[›è=Ö1U¥ŠüåsÖø,d&! Mó/k_¼i<FG4Vül-p*/îõc+©ß8=H˜!Ì´¤šÒŽvÌÇŽ³¸CUÇ3‡s¦Zþ‘|—#_=é!Ö½J¯Q¿ST5Êk¿H=OZU‹|m=bîæÈ¾cÉí–¢ã´aX.÷–&øÍ܉'ÁÕ¤åjª9’)]ÿè©û9·Î^.Å~¡'²¬¿êÙk3¥ŒfÕZŽf³þ<ñÍáñ `-T¥Ÿ[Ê•MæÇ<+í¬†ÚŸVÞ Z‹¾¥÷íËî£;C%®I¾ÍË¥¢4JiZ×J8‚ž5¹.”ø‡ŒÞ³¿4øÎ<¡¤}Zx’ØLí•áyëSg1S˜jóRöMNâ'l¡ë*ɲ#á~RpIûˆ<¾s\°,T[îƒgð¬ƒ!ØÑljé&ôN±Ëx¡ÞÑGh¯iIw{ƒDj÷Þ6”¯ŒíÙ’ËŸÛñmvë…[ÍÁ«½>q‰z¯‰š¿R"ëRÖbÖç뎀fs;È{ZA‹M3‡{,wžìÆ€T¿m3[“*{TÞXÕËö˜¬flºáADèsùÙ¸yér8¿Hiw÷,û†e¶÷XÒ4;.TùÁyZ$ÝÞPaïw_˜¼o‚ÌMo3Ù®£ÈuÙËÄêMoù¾Ÿ-&+—¿ÿRèU—û¦I{+Ú‰•ÁY9½â[nÊ—E¼?L%à·/ÀýÐá¾¾ó«g{ƒ-#àœËý`ÈŠUöƒðw`},Moûsëé—)´<Ó™ü¾Mzñ-5z3—Bd†¥=õ¤^o·v X" úN=ÆWÛ¯®Ûò²ÙfËáÙvGg>R-µÞÓUfovïD¹º•:ë5ÉãÉ÷@8_?NÍ€÷E¡Î7Þp0íól º\,Í¿.g£jp'ÌP$‰\𽙯A•<8æ¢' ¬m)ùšñiÓ.ÒàýéQüN¾Sß ŽÞ߃‹l)põ ‡…–ÏC]Ê‚èÐÍ«µsj•ü{kS¡Ir$%&xÀôÓ ÉIz“y¡‰fÙAPäìÛd6Ò.³Ög!z×_'ïóêù|o7Ÿ8S*,8¯–?ÎÍQÄïíÈìŠÝI± Í¬?»x{´sOA1¤±¬*˜#wõ.:s…ØÊ%P¯+ø“<'ÕOl.®{Yé°ë·¦ª/Μ6¯öÄHÐ~‹óÆ Sç Oƒô8ËÛ9._j¦p¿ím”‘÷$ó" ¤.Yîæ_pùÌP«ŽùrÜ¿m£v5š#‹ú¸‘û@ÛC¶§ÀSŒvêõ«é_Ip´HžÛ Ì‘õÒQaE/xß Æì©&CÌÿ|¸ê9ð¸í­&?¥ø`ت`nlÚºY€(ìYgÞ¢£ðéª%xzEûáSò¨¯7sn³2jìmÆ×¿z©ªµ÷5üá"(¸i’É$3Ëïã <»¸hÕ3X-@ZøNüŵû&áŽGÁó°1ºDÒôÕ;óÂndJÖyàþ4ËsÊyòhÓ“ðn;QÊoñq×â›f¬ÝûUÁäøÆGaÕçn ¡¢ÁaA†R#aŽ™+_Q—ö[–óÑͳD[*T¸Ò  çŸLR’Xù‰n¿%Õª«…å'\Á¦‡WU»–Eo. Ï‚žÔCc:LKÛÒrÄa+ÙÁº=ÞF4äδ¹÷×Ó€´ñ³ÆÔÂÂïÚètÛBÓ†»óŸÅÿÐö€l4 õvW+Íš,&Ùãd}W?«ÆÛò÷éñÊ ŸØC)“|WGÔÍIœ s' ¸KZå-¿;›ú¢ü59ë¶ Œ)»ìîéM4¤P‰çø ô(Í.líácÅ9@¨|ë]EO,Ž´An±éã“´Ãp¥ágb¦öèþÒå›,»ô:-Ÿ¨èRrdY\”dxg³)åQác=!op%ý[fó`¥ ‡ðªëç/=«XVs-ø·ý÷óî(† <“¢žÝv8•ÆQ`‹šíoŠâ°º¼åˆþ¥B:‡ÙâÞ*ð» endstream endobj 298 0 obj << /Length1 1417 /Length2 6123 /Length3 0 /Length 7091 /Filter /FlateDecode >> stream xÚwTTkÛ6Ý(¤ƒÂÌŠ„t7ÒÃ0À303tw#-H©”(%!¥t#!Ý Ý!‚ ߨç¼ç;ïÿ¯õÿk¯µ÷~î|®ç¾®½ÖæâÐѵAZÔŒX$×Ô7€@‚ —ãûËLÆeC¡áH„Äÿ GÁ ¬M‚ÁÆi"57'X“‹K€@!èþßH”@â·h ÔšŒKéâ…‚ÛÙc°mþ~ð@yàû÷ÅïþNÈ:ÃPp(Є`ìaÎØŽPˆ@ …Ã0^ÿ*Á#iÁ¸H‚g´ e'Í{àÇØô`hÊfø q†ýA&HÆ0°‡£ÿØõ‘¶ ÀœàPÍpCØÀPls€¾ª@Û†ø¬ñ'à.௳€Áÿ)÷Wö¯BpÄïdŠtv ¼à;€-Ü ÐVÒÄxbî ›_'4›q‡À ÖØ€ß;‡”du,À¿à¡¡(¸ -ˆ†;ý‚üU{ÊŠy¤³3 A“ýÚŸƒbÝ øg²Ž¤Â篅-acû „› ðîêSUø+k"ûÇfÃDA÷ÅÄDî`®˜'Ôø«¼— ì·üËŒEàçã‚tØbAÀüà¶0ìƒÌ q‡0(7˜ŸÏÿvü{ElàP ÀfGýSk†ÙþYc‡‚{Ì@Xî _×ÞcéeƒD8yýþ{¾@5yE¹GüÿÇ''‡ôø€E÷EÁ°ö&~Oà÷ï2ÿ9€¿Áÿ¶ê@àmôOEU„-pÿìáýÃý/Zðü%^À¿;h!±\†xþ¡¾9HÅÞÀÿßøòãý¯*ÿ/êÿ÷†”Üœœ~»y~ûÿ7ÄîäõW–Ên¬,4‘Xq þ;ÔöGÊš0¸›ó{U1¬ú‰?“kŒe:÷Z1‹Ïè›ëÎêìx*|ôR½í­XY8-·GN_R}b–Z-‡[Nô«|qjÂ-¦çpîy|çÊ10++g|;ÈPÄêÐ' ÄMBi_Wªnhîâî–äøáíEôœKjàZ#Ê U‚釗ñ@7½Šz›×𣔫¿,L¤ºnCL8³£õ»nôí¶òÈçÎǸ¨\ÓÒ¾ˆ^\ÿ˜‘àÒ ||S÷¨Â°é´þŒF%…¯®Ø,6ÿ³ýñš¹<Óšò·œ×&ž)n¯ãËy¨SˆY·2 ßÞÁQ\7[Ò´¼PÑ<Šìk+æ‡Ò.YO»ä,˜Z×(~¢n È&Üï³@Ί¬Voö>§ˆU.×_Íš_Zg?)±0¿ÔÈòG‰Ã±@ßKGŠ ®íÊY7ëÅâUøÌy¨ˆ[I®O×.X}Ÿ‘ €¦wGìQwÄ©<,É|»f3h6š!2ÙPäàÝäíº8Ì~—A•(µ ¦/x:Á{ë­çÒ%)®uºÀw-•'4ŒÉ ½û4"jy¾‚ª¹œã¯àxÕã©w/ïl•»¥e^ÉñlçyÑÐ&ÖU-Œž9]v²Ñ³¨¡È›úòçHî:úÑÎr9Ó>öÎx¢èEµÆÂÓë¼*=UßN]!©,é2ð[LÞŒO(t¨Ã«|YÆq/*ƒºµö7J„ñgŽxˆ''>ò3§º¬Qº¼CXrð¦ÏØ]j¼!»×%©mg§>ìZ^"ªn¾|iw¡,,cÈ+±“ëºõËóz¥oŸ¬¡Bd²˜CѼ/«®Î·µ%Ԉ撲#Ú¡§¦Ÿj¦O8ETuÜóH Íx˜6 â]ó¢¶°4±¸™Š!KO»uh¸Å+Ͼó–¤ârЦ ð‹…ö;Îçñ7Æ‚;>“¾a3"{Q…Z«ë´ÏØö²ËjÏ&ZÉz²yö9Q|œ{>êé§5[Ñ•³=ÝŸu7[·? <º…w~ %p‡ÖqÎßθÊßð BÍ)|ÑtZäG#òÔsñt¡‰âªç5YQ(u1Oa\z ä!tW¯!æb?ùÌ”ÉÖÛûH&Z½—…œnŠé‚3Òä¼F Œv=êí§jIÙ'ˆ] 9Ú<Û¶œ½¥ÌNR£“£õ¸#R÷.Hæ'•ŸÂ0ƒ;€"´ÛTÊðiZjáòÀëñZÅI˜¯Ù{0¬íн¨=¬»<_øÎüud8Qr^z•ЍHû´È?- Χ||ê© \Pà/È–qòâ›Sé3=ruhaùA†¶O.e׿£÷΄ õŸù®‰“¸ªÛ_Ç= ? È¡æI  ¿',+&) mÏh5¹™sþ³I¢’‘ j[qª„‘¸MØÞq¿>›ûC.³Ü°D™A^}´Qü.s'añ9±¢¨¸Æ¢Ãò3ë‘ç¾+pÛáM®Ž2ðèê·“; ù 7™dÆ–¯Õˆ¾SèEv~ 'þ~…æqÖX%ö¬5¶GL/*Ýp¡@…‚Á3†T•÷¦¢³>ΛùIž­ˆÿ¤œnˆS âÓ˜÷7ÌGçæ6H*ž—÷Äžõ œïÍbü:©p=ªg7÷ë:!æŒåj5¨ëõö IØf{KÿǸñ}1Å;’›ì©[­Î$ܼ{ñjÍTú "ƒÕ;»¥KïYKsª ú‡ªÂŸÖo©¥}q½ÿ¨Ì´-tÎ,Sís“®:ilŸÆÓ{o—êFó˜‚âÊÓºé¿_NÏØûv—+UX,}qÜO¥}’&”ž=’Ù0×qPv;úf?{vϦ§u‡UˆIÐCÒ’žÒ'gl”¡sræþÝžPæÈ™ÝMS'&”"¾#Ÿ²ô@Gq}=››DúöÚ3Í~c±2Å~êD•Q’Mn9(ÿ7AV4xŸç}sE¤Þ} ÓWú ª±Ã²‘ä *ôû¼>^w‡W+ŸÝ˜½¶Ys?ýMCkæè«â‘çÁé8£ñs ´eè\‚ûöHWÖìdCÈíåï:8ÕDgÂe*#>ÌõÃm>¶q¡Ë9‘ýŒ/·Ji=õ5 •ûlXòN‚?òGN4^K©³aŒ¡25 oÈMÛëzjÆ{ ~º¶‹c<È´ƒÿÎZ9ª+&‚¼ð<=pã| KEó¯puˆ‹ƒ{'wømZXª°í½Üq§‹M›šz™›wAÅJç<6ú,œ;&_•=†·ÝöÚˆ,ù⮬WÙ«Œ ßx”IÉš¸Jÿ4 —7ÕÑOU@É7¤ƒ^—8Û"ý˜VÛ\â嘰þÜØªˆ ói´1[ce>¯ÏSWk7›sdæ±}àÃRG¯É ´Ø'ŽmcÊÕǾ†½Î_‰ ­K½ÀæBR×6JKZ]B?1—<<¿±&‡ —Rl¼ébxSt–K¾ÂèYKÛ§k‡TňÈêc>W !‘ î$¿ü QÃ~ÀON£(ε¸£ëe31Y¢A‘2}ãÌj&O²ùø2$OøE½¸‰«c—TÄÀï9‰X½_Æ\½%ë¾Þ¨ d“¶5¨® 鋿„‰5±^åP:6&®*Ü<›|ùLŠ¥–Áô´nM€N-5ˆ¢®‹dãòQñ_²éFÈêîmX„ð}gÒâX^×~É$¿v™ßB’ËYÚÞ7Y?T[¤Øwt.ˆÉ(HžlàK¿­äo'cIïë…ÏÉ©›ý¤'׈Hâ²o` 1»ÜÜZÄ Ñ’,ü£CÝ(—î=³Ž‹è«šqŠšh»mŸÑXÿ'Žeº±HÚ#!íaÒ#¦‚ ÛIÆLïÞiž.,|'JTÔÎÇ- ¤ŽUE1«3C˜\£‚kýàŽ(ÛçƒÓ·ïGiwÇ(D[e5/o·-|Â{ûIWß¾u)=¯2©àÓà* €b5Í{ð¥jº&påÛÐkÍÏìÏ-RUªWh»<+ýðòŠ2\n›«sòþ«ïy·L9æé'§Ü<Ï¡&(RaÒq&¶ÁûÄÀ5SØáCÄËFŠ®~ºìZ¯’RvŠóâAˆCŠû🽳Ÿ™ G~mª}Âò…ŸF…WÑGÚýÊB û^±Òo\Kyçæî3‹ްñ86Ê_D[Ô"õF¾îÎ÷›ý+X儿(*6ðw¹I5kB}âk\B&qn°†–~X}ó¨e•9gk<ËœÒö­«|°Ôœö¡+|ÑKifg |ðšò@ 8Árd_hì¼ídï‘Ìl Y³\ÛjAÏ–ÑkÑu|ä ÃSyþ!o6ùÐéÑ­!ÓÉnǶPi)âçª=´jkz²|:k9ÜZ¢jvy{gÚÆÝ Ã’óÞýüÉéýÝ2,½%áÍ£¨Ò¬Ëˆ*Éoô}ФRn { ¤kª § æÔŠ ›ò7;³V½§»Z6JÆÅ‡Žb§Û@î+zÌfVõÕì±?Φ;xãø$|/ž#XƒÒ0$•,èx¯!|p‘¿™¯~΋(“n¸Õæ”7J©ÍÇAYÑÂH%æµxO¾_‚æÈÔƒ¡@å[¾oç6®tƒf[ÑmC”‘‘T«8À)/FÆöDÊ™;IðrI“W Å4‹Õ@ «Bhñ6w뾪gÄÅäJrRTs,öþ'~¼l¸±šˆÁºIæë[Ü‚¬!l&>_]QáMo‡å§o£¸[˜—¯…½×@n«–²4*hf™4=ÌêÈpçOáJÞ ê- èÉ7ˆÙcWŒ†vHlÜ:0+ÉVÆ) A*¶3nÍ}f¬%4jòJ<:®9æ‡àÙõBv^oḚ̈ß?J¿jª’øá•¤A ß‚©¾cžSºòtÑ=M½[×Ôzu¸~ }þŒî¨ÅΨj…V=I’ý’ê°éåÕÖ£ö2mÛÆhoû/1d9ÐN®'AFøz2â:º4!_D~f¼Ó#Œ!Õ< ÎošbóÆ »R5fAÀ#óqù“œÖ#|ÿÇÛøà;ýµÓ…U[Âl’£ ªWoÈv¨ý×OïäÒù.Ö¦j‰Þ¢Ý÷§è1Ñ'½;R §ç›:±ÿ…Há¼²î”j2;€¥ýéˆì†yú¢nôõ[XÁÜÑì œ˜C)ő엧sg`¡3c‚æ?zq*”)?pðዺSmçнŸj¡ÕÊÏ×é0­TwüaáÿJœ[’Û«å¸8Ÿ¢Ÿ‡f!³È&ž9ÊßÓl-ûTöñøÆ›I°µõ"ÆêTþ"÷²UÓÑV÷>U½µŸ·t~0¡_ì~gˆncUu9$¾g8´c¨­"Skë öâc4E‹¸ã°GbZ¸að6‚ÔøyÑMJܳVÕ¾×¾ƒ¡íTµ=¡rí¾ç‡ï¿wà¤P%S¶¾} ÛR›]¯çgÌÞf vJ0}¡9r\0]%.+òÑ Y'Ë¥<+Gs°ø‘Þ‡ò´vâ@ÛHâþ†ÔÄæXð—Ô–.¾Á’à>¯k¶· Š*Ãy—(ü éor85ŒWºtp›M’ñsîÝ 9?þ$ Ççe„Eè Å"‹2ëMœ^fº™ù^8˜7ÏJ–%}ÏŽ”4«$ÄÉØyHéqÄÛ~¯-è™Õ2KH:ÝÂû«Âk'µñÑgáÛð»ÜúÇ2Šþ5¥<§—‡SÆ‘4wª£­ .Z–—zŸ¾Ê»ÕFÚ-û r/PŸS}I`åQ~cÙvœcõÃEžNˆ¡×SS::êMBô8m’µÞÒ‡h¿ŸûçS<´l˜„÷L[…2i‘pËYSÕ[ßèÐ2òÏö5Œa3>ÓõoNÕ®W LVíX%{V*ü(åÆË°rÙ'gå?_k¯XfvÐÐ-='Ä5¬PRn^ÉnJmÙ¹,Jæ PŸùÞžaÞå¸*X¾{J¹Äæ”o\¥]ñE]>1{L5¾÷]—;¢4†cò²Ûø ¦,ë´éÐ õLU/¨ÞR¤fªCo„Ü'/™ãæ'.aš9AÆ¿² ¹^þÐþ¶ùŒ«•”ïðéŸAìmþŸCê%5ÅßN…w;¥´îŽ É £WqÐý~9~MíÂý¼^¢'¯ï‰4Ðâ—®ú wˆQ½**ºîô5kôš²¦ž#—ÿ-Y§¥k,7u[­6•]æ@ÇÇáMˆjÒKVŠ\v9ÃÒ¬÷’®]$ÂÅ™‹wEÙïÒe¢äVÛSMg$½ª«6#Ri¤S/í{êGë|w¿í«ªtÖš}V­˜CÈ[äO<,iíOê€å.Â0 j–ìë^øA«ãíïuÈã[•q#oðô; 7IAÆœc ÓÙw¾ KE«4‘-÷„ÖÈ~ò­ÂSæŸ7‹ÙÌÖ[;˜¡Ö?”]‘«sjöYC;Ý¢<Ÿ‰V{G˜-a«Ã4W ºáZ¥Jº™Ÿ™p3ÉRöÒâøàÍíR›µx!³J÷vø*_Ð-rIi–±8ã…0+xñO¼V%8¸9ÚMT K)¦ÖB“WPxæ"Eé zU¡†{sU”¶“ãÇägòÉ·‡íŸ‘yÈ“\ï(±É@ Mú~«öÉÆé6ø"úB9'Ô¼Û¼-£S´î ‹üš3#(Ð7Túå±SegKÏQÙ½W"Ïpèé.%Õ𶔋†Ûz“´6ö•œZ"¡9—ƒ‘ÁÔ¦GÕÕÕ³ˆ[^¨Ívƒ°©¥¼ÖRëQÎÞ"¡œÒݦ{3ÙìzÌ1_ö»läG2ɪ•:¶T¼Šéò÷IòVˆ#Nm#+¸tÔt©KgBX“Ÿpt™ÎàFS2ƒ˜;¼ge-™i¤Ç8×{˜ÉŒ¨eo¿°[¯0_µÎ‡J´5&Ꟍ‘”êáñl^ìnÆîÑpÆcü%ÙÉT/‘…ƒD^µ&Ò¶‚i]TI‡Åz]Ëa¥tïo:“ú½¦ç§JÐysè (˜XXU4ö͸ŽéyiŸÝ=ue:Ë=PGÐ8òÄ»Ð(äŸÈcÏV¶ö×븫H·§„›Ä^žP/êÒ×ÝÜ_K;iy°êh¹fQžs:!½LÙ»ry0—àÝN¡Ze_/µ£úA­ŠœlîXïGÖ‡¬5cBFþœì7\qÔJíãzàïR2"’…n <Æe»Ê˜#Ÿr“#?áà+é‹=±ý¹u òNõ§ºö§NE“WÉ…ìÙfE íáLQ¹‚P?zVAtQIÛ¢Åx–²ô•ÌYÅå^Ÿ‘ZÿÊ©1ì„|8m„ Ö‡ïhÑéI?â½÷ÊýCcÅàÚK‘n¯™Œ.pñèÊÓj¯ÅQäÉ:ÞTN»«ºårö‡sIŲÇ:ŸàµÀ¼Ûíø…Å¶ÓéäˆÁ•þ4èÑc”à2\ëù™vw§„]šÄá#r·[4óŽ\§ÌGŒ’ ªgœv§¾í^vt¤‘¢£j¦£r6i_Ÿª×aLõŠÔFV°X¶¾OÌØ?µWÒcïTa0{ŒgåkÐúQ_Í9ÕQ'%­+¯KúøÌY^¤¶ôJÒ(›â¢€çpˆÛHaMwÏѤ^'âÑ2Ô*~ÅØ ¯Œ8RRý˜.`Fª£¤ˆž“èîñ—£åšçÝMp rÉÛYž´j>TßJIœÌŸÎéJ5¯lK<¿"ïýh4H™»-$wv,j`ýäÁ¦_ÏC(4rÍ —#lsc²€õUÀ÷ªV·¾w¼®k/” |'Þ·‚dõ‡²—{j¾G ØÿÚ4'=b‡ë¥õŠá8µ˜¤M¥}ãrŠÉwÄ Ãä’0‡ç|î3<ÖìukJ’ñ-Ú¹¨,›6¨]…È¢ÄpÝè]Ág®N$Á ³Þ_ò­båkÃ*Ñ€î ‹ +ˆbõál“&ˆÕ^n¼€\BÞ½Sš ~·@TeÛü:Æ* endstream endobj 300 0 obj << /Length1 1606 /Length2 13218 /Length3 0 /Length 14047 /Filter /FlateDecode >> stream xÚ­xeTœë’5w‚;»»;ww÷ÆÝ!,¸»»[p×àîîîôãœ;3wÖýæ×ÌýÑk½OU=»vÕ®·ºW“)(Ó ™Ø™ŠÛé˜è¹r–¶F.N²v@:a;À§‘ –ŒLÄÑÔÐÙÒ(jèlÊ P75ˆš˜™L\\\°d;{GKs g¥ª’: í?-…Œ<þÓóyÓÉÒ ÿ|p5µ±³·5:Bü¯/*›šœ-Lf–6¦yMI9 ¥„œ*@ÂhêhhPp1²±4ÈX›L©fvŽ›Æv@Ë¿Js¢ÿÄrœìM-?¯™º›Úÿ墨›:ÚZ:9}>,掆@çÏ8Û,Æ6.&ø´›ÙýMÈÞÑî3ÂöÓ÷ ¦`çäìdìhiï øÌª *þžÎ†Îåv²ütìÌ>#MìŒ]þ*éoß'̧×ÙÐèp6uwþ+—‘)ÀÄÒÉÞÆÐã3÷'˜½£åß4\œ,æÿd@ p457t4±1urú„ùÄþ«;ÿ¬ðߪ7´··ñøû¶ÝßQÿÅÁÒÙÉÔÆŒ–‰ù3§±ógnsK ,Ã_ƒ" 4³01þÃnâbÿŸ>WSÇ¿Dù×ÌP}’04±ÚxLLÍ`äìœ?S(ÿw*ÓÿûDþ7Hüoøß"ïÿMÜÕ追Äÿ×÷ù_¡Å]llä m?à ð¹aì2€¿vÌÿkhkiãñ?Dÿk ºé?þO ’ΆŸmšJÁHÏø£¥“¸¥»©‰‚¥³±ÀÌÐæ³GÛU&¦Ž6–@ÓO-ÿn#€Ž‰‘ñ_|*–ÆÖÀ¿šÎö—)Ðä_™Êó7o1QiI%šݦG)|ªî¬âaÿIì?êµ3ù¯Ã_ÂÂvî/:V3'€“ ÀÉÁäó?dû†éŸgYCgGKw€ögÉŒLþŸžtÿF hlgò×”(;M>ë¿ ¹]?õüû]ÿ,ø?ϸ©©»©1ìò‚1Ïw«”ôTçÌìÁ1QíÞn&°Á`ûâz•‚<ÿ*».¿”Ð-®rƒ×ê`ú† î÷ùû·=)êýán Š®$Ó‹\<ªž¼¯ëäm4û zÅ©§ê‘^—s2›àZìŒjûÛcŠJzE¯øm,ŽÐ—Tþ$®yþh¤öˆ¾ÆÉuÑèíÈ (5ù'§äñGý#Cƒ]×={¸4YÑ0d<†˜¾‰'D ÎŽwõÆïÏ®.ˆ»Ô¡vÞ¨Ë6Qð’¯ÇͶ0¼&Vq¨†¦©RÐådcÌÊD½\drÛXÀ´nøê¡vfÙ#åseÆF7ªAi«yõ¥A1 {º ¤”ÖÔ¯˜Ï>7pÇž®P²HÔ÷¿¥ƒzH‡Œ¾Vµ©,'å»á°€ˆ5°_Ax]m Ž_¹‡Ã¡=î¼aÒ ì uf“s´Î¥âŠŽ¬­’‚ó_÷FYŒcȇä±×Íó•aýf1Ÿ»Y©³ΧPØÏE [û¼RïhJ*AäÒS7HðVÓÑyȺܢ@¢ŽoÂÕà=“Cóg4;È<³z tƒÓ7¤qZ¾ÍAE—¤jmÑcàÊ–RwŽJËÄúÏÌés\ c£?+¬#v bÝ\|ú4ã”xFÏΪ(¬[òï ¬®E]¿|ãfÍ.™$ò{ä”̲žì–°n?kÉ–®¤võ€kKi'15dY³N²§»™íþC8O»Qüìñ«\–Šç㢦t·Çxlx‰³¼#U##]dS|µÕ@›9`¤¨v—kƒWU99•ÚïÉ U~Èჳ@Mb¶¦s˜:&Éâû× r_¯ ú%ðo5.¯M8Œ®QÛ‚ìQÚÒIé®ÞŠZ†ÉˆB§Y%œ-Àzú°.ü¦Q†Å.YT ©<Á4œÚ€÷¿(ž£7Â…Ö”í eüÐ"i”®÷Ž]ð±j®ç“­tç§T{å*¡ö·yË¸ÂÆÊvèù‰ß#åJ]L¬ü`“JÏ“ÁºÛç"}øçv•œ84\Á–kÞ­~‡4ϛͣÃ;ýÎ:ìü ø™KÑcrb¿qëÜ:³%éeQû¨tˆYoÇ,T.>ö¹ ÷%¿¯¢ìBh‹¶È‚¡³éë%ÛPü•ÛÕ§^ßs¿:ƒü´gÞ…™Ä¢:Ð9†ª‡ÈÚìÎGõZÑ‘O}DÕ˜õùç½ó,E+φ¬éßwÞ8¥ ÄCUã‘ôò?ÍøëVœÛI@d\´µ„+WEd1ë:†Ó‘!íæ‰ºß‚«,ô|¼§VìÞ¦‚ÅäsÐ‡Ç¶Šº†-eœ3ÀíÞ²†øMp}4;oºGõc½’ DŒég]Ó{…†´_s߈c¿©rÔ!Ñ;ÌJ4’Í;oìyõF;†Åºû~&e0É–•Wc 8©¾Ošb,ƒ”óÂ/çó4HM0÷?× Ô×ÔèW±šQ÷ Ò±@ÊÂ@uf†áû4k=s0%»®)üq¢œ…øst}Ôãv´çªàë¨"… EˆÛò§ bêà¤FÖ Êj6ë¡Ë»W+"º&%qF%C¼ÚúvÔ¬#9ÊD¦°¹ÐŽ&‚=}4øµ7vê‹W Ô~þ9x0Ù™Å>Œ+¥Œài'ÅøL ¥ãNÑÃt¯Ô¢@Ìëùí’ê’"-Ö4¦yÔ77«açrâØjˆÆà'Æ[°ŠÚ@ØS+Òîc÷¨qvñû˰;©ËÁꃨlý8u\Ÿyà3Y€,wÄt×òy9õÒÀEúân@Ÿã_3^ü…W:ÔÍ/‰?Ô_?æ’¾I¿c-¿øòì•®è\b0HÛGÊbUŽÌŽ» }]7b€¦5C!,/Ì2âd^דJÖô¦Ç“F9ÉUÿ6D8­géõºõ¦ª¬$€ëBµÌoýcBg˜ ¦¨te¸&(»cé_åÖüªè­Z'…&zÀ¹„\:-÷:éQ[é=Uû;J¿rnOðlœ¤{uq ÕH$>’$©A@¶¶pN4"lƒ£Õ¶c­_‡›e._0ØÙ½1µæ 8åvÜO„gkµÔd°YœC…£3ækF³íØUñLYÏ0,Ä&qŸß[/ã¸XƒC΂ ]2le&e–Åže¼ªrÙÚ%­¼ø$™w ¢lŒ’±¤³Õ[.Ž@ çò_°¬¦®-$rÞÛÞåú±ó².@!QÙ eˆLȵWK5½)Nµ ò蛯ϥFÂ"ý6ÊîÝTûXîî.3ÅŸ(ß•ißFoßièýn'˜ß/a[PI,–³; ¹A@ìĉÜ+-ðŒÂÕ_˜¢K\w²PÓeëõ«Š¯ó©:[ÒVê¢ýwD†báÇ£IÅè,'{·(ÿ˜Fe#d´iQŠ@5 3åàÎ]ÏO-`,›slºï(í2çÄ(AKµ)Õ™x¬~!v×LÄÎb1GpKtýf–ÈmaÚ´ƒ9ŠyV‰Gqþ1v),|~;—”̆¨žþyoÇTóŠôÅúÚÜÆ¡Ý ðÒO|Pb_ø«Mº×Z£ÎùHSð7ö¯p¬ãE ¨ø{н¿¶UbËCîöòo’I<Xû½Å²üûÊ´î{8A8Ë_(šÕá‹=·àí¢žz©;¹'˜K9cA.!0LÕϰ˜9ZUv››ÆÒ>Äáq¹*0Û}ÀÙã¤ZôKQÑ4ò$Ô›xÏø„ùrƒäÒŠv—Gla!2Eýˆ{ÔzÅTCBDy·U¯bê@˜LI /w Žß)º#EV<ºä`±_=ònŸ¿¢ GE1þ}Ãr?d¬ÞK²Á{! Žú4uŸÀ—…Öþ$ƒŽŽº#ôoÈmÉñåœéR‡¹\ð?ËiXºÐùž½™äj 9yÕ<äiTæ-蟅2p{ªzfÓ(¸V¦¢ŠwÐvYš§ÁÜÌIp3„®¤oÆ­r|ñˆ}Ó»ü‹–ÄàBNe[ÄŒ´íì:ÂÀšÐ'“ðÛS”˜zçgF7Ì×îø˜5RB@ãFÈrìi9Nœ½Fwßvòê¥è(m¿ÆÎ0ó²wÁ׉·ïǪpÐyM%‰ú9‡YŠØ~²S¡[²¸Ú ùj‰„\¶UÄÎg‚]þet‹ó_¤WÀ!Jq<=TìŽ6½ h„Ù좭ÐÓ´ÔzõœËäjw *ÒŠ¥ï^.!-9£'·ò/—n@^Z,¡Žýýf«ÆÍ{*‹—ø\Ò`wÊbEkç·úÚìÙ÷Êgü†ÉÐ3´mâ4;PD¹ …¬¦ÝYWBgµüª½F6ÏšÌoþIÌ…*B™°pÈö~G’¦²¡_zò”®ºé¼‘ïh$¬™iD@WVðú´G÷Å⧌짉\qZ;¼ÌÜà–_-ø6SȆŒ²´‡c¾ó†}G¿)[}-p£ŒÉ`,·¢–€)¡ì-ü4µêA£O‰ƒ­wtñÓõ‰Ú7AU¸ÌãD²”¨;™ÒSñ=Ç6¦uˆ\Ùd?Ž•b·¬¾ÓI¢\ñH¡¸ªŸ?°vÚQzF‰¬Å7Xԇƕv9‚ÍÑèå$ÞU]m(‘¾§Rކ¸øæpÛ³ÙŠ}ulå-Ú|ãT,¸Ô‡ä«€ ȼ0C²wxYCóΔ#ìè5Þ ë~ ­ö ²²é¯§¯I¢HÇBð¸$Ê(’I/T³+­]S+ ¿hºPá¹bm/ÝROñ'‹•.&*2·•†ðÑÓái°}bd8±?ába¦ôî›ÖàÕ ªu¹ëá@gÏ6ýÕú8ºb<£$aYêù¨3c`€š÷’Ù¢À­w–Š£³ÉL7$O—ÂÜߊª(ãôÀjm˜)঑À!€OdÀhÀ›0Äki"¡Ã‘šgË>¬òkëþNmgUei™cC8]çI[Ú{ÃoÂ…•ìŽOBÎ|ŠaÿÖ|Ÿ;FhÉÅê…ì‘ÆTåîê>Ð$Í%ûXµ[ä `ª<¢ð¢™€ ÊQ/¹ÝoÙd•˜2¶$Ã"·Läy\¸Û:-«mW€ë#ák ŸR-#Ò!Ä\D`9½Äøµ=S$ D~8Þ‰í‚ËV&ˆ¹þ÷@Í#¡3$ç$Õª6=8GmÄÌ mý)=Ç|ʲDw¯I™Ãü‰Ä¢ëOƒzO´ÈýY¶ùg»c¡‘JC²B£i}—×·7pîNüäE³3Å¢e¬7´·ÀŸæ 0;0,Ó_èÊ]*ÛT‚ï=èO¾vKdx1[Î:²RÏ$c¬\h2÷8D|]Üß|®Íì5½Ìúb1ƒ~cF²UG$ ˃|߆‡¼`W|"Ï›ßQFò2/ =¢~øëÎÜØÝ·½v@ç(fH(X\¼,¸ì~?^f¼AW!Ùw¾7-Ýkèû2<™aÙÇüâÀÌ„"¸¬€è\m0ù\³CÔRJñlä-R„]∌¶…Y55ÞE°âJœ¸êX½ŽÊXXZö“QÁÆ¢Ú6îÁŸáx– >næQ’ªêP²:%Éþ*ù)ϰ7aÞY›8ËÈ”-¤‹˜J²”vzÞ¼ÜÞp*Zøg+›—ãþ©Åe…ãfŸ,ÅlÛë&¸3`äQK»Ù}[#Îb:ßqpyÝFòv¥KnB§½*GÝo¦ËÞXfÛþ•ó|BŠó.ñý@PÙ—^0(q{!'K…ëÕH§:Â&ï °–iž¶¥ÔíØâÀ}$ œñ;ÑLÌ<$Û¾î Å;ØØoð‡YÂ*©«mx²îÕ÷KÙùÁ߯m>kD!,Y.g¾ÁLÃ`c.¬¨®h§ áÄ òSŽ wy@‘ì·ZoÔÓÁÒì—B–@8r îܘ¨Š!h·É ^)2Xøß¿¦D{XÓe—¼?ÄWާ÷mž½Ja ­@òk£+Ý%öÖ°›ýë¸i$“lYÙMá›Å—â<æ Muw2~s»bÒ\¿3:çñtä{ý‰ŽYÒoªßøR¢~M*c­'̉Ñ}á%íë1Ý…’²Œ¿W…kMŠ„€pÊN ó¤…ÕïÝc«{¶E§ÿµû`Í™KV†Æ0Îëv+€Á J¨¨ue¥‘å‹•B&ÖÍpþPÏÍËÍ>|Ð æ úÖÔÊ5?ª 2ôÈD`½ª>òRº•<9TIÙ$‘æRÞÂC=µ± *ÿ€£ˆ錎-ßy²yEd”B””Ʊ։å´äs˜{*v¿r,žØûœá•8ÔZR0PÐÚ TR•!GÙÛU‹ÓA5eÃA>ØÒÍOþ»ÁBnvð™#/$u¹ûö"¡Œyw ú§Ÿ?VVÿΣÒnqÓúaÇÇT¢Ô´n& èBD= ”ëÍÓQ[xô£´†tH°¦´^{^AOUovú2E~Cøº2fuÿÄ€7áò;Ñ,€¸ù5â;¨·!ËE`‚´«weÈþràWìËæáàe*?qä¨ò©¦¾¹ÜÅ—híy“n>³ˆú€æNË¢$瀙k¨æZ”™ ͸„+·¢ÍõT¶m_‘i¯IVÒlkÛLD}y@²¹¹ßÕu"DͧDÖïäïgæR\´GÐôhðóýf*‰JòßÇ„+Mš 'ä—mr³ëtú½±:Ð<Áæf²BoÃhHß^…hc!¯[t³Ãû$ Ú!t®¡ŸŽÆ‘ ë—iÄD’–BD6³G°Î\ü ¹¼äìåéU–å’’äÄàåÔ“V•zFv³>;ç•a7ó„`–o*]Äáór†©§©Ejgo\›": —t àÙWTM¦é‚]|Ë•té®î¸ŽG~ej;ýo,x§ Ô3!Á> >aÑIþôùLº2Þ·²u“1¤\÷Á?EYV »y´'Vìi­‚’·ÚkMο-T™mÓL("y¥Å)O.¹Š*U¿”ohd›$üf 7ÕGP’³ELŒýà™¹sE¼þ¡y¬ÁA, 9ª6:Œ5¯SV€wºð+ V£3Ç0fÔ°Öæ‘؇Š3ÖðP>Ö%™ ¢y¬îEµZ¬ãXpÍ-²µ“0Ä%²q©’f Mö>ÝQº?@3/)æ†n¼{ÔIsøãLj-©”æt ›º.8ÑÛ §S jC'ÀÇ!ýü€±Ÿý ªOß›JÖSwâÌØ©YEŒØ…“¡DP|ŽHRû°ž#=‚•ÒWÉZ±‘Ù× “ìcî^›¾†çàh¿m¾KÌ ,øÐç»ÌÈÒy›æȉ蛯.d#ªÝîù<>4cá$ÖO®{‡2[¤ެ¸›òlf´u©©z¯¿\z¤&¦ì;›ÑaÉ¢̯d¡uÕO*yœ'a±ã¹ysÕœ bFBÀñmGŒr¥’ü®$,£4( ÊãåjÀ•6YúãÅ!ì™ä4{i•ˆµ'§—ðïeRdŠ?‹ÖýR,…›ÿKaóºiá‘åùû¢™ÉílCxÆ6ƒâncúd£>_£,JÜ GÂøjÐÀ\ÔŽû˜í‚ã®KvøQXl“v(;ûžíóvô´$_3] |Û·ÅÙ%ÎôÜÙ¾GwØÍ,{¼O”’àuÉiÈϾ·9ý£ "5.¥Ñ •*Ê[2¤Gò¬m±$ k’h%[g;;–_Úƒd˜Îlä×MÿïÂþ£-8š{št±~jòɃ£…G¢¦fògbÅæc⵩vzþpunF/’ë›0¢ñwtúN'‡d³VµSsóñ^ª×ñˆï`?¯Ä›KthwrÙÅ4á@Âöa¼Àº&G~P°ÆWBîî9y}ãtrAÄ­Y†¬ÌÍ’Š…džFç@ŠÅr I‰°&Ä;…ûEeðë]öü‰3ß &U¿Þ"[ã·äè=„ÚíY‹fÑŠ“¿«n·- üÿ†Êeº‰qMA¯MÓák; ¹É‹9‰Œƒ¸õÔ˜„kR|äŸ-!0ö¤hM­ÿG<ŽôH•)1 4n,óy–ÅΖ„Òü™Ä$Ù÷ËT83#Él„´`ÛB!$ ‰d!ØõàmÓ½ŠÌĘñòšÝK0ö§×’Q*ÊN˜Iuí™däÄ÷Vœ;5Ú|Õ𨜦ø‹ç¸Ïß"nÉ.¾¤V”÷ò^‡›öb‹7¹ol’zBnâ6èˆòÉ<†AƒQÆ/ÜÇ>Òyùã©Ô1Í¿(V”Ž×òb9~¡xл`øî|—]û¨Á»ËjÒÍ¿†ËáïDÞV²†¦,øM– gÖvGFd[šOè[uuèQ"ëcÆï1E¬mXÍ&a11ÅÓ¡‘Ex‹¼˜.VYõš½?Ó‘¤'‘8%Eò‹7’–v8éðVK×)§" ±µP(•x-Yê©’Qe;_ÝJÍ_.Ë€t<ÈùVµ²Òáa˜ãT³Î•”:2E(´Å/fb†õÄÓ]’(?p>ôsXhêå|L$Œ9¶c"oµÖ¨YÏèX€ç²PX–”»¤Ý÷¦¹‰1™ž#ñ–‹T•™„mÈÑ¢º^ó”å}ßp®ª”8ô{‚X\.vX2Ó«F¬éN®Ì3Ò¾ø÷+m«ÄÎ_’3œ&—ãj1+¡\öKÊÞ…™r{g;8&©¥Ã•n$¼©ÇOBì¾Fsw ¤{hixa˵¡óËm<1‚Neï#{1Ÿ# hÔ‹~K‹%é7ÃrèZ …I_±i®)ÅLøÜœs‚³Œ†{S?fBßuD+Îrá_„LÁ U’«ädû6λT×é¬PTySÐ0KË0{‡ž8R‡cIWV4F†à ­¿Ç'0>‘f*zä› ¬¼5#IOÖô‘!ü ßQÏP÷² °«LlE5ÛY¥ 10õÇ™Æ)܉PMVÜKëYÎÅPIƒQ¥Å΄¦^÷6÷ãþä!Ï\µrìVï9¬\° œ³Ô©A‚Ÿr)GÝ^‘€¸xð“ÉðO¹xµ2é9Ί°¢C<ò;ÈRAóbžåÌ­³îÁÜ‘ãÃj$'6UO”³îç»Ã›ä8vÖE#‰6` HÔë±HÂzd1‘Î{ǶÀsÿ¼e˜b± ¸$HH«?›‚Î/;”!üðô8š§ªÕuú‘Wœåòi“SsÏilŒ÷z‡íšæÝÙ3¡FÒ­M— m=Çcÿ0l‘2Åžl îH“D½Ü=mÀœßýâ"ü lV+ý¤ê-¿VC*ÁuKÇÌRmª /®ÖŽIKüûÛ‚ ß…C‡{DWˆ%wõý¦m¤Šº¼ØOì%&/·µ†shž_î(¨Ì©þ““µð¾?»s\!›¼Üÿœ³¸"* çjùû_­ÔˆDšîçž>â_áÏær­[½•]ËÇ ˜ÁèAÄäœZä4ò&;AM,ìñ°žF)Ùô¦# ƒµ1œ“‰kL»r•Iêr¶ÿ„Xií6]I~üHš$…1œYÚÎh“ÖòÄ2ÃÑà¹÷“j'×)˜ŸÚ­<>Èö[³ Í Ñ—:ÔaòSh-³ÌHã?€Á?mx.¯å¬ãwŒÆMÑ`¥+‡P&ÿ1Ìi†dÙ”Y^ã÷K÷ìŽ&½¦31—Œ™¾æQJfPô’ÏCõŸ–º¶!¶¨”D‚ëÚ<7ÐJ{¢1vNxêÄ?-"Î;¹»Ç0òê{å]çÿþU«”Üóбûi^ôÕ ŠÙŸ~'£eX8Wv…OxØñÅ‹÷EdòTËÅ臲x éò<¢ ëQ£óAñöºX¸¼ŽDŸlnC|Õ¤q˜¤°ë[AœrÖd~ÓÚÈ #TMþy»3[½¬HM”v2IÖ5g¥ßå‰vùCF6öµV¬‰÷j^ч•;Å”f’~mwéÑ+ú÷‰Ö#íiþvÍP–üA®ÆËÔ|·°÷pF{{ª>8­§Oög(—0Våd%øæÇšêî¬)•6¼â cfÙÖÞ3½Êp‡²Ç S·Àݺ*4þ­ “‹TÿÑiöˆnìŒ3wŸtöV¹ºkß‚¼ËÓŒF,§)Ä’Nã¡8-ŠõÐVdoÂa{Ic¯ð/ræ£É6êsªõ¯.5)'°ºý C½V!Áals¶5ÂçÕ½üÍkŽõeCÍY-;0c‘‹6è¦H_u«Öç4ø.Ž(gVÚ{Ãwœsr^iz”½~ªb‘çIF‡§V‚«þHœU= k»}ú‰ ©ÕªÍŒñË‘ V]˜çk§·ûè÷MJ‹f·?[À–½ðÇë“ÜšŒlâô]˜h×ÙþÆ’©ŽŠœ°Ko÷o^?úcvœ½a…}¬fl"d 0¶ý,˜sSgBÖ½zdµ<Lß§Gu‚m£ù¦ëäju“ÊŸO$úÞ~ÆjjÊ´ð°Î ß+ÝA€uøñCÔl„yÄ8f É_m"ÉJ°ËЄí–{Ó“®ÊS{‹%— 4§¥é{‚¿w2y»"Ç zù9ô韹÷U‡Ü")‡ÐNuç;„ò*Yñ»šüÇ¿µ› bŠ£ùÁµ¾ãà‡ø³ÂP6$Ñ$•µ»A,øKÙ©ˆl‚tö~LHO‹ š`b5GJ|za~$lL‡ã¢9ݦµU8—óÛÝ6ýžj Þ$¢â  ‹ªË`ZÖ€ñ(8€öÞòMèâTí+`»ú¹ðn¥¥¬’‰=,²lËD€•×,j¢— ð{–Oƒ¿ˆ*;Òc÷-D¦ne[ž!IÕôt;<4ÜqK-ø¦q(x¦½dëþ‘±GêJ{Ððö[“Äç­Ô‰xµ3Q*3üWêHØl§«ŸŒ&Õ¨ÿ1.µ!ïuNwÖÛ0*H äµÀ¾8óÚ·ßïœ×»‘Í/¸¿ȇEnü‚Ï"j;[öŽFü¦Y‰ ¥òm;®[ãþ•þ|/Ó˨IN‹ºécʶ(&cZRW¾WÒ(-æ£0[þ#Ââ©È•dƒ{î%ݾÿëžß >Ì“I ú¬ Vƒã×ôS·)=9l±§-r€ ”=øÿ;ÿ#´!\f–?ënN‘x"T‡'·¤ä´Ñzã47ˆÊø¹ k« ¤ãos‚81άì*Á»õ7/’¿öéü!z¸9ˆ±õÎ ÌO!V"Y"]‰›q¡¨õ¿5übåè~Ù¨TßÓ˜}¸z°çãîŠIü ÇOȘ9×ðÃ7¦â½Ofb$$4ÓÄUn§9álìéBD®£¯øp^¡ŠČޟè9Í¢‰Ãù¾áÚ3+ÎÏ·þ(õHäÑ/j`&éŽ&B¶Ô3±íFièš\n‘ (Ú5½{T¡fX´qûž|Ln¡(Cú=«ñ*8³œ-<™¢nP‘ÉÛÆ5§ç-¸T£Àòåà^08ìghÇ#Wžæôú@TbŸDm?Ö(¼ÚÇt²—œ¹-¬*m¾%|¸W6+½ï§ ï±[ªoŠ‹ŠoÓž“êa›/|0šÔ)~™Ý_a‡­M¾ùžÃ;”ø•2žÜ:÷€‰­‘ ßKa31DnÎ{À¾ei62¹Å$ñýrxhLï*££[4s,°/31h‚)Õ=½Ä†ƒ®2ZÑÓyJÑÛkU„„Ñ8P3ȣ댠fþ6_¿\1/¨-—vaMélølX, £\²*uøu÷½ý÷…9ž[¹•"†ßû™nŽ"º1Z#†âÍ»dáhAkß»wInR1ó4E$ËÃæâôŸ`ÎOløoÓÎ'Ò¸i—>¤b¡W›)¤Hùïûæ°îþÃ~ÄìåVÏÔµa4C ºÞç`¹[ðSJ±+ÈU) ðD4YÎø¡‰›=Ê q‰ bõÕ&C|>ø¾œÐZíÆU8 ¦{%Y¦"Æ7³€‘QX´¸q笃Wq3 è·ÔömæÇê-]™ËMu¤›oó^{,Ç臻;©qì•—<îÕÝz~€®·+ø ›Ä™U™.ÒLJW g\{‘é4—É)HcþÍ}…Sz¢¬)‹f€ûhE—¢Â#snßÏlÒ$xq4¬¹YÊ£ÔRì Uü=ˆm•”Zbò¾›ìR´2³ïøAÐiÄm0˹‰*:ã« iù`Ã$Èû .)ß“™“Šž a”‹ÖPýH9ño¥‹¿Caã&iÓ¹oŠ4ÿÈñÖž*G3a¢€_ß9¤Ç†ÑKdÚ±lQ©‘ÓÚŠë㉅>CÑ#ÅÅTnŽš±éÿ™t-_ÊsØøb4˜ùB‚sB.†ÊÅMxS´u—(pBl*–ú†ÂhùD Aqê*ðÛh›ŸÀ‘omž¸d«2,ÝòŒ£èJ¾·ýÍïÝ2+çi·@ÌVWƒ­±žÆÑ)“S$ÑwØORm-Ø/|B SÂf¯Lè8kÀÐÖ+K`÷»„ÞêÈ›ÀÉmJ)PÆU[_û@'*fzÔ<å§Ç#é ?Œ³Ò1XÁEOÓŒ :ó K^OfHÀ Ë‘Z=HýzÕþ%I¤Æ  ”s!¶Y] 3¨&è7-tͺ˜s¢ØG>†¥gddH†n¹Ô¨õ®Þuí[(ü“wW–b°Ç6ʨòÃr4˜ÕoŠàÀÀy »ô©W˜ÍnÄAös˜´íoøäª:Æ$°wÜ2iumL+Ý‘l()wšá ¬éÉ  ¾³/)ÕB‘·.¬2ôЋ݆,ž”È #¦ký)‘µøÂ»çš9T¾ Þ/ùn ìÈçT$½Ì˜ ¶Z±ÁUSG(rõl·?f!枀”la‘q¬H\Áß®¦—«*Oæú—éì"RAt„ÞPØÞGy¬¥()’n(u*û‚¸]Žº `’ë×XƒÔ‚¨ÉÖ{AlqT¯¥¾YË7e34ò"ͨ•%gñz¯xsUPZXkøí©mQ0Ç!Ì®X@ìȸ3jÂHý$‚ ZO'9ÞòT’fXÚ¢nZÆåzŠ©l,<9dFr[Çf5ä·v<ôç/m®Ú=í,Ô±Þýº|¦"B[ç×ׯà_ ;i+\s Z€HkDÎè[Ûå‡Â4èbàÎsºÎÌy^~A’:WNÁþu¶ôùâ“tà•­† úrs‘;R‰e£ñxÂ}ŽÀ[;ãÕOK0ëÝvaÛ\ÕúÌÿ5Äæì®ö]‹9ÅÞ¡‚L'îXY,2«€m+?)îÐ{Úa—ÚÂàÃ*8ªWƒãJpÉJÙé¨d÷$¡¨…¬‚ÒÅŸhÑÖe<øÓ¡kšƒÝNo^V§gäÐ’÷yÎ3)·y š½, Vô(ƒkFvã’Yšc7|:ùT†©ÕãÕˆ“¹2­LUW…Í–ÑëÛ¦âÓ…Ï6Ø­3¸O‡ÚðÐ2ÒÛ Å`“Û« |·ÕÞÞ€B¨ïôŽoÕ™çö¹›sVrQ;’¤_F:v :ô„µèrœ”7Æ×™Q9ý(1Äï^0 •´eF›æêõÛûÖ?.&ý¦f [¹íõ"Pf`g|DøG˜‘ñÌyC¾«Ç©ßj‡stB¾ goÙÅn±^/¾Ðú!y[óD8 1LKÍÓ8î»ÖÔgª‹½•#žéÏåŽS—”oM›«…¡ÃU-ÝÅ„`Åš^h ñxÐuÐÍ#H ÀÕñCW?,¢f†a/cüà£pȧ!°52d.¹§/Ÿ•oÅÍ냔䟸é÷´’O[v~U]µx–£,VxÕKúÀe$Ά‹–7_t¹×:^ü ©½É-3 öqev£ßÐÆf'ãÊ >·‘³PŸêdz~C€|ðóXÜ.i[Ph÷}õ *ñ–Iãsìêc¸øš5šŽÜ¯ ÆØÑ²=ïOÝ3¥ òÈšø= ‡³®9iaÛbhc˜Lú¶Œ%˜¢m__u«•Û¤þV@ªty³ÑŸ“ÓcžiÝi ¿Y~KG^%žo–io›aÉV³€”µuX.9µŽ™|*gÄ‘s+«uBg˜$ÿGö; ñ!K}q¥¼0PS¦^梁„ UÜ>0=SÔw ¬Ãä¡ìV¸¦«/œBZý}¦šÎ£5Sã—p{´ÉÏ—õ™»‘æ’2Œ„ò]ô׋4º˜ì¢x âþWš¬jâÖÊßLqÙŒ[ ê³=½ ßxáµì@éNáµ\£ÿ ýa÷;ÙÙø&”¸&.»Ù<LJƒP¶ôV>õ£-¯H#ÿƒwÖÄÝP¤W™‰·©æŽÝñ1‚KJ<Ü…e@©Â`Ö|jdÜ ö½Q†R/Œšý§æG±ŠšÄkŸsãaR# Ý#Rã8i1¯Ú‘ÈÇ92+îÚ)t–B€"eRžªgºW´qd–.a’.I/Œ Æ/höv ®xöºÖv³ŽÏ<Ÿµ,Kí»L¢ë—ž®¬(6¬3ÞgÂT[ú^À¸ 2(¾.ðüè‹ 2pȸ{Æ_}Š$)ˆ™ä ]DeqxdEBܳR¸ˆùŽ(êýñÅ(;ËÂùÆÞÎ졲]£ÉrëBÍÞýò™û!2Lî±Ô·„»\¬ eXb¤üsX©R²<[°Ä¨Yghˆ]C”ßYÄ4¡k‡€X@mª¸àžFÅV­[!Ö¡ »ŽðrcSso]œ[XëìlUY«=© ¡Xq™«¦ ZËß}Ľsâ>Œ{»Ubÿ¦wnÐTn1hO 6°AK9œøJᬅÆó »¡OÙf"*kc³ô*¹Oª3H–2ϵ˜ÁSZtÁ™îu3¢¾ª°Í=Õ0øu¿Ü3‹¤0ÏS†QLÅ\*ifŽâáu¶öZo5Düà oaXø²6nVŸ‡}}&uÙÓñÍ+&ë.SõNW;¢æŒ­›Ø«&4P¡öx&oÆ,jµe¡Æp7ñÕ™'[Ó¯©KçXlG*”'KŸ /7“!ž37î¿!š[!/4€7v­½îÃX‹&úµ&¶´†áÿEœÛ endstream endobj 302 0 obj << /Length1 1612 /Length2 18956 /Length3 0 /Length 19791 /Filter /FlateDecode >> stream xÚ¬¶ctåo³&œt¬Ž­Û¶mÛÙ±mÛ¶m;é ƒŽÝ±ŽíéÿóÌ™3ë¼ó~™9öZ¿»ªî«®ª«ê^›ŒHQ…NÈÔÞ(noçBÇDÏÈ ·´5vu–³·“¥Sš»þÙ`ÉÈDœ€F.–öv¢F.@n€Ð 403˜¸¸¸`É"öžN–æ.J5e *Úÿ´ü0öüÏߛΖævò¿n@{[ Ë_ˆÿë‹*@ ÀÅ0³´Dµ¤ä%”òj  ÐÉÈ èjlciµ4Ú9©föN›&öv¦–ÿ”æLÿKÈ`pvšXþ½ô0:üã¢8l-ÿ~,æNFv.{àb°´3±q5ý‡À_»™ý¿98Ùÿ°ýëû ¦hïìâlâdéàø›UQTüß<],Œ\þÉílù× °7ûijoâúOIÿòý…ùëu1²´s¸=\þÉe ˜Z:;ØyþÍýÌÁÉò_4\-íÌÿ“-À hnädjtvþ óûŸîüg€ÿ­z#ÏݶÿWÔÿâ`éâ ´1£‡ebþ›ÓÄåonsK;X†EÊÎÌÀÄøo»©«ÃøÜ€Nÿjå?3Cõ—„‘©½'ÀhË oïò7%€òÿNeúÿ>‘ÿ$þoø¿EÞÿ7qÿ«FÿÛÿ¿îó…wµ±‘7²ý;ÿ~`_{€,àŸ7ÆÆÈéÿndkiãù¸ð_5€ÿ&ùÿƒ#åbô·Bvæa¤gü·ÑÒYÜÒhªhébb03²ùÛ©ÙÕìLN6–vÀ¿Šþ«™:&FÆÿâSµ°4±¶û§õlÿvíLÿ+ù¿"ý‹:ƒ„¬Š’¶6Í}Sÿ¥øW{UO‡¿Äþg)rö¦ÿëð†°°½À›îïÒ1³pØÿ&ädbòý?dû ÓžåŒ\œ,=:KfdúWáÿó÷Ÿ'½ÿ#fgboúϬ¨¸Ù™þ¯ÿeøÇmâêäôWÕmüß‚ÿãü¯A=€&°«Kö&9œ'Çú̉Jç¯ùÊý JwØ‘ç"Z+šVß–Öû½~lÓKK½±¿ëEÇ "Ü,‘´–=£UT?¨dx¦K^1ØC^Yœƒô˜‚ïhç{Há UÌwÏú)üóN?ºå´¶ c¦ÂYªÄÓ„Ûõnò—B¥~'pó£8ÚþÒ÷2u©oW³q´»iã€m‰ùíHÊ®2æ 5‘ÙÇÒ1qÆ#Vä²Ú&SQþöÙÇÁ>lu£qnÜ®3ï ¡ßñ—!*y{˜¡ÈôL#Û+§:,pIãá÷—½®Xò[Ôî}ž°è†Ù"]áEz;…„}a… 6õì‰Ò;#\òyëK`­˜I§S—ˆ£Y2Þ~ HÇç<Ê^x•1I¸ÿ„ïûÁbΫSGó =`‰×­Û$1PbVI«Ñq L~}öÄh¸Èžn!œ]ÌŠ„3¨ÌJöy¹q/€wf`ìúG Š;œ?í¥fmÎ.³ñú^¯MW/IàјÔ÷ œrà)ÇÓB2YÞÚѬɲѥ3ntæŽG3gpaí¦º,X›¸ŠAëy!Ìî3Ù ÂSXø4gó,¶´åðÐ*\WŠÜNr²ÎÈP…DGÆ´N¥Ô9 sR [j" !RcÑÆppíêÄE%h ÊÎ+Ä4ÙajüS¸¾Ädÿéšý‘ߘX$’ÙèøÊE~1’˱ÌPkM@‹ÌËqj¡7žiã c!îضhâž8?Ùë¥û>Lv•ñö4¨™ùÓ>vMĺ¦HŠ’ú#°¡;áwÜÕœ³Ê8·„†0* IŒºJq_>åøiû—Uñ0/–÷üOصìž­j•¼XøüHñîv¨Ý\ž²÷Ë^†~ þ;ª¸üÅ ´©¬Üú-RN¼ùÇ¡.BŸÕ“É?CVñ¯ v»‰f‰ãáá£ß˜pã> ì%F¼ÁZôÆà–ƒY̆EcĉÂ-ƒ õê*<'Pfzo™Sd#ùçÿÉ–a @YA–«T©¾šÇœåîH(/ö!€µÀ•Â*c¸ß"”–ÐËs¼¨°Çßæk%¿A>75§’}î…MÁ·ùn1ðó¯øÆûf“qcŒHnáåĬÈ*€+}ß3æÁL•ñÉ3¾K_»‹3<‚ˆÚ¬B;ÓàŒÀ 1wj=gè}Òï÷ãG‡½WJÍédI ²ï´¥_éMï‹]£0nH:Å+V×W)ÿ1 ÌlÈíhW¿P½ú! úXß`‰“Iƒ¾Û·ßöÞæ&LQÕ])+ªˆ%€š[¾K÷ÈéÑP=ë£tHT”Õù tºÑ 2ã €ùcà•гëÙÒèfa”Ã÷/=K|tç ¸2÷ÊÆ2º¡à·n?…†Køð)BG±v¤¹ÀÐß}¡Ûx_«›%"°ñö2ö6 ó j+«3ø’·;â%Ù#2Ë.t0Ð…ýdw¹¢]«ú?µžÉH¦æãUø¨x¯wEC‹üinëÔÌé(6Ø|.58ÕßÊ›ÈàÍb{xU6 ƒ³c‚Vù£ó€Ä³’YE~[¡µVQqšúõÅ×E<1K”—Ã;¾æ/uÌnQŸ«¶ÊƒÞEŸÝì¿ý’R€{ï|ì÷<¬ön-QµÏ{^†vfèÆm™ÃI!uØ©´Õ ž ·ü°m®#<aH&u€•Œ^Jƒ:…ŽÖk¢ my¥7ž¨ Iù@ÓPf~'¡s+°ÚRt}%ò{¶[IÄ;€f@+K¥G€ÏC×ÌóšÙ„ÐKMbuoÇ•…ɰ1×'Ó°}çæT˜1p‘I_)ÞºÂÝ©H6âãWÐ_£ ÈþVB'°•—$–ÂMbìµ30(£oݨ({nžf—m¤°ùe|Bƒ1±¿Zõ%—-Jbw=+ã·qÝ>—a|õÑ–6«]÷Õ7‡åD­V¨å¾Ç,dC”ÐlØÔ bCÞ¡çBé¨ò>™TfNœëMKQ#œ& +öx¡ƒX¼Ç}×Zliݦ{›1´«Ÿ1OY޽;fqü{¶\;{pê¹u¨}ª,S/åa}ª¯¬·Õö¦Ì‚§QÄã7Ço£ ·SSéKH:±ƒÓŠÉÖi‚<ªƒéóŸÇêp HÚÆR¥ryÃû gòìsM ñ¯Ÿ¾”+JF3Ãó9ÓÃ\BdOÁ‘ä)o:t÷ õåú3”Z¼fh›Sî+Æ&£üª²W6W0Šb½·Š $œh ¹Ìû6 °Ú_ÈÄôŠIY­ê`P’$z61k@ƒö+Mao´pÔaËùWLj:æCDÁû‰4|ÖÏ/M¯™Al.ƒ¸›N?É$¢ÑŠuå…Áªñ½‰©lm‘\öð}šµRi&/{‡`Þˆú0Û)‹U æc3 Ôi@ÆáÜ™KIU•DR;OyÁ¨õóRÿÁâ.y¬ƒðê¥[+>hý‹ìç}X÷QeG*ù/†8¾+LIZUµM÷†Ð ç?ùëLÓÁÇûò˜ ò½ö«`÷¡‡g£TÒCq³Y¯B g˜{S,ØàîRÔJ]€^¦bó#r„®Åéµc`ÎC™oŠ*‚1fÔ@ˆ ‚R} „´µß Õj¬¹óè~Nnª}ïYÞ*èÍZ£D@À"C‚T¶öJÕGf œ@`Ý‹¹)ãGv’ya²ei÷ñÄŽ -—²ÖϢϖ å$Géx)ª_`ÉÔSš¦A1,(ýRkäÄEÞ^W”CõhÞ—wb‡VÔ+4ˆÅfÔLAÑÕþÖVÕ×:·¿S¯4l}‹ÎL¤ƒÄBDÑ4ÁEÔ!TÊçœQÛ|Ž_‰?‘ãòÃ×vå=Ãà8ð‚ë¨Ã‰`ÃÊ>&Rgû p©ÇâêI²nÅ“Ó?¢^3ò:ºàÑ…hòÔt{‚Éú3³q‘¦EÄŽN¥š]+ %/ ±jÉê$é¿MH¬þÁn´u‚˰ÞmÁ 0 gWòl¡œªmFmÿŒ¶j %++§éUœ:'Ø ®IÖê§€9ø(•V,-;h¶d´¥4• õ᱉Am–Ò9:©€ >³ú¶Q„ÖÄ9T<jK™ DhÝáptTØÔøëM~4½ ½'‰ÀS‰Kø*”+Ï(ÿÉ~»7ž£á¢"”ªs¡”Ôÿ°­MX€٠ʳ&*ágN~ ùÚÌðŽ4€<áv “Oåke^Î!OŽ”ïŠjä÷Œ;îBp“*Z\sšÓ€ŒˆùC°þV×–­ Ôïò©ªP£Ú–9ËÙaá öê»Õò±výûé¸à˜÷Îe:WÖ>ÒÉ'…û­&¬!þ½U²zÝâÑw¿mŠòû®ªÜ6«DÐ'c"7ÑÙ†“Q5_Gðï—^·¡ñ‹@í§­GS˜˜›BsQ¦™oÄÙ+HÉÄÛðÓñ;‚zÊ<+ß TîV¥Øõ!ƒò/L&R›°›Ãr7?~1 .ZTqÇxÌÚk¾[ï¸òÜä55 íÅBBð'£h`<—XÓŠò`äf¦O“óô>  ÕÕwÞ…üh¿û{¸XÛŠ<`¬Õ˜hM%Џ2 ºy2yÒ+7ÌM@ÞxFoð[SÒ÷åR‘üÓcŠe_Zšà¦²&À$ÂIÍ!“Æ‹Ögø>üdȆһ|ÒÌï PNÅrOmÀTmÃ×®jîÍ>P¡Û赎0Gr«JUúú'ÅH(PJµ¢v³›¾iŸx="{·Šý<З#‰aL[»:Ñ~leúbm1ÜÀDÓEâ¨Ë·Wžª ¶çáUz%ؼëSÃñéV̉½dvÕ©TsO8y3ŠÛ6k£èLšâk½–ÁjÝp!lÆ¢rƒûLíMßG½Hß§Ÿ°åÓ¦)„!…n­µÁÐæ:G‹&CíÙEÃq‡|‹g²d1+P˜8aaNU‘ã]û‡q¡²cDñ\Èþ’Xô7åŠNBw±V£@µr{H ¹÷Ÿ!}gáä‡ú'-¾-n߉Go¿Áï¬vWªË®º@éb8t÷Óè gÌeVvÐ…—*èYVúFÂ2ú3I,Ç*” ªDtº¦PÕ¬¬nŽ‘ÜÏ܆¤V¼C¤:É€ˆœ‚$1éWô;V›àMž¹«bˆ7½îýðû—Ò'UÓEíX ±­„¿,Œr®$êìž©†&S(SÇxû:.ÜC0yyº~UówøHx§œâ"¡ŽÃH ‘8‚`!°B)£Õ»›|^#ãsæ¦lÒ´SŠt6 Ì\p¬ñ®êÎK¹¡,D³c† Åc­óOZFY¹ˆüÔ¥Â}ÚHùÎ!ŸSº%áaË1Æï.rJ@1lõi|¿ ™ü-g'´zÃýä¼ûÝĦ±÷,—Ø6® ¯Ÿrš1#J.rQñÈÑuôL1äàsÖÄ×ó=Þs=Z‚’)lÉ™bJÒ;=þ7Bö84›®®žFé[åS‘(h-Iž„ÁFáíù4Äð&uœ‚,É.©ýعIkx‘ò˄ֆ âeL² ÀÓfÂ¥ù8nRîê?Þ%˜›­±Bºê„‘᥼ùË=…´m)a a†x¾ÓO‘vÿØØèMf6„­Ál›"ìf ÑÜjö}´BÆœï×n„¨»¾a”{‹"Ha°ûaÊÁ˜yŽÏÂcÁ»ª!j,ãÝ… >ÀI÷–HËS§1¤¨§_˜ìç\ëA3¨QD;Ò"’u#ÈehNæ¿Á½=qq~áÃ¥oƆ'"(ÞÑõw¦ž.‚æ¯Ïã/ÿuµx_è€*b»ÿÞFŠda]kg5«‚>iOÔÐW ¯£¯Üî¸U“­iVï9üx‘B¨ÝƒŽÐb¦@ˆïÜ!N ¢u÷B×N»Ú`ˆn´ù‘kߺÕõàìÄ(ª»ë”Å2›n›0m¨çð(ª89¾»¤¡¢”­!îJŽÅe3 ±€>{ßý‡ÜãÆ1ÊÿºÔñ3fêÅnC7ä?ÌÆyÍ,é$-¡¿ˆê؈&ã&,¦ºàÂsXž¨Ëîr:ѧב6qRq¦°X"—/Té†^ Œ‰ŽŸ‘ƒª­½vžZ]½þ¸{õß"«<–ŽüÔ>èÆE“uar¤Uc„é`ï"d½È.?üÙ'ùv˜‰ÄédbsKñ'ftâž¹C5Õ"ʵ‚FŠU¨¦Mû"aÇNÝ–½&UôÛFi}4ùÙê´do™€Žüà «¡Ý‰a©åÔ{Ýãâ'λ°É¸ŒîÂÏ6´YßÁçX«xwY—¼ž±Eb{]L­bÒíÎ÷‘]–‰µ›Ü×-¥²Ž1ÀѬxn‡UºÊ¬Þ’ÿMŠŒ#˜Ó68|\vèè£ä/.“;Ü`O~§Ñ(ìï´i§1¯?c}ÝO…Ùæá$3·rÂE­‡÷3ñÉQÛ>?Á5ÞŽyk¤Ë•E„Ò7·þ'x/ 9¸ÀÂñŸ¹–+Ûþ^ü<³[(/8±‰kÌ­û$͈벊}Åé)Dxm:ZÔ ¯÷üUòÚîcfþw \s~48Ùf% U‹€T¹¸÷¦Só~ôóÈ '†PNÙò\,aë׫j~ŸcOqYžøÛëóJNœ4B@T]S„5ü„_B2.W7ÌÐd Ë»¾ÖGt?ÓyáÒ9 šRÁ»E øk‹Åu~ì¦ ¥Ðô»ÃKõâô’ã:ûˆQës /¢|U‘g¬îCÛæ¢˜·'Ï/êÎ<À‹¶9S^dÇd^ûûäpš¹Böh‚'秪…Z=Dõ)fêõµbÆDñÏU0 ˸„YêNFó¯<,jVÒh¦ú,Ôzi5'ô4TŒâLXÊÉ}7Ã’¥»ˆž³ÐSà¹uxX)ªì;ÿQZšaÝ©0°Tç°QAÛ[Å+³ø= IZžÜ—"ÈpÙ_Ma:!d·£CVZÙ(b’FŒ&Øw¸•ëéä§q ¢îbÆ9µúa±½Y‹‘¯„týå)+zJ¯mI$€ƒQ’í0ÌÑo‘Ì+ÎÆc¹<|(²Õ|ÃœÝø~:Œ…F`ýèkŸÙ‡~8ƒ1F :c³–±—<¾iÞö¸5°Gû3Û†Ö%²#Á~ÝⵘÊ+<2¹hæ¥NTp.3¬¢Ÿ5àd׬ŠõÞÔHföA§ÖHã‹°J"üê´Ùz<Ç×Åf ñð„".XFù0@¥‚ë§Ññ†•{tÛ í:jœ-ÈX%§!KÕá¯²ÈØë“¡j›¸šàµÚåMP ‰ÐyØ»ÍT“axÏ8YÎ÷ã++ŸZM›'„5âmYà …s,je6¹º½Õ #ˆ­˰$t…JP&¯‘.ã~#RLqšò“ ÉuÍ×ë¨ldJª›9Ç·lz(8Rˆ¾÷'¢ÙP¡µ«àŒ¸'ι³Ôa²we…—\L èËÀMnï† r@² ¨™ªcs#„Ú·{³…¨i\õÚ#¢µ‡g4–R¢ˆ,™& $l¯üS$Àh'2sûS±ehl¾åSáïW"X¾ ÓlÔönS[,¨.A§).ë{Hx~“[jŽvã€0†²…S,ú…Žvì]lLZûs*ÅP¥¼Í%w~â‚ÀÄmºÑ|ÔDôžr²®{l gJ8„K¤ž‰üŠÖÛ˜„ôB¦ãés…äiª fXÞÿ × £à§…¨—('„BpÃÐDŸÖÔ²ÌìZD£ÿQâ(Jø9Q˜$Ç pAd4É"™Œ yjÒ ßó•Y²@ˆa}³Q™A#Øþ2mN³þ„ã¿tá±n6ºo&YXÛ^dZAŠŒpL¢šO×Iß*ŪQæÐˆD%øûQØvºgâ†Ëpc„ÅSY®æ²n=vLš-‹íÖaÂ/¥È¹ì¼±KStðg²œ¯Dfc9X0*Geg%^…Š9jºScÝ® Â[´Í—S$Ýi¿þ`@Åõt¢$åxyÔ-çêÒ¹\ÏcÞiçs´'ŠÂ‹uÑË!ÂÄfÝÛÕëû¤B«MÕkH`Âø÷ÝN¢©w²Är–º¶žÝ‘ Vœ3«™9øáß^[$ÚÀÄ0Š¢Øeɪ'+øååùtÆ–?©Y¸5>칑±ûǦI—lÖ÷väÉŒ=8Çøa{TÑH׃§MÅz8}{nÕ¾M¢±qä¥Þ¯­¥”bîYñ£ª*^7þs÷Çðô.Ço]üsŠÏ›/TÙðZ㊴Gd5µÓŠ`Õbc.¾ŽžÛ½"VsïbÎ} b6àü´¯7™]ÊcÈMohÙÔXÈsµœ£ä§\Crßl*ÌBUÒiŠ mÌdrA×ÆÎ­¹±„L U „r¼r}ñ"+ÉÒW"u¶ îÆ°ù|²×®ƒÅ×y‘¨“R‡·U¤ú&hÍø—¨$ýæ ùv+Šn*â(ãnðå‘ÓÅÖT‘ÓPÂvÌàu]‹/¿¹èÍ¢Ès'k¸Žc ¿cÜCEœ½+n´£» ž²È Ë1^»ÓÝäçEÍŸVOʰ¨ûjµ†]Ð7¡à±Žï0¼ß„—&61öÿ@| ‘Pf&ó;ßÃÖ LS†Ëgù‘’L¹Sãfåt <ÒX¹œß:SÂ×Dɘ¼bc·X'¯9Hé+ÞûÊn6]–Ø”!!ËzÒ£“m'=ñëU÷5ÏáKœ¼¥èΔU Yâ»´jXЇ Jf‘ÔEB*`óÕKµV⇠N2 ü v b&ž¥ ‘ßTõÌÁŸ©¢‹÷UöJ"¥È–YÒÞfu‡ã˜hÒ%¡9¨  gÙ‡4hרª|ã Lðc«ŒîÑK¢Ýžl®aÞ‘peO³>wjV•êEw‰,‘uî ±¨RݹÂqËìmt€ã¢ï˼^-j·m³:UR*TwnèÒ¢þPnÑYìb—ù=Ìj/›hÜÄÇVcð—3†q¹(ÀÔßÑ‘ÙiVYƒ³¸v¤ëM3oWäΉRnó‘8ÓYàÓ·ºæ+4(Þ .;>EÝl¡BcöO®=-o>öúCcaœŠŸñün¸\Ôd¸ô)Ý3Ô}*¾Q®×©få«AÜI¦%©›’eÚ»M<9ã° $r`ŸÃ)Ì(ßуú嵿#A{Áa,nõÃä‚U¶uLè‰õÿˆWãÖÃ1ÀDAVùÔö¶áþ'«qf§“^˜žÀ6½å;¤vFAªÉÚmË¥ðƒžUwžåÌ/ˆ"€+ÁÚj:§‹BÌËû#Í59YóæDÜpî&j•/Y~i¹%Œƒ¥C­©Æ§îÂ1ÍVŒé ÝÖôÓ'ÿÍRÍ{YT¶\¼iö›ÿ$Ì0FHdÓX\Œ°lFÉøœ[b:/õ¸Ž±É9ÇÛzOËöy‰\§IÄ’ ÛGF°EŠ,m»5½.à¶8æâŸkèÍø\ô•º›<ËЂ=uV‘4ÕBû&ÿ¾©±bLhv6m@èü^s–“Uó*ÆØ@Æ&d¬†÷µÂèKx“!K;_=ÌNt› š,ëä’ÊÞØ„;”a…ùÔÕ)ÿFý¹õ ŠdØ„µ +†×t™KÔËá5ÞrDË™€”ÝTEA|F¨QŬ Íé(e;¡ãî“{E×Jwmðu}_(ëúôh)ÛxÃ8î#ëö!{rgèž.#‰ƒvzhÍÁ%çôz»œ7zOŠ›M,ÿ³Ñ‡.#ã»h¤’©8)zEÏï±ð6KϺ}³õ h¡6´!Jô['¹²ë„|=hâô>އŒ eCÊ$¥ÑàE§ñ:7IaÛ|HÍ=Ú¥î?µº#0™³T!,þô•¨³~_¦„ql ³–1ÈØ+RŠW¡Ó*TD^61(ÌáI׿L;™Æ>dœa޼cL d0¼5ò˜|5á³I7=”(¾ÍSÒ^¿¹È‡Õ5¤PÆç Û¹šŽ©À%õ±xÆpTn¦&edÈú-DæoÊåV‹;RE“¡ˆú éß©±Ü#ôžã©˜yTΛW° c¾ªÅã}¿*×eÃ¥(Ï$ˆ µõð§±1qi^éñ'7ª±ãRSQ,xùo{aù*‘Iyåoœîš—‘ˆÙñ+^“é·ä±Þ;=¦CÀßh»´ð;oþFš÷¾+ŸD´íÒ<0blAiÈmOZ¡).¶ÚŽ!„£9dìŽýóqƒû¨Z•}vRúm7£u‡51ûtøC€,IKíΊç‹Uõ˛؄-šÛí°p¼KÙîÈÀ”ëåÕžâÉHê™*$–®C·lØ &iK#)ý®–„y~¬RŽz¡% 1no£ ˆ½^­Ö‰Q¼Ë(<îq»9KÆÜBþm*“[Óº¾}ÝQéÉX߄ʎYŸ–xì«Õ^Sy”³‡g]îÈHéÀ¯æè®:´eGàqÙoÖ# $àvG»¹>)Q>¥eðáií¿B3HH0@øúÆexš£$óòV\¡ZÛRcó’bfr)þ ñ>ÇyÁ‰ƒqÀ‹Äx¹Š]M«­Ì­%²^wœ áí(Ìä¦JO J8Ñ|<Ì=‹[™bp!˜íiÁ6 âÈ‘‰ö"PëˆèÓNh4Ð*YW’+eöë±J¾ìúeüûf9¾ÅÜóÙ·Ž’2r“¿†”13MU'>¶ViåBbü6è!ĦjØ+¯žX‘ Y§/ïSžL!v¢ïimšó>ŠDŽ)Pæå¶îÅ@7“RàÁn4ôüCº aõ”–0빪òýkU´ïŠ­bÛ§‰vðº¼Ê‹);x%G Uâ®Ì5àœ-Ô”Óûƒ%ÑYv£Ì]Ù”Ò›æ`S¹M”Å!Ç´\˜í¦Ÿ"˜¬uMÿ¡×·H5R÷Þw*ê…:‹X¼tdÖR3»$v¼´“„îþ&/0ûˆ7¾CSÄý”Ôa¿O/qÓrÇ.ÔG0ÓÍÆ¥øŠº]S§ê[šdåÅëo4ùÅ\ÎA"Y¤:¾»£Ï( ÏÊê¡:®¯PG3ýÍ «óO>«šz_TC]¨º2Ûdž_ð-{ £ûdî­vÿìcF¼%Ò|éêi²¾~axx…sø<÷ìÖo@1ô¨îžXŽ«å͉¦çðH&iëab#ŒdšïJH‹:üŸnÎGJñ¤Î0³¤F¯·Ò“5~ÐO«±›Í·ÎYApY¼IÓj ­qûºPŸùÈØ‹3ª0öÌÏ48×£,¥=¹aŒŠ…|ÇV/Ñãæ†É²†ki6BS+Q©’sÏþªDlÿ˜'£C>Í :,Ú_å.wðérŽ>b\MÍo§c Oï‹1åYæ™çHWê¤*®J×éÕ·á•x %]÷õŸ(µd:•ôþ^šgð^\&³mª3rŸæç8óƒ¥ä ,p¤pCô¶"œ—š©Lݬ‹—Ä‘_5–{µ>bÝž>ïb¦m‚»I(º8¾…Øœ•ˇ&Î#z-ߤøÄ )kºØyŽâ3ÆeG~R^.#EâÌÞÔOkÙ 85»ü Û/»G^pýFRžˆñ*Z›‡²™!õŠ=O(‡îõ¼jj$& 8%Á'îÁÞuo[L ²†i¹v «ZjGf «W"±9¤0Â¥¸üAt`Mtevjã3Z1ùÍg@ZQÕæ×ô6z2IúCÑÀÙŠƒ«+‹´Éɇ֯»™ã+:TlN¥˜,«”שYõœ9cº±Ñ‰ŠUƒch< ¦n1—Ú}žW•áû]Pn¤Ê¬ë†Ý;ÇÔ8ºD ×xÿ=Y`ÔÊ%5‚™õ hïŠcÏSvòy¸Ð¦ÖÌõáÃÖê9±Ýú«¡J,¶ó¼÷ñ~Ü=Úk8Ó1ƃ×#˜½æç­]7Côè ÅPØ›jÛÀV¢[ïõ`´äÒýeÓš ïá4g‹5ìŽB°—×íóþ#+(q43æ:½.Uí)×ïKÕ[",çû%Ee8°¡_`'I(&‘Mæí§\Š[ü“T9ßSñÕOËu±&ÃÆ±®Éh±Þ"¸u†sà…æ˜Âxª5½#«ü‡”»¸YãÂú"&†ó W›(ܰ_Í#¦šq\“¹vÂË€ãâ(oÖ±¯eŠÛ.kØ÷æ?¶þQ‚¼6ò'ǯh"lƒIðB÷íVí}BS ЭSÏpxÛå˜&Üþ„U2ïι‹RÑæ+?fŒl;Ì/^UEX! :•ro&xxinWy¿¼¥¯¿¹g½æ•ÐßëRãͧ»>ˆþBZä{ž3:·ßÀÛ øÆBÏØFI£Ï[怀dSªŸô GÒÎ'nwçö(ƒUÉÉÆFOh5 Ÿ:ŽÁŒzˆ)\V@Kƒ¯'S V^b£,SËequÝ^®Å·><]-gµ°t,óÛТq¹»£â½Xh*£ox-ÊÓ¥ië¬øPNbŸ- wLmzýšXÝ!q óQÊXÉÑëÒoæÅàË–ùÌX•tÐ8m*ûàÌw™!Ï&Žó`ú§Öó24öµZRs-ÙÖð‚·Ë¶¬FÔèMÆ.™²rª Õà‘Bf—Ó;ÇèׯӔ±s’¬‘Geû|Oö•ÆhñCQÝÒ#ª›[ÊgÇô|¼%Oçé›*¹iVÛS vE>AímÂw‰ÌÛHlw¯¤ýHǾRG‚{ÊÀDº2® ʼnPŽ ‡Ðe¤AEäÀ™ŸvZ&A}–u&UÊ^ŒÄÓgzk£8ŽÜ‰ Fb1€ ½¬aÎüo0LÔD@‘~ZíÍ8ˆ z¯¨Ðœs•Y@ä‰öñùs  Ëþ’>þŸaëz¶sÚÎߟæ„VA> 30”Í÷WÙp”e㪿|º~ˆ{L yuÙ~MSA Y¯²‡Cî!‚Tº­sÒB7ÈUi¡‘6¨F‰Ú%q뽄€¾ã”Üåûy‚1Ò½u½1n§E¯Ium,%å|* 8½þ"[`ÿè.ÀЊ8Õ¢çÖ(#o37¼7tW–aµRÃH‚FçŠJ¯XÑÑÕ·‡d«ü,¦ù4›hSÁý³ô#KY&Õê¾ D€!Ò!¹hG©^äßÿ'/¢!ZLy™º¼$•‚ÏÍ>õÕîZ"– ™ŸS±Ò§nyÏ qºeJŒ""rtcp£N;*¤á¶Íä¿á½"¶ ®- UcÜqÕxQ]_­4ž.8!ª¼¬ƒ/xÞóîg µ2®øR¬{—h²Ú˜xÔ›Jˆ2CóHõïÌ” À¿¡É±Aí©ž®òVß+͉צ±ŠÓ/ÅÊ5ï¢ Ø*JX¸Ó2ñŠ¡†qùlÆS4&Ô‰gœKDŽà§í¹Y==«0µjØ®Ä/Z NM©aè./_z@ôI™QMc²Á2%¯öšu5CüÙ;˜uÀBŽº·æÛäÿp(<…QUsŠÞ·`ïÿô½q?d\@CwVã«|¬úÑisåêø|rUPL™Û¬iÕ¢NX‡=7•Œv¹s,6r¬•‹ö2­£ ˜Í ¥œ*ÁÅ¢÷@Í’Sgó†zÔú.V9£'³·¨–À®.sÕ%ØŽóèÔuW#ý‚f?­¸£‰},yËꈒ KÐ>¯”NÀÆ›¿Ñ‘¡‚wÎÅ»ÉÉÆA–Ö?ÃÔùÁÕ€Z7u³mhr1Zé,RYWrz€$¿4­Z /Ÿÿ Së]`“…ƒ–ð¥I,¾•ZÙ—€¼S–¶ÏÚŭ̪ºUjÚqO·–dO£1ùÛ_½—‹nñŠ(ŽÝçñ¤ùt íg;¯ÐŽ“«V×>ÑÏ *?kÆ7jñý¦ ø?j/z¤Ž;IÓ×Ñ;?¹9>Îféöoý„u›Ïå“lûh­õ½Ù“7¢¥o*,ìxÎõ,Š/¸'©Y†ŽÅµ+ÎÖ¯5È}2Ÿ,°Ñ":™ì™ðpIÔ4Û/Q,VËLÉ/îäý¨ø­L¤ ÕöŠün{¢¿§>Çâ×åqyG>yaŸÔc°b„‹å‡—*šÔš†è:½ØïA0~á-…ÞÔ¼?d?,_D "Ï©³0t²¶i=UÑ#p9Éã–àÚrƒNŸæ½Í8úᢥʌvWÛÜ–o›õÛ8ÅíðzCÓ.eÆkÖ¬=‰”j0ލ£‰ÉÃOZ}‚dÖܽÞuÉöî:lG†È)If¹ÛèøpŸU|Þ¡›Mî„øà*î£_ÒE¥*JÑå6¢ù?Ò¤«Ä»ßÇÂð§ÿ„>PþIˆ;ð6Di?ÐÁ%ÔßËŽ¶B+Í¿‘\Àùƒ"í‹üB׋j=Ü1þq|ñ]äUÔ_uàÆÃÊ·÷`NÃPU üÙ(H®,5ïÄ¥6pBÖ|;/=l2sZJT,äŽöW`ùå^ü3ó¶ë‡1çœÞyQ`ÿ²3ȞܓPúØ‘ûœ©†láÇ^PPVX_•羫]ìrô÷J5̦P¯ßú"5P¬Ê¸„÷ÓW;Ú2a˜`¥ÝÞ «µ?žP`ÔÕ¿|*¯àÓlS ßÚ¡…«gnµ~¦aE.hŸëÈuê0Þ¦ŸkÏ@%™£·¶X¿ß;ÀS£¡›ƒÌ:6nˆQ·pÐ÷C)ÓGð-5ž‰A×0ÜvSÔ(…,Fd ãÑ›cV# „ ž¨% iLQÄ@·Yª®ÑVƒÔ¿û½£<¾ZÆ› ÔÐúšè”夎$¥¡.¤{ìÑ‘wÕW ç˜:4iub¼2âsHòâCœ6Ö£çÏÔK®ò«Šh˜w4NÈjœÌ—‡.|I¶NêÈvò$œjžQXB"‘}™ïlÍçÓîvXl„IÑD Ctîå¹µ‹&ÿú}uhã)XÌÛásùä_¡T·¥¶–MCØÄš4FÜA)Û’`´Q«ºìæÀƒ‡äHÉþw\A©HþY“'}ý\äjè•éH|ÁGäqïÏ:Å'þíÖ  JâmO¦RTÊé┫ÕcAv¦×Jâ|pv”ðÕZ‡¬Ü©å¬úný‡EœF}¾D°9ÉР™òÒ¾^ P8r%”ësGØ%]]y"dT«TXÌgzÔ á* öEÞyÀ ÊÂîï–Í:óô„õ±°ŽzÈ]û5¬|ç ZÕ¬JÊ,S®ÀJ$¹¹J­#g0Ö:ò‚kŸmNѲF²ÈS剬цlÀª)`m#-,¯ ’£å}îo[î1pm–óð7#Ì>ZÛ$ω+O\(³áެÚ9‘¿¨Î¦j~æV’#ì[°6a®nñÕhì„gá7ÂP­:õù" ™ûºxa}68!Mв`Çfx'í“Δ€Œñ ¼œQ C£½ž6{óÊ ñ*(cmîškŠË&°YS !YÎNÅœ±ëÇÑeRt#’XƒááÍøÈ´ìã­ ¾<8è¼v‰Ëò³‹¥@2vÞÖ¡Þ:çIo“Ð!¿Ï»†9|ÈÎQÕë§°-.§V¾µÜHø¤ðØgzG ±pNµà#–¢'Ï7±D°r¸ôsX]œA†YêK .nñ³q(]?³kµiØ~WèzDeg‰x¡@à ɽœ.èfÞP ºMŽ~öA­¾ÄõÓîa«Žæ å„ÒÉ 0(I™vÖ(I¡èÃ6äª÷¶GÃÞ—Ôçk¸¢M(V8æ†çfž-‘çñ ¸æCòÅ9‚&#ÿpŽ2ÿ´KcE5ÜL ÔÍ2€Å¹Eˆ‡X¸SgØ…¢ ÷7­þ9‘߯Èòì=ɺ‡gRç{"¨æš°…øJˆ–VC…ŸYÐÖ Žã1b;c‹Œ 2Ý^ä½ýeÒ£ˆ¤’É{Î@èý™ÚÅ`Ä½ÔøŠNqº_ÛHÎ¥³û(\Úù©Ð0eö1:¯WŸOFC9µâwUP¿y2Ÿú’`ÔNŠ" êj¥¢Äjí›|¾L‡3“_O¤W?…$ˆ<²\KO•*¢Sà Xð‰oÃ’&n­k¥¤”]ÎUcD7Ÿ÷AõØ[ž‚‚ë ÞlÂë‰PKI¤$1 <ÙÞ~WJ7uhǶèõ-þ’ù†Ïç}­ž›Q8VŽóû.³FÑ·¬Édû÷åW¹ Îü.œœrÌÑôÍf·½tÛŒKkÆ‚Âz/ÙîÝyâóVºàþ†7·……ÕRë'÷9ÔDZʼꮅX¿Á$ îË&„n‰× Â{c¨0 `8B*´"L4Ý¢ÆÁ€¦£Ô==‚T?«ì­2&ò7’ —°ÏÂH†tôq^ }ýw †åHT#÷+§Ê‰ q™d‰;½ÈÈyö6U,žœê^H'&á4q>wËázfºNñ®YIc€wÀÇH­žÞ‹ìá4=t çzÛCËA1þøE¯ë6ÓÒ’ú¬¡¾×êÁAÍe›kœD—÷‹A¹YŽ.c¦v´Ìjêly§®ízH/‹BÒš…â8oÉu%¢!óêÈz‡0Á€¦Å±¨¤p“c ±Lè½±Ù´®Æ¶ú…XUy{§¯µÍ;Κl˜ ^}X¢?¤~ŠM 5ˆÒ ¥Âí4ûÕ«þFÅ+§©/¬2LçÄ ˜bhIUc,(5YŽiZq5MO3½Ÿ»ÛOþŒça['%Ý.²Üp³ÝÒ ÷áŸ`‡&%!8››.b“Ö ñ¤ï¡yr*=ºÆh[OòÅòS1+n×*k†ž˜à²‚´›O@ŽtøÊ+^ÂaþüÔ'¥r«#ÈuÌ?¦ˆÅŒì¨ÂWÈ¥Ô§æ>üÂØ$µg:›—ÌϬUâëŸì æLL·cÕÈ™;:)í§YO”"/2W,UØ©£4ÕŽê½3ʼn˜40lëjgf~kAò•™š¨šÄoVƒæa²æu«zÝí9Ñ£ökøÕná=û“5Ñl"(kºJîÜçP–Î*¹…‚:0ˆ‰ZÃ5ÅܧáGí>ÉyáK p³~ö@Ó€‘»¶a¼?0TB&£4àdé "AX½„êîõ’¯”L8<Ö –­TÐOøÛ‡9²³*lwƒ]¸äвrÈžœëw8t[•o¢"Þ#[A?¾Ò4Ç5°xŸÿ<Ÿ@ ¯C¬¾ê ˆK弨0hõø¨ˆhh'Ãùî§sYn—R¶´#0ä·wzXÁˆâšC4 Á¾U@Ú«e(å+U›ª3Ñœ™7—±H䟣N”62€N(Hï°™¦3V+¾yÚ彋žÍöÞµ +ѡͨé92…·^i û]%-¬j6p½šRtvü…¡ÃïѨx™@zAùx Ó¼Ó\7rÍ™2t_+¶G–Ÿ¤§òO‰+O̾yf5I³U¢ÕGj81éÞjÂ/5¿¹ƒ-ê=zs†Oß,„­‹ÚÕ ï{· jVœ¤l,­Š„ÿGM ²ó˜“~×÷._f› Z~Zø+ª €´<ÍëF€ â1± :ê~3Š–f¹•>W{æ/ÿéSL¸9†<²¦û*«hçl_ñ š7À#êãm…&ZÅ0¼•×ö¸·¥pŸ–‚?ÖÎõ|äí /jXN*8pš ¸ÞËRôRƒ«"© Žúùå.‚P™¾>ß\\”ˆQ¸›‹¨Ëná·FæÀÇQÞi%–œàŽrð5yدt¶¡©Ò.Þš¨°:r„BaK ´RtÑ%1~¸7- …Hkñ‡xέ6w¹P<22JH"‰1³YÑÁõ5t„L[Ü42C{}•>úôBò¯"†¾öiYÒê{ÃwLYÒΘ™Y€¾“Â9j&’ÚPJ„ƒ1»t^ÙërmÍUêÀ„ݧ“èÚO~1Y¼S Pº´G¸÷ú,éb¦ )D³lŽ>ôÖfr÷Û2žõÑrIHÍškéÿ´¯€ÝßjÆã´ŒSB]Á¨X®ÛìIeÐ=‘¹u ª8[ö'Ç·äíèRî[`®hI Ä m1q¯Ls’G‡“ÔŸ÷úļÅÿÃðã£Å&Y|¤uoÃ^“Dn?¯PzÁ£Ö†Æ¾EóƒÚZãò×à«ÀY¡8 uPúÄ$RÃ6 ˜yª[BnïWœÔëûÏ/tæuñM 3Š•òæÆ–õ2óÇó¨Qx@¯ªÚ¹C»¤QòÁRˆ{µðoi=)InO$‡ý¼Ì.™L ¸*6~‹‹žŒ¥`t«Îz4ù¯‘ÀÜ鳩ω©ÒÚ>€ñšÁʘÜò7¶•0ð]Päbf÷ƒêô³Cì¬w¯LUbšÑ·èŒéh³’ùžŽOþ­+Æ(/¨]šƒ~Àý²Oþ;:– `á;g,e­…–V^}ûˆ+¹²—ü|¥1] >~z7“­Aœ%M³ê.…"û1®L¤ˆVnQØh’Õ…éx£:‚¶9®ÌÎæÐÛÇ7„•ø×°-ËËT‹’[êóð¼e­"2¬éä´‰¯ã’áTL=¹“§PÅmÈ‹¾†â‹}ÑÐÀ6ð<2ânkê*JG“±R6‘ñ¤R/ï‰3G4ɨ¾CWÃԼ˗èt_ŸÉ$5­›­*WL¼Ë:ïSRl–y˜óAm×”p¾øv«!¥Ý¡©Gu Üo—™üûÎ',9äg5¸9_ˆ´ ÷þ@aÆŽm4)f[5¦Yµ¥ ‹u?lR:´œœ seM¿ä“wCfàðÆŒGPw|­ÓÌá‡ÐŠ~šøV®wEìròÁU•2‚ 31°‰ŠÛ²^(áDÓ†­¾¾¹ÛðyöS £¢8sþõwf€“è Sn‡ÌTf1TɊ˹Ú`è¡×#à™éÉT3R+wòß ]7­`¦h²–…–2¾%Fl—ôE–45z»ZZ6¦,G3wI÷ìéÀ××€'|¶gIUiÞ{ª¯Ú*µV˜É3¿Å|»¼¬&’ùÚÔZ;Ø€ô©¸M “þÅ"5ÙJÁQbÑ/à ? 6Q<²àéGì m¸V¤Ä-ÔO=9?ÆÒkÛŒÞ6HxOžr4Dë•¢ÍÚ3€mKÏŽÄgw…êØà&íwE9±*Ïçó½zßS$îBñ)T%xþÂm½†4vWâÍfTAF{bü"µ¼ýK§GtgíIMßiµ+Y©Ð“>±+B€Â‘;ú³êƒ¶é]˜LÇGŸªq®m­êË톾`}Á4Y÷Xú…!úp }´?<‚|6ŠÒÒ¯ß3ËÖŽ`^·„áúâÄ[%ñ'—iÌò\Ëé°ðb¾\ xÔT°¤~pµ¼¢iÇjA÷ñw(¿âg±ïœ.ÁÏÏîá`­ÒX÷wÃ Ì PE'?´T3õ œ.¡¸?î¦Ø¦±¤YnÝrȶ]¾ïÍ <>¶ØÝL<ò)úåÿǺcj}3¾"™¤[È=¥äç7n-ïEÿˆ—>(²•k+‘Z/‚¼wÛôÕQ8‘ ³çNÈ_åpË{çÚ.[ä›}JÃX(à“ÎgGfáZYrÈ_BBZÞ @,ûò’2"ã¦Æ<ùu]±¤˜˜r8;4à ‹é!Óð °|×bgó³,WŒ^§¿`btÔ¼y"òBϵ}XòÖÓ{Œzèû˜¬ñib<= ³3À§*¿ð+ýWÇžõ…@8`4±ÜêÛ)øN”ík…ÛuA“¯ãÁSµx†tE<Ù[ô¡wóïF²kM•å¹u5AÓô1&©èÆŠ >‹‰H‰Ia÷÷¥ÉàÊp<ù´Ê6»3›ÆCzªå¹m[ßxw‹¯+ÌÞ‘5%«}4_'_²+ž´ôbáÒ4#½c¿Œ¤í#ûB 5ÃèÕ¾!*!@±û$X+N`‰WÖX¢øšÓë Üu—íÀ®ÇÏ Œc˜¦;qxiXžCÚæÛîVò¼ív ¢O{F‘´+ë=g]/ û9ø¿pö7©«5ˆ¡‘ÅŽÿ.ÊüÕ¿PN–ÙD”jÓ\#·lƒ`¥d8Owâ òðûî]œ×.þƒ |Ãnѳڄmiª…9²žx9³ûûR¬²©f[A !Õ`ÏK.5VÉ^DG`À¬­ëÌ2 S­(4ÌïÒÄnBö.äiÏG)þy{¹8ÐMþcª{QK)3"'t žï ‹Ëdø@<žLM9Õá¦K=:afî†BK¤ÓZ‡.¾‚æ±%0áe%žø“ƒÀjnþªÀÍåƒòíâ]U”OÊI·ð1Þ+üîkvÝ? Å]¥,3ð{~AšO-öåç¯xÇGåkU¦¶1ò:Ær£úÆÒˆV«ûu{riNœ…^›Â?¿@‘~u‹¤…­à×O¼þÇSbL¼þ»NTo£™d©í‘A©¬«²U†“ò¶g§tbí`´d2äÌ[dÐy›8'›ùBy=ïe !;ÅvJ𵥆o6ÓV¥Çä²^IÝ¡ÆÈA»Æ`»2׫¬x\,>fpí^ʼn|wç~w*“±R;îo’»â*•÷{Ó0áÒzu/*¡I ïq€Í]s=‹+r}?->®‡GÊÄò'‹ )¢wp Ÿ•dîI˜°ùjÀr<Ô.\+¡‰¿ïø(í°‘Ò*Z˜ƒ˜+69W]k{ìÿ›ÔÁxÓÒ îìYIÂöPÄRÕÜœ€î µe~¢}Ú€H·¡ÏüÕª˜•&”ûÄü¼àO“¹£! [ß*Èþ?‡£ endstream endobj 304 0 obj << /Length1 1630 /Length2 3806 /Length3 0 /Length 4618 /Filter /FlateDecode >> stream xÚ­Tw<Õ}û7+DTV_{Ï2Ù‘½2g|‡ãae!+3²BDö,#B u*+Ùʸ‡žû¾ŸW¿ç¯ç¹ÿ8çõý\ïëz_ã}}>"Ö2Úp 4À ñ2 ²òê€Ò JÀ™bÐ&2V ‚`E!  Ä("¢‹!x$­ÁƒêÀeè0@QPPSSct1ÞþX$ˆÛZ]–’’þÛ²ï@ýÿD(‘8$ ˆR>|@ÆÛ Dã)ÿu 5xwpC¢@@×ÜÂÁÈÌ74³ A4ˆ…  ¥`‚„h(¸a°ê×€aÐpä~k8Y —6€8o†¤„~0Ð{’¼A¬‡£|H€ÀBÐxÊ ð‰†¡ðý(v7ÌAAÞX ÅË‚QÈ,08<†EzãJV =ƒ_uâÝ!øýÜ8$0nO8FØoé£ÐPP<‰ÆxпŸ p$Îñ§ä¦yc‘epH4âï ¤,ˆ€`á(‡£ÐP¸÷§ówŸÀ¿uñöFùDc¼þª‰Ç(7YFEJNž’D3Êí/‹Ú (Èÿ²Ã Þb> ö`@âû;#A)Ç Qþtc”3Ãà))ñÿNeÙNä@âDàDÞÿMÜß5ú·Kü¿Þçß© (”Ä‹²¿€òÊ``ÿAA°Àþ[sþ¿0ˆåÿw¼ þ*ö_|¿ÃFxe(ÚhEEYù_f$ÎéÂ-x˜;àAQfv`·EÃA, ‰)ÚŒ•$/ÿf㎄y¢÷EPúhøïåSä:(^ÎPWÇÐÈNê?½°ž”MÀÛø{ƒÀ¿Ò\6ÅÀÿ:ìóèè`ü€@e@FñŒ  ¢rPUPúhþ>›BðX¤à$/+/¯Pþÿüý}rþF ÃÀ÷7ÇAÃ)Ëö—a†°XŠÆ÷ŸÒôŸçƒµA?Æ8:‚ ÷H»—ޝàÌîèÑsjiR íˆð.¬²yüÓx#-rJ­Äu§¢nê>Âáaœ¼æk5æå]RqÏ4?kZS{Ý™SúË!Ù±ö#g¹_eÓ~þ¼ãVF^ö$/÷Þhšè¸-:Íp_‚iEàÔûI6¥¦oº¨—ÝGF–g ÝŒß×IyM˜¶²DÑH¥¯ \t £F{f.ÜéÒ‰Uexø4*ôø\þ¬ Q.ãi‘³)=Ä:•œ¥Q6ÉÓn¢ÿ\îÕ›» ÆÝKYyRhÙ;¹8Î ºã.ÅT4|Ö>¿] ‘.çxšË;W¢à|ÆéÔEþcg],Þ'/iKÀ¨…Fsr³ÿ±fã|’6I4rJ.pqö³Z߬DïÝ"° ö{‰|Öd7v°©ó ¯uHѹõô0#©ÿµ÷¹Žè˜pØ.Âøªåe«Zx óV ™£½ëû¸„ðMâ,Ýœ•¾ìO–¨b¦êüZ’Òg.h€ÛBh‘óë$—©HQÀ :Ú·ì%M5iGË´V„ÚÏ(ùãwbììxPß§£º‘=pªs'~çóz#SC’Wé ‡­óÎkÇÞ¿6;›n8¯š}öÆX~=kÐ{72²µ¾lWÖΤ"¼øH‡=Ë'”çQKûî”)¨¡q—.&w T†¿tðCÊ'ÕúðÊå w¿¶Å<å*-z~b]u’¶å…Ÿ¤àµX³EóøŒ æáÛaJ£€d¾Ä¸av¨ÔÊTõk-Y¼Y1Uñr«ŒËê’ËØ×³Š¬] Ãsb´… – é©´ J²æŒ*‘vŽî¦8®¶\yœ!@îf“Á°l'÷mqBº³º$¤Çje—<ÒàÛô ~Œ6|-6Nõ]]¢V Üe?}!tzš—ajDVŽl™!d©¤Í ÷<}7œ_võ…O›§kÂì-§kÍs–™T^aµ4G›t^§ùº Ј«Ñ„¯v(Í˜Ò Ï³¯E‹Ôùå9…3×ÃÉmd¦N3=xOU¤ÙTÁñÛ3ïD)´Àj˜$±Ý]GD« Æ+œëä³ï>ûÆ$‡íOoÝå–%Ÿõ סMS*Éi£Fý ½•w I⯨®X¨ÒâÍœ=§ÒæÞl 9ÏH7ÚsB–¶Õeˆ¥‡h‹!¹?X]Þ:n+£ß™èðÒ¼-!RH2ï{š‘H— å¨~ðª©Gåã©¶ÀŒŠI2~©@°B9:®é¥Ð}«ÄáPB• Óo>o“4†ï×r¦³X! [r—oÙk”©Økž?22]‚E;W-µ¬ôÀÐ_Ǫd.7sêʶ„ôÃL¶Òn";,ˆäÅÅO؃«±DŸ6ò ¥X¦™ïžµÖ;ZùþÛæ92G[+Õ$?7Ê•ô{=õ8ü48ñþÕByãÒ.ÿÝYÝç1@ŽìœG?—èl•ï=Œèk”¬yv¨à §ˆ—íÖnÇÇ3Àc~|²Mè'ÅÑ5Q!—¡ÔÙ6ë„£võœÒ'Ð]ê;;©ã]Á·“xžJ¤ÎÜs' rpiç[ÃÉ8ÅSDZÖ^ÜIJ°'ë±OÖ¶›4EÏŽWÙÒ›oøf»Lf†ñÆÕnþÈkcü%U°îÝÌ<ÌѪtsêË»†3ÊïÀÜÞ8ÏÞÔ%®_‹ËŽf²ºÈóó»×I)%MP•{±cÛ×’†´6©i¾’¦™7sÞ*æ¿“:ÐÓæ•"ý¨8§]S‰±¾÷lSÓÊ+TsTJA³üÓòÜnCv>gË;ÛfݶMÓ$“‹+ $IÊýÁf¡ã:ʬ,¦l£0yÂú"DñöU܃Êà¢Ç§çR¹M¯ÈÚæpÌ%&Œ*Zˆª= —Âk ÔÑAU4³¥òã [˜Ë&òŠØræÑ^âþö!²îj%ãGÓ7!+6³gbkƒkå|4鲬5,íètr ¯ßp ì¤3jɤö»â„ˆ8~vø­4Ó»Ôiõý¹l#ìÁú?ÈöÜH½C½•_9îÃI*9«J¹ã¹½bŒTgÂaD¥GCŒ.Áù‰þí?Kµ‹{yWÿAW/ŠwÓ0ÓyÅóB‚ '(Ͻ»ì´›nxkWŽØ0`ÃÙÀ¤Â……÷UZº´z·ì|ÐTËŠ ŠMŽg¸À{áÓÈÇè{‘ᩆ1ö/¢šÎtñ¤%A+OñÿhJßöpŒzâ¤Ë—5¦8—›){êvg³u²…p•Upó{æ•£4RWîObYOÞi¯m£¡¥^4é±#.N¾ÍI5§+}Ñ=vLYÞ5ç솰Ð:IÕe!ZX¤a\åµQ¨¢úá)1qS³‹?¥ M%%|A”[úÓ$bf{RîI¸Œ1Í&â ýçü8§î í뼓.Ä'áú(ø:z"qàì»Í³z9СéÃúà¤ÝÃä†hÍV®çW|g w¼OHÂrE—t Ïo™È*.ŽúuBxгܭ†*zʰë„B´O„Çf[7ƒ©NˆpGJá„c¶§¦ÖyŒ*]§<|NÁ9±—G*ëuû àÍ]ßDÿu–3"=è§ìܽë_176Ôbm­ûUg[³`.ZcH\¼×'æ-Ì~õãC¢.Çö¡q/±ò»®„{~€gÍ”ï[Ú·K㜎’c«Jˆúm¶å‘7œCÈ5CO’§ADulêJ>ý‰z1IÄ"Í»7›H­—ˆ LÙžŒE¾y4èîåŒ7·}˜Ï'ÎÃùnÖ媵³5.¦q´•ªÛ‚ªºøLo6G.ÏÌw’æl¦üI¶Ñ…®¶ÙÞ÷5|óÄÛF5û4ýíÛîWÒnÇg“Y ±¾u5—ËI{HÿMIñÈÍM+vŸZU„Å'«¾¶îíÂv\qÂg‚¶-g—â‘ðÃ|ÏT¹…dš,1§æpþ jÑ—b“Àj­”Wê£ .A‡–ôŽU0ÅÞß;;;´ý>äñÊ@!NÎ_™‚ªyÙ—=«CÚï<"KÓé¥)èöY³¦3NU\ g€†'…MÊDáœ]3+6®ÙŦÞyÚWä\ôxu˜úf?›Ð.òÓk=“£Aàr«5ã’ñÒbrˆ`ÈfÒëºW¥ÑÕnvmŠÀüÖ§§BP.̆wÈ9Ç;ÌÁÜâ¾Æ†îçŽZæÌ ^¼n¯ÄÒcyšÆðUOŠ•Ú3ÿ>»`ÂÈÈÖýEqPë ø,ÈüêõænÊN¾åÎlêKû%`àM—XmÄ{h©Ù “îg‹ z)ªì+9z,ëÍþtôÇg±‡L\|æŒv¹·]dÌ[ªÕRNjKôšØõÞyªZR¾×Àîr¾Îâ¢üQO0U#ée®I¹+ÐønU[e/©?ìÛ³-#á«çµX=V´}Þ¼dU—ô’Б*Ï˘…øÄÀÑV‹£ù!è?XV;ÖƒGa#dF@8–÷ ^EÚä¢4“vŽöF&?¿˜6µ;[¶ ±„àoh¾ £†K7ÐÉg¸~¸ÝÃ^’ÄnßËÄâ[†«=4ˉ9<½³ÕÚ Ša7ǼN]L®M¡’ƒ˜o:¿Oj>;ñáø·tóë°·¶93ìüɇFÜÂGjÕTSŒ-3bäo$ªw½tÞð÷ï—x?ʺyw‡ûN3JJî#Ú`wó4æn]NÊga dê°žú^÷©íûš×FËø÷W&2Ð'Þ:#)2ë\ÞR9 èŽ!å$âó©m,¾`©?OÑÇ.˜¾¥-?_xÍ©cº½Û¾ÐèbpÜÃ=¶ Ö¬R†1Ÿ^Ú'Xx,ìË•8ÖŠwId^DsXÿA•Ý endstream endobj 306 0 obj << /Length1 1626 /Length2 15365 /Length3 0 /Length 16206 /Filter /FlateDecode >> stream xÚ­·ctgo³&³c§ƒ_lÛv:¶mÛfǶmÛ¶Ž;¶ÉÿyfΙuÞy¿Ìœ{­}¯ª«îZ{“È)ÒÙ‹ÚÚ8Ñ0ÐÒsdÌ­ œl­el9¤i~™¾å,0$$BÆúNæ¶6ÂúNÆœUc#€°±!€‘ÀÀÁÁC²µsw075s++¨RPQQÿ§ä€ûÿÒ|{:š›ÚH¿_\Œ­lí¬mœ¾Cü_;*œÌŒ&æVÆ!Y9u 1¹˜Œ2@ÌØÆØAß çl`en674¶q4¦˜Ø:¬þ}ÚÚ™ÿSš#íw,G€>ÀÑÎØÐüÛÍØÍÐØî5ÀÎØÁÚÜÑñû`î0uзqúî“-ÀÜÆÐÊÙèßrÛ²s°ý¶°þÖ}“³utr4t0·s|g•ý7N'3}§r;š«¶&ß–F¶†Îÿ”ô/Ýw˜o­“¾¹#ÀÉØÍéŸ\Æ#sG;+}÷ïÜßÁìÌÿÃÙÑÜÆô?PŒMõŒ¬Œ¿Ã|Çþ§;ÿY'à«^ßÎÎÊý_Þ¶ÿ²ú æNŽÆV&´0 Œß9 ¾s›šÛÀÐý3+6&¶úËœíþ—ÎÅØá_ "ÿgf(¾AèÙÚX¹ŒŒM`èdl¾SÈÿïX¦ýï#ù¿âÿ‚ÿ[èý#÷¿rô¿]âÿ×ûü_C‹:[YÉè[À¿w à{ÉèÛ¾÷ @ðÏ¢q¶þÿ¸è[›[¹ÿÿ9ýWkU㣴µ2ú¯: 'ýï–ؘ~ÓBOKÿo¡¹£¨¹›±‘œ¹“¡ÀDßê»_ÿ’+Û;X™Ûóú¯–hèéÿ‹NÉÌÜÐÒæXþ­2¶1ú¯ð¿©úx:uy q)qªÿÃrý—¡Ü÷8)¹Û}cûŸ¥ü²5úÃ?amÝž4 ¬ì&f†ï»÷ ˆƒ•Þûÿò_þóüKßÉÁÜ  ù]7=ÿªÿŸÏž´ÿKC[£ÆFÑI߯è{ÒþCðÚÐÙÁá›à]þïªÿ×ù_3olìfl³¶lkÈd‘š‘æT‹‘3<)¬ÙßË:lWÒ T˜ïWmÛã›¶ÃQ¡÷^LÛ8ÍùÙæ¾tj÷±/Iy0Ú‹nEÖ“l|™‡ãMDÑ—´IÚÁFu@§S—v¦éyµ(½ ¦ÁJ¯r°;)¯ Sü;ÝÁäuõDáGä’ï‡Jühïc˜RƒÖ‰Ø„\[pzFšpüôH6862<ÔsÞ·ÿ“*;š„KÃ'é” ÑÉ]Ïá¾ÁðüÕ…ÍHyÌÙNCrMˆ6Ψ©=ý—IÕ&¥oÝU•íîRMõãõ¯$•íHAëÇbayçšãù:1{°–ÁÁ%\ †Øt‚2ðWåØÞ§¨&'°Ð±ÃG˜Y6zºZpI¦ÊÚVòpÓ^”ð |°R)7æØ1F–¤™Bÿ:™w^ƒôƒã®û¾`NÁŽ 0õtÕkÿQˆõ"µrn¨ü(‘ÆŽgÌ)2ßÐÔlNé\Žuòë­Qƒ‘TÐ\dþ{®¸xŠ1µèªNŒÑ¢G‚÷­NšêÙãu hwŒióõeÔ´ƒ­dµ{ÓJšÍ/žŸ_+X´/À8‹EsÒTøŸ¢BÆŒºôo"<¸å¶pòv”¦XšìPÈ :öR-³M}›èÙÀ»æ¤#)©¹)©'x‹´}hbõ”No¿˜eÍ—‘“rþ(¸û;ódtá ÉþvúYb?;¿Õ(ë…›ùûüÐ’¶“‹¿Õ‹Õ—Ÿä¾±ÒÌϥ˪'3\é‚GmnZ=ŽŠ^ßÓ\œIçZg36ÕjökN[ܽe°6+ÖbáQÔH›+жBEBWOkÞ^9éâõ±/ð-{>¤Sl–ãi‡Éè~›žIÞµE›ã·íG íOèû¸&¯ÌØšm61X¿‰ :áÂ!¾úŒ“›3Ê`ÝO“žQ:»”Êqëôâû†ù¦›ÍKFEì§ñvRÛ7fÃ*¯Ÿ Aëz ˆ®T®ª¹ý³hínqÙ«Áú±z¸É¥L®ñ?yø(kžÖ±‰ù[{×éN³íJ|» „8Üu™¡üv S€mm63ÔÅ˃5™>4_ëA—>¾þöcöè oyÇÑèÝMsk«¤Ðƒ~¥˜9IN—ØÂ–ñöB®ú]»wGœ ?„–¬áÈí×5uÔ¸‰MµEþâ$25m¦B£î3kh‹:\Âg;úí1öorÿ’µ»0œ 5Ä\ó›»þý…é‹dé(¥Ðð¬¿äü¹ºÂJøûÝ.3¢LШ½.²ö×8T‡Ü žf^ êpT'Ö::ÚcÈ„û¦»E3GV¦6©¼}.E#ªß‚šùMïãϼ„›|m嵿ñ¾-Ûú±E* –º…žxÑï75WhH>7EOǾ³Û]¸Å¸—?yEEƒž%­¼½U›©êœ‘¢Dcóãz·MjcL\ï&kEsäM/vIS~%K ê`nG^Je«Oä™_öWŽ+=QE²}#×2¸ÖôKѦtÒ‘4cV8 p²3ÿôM¼Ítqæ1Él(².µ¼Ùx¶ØŒ_‘ˆ¾Ü…°çŠÐ~TÊI}\Å3môã\Ü”W*í"hÂl÷¢ðÚó¢}}ÄU$î¬Í’»’…{1º>ƒ‡¼0‡·ž峸ŸùúŒäƒ™/¡QßìÙóuy:·Ì\•±š((M¿Sòež‘‚ןy8¹¬2Ì÷²óqp±@< Rc‰…ÍÃØTüÖ¿ži®I"!Kbõ羯ö.ïʧÿ¨dØFLo1üɈ¬FŽ[¾Nˆó ´=o4*r …h ¡õvž–*î='´p£cb|g®ßSQp™Ê ú·aWoäa2iÕ•*ùÃKÝ!Tøšo%µ}˳0{ÈWƧ\$§3¢*ƒÕç“,´£WÄ…x #â=ÝKÂfÛhϨYòWGV]TY‘2ȃŽôŒÓ…¦|õtÐÐŽ”¥N۞ܓ"R÷@AÜp#ñÍB’)liEÔ>|ÜÜDõ¦ò[ñÖ†±q•ɺ:šÃ}ù²>m˨#™)*±¿,Õ ¯pßb¨nX6!¨V‘Ño¤A&œì9ž%¼ú±M´ß¾ïÇ-ØNšR­/Á¹[}Iéôn@*u¹¹m·r3×¹„9¦)S¯’t1~ùµ¥$Ê3‡×AóììÜŸ× ‡„+É"@FJ~FÒ¾ ÄÉrÅÆ–lÛN;Ž4™»UÉŸ ‰ˆ~(™ÑMÛD% ¤ºC,'£)õ|#õë_¬S®L! Î}ûž2s-´.wÎ9cEM(z:îV:qT]„aSŽDï™\ž¹º¯n^øpƒµ.ºƒb–s^ØéƒëuÉ#Ž›fôý4ëBƨ-×Ðqÿ0èÐÇC(±ÅtÊÂèO|ðM\ØŒ©Àò<\ê~\B6\IiKT5 ¹°Ÿ´k!å ’IY!„†‹•rÜ}*oüÃ[ü³(|ÙâmñÍvÁd¿± ê|rèO¨€)'©àGÔýŽÂ©J“ÈÍ_´d6b„ßqg“e?Ô\ò$ùXÞâç"§–ý½0Êd)v÷ûô®[Švª˜o *åº'VFÎ~’ŠbR]ô.Á>w±n•z!0òlÀÞž`ù (¥ª; ÆÀ©,f‹nWmüæ:{ðK_½P¤ bË^‰SÉ)è+¾µPºšëÃÿd}e®!’ú²0“JIaéÎS,G:ø«ž.…iªoâQ®ñ~­oÆ™\M­ŒkOJË?Ù›ˆéCÙ+¢¢e Òh”ñ•ÏBz#)p}ù­'•ù·sV>’(…-…p”¦{f– YVÎÀÆO²GîaÛÓ9ƒmÌ‚‚¿)Ë›¤ºUê!8} ‰ýwìc3Hí¥¯CGé&ã9I+¬æøFÙ¼wæC &6¬í2õ7>…AĤ| ™øà_1 ó[wžm­L²r¼ÃIš'Q |aç×Uk¼>R׺U‹T±Ÿ‡p"ÑÃ%6m.0s«ªéüÁ~+E=£áS…§D‡f’N0ÙÏÓµ ¶Œ˜9,GþsàV‡J—rjzæH|¯¼b66æÏŸ°ð`cŸ2—_t5žëÜa¬ùD÷Ñ‘óU –°F‰aí„LÊìÜ lp¼Ä±b…ë6Zú‡â„#ˆ½MYˆ¾_Uøqÿ15 pµÈqSm׫½00yÌ@Ή¦ ¢L ¡'õë±²ôzÜȇÏTbD'.“&ïâÃåÅ8Øúå>µ Õ†HÔiiEZû,ü¹½qòÍáqŒ9ÖT–ÙÎýáãÖÍaÒ÷ƒšneérܰ{ºQh P6É3ÿ«xû´U$YÞß­•pÛÌÆµ"c ލbŽLrÌ…9ë–Ý ÌGn¥ 6P”»_n"P€£ kSÅè ëffÊDå’~ã^jkœlÍóÌH¦ 7ñ–ù,ôV»‹"]ÍôîçÿI[]n',iPZ¯h»Htת?X/jÑš¬§úê)øÃÔ4U”.È âh¤_îs:Û­Þ½¥ x'iÇšË$Úì"Õ+%(qÍRÇf‚;¶ìQX¦µ ÜOúWìÊ×ÔKÜT<̳¤=ß‹®H‰ˆ ºýp]\ëÂDŸ Ћ_3É*á™ò x¼[A£H“‡±R—KgþC‚Àˆ}ôn:wz¨¹Í.ËIH›§‡ÿM¢.ÁH>Óƒ`É}L§ôŠM[ÐU%L»íA»Pëy ìr‹ÒˆœÀÐJA_W^Ç]lKÆÉ&Øí«Ìß`“{9ˆ;ø½ëàZËOÎ’\%:8_³ŸwÐáããŠzþŽ'Ú WhÉ!ŒŽ€ç¢™ÆMÅø2È7|}²²b̰½ËóÆáöâuçS§ÓF¬µ”ÃP­+gR7a>„5LÓ.º_RÊÚªýîÁlçAغ³Œ\vÒœšy¶(¾~ȯjœ2¯Ô¤j%KZ²)œé’ì¸`èÔâW$âô}8/4ÝLêûX˜Æx™ÜJÆHl!+böúþ ±õ^ýýÄ68»1œ•p>esÉ·Ú3»™CFŒwç·e‹ù ¿‹ô]! ÞfYµIƒ3!Y³~6p˜¨Ç_§è`WL§ÊMèölŸ$,"~Jâ©CW¥qÈìý¡ßºË" /b|ˆjNê¿.å•5³þ¨Ä¥È^¤e§Þ$‘L&õUÿl‰%éRŠ‹ÜİFp¤½; "2_o#éû[ç‘à$K´ÝØXGa•¦2PfpÀ¸ ‹øP×PƒÄ=QvŒšVVlã,ó°i~]¡u17N«ÌqÑÔÖW\Ž›(Ï'±0·‰3`C¦œ¹“ʉ"Ñ8\á}!-pwI1·O±1"é Vf#.«W¢‹ÓaS>/žFG–ßlÄLy"gà‘ʯñçy%2ëQÚ䂯è8˜e™˜ï÷RO#"]YOXØëÄÕÇ4lhŸëÐÈ[ÉÍ'wbùdXý$ƒØ}úü´lUÎ/ŠåÔ,Dˆ>§‚ª¿š;‰6â¶t.ú:{Ë0[ÎÔÁ꡾O‡4“(OÌJçݹ€aÑÖ¸¨ ¤è'ò»mÛUQMˆÿ2»Ë*úâÔv)Õ^¨ñ=ŽQQŸu}è3Ñ4·sV5ËcMzÀó˜ÿ¶ƒ É„¨ÆØ—åtÌP]bïWE‹½_Ì„3®¼Ã„W`5ÚŠšgÕêi€Îeí¹GvŠÓ«®:êÌcžÆÏ̸РÿÛïÏXf¬è܈tqÀ¾¦Àh*´ØÕ Ç\÷XñÛP[FÝm#ðï€üd¯eØ~úÈä†+Õ˪cf“ÍVŸKü@{‹MOU¼{J©ö—2ŸMþ–Ç—9¸É—ÖN´¯4efC)…ëÖVÞ+­qùz#ÖÚŽT:çÊ;èçj- ¥Ùº]?Â[)É#¤]ƒXžI†ò^A͆0gÉÃÀ>´³Å ý­3Gscz @Hõ¾ºžÕU–Ó2fMÓh¤“–¾ÃZSMopBþi”yOâr‹J4“>n\<¦MXºoÞò“^àB¦ýî4;óÿIžº^äÏ´i—ÒßZgvEj‰{=e¢ C\Ö;·&·eԃŴkh˜´/)Z‡îJÿ€Ìßâ—'8€Ïîæ®/'¿í§Ÿƒ¦eRî÷Ay»¦ÉIeŠ—í è<‹]ú£‡Òì®ÇˆªÛ´‡lÛECæÂ>Dº¼ÆrZÚèáɷ¡éZ×°7Ý9þîàØ#^©eï/_ìAæU'Üø‰ô­Ü­™y'ýÜ"C}RÅCTÕ [ñ0z§S:×BØÇËÓÉ”Ÿ£áYó5¼DíZ…Û°n‡7Ò5Þ]–=–ÁùáM s¬w–.5©ú+íîáƒÓ7t™i78ªÓø…`šÚàÇĺìdÛĺ»¯ÐD§“Sæ%ì3IÓÔ'Ž%ì6Òƒ"pö5‹zq™<üÕCqª5G‹ÈLyÈüù1QŸ&I˜­þðó§1lQfýô UŸØ#ÂVb]D*ï÷¿lê ”µ¹Ìè³ÛÊ8.nA­]vè­|iÞŸyê…pMd|­ªzÞXGØSôälí1ѰO^]èy¸Þâ÷ŸöÅ!™‚ï÷‚­´Ï˜<»jëa®„,+þ`Ü`Œ©Y½Öç\h?”YXkò*”!ùŸˆQ`eŽ@Ä^¹LΑu·è¬)àk`†&çÙaÆmÌ#½ ‚´-Z’u=¼KþUåfön&sè,sŸ>|JriÂT«/K*Št\&ö³o I‘!ÞòŸ²DxİBÙQ”bÓÚâ.Þ´ÿ5P‰ëÏ”b 4Ö–’“ÊÑŒ%ß"eŽHžì¾yvü#*_½QNðͦ77íPŒ}y¼¡sÙÜÕŽy§óZ™ÈŽØÁ"…@©ÚäÄ+N'i'~“)MöIß=þt¡?=6‹Û2üõHÓ;0Q–û8XD›B]A•ÁÐ1æõñM:| ÁÎ6J&u³*¾œÍZl5m pù'ÄÄèé¯v‘ש¼l„S®8ýƒÔ×èð¿„;AÅO6¡¹I:pÑñˆð|’ýÛ´­âzÚŠŒý&ž úÑ|«o˜´¯&%:Àß_Ú½¾/š/„™HsI$’LÒžûC/åÅ)¹ ÍR’ ÔÅ—³RÍžT-Ýð‡@Óí,çÈ"µ8Ú‰9ðMH@fuf=ºG”hJ³óè4Ì ÏZ-6ë:-/7ë̆_½TÒ:ò(`(\Ƨ¯Q¦Å1,/ÐO(Ï¡:òød]‚Cãs iòýªëXÓ¦Ê%Ù¸¿×’‡2êMWk¥Kné½bÂ&î}§tʼçžÉ#i’öOmE4†ÞúÓÜàÚ󲌿?³“å Øö•7zjÚñ›4‡h“®&G`¯d3·T:e›Æ”‹´‡¤¨HjÓ¬„As&5lïWT—Ý›üÅÕœKP²÷äò2Mâû¬röd¶àŽgâ[ /·7èCÆ0Ëé¥uŸw* â¾m„`cÙým’¡ÓT®b[±÷¼ÛàK)&¼ëø±N]~– -—&E2ìNb¤ÏÍׂtLü¹è¨“ƒ¸üóž} «\y,¦ì9Ï™&©Ê0y©/g†4,Ï1q=(vöY Û-“_‹-EP²×·çR^¾HöY™ù1€ò…‰¨!¾4« õ{—\˜Xl!vÓ¨ˆ>åŸó¶2|»¬ÚmíH2e Ä4ÐdÔcÑ-)l¸„xÚ¢',Å1ý°cµMã„zº¬ðœçGÇ™ f­;é!B6œú5‚+¤1ß8êî$5ļØ,Ëiëƒ\=ˆi†€rŠjFïFDÛf¡sÏä‰'’¬ÂSŠAþ­Å¥+&$Q§>ÕT®JƒWhºöxj³Ö§*"ýļ£è]Ç 2ÁÀ™?Ú"²H­Ÿ×V`ÔÇ>Ÿe¼óÞqâ‘‘à c+&Žß=àÕ,_KÃçþ¦wòÆNàEÌÆ(¤ˆ.iQ’¾Wþ0•¼Ç~«ŸFHmíIFF˜«üYMjxl—ñùŸ)wZÌÿæ…¼î³Ì‘(¶Æp7A‡Ü¦Åvç‚Y¯a>œû—FT·øïßD™zavÂȃº³'“_A-Çt²"ë5õ p×›šÃþÔ€KzÚììq <ÇÛ—ÜP[ÿœ\tz]mŸÀÂL—™Á—ZÙ‘-á§æøºÈS*Ns,€zgÈÓ ÊÔŠÝö<#&7œõd¸²°áä?ˆ3¨ûÿÉV'àÄnh;ølº;ÀèD~åËÑßÜÊ¥0¤%ó½íd`ÐU†kf‘´ÏI¬+›Ñ¿Y¿mXÃA:3¢Î‚ç5›¿O°RÈOY86õÞ 3·bšŽÌ£Ô@¸˜nÇ“"%¶—QBy!?Ï=‹…MTn˺´jF‚5ÊùÆ'ÀSä,!yṙÍ^û+7†–´tW£.ªEÎX»žÆóª\™•¹m€<]á/¹'êÞ1J`y¼.\1ús.adX™²™G3LÓ?YàÍvÿ˜Ý|:§]ó[N9©ðGçßs9X*‹u:  +CBö$Òjb¸¬}®m¥>Êä~\½Ç:åÚPŋÕå}æÙ}ŒNqYÿ z¸³9á4E)óðÝKhIUS!üEkŽŽ  •é‚YžÙ§Q•òÓ°0À¹ŽŽ¼‰m¤ùP@‹%5ÿÈ8ZaJY½üP‰ë€á/ŽK;ÒEÿCSMHìí_œÊ† …“]È×a£uÃ_` Ù9è ‰î×G¦L½™Ø4Š×ÿ'„1êJšÝ˧Δæ3Ã@ Ád¼-aÕ½d¸ ÙPäÉQÞÓáM ¡¯Â¼Ý%ñmaœªítPÍ›Z¼<‚Ò/ïJ¿¾ÈI·û×ÌmâZPÙ@Ôï,,äKþsz“ãlÿv_(%'ä:ŸÜE‰r »¸Ê7Ö¹¥€}q–J*3mÿ1ù“aÄîÙ}ÔR¦²üfd û/]ˆyüi,òj€PÄ»¨dý«lFVÙïJ¥ÝáÊ>‡üóëÜ>;Êüh麕ˆÑ3¥3céqÝ,0†»65¡/§•#¸ÍªìtÑLDø@Çʧ&êgŠ`]”à%÷ÝÉÁ–fõÇ_…b$[ 1–~0.É]µÖTCñ–ä¹&þOÞ’ØVÞiT0Ñu9Ðã5ƒVo`”ût³?#Q01àú—8f3] ‘+âÃÉÈ,¶ƒÑñ»Àäšd÷°Ï;³`wÔ»Ü?šodµ ˜4˜'ë÷qk TÛ(Ç{¶Â Ç@”ÅWôZ!ºü÷n< ›¬Köεö‚ |e&&± ¹ˆ YÈ.ÕzV„¬;§ðÝÍðø©;øü!ÉÏä½  AQJF÷mš:»ÃÞoß~¶å‹Rï„D¯jÂÓ~N,õ˜¸_†\"tñÙ‹ƒdÈ"»«mx.‹“3:º4gÁp¼{ï‘Ö¨›«´nþ,~ErÞȾ!j?šQ-£ØsÂ#Â'<!lÚB¶xâx›ƒzç¿O©B#i‘kçeSÿlÒ'ìØ!…ÑÏ`’Úô)’Ö\³¤àÚé ¨Ö¤X¦l—:IŒÑ-ŽGZõÝ8'c‡ª/CdDìªUõ>zyçî~¾óBg38׸bÝÅÞ„°Þ—øàxL‰)à }w€ß#]ý…¿ŒŸé[»îIñ%!H1¼"ž‘ lñ%ÄÈO8½í% :IÏCßBàuåRSÛ­ Ç hiT¸ ‚QË­²þŒôÆ×W륫~1|!Úô€|x~6Åøé%—â9Š3bîOI® ßa-@†Xg1¦œæjþ1¼Gµ/ƒcK¾U:7¨ ¿ö ±ÑûÖ »ÿ«_“x”›±;4]` á#®‚¤Ú+¸uï.ˆŽ:Á@@txàÒó}~u¸´R÷ÃÙ—xwn}ÙXŠ…© «ß8j8Sò…'°•B¹X* ±±E˜{d«@òpü}ŒóK% 5EÛ9Ú$(¸ h ÒýFÛ^“‚“Ç'Hl?‰³§Õ(˜ÄXi=»c¯ç¦d)hPæ^\>`½ ‘ÄiO—®ú@…»ø-&gÊTpPœÿ B…7Œ]*4mž-Únçڜ܉µñ.HÃÔ5r(aõ£°Øéæû꼉¯sVÖNšƒW˜£ãÏé%!Å} {±a#43ÞV^ƒ7Ýß[m*KË\N…"3érõA¯†´ÍcýÇbûÕJqæÐ+úa¶/Ð:ó xJŸ&*‚vs6W¯âS¤í 0dü/•Ö›¶É…ÙîÅŸ´Ý@žh¼U°%g©È2ÚÈ äžò¬Â΋0ìbXgSVd¬¹H°“2êbQÂýýÊ ¢’õk3nU%4({åmöÒ“°A]ðZ"½)9èñ7Á I]\B¬B­ñ÷t”¹EHD‹Mâ†jMo´ÙO\T%Ù,ÛÞÙÌX/=Ppt™ØýûÈâÅXˆ%¾„\®®'W@³ á`<Ûd7é= S¶‡ZÅ9¡*=O|jâ¨C&¬–:¶C-wJjÕòt–L¥9ËÇK™…áN h`¢Á°>Ñ?+Ÿëžß¼æwÕðÚA©yß8HÀ7 ¾<Š$WbðAÅ¡÷ÿR_9lWeê9þøcZ¼ä+»ÕàyÂ<”¤ÔôV7ôj$K{Àž†B/ŸR%^–SMžÊ Q6Д…mp ¯à …Ñ_s jÑPû"þùDXt¼O–]šø@ê7)è þ3íD ±¶,ZImÅ‘$9”n˜í­VKáèBÀغÍòìÒ½DOÁB²U‚/ÕJSƒ¯Cqõƒcܱ÷ñ³x.£ò…£®`,ã!¯Ñ ûes"‹/iÎj±Ô6äÁÆPÎÙ>wdŒàÚÕËžõsžKyV³ýèql³Õ×nþ7Òå21ãeK%‘#%ƒyÒhꀎʃR5z"ÖEW¡ Š¥ß)Wý`Ÿßª»…üŽJsÿóR°#R)ô%úJ¨Êöø'aIÖŽ]“Y‘%ï\¹@ßûµf•qCÑ­¹p0„ÕnÕzÚØžÈÇ0«e~EådÎS%Ñý2a—¦u懑ûÞ†›ëîåçp¾âA°1d˜ic.ñ;±€§Fëº$˜O=9©Äþ¨WÁJz“{ Ôü>2tØ 5š}ÁsÙ ØÇ{Êî°Ú}™ºH&u!ÐrÄSáú Oé3=¨ðí»â«¬Ná—¡ '“a$„ε ö§Ä•> eBcO>€±²ÕÕ—*¥iÈÔT¹Ö /Y­u=G|t¡å6öš£¾/×hc¢"“(†ÞèZÚ Ô¨C!$ÔU¥JKÎëWÄf„æÑ/rÿ™}«Ã­±â† FýåñÒ{<·mêÕ„Õ‡ºíz{FTá-ÝHE²u ÐìpQK2¾rJ]HmÕÕ÷O¯ mQ£5¤ÚCAPUµß¶HBë·:açC¢HkKh—öñÃ<„³TõEù)½ë#íQŒeH ññ åZíäj÷È[4ç@¤ýÓðyBô³T÷J¾’€{«RR]7ÖÙª‹ºaDoÎÆôtgÝú4ÇñŸŽ¤òæ­Øÿ°‰þ2¸…%"¨õvëÝ 1 °½gC\S)SÒ86n±6dÖï•ø]1éo«xö™öÁ}C?Ð,`ÀèÝÇKNŽ5%ÜVݹïoM| Ë{ð#ÖºgéMïÊuÖõ‰"À5u‚“1Æ(½¶‘ˆ>áÏ$è; ˆsûЖÒȰc@2²ïFÅ[:UDBÉ`~³<Ë¢_´*% #2åe¹m… 4·èNì…Ožu§m_þ©…älþÛYRyhpPiÅ6^äSt·rÅHñÓ “ÞÚXÏ@Bà{ŠM Ú+3ã¥~UŲçzÖUa³T0Ì„þ÷÷d}_Ù¢zHŽWÍä€YðË>¿>LgpÙºe¦¡²ÜŒÉs8º˜:óüãÞ"­‹*y7~pOî0¥Áp*„8[ͶÑój%*Pþi($B :84ÒÓÈ©hçgib*En]R³àSŠ5Ô§þçxïý«äêÏÀ¨FÏ?+ÆvD«Cô$Øb•¼ ª_[9’d²8€âmK¡<ôÙy¥á€EQêÝ6q™Ü|ôÁsÕ‹vüËä$‡Àù“¾£j?E½dålW¿VstZv*ß/{&œa¨Qy{F Ÿ'“‡Õgîg·5æœw“|]ÎN0yµ#ŠÆ©÷ÿÖ»Q©œv E]ò¾.-•á 'P&svnr°Úãô]ášÈ½;sS{HÅ?Ò†¤êÑ„•¢É*}—ä¸liºPöÑüM%î`xF,e£ K[Àg|(¿Ìé”·>tH\oP¥ã½WÜk”ˆó|OXì["iÿXjYâ:²d'Yfö&ñ~P`>$ïpág…Z–¡M*½òTNõ{0å2@ ´ñð¼h¼B%R0 Ž1Œü[ßA5%X~¬æ=(|¨ÌŸƒ£5:Ø׳ï“.ñØF«Kk=E3KyUy'4Ìa*rº[;TØ®[JÖ‰ëÂZüúª½úX‘e~”þPbŽŸ¿·œrÓÃÛÁöø×èî¯$D’.u•FÒ- cÎsÍpÈ‘•#¤P`%q›[ôŽ5g{ûÃkù¨€Jᢹ¯}©ù¦`Á>¨ié Û«DÎ&#ÏA£ Ûá´‚ü¡C­ü.]á뽕JjqÍ½ÌØm•¾lûX!D Í |ŠD`åD_N-(9KÜ`NÐ!àåB'»=/oI©²ÔAω7+Ñ(ðÆhqÀèK° ‹µ²Z*‡¿®ApŠýÄì€ÛÀåáÅM“4·c?1x^·#DBò)p¤©©eDl8y¾w‚EÅ%Ó®qDŒ¼SÖÊ¡¸R6ƒ+øIŒø•C1ËÕ†W˜àµƒ¿,´·jšrÊFå –9l) •P&;hÊbü*e˜ã¥i[7ßèˆXì3x#o”›=]jIÆ¢¶î•ñT˜4Yßÿ %©óUÛå¦cô癞€,Øå4ü‰XZØý±Œ"|V±#X<«–»òÒvVõß²Lß+¾x÷Ï2 ËýEs3ÿVžxÆ€tó½FÊ‹ˆãæ¾L˜Øõ½¼ëŽ-Ä›ÙÁ1 f¶„@èÓ$ûl—,!BÂݵÒÖvíêé4½ŽBî`zÏŒ„s£·HÄÒÞôt‚š6f=pq)šîóźÚ*b8æÂϦj&ÁJA©“– .JNÉë\.1wI–€fâÞĵÕ6Y¿ B>ÁÒWëÜÂøöYU ƒÐq;‡Ü|ˆ>>v™ÿÝ@ÖCædë¿v\fñ͸ܥ/“˜€¨ßròE]5xž§>Es8åàBˆG>s¶ñ )¾/ìVPÈÝ °VØG¤¥/iN¸k؆¶¼?ÃU‘þ º›I9F ’3VS»Ü×çWB#îǪÁ~äF3 %ž wNÕ*äC/…‹äEíÓÍ/ÈÀ!Úc'ß?f“<¶9½m¢`í6¨ ßdñ›•Ï=ϹgXÜ:98A±Ú“^ØÚNý})­€KŽ’“A;ºýÈ?rÛmh!¾ü²`x¼8çNˆÕ-Íõû÷?ßùVåÛDˆr›0¿¸¶ÞjNËH!ãFÉÛKá öu°³L@cí¾N4ß];žqìœD¢¿YHüêÙ¿§vŽO‡6~z/ÿË¡FÖ¨D¸ÌSQãGV)p2°ÖMšK¼*IF'•õõ‚žÆ6q¯ô<„mœƒ] Ü0ñé²–>IŸh_õðÙÐ̈ +W$•L, .åUi&íð6è€C•¸æœŠI§ðµ•«a0ºEµ±T†âæ—V*ÚÝAš­Šžè÷bägÆõnú,V‰€¥½üV)ŧ%¯7rò8üÌs’1‰’]}âï=ÅŽ‹Ô…Ǭí4t…Èг`-‘ÀØÙP†µö¿´ñbîÉ Rƒß‰›rèLצ#WÑ‚ËbÇyòP<^ÁÓgÛš†DDïÅñú§&ع““*ºs/,wé±­Mн¨~r8¨Íñ Q´ö£0Nßßûì+\Ô|bgÀ¢ pó2¤sp3a»`q’ÿ$œÛ„ŽjŽêâŸÂóÀ­ àtþSÖéæ–³6üjʆkUlKÏçÆåÖ\¿ÇÈîF7Ým‡…Ü+^1´Xâ!ÿ­¡_Ÿú7z=áêÂÆB“þâC©T?m¼úú`¥ž¤IA¤-})Â`8Þáê lhqÕÚŸ¦Ñª\gò GüÚgÍì]ƒ"æ>ëÀšÞ•8ÅI°E8»¬=Ø‹T5’°Ï‹ 'ÿš¤QâTS½ö/%=ÿl ΰOôþ•/±ÜãÅêƒË€Ìn¿œZ™ãÞÀ žZ€½GÁâÝÄ|n$ÇÓ–U&§Ø_dø]¶Žkùø¬¡†3H…-ñâÌÑdÚÏÚdŸãýØpÕÅžÉk¾r“‡}°ÁKC¹‚±aMÞ¢Ûrn#W4ß5Î_ öt$]"ŸÀV= ª¬•ã5V˜çƒ û¢«=ìÅ“R¥ñCêÊ»³Æ 0›÷ï“G+û†—óýpÈõ†ô6ŽŸ4+t+´ãÏSÖì·ž›§Û>%µñŽc8 Â|=ê(ñl~ · )`§s‚&]@BÝNu²½nARÌÊ,F~µiÜi'šúÉ£M!ATœÁƒ‘¼ð¡2ãkoÐÕÃÉvj|êýžqDÀµôC+-V+°DLAf÷ÖˆpTÊÃZ\­èÂCƒÒ|i•Hþ‰”Ú3øpØŠË?êlX +áº@q<ð§‹J9ƒ¶î¾¼ìiÁÇoˆ/g7F6«<Îf N^;@Ú—v&?™Ë5wibHJŠP¤D» Öì (ÛÉì úcÔ_em¬+é$êyå¹øsŒÒøºßewÞ$ÈBÜ0dc\Þ7Ê~Û˜GPÝK˜ GNÌÂ[ÔS TEw¶÷ì=æÓ’;©—˜°y’2&Ÿ¿‚qtG}‹]fv}eU )*0/á>ãïm¬ªÅ"9У «ðX0‹^Ù×hÜûÁÄN‘ߦ©˜p‰øÜÝš}Cq¾r* ìËј*©]Ž7âIQí†â°7៿¦½ÛŒGÖaÌÏ1••£«‰Zï{ñr€à“nÿùR’^¾$ëÕ'–úµ pPB¿”"wDnð^AI€|—ºè¬z³_ Áak«‹Yâê°ƒB¶ä:–í'grEÝ?¶¸+ÔeذKêÑÇVÈï˜Â:C^±Q@>¼‘Pt‰žÓ ¿î8õ!~¬ªCnßeK'§/«‡k–b“‡qEd•í¬E7×~äAf£‰X9Œ-Í2gÏËxEEž#¸°"ËaZ·X8Òx»¯úÙ;Zd2³o£ /„ˆ ¶9¥¡Ïëwë¹æ/¾â0®9KÂ\«ž½‹tí#&x¿Õdƒ`–Ôöˆ¤Ó0˜V!„#•-iÁ>ŠÓOظ:Rž¶lþSMÓ8lä?Sµ¾w™hÊ?Fy`i*¨ ¤U¦õK'³˜ W+ "âÅ“î!?Èy,@4çBè LÊ™Ä\K‡dÏ'Šu’cÜ-à ¶†ûß„ebë®qÏÓƒád®ß`ôŠÐ+\ïb¥í¦ú¢À…*~žs^ “­ú°FzîžÌkøòèÿt;3­ž) „eÏ”¡Än*ž"º$ßv¶,±;<ÚB³Ô¯u釩ýà´ˆHÓpÚbT¾ŒÅÅI®+xxg¢ÉøbjU2i¬+å¥ „uX¼Cá}üLL‚PEèááý @EƒGPfŸ™Ê¨¯žÎ¡j×ÁÐ~‰ù= %å2³Xœf´yίՋ­U¾ódÏw¼6zì-(c`LØl%Hà§1cóºK¹Øqs½ÖhÐÑ9]‹§_¿ä+‡ÃpÒ]»¡ÕÇpú`iâ—¯5Vm†p-½û¾¢~Œ, ³”Ä2©1ý‰1¼ê#I:‹´õya!à!€”Úq–";!b]×ãšAÂ7_â̪ ê¤³Rµb]Ï;S°~Çëê¨óÃÙBßÿ7‚ZÅæ( ñªtÕ³*Ÿ;Óh‡šï"¡MòpŽÀX¿Å§Ýv™´RPà­­&qb(ýÑxjK\pÑ`&—ÓXŽs2-5 f0û" ¯0"G‘ÕåîÁ ªQ…ÆÔG&àÆ—g-îÖÏ: "c,ÅU—¸©f{3å×'ÇÿuÿÚPç³Ï‰<™€Ú‰àí/Òà2L¦?ÚCÞªì¯:YÔ†p?f”ÐmìÚtz›óꜬNÒ—U4c¢Þ{_y’p Ió·6…{ôÒ!s%åZd±ã?Ô¿f8ù*_®–ÈÈRÛÊÿ†¦U|! $ƒ,›ÛÒ-“Ù*¢ê‹í„»òŸÄrm‚í·°dÆ¿êÃ^”ª[æ˜V0r.9´J{aò()—|AóÈBŸEb)ˆÀØ?2>{ &ñût”yŽÉ©P!dâ  k‚Èq&óD=™'Böš»ƒ’Ò5öåKÕ¶µÝ#·ŒŠï”uPQÔ‘  Øo9”©UšjoI`ùêäF`Y˜w‹e|¬*3‹#ånéÔ¬mõ¡Ò˜g|7 ™ 9úÓ#¥.îFÿ×Y Á>O|»bfÿ=.¢§ˆ ݬööe§gæ j8ƒ2îžrJØÙ?3uä¡PDÞiŸCΫ詞n¡>5Ûý†–a³š#[Øž†©Ÿ;cD9}Õ·IÂÑF×ä%xáòbßÇxýëöiû¬K·{1à9º±ÚðuœÅxôÝ×o@†Å+:Aîø`Û*DeîU8š<#.•E8³¿Â+g“,…ÀVCß÷˜õ‡ÅÕ~ÍC¶Rž?Ú@Ç&åÞë®N²YÇ ÒŽL»sN£ÅO‚UxI±8ÄÐ L>h”D‘Ó5N ¹t«­HàÓU“w!|)øSÎñ6Ôyœ@†‹)+Ï^Æ{ð‹‚~l·|E+Ÿ…/¤·:±¸H ýït¯°p 7O4P‘DðC{ ôäa4n-ðÏnyŸO}£hä‚d~lʪô@žÑ&—ý‘×õî ‹Iø&æ$©˜EŠ4GÌÔîçËl0ÕŨ°N,ÐÎóËS^ÅŸz_ÕÉÌäqŸžïûÊåÌz÷gw†-ù¹Uù'«1cJ»Gj]ðœãcܲoêæë¤ÏóîJ•é̃‹'©¬òPš=}rHËèO|‘#âG?îÍ0ã´ ŽÓÀëp,.±ÂC2§®¤úÔ„/û¥¬æzBwýL@=±7˜‘ùœSìU WÕd³~ÆÖkÏQ>šŒ÷ö=o§²"°š †îÞ‹*»+Ê@¼[–¶×½Ÿb*='”‰ü .¶yIq™¢ëѦ£‘Ê/¿ÔÀÄ·óŸéÖ¸º ¬L‡o©Ö;XêU¢|ê§ÇŽ çTÚ¶;£‰7/GÙn6Àoú·­t®F–/vñ’Bÿä_ní{9¾üClwà{zƒúoQ­ðŽ Þg<0÷©µ@à*¨%|rËØ]WêŽs“*(¢Yç cO;|jØÊnML ñ“6Jùbp@®<åplü­@…Ý_ˆw‚ {Óüy£LŸ•I nëï9¿ìÎn‘¬aUrߊ_UTr ¹ßÁßfϺYÝÜ!‡L¿%Ò2½Asá3Á¯ØÝ†cûV ¥iÁ°Îú1þ³4d'õÖ#}´–yÜÇ¿ð‡4ðéxòh'ÅÛf· 'ZqŠwC[ \ÛLáüpËÛ["†~†U<ƒÇôÿŒ¦ä endstream endobj 308 0 obj << /Length1 1630 /Length2 18198 /Length3 0 /Length 19035 /Filter /FlateDecode >> stream xÚ¬·ctf]·&œ¤bݩضmÛ¶mÛ¶Y±mUlÛ¶¯ž÷ísNóuÿéî{Œ½&®‰k®¹Ç&&S¤æ7²50±µq¢¦§¡ãȘ[8;*ØZËØ²KQ+›:þÊ™¡‰‰ŒõÌmm„ôŒ9ªÆF!cC€žš hkçî`njæ SVP%§¤¤ú/É?&÷ÿÐüõt47µü}q1¶²µ³6¶qú ñì¨hl p23˜˜[eåÔÅeDd¢2ÊQcc}+€œ³•¹!@ÊÜÐØÆÑ˜`bë°ú÷`hkcdþOiŽ4±øúG;cCó¿nÆn†Ævÿ¨¨vÆÖæŽŽßæŽS}§¿=p²˜ÛZ9ý“À_¹‰í¿²s°ýkaýW÷LÎÖÑÉÑÐÁÜÎ ð7ªœÈ¿ót2Ówú'¶£ù_5ÀÖ䯥‘­¡ó?%ýK÷æ¯ÖIßÜÆàdìæôO,c€‘¹£•¾ûߨÁìÌÿ•†³£¹ée@p06Õw0²2vtü óûŸîüW€ÿ©z};;+÷yÛþËê?s0wr4¶2¡¦gøÓÐéolSshÚfEÜÆÄ@O÷o¹‘³Ýè\ŒþÕ ²f†üoúF¶6Vî#chZ[§¿!dÿg,Óü¿#ùÿÅÿOþBïÿ¹ÿ£ÿéÿßÞçÿ-âle%£oýwþ½c—Œ¾ àïžHþY4Vúÿ?}ks+÷ÿ×·V5þwºÿ0q'ý¿má·1ýK  Ý¿…æŽ"ænÆFræN†f}«¿=û—\ÙÆÈØÁÊÜÆø/·ÿj+€šžŽî¿é”ÌÌ -mþ!ùß*c£ÿ^Á_ºþ•?­¸¼š¸² åÿbÁþËPîï 8)¹ÛýÍíT#mkôŸ‡`lÝžÔô,lj6ú¿÷ïoBì LÞÿ‹ÿ¢ÿ¯³´¾“ƒ¹@óoÝtôÿªþ<ÿuÒþo0Â6†¶FÿŒŽ¢“¾ÑßiûOÁ?jCg‡¿$ÿkü­ú?Îÿš{cc7cCèÕ%[CÎ ‹´Ìt§ZŒÜ¡ !Íþ^úCÁv¿”Š üªm{|ÓÂvØ+ô>j‚i§8¾ÚÜÏì>$(GzÑ­H{RŒ¯òq¼ Éû 6I:X)hu~Ã¥Ÿ«Fy^/Hmƒj°Ð©îNÈ+è”|€ãNu0:@^?“ûºø¡=ÙÁû¦ÖÇ¢u"6!מ“$ž#Hrr×sxh0ü{sau¬\ÌjQ­FJTvõÀ~_rÆ'zŒÙA¡O¿dÄ3ýæÞ§ã[2ˆ•t½ ‰a(Jà¡ÂœV’Щë\?_aY»¨çáH³Ì\a1‡9jŒ\M#,bÞúBR!ã\ÈÔ‰7S¡cCL—WW‰äžfeªûÉK,ÌÉWë7Zž´ËW­ÓáäÉÝ T¥”6P—}.G=Ämþƒ:šþÈ5âÁž‹ŽOÝ"„â<ê âM¡Œ)†wë'HÊf#º@ù¤EåÜÐ*oZSLR«äÕ>1ãV(’ئu#>G”x.ñ½×}²NKfWwš0sÜ<¯Þôq£dÉ.¤{úX÷%P©$OŒLžS²Æù'ü‚AÍŸÆF*ÍÈ­ ì¬v”Ìž–½$NÜLÀÓ5ú‰ ¯r~Ê\ˆ[„%ü|ÌŸZd‰QàG]ZS:«S‰j5¨zg‡F$¦¦IýK~„°5H¬ÁÊ®¯ÔÇä„à;ˆŠ/HR…ëF^›]$ ±Ý>”—‹Kæb\^ná~Þâgso“g20†úl±–]CºÝÆ´ xÖzJœY‘åˆa5®j (0ŠÒ$O—|“v™[®‹›’åÖ“T–ü¸­±±j§¤eO•¨a…Ú_±úb©l¡*fkDkÿRÝ`·:GÄ'·@;TúÇ9F~ 9@3ûƒ¢Â=ÿe‘êKÕ/°Fs`#LÝ œ=y>p£<™5Ð֚˧Y꼪W¡ƒ+&FG]7st¦Ý(~÷»ØuSž> J(ž ù"}DºïÝ…¾|až*0làQíœS©`­{ìÖC¡£Ð»½²Ü•™6rAøùŒÞ4 -6ôrj›NvÛS#z¢ 5ß-¨ùÓÓë-ñþÀM¡OÆZÉ¢³ÉKÿ†ãùçÞl #äJºÿî0‚²˜rª™ S_úZ1^¿ôû8>²Ñ¨U£ o}ü…/¡ŒÛ!A(,ópPª§Àô˜"¯´Ø.Êò¶ež¬H¬bP¦geá,¸Ùhÿä{‹}s=ÏlÂ&ÇîudD£_ß8ó®—Êø2nC5ƒõs%’q¦–™’Ù*1ÍgUŸ0M¹_g4TTÈ󀓋´G¬Pk&½DîG2öÉÝ‹I¨_j­ m/ ÂJH1¿9RæF—.…@æù‹Øeí¶‡8fú.Uø¹Þ« `Õ,Èh¨?Kæ¾1ÔÆ…é{Ê.€Ç7«=†•¥Xcù§‹TŸ/?.NA–Ž+]QpdßÇ¥Ö ˆ˜Ï“–Oà:–p—†N¡)DlåM±œ8ÜýP;j§QN$xבúôk•RËÆ€—?²×^ÑkI8úf~âoñga>Lú.3 I÷ rlŠj¿þ¤Ù vaæ¤Êb,¡½’tç%;^+î™å¦ñ¸§ø6ÀG!DG_"<áé‹Âu˜x^ú‘«¤CðN ZrÌIpm­q_{”‚Ú¿òÞØè3JÈ&jcàÌ“:…ƒFm²+¶û'Œ#'_]iÈhcêÙ/uJÅï‚xµgM°!Ýl®IÙ˜baWšÔ$…R8蘋àn\˜Ì¿ÝetøNãüÝküŒG/m7Tq¥›z$c.÷¦0¥¨¨B²~j`e(7|UÆÜ×}iDwUG<¶èAw{n=S,“N±u.Ñ«hÛ;…¸éÂyÔs#kË&0¢~ݵš¶}Ü]¿lF:«“Eȹü)$«­§R:mög\ZºÉج.ÿs9ôeZj l,S)°{†GŸ§ ­0$×J+èLăaÕá#ö…þë†ÚK& äo l`YøX ÿýeꢽ—; ûú†xáâßÁ—¿»"™R”±¨á èüè‚ȃ}×­ô¶ÎŽsžyåî»Û½è?("÷ºùq½ÑVEæxW-\”/5x*Ûxuœm“ ïðÐH€y'|ä9è ªîÄ}Ä¥ìšàÕßÔC§ŠVÍ´ä ¯‡3WAê)î Ñ=ZæGn]å*¬}Á!¬«£_WÙ¬›”Ór%ÙcW<û¿"åìQkÜ ?l~8 ë{ù ŽXÛÎ{–aWæMŸ½T[±¢{@v²ޡ߃”FòÍÿÊÂüÖ‡¿çR˜$K£8v£ï™ ×I†™?N…QXb¾ÉBðÖ“j (Ĩ[.1~ FâšÛkë^E:çx»Zh¯ÈZ£zLäøùT&æX©+¼îB^Ô7cÀqo¤Îö~|eËÿ&ó÷y†<Ü®Qè£o(zчd²J$’DÆ#|Þû0AÔ'ú–¿·:n1[ ìÖ ~¤¨šú Š…–aGÉ55¶ÃHï#Ý2ÒÐ ;ÿÈÓœúìø)N¾•DÈW]'y8l\T =vãØ Šßx€P‘!ÝA,°˜'ë–Çž1Ë»!ƒ¢q¸F ¶J %Öù "Lµ ºtΣ3œ€?ôJí’@(sÈ>wÅÌx°]“Ùù²\ydOÖ­À ‹„+eR>R¨¨Á>ØÅþáË*å‚OÍ[ÕC>DÈcÛ;ê/ë ÙáÊNLh®Ä+(Ñj—·=,[{Ò[j{0 6/᱕}&@Ä»4c‹Ll¸ª×­sq–Dk&Ž,øþ¥FaZ[ˈ³û…tƒ‹•õÞ8@€/üÙ—Í¦ÏØq .­1¢a˜´Çö6è†ÝÂH™ÐŸ¶M3lg“ë:’'©õç³Ã•iÎã-°Í‹ÅëšÔÊAÓñi"¬‹/ó=ÕkwµîÊLI\íl¯ËŠNïx¼p&LÐ1q ôÝž Åײ¢ÑóvN†Ï&ñÎà],b±Lº*ÑNÑ%§4øA²r>îS¼‰´éUêÆKýs{Eª–Úþw!~õ¥—üA"ì‹K:»9'ýçË!zåm^Ò2ÜP .H0ÎÆ»£€×:ÂrÔŸUx$lV˵eþ} ÀŸ@Mº¡Uy‚h—1 °Â$¤ ©à£ÕÉ”.çj})Wq½Š )ØÏ8â$»h5 h”Ô²e÷–ÐÿÉN€*¬ª|émÞ(eWi"›p]Qê×ç1’`„ékJ‘ÈD³D¡·lJ)s¥ò¬;¯–Ïæ‘™¼ ƒÄÎÀîš ËŒK#°0ÃÉS¯ÉÛ3\lk2=ƒ«ÄÎÞUºÁJ¼B~6&7ë…µ­ÊGFä˜gí}ž^ó9Î!j4œWBaó)>\ãþ…nȃµ }ºÂ]käX»Éž˜ÍP¯§|h-ÛpÁt8.%\ƒPW&ül‚°X…·TÞ„îØš~³ä¬ñƒn‹o. BÚZšd‘¥ øçê§GQ…xÛ#æƒâ»7äiëÔŒ2Cò¯µS˳÷Åæ8zŸbt/1£æj¦G}wv“N’Tã^Ÿ{.Ÿýï÷zСÅL­%¿Ü ¸$·°¢ta`ƒV®1§ñZó±£N]$7ãÆð×z \‚²IKl<“ÕáÅZÂ^Q2Ðyå!-ÐTP¤Û€~£Ô'§»žÄ3/Q%Ou@qnG5⃪¯©d¹ËÍj²¯OQ öooHîS/—>cÔ/©îß(>Ï0zÔ;$9Y\n D>Ž=Øÿñý cc“^\côŽ‚xj^z'ß÷¹vBú“rýRtáÊÿ¥¯Tr„T~¶PXšêæš÷ìú:÷”-©oý {åiqó¸N†ŽÒEGðB¤–l 3[[xAà?ÑZù{JçÙd¬y™Œ–ê"N¶ƒç଄>’ ¹04Oòò©2j–pÑæT+"ÞÆV·/cÍü#BD±Û]¶ÖëÖÞÖº;ú’6zqÅ4Ì6tÇõp/‘u”DnÖ'ŠësLî|WoóYX’B aÆûê£ëÀ…>6ÑPtRËÆÀ`èákêùI\ÆÏãŒL S/ë­ŒëçÇ]„ÓÀ\,l^œm+œŒºZ3N[ËîClSÿÀ7þš^Q‰RÑkvìÂL~ °POBe:ŠÆ. Žó49Q‹©Y5ÍÝ¢HNBU·¼îÜÐëœÛ O×ÔØ5˜^+&í²-rÓÅ¡®Æþ© FTUìDÄŒEAɇÃ2°ŠzÃØ.ªR¶¦ŠaÔ‘ã¯reù–ÆŽl–¦8uþZ3Õ<†NF_p- SÙ$¥ <œÞ_|mx=KØýjO¯$ï­KâéÌk2¦é£½Ô'x/”•“ÐÉÛÖ7ír~‘£¬ËÔ;§ÎÅ©´<¥op{ ì¬;£å½Ñ>AÕ)¬/”Ä:2>dzFc[|×xºAéQ£YçT1-ÓBÆôÀZÏiÁç'8þFŽ1ïíÓL=#6&¬d9teÞ‰G¸ŠN¢{ô¾êà5 ÿíܧ ˜<罸æIFôJÞ“H¶A¸46Šž°†¿K¢e…ˆz,‹LÁmäÆx_÷Û—na¹Ý{†mxiÝÔ´/j¨—Z÷Ì\Ì/¦Ó­@N£GÆ/å;vícp°½h¤ˆ2 Tm;z?IJïq8r}9qÒnûj_VŽ…IåÃ{ð@ŒZ0ö…™<íH-õ$Rú‹ô2¼å”t+´t¡â¾»¿tR9n’H ·lBMãf=%$usZ¬óK£Å\Šéè¶U¿\\Ô[½ÖÂBž¿¿Ü«V…+­y4ö1¼Ö)²[¹Ve£Âèo÷-²¯vʱ¸J€DKˆVv*Mˆ7thΛ=EÙþtÏÆé·Äº¬ÿ»,aZ 3¶6OvK½E+ÆCY4É»¯#›ÈºøØŸ¬’8¹ ™' œ2úg\äÚ“Õ\Gõõ~k¤Jœñ.ƒ#[Õm}ù¹“±AòþÜh¥ϰ &5zßÚák¦ŽÁ=bG‘—RYúØèû7Í-ú¨ïÁÒèî/pÍ"ƒÔçY™“‡af<µNù=Ý­-½ENG(ƒ'.¿x˰=$¼? Ö“À~¥·²šòI“#w—Ã߉_Û_#Ì.½P©%µÉ5˜™ûÄÚ¹š–iÝäìé«8ÑS‘¦²Í\ö¼y4­ØèVüäíŒh7¡@ì@ÌqˆU ¢4©zDD!#DŠVÝ'1 é*p†Q˜ šriµ’Ŭjn<+×Ù´6‹(]y±.Hðèù.ê I½È™MH¼©v)Á>zÙ?Qæ>¾¹·umùY jWQ„)(‘|Ž×[èXηnSé¸ÍÃNç(ñ¯æ¨…sÚþ|'éÛ&ÈÂÒf(`FF¯(Ppq¶¤æbŠmÄÇ*„’2ß&³Ö÷k ަ{ѦÜüm>ð)ÍÀð׆»N Xˆn&ŠAnÍ:Óp šÜà+@Ÿ¡ø}ü´3-^«‡(LSZŠ˜3µ„(¥SšÈÆg7Ј¸"­cßûì°nc’49¤\<üfýcu|Ù®Sd)ï(íæÙÎeëm}â¯Åa!©þxÜ@ ”xó››ÿ9ëDèÔ’?wËE®–û¢9ÛÅIæSÛ> |c•+xFZýÊ8Ž„­vÚ8#4vØÎùä“Qæ ã2ó¶Á3@ LÛ¡ô™Zƒ¨„…£ÃètÂBx×DÂ.9…}Bf@²èL·ëëÍjX ¦aÃ\E{)®;‚÷VkÞ°Q«r¯<Fô3£ÚçWAG$lYÓµó‡[9S36áÔþ«èÊg¥ðž JÊžéšìu`ñš–ʻܟÃNô0I0KÚ2p\WUe¹ñ2˜Ó–Ÿ0)eÂE´?yÌp Æ?ÅZåæ.0á¤R"“‘RíÕ¼Ô;‰+‡#XÀžýÑnëOðË#e› q»úÊÃÏ"›œÏ$ 9!$*¡,A€Q_~mÅÎÙ ¼8Z¤Œõ’ ~½8ÈiÃz-Úä®Á‹¼Áòž‡ðZ®NcŸÑ5¯Á2ˆí“"Ñ ˜_i;/.N>mÐDT±Ÿ8S|ì3~‹ïÇwÏ;ÂùƤ5æ´¸ƒ`¹÷âN¤O––3Ue;?X{ÏâzCà廘¨ê²b¬¦‚ oÙò’[é‰ÄÞé*;­Ùáùw¨‘±ÂŒØQœò“×­T»ôòŸð*Ç ì\ø*Ù¾Û Ç¦|¶MTm44h›pͳÕ9N§Z ˜_ÁJHb”秊¯ê.Ý®~n«xtk@/–‚3IÁÝO»—¸»Âf¤-:í ¬¨6éÊ(¾~hV¾tf]säAaÐÖr™-mD=ªoµ HzugÀäZB—º€ØŒÞæ %ti2M×Ýlͬ–íæVLÖ´àf׎²Ÿ sòýª`TŸ;oì.ÄH:mWÀ'ìHó«‚Vg°kÊß¹xX¾àDâÞâ±KÉÙÊJh°ö×µðÆ‚¦v‡þ\óÙ<ü¼Öí«¬jÍê`Ü ¸ÿÞ€&åBös ÈìDM«úå¼Ô(¯ „¦«-d]u±Ïü„ï{üìŒõŸLöœòu»ÊCM"÷ÂMªéW ¹×åh—|8ñ<ÒèŠNW6Mé0 Ò ø¦cÁMvHž^:Ú£­F[]ˆt—±BXÆ•ü¶å8:î5_¦£ä>×cj­° DÔ½z6C¿Û3û¤Üg×ìÍ,ÑÏì }úBÍ¿xX`¢)ݦ*Ò˜ÀbôÙ-—×!FàÉ‘*^3È(üNì"û B÷³ÙÍçÛK˜¯(hîž“:Sº«¸½È2J³íMì8'ó¸TÎÅÉÃüN[ ˆpÈN@b¹”°]œò¼b>ªW6ÙeÎoH¯kp_â2ŽÆ(äú¬Ôl7 ô]£é±lë>[Wès#…+Ï÷[n{ ¼|äú‰Œ’ÀÌ}"¯¼°»Ÿ—‪ô€¤v¬â»Ï÷ær›ëàËä퀬´I­%q'cg_W¹(}A‰2ÝI ¸uúVÌÑM£©¾}œ g[,€»YÐă¼»î†¸B ¢Ç^ñŒµ‡ê_¶cbþ ö¼x΋=¬šì±êãúCw³÷E¿oÄu__.‡å’xêÿíN1é^ð´Ñ|Ìiz‹`Urm;×J£)la‹ÁՎר&,úpÛkc †ÑÖÉBâþûñ%L…¡qÀìHAnÓ*óèí.ý]=”öæ]º[‰FáíW+ ?¥_fjÉ!$ êÏLø:á×°i\ßÀÖÇj3­k‚¤Ïnõøq8ŒìùÌK£R¼GìjxÁYs‘LäçÏARVƒã…‡Ðp¦;Ž‘U@ˆ¬ƒmN¯ëÝKI\ÈæØVüÌ`¥¯r³Ówº½Úæðùf޾žš\òÍÁÆúÙ.íò2°…ÀÂ0%;Ж«Í@É2ß³Dû®t{*D„¸nûŽ7Ne×ÖXT„âZ#>†í[?»ê€íxãiB7wt©Sµ»ú¯tÊ‚TÈíä¹Í.9)jA–…ò¨3­‹ëo´8Å!äìà¿ |§ÙídÔŽ›µ¢¯%š :9lJm WÝäºÓxËM 'É®Šlß¹¾Ìµ|\º&ØYÙö§N0àyÔ1âùªÁ¿å~Ïíóí0/ˆDÓ±ÜÛI¢ÿ"pïDªä¥c³X_©ÚDMaÔ½ {<ݵ™&kZjάQ‹ç£<\µÁH|Ù1V£btæ„ÁÁQb(YfÀjgñg^‚"æY¶Ãiˆ†âÚºKúa*2šái[ԭ÷²ª¶1IªÜD¸l[¤÷XQ#¨’Áe?ÌêëÓE|\¤á*Êt«K)ôrœª×‰›—MqóÁÎ't@“™l‹¨.¿ÌÀ›iªPÅ›Tà^Ù¡·ƽ[[àõÅyK¦Xìq;âS¾  E£‹ýXÌ“Wjý¾vQ !ýáQÒýÖý„ʃ–Jf™ùól]à~Ì”ŸÿHĈŠc–¥´•¤±”LÞ7ƒ¡¸Ñ… Wƾ;}ˆ ™B¯p¢.ÊÌÜÅÆB#ÆïØÅ]¼¶æªT`tŒd(ïÊI>†¢B¿°oæÌÿ|˜úî¬J ±»ÊGmš0 YÃR°miÕv³ÓÏò8>ÈCù—àÉ—f•CoMN];j÷>C°–†6Èú†c¢¯qs‚-¨™7wDsvŽ)‹·±=¬rÇh_¨s?¹diÇz˜å×3²ïϧEÊŸæ7­ÞùµJÒöðʸÐjâèö!¬.F‰‚=+”;+”¤?æt»U† õ9¹ëðo$´:êºLtyv/×Ó¶ ÂÒE.µ;ä/r“Âh:D ` ãÞ6ÜIõ`Š<î12ÕŸÙ>)§.©Ø?‹$œ§éÐmô13œ~¯ˆÈ”¤ÃÆ©¬¤Æ,Kȧ7ñ’hŒLšÚê^hÌÀz_5„q¾¢;)Ö¤®©¤-6¶œ}­uJL«s•"ðÌÝtçKžL‹¶à-ÀžBvSí–#H¥„Ë‹²+°*ô$qwæ¿Iƒå»„þXCáÓgß!›/ôlÆ–€ð­šg’§qƒG^fs´»˜2¥Ö°éCŽn†Ò çíÍ¢¿TdQ`µ ˜ÄI|X±S%&ÏÏ„®P†qȶ>±@½ò\)|᳂ί}£5Q~¼™3peÔ!‡¡È¿ñ~WÊ»?ÚÜUF7ùƒÿ-¸Æ 5°ó«âÔj%Ãw\ ÷:>ïc,‹‹Ô_¼i]˜û£œ¡CQÐÐp1ñ”b |såOELìÚImºe~󻨽ó| ƒRÉdíz¯²Ó³)Pp5dO(ñn_±|O²`—Ú/Êà‹*`Ú¸ßP•ávüÄE»,Ÿ¯­naî]3Ÿ ü .TÍO#~8LªŸ½Ùlî‚ÍšÖ¼/Ýf ˆ'¥‰:í±”d%qÏð‡f1¢ ™EÒ`+…v“¢²ì´_ÁT#Äù2CV3—\‡²×DÄ‚¼­ÒŽ ¤üT„_ ?ˆ<ô¶ÒÑ`ª¢ÉØÓU»”¦Ö©T°ãЍ~]¯“•sÜ)Ö•õKµ:ãÒÆiZ´âÒJN<šàHïž>µ°ªxk‘Z/$Ùºq¯¾$¢·…fn° .@¸Ÿì/˜Ç&èüð Ø¥Á†±ƒ]EéS™ôZàËKiH ñJM^Õé $î°0[fe¹"s:_ Ù÷¤¨Í"Pð¼ƒS¶I¶Å"…R^Á5å¾o«½UoÝ‹$ͺÓõÈQ¢x".•ú£\¡‘¤>û§urØ|5$ÇfÐÛùA µ?Ü×<€³Æt$L!fMM+P‘ è(‰˜ä–8n¥€½µÒn‹„â©O6ΈO¤>1ž’~ìõs³›·3Àá;À YJ~§¿uWc2ž$˜ öÖ*þ¨/¶Ã&Tª#ðZ¬§6Èð;Üt_Mù«uÐaº¤lb²—ûtR¼‹´Z6Äñ¢' P~ò…ž”ÞK7.°Õö”Ñðÿž<µ]¶ÆÁD2T bîÑçEÈ-Ü&ïV QÅô6`ÊîìùÒ*{±é@°Ä7†vçv‰jIƒ^ëéç¹±Ïu翈'ÔÅn­[æùÉÄnft¿ŽöåæQÕ7•œ­n>œBTÝ ­ m.ÿTY¬”óNL¬ß©úQø!H^à åµÇ ÒhøÝD=ç¦ù‰ˆB–“ýà#®#a£R÷rC>$î.C 'îêï¾|¬'¢;ЧgäEçO²†›Õ}ÿê•§q+tÆX÷í Ë±Å*¦3ÌÛh­ïBøØ‡Ï9“îb ºQ2ML8K­8EÍî¨*W:êb±¼«©*°û“¿BmèRE ÔÍÏ6Ÿ^õ ·9Hɬ’š¬ÕE‡’6h‹ ¨+<2¦¤U"‘Q>+˜_¦` F *ƒT|»9•¬n—küW;Ráì@.¼XíÜõs`™–PõíË‘Ÿv¸;z¡Çw~ÄB­Ÿ(\ñ}•fýÓËZŽE(½Äà¾Âüž×]>³¯LQ7Q6'lËÞëïtÍßõ,õ¼ðÈýWÁ×·ü,KTâWyzí±6ÄO_ì¢2»W—lÊθW@ß±ènh%b™ÅrìWm‰õ=Ê'ˆåüÑ~*ôíÇ‘ÌþdDǽî©e½ö^Ï=™/=Oå"$s‹¦¡¾›—©Ÿ^9Ž[ÒÖ2óv×ùžòz¦H¡yÎ;7Y 8`ë?ä_×Ì'¹´‚¬ðÝâ4°(¨Ö°?Wð=hû4lçš"GÜ7¥/eO³/ÿ\‹{lHÜ[Ú()qò£+é°ùO>$õ7@šÍÈÔXñ>»\º§ü9Ï`%ƶÛéîg—eÖZL³kýãKësnêï&‡bfáÆc˜?©Ü"ev J¸‚H6;` .êÇf˰AG™ªZ)= œoõbÖÓÇžîMš:ämâÑÊ0»Û‡|…`?£„€§#0c3šô¢™vïÝØU;u0ƒèH€/óø[`Þ­y?ÐSwøjÇýüu{|¹èB”µNZ\ÜPkHRè5;]î‰*¹ä'ö b4[© I™Ó7í&QÍn'® +mÙ”KÕÜl’S©%¯òfU´e¹S˜,9M0s°¹Ü¬#!ë[kQÇ’éºÛµà‡$Ê®;:<û;Xð£àc!\¯«uVt8Lí¢™:Õ”bY¶{IÍÿ’XÄÕnÒ)_K3²"¹²¥Æg„z0wûŒ 47½•ïžµûS <Çø@¡ùâFv!(t¥` /$qMÈ&óF¸£IzCnlÜ[WŸÙ7zí,Šdî+¤ý¥¦œ·KàøƒH­ÛxLäñ1׎=L*„x«ˆÙæÂ'þY{[³EÈÎo ®ÓG'±~°¥qÓZáy=Q>(¾YbˆVÂö´P- B†ÅTBî‰Bܓԇ7ßÑ!(mÚ3§ˆ×c–ÊmKŽŽ`Öž8ÑèÛ²L´ÚcŒ+lÓ.¾£‹c·)²F¸Ëñ韃õ‚Åó^–qN^Ÿú×+2dyÖ9¾éÞ&3â¸ÔäÒžï @ý.æOý¥¾+ßndgŠôƒ°ÛGKÇQœZabRC7T‚HíF” K.ö î#Ûœ•ŽTFròŠiQÒãµ ÚˆÒ¥·±êïÇÐÁ¤gÁΆP çSóƒF娅‰O¡“MeÝ$íŸú !RSg:$— ”8× äâW|æ ŠMÀWñrÕ¤¬É©øÈO{z¹|@ éFãD+%ý(ï¯;½Ôåü¶ñõÀqY;Âý«Ñ'UY=Ž™ìp 1³Ýt9Î,"*öù‹Ô>§}ñe,Õ•ò‚ߪBœw~DÕ|Ÿ‹ÕúÛQ++ Öñ B® —1F+.àÍ¢©·šæŠwœé½¢­™ÐC¶`gn$ÞÛ”ãqVu«Êø2yvÐÇ݃ø[«>¬¬wNJ}‰´Dƒµ,é2pf1%l·âkÛNQ» H/x¼˜‹ EÏTþÄ#nf“=-ßãOú³LÍ|šùÞ~q’#Œx¨J3i$Ë”Áò…Dd¹.òÀ‰ ©=-±«7jÐMÌj{aœqrBV[/nn ƒy^’…°±3»qÀ:Í:Yv¸a˜Ò@ÓÏ#˜‘b$y] v †¯Ù–käkƒŽà ffñ˳l¥î›u§:wʦgœ‚­\ mü:¢­'hÖ6”„j’ø6™‘Õ÷“‚PEëMJ©ˆ,Itß„6}®¿å®ÎEÙð޾x˜²,û‡c ÊÄ2Õ–Ú¯¾@¡]» ö)¾EKy~àZ¶¤ÕÜå×ÉDuKòHÓ6ª²È¦¨`ciÏlYt×®ËójH%õ-Ç7iéV±äê6œoœ[:IÔhuÆìL9 mž^¸¸hsãŸSiã䚪%¬ÂE 9‘Ö5ÛÊ5¦<ƒq²#‰GžØxÁy:¼7ΚèØ8î‚ ~ŒM;3{ŽùBò™)ð:ØŽø»õ²ìmKQP¤&ÍÒ¾Óã:RþÞÞN °‚¼Çî©Ò×–²Eʲ~ü*édviÓW“‰ß=Îy¶Ÿ)™A.† àw÷“Çß}£šŸæ ú±&Dîß+]bâ'/žQ=ÛŸSü £ˆ6˜ãh3´'zêâ®QUþjís¾s°v[:û'úbÂÉëšûÊ-ª‘áõ… ÝAi/fU7p?_¦'€å¬YbzU©A}ïª4#C£l\`rJ[¤ ºÓ0蘰‹¡?Œ°ŽøˆçΘ±<¶Õv§É |X²QÓ¢ _ ñ,ú°`iÁÍBw–7a¶xIï‹Æ’Ò{‰ÐøÞ<8S/¢äýLQðŽœ eâé6ço4ǧ‡~‡³ÎÂÈf‹íŒ•‰²Z?ÎŒõj½b~8o)L³¨–¦°Ö+b@»ÞYA¢üGöªÃr ‹KÄӸȒt«KƯ"È…ƒ>Ù”µ0>{ûñyw‰/g,ÒÙ .ãþÉ… ƒÒE•F†L³®|¾³ ›â$Þ?p%Øõ¸£QYo£r q¿É“Ær‚Rø¾ªÐíd°&‚gìPYôë{Ð:÷ÜüH7´|Ù3k5¨9gè5Çøä^ÁÂ÷Ý燄 t|Žnúò3š®Xè•ñ<\·íxê“LÓ7àéEŽ \¹ É£ØIÎ^áÈïÝb¸øbê;uˆ%´7K§ÀõߊØÉ3AO¨G`%>Xp¶Õ[þK)\Lj;aŠTA<Ï@u-d×Y2o]¨¶ª«±ö˜=#ȘŸæø =Fø1¾·pœF8ð3º‡ýïz-×å+Ö“ÓãåÈmÚA9MJ½zkâP?°šfŸf>¶ŠÁù'ÑkN}7J¸ÿÜg:á©OAI}mJÊ‹ÅÕmCB¿vº mˆŠ·µ’",§w„¾Þ¢ÛÆCõ»>Ð.µÂrϘ×/“ö W® #yKê½c—øï2ãa‚^/á×"ôdœoáKvøSY7þ.(ž,$‚­¡‘2ëÙ®Ÿÿò½!rã!E•c¹€\s˜‡^Bãu”ž eª4ˆ/ý`ägª¢‚òr–OŸÊ˜õ3çz†Õ ˪¶Z^Ø\߸@:é¬wK‘Y.ÿÞ5Ï΄Lø#«£4¯ø#1ºP&n¯E,³º×:» öžäç±F26NbŽ›÷ý¶†È’™¬Ñ $ß‘ˆ_~ VyPZ!s #uFs “—ómãDiŠ›…“S ga’\bÍP¦§Q껀cî Q¶Tù)½Ô·…˜qºKû+CÇÑHø½UBZGú„1ÿ¤ðÙV”ÑhUØŸy+ §Yµ¨^ SÍ¡Xñ²€œj+V‰§žœ”SQ|•m›—2ææI–þú´¶ýñÀîv2ԒÁ9ÔI?Ð £KbÊ{ÿhP¤Ó#l9 Ar¿yïÚi˜Pûëºa2üDèzƸýØ[óü, ™óKâ{8¡‘€ŸZ›ÇEý±TzæÉ]ïLÚOj&Ëо—d=0ÂýÔ0õ“Ñå#n|•†hhPŽl‘a #\£Ÿ%£—öšÞgK¶ä%û>XôÜöD¡’œ—ÇTgóÏFæ?Ý6 )p“íƒj'àéoxdų*1’9†a¾—iÆ"uä’4ýE¨›}=¹©ž "xˆµRèˆ)Dà[Ùý ë›VÝ1ÑϽ=ˆ}:ñKãŸIAxÀ‘ÊÇ}Ò!±F¸÷SÍElj×í}4†ֹú¦è“‡øƒD£üȤåQ’©þÓ+ebÃ1Vâ=4— d·b±r8¹q%‡xõš%?Ã~,56¨Žz™LÙü…b¹£Ü½v¸íiyÙœÉ;ŠH~â{³×œ©cE[e×ð¢ùǹNzó­/âpuÞ'̰Tá—=ðVxk´˜u­U¢hg)0sZMBÇÐ= ÙTÀm­¨ÕæU’€Z“g¾h ȬWB+E|¸bÅÒ„ÛÅC±‡ì€X‰©_YäÈ€oqNÁKzëØÓ·TŽÀ§çŒë‰m¿[È%ȳ,mÁWóó­ž‚`ø1ÎjbUôŸ–‘H{CÆìØéiÃ=[NÄt‹;–tz9…ŸoíΞÏàþŽfèËl®`潚}0ö3#×Âiá“kÿ>3¶œs4ñ_æðÖ¯Ð<¿³äå.F†ýýTU~ñ óÀ˜µÇ6y«3u]‹Ä^å(¯-´õ[Å%ël~_Lœ3—Æqéª>›kå˜0õ-û£øÂ(…‰œï ÆRUç®7¬óÑl$ŸˆKgùì_#i'Ë»{vûCA–]U}©Šù}MCT޲¿ –¹Ü}+ßë&¹‚c#hŸ •@'색”&»Y¶iãj*¼‰v_& áÀëÿ¡–€uÄÍCEˆ\ær±O _­7 ÈDGc”µšp²„€bÚÈÐ&ÖadÌ)ÀÙθ¿Öÿ–F%}ë‘íÉ(ëí8Ї‚FBå§å5ó@X`ŠÊæ*ÿ„qtu El°"œG÷ïó_±|¥ç¾¢‡tu§ƒMÇB-p“±­¯Ëß!•’2Kg\3?`Þð'ŠËK@:*‘ÑÆ"k¤n`Lß2…i¿g :M¦e#ÜcaÖ…ü0‘Ü^×ÊÐ3JŽžŠ×騑'I0)G:¶ÊS¿šñ\]S—Õd7¨ˆyæ{Ùs®´Ü28æ¾Öw‹1¦çò«R?O’ƒµˆ爞”¿ùj{Ü £ypg“±ËÛÜ(ÓIsããÞŽŸÝGÓ (Ø¥vã¿ÙÕíXÚ{¯L”…«Ï‰¸”jAM®R‚9~Îë&ç˜Ä;gLÖ9´7v¢nÔC;!ƒ¢~áô¸=|°ïK]?56ÙX‡gÈ –ŠI©¶¥ú¦Fýv–°"Òˆßô'NV£.6p_T2™d Üpi3:‹)X±Úx‘¤pZÙøØ "‚© ^'|ÿL?W@—žú…—Þ“W !{È ^»4þjq”¬Uí±ò<õkDv Åeˆ4FðŽêFägío ešåL6 ðb«lõÈzu®°”ºs= 9¬ ÙxA‚O<žS5®ðóD'cë¸bi¦6Ú(êÖ4bÖ.›Ó‡l²{Ô°ulÉis³¢MÈf-™ÉjYŸØu‚HËÐ Ø–„'–ÌuOð•a¿w A1Ð-+ L#„±ãé)›>m.OÐ& š”]VŸmâ F#´/–›R­Z.êý,- µ¯í[ç±ËØ~þx 0~fˆ;VÎJ¶}|ç{¿F­¡Q7G²‡ØJÍ¡f'hb"ÅÙÓ²~¬#•âC„ ñonòrùZÉœa&×o™D 4±›Ï¡¾Ü‚½BpfjΗ%¸ï‘î(ë:m×Ç§ŠŽù¼‹Naå ™Æ7G›4bõ¨á÷ìßô«Ã’ô’À!@›1ؾ@œÒV:²¤_Áò¢°Â,{D› õè÷AØÅ´ œ³6q¯Â¨Žý¸S‡t¿Üd«ý°)è`²w{ÄýlWåñÎÌÕ¨[› ©í]±C‰ú._3,Êæú‰o SÉ'"z#kR˜§ª}Þ†&& Z î ru$߃Êò[<þeÒO‚&z$('îž¼ÌK·ZÝ—÷~ã­ÒàÑ?GräwÖ×Ò2'Ç5s²ðS{áÒï/†x S®P ÿpyS!ʤfº#5ÂUÊ9häÑ$Ìs–xi̲Ï]j àþÈéCM…þâmxZéoyžÙ3PÈ#l–õ“®ZqÛpÇWÉoâ‹ìŒÆÇž•X*’mÕäâù1©‹Ìô|l§„ßÖÍú÷ÏüQZO!ç½àÔW: zyJo4ãzÌy#TÈ yÛÕ–-»Z½ÄgËçÇÜ2Bø‘-tA•2 ÏÃ<´¾I ““,±'ðú6µ± $¬WgTú|×ÞRu]Ë¿œ:’m>,_Ênb~c†¬ðµàŽåò<{!¹å⛉X~®ä—LC}M=j02IÀ’ ó™¼Ùbc–M2 ÜRXìßE=\"= ¯EÎðF€Ç²àêSvw~!TÓ@B6°ÀJË·¢‰Ž1Ò9JtJ j­×]úv°üB-ƒhZFˆnš(GÔ~IOžÄçxýuUc§à†+@…çýA‘}ð!Ûk2 »œ¾˜^ÆáÍÁi­ :2¥ƒÙ˜u¿F9„Ã~€©‡Æ€¼žêNTr »!SÈ”ÀºY¶S‘K¢F§ yÑ«¹#–©1­¶}˜»Wçö³s¹N^†C¤…×ù*štüy¬µøëH‡Ìt(_¤>‚clÆ U†mÑ?öGPð•îW(ÌKçÁw¤þ¹™]‘ýeºOºA3øôs‘âÿû?»s°t™›<Ž:µ?•AAh¸MÖJ8NûgŶò‰œì 8âE%#WàêZÍ‹’‰úPa‰cBò¯­Ÿ¡Îä:ªÍúÒ…*ÉâÝK²[¥ê>hY¡M7‰Ø‘~îz™•Z1ûTj(ÜÙ‰x“¼ÂYuV*½® »7UCMü†Ö¢ÐÇ9î:£~È„¥—ÄžfüÅgÈr¥JÅ”¢dFȪ¢6Ù ÐÑ>ÈXjÆb}µf%ŽN¸]|}Ñ:HôDÜu…ÐèUn¤ºc~\µô{¹#Ö¸¶ h´¡sI‡›†ú0ºÓòÔíT”`Í¿’ê@ð:óØDƒ…ü ºÊñP$á&P¥#@ÄTˆŒþa܆W•Ìüâ4«¢š_–[–*W]µPÕÉdº‡6_ª¶#!bQß¹¹ÞË WbåŸä© ‚pꓞ¿D.UöãXsÃNé3‡= :4)†= &M’<²âÙÂAf›»9]K¿i÷r.9œ K‹ɼ3Ú#RÁf{?ûfVW]OeÚ)ªž —–Ø!3†ÇΜFãÁï8‡·"mA8úpz‡0£íœSªiŽhC<.?T(žæØ¨ÃÃaõü¡­„-Øü>­èBåÆ:ý…¢å‚Ä"™}Àû‚ eºžà­r%åÙu™6y¿Q}‹Mç’½oêä˜ ´W…Kvíú#fœáäLƒª§Ñ}ø7ØO·ˆqnÈ©Z•WHÚû¸Ø.8 n𺥮,?bY*âþ¡1WV˜ÂQwWK/¬„ (´ŽŠ[ûĆw2#§ðšøèQaå+ X„éÖÛµÚÿ/] ¢ö¾-±˜c}w˜˜md±=¢íZ/™øe6=I=VBõbááMdcY/pöŽ/~ûˆÃ’cQjM5=QÛ·\LÆÜ2¨JCwúi;ø­Ezbtkùè _@X}dzx«zßÌÙsm›þÊÚtåá–âè—@9ù±!Ë€|$™¬ “dìÊ~æ4by;¶éß[ .G <'B-Ô2ö»F«£z'vîŽ glt[?“]?Oý{΀KB˹tI1_Ü‹:“['õ˜IÀ`‚í¡¼_–鳬OêgÑaÌÊ^ÅA¿TGæ¸Ágÿz2MI#ùñ£ÚìHí}1ƒ€alvÊ ÆAfRœê)¡KÍãš” ½W‚ïˆ0å2û ÅN %’üC~Tœ¿1Ì5«Ús ±uŒæ_éÙפ°•0al®¡((X "T5F:iñ§©hÅw®0´‡„méaÄyŸJO!¡V)ZDLÑ÷½Ð»‡¸èÅöéüÑ@<\ëÝ)]Í1Å´»FPÀ™Û ¯zŠ(žN<Õñk†»Ã#×ÐtápC·þ®§¬ÍEæ:æ4@ß/6 Âl˜¯Ñ×Ô`ñ¤½ôÐm}wŒuI0o~‘+èX®Ñþ“²êŠ×9ÒÜ2CÅá~Í’F÷Âõ‡qÚ ?ôt5íÇ “i ©>©Í<ñsͰ#äbÀb·øBI ¹Ü–±Ñ—q¡ío20ËQ˜œÔVeyáùEŒ ÇçÒôwš[¶¨‰¼ d‚æu¼âíýIåñ%­ÊÀoWÎr0þ!=¹’rh.ä#€¾?³ék º:SÐKNDÈ-qü<·Ü€ YiðѬ¼w,d€iŸ© Q¥Kø&¸6úíÊc#ª|-e…"y%@ â+Ù}"½óº £± ýÓÖuo-9µÛí„:—¤:IcÌ…Nv™G>ԥ𰴄>¶];‹([;ÙŒÚÚà µº9×û:ïl Å:ý gs¨v¹¼ðmü@Ê}Ó„Z•eb”ù­Q¦Z¯šyu¶Y8ý3§Z‚g®cde?üË©ÓÐ#Ú¸i™£<ëpÞ›£Y_‹<1rlµ‰91B»é³‰µxµª³=ÕZ>FažÞ” VhR4)4Öãžþ=ø$Dýû]®Õû>Eƒº®OàŽÄf“Ä.44¯ï©Ó5JÞ–ô‘ÿAq~í šÄÔÌÉßž¤Z²;2m¿ï%£!û‡€-õá¾x’Ltd Vfc Qéù—ô‹„›ßyÍSðôû ÙZÔoâF÷àÄTÙ«-mÉf 'Ž}ÞÅÆÉ ¸MCµr,ôÕ'‡_åŽßOþRp`«ôp,]qhaõ¬Õ¤éwÍé—šÈ¾Ø ¡ÅÌØfÛeä‹^99åÏ¡Á][öüg“^`hPÔ|ЛŤýµD•äyš’΃VoX[VžO1ƒo·nÄw¤bÂúxi²,mlåÁñ––u^ì¤Ö3WùPVAÕë]mÎÉ:ä Âf>`Ì £xOùBì)…µë~ºÌÕ]V²ÒY”ððqˆ00&7A*™‹ q‡7  õTdÖŠ×Ùû¹û÷äBëJ=ÎMË1sêä4m.½: Î~úò´úžk¢¤)ª(Åd9PQ•Ž^J‰ EÿÊP{»uo¥©gŒ aÑ¿ Kzìz9In_âñGB®³–ÍèÃî ¤1Z-@‹E‹;üé ®M÷ä[]AU§GØ’Ô¥ô\ì±SjJöúÒK„’З7_íu zÓvûL"ü¼¿™Ò)aŽ[˜‰cg†õB.pRâ Ô•/g;±®Ò$Îߨf`jZ’ˆ-³Ÿðé¸Jû®,²{É3X?.ÛÞ&h˜9‰Wüzèy™OεÇm2‡Ç\ˆw¿Eg=kâ£ÎË`~¤uÁi%ÈøÍàMæéÙ$4$Kv~·e4É‹|ªË2á`º"ù ú0T±{Á4H!„Ö¶Ìâú#VÔ“Ç žQ@º\ÏjGEP0’>û%•¥Ž=Å"÷¸þKOu@±ÈüU*Ú,‡o²tþðÿQ F¦êÍ›odödôe…ZjÒcö€ 2ù…Ðu ¢Å%½HÌÕÀ`œó#LXÀBJì X±{’^£ú ­©µ†<÷|qÓ”€Ã áÐÍVì]6qÉGTÔÀV>â÷kZ{ʃáq¸¿;ÃÏ‹ÎpBF¡5·Ì<Ó9@ý$ Rrd‰(ìÁ‚v牆q†ûu‹{±#'ÆÚÝ ¨ÊŸò5¹°SAH?}a7(QîæëÐ&W‰Ý¬¯}‹Ï½@€d­8ŠÒRú4ÅfÄE0h/ûfCü×õ^r” ™{a-õ=; m¢« ïÓÒVe%öð›.®¸ù$<¸'8+×aÀ¥5ì¾G!?ǽ™ìÌÚ—*¡Ñ=*‘ÿ)H5mjåz\BÎ#hiW(¼nºªOÏò[ÓZýÿ-g-c-sëh¡ÿ0HXÔQ®£Iï€T^vAüÖ#·}ÅåýT Ëë¸ãÌ®Q„ÿþBóÃ3Ùš-Ô™ÐGJ5“Õ k­í“ 5䂸ñ÷»?¹;¦«†–£…äÇÓŒÛ'<ž†ZEm-ìÍžð~¥ÁqrY$ÕÃcU?Vl…‹#/Xù ±­ ü:Ç/|Ö R'GV”6ß&"ç/P»8¼h€¹ïÁÚEî¦Tœ}ë"š.Œ6Ô´ý’¿ËAÖV àªª`XÒ kXäÃ"´SÍ€:*ª§âp&4ëÁîÇW|Ÿ{I‰ò:ÌBÊX -š’Ó ‚j:6±óJø‘~K%aTGÔÝieWg‰>ÀÚÇ•;ä["×+ûÒe[&ùÍjÉX:Šƒö€µK«t˜œž¿'A\«‰+,B¦s ™OF€qIU’§%¸Š~ñI‰‚!»z(P¥…–v˜QûïÆµ5ƒ¿Ý•&ˆ|W`] "t´9/·Þƒ¿M°™ÓTŠž†=ç™m­HëraÊªÈ î:Vjß endstream endobj 310 0 obj << /Length1 1644 /Length2 10188 /Length3 0 /Length 11025 /Filter /FlateDecode >> stream xÚ­weX\[–6$¸»î.ÁÝ!¸Cð +…CpÜ]‚»w‡ÁÝBàn¹w¦{žž™?óõ¯sö’wÉ»ö:Ï¡¡PÕ`·›eÀVv€2ÈÞÌÅYl¯ æWbQZ¹^å 'Çëm|MŸ“ÛçþÇ?ÏïM!N w€;+;;Ç+èŸ'ûŸØÿ>ü Œ´ƒ9ØâÏ i@L,^gï‚?js'§WÊÿZ¯õÿçù¯[ºÍ‘çÀæ‚A6)é©jüì1)ƒž.Ž7ÁŽÅušy~•àNß”° þ2“Ǫ`Öú çŽO; Œ»C]xvtIÀß¹$>T Ýy˜«´ßÞ1í°£¦ê|ö:™UZ‡Õçe×ÞÝSS7*z„'øÆåôöä†ÁÊ5χúÚí“yrm nF=VuþÁ!müþÍ5]ßðà@ç\÷1SV " )þ§ÄŠˆ‡‰Óeù3ܽë;çòM:•˜ñZnžÄs.äÔWÑØ©Ç\dV/âÐÛìbsf1Šn¿CC£9 âD˜ÉG$'5ŒjÚæäx—ŽjERlÓø£AÈ{õ‘s²)TæÞMö0½tš¸Ë™ —cyåÀ§V)í Ìp¸ ó!ÑB$×T5]|ʧEÓw€I¦í‹‚|^äK’l¬Ì(-k9« P˜Øýê½ý‡ÊÒÞºÂ1’äîîNÆ;¸®Oe=I2ÌŽ©šÌEÉÝÏuNÇóð[°³#Vª£r%†Å4[U ´+³æ¡Q_gŠ®1•|—ïî mù=M?áÛáGyêi¶@î~kwntßa´ìA¶¬ì9+ÛBÑÑGãŒë~×ëÓZŠ`¨<07ùºKvͶ%ü@ÒÑž t pœ¼òJétp:€–e$Üø6ŽÕ™…T2°bÅ­IŸãï~Ö."}tiJj˜ÊJ{p31hð‘´ç¡©Î¢}‹&Ù1#ŠøU±%2‡¥Â´±¡2‡Qp^¹KyñQ¦ÈoÍffêÛÕ‰…‚#÷ü x`—1ƒæ‘Dž½H@pýjbÿ¢,ιj×?}sCL+ÛU$qr‹}©Ôiʨr_Xú«¹ç0ï é9uð ›] µ¦²«çЖHò†Îe —¿ÆÜ$w¿™í¹²Õa­ÿyÓµ5euËÊÌÊü˜}l‡Ì )¬6TˆÆ¯tÚ¬»NwãÛC ~C(ôÅ ·ëð ?ó¸’p›æÖ\nðoõ|Ìì3£Ë@&=æ¶ÄÉE¤¬exqòo2¥Ï+²dsrEÁS’2PjKzÓ߯;K=dƒN&p‰˜Ò?’£ã&2)PØÕ  ~ î2_ß_!À¤®š‹ºœiªKþ€çyrb–f¬|$Ç–ÞWŠ.ü6¡\qáÝ­ÿñs¢äÃ.[G”nÆržï¡wåFk§| f€VZ¬¿ÂEäþ|Ó1º?,íY<†~L»É´û`jvk© RR^^1ýQ5$VÅk×ûÀ–KõA¢VÛhVvµ¤NËiþhyœŸ%…ð‘ëGú&ÎVœ®çÊ­3}Úû~†l¯ïƒ—UúR½eä=\³?÷Þ´ÒceFbdW¬~V×™Fc}Úö4³ª…—™¶}W—×nhI$V¬›²*#‰¬?&mû´o$Sp©€FvOH­°ã@´Väá{>-$Ë0{zÆú5¶>Ìzú]ñ$úÊxoœÒ›éà}v‘8z²PjK/Ä MKÖTÅR/ôM36ë̇ù|¡ß’rœê÷ÕAœfÍõ~ìrü5]o[ºªs .O´‰~¥ƒ|šgð¡~ƒà†WÇ(.ÆP–è~G&µ¹©]Q ÌÆ{!šþ`Ö=*™=²†® Ò[Ç«’h§ôóâÜánªÆ½ý~òatÔ¬ºÏk c¶/ə߱ cS|%ÄX–L¹ht1:Roùv@ ÑÍý’HÈKÒ–.%"ñkê{Ž^@œ !k¶×öwÔ\léç7#õähvr›§4J÷¡^ ã1É}š¢\ ó(øýÔ¿¬—ȵ\¹ÛWcDÄq’°L¹ëßw÷t‰Ã`Dö¶¼Éû¤ &ÌÌ.(¸C” áàÉ\e"²O¥ ÷&ZÜËw™Ç.ù™1›kÁGDbÓ7ZÉõÈ?]Mù(ðÅ­HLjì×e9›Õª7øÃW!_Ã.Ê!š<^7êy¾“ã–E²Xnù&:âž­I¶ë]î7ö!ãY~Üûg8R†beXžË,Vƒ ý-5]Å®Ì1•¥ïýy3 ú=ï³<ëß+@d¸ðýÔ~I/†£ËݬpþZŽÛš ó+ù^ÓW4žLè›"IQ *èkΕ;%}>=žÆ`.mgt¼pæz¿(ˆ$5½Xg“ì!ºD V¾2·³‘ÑÍùiŠ®™¬FÆ|A¤¸ ›2ÝxÏ KÚ+‡ó蟻Yˆkøð¸5Ìk²µÏ´|à|÷s]E×KD>ÇÝpuâl컽.­¾~@N¼½Š‘}ƈU¬Ÿñ.¡BšŒ÷YÃr:ï6cÚºx­±h.XS%ùc8#‡¤éÊ·fBÞ•—äÅ.J çŽkÓ ¹ˆJ ü0Œ¸¶ô~¸r7ˆP¨ÝB®û-7/ƒà-{ Tm}Ð}~5xžH¹h;ØRcv2Sb†ÀÀÄñp'Û2Äÿ†ù¹î³â]$U«QD´8N ÙÀ”·Ì”ëškaðÑ! •°é =ƒÊdFE+ü•€# Ú‡‹Ïšë–BDAÇþìIv–z¡æSÍžÉÖT¨Ìf„#ž ­òlSã†."lž/{HÖFWá¥nD_øy~&# YŸi©à¥ÌðýéïO»±¨ú¶å4=ŽàR!x¦œ•Y/ ó ⱕ”sÊqS³“P¦v®C×$R;UáD1$!¢ ‹ñÄD&·XryJÖÖL Ik–Ã0t,}œbM¬\·5®ÂÐæÅJÔŸÇ[ñqß™Àñ噜ՓmkÝ:T'¥ª¡O^Œ­›&|‹¿¶•±woPpíÃ~¡·`Þ ‹»Ç9›m¿Uk;å¢ßª‚¨ëCÑ™™/a6'“5‹¨ÚUyì †¡Ô38ïGâýç½8µ£Ý‰Ô¡8·˜JW©@Ó= ¶Ñ¥F9Ò·´­Ô%ˆŒüwVœtŠÖ÷³5Gà…V2oe[®.Þ+¶ãõD—3ì}Þñ™ãjV?usÄ^9%W§¸‡×ɨ¶—^ãó£{^ŽNÚS{$dûÒæJ?NXUËž«ÊzÁíYƒx;ÃRþ²'‚“Uh“@öþðŒ—À–ÆÑ=?¶+;²Gª€‹gIUQ£Å»ÃB®íS!AbFЧñ•>`ÛŽ‰,ÅmW¹ÜÇ-ïÛºDcMç‰òÔ¶¾å Íû¬ >]„ ™Ýï/.7t³”Ü[«¿#ôk2©åÙ9¤Û?Y}jf óæáÂdBâŠKíU_F›Fc:ˆœo(ø;ëc•ÎÒo±ß zWR–x…Í ñe4>e.á^£ë½!\»¿Ü)|4ü‘=[š]¶`_¬ùO¾çH‰¹LåqM½8·}51ß/~ÐçŸ4)Í7ÀaNÔÔ£¾ß-Rr£"Æ$Áµä&nƒ”jŒ&æ,ñI‡'#u«j—þEÒ%[!«a#žmA•…ŽléL&! ѾJœx¡è}Ìv5ü½]áih¥<©ƒþxAQ \ nwÉË¢ññB:39E4Ÿ±3ÂâU;ø–«uí‰H¢Ï%0¶šeÞʼnf¸qÜN„5ãðÓ¹ÝÝ»_A"‘º\\5Þ˪I’aîFJ¥'ôP¡dAëóõ! %Þa¥àJª[ÇCs~¦gRªÜ‘yç7¿;oÆVŽZþá]\™ageæ)'Ižƒð& ªçŽüùä;Š ó)kYbc 'öe"ò£4AÑôøÃŒ3YÄÞÑò$ÎûÍ»¸– žÐx ´)3aÌÞ r³;5ÍÇÆuÇ4Sù!QÂiÆ·yƒ®l71‡>VÉýOg9½°vþn ÚV ¨E[‰ŽŸ‡tx=¹6¯Ùž8öe!×õfhÏVÇpîañ°äAçK’ÊE˜‡cËVò0ªÏ¶{zq .“kÔUCÇ~ ÌÓêÌ:éù6G+ÆŠw¼GìùX/¶×žs¸=˜þPMÐoçq8œèvñ46ºÕµô°q E*ÓL ´pWNÖS°„ô_~V·5³ø»ýÒ=F¿´å¸ï[ M[®€Zž#§­µ† 3ZÃuˆÜMl—ïýŽ6bYËLÙTÙMó&>£ñ>mIÁ6:\xý׈¨þS ;upÇ'LÛà‚¥½6K)Ì©Óïx¬—|{Ÿ]2»÷Ä¢¯îM,PÎÈÞ»ó8i䟞ã­e´hÓŸv¾0KN­Éõ¢ &¬?CHK;ÅëÜ[é~ع{ó!”ƒºY¼wn×ÒMƒyØ%DŒíwgBËÆS™ÉÄ^?™™Îü%›Á(Á73M”º“hw醜¾Û!kÂèJ¦ú›]X£´Ä·š@“fýäMDwuèÌg¼°¬­tã*™ö&„F†`u¼¾†oGiQ8iè ¼ÑY*s©Óç ã g0쯉‰àžW&=3†ÝÚïþj4A4:—È¥ÛWkö“îdHC}+ÎnEÕsWR´žØI”³ënoŸX•î…âpP…-³‚Nq$ƒÆîð‚@_Î(j»cM΢ÁS?›=ì–!‹²¡ü60!Àcr¤qvÉMÏâ3ïwìx­7Œšº …Šü ¡ËëO¬28ÂwÞ±Ä ÊWÌh«ùî'©w·á]GídôwXþz‚àöxÝúÈ£µ"q¾gS-ö ’¦c8™È×F… µâ.‹Ál&àÂ>Û 1«h¨´ª2ÐRd‘BÊêu7°½,Õø¢òö}«\ž§r°gQ@¢îkKÊÐcìÕ¬ägH,Ú(q ËŽã¦]É÷ ÃOȵÓx«*û…”½ÑðLLí½ÏθªjhìUaûôêP9.ºm®Ä^Ï„ƒ7ã ²`B»}rO@uH~•yªr•ªeoáÅGÖ:˜,kô/+8ú*¾¥…š&eOÃ%HòëÌ$ÉZo‘ò9ë¸ÃÖ¤‚¾ü†ó!z7÷„&0˜CF-TÖnöõWÅ^{ˆ–²¯ÙxíLø#”sè@24·¹q¢áeùJ_÷TBÊ2óc^ðöWkʹ`wtQ½ Í¨ˆ 0?U²ãuŸ/²r7¥¼‹™^vŠóÁšúTmÜüK[¼,›;:t<ÂB}ûàhÙ1ðãÏ™àÜÆ‘‘.)øÑhbnƒkd ³UlKm®|`qM-sº¡ ¦ÏV¥§þ,Frö¼¬°b<0§¶ àË©Ú2#Òt°­ ßÃÖŠ ´Ÿ‹¼!5ñé¨(óìd±Ÿ±äû‡ùu­q|‘LaJÓÒtQgPâø›”^#íóÉ ý>ƒ g)÷4)bw»gH ‡°3üÂ3¿Iìw´üc"âÄiŒÃœ-±Ê¹Bñ4Þñm‡ïιã²:Aì/*Eá„ò E±/hbGˆ'’“;]†~}ñºû¼³( £&*È~z½8È•(œñŒÿ¡Þž†ÈQÞ0È‘«Î"ĶòÔ˜¬·ëqÞ¸å¨Ûïµn\ÎØ’Ÿ¿+j´îÁÆŒ¸õCÚû¢®L®5ÏýÙ1òãl Ë–ù'c/eý¢™†{ø$¥WàH¯žãR¦X_•ÇûÈU<ÆT&!œLXl{ýÙäîD΋Ç0«T|l+8H]£ðžñsr<çñ2®†4+KE‡²UÞî½ýŸ(g·gï›'ý]Nôx,‘ƒj±÷4Cº—Ù9Ux¶/É}G@Tqch³‰àþ~q-͹¼À¢ÓËÔ78ÙÁUÈØÅ웡TF”îè9˜pøDÝ¡-Üy¹:zävêÊÚ.üw.ú¸ß“°w>Ñ ϧŸͼΠB–é\lý.p fet^#Î'¶?óÇ. ÆÀ¾„ 2Ì/1Ç…~ˆ›3nÓ=E¤"Dý›ÙгÀÁ®­ÝÞÃåR¼K»Ž„5WžâOöÃ~|Å…hG¿®Ô×¶ÊÜ~‘5¤U/CËÃnå[y ~3R`8¿ÇJe¼Y:-BáÌWx;œÄSþÉd*žM>®Mp5V™»˜jTîwW”‘ùô)^•H “)‚wʬ°Jéf§Çf—êŸËöiEÖé ¼xEø¶‘sm@̈þKGÍ0o"«Á9a¾¥2‹9?Ú>X¡m$KÆ T½åï9ñ‹v~*oaÔtï•ö>m ‚3·2Ë=üÙ»& å7û0¯îS¥¡¾‘ÚÛ5ó1ÌÓDÍ?µˆ£vüñÖÐÒ•Œ5 ’“hì‰ïØs®¼lCÙÇbvB0o®Æ¶`˺Å<¼¨s2<ð’?kb$dרÓÚEƒÄX·DgíÌHÒ6Hø~ˆ#{¦ÃY¼ár÷;z•–OóÆégÌf__îuƒ9*&dgÅïÑýÊ×€·—º2ñÙI;ÚgJwêl·±DÄaJeE´¤ÚpGFq§(¿Ê2³í2±W¡º’c‡EHÂ[º…\'yŽÆŸcÔ'Ö­y;+ ¾¼ \äãxÞù©îŸ‘oéFM¢BÍØÞ]`Ûˆ$B1hy·þ…6q‘„üîXd¨öxTõ4&ó‰õ;~êùuÝ#,Ÿêû”%Q2¸<Ø`ž|K4~²ÎâÝ€jÕ}¤‰±‡óz044ó°2[ ™æ—èpÚwù}ƒ5d)PIG ·â;x’è‘RP*ÝIp‚–Ñù´5Ar‘ÎÛ4‰µw[Ð`. ZQ ,{‰Lׂ!Ê&¶ÙÏî‰(¨}¨8î­|‡‡Í[ë¶xè‘wE†Êw‡[(c>;wÿñŠ6iû9âà×°“>z¹í¤Mp)G÷·O´ðé¨ö¼êð³B!—÷òN\þ,èãô™¹ÝØ­å| ’˜ŸÏ8?­}Âs&‰ï…­(éÖï¹ÅYÈÂp"Úÿœ°—në+2”4K“ 'm×ðÄ?Ï»,³HyZÀˆ§\G™ˆÙû .¸WÁ5àóå†!­\;@h¶#ÎmgÚÔZxÑcNâIvÞʻ  ^3rr– ªºD_SºÁyã]8b度’°òïG¹ÖP„úù›«^Õ Ä·9Sðn*׬Ã%ˆ,\ÙWCöÓÜI7Îéž]ðAaªé‚0Áƒ÷ËôùIàé=¦ ¼XÕÏ[ö“43üT¯Œxê+Óùß–²2æïq4‰ûRx!ïÛqŠeFš+·yÏé ›i,p%¾#Hˆ~šf g´;ñgà2Œk Ïê0ÈïŠúZûeíÛÛäŠ V3ò9ÕRI>x35h—KW4É »XbzÀ·¬7Dƒ$Z6S”ZÅÖiŠÚŠ L9µPæ6è‰eûñ\0t_ßõ‚ºzîäM WÆh  Ò6¾ )„¨ðšô?^ÄØË*Åêj8=¡bÞ¬®ía‘€ƒ‹!¼ «Öq}ø͆„C/”lWù¯ØPjˆAü«cƸ–¡aܹ;eòͨ¬ØáE™\œ5Â,©ø÷µ,–W¸þÃa†_ËýðWßNaÆw;ƒvÏö‡tõC`†Hä0›½>6ó…JEw%ždIÄ$ÚP-Ä>‹³<Õ¶ì0$Åô…J/ÒK­ª—êûtU¨Œ..³b…³G˜8šp_×7ˆîŠb n3œ§²N¯FîðÛÅ"yP—ÿâ>0 Œ(: Z©yiGš%ZIâjá(Œ†ÙÛ2I{ÃùÔ ÃJ¯Ìº3Ø|wšÌüÞ¼’EõÝŸâžApËlnÙÎÈÅ2zæW\¬öÊ6ª„dö¼!é\l{ÊÏ-ßßoqfŒ®Q2)q¼E] åÁè•T´Oi¼lúâ×ïžä–6<æ*@ÝšŽ˜`*·!.iÏÏ./3ªšÏ(.{–»á˜ª±áQJüLˆÁ~=–®ªLþ2–¯.I„jðøx?ƒ‚ÚK{Ò‘3@ YÃöŒ@µmxrFüZ¶襅§ºN¯)QÚ’—‰ûÍRU´€M¦>rK'h”Ò*aÏ´úÃYCÇ+Ðå€Q«ÀÕò×b;á”ÎUðRÒX4Ðu«–‹«ìÜwSïù9|Ä!ìR„9_ŒÜS02e±#¢jOMߣ´¤õ%@èM@Èj¶JnU‡cGz*úº‰"aÐQÅc£‡á¤tQÒäC€h 6Õ+5.îÛhƒYP˜c˜D®†;DS3aþ°ŸË¨0 a‘€ãy"ïô§KuÎÐíW……éæ÷늗qˆß* ˆõ§È¥Ï>’jËiZ.“&Ë8ÔC½cŠ.ÜøAŠÝÿ–rÜ?*EÙ)à íÎè£7vÜvyæmb JŸÒ/6Š{®²Å!CÔ˜Šsm§^ÖZSR‰ã6‘Ýg‰¢õÒ˹ãS…⃃)CÑ.¢XÐB I-Ö”It׎›ìþ°Žä÷)GvE}šdÿ ³ ]»Ã9}jùápßRýJ8·,*M£.×ü„‰¹‡¾[RÉb ]̦Hè}IY()ب%Äá<7e4ŸÉ#Þ$*>ý2\¦æÎÏC„Ù‚ñ,Ó Îk¡’¢6Ò?þÆ«ïÐ…Z$)Cù’—¤Z¬ñ8fÒ< P“Œ«; ªyýâÑFs¥žÇߤ6Ì«B11y\|Øz$L=îT”ÕðHdZ:º…šMŸÆ°Gtµ__ÿTF‚½@ý €™¦³´¼õqu›/Í*•–œa7ðàµ`7ìy|‘ó0:ñ»îü8ÁV9SàŠÛ+0«ßËúQ§(âQúFc»ãþ`ëŽo³(Uy*-mmŽ&–tšˆåKÏPhήíäÓ!džµá®‡à¢FѦîubSP®*©€¸ ÅÝgäæ} LBïb,*¬e1?/‰Î=o°ç*%`Œœ…/­©½ë',1’cOÿç?¤>®¸ñÖºt8eær+Vv*'Պ݈èIÆ·=¦ÅäYvëXv£Ÿ}Ð~G+ý©£*¶ñà]”mïd6MÞeV_ä•n®K;Ƈˆ‘¼ÚSÄü"—-K6(-¨7#Õ7s“¿,àÙ7„ÏÃÈÜÜ<¯ð4îûXÖ2#ŽŸ`½ÜŒñYô1µ/ù(ìÙ;§½U믪½ w…%¶·Å…G ’;_Q ç…¡a@¡]êÔî¹ú=ný$®[£¼õvò˜Qöj>XTª8UúûFúwVõD¡²=:¬4wvDñ!u(­ŽT~Gçî°Â€6v±]™¶ÈÐaXk çº»°ÎÌþœGß¼tÁ­€•Bi g6ÔûÉ–rÆKìûVìâD¢f¢oó$è„x(2!vpç½b³OyÁeç!…ˆ}8ág7"§´dDMÀoÃúî@+úÖŽ uþÇø™5Þ›‡OÚD®4QXŒN iÚáè9S˜8Æ…ïù½Œ&ûÅ÷®‘Üû5À£ÆeV‘›Ã/›¬pS·7;}÷rWÑaéÓ]:iÌúp¾„ôà#ëW(³ãïQå²×ä* 6KY.,o¥êZ?? œ:ÀïsJ‹8˰i5n~˜Óã°—…ËP!³‰Ú1ñ† hÞÞGæ–ûŸ-d}—gS]»fêÄhGp[rç^z¯ Ëâp~UÔèÆ¼[ÒŠßÀcªa<3qîkY êWKÐ&îl0–OŒÓ®ªO3ÕõêN¢¯Ú—]oN¦º·™”Ø>Ç/:ìðº·Ãaõe†JÌ×G`{Ǩ*‹H¹øé¦»Íƒ’}Gêz´Yùŧպ–×½‚£jÐÊ™©—ScãÑŠásÑ{U{šo¿~”‡vú¡¹#Â,8o+Œ[ýx'„ßOíwÆM¹‘”ŠS²¤Ùé]²OÐTKúòRŽP·ÐQæ&xlÎIY-6m<é4Ë)1äøõE-:%×|TžIôÛOR…ê›]¨£÷]¦S¿«“àãUdI[ƒìä…Ð9=‡}׉·ð숸†¾åMT1—“£5ä†S<ãÁ³‘Axn.ÑÏ%h Otý8.øÞÌz21õšqûe7+wȯ3R·½šº.ˆ °Æ•d@`Ðwömº¨Ï+ô柎ßÁä²,–åÐ5«vaº£Ä£×j~ÖÄÄUT±`^[‰KÝ üÄA†¢¼ÚªÑuÞ!läA:¯Èd¯%AI»ÒO|ª–­~íÐàÄøÓ ìepKÞkqc M¹?ÛÏr?Q"E*f•T õÒìëmç¨ì®c~\Y³LTKvËýàW‚÷}w§ÀªUdÕbœ‘6%TÄ+ à°Ð;tÌ05f}~ú‹NDİ¢“nn$Û ù²Q¯¸ð?)£2yIGžö”W¶ iÕ‹¯ÏƒÇÕfû¹T¿•…ÖB…1mí„è šNŸM¾?J—~Ók]Pª\ï~M x®5ɇÍÝÖTDïÚèÞüN×o¾m½ì¾OZ1KÏ3‘"¿p–sÿÞÕihŒÞ÷;†½'\ü|$Ì!­cWÒZçž©·¨[vÔ»qæ‹ú\—çd“(3ð…¨†±£Ð”ÝG Ñú‹‡×#¬««ÛQº›ÅD”“9¢Ö 1¹õ‡QU"#HãÑ¡§ÖÛƒx¡XŒâd°2B©Ç>ý:DÞtÚ®ª¯úºz&vk¥IDV®\¨6¯æK¤waÏ•ý>#±_už*¾ø¥•½ñN Þ!~âÔк ²MÍiT×Ëq3Ñ ÒØ'!+3Öâ"o”¸¶ŒzE­ó‚ÒxÂà¬((¤6Cîñ™䪜‹ª%ÖAq~·ë©T5ȇh^<}ÀoG±sUìŒDlMu}nIqD[ÏÎ|7tWë_ôÛB»®wMa'Ò4ýÇ®wÖôÍø®GéØ<ñhû †™>5Íé``¨z”vÑï ¨äcœÖέë™*/yø;ðî~¼W\õiXMë&¯3z=êÚgT2•Ì|'ºfäÙ\²Mu æz™ZàB¤S¤õ¾gamR s¤úÌq‰6Œ¨uŸêÃ6X+/£À¸ÙÐ!Â,OƒÌkÑ*w”¤°©¿ªóÞ“!òQŠÜ ¸2K‰Ï“[#Ux[s ^$VÅegR†~kdçÊûªÇá‰Æ€?I,ê㫦^„Cd07òÝI½øûp&Â8j—ŒZù·÷¥ág©À½¯l“trÞ'8êª#ÃÊY*{o«q1¨šÿ[üý endstream endobj 312 0 obj << /Length1 1647 /Length2 11308 /Length3 0 /Length 12157 /Filter /FlateDecode >> stream xÚ­weTœÝ’.ÜÝ¡Ü%8wwwhÜiœà$¸»»»»»4Üݸ|ß™3gÖ¹wþÌÝkïzv=UµŸÚµÖKùQI•QØÌÁ(á`bdebá(XÙ™¸º¨8Ø)8ðÈ1ª-\¥Aƶ€wŒ‘’RÔh ²r°3yš@3€ÐÀÆ`åááA¤ˆ:8z:[YX‚4ê*š´ôô ÿ²üu`âùOäÝÓÅÊÂ@õ¾pÚ:8ÚíAïÿcGU ²Ì­lQE%miI¤‚:@ht~/BÉÕÄÖÊ ge ´wÒÌœ¶ÿØLìͬþ*Í…éKØ` pqšZ½»=LŽA G ³•‹Ëû`å°p6¶½ßÈ`eojëjöWïvs‡¿rtvx?a÷޽“)9¸€\L­A€÷¨JbÿÈdi ú+¶‹Õ; p0?iæ`êúWIcï4ï(ÈØÊÞz€þŠe˜Y¹8Ú{¾Ç~'st¶ú; W+{‹eÀpZ;›Ù]\ÞiÞ¹ÿºÕ ø/Õ;:Úzþííð÷©ÿÌÁ ä´5gBde{i zmaeÈüW¿HÛ›;XYþa7suü'ætþû‚hþêÚ÷$ŒÍìm=f@sDfÐ{HÍÿLe¦ÿ=‘ÿ$þ_øEÞÿ?qÿ]£ÿòˆÿßó¿SK¸ÚÚ*Û½7À?æ à}ÐÛÞg @ð×°±5vü5p¬Lÿ/Wc;+[ÏÿÎùßOkÿ‘õpþ;üÂöï 1²r0qüÃlå"aå4S²™ZÌmß/ïo»º½ÐÙÖÊø.òß÷ûîÄÂòo˜š¥•©ý_jpüÚ›ý{ ïºý]³¸¨¼¤´6ý3mÿ>¬ôÞ 5OG à?"iÊ;˜ýçæ/*€7#+'€‘‹åý1¾?G6ö¯ÿ°±þk/o r¶òè²0±°°Þÿÿùû×NÿßhÄíMÌþê#U±½Ù{ëý§á/ØÔÕÙù]ñ¿§Á{åÿÜÿý€@ )âÊ¢ƒ)_°ujF¨/gxRL·¿—z8ı¤A­0߿ڡÇ/5t›§Âè¥&„©ÌûÚæ¹pêøg_†î`´×–º'x™Gü•œ¶/cƒªƒ‹þ Ù %íL3Òûj^nëƒ'‹ÆÁΤ²ŠAñ , ¸ã³3üÕ#­?¹[¾?6Ń#ª¯iJ} N'z#fmÁéUÂñãõàØÈðPÏ Lß>}v %Ÿ1žoÒéÇD§‘ó}ƒé+̳—+’;Š7VÚWòûO©¢u^sOlþ4%wA`=‘—†ËF¯«á{KÑ/ä€ïÄ!/é\>µäѦßn¯Ñ÷ûù~¢±'mÒ˨§w¹iùÿlXNFñ‘`¦ùœ~.íqkœ«i¬ÅnÙÂ'±J£²F’¤ú âªÜ|ìGˆŸ—µšΛé‰"«©—ík(²§Ž;þ›?¶…ë~,Uì#?¢6ÿÃ6˜Ó+.çùäÓù³ˆJµª9³ÀiÝZ>Kq…õJä­×K½%—”/X»+kî«Á t%¤ÏÈ óc ksu¾˜É]Ï‘èf~Yö*çLH'ÔeB6?Ðï$åûƒ“šÑQ×ÕÅ;è ½8oñÚ™{¹ò4â&¼SÑV“Š<¼†é¥ 9µoðråÄftò)±–aÊ(¾F£íHRmóPŸ~XCŽbGùáê¶àã°o!j{O‘<Å,ŠýàEÈ'ªÅï1õ5A•V8 æ×Ô]w‚4ÁÞÉBùž]]úé2e¹ý­‹Y…‘·ÿNš:™?—ŸÓ C"ôDGwâ~¡éX¢ë¾2\­$l7"6ØWÝ ÿõÞq‰I‚Øßóæ¸ÓSÞ…‡jžæe¼\q,p5Ù¤ºü¢­O ¬Èïó¬Ïƒ‹(å—¹#Úd| olQs©£NóÈèìªkE{<Èšpå)âzòçyà™"sõ:ƒyx˘IjH­n¬À­ú„‘¥u «î*YlÏ*"ו9\F.¨¯«©¦d×í™kÂ'ýñ'bvBy°ãÈ‚f9ž–osê@¤z6Tõg‚„h9.×Ûo¹:èÓ÷û#wªíšÜp'3¬?†Ô›žïí.Òs¤û–©Ú{{[…O>R¿¬Tù±mVÐR¸žwêö¥¸ÜżZV¹° a¿a™ núƒ!d§?RâÒ^ äHŠÁü¹ªèÍ·µùr«ðu¸Šëë›Kö>¤,áž`>:ʯ9PQK®¬æ­$ W¬«ç—­pqƒSátÙî1©)ú´Ë‰Eb¤Ëf»'"µËîÝ)ÍKаŠûÈT|3”r¼£gîÄœÄ1£Ûo[>§Ò¤‘Ì?–Âßlp•çFßÿô-–•ýäâpܧ¿* ¨¶i‘qkŒ ^-ý¯<_ôù¸¤S+Ï`ÁBŽ·|p¼”]ŒíÕ­n‰QÖh©`ϳÇ;-†dwf”¯û¿·Õ¶ôzQMhUÈ!n½Æ·-~íH$–Œ’) IÖº%åCFüô=¾p9á•?ŒlBWe¶—OÄag*(èèN+&Õ+}’äƒ@+ŠiHñ— Ù½»n½‡çQ[íüÏÚø+Ùªz±_†ÊuûxQDϲCóãˆ;:-u 35®ÚÈ ÔƒÎ⫇-ñüãŽ@E&èØrŠ‘nX†Ú?£ ‘tû]’„îQyð›Ë€K”®±£Ï)å!Bü~é œ>!;QTiFmáÂqdD ¦®x¼$“WvsÔëã#6Šx)ëÍ%r:yaCôr$5Ö0’ãmÄ *1Á@q‰ùÊÆ¹ ‘¦ ^=Ù––G6ë}¦Ý¡™‡æ¬žs}¹Å!»ŸµÑu‚mÔÆF´U*Ëbð,"¹RÏ3j‚n•꼡Çk”Ãd’äNe/…®*‰Z‹z9Ì’…4â:2Éÿà†#sÓÌ{ÔO&ò®¤]MÆg7D‰ºéð1¾¾VË›ûøH÷Î'`ñc±8F¦ì𙣔‘͹íS÷ åé26¨”®0ÍiA ê… L2™(|è¾æ©Ðƒ¾s2%(ÍÍR‹¬¬¼£E¦Û—½.½©µ `YC—ô¿¦ ,G§ë– ‘…Ä”¦ü™ZkìÔÎëì°õ13ÇîG šf…RSWܺ ža°”º!9¹æh³óÓÚ&>ª²P³¸ã…o´‹êìgÖ°f¾PÝ¥Ó_ü™òÑ,D+^—›$ŸjêÒ!höÙ’sÕ¢‚®TéËTJ°çÕ„Ïw"y "úªÉÏ2»Ó8¡ŒÜñ¯ŠVö˜¸4ç¬Ú®Z¸RÖeŽ‹ïÉý"¼¹áœTቒmØØµ}[\èHƒèN†·§“:6oØãÒác½ö 'Ey 6PÃ@˜…ÛäN”>´<y-¦Ê“gí–M³6Ôy¨Ó²à7ò“3Vñôr}´ÎOÈ @×i˜ÆnY¼1&îÌr¨Äï!&áÓÙãUÎõg–.ðùŽžËÑ_!‚wN|ÌÉ›\U~?2ˆLœg/V‡–xøÌ"v¤sú´G^ÐWÕ#©žãy6Pù-rÀæ‡jdj6¡?[7^XKwçÙ’œíd+PjnLÄGŠ·lYÑÖÄÆæIl} R5Ç“¿mUtüc²Ñ¿3¿š•6->pÍQÈ63+×Cæ …í+û¹x'àœÊÓ`ØðiÜX[ –¦~ðbô;#Œï˜,ZöA4ÞYÀÃ"òâ9³¾Ù Ñg—à5J7Ç ~íJ·UÎêh õ•v=–áK×X½vi¾5¤ÂO„¬±€·¹í(µÀŽàB†É“úôá»%k‰˜‡¡øÚ¶øj½´Ó}⢷/ÿÙLÖS"«jM´¿ŒÝhrÉ[Xël³V¼÷ðÞi¥Å’æÓÑHŠÌ=3|<Êç›E\®ì‚®ÝRÁ³®{ðÛŠ÷-’\Üv[u°£2¹ÅÂÃÈ;F¼SÓÃÖ 3³ÓŒöp&Qt@ìu³=Ä3,ü} c­îs®µn ÿÕŽË:v5 œßQ5…é=Ji*ÅìÐì×T,¿üu7ÔÐ$Üd¸oDiŒ8ó8Ø&úÇ”Áê¬U®ß¾àÆ: ?šøÔâÏàÅÂysQFgŒNe¹Öš¸¡œNÿr½ÅæŠÎN ôa~Þg¿'´YðSA³LÞ2fF÷] Òk@üÂylÄvzÒ¯4h…×@wÕBèhܵCìëŒPfi69hT{ª\ÍßÈs˜Šb4ÅfËWlÕkH×’{/¿ û"0vÛa¢ü9÷G=Ûøж8IðHóŸ®ÆóÙæ‡fY•±F½$uù f“tÌèÕg¯-IÁ¼”³Éo¿=TtÛýÊ ÚÇ%Oª¨hsÒ“fjV%Ÿ+'Å 3ÚËÿíN©toß®c¦‘Cf¾à›Â×ã<¶´#Oæ ÂWˆE9K÷šk ÁáûØŠ”ü1þ7:Ò‡…Ð@an¼Kh ç¯MUPI©RŽÂSC„o}üÌþ¹MÑ÷ÜÔ°VýG‰4Qá¯P<šaqÑùN6øÆ];˜'¸ åEstz´ÖmÿɪmÙäï|ôšhŸ…Hi#|±¾1¬¤¬k!Ò×#&V‚’C³Œ<ª”y¿xX#x×¶%À=ŽËB¬1ÜKrDŸ~ E¶;~õÌ|#†„Y­ºD*‡,*˜š-mò–WÊڎظô® ‘bËð!\Ên©.-½½ÌaGÞÝ»9t(HÝk¨‹#CÌÄzRÄÄÆÙ,øå /¦êI1­ŒxÜ“CÏ—ÆÐótˆe‡S-¹ji·Gç=œ¦È\¤®\§ÄÞŸ²„ëÿ¹”«‘ʺ›c_´ªuðS;_úë«J¼PÊJø£8Šõpx­SO¬^d¯ ÊBÙ¯­_à­)ºä¡u€Þ·^Œ½½‡ð«Ï¨æ® ½Ksëu~M‹¶EÛ‚Ìöûj~´·F^[¸À"S¨ º¯=Œ/÷Úõ\íE­ä©¹ uÇHçÃ0í—¼´rKJ;W´TšÄˆk+„{“©=I‡PŠÂÑ®¦™Û[ÍÒãê;¾ú—öÒ¢‡5Ù)b ]qê§`$\z'ã¡—xžÐ»Éó‚àNïµÝ¹Ûã:6,¢Ã?“Ñ/ÆŽ?7Ìû„\Îíð"O‚~h¦fmˆÇàzéH·âÊ&ìžG]~a™^¸kº8¢qÙå iRaa’ìtãñ ðM„9tTUäXÇë&ÆÎu×vPlÑ ³ÅERTb‘fY.YKV¦ß¸Ç‘Ɉí>h{I<@¥ëw˜çéf!rÛ àK„-:ÿfaX­!K>ân‡èºé x¡¸h ê7I¬_í–pá¿â†¤ U™•ŽZ áäZYG à¦!°OdKzæ‡é'r Ô5´ADàÍS!ä{ïÍ[ÅÄ@ûîÐC!S¡8tÍÏ^ÒNI+Žûô+™ÀËà:ñ×_€\k›2Jö:‰8Åìò½#ŽTíc¿O~Zõ;ôñÇücwûA¨}ÙWäMfbA‡îáä®1Ïzií3¢lý¡à½ÚVÿ9ó…zía#ÈX>]ÛC7wϼ…@œÐ¯"wÉûy=Ñ(Px" ^®{Ž"G¹n‡—FÆö²^‘»yìŽ÷‡aSöçfŒ±%rìèqñÈÀñQP“dQËkÆó˜X’†@A5Ýd9‰î+ÍâÌs[Ú¬½[›–Þ ·=eã wÕcdxÛ© ©ÁboµáÒxŽÜÁ ¨ÒÆf;Å’û`ÍgW,7ñpÔ„,Ã(H¼Bƒ`S¨º…hÆŠWá­Ð™dDˆô¶aº ´[êÙûìÉæšb"°QD´OO‹âïÓÐýÚ˜>Í8:-Ù°¯µÙNSH©P9©Ÿh«RïI²ô¡¾ªkõ%¸ßÿ’?mV2K1ØJzYº€q…gön7Yñ€B³h­Aò\†ÂYæ ¡TÌ¡i™R#´ïŒÛs¾åâ Vt•†m8óÇn‹6%¿3"X|UéI€l9ˆ›º'”e\.Qþ½ u±±áµ›y“æíGƳ¸O"f$û}ÉLÛ?LŒ@,¨o¹™C–aÎ{YÁ4<-Ö{¸Âž^Òø9˜eŸ·Ä:N¹Qa£ï ßÐÎsp…„*Ó^†Ùº£XÇѯðÁ6Ÿ™;iqÁ“íëŽe+A} kHµí¬¥x»ÏP8ò!†¯õ@D屪žòMy`|º´ñí¤ºE1bæÜ,þAÀ—SMdúÔ]ïŽIíK¶¦%ú*Ö5ˆ":Ò²õ•REfî8§TaéE,ÓŠz¯æ#‰8‰à„7>ÊÌhZ«ÂgÂÑl»//à-³T6›5¥_êj;‰ÉÌSkÏ>Ù¡#V_=GH®¯¼´n<ÐΫÕ÷º[ô ˆ¡5SÔ J7«03ýK&¼b]A»ç²p:ØÞÔ^­'“B£zç©p»„g Ô9(ëCfóBo!ORóì-zZ~̳tÆÉµ"Q†g•è˜>ÖR‰×ƒø)[”úhò† ½ÌúÖž ÷‡ŽuÆ {EôQû(%x›*úãnÞ‡GÎ$Nåzø=AÇmðÔín:µŸD]!qÁ9Ö¢q)óÇø­Ò’=„&½$˜öÕ—á&ó뜗jW’ÚŒ2ÁóV$²7ã‡n6ãUÍ=@˜­šO=׹硧ኃ£‡ó@kÄTâ¤Õ™”óš— òÈg]ã%ú¨ ÝfgA/8Š$ö—zË2A×CÅܯûó×VN7yÈåµ- ÆÙ¬«`—›¼ÌÙ?7àc]7èÄ$ÑBù%·íÁ]L´LÖ:ßLJ]´²ÉÜÜ“ÄnAÄê÷^Y›æŸð©>ÒˆpˆN×8(¼íjõî?&LRQ0ÆÅÀÐå_ÛÞâE¥ùÈÈ~§ªŠ6i—pû†‚Vò›·id!;uÏ©ti÷‡»l ï9éâzUMƒ²Ùa¸;ôFB{¬ü.x?Xü*øçÁ‰ûéZ0L ]Z:.ŽƒœÇCø®/Î/k4²´:õ‹ÀÙHI’ò–äX˜£Î·ˆšMHbGÓI,¡à®pó^µ·Ã²¦ uu7( È›mn“ê½®ø½Ô{iX”3·Ë«Ü\D¼jx_1„":èǾ…Í@u7óèÜcEûŠÑw£{$ª‡Š~•}³¥Rf“8Ζv›ë › ì§ßîëY,Ó`ú\½µ QL0:hNbÉ5Ã-XÆ—Â<˜ÞˆôØõº>>QÔÛ-«,ñÿ¼,z'âŠíÆ2Ýb%þŽ¶× þÁ V!=š%=«ôq>¶av=aدDŸíõ_€ÒKš°Û“H =«TÂm«ß´Œ6æ°ºrí®0š“ÿ-¡>"Ê¥ìB8ý´Žâ£ÇºCÒ ‹¤ôŠé0‘]ªü~4 \ðÔÏ #øUÕÿâ·ýP•T‰öqözD"œ¸É–Õt[=%V]\dRÏvvÓà˜É…Òý|©Ëäà•bÍêÛ\ñŸ!µÑˆQl~y£sþLï˵¬ôƒ“Ù5'*‚æ??|×ñ[Ä?b\ï.HE¹q8¶å‡k_)ö jžm¥'·Õ~„€«æ¬õýV•ȉµúIR;Ć?JR†Gœm.È“ÑòNÃiß—ßmÌñº —@E›±BÓ¶°<§u›ìÕécÖ“óÌüöhŒ«Äï0ú«ScU¡OMNa9ðºûT.¦YÎl© ’w¨€}%ÛSô ³>Ù<ëú]moÞÀ7{ßôÂ’Òý9­,O•;&1“g¿½5¿Õi ‰¯ØíÚfN•fÐ'£ï—ºËÙûLWµjãHÝ/êÂé|-í²fUnÅ7¡üj…£s6xCtç„5'Kçn©¡„.° ÚUÒÌ=Æ¥ìz‚ZS‹z‰.S8äWö©†ø'ÊÌß«·…‰qý>1¿ 7#vG<º]"Õ V’èt±–fWsìatã²â¾¡5<;¬¶>pâ<¶UÌkTÑ®pÒ‚êü†ñØ!hÝýØœ! yÊ©ËD‚¡)`‚ìï<÷🭠ɷoäXý í×ßÔxM*Ñ>O:Í‚ÅD{Ëß «oÊøF zðzf¢,ã ä{šúÅ>\»é…€£¿]±:ĺ¢¶A´Xëë/p÷¤o|d¬•RÅûÄ.äPÌsÏn›ó€ Nº~ÜôÒäÞþUpÄ*}ÁÁ´¨£rä““«~Kƒ°¤ÒÖ–Í\ÎÁÕÖn=­uœ YÌdÝÒð½¥Òî¬`ƒ¤"Yé §Y_Z‚õ „]L°ž.t)›}îžm·®J¸Å©)ɃôªN;až«Á;™?l1ÉC¡ÍIß¾¬â»¡ I— _ŠÂ.JtaÛý l:Ïl—0źÆIÊfÂŒm^H9Z«ZÛs„Øú„ÃMºþ&;Îb.e*Îe¥ð‹µâ‘Lf]Å;øÔgêË=_ÏãÔrT„xjÙ°F~uwè7<»„ñU.ûí"ïk()°ï&´ü¤ªª;ïñ”`r"Pã Á¯ƒÛØ¡ËÒg,sš_=Xh¸`h*º»KªøíiÙjçöEð¾®Wöúp-æRÿÅË5FgùíþóCå ¥”ÆO!‘Kl]ÛU2`PeTÒjvÏáªmf/ÖÜ=.'¯óégoJvúZƒæÜB’fœò=t¶Õ‰!Û¡ÿUºV2F7ÄsÆÏkÕ˜7Íkñý?k¥k bß7ûá·Ñ—ž·ŸPKø·‚STRË~“v}‹I)!.Ù@Æ ^ká'#áü­[Óz\ù]öªdë™ a·k¥N­QlE‘[“¥½ktkø’U`¦Ä¼ÀlÐ y/ÉÜõeø%õò[Ü©nا†žhe«GƯÑõ©¿3Í4¢‘¾¦:ÀIñ²7õüŒ8ØÌϳl»§áyOD¾)J‚,þ%ÐÁU¸Â„¹ÌgXŸÎ-f…wOcŽH¨R¿™óëkËÀð|–ý*Õþ(§ŒÂ§y{ÝcÍí¡¹à»€Ù áÁ:|]älíàrÓMY?ইӹÐ]"ÁmÅÙ»8òœrÇRA/û›‰ƒñÊ4Õ95j… -БäbÌVîŠö‰ÏóÝÐ3[æË RÔ¨Ø6lª5œ"¤ET0¡Ëe6FÚ,ˆïýÈ_9àÀxÀΙ›ºÎÅ"ÅÙAö©"€kÑå->J’Âú+}ñòtXdÍ J« ~ƒÉ—1œ†YP™!d ¶œÂ±+æ¢ãá –“Üù¸Îñ Jâ~2æyµÜí;<ÍAaÊÏ-Û}ŸGñ}æÇO}äþÒ= L0ý—ËLyø|èô¢ß+¸ûS|åS™ K?}G¶|î²K)70£VÙ©zQ·n¡ƒ¯£b”¾{tmá¹RÒûûlÖ LCƒŠHrõ){åÙ× úØ(öH*‘}Á³òsQ'Ê>ˆ¶4)á88ñÂgÊ)KáH?pŽÛü1^a®Þ7¤È ¡®¨ÌÅ|’Sæë¦Œv&Wã¤&¤sÅúæ[k€ÔPïQñCA±ui%‡ û{NáÛÕ§~‚n€;gµ^éÃ3ï™dY!ŸÞÎÕ‚]Ùuö…zîèXÕU¬’™Úì²þ÷é×› ²ùð8UsôŸ‘—ýûaÚªˆßš™pv;‡0‡Ü;#I.úÚ¯n«è3í|e[«t¼&ôXÊŽ²C&"~rKÜk9mGÿ°~³çŠ2…Xñ÷ÃO_j òw%×¢ÚÖ³®ôgz´`+uVÛyPäG¬ãé3m®‰×²ß¼)çÑkå'´glõ쵓ìé¹A)«FÖ¤òÌ4&v{]‚ÜžÓ ÇüF‘ÒL|&NŽÅZŸÏRÁÍ4•úËë„;$³§*c™1c~UöP“J¾ãÎ&Ï_le­£Œwu]þf«µoÆ„ø'n¹2p«7UØvè´¹áÉP¹J_qjnì¤+ê;r±öùjë£ZùÛ¦SöD›fåîåúOŠ™NÄ®‡/{ú)b º|•Ԛ̅ü©õ 'å‚+^ì€C@w¸s,†P´N1O¶]lÅ)½Ïÿ¸ÿ°$S`e7ûù;”&vìFÀ½ÊžW‘ä7 ·ƒý‡9èZ„‡ta÷ªDŠþ¹ÃE ûTcCì!Œ‘³W÷ãü0ÖJ©" %âÔˆK *MŠ ·|ìFȇ-&4Kd»—MÄ“ßß›´4DzœVHô¼;ºÊRO?ˆë ¾Í.^þÝ7>|ÇhM2UÝ,Ù³…gßel‰¥á{mûóç=M¾ÕBžâÂa<„äm…‰l¿×€âjå.µM°ÛóÅ ÓðtÇìé©Äb8ºIÇ1¢ïÖ cn!‡~ØÐ>¾Xw³ßù[¥ëlÓ®ôv)E5B8ž)isUʱŸ þ4(qáÅÝÅ ¯f¡|ÑÙ¯oê=íÊÉØÖyɹÖ¨`äø¬Æ”žt¶³‹w¼2—¥Z#pDÈ@L­¥m=ê(ÍSÞ6ž2 Y1§o5áqLÖÔº0…¾ÚÄWŽôÌ]ô[_0Å~Šª°i)aƒfâžÞú¤@4Çeß“"_¿ô|{Θßvš`0:Fc 6µ©*„¡+p$„*u©§æ?Vоƒ“A”wÿð LH#ñô²ÍüÇ»rr”öQaÁjñ¡PÆ`$è vIºËtí+ýH”;Nî“E®KÙ×#÷{JÎI‰©4?YsS˜‘V'ý¢3Jñ¤Oµ4}×»=?dµr%± ¼x×ä'çÄøµžÉþ®üSõÞ ¬n¢\å3E[Ö{Á’Žßä4ÕœV Ôwœ¿ïjÒ#®q•vs†ù»§ÈCÈ9[.~ŒJ¢Ú!,m³ê[,0žßª±U4Fvª¯èÖî·Ÿ®7¬ L Š‹Àñ)tÊ(°Û·ËºBⱩ¢t=Ö/Åô~›Ú[wÞú½WT XpO/»Pè4r´J‚õŒgÑO)nœ¢(Õ–fBLrÕhnF»þÌdš‡­«Ÿ†ÁôH<Ó$Úevk4/Ç ¸ÜV½ :òtrbkD©k6%¤„CQütj<½Rg*i‚,°&tË QŸ[+†>I×½Úíª°|û"‚õGMGS^°íI¸Ì–×U+É@ò9“jå'·µ»ˆv:Ÿ˜®G‹z>†TmÃ|dÙôµOXùŸ ûzŒ•ù¯ÄbCQDÊ¡°ÃsI'XÄ¢ƒ(Š…öÑ:uµ·OÛ9vzÞÉò“·úc3L¥‰…Y‚¥©Ü^&1,, eñ=mr@ÄzàÛÚ °©q™¿ib7G„SrÔ Íqˆ-ë;:Þâ\$§ŽëB™<ˆufÌmæiæx8>óUܰhj£Ÿ³)Òà§¡ÅJL)îwVLÑ#/S\· •.ÜӌңŒ5‘Þ\ä–cZ˜•5›¹÷ŠXY<¯_lJ¢QÝ…íˆÜ;É…{%YŒyÄ~h „GRBœ]Îó"&F¸k.~ü©¡2ƒ˜Æ¿°“­ï©ž¸Ðµö¢+’KÛýµ5ž‰ö€ˆÿìmO‡Fpj„ÅJ‡[Y §­OÃ+rˆ©ã¬ù›X$Žè®.Óœ>: Ø®ÿÉLþÛJÇ™móI´BGF«¯œ”~Î3{6Ðófù‰Z>¤¯)ý×+pî¨Õi#˼žñzéפÓ²ÑIš² sª‡<g^™ŒµG£¬Ú½š˜Œ—d[á”ÉKôsÃ×…ÚYâq<6x‡‡79ÌÍ]›eQKÍA*ã“ùKo¨…1órëð¢þlgtÀ%í>^*«ëš¹©Ý°E¾äö‡:A c%è1íW! »Ïôƒï)ŠLÐ×Ç–öUé¶^muݪø$×`^+ E—üÝýñØÑÀœ·4™Ê‚ÑR¸¡›š][Ah,{)‹ÚùZ빉(Œ†¡8+èÆb“Üm‰‘™ÍZcð!z5-w ˆLhƒfŽ„¬Y…ë΢³` wa쳜ÃàÌÊÕínÒG“« u®@rAáyošØi;-kjéËÑWE02-yþA®‚”Øßªy’…DŽk è©=b*ü\f}O¢íFvaçŸ÷ ñ  šÖümåLEÂ÷³»††¾\§@(œÚ“ ”nâN¬ÂÏCH pAÉ*g\ÿ&o”7Ê’& ½VŸñ6æ°{§_“ùø}S‡ù/¢9E8ÛçÍf<µêrQ.öù´ü*ÇÌJ#F¸¡ç–ƒNÑ2/®Ï×4Ìk&¥¨ƒ0ÿu$žá¯9¶ë)°ÍÜÐ ß^K‘ååÏ¥U Ü¢ëqÚe7šRÝ×<òTá{w5÷Ñ;ººðÛl”Ø6‡ƒÙI“³ý¡5Æ×cÀì;©ar6MÖÈågS ¯HñÞò ÅÛB]sƒTƒgÐOŠ€,µ;ÞÇ9êè¦ ýSê×zíS´ ÕKGŸ¬¾5;rÐo¦»Äö›ˆ/¡¿FêWdU!5ñœ%Ø‚­g{üQàE>Û²c0=lN̼ò\Cw=7Áº•£ò븽¶U¥§àáÍ|ßs¶è܉q³Á¾%¤B‡ÑÕwg`฾ȅÉIg´%Ýéά†(‹I IFŒþDÓY’ê±z|rô(ä%2þ†˜íe(@*Ú¿”¥È[-Vâ…3VØÑ¡žÍ µ©ôûY]´‹û“¦=èD‚µÕ¤6§zw™H]Ð…}‰‚•ùA{ it=c2îþõC€ÔOÂhæZ:*6wåþq?D¯?f:{cÞÃ’jCSlAÝÆ5 zêQLŠÁBJ~ -ý‰1ÎéÑ"mÀ`Ÿ\‰°¾×SX‰ÏH«,¬›29Çêkâ…£Çp˜s‰9ád„ÁÄbpÍïÏœ˜ ûäî¹Í¨3¤2Ÿî^7ðž@‰Êñå•ÙŸŒLœ‰o´–ĆãеËIo U³CWËYÆj¾T,NŠH2(¬]2° sCˆöÂáÏi?Z¬Ò¦ί»0æE›îvŪÖÌpp.Gþö©ÉP÷hÀ¾Än¾MZ\sM>W»Á&(ù-l(|Tê3ŸŽé—üQ$“Ä+Q&Ö–œQ™eôÄ®0ËW{®Í¢O>t£I•? uú¨tmÁ!ÕäÞØ6²asÚ;eŠàfU±ýFÊh >œüÌ þÅ^R8DPÈ:.lw$‹PúÆ&bh›Á%K œZÒ¹©Zøå¿ÄÅo 63óÔ!Ó¡ü”Ï~ ,³'ÓŒ¢\¡gªNÑ‚2G®š¢¤&ïy=!lª:·XnðÁC÷çvXtN[¢ Õ Ã%l(Ψ Œe­†EãHÉ'øÆJd³`"í?öw9£ÐR_Dz¼­ ÙS^˜qµ¹RŽv±å娳ڹ#šÁ²+cætÅŸýü‰f›øVô ÜáNÚŠóüÁ54iŠ›å$az°nî´ç Úïmlvœ†ô tÔVRSZ×ëõf”ÃÖ¥ˆå{£2g–Èeßyh%žÆp›ütÇžàWnÛ­ªêõ¼<8wÛØ.w‰-)n^äíû¦Ì%ºÂGóè µ©P Ìjƒh¦šôh‹¯æÍA#zä’ ¡Ân1÷Ìø%ön݃èm±BkÖ‘C~¯}z`%lÅ8@úà;v¸£:ùÞäpaô–ônd¹LÈ“«OÇN܈à²hÌÛŸf­b{Sdß×FLöܪ2d±Îòk,˜cÇ&ÿÀY·Ì÷ É<ºJ'»n­’XM«K¸óz=ý‹‹ªÂ‹0CW»Vv¨Ë&Â4:(ñQ$üíÃhLšsØn'V;ms”ð+€±ÙÚw4EÒn̤Up^únA¨@»ã•»W£ÌÒkÌÈÈN³™ò.ߟ‹O"D&iœ5]‘zm;*=²Õu4«WvHÝ÷‹7}¢¥Þ ã!LNÌ-Vƒ2Ü™.7²”Ù^ `ˆ²"´ÆÐ ïÚëêîšy÷ù}šþ€¾Êöâ0Û 7娫m¤×©¯{„LsÆZ‡¬Øk‘lÒ˜r¦TX+Äã“_Ë\ì3f[[飹0ÉçŸW)þrW{aÄRJÕ(*ï¶¥’ŸÒSàfµGÕxF¤ÅN ÏZíÜ/ø5úþóä‚E‰>ɸôQÓaÒ0äƒ+Ò ÚÏð܉¦[‘ô´ÊH™û’6-x ooæ Ê¥ £(#÷@¨vËÔœOLñ/HC.ŸYär)ÌŽŸGB3zªo„cæ—ö'}Z—##,„Ú(n9\~Ë+¨=Ky¢µµ$jáýF³>µ÷³ÑM¡ïlo‰Ž$=Ù5:º$R?žF¤³žji&¦É¿3@â;×Ïq“þ€¥TGW¸…ãŸÜ[so¹#è‡ÕçÆ'û%6Ûm¯9 €#4¯/˜ÁaZ`ÔÌE1AcÅ.‚"`ÃfG¨—ª…Â9„ðæWV<ñi~B©(%`ªYm˜Y ´$i%"[Î_c `cÞj’cÑ0‡FÖc(3[ÿ£DÇsÅÝüÛ.à §¦(F¸,#mF4Ñ–±ô\/Ó‹oÉL„qY:±î@Û‹|$Ôñ¹ŸÃ0°æX¶u¾M/SÜIt¨½mvySÈë>`%€Ütg·ó!ø2?Ê|9w¥jeÂKÂ[üZ8q¶~ |\nP»Yí >5ir~Xq;Èù Qµò–'¯`¦H9Õš”+º5Š)ž*S>ì|bÏà0/(ç>JÁ0^kq’—}É|U‰«°Ö‘û“•ƒš–I#u³õfȰu^öÿL%>+ endstream endobj 176 0 obj << /Type /ObjStm /N 100 /First 898 /Length 3387 /Filter /FlateDecode >> stream xÚí[goGþÎ_±ïˆÓ`°ä&G®r\bŠZK<³È,‰“_Ï;[8Ë)Q¢u»;;ímÏ[†¤„SÏ„ó™sxÐ2áE&Å“gÊxdA ¼ëLpI*BJ4°JjܶU:d’cXK¼4Ò£“-7h`ã K¬éŽäDÔ$´…BƒXLxÁF¸á’Z£yJQ7†‰o)@ÏиÀ*+0aUZoÒ’¶CÆÏhÄh²$6ï áïÜ»×a&ãyvï^ÆÑ|6ºlJ¢Û?ÿÜa/§“þq>Ï>fìåƒG{“›gŸ:¢ÍÞüy‘c w–wØ6ÎÇóYtk,ï°×ùl²˜öóYôöØõ,?ôö'ß²&˜®t0’]>ZoŠ-2ÒM/©,YNÙL¸¿=Ë^¶Xö|',7-å-–ÕwÕ2…Ó²­Aqg¢ø¶(ön´nM~vöBZ쇭Ø7Å{j•³ßRP;aÿÚ®š"(®Ze'"¶ìÝXè†,KÞUwc•³¬WY¦òêÇÖ²k³l~l- ÞfÙoò⎵,ÚÀr',_#ÂÜ:z œk³o~lË6H„¿ߘeÕbYŠ»Ñò.@"m›}½'uו5 J³XùßJ”Ðe«ú]*~ÇxWí£äNXÞ*Â4 ã¥%VjEº[‰ÛŽHÊüØÒ툤üÝXèÆ,·#’7a™=žN™3[é|]iÜ€U ¥Mñìý‹“ÿæý‚ÚáH‚/±Y1˜]\© 6 µù±mjÚ0ÔÛÁÐÜu.7íØfäNX¾“êÉ´AbÌÝh|ìÛ6`Œ¿íߘåvܲâo¤ñv%eõ®ñvÅd·«˜߯wða–tmð8±Q¾›ö]0Nßö7³üÑ+ÕU™s®ë3tWgÖÚ®C%À3'eW–cí¶ñ´Òӵ彨«¸Ë8Sñ8Êyë¢ýµ&zñ-ÙÞ—h .T7”Ý2¹Ó”‚̲•ÎRÞc]qÛ§c {—1¶î’-.⮟: ]ƒ§Å¬®ïvAÃ>H²« ³Ø6ÞtFZvIì-¨8!‰@m|×dNh€ÜKG½Ê|V«®Èœ·Âw :mù^Më9z‚ã˜é¹¢},Õ¢àuÆœ‰ó€[rèNžfÎ"à½$LÜ‹Fm¯Å]З‹ñ¦¹£Á›i°¯VqGɱ‹¶ä`Ú§Úaž³˜¡4ñ¬…(çYú—(Ó·•œÓžä7œdÖÚbLAýÖ“XÑ¥ï>%íg:aHÛNP$%Wž!Hèfclü>”Útñx·ñLAcʇØCsøš¿â›j«`jk¹ô@ø9,ºÜ?Ò$l€B5Ÿž´ÿu½ºÚ‡ö¨®€@×âH/ȇU¿S›®ÈŸÖqœä#þÒ¹Õ3ÒÂxõçQ¿±µ^¢ÞðÔRÖ|U<ê™ÊFmºª~W®mÈG:/÷¯ö é‰ën¢V‰—xçmîK߸¼·Æ%oÜV§Á]QÞ/J_û3cF,î>ºgq ;ÉÅŒ$Ÿ¥9³È°‘𠬱Ñ=-…8Œ,ãLáiäbЉŽlâÝûX€îN_âsŠi>Æ, bŽÃkG‹ŠŒ Àž4‘ŠÁ¤(*Yø<LNÙ”ÍØœ-Øïìûóßß &Cãã…«ôðîøèá“ÐÃëujмR·Q¯”`ÃZ%<ȇsûuѲ ú¸d˜ž­)ÍgÃÅŒý•O'M‘å6"?|zÿøÍ‰ì.—XºRbú…ï.$vë%žŒó¦(zQŽŸüòä=D9þ°Î|2d{Á’0q™¥0ìf(Ö|­8'‹á0Ÿ³YÞŸ&ã¦dvÉ^>=x¸ÿk”l•„`?}ë¼Ü…`ëíÔ›Íáx³/£ÞüœãŬ)œß ~9|}ðÓóÁèd1{6ííO†§kÜOŒ”­‘t½ ¥J¥4F¦RJ»‹‚‹TÈ y?F¡ˆC‰ž°CD£gì9{Á^²WˆKÇì û•½mħœ!2 ØÙħSŒºÜy¿.&óüôdX¯?šKñ­×ã£ãW¿ý–êðu~¶XŠä é•&¢¡CÓÔ¡Ku¨ÝêT…¤éM*üeßÕjìÔg½ñi2hö¤×ÿ2öfçhMÙÉ´×Ï£>c«Ð'5¿äóºíbYc0í/FŸ‡ù7$ád\¦‘Sv:±_Î"÷e¨Í¿õ‡½RÌçÁïÈ4“ÅF=›æ=pãžÿyqžkóÙ,z<çl¼€ûÁÑlñ!"©µÊ_1]B"6âšØ*ÖNfùhPˆ0˳Á7VèeÎæçÓe}¶§tù 2Lš%›ñ—^ki%ë"S#¯X±Î­È©ž&N•ºTU3^Nk”°Ønaº†óUn`7ŸQ–k#vNkp¶ ¹U~<|õþð׃kmˆ€d-ú–ÂZR'Ör¾a-#Rk‰uyÄ›ÄX1ánˆO¯—†«bU¤F§¤Ç|\5¦ø8kiËh¸ÄB¤ÒZ• ͉­Êˆ‡Ï~¸Ds$Ü:*ÉèD$VuFg›DgôšTžj5Λú„à¥éFè;hÄyRV¡¨ÊoÒpݪ±!»"¯ ¶ÂãÊaR‰KòåÃqr:ŸA´ÁçÏ9¶¤oÁ?ÊèŠCœÓ+笓{R#”õGU ,KŸ„¡K®K£hþ"D”Ø(qQxyRœD*q1ºdYbT¨<µòÙXßQ¦ªªh/¸QtkTjËÂ.©Ù²`ÒfZŠÀX÷²JûkòQ@M’j±ª "BÙ¤4¤óÛßèþê Cð§¶WÀ‹“y|¥N w¿7ËãZŸ±4œ0þ3düÙÄ£Át6'¼g^pÔ+_„Äfï§óóYüÌKzù•6V©«Uê"!nÚå¿nE»ùÃ*i³Jšž5mz©iûíi¯~(°Jݵ7 µóDíf{ò+'÷Uêa•:Oˆ«„´¸Ö׫›L(ÞBžÒk‘Wþ$¯Šzñ¿i·ælíiu•³*•J9S6áÌ턳MgœUîZÀµ)t|\¯wÁܦ3É*o-X˵&õ»àmS¾Ê[ØÈ›Iy »àíªªf…?¡®¯;µ þ®W¯®rÙòZ­Ö¡Ï®çòßf”1 endstream endobj 320 0 obj << /Producer (pdfTeX-1.40.14) /Creator (TeX) /CreationDate (D:20140225165814Z) /ModDate (D:20140225165814Z) /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 315 0 obj << /Type /ObjStm /N 19 /First 151 /Length 441 /Filter /FlateDecode >> stream xÚ¥UMK$A ½÷¯È?˜ÊGUª@¼xÜ‹ÈÞ–= ì ‚¨¨{ðß›š¼^tA†i3/ºÞ«ÊKº’NC¨qoäëB£’zdØÈ\ˆU©N¬Jmbü|blì.‹0Óˆµh!.3¨›gà‘‘4¨X­GЈÍ4B³:qãù̈Àu¹¸Xv?ßž´»Þß^–ÝÕã߇WjK¬ŸM¶B7ËîÇÝŸú%sAýøG9B;‚”ð{¹¼<Ÿ;‰4‰T2i™´íì5O[“¯Ž#´¼O« }3»'»{Ö'OÛ-!“£lfY‹‘D\ P 86+0 <gX— <«F퓆¢a\Š>2äÍ€ßЀÍ\¡Q¡ÑÖf…FóíŽú;¸ðû744¸à½À{÷’ÞoÒì×:Éð^ཤ÷Û4²_ⵠ̳(4 vÖ=ü“†«B3.rÁ”K;yýR£á.?ÍõñÀý#Ž—Œ5 vŒ8Ú6§s=£ÖŒz0Î<¿!é/Óo¤ñ•†`ÎÄOrt^7á³öÈZãÿ6_í_÷÷·K²üŽgÞHŸ®Z endstream endobj 321 0 obj << /Type /XRef /Index [0 322] /Size 322 /W [1 3 1] /Root 319 0 R /Info 320 0 R /ID [<6510C5286EFD00E456BD688784B5047B> <6510C5286EFD00E456BD688784B5047B>] /Length 885 /Filter /FlateDecode >> stream xÚ%”Mh•G†ç¹_n4ɽ77šóo¢Q£‰ÑÄóo£ÑcL55J¡ºPhý)­‹RWŠÒm!ÐEC‡"(‚(T\TE²ˆ+…V¤P±P„.Zû½ïÝ<Ì3sî™™oιÆóÞ€00&n‘?›ü#¡…8ÂÂØBi@DB}¦àˆƒœ‹i0Ñ-¦."Òa²fôÛ b1Lâ„4‹È„É®Ñn:FœˆÁä®SH6‘€É»'Í!’0wµÇ8u)±¦êµBòˆ\˜š2ALûˆ‰ ) òašQÜ~žÀr®ˆ(„é9§|ˈb˜‘;ÒR¢f2]ZN”ÁœH“V0§ŸH—U0ç^ê‚æÊˆV5D5Ì…TæZbÌåwáS,|¯¹ÕÄ* ëŠôb Pô@º–¨JI×õ@å5í¡6ëúN…l †6éF¢ húLÚLlºë¤›‰ /Gº…hÆî*½ê`+Ñ|üF!D;0u^ÚEtÓ1iÑ |5+ÝFô—~•ö}ÀÌ¿JŸFÝN ³·²ƒ~úK:Dìn?’î&v†õ cÔ=Ä00_ª½Ä°Ð¯=T±,‹`x1¥ýÄðÛ´”õŒ¿§VU耷©gdñÀR–Yv*}:¡…ð±ðUƒcÐÑXf°ùÍR>”w°Eújž7÷aO–Y©²Dak¿“.&Á6~«=Ø`>“È€Ýú…BbDìÐAi‚ˆÃŸ–&‰lØÑCÒ%Dì¸îës‰¥°I¥×nùDìä}…°ÇK‹‰"Ø©o¤%Ä2ØÏS§/#JaÏ—Vå°_×+}x柿ÔBQ {±KZM,‡½~Tº‚¨“²SüJØþ6°Ï«5ÇNñ«à¢ŸHÙ)~ \Æ´6Òb»ø:¸D¯BØ.¾®XÕéÙ)~=\m»”âáênJÙ)¾ ®ù¡”â7ÁµJÏ?2Ïvñ-p]ÏÂvñ­pÛ¥mÛÅíÛÅwìßM°I|/Áþð}D?ÜÀje€;Ó­Ñv¸«©›ÂÝ8«Ñ¸§í„û3õ%‡©ÒŸ¯ß…ȧG4ÚÈùW #r?õM÷ ˆ§²Œ hÉÐh/ïCpêGÝ2N$ˆl"‰àä\XÔgæÍÿ4BÎ endstream endobj startxref 359381 %%EOF vips-7.38.5/doc/src/0000755000175000017500000000000012303146020011123 500000000000000vips-7.38.5/doc/src/wio.tex0000644000175000017500000002317712303140253012377 00000000000000\section{Programming WIO operations} WIO is the style for you if you want ease of programming, or if your algorithm must have the whole of the input image available at the same time. For example, a Fourier transform operation is unable to produce any output until it has seen the whole of the input image. \subsection{Input from an image} In WIO input, the whole of the image data is made available to the program via the \verb+data+ field of the descriptor. To make an image ready for reading in this style, programs should call \verb+im_incheck()+: \begin{verbatim} int im_incheck( IMAGE *im ) \end{verbatim} \noindent If it succeeds, it returns 0, if it fails, it returns non-zero and sets \verb+im_error()+. On success, VIPS guarantees that all of the user-accessible fields in the descriptor contain valid data, and that all of the image data may be read by simply reading from the \verb+data+ field (see below for an example). This will only work for images less than about 2GB in size. VIPS has some simple macros to help address calculations on images: \begin{verbatim} int IM_IMAGE_SIZEOF_ELEMENT( IMAGE * ) int IM_IMAGE_SIZEOF_PEL( IMAGE * ) int IM_IMAGE_SIZEOF_LINE( IMAGE * ) int IM_IMAGE_N_ELEMENTS( IMAGE * ) char *IM_IMAGE_ADDR( IMAGE *, int x, int y ) \end{verbatim} \noindent These macros calculate \verb+sizeof()+ a band element, a pel and a horizontal line of pels. \verb+IM_IMAGE_N_ELEMENTS+ returns the number of band elements across an image. \verb+IM_IMAGE_ADDR+ calculates the address of a pixel in an image. If \verb+DEBUG+ is defined, it does bounds checking too. \begin{fig2} \begin{verbatim} #include #include #include int average( IMAGE *im, double *out ) { int x, y; long total; /* Prepare for reading. */ if( im_incheck( im ) ) return( -1 ); /* Check that this is the kind of image we can process. */ if( im->BandFmt != IM_BANDFMT_UCHAR || im->Coding != IM_CODING_NONE ) { im_error( "average", "uncoded uchar images only" ); return( -1 ); } /* Loop over the image, summing pixels. */ total = 0; for( y = 0; y < im->Ysize; y++ ) { unsigned char *p = (unsigned char *) IM_IMAGE_ADDR( im, 0, y ); for( x = 0; x < IM_IMAGE_N_ELEMENTS( im ); x++ ) total += p[x]; } /* Calculate average. */ *out = (double) total / (IM_IMAGE_N_ELEMENTS( im ) * im->Ysize)); /* Success! */ return( 0 ); } \end{verbatim} \caption{Find average of image} \label{fg:average} \end{fig2} \fref{fg:average} is a simple WIO operation which calculates the average of an unsigned char image. It will work for any size image, with any number of bands. See~\pref{sec:poly} for techniques for making operations which will work for any image type. This operation might be called from an application with: \begin{verbatim} #include #include #include void find_average( char *name ) { IMAGE *im; double avg; if( !(im = im_open( name, "r" )) || average( im, &avg ) || im_close( im ) ) error_exit( "failure!" ); printf( "Average of \"%s\" is %G\n", name, avg ); } \end{verbatim} \noindent When you write an image processing operation, you can test it by writing a VIPS function descriptor and calling it from the \vips{} universal main program, or from the \nip{} interface. See \pref{sec:appl}. \subsection{Output to an image} Before attempting WIO output, programs should call \verb+im_outcheck()+. It has type: \begin{verbatim} int im_outcheck( IMAGE *im ) \end{verbatim} \noindent If \verb+im_outcheck()+ succeeds, VIPS guarantees that WIO output is sensible. Programs should then set fields in the output descriptor to describe the sort of image they wish to write (size, type, and so on) and call \verb+im_setupout()+. It has type: \begin{verbatim} int im_setupout( IMAGE *im ) \end{verbatim} \noindent \verb+im_setupout()+ creates the output file or memory buffer, using the size and type fields that were filled in by the program between the calls to \verb+im_outcheck()+ and \verb+im_setupout()+, and gets it ready for writing. Pels are written with \verb+im_writeline()+. This takes a y position (pel (0,0) is in the top-left-hand corner of the image), a descriptor and a pointer to a line of pels. It has type: \begin{verbatim} int im_writeline( int y, IMAGE *im, unsigned char *pels ) \end{verbatim} Two convenience functions are available to make this process slightly easier. \verb+im_iocheck()+ is useful for programs which take one input image and produce one image output. It simply calls \verb+im_incheck()+ and \verb+im_outcheck()+. It has type: \begin{verbatim} int im_iocheck( IMAGE *in, IMAGE *out ) \end{verbatim} The second convenience function copies the fields describing size, type, metadata and history from one image descriptor to another. It is useful when the output image will be similar in size and type to the input image. It has type: \begin{verbatim} int im_cp_desc( IMAGE *out, IMAGE *in ) \end{verbatim} \noindent There's also \verb+im_cp_descv()+, see the man page. \begin{fig2} \begin{verbatim} #include #include #include #include int invert( IMAGE *in, IMAGE *out ) { int x, y; unsigned char *buffer; /* Check images. */ if( im_iocheck( in, out ) ) return( -1 ); if( in->BandFmt != IM_BANDFMT_UCHAR || in->Coding != IM_CODING_NONE ) { im_error( "invert", "uncoded uchar images only" ); return( -1 ); } /* Make output image. */ if( im_cp_desc( out, in ) ) return( -1 ); if( im_setupout( out ) ) return( -1 ); /* Allocate a line buffer and make sure it will be freed correctly. */ if( !(buffer = IM_ARRAY( out, IM_IMAGE_SIZEOF_LINE( in ), unsigned char )) ) return( -1 ); /* Loop over the image! */ for( y = 0; y < in->Ysize; y++ ) { unsigned char *p = (unsigned char *) IM_IMAGE_ADDR( in, 0, y ); for( x = 0; x < IM_IMAGE_N_ELEMENTS( in ); x++ ) buffer[x] = 255 - p[x]; if( im_writeline( y, out, buffer ) ) return( -1 ); } return( 0 ); } \end{verbatim} \caption{Invert an image} \label{fg:invert} \end{fig2} \fref{fg:invert} is a WIO VIPS operation which finds the photographic negative of an unsigned char image. See \pref{sec:malloc} for an explanation of \verb+IM_ARRAY+. This operation might be called from an application with: \begin{verbatim} #include #include #include void find_negative( char *inn, char *outn ) { IMAGE *in, *out; if( !(in = im_open( inn, "r" )) || !(out = im_open( outn, "w" )) || invert( in, out ) || im_updatehist( out, "invert" ) || im_close( in ) || im_close( out ) ) error_exit( "failure!" ); } \end{verbatim} See \pref{sec:history} for an explanation of the call to \verb+im_updatehist()+. \subsection{Polymorphism} \label{sec:poly} Most image processing operations in the VIPS library can operate on images of any type (\verb+IM_BANDFMT_UCHAR+, as in our examples above, also \verb+IM_BANDFMT_UINT+ etc.). This is usually implemented with code replication: the operation contains loops for processing every kind of image, and when called, invokes the appropriate loop for the image it is given. As an example, figure~\ref{fg:exp} calculates \verb+exp()+ for every pel in an image. If the input image is \verb+double+, we write \verb+double+ output. If it is any other non-complex type, we write \verb+float+. If it is complex, we flag an error (\verb+exp()+ of a complex number is fiddly). The example uses an image type predicate, \verb+im_iscomplex()+. There are a number of these predicate functions, see the manual page. \begin{fig2} \begin{verbatim} #include #include #include #include #include /* Exponential transform. */ int exptra( IMAGE *in, IMAGE *out ) { int x, y; unsigned char *buffer; /* Check descriptors. */ if( im_iocheck( in, out ) ) return( -1 ); if( in->Coding != IM_CODING_NONE || im_iscomplex( in ) ) { im_error( "exptra", "uncoded non-complex only" ); return( -1 ); } /* Make output image. */ if( im_cp_desc( out, in ) ) return( -1 ); if( in->BandFmt != IM_BANDFMT_DOUBLE ) out->BandFmt = IM_BANDFMT_FLOAT; if( im_setupout( out ) ) return( -1 ); \end{verbatim} \caption{Calculate \texttt{exp()} for an image} \label{fg:exp} \end{fig2} \begin{fig2} \begin{verbatim} /* Allocate a line buffer. */ if( !(buffer = IM_ARRAY( out, IM_IMAGE_SIZEOF_LINE( in ), unsigned char )) ) return( -1 ); /* Our inner loop, parameterised for both the input and output * types. Note the use of `\', since macros have to be all on * one line. */ #define loop(IN, OUT) { \ for( y = 0; y < in->Ysize; y++ ) { \ IN *p = (IN *) IM_IMAGE_ADDR( in, 0, y ); \ OUT *q = (OUT *) buffer; \ \ for( x = 0; x < IM_IMAGE_N_ELEMENTS( in ); x++ ) \ q[x] = exp( p[x] ); \ if( im_writeline( y, out, buffer ) ) \ return( -1 ); \ } \ } /* Switch for all the types we can handle. */ switch( in->BandFmt ) { case IM_BANDFMT_UCHAR: loop( unsigned char, float ); break; case IM_BANDFMT_CHAR: loop( char, float ); break; case IM_BANDFMT_USHORT:loop( unsigned short, float ); break; case IM_BANDFMT_SHORT: loop( short, float ); break; case IM_BANDFMT_UINT: loop( unsigned int, float ); break; case IM_BANDFMT_INT: loop( int, float ); break; case IM_BANDFMT_FLOAT: loop( float, float ); break; case IM_BANDFMT_DOUBLE:loop( double, double ); break; default: im_error( "exptra", "internal error" ); return( -1 ); } /* Success. */ return( 0 ); } \end{verbatim} \caption{Calculate \texttt{exp()} for an image (cont)} \end{fig2} vips-7.38.5/doc/src/interpolate.tex0000644000175000017500000001075412303140253014124 00000000000000\section{Interpolators} \label{sec:interpolate} VIPS has a general system for representing pixel interpolators. You can select an interpolator to pass to other VIPS operations, such as \verb+im_affinei()+, you can add new interpolators, and you can write operations which take a general interpolator as a parameter. An interpolator is a function of the form: \begin{verbatim} typedef void (*VipsInterpolateMethod)( VipsInterpolate *, PEL *out, REGION *in, double x, double y ); \end{verbatim} \noindent given the set of input pixels \verb+in+, it has to calculate a value for the fractional position $(x, y)$ and write this value to the memory pointed to by \verb+out+. VIPS uses corner convention, so the value of pixel $(0, 0)$ is the value of the surface the interpolator fits at the fractional position $(0.0, 0.0)$. \subsection{How an interpolator is represented} See the man page for \verb+VipsInterpolate+ for full details, but briefly, an interpolator is a subclass of \verb+VipsInterpolate+ implementing the following items: \begin{itemize} \item An interpolation method, with the type signature above. \item A function \verb+get_window_size()+ which returns the size of the area of pixels that the interpolator needs in order to calculate a value. For example, a bilinear interpolator needs the four pixels surrounding the point to be calculated, or a 2 by 2 window, so window size should be 2. \item Or if the window size is constant, you can leave \verb+get_window_size()+ NULL and just set the int value \verb+window_size+. \end{itemize} \subsection{A sample interpolator} As an example, \fref{fg:newinterpolator} shows how to register a new interpolator in a plugin. \begin{fig2} \begin{verbatim} // This interpolator adds no new members. typedef VipsInterpolate Myinterpolator; typedef VipsInterpolateClass MyinterpolatorClass; G_DEFINE_TYPE( Myinterpolator, myinterpolator, VIPS_TYPE_INTERPOLATE ); static void myinterpolator_interpolate( VipsInterpolate *interpolate, PEL *out, REGION *in, double x, double y ) { MyinterpolatorClass *class = MYINTERPOLATOR_GET_CLASS( interpolate ); /* Nearest-neighbor. */ memcpy( out, IM_REGION_ADDR( in, floor( x ), floor( y ) ), IM_IMAGE_SIZEOF_PEL( in->im ) ); } static void myinterpolator_class_init( MyinterpolatorClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsInterpolateClass *interpolate_class = (VipsInterpolateClass *) class; object_class->nickname = "myinterpolator"; object_class->description = _( "My interpolator" ); interpolate_class->interpolate = myinterpolator_interpolate; } static void myinterpolate_init( Myinterpolate *object ) { } char * g_module_check_init( GModule *self ) { // register the type myinterpolator_get_type(); } \end{verbatim} \caption{Registering an interpolator in a plugin} \label{fg:newinterpolator} \end{fig2} \subsection{Writing a VIPS operation that takes an interpolator as an argument} Operations just take a \verb+VipsInterpolate+ as an argument, for example: \begin{verbatim} int im_affinei_all( IMAGE *in, IMAGE *out, VipsInterpolate *interpolate, double a, double b, double c, double d, double dx, double dy ); \end{verbatim} To use the interpolator, use \verb+vips_interpolate()+: \begin{verbatim} void vips_interpolate( VipsInterpolate *interpolate, PEL *out, REGION *in, double x, double y ); \end{verbatim} \noindent This looks up the interpolate method for the object and calls it for you. You can save the cost of the lookup in an inner loop with \verb+vips_interpolate_get_method()+: \begin{verbatim} VipsInterpolateMethod vips_interpolate_get_method( VipsInterpolate *interpolate ); \end{verbatim} \subsection{Passing an interpolator to a VIPS operation} You can build an instance of a \verb+VipsInterpolator+ with the \verb+vips_object_*()+ family of functions, see \pref{sec:object}. Convenience functions return a static instance of one of the standard interpolators: \begin{verbatim} VipsInterpolate *vips_interpolate_nearest_static( void ); VipsInterpolate *vips_interpolate_bilinear_static( void ); \end{verbatim} \noindent Don't free the result. Finally, \verb+vips_interpolate_new()+ makes a \verb+VipsInterpolate+ from a nickname: \begin{verbatim} VipsInterpolate *vips_interpolate_new( const char *nickname ); \end{verbatim} For example: \begin{verbatim} VipsInterpolate *interpolate = vips_interpolate_new( "nohalo" ); \end{verbatim} \noindent You must drop your ref after you're done with the object with \verb+g_object_unref()+. vips-7.38.5/doc/src/pio.tex0000644000175000017500000006123312303140253012363 00000000000000\section{Programming PIO functions} \label{sec:pio} The VIPS PIO system has a number of advantages over WIO, as summarised in the introduction. On the other hand, they are a bit more complicated. \subsection{Easy PIO with \texttt{im\_wrapone()} and \texttt{im\_wrapmany()}} \label{sec:wrapone} PIO is a very general image IO system, and because of this flexibility, can be complicated to program. As a convenience, VIPS offers an easy-to-use layer over PIO with the funtions \verb+im_wrapone()+ and \verb+im_wrapmany()+. If your image processing function is uninterested in coordinates, that is, if your input and output images are the same size, and each output pixel depends only upon the value of the corresponding pixel in the input image or images, then these functions are for you. Consider the \verb+invert()+ function of figure~\ref{fg:invert}. First, we have to write the core of this as a buffer-processing function: \begin{verbatim} #include #include #include /* p points to a buffer of pixels which * need inverting, q points to the buffer * we should write the result to, and n * is the number of pels present. */ static void invert_buffer( unsigned char *p, unsigned char *q, int n ) { int i; for( i = 0; i < n; i++ ) q[i] = 255 - p[i]; } \end{verbatim} Now we have to wrap up this very primitive expression of the invert operation as a PIO function. We use \verb+im_wrapone()+ to do this. It has type: \begin{verbatim} int im_wrapone( IMAGE *in, IMAGE *out, im_wrapone_fn fn, void *a, void *b ) \end{verbatim} \noindent where: \begin{verbatim} void (*im_wrapone_fn)(void *in, void *out, int n, void *a, void *b ) \end{verbatim} \noindent almost the same type as our buffer-processing function above. The values \verb+a+ and \verb+b+ are carried around by VIPS for whatever use you fancy. \verb+invert()+ can now be written as: \begin{verbatim} int invert( IMAGE *in, IMAGE *out ) { /* Check parameters. */ if( in->BandFmt != IM_BANDFMT_UCHAR || in->Bands != 1 || in->Coding != IM_CODING_NONE ) { im_error( "invert", "bad image" ); return( -1 ); } /* Set fields in output image. */ if( im_cp_desc( out, in ) ) return( -1 ); /* Process! We don't use either of the * user parameters in this function, * so leave them as NULL. */ if( im_wrapone( in, out, (im_wrapone_fn) invert_buffer, NULL, NULL ) ) return( -1 ); return( 0 ); } \end{verbatim} And that's all there is to it. This function will have all of the desirable properties of PIO functions, while being as easy to program as the WIO \verb+invert()+ earlier in this chapter. This version of \verb+invert()+ is not very general: it will only accept one-band unsigned char images. It is easy to modify for n-band images: \begin{verbatim} /* As before, but use one of the user * parameters to pass in the number of * bands in the image. */ static void invert_buffer( unsigned char *p, unsigned char *q, int n, IMAGE *in ) { int i; int sz = n * in->Bands; for( i = 0; i < sz; i++ ) q[i] = 255 - p[i]; } \end{verbatim} We must also modify \verb+invert()+: \begin{verbatim} int invert( IMAGE *in, IMAGE *out ) { /* Check parameters. */ if( in->BandFmt != IM_BANDFMT_UCHAR || in->Coding != IM_CODING_NONE ) { im_error( "invert", "bad image" ); return( -1 ); } /* Set fields in output image. */ if( im_cp_desc( out, in ) ) return( -1 ); /* Process! The first user-parameter * is the number of bands involved. */ if( im_wrapone( in, out, (im_wrapone_fn)invert_buffer, in, NULL ) ) return( -1 ); return( 0 ); } \end{verbatim} There are two significant hidden traps here. First, inside the buffer processing functions, you may only read the contents of the user parameters \verb+a+ and \verb+b+, you may not write to them. This is because on a multi-CPU machine, several copies of your buffer-processing functions will be run in parallel --- if they all write to the same place, there will be complete confusion. If you need writeable parameters (for example, to count and report overflows), you can't use \verb+im_wrapone()+, you'll have to use the PIO system in all its gory detail, see below. Secondly, your buffer processing function may not be called immediately. VIPS may decide to delay evaluation of your operation until long after the call to \verb+invert()+ has returned. As a result, care is needed to ensure that you never read anything in your buffer-processing function that may have been freed. The best way to ensure this is to use the local resource allocators, such as \verb+im_open_local()+ and \verb+im_malloc()+. This issue is discussed at length in the sections below, and in \pref{sec:appl}. \verb+im_wrapone()+ is for operations which take exactly one input image. VIPS provides a second function, \verb+im_wrapmany()+, which works for any number of input images. The type of \verb+im_wrapmany()+ is slightly different: \begin{verbatim} int im_wrapmany( IMAGE **in, IMAGE *out, im_wrapmany_fn fn, void *a, void *b ) \end{verbatim} \noindent \begin{verbatim} void (*im_wrapmany_fn)( void **in, void *out, int n, void *a, void *b ) \end{verbatim} \noindent \verb+im_wrapmany()+ takes a \verb+NULL+-terminated array of input images, and creates a \verb+NULL+-terminated array of buffers for the use of your buffer processing function. A function to add two \verb+IM_BANDFMT_UCHAR+ images to make a \verb+IM_BANDFMT_UCHAR+ image might be written as: \begin{verbatim} static void add_buffer( unsigned char **in, unsigned short *out, int n, IMAGE *in ) { int i; int sz = n * in->Bands; unsigned char *p1 = in[0]; unsigned char *p2 = in[1]; for( i = 0; i < sz; i++ ) out[i] = p1[i] + p2[i]; } \end{verbatim} This can be made into a PIO function with: \begin{verbatim} int add_uchar( IMAGE *i1, IMAGE *i2, IMAGE *out ) { IMAGE *invec[3]; /* Check parameters. We don't need to * check that i1 and i2 are the same * size, im_wrapmany() does that for * us. */ if( i1->BandFmt != IM_BANDFMT_UCHAR || i1->Coding != IM_CODING_NONE || i2->BandFmt != IM_BANDFMT_UCHAR || i2->Coding != IM_CODING_NONE || i1->Bands != i2->Bands ) { im_error( "add_uchar", "bad in" ); return( -1 ); } /* Set fields in output image. As * input image, but we want a USHORT. */ if( im_cp_desc( out, i1 ) ) return( -1 ); out->BandFmt = IM_BANDFMT_USHORT; out->Bbits = IM_BBITS_SHORT; /* Process! The first user-parameter * is the number of bands involved. * invec is a NULL-terminated array of * input images. */ invec[0] = i1; invec[1] = i2; invec[2] = NULL; if( im_wrapmany( invec, out, (im_wrapone_fn)add_buffer, i1, NULL ) ) return( -1 ); return( 0 ); } \end{verbatim} \subsection{Region descriptors} Regions are the next layer of abstraction above image descriptors. A region is a small part of an image, held in memory ready for processing. A region is defined as: \begin{verbatim} typedef struct { Rect valid; IMAGE *im; ... and some other private fields, ... used by VIPS for housekeeping } REGION; \end{verbatim} \noindent where \verb+valid+ holds the sub-area of image \verb+im+ that this region represents, and \verb+Rect+ is defined as: \begin{verbatim} typedef struct { int left, top; int width, height; } Rect; \end{verbatim} \noindent two macros are available for \verb+Rect+ calculations: \begin{verbatim} int IM_RECT_RIGHT( Rect *r ) int IM_RECT_BOTTOM( Rect *r ) \end{verbatim} \noindent where \verb+IM_RECT_RIGHT()+ returns \verb+left+ + \verb+width+, and \verb+IM_RECT_BOTTOM()+ returns \verb+top+ + \verb+height+. A small library of C functions are also available for \verb+Rect+ algebra, see the manual pages for \verb+im_rect_intersectrect()+. Regions are created with \verb+im_region_create()+. This has type: \begin{verbatim} REGION *im_region_create( IMAGE *im ) \end{verbatim} \noindent \verb+im_region_create()+ returns a pointer to a new region structure, or \verb+NULL+ on error. Regions returned by \verb+im_region_create()+ are blank --- they contain no image data and cannot be read from or written to. See the next couple of sections for calls to fill regions with data. Regions are destroyed with \verb+im_region_free()+. It has type: \begin{verbatim} int im_region_free( REGION *reg ) \end{verbatim} \noindent And, as usual, returns 0 on success and non-zero on error, setting \verb+im_error()+. You must free all regions you create. If you close an image without freeing all the regions defined on that image, the image is just marked for future closure --- it is not actually closed until the final region is freed. This behaviour helps to prevent dangling pointers, and it is not difficult to make sure you free all regions --- see the examples below. \subsection{Image input with regions} Before you can read from a region, you need to call \verb+im_prepare()+ to fill the region with image data. It has type: \begin{verbatim} int im_prepare( REGION *reg, Rect *r ) \end{verbatim} Area \verb+r+ of the image on which \verb+reg+ has been created is prepared and attached to the region. Exactly what this preparation involves depends upon the image --- it can vary from simply adjusting some pointers, to triggering the evaluation of a series of other functions. If it returns successfully, \verb+im_prepare()+ guarantees that all pixels within \verb+reg->valid+ may be accessed. Note that this may be smaller or larger than \verb+r+, since \verb+im_prepare()+ clips \verb+r+ against the size of the image. Programs can access image data in the region by calling the macro \verb+IM_REGION_ADDR()+. It has type \begin{verbatim} char *IM_REGION_ADDR( REGION *reg, int x, int y ) \end{verbatim} Provided that point (x,y) lies inside \verb+reg->valid+, \verb+IM_REGION_ADDR()+ returns a pointer to pel $(x,y)$. Adding to the result of \verb+IM_REGION_ADDR()+ moves to the right along the line of pels, provided you stay strictly within \verb+reg->valid+. Add \verb+IM_REGION_LSKIP()+ to move down a line, see below. \verb+IM_REGION_ADDR()+ has some other useful features --- see the manual page. Other macros are available to ease address calculation: \begin{verbatim} int IM_REGION_LSKIP( REGION *reg ) int IM_REGION_N_ELEMENTS( REGION *reg ) int IM_REGION_SIZEOF_LINE( REGION *reg ) \end{verbatim} \noindent These find the number of bytes to add to the result of \verb+IM_REGION_ADDR()+ to move down a line, the number of band elements across the region and the number of bytes across the region. \fref{fg:paverage} is a version of \verb+average()+ which uses regions rather than WIO input. Two things: first, we should really be using \verb+vips_sink()+, see \pref{sec:sequence}, to do the rectangle algebra for us. Secondly, note that we call \verb+im_pincheck()+ rather than \verb+im_incheck()+. \verb+im_pincheck()+ signals to the IO system that you are a PIO-aware function, giving \verb+im_prepare()+ much more flexibility in the sorts of preparation it can do. Also see the manual pages for \verb+im_poutcheck()+ and \verb+im_piocheck()+. \begin{fig2} \begin{verbatim} #include #include #include #include int average( IMAGE *im, double *out ) { int total, i, y; REGION *reg; Rect area, *r; /* Check im. */ if( im_pincheck( im ) ) return( -1 ); if( im->BandFmt != IM_BANDFMT_UCHAR || im->Coding != IM_CODING_NONE ) { im_error( "average", "uncoded uchar images only" ); return( -1 ); } /* Make a region on im which we can use for reading. */ if( !(reg = im_region_create( im )) ) return( -1 ); \end{verbatim} \caption{First PIO average of image} \label{fg:paverage} \end{fig2} \begin{fig2} \begin{verbatim} /* Move area over the image in 100x100 pel chunks. * im_prepare() will clip against the edges of the image * for us. */ total = 0; r = ®->valid; area.width = 100; area.height = 100; for( area.top = 0; area.top < im->Ysize; area.top += 100 ) for( area.left = 0; area.left < im->Xsize; area.left += 100 ) { /* Fill reg with pels. */ if( im_prepare( reg, &area ) ) { /* We must free the region! */ im_region_free( reg ); return( -1 ); } /* Loop over reg, adding to our total. */ for( y = r->top; y < IM_RECT_BOTTOM( r ); y++ ) { unsigned char *p = IM_REGION_ADDR( reg, r->left, y ); for( i = 0; i < IM_REGION_N_ELEMENTS( reg ); i++ ) total += p[i]; } } /* Make sure we free the region. */ im_region_free( reg ); /* Find average. */ *out = (double) total / (IM_IMAGE_N_ELEMENTS( im ) * im->Ysize); return( 0 ); } \end{verbatim} \caption{First PIO average of image (cont.)} \end{fig2} This version of \verb+average()+ can be called in exactly the same way as the previous one, but this version has the great advantage of not needing to have the whole of the input image available at once. We can do one better than this --- if the image is being split into small pieces, we can assign each piece to a separate thread of execution and get parallelism. To support this splitting of tasks, VIPS has the notion of a sequence. \subsection{Splitting into sequences} \label{sec:sequence} A sequence comes in three parts: a start function, a processing function, and a stop function. When VIPS starts up a new sequence, it runs the start function. Start functions return sequence values: a void pointer representing data local to this sequence. VIPS then repeatedly calls the processing function, passing in the sequence value and a new piece of image data for processing. Finally, when processing is complete, VIPS cleans up by calling the stop function, passing in the sequence value as an argument. The types look like this: \begin{verbatim} void * (*start_fn)( IMAGE *out, void *a, void *b ) int (*process_fn)( REGION *reg, void *seq, void *a, void *b ) int (*stop_fn)( void *seq, void *a, void *b ) \end{verbatim} \noindent The values \verb+a+ and \verb+b+ are carried around by VIPS for your use. For functions like \verb+average()+ which consume images but produce no image output, VIPS provides \verb+vips_sink()+. This has type: \begin{verbatim} int vips_sink( VipsImage *in, VipsStart start, VipsGenerate generate, VipsStop stop, void *a, void *b ) \end{verbatim} VIPS starts one or more sequences, runs one or more processing functions over image \verb+in+ until all of \verb+in+ has been consumed, and then closes all of the sequences down and returns. VIPS guarantees that the regions the \verb+process_fn()+ is given will be complete and disjoint, that is, every pixel in the image will be passed through exactly one sequence. To make it possible for the sequences to each contribute to the result of the function in an orderly manner, VIPS also guarantees that all start and stop functions are mutually exclusive. An example should make this clearer. This version of \verb+average()+ is very similar to the average function in the VIPS library --- it is only missing polymorphism. \begin{fig2} \begin{verbatim} #include #include #include #include /* Start function for average(). We allocate a small piece of * storage which this sequence will accumulate its total in. Our * sequence value is just a pointer to this storage area. * * The first of the two pointers VIPS carries around for us is a * pointer to the space where we store the grand total. */ static int * average_start( IMAGE *out ) { int *seq = IM_NEW( out, int ); if( !seq ) return( NULL ); *seq = 0; return( seq ); } /* Stop function for average(). Add the total which has * accumulated in our sequence value to the grand total for * the program. */ static int average_stop( int *seq, int *gtotal ) { /* Stop functions are mutually exclusive, so we can write * to gtotal without clashing with any other stop functions. */ *gtotal += *seq; return( 0 ); } \end{verbatim} \caption{Final PIO average of image} \label{fg:p2average} \end{fig2} \begin{fig2} \begin{verbatim} /* Process function for average(). Total this region, and * add that total to the sequence value. */ static int average_process( REGION *reg, int *seq ) { int total, i, y; Rect *r = ®->valid; /* Get the appropriate part of the input image ready. */ if( im_prepare( reg, r ) ) return( -1 ); /* Loop over the region. */ total = 0; for( y = r->top; y < IM_RECT_BOTTOM( r ); y++ ) { unsigned char *p = IM_REGION_ADDR( reg, r->left, y ); for( i = 0; i < IM_REGION_N_ELEMENTS( reg ); i++ ) total += p[i]; } /* Add to the total for this sequence. */ *seq += total; return( 0 ); } \end{verbatim} \caption{Final PIO average of image (cont.)} \end{fig2} \begin{fig2} \begin{verbatim} /* Find average of image. */ int average( IMAGE *im, double *out ) { /* Accumulate grand total here. */ int gtotal = 0; /* Prepare im for PIO reading. */ if( im_pincheck( im ) ) return( -1 ); /* Check it is the sort of thing we can process. */ if( im->BandFmt != IM_BANDFMT_UCHAR || im->Coding != IM_CODING_NONE ) { im_error( "average", "uncoded uchar images only" ); return( -1 ); } /* Loop over the image in pieces, and possibly in parallel. */ if( vips_sink( im, average_start, average_process, average_stop, >otal, NULL ) ) return( -1 ); /* Calculate average. */ *out = (double) gtotal / (IM_IMAGE_N_ELEMENTS( im ) * im->Ysize); return( 0 ); } \end{verbatim} \caption{Final PIO average of image (cont.)} \end{fig2} There are a couple of variations on \verb+im_prepare()+: you can use \verb+im_prepare_to()+ to force writing to a particular place, and \verb+im_prepare_thread()+ to use threaded evaluation. See the man pages. \subsection{Output to regions} \label{sec:generate} Regions are written to in just the same way they are read from --- by writing to a pointer found with the \verb+IM_REGION_ADDR()+ macro. \verb+vips_sink()+ does input --- \verb+im_generate()+ does output. It has the same type as \verb+vips_sink()+: \begin{verbatim} int im_generate( IMAGE *out, void *(*start_fn)(), int (*process_fn)(), int (*stop_fn)(), void *a, void *b ) \end{verbatim} The region given to the process function is ready for output. Each time the process function is called, it should fill in the pels in the region it was given. Note that, unlike \verb+vips_sink()+, the areas the process function is asked to produce are not guaranteed to be either disjoint or complete. Again, VIPS may start up many process functions if it sees fit. Here is \verb+invert()+, rewritten to use PIO. This piece of code makes use of a pair of standard start and stop functions provided by the VIPS library: \verb+im_start_one()+ and \verb+im_stop_one()+. They assume that the first of the two user arguments to \verb+im_generate()+ is the input image. They are defined as: \begin{verbatim} REGION * im_start_one( IMAGE *out, IMAGE *in ) { return( im_region_create( in ) ); } \end{verbatim} \noindent and: \begin{verbatim} int im_stop_one( REGION *seq ) { return( im_region_free( seq ) ); } \end{verbatim} They are useful for simple functions which expect only one input image. See the manual page for \verb+im_start_many()+ for many-input functions. \begin{fig2} \begin{verbatim} #include #include #include #include /* Process function for invert(). Build the pixels in or * from the appropriate pixels in ir. */ static int invert_process( REGION *or, REGION *ir ) { Rect *r = &or->valid; int i, y; /* Ask for the part of ir we need to make or. In this * case, the two areas will be the same. */ if( im_prepare( ir, r ) ) return( -1 ); /* Loop over or writing pels calculated from ir. */ for( y = r->top; y < IM_RECT_BOTTOM( r ); y++ ) { unsigned char *p = IM_REGION_ADDR( ir, r->left, y ); unsigned char *q = IM_REGION_ADDR( or, r->left, y ); for( i = 0; i < IM_REGION_N_ELEMENTS( or ); i++ ) q[i] = 255 - p[i]; } /* Success! */ return( 0 ); } \end{verbatim} \caption{PIO invert} \label{fg:p2invert} \end{fig2} \begin{fig2} \begin{verbatim} /* Invert an image. */ int invert( IMAGE *in, IMAGE *out ) { /* Check descriptors for PIO compatibility. */ if( im_piocheck( in, out ) ) return( -1 ); /* Check input image for compatibility with us. */ if( in->BandFmt != IM_BANDFMT_UCHAR || in->Coding != IM_CODING_NONE ) { im_error( "invert", "uncoded uchar images only" ); return( -1 ); } /* out inherits from in, as before. */ if( im_cp_desc( out, in ) ) return( -1 ); /* Set demand hints for out. */ if( im_demand_hint( out, IM_THINSTRIP, in, NULL ) ) return( -1 ); /* Build out in pieces, and possibly in parallel! */ if( im_generate( out, im_start_one, invert_process, im_stop_one, in, NULL ) ) return( -1 ); return( 0 ); } \end{verbatim} \caption{PIO invert (cont.)} \end{fig2} Functions have some choice about the way they write their output. Usually, they should just write to the region they were given by \verb+im_generate()+. They can, if they wish, set up the region for output to some other place. See the manual page for \verb+im_region_region()+. See also the source for \verb+im_copy()+ and \verb+im_extract()+ for examples of these tricks. Note also the call to \verb+im_demand_hint()+. This function hints to the IO system, suggesting the sorts of shapes of region this function is happiest with. VIPS supports four basic shapes --- choosing the correct shape can have a dramatic effect on the speed of your function. See the man page for full details. \subsection{Callbacks} \label{sec:callback} VIPS lets you attach callbacks to image descriptors. These are functions you provide that VIPS will call when certain events occur. There are more callbacks than are listed here: see the man page for full details. \subsubsection{Close callbacks} These callbacks are invoked just before an image is closed. They are useful for freeing objects which are associated with the image. All callbacks are triggered in the reverse order to the order in which they were attached. This is sometimes important when freeing objects which contain pointers to other objects. Close callbacks are guaranteed to be called, and to be called exactly once. Use \verb+im_add_close_callback()+ to add a close callback: \begin{verbatim} typedef int (*im_callback)( void *, void * ) int im_add_close_callback( IMAGE *, im_callback_fn, void *, void * ) \end{verbatim} As with \verb+im_generate()+, the two \verb+void *+ pointers are carried around for you by VIPS and may be used as your function sees fit. \subsubsection{Preclose callbacks} Preclose callbacks are called before any shutdown has occured. Everything is still alive and your callback can do anything to the image. Preclose callbacks are guaranteed to be called, and to be called exactly once. See the manual page for \verb+im_add_preclose_callback()+ for full details. \subsubsection{Eval callbacks} These are callbacks which are invoked periodically by VIPS during evaluation. The callback has access to a struct containing information about the progress of evaluation, useful for user-interfaces built on top of VIPS. See the manual page for \verb+im_add_eval_callback()+ for full details. \subsection{Memory allocation revisited} When you are using PIO, memory allocation becomes rather more complicated than it was before. There are essentially two types of memory which your function might want to use for working space: memory which is associated with each instance of your function (remember that two copies of you function may be joined together in a pipeline and be running at the same time --- you can't just use global variables), and memory which is local to each sequence which VIPS starts on your argument image. The first type, memory local to this function instance, typically holds copies of any parameters passed to your image processing function, and links to any read-only tables used by sequences which you run over the image. This should be allocated in your main function. The second type of memory, memory local to a sequence, should be allocated in a start function. Because this space is private to a sequence, it may be written to. Start and stop functions are guaranteed to be single-threaded, so you may write to the function-local memory within them. vips-7.38.5/doc/src/func.tex0000644000175000017500000004454512303140253012536 00000000000000\section{Function dispatch and plug-ins} (This chapter is on the verge of being deprecated. We have started building a replacement based on \verb+GObject+, see \pref{sec:object}.) As image processing libraries increase in size it becomes progressively more difficult to build applications which present the operations the library offers to the user. Every time a new operation is added, every user interface needs to be adapted --- a job which can rapidly become unmanageable. To address this problem VIPS includes a simple database which stores an abstract description of every image processing operation. User interfaces, rather than having special code wired into them for each operation, can simply interrogate the database and present what they find to the user. The operation database is extensible. You can define new operations, and even new types, and add them to VIPS. These new operations will then automatically appear in all VIPS user interfaces with no extra programming effort. Plugins can extend the database at runtime: when VIPS starts, it loads all the plugins in the VIPS library area. \subsection{Simple plugin example} As an example, consider this function: \begin{verbatim} #include #include /* The function we define. Call this * from other parts of your C * application. */ int double_integer( int in ) { return( in * 2 ); } \end{verbatim} \noindent The source for all the example code in this section is in the vips-examples package. The first step is to make a layer over this function which will make it look like a standard VIPS function. VIPS insists on the following pattern: \begin{itemize} \item The function should be int-valued, and return 0 for success and non-zero for error. It should set \verb+im_error()+. \item The function should take a single argument: a pointer to a \verb+NULL+-terminated array of \verb+im_objects+. \item Each \verb+im_object+ represents one argument to the function (either output or input) in the form specified by the corresponding entry in the function's argument descriptor. \end{itemize} The argument descriptor is an array of structures, each describing one argument. For this example, it is: \begin{verbatim} /* Describe the type of our function. * One input int, and one output int. */ static im_arg_desc arg_types[] = { IM_INPUT_INT( "in" ), IM_OUTPUT_INT( "out" ) }; \end{verbatim} \verb+IM_INPUT_INT()+ and \verb+IM_OUTPUT_INT()+ are macros defined in \verb++ which make argument types easy to define. Other macros available are listed in table~\ref{tab:type}. \begin{tab2} \begin{center} \begin{tabular}{|l|l|l|} \hline Macro & Meaning & \texttt{im\_object} has type \\ \hline \texttt{IM\_INPUT\_INT} & Input int & \texttt{int *} \\ \texttt{IM\_INPUT\_INTVEC} & Input vector of int & \texttt{im\_intvec\_object *} \\ \texttt{IM\_INPUT\_IMASK} & Input int array & \texttt{im\_mask\_object *} \\ \texttt{IM\_OUTPUT\_INT} & Output int & \texttt{int *} \\ \texttt{IM\_INPUT\_INTVEC} & Output vector of int & \texttt{im\_intvec\_object *} \\ \texttt{IM\_OUTPUT\_IMASK} & Output int array to file & \texttt{im\_mask\_object *} \\ \texttt{IM\_INPUT\_DOUBLE} & Input double & \texttt{double *} \\ \texttt{IM\_INPUT\_DOUBLEVEC} & Input vector of double & \texttt{im\_realvec\_object *} \\ \texttt{IM\_INPUT\_DMASK} & Input double array & \texttt{im\_mask\_object *} \\ \texttt{IM\_OUTPUT\_DOUBLE} & Output double & \texttt{double *} \\ \texttt{IM\_OUTPUT\_DOUBLEVEC} & Output vector of double & \texttt{im\_realvec\_object *} \\ \texttt{IM\_OUTPUT\_DMASK} & Output double array to file & \texttt{im\_mask\_object *} \\ \texttt{IM\_OUTPUT\_DMASK\_STATS}& Output double array to screen & \\ \texttt{IM\_OUTPUT\_COMPLEX} & Output complex & \texttt{double *} \\ \texttt{IM\_INPUT\_STRING} & Input string & \texttt{char *} \\ \texttt{IM\_OUTPUT\_STRING} & Output string & \texttt{char *} \\ \texttt{IM\_INPUT\_IMAGE} & Input image & \texttt{IMAGE *} \\ \texttt{IM\_INPUT\_IMAGEVEC} & Vector of input images & \texttt{IMAGE **} \\ \texttt{IM\_OUTPUT\_IMAGE} & Output image & \texttt{IMAGE *} \\ \texttt{IM\_RW\_IMAGE} & Read-write image & \texttt{IMAGE *} \\ \texttt{IM\_INPUT\_DISPLAY} & Input display & \texttt{im\_col\_display *} \\ \texttt{IM\_OUTPUT\_DISPLAY} & Output display & \texttt{im\_col\_display *} \\ \texttt{IM\_INPUT\_GVALUE} & Input GValue & \texttt{GValue *} \\ \texttt{IM\_OUTPUT\_GVALUE} & Output GValue & \texttt{GValue *} \\ \texttt{IM\_INPUT\_INTERPOLATE} & Input VipsInterpolate & \texttt{VipsInterpolate *} \\ \hline \end{tabular} \end{center} \caption{Argument type macros\label{tab:type}} \end{tab2} The argument to the type macro is the name of the argument. These names are used by user-interface programs to provide feedback, and sometimes as variable names. The order in which you list the arguments is the order in which user-interfaces will present them to the user. You should use the following conventions when selecting names and an order for your arguments: \begin{itemize} \item Names should be entirely in lower-case and contain no special characters, apart from the digits 0-9 and the underscore character `\_'. \item Names should indicate the function of the argument. For example, \verb+im_add()+ has the following argument names: \begin{verbatim} example% vips -help im_add vips: args: in1 in2 out where: in1 is of type "image" in2 is of type "image" out is of type "image" add two images, from package "arithmetic" flags: (PIO function) (no coordinate transformation) (point-to-point operation) \end{verbatim} \item You should order arguments with large input objects first, then output objects, then any extra arguments or options. For example, \verb+im_extract()+ has the following sequence of arguments: \begin{verbatim} example% vips -help im_extract vips: args: input output left top width height channel where: input is of type "image" output is of type "image" left is of type "integer" top is of type "integer" width is of type "integer" height is of type "integer" channel is of type "integer" extract area/band, from package "conversion" flags: (PIO function) (no coordinate transformation) (point-to-point operation) \end{verbatim} \end{itemize} This function sits over \verb+double_integer()+, providing VIPS with an interface which it can call: \begin{verbatim} /* Call our function via a VIPS * im_object vector. */ static int double_vec( im_object *argv ) { int *in = (int *) argv[0]; int *out = (int *) argv[1]; *out = double_integer( *in ); /* Always succeed. */ return( 0 ); } \end{verbatim} Finally, these two pieces of information (the argument description and the VIPS-style function wrapper) can be gathered together into a function description. \begin{verbatim} /* Description of double_integer. */ static im_function double_desc = { "double_integer", "double an integer", 0, double_vec, IM_NUMBER( arg_types ), arg_types }; \end{verbatim} \label{sec:number} \verb+IM_NUMBER()+ is a macro which returns the number of elements in a static array. The \verb+flags+ field contains hints which user-interfaces can use for various optimisations. At present, the possible values are: \begin{description} \item[\texttt{IM\_FN\_PIO}] This function uses the VIPS PIO system (see \pref{sec:pio}). \item[\texttt{IM\_FN\_TRANSFORM}] This the function transforms coordinates. \item[\texttt{IM\_FN\_PTOP}] This is a point-to-point operation, that is, it can be replaced with a look-up table. \item[\texttt{IM\_FN\_NOCACHE}] This operation has side effects and should not be cached. Useful for video grabbers, for example. \end{description} This function description now needs to be added to the VIPS function database. VIPS groups sets of related functions together in packages. There is only a single function in this example, so we can just write: \begin{verbatim} /* Group up all the functions in this * file. */ static im_function *function_list[] = { &double_desc }; /* Define the package_table symbol. * This is what VIPS looks for when * loading the plugin. */ im_package package_table = { "example", IM_NUMBER( function_list ), function_list }; \end{verbatim} The package has to be named \verb+package_table+, and has to be exported from the file (that is, not a static). VIPS looks for a symbol of this name when it opens your object file. This file needs to be made into a dynamically loadable object. On my machine, I can do this with: \begin{verbatim} example% gcc -fPIC -DPIC -c `pkg-config vips-7.12 --cflags` plug.c -o plug.o example% gcc -shared plug.o -o double.plg \end{verbatim} You can now use \verb+double.plg+ with any of the VIPS applications which support function dispatch. For example: \begin{verbatim} example% vips -plugin double.plg \ double_integer 12 24 example% \end{verbatim} When VIPS starts up, it looks for a directory in the library directory called \verb+vips-+, with the vips major and minor versions numbers as extensions, and loads all files in there with the suffix \verb+.plg+. So for example, on my machine, the plugin directory is \verb+/usr/lib/vips-7.16+ and any plugins in that directory are automatically loaded into any VIPS programs on startup. \subsection{A more complicated example} This section lists the source for \verb+im_extract()+'s function description. Almost all functions in the VIPS library have descriptors --- if you are not sure how to write a description, it's usually easiest to copy one from a similar function in the library. \begin{verbatim} /* Args to im_extract. */ static im_arg_desc extract_args[] = { IM_INPUT_IMAGE( "input" ), IM_OUTPUT_IMAGE( "output" ), IM_INPUT_INT( "left" ), IM_INPUT_INT( "top" ), IM_INPUT_INT( "width" ), IM_INPUT_INT( "height" ), IM_INPUT_INT( "channel" ) }; /* Call im_extract via arg vector. */ static int extract_vec( im_object *argv ) { IMAGE_BOX box; box.xstart = *((int *) argv[2]); box.ystart = *((int *) argv[3]); box.xsize = *((int *) argv[4]); box.ysize = *((int *) argv[5]); box.chsel = *((int *) argv[6]); return( im_extract( argv[0], argv[1], &box ) ); } /* Description of im_extract. */ static im_function extract_desc = { "im_extract", "extract area/band", IM_FN_PIO | IM_FN_TRANSFORM, extract_vec, NUMBER( extract_args ), extract_args }; \end{verbatim} \subsection{Adding new types} The VIPS type mechanism is extensible. User plug-ins can add new types and user-interfaces can (to a certain extent) provide interfaces to these user-defined types. Here is the definition of \verb+im_arg_desc+: \begin{verbatim} /* Describe a VIPS command argument. */ typedef struct { char *name; im_type_desc *desc; im_print_obj_fn print; } im_arg_desc; \end{verbatim} The \verb+name+ field is the argument name above. The \verb+desc+ field points to a structure defining the argument type, and the \verb+print+ field is an (optionally \verb+NULL+) pointer to a function which VIPS will call for output arguments after your function successfully completes and before the object is destroyed. It can be used to print results to the terminal, or to copy results into a user-interface layer. \begin{verbatim} /* Success on an argument. This is * called if the image processing * function succeeds and should be * used to (for example) print * output. */ typedef int (*im_print_obj_fn) ( im_object obj ); \end{verbatim} \verb+im_type_desc+ is defined as: \begin{verbatim} /* Describe a VIPS type. */ typedef struct { im_arg_type type; int size; im_type_flags flags; im_init_obj_fn init; im_dest_obj_fn dest; } im_type_desc; \end{verbatim} Where \verb+im_arg_type+ is defined as \begin{verbatim} /* Type names. You may define your * own, but if you use one of these, * then you should use the built-in * VIPS type converters. */ #define IM_TYPE_IMAGEVEC "imagevec" #define IM_TYPE_DOUBLEVEC "doublevec" #define IM_TYPE_INTVEC "intvec" #define IM_TYPE_DOUBLE "double" #define IM_TYPE_INT "integer" #define IM_TYPE_COMPLEX "complex" #define IM_TYPE_STRING "string" #define IM_TYPE_IMASK "intmask" #define IM_TYPE_DMASK "doublemask" #define IM_TYPE_IMAGE "image" #define IM_TYPE_DISPLAY "display" #define IM_TYPE_GVALUE "gvalue" typedef char *im_arg_type; \end{verbatim} In other words, it's just a string. When you add a new type, you just need to choose a new unique string to name it. Be aware that the string is printed to the user by various parts of VIPS, and so needs to be ``human-readable''. The flags are: \begin{verbatim} /* These bits are ored together to * make the flags in a type * descriptor. * * IM_TYPE_OUTPUT: set to indicate * output, otherwise input. * * IM_TYPE_ARG: Two ways of making * an im_object --- with and without * a command-line string to help you * along. Arguments with a string * are thing like IMAGE descriptors, * which require a filename to * initialise. Arguments without are * things like output numbers, where * making the object simply involves * allocating storage. */ typedef enum { IM_TYPE_OUTPUT = 0x1, IM_TYPE_ARG = 0x2 } im_type_flags; \end{verbatim} And the \verb+init+ and \verb+destroy+ functions are: \begin{verbatim} /* Initialise and destroy objects. * The "str" argument to the init * function will not be supplied * if this is not an ARG type. */ typedef int (*im_init_obj_fn) ( im_object *obj, char *str ); typedef int (*im_dest_obj_fn) ( im_object obj ); \end{verbatim} As an example, here is the definition for a new type of unsigned integers. First, we need to define the \verb+init+ and \verb+print+ functions. These transform objects of the type to and from string representation. \begin{verbatim} /* Init function for unsigned int * input. */ static int uint_init( im_object *obj, char *str ) { unsigned int *i = (int *) *obj; if( sscanf( str, "%d", i ) != 1 || *i < 0 ) { im_error( "uint_init", "bad format" ); return( -1 ); } return( 0 ); } /* Print function for unsigned int * output. */ static int uint_print( im_object obj ) { unsigned int *i = (unsigned int *) obj; printf( "%d\n", (int) *i ); return( 0 ); } \end{verbatim} Now we can define the type itself. We make two of these --- one for unsigned int used as input, and one for output. \begin{verbatim} /* Name our type. */ #define TYPE_UINT "uint" /* Input unsigned int type. */ static im_type_desc input_uint = { TYPE_UINT, /* Its an int */ sizeof( unsigned int ),/* Memory */ IM_TYPE_ARG, /* Needs arg */ uint_init, /* Init */ NULL /* Destroy */ }; /* Output unsigned int type. */ static im_type_desc output_uint = { TYPE_UINT, /* It's an int */ sizeof( unsigned int ),/* Memory */ IM_TYPE_OUTPUT, /* It's output */ NULL, /* Init */ NULL /* Destroy */ }; \end{verbatim} Finally, we can define two macros to make structures of type \verb+im_arg_desc+ for us. \begin{verbatim} #define INPUT_UINT( S ) \ { S, &input_uint, NULL } #define OUTPUT_UINT( S ) \ { S, &output_uint, uint_print } \end{verbatim} For more examples, see the definitions for the built-in VIPS types. \subsection{Using function dispatch in your application} VIPS provides a set of functions for adding new image processing functions to the VIPS function database, finding functions by name, and calling functions. See the manual pages for full details. \subsubsection{Adding and removing functions} \begin{verbatim} im_package *im_load_plugin( const char *name ); \end{verbatim} This function opens the named file, searches it for a symbol named \verb+package_table+, and adds any functions it finds to the VIPS function database. When you search for a function, any plug-ins are searched first, so you can override standard VIPS function with your own code. The function returns a pointer to the package it added, or \verb+NULL+ on error. \begin{verbatim} int im_close_plugins( void ) \end{verbatim} This function closes all plug-ins, removing then from the VIPS function database. It returns non-zero on error. \subsubsection{Searching the function database} \begin{verbatim} void *im_map_packages( im_list_map_fn fn, void *a ) \end{verbatim} This function applies the argument function \verb+fn+ to every package in the database, starting with the most recently added package. As with \verb+im_list_map()+, the argument function should return \verb+NULL+ to continue searching, or non-\verb+NULL+ to terminate the search early. \verb+im_map_packages()+ returns \verb+NULL+ if \verb+fn+ returned \verb+NULL+ for all arguments. The extra argument \verb+a+ is carried around by VIPS for your use. For example, this fragment of code prints the names of all loaded packages to \verb+fd+: \begin{verbatim} static void * print_package_name( im_package *pack, FILE *fp ) { (void) fprintf( fp, "package: \"%s\"\n", pack->name ); /* Continue search. */ return( NULL ); } static void print_packages( FILE *fp ) { (void) im_map_packages( (im_list_map_fn) print_package_name, fp ); } \end{verbatim} VIPS defines three convenience functions based on \verb+im_map_packages()+ which simplify searching for specific functions: \begin{verbatim} im_function * im_find_function( char *name ) im_package * im_find_package( char *name ) im_package * im_package_of_function( char *name ) \end{verbatim} \subsubsection{Building argument structures and running commands} \begin{verbatim} int im_free_vargv( im_function *fn, im_object *vargv ) int im_allocate_vargv( im_function *fn, im_object *vargv ) \end{verbatim} These two functions allocate space for and free VIPS argument lists. The allocate function simply calls \verb+im_malloc()+ to allocate any store that the types require (and also initializes it to zero). The free function just calls \verb+im_free()+ for any storage that was allocated. Note that neither of these functions calls the \verb+init+, \verb+dest+ or \verb+print+ functions for the types --- that's up to you. \begin{verbatim} int im_run_command( char *name, int argc, char **argv ) \end{verbatim} This function does everything. In effect, \begin{verbatim} im_run_command( "im_invert", 2, { "fred.v", "fred2.v", NULL } ) \end{verbatim} is exactly equivalent to \begin{verbatim} system( "vips im_invert fred.v " "fred2.v" ) \end{verbatim} but no process is forked. vips-7.38.5/doc/src/vimage.tex0000644000175000017500000002641412303140253013046 00000000000000\section{The \texttt{VImage} class} The \verb+VImage+ class is a layer over the VIPS \verb+IMAGE+ type. It automates almost all of the image creation and destruction issues that complicate the C API, it automates error handling, and it provides a convenient system for composing operations. \subsection{Constructors} There are two principal constructors for \verb+VImage+: \begin{verbatim} VImage::VImage( const char *name, const char *mode = "r" ); VImage::VImage(); \end{verbatim} The first form creates a new \verb+VImage+, linking it to the named file. \verb+mode+ sets the mode for the file: it can take the following values: \begin{description} \item[\texttt{"r"}] The named image file is opened read-only. This is the default mode. \item[\texttt{"w"}] A \verb+VImage+ is created which, when written to, will write pixels to disc in the specified file. Any existing file of this name is deleted. \item[\texttt{"t"}] As the \verb'"w"' mode, but pixels written to the \verb+VImage+ will be saved in a temporary memory buffer. \item[\texttt{"p"}] This creates a special `partial' image. Partial images represent intermediate results, and are used to join VIPS operations together, see~\pref{sec:compute}. \item[\texttt{"rw"}] As the \verb'"r"' mode, but the image is mapped into your address space read-write. This mode is useful for paintbox-style applications which need to directly modify an image. See \pref{sec:inplace}. \end{description} The second form of constructor is shorthand for: \begin{verbatim} VImage( "VImage:1", "p" ) \end{verbatim} \noindent It is used for representing intermediate results of computations. Two further constructors are handy for wrapping \verb+VImage+ around existing images. \begin{verbatim} VImage( void *buffer, int width, int height, int bands, TBandFmt format ); VImage( void *image ); \end{verbatim} \noindent The first constructor makes a \verb+VImage+ from an area of memory (perhaps from another image processing system), and the second makes a \verb+VImage+ from an \verb+IMAGE+. In both these two cases, the VIPS C++ API does not assume responsibility for the resources: it's up to you to make sure the buffer is freed. The Python interface adds the usual \verb+frombuffer+ and \verb+fromstring+ methods. \begin{verbatim} VImage.fromstring (string, width, height, bands, format) -> VImage \end{verbatim} \begin{verbatim} VImage.frombuffer (buffer, width, height, bands, format) -> VImage \end{verbatim} \noindent Use \verb+fromstring+ to avoid worries about object lifetime, but you'll see a lot of copies and high memory use. Use \verb+frombuffer+ for speed, but you have to manage object lifetime yourself. They are useful for moving images into VIPS from other image processing libraries. There's also a utility function, \verb+vips_from_PIL_mode+, which turns a PIL mode into a VIPS band, format, type triple. \begin{verbatim} VImage.vips_from_PIL_mode (mode) -> (bands, format, type) \end{verbatim} See also \verb+tobuffer+ and \verb+tostring+ below. \subsection{File conversion} VIPS can read and write a number of different file formats. Information about file format conversion is taken from the filename. For example: \begin{verbatim} VImage jim( "fred.jpg" ); \end{verbatim} \noindent This will decompress the file \verb+fred.jpg+ to a memory buffer, wrap a VIPS image around the buffer and build a reference to it called \verb+jim+. Options are passed to the file format converters embedded in the filename. For example: \begin{verbatim} VImage out( "jen.tif:deflate", "w" ); \end{verbatim} \noindent Writing to the descriptor \verb+out+ will cause a TIFF image to be written to disc with deflate compression. See the manual page for \verb+im_open(3)+ for details of all the file formats and conversions available. See the man page for \verb+VipsFormat(3)+ for a lower-level API which lets you control more of the detail of reading and writing data and is more suitable for large files. \subsection{Projection functions} A set of member functions of \verb+VImage+ provide access to the fields in the header: \begin{verbatim} int Xsize(); int Ysize(); int Bands(); TBandFmt BandFmt(); TCoding Coding(); TType Type(); float Xres(); float Yres(); int Length(); TCompression Compression(); short Level(); int Xoffset(); int Yoffset(); \end{verbatim} \noindent Where \verb+TBandFmt+, \verb+TCoding+, \verb+TType+ and \verb+TCompression+ are \verb+enum+s for the types in the VIPS file header. See section~\pref{sec:header} for an explanation of all of these fields. Two functions give access to the filename and history fields maintained by the VIPS IO system. \begin{verbatim} char *filename(); char *Hist(); \end{verbatim} You can get and set extra metadata fields with \verb+meta_get()+ and \verb+meta_set()+. They read and write \verb+GValue+ objects, see \pref{sec:meta}. \begin{verbatim} void meta_set( const char *field, GValue *value ); void meta_get( const char *field, GValue *value_copy ); GType meta_get_type( const char *field ); \end{verbatim} A set of convenience functions build on these two to provide accessors for common types. \begin{verbatim} int meta_get_int( const char *field ) double meta_get_double( const char *field ) const char *meta_get_string( const char *field ) void *meta_get_area( const char *field ) void *meta_get_blob( const char *field, size_t *length ) void meta_set( const char *field, int value ) void meta_set( const char *field, double value ) void meta_set( const char *field, const char *value ) void meta_set( const char *field, VCallback free_fn, void *value ) void meta_set( const char *field, VCallback free_fn, void *value, size_t length ) \end{verbatim} The \verb+image()+ member function provides access to the \verb+IMAGE+ descriptor underlying the C++ API. See the \pref{sec:appl} for details. \begin{verbatim} void *image(); \end{verbatim} The \verb+data()+ member function returns a pointer to an array of pixel data for the image. \begin{verbatim} void *data() const; \end{verbatim} \noindent This can be very slow and use huge amounts of RAM. The Python interface adds \verb+tobuffer+ and \verb+tostring+. These operations call \verb+data()+ to generate the image pixels and then either copy it and return the copy as a string, or wrap the pixels up as a Python buffer object. Use \verb+tostring+ to avoid worries about object lifetime, but you'll see a lot of copies and high memory use. Use \verb+tobuffer+ for speed, but you have to manage object lifetime yourself. They are useful for moving images from VIPS into other image processing libraries. There's also a utility function, \verb+PIL_mode_from_vips+, which makes a PIL mode from a VIPS image. \begin{verbatim} VImage.PIL_mode_from_vips (vips-image) -> mode \end{verbatim} See also \verb+frombuffer+ and \verb+fromstring+ above. \subsection{Assignment} \verb+VImage+ defines copy and assignment, with reference-counted, pointer-style semantics. For example, if you write: \begin{verbatim} VImage fred( "fred.v" ); VImage jim( "jim.v" ); fred = jim; \end{verbatim} This will automatically close the file \verb+fred.v+, and make the variable \verb+fred+ point to the image \verb+jim.v+ instead. Both \verb+jim+ and \verb+fred+ now point to the same underlying image object. Internally, a \verb+VImage+ object is just a pointer to a reference-counting block, which in turn holds a pointer to the underlying VIPS \verb+IMAGE+ type. You can therefore efficiently pass \verb+VImage+ objects to functions by value, and return \verb+VImage+ objects as function results. \subsection{Computing with \texttt{VImage}s} \label{sec:compute} All VIPS image processing operations are member functions of the \verb+VImage+ class. For example: \begin{verbatim} VImage fred( "fred.v" ); VImage jim( "jim.v" ); VImage result = fred.cos() + jim; \end{verbatim} Will apply \verb+im_costra()+ to \verb+fred.v+, making an image where each pixel is the cosine of the corresponding pixel in \verb+fred.v+; then add that image to \verb+jim.v+. Finally, the result will be held in \verb+result+. VIPS is a demand-driven image processing system: when it computes expressions like this, no actual pixels are calculated (although you can use the projection functions on images --- \verb+result.BandFmt()+ for example). When you finally write the result to a file (or use some operation that needs pixel values, such as \verb+min()+, find minimum value), VIPS evaluates all of the operations you have called to that point in parallel. If you have more than one CPU in your machine, the load is spread over the available processors. This means that there is no limit to the size of the images you can process. \pref{sec:packages} lists all of the VIPS packages. These general rules apply: \begin{itemize} \item VIPS operation names become C++ member function names by dropping the \verb+im_+ prefix, and if present, the \verb+tra+ postfix, the \verb+const+ postfix and the \verb+_vec+ postfix. For example, the VIPS operation \verb+im_extract()+ becomes \verb+extract()+, and \verb+im_costra()+ becomes \verb+cos()+. \item The \verb+VImage+ object to which you apply the member function is the first input image, the member function returns the first output. If there is no image input, the member is declared \verb+static+. For example, \verb+im_project(3)+ returns two images. You can call it from Python like this: \begin{verbatim} hout = VImage.VImage () vout = im.project (hout) \end{verbatim} \noindent In other words, \verb+.project()+ writes the second result to the \verb+VImage+ you pass as an argument. \item \verb+INTMASK+ and \verb+DOUBLEMASK+ types become \verb+VMask+ objects, \verb+im_col_display+ types become \verb+VDisplay+ objects. \item Several C API functions can map to the same C++ API member. For example, \verb+im_andimage+, \verb+im_andimage_vec+ and \verb+im_andimageconst+ all map to the member \verb+andimage+. The API relies on overloading to discriminate between these functions. \end{itemize} This part of the C++ API is generated automatically from the VIPS function database, so it should all be up-to-date. There are a set of arithmetic operators defined for your convenience. You can generally write any arithmetic expression and include \verb+VImage+ in there. \begin{verbatim} VImage fred( "fred.v" ); VImage jim( "jim.v" ); Vimage v = int((fred + jim) / 2); \end{verbatim} \subsection{Writing results} Once you have computed some result, you can write it to a file with the member \verb+write()+. It takes the following forms: \begin{verbatim} VImage write( const char *name ); VImage write( VImage out ); VImage write(); \end{verbatim} The first form simply writes the image to the named file. The second form writes the image to the specified \verb+VImage+ object, for example: \begin{verbatim} VImage fred( "fred.v" ); VImage jim( "jim buffer", "t" ); Vimage v = (fred + 42).write( jim ); \end{verbatim} \noindent This creates a temporary memory buffer called \verb+jim+, and fills it with the result of adding 42 to every pixel in \verb+fred.v+. The final form of \verb+write()+ writes the image to a memory buffer, and returns that. \subsection{Type conversions} Two type conversions are defined: you can cast \verb+VImage+ to a \verb+VDMask+ and to a \verb+VIMask+. \begin{verbatim} operator VDMask(); operator VIMask(); \end{verbatim} These operations are slow and need a lot of memory! Emergencies only. vips-7.38.5/doc/src/fileformat.tex0000644000175000017500000001735612303140253013733 00000000000000\section{The VIPS file format} VIPS has its own very simple file format. It is used inside VIPS to hold images during computation. You can save images in VIPS format if you want, but the VIPS format is not widely used and you may have problems reading your images into other packages. If you intend to keep an image, it's much better to save it as TIFF, JPEG, PNG, PBM/PGM/PPM or HDR. VIPS can transparently read and write all these formats. \subsection{VIPS file header} \label{sec:header} All VIPS image files start with a 64-byte header giving basic information about the image dimensions, see \tref{fg:header}. This is followed by the image data. This is usually just the pixel values in native format (ie. the byte order used by the machine that wrote the file) laid out left-to-right and top-to-bottom. After the image data comes a block of optional XML which holds extra image metadata, such as ICC profiles and image history. You can use the command-line program \verb+header+ to extract the XML from an image and \verb+edvips+ to replace it, see the man pages. The \ct{Type} field, the \ct{Xres}/\ct{Yres} fields, and the \ct{Xoffset}/\ct{Yoffset} fields are advisory. VIPS maintains their value (if you convert an image to \cielab{} colour space with \ct{im\_XYZ2Lab()}, for example, VIPS will set \ct{Type} to be \ct{IM\_TYPE\_LAB}), but never uses these values itself in determining the action of an image processing function. These fields are to help the user and to help application programs built on VIPS which are trying to present image data to the user in a meaningful way. The \ct{BandFmt}, \ct{Coding} and \ct{Type} fields can take the values shown in tables~\ref{fg:bandfmt}, \ref{fg:coding} and \ref{fg:type}. The C++ and Python names for these values are slightly different, for historical reasons. \begin{tab2} \begin{center} \begin{tabular}{|l|l|l|} \hline Bytes & Represent & VIPS name \\ \hline 0--3 & VIPS magic number (in hex, 08 f2 f6 b6) & \\ 4--7 & Number of pels per horizontal line (integer) & \ct{Xsize} \\ 8--11 & Number of horizontal lines (integer) & \ct{Ysize} \\ 12--15 & Number of bands (integer) & \ct{Bands} \\ 16--19 & Unused (legacy) & \ct{Bbits} \\ 20--23 & Band format (eg. \ct{IM\_BANDFMT\_USHORT}) & \ct{BandFmt} \\ 24--27 & Coding type (eg. \ct{IM\_CODING\_NONE}) & \ct{Coding} \\ 28--31 & Type (eg. \ct{IM\_TYPE\_LAB}) & \ct{Type} \\ 32--35 & Horizontal resolution (float, pixels mm$^{-1}$) & \ct{Xres} \\ 36--39 & Vertical resolution (float, pixels mm$^{-1}$) & \ct{Yres} \\ 40--43 & Unused (legacy) & \ct{Length} \\ 44--45 & Unused (legacy) & \ct{Compression} \\ 46--47 & Unused (legacy) & \ct{Level} \\ 48--51 & Horizontal offset of origin & \ct{Xoffset} \\ 52--55 & Vertical offset of origin & \ct{Yoffset} \\ 56--63 & For future expansion (all zeros for now) & \\ \hline \end{tabular} \end{center} \caption{VIPS header\label{fg:header}} \end{tab2} \begin{tab2} \begin{center} \begin{tabular}{|l|l|l|l|} \hline \ct{BandFmt} & C++ and Python name & Value & Meaning \\ \hline \ct{IM\_BANDFMT\_NOTSET} & \ct{FMTNOTSET} & -1 & \\ \ct{IM\_BANDFMT\_UCHAR} & \ct{FMTUCHAR} & 0 & Unsigned 8-bit int \\ \ct{IM\_BANDFMT\_CHAR} & \ct{FMTCHAR} & 1 & Signed 8-bit int \\ \ct{IM\_BANDFMT\_USHORT} & \ct{FMTUSHORT} & 2 & Unsigned 16-bit int \\ \ct{IM\_BANDFMT\_SHORT} & \ct{FMTSHORT} & 3 & Signed 16-bit int \\ \ct{IM\_BANDFMT\_UINT} & \ct{FMTUINT} & 4 & Unsigned 32-bit int \\ \ct{IM\_BANDFMT\_INT} & \ct{FMTINT} & 5 & Signed 32-bit int \\ \ct{IM\_BANDFMT\_FLOAT} & \ct{FMTFLOAT} & 6 & 32-bit IEEE float \\ \ct{IM\_BANDFMT\_COMPLEX} & \ct{FMTCOMPLEX} & 7 & Complex (2 floats) \\ \ct{IM\_BANDFMT\_DOUBLE} & \ct{FMTDOUBLE} & 8 & 64-bit IEEE double \\ \ct{IM\_BANDFMT\_DPCOMPLEX} & \ct{FMTDPCOMPLEX} & 9 & Complex (2 doubles) \\ \hline \end{tabular} \end{center} \caption{Possible values for \ct{BandFmt}\label{fg:bandfmt}} \end{tab2} \begin{tab2} \begin{center} \begin{tabular}{|l|l|l|l|} \hline \ct{Coding} & C++ and Python name & Value & Meaning \\ \hline \ct{IM\_CODING\_NONE} & \ct{NOCODING} & 0 & VIPS computation format \\ \ct{IM\_CODING\_LABQ} & \ct{LABQ} & 2 & LABQ storage format \\ \ct{IM\_CODING\_RAD} & \ct{RAD} & 6 & Radiance storage format \\ \hline \end{tabular} \end{center} \caption{Possible values for \texttt{Coding}\label{fg:coding}} \end{tab2} \begin{tab2} \begin{center} \begin{tabular}{|l|l|l|l|} \hline \ct{Type} & C++ and Python name & Value & Meaning \\ \hline \ct{IM\_TYPE\_MULTIBAND} & \ct{MULTIBAND} & 0 & Some multiband image \\ \ct{IM\_TYPE\_B\_W} & \ct{B\_W} & 1 & Some single band image \\ \ct{IM\_TYPE\_HISTOGRAM} & \ct{HISTOGRAM} & 10 & Histogram or LUT \\ \ct{IM\_TYPE\_FOURIER} & \ct{FOURIER} & 24 & Image in Fourier space \\ \ct{IM\_TYPE\_XYZ} & \ct{XYZ} & 12 & \ciexyz{} colour space \\ \ct{IM\_TYPE\_LAB} & \ct{LAB} & 13 & \cielab{} colour space \\ \ct{IM\_TYPE\_CMYK} & \ct{CMYK} & 15 & \ct{im\_icc\_export()} \\ \ct{IM\_TYPE\_LABQ} & \ct{LABQ} & 16 & 32-bit \cielab{} \\ \ct{IM\_TYPE\_RGB} & \ct{RGB} & 17 & Some RGB \\ \ct{IM\_TYPE\_UCS} & \ct{UCS} & 18 & \cieucs{} colour space \\ \ct{IM\_TYPE\_LCH} & \ct{LCH} & 19 & \cielch{} colour space \\ \ct{IM\_TYPE\_LABS} & \ct{LABS} & 21 & 48-bit \cielab{} \\ \ct{IM\_TYPE\_sRGB} & \ct{sRGB} & 22 & sRGB colour space \\ \ct{IM\_TYPE\_YXY} & \ct{YXY} & 23 & \cieyxy{} colour space \\ \ct{IM\_TYPE\_RGB16} & \ct{RGB16} & 25 & 16-bit RGB \\ \ct{IM\_TYPE\_GREY16} & \ct{GREY16} & 26 & 16-bit monochrome \\ \hline \end{tabular} \end{center} \caption{Possible values for \texttt{Type}\label{fg:type}} \end{tab2} \subsection{Computation formats} This type of image has \ct{Coding} set to \ct{IM\_CODING\_NONE}. The header is then followed by a large array of pixels, laid out left-to-right, top-to-bottom. Each pixel contains the specified number of bands. Each band has the specified band format, which may be an 8-, 16- or 32-bit integer (either signed or unsigned), a single or double precision IEEE floating point number, or a pair of single or double precision floats forming a complex number. All values are stored in the host-machine's native number representation (that is, either most-significant first, as in SPARC and 680x0 machines, or least-significant first, for Intel and DEC machines). If necessary, the VIPS library will automatically byte-swap for you during read. \subsection{Storage formats} All storage formats have other values for the \ct{Coding} field. This release supports \ct{IM\_CODING\_LABQ} and \ct{IM\_CODING\_RAD}. \ct{IM\_CODING\_LABQ} stores $L^{*}$, $a^{*}$ and $b^{*}$ for each pixel, with 10 bits for $L^{*}$ and 11 bits for each of $a^{*}$ and $b^{*}$. These 32 bits are packed into 4 bytes, with the most significant 8 bits of each value in the first 3 bytes, and the left-over bits packed into the final byte as 2:3:3. This format is a little awkward to process. Some VIPS functions can work directly on \ct{IM\_CODING\_LABQ} images (\ct{im\_extract\_area()}, for example), but most will require you to unpack the image to one of the computation formats (for example with \ct{im\_LabQ2Lab()}) first. \ct{IM\_CODING\_RAD} stores $RGB$ or $XYZ$ float images as 8 bytes of mantissa and then 8 bytes of exponent, shared between the three channels. This coding style is used by the Radiance family of programs (and the HDR format) commonly used for HDR imaging. This style of image is generated when you load an HDR image. This format is a little awkward to process. Some VIPS functions can work directly on \ct{IM\_CODING\_RAD} images (\ct{im\_extract\_area()}, for example), but most will require you to unpack the image to one of the computation formats with \ct{im\_rad2float()} first. vips-7.38.5/doc/src/mydefs.tex0000644000175000017500000000605512303140253013064 00000000000000% My defs % Computer Text, Computer text=>, Computer Text Display \newcommand{\ct}[1]{\texttt{#1}} \newcommand{\ctr}[1]{\ct{#1} / } \newenvironment{ctd}{\begin{quote}\footnotesize\tt}{\end{quote}} \pagecolor{white} % abbreviations \newcommand{\vips}{\ct{vips}} \newcommand{\nip}{\ct{nip2}} \newcommand{\bs}{$\backslash$} \newcommand{\rtp}{\^{ }} \newcommand{\cielab}{\emph{CIE~}$L^{*}a^{*}b^{*}$} \newcommand{\ciexyz}{\emph{CIE XYZ}} \newcommand{\cieyxy}{\emph{CIE Yxy}} \newcommand{\cielch}{\emph{CIE LCh}} \newcommand{\cieucs}{\emph{UCS(1:1)}} \newcommand{\cross}{$\times{}$} % make a label ... override this for HTML output \newcommand{\mylabel}[1]{\label{#1}} % generate " on page xx" if a label is referring to something on another page % override this for HTML output \newcounter{boink} \newcommand{\onpage}[1]{% \addtocounter{boink}{1}% \label{atref\theboink{}}% \ifthenelse{\pageref{atref\theboink{}}=\pageref{#1}}% {}% { on page~\pageref{#1}}} % format a reference to a section .. "$3.11 on page 37" \newcommand{\pref}[1]{\S\ref{#1}\onpage{#1}} \newcommand{\tref}[1]{Table~\ref{#1}\onpage{#1}} \newcommand{\fref}[1]{Figure~\ref{#1}\onpage{#1}} \newcommand{\cref}[1]{Chapter~\ref{#1}\onpage{#1}} \newcommand{\aref}[1]{Appendix~\ref{#1}\onpage{#1}} % Insert a file ... height and name. \newcommand{\fig}[2]{ \begin{center} \includegraphics[height=#1]{figs/#2} \end{center} } % Insert a file ... width and name. \newcommand{\figw}[2]{ \begin{center} \includegraphics[width=#1]{figs/#2} \end{center} } % make a 2-column figure ... define our own so we can easily override in html % output \newenvironment{fig2}{\begin{figure*}}{\end{figure*}} % same for 2-col tables \newenvironment{tab2}{\begin{table*}}{\end{table*}} % environment for setting ip defs \newenvironment{ipdef}{ \par \samepage \begin{ctd} \begin{tabular}{@{\hspace{0.2em}}ll@{\hspace{0.2em}}ll@{\hspace{0.2em}}ll@{\hspace{0.2em}}ll@{\hspace{0.2em}}ll@{\hspace{0.2em}}ll@{\hspace{0.2em}}ll@{\hspace{0.2em}}lllllllllllllllllllllllllllll} ~~~ & ~ & ~~~ & ~ & ~~~ & ~ & ~~~ & ~ & ~~~ & ~ & ~~~ & ~ & ~~~ & ~ & ~~~ & \\[-1.3em] }{ \end{tabular} \end{ctd} \par } % causes problems for htlatex :-( % make this a noop for now % \newcommand{\dtxt}[1]{\multicolumn{25}{@{\hspace{0.2em}}l}{#1}} \newcommand{\dtxt}[1]{#1} % Insert a blank page \newcommand{\blankpage}{% \newpage ~~~~ \pagestyle{plain} \newpage % Another one necessary in twocolumn mode ~~~~ \newpage \pagestyle{fancy} } %\addtolength{\headheight}{3pt} % Make text a bit wider, since we are two column. \addtolength{\textwidth}{0.5in} \addtolength{\oddsidemargin}{-0.25in} \addtolength{\evensidemargin}{-0.25in} % twocolumn seems to remove the binding offset ... add it back %\addtolength{\oddsidemargin}{-0.2in} %\addtolength{\evensidemargin}{0.2in} % More space between headers and footers and the body \addtolength{\topmargin}{-0.5em} \addtolength{\headsep}{0.5em} \addtolength{\footskip}{0.5em} % Swap left and right binding offsets \newlength{\fred} \setlength{\fred}{\oddsidemargin} \setlength{\oddsidemargin}{\evensidemargin} \setlength{\evensidemargin}{\fred} vips-7.38.5/doc/src/vmask.tex0000644000175000017500000001055512303140253012716 00000000000000\section{The \texttt{VMask} class} The \verb+VMask+ class is an abstraction over the VIPS \verb+DOUBLEMASK+ and \verb+INTMASK+ types which gives convenient and safe representation of matrices. \verb+VMask+ has two sub-classes, \verb+VIMask+ and \verb+VDMask+. These represent matrices of integers and doubles respectively. \subsection{Constructors} There are four constructors for \verb+VIMask+ and \verb+VDMask+: \begin{verbatim} VIMask( int xsize, int ysize ); VIMask( int xsize, int ysize, int scale, int offset, ... ); VIMask( int xsize, int ysize, int scale, int offset, std::vector coeff ); VIMask( const char *name ); VIMask(); VDMask( int xsize, int ysize ); VDMask( int xsize, int ysize, double scale, double offset, ... ); VDMask( int xsize, int ysize, double scale, double offset, std::vector coeff ); VDMask( const char *name ); VDMask(); \end{verbatim} The first form creates an empty matrix, with the specified dimensions; the second form initialises a matrix from a varargs list; the third form sets the matrix from a vector of coefficients; the fourth from the named file. The final form makes a mask object with no contents yet. The varargs constructors are not wrapped in Python --- use the vector constructor instead. For example: \begin{verbatim} m = VMask.VIMask (3, 3, 1, 0, [-1, -1, -1, -1, 8, -1, -1, -1, -1]) \end{verbatim} \subsection{Projection functions} A set of member functions of \verb+VIMask+ provide access to the fields in the matrix: \begin{verbatim} int xsize() const; int ysize() const; int scale() const; int offset() const; const char *filename() const; \end{verbatim} \verb+VDMask+ is the same, except that the \verb+scale()+ and \verb+offset()+ members return \verb+double+. \verb+VMask+ allows all operations that are common to \verb+VIMask+ and \verb+VDMask+. \subsection{Assignment} \verb+VMask+ defines copy and assignment with pointer-style semantics. You can write stuff like: \begin{verbatim} VIMask fred( "mask" ); VMask jim; jim = fred; \end{verbatim} This reads the file \verb+mask+, noting a pointer to the mask in \verb+fred+. It then makes \verb+jim+ also point to it, so \verb+jim+ and \verb+fred+ are sharing the same underlying matrix values. Internally, a \verb+VMask+ object is just a pointer to a reference-counting block, which in turn holds a pointer to the underlying VIPS \verb+MASK+ type. You can therefore efficiently pass \verb+VMask+ objects to functions by value, and return \verb+VMask+ objects as function results. \subsection{Computing with \texttt{VMask}} You can use \verb+[]+ to get at matrix elements, numbered left-to-right, top-to-bottom. Alternatively, use \verb+()+ to address elements by $x,y$ position. For example: \begin{verbatim} VIMask fred( "mask" ); for( int i = 0; i < fred.xsize(); i++ ) fred[i] = 12; \end{verbatim} \noindent will set the first line of the matrix to 12, and: \begin{verbatim} VDMask fred( "mask" ); for( int x = 0; x < fred.xsize(); x++ ) fred(x, x) = 12.0; \end{verbatim} \noindent will set the leading diagonal to 12. These don't work well in Python, so there's an extra member, \verb+get()+, which will get an element by $x,y$ position. \begin{verbatim} x = mat.get (2, 4) \end{verbatim} See the member functions below for other operations on \verb+VMask+. \subsection{\texttt{VIMask} operations} The following operations are defined for \verb+VIMask+: \begin{verbatim} // Cast to VDMask and VImage operator VDMask(); operator VImage(); // Build gaussian and log masks static VIMask gauss( double, double ); static VIMask gauss_sep( double, double ); static VIMask log( double, double ); // Rotate VIMask rotate45(); VIMask rotate90(); // Transpose, invert, join and multiply VDMask trn() ; VDMask inv(); VDMask cat( VDMask ); VDMask mul( VDMask ); \end{verbatim} \subsection{\texttt{VDMask} operations} The following operations are defined for \verb+VDMask+: \begin{verbatim} // Cast to VIMask and VImage operator VIMask(); operator VImage(); // Build gauss and log masks static VDMask gauss( double, double ); static VDMask log( double, double ); // Rotate VDMask rotate45(); VDMask rotate90(); // Scale to intmask VIMask scalei(); // Transpose, invert, join and multiply VDMask trn(); VDMask inv(); VDMask cat( VDMask ); VDMask mul( VDMask ); \end{verbatim} \subsection{Output of masks} You can output masks with the usual \verb+<<+ operator. vips-7.38.5/doc/src/format.tex0000644000175000017500000001061612303140253013063 00000000000000\section{Image formats} \label{sec:format} VIPS has a simple system for adding support for new image file formats. You can ask VIPS to find a format to load a file with or to select a image file writer based on a filename. Convenience functions copy a file to an \verb+IMAGE+, or an \verb+IMAGE+ to a file. New formats may be added to VIPS by simply defining a new subclass of \verb+VipsFormat+. This is a parallel API to \verb+im_open()+, see \pref{sec:open}. The format system is useful for images which are large or slow to open, because you pass a descriptor to write to and so control how and where the decompressed image is held. \verb+im_open()+ is useful for images in formats which can be directly read from disc, since you will avoid a copy operation and can directly control the disc file. The inplace operations (see \pref{sec:inplace}), for example, will only work directly on disc images if you use \verb+im_open()+. \subsection{How a format is represented} See the man page for \verb+VipsFormat+ for full details, but briefly, an image format consists of the following items: \begin{itemize} \item A name, a name that can be shows to the user, and a list of possible filename suffixes (\verb+.tif+, for example) \item A function which tests for a file being in that format, a function which loads just the header of the file (that is, it reads properties like width and height and does not read any pixel data) and a function which loads the pixel data \item A function which will write an \verb+IMAGE+ to a file in the format \item And finally a function which examines a file in the format and returns flags indicating how VIPS should deal with the file. The only flag in the current version is one indicating that the file can be opened lazily \end{itemize} \subsection{The format class} The interface to the format system is defined by the abstract base class \verb+VipsFormat+. Formats subclass this and implement some or all of the methods. Any of the functions may be left NULL and VIPS will try to make do with what you do supply. Of course a format with all functions as NULL will not be very useful. As an example, \fref{fg:newformat} shows how to register a new format in a plugin. \begin{fig2} \begin{verbatim} static const char *my_suffs[] = { ".me", NULL }; static int is_myformat( const char *filename ) { unsigned char buf[2]; if( im__get_bytes( filename, buf, 2 ) && (int) buf[0] == 0xff && (int) buf[1] == 0xd8 ) return( 1 ); return( 0 ); } // This format adds no new members. typedef VipsFormat VipsFormatMyformat; typedef VipsFormatClass VipsFormatMyformatClass; static void vips_format_myformat_class_init( VipsFormatMyformatClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsFormatClass *format_class = (VipsFormatClass *) class; object_class->nickname = "myformat"; object_class->description = _( "My format" ); format_class->is_a = is_myformat; format_class->header = my_header; format_class->load = my_read; format_class->save = my_write; format_class->get_flags = my_get_flags; format_class->priority = 100; format_class->suffs = my_suffs; } static void vips_format_myformat_init( VipsFormatMyformat *object ) { } G_DEFINE_TYPE( VipsFormatMyformat, vips_format_myformat, VIPS_TYPE_FORMAT ); char * g_module_check_init( GModule *self ) { // register the type vips_format_myformat_get_type(); } \end{verbatim} \caption{Registering a format in a plugin} \label{fg:newformat} \end{fig2} \subsection{Finding a format} You can loop over the subclasses of \verb+VipsFormat+ in order of priority with \verb+vips_format_map()+. Like all the map functions in VIPS, this take a function and applies it to every element in the table until the function returns non-zero or until the table ends. You find an \verb+VipsFormatClass+ to use to open a file with \verb+vips_format_for_file()+. This finds the first format whose \verb+is_a()+ function returns true or whose suffix list matches the suffix of the filename, setting an error message and returning NULL if no format is found. You find a format to write a file with \verb+vips_format_for_name()+. This returns the first format with a save function whose suffix list matches the suffix of the supplied filename. \subsection{Convenience functions} A pair of convenience functions, \verb+vips_format_write()+ and \verb+vips_format_read()+, will copy an image to and from disc using the appropriate format. vips-7.38.5/doc/src/vipsmanual.tex0000644000175000017500000000332412303140253013750 00000000000000\documentclass[a4paper,twocolumn,dvips]{book} \usepackage[dvips=false,pdftex=false,vtex=false]{geometry} \usepackage{ifpdf} \ifpdf \usepackage[pdftex]{graphicx,color} \else \usepackage{graphicx,color} \fi \usepackage{times} \usepackage{fancyhdr} \usepackage{ifthen} \input{mydefs} \fancyhead{} % clear all fields \fancyhead[LE,RO]{\leftmark} % left-even, right-odd \fancyhead[RE,LO]{VIPS Manual} % right-even, left-odd \fancyfoot[LE,RO]{\thepage} % left-even, right-odd \fancyfoot[RE,LO]{January 2014} \begin{document} \pagenumbering{roman} \begin{titlepage} \thispagestyle{empty} \begin{center} \huge VIPS Manual\\ \large Version 7.38\\ \vspace{0.5in} \large John Cupitt, Kirk Martinez\\ \end{center} VIPS is currently (v. 7.38, June 2014) in an API transition. The API as documented in 7.24 is still complete and supported and is the one you should use. The 8.0 API is not yet done and may still change before completion. % hmm ... must be a better way to get the quote at the bottom of the page \vspace{5in} This manual formatted \today \setcounter{page}{1} \end{titlepage} % \blankpage \tableofcontents \thispagestyle{plain} % \blankpage \listoffigures \thispagestyle{plain} % \blankpage \listoftables \thispagestyle{plain} % \blankpage \pagenumbering{arabic} \thispagestyle{plain} \cfoot{} \chapter{VIPS from C++ and Python} \input{cppintro} \input{fileformat} \input{vimage} \input{vmask} \input{vdisplay} \input{verror} \chapter{VIPS for C programmers} \input{applintro} \input{iosys} \input{func} \input{object} \input{format} \input{interpolate} \chapter{Writing VIPS operations} \input{operintro} \input{wio} \input{pio} \input{ipio} \chapter{VIPS reference} \input{refintro} \input{packages} \end{document} vips-7.38.5/doc/src/verror.tex0000644000175000017500000000330512303140253013107 00000000000000\section{The \texttt{VError} class} The \verb+VError+ class is the class thrown by the VIPS C++ API when an error is detected. It is derived from \verb+std::exception+ in the usual way. \subsection{Constructors} There are two constructors for \verb+VError+: \begin{verbatim} VError( std::string str ); VError(); \end{verbatim} The first form creates an error object initialised with the specified string, the last form creates an empty error object. \subsection{Projection functions} A function gives access to the string held by \verb+VError+: \begin{verbatim} const char *what(); \end{verbatim} You can also send to an \verb+ostream+. \begin{verbatim} std::ostream& operator<<( std::ostream&, const error& ); \end{verbatim} \subsection{Computing with \texttt{VError}} Two member functions let you append elements to an error: \begin{verbatim} VError &app( std::string txt ); VError &app( const int i ); \end{verbatim} For example: \begin{verbatim} VError wombat; int n = 12; wombat.app( "possum: no more than " ). app( n ).app( " elements\n" ); throw( wombat ); \end{verbatim} \noindent will throw a \verb+VError+ with a diagnostic of: \begin{verbatim} possum: no more than 12 elements \end{verbatim} The member function \verb+perror()+ prints the error message to \verb+stdout+ and exits with a code of 1. \begin{verbatim} void perror( const char * ); void perror(); \end{verbatim} \subsection{Convenience function} The convenience function \verb+verror+ creates an \verb+VError+ with the specified error string, and throws it. If you pass \verb+""+ for the string, verror uses the contents of the VIPS error buffer instead. \begin{verbatim} extern void verror( std::string str = "" ); \end{verbatim} vips-7.38.5/doc/src/iosys.tex0000644000175000017500000006675512303140253012760 00000000000000\section{Core C API} VIPS is built on top of several other libraries, two of which, glib and gobject, are exposed at various points in the C API. You can read up on glib at the GTK+ website: \begin{verbatim} http://www.gtk.org \end{verbatim} There's also an excellent book by Matthias Warkus, \emph{The Official GNOME 2 Developer's Guide}, which covers the same material in a tutorial manner. \subsection{Startup} Before calling any VIPS function, you need to start VIPS up: \begin{verbatim} int im_init_world( const char *argv0 ); \end{verbatim} The \verb+argv0+ argument is the value of \verb+argv[0]+ your program was passed by the host operating system. VIPS uses this with \verb+im_guess_prefix()+ and \verb+im_guess_libdir()+ to try to find various VIPS data files. If you don't call this function, VIPS will call it for you the first time you use a VIPS function. But it won't be able to get the \verb+argv0+ value for you, so it may not be able to find it's data files. VIPS also offers the optional: \begin{verbatim} GOptionGroup *im_get_option_group( void ); \end{verbatim} You can use this with GOption to parse your program's command-line arguments. It adds several useful VIPS flags, including \verb+--vips-concurrency+. \fref{fg:hello} shows both these functions in use. Again, the GOption stuff is optional and just lets VIPS add some flags to your program. You do need the \verb+im_init_world()+ though. \begin{fig2} \begin{verbatim} #include #include static gboolean print_stuff; static GOptionEntry options[] = { { "print", 'p', 0, G_OPTION_ARG_NONE, &print_stuff, "print \"hello world!\"", NULL }, { NULL } }; int main( int argc, char **argv ) { GOptionContext *context; GError *error = NULL; if( im_init_world( argv[0] ) ) error_exit( "unable to start VIPS" ); context = g_option_context_new( "- my program" ); g_option_context_add_main_entries( context, options, "main" ); g_option_context_add_group( context, im_get_option_group() ); if( !g_option_context_parse( context, &argc, &argv, &error ) ) { if( error ) { fprintf( stderr, "%s\n", error->message ); g_error_free( error ); } error_exit( "try \"%s --help\"", g_get_prgname() ); } g_option_context_free( context ); if( print_stuff ) printf( "hello, world!\n" ); return( 0 ); } \end{verbatim} \caption{Hello World for VIPS} \label{fg:hello} \end{fig2} \subsection{Image descriptors} The base level of the VIPS I/O system provides \verb+IMAGE+ descriptors. An image represented by a descriptor may be an image file on disc, an area of memory that has been allocated for the image, an output file, a delayed computation, and so on. Programs need (usually) only know that they have a descriptor, they do not see many of the details. \fref{fg:image} shows the definition of the \verb+IMAGE+ descriptor. \begin{fig2} \begin{verbatim} typedef struct { /* Fields from image header. */ int Xsize; /* Pels per line */ int Ysize; /* Lines */ int Bands; /* Number of bands */ int Bbits; /* Bits per band */ int BandFmt; /* Band format */ int Coding; /* Coding type */ int Type; /* Type of file */ float XRes; /* Horizontal res in pels/mm */ float YRes; /* Vertical res in pels/mm */ int Length; /* Obsolete (unused) */ short Compression; /* Obsolete (unused) */ short Level; /* Obsolete (unused) */ int Xoffset; /* Position of origin */ int Yoffset; /* Derived fields that may be read by the user. */ char *filename; /* File name */ im_time_t *time; /* Timing for eval callback */ int kill; /* Set to non-zero to block eval */ ... and lots of other private fields used by VIPS for ... housekeeping. } IMAGE; \end{verbatim} \caption{The \texttt{IMAGE} descriptor} \label{fg:image} \end{fig2} The first set of fields simply come from the image file header: see \pref{sec:header} for a full description of all the fields. The next set are maintained for you by the VIPS I/O system. \verb+filename+ is the name of the file that this image came from. If you have attached an eval callback to this image, \verb+time+ points to a set of timing statistics which can be used by user-interfaces built on VIPS to provide feedback about the progress of evaluation --- see \pref{sec:eval}. Finally, if you set \verb+kill+ to non-zero, VIPS will block any pipelines which use this descriptor as an intermediate. See \pref{sec:block}. The remaining fields are private and are used by VIPS for housekeeping. \subsection{Header fields} \label{sec:fields} You can access header fields either directly (as \verb+im->Xsize+, for example) or programmatically with \verb+im_header_int()+ and friends. For example: \begin{verbatim} int i; im_header_int( im, "Xsize", &i ); \end{verbatim} There's also \verb+im_header_map()+ to loop over header fields, and \verb+im_header_get_type+ to test the type of fields. These functions work for image meta fields as well, see \pref{sec:meta}. \subsection{Opening and closing} \label{sec:open} Descriptors are created with \verb+im_open()+. You can also read images with the format system: see \pref{sec:format}. The two APIs are complimentary, though \verb+im_open()+ is more useful. At the command-line, try: \begin{verbatim} $ vips list classes \end{verbatim} /noindent to see a list of all the supported file formats. \verb+im_open()+ takes a file name and a string representing the mode with which the descriptor is to be opened: \begin{verbatim} IMAGE *im_open( const char *filename, const char *mode ) \end{verbatim} The possible values for mode are: \begin{description} \item[\texttt{"r"}] The file is opened read-only. If you open a non-VIPS image, or a VIPS image written on a machine with a different byte ordering, \verb+im_open()+ will automatically convert it to native VIPS format. If the underlying file does not support random access (JPEG, for example), the entire file will be converted in memory. VIPS can read images in many file formats. You can control the details of the conversion with extra characters embedded in the filename. For example: \begin{verbatim} fred = im_open( "fred.tif:2", "r" ); \end{verbatim} \noindent will read page 2 of a multi-page TIFF. See the man pages for details. \item[\texttt{"w"}] An \verb+IMAGE+ descriptor is created which, when written to, will write pixels to disc in the specified file. Any existing file of that name is deleted. VIPS looks at the filename suffix to determine the save format. If there is no suffix, or the filename ends in \verb+".v"+, the image is written in VIPS native format. If you want to control the details of the conversion to the disc format (such as setting the Q factor for a JPEG, for example), you embed extra control characters in the filename. For example: \begin{verbatim} fred = im_open( "fred.jpg:95", "w" ); \end{verbatim} \noindent writes to \verb+fred+ will write a JPEG with Q 95. Again, see the man pages for the conversion functions for details. \item[\texttt{"t"}] As the \verb+"w"+ mode, but pels written to the descriptor will be saved in a temporary memory buffer. \item[\texttt{"p"}] This creates a special partial image. Partial images are used to join VIPS operations together, see \pref{sec:joinup}. \item[\texttt{"rw"}] As the \verb+"r"+ mode, but the image is mapped into the caller's address space read-write. This mode is only provided for the use of paintbox-style applications which need to directly modify an image. Most programs should use the \verb+"w"+ mode for image output. \end{description} If an error occurs opening the image, \verb+im_open()+ calls \verb+im_error()+ with a string describing the cause of the error and returns \verb+NULL+. \verb+im_error()+ has type \begin{verbatim} void im_error( const char *domain, const char *format, ... ) \end{verbatim} \noindent The first argument is a string giving the name of the thing that raised the error (just \verb+"im_open"+, for example). The format and subsequent arguments work exactly as \verb+printf()+. It formats the message and appends the string formed to the error log. You can get a pointer to the error text with \verb+im_error_buffer()+. \begin{verbatim} const char *im_error_buffer() \end{verbatim} \noindent Applications may display this string to give users feedback about the cause of the error. The VIPS exit function, \verb+error_exit()+, prints \verb+im_error_buffer()+ to \verb+stderr+ and terminates the program with an error code of 1. \begin{verbatim} void error_exit( const char *format, ... ) \end{verbatim} \noindent There are other functions for handling errors: see the man page for \verb+im_error()+. Descriptors are closed with \verb+im_close()+. It has type: \begin{verbatim} int im_close( IMAGE *im ) \end{verbatim} \verb+im_close()+ returns 0 on success and non-zero on error. \subsection{Examples} \label{sec:examples} As an example, \fref{fg:widthheight} will print the width and height of an image stored on disc. \begin{fig2} \begin{verbatim} #include #include int main( int argc, char **argv ) { IMAGE *im; /* Check arguments. */ if( im_init_world( argv[0] ) ) error_exit( "unable to start VIPS" ); if( argc != 2 ) error_exit( "usage: %s filename", argv[0] ); /* Open file. */ if( !(im = im_open( argv[1], "r" )) ) error_exit( "unable to open %s for input", argv[1] ); /* Process. */ printf( "width = %d, height = %d\n", im->Xsize, im->Ysize ); /* Close. */ if( im_close( im ) ) error_exit( "unable to close %s", argv[1] ); return( 0 ); } \end{verbatim} \label{fg:widthheight} \caption{Print width and height of an image} \end{fig2} To compile this example, use: \begin{verbatim} cc `pkg-config vips-7.14 \ --cflags --libs` myfunc.c \end{verbatim} As a slightly more complicated example, \fref{fg:negative} will calculate the photographic negative of an image. \begin{fig2} \begin{verbatim} #include #include int main( int argc, char **argv ) { IMAGE *in, *out; /* Check arguments. */ if( im_init_world( argv[0] ) ) error_exit( "unable to start VIPS" ); if( argc != 3 ) error_exit( "usage: %s infile outfile", argv[0] ); /* Open images for read and write, invert, update the history with our * args, and close. */ if( !(in = im_open( argv[1], "r" )) || !(out = im_open( argv[2], "w" )) || im_invert( in, out ) || im_updatehist( out, argc, argv ) || im_close( in ) || im_close( out ) ) error_exit( argv[0] ); return( 0 ); } \end{verbatim} \label{fg:negative} \caption{Find photographic negative} \end{fig2} \subsection{Metadata} \label{sec:meta} VIPS lets you attach arbitrary metadata to an IMAGE. For example, ICC profiles, EXIF tags, image history, whatever you like. VIPS will efficiently propagate metadata as images are processed (usually just by copying pointers) and will automatically save and load metadata from VIPS files (see \pref{sec:header}). A piece of metadata is a value and an identifying name. A set of convenience functions let you set and get int, double, string and blob. For example: \begin{verbatim} int im_meta_set_int( IMAGE *, const char *field, int ); int im_meta_get_int( IMAGE *, const char *field, int * ); \end{verbatim} So you can do: \begin{verbatim} if( im_meta_set_int( im, "poop", 42 ) ) return( -1 ); \end{verbatim} \noindent to create an int called \verb+"poop"+, then at some later point (possibly much, much later), in an image distantly derived from \verb+im+, you can use: \begin{verbatim} int i; if( im_meta_get_int( im, "poop", &i ) ) return( -1 ); \end{verbatim} \noindent And get the value 42 back. You can use \verb+im_meta_set()+ and \verb+im_meta_get()+ to attach arbitrary \verb+GValue+ to images. See the man page for \verb+im_meta_set()+ for full details. You can test for a field being present with \verb+im_meta_get_type()+ (you'll get \verb+G_TYPE_INT+ back for \verb+"poop"+, for example, or 0 if it is not defined for this image). \subsection{History} \label{sec:history} VIPS tracks the history of an image, that is, the sequence of operations which have led to the creation of an image. You can view a VIPS image's history with the \verb+header+ command, or with \nip{}'s \ct{View Header} menu. Whenever an application performs an action, it should append a line of shell script to the history which would perform the same action. The call to \verb+im_updatehist()+ in \fref{fg:negative} adds a line to the image history noting the invocation of this program, its arguments, and the time and date at which it was run. You may also find \verb+im_histlin()+ helpful. It has type: \begin{verbatim} void im_histlin( IMAGE *im, const char *fmt, ... ) \end{verbatim} \noindent It formats its arguments as \verb+printf()+ and appends the string formed to the image history. You read an image's history with \verb+im_history_get()+. It returns the entire history of an image, one action per line. No need to free the result. \begin{verbatim} const char * im_history_get( IMAGE *im ); \end{verbatim} \subsection{Eval callbacks} \label{sec:eval} VIPS lets you attach callbacks to image descriptors. These are functions you provide which VIPS will call when certain events occur. See \pref{sec:callback} for more detail. Eval callbacks are called repeatedly during evaluation and can be used by user-interface programs to give feedback about the progress of evaluation. \subsection{Detailed rules for descriptors} These rules are intended to answer awkward questions. \begin{enumerate} \item You can output to a descriptor only once. \item You can use a descriptor as an input many times. \item You can only output to a descriptor that was opened with modes \verb+"w"+, \verb+"t"+ and \verb+"p"+. \item You can only use a descriptor as input if it was opened with modes \verb+"r"+ or \verb+"rw"+. \item If you have output to a descriptor, you may subsequently use it as an input. \verb+"w"+ descriptors are automatically changed to \verb+"r"+ descriptors. If the function you are passing the descriptor to uses WIO (see \pref{sec:limit}), then \verb+"p"+ descriptors become \verb+"t"+. If the function you are passing the descriptor to uses PIO, then \verb+"p"+ descriptors are unchanged. \end{enumerate} \subsection{Automatic resource deallocation} VIPS lets you allocate resources local to an image descriptor, that is, when the descriptor is closed, all resources which were allocated local to that descriptor are automatically released for you. \subsubsection{Local image descriptors} VIPS provides a function which will open a new image local to an existing image. \verb+im_open_local()+ has type: \begin{verbatim} IMAGE *im_open_local( IMAGE *im, const char *filename, const char *mode ) \end{verbatim} It behaves exactly as \verb+im_open()+, except that you do not need to close the descriptor it returns. It will be closed automatically when its parent descriptor \verb+im+ is closed. \begin{fig2} \begin{verbatim} /* Add another image to the accumulated total. */ static int sum1( IMAGE *acc, IMAGE **in, int nin, IMAGE *out ) { IMAGE *t; if( nin == 0 ) /* All done ... copy to out. */ return( im_copy( acc, out ) ); /* Make a new intermediate, and add to it.. */ return( !(t = im_open_local( out, "sum1:1", "p" )) || im_add( acc, in[0], t ) || sum1( t, in + 1, nin - 1, out ) ); } /* Sum the array of images in[]. nin is the number of images in * in[], out is the descriptor we write the final image to. */ int total( IMAGE **in, int nin, IMAGE *out ) { /* Check that we have at least one image. */ if( nin <= 0 ) { im_error( "total", "nin should be > 0" ); return( -1 ); } /* More than 1, sum recursively. */ return( sum1( in[0], in + 1, nin - 1, out ) ); } \end{verbatim} \caption{Sum an array of images} \label{fg:addemup} \end{fig2} \fref{fg:addemup} is a function which will sum an array of images. We need never close any of the (unknown) number of intermediate images which we open. They will all be closed for us by our caller, when our caller finally closes \verb+out+. VIPS lets local images themselves have local images and automatically makes sure that all are closed in the correct order. It is very important that these intermediate images are made local to \verb+out+ rather than \verb+in+, for reasons which should become apparent in the section on combining operations below. There's also \verb+im_open_local_array()+ for when you need a lot of local descriptors, see the man page. \subsubsection{Local memory allocation} \label{sec:malloc} VIPS includes a set of functions for memory allocation local to an image descriptor. The base memory allocation function is \verb+im_malloc()+. It has type: \begin{verbatim} void *im_malloc( IMAGE *, size_t ) \end{verbatim} It operates exactly as the standard \verb+malloc()+ C library function, except that the area of memory it allocates is local to an image. If \verb+im_malloc()+ is unable to allocate memory, it returns \verb+NULL+. If you pass \verb+NULL+ instead of a valid image descriptor, then \verb+im_malloc()+ allocates memory globally and you must free it yourself at some stage. To free memory explicitly, use \verb+im_free()+: \begin{verbatim} int im_free( void * ) \end{verbatim} \noindent \verb+im_free()+ always returns 0, so you can use it as an argument to a callback. Three macros make memory allocation even easier. \verb+IM_NEW()+ allocates a new object. You give it a descriptor and a type, and it returns a pointer to enough space to hold an object of that type. It has type: \begin{verbatim} type-name *IM_NEW( IMAGE *, type-name ) \end{verbatim} The second macro, \verb+IM_ARRAY()+, is very similar, but allocates space for an array of objects. Note that, unlike the usual \verb+calloc()+ C library function, it does not initialise the array to zero. It has type: \begin{verbatim} type-name *IM_ARRAY( IMAGE *, int, type-name ) \end{verbatim} Finally, \verb+IM_NUMBER()+ returns the number of elements in an array of defined size. See the man pages for a series of examples, or see \pref{sec:number}. \subsubsection{Other local operations} The above facilities are implemented with the VIPS core function \verb+im_add_close_callback()+. You can use this facility to make your own local resource allocators for other types of object --- see the manual page for more help. \subsection{Error handling} All VIPS operations return 0 on success and non-zero on error, setting \verb+im_error()+. As a consequence, when a VIPS function fails, you do not need to generate an error message --- you can simply propagate the error back up to your caller. If however you detect some error yourself (for example, the bad parameter in the example above), you must call \verb+im_error()+ to let your caller know what the problem was. VIPS provides two more functions for error message handling: \verb+im_warn()+ and \verb+im_diag()+. These are intended to be used for less serious messages, as their names suggest. Currently, they simply format and print their arguments to \verb+stderr+, optionally suppressed by the setting of an environment variable. Future releases of VIPS may allow more sophisticated trapping of these functions to allow their text to be easily presented to the user by VIPS applications. See the manual pages. \subsection{Joining operations together} \label{sec:joinup} VIPS lets you join image processing operations together so that they behave as a single unit. \fref{fg:join} shows the definition of the function \verb+im_Lab2disp()+ from the VIPS library. This function converts an image in \cielab{} colour space to an RGB image for a monitor. The monitor characteristics (gamma, phosphor type, etc.) are described by the \verb+im_col_display+ structure, see the man page for \verb+im_col_XYZ2rgb()+. \begin{fig2} \begin{verbatim} int im_Lab2disp( IMAGE *in, IMAGE *out, struct im_col_display *disp ) { IMAGE *t1; if( !(t1 = im_open_local( out, "im_Lab2disp:1", "p" )) || im_Lab2XYZ( in, t1 ) || im_XYZ2disp( t1, out, disp ) ) return( -1 ); return( 0 ); } \end{verbatim} \caption{Two image-processing operations joined together} \label{fg:join} \end{fig2} The special \verb+"p"+ mode (for partial) used to open the image descriptor used as the intermediate image in this function `glues' the two operations together. When you use \verb+im_Lab2disp()+, the two operations inside it will execute together and no extra storage is necessary for the intermediate image (\verb+t1+ in this example). This is important if you want to process images larger than the amount of RAM you have on your machine. As an added bonus, if you have more than one CPU in your computer, the work will be automatically spread across the processors for you. You can control this parallelization with the \verb+IM_CONCURRENCY+ environment variable, \verb+im_concurrency_set()+, and with the \verb+--vips-concurrency+ command-line switch. See the man page for \verb+im_generate()+. \subsubsection{How it works} When a VIPS function is asked to output to a \verb+"p"+ image descriptor, all the fields in the descriptor are set (the output image size and type are set, for example), but no image data is actually generated. Instead, the function attaches callbacks to the image descriptor which VIPS can use later to generate any piece of the output image that might be needed. When a VIPS function is asked to output to a \verb+"w"+ or a \verb+"t"+ descriptor (a real disc file or a real memory buffer), it evaluates immediately and its evaluation in turn forces the evaluation of any earlier \verb+"p"+ images. In the example in \fref{fg:join}, whether or not any pixels are really processed when \verb+im_Lab2disp()+ is called depends upon the mode in which \verb+out+ was opened. If \verb+out+ is also a partial image, then no pixels will be calculated --- instead, a pipeline of VIPS operations will be constructed behind the scenes and attached to \verb+out+. Conversely, if \verb+out+ is a real image (that is, either \verb+"w"+ or \verb+"t"+), then the final VIPS operation in the function (\verb+im_XYZ2disp()+) will output the entire image to \verb+out+, causing the earlier parts of \verb+im_Lab2disp()+ (and indeed possibly some earlier pieces of program, if \verb+in+ was also a \verb+"p"+ image) to run. When a VIPS pipeline does finally evaluate, all of the functions in the pipeline execute together, sucking image data through the system in small pieces. As a consequence, no intermediate images are generated, large amounts of RAM are not needed, and no slow disc I/O needs to be performed. Since VIPS partial I/O is demand-driven rather than data-driven this works even if some of the operations perform coordinate transformations. We could, for example, include a call to \verb+im_affine()+, which performs arbitrary rotation and scaling, and everything would still work correctly. \subsubsection{Pitfalls with partials} To go with all of the benefits that partial image I/O brings, there are also some problems. The most serious is that you are often not quite certain when computation will happen. This can cause problems if you close an input file, thinking that it is finished with, when in fact that file has not been processed yet. Doing this results in dangling pointers and an almost certain core-dump. You can prevent this from happening with careful use of \verb+im_open_local()+. If you always open local to your output image, you can be sure that the input will not be closed before the output has been generated to a file or memory buffer. You do not need to be so careful with non-image arguments. VIPS functions which take extra non-image arguments (a matrix, perhaps) are careful to make their own copy of the object before returning. \subsubsection{Non-image output} Some VIPS functions consume images, but make no image output. \verb+im_stats()+ for example, scans an image calculating various statistical values. When you use \verb+im_stats()+, it behaves as a data sink, sucking image data through any earlier pipeline stages. \subsubsection{Calculating twice} In some circumstances, the same image data can be generated twice. \fref{fg:thrmean} is a function which finds the mean value of an image, and writes a new image in which pixels less than the mean are set to 0 and images greater than the mean are set to 255. \begin{fig2} \begin{verbatim} int threshold_at_mean( IMAGE *in, IMAGE *out ) { double mean; if( im_avg( in, &mean ) || im_moreconst( in, out, mean ) ) return( -1 ); return( 0 ); } \end{verbatim} \caption{Threshold an image at the mean value} \label{fg:thrmean} \end{fig2} This seems straightforward --- but consider if image \verb+in+ were a \verb+"p"+, and represented the output of a large pipeline of operations. The call to \verb+im_avg()+ would force the evaluation of the entire pipeline, and throw it all away, keeping only the average value. The subsequent call to \verb+im_moreconst()+ will cause the pipeline to be evaluated a second time. When designing a program, it is sensible to pay attention to these issues. It might be faster, in some cases, to output to a file before calling \verb+im_avg()+, find the average of the disc file, and then run \verb+im_moreconst()+ from that. There's also \verb+im_cache()+ which can keep recent parts of a very large image. \subsubsection{Blocking computation} \label{sec:block} \verb+IMAGE+ descriptors have a flag called \verb+kill+ which can be used to block computation. If \verb+im->kill+ is set to a non-zero value, then any VIPS pipelines which use \verb+im+ as an intermediate will fail with an error message. This is useful for user-interface writers --- suppose your interface is forced to close an image which many other images are using as a source of data. You can just set the \verb+kill+ flag in all of the deleted image's immediate children and prevent any dangling pointers from being followed. \subsubsection{Limitations} \label{sec:limit} Not all VIPS operations are partial-aware. These non-partial operations use a pre-VIPS 7.0 I/O scheme in which the whole of the input image has to be present at the same time. In some cases, this is because partial I/O simply makes no sense --- for example, a Fourier Transform can produce no output until it has seen all of the input. \verb+im_fwfft()+ is therefore not a partial operation. In other cases, we have simply not got around to rewriting the old non-partial operation in the newer partial style. You can mix partial and non-partial VIPS operations freely, without worrying about which type they are. The only effect will be on the time your pipeline takes to execute, and the memory requirements of the intermediate images. VIPS uses the following rules when you mix the two styles of operation: \begin{enumerate} \item When a non-partial operation is asked to output to a partial image descriptor, the \verb+"p"+ descriptor is magically transformed into a \verb+"t"+ descriptor. \item When a non-partial operation is asked to read from a \verb+"p"+ descriptor, the \verb+"p"+ descriptor is turned into a \verb+"t"+ type, and any earlier stages in the pipeline forced to evaluate into that memory buffer. The non-partial operation then processes from the memory buffer. \end{enumerate} These rules have the consequence that you may only process very large images if you only use partial operations. If you use any non-partial operations, then parts of your pipelines will fall back to old whole-image I/O and you will need to think carefully about where your intermediates should be stored. vips-7.38.5/doc/src/figs/0000755000175000017500000000000012303140253012055 500000000000000vips-7.38.5/doc/src/figs/arch.png0000644000175000017500000007664712303140253013444 00000000000000‰PNG  IHDR“u-þsBIT|dˆtEXtSoftwarewww.inkscape.org›î< IDATxœìÝw|ÕÚÀñßÙôF $Bè„& ]AQD”+6P,Ø®•÷bQﵡb»ŠW± "¢± ‚ôÞ!¤Ñ ½’Ýóþ1»›%†’Í„ìóý|&Ù™òÌîìö‰À0­õN3#ÂH2)‡Rª °hc éw^Ý }²ÍŒKœ‹C¾ð¯v0»X-@0Vk½ÈìÈ„¨Í$™”¡”j ¬ÂÁËÏl„çÌŽKTÔü0¸íÈö¬%”ŸÌŽJˆÚJ’‰ ¥T °è'áËåp}ºÙq‰óµ#†^ëY@/­õ^“ƒ¢V’dâB)õ0”†O—ÁírEÐo[ô»rü€}@7­užÙQ QÛH2±SJõ–}m€·w™¨BsÂáW‚VÀsZë)fG$Dm#ÉPJ)`-К€ý Á[>˜Zåš¾°¸ ´ÒZ5;"!jo³¨!FbÜÑ<¿¼­¦F#Üàíð{s( þxÔ숄¨M¤d(¥æ7@ûØ)—ÖZ7õ„ÙµÖÑfG#Dmâñ%¥”0ÄèHÛNµÖMñödÒT)ÕUk½Ù숄¨-<>™—ö¦8Æ% ɤ~êçBF0Fc’L„¨"’L Öø× :ä˜J•zË3êr–ÅÍŽDˆÚD’‰³Ç9wJ‹Z-<×þ"ÒÔ0„¨e$™8“IXRÅåœÉ$ÂÔ0„¨e$™@}ã_H!’Lj¢*®¶ko^µó³I2eü³:ÿˆÚÌù$Fy2¦UH~PNZc”LjD×°!ÞmÚà_ËêÞ`Ê]ÿÐP¼bc 8Ÿùzy¡{ö$ÄÑK@h(^æ~¶rc•î ÉÄ©òÉdšîÝËM{÷rÓ† \÷ŸÿбeKüÎ6]@¼õ¹{ì1Ú|÷×T6¦séÖ¬ážN*ii¾`×Ï|£¢ðY»–{ƒ‚P€mÁ®›8‘æÕ±N§ï$™áRÍå¤5•¬æjÒÿ† ©ûÀÌ‹Œ$pÜ8ºIÇ6møâLÓÕ«‡÷?ÿÉGaƒcW§6¥¨tL`-oYsæ¸cÇÎ'¥œÓXëãóÓ®]˜|ÕœÍfÞ²…¨½$™”r”L*5“')™5‹ƒK–pxÛ6¹äêÞu±óæ¿`Î?ù„>?þHÒØ±´X¼˜Á/¼ÀZ¥°úÁiþÐiûvŽLÊÖC‡(P Þ~›‹{÷&&/¢ÿþ—ͳgs`Ü8¢;t ôèQò¯¿ž›6qpʶ¥¥Q|ºÀÛ·'xêTzÕ«Gà×_³mútâbc ºújšÎŸOŠŸ–~`ð+¯°~òdz(…zýu6üú+Çó¹ë.bÆ£KN…3f°Õ>ØØ®¾š¦Z“Gîĉ4Š"¨°ë5×Ðnõj’^z‰Çs n]¼?þ˜~11„mÜHòÞ½dÔ©ƒï”)T²5g-ÉD7j.§ÊWsÙKÎù4oN€Í†õÈòƒ‚ð™<™>Ž÷zõ¢Î-·pÙæÍœøë/üü3q?ÿLÜ‘#ä+…nÖŒˆñãé¶d {zô zÁ†;¦Ÿ?ŸËoº‰>Ë–±/3“¼Ï>ã–1cˆl={Òèî»8f /f×¥—Òòûï¹ú ±ëÿ›¡ññ¤'%‘þ꫌zè!£:ªKêL{ÀæïC†ÐkÆ ®Ý·´ÔT²-bBx8Þ€müxš¼ý67:ĉ]»H}óM®±¸6À6x0í»t¡>`ëÓ‡Èdð5×ÐöÇÙ5díçÌá Ǹ¿ýÆu=zÐ|Á¶·nMØ /0lÀb*ûI5—î!%§ÊWsY,Ø‚ƒ œ;—uëØ£íV­bKb"¹ÿþ7ëV­âŸ­Zá·?ù“&ÑeÓ&v&&’;g‰o¾ ï¼Ã>›Í¸ÖbÁæãƒÏÀÌÉÊ¢dñb’ÿú‹‡Áb«¯¦×äÉ|ýúëìX·Žº?Nïo¾aŽÅ‚ÍË ¯K.aNq1¶µkIýþ{&x{c+))ÿRÛdò`Éüï¾›^ï¼Ã>‹ÅH6öÏF|ñ«_|Ñ(!ôïOÛ;ï$æå—Ù}ÿýô\½šmcÆð›}¶ÖGa¤½ºË hûü¬JaÓÛ%—0×fCïÛlj?ä&ÀÚ£u/¾˜ö0íÏ?91u*;$Êb©Šj?)™áR2qª’’‰cG¥“’H>œð=`Û¸‘Ì={ØÿôÓ\äë W\A·3Xç2=e楓“9”•E±cz//¼.ºˆ Þ½©ëå…×_àÝ:""uLORq1%€mùrŽÔ¢Åi/`éR’ý+VNǼ”qñ´sý¾þºt¹©©kßÞ72’k×’èxoÑ"]×K)°—ÞlJ¡÷î%Éfà ØV¯æXýúÔ«WK·nÔËÍ%ïÏ?9æ˜vï^@ùWœU¬“’‰î %']és&J¡óóÉ=š_Ê{ÿÓOYóÔS {â ŽPðÉ'ÆÎVkc¹ 6GÉD)´cG[f6¶ädr•BõèAÝE‹Œs011ÔÏϧûŽÚf;%I9ã;Ý:ÆÆRŒs.­ZQ¯ À9/GÉÄ9¿¢"#IÙçéœoA11Ôs¼×¡u1Û;mŸŸ­œõsþ?tˆœ  ›7Ç/1‘€¨(B%ãtñŸ;I&B¸ƒ”Lœ4Tî¨×j¯ÂÒ+£NéÞy‡½ –ÇgØâŬu ?r„üÌL2®¹†0ǰ2Ws9¯´²X°ÅÅ‘sð ~˜îЫ!½zÑ~íZö8â(oÚÓÅpýõt ÅÒ¢¾ƒÑiÓ&c^ö8\§Å¥ÚʪTiÕÕúõì¹ôRÚ·iƒ_:¨›o¦«ërí‰ÇV^Œ®W~ýü3©é餽ÿ>š4ÁgÒ$Z7oN³rÖé<:¹šKwdâ¤mTnGåØ9ÂiŽÍ†uÉVeªÂo.ºˆ6G2yåJ&%$|ß}¬pÄáR qNë(”Ó‘šÊ‰øxÛµ‹É……Ý?Ë\ÖÉQ5õ·ù¸.ëX‘MÎöíLNJâñ'È*óy8Ç-£ë¼KJ°Þ}7_têD‹}ûø×¸qôÙ²…mEEî³=÷NΙáÿ¤E¥Ôà*è»þúÖÝË[º”á!!ôéÃ7U1¿.]II¡èèÑÓ_ö{®BBðjÖŒ€;È=ûاKPj*E”T6&‡ôtþï»ïX~ャ©Üœžè ¯ß i­ý«$8!„œ3qQ÷™œÖàÁ„Ý{/]/¹„îðZU-kËçÑ¥åä`۱øσJ4°¸{7Ù•åý÷éݶ-‘äöìI‹õ쳬§ÒWsI5—î ÉÄÉæÖ»ÍëÖÅbµRrË-¼½a'ܵœÚâÓOÙyÇØ6$äÛoYþÊ+l;vÌ™è*ÁËâB¸‰$“Rn-™ÌËá¹s«¥ÄÙ­_OÆúõ¬ªú9Ë9!ÜA’‰“þÛ¥´¢V±—H¤šKwd‚ãds±7ò<ígqÜÔ0„¨e$™à¨z:á¼ÙNÔfGCì/RL CˆZF’‰3™dÕG’‰8V×þ"ÕÔ0„¨e$™@’ñ/«ÄûBËS£n–ÔÜþb¿©aQËH2_€ÐÞðz'ø ’7ʼnšë§0H±÷ühf$BÔ6ŸL´ÖJ©À@XÖ Üq9ª¨>¼Øþ" øÃÄ@„¨u<>™ØÍ¾žð]#%õéµN†7ü~¥½g±Öº n€B8x|Û\J©@`­WÁ¾·ÌŽITµaCaÑ8ŒûMºi­·˜µŠ´ h­ógŒ¾¸>ðd*Ý:­t5§û¹>,eÿº¿D"DÕ“’‰Rʬºo|= ®?jv\¢²ûBç—àDK è µ>hvTBÔ6’L\(¥b0JÔ9?= }«¬U^QÝ2½ ëãÔ£zë:­õ³£¢6’dR†RjÆåÂ>˜¯L…‡Ï6¨iV×ë&CZGû€§´Ö/›’µ˜$“r(¥F_àUW|_ÿõ«ìaOÂîë3'B~¸}À«Zëÿ35$!j9I&§¡”º˜DCSaè—ðêJh^TÍáÈ—tVyx¶|q ¤w²,îÖZnfdBxI&g ”Š^Æá¼òÍR‘¡ËZh™ ­O@çL’‡«ØYv‡Bb#ØÜ ô‚“u]FZ<ªµÞdRBxI&ç@)Õø0ÔìXÄYí&k­™ˆžD’I(¥šÃ@ ž¹  Ø ,~ÐZo79!<’$“J°ß9D^&‡ãI4ÆÃ­k­3ÌF!ÉD!DæT„BTš$!„•&ÉD!D¥I2BQi’L„BTš$!„•&ÉD!D¥I2BQi’L„BTš$!„•æmv"¥T= 'éÒù™”g±G Ør!?×ÝÞ€hŒ6Þ"p¤­·êT„±-9ºuZëLsCºðHÛ\çH)Õ¸£Åà€¹‰26?sµÖ»Íæl”R±Àhà: ›ÉáˆSÄxÎ|`ŽÖ:Íäx.’LÎB) <<únb-„Ð"ð’²Úh ËŽûC¦ØT™7gOk­“L ï ”R1ÀT`,à·EC½"hPu‹OyK¸™UÁ ?8áÙ¾eÞÌÞ^ÓZçšÜC’É(¥†Œ!þ%Ð7†¥ÀÍ©ÐPž oº Ìm?D²HÈð·¿Q„ñ”Ì©ºläJ)< <…³J´~! LëR`t:ØL Qî _EÀÂHX…ŽSiÀ]ZëfFW“I29 ¥ÔdŒ‘oŒŠ‡×ö@Óê~þ»8g…x¡¼ ÙŽsXó€Û´ÖyfE¥” >®7†Ô)‚ûvÃs à/ ¤Æ:è·ƒy-¡Ä‚Qê}JkýŠÙ‘ÕD’LʰAþã¹ïÏxÿf5t5mg$*ê˜7Œ½~if°hÆIUûÅË0N°ƒ“aÖF“RícsŒéq¡öŸwÔ„oM"ɤ ¥Ô³À FßåÉðý:±š”8OÅ»A+ààj­uµ}—J)/à'`0( lƒwjüÅ¢<9^0²'üæ8@yNk=ÅÔjI&.”R£9€‚! ðÓ³c•õL+˜ÚÓÞó®ÖúÁêZ²Rj:ð€Ñ÷ô:xqu-[¸ËÕ½aI Œ*¯µÖsÍŽ¨¦db§”jÄu¡]lü¥>»V¸¾'|ßÖÞ3Xký«»—¨”º£4ŒÜ óÖ¹{™¢:ä[àâÁ°§ ´ÐZ7;ªš@’‰Rê-àŸà¶}­ ÌŽIT•"®øÀfàbwÖwÛÏ»mºBËã°óGð“Z­GB¡ð–Öú³#ª $™J©ÀnÀîØ Ÿl1;&QվЄ[†Ø{nÑZå®%)¥n¾4ú¾\7§¸kYÂ,wvÿuŠX­u‚Ù™M’  ”zxB !á;ivLº-M€ZëþîZŠRêOàRèr6/q×r„™Žù@‹1ãqCã$³#2›´Íeaü»r„É}$µÖ­»íÉä¥T˜ÖúXU/A)\Rº<ä¼[­Vdì/¾ëŒ±ÿdbvfSJµÚ}£‘-v{2üŸJ¼€k1î¨j×ð¶Ë“í©ö•hO&m”Rí´Ö{ÌŽÈLÒ=ô3þÁ G0~üîî¬Ò™Ñ5(‚N‡ìßû@ÜÃ>ßN‡ A1U´ÍŒM£O?¥ÛÒ¥ øì3.îߟºÔ²í)5•›ÚµÃ¯¼÷î»&+Wr`U ë±cÜܬ>æÆ|Ãac¿8÷#žK’ Dÿfƒw Õ³!VGÂ’®Ü.:Ãø¾ß{•³Ï7:ƒ*Ú^æÌ¡÷§Ÿ2ÔÛV®ä ,XÀðAƒ¨K-ÚžÂÂñ5šYüÛ{!!x7h@€£ñbvgeQeÉúü:o«±ßpýÞ=—ÇWsáÜÂr06Q«5r´üé¦Dº,§ÒÛÓwÐtÄ:÷ëÇë×ãØqÍ&ûKÀwÝ©õ÷ï'ûƒH²ZÑ£F‘˜H^óæõêEØ?phÕ*2»u#äúëiº`‡×­#Ë1ßG¥å—_rpìXšÔ­‹ïŒ$>LѨQD\tõß}—ø´4Š”‚#ï×F6zÁ¯\‰#YóÀ4ÿö[Mã:uð>øÜ\¬Ž÷£¢ð»ûnZPò¿ÿ‘lŸ§.ïsSÊ9̦5lÙBZq±‘HG&bÿ~òbbìу°>">9™B×鯻Žðþý ?tˆ¼÷ß'±°°ª~ëa9p !’Läj.¥ÔBàZ¼–ºýf¶ZêÚˆžiS‡ZëгŽ^AJ©@}xúgxqWeç÷Ç\eµ¢/¿œ¥§ç÷ß¹²GZ,[Æž~ýh”DZ·nÌØ´‰ø*…JM%«W/Z½öËn¿®;w’Ò¯­_{?^|‘½Zóȶm$gf’N€|—.eoŸ>Dgdßµ+1=zðùîÝäAø‹/rÉÖ­‰Œ$¤gOZLšÄ’?4CA÷ÇÅ‘RTD‰ÕŠ-6–ÆmÛòYj*Å11ø¯[ÇØÜ\ ããIަ~«V4îÖO¶n-MšO>I›Ûn£K»vÌñòB•”ðH«V|OÁæÍŒô÷ÇÛÛïÄDÒ{÷¦õĉ,øê+,ZÄÀÞ½i¹bq:©ªcG¾)*ªŠ„2ø øµ3°Hk=¬òó»pI5—ó!WÚF ¨7¾@;Ó«Hνóq4°ˆ{Øçës’*øl›6¥~b"ÇO÷þðá„]vzõâ³áÃù­uk>騑è‡&°*…..æd»v|}Ùe,Þ¼™„'ž``l,_ Ê/Ì_ÆÑÚež,[FÜ€üØ©³5¢n§N4ìØ‘9—^Ê¢¸8ŽÜz+Ñ€uþ|ŽtîÌ··ÞÊ_W\Á’™3Ysÿýts×Ö­êуï{÷fþáÃ7ަ€uêT.:~œì-øbð`–|ó [-”RåoOJ¡•ñˆÇ0g)F)´ÕŠ­uk¾ºòJ–.ZÄ–1chØn¼‘ð+® ãE1säH–µiìà`üþõ/Z—·œóèRÿ°<©æ*UnñZÔ6ÕU×U²=sÒÏËéæuÙe„:DÚ®]ä?NѾ}êÞ†@ÀªU8¯Rܽ›£~~xåçs`ÍRǧ·ëügÏ&°< ’¶|¹Ñ°oG»v¥ÆNœ·Þ¢kŸ>4kÖŒ†ÞÞxsÒu^sç²ßuÚÞ½‰ö´oO£uëHr¼7{6IÏÓ º€Jåî%ÉÄIC5$“¾}©×¿?á êÏ?9êZÇìNÏ>K,À”)”Ûjí¢E\þüólذ¡´þü\½ñ]’’Èž>„Q£ˆ>œæ·ßÎêÊÆìºš´óº2àXûöÆÎ»¼÷m6¬^^(×÷½¼PZ—ÑçåQäxßfÃZX辵̴6Àºs'‡{÷¦¥R,ׯŽ%Ú1þž=dß{/§´ØmÓ1oå:o¥ÐKiŒ®ãþü3IwÞÉÀ„²×¯/=P²'Ä*ÈÕµ=Õ|’LœÜ[2™9“M›vÑE¼Ÿ@‰àá‡iSv¹¡¡ø¤¤ð˜Ÿÿ>Û|33yÒߟ—Nž<ëC+>>èh°q#™8Ð4b ÓÓ)týúx—”  ±õéCý?ÿäDÙ™EDàKÈpÜec›=›?þˆã~š6ÅÿÐ! ££ñ÷÷Çkï^NyȘRп?¡P”DA“&øà´ך3‡ƒsæ”&‡Å‹9¥ÅâM›N=G—–FÁ—_—ò|ôQiUÀ?kÖpʳ;É}á¶;úgÏæ€ãõgŸ‘è:î_ºOK£àå—K¦>ù„„ò×öí#Çžhþç¢E§®c|<¹ññäº[¶Œ´eˌ긪%Õ\ri°“³š«Ê»¼´FçäœþŽÝ[n¡ñþýŒß¿ŸñëÖq«·7ÞŽþýû啯Õ'ÇÓÐu¸Å‚e×.nwôßpåÍ_)tB–-#°M™ÂV|®½–pJ«œÕ7²kÇãˆô§ŸØß±#ÍÛèÑ4-( `útâÛܹNMå¨ëešöÓæ(a½ý6ë‹‹)ÉÊ¢8.Žäë®#°uëFó+Ø•’BAq1%³f'I]’£ºj/™HW«;)˜8Hɤ”Ûª¹V¯&])TÿþÔ_¼¸ü££Õ«Iã ~Àë?ÿáVG?Àöíd¶Í›ÉpþÞ{ÜùÖ[üî¸ãyÝ:£* ìü•Bgd”VWdgSœ—G^ƒø¸Œïø ô±c¥Õ 99ùùãÕ­‹OVVé|23ÉvID»`×.#v0.u 6æåë‹Ï‰¥U*GŽ8«m¸é»¸Ð®æ5žd;I&N¶S®B©Jû÷“³w/ûžy†~‹ó­ë{ýúQåJ2âãÉýàã„`X>ÿþ7ÚÑïêàAò\‡¿û.ú£Ø_\|æ—Rè¶mi†} ´^=ê­_ÏQû0m±ÕKË©WÙ«¿¬Û·“öÈ#4ŽˆÀ+5•b__,-Z½iûíÓÚàoWÝ8çe¿šÈXàHß¾ÄëFŽ$ƱÜVÍua]Í%j:›$;I&¥ÜzÓâý÷óý·ß2a÷nÆ/_ÎÎ’l={Ò"$„ ØX>q÷[ÉùÂ%Ws9HCJ-®‚¾«à¯oÏ:AÍsÁ~¾¾XF¦ñ¬Yºì2LŸÎˆ“'9Ù­_¸o©wƒ7nŠ´ÖþU=w¥T!à}¯o®êùŸaÃ2„˜ûïgíYFÕÓ§ÓsÐ :uèpji¹",TV/<ñŸ~ó ‡22Üyp`¶Kn„U}ŸµÖCÌŽÆLR2qÒn;g"Êçç‡zí5nüøcêjß>öÞvßáÖ#zÏ;grä¹»wçÆ,Ô /Ðé½÷Øsß}´µXP/½ÄŽ‚lÑÑøwêDTݺÔyñE:pòå—æw:w&äŽ;h€ÏW_±×q#k×®Ôé׆+VvÇ´;tˆœÖ­ õ÷' *Š Ñ£‰üøc’†'|èPZøûã½lÉ3g–^B Æ«7ÞH«:uð_±‚L’ã½ûî£EÏžDÅÇsâ•WØURR“ <ühÜ…$§šS-á)rr°EEñjõ.Õóª¹F&ææ›ô€×ÓO3aÌvåçS€ß022’5Â'2’öêE³¼< >HË—_æŽÄDâóò(¸å†MšÄÇï½GüÈ‘4}è!FQ”@¢ŸI;ÒT),½zÑ,4”ÔÆ9üþûܼc{ýýñ›>Áƒ±ôöÛùàÅ鈶¹¼ÞòC«5vB—w¡8øŸÖúN³#ª $™Ø)¥¢€8 ¢7¾WÀO>œZaÀðç{ÏõZëïÏ8zPJæ}ý¿‘sqµE‘‚6“áÀÅ@ÐZkíñWr$“S(¥î>4úºÿë?33Qîì ÿ{ãþНµÖc«kÉJ©YÀM€†;^ƒOVUײ…»ô®³÷Ü«µþ¯™ÑÔ$’LÊPJ½p90Zk}ìLSº“R* ˜ 0†‘3áÓ•g91/Û“©øÂ-×Áê¡$È>ðàQI$'Éä ”R€·û†ä—­–ÃàÕðÂv9º¬)ÞlsúÂîK!Û^@k­M¿oH)僱-MÄÞ>ÔI„Øpã*x4ÑÄð„S¶<× ~éû@‘£í­<àw´šP[H29 ¥T8ð,pàSúŽ¥Ò!0‚ŽƒEKõQWòà ¿X˼¿˜¬µ®qwŸ+¥º¯eñê•ix ‚2RI5²yA^Èo ÁæëòæIàc`ŠÖú¨I^$™œ#¥TK`<0èhr8âïc܉üµÖzåÙF6›RªÆ•^#€¨³Œ.ªßŒíéS­µÜtz$™œ{bé 4"†€—©Ay d`4÷ž l6ê pcVJ)àb +±=ÕÇY&ªHÇØžŽ«$Tœ$!„•f1;!„>I&B!*M’‰BˆJ“d"„¢Ò$™!„¨4I&B!*M’‰BˆJ“d"„¢Ò$™!„¨4I&B!*M’‰BˆJ“d"„¢Ò¼ÍàBfoñµPiåUˆ U ªµÎ5; ™´\J©ÏŸ¸h…Ñ\¸Ï'B\(²1ž‹³ãY&¿h­ Ì éÂ!Éä(¥/=ÌŽEQmòO1ž²˜fv05$“3PJ]¼ .l…Ë2¡W.DC³b¨g›Ya !*í/ðxøµ.lvy3c?ð†Ö:ߤkðv#ø(òOQÝŒÐZ23²šJ’Iö“ê¯C"‹à¥dÂ̸„f8â O6™ö©ÀuZëµfFUI2)C)õ ð/£¯{6,Ü %¦%ª›ü(DŸ6€‰­¡Èd½´Ö{ÍŽª&‘dâB)u0Ëè»6æÆI•–°"†u€,`/FBÉ2;ªšB’‰RªFhtɆÕÛÁ_>!„‹…uadG°*à­õH³#ª)$™Ø)¥~F@Ãbظ šž4;&!DMôbcx¶¥½çr­õ閭SCH2”R}€UFßÛ{á¡£¦$DíS‹v46 C7Ø‚Q›Ñ]ËŽT’ €RêgàJh•{6€×Y§1™|iB˜ê»ú0ú"{Ï0­õ"Sé<¾m.¥T(p¹Ñ÷HxÉ݇Bˆ³u:dÃÎ:À(@’‰ÙÔ×^àmƒCŽú…çäš4{2¹V)奵¶š‘™$™À0ã_ •ûI„çè¦txµôþ29 SI2¶Æ¿.ÙH©Ä“Éw/*¨K.Ô+†L_Œýˆ$go&!ªi­QQ! ŠìÉ$⬣ÖrL”RÞET Yrt*„¨†E‚ñl#æÑÉÂù„İ“H2BTHˆãææà3Žæ<=™¸ÖmÛÈÈÍåäâÅ]¼˜£€8—^J}@·nßòå\êíš;—Ãǵd ݰW!ŽCÌÌ™t=r„‚;É^¸Kbcñ£œêÆ çºnßNfr2yo¼A'ûöcl×_OÓ–-i?ø€ØØX‚ß}—ø9s8T§^€­];ü'N¤ÍäÉ´Y´ˆ”zõð^¹’þ¡¡XÛże ™Ó¦wèùK–Я];üòó)Ùº•Œ¼¼SÖÕvï½D|õ=³²(ž6¸” êÕ3æðÖ[tLH 7!Ü¥Ké׸1Þå­›tçÓI.q’‰“ÖØ|¢ÒtýúøÍšEwÇ€§ŸfGNŽæj\?gÇçnS Mñõ׳ 7—“Ï>K{`WÏž„\uMúöå×իɘ;—4€uëÈ4ˆð/¿t–óÕ€íñÇi–œLΨQÆ|7o&kÕ*®èÖ M›Èøî;<ó ýúÑ`ÌŸžÄ²+vß}´øúkžxÂ(]b¹çÚÙ—…R¥ËŽ¥ÞôéìûþûSKhÁÁøŒˆ={(øðC§¤pÕ}÷5u*I¯¿Î€:uðÚ¿ŸüË.£ÑèÑ4š:•¤uëȸâ "\×õ_ÿ¢Ý—_ß}ìøá‡S—÷Å$½öš1ÏAƒhôÐèÍ79xÚoOT„d;)™”2ýˆ¾¶tJ¡ÓÓÉoÕŠßÝìÙF‰¡œÏÚuÌúõ¤;ÞÛ±ƒœ¦M t×®§§S°z5Ù§Y&eûÃZ·&díÚÒù®^MvVE:èXîO?•¾ŸœLnÛ¶ÆrËvÑÑÿñŽAõ²e/oýýÜslôQÚ¥¤påÿK;{‰E:-ü={ÈwôoÜHz›6Æ2G¢ÁæÍôÛ¶Ë>ý”®‘‘†‡—NëÚY,Ф ! zšïƒE‹J×íÀòbcË_7éΫv’Lœ´Ùemë(;,;›’À@¼ýÞÞ†¿£_)´ÕZþ|ÒÓ)ªW¿ÐP¼ÊÎWë¿'×ågfRíLºaC¼ƒƒñ=v¬ô¢«õ”+æpÞµËÍådË–Fµ [´  Ì¸Îi¿ø‚Ôèh~ž0u-[u]—/çÈÍ7Ó¬E cþuê`qy¿¼ÏÔìí£uòtA9gr*Ù0ª@ÙËe´†÷Þc×ܹô³Z±mÜHúd—Ùq;ŽÖO™Ov6%ãÆ±ú£èyË-´:q‚ÂcÇ(èÙ“û÷“ÿÓOˆ‹c°¿?Þ¡¡,´Wsi@ò Gú÷'iÕ*gfRh± îº‹5.çppY¾£zìoñ<ö»–.å’ÄD®ÎϧdÉvíJC×qË]¸~'ObÍÍ夯/^Ï?ÏVÇxÉÉd_y%'Ò&<œ ÿþ—]K—r`Ú4v~ø!=_{ââb¬þÉ!G|ññüø#Éqq À»~}ÞsÛ¾ý–î{ö049™¬zõð0€ßwí"¿œusMž‚ %NçÑíUJÕ2Œ¾¿Á°ã¦T=LÿÂýü°Ô­‹×ùÞÞ¼9þJAB…™.0K“&øÅÅQPÙ;ysü¡ØqyñéDGãçå…JL,uüx"Ÿ|’N­[³4"ßÂBl™™§$6|}QááøçÑz¥œk ü=á¹–|RSËOÅÅèƒ+–,339™™éÞæc„8I&§2ý¨]Ô~Û¶‘=kû‘íMÔ"’Lœ¤9Q=6l {ù ½–}†§']æµl¢¢d›ñhúo/<•§'“<Œó$8ꃜ3BTH¶ýEŽ©aÔL´Ö%J©c@#HrÞ -„çæ„ã¦ÕŠ´â\+yt2±KÁ!I&Bˆ :h!ÉÄìj€ÝÀE°5 I&BÔÈïpY}Èõ³÷ì65”@’ ,þÛ#à°D›\ ?N!.$_EÛ_¤ëÌŒ¤&d‹“`óOšÂ³qgB!øµ™ýÅBíÉM‰Øy|2ÑZg)¥~†ÂGarøxü†!„8“›@r{Ï<¸žßÞòa á5ô·µ=þÙ –ÅÚÄõÖr‘N’LNC)u ð5b i|îÚw%AÔ9?ýÎ$ò¥ Q)KÀ‡±°°3”xÙþÜ µÎ03²šJ’É(¥Z¯7”µØ ý!è~"ó I4¬éÉ¥ µÉƒ‹<¾…ÔÚ/.¶Ô5;ŠêQl1ÚæK ‚„º°º9s]÷tàEà­µœC= I&ç@)Õx¸ð9óصÝè ðí_fG!Üí±Nðæ ³£0Y ð ðšÖZfvü¹ÐZ¯†*¥êCa@{ hXL ¯šiç!j‘Œ6¶ŽËùÀzi&åÜI2©­uÆy”¯ÔR^@0 ÌŠ«šütÇsŸHéa묊;t63’jP¢µ–›”+I’I%i­­@–Ùq¸›RÊj¼Òy"¥'±i­3ÍBÔ|’LÄùð°£tO$Õ;¢b$™ˆ ÒžZÍ%„8I&â|H2©õ¤d"*F’‰¨ 9gâ$™ˆŠ‘d"·ìhj?ùŽE…H2$çL<ƒ|Å¢b$™ˆó!{šÚO¾cQ!’LDEyRÉÄSÖ³rÎDTŒ$QArÞ3H2#ÉDT´Í%„ø;I&¢¢<©šË“Éw,*D’‰¨ )™xùŠEÅH2%çL<‚–ïXTÈy'¥”"F€×™§U¨ã¹ ©ÕÿйÏD¸‡RªÆ3‚þ&‡ãI¬@ÆÃÀŽi}~çœLìÉ£70ãáPm*2½p¥T>°ãa>óµÖÉÕ°XI&µžû¯æRJ5FØ»Þ@ »—)ΪD)µX,Öœkr9k2PJ)` ðТ2Q ·Ù»·•RK€IZëíîYœ”LDå(¥:¯CÌŽEü7ÆSdÛÿ$(¥ž¾9ÛS'ϘL”Rý€iOسkXƒRàòthV1…y”ì`ªM±øA²?ì ‚Å°¦{aü@¯TJ}<©µ>ê†jów]›×­lU~ÎD)¼ ŒÃù¨k_+ôNƒ¡©Ð.ÏØ§D¯œ³©6ZAŠ$ùû”ßÂï‘€Q€øxL)õˆÖzå鿢N—l”Rb$û¹Þ©ðÜ^’QÕ«"ªB–|ÜÞl)Aöë´Ö›*;w¥Ô \ý,þ©²ó5Ý=½á£‘@²Ö:¦²sSJu~šC"óàÑ=pרk­ìü…;,©/´…5öVà­õôòÆþ[ÉÄ~nä}àcHtLÛ×sOÀ¢jÔ-ÇÀ‡`j ¼ÖŠ›+”R·k­çVáÂäè½Ö«ºs&J©ÑÀL Ð(‰<±žN)}ÔhCNÀÕ0/ éB€w”R€ûÊžK)¯šë?8IßX°”¸;lQUü­05‡ôcÀ,¥Ô1­õ•Ÿ¿œ3çN)u0 𰘽.—gÊ_P®O‡Ë`xX‰‘r€'\Ç:%™(¥n7úF$À¼ÍΪMq¹<ÖüýÀ‘``®Rª§Ö:¡ f.ɤ֫|ÉD)Õ˜ ø@ã\øs9´,¬|l¢ú58 +VÁõ]a~ àq¥Ô­õLÇÎd¢”Š>2úº¦Á·›Á"; Z˘÷ ù 0J÷ó½ŽÜ =z†Ê%{uù\ ž4¶Ã–U›0‡#/ô †Í€”Rë´Ö»ï:¼øBh,Z>îH$ZºêîzeÛëìŸWàæ³}Ig¦M^骱«Œ›1¶7Œí¯Wv XO쪘6òChà‹‘7{2±_<ÂôÏиã質;³?Xíî9 Ý—OQJùR95`¤so§9_öíkŠÑ×í¨±ý™½>Û¹a?Þ¸ÐÈŒ°çgÉäiã_Ól˜œP>骼{m‹ý^ `,çMJ&Ô¯±@Œ±½½¶¥¬‡tUÞMN0ò`ÏÞööpÃîÛ>R^+ Ê€)°®10ø¬3«Ìަ¦©MëR…*uÎd¤ñ¯GŠ±Ý‰ÚÇGùbro`RªŽ70ð/ŒsGE­tíA{2¬” ÔZçW|rÞ3œ_2QJƒ¾k"û“ZlÜaxÚV`¨7p•ñFÇ4ˆ(234án·‚çz‚?žÇL*[".çýŒ*®ÛUfF¢¦‹(2òÆÖà*oŒ:t m&ôÅ7i‚_q1¶´4NšKõ‰.„†yÌy7Ú©D­v¾ß±}»j˜gloµ›Ÿ–ÿoï¼ã£¨ºüL*é!„N ¡÷Þ«ˆ´PD ú)¯¨ ‚€( –WŠ€…N¨R¥‰¤×„ôJ •ôìÞïÙM61!Ù É}~¿“ÌÜ)÷ìÌsæ–9·aCª\½ÊCÔò+>):gRÏ ¨¥&zd`ÄE£5¡¡ IDATA?N÷Q£p+¾íõ×ñܽ›Ž€Ø¼™¶¯½†' ºuÃéâEú^¼Hß'è9w.Þ>>ØèëÝç_¥UDOFDðäÁƒtiÕ »’òÿþ{ZΞ1sùªú±þ5K(J9øRÊV‰®\UÍ2–®3fP÷çŸiY<ýäIzöîsYæÝ¡ 2Öo-â‘¡»ïµ,(p&µõÎÄ(‰‰d½ú*Þ7R$²íäÉø?N 7Æ%(ˆT@T­Š…¯/ÕFŽdŸ‹ VÏ?Oƒ^À×ÃKK”õëé¹y3Á£GsDQ`ð`Üíí1/éw͙ÕÌL4%m«Ø¸ê‰û=w»+²Ï¤rðжêÊ•«Þ™”9uëbçë‹Kñüš6¥zµjX–¥/’>~<‡Ê2òMí"ÎD7!•Ñ ë?ìïÏÀêÕ±¼y“\€6mpðó£ú3Ïð§^EQ½ ¢ ´ZÄöí$lÞL|B£F¦º æ˜OžÌEýùOœ õnywé‚ËíÛä^ºÄ=p:¿ÿ&é…hxó&Yï¿Ï•5°š1!Ÿ}FàåËdtïŽóäÉ4¬[‡ädr¾ý–àÝ»)„Ù¯®o½…¯V‹X¶Œà‘#ñœ?Ÿ À@µ*â³mñÀ[F­"ýþ;·ââH›2…ºú´)ShpáqW®p‡¢…£ø²¨Z ++,¢¢ÈÚ¿Ÿ[vvX®^M«îÝq*VÀþ!}úP³sgªÂÏû‰i6e ¾»wåç‡ëÎtÿî;Ú]¼H’¹9Êþýô×Û¦ N¤,ZÄ•R7m¢_ÇŽ8¢Il·n¥z:¹;o­Ÿ{Ž&žžXâí·©ûí·t "eÇ"_{¦‹ãgÄë^”ƒêµ”²•R‰l,}ï–_AÚªUt¨YÛ¯¿æê¶mD¸¸¨5–æÍ± `°V‹X½šàfͨzä½ôljïªUtIL$ÛߟÈâyxx`5bÞúõaÃhôãtŽ'óòenÿð=ÿÎuëbwð 1ŸN‡ ¨ÌÝݱùé'B6m"ìÉ'©ûË/´ÕŸkÇ:÷ì‰çÖ­„ׯý×_Ó¥OjÂÉ óóçyÒÓ»Õ« ¶³ÃâÄ ž°µÅ̈׽H1 ôøÆ`ËBFޤá¬Y\×5M5š7ÓÅt)PÞܳ+haoe·nÔ¾p¸¿þ"ॗ8ðÆø:Ä›7Iÿé'®ÎžMPVV‰Í2E › –Æq,1‘¼À@Ò÷ìá©—^bÿªUĘ›£¤¥Ñ¨MìÏœ!ý«¯Ô7{{ÌCBÈèØ‘cÆàyâ)3fàÂíÑ£9pý:é»v1XïÜÞz‹V‹sîÓO HO'oÞ<:M›Æå²¹ÂÿøÙxeͤrð¨·Ø¨åDûÿí^^¸._NàæÍE›Ô?þ¿Ó§‰;–ÓÛ¶‘Ã3:á ¶llÜHðÌ™\¿OþyïÙCØŒ\0€ºU«b3p 4nŒÓOà±|9QññäŒÏl1kí“õëS¥woôì‰ÿÑ£¤,^LøµkêË/ þïÿh˜‘Aî AX±‚è¸8F¼ø"Ë–ù/¯ß£Pð» œ‰iŒÄ’%„¼ñmÚµÃÁ×»*U°øþ{" uQUAA >žÌgžáàÑ£„³þùgbþ™X77,§L¡þ›oÒöÎò>ûL5܆(J‘ê1$'&ªMmçÏ“jÁ„FƒHHàNË–8œ9CÚSOá6gm\]±IJ"Ó݇°0RQ·.çΩÇìÝË­Ü\µoÆÆÅ݇W^¡éË/ÓÄÌ ÅÜ3ªXY¡äæ>6}»3yÜõ7 ´ð$¥pŽûg"VVoä€ú|››¾¥Ï™Ã©¹sé4{6šíÛ ™;— ÈH²5ÂÙÃLj†* Š¢€FƒÖÇ»€Õ¶ìÚ¥öß–”·M*Ø~èPáóMZh¨Úç BÚ°aÔׯïÚE—¦MqËÊ"/7““: ¨Y3ì33É=z”‚>/\঳³ÚÂáç‡sµjØêmg‡u½zØÞMײA”äLÔ-ÆSB%<œ¬S§ˆœ2…†µkãpà722(˜?¥xs•FƒvÂî9s`b"¹}Äõ¦Mq<˜ºŸ}Fð=v×÷Åèc‡¡[&?¿H½Ð;µ?¦åÆëÔ‰ôÕoKJ"»~}µÉ ÔöX++u@VšìlòfÎäÄš5ÄþËKUZ”FÍäqqzÓa´—Óèh25¢šá YŸ>¸Z[c¬6—/^Lزe„Aõ·Þ¢Ùúõ¸uêÄ”²¯\áÖ˜1ü}·ó§§“ßòg’Ÿ_hKнŒê× íÙĉxúøàZ·.[ÆÃcåJµ9=6–,;;¬6¤ÊdÔ«‡cj*9€HN&ûúuÛ·gÿC^¶RÇ ÏÄt1—Ö¬!hð`¼»t¡Þ÷ßTl{AÍÄ@o_\F¦†~ÝÓ«Ž©•˜È y6ÈC{Û0|( ªUÃ.9Y½©={âܺµ~DbÃÂÚ´¡ÖرԬYË9sh¦ÕžÿÏ? Ÿ6¦µkc¥?_çÎÎÇRjÍR*´Ú ˆ_»– ªèŽ 4/}Ÿ' Ú¶ÅÁÊ Eÿ#@‡‚}еxücÝpÿÚµ±ÉÈ Ôþ“I“ðÑo;s†´°0nñÍkÔÀò…ðhڴо­[Gx«VÔ5Šêú´† ©R³fÁè5£—“÷™¬XAÔ¼yGêÞ½”4=°þÆÞ¸"¸ºb¹d ÝV®Ä:%…¬š5q:}š¨É“ÿÑÿ4s¡;¯a>ÅÏ/ Ä×_sö“Oèôî»´8z”Pý¶õë‰ëÔ‰sK—Ò#7Íúõ\ÍÍ%?5•<@¼ø"'ׯ§ëŒ‰Š"ÙÙ›“'‰4HmS}L0I9‘“R¹ÅF)'—/sçƒ82s&Þxƒ6ÖÖXÄÇ“6q"‡4´X8À“äfg“gnŽÙÿËI@ÌŸÏ oofXb"w,,0ËËCã燿~T÷°÷°I%®Úš%K9¯øxFYZb¾u+;ªƒ‘„€±cùcÕ*z„„0:(ˆÄ£G ÓռĞ=Üú䎭\I¿o¾!77¥%fC†°'.cF2)´…+‹÷ÃÔp#*Q&xx`íîŽUh(Y))”ÙtÃææ(µkc~ï¡xO?ûÚµ rqauFúatØÛcÞ¨¶¡¡d¥¥•žÿ¤o8è ¬B<ó G)ŠrèÝvÂÑ e§Ÿ¤|0¦7¬{ˆBÔ{УEY< }‚àÀ‘²Òînxya{çùqqjÿ§! b£Ñ Jzf-,Püü°KL$·¤cË’Úµ©’@îýúLCC±e ×ßy}øw|}±ËÊBs?[T6,©ÓúA9è€/mbcÉŽ-û‹ª+”%Î÷Çô &¹F l{ö¤ÁÚµœ3ì¸s‡|}G¿qyÔ[,ûL*¥ÖÌeT‚ƒÉ¸Û¶7îò$?qñ"ée£Õ½‰Š*ÙŽÌœ‰W›6¸Ý¼IfÔ±³Ãrþü‚n@½K×®qÇhÊþƒrÖÌUÑøþ{®vîŒ[x8i&°¯øpÄ €,'žRûÎDòlØ@´•Jج^Í•~ <9Ù˜­DIÎÄ4o‘ ˆÛ°Aýº¶òX¾qJŒÍ#ßbùrúˆ“ñÑGšZ{Sx‹eÍDòo‘å¤r k&’A6s•ÎÎXT¯ŽUPÐã~ú‘ûLJã$’r,'ÆÂÉ ww¬®_œìH÷جXšÇ'?þ2q"u¶og€©õxytÇ)ú²¤¨*¨|ÿ(åEÊÈ3ÏPsï^›Z‡“Ââ!k&À–-Ä\¹Be™TL¶&Ã9š«b¯[¸käí 2<ÌîÝ$ÄÆòçõ*й\|ÿÚkÔ}ûm|ö£ÿš5´wv.˜‡D¬]Kû¾}q]·ŽNGŽÐ­ZaïïO·€žX¹’¶NN…û+ böl|¦_@çϧ‰~[ƒTùå:0ð×_éàáQø%úSOáöÛotÝÓ«5khÀÀuëèT·®3 RuíZÚŸ:Å Ý»éÑ£‡:׊6K—Ò" €‡Ñ÷õ×Õë×§Ê Aj$a@lÝJ×.]pÚ²….;wÒ½_?Љï?Ò_Ć V«†Åñã<]½:v7ض- Õ‡?Ù´‰.o¼A‡‹IX¶Œóú`’ÕªaqîÏT¯Žíš5\qvÆ: €‘Uª T©‚òË/ Ž'cÁÎ[½ºj/V¬ [ýú8-]Êù-[vrRŸƒ†±2„+WÒ',ŒÔ°0Rvì`”ÞY ŠÛ·ß2(*ŠÔÓ§‰ÿþ{z J {{£‡ž×Kåâ£EEAäç£éÞ=»wwõ*ûôÁõàAn8@Є j0¶o¿¥uz:Y½{³`ï^â/]bÂСT %cà@šÅú͛շª5kˆøäšÅÄôÔSX¾œˆ[·˜øÜsx„…‘anŽÙo¿qù2w6n, ÄØ°!n+Vpñ·ßôoçÿ àÚ­\É…… Õ½zÑàù穽h7ÞxƒüAàK/©¡é5´³fáN 7¥ly蚉.Xfr´ßDZ³Pò@ä(ÓX·råž»ÞÓØ33Ì:wf—°aQ¼2b5¶lQmÁñㄎKÀ‚4ÓjÑvíÊïP¸ÿ¸qÔ:r„[ÇÓjâD¶®Z¥ÚŸV_¨>ú¿´42ä À÷ß~ó&/NœHcǸecƒÕºu„Ÿ9CÚ‘Fp[´ˆ€_ý‡Åþ³n—?úˆkÝ»SwüxêΞMàôé´8q‚ãÆ©¿áÎò,P[G0‰ý.¹fbÊ7!®]#V¿~íwHnÑ'ýöˆÖooÔ—  ×/_&=!”&MpìЗÌL²·l)] >>TõôÄ5*Šç¢£ÁX Ì4ÀþØ1’vîäÒÉ“Œ däÇ㫟hfÞ<ŽÌ™C¯¸8ž_±‚¶õê©o %ÅåÙ´‰(}~±±¤4n¬6u¹»ãtâDáoüý÷‚¥×ÏX«ËÌkiD}¥]>÷}3×vcé,Ð=AAÄ ¡®GG“Eb³f…väСB»áíË¥K…ëÑÑdGGs«qcÛ·Ç9?ͯ¿nÇÀޏ¹á¨·#11Œ³±Áª~}ì/\ mýzÎ=ʳÁÁŒþüsüÔ&¨Ï>ãèÛoÓùæM^X½šöÞÞj¸ùb±ÀÖ­…v$:šý´Äµjáô÷ß…vdÇŽgeRû å§^Ô¨ƒ>ÿ*U0svÆþöm²õiééLš’B–núu[[Ì]\°OJ";>ž,¬6Ä&$¤èP»”².^$R_*Θ1¯Z•S'RoÚ4:»ºb5u*ç¾ø‚ë‹ôÌ3Ôš>67R£];¶cà-@NÔ‚Ó¦§“åビ~[›68ëvÑî_^B$)Šr è ‡»ÇL¬’¤ÌØÞY·(„z„ËžPŸ577Ð=Oææ(ժᘜL6ê3*tQzµÉÉdúúR½ØþÉÉdÇÆ’ie…E³fØž>]öHÕŽÛ¾=;JRæÅ99}:g&L îôétª^›‰ù{éRB¿ý–°Q£¨9}:­7of@³fl¡ð:\¯baìõÛDj*YôÅÒ®NÅö16%ÕL„þÑEQ ~}ܤ fÍÂ7?Í®]Ä([°ÿöí„úøPkÀ\í§Ÿâ——GþŽÄ8ÀÍ[·HýüsZ::bhu5 í¦Muè€×SOQ oÞ»ªU1÷ò¢Š‡–·o“óÅ\?{–77l¬­QÚ·Ç1/íÚµDýú+—Õ h¥hèzøGøéÝ÷ìázß¾ø>ù$nÍša÷ÒK4/þ»Œ#&cú/¢|¥ŸàGJ…’}.p±Ñûý0˜d@žž¸ýç?j¨ö÷ÞÃËÜ3bôÛõÊbËÂ4À}èP5Œû'ŸÐØÌ ³­[‰>q‚ä˜nÍšE+µßSoGÖ¯'¨U+ê림ÐZ??lÜݱhÐë:u°JM%wÑ"‚Ož$ÌÍ EAÛµ+N šuëˆ^¹’ NNØ¢{Õ¿tRøbYð» íÌ®]uïN£#¨áíÍë¯ÓJ so$)¼¬eQ3ù×çPÄÙ³ÜøñGZYaáèˆÝ{ï±óÖ­ÂPʺ7-ÀÏ?Õ·/'wîdlZVVX̘ÁΘ5Àã„ lÿßÿx2.ŽII¤gg“ëåÅo?ýDdË–^¿žÑéédêªÃJÏž¬ëÔ ×¯¿æ©Û·Iµ´Ä"=¬AƒØaoÙž=<™INn.yff˜ÍšÅ¡b×ënË7yæL.y{ãº~=#ÓÒÈô÷çbóæÔËÊ*w±vîÅJà ,o~lb}$¥Îô1 µn_?âÉJÞ<0Š‚¸pÐ… é³lÖÎÎØü1¿GFR4œ]uûvâ—/çè¦MŒIK#£J¬þû_vëƒEŽÏŽU«x2&†WÕ!Òuë²fófâ¾ü’+W2bÙ2ròòÈ·°À|ð`6Ö©ƒíŠ OJ"ÍÌ ³ìlrGŒ`§™lÛÆÈœò²²Èµ°ÀìóÏ9RìÚ"ŽEïlæÌájÓ¦T]½šáwîµiç;tÀ;5µ°Æõo.Ù¿½Æ%P¨sáÊ|˜q¯ ËŒõëéæà€Õ AlÜ»ÐP²rrîalm1÷òÂöâEÒKzßnÔÛ*U0»|¹hTMEæÍqHK#?,¬° Y[cÖ¸1vQQdß¾Mžá1>>Øi4ˆâMgËÂ…´xöYÚxx°²4Î÷àôxŽ6å_† ×£(Ê(@‚þÙð‹ÑÃŒ›£HãòVKøjj‹Å;Bˆ/ÿí CÐw¿ G~/uïÁªUt¬Wç^½Øããƒ]d$YYY÷·#66˜y{cwù2wt³"¡~}lìí1¿|™;†vFQ iSì32Є†ÚKK??ìããÉIH(ÎÞË [€ààÒ±#Ÿ|‚ß”)t«Z•Jã|ÿž^ðî0('£¹ òÿ&œrf&ù.Ü=Œ{HHÉᨅ€’ŽËÉAs·°ðׯ?Z˜gGG,fÈÙ³D{yQ­m[Í›Ç>Œ~Í-;!ÄFEQ½`Ý4h ï›ä%DRš¬ñ€oÞGu$×€ev>QðLjØ‘ó¼fe¡¹— +Ùð —.ý3l}^ânç»WˆüåÜ9þsæ Q àÚ¾=^K—r“Ùîr‚~ÿ~"ll >º©¤§“·z5ç›6¥êùóÄΙÃÉJœUòq`4p ´õá“Àv&L 7µR’‡eC xíȳ’€!BˆÒ˜ȨÏóU£·Œ¯±Y±‚³Í›SíÊ.äôîÝ$šP’œ‰IÞ$X¾œpSäkL„€Å‹ õÓjò¨g·Ey €Wx{œ_«þ*%Få½fðÕ‡ç䣄¥PFßÒ±v­ú=HEç›o¸Ü0µ*eÛ/©!®(ŠÒðM-øéC8¾æ­…¦|S’<'`ò3pq ÔØkÏ!þ(ÅL¤=©ø”X3‘Îä.LžLý+WH9vŒdSëRžBœV¥° hÁ`doh²žß 3BM­£¤8ÿó„=áì _Ì1úˆß””„´'L˜@Ýðpîè£zT Jî3yó™:•†^^8¿ñgôi¯¿NûÝ»¹zìI¦Ô­t(•éX Î&âEé¼¼Â.€wGÀ¬¨sªÆCÕd¨ž åþÍŠƒÆ n9BbUHrƒ¨ÖQÛ`‡ `°@QÊóŸWî—Ó‰©Û¾=î“&qRŸöê«´9q‚ˆƒÛ¾Ò{"k&ÅhÜ—fÍðNëÓš5ã7ªTîBä Eùxx p‡ìô¤iµ“”@ðð©â!£?•Öžøøàܦ žÀ }ZÛ¶l2¡JeDù‹Í%^z‰Úáá¼”žÎ[7nðÂèÑÔÔo;vŒ§¾ü’–AAŒKMeú_1´V­ÂÐñÇSãêUžMKãÍÈH&L™BÁ×ÙGòÔüù4¿vç22x»n]¬ü‘öqq¼’žÎ[ÑÑL|óMbÄÜÇŒ¡sëÖxEGóòùóŒÄþý |÷]¼Ð}<´joÞä5½.õëSuëbÍË3fàäÈH&|ú)MõºôîëÉ“ ONfjr2S·o§‰®w™ „HBÌ<€ŽÀçÀ>Ô`)e•¯äž¤£6c¾zÕ…SŒàHŒ.cÆàÊ éé¼ÎKãÇ«ÓEâÀžX¼˜V×®ñ\ZÓObDƒê³ ˆ©véϤ¥1=:š‰3f¨Ï<ª xbÑ"Z^¾Ì˜;wx»U+–.¥ul,“ÒÓy+&†Iï¿ úö¥êĉt÷ó£~t4/_½Ê³€Ø¾>ŒŸþœß}GÛ„^MKcúß3ÂÇG¬áà€Yt4/¿û.^ÑÑLŒŽæå… i¡?®S'œ–”Ä))LÛ¿Ÿ¦ºÞØ“rNÅ×Ûo¿eÌÁƒ\iÞœe§N²jÏêÃ.{xàúâ‹tûê+Ž>õ?U­ŠÃo¿ÑÞÞØüò ãöì኷7K—.åÈÂ…Œj×N‹¤V-\_z‰nË—sÂLJ%±±dŸ9CB×®üT½:‹–-ãè¼yŒôõÅvëVb7m"àÂBš4aE—.lDÍš8W«¦ºÙ³i2bæÌá÷XéèˆÍæÍjø{KK”Zµ¨1jÍFfý‡²çwäé©:¾¹séqíqžž,­WoÖ¬á²ñ¯w™ù’„ÊI!ÄL!Ä!DS!„ `ØH1šX !……}…o ! !4t# ãÛ“Úµ±^¾œ1'Nܼ9Ëâê?ðlãÆª‘öðÀù…èþÃôïÏJ¬Ö¯gþØyþøqB|}Y6>çÌaxÏž_|‘î¿üÂoo–’~ች{³¶Z5ÍŸÏ?fX»v8ßôtî,[Æ•êÕ±  1<œ˜qã æáÌ‚æÎåZl,ÙYYh–/¢:‡~IDAT'<-¼×_§§'vii¤÷ïOM!yy…v$=]µ#†qüF¢Ù™3.\ÈõsçHýì3Ž4nL??Õñ|õÇâÖºuD߸AÔøñ…v¤~}ªuê„sz:ùë×Ä3•å¤Ï¤V-#" BÆ£Ñ ¢£‰¯Y{}Ú•+…A÷ì!ö«¯°¨W*µjáèä„ýºu ÕŸ/+‹l]tPˆ3gŠzÛ¾~-[Rÿúu¢ããIÓjѸºÌ”V$~ný¹\]qܵ« FÁ®]êäAc«ÆÛµ‹ýöÔT«o/¿ÌžùóéºkoÝ"é›o8²`¥=‚æ~˜Ô¡H* F·'µkãIœ.æÄÕ¨QhG®]+´#;vgf†Ò¸1vµkãhg‡¡ÑhФ¥F.?¾¨Y·Ž]ºàk`G´..…3.Ø =úeQ­'OF¡IÐjÑzya§Æ$Ü¿¿ˆɨQCµ#“&q`áBºlÙ ))¤ÿðGçÌájé]ÉC9û>:š”¾}i©ÏßÊ ³Úµ©Ë}ZóæÔÎ ŒGn.ydEF’ܾ=yMš°önç×h Ã9׫‡M¿~´iÞœÅÁÁd:9a‘@w½ÉË#ßܼ`Ö²ôãömRÚ´Á80|¸ú&rù2i®®Xêö-! `·µ5{fϦÙG1tÉ>H²ÒCú‰1ŒED)#GâafZ­šwýúÔ:tˆëz]š6-è‹eÄjjµh¯\!="‚d­m‹üœŸ_²ÞZm¡qsÃjÈ:ué²sçH³²Â,9™Núg=7…E‰vD"1‘”- &µbÄÜÍÌ0 $ÍàC;Ràœ¹3x0{­¬ØÿÞ{ø~ðC¿ù† ää¢ñDÁï+}&‹sÕÚëuëèѱ#NþþôÓhÈ_¶¬ ˆ6mðž1¯'ž ÚäÉtýë/Îkµh.䢭-¶[·Ò»Kœ½¼°yÿ}|ºwWÛ:¥hxæ›7ÉÉÏG3z4uš6ÅnÓ&ú8±o‘áùüóxvíZtw@¬_ÏÙhòá‡4:”êo¿MÏ¿ÿæÒíÛ5¡"×Ñpâ› hѪŸ&5•ô¼¼ÂÉ}Œ$‰±0ªY¶ŒëZ-bËzwìˆÓÖ­ô¶°À|É® >‹¢iSþ÷¿øöéƒë›oÒýÔ).ee‘¿hWÍÌP¶m£_¯^¸6h@•3ð0@£xˆ÷ädrsrÈ5Šºc»e }¬¬ íÜIDݺÔ|ñEjÚ"ýuY»–³­[ã3gMžx‚jÿý/½/^$PSLÀ?¦³(¸ž_|Aó¶mq´´T\z:w šä,…&¥\ÔLÂÃÉ?žU³gÓoçNZÆÇskôhVÅÅ©ÍFŠ›6q|ìXÚÔ¬‰ÛÕ«„Éï€ %ó©§øß‚ôõ÷çy­mX±¨ý7nG†þ·ef’?{6['L ÓäÉôØ¿Ÿ ûöq">^ÝgÇâûcÓ¦Ñ9/üŽÙJ|l,逸ì3®Ö¨íË/Ó­J¬/^äÆsÏ©³³Ñ„„nøJBt4©€hÚ÷]»èbay` Ó§³U·¯1‘Eb ŒnOÈ3†U_|Aÿ;y!1‘¤±cYZ¨Ñߟ¿FŒ ùÔ©Ô&jäHv".Žì'žàǯ¾¢ßúõ<'"2’ø'ØjG l@~>â£Ø:y2]žž.GŽpyÇþŒ‰Q÷9~œ¤+8øúët43CiÝšu†¶`éRBj׿÷qãèüÊ+T¹vð±cÙ ˆü|´!!„gg£ÑçFbd$)€ðõÅmûvºXZbDäÛo³%7# ª(‘‚{l‚~ö/ðá5)tO˜´jΞmªvÁŠD§ÿÀ‰V:-£‘ö¤ð˜æ’”&sÏ£‹+V ”“òrÕ¾õƒ}­ ØÕPoSe;0¶ôgü÷(Šâü )Lõ „þç൫à—a*ÝŠñ˜9-‰‰‘£¹*8•ì>úÝoN§à‡úðù`ˆl€j¸O(Š2DqÃTÚ)ŠÒØø©)uBáƒðJ˜©tºÆ*;ÒiUJÍ%›¹Œ€¼¾eÎ+¡ðÊß ÖáœT¥«"ÐØÚ(Šâ ü TU›³Æm…ÕÇŒ­G9D:­ læ*NeýݘÕG¡Y<ü÷%È©ŠÚìÕAa´éƒEq¶UÁ: >] ï{þšÊŽtZeËc34¸¼é#y¬xç:XýÞœZo`¢(ƒŒ1ÒK7bkà f˜ÿ?˜j²¦6I™SIÖ£ –F^ò˜05.l„•Ï ~Ï1Xm„ŒÇéò^بê!‘<2åÖiÖL´`ô¹5$#°âO8Þ®7>Ueƒ"«¬rSÅøT]󹤿/‘O’ Žlæ’TZªê#—qͤj:òy’T|d3—¤²b®Ñ-X•QVùÈçIRÁ‘Í\’J‹±Š¸|ž$•ÙÌ%©¼Ó›ÈçIRÑ‘Í\’ÊJñ)€Ë4ùòy’Tp4Šn!׈êAŒ ²ðK*<‰Îº…Ø2Ê ¨ªËG>O’ NŒ‹n!ÖˆêÁͪÈÂ/©ð$é |e4Óå#Ÿ'IçfUÝBŒ­.'x ¿¤ÂWG·YFDä#Ÿ'I'ÁC·mž†èg 5sM¨™DR†œr€ø&º•ýe”É~`‚šÏ){hŸ^FùH$&&ÎJõ2¶4U`Ns GuI‘R^Eûp² -`†:èäwʆßuç7ƒ…m^W“_c)Rî#sš«~l·BÄ)Šr èþƒáÛSH$‡0µ÷æpÝÂ!!DZYä „HSå0õ<ì©JQ­{¡Ü‰¤$üëN !âÌt+_ªÿâZÁ Y;©xò°oÇèmzbG¸å‡Ê2ÊÝùoù©ùšú·Ë²!¥´eFsÕ_:ÿ¡Ý7\Š¢Áù„¾.ùHÊaj*QVà· îÔŽ!z–uŽŠ¢z€} \}j˾Hã kZeN²4X) BˆNPÔ™tŽ 4Þ W¿1²&Gù Eƒÿƒ°¨oÈ„§Ë:GEQÚ'3¨wÂæ–už£R‰–߸6ÕNvBü jg$º„ÙêÚµAÐo(&¯JýCd•\Ê¿”ŽÏé ÀLc8]>3Õµð¾RJQ*©-ê7TçHfë ÔLEQ€ ÀH5¥Åf8±ªîT2÷Û.‘™4sèð:>©KøY1ÎØZ(в«®ùî‚“ËÀQcl=$’ûpŸšV¶'Â…ÿè6£…)âLE±E.ÜGMqÿ¾û †Ý*5µ%’2ecu˜òÜl©Kø!„È6¶&Š¢T¶O¨)ÕÏÃ7 aÔMcë"‘<þÕàÕ7!¾.á 0D‘i¸×?œ €¢(Àbà55Å,šùÃÿÖAû² '‘<":ÂkcàòPú€Ž €ÿBhM¥•¢(fÀ<`†.%šnƒoƒ®e2DY"ytNÙägàÒ0ÐZ뿦 !þ1@«DgR°QQ&óW5Å,jœ…–ÁKÐ;¼þ¶'‘¨\³ƒn°½\è ‰-@è§UH¦ !~5¥††(Šò,ð5à¦KÉ· ÐâOrú$Bã,Sê(©ÌU?Ü`{38ßZƒÖJ·1 xW±ânGßÓ™(Šâ ü0 ¨òÏ=,ÒÁ:Ùo"1 ä¸@¾] Û2¯€ùeõa⣠(Š#ð.ð&`ûÏ=,2À:ù¼M­‹D"1 ÑÀGÀOÒ©ÜéL(€E@çÂT§è½¡nÔÍ\Sé(‘H…›–Q¢ªÀѪð‡Ü4œIö2ðŽb¯©4|Îä(Š2XXª)-aæ5q Ìå…“H*,œáS_8RK— €O€Ù²_¥d¤3)EQÌ€o€WÕ”šw`Îy˜gJ½$‰±ùݦµ‚`W]ÂF`ÜãÍK¼ÆóPÕX×cÛ6zõ쉳©ï‹”‡éL ‘ΤÍ\RÊH–,ᜟõ›6ÅÖ0}Ú4š~ò$ÉŠ‚P0Ø.ÞŸMVVÌ›9“}#FÐnêTÚÏ>£[\ÉÕ«óµ›˼½Yºu+Á%å­(è~- }çΚÅà÷ßg‡³3_ÛÛ³pß>.ûûó|qýÊJÚµ£A:ؘú¾Hy‘ÎÄéLŠP*ÎD#åîrø0‰ááDϘAS}š¢ é׿›7sN·®EýÂZ¿33õÚ®[Gä©S\>_EAÓ´)õwï&(+‹<@EÆ–-Ä””·3Ñš3è³e Ç¿ÿž@#šW^! $„ȯ¿¦kIç0׿ÿfDJ SSR˜êïOO@sêçN¥žá¾—/ó̳ÏânnŽv×.úÄÅñJZÓÃÂxÁÓ‹-[èQ­._~ÉS11¼y2uml°^°€+€¶„š :G upÀÌÏÚgÎ!Ú“'¹üé§ Ùº•^/¾ˆç½òU´úóº¹aQ½:ÕüýÿY‹ùë/‚}|¨UÒ9æÎ¥×Å‹DÖ¬É×õë³ä—_T/\ rÒ$:è÷›8‘ÚžžTß´‰˜÷ÞÃËÇNXáìÌ·ÞbGFùÏ=Ç¡¤$’?üí~~üoÖ,.úø`óË/Œß·Ë>>,^¶ŒC 0º}{­‡®ãÆÑyî\ŽÉOíÛãĤ#G¸Ñ¥ ?¸¹áðþû´4õ=®"‰!Ò™A6sC¾ø‚‹..8=ý45íøñ´:q‚K©©äBAs”á½`Ú4úܸÁKññ¼šJú¼y\´ýú±}þ|v6lHõï¿g\l,¯¾öõJÊWQ âIi6¤ @TwŠïw뎎ØßíÞÞToׇädr6n$ÐΙÃY//êvìˆ# 8‘6p&7—|33ppÀvÐ jXX ¶n%69™]mJää—šJnn.ùo¿M“ÄDn­\I ‡–‡GÂóÏÓH—?Griõj"àæÅ‹„¤§“ñÑG\¼z•´í۹С M}+‡Èë†HgRéLŒ! dŸ>Í¥I“hY³&–­[ã÷ãœÖo/©Ïäða.ΛǾFXèçÇO11dÚü|4sçrµysÖÖ©ÃÜë׉üà””¯aŸÉÅ‹¤jµh›4Qßø ¥Nì“’H¢„šçË/³#7—œ={˜Á¤wÞ¡! ‰Œ$ãôÞ{´nØ«V­hn- ÷13CÛ§-Μ!ˆÒéÓ$÷éÃ6WWæøûsrÖ,þce€öÛo èÓ‡¶}Dëà`nœ>M2 ÍÍ%ÿÕW pwç«§Ÿæ½zÑZ?€@«Ecm¢?d$·óòÈõóc¥¡¼û.guû4ùAAmKP‚ÔRÖ"k&†HgRY31–üø#¡™™dŽÏÀ½{9e¸Í°oC'E ¨^,,'O2jêT4i‚í /àùÞ{ôMH >6–¬âû7´ÿ÷lëØ‘6ЫCÆíï¿yÚ‹I“8\’Þ‹ÓºeKì­¬@£A“–Fjn.ù€ö×_‰LK#õ™gèÿË/œÐóÖ[4|úijÚÚ¢äæ’/"(ˆ@{ý:á£FÑtÈÜ4ÀzÁÎÙÚb»cý»wÇÙÇ›Y³hÜ«.ºß tDk°Žá:E›¥”™È>CäG‹E_À“õëùcà@Ú|ñg0¸î11¤„…©}aaDÄÇôm Õ¢Ü¼Iò[oÑölœrrÈ &âùçY_|_€äd²CC¹¡ß¶i1éé,ž;—;w217—Üë× 2„ÅIIä? Y3<ö™æAA„¾ù& óÚ¿ŸÓ#FÐsÁ®¢›óÃÙ«©Sé÷Ýw8ÆÇ“°f ûvî$àã9üÎ;´ÿòK†lÚĉ÷ßç°a,?Ÿ'¶la¢V‹&"‚˜}ûˆ´aaÄÄÇS4*ŠÛ¶¶Xé×oÞ$#,LÝ÷¡nJÅÁµme¿ÆEÓöŠ¢è.Âç?Àû¦ÕFò8sí/Ÿ;Gð³ÏrØÔºHÊšßjÁ³ïèVê !ÂM©©‘5“"Èš‰äá˜6FS§2ÀÞ‡W^á²Ud3—!Ò™A:ÉÃqìñiil_»–ÈüüÊ>¥meA6ë"I >Z”HþgÏ’|ö,ɦÖCbLäÐ`C¤3)‚dÍD"‘<Ej&•¾–"‰J à ñvHg"‘Hˆhƒ•J_+•ÎD%p†h'd3—D"y "u w„i&U¥ ‰Jà .Èš‰D"y bœô &U£œ ‰ÊE „z!‰D"y .4Ñ-\3©åéLT¶Ó ÉüÝ`X‚©*c*}g¡Dòh\±ƒhÝÊv“ªRNÎDåjš |߆ÉÂ!‘HîÁ­@˜£¶dì4µ6åéL!D¾¢(›€—áð Ú ÞY¦ÖK"‘”Gî˜Ã¶¡º•ƒBˆD“ªSN±¹t(ŠR¬¡ã6øÅÔ:I$’òÈðà?µ¹¸½â´©5*Èš‰!D¤¢(ßoéA°ø8L 5µ^&F¾iH$EØá»GëVÖIGRˆ¬™ (Š p¨ 6·aÏ;Ð=ÅÔzI$’ò@¤5´œ Éõ$ µ"ÂÔZ•¤3)†¢(­Q;ämÁõl™ =¤C‘H*5!U ç{ÓõÃæBˆƒ¦ÖªàÌ:wxåCH««K˜&„XbR•Ê!Ò™ÜCY Ø‚Y´Ø+ÖA« Së&‘HŒA”ŒÇŸ†|; ˜.„XfjÍÊ#Ò™Ü]“—?P[M±L‡›`ÒQgJÝ$IY±£*|ÝŽ„œªºÄd`”lÚº;Ò™Ü]§üL` `]¸Å!j]×D¨~ \î€F1–‰äá0f nT b}!ÅÐ?Ë`ð±BÆàºÒ™< ºïPþ Œ\L¬ŽD")[2PäÌBšZ™ÇéLþ%Š¢XÝ€!€/PK'®¦ÔK"‘<4©¨‘c€``ê—í9&Õê1ãÿl̈JL=ŒLIEND®B`‚vips-7.38.5/doc/src/figs/arch8.svg0000644000175000017500000006555112303140253013537 00000000000000 image/svg+xml VipsObject GObject VipsRegion VipsImage VipsOperation VipsArithmetic VipsBinary VipsAdd GObjectintrospection Python Python Ruby JS nip2 C++ CLI vips-7.38.5/doc/src/figs/interconvert.svg0000644000175000017500000005016712303140253015251 00000000000000 image/svg+xml Lab XYZ LCh disp Yxy UCS LabQ LabS ICC Any VIPS RGB space Any device withan ICC profile vips-7.38.5/doc/src/figs/arch.svg0000644000175000017500000003667612303140253013455 00000000000000 image/svg+xml Python binding C++ binding VIPS imageprocessingoperations User imageprocessingoperations VIPS IO system Function dispatch Command-lineinterface vips-7.38.5/doc/src/figs/interconvert.png0000644000175000017500000006332212303140253015233 00000000000000‰PNG  IHDRãûY…üzsBIT|dˆtEXtSoftwarewww.inkscape.org›î< IDATxœìwx”ÅÖÀ'½@HB(&UzA) *"boHñú];ö^P±\ÛÅÊ * HA‘*HU:„^B „„’ìùþ˜wÃÓ€l6ÙÌïyæÙ}ÛÌygËyçÌ™sDU)ëˆHuà  %œã¼V{€ÝNYü¤ªk|#­Åb±Xü )«ÊXD>@‹3¨"˜ LPÕß‹R6‹Åb±”-Êœ2‘ÚÀóÀ @ÀÉ#¡YÐâT?UŽC|:T=‡‚aWì ƒ=a°"’CrT;xLUÛX,‹Åo(3ÊXDâ€g€!@°Ù“—î¾{¡ßˆt\S–ÀÔø¡*Ì<v–ó88 xTU×ù X,‹Åo)ÊXDÚãfOùp×x.ÊeyÍ.àíêðz#ØíVÊÇ€»TuìY m±X,–2ƒß+c¹„Bpܶ^Ú•2Š®•¯Ö‚·CR˜³ó-`¸ªf];‹ÅbñGüZ‹ÈàQ³Ué|µº'y¯ÅÍa笉svü ôQÕÞkÓb±X,¥¿UÆ"r7ð¾Ùj™“@õãÞo9=®o?žçìøLUo÷~»‹Åb)­ø¥2‘Þgª@hž‹~…°B8g%7·€/;«êˆâmßb±X,¥¿SÆÎúáE@y¨– K¦Ã9>0»€N]`a @«UubñËa±X,–’Ž?*ã™@7(Ÿ¿N…ÖG}'Í¡ hÝ ¶Æ;€ªšæ;y,‹ÅR (ø”Òƒˆôº™­@ë#˜!ªJì û+º0˪òæý[,‹¥tâ7#c VçCýDXÿ“¯e:ÉU`bc ¨¯ª»}-‘Åb±XJþ42¾8ß¼}iUrÊÛBø xÜ[`±X,–Ò‰?)ãæ¥éN迟š§s–šÇ ß_Žœ×Šˆ?õ»Åb±XοP "Rèn¶.߄ϕonåÖMޏ•ŽEß ‹Åb)­ùZ€"¢7 ¢0hÆ<\Âè¾*†}ÑÀÕÀ\_Kd)]ˆH<ШÃÉœÛç`¦?ör2çön`°HU‹y}}éÁã!þ|NÍc^8€éGw.óUÀ,U=æi-þŽ¿(ã>æ¥á.¨›êy@n¾™ê“'³7)‰BÇ‰Ž‹#xÜ8.îÞ™YYäéåvÞyD\}5ñåÊ<>ûþ™y×Úe|×èÀQ¨á™ÐnôH„û nzÁ5­ ‡qU`fXR ŽGb’Ð ‘77U5Å[÷añJ½2ªš­êÉä˜/1JU${©Q6ÆQëÅ陘HR… DfdyÉ%|—@šs>&pQ½zT©PÈ={8tÑELLN&óî»i¶t)?ý”-îú¶n%åí·™÷ÒK\ίii9•ýÃñ€UÆ–lD¤ðPÞì©r î[ 퀠ÓTœ]’La=,*5‚9Õ@ëŸýDäUõa„:ï""ç?mÂË„›6ÃËgBµa*<`Ê®x¼>|SNTÀ<< ‘«TuCÑÞ…¥¬àÞÔ•`ó¶¶{dœ³¸•ò)û'NdW|<4nÌ×ÕªñɆ ìyí5Úx^·oGë×çË:uø$*ŠðW_¥àªY“¸+Ø™³Î3ØBp§NDÿSŽó³GÖ@uovŠ¥ô ""ò2ð=P*‡'VÀ–ðèVÊâ¬<ù/8¿.‚ŸgA»D§Ù«€Å"Ò°øî´ø‘þ˜õõŒiÿºM°n:|ü·1EŸMVK‡1«`Ítè·Ù‰°×X""}‹ùV-~B©sÊh÷8äa¦ÆCÁºIL$ýÉ'iÔ¡Õ££‰¨\™ II¤.ǬÍË/³p¥¦âš2…¿:w¦.°80€ôt2rÖyô(aaÙmzáùðSææí,ÿDDBžfO“0q!Ô)„éôtévºýOÖ…WZ@VCà¹FU)úö|ƒˆ<¿eKªîÚÅŒ9úï‹.¢YÆ„{ÖùÀ\ð×_lرƒcÿls§G¦UÆ–Àuæí½Ëáû?ͼfq¡¹:æÏ€˜4ÌõgÙO©ED.Þ1[­öÀŸ¿@­\~‡Þ( RaÙL“?€Däb/ß²Åð35e\v—çŸfjxøaÚ Dö‚ýñãÙ°y3»oº‰öG’Þ¸1•Z·¦îvêP€'ž k,®U‹ ]D³þý ¸zˆe;Sgþ|îüî;&%‘~ùå4‰'îâ‹Í9ÿ3ÁqÌ!UU“ÿyÜRV‘;GÌV¯MðŸÕÅ/ÅùGáËßàêËàD `²ˆtRU/˜È½‹ˆ4¾¡Æa˜þ;„sðŸHLmzÁžòÀxi¯ª‹WKiÄ_FÆëÌËÊZä0!ed1~<³&EÄŒx’5p 3,`MïÞÔOJ"uÐ ¾ž<™@Ö¡C¤ÏìÁƒ™Ø®çÔ©Cì-·0zêTöY.™íÛóí{ï1£aC*]y%M5¢Î5×ðÙ_q8§¦,s<еw,% © ¼e¶š$„…ø,‰Iï}0bžóÌÚšÒŒæC *¤ÁO³ RöôRñ–ø4˜ð Dœb€÷½ëÀ_‚~ô& ‹^ƒöG|!Ç´iônÑ‚ó.¼·l!íŸgD‡#ÑÀUµÙ›Ê("2 j2y­µJÀHôÊ0©!ÔSÕ½¾–¨°ˆÈuÀ7fë3à¶¢ôÍZð ÛL}…ªNñ¥4–’¿(ã0`?Pn› ÿ›_Ð5ÅÏ×Õà†ÿs6ÚªêŸ>ÇâD¤1&Îq [ÿ]åk™ [ ñH>UÕA¾–¨08Þèë€ZÐr',›ác‘³¿0S;s\ÓÌÖì¦øÌä—_ãöVÝnq™æE bSàÕUøü{é.µSᦎŒ·‹HïuA‘2¨e’ļZÂò˜¿´Ð‘±!p»—îßâ'ø…2vøÚ¼l¯oÖ¥X<( [–•ƒÙž*§¥¬á„f¼Ül ZåÝëÔKH¹"cþz«Š˜ëÍKÇè~Ÿ÷¡gé¿Úlsä¼Á;·oñüIÿ,6o_ëÿˆ¸å»2¬'d„IÀk^ëKIçr \pw Ì»}:$8²öóV'"R ho¶úoÀçý—[¹f½#ng‰óB7Xü¿QÆNÐûÍVb5¸Ï3¬eQ•30U}y,nçˆù¼MQ¦q\£]PÓË=δôwÇVnæ$­(É\„fÀí[ðyßåV%@p\é½®°”vüF¨ê<`‚ÙúøøêŠöÇušÊ{M8ÜsfÝÈì2‡2‹ˆ„`òX=ŠlT\«!ÍšáD˜s®Úµ >œ3œª¹e;D¸½»ûx©;Š '½d«­Ud&ÿ˜Ú´¡\D’óXPÚ¤ õëæÙçy—¸ãÐÌmª.éýiñ!~¥ŒöCF(  £ð‰yêHô¼ ŽÄÀ`U=ÍL1?¢iÞ^±¾?W\AœËŽy<˜;wrÓúõÜ1{6ýSS:ipµnMùG¡SAmä^Â3¡¶;ŠTI;I..ØA>÷Ô¹3T¹7:šÏý³gÓmòd.ro7kFÄòåôÙ·¡Ó¦quRC–/§o›6”\?ÎyII úí7ú/\ÈÀäd†<ðµókÛ”¦{yKzZ|ˆß)cUÝôÒ 5®¼¶‡P¬Š8C¡ë°ã©_ŸOBC >™6´ 6ò.•Üyy³eϸê>Ã-‡ˆ:õÜ|û3¯¾AÝÙÜ*V$ð—_¸6-5k2ªR%>Šâ½™3ÙÔº5ªT!è¹çèñÄ̈‹ã“Šù¨cG>_¼˜B8Us§©ôøX,§â/á0OAU‰ÈÍÀw°¿:´ÿ{úîó~ë" ÷ Øì^Ê4BUG{¿]K Çù#=Ur s* $+ç±Ç£ý¼y¬yà–¹÷íØAjL0׌Éù·ÞJû€>ø€yO>I!CnVv‡jm."?¡”ïê†"òfí®óÿUë¹ô“›}™å±ß­Œ³œ&ÁÁöìÉÔäd“Qíøq²†g9@Ä4}:»Üu¬\Éa Źî D1"®ª~þ–²‡_*cU/"÷ïÀ¡xèÿ$Ü÷)¼¶Ü{­~Qîù$WvvŒžð^{–RD¼y‰> ÙÊ!OrŒæN¡Aª=ÿ<Óò©G££)W­åj׿“þý‰ÿøcŒͦ„„Ü"ù™V >h‹Ü:˜TŸoW›$S%‚˜õÅOw‚)Û`øßPïX.ç» »O³ûÌsdܾ=ÕW¯f{r2'rkð÷ß9°?‡~ûëfÌ`õO?±õ‡Øë*ð“¨ç0Ø\˜«,e ¿Uƪú_Ù| aä¿`öxg"\XȧÚ°'îêÓûBVæìAU}§èÚ°”rœßZÀ) !/òSÆ!!„îÙCJ^õˆàÊÌ$ó–[˜›™‰Žö×^ãh—.TLH`{î-&ÁÜJ°; Ž{Ä(å’ª/úÔÍäpØXFC½”œ'çb¦ö<¦€+2’à;IÊyÜMZ®óâ‹´îÔ‰º7ÝDçÇ9rçü0i‰¹]s’ ÏQ{pž§YÊ4~­ŒTu¦ˆ´ÁxY·„¥]ᢠ¡ãÏðáOÐ0·'éBr8îº~ê 霉ÀUýý¬…·øN¼äÃåÉǤê&?3uJ © g="¸RSIËÌ$;übf&'¢¢È»í˜,xy¥)×]ãºû€C@àÊ’ÎQDÎf+KÌÞw‚>y*Ä'ȈŠB’’NÞH’œlL×II¤ÄÇE>ŸMB)7ÜÀ`N•*„L™Bß7ßä²I“ø,©×GzlØÔ©–\ñ;®ÜPÕ­À…“ña3zýý hòÔ½nè¿W PÎ-Â`X;8Ty¾¿ÙQÄÀ@‹Ü±ˆô‘–Åq¿–‰ó'œI§xõæVòsàZµŠW]E³œûÃÂÌùy\›= ,¸ìu§úüCUÛa¢Gåú ÁxQ÷ {»1’|îgÙ2»\¸.ºˆXÏýññÄnßÎ!À5k›4á¼ÆOÍOŽG¿z–ÄDÒ§Neu\…øßHpç1?ªªng.‹åü~dìÆ‰_ý²ˆüx¸²"!¡•)_+TØQ¡BÄ$AÅ#p$ÅÀáX8IÕA=ªv_ϪjB>",þ‘¹öN¯Ý¬¥$â‘Ihe9èšoðg>“!C8×sÿÔ©ì½ï>fÿöCæÏçÊ·ÞbÑ–-¤véB•ûïç’zõøØs.4G…2‘÷2Þ  ª>É‚–Îj Dd?P¶ç–Ç<›ôt\‹±ê™g薘ȤmÛH{ðAšV©BÅÿþ—Õ€kÄÖÞpÛ~ù…›GŒ`Ƽyìoܘ¨¡CiýóÏlX¸ý>H›/¿äïùó9ؤ åo½• Ö¯gk~mvžÒŸKn”eìFUOˆÈÛÀ5@oàR ŽÄ›²£ j2ÀT`Ba’‡«ê!Ç ôIàB™ WÕä.µøÛ1Ö“`˜V ºîÏïäC‡HKH`ËðátõÜ¿?S&L`綾2êõ×é:jý Ü¿ŸƒŸ|Âoééd:ı͛هÉ5!ûö‘J&r—ÀÎ*ÎÆ¶|Oõ=›€*°´Ù¡psçšk˜ôÑGtùôS®‰ˆ tçNöÝx#Ÿ®^Í— Ú·ç‹O>¡ó#Ðí…ˆBD‚U5CDª3÷UõC_Ëeñ."Ò™l…|÷×ð~¾ŽGÅÇÞ¨÷¤D?©j©È0$"ÑG®ŠÐf ,ëk™Nrþ°¦ °¨¯ªÿHb±¸±#cáÎà䌖.†:á;-~ŒªÎ%{îð‹Þp ¢•9upGgy¯ŠÇ‘òy³µ´ |}%¢?ß©å(b€'­"¶„—D$ø«ªoúZ‹÷‘z˜¹Î`h¹–ñ­Dï×{ÿ YAÀ;ªz¯oå9=D$ÓŸõ â^øã ¨ëÃd •ƒNCrE`9ÐFUK §·¥$aGÆ%U=t®‘G|-Å{8ëÒ_1[ËÛÂU—á³yÍÙ1ðð`Gožõæ½{ÇÊô/ V…îƒàø¤?“àò»E|ø—UÄ–Â`•q Â1¹uúŠÈ“¾–ÇâUž!Û©gbÞœbWÛCàºaVH.WÕ$/ß·WPÕ™€3¢ßÒº Ä'ʸëõ°£®#Ö]ªºÐ‹·mñ#¬™º""å€)ÀU}Ú×òXŠ1ùC_€Ž¿¯~+ ~Žƒï†50å.WÕŸ‹§mï!"¯š­Vóà—¯ ¦\ì î·Áßm/Øß®åt°Ê¸„""Àd`±ª>æky,Eƒˆ´Â„D}IU—ŠHE`p¾9£Å|˜ùÄexOŠçÃËCáx$Æáh°ªŽö^{Ňˆ_×›=U¶Â7ï üì˜V n¹Twv|¦ª·{¯=‹?b•q Æ Óù#°ZUôµ<–3à ƒz0h|­ªÃ<Ž—ÆýÌž¸pß×ðÄÚ¢•de9¸»,ì®wL¼~ƒcuxãea)Ðo|<"ŠpþöHñBŸxµÇƒÍ£ªúzѵa)+Xe\‘P`< ªÿöµ<–Â#"ñÀ @' .ˆÉÞu‘{i[Žó^$Û—ãÜÕðÈwpwÂÙI²% îê¿÷‚ whÆÀÕNzQ¿DDzc³'j/Ü8Þ] gñÇ—!0´#|׎Æ9;שꬳ“ÚRV±Ê¸ "!À·˜Dw«ýÐJ"r.ÐxhŠqñí¥ª«ó¹¦+03‚v8g=´ZWÀM…L½¹!Þi sZ†–pÂà>xxQU}¸ü§x‘:À«˜ mböFï&K¡÷ ¸„b´œo5€é-auk8êÎÄäÂü6UÕíÞ¸KÙÀ*ãR‚cê‹ñzl—K”|œùào1©ó:ÿSÕ…¼¶fTÝøÔ#åöCÍus*†ÊG â8ì­¢!)öÅÃîàòÌ»ŒF¨j¾éýg®þE ×©GBR¡æjˆ=`ò—W:S`9Ø ‡¢á`%ØÞ2ÂsTû#ð”ªþ] üL‘Ȃηœ9óÃå0óÃV[,–³Â*c?BUŸfÓE¤¼¯åñG<æ‡Ç©ê`U=ák™,KéÇš©ýyèôTÕ#¾–Ç_p懟n²yj-KQäk,Eª¾!"'€™"Ò£´&Œ/)xÌ·:©ê‹d±Xü k¦öSTõ]L¤®_œÉ–3À™ž D[El±X¼UÆ~Œ³Ôæ}`–ˆTòµ<¥ ùá¯Uuˆ¶X,Þš©ýU-"…|™ªîõµL¥¹ x3?¼ÈÇâX,?Ç*ã2€ª~á(ä_…l—âä“a$Ð3?l^,‹×±Ê¸Œ ªßx(䪺Ã×2•4œùáqÀzÌüp†E²X,e;g\†PÕñÀ£/ëZ¾•¦dá$Ÿ_|¥ªÃ¬"¶X,ʼn—1Tu’ˆd3D¤·ªnöµL¾Æ™~3?ü‡¯å±X,e«ŒË ª:Õ1YO‘+Tuƒ¯eòóÃm0óÉ>Éb±”Q¬™ºŒ¢ª3!ÀiäkyŠg©×L ¸Ä*b‹ÅâK¬2.èê¯ÀÀdiâkyŠ g~xð…ªþËÎ[,_ccS[‘À˜T€+}-7‘›§Uu±¯å±X,°#c à$=¸/"­D¤“o¥*ZD$HDþÜ…™¶ŠØb±”¬2¶ ªK€koE¤ð²ˆÔð±XE‚Çüpp©¶X,% k¦¶œ‚ˆ4&€=ªÚÏÇ"ÎH,0BU?ó±8‹Å’+V;8iòÎâsœ×JÀa`°Û)ÛU5ÝWrzi ¼ „µ`Ì<ò¬³¨³PSûU9ÙŸ{€ªzðì¤ÏnOÔùR‹È-À“˜ùá%EQ¿Åb±xƒ2­ŒE¤Ðèôb qÙ1`0˜âoqžåùàR  0袅ü¢ˆHp¦Oûç²é˜> üYØör´Ý cŠ^¼´®UÕ}§[—Åb±'eR‹Hsà9 7fô—ƒ`TLƒØãà -·) ,^TÕ©Þ”¹¸‘ú¥ÜxFUß)àü(àA`Æ¢ó …èã—.1}z84êöïï¨jj!å Öý0Šø/àUÍ,Ìõ‹ÅâKÊ”2vÌóÀ@ÌÞ@4;Ý÷B¯ýP? âsÉ[{06…ìX˜v,© Ç=NX<®ªs¼~#ňˆtÆÄ³›b‘pàÿ€G8ŲŸ]÷BŸ½Ð"ê¤CHŽ/[zl …eåaRU˜s$Fxœ°|PÐÔ€ˆ|†±r$/©ê˜Ó¿[‹Åbñ eB‹ˆ`Ö–>8 ´j*Ü»îØ •Ï èCj|S^oë<ÍÛã€;U5å¬/AˆHpÎà"r!æ~«™=ÁY0`3ü{+´;zf-Í‚·ëÀµ!Ëíí¿ cnÎuÞWDb>ÛD xøîLÌÝ‹ÅRÜø½2væ-‰s IDAT…¿®0{¢ŽÃÝkà™sM+£ªÁËMagygÇà*UÝX4õ—޹ÿkà:³§ín˜´ªæ2Ç^”l…>`UgÇǪ:XD΢Uu­wÛ·X,ïâ—ÊXDÊcL—Í 4>Ÿ ŠqyËòrÐûRØ[8\à&ky³n¸~ |¾‚Šé ”!pM;˜ìX9xHUß(ž¶-‹Å»ø2v‚wüô4s™ïÿ Ãv¿$DÁ¥½!5؈QȇŠ_Ž¢ÁI°ð¹Ùê¶fÎ+~)2:_ ‹j.àjUTürX,KÑâÊøà³õð"x͇&ÌoªÂM=¯àoUu ïd9sD¤&f o4Þ Kf@D9¿.‡ƒ UoØR³Œ©ž êa±XJ;~¥ŒèQ›€(豦ÏõµLðpcx½ƒ³ÑQUøTœ3@DÆ×Cù4X=j÷­Dë" eH>RÕ!¾•Çb±XÎËÚô,¡ðþ@–ïËËCu·yú-Ç ªÔàdprFôC—Bcø¼O…›—;"Þé$·°X,–R‹ß(ci 6[7®€º©˜yE—à,xz¡#f;LÞàÒÄ€@ÕÃðÂ|ÞŸî2rĤb}¼îÕ°X,/ã7Ê£ˆƒ Â1x}9>Wžå®mÐÌíDv×z ˆ‘f@'³õð"ã™îë¾t— 'àž?Q/sæµ-‹¥TâOÊøjórÉzˆ9ŽÏM©9ËM9r^à¬- 8¹ŒË§Á¿7áó>ÌYZ¡î5Îý½Ò‹ÅR ø…2‘–@-³uÝF|>j˭ܹ‚31 *®òJG=ÎN‡M”…Ïû0g‰Ê€¶ ެV[,–R‹_(c²GpRàÚ]ÑŸ}X4oNdÑÔ{Zn9UÞ’‹ˆœ43[×xõ§U+Ê£gvý5ë‘Û‹Huoô…Åb±xQÆíÍKÛøÇv:„®[ǵññç<–_éШ ¸)¯ãQQ|û-îØÁMpçúõ\ûî»´È»ÎN[y›{µ7Іvæ%$nÙF!úkÙ2úöéC\aÎõ,K–pGÆ„Ÿîu¦Ü¾Õ‘WÈ~x°X,–ÒE¯("œ~5’0ó‰§P®4h@õ°04·ãy€Ëy›ë5ŸNçfͨñ¯1uãFRÚµ#¶U+âòn£ÖçMœˆ„¨ª—c:ŸNŸÆ$CX¡RL6h@µ*Uá4úØHö\ðiR! ʃ”²e¶X,–Ò…Ÿ)ãjÉ­@=Q‘ìU6:}ÿý4«]›Š));–ÕÌ6ç° àª«¨|Ï=´@^¥S§² U+jN˜ÀŠI“ذv-Gnjɾ6꺕±E¤;0OU§žÑ]1"<¬'{>ö(¹÷iuü³kÖ$ìÙgiѨU³²Èš5‹„§Ÿfµç9Sîå—iMÄW_ñרQl-¼ä1ÉV[,–ÒL©WÆ" T0[5sUÆŽ‚²ç%³iÓ†èÝ»92i›4 úõ×雚Ê÷cDzK !ø™gèøÞ{,nÕŠJãÇsãEñÉ’%Ù¾ýÐêàAŽM®]ä™j0Ìôô¢žLž‘°³è‚¢D¯€i@%³ëP9˜X ®L,Ìõ"ÿìãFˆt¹p}ø!V¬Hèý÷Ó¥|y‚î¿wà^z‰KÞ~›ùQQ„ŒÉ•À£F±%g¹{vTÅ*c‹ÅRJ)õʈ9ù¶R*¹˜:h®¦Ðwße#@ƒDîÞMJÛ¶¬8úcDz]„¬  ‡ aÚâÅùôSZ´ êcÑ¢_?fß|3ÓGæ’áÃéñ쳄oÙÂÎ^`Ö˜1äHLñŸºðbOH‰Ì!ZK`ÅÙwA‘8‰qpã@h°¾˜Só»0·>ž>½Ó§³·fMÂêÖ%râD–]v €?Ýç|ðóßy‡ uêP~èPÚŒŦ‰[þ˜ó&¶pç[,KÉ”ñþ“o·»€râòx=åø-·Pã7¸*5•´#GH­T‰è-[ظDp8AÆâÅ$¹Ï_·Ž½Í›SpmÙBêÅ3˜|ÙeÄ=ú(|ø!7ÌŸÏÛ›6qìd+÷m4å»s`€%ŒL¢ƒŽ%iîXDºã€#@ ÔÞ~±™…»þŸ#ã¶m©0~<×xð G"" Ív¦`ÁÝÛK—²çŠ+h™³ž¼9ä~È)ÌèÝbÉFD*M€ª%“út¯GY¥ª)¾’Óâÿ”ze¬ªÇEä[Ë“»™:Ï9ãçžã²O>á·Çc%ÀwßqqµjÄ`”±ޤ¥™Ñ^t4¡©©¤å¬ççŸÙ÷Ë/LNO§y·nTÚ´)W«ç5b¼;³Îôþ‹gθp0xÈx§Çúa!·>~í5:­\IBŸ>ü ðä“46Œ®çi¥J'•s¥J„¦¥‘ž³ž¼9TÞy³«°rZÊ.β½+€>˜ß_p!.;."¿“ŸT5ß‹åôñ—¥MΟðÎrä©)3uv %(2’ «aCºu£…£¼³DÈAÞ|“–@VwíJÓ_eõòËœÞy„ºëº÷^j¸js“6–säͶ«êDU-Š@UÓTõU]OvŸ&•§ðQ±Üè§ì'(<œ@ +:¹õV÷R´“×Ý{/­¬°0tà@Zýù§éã•ÃQN}V[òDDúŠÈ2L~ñ·€KÈVÄ Ó¡A´O„ú‡!6Ýì è¼l‘…"Ò£øïÂ⯔ú‘±ÃN 9lq¯q͉ `ýz÷ÜùüóŒýè#f?öý¯¾š¶.®eËXI(ÎÈ8=ôúõ‰Û¶!±±Ä,]ÊšçŸço@;w¦ÎpåÑ£¤¨â 'üí·™°`ssS´ófŸªžÁ2žbÅQl‡£!1ª8:÷ÞãŽ÷Þ;¹ïÇ™ýæ›Ì=šÛ÷î¥vV®Å‹Y×¾= ñø¬RSIÛ¹“»#"ß·÷ÜÃïjd¼5 ÒÃݧq–2‚ˆ\ ¼Dv<€r'àÂDè½z€:Ç!0—|²›Ãà§8˜VUcÁÀÀt™ <©ª¿ËÍXü¿Èg,"#!4 ¾‘§¥è*W&$>žÐ+8š×9U«Jà¶m¤yî # iSÊ?ŽkÍR23ɧCëß ëãUµD‡o‘*åO|/þUÐ5ùEPƒD.]J²Ë•{•+Gà¹ç¾f §17÷@+xkTVÕÃg#§ÅpVZ|Bv P€¦à‰5ÐïŸÁŸ_zŒ«/7†õžƒ_CT5-¯+-–üðe\Øl¶^ùYŸï>as8Ô{4¸QUÇúZ¢‚‘ßÎÐb%,ÿÒ×òäNÃ;a}C`ºªöòµ4–’ˆÔ~Ä8gç&ÃS«`О¢kå¿Õ`DSØéöYXôSÕ­E׆¥¬àsƪšÆ &6ÅK1”Ï®¼ÝØQÄ'0ë‹KÌËê†p(Ÿ÷aβ)Ô±4|ï•°”:œ¹Ü?& ÷¬„ÍÓ`ÐNŠ4kØÝÛ!a*Üõ·ÓtKàO¹¸˜nÕâGø…2vpDzf°! Ÿ+ Ï’¥0¡ƒ#ç,UuGâ*éü`^2Bá©|bnûª<Ý\@&fd)ãˆHÌw!"OÀÿ~ƒwW{/ëXp|´ >˜á@Eà'iU\÷lñüI ¤ÂñpÚï(€3Í»ÛvÕtä|Ók=PÄ8Ë7œ‡œÏ{G®’Ò¯Cá‡îŽ¨ßªjNs–²‚3]5ƒ¸T˜?n-²,nù—!;`Ö4ˆ9D“EÄF„³¿Qƪºi¶æt‚™1}Bû3ø‘ „Oû8bNQÕ_¼ÔÞâ R*Àà.}Ÿža¿éé@ð˜W{ÀRâ‘ÌôO%?ßÿÍàïk¥C|; B3€xŒBÎuÏbÉ¿QÆ#Ýà ‚!×a‚`ÃSq~åš+àh Æ”ú wo¿èQÕMÀÍÖ´î0¾ >ïÓÑ5`NGÄ7T5GøQKä] !ºàƒÙÐå>ùnv?oÍ1sÕ´^óþ­[ü¿ð¦öDDnƘ­vsá¯|'Í ŽðéÍÎÆTõ~ßÉræˆH,°¨Qà÷W¡yžËÀ¼Ë¼èñ(«€Y_ÞPUó—mñoD¤5°ø÷ðöß]ã}nkcZb›©êZ_Kd)Ùø2‘QÀP³uÕ÷ðÃŒâ—âÕ†ðØ} À\ [IŠA}º81«B ~üõFaãU;B¡Õ#p Æìq‘ª.-^,% ùè •“aë8wùZ&H ‚:áp0UU/÷µD–’¿™©ÝÜ89‚¼nìB±šª^jOsñFàêÒ¬ˆTup—ÙÚ}´ ¡[Ÿþïq± ³VÛ*â2Žˆ\t5[ÃAx&>ŸFÁ1'àžÅŽ˜½(`KžøåÈ@DÊaF¤-Ìžæó`æçP)û-_Ù &÷wÖ.PÕÞm³ø‘瀧ÍV…½ðÁ»0ÐËa(?® ü¤Ttv<¨ªo:ުݯTÕËŸ«¥$""“+ n"lïkyN%S öØYø^U¯õµD–’‹¿ŽŒqÒ]L7{Vv‚ÆÃ•ðŠ'åš0h8 & pñzLzD¿QĪú ðo ŽT…›Ÿ‚¡íðJŸf¹à–N0ô GŸ†ªê›Ž,»€¾ÀZù¯ˆœS,`)8ÜÎò¶~k(VÏé” L¸zµ#n/ óF?Xü¿»‘àÌòÉ‚–¿ÂÛ?B§"ˆc¼#õ„_/‡ŒgçDàUM>ûúK&"Òø¨böTÙ÷Œƒ'‹ÈQåñfðñ8PËÙ±¸FUå# ˜´Âä] ¼¯ª?–’Šˆ\|c<—×õŽxQ±³ª4¿ÓÙ¸JU'úT!"H`OQY±D¤* À^õEæ·#c7ªêRÕ'€~@¢™Ç]Ö º¾Ü#σÊiÏ }—õ…úoÁÏ×:Š8 x3Gì7ŠXDÂE$ÊsŸªÎZ³ÍžÄzðÔpî#0¤=¬?ƒ(h«"àŽ !þI1ÜCÏZçTÄŽég½Ý@P&"WeXJ$W›—ú» ^ §ñ]kØð˜WÕªÕ®—üš%C]w<ì«Ïö†E¤…ˆ¨ˆ¼r¶uåQÿ0YËþò"’*"mT”Û<ŽÍ‘ I‘½"2ÆYˆ4pÒV®fE$×ÀG"RÙ¹·tI‘í"ò¢ˆHŽó†ŠÈà/`pDD>tÿG‰Èý"’åQO‚ˆ /ª>ò~?2öDD"0&Öá@ÌÉ#¡ÉPw9´^µ@Ã$h—uÓ 1ÆÀêXØ ËëÃúVRÙ£ê L°à#~ˆWa<—³ò8ï2àE ­ÇÞ,ˆ_Í—CƒÝPï´<m+Þâ °"6ÇÀºj°¢$ÖwLünæcÒÓýVY_Û€yÀpU-fooKq""›€º0èwøxÉé\»n×}þ9+^~™õ|@›óϧrçÎn§Ï¢æºN0®=°TUÛœMM"òÐØ)5Š:«ˆD{€Îªú§Çþ;ûUµ‰ˆôÞU՚αyÀתú¾3U4øKU‹ÈϘ)»{UÕåü7QÕŹ´]HâUu³dm6&Ö7Î9÷cþ¿8·Ì©ê&çœ>ªz‰£ÈÛ¿=KrªKÉg\(TõðгôéAà &‚5]Lñ$ðd…äSåAÌïeËÔ""7÷ €›óûÑ;&áŸEäjL¿^`,»Î7Åó?Nœz40ê21Žw#UuÚiˆü4p9p‡#÷Ï"2@UœF–ÒE¼y©„yÂ+4"h@. kÔ(ÖÄűétë(<ñîXôgSDB‹0‰Qzàü¸D¤ð-ðð,PxMUßsÒ¡NÆ,¯LvίŒ.ö4«êa™Ü†I¶áæ6àÉè(ѱ€Û4ßã`érŽÃL%ˆª.uFÕ ™ƒ€§€ÜŠØ-3FAçV‡‹Ed'yô¿ˆ´ÞÎÒÏUõ i‘ÆÎñ½˜zUÌÏ¿E¤«#{œšSo{Œ…ÌÃR;ÌgUó=Y¦Fƹá|±Wã„­sLUÁtú^à€?8 ä…ˆ\€yÌR1÷~ÚQÃTõFuê Ã8zU%Ûá+»OUõøY oÚu׉ª~ "«€ïEäUý¢(Ú°”âO¾­£ør%*Š ß~ãæ_eõ¸q¬½óNZT«Fœ ¸Ú·§rãÆTyê)þzþyοñFÚ¾þ:¿&&’Ö¹3ñ¡¡šŠ«W/šwìÈyï½ÇÜÌLô©§èAà3Ïð9ÖS©ëVƘßÀÎ3¼ç;÷÷øKài©è‘$E€§?Š•"²h$`BÚ> Œr”ì­’³1Ê«F1ÝLs”z^Ü+"×b>—@Àí³ño`)æAâ+ TDîUÕÑùÔµÒq¼­¼ ªnå…îwŸ("ïœÍ§Uu’ó¾F‘51VÌ0ÌZN²€¦À¹ªºXæqì8ð¼c\,"ã1ƒ†gTu‰ˆ4‘ë ˜ 1&ñÛ0 l~rê9è0ÿ±7ÑN|Uæ•qN“Ça`¯e)nTu‘cb‰yŠ[£ªŠ ÞtÌu[Aç%ªº@D:ãù§‡ì<²ßPáäÛªÇÈÇÄüÐC4JMåXÿþÌøñGvîÙÃýn3u@.G1gÕ¯Otb"‡>ý”M‡‘ñùçlõ¬kÜ8–¼ú*k*U"äÖ[iûÌ3¬Ê_Ô*ž^ÞÑœ2‘êÀeÀyÔÙ}¸3²8–#4ì1Ìè`𮈴Ç(§žsž¨ªŠÈgÀ­"òf:ï߈8“ru°Ñý;s”Øh`´£`‡ˆÈDÍ;ÓZgÌ``p—ˆ¼éü/ïÃ"› YÅß7Tu'p/𭈸0ñ`æ]ã1#S7Qδ[ƉìvàQrADnÃÌC'aF«)œ´´/9£àó»Ûå pµãÕßã@:Ê9ö °TD¦`¬U ªº ã,öŽˆÜŠ™B¨ 4³#c "r3Æ„s©ó…GU×çUéCU?Â˜ÜÆ‰Éîe)¥¨jæÏØRŽ|"aM˜ÀƆ ©}Á”²† áܸ8bEŒ™ÚCguêDTHºr%‡ï¾›…‡søÜs‰pêâöÛi„+ ×àÁ´^¹’ ùµmÊöòŽØg6¶°£Ô<ûàðŒ£ef‚'+ñ° ¨‰X·³ ©0ÊûmŒý4Çþ€çšÿåœòpt ›€‡0ëÁ˜h/v>¿œds0ó´n™W`©PÕ©˜ÈŠ-1¦÷y˜AÄ3˜9i0Ó)ö‹óþݪš—5 5f ô:ŒÉº¯‡oÐv` ÆÁ÷àz=UñŒ^Œ™·lvä܈±, þƘÑÝþ2ÏŸcúuæ!)ªL­3¶üq/ê^€ƒ†ßଅüãXò€G.8JÍ ÷˜’of¶Ñ£é8p —ìÛÇ#G8K…Ï>ã÷§žâ¯1cèÔ°!ñíÛ3nÜ8.éуvr(.ŽŠ l¿è"¾MN&39™ÇæÍcE‹œDð±cëÙ“/Ö­£€ž—ô_;óÕ>ADb0Ê¢«ª0Ïm‘ŽÀU=¯Xڳʸì""C0ž}ÝËÚz\Ç£ôÌr‰kUu_—XJ"òpÄ€ƒ¯t~l,Á+¼q#ù†ÍŒ‹#¸Q#ÊoßNÚ¶m'ç"““ybÐ þ7i{ë×'rÕ* ™Ó;æ8¼¢ªEDÀÌ/RÕBÍ3—uŠ[[3uEDîÁü8/-kŠÌ<²ªÅ,Y "gÉâ&˜—Cq0¡2˜‹"}ãFŽtÞ¤ÏËþmÛ²çÝEEp¥§“±j‡ ªÇ”¯Îq±‡¼>aÆñéÊPÚø‹S×f{«ŒË ÎSòÍg­C¾–Ç—¨êÇÀM§Û|,Žåô˜OöœègMðJlé“eòdæ¬_ÏáÓ»î«&ެ;Tõ´Bv%ªºZU—ùsœ„¢FU“UõâjÏš©Ë"òf~/õ£dg‹˜ 0ßcœQ8SïQKñ""ƒ!* ¶¼ ±%hþk4zÒ#·=×½Z,9±#ã2„ãžßèañ©8Ñ».ÆÄkŸåÄóµ”|þdBr Üq1ÞŸa>ãÁ—:ŠøÆ?ÁbÉ«ŒËNV£®˜±_¬.jT5CU‡aÌ‘v¾–É’;"RÓY7þ0Ùa§^ «Ã9cå™g9þ{˜íN<óŽª&x§',þ‚5S—Ää>m‰In^P¤ à„  ¼T@]K1áDO{³æ4 “4À…Y#Úˆ‚&KaÅhôá[z4¹67Æ„I¬§ª¹ÅD¶X²±#c?GL"輦…ìVÇqãBàvyßI{fñ!ªº¢õ'L2‚,Œ‡òå˜@ Àß­¡g¼ìÌ•éÖÏQÄYElùÿöÎ;Jª"kà¿ ir– ‚¢ Q”5 FQ$ ú)¦]Q ¸ÂºæˆuM(‹iÅ¢¨KÉa%’A$ Ì€00÷û£ª¡&ô ÝÓ3=÷wN~¡^Õ}ït÷}UuC(˜2ŽQÄñ.—f·peF*Lø (ýî¶Ž=D¤¤7>\ˆ Ö¿—¿÷U=¬ª#8’âï».0°-៮¡ôé3ߙѪš>z•adˆ)ãÄDz‹‡zµÍl俎|.±úL?}mä"'"·àB VÂ…~ X½÷ñÉÜ€ [¼Ón:›<÷éãzyY¾%ûLG†q[3Ž1|š²7p «ûZ¨Çðá ºÆO؈'²øïq/`.^ñÃ>¶2"R5³Ð­"R¹¡;Òæ{˜ü>”Í4Å≳³œßtô–íÌcÁÈ ¦Œc)ŠK}¦ÀŸKÔ#~ªúcÜî_Í9üˆÈe¸ü²Ëq ãCÍð¸¾2ðÎ{¨¾ž}®Ë,™Á ðNm¸ l ¤Ëû—L PÓ1rŽ)ãÁçß|—PüÿÒMßaÄsÀY¨÷ð>ÊÆ ""€'€¸t‹N ­b¸Ü´ƒý‘4h: F~¡ »g IDATçî:qi'U‚!=`Y{\Â{p¹À°ßž‘LÇ^9¼Kmv‹…¼Ë|øÌa@oUMu#D¤%ðniåUƶ¯ÅñÆwEBó)pù\¼Êä`öhW1xî4˜p,îi|ð›;T5š±§Ž)ãŽÏ>ô1°NUÍ`$ñ &>žòq®‘F¸|³õq#áIê§Θê^œo²'.ê-‚3~Ú; þ.h¶š$ÂXRVW€`icø­)*Ôôvœßó+ªúg$d7 ¦Œ 0"Rçgù‹ªÞmy +"R÷Bô?Ü:²Y¯gˆÔÎÆùœ³9"Rç§Ü 8åšZŽKdÿ¢E³3Â…)㊈”>æE+Gªq¿F9h‰[GÞe‘òÞ°êàRÜúêÛÑ22‘SpÁBºâÖþ+rtí7Å-ÿü L&¨êoy$¦Qˆ0e\‘ÒÀ—ÀtUmyŒ£ˆH?à8ØYî«$Η¼.•àŽüh/ " Àݸ´/á¦uóUowQ÷<ËãŒÈ¶¿›{ ‘˜2.`ˆH`"ð­ª>myŒãñIϨêë"ÔQÕ'Ðf]Ü(îbœm5 !]µTàwœAÑTÜHnz´”‰¿ïÛ|ŒPÕ½ÑÅ0ò;¦Œ ~„1 øLUŸŽ¶CDêàŒµ°Àó±‹Wt?­Ýúð'“á²?òVŠm;Âê¸)ëË#]ïF7·¶ü+p. ÒÛÃ0ÂO±ì«y…ˆÔÇùQÕ/¢-Q^Z»Í'¦ÃeÛò^„ÀÄ¡UWØTøPDš{qCZãü”gM,‚aDçüZÜD\¢¯£-9D¤àÓÞ°Þˆ²òü²ÐéRHŽÇ)á¸xÍÉ8åü8ðZN‚–†:¦ŒóÞˆç+œïçähËcD™ ´“v¯ŸA±|ð#ÞéàwKy8å¼ÒÖ‡ #²˜2Ž"’¨ª»Eä \ÈÀOÔçÓÈÿˆÈ5¸¸ÕÀ¿&Âù$BUªÀI=ak9œnm Ø0òSÆQ@D.Jââ ôWÕÿFW*#/‘E@Sh²myŽå•:pÛÅ~çbUUq £Q$Ú6|üÞ@}œ"îmЏp " €¦nïŽ@Zþ*·®…»¼¸WE↑1¦Œ³@DÊxåNîN†/¥½‰ûts¥@Ÿõ8w¢|Vþ²ÒËz…çiF`Ê‘¦"2TD>‘Ù"ò›ˆìÇY‘‘M"2OD&ˆÈ"rNnþ¨D¤,0( ”%UuOXoÈȯtw­×¸Ñ gT®(ãʸ†aä…ÖÏØ»—ôÇ%l¯•EÕb8W~¿+p?°KD¾>> ÑØep °ç&òZ.Å7 >-b·wù*œòËR¥(:j­^}•_æÌ!)pü¡‡8mëVö‰ UªÿÏrLØÌ'žàŒ%KØU·.e7d}:–aÃX¸v-YļîüTÙ¿—:SC¿KÃ0rK¡SÆ"Ò—ê­ë±gÊ€–@ý®Ôôùb·‡ñ°)¶–„…`si\žk}Y,"f“ï  ðð˜ùk:Nü’GÇmd¡Œ÷í#­dIŠŽÃ…§Æ‡ªÐ»75﹇óÚ·gŒ2}:ýV­"iÜ86Üz+uo¹…¶Mš0¦^=J‰pÌËaË–Ô®]›ÊÇ3?«¾5Ê8«—TÃ0ÂH¡QÆ>Þós@Žü)ž´.ÚWm… v…>kÿSø¨:LªË*âŒr¾ðþ£wªêœ .ªœnSÒ…–G7OÛƒ[£Í”™¾jý_z‰3‡gÉóÏÓå•W˜²p!»FbÊÈ‘\4iïÄÇSä±Ç¸ðÿà› Hyì1–·uþùTìÖ÷ÝÇ—kÖœ½¨•ßÑYV3 #l ×&9ø·TM{–Áà '¾lþŸÊðà°"0-˜ üMUGŸ`ÃF !"7¡Ì>Øûb(×\uÕÞ{^K–°¶tiJœqÇ$ Y¼˜ž›7³;>Þ½TŸ{.ÇePªU‹øùóé?a‹ `vhÒömc;KTµih׆q"ļ—ˆ Æe@ª %SáÞ…°vܽŠ„Áà¥Ç6øå{5ª¤qÀ+"ò–ˆ”ÈÛ»5ò1ÕÜGB2!~·>ù„Íó糪U+ ÀÄôçûöeB‡4>óLêöîÍäôç‹E'Mâò5kØ2`3CíjFÆÕ#úD Ã8BLOS‹ÈhœÅ2Psüç¿pöÞÈôvëz¸r+\Ñ~® ‰Èùªæ$ñF$Å}ˆ#›)êgE¹-h°k»o¸sçòSðùE‹Ø½x1«ÿøƒäM›Ø—þúO?åüÄDJuìÈG¡ö騸_aJÛ0Œp³#c¹Ÿ#ЏýXø œDDÝBjü ³~„~˼í€w#à«l<6¹¤²„ð]!íÝw¹ìûï™ã|Ô¿?ç¶oO¹ êjF×?ò;wæÌ«®âƒ;9JŸG˦²ÇÊlF¤‰Ie,"Wã²Ìgo„§A¥þ!å¶; cÀ-L<=€Ç"{ÇFÀ+¶CÅ`M ²ù½ü2-)Ó§ßö›'NdöÛosy‘"Ç*_Ô[N9Ö½;U‡ áÒ!CøhÎve××ñe›)cÃÈcbN‹HKà]@àäðõT(vˆIJâp¸~HH Ô¨Q´ ®¤Œ9’ËTI2„N«Ws}p¹ñFjgÕ·+"ÂÉlF$‰Å5ã—€x¨˜_O†ÄƒÑå³éк4,¯þø¨2LN&íÒKy»aCÓÜ<ôSRR8|ìþûù¼\9ŠgÔö´idéã [ŠÃúš~gYæõ Ã'1åÚ$"=p±€7'ÁÀ|0Ͷ¤4´¸žRÕû£-‘Dä ਹ6¾my2fhSxò:œÂ®®ª¿G["Ã( ÄÌ4µˆÄOº½&›``> ÄßdôXâżSDêFäñîcS-˜ž@Ô¿›• M¼¬3LFÞ3Êè‡Ë†<9‹<1Ö µŒœeþJÔ0ò=ß~™â¹Dý{™¾,)ÿ;ÕË:>À0ŒŒ‰%eÜÓ}4_]'êlÁ¥êŸpõb/gw‰Åµz#Tõ ð¾Û›x.,/IÔ¿›ÁåÖ áP°ø BÁ0Œ ˆ e,"‰Àynï’UD}ª/£r$5] SøŸ‚Q@xH†ƒñpË…DF±æfzº"Loëe|VU·Fì †q1¡ŒË€8Þò¦ÕD}„‘Qé¸jìðòvÐs0ò9^É=íö¦·‡ñ• ÿË_.¾Ÿw]‰û?HúˆÈ$yYD.‘R{ †a1bM-"ï×Âë`IHk]:QáÀÒfÏvYpâã)Ò³'56¤ÜÆ$þ9[·lá@ðuíۓع3UBgÌ`û´iì ]ÒëÚÂûg«Uõ”Я3b ¯ÜV5!q;ÌzNM‰žD—v… —úk€ üþ~Ü:÷À+–úÓ0"C¬(ã9ÀYpÍlø`F(×LÊÅ»w³ÿŠ+øà²Ë¨òÖ[\~ð ‡V¬`KÅŠ”©S‡Ê>È7/¿ÌÚ2e(:i5oN½eËØpà‡N=•Ë—³©S'¾MÒÇÁƒ—T5>—·kÄ"Ò˜ÄÁI+aé PöpÞKrWKxþF\ZÑO€«âÀ8…¼<®ª;ó^>Ã(ÄŠ!‘Ï»Z-Û<±‚#U¬HÜ{ïÑmÊ–wïÎ÷“-Hhܘàð¸qt:ùdª´nÍ[Ë—»úqqÈý÷Ó(Ô>¡n’ß(!"UuG–Õ˜EU‘AÀ›°¾!tì ³Æ@|ZÞIñ|xñzœ"þè§îíü€ˆ\| ü læŠÈkÀ‹ªúgÞÉh…ƒ¿f,"E8’ž®öB_';Ó÷®»8EéÓ‡©ªGëÌŸÏî±cY_º4rÑEœ9r$S—/çH©©~ä–‡Þg£€2¨‰Q¨QÕ·8C}a;h8”&Olúv€!wÃá8\t°ËUõHæ'où}°CUŸZ•€Å"Òßÿî ñðƒªÂ‘~½•qp€ý¦M©¼~=ÛRRHͨnÛ¶”+^œ¸‰Ùjû—3‚Caš26žu›N…Ãat"¦„w–ý`l?H+¬.TÕ-éó ùf)¦ª»Tõ^à| 30ODºDàyF¡$”qPìéý¢Åið4u±bHj*3«[¢ œœyÐʾàúc ̉:î®öCJ¸íïм?|_ްYXïW¸¾=Ôyæ\ë&­Uõ—,äKUÕCAûëUµ?p=.¢Ü÷>9‹a'@WÆÞ¨Ä¯a­)C.FÆ7²«fM*gVwÑ"v¥¥¡:Q1Ôö3.‹Ê‰žâfùU}—ÿzhQXx.\ø œÝÛ‡ÎÌåw.EàÖÖPý s#$WÂå@~¸DUw“ Tu‘ªvÁYY¿&"ãD¤^an ¼2öøì6ëBJÜîËeüÚk,«X‘Ä¡Ci\§X1´U+ÊnÜÈþeËX5x0íÒç“mÛ–üQþÈ$³a8Tu!pp° Òâ`ÎEÐá%¨òOèÜ ^¨‡ù_f•…þç@£Û¡üh}$U÷ÝLš«êPUM ƒÌß­}»“Dd¤ˆT<Ñv £°+®MÓ€pñt˜8)”kfÎäª={Øß¥ ^xV·ÞÊ¥?üÀO ²¹JJwîL“/¿dÞí·3·M¿þšvì`÷wß±tÿ~R[¶ä¤:u¨Z·.¯…&é=ÍàÙÀ^UMȶºQhñQåîþ ”>öl‘T(™¥vC™$ˆ;Éå %ö'ÂÁÒ49 x@UCrýË¥Ì%€[;€#Uu¤ú3ŒX"V”ñ«ÀÍP}3l)5ݰa4NI!uÄVŽ]y%Õn¸3+W&a×.R&OfUðùêÕ)ñðôhܘ‡qxåJ¶ ÎüôA2§óå0ål`ª¶ÈÙ]… äœeó%ñÈ–Tà¿8÷¤¯Tuud$<ÿ"q?pn{ŒªFÁ‡Ú0 ±¢Œ»@ ðÆÔ§¡c> NpX ñH. üSUжDFÁBDhÔªãüë«ãFÎ[qK2WU“2i*O‘ÚÀÃ@ àïªúU4å1ŒüL¬(ãâÀï@9èõŒ›m™Žçµz0èV¿ÓLUEUÃÈ#D¤ ðP ¸WUвH†‘\ªzPD&×Á”æÀ”hËt¨}N:URa[üV6Äï¥à»*0« ¤Ä5½x—<#9œ2…˜RÆ"2è ESá¥à–5Ñ“fv9¸à>HN–à‚-˜‹‡a¤CDjâ,¯ÏTÕÏÃÔîõ¸Øß>IÉCÐc-ôÜ ï‚¢9ø<(ðUEø¨|Zõ'¶wªê¸pÈlNbQWæu ~/Œ.Þž÷’l-͆À¶“€}@GU—÷rFÁADÎÀ…ê,‡³¼ž•Ëvâ€pSá@±4豞þÅ€O”Õñpß©ðy=8°½yËÛ0B%æ”1ùAÏ q+ü÷)8#§‘öƒ`EsÜ:sUŸwýFÁFDÎŹCm†ªêÊ\[ø.Ö7Ðj+¼=ΈÀšôÂÒ0 ,¬âLzªêïáïˈebRˆÈÀD $l‡—_†¾#ßó¼¸òØØÐ¸_UŸŠ|¿†[ø 'W㦯ÀËÙ&"̓ªº,ƒkª³Ÿ´¢ïÿà­ÅP,‚t©ýšÁü•@[ŸÄÆ0B"f•1€ˆôÞŠCуðoÃèÙ‘ëqt=¸çH)ïŒPÕ»#ןaÄ>~Êy0¼,.VÕÅAõJâb ´¢iðìL¸s}ÞIúT]x -¤ n„|¡Ï mÙÓÊ@DÎ>Á…̃G>†kØ5inÜ~ü|žOØþ'p³ª¾¾> £pã­¢ïåHîgŠרêB)‚›šîæj?>†FÁxóÁSà±@Lw}îgÃÈ–˜WÆ"R ø8ÇIƒ3§Â ã¡ã®Ü·¼&nê S»Â¡xpÐ]U矘Ԇa#"e¸©ë–@Ü”p/à"àqWsàBx3ŠQî®i‚ƒÜ¦ª¯DO£ P(”1€ˆnÄ×Ç)åj+¡ù|è3z…0ZžR^m?µ€ §ÃáâþÄ>àEà) `áÇg°j\œÔjâ¢g%¥à¼_á‡(Ç8$Ðî/0·6°h ª'ðÒo 2àוnÇH—=~7”Ù ;¡Ü.(Ÿ{ËÀîò°§$W€”Jéš<¼<®ª[óâ ÃpˆH\4¬6Pò ¬ø(<®K'ÊòRЬ'¤Ååum‰ŒüM¡SÆü”×¥@WàbŽSÌY’|³ÖþBU·„_BÃ0²Ã»1.ŠÂ 90:%aéÓþÝ—[útU]•ÝFá¥Ð*ã`¼ñG_ª•J@>{‹/‹U5¼}FáFDÞn€ ɰö}HÈGî~ƒ×ÁÞ’À˪zG´%2ò/¦Œ Ã(ˆHQ` PÎ7óa„»ÞgÁ¸VÀ& ¶Ú®‘ ±”BÑ0ŒÂEÀ§`ì· 8œÿJï@Îæš¸¸Û†‘!¦Œ Ã(¨xŸâê;¡Ó¢ž·<£ÒuTJòòvÄC0bSƆaT:»Ž«ÈF)vëFå—^âÌôÇﺋzƒS/»ëO¬´ 9'2ÁˆL†QP©í>e;*ž6?®½–æ>ÊicçGâ#páüùDxT]7w f¤„Qð1elFCDJãÒ,µ÷ÍÚíŽü9dæÜæÍ)GÚ›oÒå½÷˜9u*Û/¸€ò½{S-P?.Κë×§ø5×Pµ];Ê·×µ+ºt¡BvýºR+0M]Ý'¿0Œã0elFA¤ÆÑÍ{a„:f ë~ü‘¥cÇrñë¯ÓúÐ!Ývs´;ùsôhºõíK mìXÚß|3­7l`ßyçQ}ôhþÜÖ[oqùé§“J¿Pw´8Î]Ò0ŽÃ”±a‘*G7ì%Ä)ãÞ½ù¡rezõ¢Ý€|uø0‡´yóØýÐC|õ \>lºvåÌž=ù,5•Ã?΢F¨Ýº5e´þý©Oñ_dehýÖß$wÕH>£àbÊØ0Œ‚HPü÷Mq„èj´{7¾ÿž%+V°nÆ þ>7b+~ú‰?L·áÃùbÑ"v‡×¯'å§ŸX~ß}4ß|3;ù†©© ­ßÍÅʊŨ62Ä”±a‘MG7)CÎ «4ý±Ò¥‘Æ©µoû›5£rð¹Q£˜{Á4oØø–-9õé§™z_«ÊxAÓpQü ã8L†Qàð™Ñö¹½59RÆ"¨ÈñÊxüxÎOJbo×®¼Þ£íúö¥fà܇²1)‰=_|ÁU+V°fÞ9o‘¡A}M‘ÛƒäüID*ˆÈÉ"2Ũ¼+" E¤wP{׉Èr_7gÔ§a9ÆÏˆm® C›ÑÓ9-m ‚|¼™Û7b…"p$ÎkOà=œ2îP‚žFÀ]ÀõÀ)@uà6n&pg ¢ˆ´Äe'™•¾39 x—J¬Ð¨TåÀÙ@; !PxÖŸ[ +ïŽ^®…¾^Ó søcÍpSà/øþëŸÃUµ&ðð©ˆTÎàÙ¬zùí3€“ý3¢¨ª;x ‰?> XÜèëÖ‘ËgÍý½‘ÚôiFPÕIÀd·÷ú%°G¿bÍÅôö–¢0¶‹ó3U¡G`Ä‘ñÕÀrU]¥ªk€ùÀ5é꾬ªëUuð …?>8SDNõû7ï¨ê ú»ø·ª.UÕTœò-t~0 §¼ªc8’³Ôm½$ôÞSÕ´ ë‘:ÀyÀ-ªº[U«êLº?nÝf½ˆÔÖ+qÓò陜""UpSÏÿêù—¿Áú¿§4à ªþ™Î§p¸ªPÕyÀrŽ}y0 #÷ Ò ©"ô?ð¯çB÷éû€ƒÀ=‘½}#¬’Eä~¿¿7UýFPÝ߃¶÷ã×hýºÍ{ÀM"2 ¸h•IÕ¹UM‘½"R ¨ˆ§]3ODDUW‰È §ˆŒz­3裰SU3²¬¬ƒ{‰ž2JŽ{qPÕý~ê»3p>ð$n$ÞÁïÌä3")ÝËÉ‘çgƉ¡ª‹EämàøìRøû&xlqô$ú[+øá|¿ó’ª®Žž,FA¡˜ˆ4À)µ§pS®àü÷†ˆHCU]B;£ÿk€yªº*“z›pkªˆH ,Qê;q#ÈÌ\ÞÁM•ï–f"Û: ¢ˆ$ú(=Álæªêu!ܸÑoœŸœ \‰{ÙÈÌÀM1ÿmÃÈkîΚÀÓ Ás0`}Þ‹ñj=Õ×ïÌÁ-]F¶Á€'©êCÁø§ø²EUÿ,ž^Ë¢ê{@/ië ÀÇMxxAD‹H¼ˆœæý|„[wŠSÌɲ˜¼."ÕE$ADkâ$Â@IDAT7o]E¤¯ˆ”‘*"rµˆÔȨ-œ2î,ôSÐßãž×rUÝ‘É5«Eät)ŸÅ³0 #Løå³K€Íp¨Ü~+|Q‘¹;e\Þ¯w ‚ÃqÀoÀªº?òwoÄEpS·ùèþ 8ÉoÏ‚•Ïœò f,nÊ÷ÓÌ:SÕ]þ˜†Sú)¾Ê#8%û&ð‹—¡\Ðõ{çíÀ iÜHù¿Aû½q¡ò&{Ù»ùëÃM3w?]që:1˜Š[¸P}ű/)pL€;ò8ÿé¿dp`¿Ã0„ªn.’a_"ôxhBžXNßÙú …ýå€$àUÝ–'7nÄa‹Àå݇V«êßÃÒ aF.‘spF¦U… ¾€O¿€ÒiÙ\š vƒ+¯„©—ø›îª:'ü}±Ì +c9xgÜÔ"‹é[Ã0Œµá€ sç‹ÈÛ"2TDÖúó]²j/ˆpÁ:©j €ªTÕýȳ2.3ÔÍÁƪú³ª>‘‰¬oˆÈÿ‰Kõ¸Q\êÇD®–ˆÌô÷³TD>‘""ò€ˆ¬‘ "òŽˆ”óõ§â¢¼%"Óý±¯DäÌLúîàÓ,n‘ÞåË0 Ã0²%[eŒ‹õ|™ªVÃ%gx$H!%â21íÀ¥<ü.—o(#îÀdU=”Éù³Cd:#NîÃ)ú“8œk¸”Šm|¿piûãÂ[^œ†‹öõ’¯!.JÖu¸HZø:¥Ówêã{ õ©>÷±· Ã0 #K²UÆ>ý`EéSb¶AU~SÕ×U5UU?Â)«Prõ–åØLPß®9_Ô~UU×ú,I×xC,p÷{Ÿªîò>Ñ}€ç}ýd\~ãkE¤˜¿^™¤ƒ fnº}“O͸ —ž1«MÃ0 Ã8J¶#Xygqø°§ ÊUI¯PCM¸ 7 œÕù"R\U3‹ÁVŽëqF_9ûÒ&©åëתàÖ¬C¥.óUpjÆÝ› Ò0 Ã02$Keì§›oNöÙ‘‹ÃÔ÷×Àó"RNU“2èw6°—ôáíô糘ޮ´]—«øÜH;ý({ÎX,}ýœ†³Û¤©j¿^g†aYOS{…—\%"%Eäzàœ0õ=X|+"çŠH i'"ãpÖÓ)À`¤ˆÜ""õEäT¹çf”7‰Ho¸õ$0VU3 ÿð7Ÿ²±2ð 0FUgR?3þ\!"×ùÔŒUE䩚Ãv Ã0ŒBH(\½q†Ns€ÀpŽNínÇ¥ fGS"¦gÎo/ è»àüŠŸfÏ?ã®ãý‘{áR N>Æå3~. y_þéåýø›?ž>Í"ªúï{ .ã `pP•Yéîeîå` °Ú·³ç+Ý—šñ{œ˜MS†aÙ’/"p… ïŽ4Ê’†aF ”‘±a†aäÿ?D{™dy IEND®B`‚vips-7.38.5/doc/src/html.cfg0000644000175000017500000000070112303140253012470 00000000000000% configuration file for output of nipguide as html \Preamble{html} \begin{document} % stop the mono font shrinkage we do for paper output \renewenvironment{ctd}{\begin{quote}\tt}{\end{quote}} % make a label % in html, write an extra label which we can link to nip's help system \renewcommand{\mylabel}[1]{ \label{#1} \HCode{} } % supress " on page xx" if we're making HTML \renewcommand{\onpage}[1]{} \EndPreamble vips-7.38.5/doc/src/applintro.tex0000644000175000017500000000300712303140253013577 00000000000000\section{Introduction} \mylabel{sec:appl} This chapter explains how to call VIPS functions from C programs. It does not explain how to write new image processing operations (see \pref{sec:oper}), only how to call the ones that VIPS provides. If you want to call VIPS functions from C++ programs, you can either use the interface described here or you can try out the much nicer C++ interface described in \pref{sec:cpp}. See \pref{sec:ref} for an introduction to the image processing operations available in the library. \fref{fg:architecture} tries to show an overview of this structure. \begin{fig2} \figw{5in}{arch.png} \caption{VIPS software architecture} \label{fg:architecture} \end{fig2} VIPS includes a set of UNIX manual pages. Enter (for example): \begin{verbatim} example% man im_extract \end{verbatim} \noindent to get an explanation of the \verb+im_extract()+ function. All the command-line VIPS operations will print help text too. For example: \begin{verbatim} example% vips im_extract usage: vips im_extract input output left top width height band where: input is of type "image" output is of type "image" left is of type "integer" top is of type "integer" width is of type "integer" height is of type "integer" band is of type "integer" extract area/band, from package "conversion" flags: (PIO function) (coordinate transformer) (area operation) (result can be cached) vips: error calling function im_run_command: too few arguments \end{verbatim} vips-7.38.5/doc/src/refintro.tex0000644000175000017500000000753012303140253013424 00000000000000\section{Introduction} \mylabel{sec:ref} {/bf VIPS reference documentation is in the process of switching to gtkdoc. Half-done manuals are distributed with VIPS, and they should be all done by the next version. In the meantime, this old and slightly outdated chapter has been left unchanged from the previous version. } This chapter introduces the functions available in the VIPS image processing library. For detailed information on particular functions, refer to the UNIX on-line manual pages. Enter (for example): \begin{verbatim} example% man im_abs \end{verbatim} for information on the function \verb+im_abs()+. All the comand-line vips operations will print help text too. For example: \begin{verbatim} example% vips im_extract usage: vips im_extract input output left top width height band where: input is of type "image" output is of type "image" left is of type "integer" top is of type "integer" width is of type "integer" height is of type "integer" band is of type "integer" extract area/band, from package "conversion" flags: (PIO function) (coordinate transformer) (area operation) (result can be cached) vips: error calling function im_run_command: too few arguments \end{verbatim} Once you have found a function you need to use, you can call it from a C program (see \pref{sec:appl}), you can call it from C++ or Python (see \pref{sec:cpp}), you can call it from the \nip{} ((see the \emph{nip Manual}), or SIAM graphical user-interfaces, or you can run it from the UNIX command line with the \vips{} program. For example: \begin{verbatim} $ vips im_vips2tiff cam.v t1.tif none $ vips im_tiff2vips t1.tif t2.v.v 0 $ vips im_equal cam.v t2.v t3.v $ vips im_min t3.v 255 \end{verbatim} VIPS may have been set up at your site with a set of links which call the vips program for you. You may also be able to type: \begin{verbatim} $ im_vips2tiff cam.v t1.tif none $ im_tiff2vips t1.tif t2.v.v 0 $ im_equal cam.v t2.v t3.v $ im_min t3.v \end{verbatim} There are a few VIPS programs which you cannot run with \vips{}, either because their arguments are a very strange, or because they are complete mini-applications (like \verb+vips2dj+). These programs are listed in table~\ref{tb:nondb}, see the man pages for full details. \begin{tab2} \centerline{ \begin{tabular}{|l|l|} \hline Name & Description \\ \hline \texttt{binfile} & Read RAW image \\ \texttt{debugim} & Print an image pixel by pixel \\ \texttt{edvips} & Change fields in a VIPS header \\ \texttt{header} & Print fields from a VIPS header \\ \texttt{printlines} & Print an image a line at a time \\ \texttt{vips} & VIPS universal main program \\ \texttt{vips-7.14} & VIPS wrapper script \\ \texttt{find\_mosaic} & Analyse a set of images for overlaps \\ \texttt{mergeup} & Join a set of images together \\ \texttt{cooc\_features} & Calculate features of a co-occurence matrix \\ \texttt{cooc} & Calculate a co-occurence matrix \\ \texttt{glds\_features} & Calculate features of a grey-level distribution matrix \\ \texttt{glds} & Calculate a grey-level distribution matrix \\ \texttt{simcontr} & Demonstrate simultaneous contrast \\ \texttt{sines} & Generate a sinusoidal test pattern \\ \texttt{spatres} & Generate a spatial resolution test pattern \\ \texttt{squares} & Generate some squares \\ \texttt{batch\_crop} & Crop a lot of images \\ \texttt{batch\_image\_convert} & File format convert a lot of images \\ \texttt{batch\_rubber\_sheet} & Warp a lot of images \\ \texttt{light\_correct} & Correct a set of images for shading errors \\ \texttt{mitsub} & Format a VIPS image for output to a Mitsubishi 3600 \\ \texttt{shrink\_width} & Shrink to a specific width \\ \texttt{vdump} & VIPS to mono Postscript \\ \texttt{vips2dj} & VIPS to high-quality colour Postscript \\ \hline \end{tabular} } \caption{Miscellaneous programs} \label{tb:nondb} \end{tab2} vips-7.38.5/doc/src/ipio.tex0000644000175000017500000000237212303140253012533 00000000000000\section{Programming in-place functions} VIPS includes a little support for in-place functions --- functions which operate directly on an image, both reading and writing from the same descriptor via the data pointer. This is an extremely dangerous way to handle IO, since any bugs in your program will trash your input image. Operations of this type should call \verb+im_rwcheck()+ instead of \verb+im_incheck()+. \verb+im_rwcheck()+ tries to get a descriptor ready for in-place writing. For example, a function which cleared an image to black might be written as: \begin{verbatim} #include #include #include int black_inplace( IMAGE *im ) { /* Check that we can RW to im. */ if( im_rwcheck( im ) ) return( -1 ); /* Zap the image! */ memset( im->data, 0, IM_IMAGE_SIZEOF_LINE( im ) * im->Ysize ); return( 0 ); } \end{verbatim} This function might be called from an application as: \begin{verbatim} #include #include #include void zap( char *name ) { IMAGE *im; if( !(im = im_open( name, "rw" )) || black_inplace( im ) || im_updatehist( im, "zap image" ) || im_close( im ) ) error_exit( "failure!" ); } \end{verbatim} vips-7.38.5/doc/src/vdisplay.tex0000644000175000017500000000325012303140253013422 00000000000000\section{The \texttt{VDisplay} class} The \verb+VDisplay+ class is an abstraction over the VIPS \verb+im_col_display+ type which gives convenient and safe representation of VIPS display profiles. VIPS display profiles are now mostly obsolete. You're better off using the ICC colour management \verb+VImage+ member functions \verb+ICC_export()+ and \verb+ICC_import()+. \subsection{Constructors} There are two constructors for \verb+VDisplay+: \begin{verbatim} VDisplay( const char *name ); VDisplay(); \end{verbatim} The first form initialises the display from one of the standard VIPS display types. For example: \begin{verbatim} VDisplay fred( "sRGB" ); VDisplay jim( "ultra2-20/2/98" ); \end{verbatim} Makes \verb+fred+ a profile for making images in sRGB format, and \verb+jim+ a profile representing my workstation display, as of 20/2/98. The second form of constructor makes an uninitialised display. \subsection{Projection functions} A set of member functions of \verb+VDisplay+ provide read and write access to the fields in the display. \begin{verbatim} char *name(); VDisplayType &type(); matrix &mat(); float &YCW(); float &xCW(); float &yCW(); float &YCR(); float &YCG(); float &YCB(); int &Vrwr(); int &Vrwg(); int &Vrwb(); float &Y0R(); float &Y0G(); float &Y0B(); float &gammaR(); float &gammaG(); float &gammaB(); float &B(); float &P(); \end{verbatim} Where \verb+VDisplayType+ is defined as: \begin{verbatim} enum VDisplayType { BARCO, DUMB }; \end{verbatim} And \verb+matrix+ is defined as: \begin{verbatim} typedef float matrix[3][3]; \end{verbatim} For a description of all the fields in a VIPS display profile, see the manual page for \verb+im_XYZ2RGB()+. vips-7.38.5/doc/src/object.tex0000644000175000017500000000766712303140253013055 00000000000000\section{The VIPS base class: \texttt{VipsObject}} \label{sec:object} VIPS is in the process of moving to an object system based on \verb+GObject+. You can read about the \verb+GObjec+ library at the GTK+ website: \begin{verbatim} http://www.gtk.org \end{verbatim} We've implemented two new subsystems (\verb+VipsFormat+ and \verb+VipsInterpolate+) on top of \verb+VipsObject+ but not yet moved the core VIPS types over. As a result, \verb+VipsObject+ is still developing and is likely to change in the next release. This section quickly summarises enough of the \verb+VipsObject+ system to let you use the two derived APIs but that's all. Full documentation will come when this system stabilises. \subsection{Properties} Like the rest of VIPS, \verb+VipsObject+ is a functional type. You can set properties during object construction, but not after that point. You may read properties at any time after construction, but not before. To enforce these rules, VIPS extends the standard \verb+GObject+ property system and adds a new phase to object creation. An object has the following stages in its life: \subsubsection{Lookup} \verb+vips_type_find()+ is a convenience function that looks up a type by its nickname relative to a base class. For example: \begin{verbatim} GType type = vips_type_find( "VipsInterpolate", "bilinear" ); \end{verbatim} \noindent finds a subclass of \verb+VipsInterpolate+ nicknamed `bilinear'. You can look up types by their full name of course, but these can be rather unwieldy (\verb+VipsInterpolateBilinear+ in this case, for example). \subsubsection{Create} Build an instance with \verb+g_object_new()+. For example: \begin{verbatim} VipsObject *object = g_object_new( type, "sharpness", 12.0, NULL ); \end{verbatim} You can set any of the object's properties in the constructor. You can continue to set, but not read, any other properties, for example: \begin{verbatim} g_object_set( object, "sharpness", 12.0, NULL ); \end{verbatim} You can loop over an object's required and optional parameters with \verb+vips_argument_map()+. \subsubsection{Build} Once all of the required any any of the optional object parameters have been set, call \verb+vips_object_build()+: \begin{verbatim} int vips_object_build( VipsObject *object ); \end{verbatim} This function checks that all the parameters have been set correctly and starts the object working. It returns non-zero on error, setting \verb+im_error_string()+. \subsubsection{Use} The object is now fully working. You can read results from it, or pass it on other objects. When you're finished with it, drop your reference to end its life. \begin{verbatim} g_object_unref( object ); \end{verbatim} \subsection{Convenience functions} Two functions simplify building and printing objects. \verb+vips_object_new_from_string()+ makes a new object which is a subclass of a named base class. \begin{verbatim} VipsObject * vips_object_new_from_string( const char *basename, const char *p ); \end{verbatim} This is the function used by \verb+IM_INPUT_INTERPOLATE()+, for example, to parse command-line arguments. The syntax is: \begin{verbatim} nickname [ ( required-arg1, ... required-argn, optional-arg-name = value, ... optional-argm-name = value ) ] \end{verbatim} So values for all the required arguments, in the correct order, then name = value for all the optional arguments you want to set. Parameters may be enclosed in round or curly braces. \verb+vips_object_to_string()+ is the exact opposite: it generates the construct string for any constructed \verb+VipsObject+. \verb+vips_object_new()+ wraps up the business of creating and checking an object. It makes the object, uses the supplied function to attach any arguments, then builds the object and returns NULL on failure or the new object on success. A switch to the \verb+vips+ command-line program is handy for listing subtypes of \verb+VipsObject+. Try: \begin{verbatim} $ vips list classes \end{verbatim} vips-7.38.5/doc/src/cppintro.tex0000644000175000017500000000523112303140253013426 00000000000000\section{Introduction} \mylabel{sec:cpp} This chapter describes the C++ API for the VIPS image processing library. The C++ API is as efficient as the C interface to VIPS, but is far easier to use: almost all creation, destruction and error handling issues are handled for you automatically. The Python interface is a very simple wrapping of this C++ API generated automatically with SWIG. It adds a few utility methods noted below, but otherwise the two interfaces are identical other than language syntax. \subsection{If you've used the C API} To show how much easier the VIPS C++ API is to use, compare \fref{fg:negative} to \fref{fg:invert-c++}. \fref{fg:invert-py} is the same thing in Python. A typical build line for the C++ program might be: \begin{verbatim} g++ invert.cc \ `pkg-config vipsCC-7.18 \ --cflags --libs` \end{verbatim} The key points are: \begin{itemize} \item You just include \verb++ --- this then gets all of the other includes you need. Everything is in the \verb+vips+ namespace. \item The C++ API replaces all of the VIPS C types --- \verb+IMAGE+ becomes \verb+VImage+ and so on. The C++ API also includes \verb+VDisplay+, \verb+VMask+ and \verb+VError+. \item Image processing operations are member functions of the \verb+VImage+ class --- here, \verb+VImage( argv[1] )+ creates a new \verb+VImage+ object using the first argument to initialise it (the input filename). It then calls the member function \verb+invert()+, which inverts the \verb+VImage+ and returns a new \verb+VImage+. Finally it calls the member function \verb+write()+, which writes the result image to the named file. \item The VIPS C++ API uses exceptions --- the \verb+VError+ class is covered later. If you run this program with a bad input file, for example, you get the following output: \begin{verbatim} $ invert jim fred invert: VIPS error: format_for_file: file "jim" not found \end{verbatim} \end{itemize} \begin{fig2} \begin{verbatim} #include #include int main (int argc, char **argv) { if (argc != 3) { std::cerr << "usage: " << argv[0] << " infile outfile\n"; return (1); } try { vips::VImage fred (argv[1]); fred.invert ().write (argv[2]); } catch (vips::VError e) { e.perror (argv[0]); } return (0); } \end{verbatim} \caption{\texttt{invert} program in C++} \label{fg:invert-c++} \end{fig2} \begin{fig2} \begin{verbatim} #!/usr/bin/python import sys from vipsCC import * try: a = VImage.VImage (sys.argv[1]) a.invert ().write (sys.argv[2]) except VError.VError, e: e.perror (sys.argv[0]) \end{verbatim} \caption{\texttt{invert} program in Python} \label{fg:invert-py} \end{fig2} vips-7.38.5/doc/src/operintro.tex0000644000175000017500000001026612303140253013615 00000000000000\section{Introduction} \mylabel{sec:oper} This chapter explains how to write image processing operations using the VIPS image I/O (input-output) system. For background, you should probably take a look at \pref{sec:appl}. This is supposed to be a tutorial, if you need detailed information on any particular function, use the on-line UNIX manual pages. \subsection{Why use VIPS?} If you use the VIPS image I/O system, you get a number of benefits: \begin{description} \item[Threading] If your computer has more than one CPU, the VIPS I/O system will automatically split your image processing operation into separate threads (provided you use PIO, see below). You should get an approximately linear speed-up as you add more CPUs. \item[Pipelining] Provided you use PIO (again, see below), VIPS can automatically join operations together. A sequence of image processing operations will all execute together, with image data flowing through the processing pipeline in small pieces. This makes it possible to perform complex processing on very large images with no need to worry about storage management. \item[Composition] Because VIPS can efficiently compose image processing operations, you can implement your new operation in small, reusable, easy-to-understand pieces. VIPS already has a lot of these: many new operations can be implemented by simply composing existing operations. \item[Large files] Provided you use PIO and as long as the underlying OS supports large files (that is, files larger than 2GB), VIPS operations can work on files larger than can be addressed with 32 bits on a plain 32-bit machine. VIPS operations only see 32 bit addresses; the VIPS I/O system transparently maps these to 64 bit operations for I/O. Large file support is included on most machines after about 1998. \item[Abstraction] VIPS operations see only arrays of numbers in native format. Details of representation (big/little endian, VIPS/TIFF/JPEG file format, etc.) are hidden from you. \item[Interfaces] Once you have your image processing operation implemented, it automatically appears in all of the VIPS interfaces. VIPS comes with a GUI (\nip{}), a UNIX command-line interface (\vips{}) and a C++ and Python API. \item[Portability] VIPS operations can be compiled on most unixes, Mac OS X and Windows NT, 2000 and XP without modification. Mostly. \end{description} \subsection{I/O styles} The I/O system supports three styles of input-output. \begin{description} \item[Whole-image I/O (WIO)] This style is a largely a left-over from VIPS 6.x. WIO image-processing operations have all of the input image given to them in a large memory array. They can read any of the input pels at will with simple pointer arithmetic. \item[Partial-image I/O (PIO)] In this style operations only have a small part of the input image available to them at any time. When PIO operations are joined together into a pipeline, images flow through them in small pieces, with all the operations in a pipeline executing at the same time. \item[In-place] The third style allows pels to be read and written anywhere in the image at any time, and is used by the VIPS in-place operations, such as \verb+im_fastline()+. You should only use it for operations which would just be impossibly inefficient to write with either of the other two styles. \end{description} WIO operations are easy to program, but slow and inflexible when images become large. PIO operations are harder to program, but scale well as images become larger, and are automatically parallelized by the VIPS I/O system. If you can face it, and if your algorithm can be expressed in this way, you should write your operations using PIO. Whichever you choose, applications which call your operation will see no difference, except in execution speed. If your image processing operation performs no coordinate transformations, that is, if your output image is the same size as your input image or images, and if each output pixel depends only upon the pixel at the corresponding position in the input images, then you can use the \verb+im_wrapone()+ and \verb+im_wrapmany()+ operations. These take a simple buffer-processing operation supplied by you and wrap it up as a full-blown PIO operation. See~\pref{sec:wrapone}. vips-7.38.5/doc/src/packages.tex0000644000175000017500000011147512303140253013356 00000000000000\section{VIPS packages} \mylabel{sec:packages} \subsection{Arithmetic} See \fref{fg:arithmetic}. Arithmetic functions work on images as if each band element were a separate number. All operations are point-to-point --- each output element depends exactly upon the corresponding input element. All (except in a few cases noted in the manual pages) will work with images of any type (or any mixture of types), of any size and of any number of bands. Arithmetic operations try to preserve precision by increasing the number of bits in the output image when necessary. Generally, this follows the ANSI C conventions for type promotion --- so multiplying two \verb+IM_BANDFMT_UCHAR+ images together, for example, produces a \verb+IM_BANDFMT_USHORT+ image, and taking the \verb+im_costra()+ of a \verb+IM_BANDFMT_USHORT+ image produces a \verb+IM_BANDFMT_FLOAT+ image. The details of the type conversions are in the manual pages. \begin{fig2} \begin{verbatim} $ vips list arithmetic im_abs - absolute value im_acostra - acos of image (result in degrees) im_add - add two images im_asintra - asin of image (result in degrees) im_atantra - atan of image (result in degrees) im_avg - average value of image im_point_bilinear - interpolate value at single point, linearly im_bandmean - average image bands im_ceil - round to smallest integal value not less than im_cmulnorm - multiply two complex images, normalising output im_costra - cos of image (angles in degrees) im_cross_phase - phase of cross power spectrum of two complex images im_deviate - standard deviation of image im_divide - divide two images im_exp10tra - 10^pel of image im_expntra - x^pel of image im_expntra_vec - [x,y,z]^pel of image im_exptra - e^pel of image im_fav4 - average of 4 images im_floor - round to largest integal value not greater than im_gadd - calculate a*in1 + b*in2 + c = outfile im_invert - photographic negative im_lintra - calculate a*in + b = outfile im_linreg - pixelwise linear regression im_lintra_vec - calculate a*in + b -> out, a and b vectors im_litecor - calculate max(white)*factor*(in/white), if clip == 1 im_log10tra - log10 of image im_logtra - ln of image im_max - maximum value of image im_maxpos - position of maximum value of image im_maxpos_avg - position of maximum value of image, averaging in case of draw im_maxpos_vec - position and value of n maxima of image im_measure - measure averages of a grid of patches im_min - minimum value of image im_minpos - position of minimum value of image im_minpos_vec - position and value of n minima of image im_multiply - multiply two images im_powtra - pel^x ofbuildimage im_powtra_vec - pel^[x,y,z] of image im_remainder - remainder after integer division im_remainderconst - remainder after integer division by a constant im_remainderconst_vec - remainder after integer division by a vector of constants im_rint - round to nearest integal value im_sign - unit vector in direction of value im_sintra - sin of image (angles in degrees) im_stats - many image statistics in one pass im_subtract - subtract two images im_tantra - tan of image (angles in degrees) \end{verbatim} \caption{Arithmetic functions} \label{fg:arithmetic} \end{fig2} \subsection{Relational} See \fref{fg:relational}. Relational functions compare images to other images or to constants. They accept any image or pair of images (provided they are the same size and have the same number of bands --- their types may differ) and produce a \verb+IM_BANDFMT_UCHAR+ image with the same number of bands as the input image, with 255 in every band element for which the condition is true and 0 elsewhere. They may be combined with the boolean functions to form complex relational conditions. Use \verb+im_max()+ (or \verb+im_min()+) to find out if a condition is true (or false) for a whole image. \begin{fig2} \begin{verbatim} $ vips list relational im_blend - use cond image to blend between images in1 and in2 im_equal - two images equal in value im_equal_vec - image equals doublevec im_equalconst - image equals const im_ifthenelse - use cond image to choose pels from image in1 or in2 im_less - in1 less than in2 in value im_less_vec - in less than doublevec im_lessconst - in less than const im_lesseq - in1 less than or equal to in2 in value im_lesseq_vec - in less than or equal to doublevec im_lesseqconst - in less than or equal to const im_more - in1 more than in2 in value im_more_vec - in more than doublevec im_moreconst - in more than const im_moreeq - in1 more than or equal to in2 in value im_moreeq_vec - in more than or equal to doublevec im_moreeqconst - in more than or equal to const im_notequal - two images not equal in value im_notequal_vec - image does not equal doublevec im_notequalconst - image does not equal const \end{verbatim} \caption{Relational functions} \label{fg:relational} \end{fig2} \subsection{Boolean} See \fref{fg:boolean}. The boolean functions perform boolean arithmetic on pairs of \verb+IM_BANDFMT_UCHAR+ images. They are useful for combining the results of the relational and morphological functions. You can use \verb+im_eorconst()+ with 255 as \verb+im_not()+. \begin{fig2} \begin{verbatim} $ vips list boolean im_andimage - bitwise and of two images im_andimageconst - bitwise and of an image with a constant im_andimage_vec - bitwise and of an image with a vector constant im_orimage - bitwise or of two images im_orimageconst - bitwise or of an image with a constant im_orimage_vec - bitwise or of an image with a vector constant im_eorimage - bitwise eor of two images im_eorimageconst - bitwise eor of an image with a constant im_eorimage_vec - bitwise eor of an image with a vector constant im_shiftleft - shift integer image n bits to left im_shiftright - shift integer image n bits to right \end{verbatim} \caption{Boolean functions} \label{fg:boolean} \end{fig2} \subsection{Colour} \label{sec:colour} See \fref{fg:colour}. The colour functions can be divided into two main types. First, functions to transform images between the different colour spaces supported by VIPS: \verb+RGB+ (also referred to as \verb+disp+), \verb+sRGB+, \verb+XYZ+, \verb+Yxy+, \verb+Lab+, \verb+LabQ+, \verb+LabS+, \verb+LCh+ and \verb+UCS+), and second, functions for calculating colour difference metrics. Figure~\ref{fg:convert} shows how the VIPS colour spaces interconvert. \begin{fig2} \figw{5in}{interconvert.png} \caption{VIPS colour space conversion} \label{fg:convert} \end{fig2} The colour spaces supported by VIPS are: \begin{description} \item[\texttt{LabQ}] This is the principal VIPS colorimetric storage format. See the man page for \verb+im_LabQ2Lab()+ for an explanation. You cannot perform calculations on \verb+LabQ+ images. They are for storage only. Also refered to as \verb+LABPACK+. \item[\texttt{LabS}] This format represents coordinates in \cielab{} space as a three- band \verb+IM_BANDFMT_SHORT+ image, scaled to fit the full range of bits. It is the best format for computation, being relatively compact, quick, and accurate. Colour values expressed in this way are hard to visualise. \item[\texttt{Lab}] \verb+Lab+ colourspace represents \cielab{} colour values with a three-band \verb+IM_BANDFMT_FLOAT+ image. This is the simplest format for general work: adding the constant 50 to the L channel, for example, has the expected result. \item[\texttt{XYZ}] \ciexyz{} colour space represented as a three-band \verb+IM_BANDFMT_FLOAT+ image. \item[\texttt{XYZ}] \cieyxy{} colour space represented as a three-band \verb+IM_BANDFMT_FLOAT+ image. \item[\texttt{RGB}] (also refered to as \verb+disp+) This format is similar to the RGB colour systems used in other packages. If you want to export your image to a PC, for example, convert your colorimetric image to \verb+RGB+, then turn it to TIFF with \verb+im_vips2tiff()+. You need to supply a structure which characterises your display. See the manual page for \verb+im_col_XYZ2rgb()+ for hints on these guys. VIPS also supports \verb+sRGB+. This is a version of RGB with a carefully defined and standard conversion from XYZ. See: \begin{verbatim} http://www.color.org/ \end{verbatim} \item[\texttt{LCh}] Like \verb+Lab+, but rectangular $ab$ coordinates are replaced with polar $Ch$ (Chroma and hue) coordinates. Hue angles are expressed in degrees. \item[\texttt{UCS}] A colour space based on the CMC(1:1) colour difference measurement. This is a highly uniform colour space, much better than \cielab{} for expressing small differences. Conversions to and from \verb+UCS+ are extremely slow. \end{description} All VIPS colourspaces assume a D65 illuminant. The colour-difference functions calculate either $\Delta{}E$ \cielab{} (1976 or 2000) or $\Delta{}E$ CMC(1:1) on two images in \verb+Lab+, \verb+XYZ+ or \verb+disp+ colour space. \begin{fig2} \begin{verbatim} $ vips list colour im_LCh2Lab - convert LCh to Lab im_LCh2UCS - convert LCh to UCS im_Lab2LCh - convert Lab to LCh im_Lab2LabQ - convert Lab to LabQ im_Lab2LabS - convert Lab to LabS im_Lab2UCS - convert Lab to UCS im_Lab2XYZ - convert D65 Lab to XYZ im_Lab2XYZ_temp - convert Lab to XYZ, with a specified colour temperature im_Lab2disp - convert Lab to displayable im_LabQ2LabS - convert LabQ to LabS im_LabQ2Lab - convert LabQ to Lab im_LabQ2XYZ - convert LabQ to XYZ im_LabQ2disp - convert LabQ to displayable im_LabS2LabQ - convert LabS to LabQ im_LabS2Lab - convert LabS to Lab im_UCS2LCh - convert UCS to LCh im_UCS2Lab - convert UCS to Lab im_UCS2XYZ - convert UCS to XYZ im_XYZ2Lab - convert D65 XYZ to Lab im_XYZ2Lab_temp - convert XYZ to Lab, with a specified colour temperature im_XYZ2UCS - convert XYZ to UCS im_XYZ2Yxy - convert XYZ to Yxy im_XYZ2disp - convert XYZ to displayble im_XYZ2sRGB - convert XYZ to sRGB im_Yxy2XYZ - convert Yxy to XYZ im_dE00_fromLab - calculate delta-E CIE2000 for two Lab images im_dECMC_fromLab - calculate delta-E CMC(1:1) for two Lab images im_dECMC_fromdisp - calculate delta-E CMC(1:1) for two displayable images im_dE_fromLab - calculate delta-E for two Lab images im_dE_fromXYZ - calculate delta-E for two XYZ images im_dE_fromdisp - calculate delta-E for two displayable images im_disp2Lab - convert displayable to Lab im_disp2XYZ - convert displayable to XYZ im_float2rad - convert float to Radiance packed im_icc_ac2rc - convert LAB from AC to RC using an ICC profile im_icc_export - convert a float LAB to an 8-bit device image with an ICC profile im_icc_export_depth - convert a float LAB to device space with an ICC profile im_icc_import - convert a device image to float LAB with an ICC profile im_icc_import_embedded - convert a device image to float LAB using the embedded profile im_icc_present - test for presence of ICC library im_icc_transform - convert between two device images with a pair of ICC profiles im_lab_morph - morph colourspace of a LAB image im_rad2float - convert Radiance packed to float im_sRGB2XYZ - convert sRGB to XYZ \end{verbatim} \caption{Colour functions} \label{fg:colour} \end{fig2} \subsection{Conversion} See \fref{fg:conversion}. These functions may be split into three broad groups: functions which convert between the VIPS numeric formats (\verb+im_clip2fmt()+, for example, converts an image of any type to the specified \verb+IM_BANDFMT+), functions supporting complex arithmetic (\verb+im_c2amph()+, for example, converts a complex image from rectangular to polar co ordinates) and functions which perform some simple geometric conversion (\verb+im_extract()+ forms a sub-image). \verb+gbandjoin+ and the C function \verb+im_gbandjoin()+ will do a bandwise join of many images at the same time. See the manual pages. \begin{fig2} \begin{verbatim} $ vips list conversion im_bandjoin - bandwise join of two images im_bernd - extract from pyramid as jpeg im_black - generate black image im_c2amph - convert real and imaginary to phase and amplitude im_c2imag - extract imaginary part of complex image im_c2ps - find power spectrum of complex image im_c2real - extract real part of complex image im_c2rect - convert phase and amplitude to real and imaginary im_clip2c - convert to signed 8-bit integer im_clip2cm - convert to complex im_clip2d - convert to double-precision float im_clip2dcm - convert to double complex im_clip2f - convert to single-precision float im_clip2fmt - convert image format to ofmt im_clip2i - convert to signed 32-bit integer im_clip2s - convert to signed 16-bit integer im_clip2ui - convert to unsigned 32-bit integer im_clip2us - convert to unsigned 16-bit integer im_clip - convert to unsigned 8-bit integer im_copy - copy image im_copy_morph - copy image, setting pixel layout im_copy_swap - copy image, swapping byte order im_copy_set - copy image, setting informational fields im_copy_set_meta - copy image, setting a meta field im_extract_area - extract area im_extract_areabands - extract area and bands im_extract_band - extract band im_extract_bands - extract several bands im_extract - extract area/band im_falsecolour - turn luminance changes into chrominance changes im_fliphor - flip image left-right im_flipver - flip image top-bottom im_gbandjoin - bandwise join of many images im_grid - chop a tall thin image into a grid of images im_insert - insert sub-image into main image at position im_insert_noexpand - insert sub-image into main image at position, no expansion im_lrjoin - join two images left-right im_mask2vips - convert DOUBLEMASK to VIPS image im_msb - convert to uchar by discarding bits im_msb_band - convert to single band uchar by discarding bits im_print - print string to stdout im_recomb - linear recombination with mask im_replicate - replicate an image horizontally and vertically im_ri2c - join two non-complex images to form complex \end{verbatim} \caption{Conversion functions} \label{fg:conversion} \end{fig2} \begin{fig2} \begin{verbatim} im_rot180 - rotate image 180 degrees im_rot270 - rotate image 270 degrees clockwise im_rot90 - rotate image 90 degrees clockwise im_scale - scale image linearly to fit range 0-255 im_scaleps - logarithmic scale of image to fit range 0-255 im_rightshift_size - decrease size by a power-of-two factor im_slice - slice an image using two thresholds im_subsample - subsample image by integer factors im_system - run command on image im_tbjoin - join two images top-bottom im_text - generate text image im_thresh - slice an image at a threshold im_vips2mask - convert VIPS image to DOUBLEMASK im_wrap - shift image origin, wrapping at sides im_zoom - simple zoom of an image by integer factors \end{verbatim} \caption{Conversion functions (cont.)} \end{fig2} \subsection{Matricies} See \fref{fg:matricies}. VIPS uses matricies for morphological operations, for convolutions, and for some colour-space conversions. There are two types of matrix: integer (\verb+INTMASK+) and double precision floating point (\verb+DOUBLEMASK+). For convenience, both types are stored in files as ASCII. The first line of the file should start with the matrix dimensions, width first, then on the same line an optional scale and offset. The two size fields should be integers; the scale and offset may be floats. Subsequent lines should contain the matrix elements, one row per line. The scale and offset are the conventional ones used to represent non-integer values in convolution masks --- in other words: \[ result = {value \over scale} + offset \] If the scale and offset are missing, they default to 1.0 and 0.0. See the sections on convolution for more on the use of these fields. So as an example, a 4 by 4 identity matrix would be stored as: \begin{verbatim} 4 4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 \end{verbatim} And a 3 by 3 mask for block averaging with convolution might be stored as: \begin{verbatim} 3 3 9 0 1 1 1 1 1 1 1 1 1 \end{verbatim} \noindent (in other words, sum all the pels in every 3 by 3 area, and divide by 9). This matrix contains only integer elements and so could be used as an argument to functions expecting both \verb+INTMASK+ and \verb+DOUBLEMASK+ matricies. However, masks containing floating-point values (such as the output of \verb+im_matinv()+) can only be used as arguments to functions expecting \verb+DOUBLEMASK+s. A set of functions for mask input and output are also available for C-programmers --- see the manual pages for \verb+im_read_dmask()+. For other matrix functions, see also the convolution sections and the arithmetic sections. \begin{fig2} \begin{verbatim} $ vips list matrix im_matcat - append matrix in2 to the end of matrix in1 im_matinv - invert matrix im_matmul - multiply matrix in1 by matrix in2 im_mattrn - transpose matrix \end{verbatim} \caption{Matrix functions} \label{fg:matricies} \end{fig2} \subsection{Convolution} See \fref{fg:convolution}. The functions available in the convolution package can be split into five main groups. First, are the convolution functions. The most useful function is \verb+im_conv()+ which will convolve any non-complex type with an \verb+INTMASK+ matrix. The output image will have the same size, type, and number of bands as the input image. Of the other \verb+im_conv()+ functions, functions whose name ends in \verb+_raw+ do not add a black border around the output image, functions ending in \verb+f+ use a \verb+DOUBLEMASK+ matrix and write float (or double) output, and functions containing \verb+sep+ are for seperable convolutions. \verb+im_compass()+, \verb+im_lindetect()+ and \verb+im_gradient()+ convolve with rotating masks. \verb+im_embed()+ is used by the convolution functions to add the border to the output. Next, are the build functions. \verb+im_gauss_*mask()+ and its ilk generate gaussian masks, \verb+im_log_*mask()+ generate logs of Laplacians. \verb+im_addgnoise()+ and \verb+im_gaussnoise()+ create or add gaussian noise to an image. Two functions do correlation: \verb+im_fastcor()+ does a quick and dirty correlation, \verb+im_spcor()+ calculates true spatial correlation, and is rather slow. Some functions are provided for analysing images: \verb+im_zerox()+ counts zero-crossing points in an image, \verb+im_mpercent()+ finds a threshold that will isolate a percentage of points in an image. Finally, \verb+im_resize_linear()+ and \verb+im_shrink()+ do as you would expect. \begin{fig2} \begin{verbatim} $ vips list convolution im_addgnoise - add gaussian noise with mean 0 and std. dev. sigma im_compass - convolve with 8-way rotating integer mask im_contrast_surface - find high-contrast points in an image im_contrast_surface_raw - find high-contrast points in an image im_conv - convolve im_conv_raw - convolve, no border im_convf - convolve, with DOUBLEMASK im_convf_raw - convolve, with DOUBLEMASK, no border im_convsep - seperable convolution im_convsep_raw - seperable convolution, no border im_convsepf - seperable convolution, with DOUBLEMASK im_convsepf_raw - seperable convolution, with DOUBLEMASK, no border im_convsub - convolve uchar to uchar, sub-sampling by xskip, yskip im_dmask_xsize - horizontal size of a doublemask im_dmask_ysize - vertical size of a doublemask im_embed - embed in within a set of borders im_fastcor - fast correlate in2 within in1 im_fastcor_raw - fast correlate in2 within in1, no border im_gauss_dmask - generate gaussian DOUBLEMASK im_gauss_imask - generate gaussian INTMASK im_gauss_imask_sep - generate separable gaussian INTMASK im_gaussnoise - generate image of gaussian noise with specified statistics im_grad_x - horizontal difference image im_grad_y - vertical difference image im_gradcor - non-normalised correlation of gradient of in2 within in1 im_gradcor_raw - non-normalised correlation of gradient of in2 within in1, no padding im_gradient - convolve with 2-way rotating mask im_imask_xsize - horizontal size of an intmask im_imask_ysize - vertical size of an intmask im_rank_image - point-wise pixel rank im_lindetect - convolve with 4-way rotating mask im_log_dmask - generate laplacian of gaussian DOUBLEMASK im_log_imask - generate laplacian of gaussian INTMASK im_maxvalue - point-wise maximum value im_mpercent - find threshold above which there are percent values im_phasecor_fft - non-normalised correlation of gradient of in2 within in1 im_rank - rank filter nth element of xsize/ysize window im_rank_raw - rank filter nth element of xsize/ysize window, no border im_read_dmask - read matrix of double from file im_resize_linear - resize to X by Y pixels with linear interpolation im_rotate_dmask45 - rotate DOUBLEMASK clockwise by 45 degrees im_rotate_dmask90 - rotate DOUBLEMASK clockwise by 90 degrees im_rotate_imask45 - rotate INTMASK clockwise by 45 degrees im_rotate_imask90 - rotate INTMASK clockwise by 90 degrees im_sharpen - sharpen high frequencies of L channel of LabQ im_shrink - shrink image by xfac, yfac times im_spcor - normalised correlation of in2 within in1 im_spcor_raw - normalised correlation of in2 within in1, no black padding im_stretch3 - stretch 3%, sub-pixel displace by xdisp/ydisp im_zerox - find +ve or -ve zero crossings in image \end{verbatim} \caption{Convolution functions} \label{fg:convolution} \end{fig2} \subsection{In-place operations} \label{sec:inplace} See \fref{fg:inplace}. A few of the in-place operations are available from the command-line. Most are not. \begin{fig2} \begin{verbatim} $ vips list inplace im_circle - plot circle on image im_flood_blob_copy - flood while pixel == start pixel im_insertplace - draw image sub inside image main at position (x,y) im_line - draw line between points (x1,y1) and (x2,y2) im_lineset - draw line between points (x1,y1) and (x2,y2) \end{verbatim} \caption{In-place operations} \label{fg:inplace} \end{fig2} \subsection{Frequency filtering} See \fref{fg:freq}. The basic Fourier functions are \verb+im_fwfft()+ and \verb+im_invfft()+, which calculate the fast-fourier transform and inverse transform of an image. Also \verb+im_invfftr()+, which just returns the real part of the inverse transform. The Fourier image has its origin at pel (0,0) --- for viewing, use \verb+im_rotquad()+ to move the origin to the centre of the image. Once an image is in the frequency domain, it can be filtered by multiplying it with a mask image. The VIPS mask generator is \verb+im_create_fmask()+ see the manual page for details of the arguments, but it will create low pass, high pass, ring pass and band pass filters, which may each be ideal, Gaussian or Butterworth. There is also a fractal mask option. The other functions in the package build on these base facilities. \verb+im_freqflt()+ transforms an input image to Fourier space, multiplies it by a mask image, and transforms it back again. \verb+im_flt_image_freq()+ will create a mask image of the correct size for you, and call \verb+im_freqflt()+. \verb+im_disp_ps()+ will call the right combinations of functions to make a displayable power spectrum for an image. \begin{fig2} \begin{verbatim} $ vips list freq_filt im_create_fmask - create frequency domain filter mask im_disp_ps - make displayable power spectrum im_flt_image_freq - frequency domain filter image im_fractsurf - generate a fractal surface of given dimension im_freqflt - frequency-domain filter of in with mask im_fwfft - forward fast-fourier transform im_rotquad - rotate image quadrants to move origin to centre im_invfft - inverse fast-fourier transform im_invfftr - real part of inverse fast-fourier transform \end{verbatim} \caption{Fourier functions} \label{fg:freq} \end{fig2} \subsection{Histograms and LUTs} See \fref{fg:hist}. VIPS represents histograms and look-up tables in the same way --- as images. They should have either \verb+Xsize+ or \verb+Ysize+ set to 1, and the other dimension set to the number of elements in the table. The table can be of any size, have any band format, and have any number of bands. Use \verb+im_histgr()+ to find the histogram of an image. Use \verb+im_histnD()+ to find the n-dimensional histogram of an n-band image. Perform operations on histograms with \verb+im_histcum()+, \verb+im_histnorm()+, \verb+im_histspec()+, \verb+im_invertlut()+. Visualise histograms with \verb+im_histplot()+. Use a histogram (or LUT) to transform an image with \verb+im_maplut()+. Build a histogram from scratch with \verb+im_identity()+ or \verb+im_identity_ushort()+. Use \verb+im_lhist*()+ for local histogram equalisation, and \verb+im_stdif*()+ for statisticaol differencing. The \verb+im_tone_*()+ functions are for operations on the L channel of a LAB image. Other functions are useful combinations of these basic operations. \begin{fig2} \begin{verbatim} $ vips list histograms_lut im_gammacorrect - gamma-correct image im_heq - histogram-equalise image im_hist - find and graph histogram of image im_histcum - turn histogram to cumulative histogram im_histeq - form histogram equalistion LUT im_histgr - find histogram of image im_histnD - find 1D, 2D or 3D histogram of image im_histnorm - form normalised histogram im_histplot - plot graph of histogram im_histspec - find histogram which will make pdf of in match ref im_hsp - match stats of in to stats of ref im_identity - generate identity histogram im_identity_ushort - generate ushort identity histogram im_ismonotonic - test LUT for monotonicity im_lhisteq - local histogram equalisation im_lhisteq_raw - local histogram equalisation, no border im_invertlut - generate correction table from set of measures im_buildlut - generate LUT table from set of x/y positions im_maplut - map image through LUT im_project - find horizontal and vertical projections of an image im_stdif - statistical differencing im_stdif_raw - statistical differencing, no border im_tone_analyse - analyse in and create LUT for tone adjustment im_tone_build - create LUT for tone adjustment of LabS images im_tone_build_range - create LUT for tone adjustment im_tone_map - map L channel of LabS or LabQ image through LUT \end{verbatim} \caption{Histogram/LUT functions} \label{fg:hist} \end{fig2} \subsection{Morphology} See \fref{fg:morph}. The morphological functions are used on one-band \verb+IM_BANDFMT_UCHAR+ binary images (images containing only zero and not-zero). They search images for particular patterns of pixels (specified with the mask argument), either adding or removing pixels when they find a match. They are useful for cleaning up images --- for example, you might threshold an image, and then use one of the morphological functions to remove all single isolated pixels from the result. If you combine the morphological operators with the mask rotators (\verb+im_rotate_imask45()+, for example) and apply them repeatedly, you can achieve very complicated effects: you can thin, prune, fill, open edges, close gaps, and many others. For example, see `Fundamentals of Digital Image Processing' by A. Jain, pp 384-388, Prentice-Hall, 1989 for more ideas. Beware that VIPS reverses the usual image processing convention, by assuming white objects on a black background. The mask you give to the morphological functions should contain only the values 0 (for background), 128 (for don't care) and 255 (for object). The mask must have odd length sides --- the origin of the mask is taken to be the centre value. For example, the mask: \begin{verbatim} 3 3 128 255 128 255 0 255 128 255 128 \end{verbatim} \noindent applied to an image with \verb+im_erode()+, will find all black pixels 4-way connected with white pixels. Essentially, \verb+im_dilate()+ sets pixels in the output if any part of the mask matches, whereas \verb+im_erode()+ sets pixels only if all of the mask matches. The \verb+_raw()+ version of the functions do not add a black border to the output. \verb+im_cntlines()+ and \verb+im_profile+ are occasionally useful for analysing results. See the boolean operations \verb+im_and()+, \verb+im_or()+ and \verb+im_eor()+ for analogues of the usual set difference and set union operations. \begin{fig2} \begin{verbatim} $ vips list morphology im_cntlines - count horizontal or vertical lines im_dilate - dilate image with mask, adding a black border im_dilate_raw - dilate image with mask im_erode - erode image with mask, adding a black border im_erode_raw - erode image with mask im_profile - find first horizontal/vertical edge \end{verbatim} \caption{Morphological functions} \label{fg:morph} \end{fig2} \subsection{Mosaicing} See \fref{fg:mosaicing}. These functions are useful for joining many small images together to make one large image. They can cope with unstable contrast, and arbitary sub-image layout, but will not do any geometric correction. The mosaicing functions can be grouped into layers: The lowest level functions are \verb+im_correl()+. and \verb+im_affine()+. \verb+im_correl()+ searches a large image for a small sub-image, returning the position of the best sub-image match. \verb+im_affine()+ performs a general affine transform on an image: that is, any transform in which parallel lines remain parallel. Next, \verb+im_lrmerge()+ and \verb+im_tbmerge()+ blend two images together left-right or up-down. Next up are \verb+im_lrmosaic()+ and \verb+im_tbmosaic()+. These use the two low-level merge operations to join two images given just an approximate overlap as a start point. Optional extra parameters let you do 'balancing' too: if your images have come from a source where there is no precise control over the exposure (for example, images from a tube camera, or a set of images scanned from photographic sources), \verb+im_lrmosaic()+ and \verb+im_tbmosaic()+ will adjust the contrast of the left image to match the right, the right to the left, or both to some middle value. The functions \verb+im_lrmosaic1()+ and \verb+im_tbmosaic1()+ are first-order analogues of the basic mosaic functions: they take two tie-points and use them to rotate and scale the right-hand or bottom image before starting to join. Finally, \verb+im_global_balance()+ can be used to re-balance a mosaic which has been assembled with these functions. It will generally do a better job than the low-level balancer built into \verb+im_lrmosaic()+ and \verb+im_tbmosaic()+. See the man page. \verb+im_remosaic()+ uses the same techniques, but will reassemble the image from a different set of source images. \begin{fig2} \begin{verbatim} $ vips list mosaicing im_align_bands - align the bands of an image im_correl - search area around sec for match for area around ref im__find_lroverlap - search for left-right overlap of ref and sec im__find_tboverlap - search for top-bottom overlap of ref and sec im_global_balance - automatically rebuild mosaic with balancing im_global_balancef - automatically rebuild mosaic with balancing, float output im_lrmerge - left-right merge of in1 and in2 im_lrmerge1 - first-order left-right merge of ref and sec im_lrmosaic - left-right mosaic of ref and sec im_lrmosaic1 - first-order left-right mosaic of ref and sec im_match_linear - resample ref so that tie-points match im_match_linear_search - search sec, then resample so that tie-points match im_maxpos_subpel - subpixel position of maximum of (phase correlation) image im_remosaic - automatically rebuild mosaic with new files im_tbmerge - top-bottom merge of in1 and in2 im_tbmerge1 - first-order top-bottom merge of in1 and in2 im_tbmosaic - top-bottom mosaic of in1 and in2 im_tbmosaic1 - first-order top-bottom mosaic of ref and sec \end{verbatim} caption{Mosaic functions} \label{fg:mosaicing} \end{fig2} \subsection{CImg functions} See \fref{fg:cimg}. These operations wrap the anisotropic blur function from the CImg library. They are useful for removing noise from images. \begin{fig2} \begin{verbatim} $ vips list cimg im_greyc - noise-removing filter im_greyc_mask - noise-removing filter, with a mask \end{verbatim} \caption{CImg functions} \label{fg:cimg} \end{fig2} \subsection{Other} See \fref{fg:other}. These functions generate various test images. You can combine them with the arithmetic and rotate functions to build more complicated images. The \verb+im_benchmark*()+ operations are for testing the VIPS SMP system. \begin{fig2} \begin{verbatim} $ vips list other im_benchmark - do something complicated for testing im_benchmark2 - do something complicated for testing im_benchmarkn - do something complicated for testing im_eye - generate IM_BANDFMT_UCHAR [0,255] frequency/amplitude image im_grey - generate IM_BANDFMT_UCHAR [0,255] grey scale image im_feye - generate IM_BANDFMT_FLOAT [-1,1] frequency/amplitude image im_fgrey - generate IM_BANDFMT_FLOAT [0,1] grey scale image im_fzone - generate IM_BANDFMT_FLOAT [-1,1] zone plate image im_make_xy - generate image with pixel value equal to coordinate im_zone - generate IM_BANDFMT_UCHAR [0,255] zone plate image \end{verbatim} \caption{Other functions} \label{fg:other} \end{fig2} \subsection{IO functions} See \fref{fg:io}. These functions are related to the image IO system. \begin{fig2} \begin{verbatim} $ vips list iofuncs im_binfile - open a headerless binary file im_cache - cache results of an operation im_guess_prefix - guess install area im_guess_libdir - guess library area im_header_get_type - return field type im_header_int - extract int fields from header im_header_double - extract double fields from header im_header_string - extract string fields from header im_version - VIPS version number im_version_string - VIPS version string \end{verbatim} \caption{IO functions} \label{fg:io} \end{fig2} \subsection{Format functions} See \fref{fg:format}. These functions convert to and from various image formats. See \pref{sec:format} for a nice API over these. VIPS can read more than these formats, see the man page for \verb+VipsFormat+. \begin{fig2} \begin{verbatim} $ vips list format im_csv2vips - read a file in csv format im_jpeg2vips - convert from jpeg im_magick2vips - load file with libMagick im_png2vips - convert PNG file to VIPS image im_exr2vips - convert an OpenEXR file to VIPS im_ppm2vips - read a file in pbm/pgm/ppm format im_analyze2vips - read a file in analyze format im_tiff2vips - convert TIFF file to VIPS image im_vips2csv - write an image in csv format im_vips2jpeg - convert to jpeg im_vips2mimejpeg - convert to jpeg as mime type on stdout im_vips2png - convert VIPS image to PNG file im_vips2ppm - write a file in pbm/pgm/ppm format im_vips2tiff - convert VIPS image to TIFF file \end{verbatim} \caption{Format functions} \label{fg:format} \end{fig2} \subsection{Resample functions} See \fref{fg:resample}. These functions resample images with various interpolators. \begin{fig2} \begin{verbatim} $ vips list resample im_affine - affine transform im_affinei - affine transform im_affinei_all - affine transform of whole image im_similarity_area - output area xywh of similarity transformation im_similarity - similarity transformation \end{verbatim} \caption{Resample functions} \label{fg:resample} \end{fig2} vips-7.38.5/doc/src/Makefile0000644000175000017500000000205112303140253012503 00000000000000# PDF = vipsmanual.pdf SRC = \ applintro.tex \ cppintro.tex \ fileformat.tex \ func.tex \ format.tex \ iosys.tex \ ipio.tex \ mydefs.tex \ operintro.tex \ packages.tex \ pio.tex \ refintro.tex \ vdisplay.tex \ verror.tex \ vimage.tex \ vipsmanual.tex \ vmask.tex \ wio.tex destdir = ../ all: $(PDF) html install: all $(PDF) html -rm -rf ${destdir}/pdf/*.pdf -rm -rf ${destdir}/html/vips* -rm -rf ${destdir}/html/figs -mkdir -p ${destdir}/pdf -mkdir -p ${destdir}/html -cp $(PDF) ${destdir}/pdf -cp -r vipsmanual/* ${destdir}/html $(PDF): $(SRC) pdflatex vipsmanual.tex pdflatex vipsmanual.tex .PHONY: html html: -rm -rf vipsmanual mkdir vipsmanual htlatex vipsmanual.tex html.cfg,3 "" -dvipsmanual/ cp -r figs vipsmanual -rm vipsmanual/figs/*.svg -rm vipsmanual/*.png .PHONY: clean clean: -rm -f *.4ct -rm -f *.4tc -rm -f *.log -rm -f *.xref -rm -f *.tmp -rm -f *.html -rm -f *.css -rm -f *.lg -rm -f *.idv -rm -f *.aux -rm -f *.dvi -rm -f *.lof -rm -f *.lot -rm -f *.toc -rm -f *.pdf -rm -rf vipsmanual vips-7.38.5/doc/html/0000755000175000017500000000000012303145652011312 500000000000000vips-7.38.5/doc/html/vipsmanualse11.html0000644000175000017500000002643212303145652015000 00000000000000 Image formats

2.5 Image formats

VIPS has a simple system for adding support for new image file formats. You can ask VIPS to find a format to load a file with or to select a image file writer based on a filename. Convenience functions copy a file to an IMAGE, or an IMAGE to a file. New formats may be added to VIPS by simply defining a new subclass of VipsFormat.

This is a parallel API to im_open(), see §2.2.4. The format system is useful for images which are large or slow to open, because you pass a descriptor to write to and so control how and where the decompressed image is held. im_open() is useful for images in formats which can be directly read from disc, since you will avoid a copy operation and can directly control the disc file. The inplace operations (see §4.2.8), for example, will only work directly on disc images if you use im_open().

2.5.1 How a format is represented

See the man page for VipsFormat for full details, but briefly, an image format consists of the following items:

  • A name, a name that can be shows to the user, and a list of possible filename suffixes (.tif, for example)
  • A function which tests for a file being in that format, a function which loads just the header of the file (that is, it reads properties like width and height and does not read any pixel data) and a function which loads the pixel data
  • A function which will write an IMAGE to a file in the format
  • And finally a function which examines a file in the format and returns flags indicating how VIPS should deal with the file. The only flag in the current version is one indicating that the file can be opened lazily

2.5.2 The format class

The interface to the format system is defined by the abstract base class VipsFormat. Formats subclass this and implement some or all of the methods. Any of the functions may be left NULL and VIPS will try to make do with what you do supply. Of course a format with all functions as NULL will not be very useful.

As an example, Figure 2.9 shows how to register a new format in a plugin.


static const char ⋆my_suffs[] = { ".me", NULL };  
 
static int  
is_myformat( const char ⋆filename )  
{  
  unsigned char buf[2];  
 
  if( im__get_bytes( filename, buf, 2 ) &&  
    (int) buf[0] == 0xff &&  
    (int) buf[1] == 0xd8 )  
    return( 1 );  
 
  return( 0 );  
}  
 
// This format adds no new members.  
typedef VipsFormat VipsFormatMyformat;  
typedef VipsFormatClass VipsFormatMyformatClass;  
 
static void  
vips_format_myformat_class_init( VipsFormatMyformatClass ⋆class )  
{  
  VipsObjectClass ⋆object_class = (VipsObjectClass ⋆) class;  
  VipsFormatClass ⋆format_class = (VipsFormatClass ⋆) class;  
 
  object_class->nickname = "myformat";  
  object_class->description = _( "My format" );  
 
  format_class->is_a = is_myformat;  
  format_class->header = my_header;  
  format_class->load = my_read;  
  format_class->save = my_write;  
  format_class->get_flags = my_get_flags;  
  format_class->priority = 100;  
  format_class->suffs = my_suffs;  
}  
 
static void  
vips_format_myformat_init( VipsFormatMyformat ⋆object )  
{  
}  
 
G_DEFINE_TYPE( VipsFormatMyformat, vips_format_myformat, VIPS_TYPE_FORMAT );  
 
char ⋆  
g_module_check_init( GModule ⋆self )  
{  
  // register the type  
  vips_format_myformat_get_type();  
}


Figure 2.9: Registering a format in a plugin

2.5.3 Finding a format

You can loop over the subclasses of VipsFormat in order of priority with vips_format_map(). Like all the map functions in VIPS, this take a function and applies it to every element in the table until the function returns non-zero or until the table ends.

You find an VipsFormatClass to use to open a file with vips_format_for_file(). This finds the first format whose is_a() function returns true or whose suffix list matches the suffix of the filename, setting an error message and returning NULL if no format is found.

You find a format to write a file with vips_format_for_name(). This returns the first format with a save function whose suffix list matches the suffix of the supplied filename.

2.5.4 Convenience functions

A pair of convenience functions, vips_format_write() and vips_format_read(), will copy an image to and from disc using the appropriate format.

vips-7.38.5/doc/html/vipsmanualse18.html0000644000175000017500000034213312303145652015006 00000000000000 VIPS packages

4.2 VIPS packages

4.2.1 Arithmetic

See Figure 4.1.

Arithmetic functions work on images as if each band element were a separate number. All operations are point-to-point — each output element depends exactly upon the corresponding input element. All (except in a few cases noted in the manual pages) will work with images of any type (or any mixture of types), of any size and of any number of bands.

Arithmetic operations try to preserve precision by increasing the number of bits in the output image when necessary. Generally, this follows the ANSI C conventions for type promotion — so multiplying two IM_BANDFMT_UCHAR images together, for example, produces a IM_BANDFMT_USHORT image, and taking the im_costra() of a IM_BANDFMT_USHORT image produces a IM_BANDFMT_FLOAT image. The details of the type conversions are in the manual pages.


$ vips list arithmetic  
im_abs               - absolute value  
im_acostra           - acos of image (result in degrees)  
im_add               - add two images  
im_asintra           - asin of image (result in degrees)  
im_atantra           - atan of image (result in degrees)  
im_avg               - average value of image  
im_point_bilinear    - interpolate value at single point, linearly  
im_bandmean          - average image bands  
im_ceil              - round to smallest integal value not less than  
im_cmulnorm          - multiply two complex images, normalising output  
im_costra            - cos of image (angles in degrees)  
im_cross_phase       - phase of cross power spectrum of two complex images  
im_deviate           - standard deviation of image  
im_divide            - divide two images  
im_exp10tra          - 10^pel of image  
im_expntra           - x^pel of image  
im_expntra_vec       - [x,y,z]^pel of image  
im_exptra            - e^pel of image  
im_fav4              - average of 4 images  
im_floor             - round to largest integal value not greater than  
im_gadd              - calculate a⋆in1 + b⋆in2 + c = outfile  
im_invert            - photographic negative  
im_lintra            - calculate a⋆in + b = outfile  
im_linreg            - pixelwise linear regression  
im_lintra_vec        - calculate a⋆in + b -> out, a and b vectors  
im_litecor           - calculate max(white)⋆factor⋆(in/white), if clip == 1  
im_log10tra          - log10 of image  
im_logtra            - ln of image  
im_max               - maximum value of image  
im_maxpos            - position of maximum value of image  
im_maxpos_avg        - position of maximum value of image, averaging in case of draw  
im_maxpos_vec        - position and value of n maxima of image  
im_measure           - measure averages of a grid of patches  
im_min               - minimum value of image  
im_minpos            - position of minimum value of image  
im_minpos_vec        - position and value of n minima of image  
im_multiply          - multiply two images  
im_powtra            - pel^x ofbuildimage  
im_powtra_vec        - pel^[x,y,z] of image  
im_remainder         - remainder after integer division  
im_remainderconst    - remainder after integer division by a constant  
im_remainderconst_vec - remainder after integer division by a vector of constants  
im_rint              - round to nearest integal value  
im_sign              - unit vector in direction of value  
im_sintra            - sin of image (angles in degrees) 
im_stats             - many image statistics in one pass  
im_subtract          - subtract two images  
im_tantra            - tan of image (angles in degrees)


Figure 4.1: Arithmetic functions

4.2.2 Relational

See Figure 4.2.

Relational functions compare images to other images or to constants. They accept any image or pair of images (provided they are the same size and have the same number of bands — their types may differ) and produce a IM_BANDFMT_UCHAR image with the same number of bands as the input image, with 255 in every band element for which the condition is true and 0 elsewhere.

They may be combined with the boolean functions to form complex relational conditions. Use im_max() (or im_min()) to find out if a condition is true (or false) for a whole image.


$ vips list relational  
im_blend             - use cond image to blend between images in1 and in2  
im_equal             - two images equal in value  
im_equal_vec         - image equals doublevec  
im_equalconst        - image equals const  
im_ifthenelse        - use cond image to choose pels from image in1 or in2  
im_less              - in1 less than in2 in value  
im_less_vec          - in less than doublevec  
im_lessconst         - in less than const  
im_lesseq            - in1 less than or equal to in2 in value  
im_lesseq_vec        - in less than or equal to doublevec  
im_lesseqconst       - in less than or equal to const  
im_more              - in1 more than in2 in value  
im_more_vec          - in more than doublevec  
im_moreconst         - in more than const  
im_moreeq            - in1 more than or equal to in2 in value  
im_moreeq_vec        - in more than or equal to doublevec  
im_moreeqconst       - in more than or equal to const  
im_notequal          - two images not equal in value  
im_notequal_vec      - image does not equal doublevec  
im_notequalconst     - image does not equal const


Figure 4.2: Relational functions

4.2.3 Boolean

See Figure 4.3.

The boolean functions perform boolean arithmetic on pairs of IM_BANDFMT_UCHAR images. They are useful for combining the results of the relational and morphological functions. You can use im_eorconst() with 255 as im_not().


$ vips list boolean  
im_andimage          - bitwise and of two images  
im_andimageconst     - bitwise and of an image with a constant  
im_andimage_vec      - bitwise and of an image with a vector constant  
im_orimage           - bitwise or of two images  
im_orimageconst      - bitwise or of an image with a constant  
im_orimage_vec       - bitwise or of an image with a vector constant  
im_eorimage          - bitwise eor of two images  
im_eorimageconst     - bitwise eor of an image with a constant  
im_eorimage_vec      - bitwise eor of an image with a vector constant  
im_shiftleft         - shift integer image n bits to left  
im_shiftright        - shift integer image n bits to right


Figure 4.3: Boolean functions

4.2.4 Colour

See Figure 4.5.

The colour functions can be divided into two main types. First, functions to transform images between the different colour spaces supported by VIPS: RGB (also referred to as disp), sRGB, XYZ, Yxy, Lab, LabQ, LabS, LCh and UCS), and second, functions for calculating colour difference metrics. Figure 4.4 shows how the VIPS colour spaces interconvert.


PIC


Figure 4.4: VIPS colour space conversion

The colour spaces supported by VIPS are:

LabQ
This is the principal VIPS colorimetric storage format. See the man page for im_LabQ2Lab() for an explanation. You cannot perform calculations on LabQ images. They are for storage only. Also refered to as LABPACK.
LabS
This format represents coordinates in CIE Lab space as a three- band IM_BANDFMT_SHORT image, scaled to fit the full range of bits. It is the best format for computation, being relatively compact, quick, and accurate. Colour values expressed in this way are hard to visualise.
Lab
Lab colourspace represents CIE Lab colour values with a three-band IM_BANDFMT_FLOAT image. This is the simplest format for general work: adding the constant 50 to the L channel, for example, has the expected result.
XYZ
CIE XYZ colour space represented as a three-band IM_BANDFMT_FLOAT image.
XYZ
CIE Yxy colour space represented as a three-band IM_BANDFMT_FLOAT image.
RGB
(also refered to as disp) This format is similar to the RGB colour systems used in other packages. If you want to export your image to a PC, for example, convert your colorimetric image to RGB, then turn it to TIFF with im_vips2tiff(). You need to supply a structure which characterises your display. See the manual page for im_col_XYZ2rgb() for hints on these guys.

VIPS also supports sRGB. This is a version of RGB with a carefully defined and standard conversion from XYZ. See:

http://www.color.org/

LCh
Like Lab, but rectangular ab coordinates are replaced with polar Ch (Chroma and hue) coordinates. Hue angles are expressed in degrees.
UCS
A colour space based on the CMC(1:1) colour difference measurement. This is a highly uniform colour space, much better than CIE Lab for expressing small differences. Conversions to and from UCS are extremely slow.

All VIPS colourspaces assume a D65 illuminant.

The colour-difference functions calculate either ΔE CIE Lab (1976 or 2000) or ΔE CMC(1:1) on two images in Lab, XYZ or disp colour space.


$ vips list colour  
im_LCh2Lab           - convert LCh to Lab  
im_LCh2UCS           - convert LCh to UCS  
im_Lab2LCh           - convert Lab to LCh  
im_Lab2LabQ          - convert Lab to LabQ  
im_Lab2LabS          - convert Lab to LabS  
im_Lab2UCS           - convert Lab to UCS  
im_Lab2XYZ           - convert D65 Lab to XYZ  
im_Lab2XYZ_temp      - convert Lab to XYZ, with a specified colour temperature  
im_Lab2disp          - convert Lab to displayable  
im_LabQ2LabS         - convert LabQ to LabS  
im_LabQ2Lab          - convert LabQ to Lab  
im_LabQ2XYZ          - convert LabQ to XYZ  
im_LabQ2disp         - convert LabQ to displayable  
im_LabS2LabQ         - convert LabS to LabQ  
im_LabS2Lab          - convert LabS to Lab  
im_UCS2LCh           - convert UCS to LCh  
im_UCS2Lab           - convert UCS to Lab  
im_UCS2XYZ           - convert UCS to XYZ  
im_XYZ2Lab           - convert D65 XYZ to Lab  
im_XYZ2Lab_temp      - convert XYZ to Lab, with a specified colour temperature  
im_XYZ2UCS           - convert XYZ to UCS  
im_XYZ2Yxy           - convert XYZ to Yxy  
im_XYZ2disp          - convert XYZ to displayble  
im_XYZ2sRGB          - convert XYZ to sRGB  
im_Yxy2XYZ           - convert Yxy to XYZ  
im_dE00_fromLab      - calculate delta-E CIE2000 for two Lab images  
im_dECMC_fromLab     - calculate delta-E CMC(1:1) for two Lab images  
im_dECMC_fromdisp    - calculate delta-E CMC(1:1) for two displayable images  
im_dE_fromLab        - calculate delta-E for two Lab images  
im_dE_fromXYZ        - calculate delta-E for two XYZ images  
im_dE_fromdisp       - calculate delta-E for two displayable images  
im_disp2Lab          - convert displayable to Lab  
im_disp2XYZ          - convert displayable to XYZ  
im_float2rad         - convert float to Radiance packed  
im_icc_ac2rc         - convert LAB from AC to RC using an ICC profile  
im_icc_export        - convert a float LAB to an 8-bit device image with an ICC profile  
im_icc_export_depth  - convert a float LAB to device space with an ICC profile  
im_icc_import        - convert a device image to float LAB with an ICC profile  
im_icc_import_embedded - convert a device image to float LAB using the embedded profile  
im_icc_present       - test for presence of ICC library  
im_icc_transform     - convert between two device images with a pair of ICC profiles  
im_lab_morph         - morph colourspace of a LAB image  
im_rad2float         - convert Radiance packed to float  
im_sRGB2XYZ          - convert sRGB to XYZ


Figure 4.5: Colour functions

4.2.5 Conversion

See Figure 4.6.

These functions may be split into three broad groups: functions which convert between the VIPS numeric formats (im_clip2fmt(), for example, converts an image of any type to the specified IM_BANDFMT), functions supporting complex arithmetic (im_c2amph(), for example, converts a complex image from rectangular to polar co ordinates) and functions which perform some simple geometric conversion (im_extract() forms a sub-image).

gbandjoin and the C function im_gbandjoin() will do a bandwise join of many images at the same time. See the manual pages.


$ vips list conversion  
im_bandjoin          - bandwise join of two images  
im_bernd             - extract from pyramid as jpeg  
im_black             - generate black image  
im_c2amph            - convert real and imaginary to phase and amplitude  
im_c2imag            - extract imaginary part of complex image  
im_c2ps              - find power spectrum of complex image  
im_c2real            - extract real part of complex image  
im_c2rect            - convert phase and amplitude to real and imaginary  
im_clip2c            - convert to signed 8-bit integer  
im_clip2cm           - convert to complex  
im_clip2d            - convert to double-precision float  
im_clip2dcm          - convert to double complex  
im_clip2f            - convert to single-precision float  
im_clip2fmt          - convert image format to ofmt  
im_clip2i            - convert to signed 32-bit integer  
im_clip2s            - convert to signed 16-bit integer  
im_clip2ui           - convert to unsigned 32-bit integer  
im_clip2us           - convert to unsigned 16-bit integer  
im_clip              - convert to unsigned 8-bit integer  
im_copy              - copy image  
im_copy_morph        - copy image, setting pixel layout  
im_copy_swap         - copy image, swapping byte order  
im_copy_set          - copy image, setting informational fields  
im_copy_set_meta     - copy image, setting a meta field  
im_extract_area      - extract area  
im_extract_areabands - extract area and bands  
im_extract_band      - extract band  
im_extract_bands     - extract several bands  
im_extract           - extract area/band  
im_falsecolour       - turn luminance changes into chrominance changes  
im_fliphor           - flip image left-right  
im_flipver           - flip image top-bottom  
im_gbandjoin         - bandwise join of many images  
im_grid              - chop a tall thin image into a grid of images  
im_insert            - insert sub-image into main image at position  
im_insert_noexpand   - insert sub-image into main image at position, no expansion  
im_lrjoin            - join two images left-right  
im_mask2vips         - convert DOUBLEMASK to VIPS image  
im_msb               - convert to uchar by discarding bits  
im_msb_band          - convert to single band uchar by discarding bits  
im_print             - print string to stdout  
im_recomb            - linear recombination with mask  
im_replicate         - replicate an image horizontally and vertically  
im_ri2c              - join two non-complex images to form complex


Figure 4.6: Conversion functions


im_rot180            - rotate image 180 degrees  
im_rot270            - rotate image 270 degrees clockwise  
im_rot90             - rotate image 90 degrees clockwise  
im_scale             - scale image linearly to fit range 0-255  
im_scaleps           - logarithmic scale of image to fit range 0-255  
im_rightshift_size   - decrease size by a power-of-two factor  
im_slice             - slice an image using two thresholds  
im_subsample         - subsample image by integer factors  
im_system            - run command on image  
im_tbjoin            - join two images top-bottom  
im_text              - generate text image  
im_thresh            - slice an image at a threshold  
im_vips2mask         - convert VIPS image to DOUBLEMASK  
im_wrap              - shift image origin, wrapping at sides  
im_zoom              - simple zoom of an image by integer factors


Figure 4.7: Conversion functions (cont.)

4.2.6 Matricies

See Figure 4.8.

VIPS uses matricies for morphological operations, for convolutions, and for some colour-space conversions. There are two types of matrix: integer (INTMASK) and double precision floating point (DOUBLEMASK).

For convenience, both types are stored in files as ASCII. The first line of the file should start with the matrix dimensions, width first, then on the same line an optional scale and offset. The two size fields should be integers; the scale and offset may be floats. Subsequent lines should contain the matrix elements, one row per line. The scale and offset are the conventional ones used to represent non-integer values in convolution masks — in other words:

       value
result =-scale + of fset

If the scale and offset are missing, they default to 1.0 and 0.0. See the sections on convolution for more on the use of these fields. So as an example, a 4 by 4 identity matrix would be stored as:

4 4  
1 0 0 0  
0 1 0 0  
0 0 1 0  
0 0 0 1

And a 3 by 3 mask for block averaging with convolution might be stored as:

3 3 9 0  
1 1 1  
1 1 1  
1 1 1

(in other words, sum all the pels in every 3 by 3 area, and divide by 9).

This matrix contains only integer elements and so could be used as an argument to functions expecting both INTMASK and DOUBLEMASK matricies. However, masks containing floating-point values (such as the output of im_matinv()) can only be used as arguments to functions expecting DOUBLEMASKs.

A set of functions for mask input and output are also available for C-programmers — see the manual pages for im_read_dmask(). For other matrix functions, see also the convolution sections and the arithmetic sections.


$ vips list matrix  
im_matcat          - append matrix in2 to the end of matrix in1  
im_matinv          - invert matrix  
im_matmul          - multiply matrix in1 by matrix in2  
im_mattrn          - transpose matrix


Figure 4.8: Matrix functions

4.2.7 Convolution

See Figure 4.9.

The functions available in the convolution package can be split into five main groups.

First, are the convolution functions. The most useful function is im_conv() which will convolve any non-complex type with an INTMASK matrix. The output image will have the same size, type, and number of bands as the input image. Of the other im_conv() functions, functions whose name ends in _raw do not add a black border around the output image, functions ending in f use a DOUBLEMASK matrix and write float (or double) output, and functions containing sep are for seperable convolutions. im_compass(), im_lindetect() and im_gradient() convolve with rotating masks. im_embed() is used by the convolution functions to add the border to the output.

Next, are the build functions. im_gauss_⋆mask() and its ilk generate gaussian masks, im_log_⋆mask() generate logs of Laplacians. im_addgnoise() and im_gaussnoise() create or add gaussian noise to an image.

Two functions do correlation: im_fastcor() does a quick and dirty correlation, im_spcor() calculates true spatial correlation, and is rather slow.

Some functions are provided for analysing images: im_zerox() counts zero-crossing points in an image, im_mpercent() finds a threshold that will isolate a percentage of points in an image.

Finally, im_resize_linear() and im_shrink() do as you would expect.


$ vips list convolution  
im_addgnoise         - add gaussian noise with mean 0 and std. dev. sigma  
im_compass           - convolve with 8-way rotating integer mask  
im_contrast_surface  - find high-contrast points in an image  
im_contrast_surface_raw - find high-contrast points in an image  
im_conv              - convolve  
im_conv_raw          - convolve, no border  
im_convf             - convolve, with DOUBLEMASK  
im_convf_raw         - convolve, with DOUBLEMASK, no border  
im_convsep           - seperable convolution  
im_convsep_raw       - seperable convolution, no border  
im_convsepf          - seperable convolution, with DOUBLEMASK  
im_convsepf_raw      - seperable convolution, with DOUBLEMASK, no border  
im_convsub           - convolve uchar to uchar, sub-sampling by xskip, yskip  
im_dmask_xsize       - horizontal size of a doublemask  
im_dmask_ysize       - vertical size of a doublemask  
im_embed             - embed in within a set of borders  
im_fastcor           - fast correlate in2 within in1  
im_fastcor_raw       - fast correlate in2 within in1, no border  
im_gauss_dmask       - generate gaussian DOUBLEMASK  
im_gauss_imask       - generate gaussian INTMASK  
im_gauss_imask_sep   - generate separable gaussian INTMASK  
im_gaussnoise        - generate image of gaussian noise with specified statistics  
im_grad_x            - horizontal difference image  
im_grad_y            - vertical difference image  
im_gradcor           - non-normalised correlation of gradient of in2 within in1  
im_gradcor_raw       - non-normalised correlation of gradient of in2 within in1, no padding  
im_gradient          - convolve with 2-way rotating mask  
im_imask_xsize       - horizontal size of an intmask  
im_imask_ysize       - vertical size of an intmask  
im_rank_image        - point-wise pixel rank  
im_lindetect         - convolve with 4-way rotating mask  
im_log_dmask         - generate laplacian of gaussian DOUBLEMASK  
im_log_imask         - generate laplacian of gaussian INTMASK  
im_maxvalue          - point-wise maximum value  
im_mpercent          - find threshold above which there are percent values  
im_phasecor_fft      - non-normalised correlation of gradient of in2 within in1  
im_rank              - rank filter nth element of xsize/ysize window  
im_rank_raw          - rank filter nth element of xsize/ysize window, no border  
im_read_dmask        - read matrix of double from file  
im_resize_linear     - resize to X by Y pixels with linear interpolation  
im_rotate_dmask45    - rotate DOUBLEMASK clockwise by 45 degrees  
im_rotate_dmask90    - rotate DOUBLEMASK clockwise by 90 degrees  
im_rotate_imask45    - rotate INTMASK clockwise by 45 degrees  
im_rotate_imask90    - rotate INTMASK clockwise by 90 degrees  
im_sharpen           - sharpen high frequencies of L channel of LabQ 
im_shrink            - shrink image by xfac, yfac times  
im_spcor             - normalised correlation of in2 within in1  
im_spcor_raw         - normalised correlation of in2 within in1, no black padding  
im_stretch3          - stretch 3%, sub-pixel displace by xdisp/ydisp  
im_zerox             - find +ve or -ve zero crossings in image


Figure 4.9: Convolution functions

4.2.8 In-place operations

See Figure 4.10.

A few of the in-place operations are available from the command-line. Most are not.


$ vips list inplace  
im_circle          - plot circle on image  
im_flood_blob_copy - flood while pixel == start pixel  
im_insertplace     - draw image sub inside image main at position (x,y)  
im_line            - draw line between points (x1,y1) and (x2,y2)  
im_lineset         - draw line between points (x1,y1) and (x2,y2)


Figure 4.10: In-place operations

4.2.9 Frequency filtering

See Figure 4.11.

The basic Fourier functions are im_fwfft() and im_invfft(), which calculate the fast-fourier transform and inverse transform of an image. Also im_invfftr(), which just returns the real part of the inverse transform. The Fourier image has its origin at pel (0,0) — for viewing, use im_rotquad() to move the origin to the centre of the image.

Once an image is in the frequency domain, it can be filtered by multiplying it with a mask image. The VIPS mask generator is im_create_fmask() see the manual page for details of the arguments, but it will create low pass, high pass, ring pass and band pass filters, which may each be ideal, Gaussian or Butterworth. There is also a fractal mask option.

The other functions in the package build on these base facilities. im_freqflt() transforms an input image to Fourier space, multiplies it by a mask image, and transforms it back again. im_flt_image_freq() will create a mask image of the correct size for you, and call im_freqflt(). im_disp_ps() will call the right combinations of functions to make a displayable power spectrum for an image.


$ vips list freq_filt  
im_create_fmask    - create frequency domain filter mask  
im_disp_ps         - make displayable power spectrum  
im_flt_image_freq  - frequency domain filter image  
im_fractsurf       - generate a fractal surface of given dimension  
im_freqflt         - frequency-domain filter of in with mask  
im_fwfft           - forward fast-fourier transform  
im_rotquad         - rotate image quadrants to move origin to centre  
im_invfft          - inverse fast-fourier transform  
im_invfftr         - real part of inverse fast-fourier transform


Figure 4.11: Fourier functions

4.2.10 Histograms and LUTs

See Figure 4.12.

VIPS represents histograms and look-up tables in the same way — as images.

They should have either Xsize or Ysize set to 1, and the other dimension set to the number of elements in the table. The table can be of any size, have any band format, and have any number of bands.

Use im_histgr() to find the histogram of an image. Use im_histnD() to find the n-dimensional histogram of an n-band image. Perform operations on histograms with im_histcum(), im_histnorm(), im_histspec(), im_invertlut(). Visualise histograms with im_histplot(). Use a histogram (or LUT) to transform an image with im_maplut(). Build a histogram from scratch with im_identity() or im_identity_ushort().

Use im_lhist⋆() for local histogram equalisation, and im_stdif⋆() for statisticaol differencing. The im_tone_⋆() functions are for operations on the L channel of a LAB image. Other functions are useful combinations of these basic operations.


$ vips list histograms_lut  
im_gammacorrect      - gamma-correct image  
im_heq               - histogram-equalise image  
im_hist              - find and graph histogram of image  
im_histcum           - turn histogram to cumulative histogram  
im_histeq            - form histogram equalistion LUT  
im_histgr            - find histogram of image  
im_histnD            - find 1D, 2D or 3D histogram of image  
im_histnorm          - form normalised histogram  
im_histplot          - plot graph of histogram  
im_histspec          - find histogram which will make pdf of in match ref  
im_hsp               - match stats of in to stats of ref  
im_identity          - generate identity histogram  
im_identity_ushort   - generate ushort identity histogram  
im_ismonotonic       - test LUT for monotonicity  
im_lhisteq           - local histogram equalisation  
im_lhisteq_raw       - local histogram equalisation, no border  
im_invertlut         - generate correction table from set of measures  
im_buildlut          - generate LUT table from set of x/y positions  
im_maplut            - map image through LUT  
im_project           - find horizontal and vertical projections of an image  
im_stdif             - statistical differencing  
im_stdif_raw         - statistical differencing, no border  
im_tone_analyse      - analyse in and create LUT for tone adjustment  
im_tone_build        - create LUT for tone adjustment of LabS images  
im_tone_build_range  - create LUT for tone adjustment  
im_tone_map          - map L channel of LabS or LabQ image through LUT


Figure 4.12: Histogram/LUT functions

4.2.11 Morphology

See Figure 4.13.

The morphological functions are used on one-band IM_BANDFMT_UCHAR binary images (images containing only zero and not-zero). They search images for particular patterns of pixels (specified with the mask argument), either adding or removing pixels when they find a match. They are useful for cleaning up images — for example, you might threshold an image, and then use one of the morphological functions to remove all single isolated pixels from the result.

If you combine the morphological operators with the mask rotators (im_rotate_imask45(), for example) and apply them repeatedly, you can achieve very complicated effects: you can thin, prune, fill, open edges, close gaps, and many others. For example, see ‘Fundamentals of Digital Image Processing’ by A. Jain, pp 384-388, Prentice-Hall, 1989 for more ideas.

Beware that VIPS reverses the usual image processing convention, by assuming white objects on a black background.

The mask you give to the morphological functions should contain only the values 0 (for background), 128 (for don’t care) and 255 (for object). The mask must have odd length sides — the origin of the mask is taken to be the centre value. For example, the mask:

3 3  
128 255 128  
255 0   255  
128 255 128

applied to an image with im_erode(), will find all black pixels 4-way connected with white pixels. Essentially, im_dilate() sets pixels in the output if any part of the mask matches, whereas im_erode() sets pixels only if all of the mask matches.

The _raw() version of the functions do not add a black border to the output. im_cntlines() and im_profile are occasionally useful for analysing results.

See the boolean operations im_and(), im_or() and im_eor() for analogues of the usual set difference and set union operations.


$ vips list morphology  
im_cntlines        - count horizontal or vertical lines  
im_dilate          - dilate image with mask, adding a black border  
im_dilate_raw      - dilate image with mask  
im_erode           - erode image with mask, adding a black border  
im_erode_raw       - erode image with mask  
im_profile         - find first horizontal/vertical edge


Figure 4.13: Morphological functions

4.2.12 Mosaicing

See Figure 4.2.12.

These functions are useful for joining many small images together to make one large image. They can cope with unstable contrast, and arbitary sub-image layout, but will not do any geometric correction. The mosaicing functions can be grouped into layers:

The lowest level functions are im_correl(). and im_affine(). im_correl() searches a large image for a small sub-image, returning the position of the best sub-image match. im_affine() performs a general affine transform on an image: that is, any transform in which parallel lines remain parallel.

Next, im_lrmerge() and im_tbmerge() blend two images together left-right or up-down.

Next up are im_lrmosaic() and im_tbmosaic(). These use the two low-level merge operations to join two images given just an approximate overlap as a start point. Optional extra parameters let you do ’balancing’ too: if your images have come from a source where there is no precise control over the exposure (for example, images from a tube camera, or a set of images scanned from photographic sources), im_lrmosaic() and im_tbmosaic() will adjust the contrast of the left image to match the right, the right to the left, or both to some middle value.

The functions im_lrmosaic1() and im_tbmosaic1() are first-order analogues of the basic mosaic functions: they take two tie-points and use them to rotate and scale the right-hand or bottom image before starting to join.

Finally, im_global_balance() can be used to re-balance a mosaic which has been assembled with these functions. It will generally do a better job than the low-level balancer built into im_lrmosaic() and im_tbmosaic(). See the man page. im_remosaic() uses the same techniques, but will reassemble the image from a different set of source images.


$ vips list mosaicing  
im_align_bands       - align the bands of an image  
im_correl            - search area around sec for match for area around ref  
im__find_lroverlap   - search for left-right overlap of ref and sec  
im__find_tboverlap   - search for top-bottom overlap of ref and sec  
im_global_balance    - automatically rebuild mosaic with balancing  
im_global_balancef   - automatically rebuild mosaic with balancing, float output  
im_lrmerge           - left-right merge of in1 and in2  
im_lrmerge1          - first-order left-right merge of ref and sec  
im_lrmosaic          - left-right mosaic of ref and sec  
im_lrmosaic1         - first-order left-right mosaic of ref and sec  
im_match_linear      - resample ref so that tie-points match  
im_match_linear_search - search sec, then resample so that tie-points match  
im_maxpos_subpel     - subpixel position of maximum of (phase correlation) image  
im_remosaic          - automatically rebuild mosaic with new files  
im_tbmerge           - top-bottom merge of in1 and in2  
im_tbmerge1          - first-order top-bottom merge of in1 and in2  
im_tbmosaic          - top-bottom mosaic of in1 and in2  
im_tbmosaic1         - first-order top-bottom mosaic of ref and sec

captionMosaic functions


4.2.13 CImg functions

See Figure 4.14.

These operations wrap the anisotropic blur function from the CImg library. They are useful for removing noise from images.


$ vips list cimg  
im_greyc           - noise-removing filter  
im_greyc_mask      - noise-removing filter, with a mask


Figure 4.14: CImg functions

4.2.14 Other

See Figure 4.15.

These functions generate various test images. You can combine them with the arithmetic and rotate functions to build more complicated images.

The im_benchmark⋆() operations are for testing the VIPS SMP system.


$ vips list other  
im_benchmark       - do something complicated for testing  
im_benchmark2      - do something complicated for testing  
im_benchmarkn      - do something complicated for testing  
im_eye             - generate IM_BANDFMT_UCHAR [0,255] frequency/amplitude image  
im_grey            - generate IM_BANDFMT_UCHAR [0,255] grey scale image  
im_feye            - generate IM_BANDFMT_FLOAT [-1,1] frequency/amplitude image  
im_fgrey           - generate IM_BANDFMT_FLOAT [0,1] grey scale image  
im_fzone           - generate IM_BANDFMT_FLOAT [-1,1] zone plate image  
im_make_xy         - generate image with pixel value equal to coordinate  
im_zone            - generate IM_BANDFMT_UCHAR [0,255] zone plate image


Figure 4.15: Other functions

4.2.15 IO functions

See Figure 4.16.

These functions are related to the image IO system.


$ vips list iofuncs  
im_binfile         - open a headerless binary file  
im_cache           - cache results of an operation  
im_guess_prefix    - guess install area  
im_guess_libdir    - guess library area  
im_header_get_type - return field type  
im_header_int      - extract int fields from header  
im_header_double   - extract double fields from header  
im_header_string   - extract string fields from header  
im_version         - VIPS version number  
im_version_string  - VIPS version string


Figure 4.16: IO functions

4.2.16 Format functions

See Figure 4.17.

These functions convert to and from various image formats. See §2.5 for a nice API over these. VIPS can read more than these formats, see the man page for VipsFormat.


$ vips list format  
im_csv2vips          - read a file in csv format  
im_jpeg2vips         - convert from jpeg  
im_magick2vips       - load file with libMagick  
im_png2vips          - convert PNG file to VIPS image  
im_exr2vips          - convert an OpenEXR file to VIPS  
im_ppm2vips          - read a file in pbm/pgm/ppm format  
im_analyze2vips      - read a file in analyze format  
im_tiff2vips         - convert TIFF file to VIPS image  
im_vips2csv          - write an image in csv format  
im_vips2jpeg         - convert to jpeg  
im_vips2mimejpeg     - convert to jpeg as mime type on stdout  
im_vips2png          - convert VIPS image to PNG file  
im_vips2ppm          - write a file in pbm/pgm/ppm format  
im_vips2tiff         - convert VIPS image to TIFF file


Figure 4.17: Format functions

4.2.17 Resample functions

See Figure 4.18.

These functions resample images with various interpolators.


$ vips list resample  
im_affine            - affine transform  
im_affinei           - affine transform  
im_affinei_all       - affine transform of whole image  
im_similarity_area   - output area xywh of similarity transformation  
im_similarity        - similarity transformation


Figure 4.18: Resample functions

vips-7.38.5/doc/html/vipsmanualse6.html0000644000175000017500000001540112303145652014716 00000000000000 The VError class

1.6 The VError class

The VError class is the class thrown by the VIPS C++ API when an error is detected. It is derived from std::exception in the usual way.

1.6.1 Constructors

There are two constructors for VError:

VError( std::string str );  
VError();

The first form creates an error object initialised with the specified string, the last form creates an empty error object.

1.6.2 Projection functions

A function gives access to the string held by VError:

const char ⋆what();

You can also send to an ostream.

std::ostream& operator<<(  
    std::ostream&, const error& );

1.6.3 Computing with VError

Two member functions let you append elements to an error:

VError &app( std::string txt );  
VError &app( const int i );

For example:

VError wombat;  
int n = 12;  
 
wombat.app( "possum: no more than " ).  
app( n ).app( " elements\n" );  
throw( wombat );

will throw a VError with a diagnostic of:

possum: no more than 12 elements

The member function perror() prints the error message to stdout and exits with a code of 1.

void perror( const char ⋆ );  
void perror();

1.6.4 Convenience function

The convenience function verror creates an VError with the specified error string, and throws it. If you pass "" for the string, verror uses the contents of the VIPS error buffer instead.

extern void verror( std::string str = "" );

vips-7.38.5/doc/html/vipsmanual.html0000644000175000017500000001636412303145652014311 00000000000000

VIPS Manual
Version 7.38
John Cupitt, Kirk Martinez

VIPS is currently (v. 7.38, June 2014) in an API transition. The API as documented in 7.24 is still complete and supported and is the one you should use. The 8.0 API is not yet done and may still change before completion.

This manual formatted February 25, 2014

vips-7.38.5/doc/html/vipsmanualse8.html0000644000175000017500000021344012303145652014723 00000000000000 Core C API

2.2 Core C API

VIPS is built on top of several other libraries, two of which, glib and gobject, are exposed at various points in the C API.

You can read up on glib at the GTK+ website:

http://www.gtk.org

There’s also an excellent book by Matthias Warkus, The Official GNOME 2 Developer’s Guide, which covers the same material in a tutorial manner.

2.2.1 Startup

Before calling any VIPS function, you need to start VIPS up:

int im_init_world( const char ⋆argv0 );

The argv0 argument is the value of argv[0] your program was passed by the host operating system. VIPS uses this with im_guess_prefix() and im_guess_libdir() to try to find various VIPS data files.

If you don’t call this function, VIPS will call it for you the first time you use a VIPS function. But it won’t be able to get the argv0 value for you, so it may not be able to find it’s data files.

VIPS also offers the optional:

GOptionGroup ⋆im_get_option_group( void );

You can use this with GOption to parse your program’s command-line arguments. It adds several useful VIPS flags, including --vips-concurrency.

Figure 2.2 shows both these functions in use. Again, the GOption stuff is optional and just lets VIPS add some flags to your program. You do need the im_init_world() though.


#include <stdio.h>  
#include <vips/vips.h>  
 
static gboolean print_stuff;  
 
static GOptionEntry options[] = {  
  { "print", 'p', 0, G_OPTION_ARG_NONE, &print_stuff,  
    "print \"hello world!\"", NULL },  
  { NULL }  
};  
 
int  
main( int argc, char ⋆⋆argv )  
{  
  GOptionContext ⋆context;  
  GError ⋆error = NULL;  
 
  if( im_init_world( argv[0] ) )  
    error_exit( "unable to start VIPS" );  
 
  context = g_option_context_new( "- my program" );  
  g_option_context_add_main_entries( context,  
    options, "main" );  
  g_option_context_add_group( context, im_get_option_group() );  
  if( !g_option_context_parse( context, &argc, &argv, &error ) ) {  
    if( error ) {  
      fprintf( stderr, "%s\n", error->message );  
      g_error_free( error );  
    }  
    error_exit( "try \"%s --help\"", g_get_prgname() );  
  }  
  g_option_context_free( context );  
 
  if( print_stuff )  
    printf( "hello, world!\n" );  
 
  return( 0 );  
}


Figure 2.2: Hello World for VIPS

2.2.2 Image descriptors

The base level of the VIPS I/O system provides IMAGE descriptors. An image represented by a descriptor may be an image file on disc, an area of memory that has been allocated for the image, an output file, a delayed computation, and so on. Programs need (usually) only know that they have a descriptor, they do not see many of the details. Figure 2.3 shows the definition of the IMAGE descriptor.


typedef struct {  
    /⋆ Fields from image header.  
     ⋆/  
    int Xsize;             /⋆ Pels per line ⋆/  
    int Ysize;             /⋆ Lines ⋆/  
    int Bands;             /⋆ Number of bands ⋆/  
    int Bbits;             /⋆ Bits per band ⋆/  
    int BandFmt;           /⋆ Band format ⋆/  
    int Coding;            /⋆ Coding type ⋆/  
    int Type;              /⋆ Type of file ⋆/  
    float XRes;            /⋆ Horizontal res in pels/mm ⋆/  
    float YRes;            /⋆ Vertical res in pels/mm  ⋆/  
    int Length;            /⋆ Obsolete (unused) ⋆/  
    short Compression;     /⋆ Obsolete (unused) ⋆/  
    short Level;           /⋆ Obsolete (unused) ⋆/  
    int Xoffset;           /⋆ Position of origin ⋆/  
    int Yoffset;  
 
    /⋆ Derived fields that may be read by the user.  
     ⋆/  
    char ⋆filename;        /⋆ File name ⋆/  
    im_time_t ⋆time;       /⋆ Timing for eval callback ⋆/  
    int kill;              /⋆ Set to non-zero to block eval ⋆/  
 
    ... and lots of other private fields used by VIPS for  
    ... housekeeping.  
} IMAGE;


Figure 2.3: The IMAGE descriptor

The first set of fields simply come from the image file header: see §1.2.1 for a full description of all the fields. The next set are maintained for you by the VIPS I/O system. filename is the name of the file that this image came from. If you have attached an eval callback to this image, time points to a set of timing statistics which can be used by user-interfaces built on VIPS to provide feedback about the progress of evaluation — see §2.2.8. Finally, if you set kill to non-zero, VIPS will block any pipelines which use this descriptor as an intermediate. See §2.2.12.

The remaining fields are private and are used by VIPS for housekeeping.

2.2.3 Header fields

You can access header fields either directly (as im->Xsize, for example) or programmatically with im_header_int() and friends. For example:

int i;  
 
im_header_int( im, "Xsize", &i );

There’s also im_header_map() to loop over header fields, and im_header_get_type to test the type of fields. These functions work for image meta fields as well, see §2.2.6.

2.2.4 Opening and closing

Descriptors are created with im_open(). You can also read images with the format system: see §2.5. The two APIs are complimentary, though im_open() is more useful.

At the command-line, try:

$ vips list classes

/noindent to see a list of all the supported file formats.

im_open() takes a file name and a string representing the mode with which the descriptor is to be opened:

IMAGE ⋆im_open( const char ⋆filename,  
  const char ⋆mode )

The possible values for mode are:

"r"
The file is opened read-only. If you open a non-VIPS image, or a VIPS image written on a machine with a different byte ordering, im_open() will automatically convert it to native VIPS format. If the underlying file does not support random access (JPEG, for example), the entire file will be converted in memory.

VIPS can read images in many file formats. You can control the details of the conversion with extra characters embedded in the filename. For example:

fred = im_open( "fred.tif:2",  
  "r" );

will read page 2 of a multi-page TIFF. See the man pages for details.

"w"
An IMAGE descriptor is created which, when written to, will write pixels to disc in the specified file. Any existing file of that name is deleted.

VIPS looks at the filename suffix to determine the save format. If there is no suffix, or the filename ends in ".v", the image is written in VIPS native format.

If you want to control the details of the conversion to the disc format (such as setting the Q factor for a JPEG, for example), you embed extra control characters in the filename. For example:

fred = im_open( "fred.jpg:95",  
  "w" );

writes to fred will write a JPEG with Q 95. Again, see the man pages for the conversion functions for details.

"t"
As the "w" mode, but pels written to the descriptor will be saved in a temporary memory buffer.
"p"
This creates a special partial image. Partial images are used to join VIPS operations together, see §2.2.12.
"rw"
As the "r" mode, but the image is mapped into the caller’s address space read-write. This mode is only provided for the use of paintbox-style applications which need to directly modify an image. Most programs should use the "w" mode for image output.

If an error occurs opening the image, im_open() calls im_error() with a string describing the cause of the error and returns NULL. im_error() has type

void im_error( const char ⋆domain,  
  const char ⋆format, ... )

The first argument is a string giving the name of the thing that raised the error (just "im_open", for example). The format and subsequent arguments work exactly as printf(). It formats the message and appends the string formed to the error log. You can get a pointer to the error text with im_error_buffer().

const char ⋆im_error_buffer()

Applications may display this string to give users feedback about the cause of the error. The VIPS exit function, error_exit(), prints im_error_buffer() to stderr and terminates the program with an error code of 1.

void error_exit( const char ⋆format,  
  ... )

There are other functions for handling errors: see the man page for im_error().

Descriptors are closed with im_close(). It has type:

int im_close( IMAGE ⋆im )

im_close() returns 0 on success and non-zero on error.

2.2.5 Examples

As an example, Figure 2.2.5 will print the width and height of an image stored on disc.


#include <stdio.h>  
#include <vips/vips.h>  
 
int  
main( int argc, char ⋆⋆argv )  
{  
  IMAGE ⋆im;  
 
  /⋆ Check arguments.  
   ⋆/  
  if( im_init_world( argv[0] ) )  
    error_exit( "unable to start VIPS" );  
  if( argc != 2 )  
    error_exit( "usage: %s filename", argv[0] );  
 
  /⋆ Open file.  
   ⋆/  
  if( !(im = im_open( argv[1], "r" )) )  
    error_exit( "unable to open %s for input", argv[1] );  
 
  /⋆ Process.  
   ⋆/  
  printf( "width = %d, height = %d\n", im->Xsize, im->Ysize );  
 
  /⋆ Close.  
   ⋆/  
  if( im_close( im ) )  
      error_exit( "unable to close %s", argv[1] );  
 
  return( 0 );  
}


Figure 2.4: Print width and height of an image

To compile this example, use:

cc ‘pkg-config vips-7.14 \  
  --cflags --libs‘ myfunc.c

As a slightly more complicated example, Figure 2.2.5 will calculate the photographic negative of an image.


#include <stdio.h>  
#include <vips/vips.h>  
 
int  
main( int argc, char ⋆⋆argv )  
{  
  IMAGE ⋆in, ⋆out;  
 
  /⋆ Check arguments.  
   ⋆/  
  if( im_init_world( argv[0] ) )  
    error_exit( "unable to start VIPS" );  
  if( argc != 3 )  
    error_exit( "usage: %s infile outfile", argv[0] );  
 
  /⋆ Open images for read and write, invert, update the history with our  
   ⋆ args, and close.  
   ⋆/  
  if( !(in = im_open( argv[1], "r" )) ||  
    !(out = im_open( argv[2], "w" )) ||  
    im_invert( in, out ) ||  
    im_updatehist( out, argc, argv ) ||  
    im_close( in ) ||  
    im_close( out ) )  
    error_exit( argv[0] );  
 
  return( 0 );  
}


Figure 2.5: Find photographic negative

2.2.6 Metadata

VIPS lets you attach arbitrary metadata to an IMAGE. For example, ICC profiles, EXIF tags, image history, whatever you like. VIPS will efficiently propagate metadata as images are processed (usually just by copying pointers) and will automatically save and load metadata from VIPS files (see §1.2.1).

A piece of metadata is a value and an identifying name. A set of convenience functions let you set and get int, double, string and blob. For example:

int im_meta_set_int( IMAGE ⋆,  
  const char ⋆field, int );  
int im_meta_get_int( IMAGE ⋆,  
  const char ⋆field, int ⋆ );

So you can do:

if( im_meta_set_int( im, "poop", 42 ) )  
  return( -1 );

to create an int called "poop", then at some later point (possibly much, much later), in an image distantly derived from im, you can use:

int i;  
 
if( im_meta_get_int( im, "poop", &i ) )  
  return( -1 );

And get the value 42 back.

You can use im_meta_set() and im_meta_get() to attach arbitrary GValue to images. See the man page for im_meta_set() for full details.

You can test for a field being present with im_meta_get_type() (you’ll get G_TYPE_INT back for "poop", for example, or 0 if it is not defined for this image).

2.2.7 History

VIPS tracks the history of an image, that is, the sequence of operations which have led to the creation of an image. You can view a VIPS image’s history with the header command, or with nip2’s View Header menu. Whenever an application performs an action, it should append a line of shell script to the history which would perform the same action.

The call to im_updatehist() in Figure 2.2.5 adds a line to the image history noting the invocation of this program, its arguments, and the time and date at which it was run. You may also find im_histlin() helpful. It has type:

void im_histlin( IMAGE ⋆im,  
  const char ⋆fmt, ... )

It formats its arguments as printf() and appends the string formed to the image history.

You read an image’s history with im_history_get(). It returns the entire history of an image, one action per line. No need to free the result.

const char ⋆  
  im_history_get( IMAGE ⋆im );

2.2.8 Eval callbacks

VIPS lets you attach callbacks to image descriptors. These are functions you provide which VIPS will call when certain events occur. See §3.3.6 for more detail.

Eval callbacks are called repeatedly during evaluation and can be used by user-interface programs to give feedback about the progress of evaluation.

2.2.9 Detailed rules for descriptors

These rules are intended to answer awkward questions.

  1. You can output to a descriptor only once.
  2. You can use a descriptor as an input many times.
  3. You can only output to a descriptor that was opened with modes "w", "t" and "p".
  4. You can only use a descriptor as input if it was opened with modes "r" or "rw".
  5. If you have output to a descriptor, you may subsequently use it as an input. "w" descriptors are automatically changed to "r" descriptors.

    If the function you are passing the descriptor to uses WIO (see §2.2.12), then "p" descriptors become "t". If the function you are passing the descriptor to uses PIO, then "p" descriptors are unchanged.

2.2.10 Automatic resource deallocation

VIPS lets you allocate resources local to an image descriptor, that is, when the descriptor is closed, all resources which were allocated local to that descriptor are automatically released for you.

Local image descriptors

VIPS provides a function which will open a new image local to an existing image. im_open_local() has type:

IMAGE ⋆im_open_local( IMAGE ⋆im,  
  const char ⋆filename,  
  const char ⋆mode )

It behaves exactly as im_open(), except that you do not need to close the descriptor it returns. It will be closed automatically when its parent descriptor im is closed.


/⋆ Add another image to the accumulated total.  
 ⋆/  
static int  
sum1( IMAGE ⋆acc, IMAGE ⋆⋆in, int nin, IMAGE ⋆out )  
{  
    IMAGE ⋆t;  
 
    if( nin == 0 )  
        /⋆ All done ... copy to out.  
         ⋆/  
        return( im_copy( acc, out ) );  
 
    /⋆ Make a new intermediate, and add to it..  
     ⋆/  
    return( !(t = im_open_local( out, "sum1:1", "p" )) ||  
        im_add( acc, in[0], t ) ||  
        sum1( t, in + 1, nin - 1, out ) );  
}  
 
/⋆ Sum the array of images in[]. nin is the number of images in  
 ⋆ in[], out is the descriptor we write the final image to.  
 ⋆/  
int  
total( IMAGE ⋆⋆in, int nin, IMAGE ⋆out )  
{  
    /⋆ Check that we have at least one image.  
     ⋆/  
    if( nin <= 0 ) {  
        im_error( "total", "nin should be > 0" );  
        return( -1 );  
    }  
 
    /⋆ More than 1, sum recursively.  
     ⋆/  
    return( sum1( in[0], in + 1, nin - 1, out ) );  
}


Figure 2.6: Sum an array of images

Figure 2.6 is a function which will sum an array of images. We need never close any of the (unknown) number of intermediate images which we open. They will all be closed for us by our caller, when our caller finally closes out. VIPS lets local images themselves have local images and automatically makes sure that all are closed in the correct order.

It is very important that these intermediate images are made local to out rather than in, for reasons which should become apparent in the section on combining operations below.

There’s also im_open_local_array() for when you need a lot of local descriptors, see the man page.

Local memory allocation

VIPS includes a set of functions for memory allocation local to an image descriptor. The base memory allocation function is im_malloc(). It has type:

void ⋆im_malloc( IMAGE ⋆, size_t )

It operates exactly as the standard malloc() C library function, except that the area of memory it allocates is local to an image. If im_malloc() is unable to allocate memory, it returns NULL. If you pass NULL instead of a valid image descriptor, then im_malloc() allocates memory globally and you must free it yourself at some stage.

To free memory explicitly, use im_free():

int im_free( void ⋆ )

im_free() always returns 0, so you can use it as an argument to a callback.

Three macros make memory allocation even easier. IM_NEW() allocates a new object. You give it a descriptor and a type, and it returns a pointer to enough space to hold an object of that type. It has type:

type-name ⋆IM_NEW( IMAGE ⋆, type-name )

The second macro, IM_ARRAY(), is very similar, but allocates space for an array of objects. Note that, unlike the usual calloc() C library function, it does not initialise the array to zero. It has type:

type-name ⋆IM_ARRAY( IMAGE ⋆, int, type-name )

Finally, IM_NUMBER() returns the number of elements in an array of defined size. See the man pages for a series of examples, or see §2.3.1.

Other local operations

The above facilities are implemented with the VIPS core function im_add_close_callback(). You can use this facility to make your own local resource allocators for other types of object — see the manual page for more help.

2.2.11 Error handling

All VIPS operations return 0 on success and non-zero on error, setting im_error(). As a consequence, when a VIPS function fails, you do not need to generate an error message — you can simply propagate the error back up to your caller. If however you detect some error yourself (for example, the bad parameter in the example above), you must call im_error() to let your caller know what the problem was.

VIPS provides two more functions for error message handling: im_warn() and im_diag(). These are intended to be used for less serious messages, as their names suggest. Currently, they simply format and print their arguments to stderr, optionally suppressed by the setting of an environment variable. Future releases of VIPS may allow more sophisticated trapping of these functions to allow their text to be easily presented to the user by VIPS applications. See the manual pages.

2.2.12 Joining operations together

VIPS lets you join image processing operations together so that they behave as a single unit. Figure 2.7 shows the definition of the function im_Lab2disp() from the VIPS library. This function converts an image in CIE Lab colour space to an RGB image for a monitor. The monitorcharacteristics (gamma, phosphor type, etc.) are described by the im_col_display structure, see the man page for im_col_XYZ2rgb().


int  
im_Lab2disp( IMAGE ⋆in, IMAGE ⋆out, struct im_col_display ⋆disp )  
{  
    IMAGE ⋆t1;  
 
    if( !(t1 = im_open_local( out, "im_Lab2disp:1", "p" )) ||  
        im_Lab2XYZ( in, t1 ) ||  
        im_XYZ2disp( t1, out, disp ) )  
        return( -1 );  
 
    return( 0 );  
}


Figure 2.7: Two image-processing operations joined together

The special "p" mode (for partial) used to open the image descriptor used as the intermediate image in this function ‘glues’ the two operations together. When you use im_Lab2disp(), the two operations inside it will execute together and no extra storage is necessary for the intermediate image (t1 in this example). This is important if you want to process images larger than the amount of RAM you have on your machine.

As an added bonus, if you have more than one CPU in your computer, the work will be automatically spread across the processors for you. You can control this parallelization with the IM_CONCURRENCY environment variable, im_concurrency_set(), and with the --vips-concurrency command-line switch. See the man page for im_generate().

How it works

When a VIPS function is asked to output to a "p" image descriptor, all the fields in the descriptor are set (the output image size and type are set, for example), but no image data is actually generated. Instead, the function attaches callbacks to the image descriptor which VIPS can use later to generate any piece of the output image that might be needed.

When a VIPS function is asked to output to a "w" or a "t" descriptor (a real disc file or a real memory buffer), it evaluates immediately and its evaluation in turn forces the evaluation of any earlier "p" images.

In the example in Figure 2.7, whether or not any pixels are really processed when im_Lab2disp() is called depends upon the mode in which out was opened. If out is also a partial image, then no pixels will be calculated — instead, a pipeline of VIPS operations will be constructed behind the scenes and attached to out.

Conversely, if out is a real image (that is, either "w" or "t"), then the final VIPS operation in the function (im_XYZ2disp()) will output the entire image to out, causing the earlier parts of im_Lab2disp() (and indeed possibly some earlier pieces of program, if in was also a "p" image) to run.

When a VIPS pipeline does finally evaluate, all of the functions in the pipeline execute together, sucking image data through the system in small pieces. As a consequence, no intermediate images are generated, large amounts of RAM are not needed, and no slow disc I/O needs to be performed.

Since VIPS partial I/O is demand-driven rather than data-driven this works even if some of the operations perform coordinate transformations. We could, for example, include a call to im_affine(), which performs arbitrary rotation and scaling, and everything would still work correctly.

Pitfalls with partials

To go with all of the benefits that partial image I/O brings, there are also some problems. The most serious is that you are often not quite certain when computation will happen. This can cause problems if you close an input file, thinking that it is finished with, when in fact that file has not been processed yet. Doing this results in dangling pointers and an almost certain core-dump.

You can prevent this from happening with careful use of im_open_local(). If you always open local to your output image, you can be sure that the input will not be closed before the output has been generated to a file or memory buffer. You do not need to be so careful with non-image arguments. VIPS functions which take extra non-image arguments (a matrix, perhaps) are careful to make their own copy of the object before returning.

Non-image output

Some VIPS functions consume images, but make no image output. im_stats() for example, scans an image calculating various statistical values. When you use im_stats(), it behaves as a data sink, sucking image data through any earlier pipeline stages.

Calculating twice

In some circumstances, the same image data can be generated twice. Figure 2.8 is a function which finds the mean value of an image, and writes a new image in which pixels less than the mean are set to 0 and images greater than the mean are set to 255.


int  
threshold_at_mean( IMAGE ⋆in, IMAGE ⋆out )  
{  
    double mean;  
 
    if( im_avg( in, &mean ) ||  
        im_moreconst( in, out, mean ) )  
        return( -1 );  
 
    return( 0 );  
}


Figure 2.8: Threshold an image at the mean value

This seems straightforward — but consider if image in were a "p", and represented the output of a large pipeline of operations. The call to im_avg() would force the evaluation of the entire pipeline, and throw it all away, keeping only the average value. The subsequent call to im_moreconst() will cause the pipeline to be evaluated a second time.

When designing a program, it is sensible to pay attention to these issues. It might be faster, in some cases, to output to a file before calling im_avg(), find the average of the disc file, and then run im_moreconst() from that. There’s also im_cache() which can keep recent parts of a very large image.

Blocking computation

IMAGE descriptors have a flag called kill which can be used to block computation. If im->kill is set to a non-zero value, then any VIPS pipelines which use im as an intermediate will fail with an error message. This is useful for user-interface writers — suppose your interface is forced to close an image which many other images are using as a source of data. You can just set the kill flag in all of the deleted image’s immediate children and prevent any dangling pointers from being followed.

Limitations

Not all VIPS operations are partial-aware. These non-partial operations use a pre-VIPS 7.0 I/O scheme in which the whole of the input image has to be present at the same time. In some cases, this is because partial I/O simply makes no sense — for example, a Fourier Transform can produce no output until it has seen all of the input. im_fwfft() is therefore not a partial operation. In other cases, we have simply not got around to rewriting the old non-partial operation in the newer partial style.

You can mix partial and non-partial VIPS operations freely, without worrying about which type they are. The only effect will be on the time your pipeline takes to execute, and the memory requirements of the intermediate images. VIPS uses the following rules when you mix the two styles of operation:

  1. When a non-partial operation is asked to output to a partial image descriptor, the "p" descriptor is magically transformed into a "t" descriptor.
  2. When a non-partial operation is asked to read from a "p" descriptor, the "p" descriptor is turned into a "t" type, and any earlier stages in the pipeline forced to evaluate into that memory buffer.

    The non-partial operation then processes from the memory buffer.

These rules have the consequence that you may only process very large images if you only use partial operations. If you use any non-partial operations, then parts of your pipelines will fall back to old whole-image I/O and you will need to think carefully about where your intermediates should be stored.

vips-7.38.5/doc/html/vipsmanualse15.html0000644000175000017500000021770412303145652015010 00000000000000 Programming PIO functions

3.3 Programming PIO functions

The VIPS PIO system has a number of advantages over WIO, as summarised in the introduction. On the other hand, they are a bit more complicated.

3.3.1 Easy PIO with im_wrapone() and im_wrapmany()

PIO is a very general image IO system, and because of this flexibility, can be complicated to program. As a convenience, VIPS offers an easy-to-use layer over PIO with the funtions im_wrapone() and im_wrapmany().

If your image processing function is uninterested in coordinates, that is, if your input and output images are the same size, and each output pixel depends only upon the value of the corresponding pixel in the input image or images, then these functions are for you.

Consider the invert() function of figure 3.2. First, we have to write the core of this as a buffer-processing function:

#include <stdio.h>  
#include <stdlib.h>  
 
#include <vips/vips.h>  
 
/⋆ p points to a buffer of pixels which  
 ⋆ need inverting, q points to the buffer  
 ⋆ we should write the result to, and n  
 ⋆ is the number of pels present.  
 ⋆/  
static void  
invert_buffer( unsigned char ⋆p,  
   unsigned char ⋆q, int n )  
{  
   int i;  
 
   for( i = 0; i < n; i++ )  
      q[i] = 255 - p[i];  
}

Now we have to wrap up this very primitive expression of the invert operation as a PIO function. We use im_wrapone() to do this. It has type:

int  
im_wrapone( IMAGE ⋆in, IMAGE ⋆out,  
   im_wrapone_fn fn, void ⋆a, void ⋆b )

where:

void  
(⋆im_wrapone_fn)(void ⋆in, void ⋆out,  
   int n, void ⋆a, void ⋆b )

almost the same type as our buffer-processing function above. The values a and b are carried around by VIPS for whatever use you fancy. invert() can now be written as:

int  
invert( IMAGE ⋆in, IMAGE ⋆out )  
{  
   /⋆ Check parameters.  
    ⋆/  
   if( in->BandFmt != IM_BANDFMT_UCHAR ||  
      in->Bands != 1 ||  
      in->Coding != IM_CODING_NONE ) {  
      im_error( "invert", "bad image" );  
      return( -1 );  
   }  
 
   /⋆ Set fields in output image.  
    ⋆/  
   if( im_cp_desc( out, in ) )  
      return( -1 );  
 
   /⋆ Process! We don't use either of the  
    ⋆ user parameters in this function,  
    ⋆ so leave them as NULL.  
    ⋆/  
   if( im_wrapone( in, out,  
      (im_wrapone_fn) invert_buffer,  
      NULL, NULL ) )  
      return( -1 );  
 
   return( 0 );  
}

And that’s all there is to it. This function will have all of the desirable properties of PIO functions, while being as easy to program as the WIO invert() earlier in this chapter.

This version of invert() is not very general: it will only accept one-band unsigned char images. It is easy to modify for n-band images:

/⋆ As before, but use one of the user  
 ⋆ parameters to pass in the number of  
 ⋆ bands in the image.  
 ⋆/  
static void  
invert_buffer( unsigned char ⋆p,  
   unsigned char ⋆q, int n,  
   IMAGE ⋆in )  
{  
   int i;  
   int sz = n ⋆ in->Bands;  
 
   for( i = 0; i < sz; i++ )  
      q[i] = 255 - p[i];  
}

We must also modify invert():

int  
invert( IMAGE ⋆in, IMAGE ⋆out )  
{  
   /⋆ Check parameters.  
    ⋆/  
   if( in->BandFmt != IM_BANDFMT_UCHAR ||  
      in->Coding != IM_CODING_NONE ) {  
      im_error( "invert", "bad image" );  
      return( -1 );  
   }  
 
   /⋆ Set fields in output image.  
    ⋆/  
   if( im_cp_desc( out, in ) )  
      return( -1 );  
 
   /⋆ Process! The first user-parameter  
    ⋆ is the number of bands involved.  
    ⋆/  
   if( im_wrapone( in, out,  
      (im_wrapone_fn)invert_buffer,  
      in, NULL ) )  
      return( -1 );  
 
   return( 0 );  
}

There are two significant hidden traps here. First, inside the buffer processing functions, you may only read the contents of the user parameters a and b, you may not write to them. This is because on a multi-CPU machine, several copies of your buffer-processing functions will be run in parallel — if they all write to the same place, there will be complete confusion. If you need writeable parameters (for example, to count and report overflows), you can’t use im_wrapone(), you’ll have to use the PIO system in all its gory detail, see below.

Secondly, your buffer processing function may not be called immediately. VIPS may decide to delay evaluation of your operation until long after the call to invert() has returned. As a result, care is needed to ensure that you never read anything in your buffer-processing function that may have been freed. The best way to ensure this is to use the local resource allocators, such as im_open_local() andim_malloc(). This issue is discussed at length in the sections below, and in §2.1.

im_wrapone() is for operations which take exactly one input image. VIPS provides a second function, im_wrapmany(), which works for any number of input images. The type of im_wrapmany() is slightly different:

int  
im_wrapmany( IMAGE ⋆⋆in, IMAGE ⋆out,  
   im_wrapmany_fn fn, void ⋆a, void ⋆b )

void  
(⋆im_wrapmany_fn)( void ⋆⋆in, void ⋆out,  
   int n, void ⋆a, void ⋆b )

im_wrapmany() takes a NULL-terminated array of input images, and creates a NULL-terminated array of buffers for the use of your buffer processing function. A function to add two IM_BANDFMT_UCHAR images to make a IM_BANDFMT_UCHAR image might be written as:

static void  
add_buffer( unsigned char ⋆⋆in,  
   unsigned short ⋆out, int n,  
   IMAGE ⋆in )  
{  
   int i;  
   int sz = n ⋆ in->Bands;  
   unsigned char ⋆p1 = in[0];  
   unsigned char ⋆p2 = in[1];  
 
   for( i = 0; i < sz; i++ )  
      out[i] = p1[i] + p2[i];  
}

This can be made into a PIO function with:

int  
add_uchar( IMAGE ⋆i1, IMAGE ⋆i2,  
   IMAGE ⋆out )  
{  
   IMAGE ⋆invec[3];  
 
   /⋆ Check parameters. We don't need to  
    ⋆ check that i1 and i2 are the same  
    ⋆ size, im_wrapmany() does that for  
    ⋆ us.  
    ⋆/  
   if( i1->BandFmt != IM_BANDFMT_UCHAR ||  
      i1->Coding != IM_CODING_NONE ||  
      i2->BandFmt != IM_BANDFMT_UCHAR ||  
      i2->Coding != IM_CODING_NONE ||  
      i1->Bands != i2->Bands ) {  
      im_error( "add_uchar", "bad in" );  
      return( -1 );  
   }  
 
   /⋆ Set fields in output image. As  
    ⋆ input image, but we want a USHORT.  
    ⋆/  
   if( im_cp_desc( out, i1 ) )  
      return( -1 );  
   out->BandFmt = IM_BANDFMT_USHORT;  
   out->Bbits = IM_BBITS_SHORT;  
 
   /⋆ Process! The first user-parameter  
    ⋆ is the number of bands involved.  
    ⋆ invec is a NULL-terminated array of  
    ⋆ input images.  
    ⋆/  
   invec[0] = i1; invec[1] = i2;  
   invec[2] = NULL;  
   if( im_wrapmany( invec, out,  
      (im_wrapone_fn)add_buffer,  
      i1, NULL ) )  
      return( -1 );  
 
   return( 0 );  
}

3.3.2 Region descriptors

Regions are the next layer of abstraction above image descriptors. A region is a small part of an image, held in memory ready for processing. A region is defined as:

typedef struct {  
   Rect valid;  
   IMAGE ⋆im;  
 
   ... and some other private fields,  
   ... used by VIPS for housekeeping  
} REGION;

where valid holds the sub-area of image im that this region represents, and Rect is defined as:

typedef struct {  
   int left, top;  
   int width, height;  
} Rect;

two macros are available for Rect calculations:

int IM_RECT_RIGHT( Rect ⋆r )  
int IM_RECT_BOTTOM( Rect ⋆r )

where IM_RECT_RIGHT() returns left + width, and IM_RECT_BOTTOM() returns top + height. A small library of C functions are also available for Rect algebra, see the manual pages for im_rect_intersectrect().

Regions are created with im_region_create(). This has type:

REGION ⋆im_region_create( IMAGE ⋆im )

im_region_create() returns a pointer to a new region structure, or NULL on error. Regions returned by im_region_create() are blank — they contain no image data and cannot be read from or written to. See the next couple of sections for calls to fill regions with data.

Regions are destroyed with im_region_free(). It has type:

int im_region_free( REGION ⋆reg )

And, as usual, returns 0 on success and non-zero on error, setting im_error(). You must free all regions you create. If you close an image without freeing all the regions defined on that image, the image is just marked for future closure — it is not actually closed until the final region is freed. This behaviour helps to prevent dangling pointers, and it is not difficult to make sure you free all regions — see the examples below.

3.3.3 Image input with regions

Before you can read from a region, you need to call im_prepare() to fill the region with image data. It has type:

int im_prepare( REGION ⋆reg, Rect ⋆r )

Area r of the image on which reg has been created is prepared and attached to the region.

Exactly what this preparation involves depends upon the image — it can vary from simply adjusting some pointers, to triggering the evaluation of a series of other functions. If it returns successfully, im_prepare() guarantees that all pixels within reg->valid may be accessed. Note that this may be smaller or larger than r, since im_prepare() clips r against the size of the image.

Programs can access image data in the region by calling the macro IM_REGION_ADDR(). It has type

char ⋆IM_REGION_ADDR( REGION ⋆reg,  
  int x, int y )

Provided that point (x,y) lies inside reg->valid, IM_REGION_ADDR() returns a pointer to pel (x,y). Adding to the result of IM_REGION_ADDR() moves to the right along the line of pels, provided you stay strictly within reg->valid. Add IM_REGION_LSKIP() to move down a line, see below. IM_REGION_ADDR() has some other useful features — see the manual page.

Other macros are available to ease address calculation:

int IM_REGION_LSKIP( REGION ⋆reg )  
int IM_REGION_N_ELEMENTS( REGION ⋆reg )  
int IM_REGION_SIZEOF_LINE( REGION ⋆reg )

These find the number of bytes to add to the result of IM_REGION_ADDR() to move down a line, the number of band elements across the region and the number of bytes across the region.

Figure 3.5 is a version of average() which uses regions rather than WIO input. Two things: first, we should really be using vips_sink(), see §3.3.4, to do the rectangle algebra for us. Secondly, note that we call im_pincheck() rather than im_incheck(). im_pincheck() signals to the IO system that you are a PIO-aware function, giving im_prepare() much more flexibility in the sorts of preparation it can do. Also see the manual pages for im_poutcheck() and im_piocheck().


#include <stdio.h>  
#include <stdlib.h>  
#include <vips/vips.h>  
#include <vips/region.h>  
 
int  
average( IMAGE ⋆im, double ⋆out )  
{  
   int total, i, y;  
   REGION ⋆reg;  
   Rect area, ⋆r;  
 
   /⋆ Check im.  
    ⋆/  
   if( im_pincheck( im ) )  
      return( -1 );  
   if( im->BandFmt != IM_BANDFMT_UCHAR || im->Coding != IM_CODING_NONE ) {  
      im_error( "average", "uncoded uchar images only" );  
      return( -1 );  
   }  
 
   /⋆ Make a region on im which we can use for reading.  
    ⋆/  
   if( !(reg = im_region_create( im )) )  
      return( -1 );


Figure 3.5: First PIO average of image


   /⋆ Move area over the image in 100x100 pel chunks.  
    ⋆ im_prepare() will clip against the edges of the image  
    ⋆ for us.  
    ⋆/  
   total = 0;  
   r = &reg->valid;  
   area.width = 100; area.height = 100;  
   for( area.top = 0; area.top < im->Ysize; area.top += 100 )  
      for( area.left = 0; area.left < im->Xsize;  
          area.left += 100 ) {  
          /⋆ Fill reg with pels.  
           ⋆/  
          if( im_prepare( reg, &area ) ) {  
             /⋆ We must free the region!  
              ⋆/  
             im_region_free( reg );  
             return( -1 );  
          }  
 
          /⋆ Loop over reg, adding to our total.  
           ⋆/  
          for( y = r->top; y < IM_RECT_BOTTOM( r ); y++ ) {  
             unsigned char ⋆p = IM_REGION_ADDR( reg, r->left, y );  
 
             for( i = 0; i < IM_REGION_N_ELEMENTS( reg ); i++ )  
                 total += p[i];  
          }  
      }  
 
   /⋆ Make sure we free the region.  
    ⋆/  
   im_region_free( reg );  
 
   /⋆ Find average.  
    ⋆/  
   ⋆out = (double) total / (IM_IMAGE_N_ELEMENTS( im ) ⋆ im->Ysize);  
 
   return( 0 );  
}


Figure 3.6: First PIO average of image (cont.)

This version of average() can be called in exactly the same way as the previous one, but this version has the great advantage of not needing to have the whole of the input image available at once.

We can do one better than this — if the image is being split into small pieces, we can assign each piece to a separate thread of execution and get parallelism. To support this splitting of tasks, VIPS has the notion of a sequence.

3.3.4 Splitting into sequences

A sequence comes in three parts: a start function, a processing function, and a stop function. When VIPS starts up a new sequence, it runs the start function. Start functions return sequence values: a void pointer representing data local to this sequence. VIPS then repeatedly calls the processing function, passing in the sequence value and a new piece of image data for processing. Finally, when processing is complete, VIPS cleans up by calling the stop function, passing in the sequence value as an argument. The types look like this:

void ⋆  
(⋆start_fn)( IMAGE ⋆out,  
   void ⋆a, void ⋆b )  
int  
(⋆process_fn)( REGION ⋆reg,  
   void ⋆seq, void ⋆a, void ⋆b )  
int  
(⋆stop_fn)( void ⋆seq, void ⋆a, void ⋆b )

The values a and b are carried around by VIPS for your use.

For functions like average() which consume images but produce no image output, VIPS provides vips_sink(). This has type:

int vips_sink( VipsImage ⋆in,  
   VipsStart start,  
   VipsGenerate generate,  
   VipsStop stop,  
   void ⋆a, void ⋆b )

VIPS starts one or more sequences, runs one or more processing functions over image in until all of in has been consumed, and then closes all of the sequences down and returns. VIPS guarantees that the regions the process_fn() is given will be complete and disjoint, that is, every pixel in the image will be passed through exactly one sequence. To make it possible for the sequences to each contribute to the result of the function in an orderly manner, VIPS also guarantees that all start and stop functions are mutually exclusive.

An example should make this clearer. This version of average() is very similar to the average function in the VIPS library — it is only missing polymorphism.


#include <stdio.h>  
#include <stdlib.h>  
#include <vips/vips.h>  
#include <vips/region.h>  
 
/⋆ Start function for average(). We allocate a small piece of  
 ⋆ storage which this sequence will accumulate its total in. Our  
 ⋆ sequence value is just a pointer to this storage area.  
 ⋆  
 ⋆ The first of the two pointers VIPS carries around for us is a  
 ⋆ pointer to the space where we store the grand total.  
 ⋆/  
static int ⋆  
average_start( IMAGE ⋆out )  
{  
   int ⋆seq = IM_NEW( out, int );  
 
   if( !seq )  
      return( NULL );  
   ⋆seq = 0;  
 
   return( seq );  
}  
 
/⋆ Stop function for average(). Add the total which has  
 ⋆ accumulated in our sequence value to the grand total for  
 ⋆ the program.  
 ⋆/  
static int  
average_stop( int ⋆seq, int ⋆gtotal )  
{  
   /⋆ Stop functions are mutually exclusive, so we can write  
    ⋆ to gtotal without clashing with any other stop functions.  
    ⋆/  
   ⋆gtotal += ⋆seq;  
 
   return( 0 );  
}


Figure 3.7: Final PIO average of image


/⋆ Process function for average(). Total this region, and  
 ⋆ add that total to the sequence value.  
 ⋆/  
static int  
average_process( REGION ⋆reg, int ⋆seq )  
{  
   int total, i, y;  
   Rect ⋆r = &reg->valid;  
 
   /⋆ Get the appropriate part of the input image ready.  
    ⋆/  
   if( im_prepare( reg, r ) )  
      return( -1 );  
 
   /⋆ Loop over the region.  
    ⋆/  
   total = 0;  
   for( y = r->top; y < IM_RECT_BOTTOM( r ); y++ ) {  
      unsigned char ⋆p = IM_REGION_ADDR( reg, r->left, y );  
 
      for( i = 0; i < IM_REGION_N_ELEMENTS( reg ); i++ )  
          total += p[i];  
   }  
 
   /⋆ Add to the total for this sequence.  
    ⋆/  
   ⋆seq += total;  
 
   return( 0 );  
}


Figure 3.8: Final PIO average of image (cont.)


/⋆ Find average of image.  
 ⋆/  
int  
average( IMAGE ⋆im, double ⋆out )  
{  
   /⋆ Accumulate grand total here.  
    ⋆/  
   int gtotal = 0;  
 
   /⋆ Prepare im for PIO reading.  
    ⋆/  
   if( im_pincheck( im ) )  
      return( -1 );  
 
   /⋆ Check it is the sort of thing we can process.  
    ⋆/  
   if( im->BandFmt != IM_BANDFMT_UCHAR ||  
      im->Coding != IM_CODING_NONE ) {  
      im_error( "average", "uncoded uchar images only" );  
      return( -1 );  
   }  
 
   /⋆ Loop over the image in pieces, and possibly in parallel.  
    ⋆/  
   if( vips_sink( im,  
      average_start, average_process, average_stop,  
      &gtotal, NULL ) )  
      return( -1 );  
 
   /⋆ Calculate average.  
    ⋆/  
   ⋆out = (double) gtotal / (IM_IMAGE_N_ELEMENTS( im ) ⋆ im->Ysize);  
 
   return( 0 );  
}


Figure 3.9: Final PIO average of image (cont.)

There are a couple of variations on im_prepare(): you can use im_prepare_to() to force writing to a particular place, and im_prepare_thread() to use threaded evaluation. See the man pages.

3.3.5 Output to regions

Regions are written to in just the same way they are read from — by writing to a pointer found with the IM_REGION_ADDR() macro.

vips_sink() does input — im_generate() does output. It has the same type as vips_sink():

int  
im_generate( IMAGE ⋆out,  
   void ⋆(⋆start_fn)(),  
   int (⋆process_fn)(),  
   int (⋆stop_fn)(),  
   void ⋆a, void ⋆b )

The region given to the process function is ready for output. Each time the process function is called, it should fill in the pels in the region it was given. Note that, unlike vips_sink(), the areas the process function is asked to produce are not guaranteed to be either disjoint or complete. Again, VIPS may start up many process functions if it sees fit.

Here is invert(), rewritten to use PIO. This piece of code makes use of a pair of standard start and stop functions provided by the VIPS library: im_start_one() and im_stop_one(). They assume that the first of the two user arguments to im_generate() is the input image. They are defined as:

REGION ⋆  
im_start_one( IMAGE ⋆out, IMAGE ⋆in )  
{  
   return( im_region_create( in ) );  
}

and:

int  
im_stop_one( REGION ⋆seq )  
{  
   return( im_region_free( seq ) );  
}

They are useful for simple functions which expect only one input image. See the manual page for im_start_many() for many-input functions.


#include <stdio.h>  
#include <stdlib.h>  
#include <vips/vips.h>  
#include <vips/region.h>  
 
/⋆ Process function for invert(). Build the pixels in or  
 ⋆ from the appropriate pixels in ir.  
 ⋆/  
static int  
invert_process( REGION ⋆or, REGION ⋆ir )  
{  
   Rect ⋆r = &or->valid;  
   int i, y;  
 
   /⋆ Ask for the part of ir we need to make or. In this  
    ⋆ case, the two areas will be the same.  
    ⋆/  
   if( im_prepare( ir, r ) )  
      return( -1 );  
 
   /⋆ Loop over or writing pels calculated from ir.  
    ⋆/  
   for( y = r->top; y < IM_RECT_BOTTOM( r ); y++ ) {  
      unsigned char ⋆p = IM_REGION_ADDR( ir, r->left, y );  
      unsigned char ⋆q = IM_REGION_ADDR( or, r->left, y );  
 
      for( i = 0; i < IM_REGION_N_ELEMENTS( or ); i++ )  
          q[i] = 255 - p[i];  
   }  
 
   /⋆ Success!  
    ⋆/  
   return( 0 );  
}


Figure 3.10: PIO invert


/⋆ Invert an image.  
 ⋆/  
int  
invert( IMAGE ⋆in, IMAGE ⋆out )  
{  
   /⋆ Check descriptors for PIO compatibility.  
    ⋆/  
   if( im_piocheck( in, out ) )  
      return( -1 );  
 
   /⋆ Check input image for compatibility with us.  
    ⋆/  
   if( in->BandFmt != IM_BANDFMT_UCHAR || in->Coding != IM_CODING_NONE ) {  
      im_error( "invert", "uncoded uchar images only" );  
      return( -1 );  
   }  
 
   /⋆ out inherits from in, as before.  
    ⋆/  
   if( im_cp_desc( out, in ) )  
      return( -1 );  
 
   /⋆ Set demand hints for out.  
    ⋆/  
   if( im_demand_hint( out, IM_THINSTRIP, in, NULL ) )  
      return( -1 );  
 
   /⋆ Build out in pieces, and possibly in parallel!  
    ⋆/  
   if( im_generate( out,  
      im_start_one, invert_process, im_stop_one,  
      in, NULL ) )  
      return( -1 );  
 
   return( 0 );  
}


Figure 3.11: PIO invert (cont.)

Functions have some choice about the way they write their output. Usually, they should just write to the region they were given by im_generate(). They can, if they wish, set up the region for output to some other place. See the manual page for im_region_region(). See also the source for im_copy() and im_extract() for examples of these tricks.

Note also the call to im_demand_hint(). This function hints to the IO system, suggesting the sorts of shapes of region this function is happiest with. VIPS supports four basic shapes — choosing the correct shape can have a dramatic effect on the speed of your function. See the man page for full details.

3.3.6 Callbacks

VIPS lets you attach callbacks to image descriptors. These are functions you provide that VIPS will call when certain events occur. There are more callbacks than are listed here: see the man page for full details.

Close callbacks

These callbacks are invoked just before an image is closed. They are useful for freeing objects which are associated with the image. All callbacks are triggered in the reverse order to the order in which they were attached. This is sometimes important when freeing objects which contain pointers to other objects. Close callbacks are guaranteed to be called, and to be called exactly once.

Use im_add_close_callback() to add a close callback:

typedef int (⋆im_callback)( void ⋆, void ⋆ )  
int im_add_close_callback( IMAGE ⋆,  
   im_callback_fn,  
   void ⋆, void ⋆ )

As with im_generate(), the two void ⋆ pointers are carried around for you by VIPS and may be used as your function sees fit.

Preclose callbacks

Preclose callbacks are called before any shutdown has occured. Everything is still alive and your callback can do anything to the image. Preclose callbacks are guaranteed to be called, and to be called exactly once. See the manual page for im_add_preclose_callback() for full details.

Eval callbacks

These are callbacks which are invoked periodically by VIPS during evaluation. The callback has access to a struct containing information about the progress of evaluation, useful for user-interfaces built on top of VIPS. See the manual page for im_add_eval_callback() for full details.

3.3.7 Memory allocation revisited

When you are using PIO, memory allocation becomes rather more complicated than it was before. There are essentially two types of memory which your function might want to use for working space: memory which is associated with each instance of your function (remember that two copies of you function may be joined together in a pipeline and be running at the same time — you can’t just use global variables), and memory which is local to each sequence which VIPS starts on your argument image.

The first type, memory local to this function instance, typically holds copies of any parameters passed to your image processing function, and links to any read-only tables used by sequences which you run over the image. This should be allocated in your main function.

The second type of memory, memory local to a sequence, should be allocated in a start function. Because this space is private to a sequence, it may be written to. Start and stop functions are guaranteed to be single-threaded, so you may write to the function-local memory within them.

vips-7.38.5/doc/html/vipsmanualch3.html0000644000175000017500000000763512303145652014710 00000000000000 3 Writing VIPS operations

Chapter 3
Writing VIPS operations

vips-7.38.5/doc/html/vipsmanualse17.html0000644000175000017500000004206712303145652015010 00000000000000 Introduction

4.1 Introduction

/bf VIPS reference documentation is in the process of switching to gtkdoc. Half-done manuals are distributed with VIPS, and they should be all done by the next version.

In the meantime, this old and slightly outdated chapter has been left unchanged from the previous version.

This chapter introduces the functions available in the VIPS image processing library. For detailed information on particular functions, refer to the UNIX on-line manual pages. Enter (for example):

example% man im_abs

for information on the function im_abs().

All the comand-line vips operations will print help text too. For example:

example% vips im_extract  
usage: vips im_extract input output  
  left top width height band  
where:  
        input is of type "image"  
        output is of type "image"  
        left is of type "integer"  
        top is of type "integer"  
        width is of type "integer"  
        height is of type "integer"  
        band is of type "integer"  
extract area/band, from package  
  "conversion"  
flags: (PIO function)  
  (coordinate transformer)  
  (area operation)  
  (result can be cached)  
vips: error calling function  
im_run_command: too few arguments

Once you have found a function you need to use, you can call it from a C program (see §2.1), you can call it from C++ or Python (see §1.1), you can call it from the nip2 ((see the nip Manual), or SIAM graphical user-interfaces, or you can run it from the UNIX command line with the vips program. For example:

$ vips im_vips2tiff cam.v t1.tif none  
$ vips im_tiff2vips t1.tif t2.v.v 0  
$ vips im_equal cam.v t2.v t3.v  
$ vips im_min t3.v  
255

VIPS may have been set up at your site with a set of links which call the vips program for you. You may also be able to type:

$ im_vips2tiff cam.v t1.tif none  
$ im_tiff2vips t1.tif t2.v.v 0  
$ im_equal cam.v t2.v t3.v  
$ im_min t3.v

There are a few VIPS programs which you cannot run with vips, either because their arguments are a very strange, or because they are complete mini-applications (like vips2dj). These programs are listed in table 4.1, see the man pages for full details.




Name Description


binfile Read RAW image
debugim Print an image pixel by pixel
edvips Change fields in a VIPS header
header Print fields from a VIPS header
printlines Print an image a line at a time
vips VIPS universal main program
vips-7.14 VIPS wrapper script
find_mosaic Analyse a set of images for overlaps
mergeup Join a set of images together
cooc_features Calculate features of a co-occurence matrix
cooc Calculate a co-occurence matrix
glds_features Calculate features of a grey-level distribution matrix
glds Calculate a grey-level distribution matrix
simcontr Demonstrate simultaneous contrast
sines Generate a sinusoidal test pattern
spatres Generate a spatial resolution test pattern
squares Generate some squares
batch_crop Crop a lot of images
batch_image_convertFile format convert a lot of images
batch_rubber_sheet Warp a lot of images
light_correct Correct a set of images for shading errors
mitsub Format a VIPS image for output to a Mitsubishi 3600
shrink_width Shrink to a specific width
vdump VIPS to mono Postscript
vips2dj VIPS to high-quality colour Postscript



Table 4.1: Miscellaneous programs

vips-7.38.5/doc/html/vipsmanualse7.html0000644000175000017500000001351112303145652014717 00000000000000 Introduction

2.1 Introduction

This chapter explains how to call VIPS functions from C programs. It does not explain how to write new image processing operations (see §3.1), only how to call the ones that VIPS provides. If you want to call VIPS functions fromC++ programs, you can either use the interface described here or you can try out the much nicer C++ interface described in §1.1.

See §4.1 for an introduction to the image processing operations available in the library. Figure 2.1 tries to show an overview of this structure.


PIC


Figure 2.1: VIPS software architecture

VIPS includes a set of UNIX manual pages. Enter (for example):

example% man im_extract

to get an explanation of the im_extract() function.

All the command-line VIPS operations will print help text too. For example:

example% vips im_extract  
usage: vips im_extract input output  
  left top width height band  
where:  
        input is of type "image"  
        output is of type "image"  
        left is of type "integer"  
        top is of type "integer"  
        width is of type "integer"  
        height is of type "integer"  
        band is of type "integer"  
extract area/band, from package  
  "conversion"  
flags: (PIO function)  
  (coordinate transformer)  
  (area operation)  
  (result can be cached)  
vips: error calling function  
im_run_command: too few arguments

vips-7.38.5/doc/html/vipsmanualse4.html0000644000175000017500000003407612303145652014725 00000000000000 The VMask class

1.4 The VMask class

The VMask class is an abstraction over the VIPS DOUBLEMASK and INTMASK types which gives convenient and safe representation of matrices.

VMask has two sub-classes, VIMask and VDMask. These represent matrices of integers and doubles respectively.

1.4.1 Constructors

There are four constructors for VIMask and VDMask:

VIMask( int xsize, int ysize );  
VIMask( int xsize, int ysize,  
  int scale, int offset, ... );  
VIMask( int xsize, int ysize,  
  int scale, int offset,  
  std::vector<int> coeff );  
VIMask( const char ⋆name );  
VIMask();  
VDMask( int xsize, int ysize );  
VDMask( int xsize, int ysize,  
  double scale, double offset, ... );  
VDMask( int xsize, int ysize,  
  double scale, double offset,  
  std::vector<double> coeff );  
VDMask( const char ⋆name );  
VDMask();

The first form creates an empty matrix, with the specified dimensions; the second form initialises a matrix from a varargs list; the third form sets the matrix from a vector of coefficients; the fourth from the named file. The final form makes a mask object with no contents yet.

The varargs constructors are not wrapped in Python — use the vector constructor instead. For example:

m = VMask.VIMask (3, 3, 1, 0,  
  [-1, -1, -1,  
   -1,  8, -1,  
   -1, -1, -1])

1.4.2 Projection functions

A set of member functions of VIMask provide access to the fields in the matrix:

int xsize() const;  
int ysize() const;  
int scale() const;  
int offset() const;  
const char ⋆filename() const;

VDMask is the same, except that the scale() and offset() members return double. VMask allows all operations that are common to VIMask and VDMask.

1.4.3 Assignment

VMask defines copy and assignment with pointer-style semantics. You can write stuff like:

VIMask fred( "mask" );  
VMask jim;  
 
jim = fred;

This reads the file mask, noting a pointer to the mask in fred. It then makes jim also point to it, so jim and fred are sharing the same underlying matrix values.

Internally, a VMask object is just a pointer to a reference-counting block, which in turn holds a pointer to the underlying VIPS MASK type. You can therefore efficiently pass VMask objects to functions by value, and return VMask objects as function results.

1.4.4 Computing with VMask

You can use [] to get at matrix elements, numbered left-to-right, top-to-bottom. Alternatively, use () to address elements by x,y position. For example:

VIMask fred( "mask" );  
 
for( int i = 0; i < fred.xsize(); i++ )  
    fred[i] = 12;

will set the first line of the matrix to 12, and:

VDMask fred( "mask" );  
 
for( int x = 0; x < fred.xsize(); x++ )  
    fred(x, x) = 12.0;

will set the leading diagonal to 12.

These don’t work well in Python, so there’s an extra member, get(), which will get an element by x,y position.

x = mat.get (2, 4)

See the member functions below for other operations on VMask.

1.4.5 VIMask operations

The following operations are defined for VIMask:

// Cast to VDMask and VImage  
operator VDMask();  
operator VImage();  
 
// Build gaussian and log masks  
static VIMask gauss( double, double );  
static VIMask gauss_sep( double, double );  
static VIMask log( double, double );  
 
// Rotate  
VIMask rotate45();  
VIMask rotate90();  
 
// Transpose, invert, join and multiply  
VDMask trn() ;  
VDMask inv();  
VDMask cat( VDMask );  
VDMask mul( VDMask );

1.4.6 VDMask operations

The following operations are defined for VDMask:

// Cast to VIMask and VImage  
operator VIMask();  
operator VImage();  
 
// Build gauss and log masks  
static VDMask gauss( double, double );  
static VDMask log( double, double );  
 
// Rotate  
VDMask rotate45();  
VDMask rotate90();  
 
// Scale to intmask  
VIMask scalei();  
 
// Transpose, invert, join and multiply  
VDMask trn();  
VDMask inv();  
VDMask cat( VDMask );  
VDMask mul( VDMask );

1.4.7 Output of masks

You can output masks with the usual << operator.

vips-7.38.5/doc/html/vipsmanualli2.html0000644000175000017500000001544312303145652014715 00000000000000 List of Figures

List of Figures

vips-7.38.5/doc/html/vipsmanualse14.html0000644000175000017500000007451212303145652015005 00000000000000 Programming WIO operations

3.2 Programming WIO operations

WIO is the style for you if you want ease of programming, or if your algorithm must have the whole of the input image available at the same time. For example, a Fourier transform operation is unable to produce any output until it has seen the whole of the input image.

3.2.1 Input from an image

In WIO input, the whole of the image data is made available to the program via the data field of the descriptor. To make an image ready for reading in this style, programs should call im_incheck():

int im_incheck( IMAGE ⋆im )

If it succeeds, it returns 0, if it fails, it returns non-zero and sets im_error(). On success, VIPS guarantees that all of the user-accessible fields in the descriptor contain valid data, and that all of the image data may be read by simply reading from the data field (see below for an example). This will only work for images less than about 2GB in size.

VIPS has some simple macros to help address calculations on images:

int IM_IMAGE_SIZEOF_ELEMENT( IMAGE ⋆ )  
int IM_IMAGE_SIZEOF_PEL( IMAGE ⋆ )  
int IM_IMAGE_SIZEOF_LINE( IMAGE ⋆ )  
int IM_IMAGE_N_ELEMENTS( IMAGE ⋆ )  
char ⋆IM_IMAGE_ADDR( IMAGE ⋆,  
  int x, int y )

These macros calculate sizeof() a band element, a pel and a horizontal line of pels. IM_IMAGE_N_ELEMENTS returns the number of band elements across an image. IM_IMAGE_ADDR calculates the address of a pixel in an image. If DEBUG is defined, it does bounds checking too.


#include <stdio.h>  
#include <stdlib.h>  
 
#include <vips/vips.h>  
 
int  
average( IMAGE ⋆im, double ⋆out )  
{  
  int x, y;  
  long total;  
 
  /⋆ Prepare for reading.  
   ⋆/  
  if( im_incheck( im ) )  
    return( -1 );  
 
  /⋆ Check that this is the kind of image we can process.  
   ⋆/  
  if( im->BandFmt != IM_BANDFMT_UCHAR ||  
    im->Coding != IM_CODING_NONE ) {  
    im_error( "average", "uncoded uchar images only" );  
    return( -1 );  
  }  
 
  /⋆ Loop over the image, summing pixels.  
   ⋆/  
  total = 0;  
  for( y = 0; y < im->Ysize; y++ ) {  
    unsigned char ⋆p = (unsigned char ⋆) IM_IMAGE_ADDR( im, 0, y );  
 
    for( x = 0; x < IM_IMAGE_N_ELEMENTS( im ); x++ )  
      total += p[x];  
  }  
 
  /⋆ Calculate average.  
   ⋆/  
  ⋆out = (double) total /  
    (IM_IMAGE_N_ELEMENTS( im ) ⋆ im->Ysize));  
 
  /⋆ Success!  
   ⋆/  
  return( 0 );  
}


Figure 3.1: Find average of image

Figure 3.1 is a simple WIO operation which calculates the average of an unsigned char image. It will work for any size image, with any number of bands. See §3.2.3 for techniques for making operations which will work for any image type. This operation might be called from an application with:

#include <stdio.h>  
#include <stdlib.h>  
 
#include <vips/vips.h>  
 
void  
find_average( char ⋆name )  
{  
  IMAGE ⋆im;  
  double avg;  
 
  if( !(im = im_open( name, "r" )) ||  
    average( im, &avg ) ||  
    im_close( im ) )  
    error_exit( "failure!" );  
 
  printf( "Average of \"%s\" is %G\n",  
    name, avg );  
}

When you write an image processing operation, you can test it by writing a VIPS function descriptor and calling it from the vips universal main program, or from the nip2 interface. See §2.1.

3.2.2 Output to an image

Before attempting WIO output, programs should call im_outcheck(). It has type:

int im_outcheck( IMAGE ⋆im )

If im_outcheck() succeeds, VIPS guarantees that WIO output is sensible.

Programs should then set fields in the output descriptor to describe the sort of image they wish to write (size, type, and so on) and call im_setupout(). It has type:

int im_setupout( IMAGE ⋆im )

im_setupout() creates the output file or memory buffer, using the size and type fields that were filled in by the program between the calls to im_outcheck() and im_setupout(), and gets it ready for writing.

Pels are written with im_writeline(). This takes a y position (pel (0,0) is in the top-left-hand corner of the image), a descriptor and a pointer to a line of pels. It has type:

int im_writeline( int y,  
  IMAGE ⋆im, unsigned char ⋆pels )

Two convenience functions are available to make this process slightly easier. im_iocheck() is useful for programs which take one input image and produce one image output. It simply calls im_incheck() and im_outcheck(). It has type:

int im_iocheck( IMAGE ⋆in, IMAGE ⋆out )

The second convenience function copies the fields describing size, type, metadata and history from one image descriptor to another. It is useful when the output image will be similar in size and type to the input image. It has type:

int im_cp_desc( IMAGE ⋆out, IMAGE ⋆in )

There’s also im_cp_descv(), see the man page.


#include <stdio.h>  
#include <stdlib.h>  
 
#include <vips/vips.h>  
#include <vips/util.h>  
 
int  
invert( IMAGE ⋆in, IMAGE ⋆out )  
{  
  int x, y;  
  unsigned char ⋆buffer;  
 
  /⋆ Check images.  
   ⋆/  
  if( im_iocheck( in, out ) )  
    return( -1 );  
  if( in->BandFmt != IM_BANDFMT_UCHAR || in->Coding != IM_CODING_NONE ) {  
    im_error( "invert", "uncoded uchar images only" );  
    return( -1 );  
  }  
 
  /⋆ Make output image.  
   ⋆/  
  if( im_cp_desc( out, in ) )  
    return( -1 );  
  if( im_setupout( out ) )  
    return( -1 );  
 
  /⋆ Allocate a line buffer and make sure it will be freed correctly.  
   ⋆/  
  if( !(buffer = IM_ARRAY( out,  
    IM_IMAGE_SIZEOF_LINE( in ), unsigned char )) )  
    return( -1 );  
 
  /⋆ Loop over the image!  
   ⋆/  
  for( y = 0; y < in->Ysize; y++ ) {  
    unsigned char ⋆p = (unsigned char ⋆) IM_IMAGE_ADDR( in, 0, y );  
 
    for( x = 0; x < IM_IMAGE_N_ELEMENTS( in ); x++ )  
      buffer[x] = 255 - p[x];  
    if( im_writeline( y, out, buffer ) )  
      return( -1 );  
  }  
 
  return( 0 );  
}


Figure 3.2: Invert an image

Figure 3.2 is a WIO VIPS operation which finds the photographic negative of an unsigned char image. See §2.2.10 for an explanation of IM_ARRAY. This operation might be called from an application with:

#include <stdio.h>  
#include <stdlib.h>  
 
#include <vips/vips.h>  
 
void  
find_negative( char ⋆inn, char ⋆outn )  
{  
  IMAGE ⋆in, ⋆out;  
 
  if( !(in = im_open( inn, "r" )) ||  
    !(out = im_open( outn, "w" )) ||  
    invert( in, out ) ||  
    im_updatehist( out, "invert" ) ||  
    im_close( in ) ||  
    im_close( out ) )  
    error_exit( "failure!" );  
}

See §2.2.7 for an explanation of the call to im_updatehist().

3.2.3 Polymorphism

Most image processing operations in the VIPS library can operate on images of any type (IM_BANDFMT_UCHAR, as in our examples above, also IM_BANDFMT_UINT etc.). This is usually implemented with code replication: the operation contains loops for processing every kind of image, and when called, invokes the appropriate loop for the image it is given.

As an example, figure 3.3 calculates exp() for every pel in an image. If the input image is double, we write double output. If it is any other non-complex type, we write float. If it is complex, we flag an error (exp() of a complex number is fiddly). The example uses an image type predicate, im_iscomplex(). There are a number of these predicate functions, see the manual page.


#include <stdio.h>  
#include <stdlib.h>  
#include <math.h>  
 
#include <vips/vips.h>  
#include <vips/util.h>  
 
/⋆ Exponential transform.  
 ⋆/  
int  
exptra( IMAGE ⋆in, IMAGE ⋆out )  
{  
  int x, y;  
  unsigned char ⋆buffer;  
 
  /⋆ Check descriptors.  
   ⋆/  
  if( im_iocheck( in, out ) )  
    return( -1 );  
  if( in->Coding != IM_CODING_NONE || im_iscomplex( in ) ) {  
    im_error( "exptra", "uncoded non-complex only" );  
    return( -1 );  
  }  
 
  /⋆ Make output image.  
   ⋆/  
  if( im_cp_desc( out, in ) )  
    return( -1 );  
  if( in->BandFmt != IM_BANDFMT_DOUBLE )  
    out->BandFmt = IM_BANDFMT_FLOAT;  
  if( im_setupout( out ) )  
    return( -1 );


Figure 3.3: Calculate exp() for an image


  /⋆ Allocate a line buffer.  
   ⋆/  
  if( !(buffer = IM_ARRAY( out, IM_IMAGE_SIZEOF_LINE( in ), unsigned char )) )  
    return( -1 );  
 
/⋆ Our inner loop, parameterised for both the input and output  
 ⋆ types. Note the use of ‘\', since macros have to be all on  
 ⋆ one line.  
 ⋆/  
#define loop(IN, OUT) { \  
  for( y = 0; y < in->Ysize; y++ ) { \  
    IN ⋆p = (IN ⋆) IM_IMAGE_ADDR( in, 0, y ); \  
    OUT ⋆q = (OUT ⋆) buffer; \  
    \  
    for( x = 0; x < IM_IMAGE_N_ELEMENTS( in ); x++ ) \  
      q[x] = exp( p[x] ); \  
    if( im_writeline( y, out, buffer ) ) \  
      return( -1 ); \  
   } \  
}  
 
  /⋆ Switch for all the types we can handle.  
   ⋆/  
  switch( in->BandFmt ) {  
    case IM_BANDFMT_UCHAR: loop( unsigned char, float ); break;  
    case IM_BANDFMT_CHAR:  loop( char, float ); break;  
    case IM_BANDFMT_USHORT:loop( unsigned short, float ); break;  
    case IM_BANDFMT_SHORT: loop( short, float ); break;  
    case IM_BANDFMT_UINT:  loop( unsigned int, float ); break;  
    case IM_BANDFMT_INT:   loop( int, float ); break;  
    case IM_BANDFMT_FLOAT: loop( float, float ); break;  
    case IM_BANDFMT_DOUBLE:loop( double, double ); break;  
    default:  
      im_error( "exptra", "internal error" );  
      return( -1 );  
  }  
 
  /⋆ Success.  
   ⋆/  
  return( 0 );  
}


Figure 3.4: Calculate exp() for an image (cont)

vips-7.38.5/doc/html/vipsmanualse3.html0000644000175000017500000007415612303145652014727 00000000000000 The VImage class

1.3 The VImage class

The VImage class is a layer over the VIPS IMAGE type. It automates almost all of the image creation and destruction issues that complicate the C API, it automates error handling, and it provides a convenient system for composing operations.

1.3.1 Constructors

There are two principal constructors for VImage:

VImage::VImage( const char ⋆name,  
  const char ⋆mode = "r" );  
VImage::VImage();

The first form creates a new VImage, linking it to the named file. mode sets the mode for the file: it can take the following values:

"r"
The named image file is opened read-only. This is the default mode.
"w"
A VImage is created which, when written to, will write pixels to disc in the specified file. Any existing file of this name is deleted.
"t"
As the "w" mode, but pixels written to the VImage will be saved in a temporary memory buffer.
"p"
This creates a special ‘partial’ image. Partial images represent intermediate results, and are used to join VIPS operations together, see §1.3.5.
"rw"
As the "r" mode, but the image is mapped into your address space read-write. This mode is useful for paintbox-style applications which need to directly modify an image. See §4.2.8.

The second form of constructor is shorthand for:

VImage( "VImage:1", "p" )

It is used for representing intermediate results of computations.

Two further constructors are handy for wrapping VImage around existing images.

VImage( void ⋆buffer,  
  int width, int height, int bands,  
  TBandFmt format );  
VImage( void ⋆image );

The first constructor makes a VImage from an area of memory (perhaps from another image processing system), and the second makes a VImage from an IMAGE.

In both these two cases, the VIPS C++ API does not assume responsibility for the resources: it’s up to you to make sure the buffer is freed.

The Python interface adds the usual frombuffer and fromstring methods.

VImage.fromstring (string,  
  width, height, bands, format) ->  
  VImage

VImage.frombuffer (buffer,  
  width, height, bands, format) ->  
  VImage

Use fromstring to avoid worries about object lifetime, but you’ll see a lot of copies and high memory use. Use frombuffer for speed, but you have to manage object lifetime yourself.

They are useful for moving images into VIPS from other image processing libraries. There’s also a utility function, vips_from_PIL_mode, which turns a PIL mode into a VIPS band, format, type triple.

VImage.vips_from_PIL_mode (mode) ->  
  (bands, format, type)

See also tobuffer and tostring below.

1.3.2 File conversion

VIPS can read and write a number of different file formats. Information about file format conversion is taken from the filename. For example:

VImage jim( "fred.jpg" );

This will decompress the file fred.jpg to a memory buffer, wrap a VIPS image around the buffer and build a reference to it called jim.

Options are passed to the file format converters embedded in the filename. For example:

VImage out( "jen.tif:deflate", "w" );

Writing to the descriptor out will cause a TIFF image to be written to disc with deflate compression.

See the manual page for im_open(3) for details of all the file formats and conversions available. See the man page for VipsFormat(3) for a lower-level API which lets you control more of the detail of reading and writing data and is more suitable for large files.

1.3.3 Projection functions

A set of member functions of VImage provide access to the fields in the header:

int Xsize();  
int Ysize();  
int Bands();  
TBandFmt BandFmt();  
TCoding Coding();  
TType Type();  
float Xres();  
float Yres();  
int Length();  
TCompression Compression();  
short Level();  
int Xoffset();  
int Yoffset();

Where TBandFmt, TCoding, TType and TCompression are enums for the types in the VIPS file header. See section §1.2.1 for an explanation of all of these fields.

Two functions give access to the filename and history fields maintained by the VIPS IO system.

char ⋆filename();  
char ⋆Hist();

You can get and set extra metadata fields with meta_get() and meta_set(). They read and write GValue objects, see §2.2.6.

void meta_set( const char ⋆field, GValue ⋆value );  
void meta_get( const char ⋆field, GValue ⋆value_copy );  
GType meta_get_type( const char ⋆field );

A set of convenience functions build on these two to provide accessors for common types.

int meta_get_int( const char ⋆field )  
double meta_get_double( const char ⋆field )  
const char ⋆meta_get_string( const char ⋆field )  
void ⋆meta_get_area( const char ⋆field )  
void ⋆meta_get_blob( const char ⋆field, size_t ⋆length )  
 
void meta_set( const char ⋆field, int value )  
void meta_set( const char ⋆field, double value )  
void meta_set( const char ⋆field, const char ⋆value )  
void meta_set( const char ⋆field,  
VCallback free_fn, void ⋆value )  
void meta_set( const char ⋆field,  
VCallback free_fn, void ⋆value, size_t length )

The image() member function provides access to the IMAGE descriptor underlying the C++ API. See the §2.1 for details.

void ⋆image();

The data() member function returns a pointer to an array of pixel data for the image.

void ⋆data() const;

This can be very slow and use huge amounts of RAM.

The Python interface adds tobuffer and tostring. These operations call data() to generate the image pixels and then either copy it and return the copy as a string, or wrap the pixels up as a Python buffer object.

Use tostring to avoid worries about object lifetime, but you’ll see a lot of copies and high memory use. Use tobuffer for speed, but you have to manage object lifetime yourself.

They are useful for moving images from VIPS into other image processing libraries. There’s also a utility function, PIL_mode_from_vips, which makes a PIL mode from a VIPS image.

VImage.PIL_mode_from_vips (vips-image) ->  
  mode

See also frombuffer and fromstring above.

1.3.4 Assignment

VImage defines copy and assignment, with reference-counted, pointer-style semantics. For example, if you write:

VImage fred( "fred.v" );  
VImage jim( "jim.v" );  
 
fred = jim;

This will automatically close the file fred.v, and make the variable fred point to the image jim.v instead. Both jim and fred now point to the same underlying image object.

Internally, a VImage object is just a pointer to a reference-counting block, which in turn holds a pointer to the underlying VIPS IMAGE type. You can therefore efficiently pass VImage objects to functions by value, and return VImage objects as function results.

1.3.5 Computing with VImages

All VIPS image processing operations are member functions of the VImage class. For example:

VImage fred( "fred.v" );  
VImage jim( "jim.v" );  
 
VImage result = fred.cos() + jim;

Will apply im_costra() to fred.v, making an image where each pixel is the cosine of the corresponding pixel in fred.v; then add that image to jim.v. Finally, the result will be held in result.

VIPS is a demand-driven image processing system: when it computes expressions like this, no actual pixels are calculated (although you can use the projection functions on images — result.BandFmt() for example). When you finally write the result to a file (or use some operation that needs pixel values, such as min(), find minimum value), VIPS evaluates all of the operations you have called to that point in parallel. If you have more than one CPU in your machine, the load is spread over the available processors. This means that there is no limit to the size of the images you can process.

§4.2 lists all of the VIPS packages. These general rules apply:

  • VIPS operation names become C++ member function names by dropping the im_ prefix, and if present, the tra postfix, the const postfix and the _vec postfix. For example, the VIPS operation im_extract() becomes extract(), and im_costra() becomes cos().
  • The VImage object to which you apply the member function is the first input image, the member function returns the first output. If there is no image input, the member is declared static.

    For example, im_project(3) returns two images. You can call it from Python like this:

    hout = VImage.VImage ()  
    vout = im.project (hout)

    In other words, .project() writes the second result to the VImage you pass as an argument.

  • INTMASK and DOUBLEMASK types become VMask objects, im_col_display types become VDisplay objects.
  • Several C API functions can map to the same C++ API member. For example, im_andimage, im_andimage_vec and im_andimageconst all map to the member andimage. The API relies on overloading to discriminate between these functions.

This part of the C++ API is generated automatically from the VIPS function database, so it should all be up-to-date.

There are a set of arithmetic operators defined for your convenience. You can generally write any arithmetic expression and include VImage in there.

VImage fred( "fred.v" );  
VImage jim( "jim.v" );  
 
Vimage v = int((fred + jim) / 2);

1.3.6 Writing results

Once you have computed some result, you can write it to a file with the member write(). It takes the following forms:

VImage write( const char ⋆name );  
VImage write( VImage out );  
VImage write();

The first form simply writes the image to the named file. The second form writes the image to the specified VImage object, for example:

VImage fred( "fred.v" );  
VImage jim( "jim buffer", "t" );  
 
Vimage v = (fred + 42).write( jim );

This creates a temporary memory buffer called jim, and fills it with the result of adding 42 to every pixel in fred.v.

The final form of write() writes the image to a memory buffer, and returns that.

1.3.7 Type conversions

Two type conversions are defined: you can cast VImage to a VDMask and to a VIMask.

operator VDMask();  
operator VIMask();

These operations are slow and need a lot of memory! Emergencies only.

vips-7.38.5/doc/html/vipsmanualli3.html0000644000175000017500000000505712303145652014716 00000000000000 List of Tables

List of Tables

vips-7.38.5/doc/html/figs/0000755000175000017500000000000012303145652012242 500000000000000vips-7.38.5/doc/html/figs/arch.png0000644000175000017500000007664712303145652013631 00000000000000‰PNG  IHDR“u-þsBIT|dˆtEXtSoftwarewww.inkscape.org›î< IDATxœìÝw|ÕÚÀñßÙôF $Bè„& ]AQD”+6P,Ø®•÷bQﵡb»ŠW± "¢± ‚ôÞ!¤Ñ ½’Ýóþ1»›%†’Í„ìóý|&Ù™òÌîìö‰À0­õN3#ÂH2)‡Rª °hc éw^Ý }²ÍŒKœ‹C¾ð¯v0»X-@0Vk½ÈìÈ„¨Í$™”¡”j ¬ÂÁËÏl„çÌŽKTÔü0¸íÈö¬%”ŸÌŽJˆÚJ’‰ ¥T °è'áËåp}ºÙq‰óµ#†^ëY@/­õ^“ƒ¢V’dâB)õ0”†O—ÁírEÐo[ô»rü€}@7­užÙQ QÛH2±SJõ–}m€·w™¨BsÂáW‚VÀsZë)fG$Dm#ÉPJ)`-К€ý Á[>˜Zåš¾°¸ ´ÒZ5;"!jo³¨!FbÜÑ<¿¼­¦F#Üàíð{s( þxÔ숄¨M¤d(¥æ7@ûØ)—ÖZ7õ„ÙµÖÑfG#Dmâñ%¥”0ÄèHÛNµÖMñödÒT)ÕUk½Ù숄¨-<>™—ö¦8Æ% ɤ~êçBF0Fc’L„¨"’L Öø× :ä˜J•zË3êr–ÅÍŽDˆÚD’‰³Ç9wJ‹Z-<×þ"ÒÔ0„¨e$™8“IXRÅåœÉ$ÂÔ0„¨e$™@}ã_H!’Lj¢*®¶ko^µó³I2eü³:ÿˆÚÌù$Fy2¦UH~PNZc”LjD×°!ÞmÚà_ËêÞ`Ê]ÿÐP¼bc 8Ÿùzy¡{ö$ÄÑK@h(^æ~¶rc•î ÉÄ©òÉdšîÝËM{÷rÓ† \÷ŸÿбeKüÎ6]@¼õ¹{ì1Ú|÷×T6¦séÖ¬ážN*ii¾`×Ï|£¢ðY»–{ƒ‚P€mÁ®›8‘æÕ±N§ï$™áRÍå¤5•¬æjÒÿ† ©ûÀÌ‹Œ$pÜ8ºIÇ6møâLÓÕ«‡÷?ÿÉGaƒcW§6¥¨tL`-oYsæ¸cÇÎ'¥œÓXëãóÓ®]˜|ÕœÍfÞ²…¨½$™”r”L*5“')™5‹ƒK–pxÛ6¹äêÞu±óæ¿`Î?ù„>?þHÒØ±´X¼˜Á/¼ÀZ¥°úÁiþÐiûvŽLÊÖC‡(P Þ~›‹{÷&&/¢ÿþ—ͳgs`Ü8¢;t ôèQò¯¿ž›6qpʶ¥¥Q|ºÀÛ·'xêTzÕ«Gà×_³mútâbc ºújšÎŸOŠŸ–~`ð+¯°~òdz(…zýu6üú+Çó¹ë.bÆ£KN…3f°Õ>ØØ®¾š¦Z“Gîĉ4Š"¨°ë5×Ðnõj’^z‰Çs n]¼?þ˜~11„mÜHòÞ½dÔ©ƒï”)T²5g-ÉD7j.§ÊWsÙKÎù4oN€Í†õÈòƒ‚ð™<™>Ž÷zõ¢Î-·pÙæÍœøë/üü3q?ÿLÜ‘#ä+…nÖŒˆñãé¶d {zô zÁ†;¦Ÿ?ŸËoº‰>Ë–±/3“¼Ï>ã–1cˆl={Òèî»8f /f×¥—Òòûï¹ú ±ëÿ›¡ññ¤'%‘þ꫌zè!£:ªKêL{ÀæïC†ÐkÆ ®Ý·´ÔT²-bBx8Þ€müxš¼ý67:ĉ]»H}óM®±¸6À6x0í»t¡>`ëÓ‡Èdð5×ÐöÇÙ5díçÌá Ǹ¿ýÆu=zÐ|Á¶·nMØ /0lÀb*ûI5—î!%§ÊWsY,Ø‚ƒ œ;—uëØ£íV­bKb"¹ÿþ7ëV­âŸ­Zá·?ù“&ÑeÓ&v&&’;g‰o¾ ï¼Ã>›Í¸ÖbÁæãƒÏÀÌÉÊ¢dñb’ÿú‹‡Áb«¯¦×äÉ|ýúëìX·Žº?Nïo¾aŽÅ‚ÍË ¯K.aNq1¶µkIýþ{&x{c+))ÿRÛdò`Éüï¾›^ï¼Ã>‹ÅH6öÏF|ñ«_|Ñ(!ôïOÛ;ï$æå—Ù}ÿýô\½šmcÆð›}¶ÖGa¤½ºË hûü¬JaÓÛ%—0×fCïÛlj?ä&ÀÚ£u/¾˜ö0íÏ?91u*;$Êb©Šj?)™áR2qª’’‰cG¥“’H>œð=`Û¸‘Ì={ØÿôÓ\äë W\A·3Xç2=e楓“9”•E±cz//¼.ºˆ Þ½©ëå…×_àÝ:""uLORq1%€mùrŽÔ¢Åi/`éR’ý+VNǼ”qñ´sý¾þºt¹©©kßÞ72’k×’èxoÑ"]×K)°—ÞlJ¡÷î%Éfà ØV¯æXýúÔ«WK·nÔËÍ%ïÏ?9æ˜vï^@ùWœU¬“’‰î %']és&J¡óóÉ=š_Ê{ÿÓOYóÔS {â ŽPðÉ'ÆÎVkc¹ 6GÉD)´cG[f6¶ädr•BõèAÝE‹Œs011ÔÏϧûŽÚf;%I9ã;Ý:ÆÆRŒs.­ZQ¯ À9/GÉÄ9¿¢"#IÙçéœoA11Ôs¼×¡u1Û;mŸŸ­œõsþ?tˆœ  ›7Ç/1‘€¨(B%ãtñŸ;I&B¸ƒ”Lœ4Tî¨×j¯ÂÒ+£NéÞy‡½ –ÇgØâŬu ?r„üÌL2®¹†0ǰ2Ws9¯´²X°ÅÅ‘sð ~˜îЫ!½zÑ~íZö8â(oÚÓÅpýõt ÅÒ¢¾ƒÑiÓ&c^ö8\§Å¥ÚʪTiÕÕúõì¹ôRÚ·iƒ_:¨›o¦«ërí‰ÇV^Œ®W~ýü3©é餽ÿ>š4ÁgÒ$Z7oN³rÖé<:¹šKwdâ¤mTnGåØ9ÂiŽÍ†uÉVeªÂo.ºˆ6G2yåJ&%$|ß}¬pÄáR qNë(”Ó‘šÊ‰øxÛµ‹É……Ý?Ë\ÖÉQ5õ·ù¸.ëX‘MÎöíLNJâñ'È*óy8Ç-£ë¼KJ°Þ}7_têD‹}ûø×¸qôÙ²…mEEî³=÷NΙáÿ¤E¥Ôà*è»þúÖÝË[º”á!!ôéÃ7U1¿.]II¡èèÑÓ_ö{®BBðjÖŒ€;È=ûاKPj*E”T6&‡ôtþï»ïX~ャ©Üœžè ¯ß i­ý«$8!„œ3qQ÷™œÖàÁ„Ý{/]/¹„îðZU-kËçÑ¥åä`۱øσJ4°¸{7Ù•åý÷éݶ-‘äöìI‹õ쳬§ÒWsI5—î ÉÄÉæÖ»ÍëÖÅbµRrË-¼½a'ܵœÚâÓOÙyÇØ6$äÛoYþÊ+l;vÌ™è*ÁËâB¸‰$“Rn-™ÌËá¹s«¥ÄÙ­_OÆúõ¬ªú9Ë9!ÜA’‰“þÛ¥´¢V±—H¤šKwd‚ãds±7ò<ígqÜÔ0„¨e$™à¨z:á¼ÙNÔfGCì/RL CˆZF’‰3™dÕG’‰8V×þ"ÕÔ0„¨e$™@’ñ/«ÄûBËS£n–ÔÜþb¿©aQËH2_€ÐÞðz'ø ’7ʼnšë§0H±÷ühf$BÔ6ŸL´ÖJ©À@XÖ Üq9ª¨>¼Øþ" øÃÄ@„¨u<>™ØÍ¾žð]#%õéµN†7ü~¥½g±Öº n€B8x|Û\J©@`­WÁ¾·ÌŽITµaCaÑ8ŒûMºi­·˜µŠ´ h­ógŒ¾¸>ðd*Ý:­t5§û¹>,eÿº¿D"DÕ“’‰Rʬºo|= ®?jv\¢²ûBç—àDK è µ>hvTBÔ6’L\(¥b0JÔ9?= }«¬U^QÝ2½ ëãÔ£zë:­õ³£¢6’dR†RjÆåÂ>˜¯L…‡Ï6¨iV×ë&CZGû€§´Ö/›’µ˜$“r(¥F_àUW|_ÿõ«ìaOÂîë3'B~¸}À«Zëÿ35$!j9I&§¡”º˜DCSaè—ðêJh^TÍáÈ—tVyx¶|q ¤w²,îÖZnfdBxI&g ”Š^Æá¼òÍR‘¡ËZh™ ­O@çL’‡«ØYv‡Bb#ØÜ ô‚“u]FZ<ªµÞdRBxI&ç@)Õø0ÔìXÄYí&k­™ˆžD’I(¥šÃ@ ž¹  Ø ,~ÐZo79!<’$“J°ß9D^&‡ãI4ÆÃ­k­3ÌF!ÉD!DæT„BTš$!„•&ÉD!D¥I2BQi’L„BTš$!„•&ÉD!D¥I2BQi’L„BTš$!„•æmv"¥T= 'éÒù™”g±G Ør!?×ÝÞ€hŒ6Þ"p¤­·êT„±-9ºuZëLsCºðHÛ\çH)Õ¸£Åà€¹‰26?sµÖ»Íæl”R±Àhà: ›ÉáˆSÄxÎ|`ŽÖ:Íäx.’LÎB) <<únb-„Ð"ð’²Úh ËŽûC¦ØT™7gOk­“L ï ”R1ÀT`,à·EC½"hPu‹OyK¸™UÁ ?8áÙ¾eÞÌÞ^ÓZçšÜC’É(¥†Œ!þ%Ð7†¥ÀÍ©ÐPž oº Ìm?D²HÈð·¿Q„ñ”Ì©ºläJ)< <…³J´~! LëR`t:ØL Qî _EÀÂHX…ŽSiÀ]ZëfFW“I29 ¥ÔdŒ‘oŒŠ‡×ö@Óê~þ»8g…x¡¼ ÙŽsXó€Û´ÖyfE¥” >®7†Ô)‚ûvÃs à/ ¤Æ:è·ƒy-¡Ä‚Qê}JkýŠÙ‘ÕD’LʰAþã¹ïÏxÿf5t5mg$*ê˜7Œ½~if°hÆIUûÅË0N°ƒ“aÖF“RícsŒéq¡öŸwÔ„oM"ɤ ¥Ô³À FßåÉðý:±š”8OÅ»A+ààj­uµ}—J)/à'`0( lƒwjüÅ¢<9^0²'üæ8@yNk=ÅÔjI&.”R£9€‚! ðÓ³c•õL+˜ÚÓÞó®ÖúÁêZ²Rj:ð€Ñ÷ô:xqu-[¸ËÕ½aI Œ*¯µÖsÍŽ¨¦db§”jÄu¡]lü¥>»V¸¾'|ßÖÞ3Xký«»—¨”º£4ŒÜ óÖ¹{™¢:ä[àâÁ°§ ´ÐZ7;ªš@’‰Rê-àŸà¶}­ ÌŽIT•"®øÀfàbwÖwÛÏ»mºBËã°óGð“Z­GB¡ð–Öú³#ª $™J©ÀnÀîØ Ÿl1;&QվЄ[†Ø{nÑZå®%)¥n¾4ú¾\7§¸kYÂ,wvÿuŠX­u‚Ù™M’  ”zxB !á;ivLº-M€ZëþîZŠRêOàRèr6/q×r„™Žù@‹1ãqCã$³#2›´Íeaü»r„É}$µÖ­»íÉä¥T˜ÖúXU/A)\Rº<ä¼[­Vdì/¾ëŒ±ÿdbvfSJµÚ}£‘-v{2üŸJ¼€k1î¨j×ð¶Ë“í©ö•hO&m”Rí´Ö{ÌŽÈLÒ=ô3þÁ G0~üîî¬Ò™Ñ5(‚N‡ìßû@ÜÃ>ßN‡ A1U´ÍŒM£O?¥ÛÒ¥ øì3.îߟºÔ²í)5•›ÚµÃ¯¼÷î»&+Wr`U ë±cÜܬ>æÆ|Ãac¿8÷#žK’ Dÿfƒw Õ³!VGÂ’®Ü.:Ãø¾ß{•³Ï7:ƒ*Ú^æÌ¡÷§Ÿ2ÔÛV®ä ,XÀðAƒ¨K-ÚžÂÂñ5šYüÛ{!!x7h@€£ñbvgeQeÉúü:o«±ßpýÞ=—ÇWsáÜÂr06Q«5r´üé¦Dº,§ÒÛÓwÐtÄ:÷ëÇë×ãØqÍ&ûKÀwÝ©õ÷ï'ûƒH²ZÑ£F‘˜H^óæõêEØ?phÕ*2»u#äúëiº`‡×­#Ë1ßG¥å—_rpìXšÔ­‹ïŒ$>LѨQD\tõß}—ø´4Š”‚#ï×F6zÁ¯\‰#YóÀ4ÿö[Mã:uð>øÜ\¬Ž÷£¢ð»ûnZPò¿ÿ‘lŸ§.ïsSÊ9̦5lÙBZq±‘HG&bÿ~òbbìу°>">9™B×鯻Žðþý ?tˆ¼÷ß'±°°ª~ëa9p !’Läj.¥ÔBàZ¼–ºýf¶ZêÚˆžiS‡ZëгŽ^AJ©@}xúgxqWeç÷Ç\eµ¢/¿œ¥§ç÷ß¹²GZ,[Æž~ýh”DZ·nÌØ´‰ø*…JM%«W/Z½öËn¿®;w’Ò¯­_{?^|‘½Zóȶm$gf’N€|—.eoŸ>Dgdßµ+1=zðùîÝäAø‹/rÉÖ­‰Œ$¤gOZLšÄ’?4CA÷ÇÅ‘RTD‰ÕŠ-6–ÆmÛòYj*Å11ø¯[ÇØÜ\ ããIަ~«V4îÖO¶n-MšO>I›Ûn£K»vÌñòB•”ðH«V|OÁæÍŒô÷ÇÛÛïÄDÒ{÷¦õĉ,øê+,ZÄÀÞ½i¹bq:©ªcG¾)*ªŠ„2ø øµ3°Hk=¬òó»pI5—ó!WÚF ¨7¾@;Ó«Hνóq4°ˆ{Øçës’*øl›6¥~b"ÇO÷þðá„]vzõâ³áÃù­uk>騑è‡&°*…..æd»v|}Ùe,Þ¼™„'ž``l,_ Ê/Ì_ÆÑÚež,[FÜ€üØ©³5¢n§N4ìØ‘9—^Ê¢¸8ŽÜz+Ñ€uþ|ŽtîÌ··ÞÊ_W\Á’™3Ysÿýts×Ö­êуï{÷fþáÃ7ަ€uêT.:~œì-øbð`–|ó [-”RåoOJ¡•ñˆÇ0g)F)´ÕŠ­uk¾ºòJ–.ZÄ–1chØn¼‘ð+® ãE1säH–µiìà`üþõ/Z—·œóèRÿ°<©æ*UnñZÔ6ÕU×U²=sÒÏËéæuÙe„:DÚ®]ä?NѾ}êÞ†@ÀªU8¯Rܽ›£~~xåçs`ÍRǧ·ëügÏ&°< ’¶|¹Ñ°oG»v¥ÆNœ·Þ¢kŸ>4kÖŒ†ÞÞxsÒu^sç²ßuÚÞ½‰ö´oO£uëHr¼7{6IÏÓ º€Jåî%ÉÄIC5$“¾}©×¿?á êÏ?9êZÇìNÏ>K,À”)”Ûjí¢E\þüólذ¡´þü\½ñ]’’Èž>„Q£ˆ>œæ·ßÎêÊÆìºš´óº2àXûöÆÎ»¼÷m6¬^^(×÷½¼PZ—ÑçåQäxßfÃZX辵̴6Àºs'‡{÷¦¥R,ׯŽ%Ú1þž=dß{/§´ØmÓ1oå:o¥ÐKiŒ®ãþü3IwÞÉÀ„²×¯/=P²'Ä*ÈÕµ=Õ|’LœÜ[2™9“M›vÑE¼Ÿ@‰àá‡iSv¹¡¡ø¤¤ð˜Ÿÿ>Û|33yÒߟ—Nž<ëC+>>èh°q#™8Ð4b ÓÓ)týúx—”  ±õéCý?ÿäDÙ™EDàKÈpÜec›=›?þˆã~š6ÅÿÐ! ££ñ÷÷Çkï^NyȘRп?¡P”DA“&øà´ך3‡ƒsæ”&‡Å‹9¥ÅâM›N=G—–FÁ—_—ò|ôQiUÀ?kÖpʳ;É}á¶;úgÏæ€ãõgŸ‘è:î_ºOK£àå—K¦>ù„„ò×öí#Çžhþç¢E§®c|<¹ññäº[¶Œ´eˌ긪%Õ\ri°“³š«Ê»¼´FçäœþŽÝ[n¡ñþýŒß¿ŸñëÖq«·7ÞŽþýû啯Õ'ÇÓÐu¸Å‚e×.nwôßpåÍ_)tB–-#°M™ÂV|®½–pJ«œÕ7²kÇãˆô§ŸØß±#ÍÛèÑ4-( `útâÛܹNMå¨ëešöÓæ(a½ý6ë‹‹)ÉÊ¢8.Žäë®#°uëFó+Ø•’BAq1%³f'I]’£ºj/™HW«;)˜8Hɤ”Ûª¹V¯&])TÿþÔ_¼¸ü££Õ«Iã ~Àë?ÿáVG?Àöíd¶Í›ÉpþÞ{ÜùÖ[üî¸ãyÝ:£* ìü•Bgd”VWdgSœ—G^ƒø¸Œïø ô±c¥Õ 99ùùãÕ­‹OVVé|23ÉvID»`×.#v0.u 6æåë‹Ï‰¥U*GŽ8«m¸é»¸Ð®æ5žd;I&N¶S®B©Jû÷“³w/ûžy†~‹ó­ë{ýúQåJ2âãÉýàã„`X>ÿþ7ÚÑïêàAò\‡¿û.ú£Ø_\|æ—Rè¶mi†} ´^=ê­_ÏQû0m±ÕKË©WÙ«¿¬Û·“öÈ#4ŽˆÀ+5•b__,-Z½iûíÓÚàoWÝ8çe¿šÈXàHß¾ÄëFŽ$ƱÜVÍua]Í%j:›$;I&¥ÜzÓâý÷óý·ß2a÷nÆ/_ÎÎ’l={Ò"$„ ØX>q÷[ÉùÂ%Ws9HCJ-®‚¾«à¯oÏ:AÍsÁ~¾¾XF¦ñ¬Yºì2LŸÎˆ“'9Ù­_¸o©wƒ7nŠ´ÖþU=w¥T!à}¯o®êùŸaÃ2„˜ûïgíYFÕÓ§ÓsÐ :uèpji¹",TV/<ñŸ~ó ‡22Üyp`¶Kn„U}ŸµÖCÌŽÆLR2qÒn;g"Êçç‡zí5nüøcêjß>öÞvßáÖ#zÏ;grä¹»wçÆ,Ô /Ðé½÷Øsß}´µXP/½ÄŽ‚lÑÑøwêDTݺÔyñE:pòå—æw:w&äŽ;h€ÏW_±×q#k×®Ôé׆+VvÇ´;tˆœÖ­ õ÷' *Š Ñ£‰üøc’†'|èPZøûã½lÉ3g–^B Æ«7ÞH«:uð_±‚L’ã½ûî£EÏžDÅÇsâ•WØURR“ <ühÜ…$§šS-á)rr°EEñjõ.Õóª¹F&ææ›ô€×ÓO3aÌvåçS€ß022’5Â'2’öêE³¼< >HË—_æŽÄDâóò(¸å†MšÄÇï½GüÈ‘4}è!FQ”@¢ŸI;ÒT),½zÑ,4”ÔÆ9üþûܼc{ýýñ›>Áƒ±ôöÛùàÅ鈶¹¼ÞòC«5vB—w¡8øŸÖúN³#ª $™Ø)¥¢€8 ¢7¾WÀO>œZaÀðç{ÏõZëïÏ8zPJæ}ý¿‘sqµE‘‚6“áÀÅ@ÐZkíñWr$“S(¥î>4úºÿë?33Qîì ÿ{ãþНµÖc«kÉJ©YÀM€†;^ƒOVUײ…»ô®³÷Ü«µþ¯™ÑÔ$’LÊPJ½p90Zk}ìLSº“R* ˜ 0†‘3áÓ•g91/Û“©øÂ-×Áê¡$È>ðàQI$'Éä ”R€·û†ä—­–ÃàÕðÂv9º¬)ÞlsúÂîK!Û^@k­M¿oH)僱-MÄÞ>ÔI„Øpã*x4ÑÄð„S¶<× ~éû@‘£í­<àw´šP[H29 ¥T8ð,pàSúŽ¥Ò!0‚ŽƒEKõQWòà ¿X˼¿˜¬µ®qwŸ+¥º¯eñê•ix ‚2RI5²yA^Èo ÁæëòæIàc`ŠÖú¨I^$™œ#¥TK`<0èhr8âïc܉üµÖzåÙF6›RªÆ•^#€¨³Œ.ªßŒíéS­µÜtz$™œ{bé 4"†€—©Ay d`4÷ž l6ê pcVJ)àb +±=ÕÇY&ªHÇØžŽ«$Tœ$!„•f1;!„>I&B!*M’‰BˆJ“d"„¢Ò$™!„¨4I&B!*M’‰BˆJ“d"„¢Ò$™!„¨4I&B!*M’‰BˆJ“d"„¢Ò¼ÍàBfoñµPiåUˆ U ªµÎ5; ™´\J©ÏŸ¸h…Ñ\¸Ï'B\(²1ž‹³ãY&¿h­ Ì éÂ!Éä(¥/=ÌŽEQmòO1ž²˜fv05$“3PJ]¼ .l…Ë2¡W.DC³b¨g›Ya !*í/ðxøµ.lvy3c?ð†Ö:ߤkðv#ø(òOQÝŒÐZ23²šJ’Iö“ê¯C"‹à¥dÂ̸„f8â O6™ö©ÀuZëµfFUI2)C)õ ð/£¯{6,Ü %¦%ª›ü(DŸ6€‰­¡Èd½´Ö{ÍŽª&‘dâB)u0Ëè»6æÆI•–°"†u€,`/FBÉ2;ªšB’‰RªFhtɆÕÛÁ_>!„‹…uadG°*à­õH³#ª)$™Ø)¥~F@Ãbظ šž4;&!DMôbcx¶¥½çr­õ閭SCH2”R}€UFßÛ{á¡£¦$DíS‹v46 C7Ø‚Q›Ñ]ËŽT’ €RêgàJh•{6€×Y§1™|iB˜ê»ú0ú"{Ï0­õ"Sé<¾m.¥T(p¹Ñ÷HxÉ݇Bˆ³u:dÃÎ:À(@’‰ÙÔ×^àmƒCŽú…çäš4{2¹V)奵¶š‘™$™À0ã_ •ûI„çè¦txµôþ29 SI2¶Æ¿.ÙH©Ä“Éw/*¨K.Ô+†L_Œýˆ$go&!ªi­QQ! ŠìÉ$⬣ÖrL”RÞET Yrt*„¨†E‚ñl#æÑÉÂù„İ“H2BTHˆãææà3Žæ<=™¸ÖmÛÈÈÍåäâÅ]¼˜£€8—^J}@·nßòå\êíš;—Ãǵd ݰW!ŽCÌÌ™t=r„‚;É^¸Kbcñ£œêÆ çºnßNfr2yo¼A'ûöcl×_OÓ–-i?ø€ØØX‚ß}—ø9s8T§^€­];ü'N¤ÍäÉ´Y´ˆ”zõð^¹’þ¡¡XÛże ™Ó¦wèùK–Я];üòó)Ùº•Œ¼¼SÖÕvï½D|õ=³²(ž6¸” êÕ3æðÖ[tLH 7!Ü¥Ké׸1Þå­›tçÓI.q’‰“ÖØ|¢ÒtýúøÍšEwÇ€§ŸfGNŽæj\?gÇçnS Mñõ׳ 7—“Ï>K{`WÏž„\uMúöå×իɘ;—4€uëÈ4ˆð/¿t–óÕ€íñÇi–œLΨQÆ|7o&kÕ*®èÖ M›Èøî;<ó ýúÑ`ÌŸžÄ²+vß}´øúkžxÂ(]b¹çÚÙ—…R¥ËŽ¥ÞôéìûþûSKhÁÁøŒˆ={(øðC§¤pÕ}÷5u*I¯¿Î€:uðÚ¿ŸüË.£ÑèÑ4š:•¤uëȸâ "\×õ_ÿ¢Ý—_ß}ìøá‡S—÷Å$½öš1ÏAƒhôÐèÍ79xÚoOT„d;)™”2ýˆ¾¶tJ¡ÓÓÉoÕŠßÝìÙF‰¡œÏÚuÌúõ¤;ÞÛ±ƒœ¦M t×®§§S°z5Ù§Y&eûÃZ·&díÚÒù®^MvVE:èXîO?•¾ŸœLnÛ¶ÆrËvÑÑÿñŽAõ²e/oýýÜslôQÚ¥¤påÿK;{‰E:-ü={ÈwôoÜHz›6Æ2G¢ÁæÍôÛ¶Ë>ý”®‘‘†‡—NëÚY,Ф ! zšïƒE‹J×íÀòbcË_7éΫv’Lœ´Ùemë(;,;›’À@¼ýÞÞ†¿£_)´ÕZþ|ÒÓ)ªW¿ÐP¼ÊÎWë¿'×ågfRíLºaC¼ƒƒñ=v¬ô¢«õ”+æpÞµËÍådË–Fµ [´  Ì¸Îi¿ø‚Ôèh~ž0u-[u]—/çÈÍ7Ó¬E cþuê`qy¿¼ÏÔìí£uòtA9gr*Ù0ª@ÙËe´†÷Þc×ܹô³Z±mÜHúd—Ùq;ŽÖO™Ov6%ãÆ±ú£èyË-´:q‚ÂcÇ(èÙ“û÷“ÿÓOˆ‹c°¿?Þ¡¡,´Wsi@ò Gú÷'iÕ*gfRh± îº‹5.çppY¾£zìoñ<ö»–.å’ÄD®ÎϧdÉvíJC×qË]¸~'ObÍÍ夯/^Ï?ÏVÇxÉÉd_y%'Ò&<œ ÿþ—]K—r`Ú4v~ø!=_{ââb¬þÉ!G|ññüø#Éqq À»~}ÞsÛ¾ý–î{ö049™¬zõð0€ßwí"¿œusMž‚ %NçÑíUJÕ2Œ¾¿Á°ã¦T=LÿÂýü°Ô­‹×ùÞÞ¼9þJAB…™.0K“&øÅÅQPÙ;ysü¡ØqyñéDGãçå…JL,uüx"Ÿ|’N­[³4"ßÂBl™™§$6|}QááøçÑz¥œk ü=á¹–|RSËOÅÅèƒ+–,339™™éÞæc„8I&§2ý¨]Ô~Û¶‘=kû‘íMÔ"’Lœ¤9Q=6l {ù ½–}†§']æµl¢¢d›ñhúo/<•§'“<Œó$8ꃜ3BTH¶ýEŽ©aÔL´Ö%J©c@#HrÞ -„çæ„ã¦ÕŠ´â\+yt2±KÁ!I&Bˆ :h!ÉÄìj€ÝÀE°5 I&BÔÈïpY}Èõ³÷ì65”@’ ,þÛ#à°D›\ ?N!.$_EÛ_¤ëÌŒ¤&d‹“`óOšÂ³qgB!øµ™ýÅBíÉM‰Øy|2ÑZg)¥~†ÂGarøxü†!„8“›@r{Ï<¸žßÞòa á5ô·µ=þÙ –ÅÚÄõÖr‘N’LNC)u ð5b i|îÚw%AÔ9?ýÎ$ò¥ Q)KÀ‡±°°3”xÙþÜ µÎ03²šJ’É(¥Z¯7”µØ ý!è~"ó I4¬éÉ¥ µÉƒ‹<¾…ÔÚ/.¶Ô5;ŠêQl1ÚæK ‚„º°º9s]÷tàEà­µœC= I&ç@)Õx¸ð9óصÝè ðí_fG!Üí±Nðæ ³£0Y ð ðšÖZfvü¹ÐZ¯†*¥êCa@{ hXL ¯šiç!j‘Œ6¶ŽËùÀzi&åÜI2©­uÆy”¯ÔR^@0 ÌŠ«šütÇsŸHéa묊;t63’jP¢µ–›”+I’I%i­­@–Ùq¸›RÊj¼Òy"¥'±i­3ÍBÔ|’LÄùð°£tO$Õ;¢b$™ˆ ÒžZÍ%„8I&â|H2©õ¤d"*F’‰¨ 9gâ$™ˆŠ‘d"·ìhj?ùŽE…H2$çL<ƒ|Å¢b$™ˆó!{šÚO¾cQ!’LDEyRÉÄSÖ³rÎDTŒ$QArÞ3H2#ÉDT´Í%„ø;I&¢¢<©šË“Éw,*D’‰¨ )™xùŠEÅH2%çL<‚–ïXTÈy'¥”"F€×™§U¨ã¹ ©ÕÿйÏD¸‡RªÆ3‚þ&‡ãI¬@ÆÃÀŽi}~çœLìÉ£70ãáPm*2½p¥T>°ãa>óµÖÉÕ°XI&µžû¯æRJ5FØ»Þ@ »—)ΪD)µX,Öœkr9k2PJ)` ðТ2Q ·Ù»·•RK€IZëíîYœ”LDå(¥:¯CÌŽEü7ÆSdÛÿ$(¥ž¾9ÛS'ϘL”Rý€iOسkXƒRàòthV1…y”ì`ªM±øA²?ì ‚Å°¦{aü@¯TJ}<©µ>ê†jów]›×­lU~ÎD)¼ ŒÃù¨k_+ôNƒ¡©Ð.ÏØ§D¯œ³©6ZAŠ$ùû”ßÂï‘€Q€øxL)õˆÖzå鿢N—l”Rb$û¹Þ©ðÜ^’QÕ«"ªB–|ÜÞl)Aöë´Ö›*;w¥Ô \ý,þ©²ó5Ý=½á£‘@²Ö:¦²sSJu~šC"óàÑ=pרk­ìü…;,©/´…5öVà­õôòÆþ[ÉÄ~nä}àcHtLÛ×sOÀ¢jÔ-ÇÀ‡`j ¼ÖŠ›+”R·k­çVáÂäè½Ö«ºs&J©ÑÀL Ð(‰<±žN)}ÔhCNÀÕ0/ éB€w”R€ûÊžK)¯šë?8IßX°”¸;lQUü­05‡ôcÀ,¥Ô1­õ•Ÿ¿œ3çN)u0 𰘽.—gÊ_P®O‡Ë`xX‰‘r€'\Ç:%™(¥n7úF$À¼ÍΪMq¹<ÖüýÀ‘``®Rª§Ö:¡ f.ɤ֫|ÉD)Õ˜ ø@ã\øs9´,¬|l¢ú58 +VÁõ]a~ àq¥Ô­õLÇÎd¢”Š>2úº¦Á·›Á"; Z˘÷ ù 0J÷ó½ŽÜ =z†Ê%{uù\ ž4¶Ã–U›0‡#/ô †Í€”Rë´Ö»ï:¼øBh,Z>îH$ZºêîzeÛëìŸWàæ³}Ig¦M^骱«Œ›1¶7Œí¯Wv XO쪘6òChà‹‘7{2±_<ÂôÏиã質;³?Xíî9 Ý—OQJùR95`¤so§9_öíkŠÑ×í¨±ý™½>Û¹a?Þ¸ÐÈŒ°çgÉäiã_Ól˜œP>骼{m‹ý^ `,çMJ&Ô¯±@Œ±½½¶¥¬‡tUÞMN0ò`ÏÞööpÃîÛ>R^+ Ê€)°®10ø¬3«Ìަ¦©MëR…*uÎd¤ñ¯GŠ±Ý‰ÚÇGùbro`RªŽ70ð/ŒsGE­tíA{2¬” ÔZçW|rÞ3œ_2QJƒ¾k"û“ZlÜaxÚV`¨7p•ñFÇ4ˆ(234án·‚çz‚?žÇL*[".çýŒ*®ÛUfF¢¦‹(2òÆÖà*oŒ:t m&ôÅ7i‚_q1¶´4NšKõ‰.„†yÌy7Ú©D­v¾ß±}»j˜gloµ›Ÿ–ÿoï¼ã£¨ºüL*é!„N ¡÷Þ«ˆ´PD ú)¯¨ ‚€( –WŠ€…N¨R¥‰¤×„ôJ •ôìÞïÙM61!Ù É}~¿“ÌÜ)÷ìÌsæ–9·aCª\½ÊCÔò+>):gRÏ ¨¥&zd`ÄE£5¡¡ IDATA?N÷Q£p+¾íõ×ñܽ›Ž€Ø¼™¶¯½†' ºuÃéâEú^¼Hß'è9w.Þ>>ØèëÝç_¥UDOFDðäÁƒtiÕ »’òÿþ{ZΞ1sùªú±þ5K(J9øRÊV‰®\UÍ2–®3fP÷çŸiY<ýäIzöîsYæÝ¡ 2Öo-â‘¡»ïµ,(p&µõÎÄ(‰‰d½ú*Þ7R$²íäÉø?N 7Æ%(ˆT@T­Š…¯/ÕFŽdŸ‹ VÏ?Oƒ^À×ÃKK”õëé¹y3Á£GsDQ`ð`Üíí1/éw͙ÕÌL4%m«Ø¸ê‰û=w»+²Ï¤rðжêÊ•«Þ™”9uëbçë‹Kñüš6¥zµjX–¥/’>~<‡Ê2òMí"ÎD7!•Ñ ë?ìïÏÀêÕ±¼y“\€6mpðó£ú3Ïð§^EQ½ ¢ ´ZÄöí$lÞL|B£F¦º æ˜OžÌEýùOœ õnywé‚ËíÛä^ºÄ=p:¿ÿ&é…hxó&Yï¿Ï•5°š1!Ÿ}FàåËdtïŽóäÉ4¬[‡ädr¾ý–àÝ»)„Ù¯®o½…¯V‹X¶Œà‘#ñœ?Ÿ À@µ*â³mñÀ[F­"ýþ;·ââH›2…ºú´)ShpáqW®p‡¢…£ø²¨Z ++,¢¢ÈÚ¿Ÿ[vvX®^M«îÝq*VÀþ!}úP³sgªÂÏû‰i6e ¾»wåç‡ëÎtÿî;Ú]¼H’¹9Êþýô×Û¦ N¤,ZÄ•R7m¢_ÇŽ8¢Il·n¥z:¹;o­Ÿ{Ž&žžXâí·©ûí·t "eÇ"_{¦‹ãgÄë^”ƒêµ”²•R‰l,}ï–_AÚªUt¨YÛ¯¿æê¶mD¸¸¨5–æÍ± `°V‹X½šàfͨzä½ôljïªUtIL$ÛߟÈâyxx`5bÞúõaÃhôãtŽ'óòenÿð=ÿÎuëbwð 1ŸN‡ ¨ÌÝݱùé'B6m"ìÉ'©ûË/´ÕŸkÇ:÷ì‰çÖ­„ׯý×_Ó¥OjÂÉ óóçyÒÓ»Õ« ¶³ÃâÄ ž°µÅ̈׽H1 ôøÆ`ËBFޤá¬Y\×5M5š7ÓÅt)PÞܳ+haoe·nÔ¾p¸¿þ"ॗ8ðÆø:Ä›7Iÿé'®ÎžMPVV‰Í2E › –Æq,1‘¼À@Ò÷ìá©—^bÿªUĘ›£¤¥Ñ¨MìÏœ!ý«¯Ô7{{ÌCBÈèØ‘cÆàyâ)3fàÂíÑ£9pý:é»v1XïÜÞz‹V‹sîÓO HO'oÞ<:M›Æå²¹ÂÿøÙxeͤrð¨·Ø¨åDûÿí^^¸._NàæÍE›Ô?þ¿Ó§‰;–ÓÛ¶‘Ã3:á ¶llÜHðÌ™\¿OþyïÙCØŒ\0€ºU«b3p 4nŒÓOà±|9QññäŒÏl1kí“õëS¥woôì‰ÿÑ£¤,^LøµkêË/ þïÿh˜‘Aî AX±‚è¸8F¼ø"Ë–ù/¯ß£Pð» œ‰iŒÄ’%„¼ñmÚµÃÁ×»*U°øþ{" uQUAA >žÌgžáàÑ£„³þùgbþ™X77,§L¡þ›oÒöÎò>ûL5܆(J‘ê1$'&ªMmçÏ“jÁ„FƒHHàNË–8œ9CÚSOá6gm\]±IJ"Ó݇°0RQ·.çΩÇìÝË­Ü\µoÆÆÅ݇W^¡éË/ÓÄÌ ÅÜ3ªXY¡äæ>6}»3yÜõ7 ´ð$¥pŽûg"VVoä€ú|››¾¥Ï™Ã©¹sé4{6šíÛ ™;— ÈH²5ÂÙÃLj†* Š¢€FƒÖÇ»€Õ¶ìÚ¥öß–”·M*Ø~èPáóMZh¨Úç BÚ°aÔׯïÚE—¦MqËÊ"/7““: ¨Y3ì33É=z”‚>/\঳³ÚÂáç‡sµjØêmg‡u½zØÞMײA”äLÔ-ÆSB%<œ¬S§ˆœ2…†µkãpà722(˜?¥xs•FƒvÂî9s`b"¹}Äõ¦Mq<˜ºŸ}Fð=v×÷Åèc‡¡[&?¿H½Ð;µ?¦åÆëÔ‰ôÕoKJ"»~}µÉ ÔöX++u@VšìlòfÎäÄš5ÄþËKUZ”FÍäqqzÓa´—Óèh25¢šá YŸ>¸Z[c¬6—/^Lزe„Aõ·Þ¢Ùúõ¸uêÄ”²¯\áÖ˜1ü}·ó§§“ßòg’Ÿ_hKнŒê× íÙĉxúøàZ·.[ÆÃcåJµ9=6–,;;¬6¤ÊdÔ«‡cj*9€HN&ûúuÛ·gÿC^¶RÇ ÏÄt1—Ö¬!hð`¼»t¡Þ÷ßTl{AÍÄ@o_\F¦†~ÝÓ«Ž©•˜È y6ÈC{Û0|( ªUÃ.9Y½©={âܺµ~DbÃÂÚ´¡ÖرԬYË9sh¦ÕžÿÏ? Ÿ6¦µkc¥?_çÎÎÇRjÍR*´Ú ˆ_»– ªèŽ 4/}Ÿ' Ú¶ÅÁÊ Eÿ#@‡‚}еxücÝpÿÚµ±ÉÈ Ôþ“I“ðÑo;s†´°0nñÍkÔÀò…ðhڴо­[Gx«VÔ5Šêú´† ©R³fÁè5£—“÷™¬XAÔ¼yGêÞ½”4=°þÆÞ¸"¸ºb¹d ÝV®Ä:%…¬š5q:}š¨É“ÿÑÿ4s¡;¯a>ÅÏ/ Ä×_sö“Oèôî»´8z”Pý¶õë‰ëÔ‰sK—Ò#7Íúõ\ÍÍ%?5•<@¼ø"'ׯ§ëŒ‰Š"ÙÙ›“'‰4HmS}L0I9‘“R¹ÅF)'—/sçƒ82s&Þxƒ6ÖÖXÄÇ“6q"‡4´X8À“äfg“gnŽÙÿËI@ÌŸÏ oofXb"w,,0ËËCã燿~T÷°÷°I%®Úš%K9¯øxFYZb¾u+;ªƒ‘„€±cùcÕ*z„„0:(ˆÄ£G ÓռĞ=Üú䎭\I¿o¾!77¥%fC†°'.cF2)´…+‹÷ÃÔp#*Q&xx`íîŽUh(Y))”ÙtÃææ(µkc~ï¡xO?ûÚµ rqauFúatØÛcÞ¨¶¡¡d¥¥•žÿ¤o8è ¬B<ó G)ŠrèÝvÂÑ e§Ÿ¤|0¦7¬{ˆBÔ{УEY< }‚àÀ‘²Òînxya{çùqqjÿ§! b£Ñ Jzf-,Püü°KL$·¤cË’Úµ©’@îýúLCC±e ×ßy}øw|}±ËÊBs?[T6,©ÓúA9è€/mbcÉŽ-û‹ª+”%Î÷Çô &¹F l{ö¤ÁÚµœ3ì¸s‡|}G¿qyÔ[,ûL*¥ÖÌeT‚ƒÉ¸Û¶7îò$?qñ"ée£Õ½‰Š*ÙŽÌœ‰W›6¸Ý¼IfÔ±³Ãrþü‚n@½K×®qÇhÊþƒrÖÌUÑøþ{®vîŒ[x8i&°¯øpÄ €,'žRûÎDòlØ@´•Jج^Í•~ <9Ù˜­DIÎÄ4o‘ ˆÛ°Aýº¶òX¾qJŒÍ#ßbùrúˆ“ñÑGšZ{Sx‹eÍDòo‘å¤r k&’A6s•ÎÎXT¯ŽUPÐã~ú‘ûLJã$’r,'ÆÂÉ ww¬®_œìH÷جXšÇ'?þ2q"u¶og€©õxytÇ)ú²¤¨*¨|ÿ(åEÊÈ3ÏPsï^›Z‡“Ââ!k&À–-Ä\¹Be™TL¶&Ã9š«b¯[¸käí 2<ÌîÝ$ÄÆòçõ*й\|ÿÚkÔ}ûm|ö£ÿš5´wv.˜‡D¬]Kû¾}q]·ŽNGŽÐ­ZaïïO·€žX¹’¶NN…û+ böl|¦_@çϧ‰~[ƒTùå:0ð×_éàáQø%úSOáöÛotÝÓ«5khÀÀuëèT·®3 RuíZÚŸ:Å Ý»éÑ£‡:׊6K—Ò" €‡Ñ÷õ×Õë×§Ê Aj$a@lÝJ×.]pÚ²….;wÒ½_?Љï?Ò_Ć V«†Åñã<]½:v7ض- Õ‡?Ù´‰.o¼A‡‹IX¶Œóú`’ÕªaqîÏT¯Žíš5\qvÆ: €‘Uª T©‚òË/ Ž'cÁÎ[½ºj/V¬ [ýú8-]Êù-[vrRŸƒ†±2„+WÒ',ŒÔ°0Rvì`”ÞY ŠÛ·ß2(*ŠÔÓ§‰ÿþ{z J {{£‡ž×Kåâ£EEAäç£éÞ=»wwõ*ûôÁõàAn8@Є j0¶o¿¥uz:Y½{³`ï^â/]bÂСT %cà@šÅú͛շª5kˆøäšÅÄôÔSX¾œˆ[·˜øÜsx„…‘anŽÙo¿qù2w6n, ÄØ°!n+Vpñ·ßôoçÿ àÚ­\É…… Õ½zÑàù穽h7ÞxƒüAàK/©¡é5´³fáN 7¥ly蚉.Xfr´ßDZ³Pò@ä(ÓX·råž»ÞÓØ33Ì:wf—°aQ¼2b5¶lQmÁñㄎKÀ‚4ÓjÑvíÊïP¸ÿ¸qÔ:r„[ÇÓjâD¶®Z¥ÚŸV_¨>ú¿´42ä À÷ß~ó&/NœHcǸecƒÕºu„Ÿ9CÚ‘Fp[´ˆ€_ý‡Åþ³n—?úˆkÝ»SwüxêΞMàôé´8q‚ãÆ©¿áÎò,P[G0‰ý.¹fbÊ7!®]#V¿~íwHnÑ'ýöˆÖooÔ—  ×/_&=!”&MpìЗÌL²·l)] >>TõôÄ5*Šç¢£ÁX Ì4ÀþØ1’vîäÒÉ“Œ däÇ㫟hfÞ<ŽÌ™C¯¸8ž_±‚¶õê©o %ÅåÙ´‰(}~±±¤4n¬6u¹»ãtâDáoüý÷‚¥×ÏX«ËÌkiD}¥]>÷}3×vcé,Ð=AAÄ ¡®GG“Eb³f…väСB»áíË¥K…ëÑÑdGGs«qcÛ·Ç9?ͯ¿nÇÀޏ¹á¨·#11Œ³±Áª~}ì/\ mýzÎ=ʳÁÁŒþüsüÔ&¨Ï>ãèÛoÓùæM^X½šöÞÞj¸ùb±ÀÖ­…v$:šý´Äµjáô÷ß…vdÇŽgeRû å§^Ô¨ƒ>ÿ*U0svÆþöm²õiééLš’B–núu[[Ì]\°OJ";>ž,¬6Ä&$¤èP»”².^$R_*Θ1¯Z•S'RoÚ4:»ºb5u*ç¾ø‚ë‹ôÌ3Ôš>67R£];¶cà-@NÔ‚Ó¦§“åビ~[›68ëvÑî_^B$)Šr è ‡»ÇL¬’¤ÌØÞY·(„z„ËžPŸ577Ð=Oææ(ժᘜL6ê3*tQzµÉÉdúúR½ØþÉÉdÇÆ’ie…E³fØž>]öHÕŽÛ¾=;JRæÅ99}:g&L îôétª^›‰ù{éRB¿ý–°Q£¨9}:­7of@³fl¡ð:\¯baìõÛDj*YôÅÒ®NÅö16%ÕL„þÑEQ ~}ܤ fÍÂ7?Í®]Ä([°ÿöí„úøPkÀ\í§Ÿâ——GþŽÄ8ÀÍ[·HýüsZ::bhu5 í¦Muè€×SOQ oÞ»ªU1÷ò¢Š‡–·o“óÅ\?{–77l¬­QÚ·Ç1/íÚµDýú+—Õ h¥hèzøGøéÝ÷ìázß¾ø>ù$nÍša÷ÒK4/þ»Œ#&cú/¢|¥ŸàGJ…’}.p±Ñûý0˜d@žž¸ýç?j¨ö÷ÞÃËÜ3bôÛõÊbËÂ4À}èP5Œû'ŸÐØÌ ³­[‰>q‚ä˜nÍšE+µßSoGÖ¯'¨U+ê림ÐZ??lÜݱhÐë:u°JM%wÑ"‚Ož$ÌÍ EAÛµ+N šuëˆ^¹’ NNØ¢{Õ¿tRøbYð» íÌ®]uïN£#¨áíÍë¯ÓJ so$)¼¬eQ3ù×çPÄÙ³ÜøñGZYaáèˆÝ{ï±óÖ­ÂPʺ7-ÀÏ?Õ·/'wîdlZVVX̘ÁΘ5Àã„ lÿßÿx2.ŽII¤gg“ëåÅo?ýDdË–^¿žÑéédêªÃJÏž¬ëÔ ×¯¿æ©Û·Iµ´Ä"=¬AƒØaoÙž=<™INn.yff˜ÍšÅ¡b×ënË7yæL.y{ãº~=#ÓÒÈô÷çbóæÔËÊ*w±vîÅJà ,o~lb}$¥Îô1 µn_?âÉJÞ<0Š‚¸pÐ… é³lÖÎÎØü1¿GFR4œ]uûvâ—/çè¦MŒIK#£J¬þû_vëƒEŽÏŽU«x2&†WÕ!Òuë²fófâ¾ü’+W2bÙ2ròòÈ·°À|ð`6Ö©ƒíŠ OJ"ÍÌ ³ìlrGŒ`§™lÛÆÈœò²²Èµ°ÀìóÏ9RìÚ"ŽEïlæÌájÓ¦T]½šáwîµiç;tÀ;5µ°Æõo.Ù¿½Æ%P¨sáÊ|˜q¯ ËŒõëéæà€Õ AlÜ»ÐP²rrîalm1÷òÂöâEÒKzßnÔÛ*U0»|¹hTMEæÍqHK#?,¬° Y[cÖ¸1vQQdß¾Mžá1>>Øi4ˆâMgËÂ…´xöYÚxx°²4Î÷àôxŽ6å_† ×£(Ê(@‚þÙð‹ÑÃŒ›£HãòVKøjj‹Å;Bˆ/ÿí CÐw¿ G~/uïÁªUt¬Wç^½Øããƒ]d$YYY÷·#66˜y{cwù2wt³"¡~}lìí1¿|™;†vFQ iSì32Є†ÚKK??ìããÉIH(ÎÞË [€ààÒ±#Ÿ|‚ß”)t«Z•Jã|ÿž^ðî0('£¹ òÿ&œrf&ù.Ü=Œ{HHÉᨅ€’ŽËÉAs·°ðׯ?Z˜gGG,fÈÙ³D{yQ­m[Í›Ç>Œ~Í-;!ÄFEQ½`Ý4h ï›ä%DRš¬ñ€oÞGu$×€ev>QðLjØ‘ó¼fe¡¹— +Ùð —.ý3l}^ânç»WˆüåÜ9þsæ Q àÚ¾=^K—r“Ùîr‚~ÿ~"ll >º©¤§“·z5ç›6¥êùóÄΙÃÉJœUòq`4p ´õá“Àv&L 7µR’‡eC xíȳ’€!BˆÒ˜ȨÏóU£·Œ¯±Y±‚³Í›SíÊ.äôîÝ$šP’œ‰IÞ$X¾œpSäkL„€Å‹ õÓjò¨g·Ey €Wx{œ_«þ*%Få½fðÕ‡ç䣄¥PFßÒ±v­ú=HEç›o¸Ü0µ*eÛ/©!®(ŠÒðM-øéC8¾æ­…¦|S’<'`ò3pq ÔØkÏ!þ(ÅL¤=©ø”X3‘Îä.LžLý+WH9vŒdSëRžBœV¥° hÁ`doh²žß 3BM­£¤8ÿó„=áì _Ì1úˆß””„´'L˜@Ýðpîè£zT Jî3yó™:•†^^8¿ñgôi¯¿NûÝ»¹zìI¦Ô­t(•éX Î&âEé¼¼Â.€wGÀ¬¨sªÆCÕd¨ž åþÍŠƒÆ n9BbUHrƒ¨ÖQÛ`‡ `°@QÊóŸWî—Ó‰©Û¾=î“&qRŸöê«´9q‚ˆƒÛ¾Ò{"k&ÅhÜ—fÍðNëÓš5ã7ªTîBä Eùxx p‡ìô¤iµ“”@ðð©â!£?•Öžøøàܦ žÀ }ZÛ¶l2¡JeDù‹Í%^z‰Úáá¼”žÎ[7nðÂèÑÔÔo;vŒ§¾ü’–AAŒKMeú_1´V­ÂÐñÇSãêUžMKãÍÈH&L™BÁ×ÙGòÔüù4¿vç22x»n]¬ü‘öqq¼’žÎ[ÑÑL|óMbÄÜÇŒ¡sëÖxEGóòùóŒÄþý |÷]¼Ð}<´joÞä5½.õëSuëbÍË3fàäÈH&|ú)MõºôîëÉ“ ONfjr2S·o§‰®w™ „HBÌ<€ŽÀçÀ>Ô`)e•¯äž¤£6c¾zÕ…SŒàHŒ.cÆàÊ éé¼ÎKãÇ«ÓEâÀžX¼˜V×®ñ\ZÓObDƒê³ ˆ©véϤ¥1=:š‰3f¨Ï<ª xbÑ"Z^¾Ì˜;wx»U+–.¥ul,“ÒÓy+&†Iï¿ úö¥êĉt÷ó£~t4/_½Ê³€Ø¾>ŒŸþœß}GÛ„^MKcúß3ÂÇG¬áà€Yt4/¿û.^ÑÑLŒŽæå… i¡?®S'œ–”Ä))LÛ¿Ÿ¦ºÞØ“rNÅ×Ûo¿eÌÁƒ\iÞœe§N²jÏêÃ.{xàúâ‹tûê+Ž>õ?U­ŠÃo¿ÑÞÞØüò ãöì኷7K—.åÈÂ…Œj×N‹¤V-\_z‰nË—sÂLJ%±±dŸ9CB×®üT½:‹–-ãè¼yŒôõÅvëVb7m"àÂBš4aE—.lDÍš8W«¦ºÙ³i2bæÌá÷XéèˆÍæÍjø{KK”Zµ¨1jÍFfý‡²çwäé©:¾¹séqíqžž,­WoÖ¬á²ñ¯w™ù’„ÊI!ÄL!Ä!DS!„ `ØH1šX !……}…o ! !4t# ãÛ“Úµ±^¾œ1'Nܼ9Ëâê?ðlãÆª‘öðÀù…èþÃôïÏJ¬Ö¯gþØyþøqB|}Y6>çÌaxÏž_|‘î¿üÂoo–’~ች{³¶Z5ÍŸÏ?fX»v8ßôtî,[Æ•êÕ±  1<œ˜qã æáÌ‚æÎåZl,ÙYYh–/¢:‡~IDAT'<-¼×_§§'vii¤÷ïOM!yy…v$=]µ#†qüF¢Ù™3.\ÈõsçHýì3Ž4nL??Õñ|õÇâÖºuD߸AÔøñ…v¤~}ªuê„sz:ùë×Ä3•å¤Ï¤V-#" BÆ£Ñ ¢£‰¯Y{}Ú•+…A÷ì!ö«¯°¨W*µjáèä„ýºu ÕŸ/+‹l]tPˆ3gŠzÛ¾~-[Rÿúu¢ããIÓjѸºÌ”V$~ný¹\]qܵ« FÁ®]êäAc«ÆÛµ‹ýöÔT«o/¿ÌžùóéºkoÝ"é›o8²`¥=‚æ~˜Ô¡H* F·'µkãIœ.æÄÕ¨QhG®]+´#;vgf†Ò¸1vµkãhg‡¡ÑhФ¥F.?¾¨Y·Ž]ºàk`G´..…3.Ø =úeQ­'OF¡IÐjÑzya§Æ$Ü¿¿ˆɨQCµ#“&q`áBºlÙ ))¤ÿðGçÌájé]ÉC9û>:š”¾}i©ÏßÊ ³Úµ©Ë}ZóæÔÎ ŒGn.ydEF’ܾ=yMš°önç×h Ã9׫‡M¿~´iÞœÅÁÁd:9a‘@w½ÉË#ßܼ`Ö²ôãömRÚ´Á80|¸ú&rù2i®®Xêö-! `·µ5{fϦÙG1tÉ>H²ÒCú‰1ŒED)#GâafZ­šwýúÔ:tˆëz]š6-è‹eÄjjµh¯\!="‚d­m‹üœŸ_²ÞZm¡qsÃjÈ:ué²sçH³²Â,9™Núg=7…E‰vD"1‘”- &µbÄÜÍÌ0 $ÍàC;Ràœ¹3x0{­¬ØÿÞ{ø~ðC¿ù† ää¢ñDÁï+}&‹sÕÚëuëèѱ#NþþôÓhÈ_¶¬ ˆ6mðž1¯'ž ÚäÉtýë/Îkµh.䢭-¶[·Ò»Kœ½¼°yÿ}|ºwWÛ:¥hxæ›7ÉÉÏG3z4uš6ÅnÓ&ú8±o‘áùüóxvíZtw@¬_ÏÙhòá‡4:”êo¿MÏ¿ÿæÒíÛ5¡"×Ñpâ› hѪŸ&5•ô¼¼ÂÉ}Œ$‰±0ªY¶ŒëZ-bËzwìˆÓÖ­ô¶°À|É® >‹¢iSþ÷¿øöéƒë›oÒýÔ).ee‘¿hWÍÌP¶m£_¯^¸6h@•3ð0@£xˆ÷ädrsrÈ5Šºc»e }¬¬ íÜIDݺÔ|ñEjÚ"ýuY»–³­[ã3gMžx‚jÿý/½/^$PSLÀ?¦³(¸ž_|Aó¶mq´´T\z:w šä,…&¥\ÔLÂÃÉ?žU³gÓoçNZÆÇskôhVÅÅ©ÍFŠ›6q|ìXÚÔ¬‰ÛÕ«„Éï€ %ó©§øß‚ôõ÷çy­mX±¨ý7nG†þ·ef’?{6['L ÓäÉôØ¿Ÿ ûöq">^ÝgÇâûcÓ¦Ñ9/üŽÙJ|l,逸ì3®Ö¨íË/Ó­J¬/^äÆsÏ©³³Ñ„„nøJBt4©€hÚ÷]»èbay` Ó§³U·¯1‘Eb ŒnOÈ3†U_|Aÿ;y!1‘¤±cYZ¨Ñߟ¿FŒ ùÔ©Ô&jäHv".Žì'žàǯ¾¢ßúõ<'"2’ø'ØjG l@~>â£Ø:y2]žž.GŽpyÇþŒ‰Q÷9~œ¤+8øúët43CiÝšu†¶`éRBj׿÷qãèüÊ+T¹vð±cÙ ˆü|´!!„gg£ÑçFbd$)€ðõÅmûvºXZbDäÛo³%7# ª(‘‚{l‚~ö/ðá5)tO˜´jΞmªvÁŠD§ÿÀ‰V:-£‘ö¤ð˜æ’”&sÏ£‹+V ”“òrÕ¾õƒ}­ ØÕPoSe;0¶ôgü÷(Šâü )Lõ „þç൫à—a*ÝŠñ˜9-‰‰‘£¹*8•ì>úÝoN§à‡úðù`ˆl€j¸O(Š2DqÃTÚ)ŠÒØø©)uBáƒðJ˜©tºÆ*;ÒiUJÍ%›¹Œ€¼¾eÎ+¡ðÊß ÖáœT¥«"ÐØÚ(Šâ ü TU›³Æm…ÕÇŒ­G9D:­ læ*NeýݘÕG¡Y<ü÷%È©ŠÚìÕAa´éƒEq¶UÁ: >] ï{þšÊŽtZeËc34¸¼é#y¬xç:XýÞœZo`¢(ƒŒ1ÒK7bkà f˜ÿ?˜j²¦6I™SIÖ£ –F^ò˜05.l„•Ï ~Ï1Xm„ŒÇéò^بê!‘<2åÖiÖL´`ô¹5$#°âO8Þ®7>Ueƒ"«¬rSÅøT]󹤿/‘O’ Žlæ’TZªê#—qͤj:òy’T|d3—¤²b®Ñ-X•QVùÈçIRÁ‘Í\’J‹±Š¸|ž$•ÙÌ%©¼Ó›ÈçIRÑ‘Í\’ÊJñ)€Ë4ùòy’Tp4Šn!׈êAŒ ²ðK*<‰Îº…Ø2Ê ¨ªËG>O’ NŒ‹n!ÖˆêÁͪÈÂ/©ð$é |e4Óå#Ÿ'IçfUÝBŒ­.'x ¿¤ÂWG·YFDä#Ÿ'I'ÁC·mž†èg 5sM¨™DR†œr€ø&º•ýe”É~`‚šÏ){hŸ^FùH$&&ÎJõ2¶4U`Ns GuI‘R^Eûp² -`†:èäwʆßuç7ƒ…m^W“_c)Rî#sš«~l·BÄ)Šr èþƒáÛSH$‡0µ÷æpÝÂ!!DZYä „HSå0õ<ì©JQ­{¡Ü‰¤$üëN !âÌt+_ªÿâZÁ Y;©xò°oÇèmzbG¸å‡Ê2ÊÝùoù©ùšú·Ë²!¥´eFsÕ_:ÿ¡Ý7\Š¢Áù„¾.ùHÊaj*QVà· îÔŽ!z–uŽŠ¢z€} \}j˾Hã kZeN²4X) BˆNPÔ™tŽ 4Þ W¿1²&Gù Eƒÿƒ°¨oÈ„§Ë:GEQÚ'3¨wÂæ–už£R‰–߸6ÕNvBü jg$º„ÙêÚµAÐo(&¯JýCd•\Ê¿”ŽÏé ÀLc8]>3Õµð¾RJQ*©-ê7TçHfë ÔLEQ€ ÀH5¥Åf8±ªîT2÷Û.‘™4sèð:>©KøY1ÎØZ(в«®ùî‚“ËÀQcl=$’ûpŸšV¶'Â…ÿè6£…)âLE±E.ÜGMqÿ¾û †Ý*5µ%’2ecu˜òÜl©Kø!„È6¶&Š¢T¶O¨)ÕÏÃ7 aÔMcë"‘<þÕàÕ7!¾.á 0D‘i¸×?œ €¢(Àbà55Å,šùÃÿÖAû² '‘<":ÂkcàòPú€Ž €ÿBhM¥•¢(fÀ<`†.%šnƒoƒ®e2DY"ytNÙägàÒ0ÐZ뿦 !þ1@«DgR°QQ&óW5Å,jœ…–ÁKÐ;¼þ¶'‘¨\³ƒn°½\è ‰-@è§UH¦ !~5¥††(Šò,ð5à¦KÉ· ÐâOrú$Bã,Sê(©ÌU?Ü`{38ßZƒÖJ·1 xW±ânGßÓ™(Šâ ü0 ¨òÏ=,ÒÁ:Ùo"1 ä¸@¾] Û2¯€ùeõa⣠(Š#ð.ð&`ûÏ=,2À:ù¼M­‹D"1 ÑÀGÀOÒ©ÜéL(€E@çÂT§è½¡nÔÍ\Sé(‘H…›–Q¢ªÀѪð‡Ü4œIö2ðŽb¯©4|Îä(Š2XXª)-aæ5q Ìå…“H*,œáS_8RK— €O€Ù²_¥d¤3)EQÌ€o€WÕ”šw`Îy˜gJ½$‰±ùݦµ‚`W]ÂF`ÜãÍK¼ÆóPÕX×cÛ6zõ쉳©ï‹”‡éL ‘ΤÍ\RÊH–,ᜟõ›6ÅÖ0}Ú4š~ò$ÉŠ‚P0Ø.ÞŸMVVÌ›9“}#FÐnêTÚÏ>£[\ÉÕ«óµ›˼½Yºu+Á%å­(è~- }çΚÅà÷ßg‡³3_ÛÛ³pß>.ûûó|qýÊJÚµ£A:ؘú¾Hy‘ÎÄéLŠP*ÎD#åîrø0‰ááDϘAS}š¢ é׿›7sN·®EýÂZ¿33õÚ®[Gä©S\>_EAÓ´)õwï&(+‹<@EÆ–-Ä””·3Ñš3è³e Ç¿ÿž@#šW^! $„ȯ¿¦kIç0׿ÿfDJ SSR˜êïOO@sêçN¥žá¾—/ó̳ÏânnŽv×.úÄÅñJZÓÃÂxÁÓ‹-[èQ­._~ÉS11¼y2uml°^°€+€¶„š :G upÀÌÏÚgÎ!Ú“'¹üé§ Ùº•^/¾ˆç½òU´úóº¹aQ½:ÕüýÿY‹ùë/‚}|¨UÒ9æÎ¥×Å‹DÖ¬É×õë³ä—_T/\ rÒ$:è÷›8‘ÚžžTß´‰˜÷ÞÃËÇNXáìÌ·ÞbGFùÏ=Ç¡¤$’?üí~~üoÖ,.úø`óË/Œß·Ë>>,^¶ŒC 0º}{­‡®ãÆÑyî\ŽÉOíÛãĤ#G¸Ñ¥ ?¸¹áðþû´4õ=®"‰!Ò™A6sC¾ø‚‹..8=ý45íøñ´:q‚K©©äBAs”á½`Ú4úܸÁKññ¼šJú¼y\´ýú±}þ|v6lHõï¿g\l,¯¾öõJÊWQ âIi6¤ @TwŠïw뎎ØßíÞÞToׇädr6n$ÐΙÃY//êvìˆ# 8‘6p&7—|33ppÀvÐ jXX ¶n%69™]mJää—šJnn.ùo¿M“ÄDn­\I ‡–‡GÂóÏÓH—?Griõj"àæÅ‹„¤§“ñÑG\¼z•´í۹С M}+‡Èë†HgRéLŒ! dŸ>Í¥I“hY³&–­[ã÷ãœÖo/©Ïäða.ΛǾFXèçÇO11dÚü|4sçrµysÖÖ©ÃÜë׉üà””¯aŸÉÅ‹¤jµh›4Qßø ¥Nì“’H¢„šçË/³#7—œ={˜Á¤wÞ¡! ‰Œ$ãôÞ{´nØ«V­hn- ÷13CÛ§-Μ!ˆÒéÓ$÷éÃ6WWæøûsrÖ,þce€öÛo èÓ‡¶}Dëà`nœ>M2 ÍÍ%ÿÕW pwç«§Ÿæ½zÑZ?€@«Ecm¢?d$·óòÈõóc¥¡¼û.guû4ùAAmKP‚ÔRÖ"k&†HgRY31–üø#¡™™dŽÏÀ½{9e¸Í°oC'E ¨^,,'O2jêT4i‚í /àùÞ{ôMH >6–¬âû7´ÿ÷lëØ‘6ЫCÆíï¿yÚ‹I“8\’Þ‹ÓºeKì­¬@£A“–Fjn.ù€ö×_‰LK#õ™gèÿË/œÐóÖ[4|úijÚÚ¢äæ’/"(ˆ@{ý:á£FÑtÈÜ4ÀzÁÎÙÚb»cý»wÇÙÇ›Y³hÜ«.ºß tDk°Žá:E›¥”™È>CäG‹E_À“õëùcà@Ú|ñg0¸î11¤„…©}aaDÄÇôm Õ¢Ü¼Iò[oÑölœrrÈ &âùçY_|_€äd²CC¹¡ß¶i1éé,ž;—;w217—Üë× 2„ÅIIä? Y3<ö™æAA„¾ù& óÚ¿ŸÓ#FÐsÁ®¢›óÃÙ«©Sé÷Ýw8ÆÇ“°f ûvî$àã9üÎ;´ÿòK†lÚĉ÷ßç°a,?Ÿ'¶la¢V‹&"‚˜}ûˆ´aaÄÄÇS4*ŠÛ¶¶Xé×oÞ$#,LÝ÷¡nJÅÁµme¿ÆEÓöŠ¢è.Âç?Àû¦ÕFò8sí/Ÿ;Gð³ÏrØÔºHÊšßjÁ³ïèVê !ÂM©©‘5“"Èš‰äá˜6FS§2ÀÞ‡W^á²Ud3—!Ò™A:ÉÃqìñiil_»–ÈüüÊ>¥meA6ë"I >Z”HþgÏ’|ö,ɦÖCbLäÐ`C¤3)‚dÍD"‘<Ej&•¾–"‰J à ñvHg"‘Hˆhƒ•J_+•ÎD%p†h'd3—D"y "u w„i&U¥ ‰Jà .Èš‰D"y bœô &U£œ ‰ÊE „z!‰D"y .4Ñ-\3©åéLT¶Ó ÉüÝ`X‚©*c*}g¡Dòh\±ƒhÝÊv“ªRNÎDåjš |߆ÉÂ!‘HîÁ­@˜£¶dì4µ6åéL!D¾¢(›€—áð Ú ÞY¦ÖK"‘”Gî˜Ã¶¡º•ƒBˆD“ªSN±¹t(ŠR¬¡ã6øÅÔ:I$’òÈðà?µ¹¸½â´©5*Èš‰!D¤¢(ßoéA°ø8L 5µ^&F¾iH$EØá»GëVÖIGRˆ¬™ (Š p¨ 6·aÏ;Ð=ÅÔzI$’ò@¤5´œ Éõ$ µ"ÂÔZ•¤3)†¢(­Q;ämÁõl™ =¤C‘H*5!U ç{ÓõÃæBˆƒ¦ÖªàÌ:wxåCH««K˜&„XbR•Ê!Ò™ÜCY Ø‚Y´Ø+ÖA« Së&‘HŒA”ŒÇŸ†|; ˜.„XfjÍÊ#Ò™Ü]“—?P[M±L‡›`ÒQgJÝ$IY±£*|ÝŽ„œªºÄd`”lÚº;Ò™Ü]§üL` `]¸Å!j]×D¨~ \î€F1–‰äá0f nT b}!ÅÐ?Ë`ð±BÆàºÒ™< ºïPþ Œ\L¬ŽD")[2PäÌBšZ™ÇéLþ%Š¢XÝ€!€/PK'®¦ÔK"‘<4©¨‘c€``ê—í9&Õê1ãÿl̈JL=ŒLIEND®B`‚vips-7.38.5/doc/html/figs/interconvert.png0000644000175000017500000006332212303145652015420 00000000000000‰PNG  IHDRãûY…üzsBIT|dˆtEXtSoftwarewww.inkscape.org›î< IDATxœìwx”ÅÖÀ'½@HB(&UzA) *"boHñú];ö^P±\ÛÅÊ * HA‘*HU:„^B „„’ìùþ˜wÃÓ€l6ÙÌïyæÙ}ÛÌygËyçÌ™sDU)ëˆHuà  %œã¼V{€ÝNYü¤ªk|#­Åb±Xü )«ÊXD>@‹3¨"˜ LPÕß‹R6‹Åb±”-Êœ2‘ÚÀóÀ @ÀÉ#¡YÐâT?UŽC|:T=‡‚aWì ƒ=a°"’CrT;xLUÛX,‹Åo(3ÊXDâ€g€!@°Ù“—î¾{¡ßˆt\S–ÀÔø¡*Ì<v–ó88 xTU×ù X,‹Åo)ÊXDÚãfOùp×x.ÊeyÍ.àíêðz#ØíVÊÇ€»TuìY m±X,–2ƒß+c¹„Bpܶ^Ú•2Š®•¯Ö‚·CR˜³ó-`¸ªf];‹ÅbñGüZ‹ÈàQ³Ué|µº'y¯ÅÍa笉svü ôQÕÞkÓb±X,¥¿UÆ"r7ð¾Ùj™“@õãÞo9=®o?žçìøLUo÷~»‹Åb)­ø¥2‘Þgª@hž‹~…°B8g%7·€/;«êˆâmßb±X,¥¿SÆÎúáE@y¨– K¦Ã9>0»€N]`a @«UubñËa±X,–’Ž?*ã™@7(Ÿ¿N…ÖG}'Í¡ hÝ ¶Æ;€ªšæ;y,‹ÅR (ø”Òƒˆôº™­@ë#˜!ªJì û+º0˪òæý[,‹¥tâ7#c VçCýDXÿ“¯e:ÉU`bc ¨¯ª»}-‘Åb±XJþ42¾8ß¼}iUrÊÛBø xÜ[`±X,–Ò‰?)ãæ¥éN迟š§s–šÇ ß_Žœ×Šˆ?õ»Åb±XοP "Rèn¶.߄ϕonåÖMޏ•ŽEß ‹Åb)­ùZ€"¢7 ¢0hÆ<\Âè¾*†}ÑÀÕÀ\_Kd)]ˆH<ШÃÉœÛç`¦?ör2çön`°HU‹y}}éÁã!þ|NÍc^8€éGw.óUÀ,U=æi-þŽ¿(ã>æ¥á.¨›êy@n¾™ê“'³7)‰BÇ‰Ž‹#xÜ8.îÞ™YYäéåvÞyD\}5ñåÊ<>ûþ™y×Úe|×èÀQ¨á™ÐnôH„û nzÁ5­ ‡qU`fXR ŽGb’Ð ‘77U5Å[÷añJ½2ªš­êÉä˜/1JU${©Q6ÆQëÅ陘HR… DfdyÉ%|—@šs>&pQ½zT©PÈ={8tÑELLN&óî»i¶t)?ý”-îú¶n%åí·™÷ÒK\ίii9•ýÃñ€UÆ–lD¤ðPÞì©r î[ 퀠ÓTœ]’La=,*5‚9Õ@ëŸýDäUõa„:ï""ç?mÂË„›6ÃËgBµa*<`Ê®x¼>|SNTÀ<< ‘«TuCÑÞ…¥¬àÞÔ•`ó¶¶{dœ³¸•ò)û'NdW|<4nÌ×ÕªñɆ ìyí5Úx^·oGë×çË:uø$*ŠðW_¥àªY“¸+Ø™³Î3ØBp§NDÿSŽó³GÖ@uovŠ¥ô ""ò2ð=P*‡'VÀ–ðèVÊâ¬<ù/8¿.‚ŸgA»D§Ù«€Å"Ò°øî´ø‘þ˜õõŒiÿºM°n:|ü·1EŸMVK‡1«`Ítè·Ù‰°×X""}‹ùV-~B©sÊh÷8äa¦ÆCÁºIL$ýÉ'iÔ¡Õ££‰¨\™ II¤.ǬÍË/³p¥¦âš2…¿:w¦.°80€ôt2rÖyô(aaÙmzáùðSææí,ÿDDBžfO“0q!Ô)„éôtévºýOÖ…WZ@VCà¹FU)úö|ƒˆ<¿eKªîÚÅŒ9úï‹.¢YÆ„{ÖùÀ\ð×_lرƒcÿls§G¦UÆ–Àuæí½Ëáû?ͼfq¡¹:æÏ€˜4ÌõgÙO©ED.Þ1[­öÀŸ¿@­\~‡Þ( RaÙL“?€Däb/ß²Åð35e\v—çŸfjxøaÚ Dö‚ýñãÙ°y3»oº‰öG’Þ¸1•Z·¦îvêP€'ž k,®U‹ ]D³þý ¸zˆe;Sgþ|îüî;&%‘~ùå4‰'îâ‹Í9ÿ3ÁqÌ!UU“ÿyÜRV‘;GÌV¯MðŸÕÅ/ÅùGáËßàêËàD `²ˆtRU/˜È½‹ˆ4¾¡Æa˜þ;„sðŸHLmzÁžòÀxi¯ª‹WKiÄ_FÆëÌËÊZä0!ed1~<³&EÄŒx’5p 3,`MïÞÔOJ"uÐ ¾ž<™@Ö¡C¤ÏìÁƒ™Ø®çÔ©Cì-·0zêTöY.™íÛóí{ï1£aC*]y%M5¢Î5×ðÙ_q8§¦,s<еw,% © ¼e¶š$„…ø,‰Iï}0bžóÌÚšÒŒæC *¤ÁO³ RöôRñ–ø4˜ð Dœb€÷½ëÀ_‚~ô& ‹^ƒöG|!Ç´iônÑ‚ó.¼·l!íŸgD‡#ÑÀUµÙ›Ê("2 j2y­µJÀHôÊ0©!ÔSÕ½¾–¨°ˆÈuÀ7fë3à¶¢ôÍZð ÛL}…ªNñ¥4–’¿(ã0`?Pn› ÿ›_Ð5ÅÏ×Õà†ÿs6ÚªêŸ>ÇâD¤1&Îq [ÿ]åk™ [ ñH>UÕA¾–¨08Þèë€ZÐr',›ác‘³¿0S;s\ÓÌÖì¦øÌä—_ãöVÝnq™æE bSàÕUøü{é.µSᦎŒ·‹HïuA‘2¨e’ļZÂò˜¿´Ð‘±!p»—îßâ'ø…2vøÚ¼l¯oÖ¥X<( [–•ƒÙž*§¥¬á„f¼Ül ZåÝëÔKH¹"cþz«Š˜ëÍKÇè~Ÿ÷¡gé¿Úlsä¼Á;·oñüIÿ,6o_ëÿˆ¸å»2¬'d„IÀk^ëKIçr \pw Ì»}:$8²öóV'"R ho¶úoÀçý—[¹f½#ng‰óB7Xü¿QÆNÐûÍVb5¸Ï3¬eQ•30U}y,nçˆù¼MQ¦q\£]PÓË=δôwÇVnæ$­(É\„fÀí[ðyßåV%@p\é½®°”vüF¨ê<`‚ÙúøøêŠöÇušÊ{M8ÜsfÝÈì2‡2‹ˆ„`òX=ŠlT\«!ÍšáD˜s®Úµ >œ3œª¹e;D¸½»ûx©;Š '½d«­Ud&ÿ˜Ú´¡\D’óXPÚ¤ õëæÙçy—¸ãÐÌmª.éýiñ!~¥ŒöCF(  £ð‰yêHô¼ ŽÄÀ`U=ÍL1?¢iÞ^±¾?W\AœËŽy<˜;wrÓúõÜ1{6ýSS:ipµnMùG¡SAmä^Â3¡¶;ŠTI;I..ØA>÷Ô¹3T¹7:šÏý³gÓmòd.ro7kFÄòåôÙ·¡Ó¦quRC–/§o›6”\?ÎyII úí7ú/\ÈÀäd†<ðµókÛ”¦{yKzZ|ˆß)cUÝôÒ 5®¼¶‡P¬Š8C¡ë°ã©_ŸOBC >™6´ 6ò.•Üyy³eϸê>Ã-‡ˆ:õÜ|û3¯¾AÝÙÜ*V$ð—_¸6-5k2ªR%>Šâ½™3ÙÔº5ªT!è¹çèñÄ̈‹ã“Šù¨cG>_¼˜B8Us§©ôøX,§â/á0OAU‰ÈÍÀw°¿:´ÿ{úîó~ë" ÷ Øì^Ê4BUG{¿]K Çù#=Ur s* $+ç±Ç£ý¼y¬yà–¹÷íØAjL0׌Éù·ÞJû€>ø€yO>I!CnVv‡jm."?¡”ïê†"òfí®óÿUë¹ô“›}™å±ß­Œ³œ&ÁÁöìÉÔäd“Qíøq²†g9@Ä4}:»Üu¬\Éa Źî D1"®ª~þ–²‡_*cU/"÷ïÀ¡xèÿ$Ü÷)¼¶Ü{­~Qîù$WvvŒžð^{–RD¼y‰> ÙÊ!OrŒæN¡Aª=ÿ<Óò©G££)W­åj׿“þý‰ÿøcŒͦ„„Ü"ù™V >h‹Ü:˜TŸoW›$S%‚˜õÅOw‚)Û`øßPïX.ç» »O³ûÌsdܾ=ÕW¯f{r2'rkð÷ß9°?‡~ûëfÌ`õO?±õ‡Øë*ð“¨ç0Ø\˜«,e ¿Uƪú_Ù| aä¿`öxg"\XȧÚ°'îêÓûBVæìAU}§èÚ°”rœßZÀ) !/òSÆ!!„îÙCJ^õˆàÊÌ$ó–[˜›™‰Žö×^ãh—.TLH`{î-&ÁÜJ°; Ž{Ä(å’ª/úÔÍäpØXFC½”œ'çb¦ö<¦€+2’à;IÊyÜMZ®óâ‹´îÔ‰º7ÝDçÇ9rçü0i‰¹]s’ ÏQ{pž§YÊ4~­ŒTu¦ˆ´ÁxY·„¥]ᢠ¡ãÏðáOÐ0·'éBr8îº~ê 霉ÀUýý¬…·øN¼äÃåÉǤê&?3uJ © g="¸RSIËÌ$;übf&'¢¢È»í˜,xy¥)×]ãºû€C@àÊ’ÎQDÎf+KÌÞw‚>y*Ä'ȈŠB’’NÞH’œlL×II¤ÄÇE>ŸMB)7ÜÀ`N•*„L™Bß7ßä²I“ø,©×GzlØÔ©–\ñ;®ÜPÕ­À…“ña3zýý hòÔ½nè¿W PÎ-Â`X;8Ty¾¿ÙQÄÀ@‹Ü±ˆô‘–Åq¿–‰ó'œI§xõæVòsàZµŠW]E³œûÃÂÌùy\›= ,¸ìu§úüCUÛa¢Gåú ÁxQ÷ {»1’|îgÙ2»\¸.ºˆXÏýññÄnßÎ!À5k›4á¼ÆOÍOŽG¿z–ÄDÒ§Neu\…øßHpç1?ªªng.‹åü~dìÆ‰_ý²ˆüx¸²"!¡•)_+TØQ¡BÄ$AÅ#p$ÅÀáX8IÕA=ªv_ϪjB>",þ‘¹öN¯Ý¬¥$â‘Ihe9èšoðg>“!C8×sÿÔ©ì½ï>fÿöCæÏçÊ·ÞbÑ–-¤véB•ûïç’zõøØs.4G…2‘÷2Þ  ª>É‚–Îj Dd?P¶ç–Ç<›ôt\‹±ê™g薘ȤmÛH{ðAšV©BÅÿþ—Õ€kÄÖÞpÛ~ù…›GŒ`Ƽyìoܘ¨¡CiýóÏlX¸ý>H›/¿äïùó9ؤ åo½• Ö¯gk~mvžÒŸKn”eìFUOˆÈÛÀ5@oàR ŽÄ›²£ j2ÀT`Ba’‡«ê!Ç ôIàB™ WÕä.µøÛ1Ö“`˜V ºîÏïäC‡HKH`ËðátõÜ¿?S&L`綾2êõ×é:jý Ü¿ŸƒŸ|Âoééd:ı͛هÉ5!ûö‘J&r—ÀÎ*ÎÆ¶|Oõ=›€*°´Ù¡psçšk˜ôÑGtùôS®‰ˆ tçNöÝx#Ÿ®^Í— Ú·ç‹O>¡ó#Ðí…ˆBD‚U5CDª3÷UõC_Ëeñ."Ò™l…|÷×ð~¾ŽGÅÇÞ¨÷¤D?©j©È0$"ÑG®ŠÐf ,ëk™Nrþ°¦ °¨¯ªÿHb±¸±#cáÎà䌖.†:á;-~ŒªÎ%{îð‹Þp ¢•9upGgy¯ŠÇ‘òy³µ´ |}%¢?ß©å(b€'­"¶„—D$ø«ªoúZ‹÷‘z˜¹Î`h¹–ñ­Dï×{ÿ YAÀ;ªz¯oå9=D$ÓŸõ â^øã ¨ëÃd •ƒNCrE`9ÐFUK §·¥$aGÆ%U=t®‘G|-Å{8ëÒ_1[ËÛÂU—á³yÍÙ1ðð`Gožõæ½{ÇÊô/ V…îƒàø¤?“àò»E|ø—UÄ–Â`•q Â1¹uúŠÈ“¾–ÇâUž!Û©gbÞœbWÛCàºaVH.WÕ$/ß·WPÕ™€3¢ßÒº Ä'ʸëõ°£®#Ö]ªºÐ‹·mñ#¬™º""å€)ÀU}Ú×òXŠ1ùC_€Ž¿¯~+ ~Žƒï†50å.WÕŸ‹§mï!"¯š­Vóà—¯ ¦\ì î·Áßm/Øß®åt°Ê¸„""Àd`±ª>æky,Eƒˆ´Â„D}IU—ŠHE`p¾9£Å|˜ùÄexOŠçÃËCáx$Æáh°ªŽö^{Ňˆ_×›=U¶Â7ï üì˜V n¹Twv|¦ª·{¯=‹?b•q Æ Óù#°ZUôµ<–3à ƒz0h|­ªÃ<Ž—ÆýÌž¸pß×ðÄÚ¢•de9¸»,ì®wL¼~ƒcuxãea)Ðo|<"ŠpþöHñBŸxµÇƒÍ£ªúzѵa)+Xe\‘P`< ªÿöµ<–Â#"ñÀ @' .ˆÉÞu‘{i[Žó^$Û—ãÜÕðÈwpwÂÙI²% îê¿÷‚ whÆÀÕNzQ¿DDzc³'j/Ü8Þ] gñÇ—!0´#|׎Æ9;שꬳ“ÚRV±Ê¸ "!À·˜Dw«ýÐJ"r.ÐxhŠqñí¥ª«ó¹¦+03‚v8g=´ZWÀM…L½¹!Þi sZ†–pÂà>xxQU}¸ü§x‘:À«˜ mböFï&K¡÷ ¸„b´œo5€é-auk8êÎÄäÂü6UÕíÞ¸KÙÀ*ãR‚cê‹ñzl—K”|œùào1©ó:ÿSÕ…¼¶fTÝøÔ#åöCÍus*†ÊG â8ì­¢!)öÅÃîàòÌ»ŒF¨j¾éýg®þE ×©GBR¡æjˆ=`ò—W:S`9Ø ‡¢á`%ØÞ2ÂsTû#ð”ªþ] üL‘Ȃηœ9óÃå0óÃV[,–³Â*c?BUŸfÓE¤¼¯åñG<æ‡Ç©ê`U=ák™,KéÇš©ýyèôTÕ#¾–Ç_p懟n²yj-KQäk,Eª¾!"'€™"Ò£´&Œ/)xÌ·:©ê‹d±Xü k¦öSTõ]L¤®_œÉ–3À™ž D[El±X¼UÆ~Œ³Ôæ}`–ˆTòµ<¥ ùá¯Uuˆ¶X,Þš©ýU-"…|™ªîõµL¥¹ x3?¼ÈÇâX,?Ç*ã2€ª~á(ä_…l—âä“a$Ð3?l^,‹×±Ê¸Œ ªßx(䪺Ã×2•4œùáqÀzÌüp†E²X,e;g\†PÕñÀ£/ëZ¾•¦dá$Ÿ_|¥ªÃ¬"¶X,ʼn—1Tu’ˆd3D¤·ªnöµL¾Æ™~3?ü‡¯å±X,e«ŒË ª:Õ1YO‘+Tuƒ¯eòóÃm0óÉ>Éb±”Q¬™ºŒ¢ª3!ÀiäkyŠg©×L ¸Ä*b‹ÅâK¬2.èê¯ÀÀdiâkyŠ g~xð…ªþËÎ[,_ccS[‘À˜T€+}-7‘›§Uu±¯å±X,°#c à$=¸/"­D¤“o¥*ZD$HDþÜ…™¶ŠØb±”¬2¶ ªK€koE¤ð²ˆÔð±XE‚Çüpp©¶X,% k¦¶œ‚ˆ4&€=ªÚÏÇ"ÎH,0BU?ó±8‹Å’+V;8iòÎâsœ×JÀa`°Û)ÛU5ÝWrzi ¼ „µ`Ì<ò¬³¨³PSûU9ÙŸ{€ªzðì¤ÏnOÔùR‹È-À“˜ùá%EQ¿Åb±xƒ2­ŒE¤Ðèôb qÙ1`0˜âoqžåùàR  0袅ü¢ˆHp¦Oûç²é˜> üYØör´Ý cŠ^¼´®UÕ}§[—Åb±'eR‹Hsà9 7fô—ƒ`TLƒØãà -·) ,^TÕ©Þ”¹¸‘ú¥ÜxFUß)àü(àA`Æ¢ó …èã—.1}z84êöïï¨jj!å Öý0Šø/àUÍ,Ìõ‹ÅâKÊ”2vÌóÀ@ÌÞ@4;Ý÷B¯ýP? âsÉ[{06…ìX˜v,© Ç=NX<®ªs¼~#ňˆtÆÄ³›b‘pàÿ€G8ŲŸ]÷BŸ½Ð"ê¤CHŽ/[zl …eåaRU˜s$Fxœ°|PÐÔ€ˆ|†±r$/©ê˜Ó¿[‹Åbñ eB‹ˆ`Ö–>8 ´j*Ü»îØ •Ï èCj|S^oë<ÍÛã€;U5å¬/AˆHpÎà"r!æ~«™=ÁY0`3ü{+´;zf-Í‚·ëÀµ!Ëíí¿ cnÎuÞWDb>ÛD xøîLÌÝ‹ÅRÜø½2væ-‰s IDAT…¿®0{¢ŽÃÝkà™sM+£ªÁËMagygÇà*UÝX4õ—޹ÿkà:³§ín˜´ªæ2Ç^”l…>`UgÇǪ:XD΢Uu­wÛ·X,ïâ—ÊXDÊcL—Í 4>Ÿ ŠqyËòrÐûRØ[8\à&ky³n¸~ |¾‚Šé ”!pM;˜ìX9xHUß(ž¶-‹Å»ø2v‚wüô4s™ïÿ Ãv¿$DÁ¥½!5؈QȇŠ_Ž¢ÁI°ð¹Ùê¶fÎ+~)2:_ ‹j.àjUTürX,KÑâÊøà³õð"x͇&ÌoªÂM=¯àoUu ïd9sD¤&f o4Þ Kf@D9¿.‡ƒ UoØR³Œ©ž êa±XJ;~¥ŒèQ›€(豦ÏõµLðpcx½ƒ³ÑQUøTœ3@DÆ×Cù4X=j÷­Dë" eH>RÕ!¾•Çb±XÎËÚô,¡ðþ@–ïËËCu·yú-Ç ªÔàdprFôC—Bcø¼O…›—;"Þé$·°X,–R‹ß(ci 6[7®€º©˜yE—à,xz¡#f;LÞàÒÄ€@ÕÃðÂ|ÞŸî2rĤb}¼îÕ°X,/ã7Ê£ˆƒ Â1x}9>Wžå®mÐÌíDv×z ˆ‘f@'³õð"ã™îë¾t— 'àž?Q/sæµ-‹¥TâOÊøjórÉzˆ9ŽÏM©9ËM9r^à¬- 8¹ŒË§Á¿7áó>ÌYZ¡î5Îý½Ò‹ÅR ø…2‘–@-³uÝF|>j˭ܹ‚31 *®òJG=ÎN‡M”…Ïû0g‰Ê€¶ ެV[,–R‹_(c²GpRàÚ]ÑŸ}X4oNdÑÔ{Zn9UÞ’‹ˆœ43[×xõ§U+Ê£gvý5ë‘Û‹Huoô…Åb±xQÆíÍKÛøÇv:„®[ǵññç<–_éШ ¸)¯ãQQ|û-îØÁMpçúõ\ûî»´È»ÎN[y›{µ7Іvæ%$nÙF!úkÙ2úöéC\aÎõ,K–pGÆ„Ÿîu¦Ü¾Õ‘WÈ~x°X,–ÒE¯("œ~5’0ó‰§P®4h@õ°04·ãy€Ëy›ë5ŸNçfͨñ¯1uãFRÚµ#¶U+âòn£ÖçMœˆ„¨ª—c:ŸNŸÆ$CX¡RL6h@µ*Uá4úØHö\ðiR! ʃ”²e¶X,–Ò…Ÿ)ãjÉ­@=Q‘ìU6:}ÿý4«]›Š));–ÕÌ6ç° àª«¨|Ï=´@^¥S§² U+jN˜ÀŠI“ذv-Gnjɾ6꺕±E¤;0OU§žÑ]1"<¬'{>ö(¹÷iuü³kÖ$ìÙgiѨU³²Èš5‹„§Ÿfµç9Sîå—iMÄW_ñרQl-¼ä1ÉV[,–ÒL©WÆ" T0[5sUÆŽ‚²ç%³iÓ†èÝ»92i›4 úõ×雚Ê÷cDzK !ø™gèøÞ{,nÕŠJãÇsãEñÉ’%Ù¾ýÐêàAŽM®]ä™j0Ìôô¢žLž‘°³è‚¢D¯€i@%³ëP9˜X ®L,Ìõ"ÿìãFˆt¹p}ø!V¬Hèý÷Ó¥|y‚î¿wà^z‰KÞ~›ùQQ„ŒÉ•À£F±%g¹{vTÅ*c‹ÅRJ)õʈ9ù¶R*¹˜:h®¦Ðwße#@ƒDîÞMJÛ¶¬8úcDz]„¬  ‡ aÚâÅùôSZ´ êcÑ¢_?fß|3ÓGæ’áÃéñ쳄oÙÂÎ^`Ö˜1äHLñŸºðbOH‰Ì!ZK`ÅÙwA‘8‰qpã@h°¾˜Só»0·>ž>½Ó§³·fMÂêÖ%râD–]v €?Ýç|ðóßy‡ uêP~èPÚŒŦ‰[þ˜ó&¶pç[,KÉ”ñþ“o·»€râòx=åø-·Pã7¸*5•´#GH­T‰è-[ظDp8AÆâÅ$¹Ï_·Ž½Í›SpmÙBêÅ3˜|ÙeÄ=ú(|ø!7ÌŸÏÛ›6qìd+÷m4å»s`€%ŒL¢ƒŽ%iîXDºã€#@ ÔÞ~±™…»þŸ#ã¶m©0~<×xð G"" Ív¦`ÁÝÛK—²çŠ+h™³ž¼9ä~È)ÌèÝbÉFD*M€ª%“út¯GY¥ª)¾’Óâÿ”ze¬ªÇEä[Ë“»™:Ï9ãçžã²O>á·Çc%ÀwßqqµjÄ`”±ޤ¥™Ñ^t4¡©©¤å¬ççŸÙ÷Ë/LNO§y·nTÚ´)W«ç5b¼;³Îôþ‹gθp0xÈx§Çúa!·>~í5:­\IBŸ>ü ðä“46Œ®çi¥J'•s¥J„¦¥‘ž³ž¼9TÞy³«°rZÊ.β½+€>˜ß_p!.;."¿“ŸT5ß‹åôñ—¥MΟðÎrä©)3uv %(2’ «aCºu£…£¼³DÈAÞ|“–@VwíJÓ_eõòËœÞy„ºëº÷^j¸js“6–säͶ«êDU-Š@UÓTõU]OvŸ&•§ðQ±Üè§ì'(<œ@ +:¹õV÷R´“×Ý{/­¬°0tà@Zýù§éã•ÃQN}V[òDDúŠÈ2L~ñ·€KÈVÄ Ó¡A´O„ú‡!6Ýì è¼l‘…"Ò£øïÂ⯔ú‘±ÃN 9lq¯q͉ `ýz÷ÜùüóŒýè#f?öý¯¾š¶.®eËXI(ÎÈ8=ôúõ‰Û¶!±±Ä,]ÊšçŸço@;w¦ÎpåÑ£¤¨â 'üí·™°`ssS´ófŸªžÁ2žbÅQl‡£!1ª8:÷ÞãŽ÷Þ;¹ïÇ™ýæ›Ì=šÛ÷î¥vV®Å‹Y×¾= ñø¬RSIÛ¹“»#"ß·÷ÜÃïjd¼5 ÒÃݧq–2‚ˆ\ ¼Dv<€r'àÂDè½z€:Ç!0—|²›Ãà§8˜VUcÁÀÀt™ <©ª¿ËÍXü¿Èg,"#!4 ¾‘§¥è*W&$>žÐ+8š×9U«Jà¶m¤yî # iSÊ?ŽkÍR23ɧCëß ëãUµD‡o‘*åO|/þUÐ5ùEPƒD.]J²Ë•{•+Gà¹ç¾f §17÷@+xkTVÕÃg#§ÅpVZ|Bv P€¦à‰5ÐïŸÁŸ_zŒ«/7†õžƒ_CT5-¯+-–üðe\Øl¶^ùYŸï>as8Ô{4¸QUÇúZ¢‚‘ßÎÐb%,ÿÒ×òäNÃ;a}C`ºªöòµ4–’ˆÔ~Ä8gç&ÃS«`О¢kå¿Õ`DSØéöYXôSÕ­E׆¥¬àsƪšÆ &6ÅK1”Ï®¼ÝØQÄ'0ë‹KÌËê†p(Ÿ÷aβ)Ô±4|ï•°”:œ¹Ü?& ÷¬„ÍÓ`ÐNŠ4kØÝÛ!a*Üõ·ÓtKàO¹¸˜nÕâGø…2vpDzf°! Ÿ+ Ï’¥0¡ƒ#ç,UuGâ*éü`^2Bá©|bnûª<Ý\@&fd)ãˆHÌw!"OÀÿ~ƒwW{/ëXp|´ >˜á@Eà'iU\÷lñüI ¤ÂñpÚï(€3Í»ÛvÕtä|Ók=PÄ8Ë7œ‡œÏ{G®’Ò¯Cá‡îŽ¨ßªjNs–²‚3]5ƒ¸T˜?n-²,nù—!;`Ö4ˆ9D“EÄF„³¿Qƪºi¶æt‚™1}Bû3ø‘ „Oû8bNQÕ_¼ÔÞâ R*Àà.}Ÿža¿éé@ð˜W{ÀRâ‘ÌôO%?ßÿÍàïk¥C|; B3€xŒBÎuÏbÉ¿QÆ#Ýà ‚!×a‚`ÃSq~åš+àh Æ”ú wo¿èQÕMÀÍÖ´î0¾ >ïÓÑ5`NGÄ7T5GøQKä] !ºàƒÙÐå>ùnv?oÍ1sÕ´^óþ­[ü¿ð¦öDDnƘ­vsá¯|'Í ŽðéÍÎÆTõ~ßÉræˆH,°¨Qà÷W¡yžËÀ¼Ë¼èñ(«€Y_ÞPUó—mñoD¤5°ø÷ðöß]ã}nkcZb›©êZ_Kd)Ùø2‘QÀP³uÕ÷ðÃŒâ—âÕ†ðØ} À\ [IŠA}º81«B ~üõFaãU;B¡Õ#p Æìq‘ª.-^,% ùè •“aë8wùZ&H ‚:áp0UU/÷µD–’¿™©ÝÜ89‚¼nìB±šª^jOsñFàêÒ¬ˆTup—ÙÚ}´ ¡[Ÿþïq± ³VÛ*â2Žˆ\t5[ÃAx&>ŸFÁ1'àžÅŽ˜½(`KžøåÈ@DÊaF¤-Ìžæó`æçP)û-_Ù &÷wÖ.PÕÞm³ø‘瀧ÍV…½ðÁ»0ÐËa(?® ü¤Ttv<¨ªo:ުݯTÕËŸ«¥$""“+ n"lïkyN%S öØYø^U¯õµD–’‹¿ŽŒqÒ]L7{Vv‚ÆÃ•ðŠ'åš0h8 & pñzLzD¿QĪú ðo ŽT…›Ÿ‚¡íðJŸf¹à–N0ô GŸ†ªê›Ž,»€¾ÀZù¯ˆœS,`)8ÜÎò¶~k(VÏé” L¸zµ#n/ óF?Xü¿»‘àÌòÉ‚–¿ÂÛ?B§"ˆc¼#õ„_/‡ŒgçDàUM>ûúK&"Òø¨böTÙ÷Œƒ'‹ÈQåñfðñ8PËÙ±¸FUå# ˜´Âä] ¼¯ª?–’Šˆ\|c<—×õŽxQ±³ª4¿ÓÙ¸JU'úT!"H`OQY±D¤* À^õEæ·#c7ªêRÕ'€~@¢™Ç]Ö º¾Ü#σÊiÏ }—õ…úoÁÏ×:Š8 x3Gì7ŠXDÂE$ÊsŸªÎZ³ÍžÄzðÔpî#0¤=¬?ƒ(h«"àŽ !þI1ÜCÏZçTÄŽég½Ý@P&"WeXJ$W›—ú» ^ §ñ]kØð˜WÕªÕ®—üš%C]w<ì«Ïö†E¤…ˆ¨ˆ¼r¶uåQÿ0YËþò"’*"mT”Û<ŽÍ‘ I‘½"2ÆYˆ4pÒV®fE$×ÀG"RÙ¹·tI‘í"ò¢ˆHŽó†ŠÈà/`pDD>tÿG‰Èý"’åQO‚ˆ /ª>ò~?2öDD"0&Öá@ÌÉ#¡ÉPw9´^µ@Ã$h—uÓ 1ÆÀêXØ ËëÃúVRÙ£ê L°à#~ˆWa<—³ò8ï2àE ­ÇÞ,ˆ_Í—CƒÝPï´<m+Þâ °"6ÇÀºj°¢$ÖwLünæcÒÓýVY_Û€yÀpU-fooKq""›€º0èwøxÉé\»n×}þ9+^~™õ|@›óϧrçÎn§Ï¢æºN0®=°TUÛœMM"òÐØ)5Š:«ˆD{€Îªú§Çþ;ûUµ‰ˆôÞU՚αyÀתú¾3U4øKU‹ÈϘ)»{UÕåü7QÕŹ´]HâUu³dm6&Ö7Î9÷cþ¿8·Ì©ê&çœ>ªz‰£ÈÛ¿=KrªKÉg\(TõðгôéAà &‚5]Lñ$ðd…äSåAÌïeËÔ""7÷ €›óûÑ;&áŸEäjL¿^`,»Î7Åó?Nœz40ê21Žw#UuÚiˆü4p9p‡#÷Ï"2@UœF–ÒE¼y©„yÂ+4"h@. kÔ(ÖÄűétë(<ñîXôgSDB‹0‰Qzàü¸D¤ð-ðð,PxMUßsÒ¡NÆ,¯LvίŒ.ö4«êa™Ü†I¶áæ6àÉè(ѱ€Û4ßã`érŽÃL%ˆª.uFÕ ™ƒ€§€ÜŠØ-3FAçV‡‹Ed'yô¿ˆ´ÞÎÒÏUõ i‘ÆÎñ½˜zUÌÏ¿E¤«#{œšSo{Œ…ÌÃR;ÌgUó=Y¦Fƹá|±Wã„­sLUÁtú^à€?8 ä…ˆ\€yÌR1÷~ÚQÃTõFuê Ã8zU%Ûá+»OUõøY oÚu׉ª~ "«€ïEäUý¢(Ú°”âO¾­£ør%*Š ß~ãæ_eõ¸q¬½óNZT«Fœ ¸Ú·§rãÆTyê)þzþyοñFÚ¾þ:¿&&’Ö¹3ñ¡¡šŠ«W/šwìÈyï½ÇÜÌLô©§èAà3Ïð9ÖS©ëVƘßÀÎ3¼ç;÷÷øKài©è‘$E€§?Š•"²h$`BÚ> Œr”ì­’³1Ê«F1ÝLs”z^Ü+"×b>—@Àí³ño`)æAâ+ TDîUÕÑùÔµÒq¼­¼ ªnå…îwŸ("ïœÍ§Uu’ó¾F‘51VÌ0ÌZN²€¦À¹ªºXæqì8ð¼c\,"ã1ƒ†gTu‰ˆ4‘ë ˜ 1&ñÛ0 l~rê9è0ÿ±7ÑN|Uæ•qN“Ça`¯e)nTu‘cb‰yŠ[£ªŠ ÞtÌu[Aç%ªº@D:ãù§‡ì<²ßPáäÛªÇÈÇÄüÐC4JMåXÿþÌøñGvîÙÃýn3u@.G1gÕ¯Otb"‡>ý”M‡‘ñùçlõ¬kÜ8–¼ú*k*U"äÖ[iûÌ3¬Ê_Ô*ž^ÞÑœ2‘êÀeÀyÔÙ}¸3²8–#4ì1Ìè`𮈴Ç(§žsž¨ªŠÈgÀ­"òf:ï߈8“ru°Ñý;s”Øh`´£`‡ˆÈDÍ;ÓZgÌ``p—ˆ¼éü/ïÃ"› YÅß7Tu'p/𭈸0ñ`æ]ã1#S7Qδ[ƉìvàQrADnÃÌC'aF«)œ´´/9£àó»Ûå pµãÕßã@:Ê9ö °TD¦`¬U ªº ã,öŽˆÜŠ™B¨ 4³#c "r3Æ„s©ó…GU×çUéCU?Â˜ÜÆ‰Éîe)¥¨jæÏØRŽ|"aM˜ÀƆ ©}Á”²† áܸ8bEŒ™ÚCguêDTHºr%‡ï¾›…‡søÜs‰pêâöÛi„+ ×àÁ´^¹’ ùµmÊöòŽØg6¶°£Ô<ûàðŒ£ef‚'+ñ° ¨‰X·³ ©0ÊûmŒý4Çþ€çšÿåœòpt ›€‡0ëÁ˜h/v>¿œds0ó´n™W`©PÕ©˜ÈŠ-1¦÷y˜AÄ3˜9i0Ó)ö‹óþݪš—5 5f ô:ŒÉº¯‡oÐv` ÆÁ÷àz=UñŒ^Œ™·lvä܈±, þƘÑÝþ2ÏŸcúuæ!)ªL­3¶üq/ê^€ƒ†ßଅüãXò€G.8JÍ ÷˜’of¶Ñ£é8p —ìÛÇ#G8K…Ï>ã÷§žâ¯1cèÔ°!ñíÛ3nÜ8.éуvr(.ŽŠ l¿è"¾MN&39™ÇæÍcE‹œDð±cëÙ“/Ö­£€ž—ô_;óÕ>ADb0Ê¢«ª0Ïm‘ŽÀU=¯Xڳʸì""C0ž}ÝËÚz\Ç£ôÌr‰kUu_—XJ"òpÄ€ƒ¯t~l,Á+¼q#ù†ÍŒ‹#¸Q#ÊoßNÚ¶m'ç"““ybÐ þ7i{ë×'rÕ* ™Ó;æ8¼¢ªEDÀÌ/RÕBÍ3—uŠ[[3uEDîÁü8/-kŠÌ<²ªÅ,Y "gÉâ&˜—Cq0¡2˜‹"}ãFŽtÞ¤ÏËþmÛ²çÝEEp¥§“±j‡ ªÇ”¯Îq±‡¼>aÆñéÊPÚø‹S×f{«ŒË ÎSòÍg­C¾–Ç—¨êÇÀM§Û|,Žåô˜OöœègMðJlé“eòdæ¬_ÏáÓ»î«&ެ;Tõ´Bv%ªºZU—ùsœ„¢FU“UõâjÏš©Ë"òf~/õ£dg‹˜ 0ßcœQ8SïQKñ""ƒ!* ¶¼ ±%hþk4zÒ#·=×½Z,9±#ã2„ãžßèañ©8Ñ».ÆÄkŸåÄóµ”|þdBr Üq1ÞŸa>ãÁ—:ŠøÆ?ÁbÉ«ŒËNV£®˜±_¬.jT5CU‡aÌ‘v¾–É’;"RÓY7þ0Ùa§^ «Ã9cå™g9þ{˜íN<óŽª&x§',þ‚5S—Ää>m‰In^P¤ à„  ¼T@]K1áDO{³æ4 “4À…Y#Úˆ‚&KaÅhôá[z4¹67Æ„I¬§ª¹ÅD¶X²±#c?GL"輦…ìVÇqãBàvyßI{fñ!ªº¢õ'L2‚,Œ‡òå˜@ Àß­¡g¼ìÌ•éÖÏQÄYElùÿöÎ;Jª"kà¿ ir– ‚¢ Q”5 FQ$ ú)¦]Q ¸ÂºæˆuM(‹iÅ¢¨KÉa%’A$ Ì€00÷û£ª¡&ô ÝÓ3=÷wN~¡^Õ}ït÷}UuC(˜2ŽQÄñ.—f·peF*Lø (ýî¶Ž=D¤¤7>\ˆ Ö¿—¿÷U=¬ª#8’âï».0°-៮¡ôé3ߙѪš>z•adˆ)ãÄDz‹‡zµÍl俎|.±úL?}mä"'"·àB VÂ…~ X½÷ñÉÜ€ [¼Ón:›<÷éãzyY¾%ûLG†q[3Ž1|š²7p «ûZ¨Çðá ºÆO؈'²øïq/`.^ñÃ>¶2"R5³Ð­"R¹¡;Òæ{˜ü>”Í4Å≳³œßtô–íÌcÁÈ ¦Œc)ŠK}¦ÀŸKÔ#~ªúcÜî_Í9üˆÈe¸ü²Ëq ãCÍð¸¾2ðÎ{¨¾ž}®Ë,™Á ðNm¸ l ¤Ëû—L PÓ1rŽ)ãÁçß|—PüÿÒMßaÄsÀY¨÷ð>ÊÆ ""€'€¸t‹N ­b¸Ü´ƒý‘4h: F~¡ »g IDATçî:qi'U‚!=`Y{\Â{p¹À°ßž‘LÇ^9¼Kmv‹…¼Ë|øÌa@oUMu#D¤%ðniåUƶ¯ÅñÆwEBó)pù\¼Êä`öhW1xî4˜p,îi|ð›;T5š±§Ž)ãŽÏ>ô1°NUÍ`$ñ &>žòq®‘F¸|³õq#áIê§Θê^œo²'.ê-‚3~Ú; þ.h¶š$ÂXRVW€`icø­)*Ôôvœßó+ªúg$d7 ¦Œ 0"Rçgù‹ªÞmy +"R÷Bô?Ü:²Y¯gˆÔÎÆùœ³9"Rç§Ü 8åšZŽKdÿ¢E³3Â…)㊈”>æE+Gªq¿F9h‰[GÞe‘òÞ°êàRÜúêÛÑ22‘SpÁBºâÖþ+rtí7Å-ÿü L&¨êoy$¦Qˆ0e\‘ÒÀ—ÀtUmyŒ£ˆH?à8ØYî«$Η¼.•àŽüh/ " Àݸ´/á¦uóUowQ÷<ËãŒÈ¶¿›{ ‘˜2.`ˆH`"ð­ª>myŒãñIϨêë"ÔQÕ'Ðf]Ü(îbœm5 !]µTàwœAÑTÜHnz´”‰¿ïÛ|ŒPÕ½ÑÅ0ò;¦Œ ~„1 øLUŸŽ¶CDêàŒµ°Àó±‹Wt?­Ýúð'“á²?òVŠm;Âê¸)ëË#]ïF7·¶ü+p. ÒÛÃ0ÂO±ì«y…ˆÔÇùQÕ/¢-Q^Z»Í'¦ÃeÛò^„ÀÄ¡UWØTøPDš{qCZãü”gM,‚aDçüZÜD\¢¯£-9D¤àÓÞ°Þˆ²òü²ÐéRHŽÇ)á¸xÍÉ8åü8ðZN‚–†:¦ŒóÞˆç+œïçähËcD™ ´“v¯ŸA±|ð#ÞéàwKy8å¼ÒÖ‡ #²˜2Ž"’¨ª»Eä \ÈÀOÔçÓÈÿˆÈ5¸¸ÕÀ¿&Âù$BUªÀI=ak9œnm Ø0òSÆQ@D.Jââ ôWÕÿFW*#/‘E@Sh²myŽå•:pÛÅ~çbUUq £Q$Ú6|üÞ@}œ"îmЏp " €¦nïŽ@Zþ*·®…»¼¸WE↑1¦Œ³@DÊxåNîN†/¥½‰ûts¥@Ÿõ8w¢|Vþ²ÒËz…çiF`Ê‘¦"2TD>‘Ù"ò›ˆìÇY‘‘M"2OD&ˆÈ"rNnþ¨D¤,0( ”%UuOXoÈȯtw­×¸Ñ gT®(ãʸ†aä…ÖÏØ»—ôÇ%l¯•EÕb8W~¿+p?°KD¾>> ÑØep °ç&òZ.Å7 >-b·wù*œòËR¥(:j­^}•_æÌ!)pü¡‡8mëVö‰ UªÿÏrLØÌ'žàŒ%KØU·.e7d}:–aÃX¸v-YļîüTÙ¿—:SC¿KÃ0rK¡SÆ"Ò—ê­ë±gÊ€–@ý®Ôôùb·‡ñ°)¶–„…`si\žk}Y,"f“ï  ðð˜ùk:Nü’GÇmd¡Œ÷í#­dIŠŽÃ…§Æ‡ªÐ»75﹇óÚ·gŒ2}:ýV­"iÜ86Üz+uo¹…¶Mš0¦^=J‰pÌËaË–Ô®]›ÊÇ3?«¾5Ê8«—TÃ0ÂH¡QÆ>Þós@Žü)ž´.ÚWm… v…>kÿSø¨:LªË*âŒr¾ðþ£wªêœ .ªœnSÒ…–G7OÛƒ[£Í”™¾jý_z‰3‡gÉóÏÓå•W˜²p!»FbÊÈ‘\4iïÄÇSä±Ç¸ðÿà› Hyì1–·uþùTìÖ÷ÝÇ—kÖœ½¨•ßÑYV3 #l ×&9ø·TM{–Áà '¾lþŸÊðà°"0-˜ üMUGŸ`ÃF !"7¡Ì>Øûb(×\uÕÞ{^K–°¶tiJœqÇ$ Y¼˜ž›7³;>Þ½TŸ{.ÇePªU‹øùóé?a‹ `vhÒömc;KTµih׆q"ļ—ˆ Æe@ª %SáÞ…°vܽŠ„Áà¥Ç6øå{5ª¤qÀ+"ò–ˆ”ÈÛ»5ò1ÕÜGB2!~·>ù„Íó糪U+ ÀÄôçûöeB‡4>óLêöîÍäôç‹E'Mâò5kØ2`3CíjFÆÕ#úD Ã8BLOS‹ÈhœÅ2Psüç¿pöÞÈôvëz¸r+\Ñ~® ‰Èùªæ$ñF$Å}ˆ#›)êgE¹-h°k»o¸sçòSðùE‹Ø½x1«ÿøƒäM›Ø—þúO?åüÄDJuìÈG¡ö騸_aJÛ0Œp³#c¹Ÿ#ЏýXø œDDÝBjü ³~„~˼í€w#à«l<6¹¤²„ð]!íÝw¹ìûï™ã|Ô¿?ç¶oO¹ êjF×?ò;wæÌ«®âƒ;9JŸG˦²ÇÊlF¤‰Ie,"Wã²Ìgo„§A¥þ!å¶; cÀ-L<=€Ç"{ÇFÀ+¶CÅ`M ²ù½ü2-)Ó§ßö›'NdöÛosy‘"Ç*_Ô[N9Ö½;U‡ áÒ!CøhÎve××ñe›)cÃÈcbN‹HKà]@àäðõT(vˆIJâp¸~HH Ô¨Q´ ®¤Œ9’ËTI2„N«Ws}p¹ñFjgÕ·+"ÂÉlF$‰Å5ã—€x¨˜_O†ÄƒÑå³éк4,¯þø¨2LN&íÒKy»aCÓÜ<ôSRR8|ìþûù¼\9ŠgÔö´idéã [ŠÃúš~gYæõ Ã'1åÚ$"=p±€7'ÁÀ|0Ͷ¤4´¸žRÕû£-‘Dä ਹ6¾my2fhSxò:œÂ®®ª¿G["Ã( ÄÌ4µˆÄOº½&›``> ÄßdôXâżSDêFäñîcS-˜ž@Ô¿›• M¼¬3LFÞ3Êè‡Ë†<9‹<1Ö µŒœeþJÔ0ò=ß~™â¹Dý{™¾,)ÿ;ÕË:>À0ŒŒ‰%eÜÓ}4_]'êlÁ¥êŸpõb/gw‰Åµz#Tõ ð¾Û›x.,/IÔ¿›ÁåÖ áP°ø BÁ0Œ ˆ e,"‰Àynï’UD}ª/£r$5] SøŸ‚Q@xH†ƒñpË…DF±æfzº"Loëe|VU·Fì †q1¡ŒË€8Þò¦ÕD}„‘Qé¸jìðòvÐs0ò9^É=íö¦·‡ñ• ÿË_.¾Ÿw]‰û?HúˆÈ$yYD.‘R{ †a1bM-"ï×Âë`IHk]:QáÀÒfÏvYpâã)Ò³'56¤ÜÆ$þ9[·lá@ðuíۓع3UBgÌ`û´iì ]ÒëÚÂûg«Uõ”Я3b ¯ÜV5!q;ÌzNM‰žD—v… —úk€ üþ~Ü:÷À+–úÓ0"C¬(ã9ÀYpÍlø`F(×LÊÅ»w³ÿŠ+øà²Ë¨òÖ[\~ð ‡V¬`KÅŠ”©S‡Ê>È7/¿ÌÚ2e(:i5oN½eËØpà‡N=•Ë—³©S'¾MÒÇÁƒ—T5>—·kÄ"Ò˜ÄÁI+aé PöpÞKrWKxþF\ZÑO€«âÀ8…¼<®ª;ó^>Ã(ÄŠ!‘Ï»Z-Û<±‚#U¬HÜ{ïÑmÊ–wïÎ÷“-Hhܘàð¸qt:ùdª´nÍ[Ë—»úqqÈý÷Ó(Ô>¡n’ß(!"UuG–Õ˜EU‘AÀ›°¾!tì ³Æ@|ZÞIñ|xñzœ"þè§îíü€ˆ\| ü læŠÈkÀ‹ªúgÞÉh…ƒ¿f,"E8’ž®öB_';Ó÷®»8EéÓ‡©ªGëÌŸÏî±cY_º4rÑEœ9r$S—/çH©©~ä–‡Þg£€2¨‰Q¨QÕ·8C}a;h8”&Olúv€!wÃá8\t°ËUõHæ'où}°CUŸZ•€Å"Òßÿî ñðƒªÂ‘~½•qp€ý¦M©¼~=ÛRRHͨnÛ¶”+^œ¸‰Ùjû—3‚Caš26žu›N…Ãat"¦„w–ý`l?H+¬.TÕ-éó ùf)¦ª»Tõ^à| 30ODºDàyF¡$”qPìéý¢Åið4u±bHj*3«[¢ œœyÐʾàúc ̉:î®öCJ¸íïм?|_ްYXïW¸¾=Ôyæ\ë&­Uõ—,äKUÕCAûëUµ?p=.¢Ü÷>9‹a'@WÆÞ¨Ä¯a­)C.FÆ7²«fM*gVwÑ"v¥¥¡:Q1Ôö3.‹Ê‰žâfùU}—ÿzhQXx.\ø œÝÛ‡ÎÌåw.EàÖÖPý s#$WÂå@~¸DUw“ Tu‘ªvÁYY¿&"ãD¤^an ¼2öøì6ëBJÜîËeüÚk,«X‘Ä¡Ci\§X1´U+ÊnÜÈþeËX5x0íÒç“mÛ–üQþÈ$³a8Tu!pp° Òâ`ÎEÐá%¨òOèÜ ^¨‡ù_f•…þç@£Û¡üh}$U÷ÝLš«êPUM ƒÌß­}»“Dd¤ˆT<Ñv £°+®MÓ€pñt˜8)”kfÎäª={Øß¥ ^xV·ÞÊ¥?üÀO ²¹JJwîL“/¿dÞí·3·M¿þšvì`÷wß±tÿ~R[¶ä¤:u¨Z·.¯…&é=ÍàÙÀ^UMȶºQhñQåîþ ”>öl‘T(™¥vC™$ˆ;Éå %ö'ÂÁÒ49 x@UCrýË¥Ì%€[;€#Uu¤ú3ŒX"V”ñ«ÀÍP}3l)5ݰa4NI!uÄVŽ]y%Õn¸3+W&a×.R&OfUðùêÕ)ñðôhܘ‡qxåJ¶ ÎüôA2§óå0ål`ª¶ÈÙ]… äœeó%ñÈ–Tà¿8÷¤¯Tuud$<ÿ"q?pn{ŒªFÁ‡Ú0 ±¢Œ»@ ðÆÔ§¡c> NpX ñH. üSUжDFÁBDhÔªãüë«ãFÎ[qK2WU“2i*O‘ÚÀÃ@ àïªúU4å1ŒüL¬(ãâÀï@9èõŒ›m™Žçµz0èV¿ÓLUEUÃÈ#D¤ ðP ¸WUвH†‘\ªzPD&×Á”æÀ”hËt¨}N:URa[üV6Äï¥à»*0« ¤Ä5½x—<#9œ2…˜RÆ"2è ESá¥à–5Ñ“fv9¸à>HN–à‚-˜‹‡a¤CDjâ,¯ÏTÕÏÃÔîõ¸Øß>IÉCÐc-ôÜ ï‚¢9ø<(ðUEø¨|Zõ'¶wªê¸pÈlNbQWæu ~/Œ.Þž÷’l-͆À¶“€}@GU—÷rFÁADÎÀ…ê,‡³¼ž•Ëvâ€pSá@±4豞þÅ€O”Õñpß©ðy=8°½yËÛ0B%æ”1ùAÏ q+ü÷)8#§‘öƒ`EsÜ:sUŸwýFÁFDÎŹCm†ªêÊ\[ø.Ö7Ðj+¼=ΈÀšôÂÒ0 ,¬âLzªêïáïˈebRˆÈÀD $l‡—_†¾#ßó¼¸òØØÐ¸_UŸŠ|¿†[ø 'W㦯ÀËÙ&"̓ªº,ƒkª³Ÿ´¢ïÿà­ÅP,‚t©ýšÁü•@[ŸÄÆ0B"f•1€ˆôÞŠCуðoÃèÙ‘ëqt=¸çH)ïŒPÕ»#ןaÄ>~Êy0¼,.VÕÅAõJâb ´¢iðìL¸s}ÞIúT]x -¤ n„|¡Ï mÙÓÊ@DÎ>Á…̃G>†kØ5inÜ~ü|žOØþ'p³ª¾¾> £pã­¢ïåHîgŠרêB)‚›šîæj?>†FÁxóÁSà±@Lw}îgÃÈ–˜WÆ"R ø8ÇIƒ3§Â ã¡ã®Ü·¼&nê S»Â¡xpÐ]U矘Ԇa#"e¸©ë–@Ü”p/à"àqWsàBx3ŠQî®i‚ƒÜ¦ª¯DO£ P(”1€ˆnÄ×Ç)åj+¡ù|è3z…0ZžR^m?µ€ §ÃáâþÄ>àEà) `áÇg°j\œÔjâ¢g%¥à¼_á‡(Ç8$Ðî/0·6°h ª'ðÒo 2àוnÇH—=~7”Ù ;¡Ü.(Ÿ{ËÀîò°§$W€”Jéš<¼<®ª[óâ ÃpˆH\4¬6Pò ¬ø(<®K'ÊòRЬ'¤Ååum‰ŒüM¡SÆü”×¥@WàbŽSÌY’|³ÖþBU·„_BÃ0²Ã»1.ŠÂ 90:%aéÓþÝ—[útU]•ÝFá¥Ð*ã`¼ñG_ª•J@>{‹/‹U5¼}FáFDÞn€ ɰö}HÈGî~ƒ×ÁÞ’À˪zG´%2ò/¦Œ Ã(ˆHQ` PÎ7óa„»ÞgÁ¸VÀ& ¶Ú®‘ ±”BÑ0ŒÂEÀ§`ì· 8œÿJï@Îæš¸¸Û†‘!¦Œ Ã(¨xŸâê;¡Ó¢ž·<£ÒuTJòòvÄC0bSƆaT:»Ž«ÈF)vëFå—^âÌôÇﺋzƒS/»ëO¬´ 9'2ÁˆL†QP©í>e;*ž6?®½–æ>ÊicçGâ#páüùDxT]7w f¤„Qð1elFCDJãÒ,µ÷ÍÚíŽü9dæÜæÍ)GÚ›oÒå½÷˜9u*Û/¸€ò½{S-P?.Κë×§ø5×Pµ];Ê·×µ+ºt¡BvýºR+0M]Ý'¿0Œã0elFA¤ÆÑÍ{a„:f ë~ü‘¥cÇrñë¯ÓúÐ!Ývs´;ùsôhºõíK mìXÚß|3­7l`ßyçQ}ôhþÜÖ[oqùé§“J¿Pw´8Î]Ò0ŽÃ”±a‘*G7ì%Ä)ãÞ½ù¡rezõ¢Ý€|uø0‡´yóØýÐC|õ \>lºvåÌž=ù,5•Ã?΢F¨Ýº5e´þý©Oñ_dehýÖß$wÕH>£àbÊØ0Œ‚HPü÷Mq„èj´{7¾ÿž%+V°nÆ þ>7b+~ú‰?L·áÃùbÑ"v‡×¯'å§ŸX~ß}4ß|3;ù†©© ­ßÍÅʊŨ62Ä”±a‘MG7)CÎ «4ý±Ò¥‘Æ©µoû›5£rð¹Q£˜{Á4oØø–-9õé§™z_«ÊxAÓpQü ã8L†Qàð™Ñö¹½59RÆ"¨ÈñÊxüxÎOJbo×®¼Þ£íúö¥fà܇²1)‰=_|ÁU+V°fÞ9o‘¡A}M‘ÛƒäüID*ˆÈÉ"2Ũ¼+" E¤wP{׉Èr_7gÔ§a9ÆÏˆm® C›ÑÓ9-m ‚|¼™Û7b…"p$ÎkOà=œ2îP‚žFÀ]ÀõÀ)@uà6n&pg ¢ˆ´Äe'™•¾39 x—J¬Ð¨TåÀÙ@; !PxÖŸ[ +ïŽ^®…¾^Ó søcÍpSà/øþëŸÃUµ&ðð©ˆTÎàÙ¬zùí3€“ý3¢¨ª;x ‰?> XÜèëÖ‘ËgÍý½‘ÚôiFPÕIÀd·÷ú%°G¿bÍÅôö–¢0¶‹ó3U¡G`Ä‘ñÕÀrU]¥ªk€ùÀ5é꾬ªëUuð …?>8SDNõû7ï¨ê ú»ø·ª.UÕTœò-t~0 §¼ªc8’³Ôm½$ôÞSÕ´ ë‘:ÀyÀ-ªº[U«êLº?nÝf½ˆÔÖ+qÓò陜""UpSÏÿêù—¿Áú¿§4à ªþ™Î§p¸ªPÕyÀrŽ}y0 #÷ Ò ©"ô?ð¯çB÷éû€ƒÀ=‘½}#¬’Eä~¿¿7UýFPÝ߃¶÷ã×hýºÍ{ÀM"2 ¸h•IÕ¹UM‘½"R ¨ˆ§]3ODDUW‰È §ˆŒz­3裰SU3²¬¬ƒ{‰ž2JŽ{qPÕý~ê»3p>ð$n$ÞÁïÌä3")ÝËÉ‘çgƉ¡ª‹EämàøìRøû&xlqô$ú[+øá|¿ó’ª®Žž,FA¡˜ˆ4À)µ§pS®àü÷†ˆHCU]B;£ÿk€yªº*“z›pkªˆH ,Qê;q#ÈÌ\ÞÁM•ï–f"Û: ¢ˆ$ú(=Álæªêu!ܸÑoœŸœ \‰{ÙÈÌÀM1ÿmÃÈkîΚÀÓ Ás0`}Þ‹ñj=Õ×ïÌÁ-]F¶Á€'©êCÁø§ø²EUÿ,ž^Ë¢ê{@/ië ÀÇMxxAD‹H¼ˆœæý|„[wŠSÌɲ˜¼."ÕE$ADkâ$Â@IDAT7o]E¤¯ˆ”‘*"rµˆÔȨ-œ2î,ôSÐßãž×rUÝ‘É5«Eät)ŸÅ³0 #Løå³K€Íp¨Ü~+|Q‘¹;e\Þ¯w ‚ÃqÀoÀªº?òwoÄEpS·ùèþ 8ÉoÏ‚•Ïœò f,nÊ÷ÓÌ:SÕ]þ˜†Sú)¾Ê#8%û&ð‹—¡\Ðõ{çíÀ iÜHù¿Aû½q¡ò&{Ù»ùëÃM3w?]që:1˜Š[¸P}ű/)pL€;ò8ÿé¿dp`¿Ã0„ªn.’a_"ôxhBžXNßÙú …ýå€$àUÝ–'7nÄa‹Àå݇V«êßÃÒ aF.‘spF¦U… ¾€O¿€ÒiÙ\š vƒ+¯„©—ø›îª:'ü}±Ì +c9xgÜÔ"‹é[Ã0Œµá€ sç‹ÈÛ"2TDÖúó]²j/ˆpÁ:©j €ªTÕýȳ2.3ÔÍÁƪú³ª>‘‰¬oˆÈÿ‰Kõ¸Q\êÇD®–ˆÌô÷³TD>‘""ò€ˆ¬‘ "òŽˆ”óõ§â¢¼%"Óý±¯DäÌLúîàÓ,n‘ÞåË0 Ã0²%[eŒ‹õ|™ªVÃ%gx$H!%â21íÀ¥<ü.—o(#îÀdU=”Éù³Cd:#NîÃ)ú“8œk¸”Šm|¿piûãÂ[^œ†‹öõ’¯!.JÖu¸HZø:¥Ówêã{ õ©>÷±· Ã0 #K²UÆ>ý`EéSb¶AU~SÕ×U5UU?Â)«Prõ–åØLPß®9_Ô~UU×ú,I×xC,p÷{Ÿªîò>Ñ}€ç}ýd\~ãkE¤˜¿^™¤ƒ fnº}“O͸ —ž1«MÃ0 Ã8J¶#Xygqø°§ ÊUI¯PCM¸ 7 œÕù"R\U3‹ÁVŽëqF_9ûÒ&©åëתàÖ¬C¥.óUpjÆÝ› Ò0 Ã02$Keì§›oNöÙ‘‹ÃÔ÷×Àó"RNU“2èw6°—ôáíô糘ޮ´]—«øÜH;ý({ÎX,}ýœ†³Û¤©j¿^g†aYOS{…—\%"%Eäzàœ0õ=X|+"çŠH i'"ãpÖÓ)À`¤ˆÜ""õEäT¹çf”7‰Ho¸õ$0VU3 ÿð7Ÿ²±2ð 0FUgR?3þ\!"×ùÔŒUE䩚Ãv Ã0ŒBH(\½q†Ns€ÀpŽNínÇ¥ fGS"¦gÎo/ è»àüŠŸfÏ?ã®ãý‘{áR N>Æå3~. y_þéåýø›?ž>Í"ªúï{ .ã `pP•Yéîeîå` °Ú·³ç+Ý—šñ{œ˜MS†aÙ’/"p… ïŽ4Ê’†aF ”‘±a†aäÿ?D{™dy IEND®B`‚vips-7.38.5/doc/html/vipsmanualse9.html0000644000175000017500000016264512303145652014736 00000000000000 Function dispatch and plug-ins

2.3 Function dispatch and plug-ins

(This chapter is on the verge of being deprecated. We have started building a replacement based on GObject, see §2.4.)

As image processing libraries increase in size it becomes progressively more difficult to build applications which present the operations the library offers to the user. Every time a new operation is added, every user interface needs to be adapted — a job which can rapidly become unmanageable.

To address this problem VIPS includes a simple database which stores an abstract description of every image processing operation. User interfaces, rather than having special code wired into them for each operation, can simply interrogate the database and present what they find to the user.

The operation database is extensible. You can define new operations, and even new types, and add them to VIPS. These new operations will then automatically appear in all VIPS user interfaces with no extra programming effort. Plugins can extend the database at runtime: when VIPS starts, it loads all the plugins in the VIPS library area.

2.3.1 Simple plugin example

As an example, consider this function:

#include <stdio.h>  
 
#include <vips/vips.h>  
 
/⋆ The function we define. Call this  
 ⋆ from other parts of your C  
 ⋆ application.  
 ⋆/  
int  
double_integer( int in )  
{  
  return( in ⋆ 2 );  
}

The source for all the example code in this section is in the vips-examples package.

The first step is to make a layer over this function which will make it look like a standard VIPS function. VIPS insists on the following pattern:

  • The function should be int-valued, and return 0 for success and non-zero for error. It should set im_error().
  • The function should take a single argument: a pointer to a NULL-terminated array of im_objects.
  • Each im_object represents one argument to the function (either output or input) in the form specified by the corresponding entry in the function’s argument descriptor.

The argument descriptor is an array of structures, each describing one argument. For this example, it is:

/⋆ Describe the type of our function.  
 ⋆ One input int, and one output int.  
 ⋆/  
static im_arg_desc arg_types[] = {  
  IM_INPUT_INT( "in" ),  
  IM_OUTPUT_INT( "out" )  
};

IM_INPUT_INT() and IM_OUTPUT_INT() are macros defined in <vips/dispatch.h> which make argument types easy to define. Other macros available are listed in table 2.1.





Macro Meaning im_object has type



IM_INPUT_INT Input int int ⋆
IM_INPUT_INTVEC Input vector of int im_intvec_object ⋆
IM_INPUT_IMASK Input int array im_mask_object ⋆
IM_OUTPUT_INT Output int int ⋆
IM_INPUT_INTVEC Output vector of int im_intvec_object ⋆
IM_OUTPUT_IMASK Output int array to file im_mask_object ⋆
IM_INPUT_DOUBLE Input double double ⋆
IM_INPUT_DOUBLEVEC Input vector of double im_realvec_object ⋆
IM_INPUT_DMASK Input double array im_mask_object ⋆
IM_OUTPUT_DOUBLE Output double double ⋆
IM_OUTPUT_DOUBLEVEC Output vector of double im_realvec_object ⋆
IM_OUTPUT_DMASK Output double array to file im_mask_object ⋆
IM_OUTPUT_DMASK_STATSOutput double array to screen
IM_OUTPUT_COMPLEX Output complex double ⋆
IM_INPUT_STRING Input string char ⋆
IM_OUTPUT_STRING Output string char ⋆
IM_INPUT_IMAGE Input image IMAGE ⋆
IM_INPUT_IMAGEVEC Vector of input images IMAGE ⋆⋆
IM_OUTPUT_IMAGE Output image IMAGE ⋆
IM_RW_IMAGE Read-write image IMAGE ⋆
IM_INPUT_DISPLAY Input display im_col_display ⋆
IM_OUTPUT_DISPLAY Output display im_col_display ⋆
IM_INPUT_GVALUE Input GValue GValue ⋆
IM_OUTPUT_GVALUE Output GValue GValue ⋆
IM_INPUT_INTERPOLATE Input VipsInterpolate VipsInterpolate ⋆




Table 2.1: Argument type macros

The argument to the type macro is the name of the argument. These names are used by user-interface programs to provide feedback, and sometimes as variable names. The order in which you list the arguments is the order in which user-interfaces will present them to the user. You should use the following conventions when selecting names and an order for your arguments:

  • Names should be entirely in lower-case and contain no special characters, apart from the digits 0-9 and the underscore character ‘_’.
  • Names should indicate the function of the argument. For example, im_add() has the following argument names:
    example% vips -help im_add  
    vips: args: in1 in2 out  
    where:  
      in1 is of type "image"  
      in2 is of type "image"  
      out is of type "image"  
    add two images, from package  
      "arithmetic"  
    flags:  
      (PIO function)  
      (no coordinate transformation)  
      (point-to-point operation)

  • You should order arguments with large input objects first, then output objects, then any extra arguments or options. For example, im_extract() has the following sequence of arguments:
    example% vips -help im_extract  
    vips: args: input output left top  
      width height channel  
    where:  
      input is of type "image"  
      output is of type "image"  
      left is of type "integer"  
      top is of type "integer"  
      width is of type "integer"  
      height is of type "integer"  
      channel is of type "integer"  
    extract area/band, from package  
      "conversion"  
    flags:  
      (PIO function)  
      (no coordinate transformation)  
      (point-to-point operation)

This function sits over double_integer(), providing VIPS with an interface which it can call:

/⋆ Call our function via a VIPS  
 ⋆ im_object vector.  
 ⋆/  
static int  
double_vec( im_object ⋆argv )  
{  
  int ⋆in = (int ⋆) argv[0];  
  int ⋆out = (int ⋆) argv[1];  
 
  ⋆out = double_integer( ⋆in );  
 
  /⋆ Always succeed.  
   ⋆/  
  return( 0 );  
}

Finally, these two pieces of information (the argument description and the VIPS-style function wrapper) can be gathered together into a function description.

/⋆ Description of double_integer.  
 ⋆/  
static im_function double_desc = {  
  "double_integer",  
  "double an integer",  
  0,  
  double_vec,  
  IM_NUMBER( arg_types ),  
  arg_types  
};

IM_NUMBER() is a macro which returns the number of elements in a static array. The flags field contains hints which user-interfaces can use for various optimisations. At present, the possible values are:

IM_FN_PIO
This function uses the VIPS PIO system (see §3.3).
IM_FN_TRANSFORM
This the function transforms coordinates.
IM_FN_PTOP
This is a point-to-point operation, that is, it can be replaced with a look-up table.
IM_FN_NOCACHE
This operation has side effects and should not be cached. Useful for video grabbers, for example.

This function description now needs to be added to the VIPS function database. VIPS groups sets of related functions together in packages. There is only a single function in this example, so we can just write:

/⋆ Group up all the functions in this  
 ⋆ file.  
 ⋆/  
static im_function  
  ⋆function_list[] = {  
  &double_desc  
};  
 
/⋆ Define the package_table symbol.  
 ⋆ This is what VIPS looks for when  
 ⋆ loading the plugin.  
 ⋆/  
im_package package_table = {  
  "example",  
  IM_NUMBER( function_list ),  
  function_list  
};

The package has to be named package_table, and has to be exported from the file (that is, not a static). VIPS looks for a symbol of this name when it opens your object file.

This file needs to be made into a dynamically loadable object. On my machine, I can do this with:

example% gcc -fPIC -DPIC -c  
  ‘pkg-config vips-7.12 --cflags‘  
  plug.c -o plug.o  
example% gcc -shared plug.o  
  -o double.plg

You can now use double.plg with any of the VIPS applications which support function dispatch. For example:

example% vips -plugin double.plg \  
  double_integer 12  
24  
example%

When VIPS starts up, it looks for a directory in the library directory called vips-, with the vips major and minor versions numbers as extensions, and loads all files in there with the suffix .plg. So for example, on my machine, the plugin directory is /usr/lib/vips-7.16 and any plugins in that directory are automatically loaded into any VIPS programs on startup.

2.3.2 A more complicated example

This section lists the source for im_extract()’s function description. Almost all functions in the VIPS library have descriptors — if you are not sure how to write a description, it’s usually easiest to copy one from a similar function in the library.

/⋆ Args to im_extract.  
 ⋆/  
static im_arg_desc  
  extract_args[] = {  
  IM_INPUT_IMAGE( "input" ),  
  IM_OUTPUT_IMAGE( "output" ),  
  IM_INPUT_INT( "left" ),  
  IM_INPUT_INT( "top" ),  
  IM_INPUT_INT( "width" ),  
  IM_INPUT_INT( "height" ),  
  IM_INPUT_INT( "channel" )  
};  
 
/⋆ Call im_extract via arg vector.  
 ⋆/  
static int  
extract_vec( im_object ⋆argv )  
{  
  IMAGE_BOX box;  
 
  box.xstart = ⋆((int ⋆) argv[2]);  
  box.ystart = ⋆((int ⋆) argv[3]);  
  box.xsize = ⋆((int ⋆) argv[4]);  
  box.ysize = ⋆((int ⋆) argv[5]);  
  box.chsel = ⋆((int ⋆) argv[6]);  
 
  return( im_extract(  
    argv[0], argv[1], &box ) );  
}  
 
/⋆ Description of im_extract.  
 ⋆/  
static im_function  
  extract_desc = {  
  "im_extract",  
  "extract area/band",  
  IM_FN_PIO | IM_FN_TRANSFORM,  
  extract_vec,  
  NUMBER( extract_args ),  
  extract_args  
};

2.3.3 Adding new types

The VIPS type mechanism is extensible. User plug-ins can add new types and user-interfaces can (to a certain extent) provide interfaces to these user-defined types.

Here is the definition of im_arg_desc:

/⋆ Describe a VIPS command argument.  
 ⋆/  
typedef struct {  
  char ⋆name;  
  im_type_desc ⋆desc;  
  im_print_obj_fn print;  
} im_arg_desc;

The name field is the argument name above. The desc field points to a structure defining the argument type, and the print field is an (optionally NULL) pointer to a function which VIPS will call for output arguments after your function successfully completes and before the object is destroyed. It can be used to print results to the terminal, or to copy results into a user-interface layer.

/⋆ Success on an argument. This is  
 ⋆ called if the image processing  
 ⋆ function succeeds and should be  
 ⋆ used to (for example) print  
 ⋆ output.  
 ⋆/  
typedef int (⋆im_print_obj_fn)  
  ( im_object obj );

im_type_desc is defined as:

/⋆ Describe a VIPS type.  
 ⋆/  
typedef struct {  
  im_arg_type type;  
  int size;  
  im_type_flags flags;  
  im_init_obj_fn init;  
  im_dest_obj_fn dest;  
} im_type_desc;

Where im_arg_type is defined as

/⋆ Type names. You may define your  
 ⋆ own, but if you use one of these,  
 ⋆ then you should use the built-in  
 ⋆ VIPS type converters.  
 ⋆/  
#define IM_TYPE_IMAGEVEC "imagevec"  
#define IM_TYPE_DOUBLEVEC "doublevec"  
#define IM_TYPE_INTVEC "intvec"  
#define IM_TYPE_DOUBLE "double"  
#define IM_TYPE_INT "integer"  
#define IM_TYPE_COMPLEX "complex"  
#define IM_TYPE_STRING "string"  
#define IM_TYPE_IMASK "intmask"  
#define IM_TYPE_DMASK "doublemask"  
#define IM_TYPE_IMAGE "image"  
#define IM_TYPE_DISPLAY "display"  
#define IM_TYPE_GVALUE "gvalue"  
typedef char ⋆im_arg_type;

In other words, it’s just a string. When you add a new type, you just need to choose a new unique string to name it. Be aware that the string is printed to the user by various parts of VIPS, and so needs to be “human-readable”. The flags are:

/⋆ These bits are ored together to  
 ⋆ make the flags in a type  
 ⋆ descriptor.  
 ⋆  
 ⋆ IM_TYPE_OUTPUT: set to indicate  
 ⋆ output, otherwise input.  
 ⋆  
 ⋆ IM_TYPE_ARG: Two ways of making  
 ⋆ an im_object --- with and without  
 ⋆ a command-line string to help you  
 ⋆ along. Arguments with a string  
 ⋆ are thing like IMAGE descriptors,  
 ⋆ which require a filename to  
 ⋆ initialise. Arguments without are  
 ⋆ things like output numbers, where  
 ⋆ making the object simply involves  
 ⋆ allocating storage.  
 ⋆/  
 
typedef enum {  
  IM_TYPE_OUTPUT = 0x1,  
  IM_TYPE_ARG = 0x2  
} im_type_flags;

And the init and destroy functions are:

/⋆ Initialise and destroy objects.  
 ⋆ The "str" argument to the init  
 ⋆ function will not be supplied  
 ⋆ if this is not an ARG type.  
 ⋆/  
typedef int (⋆im_init_obj_fn)  
  ( im_object ⋆obj, char ⋆str );  
typedef int (⋆im_dest_obj_fn)  
  ( im_object obj );

As an example, here is the definition for a new type of unsigned integers. First, we need to define the init and print functions. These transform objects of the type to and from string representation.

/⋆ Init function for unsigned int  
 ⋆ input.  
 ⋆/  
static int  
uint_init( im_object ⋆obj, char ⋆str )  
{  
  unsigned int ⋆i = (int ⋆) ⋆obj;  
 
  if( sscanf( str, "%d", i ) != 1 ||  
    ⋆i < 0 ) {  
    im_error( "uint_init",  
      "bad format" );  
    return( -1 );  
  }  
 
  return( 0 );  
}  
 
/⋆ Print function for unsigned int  
 ⋆ output.  
 ⋆/  
static int  
uint_print( im_object obj )  
{  
  unsigned int ⋆i =  
    (unsigned int ⋆) obj;  
 
  printf( "%d\n", (int) ⋆i );  
 
  return( 0 );  
}

Now we can define the type itself. We make two of these — one for unsigned int used as input, and one for output.

/⋆ Name our type.  
 ⋆/  
#define TYPE_UINT "uint"  
 
/⋆ Input unsigned int type.  
 ⋆/  
static im_type_desc input_uint = {  
  TYPE_UINT,        /⋆ Its an int ⋆/  
  sizeof( unsigned int ),/⋆ Memory ⋆/  
  IM_TYPE_ARG,      /⋆ Needs arg ⋆/  
  uint_init,        /⋆ Init ⋆/  
  NULL              /⋆ Destroy ⋆/  
};  
 
/⋆ Output unsigned int type.  
 ⋆/  
static im_type_desc output_uint = {  
  TYPE_UINT,        /⋆ It's an int ⋆/  
  sizeof( unsigned int ),/⋆ Memory ⋆/  
  IM_TYPE_OUTPUT,   /⋆ It's output ⋆/  
  NULL,             /⋆ Init ⋆/  
  NULL              /⋆ Destroy ⋆/  
};

Finally, we can define two macros to make structures of type im_arg_desc for us.

#define INPUT_UINT( S ) \  
  { S, &input_uint, NULL }  
#define OUTPUT_UINT( S ) \  
  { S, &output_uint, uint_print }

For more examples, see the definitions for the built-in VIPS types.

2.3.4 Using function dispatch in your application

VIPS provides a set of functions for adding new image processing functions to the VIPS function database, finding functions by name, and calling functions. See the manual pages for full details.

Adding and removing functions
im_package ⋆im_load_plugin(  
  const char ⋆name );

This function opens the named file, searches it for a symbol named package_table, and adds any functions it finds to the VIPS function database. When you search for a function, any plug-ins are searched first, so you can override standard VIPS function with your own code.

The function returns a pointer to the package it added, or NULL on error.

int im_close_plugins( void )

This function closes all plug-ins, removing then from the VIPS function database. It returns non-zero on error.

Searching the function database
void ⋆im_map_packages(  
  im_list_map_fn fn, void ⋆a )

This function applies the argument function fn to every package in the database, starting with the most recently added package. As with im_list_map(), the argument function should return NULL to continue searching, or non-NULL to terminate the search early. im_map_packages() returns NULL if fn returned NULL for all arguments. The extra argument a is carried around by VIPS for your use.

For example, this fragment of code prints the names of all loaded packages to fd:

static void ⋆  
print_package_name( im_package ⋆pack,  
  FILE ⋆fp )  
{  
  (void) fprintf( fp,  
    "package: \"%s\"\n",  
    pack->name );  
 
  /⋆ Continue search.  
   ⋆/  
  return( NULL );  
}  
 
static void  
print_packages( FILE ⋆fp )  
{  
  (void) im_map_packages(  
    (im_list_map_fn)  
    print_package_name, fp );  
}

VIPS defines three convenience functions based on im_map_packages() which simplify searching for specific functions:

im_function ⋆  
  im_find_function( char ⋆name )  
im_package ⋆  
  im_find_package( char ⋆name )  
im_package ⋆  
  im_package_of_function( char ⋆name )

Building argument structures and running commands
int im_free_vargv( im_function ⋆fn,  
  im_object ⋆vargv )  
int im_allocate_vargv(  
  im_function ⋆fn,  
  im_object ⋆vargv )

These two functions allocate space for and free VIPS argument lists. The allocate function simply calls im_malloc() to allocate any store that the types require (and also initializes it to zero). The free function just calls im_free() for any storage that was allocated.

Note that neither of these functions calls the init, dest or print functions for the types — that’s up to you.

int im_run_command( char ⋆name,  
  int argc, char ⋆⋆argv )

This function does everything. In effect,

im_run_command( "im_invert", 2,  
  { "fred.v", "fred2.v", NULL } )

is exactly equivalent to

system( "vips im_invert fred.v "  
  "fred2.v" )

but no process is forked.

vips-7.38.5/doc/html/vipsmanualch4.html0000644000175000017500000000777112303145652014712 00000000000000 4 VIPS reference

Chapter 4
VIPS reference

 4.1 Introduction
 4.2 VIPS packages
  4.2.1 Arithmetic
  4.2.2 Relational
  4.2.3 Boolean
  4.2.4 Colour
  4.2.5 Conversion
  4.2.6 Matricies
  4.2.7 Convolution
  4.2.8 In-place operations
  4.2.9 Frequency filtering
  4.2.10 Histograms and LUTs
  4.2.11 Morphology
  4.2.12 Mosaicing
  4.2.13 CImg functions
  4.2.14 Other
  4.2.15 IO functions
  4.2.16 Format functions
  4.2.17 Resample functions

vips-7.38.5/doc/html/vipsmanualli1.html0000644000175000017500000004064112303145652014712 00000000000000 Contents

Contents

1 VIPS from C++ and Python
 1.1 Introduction
  1.1.1 If you’ve used the C API
 1.2 The VIPS file format
  1.2.1 VIPS file header
  1.2.2 Computation formats
  1.2.3 Storage formats
 1.3 The VImage class
  1.3.1 Constructors
  1.3.2 File conversion
  1.3.3 Projection functions
  1.3.4 Assignment
  1.3.5 Computing with VImages
  1.3.6 Writing results
  1.3.7 Type conversions
 1.4 The VMask class
  1.4.1 Constructors
  1.4.2 Projection functions
  1.4.3 Assignment
  1.4.4 Computing with VMask
  1.4.5 VIMask operations
  1.4.6 VDMask operations
  1.4.7 Output of masks
 1.5 The VDisplay class
  1.5.1 Constructors
  1.5.2 Projection functions
 1.6 The VError class
  1.6.1 Constructors
  1.6.2 Projection functions
  1.6.3 Computing with VError
  1.6.4 Convenience function
2 VIPS for C programmers
 2.1 Introduction
 2.2 Core C API
  2.2.1 Startup
  2.2.2 Image descriptors
  2.2.3 Header fields
  2.2.4 Opening and closing
  2.2.5 Examples
  2.2.6 Metadata
  2.2.7 History
  2.2.8 Eval callbacks
  2.2.9 Detailed rules for descriptors
  2.2.10 Automatic resource deallocation
  2.2.11 Error handling
  2.2.12 Joining operations together
 2.3 Function dispatch and plug-ins
  2.3.1 Simple plugin example
  2.3.2 A more complicated example
  2.3.3 Adding new types
  2.3.4 Using function dispatch in your application
 2.4 The VIPS base class: VipsObject
  2.4.1 Properties
  2.4.2 Convenience functions
 2.5 Image formats
  2.5.1 How a format is represented
  2.5.2 The format class
  2.5.3 Finding a format
  2.5.4 Convenience functions
 2.6 Interpolators
  2.6.1 How an interpolator is represented
  2.6.2 A sample interpolator
  2.6.3 Writing a VIPS operation that takes an interpolator as an argument
  2.6.4 Passing an interpolator to a VIPS operation
3 Writing VIPS operations
 3.1 Introduction
  3.1.1 Why use VIPS?
  3.1.2 I/O styles
 3.2 Programming WIO operations
  3.2.1 Input from an image
  3.2.2 Output to an image
  3.2.3 Polymorphism
 3.3 Programming PIO functions
  3.3.1 Easy PIO with im_wrapone() and im_wrapmany()
  3.3.2 Region descriptors
  3.3.3 Image input with regions
  3.3.4 Splitting into sequences
  3.3.5 Output to regions
  3.3.6 Callbacks
  3.3.7 Memory allocation revisited
 3.4 Programming in-place functions
4 VIPS reference
 4.1 Introduction
 4.2 VIPS packages
  4.2.1 Arithmetic
  4.2.2 Relational
  4.2.3 Boolean
  4.2.4 Colour
  4.2.5 Conversion
  4.2.6 Matricies
  4.2.7 Convolution
  4.2.8 In-place operations
  4.2.9 Frequency filtering
  4.2.10 Histograms and LUTs
  4.2.11 Morphology
  4.2.12 Mosaicing
  4.2.13 CImg functions
  4.2.14 Other
  4.2.15 IO functions
  4.2.16 Format functions
  4.2.17 Resample functions

vips-7.38.5/doc/html/vipsmanualch2.html0000644000175000017500000001371312303145652014701 00000000000000 2 VIPS for C programmers

Chapter 2
VIPS for C programmers

vips-7.38.5/doc/html/vipsmanualse1.html0000644000175000017500000002330012303145652014706 00000000000000 Introduction

1.1 Introduction

This chapter describes the C++ API for the VIPS image processing library. The C++ API is as efficient as the C interface to VIPS, but is far easier to use: almost all creation, destruction and error handling issues are handled for you automatically.

The Python interface is a very simple wrapping of this C++ API generated automatically with SWIG. It adds a few utility methods noted below, but otherwise the two interfaces are identical other than language syntax.

1.1.1 If you’ve used the C API

To show how much easier the VIPS C++ API is to use, compare Figure 2.2.5 to Figure 1.1. Figure 1.2 is the same thing in Python.

A typical build line for the C++ program might be:

g++ invert.cc \  
  ‘pkg-config vipsCC-7.18 \  
    --cflags --libs‘

The key points are:

  • You just include <vips/vips> — this then gets all of the other includes you need. Everything is in the vips namespace.
  • The C++ API replaces all of the VIPS C types — IMAGE becomes VImage and so on. The C++ API also includes VDisplay, VMask and VError.
  • Image processing operations are member functions of the VImage class — here, VImage( argv[1] ) creates a new VImage object using the first argument to initialise it (the input filename). It then calls the member function invert(), which inverts the VImage and returns a new VImage. Finally it calls the member function write(), which writes the result image to the named file.
  • The VIPS C++ API uses exceptions — the VError class is covered later. If you run this program with a bad input file, for example, you get the following output:
    $ invert jim fred  
    invert: VIPS error: format_for_file:  
      file "jim" not found


#include <iostream>  
#include <vips/vips>  
 
int  
main (int argc, char ⋆⋆argv)  
{  
  if (argc != 3)  
    {  
      std::cerr << "usage: " << argv[0] << " infile outfile\n";  
      return (1);  
    }  
 
  try  
  {  
    vips::VImage fred (argv[1]);  
 
    fred.invert ().write (argv[2]);  
  }  
  catch (vips::VError e)  
  {  
    e.perror (argv[0]);  
  }  
 
  return (0);  
}


Figure 1.1: invert program in C++


#!/usr/bin/python  
 
import sys  
from vipsCC import ⋆  
 
try:  
  a = VImage.VImage (sys.argv[1])  
  a.invert ().write (sys.argv[2])  
except VError.VError, e:  
  e.perror (sys.argv[0])


Figure 1.2: invert program in Python

vips-7.38.5/doc/html/vipsmanualse13.html0000644000175000017500000002024512303145652014776 00000000000000 Introduction

3.1 Introduction

This chapter explains how to write image processing operations using the VIPS image I/O (input-output) system. For background, you should probably take a look at §2.1. This is supposed to be a tutorial, if you need detailed information on any particular function, use the on-line UNIX manual pages.

3.1.1 Why use VIPS?

If you use the VIPS image I/O system, you get a number of benefits:

Threading
If your computer has more than one CPU, the VIPS I/O system will automatically split your image processing operation into separate threads (provided you use PIO, see below). You should get an approximately linear speed-up as you add more CPUs.
Pipelining
Provided you use PIO (again, see below), VIPS can automatically join operations together. A sequence of image processing operations will all execute together, with image data flowing through the processing pipeline in small pieces. This makes it possible to perform complex processing on very large images with no need to worry about storage management.
Composition
Because VIPS can efficiently compose image processing operations, you can implement your new operation in small, reusable, easy-to-understand pieces. VIPS already has a lot of these: many new operations can be implemented by simply composing existing operations.
Large files
Provided you use PIO and as long as the underlying OS supports large files (that is, files larger than 2GB), VIPS operations can work on files larger than can be addressed with 32 bits on a plain 32-bit machine. VIPS operations only see 32 bit addresses; the VIPS I/O system transparently maps these to 64 bit operations for I/O. Large file support is included on most machines after about 1998.
Abstraction
VIPS operations see only arrays of numbers in native format. Details of representation (big/little endian, VIPS/TIFF/JPEG file format, etc.) are hidden from you.
Interfaces
Once you have your image processing operation implemented, it automatically appears in all of the VIPS interfaces. VIPS comes with a GUI (nip2), a UNIX command-line interface (vips) and a C++ and Python API.
Portability
VIPS operations can be compiled on most unixes, Mac OS X and Windows NT, 2000 and XP without modification. Mostly.

3.1.2 I/O styles

The I/O system supports three styles of input-output.

Whole-image I/O (WIO)
This style is a largely a left-over from VIPS 6.x. WIO image-processing operations have all of the input image given to them in a large memory array. They can read any of the input pels at will with simple pointer arithmetic.
Partial-image I/O (PIO)
In this style operations only have a small part of the input image available to them at any time. When PIO operations are joined together into a pipeline, images flow through them in small pieces, with all the operations in a pipeline executing at the same time.
In-place
The third style allows pels to be read and written anywhere in the image at any time, and is used by the VIPS in-place operations, such as im_fastline(). You should only use it for operations which would just be impossibly inefficient to write with either of the other two styles.

WIO operations are easy to program, but slow and inflexible when images become large. PIO operations are harder to program, but scale well as images become larger, and are automatically parallelized by the VIPS I/O system.

If you can face it, and if your algorithm can be expressed in this way, you should write your operations using PIO. Whichever you choose, applications which call your operation will see no difference, except in execution speed.

If your image processing operation performs no coordinate transformations, that is, if your output image is the same size as your input image or images, and if each output pixel depends only upon the pixel at the corresponding position in the input images, then you can use the im_wrapone() and im_wrapmany() operations. These take a simple buffer-processing operation supplied by you and wrap it up as a full-blown PIO operation. See §3.3.1.

vips-7.38.5/doc/html/vipsmanualse2.html0000644000175000017500000012432712303145652014722 00000000000000 The VIPS file format

1.2 The VIPS file format

VIPS has its own very simple file format. It is used inside VIPS to hold images during computation. You can save images in VIPS format if you want, but the VIPS format is not widely used and you may have problems reading your images into other packages.

If you intend to keep an image, it’s much better to save it as TIFF, JPEG, PNG, PBM/PGM/PPM or HDR. VIPS can transparently read and write all these formats.

1.2.1 VIPS file header

All VIPS image files start with a 64-byte header giving basic information about the image dimensions, see Table 1.1. This is followed by the image data. This is usually just the pixel values in native format (ie. the byte order used by the machine that wrote the file) laid out left-to-right and top-to-bottom. After the image data comes a block of optional XML which holds extra image metadata, such as ICC profiles and image history. You can use the command-line program header to extract the XML from an image and edvips to replace it, see the man pages.

The Type field, the Xres/Yres fields, and the Xoffset/Yoffset fields are advisory. VIPS maintains their value (if you convert an image to CIE Lab colour space with im_XYZ2Lab(), for example, VIPS will set Type to be IM_TYPE_LAB), but never uses these values itself in determining the action of an image processing function. These fields are to help the user and to help application programs built on VIPS which are trying to present image data to the user in a meaningful way.

The BandFmt, Coding and Type fields can take the values shown in tables 1.2, 1.3 and 1.4. The C++ and Python names for these values are slightly different, for historical reasons.





BytesRepresent VIPS name



0–3 VIPS magic number (in hex, 08 f2 f6 b6)
4–7 Number of pels per horizontal line (integer)Xsize
8–11 Number of horizontal lines (integer) Ysize
12–15Number of bands (integer) Bands
16–19Unused (legacy) Bbits
20–23Band format (eg. IM_BANDFMT_USHORT)BandFmt
24–27Coding type (eg. IM_CODING_NONE) Coding
28–31Type (eg. IM_TYPE_LAB) Type
32–35Horizontal resolution (float, pixels mm1) Xres
36–39Vertical resolution (float, pixels mm1) Yres
40–43Unused (legacy) Length
44–45Unused (legacy) Compression
46–47Unused (legacy) Level
48–51Horizontal offset of origin Xoffset
52–55Vertical offset of origin Yoffset
56–63For future expansion (all zeros for now)




Table 1.1: VIPS header






BandFmt C++ and Python nameValueMeaning




IM_BANDFMT_NOTSET FMTNOTSET -1
IM_BANDFMT_UCHAR FMTUCHAR 0 Unsigned 8-bit int
IM_BANDFMT_CHAR FMTCHAR 1 Signed 8-bit int
IM_BANDFMT_USHORT FMTUSHORT 2 Unsigned 16-bit int
IM_BANDFMT_SHORT FMTSHORT 3 Signed 16-bit int
IM_BANDFMT_UINT FMTUINT 4 Unsigned 32-bit int
IM_BANDFMT_INT FMTINT 5 Signed 32-bit int
IM_BANDFMT_FLOAT FMTFLOAT 6 32-bit IEEE float
IM_BANDFMT_COMPLEX FMTCOMPLEX 7 Complex (2 floats)
IM_BANDFMT_DOUBLE FMTDOUBLE 8 64-bit IEEE double
IM_BANDFMT_DPCOMPLEXFMTDPCOMPLEX 9 Complex (2 doubles)





Table 1.2: Possible values for BandFmt






Coding C++ and Python nameValueMeaning




IM_CODING_NONENOCODING 0 VIPS computation format
IM_CODING_LABQLABQ 2 LABQ storage format
IM_CODING_RAD RAD 6 Radiance storage format





Table 1.3: Possible values for Coding






Type C++ and Python nameValueMeaning




IM_TYPE_MULTIBANDMULTIBAND 0 Some multiband image
IM_TYPE_B_W B_W 1 Some single band image
IM_TYPE_HISTOGRAMHISTOGRAM 10 Histogram or LUT
IM_TYPE_FOURIER FOURIER 24 Image in Fourier space
IM_TYPE_XYZ XYZ 12 CIE XYZ colour space
IM_TYPE_LAB LAB 13 CIE Lab colour space
IM_TYPE_CMYK CMYK 15 im_icc_export()
IM_TYPE_LABQ LABQ 16 32-bit CIE Lab
IM_TYPE_RGB RGB 17 Some RGB
IM_TYPE_UCS UCS 18 UCS(1:1) colour space
IM_TYPE_LCH LCH 19 CIE LCh colour space
IM_TYPE_LABS LABS 21 48-bit CIE Lab
IM_TYPE_sRGB sRGB 22 sRGB colour space
IM_TYPE_YXY YXY 23 CIE Yxy colour space
IM_TYPE_RGB16 RGB16 25 16-bit RGB
IM_TYPE_GREY16 GREY16 26 16-bit monochrome





Table 1.4: Possible values for Type

1.2.2 Computation formats

This type of image has Coding set to IM_CODING_NONE. The header is then followed by a large array of pixels, laid out left-to-right, top-to-bottom. Each pixel contains the specified number of bands. Each band has the specified band format, which may be an 8-, 16- or 32-bit integer (either signed or unsigned), a single or double precision IEEE floating point number, or a pair of single or double precision floats forming a complex number.

All values are stored in the host-machine’s native number representation (that is, either most-significant first, as in SPARC and 680x0 machines, or least-significant first, for Intel and DEC machines). If necessary, the VIPS library will automatically byte-swap for you during read.

1.2.3 Storage formats

All storage formats have other values for the Coding field. This release supports IM_CODING_LABQ and IM_CODING_RAD.

IM_CODING_LABQ stores L, a and b for each pixel, with 10 bits for L and 11 bits for each of a and b. These 32 bits are packed into 4 bytes, with the most significant 8 bits of each value in the first 3 bytes, and the left-over bits packed into the final byte as 2:3:3.

This format is a little awkward to process. Some VIPS functions can work directly on IM_CODING_LABQ images (im_extract_area(), for example), but most will require you to unpack the image to one of the computation formats (for example with im_LabQ2Lab()) first.

IM_CODING_RAD stores RGB or XY Z float images as 8 bytes of mantissa and then 8 bytes of exponent, shared between the three channels. This coding style is used by the Radiance family of programs (and the HDR format) commonly used for HDR imaging. This style of image is generated when you load an HDR image.

This format is a little awkward to process. Some VIPS functions can work directly on IM_CODING_RAD images (im_extract_area(), for example), but most will require you to unpack the image to one of the computation formats with im_rad2float() first.

vips-7.38.5/doc/html/vipsmanualse10.html0000644000175000017500000002522212303145652014773 00000000000000 The VIPS base class: VipsObject

2.4 The VIPS base class: VipsObject

VIPS is in the process of moving to an object system based on GObject. You can read about the GObjec library at the GTK+ website:

http://www.gtk.org

We’ve implemented two new subsystems (VipsFormat and VipsInterpolate) on top of VipsObject but not yet moved the core VIPS types over. As a result, VipsObject is still developing and is likely to change in the next release.

This section quickly summarises enough of the VipsObject system to let you use the two derived APIs but that’s all. Full documentation will come when this system stabilises.

2.4.1 Properties

Like the rest of VIPS, VipsObject is a functional type. You can set properties during object construction, but not after that point. You may read properties at any time after construction, but not before.

To enforce these rules, VIPS extends the standard GObject property system and adds a new phase to object creation. An object has the following stages in its life:

Lookup

vips_type_find() is a convenience function that looks up a type by its nickname relative to a base class. For example:

GType type =  
  vips_type_find( "VipsInterpolate", "bilinear" );

finds a subclass of VipsInterpolate nicknamed ‘bilinear’. You can look up types by their full name of course, but these can be rather unwieldy (VipsInterpolateBilinear in this case, for example).

Create

Build an instance with g_object_new(). For example:

VipsObject ⋆object =  
  g_object_new( type,  
    "sharpness", 12.0,  
    NULL );

You can set any of the object’s properties in the constructor. You can continue to set, but not read, any other properties, for example:

g_object_set( object,  
    "sharpness", 12.0,  
    NULL );

You can loop over an object’s required and optional parameters with vips_argument_map().

Build

Once all of the required any any of the optional object parameters have been set, call vips_object_build():

int vips_object_build( VipsObject ⋆object );

This function checks that all the parameters have been set correctly and starts the object working. It returns non-zero on error, setting im_error_string().

Use

The object is now fully working. You can read results from it, or pass it on other objects. When you’re finished with it, drop your reference to end its life.

g_object_unref( object );

2.4.2 Convenience functions

Two functions simplify building and printing objects. vips_object_new_from_string() makes a new object which is a subclass of a named base class.

VipsObject ⋆  
  vips_object_new_from_string(  
    const char ⋆basename, const char ⋆p );

This is the function used by IM_INPUT_INTERPOLATE(), for example, to parse command-line arguments. The syntax is:

nickname [ ( required-arg1,  
  ...  
  required-argn,  
  optional-arg-name = value,  
  ...  
  optional-argm-name = value ) ]

So values for all the required arguments, in the correct order, then name = value for all the optional arguments you want to set. Parameters may be enclosed in round or curly braces.

vips_object_to_string() is the exact opposite: it generates the construct string for any constructed VipsObject.

vips_object_new() wraps up the business of creating and checking an object. It makes the object, uses the supplied function to attach any arguments, then builds the object and returns NULL on failure or the new object on success.

A switch to the vips command-line program is handy for listing subtypes of VipsObject. Try:

$ vips list classes

vips-7.38.5/doc/html/vipsmanualse16.html0000644000175000017500000001174212303145652015003 00000000000000 Programming in-place functions

3.4 Programming in-place functions

VIPS includes a little support for in-place functions — functions which operate directly on an image, both reading and writing from the same descriptor via the data pointer. This is an extremely dangerous way to handle IO, since any bugs in your program will trash your input image.

Operations of this type should call im_rwcheck() instead of im_incheck(). im_rwcheck() tries to get a descriptor ready for in-place writing. For example, a function which cleared an image to black might be written as:

#include <stdio.h>  
#include <memory.h>  
 
#include <vips/vips.h>  
 
int  
black_inplace( IMAGE ⋆im )  
{  
   /⋆ Check that we can RW to im.  
    ⋆/  
   if( im_rwcheck( im ) )  
      return( -1 );  
 
   /⋆ Zap the image!  
    ⋆/  
   memset( im->data, 0,  
      IM_IMAGE_SIZEOF_LINE( im ) ⋆  
      im->Ysize );  
 
   return( 0 );  
}

This function might be called from an application as:

#include <stdio.h>  
#include <stdlib.h>  
 
#include <vips/vips.h>  
 
void  
zap( char ⋆name )  
{  
   IMAGE ⋆im;  
 
   if( !(im = im_open( name, "rw" )) ||  
      black_inplace( im ) ||  
      im_updatehist( im, "zap image" ) ||  
      im_close( im ) )  
      error_exit( "failure!" );  
}

vips-7.38.5/doc/html/vipsmanualse5.html0000644000175000017500000001427612303145652014726 00000000000000 The VDisplay class

1.5 The VDisplay class

The VDisplay class is an abstraction over the VIPS im_col_display type which gives convenient and safe representation of VIPS display profiles.

VIPS display profiles are now mostly obsolete. You’re better off using the ICC colour management VImage member functions ICC_export() and ICC_import().

1.5.1 Constructors

There are two constructors for VDisplay:

VDisplay( const char ⋆name );  
VDisplay();

The first form initialises the display from one of the standard VIPS display types. For example:

VDisplay fred( "sRGB" );  
VDisplay jim( "ultra2-20/2/98" );

Makes fred a profile for making images in sRGB format, and jim a profile representing my workstation display, as of 20/2/98. The second form of constructor makes an uninitialised display.

1.5.2 Projection functions

A set of member functions of VDisplay provide read and write access to the fields in the display.

char ⋆name();  
VDisplayType &type();  
matrix &mat();  
float &YCW();  
float &xCW();  
float &yCW();  
float &YCR();  
float &YCG();  
float &YCB();  
int &Vrwr();  
int &Vrwg();  
int &Vrwb();  
float &Y0R();  
float &Y0G();  
float &Y0B();  
float &gammaR();  
float &gammaG();  
float &gammaB();  
float &B();  
float &P();

Where VDisplayType is defined as:

enum VDisplayType {  
    BARCO,  
    DUMB  
};

And matrix is defined as:

typedef float matrix[3][3];

For a description of all the fields in a VIPS display profile, see the manual page for im_XYZ2RGB().

vips-7.38.5/doc/html/vipsmanualch1.html0000644000175000017500000001336112303145652014677 00000000000000 1 VIPS from C++ and Python

Chapter 1
VIPS from C++ and Python

vips-7.38.5/doc/html/vipsmanualse12.html0000644000175000017500000003175412303145652015004 00000000000000 Interpolators

2.6 Interpolators

VIPS has a general system for representing pixel interpolators. You can select an interpolator to pass to other VIPS operations, such as im_affinei(), you can add new interpolators, and you can write operations which take a general interpolator as a parameter.

An interpolator is a function of the form:

typedef void (⋆VipsInterpolateMethod)( VipsInterpolate ⋆,  
  PEL ⋆out, REGION ⋆in, double x, double y );

given the set of input pixels in, it has to calculate a value for the fractional position (x,y) and write this value to the memory pointed to by out.

VIPS uses corner convention, so the value of pixel (0,0) is the value of the surface the interpolator fits at the fractional position (0.0,0.0).

2.6.1 How an interpolator is represented

See the man page for VipsInterpolate for full details, but briefly, an interpolator is a subclass of VipsInterpolate implementing the following items:

  • An interpolation method, with the type signature above.
  • A function get_window_size() which returns the size of the area of pixels that the interpolator needs in order to calculate a value. For example, a bilinear interpolator needs the four pixels surrounding the point to be calculated, or a 2 by 2 window, so window size should be 2.
  • Or if the window size is constant, you can leave get_window_size() NULL and just set the int value window_size.

2.6.2 A sample interpolator

As an example, Figure 2.10 shows how to register a new interpolator in a plugin.


// This interpolator adds no new members.  
typedef VipsInterpolate Myinterpolator;  
typedef VipsInterpolateClass MyinterpolatorClass;  
 
G_DEFINE_TYPE( Myinterpolator, myinterpolator, VIPS_TYPE_INTERPOLATE );  
 
static void  
myinterpolator_interpolate( VipsInterpolate ⋆interpolate,  
PEL ⋆out, REGION ⋆in, double x, double y )  
{  
  MyinterpolatorClass ⋆class =  
    MYINTERPOLATOR_GET_CLASS( interpolate );  
 
  /⋆ Nearest-neighbor.  
   ⋆/  
  memcpy( out,  
    IM_REGION_ADDR( in, floor( x ), floor( y ) ),  
    IM_IMAGE_SIZEOF_PEL( in->im ) );  
}  
 
static void  
myinterpolator_class_init( MyinterpolatorClass ⋆class )  
{  
  VipsObjectClass ⋆object_class = (VipsObjectClass ⋆) class;  
  VipsInterpolateClass ⋆interpolate_class = (VipsInterpolateClass ⋆) class;  
 
  object_class->nickname = "myinterpolator";  
  object_class->description = _( "My interpolator" );  
 
  interpolate_class->interpolate = myinterpolator_interpolate;  
}  
 
static void  
myinterpolate_init( Myinterpolate ⋆object )  
{  
}  
 
char ⋆  
g_module_check_init( GModule ⋆self )  
{  
  // register the type  
  myinterpolator_get_type();  
}


Figure 2.10: Registering an interpolator in a plugin

2.6.3 Writing a VIPS operation that takes an interpolator as an argument

Operations just take a VipsInterpolate as an argument, for example:

int im_affinei_all( IMAGE ⋆in, IMAGE ⋆out,  
  VipsInterpolate ⋆interpolate,  
  double a, double b, double c, double d,  
  double dx, double dy );

To use the interpolator, use vips_interpolate():

void vips_interpolate( VipsInterpolate ⋆interpolate,  
  PEL ⋆out, REGION ⋆in, double x, double y );

This looks up the interpolate method for the object and calls it for you.

You can save the cost of the lookup in an inner loop with vips_interpolate_get_method():

VipsInterpolateMethod  
  vips_interpolate_get_method(  
    VipsInterpolate ⋆interpolate );

2.6.4 Passing an interpolator to a VIPS operation

You can build an instance of a VipsInterpolator with the vips_object_⋆() family of functions, see §2.4.

Convenience functions return a static instance of one of the standard interpolators:

VipsInterpolate ⋆vips_interpolate_nearest_static( void );  
VipsInterpolate ⋆vips_interpolate_bilinear_static( void );

Don’t free the result.

Finally, vips_interpolate_new() makes a VipsInterpolate from a nickname:

VipsInterpolate ⋆vips_interpolate_new( const char ⋆nickname );

For example:

VipsInterpolate ⋆interpolate = vips_interpolate_new( "nohalo" );

You must drop your ref after you’re done with the object with g_object_unref().

vips-7.38.5/doc/html/vipsmanual.css0000644000175000017500000002133112303145652014123 00000000000000 /* start css.sty */ .cmr-7{font-size:70%;} .cmmi-10{font-style: italic;} .cmsy-7{font-size:70%;} .ptmr7t-{font-family: monospace;} .ptmr7t-{font-family: monospace;} .ptmr7t-{font-family: monospace;} .ptmr7t-x-x-207{font-size:207%;font-family: monospace;} .ptmr7t-x-x-207{font-family: monospace;} .ptmr7t-x-x-207{font-family: monospace;} .ptmr7t-x-x-120{font-size:120%;font-family: monospace;} .ptmr7t-x-x-120{font-family: monospace;} .ptmr7t-x-x-120{font-family: monospace;} .pcrr7t-{font-family: monospace;} .ptmri7t-{font-style: italic;} .ptmb7t-{ font-weight: bold;} .pcrb7t-{ font-family: monospace; font-weight: bold;} p.noindent { text-indent: 0em } td p.noindent { text-indent: 0em; margin-top:0em; } p.nopar { text-indent: 0em; } p.indent{ text-indent: 1.5em } @media print {div.crosslinks {visibility:hidden;}} a img { border-top: 0; border-left: 0; border-right: 0; } center { margin-top:1em; margin-bottom:1em; } td center { margin-top:0em; margin-bottom:0em; } .Canvas { position:relative; } img.math{vertical-align:middle;} li p.indent { text-indent: 0em } li p:first-child{ margin-top:0em; } li p:last-child, li div:last-child { margin-bottom:0.5em; } li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } .enumerate1 {list-style-type:decimal;} .enumerate2 {list-style-type:lower-alpha;} .enumerate3 {list-style-type:lower-roman;} .enumerate4 {list-style-type:upper-alpha;} div.newtheorem { margin-bottom: 2em; margin-top: 2em;} .obeylines-h,.obeylines-v {white-space: nowrap; } div.obeylines-v p { margin-top:0; margin-bottom:0; } .overline{ text-decoration:overline; } .overline img{ border-top: 1px solid black; } td.displaylines {text-align:center; white-space:nowrap;} .centerline {text-align:center;} .rightline {text-align:right;} div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } .fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } div.fbox {display:table} div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } div.minipage{width:100%;} div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} div.center div {text-align: left;} div.flushright, div.flushright div.flushright {text-align: right;} div.flushright div {text-align: left;} div.flushleft {text-align: left;} .underline{ text-decoration:underline; } .underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } .framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } .framebox-c {text-align:center;} .framebox-l {text-align:left;} .framebox-r {text-align:right;} span.thank-mark{ vertical-align: super } span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } table.tabular td p{margin-top:0em;} table.tabular {margin-left: auto; margin-right: auto;} td p:first-child{ margin-top:0em; } td p:last-child{ margin-bottom:0em; } div.td00{ margin-left:0pt; margin-right:0pt; } div.td01{ margin-left:0pt; margin-right:5pt; } div.td10{ margin-left:5pt; margin-right:0pt; } div.td11{ margin-left:5pt; margin-right:5pt; } table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } td.td00{ padding-left:0pt; padding-right:0pt; } td.td01{ padding-left:0pt; padding-right:5pt; } td.td10{ padding-left:5pt; padding-right:0pt; } td.td11{ padding-left:5pt; padding-right:5pt; } table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } .hline hr, .cline hr{ height : 1px; margin:0px; } .tabbing-right {text-align:right;} span.TEX {letter-spacing: -0.125em; } span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} a span.TEX span.E {text-decoration: none; } span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} span.LATEX span.TEX{ position:relative; left: -0.4em; } div.float, div.figure {margin-left: auto; margin-right: auto;} div.float img {text-align:center;} div.figure img {text-align:center;} .marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} .marginpar p{margin-top:0.4em; margin-bottom:0.4em;} table.equation {width:100%;} .equation td{text-align:center; } td.equation { margin-top:1em; margin-bottom:1em; } td.equation-label { width:5%; text-align:center; } td.eqnarray4 { width:5%; white-space: normal; } td.eqnarray2 { width:5%; } table.eqnarray-star, table.eqnarray {width:100%;} div.eqnarray{text-align:center;} div.array {text-align:center;} div.pmatrix {text-align:center;} table.pmatrix {width:100%;} span.pmatrix img{vertical-align:middle;} div.pmatrix {text-align:center;} table.pmatrix {width:100%;} span.bar-css {text-decoration:overline;} img.cdots{vertical-align:middle;} .partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} .chapterToc a, .chapterToc, .likechapterToc a, .likechapterToc, .appendixToc a, .appendixToc {line-height: 200%; font-weight:bold;} .index-item, .index-subitem, .index-subsubitem {display:block} div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} div.caption span.id{font-weight: bold; white-space: nowrap; } h1.partHead{text-align: center} p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } .paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} .subparagraphHead, .likesubparagraphHead { font-weight: bold;} .quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} .verse{white-space:nowrap; margin-left:2em} div.maketitle {text-align:center;} h2.titleHead{text-align:center;} div.maketitle{ margin-bottom: 2em; } div.author, div.date {text-align:center;} div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } div.author{white-space: nowrap;} .quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } h1.partHead{text-align: center} .chapterToc, .likechapterToc {margin-left:0em;} .chapterToc ~ .likesectionToc, .chapterToc ~ .sectionToc, .likechapterToc ~ .likesectionToc, .likechapterToc ~ .sectionToc {margin-left:2em;} .chapterToc ~ .likesectionToc ~ .likesubsectionToc, .chapterToc ~ .likesectionToc ~ .subsectionToc, .chapterToc ~ .sectionToc ~ .likesubsectionToc, .chapterToc ~ .sectionToc ~ .subsectionToc, .likechapterToc ~ .likesectionToc ~ .likesubsectionToc, .likechapterToc ~ .likesectionToc ~ .subsectionToc, .likechapterToc ~ .sectionToc ~ .likesubsectionToc, .likechapterToc ~ .sectionToc ~ .subsectionToc {margin-left:4em;} .chapterToc ~ .likesectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .chapterToc ~ .likesectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .chapterToc ~ .likesectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .chapterToc ~ .likesectionToc ~ .subsectionToc ~ .subsubsectionToc, .chapterToc ~ .sectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .chapterToc ~ .sectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .chapterToc ~ .sectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .chapterToc ~ .sectionToc ~ .subsectionToc ~ .subsubsectionToc, .likechapterToc ~ .likesectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .likechapterToc ~ .likesectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .likechapterToc ~ .likesectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .likechapterToc ~ .likesectionToc ~ .subsectionToc ~ .subsubsectionToc, .likechapterToc ~ .sectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .likechapterToc ~ .sectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .likechapterToc ~ .sectionToc ~ .subsectionToc ~ .likesubsubsectionToc .likechapterToc ~ .sectionToc ~ .subsectionToc ~ .subsubsectionToc {margin-left:6em;} .likesectionToc , .sectionToc {margin-left:0em;} .likesectionToc ~ .likesubsectionToc, .likesectionToc ~ .subsectionToc, .sectionToc ~ .likesubsectionToc, .sectionToc ~ .subsectionToc {margin-left:2em;} .likesectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .likesectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .likesectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .likesectionToc ~ .subsectionToc ~ .subsubsectionToc, .sectionToc ~ .likesubsectionToc ~ .likesubsubsectionToc, .sectionToc ~ .likesubsectionToc ~ .subsubsectionToc, .sectionToc ~ .subsectionToc ~ .likesubsubsectionToc, .sectionToc ~ .subsectionToc ~ .subsubsectionToc {margin-left:4em;} .likesubsectionToc, .subsectionToc {margin-left:0em;} .likesubsectionToc ~ .subsubsectionToc, .subsectionToc ~ .subsubsectionToc, {margin-left:2em;} .figure img.graphics {margin-left:10%;} /* end css.sty */ vips-7.38.5/doc/Makefile.in0000644000175000017500000005226512303144055012341 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ SUBDIRS = reference EXTRA_DIST = \ html \ pdf \ src all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/doc/Makefile.am0000644000175000017500000000007312303140253012312 00000000000000 SUBDIRS = reference EXTRA_DIST = \ html \ pdf \ src vips-7.38.5/doc/reference/0000755000175000017500000000000012303146331012277 500000000000000vips-7.38.5/doc/reference/libvips-sections.txt0000644000175000017500000005541112303146331016263 00000000000000

arithmetic VipsOperationMath VipsOperationMath2 VipsOperationRound VipsOperationRelational VipsOperationBoolean VipsOperationComplex VipsOperationComplex2 VipsOperationComplexget vips_add vips_subtract vips_multiply vips_divide vips_linear vips_linear1 vips_remainder vips_remainder_const vips_remainder_const1 vips_invert vips_abs vips_sign vips_round vips_floor vips_ceil vips_rint vips_math vips_sin vips_cos vips_tan vips_asin vips_acos vips_atan vips_exp vips_exp10 vips_log vips_log10 vips_complex vips_polar vips_rect vips_conj vips_complex2 vips_cross_phase vips_complexget vips_real vips_imag vips_complexform vips_relational vips_equal vips_notequal vips_less vips_lesseq vips_more vips_moreeq vips_relational_const vips_equal_const vips_notequal_const vips_less_const vips_lesseq_const vips_more_const vips_moreeq_const vips_relational_const1 vips_equal_const1 vips_notequal_const1 vips_less_const1 vips_lesseq_const1 vips_more_const1 vips_moreeq_const1 vips_boolean vips_andimage vips_orimage vips_eorimage vips_lshift vips_rshift vips_boolean_const vips_andimage_const vips_orimage_const vips_eorimage_const vips_lshift_const vips_rshift_const vips_andimage_const1 vips_orimage_const1 vips_eorimage_const1 vips_lshift_const1 vips_rshift_const1 vips_math2 vips_pow vips_wop vips_math2_const vips_pow_const vips_wop_const vips_math2_const1 vips_pow_const1 vips_wop_const1 vips_avg vips_deviate vips_min vips_max vips_stats vips_measure vips_hist_find vips_hist_find_ndim vips_hist_find_indexed vips_project vips_profile
basic VipsPel VipsCallbackFn VipsSListMap2Fn VipsSListMap4Fn VipsSListFold2Fn
buf VipsBuf VIPS_BUF_STATIC vips_buf_rewind vips_buf_destroy vips_buf_init vips_buf_set_static vips_buf_set_dynamic vips_buf_init_static vips_buf_init_dynamic vips_buf_appendns vips_buf_appends vips_buf_appendf vips_buf_vappendf vips_buf_appendc vips_buf_appendsc vips_buf_appendgv vips_buf_append_size vips_buf_removec vips_buf_change vips_buf_is_empty vips_buf_is_full vips_buf_all vips_buf_firstline vips_buf_appendg vips_buf_appendd vips_buf_len
colour VIPS_D93_X0 VIPS_D93_Y0 VIPS_D93_Z0 VIPS_D75_X0 VIPS_D75_Y0 VIPS_D75_Z0 VIPS_D65_X0 VIPS_D65_Y0 VIPS_D65_Z0 VIPS_D55_X0 VIPS_D55_Y0 VIPS_D55_Z0 VIPS_D50_X0 VIPS_D50_Y0 VIPS_D50_Z0 VIPS_A_X0 VIPS_A_Y0 VIPS_A_Z0 VIPS_B_X0 VIPS_B_Y0 VIPS_B_Z0 VIPS_C_X0 VIPS_C_Y0 VIPS_C_Z0 VIPS_E_X0 VIPS_E_Y0 VIPS_E_Z0 VIPS_D3250_X0 VIPS_D3250_Y0 VIPS_D3250_Z0 VipsIntent VipsPCS vips_colourspace_issupported vips_colourspace vips_LabQ2sRGB vips_rad2float vips_float2rad vips_LabS2LabQ vips_LabQ2LabS vips_LabQ2Lab vips_Lab2LabQ vips_LCh2Lab vips_Lab2LCh vips_Yxy2Lab vips_CMC2XYZ vips_Lab2XYZ vips_XYZ2Lab vips_XYZ2scRGB vips_scRGB2sRGB vips_sRGB2scRGB vips_scRGB2XYZ vips_LCh2CMC vips_CMC2LCh vips_XYZ2Yxy vips_Yxy2XYZ vips_LabS2Lab vips_Lab2LabS vips_icc_present vips_icc_transform vips_icc_import vips_icc_export vips_icc_ac2rc vips_dE76 vips_dE00 vips_dECMC vips_col_Lab2XYZ vips_col_XYZ2Lab vips_col_ab2h vips_col_ab2Ch vips_col_Ch2ab vips_col_L2Lcmc vips_col_C2Ccmc vips_col_Ch2hcmc vips_col_make_tables_CMC vips_col_Lcmc2L vips_col_Ccmc2C vips_col_Chcmc2h vips_col_sRGB2scRGB_8 vips_col_sRGB2scRGB_16 vips_col_scRGB2XYZ vips_col_XYZ2scRGB vips_col_scRGB2sRGB_8 vips_col_scRGB2sRGB_16 vips_pythagoras vips_col_dE00
conversion VipsExtend VipsDirection VipsAlign VipsAngle VipsAngle45 vips_copy vips_tilecache vips_linecache vips_sequential vips_cache vips_copy_file vips_embed vips_flip vips_insert vips_join vips_extract_area vips_crop vips_extract_band vips_replicate vips_grid vips_wrap vips_rot vips_rot45 vips_zoom vips_subsample vips_cast vips_cast_uchar vips_cast_char vips_cast_ushort vips_cast_short vips_cast_uint vips_cast_int vips_cast_float vips_cast_double vips_cast_complex vips_cast_dpcomplex vips_scale vips_msb vips_bandjoin vips_bandjoin2 vips_bandrank vips_bandbool vips_bandand vips_bandor vips_bandeor vips_bandmean vips_recomb vips_ifthenelse vips_flatten vips_falsecolour vips_gamma im_insertset
convolution VipsPrecision VipsCombine vips_conv vips_compass vips_convsep vips_sharpen vips_gaussblur
correlation VipsCorrelation VipsCorrelation VipsCorrelationClass VIPS_CORRELATION VIPS_CORRELATION_CLASS VIPS_CORRELATION_GET_CLASS VIPS_IS_CORRELATION VIPS_IS_CORRELATION_CLASS VIPS_TYPE_CORRELATION vips_correlation_get_type
create vips_black vips_xyz vips_grey vips_gaussmat vips_logmat vips_text vips_gaussnoise vips_eye vips_sines vips_zone vips_identity vips_buildlut vips_invertlut vips_tonelut vips_mask_ideal vips_mask_ideal_ring vips_mask_ideal_band vips_mask_butterworth vips_mask_butterworth_ring vips_mask_butterworth_band vips_mask_gaussian vips_mask_gaussian_ring vips_mask_gaussian_band vips_mask_fractal vips_fractsurf im_benchmarkn im_benchmark2
debug VIPS_DEBUG_MSG VIPS_DEBUG_MSG_RED VIPS_DEBUG_MSG_AMBER VIPS_DEBUG_MSG_GREEN
error vips_error_buffer vips_error_clear vips_error_freeze vips_error_thaw vips_error vips_verror vips_error_system vips_verror_system vips_error_g vips_warn vips_vwarn vips_info vips_vinfo vips_error_exit vips_check_uncoded vips_check_coding vips_check_coding_known vips_check_coding_noneorlabq vips_check_coding_same vips_check_mono vips_check_bands vips_check_bands_1or3 vips_check_bands_atleast vips_check_bands_1orn vips_check_bands_1orn_unary vips_check_bands_same vips_check_bandno vips_check_int vips_check_uint vips_check_uintorf vips_check_noncomplex vips_check_complex vips_check_format vips_check_u8or16 vips_check_8or16 vips_check_u8or16orf vips_check_format_same vips_check_size_same vips_check_oddsquare vips_check_vector_length vips_check_vector vips_check_hist vips_check_matrix vips_check_separable vips_check_imask vips_check_dmask vips_check_dmask_1d
foreign VipsForeignSave VipsForeignLoad VipsForeign VipsForeign VipsForeignClass vips_foreign_map VipsForeignFlags VipsForeignLoad VipsForeignLoadClass vips_foreign_find_load vips_foreign_find_load_options vips_foreign_flags vips_foreign_is_a VipsSaveable VipsForeignSave VipsForeignSaveClass vips_foreign_find_save vips_foreign_find_save_options vips_foreign_load vips_foreign_save vips_foreign_load_options vips_foreign_save_options vips_openslideload vips_jpegload vips_jpegload_buffer vips_jpegsave vips_jpegsave_buffer vips_jpegsave_mime vips_webpload vips_webpload_buffer vips_webpsave vips_webpsave_buffer vips_webpsave_mime VipsForeignTiffCompression VipsForeignTiffPredictor VipsForeignTiffResunit vips_tiffload vips_tiffsave vips_openexrload vips_fitsload vips_fitssave vips_analyzeload vips_rawload vips_rawsave vips_rawsave_fd vips_csvload vips_csvsave vips_matrixload vips_matrixsave vips_matrixprint vips_magickload vips_pngload vips_pngload_buffer vips_pngsave vips_pngsave_buffer vips_ppmload vips_ppmsave vips_matload vips_radload vips_radsave VipsForeignDzLayout VipsForeignDzDepth vips_dzsave VIPS_FOREIGN VIPS_FOREIGN_CLASS VIPS_FOREIGN_GET_CLASS VIPS_FOREIGN_LOAD VIPS_FOREIGN_LOAD_CLASS VIPS_FOREIGN_LOAD_GET_CLASS VIPS_FOREIGN_SAVE VIPS_FOREIGN_SAVE_CLASS VIPS_FOREIGN_SAVE_GET_CLASS VIPS_IS_FOREIGN VIPS_IS_FOREIGN_CLASS VIPS_IS_FOREIGN_LOAD VIPS_IS_FOREIGN_LOAD_CLASS VIPS_IS_FOREIGN_SAVE VIPS_IS_FOREIGN_SAVE_CLASS VIPS_TYPE_FOREIGN VIPS_TYPE_FOREIGN_LOAD VIPS_TYPE_FOREIGN_SAVE vips_foreign_get_type vips_foreign_load_get_type vips_foreign_save_get_type
freqfilt vips_fwfft vips_invfft vips_freqmult vips_spectrum vips_phasecor
gate VIPS_GATE_START VIPS_GATE_STOP VIPS_GATE_MALLOC VIPS_GATE_FREE vips__thread_profile vips__thread_profile_attach vips__thread_profile_detach vips__thread_profile_stop vips__thread_gate_start vips__thread_gate_stop vips__thread_malloc_free
generate VipsRegionWrite vips_sink_disc VipsStartFn VipsGenerateFn VipsStopFn vips_sink vips_sink_tile VipsSinkNotify vips_sink_screen vips_sink_memory vips_sink_memory2 vips_start_one vips_stop_one vips_start_many vips_stop_many vips_allocate_input_array vips_image_generate vips_image_pipeline_array vips_image_pipelinev
header VIPS_META_EXIF_NAME VIPS_META_XMP_NAME VIPS_META_IPCT_NAME VIPS_META_ICC_NAME VIPS_META_XML VIPS_META_RESOLUTION_UNIT VIPS_META_LOADER vips_format_sizeof vips_image_get_width vips_image_get_height vips_image_get_bands vips_image_get_format vips_image_get_coding vips_image_get_interpretation vips_image_guess_interpretation vips_image_get_xres vips_image_get_yres vips_image_get_xoffset vips_image_get_yoffset vips_image_get_filename vips_image_get_mode vips_image_get_scale vips_image_get_offset vips_image_get_data vips_image_init_fields vips_image_set vips_image_get vips_image_get_as_string vips_image_get_typeof vips_image_remove VipsImageMapFn vips_image_map vips_image_set_area vips_image_get_area vips_image_set_blob vips_image_get_blob vips_image_get_int vips_image_set_int vips_image_get_double vips_image_set_double vips_image_get_string vips_image_set_string vips_image_history_printf vips_image_history_args vips_image_get_history
hist_unary VipsHistUnary VipsHistUnary VipsHistUnaryClass VIPS_HIST_UNARY VIPS_HIST_UNARY_CLASS VIPS_HIST_UNARY_GET_CLASS VIPS_IS_HIST_UNARY VIPS_IS_HIST_UNARY_CLASS VIPS_TYPE_HIST_UNARY vips_hist_unary_get_type
histogram vips_maplut vips_percent vips_stdif vips_hist_cum vips_hist_norm vips_hist_equal vips_hist_plot vips_hist_match vips_hist_local vips_hist_ismonotonic
image VipsImage VIPS_MAGIC_INTEL VIPS_MAGIC_SPARC VipsDemandStyle VipsImageType VipsInterpretation VipsBandFormat VipsCoding VipsAccess VipsProgress VipsImage VipsImageClass VIPS_IMAGE_SIZEOF_ELEMENT VIPS_IMAGE_SIZEOF_PEL VIPS_IMAGE_SIZEOF_LINE VIPS_IMAGE_N_ELEMENTS VIPS_IMAGE_N_PELS VIPS_IMAGE_ADDR VIPS_MATRIX vips_image_written vips_image_invalidate_all vips_image_minimise_all vips_image_preeval vips_image_eval vips_image_posteval vips_image_set_progress vips_image_iskilled vips_image_set_kill vips_image_new vips_image_new_mode vips_image_new_buffer vips_image_new_from_file vips_image_new_from_file_raw vips_image_new_from_memory vips_image_new_matrix vips_image_new_matrixv vips_image_set_delete_on_close vips_image_new_temp_file vips_image_write vips_image_write_to_file vips_image_isMSBfirst vips_image_isfile vips_image_ispartial vips_image_wio_input vips_image_pio_input vips_image_inplace vips_image_write_prepare vips_image_write_line vips_band_format_isint vips_band_format_isuint vips_band_format_is8bit vips_band_format_isfloat vips_band_format_iscomplex vips_system VIPS_IMAGE VIPS_IMAGE_CLASS VIPS_IMAGE_GET_CLASS VIPS_IMAGE_SIZEOF_IMAGE VIPS_IS_IMAGE VIPS_IS_IMAGE_CLASS VIPS_TYPE_IMAGE vips_image_get_type
inlines vips__hypot
inplace im_draw_rect im_draw_circle im_draw_image VipsPlotFn im_draw_line_user im_draw_line im_lineset im_draw_flood im_draw_flood_blob im_draw_flood_other im_draw_mask im_draw_point im_read_point im_draw_smudge
interpolate VipsInterpolate VipsInterpolate VipsInterpolateMethod VipsInterpolateClass vips_interpolate vips_interpolate_get_method vips_interpolate_get_window_size vips_interpolate_get_window_offset VIPS_TRANSFORM_SHIFT VIPS_TRANSFORM_SCALE VIPS_INTERPOLATE_SHIFT VIPS_INTERPOLATE_SCALE vips_interpolate_nearest_static vips_interpolate_bilinear_static vips_interpolate_new VIPS_INTERPOLATE VIPS_INTERPOLATE_CLASS VIPS_INTERPOLATE_GET_CLASS VIPS_IS_INTERPOLATE VIPS_IS_INTERPOLATE_CLASS VIPS_TYPE_INTERPOLATE vips_interpolate_get_type
memory VIPS_FREEF VIPS_FREE VIPS_SETSTR VIPS_NEW VIPS_ARRAY vips_malloc vips_strdup vips_free vips_tracked_free vips_tracked_malloc vips_tracked_get_mem vips_tracked_get_mem_highwater vips_tracked_get_allocs vips_tracked_open vips_tracked_close vips_tracked_get_files
morphology VipsOperationMorphology vips_morph vips_rank vips_countlines vips_median im_label_regions
mosaicing im_match_linear im_match_linear_search im_lrmerge im_tbmerge im_lrmerge1 im_tbmerge1 im_lrmosaic im_tbmosaic im_lrmosaic1 im_tbmosaic1 im_global_balance im_global_balancef im_correl im_remosaic im_align_bands im_maxpos_subpel
object VipsObject VipsArgument VIPS_UNREF VipsArgumentFlags VIPS_ARGUMENT_REQUIRED_INPUT VIPS_ARGUMENT_OPTIONAL_INPUT VIPS_ARGUMENT_REQUIRED_OUTPUT VIPS_ARGUMENT_OPTIONAL_OUTPUT VIPS_ARG_IMAGE VIPS_ARG_INTERPOLATE VIPS_ARG_BOOL VIPS_ARG_DOUBLE VIPS_ARG_BOXED VIPS_ARG_INT VIPS_ARG_UINT64 VIPS_ARG_ENUM VIPS_ARG_FLAGS VIPS_ARG_STRING VIPS_ARG_POINTER VipsArgument VipsArgumentClass VipsArgumentInstance VipsArgumentTable vips__argument_get_instance vips__argument_table_lookup vips__object_set_member VipsArgumentMapFn vips_argument_map VipsArgumentClassMapFn vips_argument_class_map vips_object_get_argument vips_object_argument_isset vips_object_get_argument_flags vips_object_get_argument_priority VIPS_ARGUMENT_FOR_ALL VIPS_ARGUMENT_COLLECT_SET VIPS_ARGUMENT_COLLECT_GET VIPS_ARGUMENT_COLLECT_END VipsObject VipsObjectClass vips_value_is_null vips_object_set_property vips_object_get_property vips_object_preclose vips_object_build vips_object_summary_class vips_object_summary vips_object_dump vips_object_print_summary_class vips_object_print_summary vips_object_print_dump vips_object_print_name vips_object_sanity vips_object_class_install_argument vips_object_set_argument_from_string vips_object_argument_needsstring vips_object_get_argument_to_string vips_object_set_required VipsObjectSetArguments vips_object_new vips_object_set_valist vips_object_set vips_object_new_from_string vips_object_to_string vips_object_map VipsTypeMapFn VipsTypeMap2Fn VipsClassMapFn vips_type_map vips_type_map_all vips_type_depth vips_type_find vips_class_map_all vips_class_find vips_object_local_array vips_object_local_cb vips_object_local vips_object_set_static vips_object_print_all vips_object_sanity_all vips_object_rewind vips_object_unref_outputs VIPS_IS_OBJECT VIPS_IS_OBJECT_CLASS VIPS_OBJECT VIPS_OBJECT_CLASS VIPS_OBJECT_GET_CLASS VIPS_TYPE_OBJECT vips_object_get_type
operation VipsOperation VipsOperationFlags VipsOperationBuildFn VipsOperation VipsOperationClass vips_operation_get_flags vips_operation_class_print_usage vips_operation_call_valist vips_operation_new vips_call vips_call_split vips_call_options vips_call_argv vips_cache_drop_all vips_cache_operation_buildp vips_cache_operation_build vips_cache_print vips_cache_set_max vips_cache_set_max_mem vips_cache_get_max vips_cache_get_size vips_cache_get_max_mem vips_cache_get_max_files vips_cache_set_max_files vips_cache_set_dump vips_cache_set_trace VIPS_IS_OPERATION VIPS_IS_OPERATION_CLASS VIPS_OPERATION VIPS_OPERATION_CLASS VIPS_OPERATION_GET_CLASS VIPS_TYPE_OPERATION vips_operation_get_type
pconvolution VipsConvolution VipsConvolution VipsConvolutionClass VIPS_CONVOLUTION VIPS_CONVOLUTION_CLASS VIPS_CONVOLUTION_GET_CLASS VIPS_IS_CONVOLUTION VIPS_IS_CONVOLUTION_CLASS VIPS_TYPE_CONVOLUTION vips_convolution_get_type
pfreqfilt VipsFreqfilt VipsFreqfilt VipsFreqfiltClass VipsFftProcessFn vips__fftproc VIPS_FREQFILT VIPS_FREQFILT_CLASS VIPS_FREQFILT_GET_CLASS VIPS_IS_FREQFILT VIPS_IS_FREQFILT_CLASS VIPS_TYPE_FREQFILT vips_freqfilt_get_type
phistogram VipsHistogram VipsHistogramProcessFn VipsHistogram VipsHistogramClass VIPS_HISTOGRAM VIPS_HISTOGRAM_CLASS VIPS_HISTOGRAM_GET_CLASS VIPS_IS_HISTOGRAM VIPS_IS_HISTOGRAM_CLASS VIPS_TYPE_HISTOGRAM vips_histogram_get_type
pmask VipsMask VipsMask VipsMaskClass VipsMaskIdeal VipsMaskIdealClass VipsMaskButterworth VipsMaskButterworthClass VipsMaskGaussian VipsMaskGaussianClass VIPS_IS_MASK VIPS_IS_MASK_BUTTERWORTH VIPS_IS_MASK_BUTTERWORTH_CLASS VIPS_IS_MASK_CLASS VIPS_IS_MASK_GAUSSIAN VIPS_IS_MASK_GAUSSIAN_CLASS VIPS_IS_MASK_IDEAL VIPS_IS_MASK_IDEAL_CLASS VIPS_MASK VIPS_MASK_BUTTERWORTH VIPS_MASK_BUTTERWORTH_CLASS VIPS_MASK_BUTTERWORTH_GET_CLASS VIPS_MASK_CLASS VIPS_MASK_GAUSSIAN VIPS_MASK_GAUSSIAN_CLASS VIPS_MASK_GAUSSIAN_GET_CLASS VIPS_MASK_GET_CLASS VIPS_MASK_IDEAL VIPS_MASK_IDEAL_CLASS VIPS_MASK_IDEAL_GET_CLASS VIPS_TYPE_MASK VIPS_TYPE_MASK_BUTTERWORTH VIPS_TYPE_MASK_GAUSSIAN VIPS_TYPE_MASK_IDEAL vips_mask_butterworth_get_type vips_mask_gaussian_get_type vips_mask_get_type vips_mask_ideal_get_type
pmorphology VipsMorphology VipsMorphology VipsMorphologyClass VIPS_IS_MORPHOLOGY VIPS_IS_MORPHOLOGY_CLASS VIPS_MORPHOLOGY VIPS_MORPHOLOGY_CLASS VIPS_MORPHOLOGY_GET_CLASS VIPS_TYPE_MORPHOLOGY vips_morphology_get_type
rect VipsRect VIPS_RECT_RIGHT VIPS_RECT_BOTTOM VIPS_RECT_HCENTRE VIPS_RECT_VCENTRE vips_rect_isempty vips_rect_includespoint vips_rect_includesrect vips_rect_equalsrect vips_rect_marginadjust vips_rect_intersectrect vips_rect_unionrect vips_rect_dup vips_rect_normalise
region VipsRegion VipsRegion VipsRegionClass vips_region_new vips_region_buffer vips_region_image vips_region_region vips_region_equalsregion vips_region_position vips_region_paint vips_region_paint_pel vips_region_black vips_region_copy vips_region_prepare vips_region_prepare_to vips_region_prepare_many vips_region_dump_all VIPS_REGION_LSKIP VIPS_REGION_N_ELEMENTS VIPS_REGION_SIZEOF_LINE VIPS_REGION_ADDR VIPS_REGION_ADDR_TOPLEFT VIPS_IS_REGION VIPS_IS_REGION_CLASS VIPS_REGION VIPS_REGION_CLASS VIPS_REGION_GET_CLASS VIPS_TYPE_REGION vips_region_get_type
resample vips_shrink vips_similarity vips_affine vips_quadratic
semaphore VipsSemaphore vips_semaphore_up vips_semaphore_down vips_semaphore_upn vips_semaphore_downn vips_semaphore_destroy vips_semaphore_init
threadpool VipsThreadState VipsThreadState VipsThreadStateClass vips_thread_state_set vips_thread_state_new VipsThreadStartFn VipsThreadpoolAllocateFn VipsThreadpoolWorkFn VipsThreadpoolProgressFn vips_threadpool_run vips_get_tile_size vips__print_renders vips_concurrency_set vips_concurrency_get VIPS_IS_THREAD_STATE VIPS_IS_THREAD_STATE_CLASS VIPS_THREAD_STATE VIPS_THREAD_STATE_CLASS VIPS_THREAD_STATE_GET_CLASS VIPS_TYPE_THREAD_STATE vips_thread_state_get_type
transform VipsTransformation vips__transform_init vips__transform_calc_inverse vips__transform_isidentity vips__transform_add vips__transform_print vips__transform_forward_point vips__transform_invert_point vips__transform_forward_rect vips__transform_invert_rect vips__transform_set_area vips__affine
type VipsThing vips_thing_new vips_thing_get_i VipsArea vips_area_copy vips_area_unref vips__type_leak vips_area_new vips_area_new_blob vips_area_new_array vips_area_new_array_object vips_area_get_data VipsArrayDouble vips_array_double_new vips_array_double_newv VipsArrayInt vips_array_int_new vips_array_int_newv vips_value_set_area vips_value_get_area vips_value_get_save_string vips_value_set_save_string vips_value_set_save_stringf vips_value_get_ref_string vips_value_set_ref_string vips_value_get_blob vips_value_set_blob vips_value_set_array vips_value_get_array vips_value_get_array_double vips_value_set_array_double vips_value_get_array_int vips_value_set_array_int vips_value_get_array_object vips_value_set_array_object vips__meta_init_types VIPS_TYPE_AREA VIPS_TYPE_ARRAY_DOUBLE VIPS_TYPE_ARRAY_IMAGE VIPS_TYPE_ARRAY_INT VIPS_TYPE_BLOB VIPS_TYPE_REF_STRING VIPS_TYPE_SAVE_STRING VIPS_TYPE_THING vips_area_get_type vips_array_double_get_type vips_array_image_get_type vips_array_int_get_type vips_blob_get_type vips_ref_string_get_type vips_save_string_get_type vips_thing_get_type
util VIPS_PI VIPS_RAD VIPS_DEG VIPS_MAX VIPS_MIN VIPS_ABS VIPS_CLIP VIPS_NUMBER VIPS_SWAP VIPS_UNROLL VIPS_RINT VIPS_CLIP_UCHAR VIPS_CLIP_CHAR VIPS_CLIP_USHORT VIPS_CLIP_SHORT VIPS_CLIP_UINT VIPS_CLIP_NONE VIPS_PATH_MAX vips_enum_string vips_enum_nick vips_enum_from_nick vips_slist_equal vips_slist_map2 vips_slist_map2_rev vips_slist_map4 vips_slist_fold2 vips_slist_filter vips_slist_free_all vips_map_equal vips_hash_table_map vips_strncpy vips_strrstr vips_ispostfix vips_isprefix vips_break_token vips_vsnprintf vips_snprintf vips_filename_split vips_skip_dir vips_filename_suffix vips_filename_suffix_match vips_getnextoption vips_getsuboption vips_file_length vips__write vips__file_open_read vips__file_open_write vips__file_read vips__file_read_name vips__file_write vips__get_bytes vips__gvalue_ref_string_new vips__gslist_gvalue_free vips__gslist_gvalue_copy vips__gslist_gvalue_merge vips__gslist_gvalue_get vips__seek vips__ftruncate vips_existsf vips_mkdirf vips_popenf VipsToken vips__token_get vips__token_must vips__token_need vips__find_rightmost_brackets vips_ispoweroftwo vips_amiMSBfirst vips__temp_name vips__change_suffix
vector VIPS_VECTOR_SOURCE_MAX VipsVector VipsExecutor vips__vector_enabled vips_vector_init vips_vector_isenabled vips_vector_set_enabled vips_vector_free vips_vector_new vips_vector_constant vips_vector_source_name vips_vector_source_scanline vips_vector_temporary vips_vector_asm2 vips_vector_asm3 vips_vector_full vips_vector_compile vips_vector_print vips_executor_set_program vips_executor_set_scanline vips_executor_set_destination vips_executor_set_array vips_executor_run
version VIPS_VERSION VIPS_VERSION_STRING VIPS_MAJOR_VERSION VIPS_MINOR_VERSION VIPS_MICRO_VERSION VIPS_EXEEXT
vips vips_init vips_get_argv0 vips_check_init vips_shutdown vips_thread_shutdown vips_get_option_group vips_version_string vips_version vips_guess_prefix vips_guess_libdir
vipsjpeg vips__jpeg_write_file vips__jpeg_write_buffer vips__isjpeg vips__jpeg_read_file vips__jpeg_read_buffer
webp vips__iswebp vips__webp_read_file_header vips__webp_read_file vips__webp_read_buffer_header vips__webp_read_buffer vips__webp_write_file vips__webp_write_buffer
vips-7.38.5/doc/reference/libvips-docs.sgml.in0000644000175000017500000000445312303140253016111 00000000000000 ]> VIPS Reference Manual For VIPS @VIPS_VERSION@. The latest version of this documentation can be found on the VIPS website. Core VIPS API VIPS operation API by section Other API (no gtkdoc comments yet) Object Hierarchy API Index vips-7.38.5/doc/reference/html/0000755000175000017500000000000012303146332013244 500000000000000vips-7.38.5/doc/reference/html/libvips-semaphore.html0000644000175000017500000002022412303146331017502 00000000000000 semaphore

semaphore

semaphore

Description

Details

VipsSemaphore

typedef struct {
	char *name;
	int v;

	GMutex *mutex;
	GCond *cond;
} VipsSemaphore;


vips_semaphore_up ()

int                 vips_semaphore_up                   (VipsSemaphore *s);


vips_semaphore_down ()

int                 vips_semaphore_down                 (VipsSemaphore *s);


vips_semaphore_upn ()

int                 vips_semaphore_upn                  (VipsSemaphore *s,
                                                         int n);


vips_semaphore_downn ()

int                 vips_semaphore_downn                (VipsSemaphore *s,
                                                         int n);


vips_semaphore_destroy ()

void                vips_semaphore_destroy              (VipsSemaphore *s);


vips_semaphore_init ()

void                vips_semaphore_init                 (VipsSemaphore *s,
                                                         int v,
                                                         char *name);

vips-7.38.5/doc/reference/html/object-tree.html0000644000175000017500000000551312303146331016260 00000000000000 Object Hierarchy

Object Hierarchy

    GObject
        VipsObject
            VipsOperation
                VipsConvolution
                VipsCorrelation
                VipsForeign
                    VipsForeignLoad
                    VipsForeignSave
                VipsFreqfilt
                VipsHistogram
                    VipsHistUnary
                VipsCreate
                    VipsPoint
                        VipsMask
                            VipsMaskButterworth
                            VipsMaskGaussian
                            VipsMaskIdeal
                VipsMorphology
            VipsImage
            VipsInterpolate
            VipsRegion
            VipsThreadState
    GBoxed
        VipsArea
        VipsArrayDouble
        VipsArrayInt
        VipsThing
vips-7.38.5/doc/reference/html/libvips-memory.html0000644000175000017500000006065312303146331017041 00000000000000 memory

memory

memory — memory utilities

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

#define             VIPS_FREEF                          (F,
                                                         S)
#define             VIPS_FREE                           (S)
#define             VIPS_SETSTR                         (S,
                                                         V)
#define             VIPS_NEW                            (OBJ,
                                                         T)
#define             VIPS_ARRAY                          (OBJ,
                                                         N,
                                                         T)
void *              vips_malloc                         (VipsObject *object,
                                                         size_t size);
char *              vips_strdup                         (VipsObject *object,
                                                         const char *str);
int                 vips_free                           (void *buf);
void                vips_tracked_free                   (void *s);
void *              vips_tracked_malloc                 (size_t size);
size_t              vips_tracked_get_mem                (void);
size_t              vips_tracked_get_mem_highwater      (void);
int                 vips_tracked_get_allocs             (void);
int                 vips_tracked_open                   (const char *pathname,
                                                         int flags,
                                                         ...);
int                 vips_tracked_close                  (int fd);
int                 vips_tracked_get_files              (void);

Description

These functions cover two main areas.

First, some simple utility functions over the underlying g_malloc()/g_free() functions. Memory allocated and freeded using these functions is interchangeable with any other glib library.

Second, a pair of functions, vips_tracked_malloc() and vips_tracked_free(), which are NOT compatible. If you g_free() memory that has been allocated with vips_tracked_malloc() you will see crashes.

The tracked functions are only suitable for large allocations internal to the library, for example pixel buffers. libvips watches the total amount of live tracked memory and uses this information to decide when to trim caches.

Details

VIPS_FREEF()

#define             VIPS_FREEF( F, S )


VIPS_FREE()

#define VIPS_FREE( S ) VIPS_FREEF( g_free, (S) );


VIPS_SETSTR()

#define             VIPS_SETSTR( S, V )


VIPS_NEW()

#define             VIPS_NEW( OBJ, T )

OBJ :

allocate memory local to OBJ, or NULL for no auto-free

T :

type of thing to allocate

Returns :

A pointer of type T *, or NULL on error.

VIPS_ARRAY()

#define             VIPS_ARRAY( OBJ, N, T )

OBJ :

allocate memory local to OBJ, or NULL for no auto-free

N :

number of T 's to allocate

T :

type of thing to allocate

Returns :

A pointer of type T *, or NULL on error.

vips_malloc ()

void *              vips_malloc                         (VipsObject *object,
                                                         size_t size);

g_malloc() local to object, that is, the memory will be automatically freed for you when the object is closed. If object is NULL, you need to free the memory explicitly with g_free().

This function cannot fail. See vips_tracked_malloc() if you are allocating large amounts of memory.

See also: vips_tracked_malloc().

object :

allocate memory local to this VipsObject, or NULL

size :

number of bytes to allocate

Returns :

a pointer to the allocated memory

vips_strdup ()

char *              vips_strdup                         (VipsObject *object,
                                                         const char *str);

g_strdup() a string. When object is freed, the string will be freed for you. If object is NULL, you need to free the memory explicitly with g_free().

This function cannot fail.

See also: vips_malloc().

object :

allocate memory local to this VipsObject, or NULL

str :

string to copy

Returns :

a pointer to the allocated memory

vips_free ()

int                 vips_free                           (void *buf);

Frees memory with g_free() and returns 0. Handy for callbacks.

See also: vips_malloc().

buf :

memory to free

vips_tracked_free ()

void                vips_tracked_free                   (void *s);

Only use it to free memory that was previously allocated with vips_tracked_malloc() with a NULL first argument.

See also: vips_tracked_malloc().

s :

memory to free

vips_tracked_malloc ()

void *              vips_tracked_malloc                 (size_t size);

Allocate an area of memory that will be tracked by vips_tracked_get_mem() and friends.

If allocation fails, vips_malloc() returns NULL and sets an error message.

You must only free the memory returned with vips_tracked_free().

See also: vips_tracked_free(), vips_malloc().

size :

number of bytes to allocate

Returns :

a pointer to the allocated memory, or NULL on error.

vips_tracked_get_mem ()

size_t              vips_tracked_get_mem                (void);

Returns the number of bytes currently allocated via vips_malloc() and friends. vips uses this figure to decide when to start dropping cache, see VipsOperation.

Returns :

the number of currently allocated bytes

vips_tracked_get_mem_highwater ()

size_t              vips_tracked_get_mem_highwater      (void);

Returns the largest number of bytes simultaneously allocated via vips_tracked_malloc(). Handy for estimating max memory requirements for a program.

Returns :

the largest number of currently allocated bytes

vips_tracked_get_allocs ()

int                 vips_tracked_get_allocs             (void);

Returns the number of active allocations.

Returns :

the number of active allocations

vips_tracked_open ()

int                 vips_tracked_open                   (const char *pathname,
                                                         int flags,
                                                         ...);

Exactly as open(2), but the number of files current open via vips_tracked_open() is available via vips_tracked_get_files(). This is used by the vips operation cache to drop cache when the number of files available is low.

You must only close the file descriptor with vips_tracked_close().

See also: vips_tracked_close(), vips_tracked_get_files().

pathname :

name of file to open

flags :

flags for open()

Returns :

a file descriptor, or -1 on error.

vips_tracked_close ()

int                 vips_tracked_close                  (int fd);

Exactly as close(2), but update the number of files currently open via vips_tracked_get_files(). This is used by the vips operation cache to drop cache when the number of files available is low.

You must only close file descriptors opened with vips_tracked_open().

See also: vips_tracked_open(), vips_tracked_get_files().

fd :

file to close()

Returns :

a file descriptor, or -1 on error.

vips_tracked_get_files ()

int                 vips_tracked_get_files              (void);

Returns the number of open files.

Returns :

the number of open files
vips-7.38.5/doc/reference/html/ch02.html0000644000175000017500000000741312303146331014612 00000000000000 VIPS operation API by section

VIPS operation API by section

arithmetic — operations which perform pixel arithmetic, trig, log, statistics
colour — colour operators
conversion — convert images in some way: change band format, change header, insert, extract, join
convolution — convolve and correlate images
VipsForeign — load and save images in a variety of formats
freqfilt
histogram — find, manipulate and apply histograms and lookup tables
inplace — in-place paintbox operations: flood, paste, line, circle
VipsInterpolate — various interpolators: nearest, bilinear, and some non-linear
morphology — morphological operators, rank filters and related image analysis
mosaicing — build image mosaics
createcreate VipsImage in various ways
resample — shrink, expand, rotate with a choice of interpolators
vips-7.38.5/doc/reference/html/VipsImage.html0000644000175000017500000034045712303146331015752 00000000000000 VipsImage

VipsImage

VipsImage — the VIPS image class

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

#define             VIPS_MAGIC_INTEL
#define             VIPS_MAGIC_SPARC
enum                VipsDemandStyle;
enum                VipsImageType;
enum                VipsInterpretation;
enum                VipsBandFormat;
enum                VipsCoding;
enum                VipsAccess;
                    VipsProgress;
                    VipsImage;
                    VipsImageClass;
#define             VIPS_IMAGE_SIZEOF_ELEMENT           (I)
#define             VIPS_IMAGE_SIZEOF_PEL               (I)
#define             VIPS_IMAGE_SIZEOF_LINE              (I)
#define             VIPS_IMAGE_N_ELEMENTS               (I)
#define             VIPS_IMAGE_N_PELS                   (I)
#define             VIPS_IMAGE_ADDR                     (I,
                                                         X,
                                                         Y)
#define             VIPS_MATRIX                         (I,
                                                         X,
                                                         Y)
int                 vips_image_written                  (VipsImage *image);
void                vips_image_invalidate_all           (VipsImage *image);
void                vips_image_minimise_all             (VipsImage *image);
void                vips_image_preeval                  (VipsImage *image);
void                vips_image_eval                     (VipsImage *image,
                                                         guint64 processed);
void                vips_image_posteval                 (VipsImage *image);
void                vips_image_set_progress             (VipsImage *image,
                                                         gboolean progress);
gboolean            vips_image_iskilled                 (VipsImage *image);
void                vips_image_set_kill                 (VipsImage *image,
                                                         gboolean kill);
VipsImage *         vips_image_new                      (void);
VipsImage *         vips_image_new_mode                 (const char *filename,
                                                         const char *mode);
VipsImage *         vips_image_new_buffer               (void);
VipsImage *         vips_image_new_from_file            (const char *filename);
VipsImage *         vips_image_new_from_file_raw        (const char *filename,
                                                         int xsize,
                                                         int ysize,
                                                         int bands,
                                                         guint64 offset);
VipsImage *         vips_image_new_from_memory          (void *buffer,
                                                         int xsize,
                                                         int ysize,
                                                         int bands,
                                                         VipsBandFormat bandfmt);
VipsImage *         vips_image_new_matrix               (int width,
                                                         int height);
VipsImage *         vips_image_new_matrixv              (int width,
                                                         int height,
                                                         ...);
void                vips_image_set_delete_on_close      (VipsImage *image,
                                                         gboolean delete_on_close);
VipsImage *         vips_image_new_temp_file            (const char *format);
int                 vips_image_write                    (VipsImage *image,
                                                         VipsImage *out);
int                 vips_image_write_to_file            (VipsImage *image,
                                                         const char *filename);
gboolean            vips_image_isMSBfirst               (VipsImage *image);
gboolean            vips_image_isfile                   (VipsImage *image);
gboolean            vips_image_ispartial                (VipsImage *image);
int                 vips_image_wio_input                (VipsImage *image);
int                 vips_image_pio_input                (VipsImage *image);
int                 vips_image_inplace                  (VipsImage *image);
int                 vips_image_write_prepare            (VipsImage *image);
int                 vips_image_write_line               (VipsImage *image,
                                                         int ypos,
                                                         VipsPel *linebuffer);
gboolean            vips_band_format_isint              (VipsBandFormat format);
gboolean            vips_band_format_isuint             (VipsBandFormat format);
gboolean            vips_band_format_is8bit             (VipsBandFormat format);
gboolean            vips_band_format_isfloat            (VipsBandFormat format);
gboolean            vips_band_format_iscomplex          (VipsBandFormat format);
int                 vips_system                         (const char *cmd_format,
                                                         ...);

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsImage

Properties

  "bands"                    gint                  : Read / Write
  "coding"                   VipsCoding            : Read / Write
  "demand"                   VipsDemandStyle       : Read / Write
  "filename"                 gchar*                : Read / Write
  "foreign-buffer"           gpointer              : Read / Write
  "format"                   VipsBandFormat        : Read / Write
  "height"                   gint                  : Read / Write
  "interpretation"           VipsInterpretation    : Read / Write
  "kill"                     gboolean              : Read / Write
  "mode"                     gchar*                : Read / Write
  "sizeof-header"            guint64               : Read / Write
  "width"                    gint                  : Read / Write
  "xoffset"                  gint                  : Read / Write
  "xres"                     gdouble               : Read / Write
  "yoffset"                  gint                  : Read / Write
  "yres"                     gdouble               : Read / Write

Signals

  "eval"                                           : Run Last
  "invalidate"                                     : Action
  "minimise"                                       : Action
  "posteval"                                       : Run Last
  "preeval"                                        : Run Last
  "written"                                        : Action

Description

The image class and associated types and macros.

vips_image_wio_input() and friends indicate the image IO style you intend to use, transforming the underlying VipsImage structure if necessary.

Details

VIPS_MAGIC_INTEL

#define VIPS_MAGIC_INTEL (0xb6a6f208U)

The first four bytes of a VIPS file in Intel byte ordering.


VIPS_MAGIC_SPARC

#define VIPS_MAGIC_SPARC (0x08f2a6b6U)

The first four bytes of a VIPS file in SPARC byte ordering.


enum VipsDemandStyle

typedef enum {
	VIPS_DEMAND_STYLE_ERROR = -1,	
	VIPS_DEMAND_STYLE_SMALLTILE,	
	VIPS_DEMAND_STYLE_FATSTRIP,
	VIPS_DEMAND_STYLE_THINSTRIP,
	VIPS_DEMAND_STYLE_ANY			
} VipsDemandStyle;

See vips_image_pipelinev(). Operations can hint to the VIPS image IO system about the kind of demand geometry they prefer.

These demand styles are given below in order of increasing restrictiveness. When demanding output from a pipeline, vips_image_generate() will use the most restrictive of the styles requested by the operations in the pipeline.

VIPS_DEMAND_STYLE_THINSTRIP --- This operation would like to output strips the width of the image and a few pels high. This is option suitable for point-to-point operations, such as those in the arithmetic package.

This option is only efficient for cases where each output pel depends upon the pel in the corresponding position in the input image.

VIPS_DEMAND_STYLE_FATSTRIP --- This operation would like to output strips the width of the image and as high as possible. This option is suitable for area operations which do not violently transform coordinates, such as im_conv().

VIPS_DEMAND_STYLE_SMALLTILE --- This is the most general demand format. Output is demanded in small (around 100x100 pel) sections. This style works reasonably efficiently, even for bizzare operations like 45 degree rotate.

VIPS_DEMAND_STYLE_ANY --- This image is not being demand-read from a disc file (even indirectly) so any demand style is OK. It's used for things like im_black() where the pixels are calculated.

See also: vips_image_pipelinev().

VIPS_DEMAND_STYLE_ERROR

VIPS_DEMAND_STYLE_SMALLTILE

demand in small (typically 64x64 pixel) tiles

VIPS_DEMAND_STYLE_FATSTRIP

demand in fat (typically 10 pixel high) strips

VIPS_DEMAND_STYLE_THINSTRIP

demand in thin (typically 1 pixel high) strips

VIPS_DEMAND_STYLE_ANY

demand geometry does not matter

enum VipsImageType

typedef enum {
	VIPS_IMAGE_ERROR = -1,	
	VIPS_IMAGE_NONE,		/* no type set */
	VIPS_IMAGE_SETBUF,		/* malloced memory array */
	VIPS_IMAGE_SETBUF_FOREIGN, /* memory array, don't free on close */
	VIPS_IMAGE_OPENIN,		/* input from fd with a window */
	VIPS_IMAGE_MMAPIN,		/* memory mapped input file */
	VIPS_IMAGE_MMAPINRW,		/* memory mapped read/write file */
	VIPS_IMAGE_OPENOUT,		/* output to fd */
	VIPS_IMAGE_PARTIAL		/* partial image */
} VipsImageType;

VIPS_IMAGE_ERROR

VIPS_IMAGE_NONE

VIPS_IMAGE_SETBUF

VIPS_IMAGE_SETBUF_FOREIGN

VIPS_IMAGE_OPENIN

VIPS_IMAGE_MMAPIN

VIPS_IMAGE_MMAPINRW

VIPS_IMAGE_OPENOUT

VIPS_IMAGE_PARTIAL


enum VipsInterpretation

typedef enum {
	VIPS_INTERPRETATION_ERROR = -1,
	VIPS_INTERPRETATION_MULTIBAND = 0,
	VIPS_INTERPRETATION_B_W = 1,
	VIPS_INTERPRETATION_HISTOGRAM = 10,
	VIPS_INTERPRETATION_XYZ = 12,
	VIPS_INTERPRETATION_LAB = 13,
	VIPS_INTERPRETATION_CMYK = 15,
	VIPS_INTERPRETATION_LABQ = 16,
	VIPS_INTERPRETATION_RGB = 17,
	VIPS_INTERPRETATION_CMC = 18,
	VIPS_INTERPRETATION_LCH = 19,
	VIPS_INTERPRETATION_LABS = 21,
	VIPS_INTERPRETATION_sRGB = 22,
	VIPS_INTERPRETATION_YXY = 23,
	VIPS_INTERPRETATION_FOURIER = 24,
	VIPS_INTERPRETATION_RGB16 = 25,
	VIPS_INTERPRETATION_GREY16 = 26,
	VIPS_INTERPRETATION_MATRIX = 27,
	VIPS_INTERPRETATION_scRGB = 28
} VipsInterpretation;

How the values in an image should be interpreted. For example, a three-band float image of type VIPS_INTERPRETATION_LAB should have its pixels interpreted as coordinates in CIE Lab space.

These values are set by operations as hints to user-interfaces built on top of VIPS to help them show images to the user in a meaningful way. Operations do not use these values to decide their action.

The gaps in the numbering are historical and must be maintained. Allocate new numbers from the end.

VIPS_INTERPRETATION_ERROR

VIPS_INTERPRETATION_MULTIBAND

generic many-band image

VIPS_INTERPRETATION_B_W

some kind of single-band image

VIPS_INTERPRETATION_HISTOGRAM

a 1D image, eg. histogram or lookup table

VIPS_INTERPRETATION_XYZ

the first three bands are CIE XYZ

VIPS_INTERPRETATION_LAB

pixels are in CIE Lab space

VIPS_INTERPRETATION_CMYK

the first four bands are in CMYK space

VIPS_INTERPRETATION_LABQ

implies VIPS_CODING_LABQ

VIPS_INTERPRETATION_RGB

generic RGB space

VIPS_INTERPRETATION_CMC

a uniform colourspace based on CMC(1:1)

VIPS_INTERPRETATION_LCH

pixels are in CIE LCh space

VIPS_INTERPRETATION_LABS

CIE LAB coded as three signed 16-bit values

VIPS_INTERPRETATION_sRGB

pixels are sRGB

VIPS_INTERPRETATION_YXY

pixels are CIE Yxy

VIPS_INTERPRETATION_FOURIER

image is in fourier space

VIPS_INTERPRETATION_RGB16

generic 16-bit RGB

VIPS_INTERPRETATION_GREY16

generic 16-bit mono

VIPS_INTERPRETATION_MATRIX

a matrix

VIPS_INTERPRETATION_scRGB

pixels are scRGB

enum VipsBandFormat

typedef enum {
	VIPS_FORMAT_NOTSET = -1,
	VIPS_FORMAT_UCHAR = 0,
	VIPS_FORMAT_CHAR = 1,
	VIPS_FORMAT_USHORT = 2,
	VIPS_FORMAT_SHORT = 3,
	VIPS_FORMAT_UINT = 4,
	VIPS_FORMAT_INT = 5,
	VIPS_FORMAT_FLOAT = 6,
	VIPS_FORMAT_COMPLEX = 7,
	VIPS_FORMAT_DOUBLE = 8,
	VIPS_FORMAT_DPCOMPLEX = 9,
	VIPS_FORMAT_LAST = 10
} VipsBandFormat;

The format used for each band element.

Each corresponnds to a native C type for the current machine. For example, VIPS_FORMAT_USHORT is unsigned short.

VIPS_FORMAT_NOTSET

invalid setting

VIPS_FORMAT_UCHAR

unsigned char format

VIPS_FORMAT_CHAR

char format

VIPS_FORMAT_USHORT

unsigned short format

VIPS_FORMAT_SHORT

short format

VIPS_FORMAT_UINT

unsigned int format

VIPS_FORMAT_INT

int format

VIPS_FORMAT_FLOAT

float format

VIPS_FORMAT_COMPLEX

complex (two floats) format

VIPS_FORMAT_DOUBLE

double float format

VIPS_FORMAT_DPCOMPLEX

double complex (two double) format

VIPS_FORMAT_LAST


enum VipsCoding

typedef enum {
	VIPS_CODING_ERROR = -1,
	VIPS_CODING_NONE = 0,
	VIPS_CODING_LABQ = 2,
	VIPS_CODING_RAD = 6,
	VIPS_CODING_LAST = 7
} VipsCoding;

How pixels are coded.

Normally, pixels are uncoded and can be manipulated as you would expect. However some file formats code pixels for compression, and sometimes it's useful to be able to manipulate images in the coded format.

The gaps in the numbering are historical and must be maintained. Allocate new numbers from the end.

VIPS_CODING_ERROR

VIPS_CODING_NONE

pixels are not coded

VIPS_CODING_LABQ

pixels encode 3 float CIELAB values as 4 uchar

VIPS_CODING_RAD

pixels encode 3 float RGB as 4 uchar (Radiance coding)

VIPS_CODING_LAST


enum VipsAccess

typedef enum {
	VIPS_ACCESS_RANDOM,
	VIPS_ACCESS_SEQUENTIAL,
	VIPS_ACCESS_SEQUENTIAL_UNBUFFERED,
	VIPS_ACCESS_LAST
} VipsAccess;

The type of access an operation has to supply. See vips_tilecache() and VipsForeign.

VIPS_ACCESS_RANDOM means requests can come in any order.

VIPS_ACCESS_SEQUENTIAL means requests will be top-to-bottom, but with some amount of buffering behind the read point for small non-local accesses.

VIPS_ACCESS_SEQUENTIAL_UNBUFFERED means requests will be strictly top-to-bottom with no read-behind. This can save some memory.

VIPS_ACCESS_RANDOM

can read anywhere

VIPS_ACCESS_SEQUENTIAL

top-to-bottom reading only, but with a small buffer

VIPS_ACCESS_SEQUENTIAL_UNBUFFERED

top-to-bottom reading only

VIPS_ACCESS_LAST


VipsProgress

typedef struct {
	int run;		/* Time we have been running */
	int eta;		/* Estimated seconds of computation left */
	gint64 tpels;		/* Number of pels we expect to calculate */
	gint64 npels;		/* Number of pels calculated so far */
	int percent;		/* Percent complete */
	GTimer *start;		/* Start time */
} VipsProgress;

A structure available to eval callbacks giving information on evaluation progress. See "eval".

int run;

Time we have been running

int eta;

Estimated seconds of computation left

gint64 tpels;

Number of pels we expect to calculate

gint64 npels;

Number of pels calculated so far

int percent;

Percent complete

GTimer *start;

Start time

VipsImage

typedef struct _VipsImage VipsImage;

An image. These can represent an image on disc, a memory buffer, an image in the process of being written to disc or a partially evaluated image in memory.


VipsImageClass

typedef struct {
	VipsObjectClass parent_class;

	/* Signals we emit.
	 */

	/* Evaluation is starting.
	 */
	void (*preeval)( VipsImage *image, VipsProgress *progress );

	/* Evaluation progress.
	 */
	void (*eval)( VipsImage *image, VipsProgress *progress );

	/* Evaluation is ending.
	 */
	void (*posteval)( VipsImage *image, VipsProgress *progress );

	/* An image has been written to. 
	 * Used by eg. vips_image_new_mode("x.jpg", "w") to do the 
	 * final write to jpeg.
	 * Set *result to non-zero to indicate an error on write.
	 */
	void (*written)( VipsImage *image, int *result );

	/* An image has been modified in some way and all caches 
	 * need dropping. 
	 */
	void (*invalidate)( VipsImage *image );

	/* Minimise this pipeline. 
	 *
	 * This is triggered (sometimes) at the end of eval to signal that
	 * we're probably done and that operations involved should try to
	 * minimise memory use by, for example, dropping caches. 
	 *
	 * See vips_tilecache().
	 */
	void (*minimise)( VipsImage *image );
} VipsImageClass;


VIPS_IMAGE_SIZEOF_ELEMENT()

#define             VIPS_IMAGE_SIZEOF_ELEMENT( I )

I :

a VipsImage

Returns :

sizeof() a band element.

VIPS_IMAGE_SIZEOF_PEL()

#define             VIPS_IMAGE_SIZEOF_PEL( I )

I :

a VipsImage

Returns :

sizeof() a pixel.

VIPS_IMAGE_SIZEOF_LINE()

#define             VIPS_IMAGE_SIZEOF_LINE( I )

I :

a VipsImage

Returns :

sizeof() a scanline of pixels.

VIPS_IMAGE_N_ELEMENTS()

#define             VIPS_IMAGE_N_ELEMENTS( I )

I :

a VipsImage

Returns :

The number of band elements in a scanline.

VIPS_IMAGE_N_PELS()

#define             VIPS_IMAGE_N_PELS( I )

I :

a VipsImage

Returns :

The number of pels in an image. A 64-bit unsigned int.

VIPS_IMAGE_ADDR()

#define             VIPS_IMAGE_ADDR( I, X, Y )

This macro returns a pointer to a pixel in an image, cast to a VipsPel *. It only works for images which are fully available in memory, so memory buffers and small mapped images only.

If VIPS_DEBUG is defined, you get a version that checks bounds for you.

See also: VIPS_REGION_ADDR().

I :

a VipsImage

X :

x coordinate

Y :

y coordinate

Returns :

The address of pixel (x,y) in the image.

VIPS_MATRIX()

#define             VIPS_MATRIX( I, X, Y )

This macro returns a pointer to a pixel in an image, cast to a double*. The image must have a single band, be VIPS_FORMAT_DOUBLE and be fully available in memory, so memory buffers and small mapped images only.

If VIPS_DEBUG is defined, you get a version that checks bounds and image type for you.

See also: VIPS_IMAGE_ADDR().

I :

a VipsImage

X :

x coordinate

Y :

y coordinate

Returns :

The address of pixel (x,y) in the image.

vips_image_written ()

int                 vips_image_written                  (VipsImage *image);


vips_image_invalidate_all ()

void                vips_image_invalidate_all           (VipsImage *image);

Invalidate all pixel caches on an image and any downstream images, that is, images which depend on this image.

The "invalidate" callback is triggered for all invalidated images.

image :

VipsImage to invalidate

vips_image_minimise_all ()

void                vips_image_minimise_all             (VipsImage *image);

Minimise memory use on this image and any upstream images, that is, images which this image depends upon.

The "minimise" callback is triggered for all minimised images.

image :

VipsImage to minimise

vips_image_preeval ()

void                vips_image_preeval                  (VipsImage *image);


vips_image_eval ()

void                vips_image_eval                     (VipsImage *image,
                                                         guint64 processed);


vips_image_posteval ()

void                vips_image_posteval                 (VipsImage *image);


vips_image_set_progress ()

void                vips_image_set_progress             (VipsImage *image,
                                                         gboolean progress);

vips signals evaluation progress via the "preeval", "eval" and "posteval" signals. Progress is signalled on the most-downstream image for which vips_image_set_progress() was called.

image :

image to signal progress on

progress :

turn progress reporting on or off

vips_image_iskilled ()

gboolean            vips_image_iskilled                 (VipsImage *image);


vips_image_set_kill ()

void                vips_image_set_kill                 (VipsImage *image,
                                                         gboolean kill);


vips_image_new ()

VipsImage *         vips_image_new                      (void);

vips_image_new() creates a "glue" descriptor you can use to join two image processing operations together.

It is the equivalent of vips_image_new_mode("xxx", "p").

Returns :

the new VipsImage, or NULL on error.

vips_image_new_mode ()

VipsImage *         vips_image_new_mode                 (const char *filename,
                                                         const char *mode);

vips_image_new_mode() examines the mode string and creates an appropriate VipsImage.

  • "t" creates a temporary memory buffer image.

  • "p" creates a "glue" descriptor you can use to join operations, see also vips_image_new().

  • "r" opens the named file for reading. If the file is not in the native VIPS format for your machine, vips_image_new_mode() automatically converts the file for you.

    Some formats (eg. tiled tiff) are read directly.

    Some formats (eg. strip tiff) do not support random access and can't be processed directly. Small images are decompressed to memory and loaded from there, large images are decompressed to a disc file and processed from that.

    If the operations you intend to perform are sequential, that is, they operate in a strict top-to-bottom manner, you can use sequential mode instead, see "rs" below, or you can use the lower-level API and control the loading process yourself. See VipsForeign.

    See vips_image_new_temp_file() for an explanation of how VIPS selects a location for the temporary file.

    The disc threshold can be set with the "--vips-disc-threshold" command-line argument, or the IM_DISC_THRESHOLD environment variable. The value is a simple integer, but can take a unit postfix of "k", "m" or "g" to indicate kilobytes, megabytes or gigabytes.

    For example:

            vips --vips-disc-threshold 500m copy fred.tif fred.v
          

    will copy via disc if "fred.tif" is more than 500 Mbytes uncompressed. The default threshold is 100 MB.

    Note that "r" mode works in at least two stages. It should return quickly and let you check header fields. It will only actually read in pixels when you first access them.

  • "rs" opens the named file for reading sequentially. It reads the source image top-to-bottom and serves up pixels to the pipeline as required. Provided the operations that connect to the image all demand pixels only top-to-bottom as well, everything is fine and you avoid the separate decompress stage.

  • "w" opens the named file for writing. It looks at the file name suffix to determine the type to write -- for example:

            vips_image_new_mode( "fred.tif", "w" )
          

    will write in TIFF format.

  • "rw" opens the named file for reading and writing. This will only work for VIPS files in a format native to your machine. It is only for paintbox-type applications.

filename :

file to open

mode :

mode to open with

Returns :

the new VipsImage, or NULL on error.

vips_image_new_buffer ()

VipsImage *         vips_image_new_buffer               (void);

vips_image_new_buffer() creates a new VipsImage which when written to will create a memory buffer. It is a convenience function for vips_image_new_mode(vips_image_temp_name(), "t").

See also: vips_image_new().

Returns :

the new VipsImage, or NULL on error.

vips_image_new_from_file ()

VipsImage *         vips_image_new_from_file            (const char *filename);

vips_image_new_from_file() opens filename for reading in mode "r". See vips_image_new_mode() for details.

See also: vips_image_new_mode().

filename :

file to open

Returns :

the new VipsImage, or NULL on error.

vips_image_new_from_file_raw ()

VipsImage *         vips_image_new_from_file_raw        (const char *filename,
                                                         int xsize,
                                                         int ysize,
                                                         int bands,
                                                         guint64 offset);

This function maps the named file and returns a VipsImage you can use to read it.

It returns an 8-bit image with bands bands. If the image is not 8-bit, use im_copy_set() to transform the descriptor after loading it.

See also: im_copy_set(), im_raw2vips(), vips_image_new_from_file().

filename :

filename to open

xsize :

image width

ysize :

image height

bands :

image bands (or bytes per pixel)

offset :

bytes to skip at start of file

Returns :

the new VipsImage, or NULL on error.

vips_image_new_from_memory ()

VipsImage *         vips_image_new_from_memory          (void *buffer,
                                                         int xsize,
                                                         int ysize,
                                                         int bands,
                                                         VipsBandFormat bandfmt);

This function wraps an IMAGE around a memory buffer. VIPS does not take responsibility for the area of memory, it's up to you to make sure it's freed when the image is closed. See for example "close".

See also: im_binfile(), im_raw2vips(), vips_image_new().

buffer :

start of memory area

xsize :

image width

ysize :

image height

bands :

image bands (or bytes per pixel)

bandfmt :

image format

Returns :

the new VipsImage, or NULL on error.

vips_image_new_matrix ()

VipsImage *         vips_image_new_matrix               (int width,
                                                         int height);

This convenience function makes an image which is a matrix: a one-band VIPS_FORMAT_DOUBLE image held in memory.

Use VIPS_IMAGE_ADDR(), or VIPS_MATRIX() to address pixels in the image.

Use vips_image_set_double() to set "scale" and "offset", if required.

See also: vips_image_new_matrixv()

width :

image width

height :

image height

Returns :

the new VipsImage, or NULL on error.

vips_image_new_matrixv ()

VipsImage *         vips_image_new_matrixv              (int width,
                                                         int height,
                                                         ...);

As vips_image_new_matrix(), but initialise the matrix from the argument list. After height should be width * height double constants which are used to set the matrix elements.

See also: vips_image_new_matrix()

width :

image width

height :

image height

... :

matrix coefficients

Returns :

the new VipsImage, or NULL on error.

vips_image_set_delete_on_close ()

void                vips_image_set_delete_on_close      (VipsImage *image,
                                                         gboolean delete_on_close);

Sets the delete_on_close flag for the image. If this flag is set, when image is finalized, the filename held in image->filename at the time of this call is unlinked.

This function is clearly extremely dangerous, use with great caution.

See also: vips__temp_name(), vips_image_new_temp_file().

image :

image to set

delete_on_close :

format of file

vips_image_new_temp_file ()

VipsImage *         vips_image_new_temp_file            (const char *format);

Make a "w" disc VipsImage which will be automatically unlinked when it is destroyed. format is something like "s.v" for a vips file.

The file is created in the temporary directory, see vips__temp_name().

See also: vips__temp_name().

format :

format of file

Returns :

the new VipsImage, or NULL on error.

vips_image_write ()

int                 vips_image_write                    (VipsImage *image,
                                                         VipsImage *out);

Write image to out. Use vips_image_new_mode() and friends to create the VipsImage you want to write to.

See also: vips_image_new_mode(), vips_copy(), vips_image_write_to_file().

image :

image to write

out :

write to this image

Returns :

0 on success, or -1 on error.

vips_image_write_to_file ()

int                 vips_image_write_to_file            (VipsImage *image,
                                                         const char *filename);

A convenience function to write image to a file.

image :

image to write

filename :

write to this file

Returns :

0 on success, or -1 on error.

vips_image_isMSBfirst ()

gboolean            vips_image_isMSBfirst               (VipsImage *image);

Return TRUE if image is in most-significant- byte first form. This is the byte order used on the SPARC architecture and others.

image :

image to test

vips_image_isfile ()

gboolean            vips_image_isfile                   (VipsImage *image);

Return TRUE if image represents a file on disc in some way.

image :

image to test

vips_image_ispartial ()

gboolean            vips_image_ispartial                (VipsImage *image);

Return TRUE if im represents a partial image (a delayed calculation).

image :

image to test

vips_image_wio_input ()

int                 vips_image_wio_input                (VipsImage *image);

Check that an image is readable via the VIPS_IMAGE_ADDR() macro, that is, that the entire image is in memory and all pixels can be read with VIPS_IMAGE_ADDR().

If it isn't, try to transform it so that VIPS_IMAGE_ADDR() can work.

See also: vips_image_wio_output(), vips_image_pio_input(), vips_image_inplace(), VIPS_IMAGE_ADDR().

image :

image to transform

Returns :

0 on succeess, or -1 on error.

vips_image_pio_input ()

int                 vips_image_pio_input                (VipsImage *image);

Check that an image is readable with vips_region_prepare() and friends. If it isn't, try to transform the image so that vips_region_prepare() can work.

See also: vips_image_pio_output(), vips_region_prepare().

image :

image to check

Returns :

0 on succeess, or -1 on error.

vips_image_inplace ()

int                 vips_image_inplace                  (VipsImage *image);

Gets image ready for an in-place operation, such as im_insertplace(). After calling this function you can both read and write the image with VIPS_IMAGE_ADDR().

See also: im_insertplace(), vips_image_wio_input().

image :

image to make read-write

Returns :

0 on succeess, or -1 on error.

vips_image_write_prepare ()

int                 vips_image_write_prepare            (VipsImage *image);

Call this after setting header fields (width, height, and so on) to allocate resources ready for writing.

Normally this function is called for you by vips_image_generate() or vips_image_write_line(). You will need to call it yourself if you plan to write directly to the ->data member of a "t" image.

image :

image to prepare

Returns :

0 on success, or -1 on error.

vips_image_write_line ()

int                 vips_image_write_line               (VipsImage *image,
                                                         int ypos,
                                                         VipsPel *linebuffer);

Write a line of pixels to an image. This function must be called repeatedly with ypos increasing from 0 to YSize - linebuffer must be VIPS_IMAGE_SIZEOF_LINE() bytes long.

See also: vips_image_generate().

image :

image to write to

ypos :

vertical position of scan-line to write

linebuffer :

scanline of pixels

Returns :

0 on success, or -1 on error.

vips_band_format_isint ()

gboolean            vips_band_format_isint              (VipsBandFormat format);

Return TRUE if format is one of the integer types.

format :

format to test

vips_band_format_isuint ()

gboolean            vips_band_format_isuint             (VipsBandFormat format);

Return TRUE if format is one of the unsigned integer types.

format :

format to test

vips_band_format_is8bit ()

gboolean            vips_band_format_is8bit             (VipsBandFormat format);

Return TRUE if format is uchar or schar.

format :

format to test

vips_band_format_isfloat ()

gboolean            vips_band_format_isfloat            (VipsBandFormat format);

Return TRUE if format is one of the float types.

format :

format to test

vips_band_format_iscomplex ()

gboolean            vips_band_format_iscomplex          (VipsBandFormat format);

Return TRUE if fmt is one of the complex types.

format :

format to test

vips_system ()

int                 vips_system                         (const char *cmd_format,
                                                         ...);

Optional arguments:

in: input image out: output image in_format: write input file like this out_format: write output filename like this log: stdout of command is returned here

vips_system() runs a command, optionally passing an image in and optionally getting an image back. The command's stdout is returned in log.

First, if in is set, it is written to a file. The filename is formed by substituting something like "vips-49857-1" for the first %s in in_format, then prepending "/tmp". If the environment variable TMPDIR is defined, it can be used to set a different temporary directory.

On Windows, if the environment variable TMPDIR is not defined, VIPS calls GetTempPath() to get the user's preferred temporary area. If that fails, it defaults to C:\temp.

If in_format is something like "%s.png", the file will be written in PNG format. By default, in_format is "%s.tif".

If out_format is set, an output filename is formed in the same way.

The command string to run is made by substituting the first %s in cmd_format for the name of the input file, if in is set, and the second %s for the output filename, if set.

The command is executed with popen() and the output captured in log.

After the command finishes, if out_format is set, the output image is opened and returned in out. Closing the output image will automatically delete the output file.

Finally the input images are deleted.

For example, this call will run the ImageMagick convert program on an image, using JPEG files to pass images into and out of the convert command.

VipsImage *in;
VipsImage *out;
char *log;

if (vips_system ("convert %s -swirl 45 %s",
	"in", in, 
	"out", &out, 
  	"in_format", "%s.jpg", 
  	"out_format", "%s.jpg", 
  	"log", &log,
  	NULL))
  	error ...

cmd_format :

command to run

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on failure.

Property Details

The "bands" property

  "bands"                    gint                  : Read / Write

Number of bands in image.

Allowed values: [1,1000000000]

Default value: 1


The "coding" property

  "coding"                   VipsCoding            : Read / Write

Pixel coding.

Default value: VIPS_CODING_NONE


The "demand" property

  "demand"                   VipsDemandStyle       : Read / Write

Preferred demand style for this image.

Default value: VIPS_DEMAND_STYLE_SMALLTILE


The "filename" property

  "filename"                 gchar*                : Read / Write

Image filename.

Default value: NULL


The "foreign-buffer" property

  "foreign-buffer"           gpointer              : Read / Write

Pointer to foreign pixels.


The "format" property

  "format"                   VipsBandFormat        : Read / Write

Pixel format in image.

Default value: VIPS_FORMAT_UCHAR


The "height" property

  "height"                   gint                  : Read / Write

Image height in pixels.

Allowed values: [1,1000000000]

Default value: 1


The "interpretation" property

  "interpretation"           VipsInterpretation    : Read / Write

Pixel interpretation.

Default value: VIPS_INTERPRETATION_MULTIBAND


The "kill" property

  "kill"                     gboolean              : Read / Write

Block evaluation on this image.

Default value: FALSE


The "mode" property

  "mode"                     gchar*                : Read / Write

Open mode.

Default value: "p"


The "sizeof-header" property

  "sizeof-header"            guint64               : Read / Write

Offset in bytes from start of file.

Allowed values: <= 1000000

Default value: 64


The "width" property

  "width"                    gint                  : Read / Write

Image width in pixels.

Allowed values: [1,1000000000]

Default value: 1


The "xoffset" property

  "xoffset"                  gint                  : Read / Write

Horizontal offset of origin.

Allowed values: [-1000000,1000000]

Default value: 0


The "xres" property

  "xres"                     gdouble               : Read / Write

Horizontal resolution in pixels/mm.

Allowed values: [-0,1e+06]

Default value: 0


The "yoffset" property

  "yoffset"                  gint                  : Read / Write

Vertical offset of origin.

Allowed values: [-1000000,1000000]

Default value: 0


The "yres" property

  "yres"                     gdouble               : Read / Write

Vertical resolution in pixels/mm.

Allowed values: [-0,1e+06]

Default value: 0

Signal Details

The "eval" signal

void                user_function                      (VipsImage *vipsimage,
                                                        gpointer   arg1,
                                                        gpointer   user_data)      : Run Last

vipsimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "invalidate" signal

void                user_function                      (VipsImage *vipsimage,
                                                        gpointer   user_data)      : Action

vipsimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "minimise" signal

void                user_function                      (VipsImage *vipsimage,
                                                        gpointer   user_data)      : Action

vipsimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "posteval" signal

void                user_function                      (VipsImage *vipsimage,
                                                        gpointer   arg1,
                                                        gpointer   user_data)      : Run Last

vipsimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "preeval" signal

void                user_function                      (VipsImage *vipsimage,
                                                        gpointer   arg1,
                                                        gpointer   user_data)      : Run Last

vipsimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "written" signal

void                user_function                      (VipsImage *vipsimage,
                                                        gpointer   arg1,
                                                        gpointer   user_data)      : Action

vipsimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

See Also

region
vips-7.38.5/doc/reference/html/libvips-histogram.html0000644000175000017500000010517312303146332017524 00000000000000 histogram

histogram

histogram — find, manipulate and apply histograms and lookup tables

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

int                 vips_maplut                         (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *lut,
                                                         ...);
int                 vips_percent                        (VipsImage *in,
                                                         double percent,
                                                         int *threshold,
                                                         ...);
int                 vips_stdif                          (VipsImage *in,
                                                         VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_hist_cum                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_hist_norm                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_hist_equal                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_hist_plot                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_hist_match                     (VipsImage *in,
                                                         VipsImage *ref,
                                                         VipsImage **out,
                                                         ...);
int                 vips_hist_local                     (VipsImage *in,
                                                         VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_hist_ismonotonic               (VipsImage *in,
                                                         gboolean *monotonic,
                                                         ...);

Description

Histograms and look-up tables are 1xn or nx1 images, where n is less than 256 or less than 65536, corresponding to 8- and 16-bit unsigned int images. They are tagged with a VipsType of IM_TYPE_HISTOGRAM and usually displayed by user-interfaces such as nip2 as plots rather than images.

These functions can be broadly grouped as things to find or build histograms (im_histgr(), im_buildlut(), in_identity()), operations that manipulate histograms in some way (im_histcum(), im_histnorm()), operations to apply histograms (im_maplut()), and a variety of utility operations.

A final group of operations build tone curves. These are useful in pre-press work for adjusting the appearance of images. They are designed for CIELAB images, but might be useful elsewhere.

Details

vips_maplut ()

int                 vips_maplut                         (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *lut,
                                                         ...);

Optional arguments:

band: apply one-band lut to this band of in

Map an image through another image acting as a LUT (Look Up Table). The lut may have any type and the output image will be that type.

The input image will be cast to one of the unsigned integer types, that is, VIPS_FORMAT_UCHAR, VIPS_FORMAT_USHORT or VIPS_FORMAT_UINT.

If lut is too small for the input type (for example, if in is VIPS_FORMAT_UCHAR but lut only has 100 elements), the lut is padded out by copying the last element. Overflows are reported at the end of computation. If lut is too large, extra values are ignored.

If lut has one band and band is -1 (the default), then all bands of in pass through lut. If band is >= 0, then just that band of in passes through lut and other bands are just copied.

If lut has same number of bands as in, then each band is mapped separately. If in has one band, then lut may have many bands and the output will have the same number of bands as lut.

See also: im_histgr(), vips_identity().

in :

input image

out :

output image

lut :

look-up table

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_percent ()

int                 vips_percent                        (VipsImage *in,
                                                         double percent,
                                                         int *threshold,
                                                         ...);

vips_percent() returns (through the threshold parameter) the threshold above which there are percent values of in. If for example percent=10, the number of pels of the input image with values greater than threshold will correspond to 10% of all pels of the image.

The function works for uchar and ushort images only. It can be used to threshold the scaled result of a filtering operation.

See also: vips_hist_find(), vips_profile().

in :

input image

percent :

threshold percentage

threshold :

output threshold value

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_stdif ()

int                 vips_stdif                          (VipsImage *in,
                                                         VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

a: weight of new mean m0: target mean b: weight of new deviation s0: target deviation

vips_stdif() preforms statistical differencing according to the formula given in page 45 of the book "An Introduction to Digital Image Processing" by Wayne Niblack. This transformation emphasises the way in which a pel differs statistically from its neighbours. It is useful for enhancing low-contrast images with lots of detail, such as X-ray plates.

At point (i,j) the output is given by the equation:

vout(i,j) = a * m0 + (1 - a) * meanv + (vin(i,j) - meanv) * (b * s0) / (s0 + b * stdv)

Values a, m0, b and s0 are entered, while meanv and stdv are the values calculated over a moving window of size width, height centred on pixel (i,j). m0 is the new mean, a is the weight given to it. s0 is the new standard deviation, b is the weight given to it.

Try:

vips stdif $VIPSHOME/pics/huysum.v fred.v 0.5 128 0.5 50 11 11

The operation works on one-band uchar images only, and writes a one-band uchar image as its result. The output image has the same size as the input.

See also: vips_hist_local().

in :

input image

out :

output image

width :

width of region

height :

height of region

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_cum ()

int                 vips_hist_cum                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Form cumulative histogram.

See also: vips_hist_norm().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_norm ()

int                 vips_hist_norm                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Normalise histogram ... normalise range to make it square (ie. max == number of elements). Normalise each band separately.

See also: vips_hist_cum().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_equal ()

int                 vips_hist_equal                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

band: band to equalise

Histogram-equalise in. Equalise using band bandno, or if bandno is -1, equalise bands independently.

See also:

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_plot ()

int                 vips_hist_plot                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Plot a 1 by any or any by 1 image file as a max by any or any by max image using these rules:

unsigned char max is always 256

other unsigned integer types output 0 - maxium value of in.

signed int types min moved to 0, max moved to max + min.

float types min moved to 0, max moved to any (square output)

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_match ()

int                 vips_hist_match                     (VipsImage *in,
                                                         VipsImage *ref,
                                                         VipsImage **out,
                                                         ...);

Adjust in to match ref. If in and ref are normalised cumulative histograms, out will be a LUT that adjusts the PDF of the image from which in was made to match the PDF of ref's image.

See also: vips_maplut(), vips_hist_find(), vips_hist_norm(), vips_hist_cum().

in :

input histogram

ref :

reference histogram

out :

output histogram

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_local ()

int                 vips_hist_local                     (VipsImage *in,
                                                         VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Performs local histogram equalisation on in using a window of size xwin by ywin centered on the input pixel.

The output image is the same size as the input image. The edge pixels are created by copy edge pixels of the input image outwards.

See also: vips_hist_equal().

in :

input image

out :

output image

width :

width of region

height :

height of region

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_ismonotonic ()

int                 vips_hist_ismonotonic               (VipsImage *in,
                                                         gboolean *monotonic,
                                                         ...);

Test in for monotonicity. out is set non-zero if in is monotonic.

in :

lookup-table to test

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

See Also

image
vips-7.38.5/doc/reference/html/libvips-conversion.html0000644000175000017500000050011112303146332017703 00000000000000 conversion

conversion

conversion — convert images in some way: change band format, change header, insert, extract, join

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

enum                VipsExtend;
enum                VipsDirection;
enum                VipsAlign;
enum                VipsAngle;
enum                VipsAngle45;
int                 vips_copy                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_tilecache                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_linecache                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_sequential                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cache                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_copy_file                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_embed                          (VipsImage *in,
                                                         VipsImage **out,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_flip                           (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsDirection direction,
                                                         ...);
int                 vips_insert                         (VipsImage *main,
                                                         VipsImage *sub,
                                                         VipsImage **out,
                                                         int x,
                                                         int y,
                                                         ...);
int                 vips_join                           (VipsImage *main,
                                                         VipsImage *sub,
                                                         VipsImage **out,
                                                         VipsDirection direction,
                                                         ...);
int                 vips_extract_area                   (VipsImage *input,
                                                         VipsImage **output,
                                                         int left,
                                                         int top,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_crop                           (VipsImage *input,
                                                         VipsImage **output,
                                                         int left,
                                                         int top,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_extract_band                   (VipsImage *input,
                                                         VipsImage **output,
                                                         int band,
                                                         ...);
int                 vips_replicate                      (VipsImage *in,
                                                         VipsImage **out,
                                                         int across,
                                                         int down,
                                                         ...);
int                 vips_grid                           (VipsImage *in,
                                                         VipsImage **out,
                                                         int tile_height,
                                                         int across,
                                                         int down,
                                                         ...);
int                 vips_wrap                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_rot                            (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsAngle angle,
                                                         ...);
int                 vips_rot45                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_zoom                           (VipsImage *in,
                                                         VipsImage **out,
                                                         int xfac,
                                                         int yfac,
                                                         ...);
int                 vips_subsample                      (VipsImage *in,
                                                         VipsImage **out,
                                                         int xfac,
                                                         int yfac,
                                                         ...);
int                 vips_cast                           (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsBandFormat format,
                                                         ...);
int                 vips_cast_uchar                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_char                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_ushort                    (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_short                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_uint                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_int                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_float                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_double                    (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_complex                   (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cast_dpcomplex                 (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_scale                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_msb                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_bandjoin                       (VipsImage **in,
                                                         VipsImage **out,
                                                         int n,
                                                         ...);
int                 vips_bandjoin2                      (VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);
int                 vips_bandrank                       (VipsImage **in,
                                                         VipsImage **out,
                                                         int n,
                                                         ...);
int                 vips_bandbool                       (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationBoolean operation,
                                                         ...);
int                 vips_bandand                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_bandor                         (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_bandeor                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_bandmean                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_recomb                         (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *m,
                                                         ...);
int                 vips_ifthenelse                     (VipsImage *cond,
                                                         VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);
int                 vips_flatten                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_falsecolour                    (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_gamma                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 im_insertset                        (VipsImage *main,
                                                         VipsImage *sub,
                                                         VipsImage *out,
                                                         int n,
                                                         int *x,
                                                         int *y);

Description

These operations convert an image in some way. They can be split into a two main groups.

The first set of operations change an image's format in some way. You can change the band format (for example, cast to 32-bit unsigned int), form complex images from real images, convert images to matrices and back, change header fields, and a few others.

The second group move pixels about in some way. You can flip, rotate, extract, insert and join pairs of images in various ways.

Details

enum VipsExtend

typedef enum {
	VIPS_EXTEND_BLACK,
	VIPS_EXTEND_COPY,
	VIPS_EXTEND_REPEAT,
	VIPS_EXTEND_MIRROR,
	VIPS_EXTEND_WHITE,
	VIPS_EXTEND_BACKGROUND,
	VIPS_EXTEND_LAST
} VipsExtend;

See vips_embed(), vips_conv(), vips_affine() and so on.

When the edges of an image are extended, you can specify how you want the extension done.

VIPS_EXTEND_BLACK --- new pixels are black, ie. all bits are zero.

VIPS_EXTEND_COPY --- each new pixel takes the value of the nearest edge pixel

VIPS_EXTEND_REPEAT --- the image is tiled to fill the new area

VIPS_EXTEND_MIRROR --- the image is reflected and tiled to reduce hash edges

VIPS_EXTEND_WHITE --- new pixels are white, ie. all bits are set

VIPS_EXTEND_BACKGROUND --- colour set from the background property

We have to specify the exact value of each enum member since we have to keep these frozen for back compat with vips7.

See also: vips_embed().

VIPS_EXTEND_BLACK

extend with black (all 0) pixels

VIPS_EXTEND_COPY

copy the image edges

VIPS_EXTEND_REPEAT

repeat the whole image

VIPS_EXTEND_MIRROR

mirror the whole image

VIPS_EXTEND_WHITE

extend with white (all bits set) pixels

VIPS_EXTEND_BACKGROUND

extend with colour from the background property

VIPS_EXTEND_LAST


enum VipsDirection

typedef enum {
	VIPS_DIRECTION_HORIZONTAL,
	VIPS_DIRECTION_VERTICAL,
	VIPS_DIRECTION_LAST
} VipsDirection;

See vips_flip(), vips_join() and so on.

Operations like vips_flip() need to be told whether to flip left-right or top-bottom.

See also: vips_flip(), vips_join().

VIPS_DIRECTION_HORIZONTAL

left-right

VIPS_DIRECTION_VERTICAL

top-bottom

VIPS_DIRECTION_LAST


enum VipsAlign

typedef enum {
	VIPS_ALIGN_LOW,
	VIPS_ALIGN_CENTRE,
	VIPS_ALIGN_HIGH,
	VIPS_ALIGN_LAST
} VipsAlign;

See vips_join() and so on.

Operations like vips_join() need to be told whether to align images on the low or high coordinate edge, or centre.

See also: vips_join().

VIPS_ALIGN_LOW

align low coordinate edge

VIPS_ALIGN_CENTRE

align centre

VIPS_ALIGN_HIGH

align high coordinate edge

VIPS_ALIGN_LAST


enum VipsAngle

typedef enum {
	VIPS_ANGLE_0,
	VIPS_ANGLE_90,
	VIPS_ANGLE_180,
	VIPS_ANGLE_270,
	VIPS_ANGLE_LAST
} VipsAngle;

See vips_rot() and so on.

Fixed rotate angles.

See also: vips_rot().

VIPS_ANGLE_0

no rotate

VIPS_ANGLE_90

90 degrees anti-clockwise

VIPS_ANGLE_180

180 degree rotate

VIPS_ANGLE_270

90 degrees clockwise

VIPS_ANGLE_LAST


enum VipsAngle45

typedef enum {
	VIPS_ANGLE45_0,
	VIPS_ANGLE45_45,
	VIPS_ANGLE45_90,
	VIPS_ANGLE45_135,
	VIPS_ANGLE45_180,
	VIPS_ANGLE45_225,
	VIPS_ANGLE45_270,
	VIPS_ANGLE45_315,
	VIPS_ANGLE45_LAST
} VipsAngle45;

VIPS_ANGLE45_0

VIPS_ANGLE45_45

VIPS_ANGLE45_90

VIPS_ANGLE45_135

VIPS_ANGLE45_180

VIPS_ANGLE45_225

VIPS_ANGLE45_270

VIPS_ANGLE45_315

VIPS_ANGLE45_LAST


vips_copy ()

int                 vips_copy                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

width: set image width height: set image height bands: set image bands format: set image format coding: set image coding interpretation: set image interpretation xres: set image xres yres: set image yres xoffset: set image xoffset yoffset: set image yoffset swap: swap byte order

Copy an image, optionally modifying the header. VIPS copies images by copying pointers, so this operation is instant, even for very large images.

You can optionally set any or all header fields during the copy. Some header fields, such as "xres", the horizontal resolution, are safe to change in any way, others, such as "width" will cause immediate crashes if they are not set carefully.

Setting swap to TRUE will make vips_copy() swap the byte ordering of pixels according to the image's format.

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_tilecache ()

int                 vips_tilecache                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

tile_width: width of tiles in cache tile_height: height of tiles in cache max_tiles: maximum number of tiles to cache access: hint expected access pattern VipsAccess threaded: allow many threads persistent: don't drop cache at end of computation

This operation behaves rather like vips_copy() between images in and out, except that it keeps a cache of computed pixels. This cache is made of up to max_tiles tiles (a value of -1 means any number of tiles), and each tile is of size tile_width by tile_height pixels.

Each cache tile is made with a single call to vips_image_prepare().

When the cache fills, a tile is chosen for reuse. If access is VIPS_ACCESS_RANDOM, then the least-recently-used tile is reused. If access is VIPS_ACCESS_SEQUENTIAL or VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, the top-most tile is reused.

By default, tile_width and tile_height are 128 pixels, and the operation will cache up to 1,000 tiles. access defaults to VIPS_ACCESS_RANDOM.

Normally, only a single thread at once is allowed to calculate tiles. If you set threaded to TRUE, vips_tilecache() will allow many threads to calculate tiles at once, and share the cache between them.

Normally the cache is dropped when computation finishes. Set persistent to TRUE to keep the cache between computations.

See also: vips_cache(), vips_linecache().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_linecache ()

int                 vips_linecache                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

access: hint expected access pattern VipsAccess tile_height: height of tiles in cache threaded: allow many threads

This operation behaves rather like vips_copy() between images in and out, except that it keeps a cache of computed scanlines.

The number of lines cached is enough for a small amount of non-local access. If you know you will not be making any non-local access, you can save some memory and set access to VIPS_ACCESS_SEQUENTIAL_UNBUFFERED.

Each cache tile is made with a single call to vips_image_prepare().

When the cache fills, a tile is chosen for reuse. If access is VIPS_ACCESS_RANDOM, then the least-recently-used tile is reused. If access is VIPS_ACCESS_SEQUENTIAL or VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, the top-most tile is reused. access defaults to VIPS_ACCESS_RANDOM.

tile_height can be used to set the size of the strips that vips_linecache() uses. The default is 1 (a single scanline).

Normally, only a single thread at once is allowed to calculate tiles. If you set threaded to TRUE, vips_linecache() will allow many threads to calculate tiles at once and share the cache between them.

See also: vips_cache(), vips_tilecache().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_sequential ()

int                 vips_sequential                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

trace: trace requests strip_height: height of cache strips access: access pattern

This operation behaves rather like vips_copy() between images in and out, except that it checks that pixels are only requested top-to-bottom. If a thread makes an out of order request, it is stalled until the pack catches up.

This operation is useful for loading file formats which are strictly top-to-bottom, like PNG.

If trace is true, the operation will print diagnostic messages for each block of pixels which are processed. This can help find the cause of non-sequential accesses.

strip_height can be used to set the size of the tiles that vips_sequential() uses. The default value is 1.

access can be set to VIPS_ACCESS_SEQUENTIAL_UNBUFFERED, meaning don't keep a large cache behind the read point. This can save some memory.

See also: vips_image_cache().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_cache ()

int                 vips_cache                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

tile_width: width of tiles in cache tile_height: height of tiles in cache max_tiles: maximum number of tiles to cache

This operation behaves rather like vips_copy() between images in and out, except that it keeps a cache of computed pixels. This cache is made of up to max_tiles tiles (a value of -1 means any number of tiles), and each tile is of size tile_width by tile_height pixels. By default it will cache 250 128 x 128 pixel tiles, enough for two 1920 x 1080 images.

This operation is a thin wrapper over vips_sink_screen(), see the documentation for that operation for details.

It uses a set of background threads to calculate pixels and the various active cache operations coordinate so as not to overwhelm your system.

See also: vips_tilecache().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_copy_file ()

int                 vips_copy_file                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

A simple convenience function to copy an image to a file, then copy again to output. If the image is already a file, just copy straight through.

The file is allocated with vips_image_new_temp_file(). The file is automatically deleted when out is closed.

See also: vips_copy(), vips_image_new_temp_file().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_embed ()

int                 vips_embed                          (VipsImage *in,
                                                         VipsImage **out,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

extend: how to generate the edge pixels (default: black) background: colour for edge pixels

The opposite of vips_extract_area(): embed in within an image of size width by height at position x, y. extend controls what appears in the new pels, see VipsExtend.

See also: vips_extract_area(), vips_insert().

in :

input image

out :

output image

x :

place in at this x position in out

y :

place in at this y position in out

width :

out should be this many pixels across

height :

out should be this many pixels down

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_flip ()

int                 vips_flip                           (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsDirection direction,
                                                         ...);

Flips an image left-right or up-down.

See also: vips_rot().

in :

input image

out :

output image

direction :

flip horizontally or vertically

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_insert ()

int                 vips_insert                         (VipsImage *main,
                                                         VipsImage *sub,
                                                         VipsImage **out,
                                                         int x,
                                                         int y,
                                                         ...);

Optional arguments:

expand: expand output to hold whole of both images background: colour for new pixels

Insert one image into another. sub is inserted into image main at position x, y relative to the top LH corner of main.

Normally out shows the whole of main. If expand is TRUE then out is made large enough to hold all of main and sub. Any areas of out not coming from either main or sub are set to background (default 0).

If sub overlaps main, sub will appear on top of main.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: vips_join(), vips_embed(), vips_extract_area().

main :

big image

sub :

small image

out :

output image

x :

left position of sub

y :

top position of sub

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_join ()

int                 vips_join                           (VipsImage *main,
                                                         VipsImage *sub,
                                                         VipsImage **out,
                                                         VipsDirection direction,
                                                         ...);

Optional arguments:

expand: TRUE to expand the output image to hold all of the input pixels shim: space between images, in pixels background: background ink colour align: low, centre or high alignment

Join in1 and in2 together, left-right or up-down depending on the value of direction.

If one is taller or wider than the other, out will be has high as the smaller. If expand is TRUE, then the output will be expanded to contain all of the input pixels.

Use align to set the edge that the images align on. By default, they align on the edge with the lower value coordinate.

Use background to set the colour of any pixels in out which are not present in either in1 or in2.

Use shim to set the spacing between the images. By default this is 0.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: vips_insert().

out :

output image

direction :

join horizontally or vertically

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_extract_area ()

int                 vips_extract_area                   (VipsImage *input,
                                                         VipsImage **output,
                                                         int left,
                                                         int top,
                                                         int width,
                                                         int height,
                                                         ...);

Extract an area from an image. The area must fit within in.

See also: vips_extract_bands().

left :

left edge of area to extract

top :

top edge of area to extract

width :

width of area to extract

height :

height of area to extract

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_crop ()

int                 vips_crop                           (VipsImage *input,
                                                         VipsImage **output,
                                                         int left,
                                                         int top,
                                                         int width,
                                                         int height,
                                                         ...);

A synonym for vips_extract_area().

See also: vips_extract_bands().

left :

left edge of area to extract

top :

top edge of area to extract

width :

width of area to extract

height :

height of area to extract

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_extract_band ()

int                 vips_extract_band                   (VipsImage *input,
                                                         VipsImage **output,
                                                         int band,
                                                         ...);

Optional arguments:

n: number of bands to extract

Extract a band or bands from an image. Extracting out of range is an error.

See also: vips_extract_area().

band :

band to extract

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_replicate ()

int                 vips_replicate                      (VipsImage *in,
                                                         VipsImage **out,
                                                         int across,
                                                         int down,
                                                         ...);

Repeats an image many times.

See also: vips_extract().

in :

input image

out :

output image

across :

repeat input this many times across

down :

repeat input this many times down

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_grid ()

int                 vips_grid                           (VipsImage *in,
                                                         VipsImage **out,
                                                         int tile_height,
                                                         int across,
                                                         int down,
                                                         ...);

Chop a tall thin image up into a set of tiles, lay the tiles out in a grid.

The input image should be a very tall, thin image containing a list of smaller images. Volumetric or time-sequence images are often laid out like this. This image is chopped into a series of tiles, each tile_height pixels high and the width of in. The tiles are then rearranged into a grid across tiles across and down tiles down in row-major order.

Supplying tile_height, across and down is not strictly necessary, we only really need two of these. Requiring three is a double-check that the image has the expected geometry.

See also: vips_embed(), vips_insert(), vips_join().

in :

input image

out :

output image

tile_height :

chop into tiles this high

across :

tiles across

down :

tiles down

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_wrap ()

int                 vips_wrap                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

x: horizontal displacement y: vertical displacement

Slice an image up and move the segments about so that the pixel that was at 0, 0 is now at x, y. If x and y are not set, they default to the centre of the image.

See also: vips_embed(), vips_replicate().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_rot ()

int                 vips_rot                            (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsAngle angle,
                                                         ...);

Rotate in by a multiple of 90 degrees.

See also: vips_flip().

in :

input image

out :

output image

angle :

rotation angle

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_rot45 ()

int                 vips_rot45                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

angle: rotation angle

Rotate in by a multiple of 45 degrees. Odd-length sides and square images only.

See also: vips_rot().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_zoom ()

int                 vips_zoom                           (VipsImage *in,
                                                         VipsImage **out,
                                                         int xfac,
                                                         int yfac,
                                                         ...);

Zoom an image by repeating pixels. This is fast nearest-neighbour zoom.

See also: vips_affine(), vips_subsample().

in :

input image

out :

output image

xfac :

horizontal scale factor

yfac :

vertical scale factor

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_subsample ()

int                 vips_subsample                      (VipsImage *in,
                                                         VipsImage **out,
                                                         int xfac,
                                                         int yfac,
                                                         ...);

Optional arguments:

point: turn on point sample mode

Subsample an image by an integer fraction. This is fast, nearest-neighbour shrink.

For small horizontal shrinks, this operation will fetch lines of pixels from in and then subsample that line. For large shrinks it will fetch single pixels.

If point is set, in will always be sampled in points. This can be faster if the previous operations in the pipeline are very slow.

See also: vips_affine(), vips_shrink(), vips_zoom().

in :

input image

out :

output image

xfac :

horizontal shrink factor

yfac :

vertical shrink factor

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_cast ()

int                 vips_cast                           (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsBandFormat format,
                                                         ...);

Convert in to format. You can convert between any pair of formats. Floats are truncated (not rounded). Out of range values are clipped.

Casting from complex to real returns the real part.

See also: im_scale(), im_ri2c().

in :

input image

out :

output image

format :

format to convert to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_uchar ()

int                 vips_cast_uchar                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_UCHAR. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_char ()

int                 vips_cast_char                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_CHAR. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_ushort ()

int                 vips_cast_ushort                    (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_USHORT. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_short ()

int                 vips_cast_short                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_SHORT. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_uint ()

int                 vips_cast_uint                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_UINT. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_int ()

int                 vips_cast_int                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_INT. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_float ()

int                 vips_cast_float                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_FLOAT. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_double ()

int                 vips_cast_double                    (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_DOUBLE. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_complex ()

int                 vips_cast_complex                   (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_COMPLEX. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cast_dpcomplex ()

int                 vips_cast_dpcomplex                 (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert in to VIPS_FORMAT_DPCOMPLEX. See vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_scale ()

int                 vips_scale                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

log: log scale pixels exp: exponent for log scale

Search the image for the maximum and minimum value, then return the image as unsigned 8-bit, scaled so that the maximum value is 255 and the minimum is zero.

If log is set, transform with log10(1.0 + pow(x, exp)) + .5, then scale so max == 255. By default, exp is 0.25.

See also: vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_msb ()

int                 vips_msb                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

band: msb just this band

Turn any integer image to 8-bit unsigned char by discarding all but the most significant byte. Signed values are converted to unsigned by adding 128.

Use band to make a one-band 8-bit image.

This operator also works for LABQ coding.

See also: vips_scale(), vips_cast().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_bandjoin ()

int                 vips_bandjoin                       (VipsImage **in,
                                                         VipsImage **out,
                                                         int n,
                                                         ...);

Join a set of images together, bandwise.

If the images have n and m bands, then the output image will have n + m bands, with the first n coming from the first image and the last m from the second.

If the images differ in size, the smaller images are enlarged to match the larger by adding zero pixels along the bottom and right.

The input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: vips_insert().

in :

array of input images

out :

output image

n :

number of input images

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_bandjoin2 ()

int                 vips_bandjoin2                      (VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);

Join a pair of images together, bandwise. See vips_bandjoin().

in1 :

first input image

in2 :

second input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_bandrank ()

int                 vips_bandrank                       (VipsImage **in,
                                                         VipsImage **out,
                                                         int n,
                                                         ...);

Optional arguments:

index: pick this index from list of sorted values

Sorts the images in band-element-wise, then outputs an image in which each band element is selected from the sorted list by the index parameter. For example, if index is zero, then each output band element will be the minimum of all the corresponding input band element.

By default, index is -1, meaning pick the median value.

It works for any uncoded, non-complex image type. Images are cast up to the smallest common-format.

Any image can have either 1 band or n bands, where n is the same for all the non-1-band images. Single band images are then effectively copied to make n-band images.

Smaller input images are expanded by adding black pixels.

See also: vips_rank().

in :

array of input images

out :

output image

n :

number of input images

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_bandbool ()

int                 vips_bandbool                       (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationBoolean operation,
                                                         ...);

Perform various boolean operations across the bands of an image. For example, a three-band uchar image operated on with VIPS_OPERATION_BOOLEAN_AND will produce a one-band uchar image where each pixel is the bitwise and of the band elements of the corresponding pixel in the input image.

The output image is the same format as the input image for integer types. Float types are cast to int before processing. Complex types are not supported.

The output image always has one band.

This operation is useful in conjuction with vips_relational(). You can use it to see if all image bands match exactly.

See also: vips_boolean_const().

out :

output VipsImage

operation :

boolean operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_bandand ()

int                 vips_bandand                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_AND on an image. See vips_bandbool().

in :

left-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_bandor ()

int                 vips_bandor                         (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_OR on an image. See vips_bandbool().

in :

left-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_bandeor ()

int                 vips_bandeor                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_EOR on an image. See vips_bandbool().

in :

left-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_bandmean ()

int                 vips_bandmean                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

This operation writes a one-band image where each pixel is the average of the bands for that pixel in the input image. The output band format is the same as the input band format. Integer types use round-to-nearest averaging.

See also: vips_add(), vips_avg(), vips_recomb()

in :

input IMAGE

out :

output IMAGE

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_recomb ()

int                 vips_recomb                         (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *m,
                                                         ...);

This operation recombines an image's bands. Each pixel in in is treated as an n-element vector, where n is the number of bands in in, and multipled by the n x m matrix m to produce the m-band image out.

out is always float, unless in is double, in which case out is double too. No complex images allowed.

It's useful for various sorts of colour space conversions.

See also: vips_bandmean().

in :

input image

out :

output image

m :

recombination matrix

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_ifthenelse ()

int                 vips_ifthenelse                     (VipsImage *cond,
                                                         VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

blend: blend smoothly between in1 and in2

This operation scans the condition image cond and uses it to select pixels from either the then image in1 or the else image in2. Non-zero means in1, 0 means in2.

Any image can have either 1 band or n bands, where n is the same for all the non-1-band images. Single band images are then effectively copied to make n-band images.

Images in1 and in2 are cast up to the smallest common format. cond is cast to uchar.

If the images differ in size, the smaller images are enlarged to match the largest by adding zero pixels along the bottom and right.

If blend is TRUE, then values in out are smoothly blended between in1 and in2 using the formula:

out = (cond / 255) * in1 + (1 - cond / 255) * in2

See also: vips_equal().

cond :

condition VipsImage

in1 :

then VipsImage

in2 :

else VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_flatten ()

int                 vips_flatten                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

background: colour for new pixels

Take the last band of in as an alpha and use it to blend the remaining channels with background.

The alpha channel is 0 - 255 for integer images and 0 - 1 for float images, where 255 means 100% image and 0 means 100% background. Non-complex images only. background defaults to zero (black).

Useful for flattening PNG images to RGB.

See also: pngload().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_falsecolour ()

int                 vips_falsecolour                    (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Force in to 1 band, 8-bit, then transform to a 3-band 8-bit image with a false colour map. The map is supposed to make small differences in brightness more obvious.

See also: vips_maplut().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_gamma ()

int                 vips_gamma                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

exponent: gamma, default 1.0 / 2.4

Calculate in ** (1 / exponent), normalising to the maximum range of the input type. For float types use 1.0 as the maximum.

See also: vips_identity(), vips_pow_const1(), vips_maplut()

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

im_insertset ()

int                 im_insertset                        (VipsImage *main,
                                                         VipsImage *sub,
                                                         VipsImage *out,
                                                         int n,
                                                         int *x,
                                                         int *y);

Insert sub repeatedly into main at the positions listed in the arrays x, y of length n. out is the same size as main. sub is clipped against the edges of main.

This operation is fast for large n, but will use a memory buffer the size of out. It's useful for things like making scatter plots.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: im_insert(), im_lrjoin().

main :

big image

sub :

small image

out :

output image

n :

number of positions

x :

left positions of sub

y :

top positions of sub

Returns :

0 on success, -1 on error

See Also

resample
vips-7.38.5/doc/reference/html/libvips-convolution.html0000644000175000017500000005652512303146332020114 00000000000000 convolution

convolution

convolution — convolve and correlate images

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

enum                VipsPrecision;
enum                VipsCombine;
int                 vips_conv                           (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *mask,
                                                         ...);
int                 vips_compass                        (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *mask,
                                                         ...);
int                 vips_convsep                        (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *mask,
                                                         ...);
int                 vips_sharpen                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_gaussblur                      (VipsImage *in,
                                                         VipsImage **out,
                                                         int radius,
                                                         ...);

Description

These operations convolve an image in some way, or are operations based on simple convolution, or are useful with convolution.

Details

enum VipsPrecision

typedef enum {
	VIPS_PRECISION_INTEGER,
	VIPS_PRECISION_FLOAT,
	VIPS_PRECISION_APPROXIMATE,
	VIPS_PRECISION_LAST
} VipsPrecision;

How accurate an operation should be.

VIPS_PRECISION_INTEGER

int everywhere

VIPS_PRECISION_FLOAT

float everywhere

VIPS_PRECISION_APPROXIMATE

approximate integer output

VIPS_PRECISION_LAST


enum VipsCombine

typedef enum {
	VIPS_COMBINE_MAX,
	VIPS_COMBINE_SUM,
	VIPS_COMBINE_LAST
} VipsCombine;

VIPS_COMBINE_MAX

VIPS_COMBINE_SUM

VIPS_COMBINE_LAST


vips_conv ()

int                 vips_conv                           (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *mask,
                                                         ...);

Optional arguments:

precision: calculation accuracy layers: number of layers for approximation cluster: cluster lines closer than this distance

Convolution.

Perform a convolution of in with mask. Each output pixel is calculated as sigma[i]{pixel[i] * mask[i]} / scale + offset, where scale and offset are part of mask.

If precision is VIPS_PRECISION_INTEGER then the convolution is performed with integer arithmetic and the output image always has the same VipsBandFmt as the input image.

Convolutions on unsigned 8-bit images are calculated with the processor's vector unit, if possible. Disable this with --vips-novector or IM_NOVECTOR.

If precision is VIPS_PRECISION_FLOAT then the convolution is performed with floating-point arithmetic. The output image is always VIPS_FORMAT_FLOAT unless in is VIPS_FORMAT_DOUBLE, in which case out is also VIPS_FORMAT_DOUBLE.

If precision is VIPS_PRECISION_APPROXIMATE then the output image always has the same VipsBandFmt as the input image.

Larger values for layers give more accurate results, but are slower. As layers approaches the mask radius, the accuracy will become close to exact convolution and the speed will drop to match. For many large masks, such as Gaussian, n_layers need be only 10% of this value and accuracy will still be good.

Smaller values of cluster will give more accurate results, but be slower and use more memory. 10% of the mask radius is a good rule of thumb.

in :

input image

out :

output image

mask :

convolve with this mask

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_compass ()

int                 vips_compass                        (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *mask,
                                                         ...);


vips_convsep ()

int                 vips_convsep                        (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *mask,
                                                         ...);

Optional arguments:

precision: calculation accuracy layers: number of layers for approximation cluster: cluster lines closer than this distance

Perform a separable convolution of in with mask. See vips_conv() for a detailed description.

The mask must be 1xn or nx1 elements.

The image is convolved twice: once with mask and then again with mask rotated by 90 degrees. This is much faster for certain types of mask (gaussian blur, for example) than doing a full 2D convolution.

See also: vips_conv(), vips_gaussmat().

in :

input image

out :

output image

mask :

convolution mask

Returns :

0 on success, -1 on error

vips_sharpen ()

int                 vips_sharpen                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

radius: how large a mask to use x1: flat/jaggy threshold y2: maximum amount of brightening y3: maximum amount of darkening m1: slope for flat areas m2: slope for jaggy areas

Selectively sharpen the L channel of a LAB image. The input image is transformed to VIPS_INTERPRETATION_LABS.

The operation performs a gaussian blur of radius radius and subtracts from in to generate a high-frequency signal. This signal is passed through a lookup table formed from the five parameters and added back to in.

The lookup table is formed like this:

                      ^
                   y2 |- - - - - -----------
                      |         / 
                      |        / slope m2
                      |    .../    
              -x1     | ...   |    
  -------------------...---------------------->
              |   ... |      x1           
              |... slope m1
              /       |
             / m2     |
            /         |
           /          |
          /           |
         /            |
  ______/ _ _ _ _ _ _ | -y3
                      |

For printing, we recommend the following settings (the defaults):

   radius == 3
   x1 == 1.5
   y2 == 20         (don't brighten by more than 20 L*)
   y3 == 50         (can darken by up to 50 L*)

   m1 == 1          (some sharpening in flat areas)
   m2 == 2          (more sharpening in jaggy areas)

If you want more or less sharpening, we suggest you just change the m1 and m2 parameters.

The radius parameter changes the width of the fringe and can be adjusted according to the output printing resolution. As an approximate guideline, use 1 for 4 pixels/mm (CRT display resolution), 2 for 8 pixels/mm, 3 for 12 pixels/mm and 4 for 16 pixels/mm (300 dpi == 12 pixels/mm). These figures refer to the image raster, not the half-tone resolution.

See also: im_conv().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_gaussblur ()

int                 vips_gaussblur                      (VipsImage *in,
                                                         VipsImage **out,
                                                         int radius,
                                                         ...);

Optional arguments:

precision: VipsPrecision for blur

This operator runs vips_gaussmat() and vips_convsep() for you on an image.

radius is not used directly. Instead the standard deviation of vips_gaussmat() is set to radius / 2 and the minimum amplitude set to 20%. This gives a mask radius of approximately radius pixels.

See also: vips_gaussmat(), vips_conv().

in :

input image

out :

output image

radius :

how large a mask to use

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.
vips-7.38.5/doc/reference/html/VipsThreadState.html0000644000175000017500000007077512303146332017144 00000000000000 VipsThreadState

VipsThreadState

VipsThreadState — pools of worker threads

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

                    VipsThreadState;
                    VipsThreadStateClass;
void *              vips_thread_state_set               (VipsObject *object,
                                                         void *a,
                                                         void *b);
VipsThreadState *   vips_thread_state_new               (VipsImage *im,
                                                         void *a);
VipsThreadState *   (*VipsThreadStartFn)                (VipsImage *im,
                                                         void *a);
int                 (*VipsThreadpoolAllocateFn)         (VipsThreadState *state,
                                                         void *a,
                                                         gboolean *stop);
int                 (*VipsThreadpoolWorkFn)             (VipsThreadState *state,
                                                         void *a);
int                 (*VipsThreadpoolProgressFn)         (void *a);
int                 vips_threadpool_run                 (VipsImage *im,
                                                         VipsThreadStartFn start,
                                                         VipsThreadpoolAllocateFn allocate,
                                                         VipsThreadpoolWorkFn work,
                                                         VipsThreadpoolProgressFn progress,
                                                         void *a);
void                vips_get_tile_size                  (VipsImage *im,
                                                         int *tile_width,
                                                         int *tile_height,
                                                         int *nlines);
void                vips__print_renders                 (void);
void                vips_concurrency_set                (int concurrency);
int                 vips_concurrency_get                (void);

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsThreadState

Description

vips_threadpool_run() loops a set of threads over an image. Threads take it in turns to allocate units of work (a unit might be a tile in an image), then run in parallel to process those units. An optional progress function can be used to give feedback.

Details

VipsThreadState

typedef struct {
	/* Image we run on.
	 */
	VipsImage *im;

	/* This region is created and destroyed by the threadpool for the
	 * use of the worker. 
	 */
	VipsRegion *reg;		

	/* Neither used nor set, do what you like with them.
	 */
	VipsRect pos;
	int x, y;

	/* Set in work to get the allocate to signal stop.
	 */
	gboolean stop;

	/* The client data passed to the enclosing vips_threadpool_run().
	 */
        void *a;
} VipsThreadState;

These per-thread values are carried around for your use by vips_threadpool_run(). They are private to each thread, so they are a useful place for VipsThreadpoolAllocate and VipsThreadpoolWork to communicate.

reg is created for you at the start of processing and freed at the end, but you can do what you like with it.

VipsImage *im;

the VipsImage being operated upon

VipsRegion *reg;

a REGION

VipsRect pos;

a Rect

int x;

an int

int y;

an int

gboolean stop;

void *a;

client data

VipsThreadStateClass

typedef struct {
	VipsObjectClass parent_class;
} VipsThreadStateClass;


vips_thread_state_set ()

void *              vips_thread_state_set               (VipsObject *object,
                                                         void *a,
                                                         void *b);


vips_thread_state_new ()

VipsThreadState *   vips_thread_state_new               (VipsImage *im,
                                                         void *a);


VipsThreadStartFn ()

VipsThreadState *   (*VipsThreadStartFn)                (VipsImage *im,
                                                         void *a);


VipsThreadpoolAllocateFn ()

int                 (*VipsThreadpoolAllocateFn)         (VipsThreadState *state,
                                                         void *a,
                                                         gboolean *stop);

This function is called to allocate a new work unit for the thread. It is always single-threaded, so it can modify per-pool state (such as a counter).

a, b, c are the values supplied to the call to vips_threadpool_run().

It should set stop to TRUE to indicate that no work could be allocated because the job is done.

See also: vips_threadpool_run().

state :

per-thread state

a :

client data

stop :

set this to signal end of computation

Returns :

0 on success, or -1 on error

VipsThreadpoolWorkFn ()

int                 (*VipsThreadpoolWorkFn)             (VipsThreadState *state,
                                                         void *a);

This function is called to process a work unit. Many copies of this can run at once, so it should not write to the per-pool state. It can write to per-thread state.

a, b, c are the values supplied to the call to vips_threadpool_run().

See also: vips_threadpool_run().

state :

per-thread state

a :

client data

Returns :

0 on success, or -1 on error

VipsThreadpoolProgressFn ()

int                 (*VipsThreadpoolProgressFn)         (void *a);

This function is called by the main thread once for every work unit processed. It can be used to give the user progress feedback.

See also: vips_threadpool_run().

a :

client data

Returns :

0 on success, or -1 on error

vips_threadpool_run ()

int                 vips_threadpool_run                 (VipsImage *im,
                                                         VipsThreadStartFn start,
                                                         VipsThreadpoolAllocateFn allocate,
                                                         VipsThreadpoolWorkFn work,
                                                         VipsThreadpoolProgressFn progress,
                                                         void *a);

This function runs a set of threads over an image. Each thread first calls start to create new per-thread state, then runs allocate to set up a new work unit (perhaps the next tile in an image, for example), then work to process that work unit. After each unit is processed, progress is called, so that the operation can give progress feedback. progress may be NULL.

The object returned by start must be an instance of a subclass of VipsThreadState. Use this to communicate between allocate and work.

allocate and start are always single-threaded (so they can write to the per-pool state), whereas work can be executed concurrently. progress is always called by the main thread (ie. the thread which called vips_threadpool_run()).

See also: vips_concurrency_set().

im :

image to loop over

start :

allocate per-thread state

allocate :

allocate a work unit

work :

process a work unit

progress :

give progress feedback about a work unit, or NULL

a :

client data

Returns :

0 on success, or -1 on error.

vips_get_tile_size ()

void                vips_get_tile_size                  (VipsImage *im,
                                                         int *tile_width,
                                                         int *tile_height,
                                                         int *nlines);

Pick a tile size and a buffer height for this image and the current value of vips_concurrency_get(). The buffer height will always be a multiple of tile_height.

im :

image to guess for

tile_width :

return selected tile width

tile_height :

return selected tile height

nlines :

return buffer height in scanlines

vips__print_renders ()

void                vips__print_renders                 (void);


vips_concurrency_set ()

void                vips_concurrency_set                (int concurrency);

Sets the number of worker threads that vips should use when running a VipsThreadPool.

The special value 0 means "default". In this case, the number of threads is set by the environmnt variable IM_CONCURRENCY, or if that is not set, the number of threads availble on the hist machine.

See also: vips_concurrency_get().

concurrency :

number of threads to run

vips_concurrency_get ()

int                 vips_concurrency_get                (void);

Returns the number of worker threads that vips should use when running a VipsThreadPool.

vips gets this values from these sources in turn:

If vips_concurrency_set() has been called, this value is used. The special value 0 means "default". You can also use the command-line argument "--vips-concurrency" to set this value.

If vips_concurrency_set() has not been called and no command-line argument was used, vips uses the value of the environment variable IM_CONCURRENCY,

If IM_CONCURRENCY has not been set, vips find the number of hardware threads that the host machine can run in parallel and uses that value.

The final value is clipped to the range 1 - 1024.

See also: vips_concurrency_get().

Returns :

number of worker threads to use.

See Also

generate
vips-7.38.5/doc/reference/html/libvips-header.html0000644000175000017500000023120112303146332016747 00000000000000 header

header

header — get, set and walk image headers

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

#define             VIPS_META_EXIF_NAME
#define             VIPS_META_XMP_NAME
#define             VIPS_META_IPCT_NAME
#define             VIPS_META_ICC_NAME
#define             VIPS_META_XML
#define             VIPS_META_RESOLUTION_UNIT
#define             VIPS_META_LOADER
guint64             vips_format_sizeof                  (VipsBandFormat format);
int                 vips_image_get_width                (const VipsImage *image);
int                 vips_image_get_height               (const VipsImage *image);
int                 vips_image_get_bands                (const VipsImage *image);
VipsBandFormat      vips_image_get_format               (const VipsImage *image);
VipsCoding          vips_image_get_coding               (const VipsImage *image);
VipsInterpretation  vips_image_get_interpretation       (const VipsImage *image);
VipsInterpretation  vips_image_guess_interpretation     (const VipsImage *image);
double              vips_image_get_xres                 (const VipsImage *image);
double              vips_image_get_yres                 (const VipsImage *image);
int                 vips_image_get_xoffset              (const VipsImage *image);
int                 vips_image_get_yoffset              (const VipsImage *image);
const char *        vips_image_get_filename             (const VipsImage *image);
const char *        vips_image_get_mode                 (const VipsImage *image);
double              vips_image_get_scale                (const VipsImage *array);
double              vips_image_get_offset               (const VipsImage *array);
void *              vips_image_get_data                 (VipsImage *image);
void                vips_image_init_fields              (VipsImage *image,
                                                         int xsize,
                                                         int ysize,
                                                         int bands,
                                                         VipsBandFormat format,
                                                         VipsCoding coding,
                                                         VipsInterpretation interpretation,
                                                         double xres,
                                                         double yres);
void                vips_image_set                      (VipsImage *image,
                                                         const char *field,
                                                         GValue *value);
int                 vips_image_get                      (const VipsImage *image,
                                                         const char *field,
                                                         GValue *value_copy);
int                 vips_image_get_as_string            (const VipsImage *image,
                                                         const char *field,
                                                         char **out);
GType               vips_image_get_typeof               (const VipsImage *image,
                                                         const char *field);
gboolean            vips_image_remove                   (VipsImage *image,
                                                         const char *field);
void *              (*VipsImageMapFn)                   (VipsImage *image,
                                                         const char *field,
                                                         GValue *value,
                                                         void *a);
void *              vips_image_map                      (VipsImage *image,
                                                         VipsImageMapFn fn,
                                                         void *a);
void                vips_image_set_area                 (VipsImage *image,
                                                         const char *field,
                                                         VipsCallbackFn free_fn,
                                                         void *data);
int                 vips_image_get_area                 (const VipsImage *image,
                                                         const char *field,
                                                         void **data);
void                vips_image_set_blob                 (VipsImage *image,
                                                         const char *field,
                                                         VipsCallbackFn free_fn,
                                                         void *data,
                                                         size_t length);
int                 vips_image_get_blob                 (const VipsImage *image,
                                                         const char *field,
                                                         void **data,
                                                         size_t *length);
int                 vips_image_get_int                  (const VipsImage *image,
                                                         const char *field,
                                                         int *out);
void                vips_image_set_int                  (VipsImage *image,
                                                         const char *field,
                                                         int i);
int                 vips_image_get_double               (const VipsImage *image,
                                                         const char *field,
                                                         double *out);
void                vips_image_set_double               (VipsImage *image,
                                                         const char *field,
                                                         double d);
int                 vips_image_get_string               (const VipsImage *image,
                                                         const char *field,
                                                         const char **out);
void                vips_image_set_string               (VipsImage *image,
                                                         const char *field,
                                                         const char *str);
int                 vips_image_history_printf           (VipsImage *image,
                                                         const char *format,
                                                         ...);
int                 vips_image_history_args             (VipsImage *image,
                                                         const char *name,
                                                         int argc,
                                                         char *argv[]);
const char *        vips_image_get_history              (VipsImage *image);

Description

These functions let you get at image header data (including metadata) in a uniform way. They are handy for language bindings but less useful for C users.

They first search the VIPS header fields (see image), then search for a metadata field of that name (see meta). Use vips_image_get_typeof() to test for the existance and GType of a header field.

See meta for a set of functions for adding new metadata to an image.

Details

VIPS_META_EXIF_NAME

#define VIPS_META_EXIF_NAME "exif-data"

The name that JPEG read and write operations use for the image's EXIF data.


VIPS_META_XMP_NAME

#define VIPS_META_XMP_NAME "xmp-data"

The name that JPEG read and write operations use for the image's XMP data.


VIPS_META_IPCT_NAME

#define VIPS_META_IPCT_NAME "ipct-data"

The name that JPEG read and write operations use for the image's IPCT data.


VIPS_META_ICC_NAME

#define VIPS_META_ICC_NAME "icc-profile-data"

The name we use to attach an ICC profile. The file read and write operations for TIFF, JPEG, PNG and others use this item of metadata to attach and save ICC profiles. The profile is updated by the vips_icc_transform() operations.


VIPS_META_XML

#define VIPS_META_XML "xml-header"

The original XML that was used to code the metadata after reading a VIPS format file.


VIPS_META_RESOLUTION_UNIT

#define VIPS_META_RESOLUTION_UNIT "resolution-unit"

The JPEG and TIFF read and write operations use this to record the file's preferred unit for resolution.


VIPS_META_LOADER

#define VIPS_META_LOADER "vips-loader"

Record the name of the original loader here. Handy for hinting file formats and for debugging.


vips_format_sizeof ()

guint64             vips_format_sizeof                  (VipsBandFormat format);


vips_image_get_width ()

int                 vips_image_get_width                (const VipsImage *image);


vips_image_get_height ()

int                 vips_image_get_height               (const VipsImage *image);


vips_image_get_bands ()

int                 vips_image_get_bands                (const VipsImage *image);


vips_image_get_format ()

VipsBandFormat      vips_image_get_format               (const VipsImage *image);


vips_image_get_coding ()

VipsCoding          vips_image_get_coding               (const VipsImage *image);


vips_image_get_interpretation ()

VipsInterpretation  vips_image_get_interpretation       (const VipsImage *image);


vips_image_guess_interpretation ()

VipsInterpretation  vips_image_guess_interpretation     (const VipsImage *image);


vips_image_get_xres ()

double              vips_image_get_xres                 (const VipsImage *image);


vips_image_get_yres ()

double              vips_image_get_yres                 (const VipsImage *image);


vips_image_get_xoffset ()

int                 vips_image_get_xoffset              (const VipsImage *image);


vips_image_get_yoffset ()

int                 vips_image_get_yoffset              (const VipsImage *image);


vips_image_get_filename ()

const char *        vips_image_get_filename             (const VipsImage *image);


vips_image_get_mode ()

const char *        vips_image_get_mode                 (const VipsImage *image);


vips_image_get_scale ()

double              vips_image_get_scale                (const VipsImage *array);


vips_image_get_offset ()

double              vips_image_get_offset               (const VipsImage *array);


vips_image_get_data ()

void *              vips_image_get_data                 (VipsImage *image);

Return a pointer to the image's pixel data, if possible. This can involve allocating large amounts of memory and performing a long computation. Image pixels are laid out in band-packed rows.

See also: vips_image_wio_input().

image :

image to get data for

Returns :

a pointer to pixel data, if possible.

vips_image_init_fields ()

void                vips_image_init_fields              (VipsImage *image,
                                                         int xsize,
                                                         int ysize,
                                                         int bands,
                                                         VipsBandFormat format,
                                                         VipsCoding coding,
                                                         VipsInterpretation interpretation,
                                                         double xres,
                                                         double yres);

A convenience function to set the header fields after creating an image. Normally you copy the fields from your input images with vips_image_pipelinev() and then make any adjustments you need, but if you are creating an image from scratch, for example im_black() or im_jpeg2vips(), you do need to set all the fields yourself.

See also: vips_image_pipelinev().

image :

image to init

xsize :

image width

ysize :

image height

bands :

image bands

format :

band format

coding :

image coding

interpretation :

image type

xres :

horizontal resolution, pixels per millimetre

yres :

vertical resolution, pixels per millimetre

vips_image_set ()

void                vips_image_set                      (VipsImage *image,
                                                         const char *field,
                                                         GValue *value);

Set a piece of metadata on image. Any old metadata with that name is destroyed. The GValue is copied into the image, so you need to unset the value when you're done with it.

For example, to set an integer on an image (though you would use the convenience function vips_image_set_int() in practice), you would need:

GValue value = { 0 };

g_value_init( &value, G_TYPE_INT );
g_value_set_int( &value, 42 );
vips_image_set( image, field, &value );
g_value_unset( &value );

return( 0 );

See also: vips_image_get().

image :

image to set the metadata on

field :

the name to give the metadata

value :

the GValue to copy into the image

vips_image_get ()

int                 vips_image_get                      (const VipsImage *image,
                                                         const char *field,
                                                         GValue *value_copy);

Fill value_copy with a copy of the header field. value_copy must be zeroed but uninitialised.

This will return -1 and add a message to the error buffer if the field does not exist. Use vips_image_get_typeof() to test for the existence of a field first if you are not certain it will be there.

For example, to read a double from an image (though of course you would use vips_image_get_double() in practice):

GValue value = { 0 };
double d;

if( vips_image_get( image, field, &value ) )
  return( -1 );

if( G_VALUE_TYPE( &value ) != G_TYPE_DOUBLE ) {
  vips_error( "mydomain", 
    _( "field \"%s\" is of type %s, not double" ),
    field, 
    g_type_name( G_VALUE_TYPE( &value ) ) );
  g_value_unset( &value );
  return( -1 );
}

d = g_value_get_double( &value );
g_value_unset( &value );

return( 0 );

See also: vips_image_get_typeof(), vips_image_get_double().

image :

image to get the field from from

field :

the name to give the metadata

value_copy :

the GValue is copied into this

Returns :

0 on success, -1 otherwise.

vips_image_get_as_string ()

int                 vips_image_get_as_string            (const VipsImage *image,
                                                         const char *field,
                                                         char **out);

Gets out from im under the name field. This function will read any field, returning it as a printable string. You need to free the string with g_free() when you are done with it.

See also: vips_image_get(), vips_image_get_typeof().

image :

image to get the header field from

field :

field name

out :

return field value as string

Returns :

0 on success, -1 otherwise.

vips_image_get_typeof ()

GType               vips_image_get_typeof               (const VipsImage *image,
                                                         const char *field);

Read the GType for a header field. Returns zero if there is no field of that name.

See also: vips_image_get().

image :

image to test

field :

the name to search for

Returns :

the GType of the field, or zero if there is no field of that name.

vips_image_remove ()

gboolean            vips_image_remove                   (VipsImage *image,
                                                         const char *field);

Find and remove an item of metadata. Return FALSE if no metadata of that name was found.

See also: vips_image_set(), vips_image_get_typeof().

image :

image to test

field :

the name to search for

Returns :

TRUE if an item of metadata of that name was found and removed

VipsImageMapFn ()

void *              (*VipsImageMapFn)                   (VipsImage *image,
                                                         const char *field,
                                                         GValue *value,
                                                         void *a);


vips_image_map ()

void *              vips_image_map                      (VipsImage *image,
                                                         VipsImageMapFn fn,
                                                         void *a);

This function calls fn for every header field, including every item of metadata.

Like all _map functions, the user function should return NULL to continue iteration, or a non-NULL pointer to indicate early termination.

See also: vips_image_get_typeof(), vips_image_get().

image :

image to map over

fn :

function to call for each header field

a :

user data for function

Returns :

NULL on success, the failing pointer otherwise.

vips_image_set_area ()

void                vips_image_set_area                 (VipsImage *image,
                                                         const char *field,
                                                         VipsCallbackFn free_fn,
                                                         void *data);

Attaches data as a metadata item on image under the name field. When VIPS no longer needs the metadata, it will be freed with free_fn.

See also: vips_image_get_double(), vips_image_set()

image :

image to attach the metadata to

field :

metadata name

free_fn :

free function for data. [scope async]

data :

pointer to area of memory

vips_image_get_area ()

int                 vips_image_get_area                 (const VipsImage *image,
                                                         const char *field,
                                                         void **data);

Gets data from image under the name field. A convenience function over vips_image_get(). Use vips_image_get_typeof() to test for the existance of a piece of metadata.

See also: vips_image_set_area(), vips_image_get(), vips_image_get_typeof()

image :

image to get the metadata from

field :

metadata name

data :

return metadata value

Returns :

0 on success, -1 otherwise.

vips_image_set_blob ()

void                vips_image_set_blob                 (VipsImage *image,
                                                         const char *field,
                                                         VipsCallbackFn free_fn,
                                                         void *data,
                                                         size_t length);

Attaches blob as a metadata item on image under the name field. A convenience function over vips_image_set() using an vips_blob.

See also: vips_image_get_blob(), vips_image_set().

image :

image to attach the metadata to

field :

metadata name

free_fn :

free function for data. [scope async]

data :

pointer to area of memory

length :

length of memory area

vips_image_get_blob ()

int                 vips_image_get_blob                 (const VipsImage *image,
                                                         const char *field,
                                                         void **data,
                                                         size_t *length);

Gets blob from image under the name field, optionally return its length in length. A convenience function over vips_image_get(). Use vips_image_get_typeof() to test for the existance of a piece of metadata.

See also: vips_image_get(), vips_image_get_typeof(), vips_blob_get(),

image :

image to get the metadata from

field :

metadata name

data :

pointer to area of memory

length :

return the blob length here, optionally

Returns :

0 on success, -1 otherwise.

vips_image_get_int ()

int                 vips_image_get_int                  (const VipsImage *image,
                                                         const char *field,
                                                         int *out);

Gets out from im under the name field. This function searches for int-valued fields.

See also: vips_image_get(), vips_image_get_typeof()

image :

image to get the header field from

field :

field name

out :

return field value

Returns :

0 on success, -1 otherwise.

vips_image_set_int ()

void                vips_image_set_int                  (VipsImage *image,
                                                         const char *field,
                                                         int i);

Attaches i as a metadata item on image under the name field. A convenience function over vips_image_set().

See also: vips_image_get_int(), vips_image_set()

image :

image to attach the metadata to

field :

metadata name

i :

metadata value

vips_image_get_double ()

int                 vips_image_get_double               (const VipsImage *image,
                                                         const char *field,
                                                         double *out);

Gets out from im under the name field. This function searches for double-valued fields.

See also: vips_image_get(), vips_image_get_typeof()

image :

image to get the header field from

field :

field name

out :

return field value

Returns :

0 on success, -1 otherwise.

vips_image_set_double ()

void                vips_image_set_double               (VipsImage *image,
                                                         const char *field,
                                                         double d);

Attaches d as a metadata item on image under the name field. A convenience function over vips_image_set().

See also: vips_image_get_double(), vips_image_set()

image :

image to attach the metadata to

field :

metadata name

d :

metadata value

vips_image_get_string ()

int                 vips_image_get_string               (const VipsImage *image,
                                                         const char *field,
                                                         const char **out);

Gets out from im under the name field. This function searches for string-valued fields.

Do not free out.

See also: vips_image_get(), vips_image_get_typeof()

image :

image to get the header field from

field :

field name

out :

return field value

Returns :

0 on success, -1 otherwise.

vips_image_set_string ()

void                vips_image_set_string               (VipsImage *image,
                                                         const char *field,
                                                         const char *str);

Attaches str as a metadata item on image under the name field. A convenience function over vips_image_set() using an vips_ref_string.

See also: vips_image_get_double(), vips_image_set(), vips_ref_string

image :

image to attach the metadata to

field :

metadata name

str :

metadata value

vips_image_history_printf ()

int                 vips_image_history_printf           (VipsImage *image,
                                                         const char *format,
                                                         ...);

Add a line to the image history. The format and arguments are expanded, the date and time is appended prefixed with a hash character, and the whole string is appended to the image history and terminated with a newline.

For example:

vips_image_history_printf( image, "vips im_invert %s %s", 
  in->filename, out->filename );

Might add the string

"vips im_invert /home/john/fred.v /home/john/jim.v # Fri Apr  3 23:30:35
2009\n"

VIPS operations don't add history lines for you because a single action at the application level might involve many VIPS operations. History must be recorded by the application.

image :

add history line to this image

format :

printf() format string

Returns :

0 on success, -1 on error.

vips_image_history_args ()

int                 vips_image_history_args             (VipsImage *image,
                                                         const char *name,
                                                         int argc,
                                                         char *argv[]);

Formats the name/argv as a single string and calls vips_image_history_printf(). A convenience function for command-line prorams.

See also: vips_image_get_history().

image :

image to attach history line to

name :

program name

argc :

number of program arguments

argv :

program arguments

Returns :

0 on success, -1 on error.

vips_image_get_history ()

const char *        vips_image_get_history              (VipsImage *image);

This function reads the image history as a C string. The string is owned by VIPS and must not be freed.

VIPS tracks the history of each image, that is, the sequence of operations that generated that image. Applications built on VIPS need to call vips_image_history_printf() for each action they perform, setting the command-line equivalent for the action.

See also: vips_image_history_printf().

image :

get history from here

Returns :

The history of image as a C string. Do not free!

See Also

meta, check
vips-7.38.5/doc/reference/html/annotation-glossary.html0000644000175000017500000000657312303146332020100 00000000000000 Annotation Glossary

Annotation Glossary

O

out

Parameter for returning results. Default is transfer full.

A

array

Parameter points to an array of items.

allow-none

NULL is ok, both for passing and for returning.

S

scope async

The callback is valid until first called.

T

transfer full

Free data after the code is done.

S

scope call

The callback is valid only during the call to the method.

T

transfer none

Don't free data after the code is done.

vips-7.38.5/doc/reference/html/index.sgml0000644000175000017500000033627412303146331015175 00000000000000 vips-7.38.5/doc/reference/html/libvips.devhelp20000644000175000017500000034411012303146331016271 00000000000000 vips-7.38.5/doc/reference/html/libvips-rect.html0000644000175000017500000005273412303146332016470 00000000000000 rect

rect

rect — the VIPS rectangle class

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

                    VipsRect;
#define             VIPS_RECT_RIGHT                     (R)
#define             VIPS_RECT_BOTTOM                    (R)
#define             VIPS_RECT_HCENTRE                   (R)
#define             VIPS_RECT_VCENTRE                   (R)
gboolean            vips_rect_isempty                   (const VipsRect *r);
gboolean            vips_rect_includespoint             (const VipsRect *r,
                                                         int x,
                                                         int y);
gboolean            vips_rect_includesrect              (const VipsRect *r1,
                                                         const VipsRect *r2);
gboolean            vips_rect_equalsrect                (const VipsRect *r1,
                                                         const VipsRect *r2);
void                vips_rect_marginadjust              (VipsRect *r,
                                                         int n);
void                vips_rect_intersectrect             (const VipsRect *r1,
                                                         const VipsRect *r2,
                                                         VipsRect *out);
void                vips_rect_unionrect                 (const VipsRect *r1,
                                                         const VipsRect *r2,
                                                         VipsRect *out);
VipsRect *          vips_rect_dup                       (const VipsRect *r);
void                vips_rect_normalise                 (VipsRect *r);

Description

The VipsRect class and associated types and macros.

Details

VipsRect

typedef struct {
	int left;
	int top;
	int width;
	int height;
} VipsRect;

A VipsRect is a rectangular area of pixels. This is a struct for performing simple rectangle algebra.

int left;

left edge of rectangle

int top;

top edge of rectangle

int width;

width of rectangle

int height;

height of rectangle

VIPS_RECT_RIGHT()

#define VIPS_RECT_RIGHT(R) ((R)->left + (R)->width)


VIPS_RECT_BOTTOM()

#define VIPS_RECT_BOTTOM(R) ((R)->top + (R)->height)


VIPS_RECT_HCENTRE()

#define VIPS_RECT_HCENTRE(R) ((R)->left + (R)->width / 2)


VIPS_RECT_VCENTRE()

#define VIPS_RECT_VCENTRE(R) ((R)->top + (R)->height / 2)


vips_rect_isempty ()

gboolean            vips_rect_isempty                   (const VipsRect *r);

Is r empty? ie. zero width or height.

r :

rectangle to test

Returns :

TRUE if r contains no pixels.

vips_rect_includespoint ()

gboolean            vips_rect_includespoint             (const VipsRect *r,
                                                         int x,
                                                         int y);

Does r contain point (x, y)?

r :

rectangle to test

x :

position to test for

y :

position to test for

Returns :

TRUE if r contains (x, y).

vips_rect_includesrect ()

gboolean            vips_rect_includesrect              (const VipsRect *r1,
                                                         const VipsRect *r2);

Is r2 a subset of r1?

r1 :

outer rectangle

r2 :

inner rectangle

Returns :

TRUE if r2 is a subset of r1.

vips_rect_equalsrect ()

gboolean            vips_rect_equalsrect                (const VipsRect *r1,
                                                         const VipsRect *r2);

Is r1 equal to r2?

r1 :

first rectangle

r2 :

second rectangle

Returns :

TRUE if r1 is equal to r2.

vips_rect_marginadjust ()

void                vips_rect_marginadjust              (VipsRect *r,
                                                         int n);

Enlarge r by n. +1 means out one pixel.

r :

rectangle to adjust

n :

enlarge by

vips_rect_intersectrect ()

void                vips_rect_intersectrect             (const VipsRect *r1,
                                                         const VipsRect *r2,
                                                         VipsRect *out);

Fill out with the intersection of r1 and r2. out can equal r1 or r2.

r1 :

input rectangle 1

r2 :

input rectangle 2

out :

output rectangle

vips_rect_unionrect ()

void                vips_rect_unionrect                 (const VipsRect *r1,
                                                         const VipsRect *r2,
                                                         VipsRect *out);

Fill out with the bounding box of r1 and r2. out can equal r1 or r2.

r1 :

input rectangle 1

r2 :

input rectangle 2

out :

output rectangle

vips_rect_dup ()

VipsRect *          vips_rect_dup                       (const VipsRect *r);

Duplicate a rect to the heap. You need to free the result with vips_free().

r :

rectangle to duplicate

Returns :

a pointer to copy of r allocated on the heap.

vips_rect_normalise ()

void                vips_rect_normalise                 (VipsRect *r);

Make sure width and height are >0 by moving the origin and flipping the rect.

r :

rect to normalise

See Also

region
vips-7.38.5/doc/reference/html/libvips-error.html0000644000175000017500000026736612303146332016675 00000000000000 error

error

error — error messages and error handling

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

const char *        vips_error_buffer                   (void);
void                vips_error_clear                    (void);
void                vips_error_freeze                   (void);
void                vips_error_thaw                     (void);
void                vips_error                          (const char *domain,
                                                         const char *fmt,
                                                         ...);
void                vips_verror                         (const char *domain,
                                                         const char *fmt,
                                                         va_list ap);
void                vips_error_system                   (int err,
                                                         const char *domain,
                                                         const char *fmt,
                                                         ...);
void                vips_verror_system                  (int err,
                                                         const char *domain,
                                                         const char *fmt,
                                                         va_list ap);
void                vips_error_g                        (GError **error);
void                vips_warn                           (const char *domain,
                                                         const char *fmt,
                                                         ...);
void                vips_vwarn                          (const char *domain,
                                                         const char *fmt,
                                                         va_list ap);
void                vips_info                           (const char *domain,
                                                         const char *fmt,
                                                         ...);
void                vips_vinfo                          (const char *domain,
                                                         const char *fmt,
                                                         va_list ap);
void                vips_error_exit                     (const char *fmt,
                                                         ...);
int                 vips_check_uncoded                  (const char *domain,
                                                         VipsImage *im);
int                 vips_check_coding                   (const char *domain,
                                                         VipsImage *im,
                                                         VipsCoding coding);
int                 vips_check_coding_known             (const char *domain,
                                                         VipsImage *im);
int                 vips_check_coding_noneorlabq        (const char *domain,
                                                         VipsImage *im);
int                 vips_check_coding_same              (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);
int                 vips_check_mono                     (const char *domain,
                                                         VipsImage *im);
int                 vips_check_bands                    (const char *domain,
                                                         VipsImage *im,
                                                         int bands);
int                 vips_check_bands_1or3               (const char *domain,
                                                         VipsImage *in);
int                 vips_check_bands_atleast            (const char *domain,
                                                         VipsImage *im,
                                                         int bands);
int                 vips_check_bands_1orn               (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);
int                 vips_check_bands_1orn_unary         (const char *domain,
                                                         VipsImage *im,
                                                         int n);
int                 vips_check_bands_same               (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);
int                 vips_check_bandno                   (const char *domain,
                                                         VipsImage *im,
                                                         int bandno);
int                 vips_check_int                      (const char *domain,
                                                         VipsImage *im);
int                 vips_check_uint                     (const char *domain,
                                                         VipsImage *im);
int                 vips_check_uintorf                  (const char *domain,
                                                         VipsImage *im);
int                 vips_check_noncomplex               (const char *domain,
                                                         VipsImage *im);
int                 vips_check_complex                  (const char *domain,
                                                         VipsImage *im);
int                 vips_check_format                   (const char *domain,
                                                         VipsImage *im,
                                                         VipsBandFormat fmt);
int                 vips_check_u8or16                   (const char *domain,
                                                         VipsImage *im);
int                 vips_check_8or16                    (const char *domain,
                                                         VipsImage *im);
int                 vips_check_u8or16orf                (const char *domain,
                                                         VipsImage *im);
int                 vips_check_format_same              (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);
int                 vips_check_size_same                (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);
int                 vips_check_oddsquare                (const char *domain,
                                                         VipsImage *im);
int                 vips_check_vector_length            (const char *domain,
                                                         int n,
                                                         int len);
int                 vips_check_vector                   (const char *domain,
                                                         int n,
                                                         VipsImage *im);
int                 vips_check_hist                     (const char *domain,
                                                         VipsImage *im);
int                 vips_check_matrix                   (const char *domain,
                                                         VipsImage *im,
                                                         VipsImage **out);
int                 vips_check_separable                (const char *domain,
                                                         VipsImage *im);
int                 vips_check_imask                    (const char *domain,
                                                         INTMASK *mask);
int                 vips_check_dmask                    (const char *domain,
                                                         DOUBLEMASK *mask);
int                 vips_check_dmask_1d                 (const char *domain,
                                                         DOUBLEMASK *mask);

Description

VIPS maintains an error buffer (a log of localised text messages), a set of functions for adding messages, and a way to access and clear the buffer.

The error buffer is global, that is, it is shared between all threads. You can add to the buffer from any thread (there is a lock to prevent corruption), but it's sensible to only read and clear the buffer from the main thread of execution.

The general principle is: if you detect an error, log a message for the user. If a function you call detects an error, just propogate it and don't add another message.

IMAGE *im;

if( !(im = vips_image_new_from_file( filename )) )
  // vips_image_new_from_file() will set a message, we don't need to
  return( -1 );

if( vips_image_get_width( im ) < 100 ) {
  // we have detected an error, we must set a message
  vips_error( "myprogram", "%s", _( "width too small" ) );
  return( -1 );
}

The domain argument most of these functions take is not localised and is supposed to indicate the component which failed.

Details

vips_error_buffer ()

const char *        vips_error_buffer                   (void);

Get a pointer to the start of the error buffer as a C string. The string is owned by the error system and must not be freed.

See also: vips_error_clear().

Returns :

the error buffer as a C string which must not be freed

vips_error_clear ()

void                vips_error_clear                    (void);

Clear and reset the error buffer. This is typically called after presenting an error to the user.

See also: vips_error_buffer().


vips_error_freeze ()

void                vips_error_freeze                   (void);

Stop errors being logged. Use vips_error_thaw() to unfreeze. You can nest freeze/thaw pairs.


vips_error_thaw ()

void                vips_error_thaw                     (void);

Reenable error logging.


vips_error ()

void                vips_error                          (const char *domain,
                                                         const char *fmt,
                                                         ...);

Format the string in the style of printf() and append to the error buffer.

See also: vips_error_system(), vips_verror().

domain :

the source of the error

fmt :

printf()-style format string for the error

vips_verror ()

void                vips_verror                         (const char *domain,
                                                         const char *fmt,
                                                         va_list ap);

Append a message to the error buffer.

See also: vips_error().

domain :

the source of the error

fmt :

printf()-style format string for the error

ap :

arguments to the format string

vips_error_system ()

void                vips_error_system                   (int err,
                                                         const char *domain,
                                                         const char *fmt,
                                                         ...);

Format the string in the style of printf() and append to the error buffer. Then create and append a localised message based on the system error code, usually the value of errno.

See also: vips_verror_system().

err :

the system error code

domain :

the source of the error

fmt :

printf()-style format string for the error

vips_verror_system ()

void                vips_verror_system                  (int err,
                                                         const char *domain,
                                                         const char *fmt,
                                                         va_list ap);

Format the string in the style of printf() and append to the error buffer. Then create and append a localised message based on the system error code, usually the value of errno.

See also: vips_error_system().

err :

the system error code

domain :

the source of the error

fmt :

printf()-style format string for the error

ap :

arguments to the format string

vips_error_g ()

void                vips_error_g                        (GError **error);

This function sets the glib error pointer from the vips error buffer and clears it. It's handy for returning errors to glib functions from vips.

See also: g_set_error().

error :

glib error pointer

vips_warn ()

void                vips_warn                           (const char *domain,
                                                         const char *fmt,
                                                         ...);

Sends a formatted warning message to stderr. If you define the environment variable IM_WARNING, these message are surpressed.

Warning messages are used to report things like overflow counts.

See also: vips_info(), vips_vwarn().

domain :

the source of the warning message

fmt :

printf()-style format string for the message

vips_vwarn ()

void                vips_vwarn                          (const char *domain,
                                                         const char *fmt,
                                                         va_list ap);

Sends a formatted warning message to stderr. If you define the environment variable IM_WARNING, these message are surpressed.

Warning messages are used to report things like overflow counts.

See also: vips_info(), vips_warn().

domain :

the source of the warning message

fmt :

printf()-style format string for the message

ap :

arguments to the format string

vips_info ()

void                vips_info                           (const char *domain,
                                                         const char *fmt,
                                                         ...);

Sends a formatted informational message to stderr if the --vips-info flag has been given to the program or the environment variable IM_INFO has been defined.

Informational messages are used to report details about the operation of functions.

See also: vips_vdiag(), vips_warn().

domain :

the source of the diagnostic message

fmt :

printf()-style format string for the message

vips_vinfo ()

void                vips_vinfo                          (const char *domain,
                                                         const char *fmt,
                                                         va_list ap);

Sends a formatted informational message to stderr if the --vips-info flag has been given to the program or the environment variable IM_INFO has been defined.

Informational messages are used to report details about the operation of functions.

See also: vips_info(), vips_warn().

domain :

the source of the message

fmt :

printf()-style format string for the message

ap :

arguments to the format string

vips_error_exit ()

void                vips_error_exit                     (const char *fmt,
                                                         ...);

Sends a formatted error message to stderr, then sends the contents of the error buffer, if any, then shuts down vips and terminates the program with an error code.

fmt may be NULL, in which case only the error buffer is printed before exiting.

See also: vips_error().

fmt :

printf()-style format string for the message

vips_check_uncoded ()

int                 vips_check_uncoded                  (const char *domain,
                                                         VipsImage *im);

Check that the image is not coded. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 on OK, or -1 on error.

vips_check_coding ()

int                 vips_check_coding                   (const char *domain,
                                                         VipsImage *im,
                                                         VipsCoding coding);

Check that the image has the required coding. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

coding :

required coding

Returns :

0 on OK, or -1 on error.

vips_check_coding_known ()

int                 vips_check_coding_known             (const char *domain,
                                                         VipsImage *im);

Check that the image is uncoded, LABQ coded or RAD coded. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 on OK, or -1 on error.

vips_check_coding_noneorlabq ()

int                 vips_check_coding_noneorlabq        (const char *domain,
                                                         VipsImage *im);

Check that the image is uncoded or LABQ coded. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 on OK, or -1 on error.

vips_check_coding_same ()

int                 vips_check_coding_same              (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);

Check that the images have the same coding. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im1 :

first image to check

im2 :

second image to check

Returns :

0 if OK, -1 otherwise.

vips_check_mono ()

int                 vips_check_mono                     (const char *domain,
                                                         VipsImage *im);

Check that the image has exactly one band. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_bands ()

int                 vips_check_bands                    (const char *domain,
                                                         VipsImage *im,
                                                         int bands);

Check that the image has bands bands. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

bands :

must have this many bands

Returns :

0 if OK, -1 otherwise.

vips_check_bands_1or3 ()

int                 vips_check_bands_1or3               (const char *domain,
                                                         VipsImage *in);

Check that the image has either one or three bands. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

Returns :

0 if OK, -1 otherwise.

vips_check_bands_atleast ()

int                 vips_check_bands_atleast            (const char *domain,
                                                         VipsImage *im,
                                                         int bands);

Check that the image has at least bands bands. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

bands :

at least this many bands

Returns :

0 if OK, -1 otherwise.

vips_check_bands_1orn ()

int                 vips_check_bands_1orn               (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);

Check that the images have the same number of bands, or that one of the images has just 1 band. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im1 :

first image to check

im2 :

second image to check

Returns :

0 on OK, or -1 on error.

vips_check_bands_1orn_unary ()

int                 vips_check_bands_1orn_unary         (const char *domain,
                                                         VipsImage *im,
                                                         int n);

Check that an image has 1 or n bands. Handy for unary operations, cf. vips_check_bands_1orn(). If not, set an error message and return non-zero.

See also: vips_check_bands_1orn().

domain :

the originating domain for the error message

im :

image to check

n :

number of bands, or 1

Returns :

0 on OK, or -1 on error.

vips_check_bands_same ()

int                 vips_check_bands_same               (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);

Check that the images have the same number of bands. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im1 :

first image to check

im2 :

second image to check

Returns :

0 if OK, -1 otherwise.

vips_check_bandno ()

int                 vips_check_bandno                   (const char *domain,
                                                         VipsImage *im,
                                                         int bandno);

bandno should be a valid band number (ie. 0 to im->Bands - 1), or can be -1, meaning all bands. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

bandno :

band number

Returns :

0 if OK, -1 otherwise.

vips_check_int ()

int                 vips_check_int                      (const char *domain,
                                                         VipsImage *im);

Check that the image is in one of the integer formats. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_uint ()

int                 vips_check_uint                     (const char *domain,
                                                         VipsImage *im);

Check that the image is in one of the unsigned integer formats. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_uintorf ()

int                 vips_check_uintorf                  (const char *domain,
                                                         VipsImage *im);

Check that the image is unsigned int or float. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_noncomplex ()

int                 vips_check_noncomplex               (const char *domain,
                                                         VipsImage *im);

Check that the image is not complex. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_complex ()

int                 vips_check_complex                  (const char *domain,
                                                         VipsImage *im);

Check that the image is complex. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_format ()

int                 vips_check_format                   (const char *domain,
                                                         VipsImage *im,
                                                         VipsBandFormat fmt);

Check that the image has the specified format. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

fmt :

format to test for

Returns :

0 if OK, -1 otherwise.

vips_check_u8or16 ()

int                 vips_check_u8or16                   (const char *domain,
                                                         VipsImage *im);

Check that the image is 8 or 16-bit unsigned integer. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_8or16 ()

int                 vips_check_8or16                    (const char *domain,
                                                         VipsImage *im);

Check that the image is 8 or 16-bit integer, signed or unsigned. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_u8or16orf ()

int                 vips_check_u8or16orf                (const char *domain,
                                                         VipsImage *im);

Check that the image is 8 or 16-bit unsigned integer, or float. Otherwise set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_format_same ()

int                 vips_check_format_same              (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);

Check that the images have the same format. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im1 :

first image to check

im2 :

second image to check

Returns :

0 if OK, -1 otherwise.

vips_check_size_same ()

int                 vips_check_size_same                (const char *domain,
                                                         VipsImage *im1,
                                                         VipsImage *im2);

Check that the images have the same size. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im1 :

first image to check

im2 :

second image to check

Returns :

0 if OK, -1 otherwise.

vips_check_oddsquare ()

int                 vips_check_oddsquare                (const char *domain,
                                                         VipsImage *im);

Check that the image is square and that the sides are odd. If not, set an error message and return non-zero.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_vector_length ()

int                 vips_check_vector_length            (const char *domain,
                                                         int n,
                                                         int len);

Check that n == len.

See also: vips_error().

domain :

the originating domain for the error message

n :

number of elements in vector

len :

number of elements vector should have

Returns :

0 if OK, -1 otherwise.

vips_check_vector ()

int                 vips_check_vector                   (const char *domain,
                                                         int n,
                                                         VipsImage *im);

Operations with a vector constant need a 1-element vector, or a vector with the same number of elements as there are bands in the image.

See also: vips_error().

domain :

the originating domain for the error message

n :

number of elements in vector

im :

image to check against

Returns :

0 if OK, -1 otherwise.

vips_check_hist ()

int                 vips_check_hist                     (const char *domain,
                                                         VipsImage *im);

Histogram images must have width or height 1, and must not have more than 65536 elements. Return 0 if the image will pass as a histogram, or -1 and set an error message otherwise.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_matrix ()

int                 vips_check_matrix                   (const char *domain,
                                                         VipsImage *im,
                                                         VipsImage **out);

Matrix images must have width and height less than 100000 and have 1 band.

Return 0 if the image will pass as a matrix, or -1 and set an error message otherwise.

out is set to be im cast to double and stored in memory. Use VIPS_MATRIX() to address values in out.

You must unref out when you are done with it.

See also: VIPS_MATRIX(), vips_object_local()

domain :

the originating domain for the error message

im :

image to check

out :

put image as in-memory doubles here

Returns :

0 if OK, -1 otherwise.

vips_check_separable ()

int                 vips_check_separable                (const char *domain,
                                                         VipsImage *im);

Separable matrix images must have width or height 1. Return 0 if the image will pass, or -1 and set an error message otherwise.

See also: vips_error().

domain :

the originating domain for the error message

im :

image to check

Returns :

0 if OK, -1 otherwise.

vips_check_imask ()

int                 vips_check_imask                    (const char *domain,
                                                         INTMASK *mask);

Sanity-check a mask parameter.

See also: vips_error().

domain :

the originating domain for the error message

mask :

mask to check

Returns :

0 if OK, -1 otherwise.

vips_check_dmask ()

int                 vips_check_dmask                    (const char *domain,
                                                         DOUBLEMASK *mask);

Sanity-check a mask parameter.

See also: vips_error().

domain :

the originating domain for the error message

mask :

mask to check

Returns :

0 if OK, -1 otherwise.

vips_check_dmask_1d ()

int                 vips_check_dmask_1d                 (const char *domain,
                                                         DOUBLEMASK *mask);

A mask must be one-dimensional (width or height 1).

See also: vips_error().

domain :

the originating domain for the error message

mask :

mask to check

Returns :

0 if OK, -1 otherwise.
vips-7.38.5/doc/reference/html/right.png0000644000175000017500000000057412303146331015014 00000000000000‰PNG  IHDRשÍÊ{PLTEÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ###+++@@@«««¿¿¿ÃÃÃÇÇÇÏÏÏïïïÿÿÿçWôtRNS (48@GX[«·¿ÃÏÓ×ßãçï÷yþ±t–IDATxÚ…ÐÉÂ0 PS–@XZ -%”­eþÿ Iä‰ÁÜ<ï`ÙeAÙ¬Zìç9(ñÆ1'n/îÊ"Á¤²ÜU!‡DЉhŒwÎÅ$¢ñ4QX$°Ô AlþXRü^>8ŽMzšãmtúºü¾Ä>äk¸Ð7â½ œïOŠ$ôÙž³=mVQ.JO£é9 »ñ• IEND®B`‚vips-7.38.5/doc/reference/html/VipsRegion.html0000644000175000017500000013071412303146332016145 00000000000000 VipsRegion

VipsRegion

VipsRegion — small, rectangular parts of images

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

                    VipsRegion;
                    VipsRegionClass;
VipsRegion *        vips_region_new                     (VipsImage *image);
int                 vips_region_buffer                  (VipsRegion *reg,
                                                         VipsRect *r);
int                 vips_region_image                   (VipsRegion *reg,
                                                         VipsRect *r);
int                 vips_region_region                  (VipsRegion *reg,
                                                         VipsRegion *dest,
                                                         VipsRect *r,
                                                         int x,
                                                         int y);
int                 vips_region_equalsregion            (VipsRegion *reg1,
                                                         VipsRegion *reg2);
int                 vips_region_position                (VipsRegion *reg,
                                                         int x,
                                                         int y);
void                vips_region_paint                   (VipsRegion *reg,
                                                         VipsRect *r,
                                                         int value);
void                vips_region_paint_pel               (VipsRegion *reg,
                                                         VipsRect *r,
                                                         VipsPel *ink);
void                vips_region_black                   (VipsRegion *reg);
void                vips_region_copy                    (VipsRegion *reg,
                                                         VipsRegion *dest,
                                                         VipsRect *r,
                                                         int x,
                                                         int y);
int                 vips_region_prepare                 (VipsRegion *reg,
                                                         VipsRect *r);
int                 vips_region_prepare_to              (VipsRegion *reg,
                                                         VipsRegion *dest,
                                                         VipsRect *r,
                                                         int x,
                                                         int y);
int                 vips_region_prepare_many            (VipsRegion **reg,
                                                         VipsRect *r);
void                vips_region_dump_all                (void);
#define             VIPS_REGION_LSKIP                   (R)
#define             VIPS_REGION_N_ELEMENTS              (R)
#define             VIPS_REGION_SIZEOF_LINE             (R)
#define             VIPS_REGION_ADDR                    (R,
                                                         X,
                                                         Y)
#define             VIPS_REGION_ADDR_TOPLEFT            (R)

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsRegion

Description

A VipsRegion is a small part of an image and some pixels. You use regions to read pixels out of images without having to have the whole image in memory at once.

A region can be a memory buffer, part of a memory-mapped file, part of some other image, or part of some other region.

Regions must be created, used and freed all within the same thread, since they can reference private per-thread caches. VIPS sanity-checks region ownership in various places, so you are likely to see g_assert() errors if you don't follow this rule.

There is API to transfer ownership of regions between threads, but hopefully this is only needed within VIPS, so we don't expose it. Hopefully.

Details

VipsRegion

typedef struct {
	/* Users may read these two fields.
	 */
	VipsImage *im;		/* Link back to parent image */
	VipsRect valid;		/* Area of parent we can see */

	/* The rest of VipsRegion is private.
	 */
} VipsRegion;

A small part of a VipsImage. valid holds the left/top/width/height of the area of pixels that are available from the region.

See also: VIPS_REGION_ADDR(), vips_region_new(), vips_region_prepare().

VipsImage *im;

the VipsImage that this region is defined on

VipsRect valid;

the VipsRect of pixels that this region represents

VipsRegionClass

typedef struct {
	VipsObjectClass parent_class;
} VipsRegionClass;


vips_region_new ()

VipsRegion *        vips_region_new                     (VipsImage *image);

Create a region. VipsRegion s start out empty, you need to call vips_region_prepare() to fill them with pixels.

See also: vips_region_prepare().

image :

image to create this region on

vips_region_buffer ()

int                 vips_region_buffer                  (VipsRegion *reg,
                                                         VipsRect *r);

The region is transformed so that at least r pixels are available as a memory buffer.

reg :

region to operate upon

r :

VipsRect of pixels you need to be able to address

Returns :

0 on success, or -1 for error.

vips_region_image ()

int                 vips_region_image                   (VipsRegion *reg,
                                                         VipsRect *r);

The region is transformed so that at least r pixels are available directly from the image. The image needs to be a memory buffer or represent a file on disc that has been mapped or can be mapped.

reg :

region to operate upon

r :

VipsRect of pixels you need to be able to address

Returns :

0 on success, or -1 for error.

vips_region_region ()

int                 vips_region_region                  (VipsRegion *reg,
                                                         VipsRegion *dest,
                                                         VipsRect *r,
                                                         int x,
                                                         int y);

Make VIPS_REGION_ADDR() on reg go to dest instead.

r is the part of reg which you want to be able to address (this effectively becomes the valid field), (x, y) is the top LH corner of the corresponding area in dest.

Performs all clipping necessary to ensure that reg->valid is indeed valid.

If the region we attach to is modified, we can be left with dangling pointers! If the region we attach to is on another image, the two images must have the same sizeof( pel ).

reg :

region to operate upon

dest :

region to connect to

r :

VipsRect of pixels you need to be able to address

x :

postion of r in dest

y :

postion of r in dest

Returns :

0 on success, or -1 for error.

vips_region_equalsregion ()

int                 vips_region_equalsregion            (VipsRegion *reg1,
                                                         VipsRegion *reg2);

Do two regions point to the same piece of image? ie.

	VIPS_REGION_ADDR( reg1, x, y ) == VIPS_REGION_ADDR( reg2, x, y ) &&
	*VIPS_REGION_ADDR( reg1, x, y ) == 
		*VIPS_REGION_ADDR( reg2, x, y ) for all x, y, reg1, reg2.

reg1 :

region to test

reg2 :

region to test

Returns :

non-zero on equality.

vips_region_position ()

int                 vips_region_position                (VipsRegion *reg,
                                                         int x,
                                                         int y);

Set the position of a region. This only affects reg->valid, ie. the way pixels are addressed, not reg->data, the pixels which are addressed. Clip against the size of the image. Do not allow negative positions, or positions outside the image.

reg :

region to operate upon

x :

position to move to

y :

position to move to

Returns :

0 on success, or -1 for error.

vips_region_paint ()

void                vips_region_paint                   (VipsRegion *reg,
                                                         VipsRect *r,
                                                         int value);

Paints value into reg covering rectangle r. value is passed to memset(), so it usually needs to be 0 or 255. r is clipped against reg->valid.

See also: vips_region_black().

reg :

region to operate upon

r :

area to paint

value :

value to paint

vips_region_paint_pel ()

void                vips_region_paint_pel               (VipsRegion *reg,
                                                         VipsRect *r,
                                                         VipsPel *ink);

Paints ink into reg covering rectangle r. r is clipped against reg->valid.

ink should be a byte array of the same size as an image pixel containing the binary value to write into the pixels.

See also: vips_region_paint().

reg :

region to operate upon

r :

area to paint

ink :

value to paint

vips_region_black ()

void                vips_region_black                   (VipsRegion *reg);

Paints 0 into the valid part of reg.

See also: vips_region_paint().

reg :

region to operate upon

vips_region_copy ()

void                vips_region_copy                    (VipsRegion *reg,
                                                         VipsRegion *dest,
                                                         VipsRect *r,
                                                         int x,
                                                         int y);

Copy from one region to another. Copy area r from inside reg to dest, positioning the area of pixels at x, y. The two regions must have pixels which are the same size.

See also: vips_region_paint().

reg :

source region

dest :

destination region

r :

VipsRect of pixels you need to copy

x :

postion of r in dest

y :

postion of r in dest

vips_region_prepare ()

int                 vips_region_prepare                 (VipsRegion *reg,
                                                         VipsRect *r);

vips_region_prepare() fills reg with pixels. After calling, you can address at least the area r with VIPS_REGION_ADDR() and get valid pixels.

vips_region_prepare() runs in-line, that is, computation is done by the calling thread, no new threads are involved, and computation blocks until the pixels are ready.

Use vips_region_prepare_thread() to calculate an area of pixels with many threads. Use vips_sink_screen() to calculate an area of pixels in the background.

See also: vips_region_prepare_thread(), vips_sink_screen(), vips_region_prepare_to().

reg :

region to prepare

r :

VipsRect of pixels you need to be able to address

Returns :

0 on success, or -1 on error.

vips_region_prepare_to ()

int                 vips_region_prepare_to              (VipsRegion *reg,
                                                         VipsRegion *dest,
                                                         VipsRect *r,
                                                         int x,
                                                         int y);

Like vips_region_prepare(): fill reg with data, ready to be read from by our caller. Unlike vips_region_prepare(), rather than allocating memory local to reg for the result, we guarantee that we will fill the pixels in dest at offset x, y. In other words, we generate an extra copy operation if necessary.

Also unlike vips_region_prepare(), dest is not set up for writing for you with vips_region_buffer(). You can point dest at anything, and pixels really will be written there. This makes vips_prepare_to() useful for making the ends of pipelines, since it (effectively) makes a break in the pipe.

See also: vips_region_prepare(), vips_sink_disc().

reg :

region to prepare

dest :

region to write to

r :

VipsRect of pixels you need to be able to address

x :

postion of r in dest

y :

postion of r in dest

Returns :

0 on success, or -1 on error

vips_region_prepare_many ()

int                 vips_region_prepare_many            (VipsRegion **reg,
                                                         VipsRect *r);


vips_region_dump_all ()

void                vips_region_dump_all                (void);


VIPS_REGION_LSKIP()

#define             VIPS_REGION_LSKIP( R )

R :

a VipsRegion

Returns :

The number of bytes to add to move down a scanline.

VIPS_REGION_N_ELEMENTS()

#define             VIPS_REGION_N_ELEMENTS( R )

R :

a VipsRegion

Returns :

The number of band elements across a region.

VIPS_REGION_SIZEOF_LINE()

#define             VIPS_REGION_SIZEOF_LINE( R )

R :

a VipsRegion

Returns :

The number of bytes across a region.

VIPS_REGION_ADDR()

#define             VIPS_REGION_ADDR( R, X, Y )

This macro returns a pointer to a pixel in a region. The (x, y) coordinates need to be within the VipsRect (R->valid).

If DEBUG is defined, you get a version that checks bounds for you.

R :

a VipsRegion

X :

x coordinate

Y :

y coordinate

Returns :

The address of pixel (x,y) in the region.

VIPS_REGION_ADDR_TOPLEFT()

#define VIPS_REGION_ADDR_TOPLEFT( R ) ((R)->data)

This macro returns a pointer to the top-left pixel in the VipsRegion, that is, the pixel at (R->valid.left, R->valid.top).

R :

a VipsRegion

Returns :

The address of the top-left pixel in the region.

See Also

image, generate
vips-7.38.5/doc/reference/html/libvips-util.html0000644000175000017500000017034512303146332016507 00000000000000 util

util

util

Synopsis

#define             VIPS_PI
#define             VIPS_RAD                            (R)
#define             VIPS_DEG                            (A)
#define             VIPS_MAX                            (A,
                                                         B)
#define             VIPS_MIN                            (A,
                                                         B)
#define             VIPS_ABS                            (X)
#define             VIPS_CLIP                           (A,
                                                         V,
                                                         B)
#define             VIPS_NUMBER                         (R)
#define             VIPS_SWAP                           (TYPE,
                                                         A,
                                                         B)
#define             VIPS_UNROLL                         (N,
                                                         OPER)
#define             VIPS_RINT                           (R)
#define             VIPS_CLIP_UCHAR                     (V,
                                                         SEQ)
#define             VIPS_CLIP_CHAR                      (V,
                                                         SEQ)
#define             VIPS_CLIP_USHORT                    (V,
                                                         SEQ)
#define             VIPS_CLIP_SHORT                     (V,
                                                         SEQ)
#define             VIPS_CLIP_UINT                      (V,
                                                         SEQ)
#define             VIPS_CLIP_NONE                      (V,
                                                         SEQ)
#define             VIPS_PATH_MAX
const char *        vips_enum_string                    (GType enm,
                                                         int value);
const char *        vips_enum_nick                      (GType enm,
                                                         int value);
int                 vips_enum_from_nick                 (const char *domain,
                                                         GType type,
                                                         const char *str);
gboolean            vips_slist_equal                    (GSList *l1,
                                                         GSList *l2);
void *              vips_slist_map2                     (GSList *list,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);
void *              vips_slist_map2_rev                 (GSList *list,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);
void *              vips_slist_map4                     (GSList *list,
                                                         VipsSListMap4Fn fn,
                                                         void *a,
                                                         void *b,
                                                         void *c,
                                                         void *d);
void *              vips_slist_fold2                    (GSList *list,
                                                         void *start,
                                                         VipsSListFold2Fn fn,
                                                         void *a,
                                                         void *b);
GSList *            vips_slist_filter                   (GSList *list,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);
void                vips_slist_free_all                 (GSList *list);
void *              vips_map_equal                      (void *a,
                                                         void *b);
void *              vips_hash_table_map                 (GHashTable *hash,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);
char *              vips_strncpy                        (char *dest,
                                                         const char *src,
                                                         int n);
char *              vips_strrstr                        (const char *haystack,
                                                         const char *needle);
gboolean            vips_ispostfix                      (const char *a,
                                                         const char *b);
gboolean            vips_isprefix                       (const char *a,
                                                         const char *b);
char *              vips_break_token                    (char *str,
                                                         const char *brk);
int                 vips_vsnprintf                      (char *str,
                                                         size_t size,
                                                         const char *format,
                                                         va_list ap);
int                 vips_snprintf                       (char *str,
                                                         size_t size,
                                                         const char *format,
                                                         ...);
void                vips_filename_split                 (const char *path,
                                                         char *name,
                                                         char *mode);
const char *        vips_skip_dir                       (const char *filename);
void                vips_filename_suffix                (const char *path,
                                                         char *suffix);
int                 vips_filename_suffix_match          (const char *path,
                                                         const char *suffixes[]);
char *              vips_getnextoption                  (char **in);
char *              vips_getsuboption                   (const char *buf);
gint64              vips_file_length                    (int fd);
int                 vips__write                         (int fd,
                                                         const void *buf,
                                                         size_t count);
FILE *              vips__file_open_read                (const char *filename,
                                                         const char *fallback_dir,
                                                         gboolean text_mode);
FILE *              vips__file_open_write               (const char *filename,
                                                         gboolean text_mode);
char *              vips__file_read                     (FILE *fp,
                                                         const char *name,
                                                         unsigned int *length_out);
char *              vips__file_read_name                (const char *name,
                                                         const char *fallback_dir,
                                                         unsigned int *length_out);
int                 vips__file_write                    (void *data,
                                                         size_t size,
                                                         size_t nmemb,
                                                         FILE *stream);
int                 vips__get_bytes                     (const char *filename,
                                                         unsigned char buf[],
                                                         int len);
GValue *            vips__gvalue_ref_string_new         (const char *text);
void                vips__gslist_gvalue_free            (GSList *list);
GSList *            vips__gslist_gvalue_copy            (const GSList *list);
GSList *            vips__gslist_gvalue_merge           (GSList *a,
                                                         const GSList *b);
char *              vips__gslist_gvalue_get             (const GSList *list);
int                 vips__seek                          (int fd,
                                                         gint64 pos);
int                 vips__ftruncate                     (int fd,
                                                         gint64 pos);
int                 vips_existsf                        (const char *name,
                                                         ...);
int                 vips_mkdirf                         (const char *name,
                                                         ...);
FILE *              vips_popenf                         (const char *fmt,
                                                         const char *mode,
                                                         ...);
enum                VipsToken;
const char *        vips__token_get                     (const char *buffer,
                                                         VipsToken *token,
                                                         char *string,
                                                         int size);
const char *        vips__token_must                    (const char *buffer,
                                                         VipsToken *token,
                                                         char *string,
                                                         int size);
const char *        vips__token_need                    (const char *buffer,
                                                         VipsToken need_token,
                                                         char *string,
                                                         int size);
const char *        vips__find_rightmost_brackets       (const char *p);
int                 vips_ispoweroftwo                   (int p);
int                 vips_amiMSBfirst                    (void);
char *              vips__temp_name                     (const char *format);
void                vips__change_suffix                 (const char *name,
                                                         char *out,
                                                         int mx,
                                                         const char *new_suff,
                                                         const char **olds,
                                                         int nolds);

Description

Details

VIPS_PI

#define VIPS_PI (3.14159265358979323846)


VIPS_RAD()

#define VIPS_RAD( R ) (((R) / 360.0) * 2.0 * VIPS_PI)


VIPS_DEG()

#define VIPS_DEG( A ) (((A) / (2.0 * VIPS_PI)) * 360.0)


VIPS_MAX()

#define VIPS_MAX( A, B ) ((A) > (B) ? (A) : (B))


VIPS_MIN()

#define VIPS_MIN( A, B ) ((A) < (B) ? (A) : (B))


VIPS_ABS()

#define VIPS_ABS( X ) (((X) >= 0) ? (X) : -(X))


VIPS_CLIP()

#define VIPS_CLIP( A, V, B ) VIPS_MAX( (A), VIPS_MIN( (B), (V) ) )


VIPS_NUMBER()

#define VIPS_NUMBER( R ) ((int) (sizeof(R) / sizeof(R[0])))


VIPS_SWAP()

#define             VIPS_SWAP( TYPE, A, B )


VIPS_UNROLL()

#define             VIPS_UNROLL( N, OPER )


VIPS_RINT()

#define VIPS_RINT( R ) ((int) ((R) > 0 ? ((R) + 0.5) : ((R) - 0.5)))


VIPS_CLIP_UCHAR()

#define             VIPS_CLIP_UCHAR( V, SEQ )


VIPS_CLIP_CHAR()

#define             VIPS_CLIP_CHAR( V, SEQ )


VIPS_CLIP_USHORT()

#define             VIPS_CLIP_USHORT( V, SEQ )


VIPS_CLIP_SHORT()

#define             VIPS_CLIP_SHORT( V, SEQ )


VIPS_CLIP_UINT()

#define             VIPS_CLIP_UINT( V, SEQ )


VIPS_CLIP_NONE()

#define VIPS_CLIP_NONE( V, SEQ ) {}


VIPS_PATH_MAX

#define VIPS_PATH_MAX (4096)


vips_enum_string ()

const char *        vips_enum_string                    (GType enm,
                                                         int value);


vips_enum_nick ()

const char *        vips_enum_nick                      (GType enm,
                                                         int value);


vips_enum_from_nick ()

int                 vips_enum_from_nick                 (const char *domain,
                                                         GType type,
                                                         const char *str);


vips_slist_equal ()

gboolean            vips_slist_equal                    (GSList *l1,
                                                         GSList *l2);


vips_slist_map2 ()

void *              vips_slist_map2                     (GSList *list,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);


vips_slist_map2_rev ()

void *              vips_slist_map2_rev                 (GSList *list,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);


vips_slist_map4 ()

void *              vips_slist_map4                     (GSList *list,
                                                         VipsSListMap4Fn fn,
                                                         void *a,
                                                         void *b,
                                                         void *c,
                                                         void *d);


vips_slist_fold2 ()

void *              vips_slist_fold2                    (GSList *list,
                                                         void *start,
                                                         VipsSListFold2Fn fn,
                                                         void *a,
                                                         void *b);


vips_slist_filter ()

GSList *            vips_slist_filter                   (GSList *list,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);


vips_slist_free_all ()

void                vips_slist_free_all                 (GSList *list);


vips_map_equal ()

void *              vips_map_equal                      (void *a,
                                                         void *b);


vips_hash_table_map ()

void *              vips_hash_table_map                 (GHashTable *hash,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);


vips_strncpy ()

char *              vips_strncpy                        (char *dest,
                                                         const char *src,
                                                         int n);


vips_strrstr ()

char *              vips_strrstr                        (const char *haystack,
                                                         const char *needle);


vips_ispostfix ()

gboolean            vips_ispostfix                      (const char *a,
                                                         const char *b);


vips_isprefix ()

gboolean            vips_isprefix                       (const char *a,
                                                         const char *b);


vips_break_token ()

char *              vips_break_token                    (char *str,
                                                         const char *brk);


vips_vsnprintf ()

int                 vips_vsnprintf                      (char *str,
                                                         size_t size,
                                                         const char *format,
                                                         va_list ap);


vips_snprintf ()

int                 vips_snprintf                       (char *str,
                                                         size_t size,
                                                         const char *format,
                                                         ...);


vips_filename_split ()

void                vips_filename_split                 (const char *path,
                                                         char *name,
                                                         char *mode);


vips_skip_dir ()

const char *        vips_skip_dir                       (const char *filename);


vips_filename_suffix ()

void                vips_filename_suffix                (const char *path,
                                                         char *suffix);


vips_filename_suffix_match ()

int                 vips_filename_suffix_match          (const char *path,
                                                         const char *suffixes[]);


vips_getnextoption ()

char *              vips_getnextoption                  (char **in);


vips_getsuboption ()

char *              vips_getsuboption                   (const char *buf);


vips_file_length ()

gint64              vips_file_length                    (int fd);


vips__write ()

int                 vips__write                         (int fd,
                                                         const void *buf,
                                                         size_t count);


vips__file_open_read ()

FILE *              vips__file_open_read                (const char *filename,
                                                         const char *fallback_dir,
                                                         gboolean text_mode);


vips__file_open_write ()

FILE *              vips__file_open_write               (const char *filename,
                                                         gboolean text_mode);


vips__file_read ()

char *              vips__file_read                     (FILE *fp,
                                                         const char *name,
                                                         unsigned int *length_out);


vips__file_read_name ()

char *              vips__file_read_name                (const char *name,
                                                         const char *fallback_dir,
                                                         unsigned int *length_out);


vips__file_write ()

int                 vips__file_write                    (void *data,
                                                         size_t size,
                                                         size_t nmemb,
                                                         FILE *stream);


vips__get_bytes ()

int                 vips__get_bytes                     (const char *filename,
                                                         unsigned char buf[],
                                                         int len);


vips__gvalue_ref_string_new ()

GValue *            vips__gvalue_ref_string_new         (const char *text);


vips__gslist_gvalue_free ()

void                vips__gslist_gvalue_free            (GSList *list);


vips__gslist_gvalue_copy ()

GSList *            vips__gslist_gvalue_copy            (const GSList *list);


vips__gslist_gvalue_merge ()

GSList *            vips__gslist_gvalue_merge           (GSList *a,
                                                         const GSList *b);


vips__gslist_gvalue_get ()

char *              vips__gslist_gvalue_get             (const GSList *list);


vips__seek ()

int                 vips__seek                          (int fd,
                                                         gint64 pos);


vips__ftruncate ()

int                 vips__ftruncate                     (int fd,
                                                         gint64 pos);


vips_existsf ()

int                 vips_existsf                        (const char *name,
                                                         ...);


vips_mkdirf ()

int                 vips_mkdirf                         (const char *name,
                                                         ...);


vips_popenf ()

FILE *              vips_popenf                         (const char *fmt,
                                                         const char *mode,
                                                         ...);


enum VipsToken

typedef enum {
 	VIPS_TOKEN_LEFT = 1,
	VIPS_TOKEN_RIGHT,
	VIPS_TOKEN_STRING,
	VIPS_TOKEN_EQUALS,
	VIPS_TOKEN_COMMA
} VipsToken;

Tokens returned by the vips lexical analyzer, see vips__token_get(). This is used to parse option strings for arguments.

Left and right brackets can be any of (, {, [, <.

Strings may be in double quotes, and may contain escaped quote characters, for example string, "string" and "str\"ing".

VIPS_TOKEN_LEFT

left bracket

VIPS_TOKEN_RIGHT

right bracket

VIPS_TOKEN_STRING

string constant

VIPS_TOKEN_EQUALS

equals sign

VIPS_TOKEN_COMMA

comma

vips__token_get ()

const char *        vips__token_get                     (const char *buffer,
                                                         VipsToken *token,
                                                         char *string,
                                                         int size);


vips__token_must ()

const char *        vips__token_must                    (const char *buffer,
                                                         VipsToken *token,
                                                         char *string,
                                                         int size);


vips__token_need ()

const char *        vips__token_need                    (const char *buffer,
                                                         VipsToken need_token,
                                                         char *string,
                                                         int size);


vips__find_rightmost_brackets ()

const char *        vips__find_rightmost_brackets       (const char *p);


vips_ispoweroftwo ()

int                 vips_ispoweroftwo                   (int p);


vips_amiMSBfirst ()

int                 vips_amiMSBfirst                    (void);


vips__temp_name ()

char *              vips__temp_name                     (const char *format);


vips__change_suffix ()

void                vips__change_suffix                 (const char *name,
                                                         char *out,
                                                         int mx,
                                                         const char *new_suff,
                                                         const char **olds,
                                                         int nolds);

vips-7.38.5/doc/reference/html/left.png0000644000175000017500000000055612303146331014631 00000000000000‰PNG  IHDRשÍÊ~PLTEÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(((;;;@@@€€€ƒƒƒ§§§×××ßßßãããçççëëëóóóûûûÿÿÿv:òütRNS $04 VipsOperation

VipsOperation

VipsOperation — the VIPS operation base object class

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

enum                VipsOperationFlags;
gboolean            (*VipsOperationBuildFn)             (VipsObject *Param1);
                    VipsOperation;
                    VipsOperationClass;
VipsOperationFlags  vips_operation_get_flags            (VipsOperation *operation);
void                vips_operation_class_print_usage    (VipsOperationClass *operation_class);
int                 vips_operation_call_valist          (VipsOperation *operation,
                                                         va_list ap);
VipsOperation *     vips_operation_new                  (const char *name);
int                 vips_call                           (const char *operation_name,
                                                         ...);
int                 vips_call_split                     (const char *operation_name,
                                                         va_list optional,
                                                         ...);
void                vips_call_options                   (GOptionGroup *group,
                                                         VipsOperation *operation);
int                 vips_call_argv                      (VipsOperation *operation,
                                                         int argc,
                                                         char **argv);
void                vips_cache_drop_all                 (void);
int                 vips_cache_operation_buildp         (VipsOperation **operation);
VipsOperation *     vips_cache_operation_build          (VipsOperation *operation);
void                vips_cache_print                    (void);
void                vips_cache_set_max                  (int max);
void                vips_cache_set_max_mem              (size_t max_mem);
int                 vips_cache_get_max                  (void);
int                 vips_cache_get_size                 (void);
size_t              vips_cache_get_max_mem              (void);
int                 vips_cache_get_max_files            (void);
void                vips_cache_set_max_files            (int max_files);
void                vips_cache_set_dump                 (gboolean dump);
void                vips_cache_set_trace                (gboolean trace);

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsOperation
               +----VipsConvolution
               +----VipsCorrelation
               +----VipsForeign
               +----VipsFreqfilt
               +----VipsHistogram
               +----VipsCreate
               +----VipsMorphology

Description

The VipsOperation class and associated types and macros.

VipsOperation is the base class for all operations in libvips. It builds on VipsObject to provide the introspection and command-line interface to libvips.

It also maintains a cache of recent operations. You can tune the cache behaviour in various ways.

Details

enum VipsOperationFlags

typedef enum {
	VIPS_OPERATION_NONE = 0,
	VIPS_OPERATION_SEQUENTIAL = 1,
	VIPS_OPERATION_SEQUENTIAL_UNBUFFERED = 2,
	VIPS_OPERATION_NOCACHE = 4
} VipsOperationFlags;

Flags we associate with an operation.

VIPS_OPERATION_SEQUENTIAL means that the operation works like vips_conv(): it can happily process images top-to-bottom with only small non-local references.

VIPS_OPERATION_SEQUENTIAL_UNBUFFERED means that the operation works like vips_copy(): it can happily process images top-to-bottom and makes no non-local references.

VIPS_OPERATION_NOCACHE means that the operation must not be cached by vips.

VIPS_OPERATION_NONE

no flags

VIPS_OPERATION_SEQUENTIAL

can work sequentially

VIPS_OPERATION_SEQUENTIAL_UNBUFFERED

VIPS_OPERATION_NOCACHE

must not be cached

VipsOperationBuildFn ()

gboolean            (*VipsOperationBuildFn)             (VipsObject *Param1);


VipsOperation

typedef struct _VipsOperation VipsOperation;


VipsOperationClass

typedef struct {
	VipsObjectClass parent_class;

	/* Print the usage message.
	 */
	void (*usage)( struct _VipsOperationClass *, VipsBuf * );

	/* Return a set of operation flags. 
	 */
	VipsOperationFlags (*get_flags)( VipsOperation * ); 
	VipsOperationFlags flags;
} VipsOperationClass;


vips_operation_get_flags ()

VipsOperationFlags  vips_operation_get_flags            (VipsOperation *operation);

Returns the set of flags for this operation.

operation :

operation to fetch flags from

Returns :

0 on success, or -1 on error.

vips_operation_class_print_usage ()

void                vips_operation_class_print_usage    (VipsOperationClass *operation_class);

Print a usage message for the operation to stdout.

operation_class :

class to print usage for

vips_operation_call_valist ()

int                 vips_operation_call_valist          (VipsOperation *operation,
                                                         va_list ap);


vips_operation_new ()

VipsOperation *     vips_operation_new                  (const char *name);


vips_call ()

int                 vips_call                           (const char *operation_name,
                                                         ...);


vips_call_split ()

int                 vips_call_split                     (const char *operation_name,
                                                         va_list optional,
                                                         ...);


vips_call_options ()

void                vips_call_options                   (GOptionGroup *group,
                                                         VipsOperation *operation);


vips_call_argv ()

int                 vips_call_argv                      (VipsOperation *operation,
                                                         int argc,
                                                         char **argv);


vips_cache_drop_all ()

void                vips_cache_drop_all                 (void);

Drop the whole operation cache, handy for leak tracking.


vips_cache_operation_buildp ()

int                 vips_cache_operation_buildp         (VipsOperation **operation);

Look up operation in the cache. If we get a hit, unref operation, ref the old one and return that through the argument pointer.

If we miss, build and add operation.

operation :

pointer to operation to lookup

Returns :

0 on success, or -1 on error.

vips_cache_operation_build ()

VipsOperation *     vips_cache_operation_build          (VipsOperation *operation);

A binding-friendly version of vips_cache_operation_buildp().

After calling this, operation has the same ref count as when it went in, and the result must be freed with vips_object_unref_outputs() and g_object_unref().

operation :

operation to lookup

Returns :

The built operation. [transfer full]

vips_cache_print ()

void                vips_cache_print                    (void);

Print the whole operation cache to stdout. Handy for debugging.


vips_cache_set_max ()

void                vips_cache_set_max                  (int max);

Set the maximum number of operations we keep in cache.

max :

maximum number of operation to cache

vips_cache_set_max_mem ()

void                vips_cache_set_max_mem              (size_t max_mem);

Set the maximum amount of tracked memory we allow before we start dropping cached operations. See vips_tracked_get_mem().

See also: vips_tracked_get_mem().

max_mem :

maximum amount of tracked memory we use

vips_cache_get_max ()

int                 vips_cache_get_max                  (void);

Get the maximum number of operations we keep in cache.

Returns :

the maximum number of operations we keep in cache

vips_cache_get_size ()

int                 vips_cache_get_size                 (void);

Get the current number of operations in cache.

Returns :

get the current number of operations in cache.

vips_cache_get_max_mem ()

size_t              vips_cache_get_max_mem              (void);

Get the maximum amount of tracked memory we allow before we start dropping cached operations. See vips_tracked_get_mem().

See also: vips_tracked_get_mem().

Returns :

the maximum amount of tracked memory we allow

vips_cache_get_max_files ()

int                 vips_cache_get_max_files            (void);

Get the maximum number of tracked files we allow before we start dropping cached operations. See vips_tracked_get_files().

See also: vips_tracked_get_files().

Returns :

the maximum number of tracked files we allow

vips_cache_set_max_files ()

void                vips_cache_set_max_files            (int max_files);

Set the maximum number of tracked files we allow before we start dropping cached operations. See vips_tracked_get_files().

See also: vips_tracked_get_files().

max_files :

max open files we allow

vips_cache_set_dump ()

void                vips_cache_set_dump                 (gboolean dump);

Handy for debugging. Print the operation cache to stdout just before exit.

See also: vips_cache_set_trace().

dump :

if TRUE, dump the operation cache on exit

vips_cache_set_trace ()

void                vips_cache_set_trace                (gboolean trace);

Handy for debugging. Print operation cache actions to stdout as we run.

See also: vips_cache_set_dump().

trace :

if TRUE, trace the operation cache

See Also

object
vips-7.38.5/doc/reference/html/libvips-buf.html0000644000175000017500000012357012303146332016304 00000000000000 buf

buf

buf — a string you can append to

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

                    VipsBuf;
#define             VIPS_BUF_STATIC                     (TEXT)
void                vips_buf_rewind                     (VipsBuf *buf);
void                vips_buf_destroy                    (VipsBuf *buf);
void                vips_buf_init                       (VipsBuf *buf);
void                vips_buf_set_static                 (VipsBuf *buf,
                                                         char *base,
                                                         int mx);
void                vips_buf_set_dynamic                (VipsBuf *buf,
                                                         int mx);
void                vips_buf_init_static                (VipsBuf *buf,
                                                         char *base,
                                                         int mx);
void                vips_buf_init_dynamic               (VipsBuf *buf,
                                                         int mx);
gboolean            vips_buf_appendns                   (VipsBuf *buf,
                                                         const char *str,
                                                         int sz);
gboolean            vips_buf_appends                    (VipsBuf *buf,
                                                         const char *str);
gboolean            vips_buf_appendf                    (VipsBuf *buf,
                                                         const char *fmt,
                                                         ...);
gboolean            vips_buf_vappendf                   (VipsBuf *buf,
                                                         const char *fmt,
                                                         va_list ap);
gboolean            vips_buf_appendc                    (VipsBuf *buf,
                                                         char ch);
gboolean            vips_buf_appendsc                   (VipsBuf *buf,
                                                         gboolean quote,
                                                         const char *str);
gboolean            vips_buf_appendgv                   (VipsBuf *buf,
                                                         GValue *value);
gboolean            vips_buf_append_size                (VipsBuf *buf,
                                                         size_t n);
gboolean            vips_buf_removec                    (VipsBuf *buf,
                                                         char ch);
gboolean            vips_buf_change                     (VipsBuf *buf,
                                                         const char *o,
                                                         const char *n);
gboolean            vips_buf_is_empty                   (VipsBuf *buf);
gboolean            vips_buf_is_full                    (VipsBuf *buf);
const char *        vips_buf_all                        (VipsBuf *buf);
const char *        vips_buf_firstline                  (VipsBuf *buf);
gboolean            vips_buf_appendg                    (VipsBuf *buf,
                                                         double g);
gboolean            vips_buf_appendd                    (VipsBuf *buf,
                                                         int d);
int                 vips_buf_len                        (VipsBuf *buf);

Description

A message buffer you can append stuff to safely and quickly. If the message gets too long, you get "..." and truncation. Message buffers can be on the stack or heap.

For example:

char txt[256];
VipsBuf buf = VIPS_BUF_STATIC (txt);
int i;

vips_buf_appends (&buf, "Numbers are: ");
for (i = 0; i < array_length; i++) {
  if (i > 0)
    vips_buf_appends (&buf, ", ");
  vips_buf_appendg (&buf, array[i]);
}
printf ("%s", vips_buf_all (&buf));

Details

VipsBuf

typedef struct {
	/* All fields are private.
	 */
} VipsBuf;


VIPS_BUF_STATIC()

#define             VIPS_BUF_STATIC( TEXT )

Initialize a heap buffer. For example:

char txt[256];
VipsBuf buf = VIPS_BUF_STATIC (txt);

TEXT :

the storage area to use

vips_buf_rewind ()

void                vips_buf_rewind                     (VipsBuf *buf);

Reset the buffer to the empty string.

buf :

the buffer

vips_buf_destroy ()

void                vips_buf_destroy                    (VipsBuf *buf);

Destroy a buffer. Only needed for heap buffers. Leaves the buffer in the _init state.

buf :

the buffer

vips_buf_init ()

void                vips_buf_init                       (VipsBuf *buf);

Initialize a buffer.

buf :

the buffer

vips_buf_set_static ()

void                vips_buf_set_static                 (VipsBuf *buf,
                                                         char *base,
                                                         int mx);

Attach the buffer to a static memory area. The buffer needs to have been initialised. The memory area needs to be at least 4 bytes long.

buf :

the buffer

base :

the start of the memory area to use for storage

mx :

the size of the storage area

vips_buf_set_dynamic ()

void                vips_buf_set_dynamic                (VipsBuf *buf,
                                                         int mx);

Attach the buffer to a heap memory area. The buffer needs to have been initialised. The memory area needs to be at least 4 bytes long.

buf :

the buffer

mx :

the size of the storage area

vips_buf_init_static ()

void                vips_buf_init_static                (VipsBuf *buf,
                                                         char *base,
                                                         int mx);

Initialise and attach to a static memory area. VIPS_BUF_STATIC() is usually more convenient.

For example:

char txt[256];
VipsBuf buf;

vips_buf_init_static (&buf, txt, 256);

Static buffers don't need to be freed when they go out of scope, but their size must be set at compile-time.

buf :

the buffer

base :

the start of the memory area to use for storage

mx :

the size of the storage area

vips_buf_init_dynamic ()

void                vips_buf_init_dynamic               (VipsBuf *buf,
                                                         int mx);

Initialise and attach to a heap memory area. The memory area needs to be at least 4 bytes long.

VipsBuf buf;

vips_buf_init_synamic (&buf, 256);

Dynamic buffers must be freed with vips_buf_destroy(), but their size can be set at runtime.

buf :

the buffer

mx :

the size of the storage area

vips_buf_appendns ()

gboolean            vips_buf_appendns                   (VipsBuf *buf,
                                                         const char *str,
                                                         int sz);

Append at most sz chars from str to buf. sz < 0 means unlimited. This is the low-level append operation: functions like vips_buf_appendf() build on top of this.

buf :

the buffer

str :

the string to append to the buffer

sz :

the size of the string to append

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_appends ()

gboolean            vips_buf_appends                    (VipsBuf *buf,
                                                         const char *str);

Append the whole of str to buf.

buf :

the buffer

str :

the string to append to the buffer

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_appendf ()

gboolean            vips_buf_appendf                    (VipsBuf *buf,
                                                         const char *fmt,
                                                         ...);

Format the string and append to buf.

buf :

the buffer

fmt :

printf()-style format string

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_vappendf ()

gboolean            vips_buf_vappendf                   (VipsBuf *buf,
                                                         const char *fmt,
                                                         va_list ap);

Append to buf, args as vprintf().

buf :

the buffer

fmt :

printf()-style format string

ap :

arguments to format string

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_appendc ()

gboolean            vips_buf_appendc                    (VipsBuf *buf,
                                                         char ch);

Append a single character ch to buf.

buf :

the buffer

ch :

the character to append to the buffer

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_appendsc ()

gboolean            vips_buf_appendsc                   (VipsBuf *buf,
                                                         gboolean quote,
                                                         const char *str);


vips_buf_appendgv ()

gboolean            vips_buf_appendgv                   (VipsBuf *buf,
                                                         GValue *value);

Format and append a GValue with g_strdup_value_contents().

buf :

the buffer

value :

GValue to format and append

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_append_size ()

gboolean            vips_buf_append_size                (VipsBuf *buf,
                                                         size_t n);

Turn a number of bytes into a sensible string ... eg "12", "12KB", "12MB", "12GB" etc.

buf :

the buffer

n :

the number of bytes

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_removec ()

gboolean            vips_buf_removec                    (VipsBuf *buf,
                                                         char ch);

Remove the last character, if it's ch.

buf :

the buffer

ch :

the character to remove

Returns :

FALSE on failure, TRUE otherwise.

vips_buf_change ()

gboolean            vips_buf_change                     (VipsBuf *buf,
                                                         const char *o,
                                                         const char *n);

Swap the rightmost occurence of o for n.

buf :

the buffer

o :

the string to search for

n :

the string to substitute

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_is_empty ()

gboolean            vips_buf_is_empty                   (VipsBuf *buf);

buf :

the buffer

Returns :

TRUE if the buffer is empty.

vips_buf_is_full ()

gboolean            vips_buf_is_full                    (VipsBuf *buf);

buf :

the buffer

Returns :

TRUE if the buffer is full.

vips_buf_all ()

const char *        vips_buf_all                        (VipsBuf *buf);

Return the contents of the buffer as a C string.

buf :

the buffer

Returns :

the NULL-terminated contents of the buffer. This is a pointer to the memory managed by the buffer and must not be freed.

vips_buf_firstline ()

const char *        vips_buf_firstline                  (VipsBuf *buf);

Trim to just the first line (excluding "\n").

buf :

the buffer

Returns :

the NULL-terminated contents of the buffer. This is a pointer to the memory managed by the buffer and must not be freed.

vips_buf_appendg ()

gboolean            vips_buf_appendg                    (VipsBuf *buf,
                                                         double g);

Append a double, non-localised. Useful for config files etc.

buf :

the buffer

g :

value to format and append

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_appendd ()

gboolean            vips_buf_appendd                    (VipsBuf *buf,
                                                         int d);

Append a number. If the number is -ve, add brackets. Needed for building function arguments.

buf :

the buffer

d :

value to format and append

Returns :

FALSE on overflow, TRUE otherwise.

vips_buf_len ()

int                 vips_buf_len                        (VipsBuf *buf);

buf :

the buffer

Returns :

the number of characters currently in the buffer.

See Also

vips
vips-7.38.5/doc/reference/html/VipsForeign.html0000644000175000017500000047257112303146332016325 00000000000000 VipsForeign

VipsForeign

VipsForeign — load and save images in a variety of formats

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

                    VipsForeign;
                    VipsForeignClass;
void *              vips_foreign_map                    (const char *base,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);
enum                VipsForeignFlags;
                    VipsForeignLoad;
                    VipsForeignLoadClass;
const char *        vips_foreign_find_load              (const char *filename);
const char *        vips_foreign_find_load_options      (const char *filename);
VipsForeignFlags    vips_foreign_flags                  (const char *loader,
                                                         const char *filename);
gboolean            vips_foreign_is_a                   (const char *loader,
                                                         const char *filename);
enum                VipsSaveable;
                    VipsForeignSave;
                    VipsForeignSaveClass;
const char *        vips_foreign_find_save              (const char *filename);
const char *        vips_foreign_find_save_options      (const char *filename);
int                 vips_foreign_load                   (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_foreign_save                   (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_foreign_load_options           (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_foreign_save_options           (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_openslideload                  (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_jpegload                       (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_jpegload_buffer                (void *buf,
                                                         size_t len,
                                                         VipsImage **out,
                                                         ...);
int                 vips_jpegsave                       (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_jpegsave_buffer                (VipsImage *in,
                                                         void **buf,
                                                         size_t *len,
                                                         ...);
int                 vips_jpegsave_mime                  (VipsImage *in,
                                                         ...);
int                 vips_webpload                       (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_webpload_buffer                (void *buf,
                                                         size_t len,
                                                         VipsImage **out,
                                                         ...);
int                 vips_webpsave                       (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_webpsave_buffer                (VipsImage *in,
                                                         void **buf,
                                                         size_t *len,
                                                         ...);
int                 vips_webpsave_mime                  (VipsImage *in,
                                                         ...);
enum                VipsForeignTiffCompression;
enum                VipsForeignTiffPredictor;
enum                VipsForeignTiffResunit;
int                 vips_tiffload                       (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_tiffsave                       (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_openexrload                    (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_fitsload                       (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_fitssave                       (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_analyzeload                    (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_rawload                        (const char *filename,
                                                         VipsImage **out,
                                                         int width,
                                                         int height,
                                                         int bands,
                                                         ...);
int                 vips_rawsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_rawsave_fd                     (VipsImage *in,
                                                         int fd,
                                                         ...);
int                 vips_csvload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_csvsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_matrixload                     (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_matrixsave                     (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_matrixprint                    (VipsImage *in,
                                                         ...);
int                 vips_magickload                     (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_pngload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_pngload_buffer                 (void *buf,
                                                         size_t len,
                                                         VipsImage **out,
                                                         ...);
int                 vips_pngsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_pngsave_buffer                 (VipsImage *in,
                                                         void **buf,
                                                         size_t *len,
                                                         ...);
int                 vips_ppmload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_ppmsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);
int                 vips_matload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_radload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);
int                 vips_radsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);
enum                VipsForeignDzLayout;
enum                VipsForeignDzDepth;
int                 vips_dzsave                         (VipsImage *in,
                                                         const char *basename,
                                                         ...);

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsOperation
               +----VipsForeign
                     +----VipsForeignLoad
                     +----VipsForeignSave
  GObject
   +----VipsObject
         +----VipsOperation
               +----VipsForeign
                     +----VipsForeignLoad
  GObject
   +----VipsObject
         +----VipsOperation
               +----VipsForeign
                     +----VipsForeignSave

Properties

  "access"                   VipsAccess            : Read / Write
  "disc"                     gboolean              : Read / Write
  "flags"                    VipsForeignFlags      : Read / Write
  "out"                      VipsImage*            : Read / Write
  "sequential"               gboolean              : Read / Write
  "in"                       VipsImage*            : Read / Write
  "strip"                    gboolean              : Read / Write

Description

This set of operations load and save images in a variety of formats.

The operations share a base class that offers a simple way to search for a subclass of VipsForeign which can load a certain file (see vips_foreign_find_load()) or which could be used to save an image to a certain file type (see vips_foreign_find_save()). You can then run these operations using vips_call() and friends to perform the load or save.

A pair of convenience functions, vips_foreign_load() and vips_foreign_save(), automate the process, loading an image from a file or saving an image to a file. These functions let you give load or save options as name - value pairs in the C argument list. You can use vips_foreign_load_options() and vips_foreign_save_options() to include options in the file name.

For example:

vips_foreign_save (my_image, "frank.tiff", 
    "compression", VIPS_FOREIGN_TIFF_COMPRESSION_JPEG,
    NULL);

Will save an image to the file "frank.tiff" in TIFF format (selected by the file name extension) with JPEG compression.

vips_foreign_save_options (my_image, "frank.tiff[compression=jpeg]");  

Is the same thing, but with the option in the filename.

You can also invoke the operations directly, for example:

vips_tiffsave (my_image, "frank.anything", 
    "compression", VIPS_FOREIGN_TIFF_COMPRESSION_JPEG,
    NULL);

To add support for a new file format to vips, simply define a new subclass of VipsForeignLoad or VipsForeignSave.

If you define a new operation which is a subclass of VipsForeign, support for it automatically appears in all VIPS user-interfaces. It will also be transparently supported by vips_image_new_from_file() and friends.

VIPS comes with VipsForeign for TIFF, JPEG, PNG, Analyze, PPM, OpenEXR, CSV, Matlab, Radiance, RAW, FITS and VIPS. It also includes import filters which can load with libMagick and with OpenSlide.

Details

VipsForeign

typedef struct _VipsForeign VipsForeign;


VipsForeignClass

typedef struct {
	VipsOperationClass parent_class;


	/* Loop over formats in this order, default 0. We need this because
	 * some formats can be read by several loaders (eg. tiff can be read
	 * by the libMagick loader as well as by the tiff loader), and we want
	 * to make sure the better loader comes first.
	 */
	int priority;

	/* Null-terminated list of recommended suffixes, eg. ".tif", ".tiff".
	 * This can be used by both load and save, so it's in the base class.
	 */
	const char **suffs;
} VipsForeignClass;

The suffix list is used to select a format to save a file in, and to pick a loader if you don't define is_a().

You should also define nickname and description in VipsObject.


vips_foreign_map ()

void *              vips_foreign_map                    (const char *base,
                                                         VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);

Apply a function to every VipsForeignClass that VIPS knows about. Foreigns are presented to the function in priority order.

Like all VIPS map functions, if fn returns NULL, iteration continues. If it returns non-NULL, iteration terminates and that value is returned. The map function returns NULL if all calls return NULL.

See also: vips_slist_map().

base :

base class to search below (eg. "VipsForeignLoad")

fn :

function to apply to each VipsForeignClass. [scope call]

a :

user data

b :

user data

Returns :

the result of iteration. [transfer none]

enum VipsForeignFlags

typedef enum {
	VIPS_FOREIGN_NONE = 0,		/* No flags set */
	VIPS_FOREIGN_PARTIAL = 1, /* Lazy read OK (eg. tiled tiff) */
	VIPS_FOREIGN_BIGENDIAN = 2, /* Most-significant byte first */
	VIPS_FOREIGN_SEQUENTIAL = 4, /* Top-to-bottom lazy read OK */
	VIPS_FOREIGN_ALL = 7		/* All flags set */
} VipsForeignFlags;

Some hints about the image loader.

VIPS_FOREIGN_PARTIAL means that the image can be read directly from the file without needing to be unpacked to a temporary image first.

VIPS_FOREIGN_SEQUENTIAL means that the loader supports lazy reading, but only top-to-bottom (sequential) access. Formats like PNG can read sets of scanlines, for example, but only in order.

If neither PARTIAL or SEQUENTIAL is set, the loader only supports whole image read. Setting both PARTIAL and SEQUENTIAL is an error.

VIPS_FOREIGN_BIGENDIAN means that image pixels are most-significant byte first. Depending on the native byte order of the host machine, you may need to swap bytes. See vips_copy().

VIPS_FOREIGN_NONE

no flags set

VIPS_FOREIGN_PARTIAL

the image may be read lazilly

VIPS_FOREIGN_BIGENDIAN

image pixels are most-significant byte first

VIPS_FOREIGN_SEQUENTIAL

top-to-bottom lazy reading

VIPS_FOREIGN_ALL


VipsForeignLoad

typedef struct {
	/* The image we generate. This must be set by ->header().
	 */
	VipsImage *out;

	/* The behind-the-scenes real image we decompress to. This can be a
	 * disc foreign or a memory buffer. This must be set by ->load().
	 */
	VipsImage *real;

	/* Set this to tag the operation as nocache.
	 */
	gboolean nocache;
} VipsForeignLoad;

header() must set at least the header fields of out. laod(), if defined, must load the pixels to real.


VipsForeignLoadClass

typedef struct {
	VipsForeignClass parent_class;

	/* Is a file in this format. 
	 *
	 * This function should return %TRUE if the file contains an image of 
	 * this type. If you don't define this function, #VipsForeignLoad
	 * will use @suffs instead.
	 */
	gboolean (*is_a)( const char * );

	/* Get the flags from a filename. 
	 *
	 * This function should examine the file and return a set
	 * of flags. If you don't define it, vips will default to 0 (no flags 
	 * set).  
	 *
	 * This operation is necessary for vips7 compatibility. 
	 */
	VipsForeignFlags (*get_flags_filename)( const char * );

	/* Get the flags for this load operation. Images can be loaded from 
	 * (for example) memory areas rather than files, so you can't just use
	 * @get_flags_filename().
	 */
	VipsForeignFlags (*get_flags)( VipsForeignLoad * );

	/* Do the minimum read we can. 
	 *
	 * Set the header fields in @out from @filename. If you can read the 
	 * whole image as well with no performance cost (as with vipsload),
	 * or if your loader does not support reading only the header, read
	 * the entire image in this method and leave @load() NULL.
	 *
	 * @header() needs to set the dhint on the image .. otherwise you get 
	 * the default SMALLTILE.
	 *
	 * Return 0 for success, -1 for error, setting
	 * vips_error().
	 */
	int (*header)( VipsForeignLoad * );

	/* Read the whole image into @real. The pixels will get copied to @out 
	 * later.
	 *
	 * You can omit this method if you define a @header() method which 
	 * loads the whole file. 
	 *
	 * Return 0 for success, -1 for error, setting
	 * vips_error().
	 */
	int (*load)( VipsForeignLoad * );
} VipsForeignLoadClass;

Add a new loader to VIPS by subclassing VipsForeignLoad. Subclasses need to implement at least header().

As a complete example, here's the code for the PNG loader, minus the actual calls to libpng.

typedef struct _VipsForeignLoadPng {
	VipsForeignLoad parent_object;

	char *filename; 
} VipsForeignLoadPng;

typedef VipsForeignLoadClass VipsForeignLoadPngClass;

G_DEFINE_TYPE( VipsForeignLoadPng, vips_foreign_load_png, 
	VIPS_TYPE_FOREIGN_LOAD );

static VipsForeignFlags
vips_foreign_load_png_get_flags_filename( const char *filename )
{
	VipsForeignFlags flags;

	flags = 0;
	if( vips__png_isinterlaced( filename ) )
		flags = VIPS_FOREIGN_PARTIAL;
	else
		flags = VIPS_FOREIGN_SEQUENTIAL;

	return( flags );
}

static VipsForeignFlags
vips_foreign_load_png_get_flags( VipsForeignLoad *load )
{
	VipsForeignLoadPng *png = (VipsForeignLoadPng *) load;

	return( vips_foreign_load_png_get_flags_filename( png->filename ) );
}

static int
vips_foreign_load_png_header( VipsForeignLoad *load )
{
	VipsForeignLoadPng *png = (VipsForeignLoadPng *) load;

	if( vips__png_header( png->filename, load->out ) )
		return( -1 );

	return( 0 );
}

static int
vips_foreign_load_png_load( VipsForeignLoad *load )
{
	VipsForeignLoadPng *png = (VipsForeignLoadPng *) load;

	if( vips__png_read( png->filename, load->real ) )
		return( -1 );

	return( 0 );
}

static void
vips_foreign_load_png_class_init( VipsForeignLoadPngClass *class )
{
	GObjectClass *gobject_class = G_OBJECT_CLASS( class );
	VipsObjectClass *object_class = (VipsObjectClass *) class;
	VipsForeignClass *foreign_class = (VipsForeignClass *) class;
	VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class;

	gobject_class->set_property = vips_object_set_property;
	gobject_class->get_property = vips_object_get_property;

	object_class->nickname = "pngload";
	object_class->description = _( "load png from file" );

	foreign_class->suffs = vips__png_suffs;

	load_class->is_a = vips__png_ispng;
	load_class->get_flags_filename = 
		vips_foreign_load_png_get_flags_filename;
	load_class->get_flags = vips_foreign_load_png_get_flags;
	load_class->header = vips_foreign_load_png_header;
	load_class->load = vips_foreign_load_png_load;

	VIPS_ARG_STRING( class, "filename", 1, 
		_( "Filename" ),
		_( "Filename to load from" ),
		VIPS_ARGUMENT_REQUIRED_INPUT, 
		G_STRUCT_OFFSET( VipsForeignLoadPng, filename ),
		NULL );
}

static void
vips_foreign_load_png_init( VipsForeignLoadPng *png )
{
}


vips_foreign_find_load ()

const char *        vips_foreign_find_load              (const char *filename);

Searches for an operation you could use to load filename.

See also: vips_foreign_read().

filename :

file to find a loader for

Returns :

the name of an operation on success, NULL on error

vips_foreign_find_load_options ()

const char *        vips_foreign_find_load_options      (const char *filename);

Searches for an operation you could use to load filename.

Arguments to the loader may be embedded in the filename using the usual syntax.

See also: vips_foreign_load().

filename :

file to find a loader for

Returns :

0 on success, -1 on error

vips_foreign_flags ()

VipsForeignFlags    vips_foreign_flags                  (const char *loader,
                                                         const char *filename);

Return the flags for filename using loader. loader is something like "tiffload" or "VipsForeignLoadTiff".

loader :

name of loader to use for test

filename :

file to test

Returns :

the flags for filename.

vips_foreign_is_a ()

gboolean            vips_foreign_is_a                   (const char *loader,
                                                         const char *filename);

Return TRUE if filename can be loaded by loader. loader is something like "tiffload" or "VipsForeignLoadTiff".

loader :

name of loader to use for test

filename :

file to test

Returns :

TRUE if filename can be loaded by loader.

enum VipsSaveable

typedef enum {
	VIPS_SAVEABLE_MONO,
	VIPS_SAVEABLE_RGB,
	VIPS_SAVEABLE_RGBA,
	VIPS_SAVEABLE_RGB_CMYK,
	VIPS_SAVEABLE_ANY,
	VIPS_SAVEABLE_LAST
} VipsSaveable;

See also: VipsForeignSave.

VIPS_SAVEABLE_MONO

1 band (eg. CSV)

VIPS_SAVEABLE_RGB

1 or 3 bands (eg. PPM)

VIPS_SAVEABLE_RGBA

1, 2, 3 or 4 bands (eg. PNG)

VIPS_SAVEABLE_RGB_CMYK

1, 3 or 4 bands (eg. JPEG)

VIPS_SAVEABLE_ANY

any number of bands (eg. TIFF)

VIPS_SAVEABLE_LAST


VipsForeignSave

typedef struct {
	/* The image we are to save, as supplied by our caller. 
	 */
	VipsImage *in;

	/* @in converted to a saveable format (eg. 8-bit RGB) according to the
	 * instructions you give in the class fields below.
	 *
	 * This is the image you should actually write to the output.
	 */
	VipsImage *ready;
} VipsForeignSave;


VipsForeignSaveClass

typedef struct {
	VipsForeignClass parent_class;


	/* How this format treats bands.
	 *
	 * @saveable describes the bands that your saver can handle. For 
	 * example, PPM images can have 1 or 3 bands (mono or RGB), so it 
	 * uses #VIPS_SAVEABLE_RGB.
	 */
	VipsSaveable saveable;

	/* How this format treats band formats.
	 *
	 * @format_table describes the band formats that your saver can 
	 * handle. For each of the 10 #VipsBandFormat values, the array 
	 * should give the format your saver will accept. 
	 */
	VipsBandFormat *format_table;

	/* The set of coding types this format can save. For example, jpeg can
	 * only save NONE, so has NONE TRUE and RAD and LABQ FALSE.
	 *
	 * Default NONE TRUE, RAD and LABQ FALSE.
	 */
	gboolean coding[VIPS_CODING_LAST];
} VipsForeignSaveClass;

Call your saver in the class' build() method after chaining up. The prepared image should be ready for you to save in ready.

As a complete example, here's the code for the CSV saver, minus the calls to the actual save routines.

typedef struct _VipsForeignSaveCsv {
	VipsForeignSave parent_object;

	char *filename; 
	const char *separator;
} VipsForeignSaveCsv;

typedef VipsForeignSaveClass VipsForeignSaveCsvClass;

G_DEFINE_TYPE( VipsForeignSaveCsv, vips_foreign_save_csv, 
	VIPS_TYPE_FOREIGN_SAVE );

static int
vips_foreign_save_csv_build( VipsObject *object )
{
	VipsForeignSave *save = (VipsForeignSave *) object;
	VipsForeignSaveCsv *csv = (VipsForeignSaveCsv *) object;

	if( VIPS_OBJECT_CLASS( vips_foreign_save_csv_parent_class )->
		build( object ) )
		return( -1 );

	if( vips__csv_write( save->ready, csv->filename, csv->separator ) )
		return( -1 );

	return( 0 );
}

static void
vips_foreign_save_csv_class_init( VipsForeignSaveCsvClass *class )
{
	GObjectClass *gobject_class = G_OBJECT_CLASS( class );
	VipsObjectClass *object_class = (VipsObjectClass *) class;
	VipsForeignClass *foreign_class = (VipsForeignClass *) class;
	VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class;

	gobject_class->set_property = vips_object_set_property;
	gobject_class->get_property = vips_object_get_property;

	object_class->nickname = "csvsave";
	object_class->description = _( "save image to csv file" );
	object_class->build = vips_foreign_save_csv_build;

	foreign_class->suffs = vips__foreign_csv_suffs;

	save_class->saveable = VIPS_SAVEABLE_MONO;
	// no need to define ->format_table, we don't want the input 
	// cast for us

	VIPS_ARG_STRING( class, "filename", 1, 
		_( "Filename" ),
		_( "Filename to save to" ),
		VIPS_ARGUMENT_REQUIRED_INPUT, 
		G_STRUCT_OFFSET( VipsForeignSaveCsv, filename ),
		NULL );

	VIPS_ARG_STRING( class, "separator", 13, 
		_( "Separator" ), 
		_( "Separator characters" ),
		VIPS_ARGUMENT_OPTIONAL_INPUT,
		G_STRUCT_OFFSET( VipsForeignSaveCsv, separator ),
		"\t" ); 
}

static void
vips_foreign_save_csv_init( VipsForeignSaveCsv *csv )
{
	csv->separator = g_strdup( "\t" );
}


vips_foreign_find_save ()

const char *        vips_foreign_find_save              (const char *filename);

Searches for an operation you could use to write to filename.

filename may not contain embedded options. See vips_foreign_find_save_options() if your filename may have options in.

See also: vips_foreign_write().

filename :

name to find a saver for

Returns :

the name of an operation on success, NULL on error

vips_foreign_find_save_options ()

const char *        vips_foreign_find_save_options      (const char *filename);

Searches for an operation you could use to write to filename.

filename may contain embedded options. See vips_foreign_find_save() if your filename does not options in.

See also: vips_foreign_write().

filename :

name to find a saver for

Returns :

0 on success, -1 on error

vips_foreign_load ()

int                 vips_foreign_load                   (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Loads filename into out using the loader recommended by vips_foreign_find_load().

See also: vips_foreign_save(), vips_foreign_load_options().

filename :

file to load

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_foreign_save ()

int                 vips_foreign_save                   (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Saves in to filename using the saver recommended by vips_foreign_find_save(). Options are not in filename but must be given as a NULL-terminated list of name-value pairs.

See also: vips_foreign_load().

in :

image to write

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_foreign_load_options ()

int                 vips_foreign_load_options           (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Loads filename into out using the loader recommended by vips_foreign_find_load().

Arguments to the loader may be embedded in the filename using the usual syntax. They may also be given as a set of NULL-terminated optional arguments.

See also: vips_foreign_load().

filename :

file to load

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_foreign_save_options ()

int                 vips_foreign_save_options           (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Saves in to filename using the saver recommended by vips_foreign_find_save().

Arguments to the saver may be embedded in the filename using the usual syntax. They may also be given as a set of NULL-terminated optional arguments.

See also: vips_foreign_save().

in :

image to write

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_openslideload ()

int                 vips_openslideload                  (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

layer: load this layer associated: load this associated image

Read a virtual slide supported by the OpenSlide library into a VIPS image. OpenSlide supports images in Aperio, Hamamatsu VMS, Hamamatsu VMU, MIRAX, and Trestle formats.

To facilitate zooming, virtual slide formats include multiple scaled-down versions of the high-resolution image. These are typically called "levels", though OpenSlide and im_openslide2vips() call them "layers". By default, vips_openslideload() reads the highest-resolution layer (layer 0). Set layer to the layer number you want.

In addition to the slide image itself, virtual slide formats sometimes include additional images, such as a scan of the slide's barcode. OpenSlide calls these "associated images". To read an associated image, set associated to the image's name. A slide's associated images are listed in the "slide-associated-images" metadata item.

The output of this operator is in pre-multipled ARGB format. Use im_argb2rgba() to decode to png-style RGBA.

See also: vips_image_new_from_file().

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_jpegload ()

int                 vips_jpegload                       (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

shrink: shrink by this much on load fail: fail on warnings

Read a JPEG file into a VIPS image. It can read most 8-bit JPEG images, including CMYK and YCbCr.

shrink means shrink by this integer factor during load. Possible values are 1, 2, 4 and 8. Shrinking during read is very much faster than decompressing the whole image and then shrinking later.

Setting fail to true makes the JPEG reader fail on any warnings. This can be useful for detecting truncated files, for example. Normally reading these produces a warning, but no fatal error.

Example:

vips_jpegload( "fred.jpg", &out,
	"shrink", 8,
	"fail", TRUE,
	NULL );

Any embedded ICC profiles are ignored: you always just get the RGB from the file. Instead, the embedded profile will be attached to the image as VIPS_META_ICC_NAME ("icc-profile-data"). You need to use something like vips_icc_import() to get CIE values from the file.

EXIF metadata is attached as VIPS_META_EXIF_NAME ("exif-data"), IPCT as VIPS_META_IPCT_NAME ("ipct-data"), and XMP as VIPS_META_XMP_NAME ("xmp-data").

The int metadata item "jpeg-multiscan" is set to the result of jpeg_has_multiple_scans(). Interlaced jpeg images need a large amount of memory to load, so this field gives callers a chance to handle these images differently.

The EXIF thumbnail, if present, is attached to the image as "jpeg-thumbnail-data". See vips_image_get_blob().

This function only reads the image header and does not decompress any pixel data. Decompression only occurs when pixels are accessed by some other function.

See also: vips_jpegload_buffer(), vips_image_new_from_file().

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_jpegload_buffer ()

int                 vips_jpegload_buffer                (void *buf,
                                                         size_t len,
                                                         VipsImage **out,
                                                         ...);

Read a JPEG-formatted memory block into a VIPS image. It can read most 8-bit JPEG images, including CMYK and YCbCr.

This function is handy for processing JPEG image thumbnails.

Caution: on return only the header will have been read, the pixel data is not decompressed until the first pixel is read. Therefore you must not free buf until you have read pixel data from out.

See also: vips_jpegload().

buf :

memory area to load

len :

size of memory area

out :

image to write

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_jpegsave ()

int                 vips_jpegsave                       (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Optional arguments:

Q: quality factor profile: attach this ICC profile optimize_coding: compute optimal Huffman coding tables interlace: write an interlaced (progressive) jpeg strip: remove all metadata from image no-subsample: disable chroma subsampling

Write a VIPS image to a file as JPEG.

Use Q to set the JPEG compression factor. Default 75.

Use profile to give the filename of a profile to be embedded in the JPEG. This does not affect the pixels which are written, just the way they are tagged. You can use the special string "none" to mean "don't attach a profile".

If no profile is specified and the VIPS header contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the profile from the VIPS header will be attached.

The image is automatically converted to RGB, Monochrome or CMYK before saving.

EXIF data is constructed from VIPS_META_EXIF_NAME ("exif-data"), then modified with any other related tags on the image before being written to the file.

IPCT as VIPS_META_IPCT_NAME ("ipct-data") and XMP as VIPS_META_XMP_NAME ("xmp-data") are coded and attached.

If optimize_coding is set, the Huffman tables are optimised. This is sllightly slower and produces slightly smaller files.

If interlace is set, the jpeg files will be interlaced (progressive jpeg, in jpg parlance). These files may be better for display over a slow network conection, but need much more memory to encode and decode.

If strip is set, no EXIF data, IPCT data, ICC profile or XMP metadata is written into the output file.

If no-subsample is set, chrominance subsampling is disabled. This will improve quality at the cost of larger file size. Useful for high Q factors.

See also: vips_jpegsave_buffer(), vips_image_write_file().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_jpegsave_buffer ()

int                 vips_jpegsave_buffer                (VipsImage *in,
                                                         void **buf,
                                                         size_t *len,
                                                         ...);

Optional arguments:

Q: JPEG quality factor profile: attach this ICC profile optimize_coding: compute optimal Huffman coding tables interlace: write an interlaced (progressive) jpeg strip: remove all metadata from image no-subsample: disable chroma subsampling

As vips_jpegsave(), but save to a memory buffer.

The address of the buffer is returned in obuf, the length of the buffer in olen. You are responsible for freeing the buffer with g_free() when you are done with it.

See also: vips_jpegsave(), vips_image_write_to_file().

in :

image to save

buf :

return output buffer here

len :

return output length here

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_jpegsave_mime ()

int                 vips_jpegsave_mime                  (VipsImage *in,
                                                         ...);

Optional arguments:

Q: JPEG quality factor profile: attach this ICC profile optimize_coding: compute optimal Huffman coding tables strip: remove all metadata from image no-subsample: disable chroma subsampling

As vips_jpegsave(), but save as a mime jpeg on stdout.

See also: vips_jpegsave(), vips_image_write_to_file().

in :

image to save

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_webpload ()

int                 vips_webpload                       (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

Read a webp file into a VIPS image.

See also:

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_webpload_buffer ()

int                 vips_webpload_buffer                (void *buf,
                                                         size_t len,
                                                         VipsImage **out,
                                                         ...);

See also:

buf :

memory area to load

len :

size of memory area

out :

image to write

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_webpsave ()

int                 vips_webpsave                       (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Optional arguments:

Q: quality factor

See also:

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_webpsave_buffer ()

int                 vips_webpsave_buffer                (VipsImage *in,
                                                         void **buf,
                                                         size_t *len,
                                                         ...);

Optional arguments:

Q: JPEG quality factor

See also:

in :

image to save

buf :

return output buffer here

len :

return output length here

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_webpsave_mime ()

int                 vips_webpsave_mime                  (VipsImage *in,
                                                         ...);

Optional arguments:

Q: quality factor

See also:

in :

image to save

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

enum VipsForeignTiffCompression

typedef enum {
	VIPS_FOREIGN_TIFF_COMPRESSION_NONE,
	VIPS_FOREIGN_TIFF_COMPRESSION_JPEG,
	VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE,
	VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS,
	VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4,
	VIPS_FOREIGN_TIFF_COMPRESSION_LZW,
	VIPS_FOREIGN_TIFF_COMPRESSION_LAST
} VipsForeignTiffCompression;

The compression types supported by the tiff writer.

Use Q to set the jpeg compression level, default 75.

Use prediction to set the lzw or deflate prediction, default none.

VIPS_FOREIGN_TIFF_COMPRESSION_NONE

no compression

VIPS_FOREIGN_TIFF_COMPRESSION_JPEG

jpeg compression

VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE

deflate (zip) compression

VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS

packbits compression

VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4

fax4 compression

VIPS_FOREIGN_TIFF_COMPRESSION_LZW

LZW compression

VIPS_FOREIGN_TIFF_COMPRESSION_LAST


enum VipsForeignTiffPredictor

typedef enum {
	VIPS_FOREIGN_TIFF_PREDICTOR_NONE = 1,
	VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL = 2,
	VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT = 3,
	VIPS_FOREIGN_TIFF_PREDICTOR_LAST
} VipsForeignTiffPredictor;

The predictor can help deflate and lzw compression. The values are fixed by the tiff library.

VIPS_FOREIGN_TIFF_PREDICTOR_NONE

no prediction

VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL

horizontal differencing

VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT

float predictor

VIPS_FOREIGN_TIFF_PREDICTOR_LAST


enum VipsForeignTiffResunit

typedef enum {
	VIPS_FOREIGN_TIFF_RESUNIT_CM,
	VIPS_FOREIGN_TIFF_RESUNIT_INCH,
	VIPS_FOREIGN_TIFF_RESUNIT_LAST
} VipsForeignTiffResunit;

Use inches or centimeters as the resolution unit for a tiff file.

VIPS_FOREIGN_TIFF_RESUNIT_CM

use centimeters

VIPS_FOREIGN_TIFF_RESUNIT_INCH

use inches

VIPS_FOREIGN_TIFF_RESUNIT_LAST


vips_tiffload ()

int                 vips_tiffload                       (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

page: load this page

Read a TIFF file into a VIPS image. It is a full baseline TIFF 6 reader, with extensions for tiled images, multipage images, LAB colour space, pyramidal images and JPEG compression. including CMYK and YCbCr.

page means load this page from the file. By default the first page (page 0) is read.

Any ICC profile is read and attached to the VIPS image.

See also: vips_image_new_from_file().

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_tiffsave ()

int                 vips_tiffsave                       (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Optional arguments:

compression; use this compression scheme Q: quality factor predictor; compress with this prediction profile: attach this ICC profile tile; set TRUE to write a tiled tiff tile_width; set tile size tile_height; set tile size pyramid; set TRUE to write an image pyramid squash; squash 8-bit images down to 1 bit resunit; convert resolution to pixels per inch or cm during write xres; horizontal resolution in pixels/mm yres; vertical resolution in pixels/mm bigtiff; write a BigTiff file

Write a VIPS image to a file as TIFF.

Use compression to set the tiff compression. Currently jpeg, packbits, fax4, lzw, none and deflate are supported. The default is no compression. JPEG compression is a good lossy compressor for photographs, packbits is good for 1-bit images, and deflate is the best lossless compression TIFF can do. LZW has patent problems and is no longer recommended.

Use Q to set the JPEG compression factor. Default 75.

Use predictor to set the predictor for lzw and deflate compression.

Predictor is not set by default. There are three predictor values recognised at the moment (2007, July): 1 is no prediction, 2 is a horizontal differencing and 3 is a floating point predictor. Refer to the libtiff specifications for further discussion of various predictors. In short, predictor helps to better compress image, especially in case of digital photos or scanned images and bit depths > 8. Try it to find whether it works for your images.

Use profile to give the filename of a profile to be embedded in the TIFF. This does not affect the pixels which are written, just the way they are tagged. You can use the special string "none" to mean "don't attach a profile".

If no profile is specified and the VIPS header contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the profile from the VIPS header will be attached.

Set tile to TRUE to write a tiled tiff. By default tiff are written in strips. Use tile_width and tile_height to set the tile size. The defaiult is 128 by 128.

Set pyramid to write the image as a set of images, one per page, of decreasing size.

Set squash to make 8-bit uchar images write as 1-bit TIFFs with zero pixels written as 0 and non-zero as 1.

Use resunit to override the default resolution unit. The default resolution unit is taken from the header field "resolution-unit" (VIPS_META_RESOLUTION_UNIT in C). If this field is not set, then VIPS defaults to cm.

Use xres and yres to override the default horizontal and vertical resolutions. By default these values are taken from the VIPS image header. libvips resolution is always in pixels per millimetre.

Set bigtiff to attempt to write a bigtiff. Bigtiff is a variant of the TIFF format that allows more than 4GB in a file.

See also: vips_tiffload(), vips_image_write_file().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_openexrload ()

int                 vips_openexrload                    (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Read a OpenEXR file into a VIPS image.

The reader can handle scanline and tiled OpenEXR images. It can't handle OpenEXR colour management, image attributes, many pixel formats, anything other than RGBA.

This reader uses the rather limited OpenEXR C API. It should really be redone in C++.

See also: vips_image_new_from_file().

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_fitsload ()

int                 vips_fitsload                       (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Read a FITS image file into a VIPS image.

See also: vips_image_new_from_file().

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_fitssave ()

int                 vips_fitssave                       (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Write a VIPS image to a file as FITS.

See also: vips_image_write_file().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_analyzeload ()

int                 vips_analyzeload                    (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Load an Analyze 6.0 file. If filename is "fred.img", this will look for an image header called "fred.hdr" and pixel data in "fred.img". You can also load "fred" or "fred.hdr".

Images are loaded lazilly and byte-swapped, if necessary. The Analyze metadata is read and attached.

See also: vips_image_new_from_file().

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_rawload ()

int                 vips_rawload                        (const char *filename,
                                                         VipsImage **out,
                                                         int width,
                                                         int height,
                                                         int bands,
                                                         ...);

Optional arguments:

width: width of image in pixels height: height of image in pixels bands: number of image bands offset: offset in bytes from start of file

This operation mmaps the file, setting out so that access to that image will read from the file.

Use functions like vips_copy() to set the pixel type, byte ordering and so on.

See also: vips_image_new_from_file().

filename :

file to load

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_rawsave ()

int                 vips_rawsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Writes the pixels in in to the file filename with no header or other metadata.

See also: vips_image_write_file().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_rawsave_fd ()

int                 vips_rawsave_fd                     (VipsImage *in,
                                                         int fd,
                                                         ...);

Writes the pixels in in to the fd with no header or other metadata. Handy for implementing other savers.

See also: vips_rawsave().

in :

image to save

fd :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_csvload ()

int                 vips_csvload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

skip: skip this many lines at start of file lines: read this many lines from file whitespace: set of whitespace characters separator: set of separator characters

Load a CSV (comma-separated values) file. The output image is always 1 band (monochrome), VIPS_FORMAT_DOUBLE.

Items in lines can be either floating point numbers in the C locale, or strings enclosed in double-quotes ("), or empty. You can use a backslash (\) within the quotes to escape special characters, such as quote marks.

The reader is deliberately rather fussy: it will fail if there are any short lines, or if the file is too short. It will ignore lines that are too long.

skip sets the number of lines to skip at the start of the file. Default zero.

lines sets the number of lines to read from the file. Default -1, meaning read all lines to end of file.

whitespace sets the skippable whitespace characters. Default space. Whitespace characters are always run together.

separator sets the characters that separate fields. Default ;,tab. Separators are never run together.

See also: vips_image_new_from_file().

filename :

file to load

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_csvsave ()

int                 vips_csvsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Optional arguments:

separator: separator string

Writes the pixels in in to the filename as CSV (comma-separated values). The image is written one line of text per scanline. Complex numbers are written as "(real,imaginary)" and will need extra parsing I guess. Only the first band is written.

separator gives the string to use to separate numbers in the output. The default is "\\t" (tab).

See also: vips_image_write_file().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_matrixload ()

int                 vips_matrixload                     (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Reads a matrix from a file.

Matrix files have a simple format that's supposed to be easy to create with a text editor or a spreadsheet.

The first line has four numbers for width, height, scale and offset (scale and offset may be omitted, in which case they default to 1.0 and 0.0). Scale must be non-zero. Width and height must be positive integers. The numbers are separated by any mixture of spaces, commas, tabs and quotation marks ("). The scale and offset fields may be floating-point, and must use '.' as a decimal separator.

Subsequent lines each hold one line of matrix data, with numbers again separated by any mixture of spaces, commas, tabs and quotation marks ("). The numbers may be floating-point, and must use '.' as a decimal separator.

Extra characters at the ends of lines or at the end of the file are ignored.

See also: vips_csvload().

filename :

file to load

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_matrixsave ()

int                 vips_matrixsave                     (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Write in to filename in matrix format. See vips_matrixload() for a description of the format.

See also: vips_matrixload().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_matrixprint ()

int                 vips_matrixprint                    (VipsImage *in,
                                                         ...);

Print in to stdout in matrix format. See vips_matrixload() for a description of the format.

See also: vips_matrixload().

in :

image to print

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_magickload ()

int                 vips_magickload                     (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

all_frames: load all frames in sequence

Read in an image using libMagick, the ImageMagick library. This library can read more than 80 file formats, including SVG, BMP, EPS, DICOM and many others. The reader can handle any ImageMagick image, including the float and double formats. It will work with any quantum size, including HDR. Any metadata attached to the libMagick image is copied on to the VIPS image.

The reader should also work with most versions of GraphicsMagick. See the "--with-magickpackage" configure option.

Normally it will only load the first image in a many-image sequence (such as a GIF). Set all_frames to true to read the whole image sequence.

See also: vips_image_new_from_file().

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_pngload ()

int                 vips_pngload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

Read a PNG file into a VIPS image. It can read all png images, including 8- and 16-bit images, 1 and 3 channel, with and without an alpha channel.

Any ICC profile is read and attached to the VIPS image.

See also: vips_image_new_from_file().

filename :

file to load

out :

decompressed image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_pngload_buffer ()

int                 vips_pngload_buffer                 (void *buf,
                                                         size_t len,
                                                         VipsImage **out,
                                                         ...);

Read a PNG-formatted memory block into a VIPS image. It can read all png images, including 8- and 16-bit images, 1 and 3 channel, with and without an alpha channel.

Any ICC profile is read and attached to the VIPS image.

Caution: on return only the header will have been read, the pixel data is not decompressed until the first pixel is read. Therefore you must not free buf until you have read pixel data from out.

See also: vips_pngload().

buf :

memory area to load

len :

size of memory area

out :

image to write

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_pngsave ()

int                 vips_pngsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Optional arguments:

compression: compression level interlace: interlace image

Write a VIPS image to a file as PNG.

compression means compress with this much effort (0 - 9). Default 6.

Set interlace to TRUE to interlace the image with ADAM7 interlacing. Beware than an interlaced PNG can be up to 7 times slower to write than a non-interlaced image.

If the VIPS header contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the profile from the VIPS header will be attached.

The image is automatically converted to RGB, RGBA, Monochrome or Mono + alpha before saving. Images with more than one byte per band element are saved as 16-bit PNG, others are saved as 8-bit PNG.

See also: vips_image_new_from_file().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_pngsave_buffer ()

int                 vips_pngsave_buffer                 (VipsImage *in,
                                                         void **buf,
                                                         size_t *len,
                                                         ...);

Optional arguments:

compression: compression level interlace: interlace image

As vips_pngsave(), but save to a memory buffer.

The address of the buffer is returned in obuf, the length of the buffer in olen. You are responsible for freeing the buffer with g_free() when you are done with it.

See also: vips_pngsave(), vips_image_write_to_file().

in :

image to save

buf :

return output buffer here

len :

return output length here

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_ppmload ()

int                 vips_ppmload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Read a PPM/PBM/PGM/PFM file into a VIPS image.

It can read 1, 8, 16 and 32 bit images, colour or monochrome, stored in binary or in ASCII. One bit images become 8 bit VIPS images, with 0 and 255 for 0 and 1.

See also: vips_image_new_from_file().

filename :

file to load

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_ppmsave ()

int                 vips_ppmsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Optional arguments:

ascii: save as ASCII rather than binary

Write a VIPS image to a file as PPM. It can write 8, 16 or 32 bit unsigned integer images, float images, colour or monochrome, stored as binary or ASCII. Integer images of more than 8 bits can only be stored in ASCII.

When writing float (PFM) images the scale factor is set from the "pfm-scale" metadata.

Set ascii to TRUE to write as human-readable ASCII. Normally data is written in binary.

The storage format is indicated by a filename extension. Use one of .pbm, .pgm, .ppm, .pfm.

See also: vips_image_write_file().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_matload ()

int                 vips_matload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Read a Matlab save file into a VIPS image.

This operation searches the save file for the first array variable with between 1 and 3 dimensions and loads it as an image. It will not handle complex images. It does not handle sparse matrices.

See also: vips_image_new_from_file().

filename :

file to load

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_radload ()

int                 vips_radload                        (const char *filename,
                                                         VipsImage **out,
                                                         ...);

Read a Radiance (HDR) file into a VIPS image.

Radiance files are read as VIPS_CODING_RAD. They have one byte for each of red, green and blue, and one byte of shared exponent. Some operations (like vips_extract_area()) can work directly with images in this format, but mmany (all the arithmetic operations, for example) will not. Unpack VIPS_CODING_RAD images to 3 band float with im_rad2float() if you want to do arithmetic on them.

This operation ignores some header fields, like VIEW and DATE. It will not rotate/flip as the FORMAT string asks.

Sections of this reader from Greg Ward and Radiance with kind permission.

See also: vips_image_new_from_file().

filename :

file to load

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_radsave ()

int                 vips_radsave                        (VipsImage *in,
                                                         const char *filename,
                                                         ...);

Write a VIPS image in Radiance (HDR) format.

Sections of this reader from Greg Ward and Radiance with kind permission.

See also: vips_image_write_file().

in :

image to save

filename :

file to write to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

enum VipsForeignDzLayout

typedef enum {
	VIPS_FOREIGN_DZ_LAYOUT_DZ,
	VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY,
	VIPS_FOREIGN_DZ_LAYOUT_GOOGLE,
	VIPS_FOREIGN_DZ_LAYOUT_LAST
} VipsForeignDzLayout;

What directory layout and metadata standard to use.

VIPS_FOREIGN_DZ_LAYOUT_DZ

use DeepZoom directory layout

VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY

use Zoomify directory layout

VIPS_FOREIGN_DZ_LAYOUT_GOOGLE

use Google maps directory layout

VIPS_FOREIGN_DZ_LAYOUT_LAST


enum VipsForeignDzDepth

typedef enum {
	VIPS_FOREIGN_DZ_DEPTH_1PIXEL,
	VIPS_FOREIGN_DZ_DEPTH_1TILE,
	VIPS_FOREIGN_DZ_DEPTH_1,
	VIPS_FOREIGN_DZ_DEPTH_LAST
} VipsForeignDzDepth;

How many pyramid layers to create.

VIPS_FOREIGN_DZ_DEPTH_1PIXEL

create layers down to 1x1 pixel

VIPS_FOREIGN_DZ_DEPTH_1TILE

create layers down to 1x1 tile

VIPS_FOREIGN_DZ_DEPTH_1

only create a single layer

VIPS_FOREIGN_DZ_DEPTH_LAST


vips_dzsave ()

int                 vips_dzsave                         (VipsImage *in,
                                                         const char *basename,
                                                         ...);

Optional arguments:

layout; directory layout convention suffix: suffix for tile tiles overlap; set tile overlap tile_size; set tile size background: background colour depth: how deep to make the pyramid centre: centre the tiles angle: rotate the image by this much

Save an image as a set of tiles at various resolutions. By default dzsave uses DeepZoom layout -- use layout to pick other conventions.

In DeepZoom layout a directory called "basename_files" is created to hold the tiles, and an XML file called "basename.dzi" is written with the image metadata,

In Zoomify and Google layout, a directory called basename is created to hold the tile structure.

You can set suffix to something like ".jpg[Q=85]" to control the tile write options.

In Google layout mode, edge tiles are expanded to tile_size by tile_size pixels. Normally they are filled with white, but you can set another colour with background. Images are usually placed at the top-left of the tile, but you can have them centred by turning on centre.

You can set the size and overlap of tiles with tile_size and overlap. They default to the correct settings for the selected layout.

Use depth to control how low the pyramid goes. This defaults to the correct setting for the layout you select.

See also: vips_tiffsave().

in :

image to save

basename :

basename to save to

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

Property Details

The "access" property

  "access"                   VipsAccess            : Read / Write

Required access pattern for this file.

Default value: VIPS_ACCESS_RANDOM


The "disc" property

  "disc"                     gboolean              : Read / Write

Open to disc.

Default value: TRUE


The "flags" property

  "flags"                    VipsForeignFlags      : Read / Write

Flags for this file.


The "out" property

  "out"                      VipsImage*            : Read / Write

Output image.


The "sequential" property

  "sequential"               gboolean              : Read / Write

Sequential read only.

Default value: FALSE


The "in" property

  "in"                       VipsImage*            : Read / Write

Image to save.


The "strip" property

  "strip"                    gboolean              : Read / Write

Strip all metadata from image.

Default value: FALSE

See Also

image
vips-7.38.5/doc/reference/html/libvips-transform.html0000644000175000017500000004267312303146332017547 00000000000000 transform

transform

transform

Synopsis

                    VipsTransformation;
void                vips__transform_init                (VipsTransformation *trn);
int                 vips__transform_calc_inverse        (VipsTransformation *trn);
int                 vips__transform_isidentity          (const VipsTransformation *trn);
int                 vips__transform_add                 (const VipsTransformation *in1,
                                                         const VipsTransformation *in2,
                                                         VipsTransformation *out);
void                vips__transform_print               (const VipsTransformation *trn);
void                vips__transform_forward_point       (const VipsTransformation *trn,
                                                         const double x,
                                                         const double y,
                                                         double *ox,
                                                         double *oy);
void                vips__transform_invert_point        (const VipsTransformation *trn,
                                                         const double x,
                                                         const double y,
                                                         double *ox,
                                                         double *oy);
void                vips__transform_forward_rect        (const VipsTransformation *trn,
                                                         const VipsRect *in,
                                                         VipsRect *out);
void                vips__transform_invert_rect         (const VipsTransformation *trn,
                                                         const VipsRect *in,
                                                         VipsRect *out);
void                vips__transform_set_area            (VipsTransformation *Param1);
int                 vips__affine                        (VipsImage *in,
                                                         VipsImage *out,
                                                         VipsTransformation *trn);

Description

Details

VipsTransformation

typedef struct {
	/* Area of input we can use. This can be smaller than the real input 
	 * image: we expand the input to add extra pixels for interpolation. 
	 */
	VipsRect iarea;			

	/* The area of the output we've been asked to generate. left/top can
	 * be negative.
	 */
	VipsRect oarea;

	/* The transform.
	 */
	double a, b, c, d;		
	double idx, idy;
	double odx, ody;

	double ia, ib, ic, id;		/* Inverse of matrix abcd */
} VipsTransformation;


vips__transform_init ()

void                vips__transform_init                (VipsTransformation *trn);


vips__transform_calc_inverse ()

int                 vips__transform_calc_inverse        (VipsTransformation *trn);


vips__transform_isidentity ()

int                 vips__transform_isidentity          (const VipsTransformation *trn);


vips__transform_add ()

int                 vips__transform_add                 (const VipsTransformation *in1,
                                                         const VipsTransformation *in2,
                                                         VipsTransformation *out);


vips__transform_print ()

void                vips__transform_print               (const VipsTransformation *trn);


vips__transform_forward_point ()

void                vips__transform_forward_point       (const VipsTransformation *trn,
                                                         const double x,
                                                         const double y,
                                                         double *ox,
                                                         double *oy);


vips__transform_invert_point ()

void                vips__transform_invert_point        (const VipsTransformation *trn,
                                                         const double x,
                                                         const double y,
                                                         double *ox,
                                                         double *oy);


vips__transform_forward_rect ()

void                vips__transform_forward_rect        (const VipsTransformation *trn,
                                                         const VipsRect *in,
                                                         VipsRect *out);


vips__transform_invert_rect ()

void                vips__transform_invert_rect         (const VipsTransformation *trn,
                                                         const VipsRect *in,
                                                         VipsRect *out);


vips__transform_set_area ()

void                vips__transform_set_area            (VipsTransformation *Param1);


vips__affine ()

int                 vips__affine                        (VipsImage *in,
                                                         VipsImage *out,
                                                         VipsTransformation *trn);

vips-7.38.5/doc/reference/html/libvips-mosaicing.html0000644000175000017500000030441712303146332017502 00000000000000 mosaicing

mosaicing

mosaicing — build image mosaics

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

int                 im_match_linear                     (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2);
int                 im_match_linear_search              (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int hwindowsize,
                                                         int hsearchsize);
int                 im_lrmerge                          (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int dx,
                                                         int dy,
                                                         int mwidth);
int                 im_tbmerge                          (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int dx,
                                                         int dy,
                                                         int mwidth);
int                 im_lrmerge1                         (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int mwidth);
int                 im_tbmerge1                         (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int mwidth);
int                 im_lrmosaic                         (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int bandno,
                                                         int xref,
                                                         int yref,
                                                         int xsec,
                                                         int ysec,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         int balancetype,
                                                         int mwidth);
int                 im_tbmosaic                         (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int bandno,
                                                         int xref,
                                                         int yref,
                                                         int xsec,
                                                         int ysec,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         int balancetype,
                                                         int mwidth);
int                 im_lrmosaic1                        (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int bandno,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         int balancetype,
                                                         int mwidth);
int                 im_tbmosaic1                        (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int bandno,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         int balancetype,
                                                         int mwidth);
int                 im_global_balance                   (VipsImage *in,
                                                         VipsImage *out,
                                                         double gamma);
int                 im_global_balancef                  (VipsImage *in,
                                                         VipsImage *out,
                                                         double gamma);
int                 im_correl                           (VipsImage *ref,
                                                         VipsImage *sec,
                                                         int xref,
                                                         int yref,
                                                         int xsec,
                                                         int ysec,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         double *correlation,
                                                         int *x,
                                                         int *y);
int                 im_remosaic                         (VipsImage *in,
                                                         VipsImage *out,
                                                         const char *old_str,
                                                         const char *new_str);
int                 im_align_bands                      (VipsImage *in,
                                                         VipsImage *out);
int                 im_maxpos_subpel                    (VipsImage *in,
                                                         double *x,
                                                         double *y);

Description

These functions are useful for joining many small images together to make one large image. They can cope with unstable contrast and arbitary sub-image layout, but will not do any geometric correction. Geometric errors should be removed before using these functions.

The mosaicing functions can be grouped into layers:

The lowest level functions are im_correl(), im_lrmerge() and im_tbmerge(). im_correl() searches a large image for a small sub-image, returning the position of the best sub-image match. im_lrmerge() and im_tbmerge() join two images together left-right or up-down with a smooth seam.

Next, im_lrmosaic() and im_tbmosaic() use the search function plus the two low-level merge operations to join two images given just an approximate overlap as a start point.

The functions im_lrmosaic1() and im_tbmosaic1() are first-order analogues of the basic mosaic functions: they take two approximate tie-points and use them to rotate and scale the right-hand or bottom image before starting to join.

Finally, im_global_balance() can be used to remove contrast differences in a mosaic which has been assembled with these functions. It takes the mosaic apart, measures image contrast differences along the seams, finds a set of correction factors which will minimise these differences, and reassembles the mosaic. im_remosaic() uses the same techniques, but will reassemble the image from a different set of source images.

Details

im_match_linear ()

int                 im_match_linear                     (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2);

Scale, rotate and translate sec so that the tie-points line up.

See also: im_match_linear_search().

ref :

reference image

sec :

secondary image

out :

output image

xr1 :

first reference tie-point

yr1 :

first reference tie-point

xs1 :

first secondary tie-point

ys1 :

first secondary tie-point

xr2 :

second reference tie-point

yr2 :

second reference tie-point

xs2 :

second secondary tie-point

ys2 :

second secondary tie-point

Returns :

0 on success, -1 on error

im_match_linear_search ()

int                 im_match_linear_search              (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int hwindowsize,
                                                         int hsearchsize);

Scale, rotate and translate sec so that the tie-points line up.

Before performing the transformation, the tie-points are improved by searching an area of sec of size hsearchsize for a match of size hwindowsize to ref.

This function will only work well for small rotates and scales.

See also: im_match_linear().

ref :

reference image

sec :

secondary image

out :

output image

xr1 :

first reference tie-point

yr1 :

first reference tie-point

xs1 :

first secondary tie-point

ys1 :

first secondary tie-point

xr2 :

second reference tie-point

yr2 :

second reference tie-point

xs2 :

second secondary tie-point

ys2 :

second secondary tie-point

hwindowsize :

half window size

hsearchsize :

half search size

Returns :

0 on success, -1 on error

im_lrmerge ()

int                 im_lrmerge                          (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int dx,
                                                         int dy,
                                                         int mwidth);

This operation joins two images left-right (with ref on the left) with a smooth seam.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

dx and dy give the displacement of sec relative to ref, in other words, the vector to get from the origin of sec to the origin of ref, in other words, dx will generally be a negative number.

mwidth limits the maximum width of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.

Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.

See also: im_lrmosaic(), im_tbmerge(), im_match_linear(), im_insert().

ref :

reference image

sec :

secondary image

out :

output image

dx :

displacement of ref from sec

dy :

displacement of ref from sec

mwidth :

maximum seam width

Returns :

0 on success, -1 on error

im_tbmerge ()

int                 im_tbmerge                          (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int dx,
                                                         int dy,
                                                         int mwidth);

This operation joins two images top-bottom (with ref on the top) with a smooth seam.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

dx and dy give the displacement of sec relative to ref, in other words, the vector to get from the origin of sec to the origin of ref, in other words, dx will generally be a negative number.

mwidth limits the maximum height of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.

Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.

See also: im_lrmosaic(), im_lrmerge(), im_match_linear(), im_insert().

ref :

reference image

sec :

secondary image

out :

output image

dx :

displacement of ref from sec

dy :

displacement of ref from sec

mwidth :

maximum seam width

Returns :

0 on success, -1 on error

im_lrmerge1 ()

int                 im_lrmerge1                         (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int mwidth);

This operation joins two images left-right (with ref on the left) given a pair of tie-points. sec is scaled and rotated as necessary before the join.

mwidth limits the maximum width of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.

Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: im_tbmerge1(), im_lrmerge(), im_insert(), im_global_balance().

ref :

reference image

sec :

secondary image

out :

output image

xr1 :

first reference tie-point

yr1 :

first reference tie-point

xs1 :

first secondary tie-point

ys1 :

first secondary tie-point

xr2 :

second reference tie-point

yr2 :

second reference tie-point

xs2 :

second secondary tie-point

ys2 :

second secondary tie-point

mwidth :

maximum blend width

Returns :

0 on success, -1 on error

im_tbmerge1 ()

int                 im_tbmerge1                         (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int mwidth);

This operation joins two images top-bottom (with ref on the top) given a pair of tie-points. sec is scaled and rotated as necessary before the join.

mwidth limits the maximum height of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.

Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: im_lrmerge1(), im_tbmerge(), im_insert(), im_global_balance().

ref :

reference image

sec :

secondary image

out :

output image

xr1 :

first reference tie-point

yr1 :

first reference tie-point

xs1 :

first secondary tie-point

ys1 :

first secondary tie-point

xr2 :

second reference tie-point

yr2 :

second reference tie-point

xs2 :

second secondary tie-point

ys2 :

second secondary tie-point

mwidth :

maximum blend width

Returns :

0 on success, -1 on error

im_lrmosaic ()

int                 im_lrmosaic                         (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int bandno,
                                                         int xref,
                                                         int yref,
                                                         int xsec,
                                                         int ysec,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         int balancetype,
                                                         int mwidth);

This operation joins two images left-right (with ref on the left) given an approximate overlap.

sec is positioned so that the pixel (xsec, ysec) lies on top of the pixel in ref at (xref, yref). The overlap area is divided into three sections, 20 high-contrast points in band bandno of image ref are found in each, and each high-contrast point is searched for in sec using hwindowsize and hsearchsize (see im_correl()).

A linear model is fitted to the 60 tie-points, points a long way from the fit are discarded, and the model refitted until either too few points remain or the model reaches good agreement.

The detected displacement is used with im_lrmerge() to join the two images together.

mwidth limits the maximum width of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.

Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: im_lrmerge(), im_tbmosaic(), im_insert(), im_global_balance().

ref :

reference image

sec :

secondary image

out :

output image

bandno :

band to search for features

xref :

position in reference image

yref :

position in reference image

xsec :

position in secondary image

ysec :

position in secondary image

hwindowsize :

half window size

hsearchsize :

half search size

balancetype :

no longer used

mwidth :

maximum blend width

Returns :

0 on success, -1 on error

im_tbmosaic ()

int                 im_tbmosaic                         (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int bandno,
                                                         int xref,
                                                         int yref,
                                                         int xsec,
                                                         int ysec,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         int balancetype,
                                                         int mwidth);

This operation joins two images top-bottom (with ref on the top) given an approximate overlap.

sec is positioned so that the pixel (xsec, ysec) lies on top of the pixel in ref at (xref, yref). The overlap area is divided into three sections, 20 high-contrast points in band bandno of image ref are found in each, and each high-contrast point is searched for in sec using hwindowsize and hsearchsize (see im_correl()).

A linear model is fitted to the 60 tie-points, points a long way from the fit are discarded, and the model refitted until either too few points remain or the model reaches good agreement.

The detected displacement is used with im_tbmerge() to join the two images together.

mwidth limits the maximum height of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.

Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: im_tbmerge(), im_lrmosaic(), im_insert(), im_global_balance().

ref :

reference image

sec :

secondary image

out :

output image

bandno :

band to search for features

xref :

position in reference image

yref :

position in reference image

xsec :

position in secondary image

ysec :

position in secondary image

hwindowsize :

half window size

hsearchsize :

half search size

balancetype :

no longer used

mwidth :

maximum blend width

Returns :

0 on success, -1 on error

im_lrmosaic1 ()

int                 im_lrmosaic1                        (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int bandno,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         int balancetype,
                                                         int mwidth);

This operation joins two images left-right (with ref on the left) given an approximate pair of tie-points. sec is scaled and rotated as necessary before the join.

Before performing the transformation, the tie-points are improved by searching band bandno in an area of sec of size hsearchsize for a match of size hwindowsize to ref.

mwidth limits the maximum width of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.

Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: im_tbmosaic1(), im_lrmerge(), im_insert(), im_global_balance().

ref :

reference image

sec :

secondary image

out :

output image

bandno :

band to search for features

xr1 :

first reference tie-point

yr1 :

first reference tie-point

xs1 :

first secondary tie-point

ys1 :

first secondary tie-point

xr2 :

second reference tie-point

yr2 :

second reference tie-point

xs2 :

second secondary tie-point

ys2 :

second secondary tie-point

hwindowsize :

half window size

hsearchsize :

half search size

balancetype :

no longer used

mwidth :

maximum blend width

Returns :

0 on success, -1 on error

im_tbmosaic1 ()

int                 im_tbmosaic1                        (VipsImage *ref,
                                                         VipsImage *sec,
                                                         VipsImage *out,
                                                         int bandno,
                                                         int xr1,
                                                         int yr1,
                                                         int xs1,
                                                         int ys1,
                                                         int xr2,
                                                         int yr2,
                                                         int xs2,
                                                         int ys2,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         int balancetype,
                                                         int mwidth);

This operation joins two images top-bottom (with ref on the top) given an approximate pair of tie-points. sec is scaled and rotated as necessary before the join.

Before performing the transformation, the tie-points are improved by searching band bandno in an area of sec of size hsearchsize for a match of size hwindowsize to ref.

mwidth limits the maximum height of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.

Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

See also: im_lrmosaic1(), im_tbmerge(), im_insert(), im_global_balance().

ref :

reference image

sec :

secondary image

out :

output image

bandno :

band to search for features

xr1 :

first reference tie-point

yr1 :

first reference tie-point

xs1 :

first secondary tie-point

ys1 :

first secondary tie-point

xr2 :

second reference tie-point

yr2 :

second reference tie-point

xs2 :

second secondary tie-point

ys2 :

second secondary tie-point

hwindowsize :

half window size

hsearchsize :

half search size

balancetype :

no longer used

mwidth :

maximum blend width

Returns :

0 on success, -1 on error

im_global_balance ()

int                 im_global_balance                   (VipsImage *in,
                                                         VipsImage *out,
                                                         double gamma);

im_global_balance() can be used to remove contrast differences in an assembled mosaic.

It reads the History field attached to in and builds a list of the source images that were used to make the mosaic and the position that each ended up at in the final image.

It opens each of the source images in turn and extracts all parts which overlap with any of the other images. It finds the average values in the overlap areas and uses least-mean-square to find a set of correction factors which will minimise overlap differences. It uses gamma to gamma-correct the source images before calculating the factors. A value of 1.0 will stop this.

Each of the source images is transformed with the appropriate correction factor, then the mosaic is reassembled. out always has the same BandFmt as in. Use im_global_balancef() to get float output and avoid clipping.

There are some conditions that must be met before this operation can work: the source images must all be present under the filenames recorded in the history on in, and the mosaic must have been built using only operations in this package.

See also: im_global_balancef(), im_remosaic().

in :

mosaic to rebuild

out :

output image

gamma :

gamma of source images

Returns :

0 on success, -1 on error

im_global_balancef ()

int                 im_global_balancef                  (VipsImage *in,
                                                         VipsImage *out,
                                                         double gamma);

Just as im_global_balance(), but the output image is always float. This stops overflow or underflow in the case of an extremely unbalanced image mosaic.

See also: im_global_balance(), im_remosaic().

in :

mosaic to rebuild

out :

output image

gamma :

gamma of source images

Returns :

0 on success, -1 on error

im_correl ()

int                 im_correl                           (VipsImage *ref,
                                                         VipsImage *sec,
                                                         int xref,
                                                         int yref,
                                                         int xsec,
                                                         int ysec,
                                                         int hwindowsize,
                                                         int hsearchsize,
                                                         double *correlation,
                                                         int *x,
                                                         int *y);

This operation finds the position of sec within ref.

The area around (xsec, ysec) is searched for the best match to the area around (xref, yref). It searches an area of size hsearchsize for a match of size hwindowsize. The position of the best match is returned, together with the correlation at that point.

Only the first band of each image is correlated. ref and sec may be very large --- the function extracts and generates just the parts needed. Correlation is done with im_spcor(); the position of the maximum is found with im_maxpos().

See also: im_match_linear(), im_match_linear_search(), im_lrmosaic().

ref :

reference image

sec :

secondary image

xref :

position in reference image

yref :

position in reference image

xsec :

position in secondary image

ysec :

position in secondary image

hwindowsize :

half window size

hsearchsize :

half search size

correlation :

return detected correlation

x :

return found position

y :

return found position

Returns :

0 on success, -1 on error

im_remosaic ()

int                 im_remosaic                         (VipsImage *in,
                                                         VipsImage *out,
                                                         const char *old_str,
                                                         const char *new_str);

im_remosaic() works rather as im_global_balance(). It takes apart the mosaiced image in and rebuilds it, substituting images.

Unlike im_global_balance(), images are substituted based on their file†names. The rightmost occurence of the string old_str is swapped for new_str, that file is opened, and that image substituted for the old image.

It's convenient for multispectral images. You can mosaic one band, then use that mosaic as a template for mosaicing the others automatically.

See also: im_lrmosaic(), im_global_balance().

in :

mosaic to rebuild

out :

output image

old_str :

gamma of source images

new_str :

gamma of source images

Returns :

0 on success, -1 on error

im_align_bands ()

int                 im_align_bands                      (VipsImage *in,
                                                         VipsImage *out);

This operation uses im_phasecor_fft() to find an integer displacement to align all image bands band 0. It is very slow and not very accurate.

Use im_estpar() in preference: it's fast and accurate.

See also: im_global_balancef(), im_remosaic().

in :

image to align

out :

output image

Returns :

0 on success, -1 on error

im_maxpos_subpel ()

int                 im_maxpos_subpel                    (VipsImage *in,
                                                         double *x,
                                                         double *y);

This function implements:

"Extension of Phase Correlation to Subpixel Registration" by H. Foroosh, from IEEE trans. Im. Proc. 11(3), 2002.

If the best three matches in the correlation are aranged:

02 or 01 1 2

then we return a subpixel match using the ratio of correlations in the vertical and horizontal dimension.

( xs[0], ys[0] ) is the best integer alignment ( xs[ use_x ], ys[ use_x ] ) is equal in y and (+/-)1 off in x ( xs[ use_y ], ys[ use_y ] ) is equal in x and (+/-)1 off in y

Alternatively if the best four matches in the correlation are aranged in a square:

01 or 03 or 02 or 03 32 12 31 21

then we return a subpixel match weighting with the sum the two on each side over the sum of all four, but only if all four of them are very close to the best, and the fifth is nowhere near.

This alternative method is not described by Foroosh, but is often the case where the match is close to n-and-a-half pixels in both dimensions.

See also: im_maxpos(), im_min(), im_stats().

in :

input image

x :

output position of maximum

y :

output position of maximum

Returns :

0 on success, -1 on error
vips-7.38.5/doc/reference/html/libvips-freqfilt.html0000644000175000017500000003766612303146332017356 00000000000000 freqfilt

freqfilt

freqfilt

Synopsis

int                 vips_fwfft                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_invfft                         (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_freqmult                       (VipsImage *in,
                                                         VipsImage *mask,
                                                         VipsImage **out,
                                                         ...);
int                 vips_spectrum                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_phasecor                       (VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);

Description

Details

vips_fwfft ()

int                 vips_fwfft                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Transform an image to Fourier space.

VIPS uses the fftw Fourier Transform library. If this library was not available when VIPS was configured, these functions will fail.

See also: vips_invfft().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_invfft ()

int                 vips_invfft                         (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

real: only output the real part

Transform an image from Fourier space to real space. The result is complex. If you are OK with a real result, set real, it's quicker.

VIPS uses the fftw Fourier Transform library. If this library was not available when VIPS was configured, these functions will fail.

See also: vips_fwfft().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_freqmult ()

int                 vips_freqmult                       (VipsImage *in,
                                                         VipsImage *mask,
                                                         VipsImage **out,
                                                         ...);

Multiply in by mask in Fourier space.

in is transformed to Fourier space, multipled with mask, then transformed back to real space. If in is already a complex image, just multiply then inverse transform.

See also: vips_invfft(), vips_mask_ideal().

in :

input image

mask :

mask image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_spectrum ()

int                 vips_spectrum                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Make a displayable (ie. 8-bit unsigned int) power spectrum.

If in is non-complex, it is transformed to Fourier space. Then the absolute value is passed through vips_scale() in log mode, and vips_wrap().

See also: vips_fwfft(), vips_scale(), vips_wrap().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_phasecor ()

int                 vips_phasecor                       (VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);

Convert the two input images to Fourier space, calculate phase-correlation, back to real space.

See also: vips_fwfft(), vips_cross_phase(),

in1 :

first input image

in2 :

second input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.
vips-7.38.5/doc/reference/html/api-index-full.html0000644000175000017500000063112612303146332016701 00000000000000 API Index

API Index

A

VIPS_ABS, macro in util
vips_abs, function in arithmetic
VipsAccess, enum in VipsImage
vips_acos, function in arithmetic
vips_add, function in arithmetic
vips_affine, function in resample
VipsAlign, enum in conversion
vips_allocate_input_array, function in generate
vips_amiMSBfirst, function in util
vips_analyzeload, function in VipsForeign
vips_andimage, function in arithmetic
vips_andimage_const, function in arithmetic
vips_andimage_const1, function in arithmetic
VipsAngle, enum in conversion
VipsAngle45, enum in conversion
VipsArea, struct in type
vips_area_copy, function in type
vips_area_get_data, function in type
vips_area_new, function in type
vips_area_new_array, function in type
vips_area_new_array_object, function in type
vips_area_new_blob, function in type
vips_area_unref, function in type
VipsArgument, struct in VipsArgument
VipsArgumentClass, struct in VipsArgument
VipsArgumentClassMapFn, user_function in VipsArgument
VipsArgumentFlags, enum in VipsArgument
VipsArgumentInstance, struct in VipsArgument
VipsArgumentMapFn, user_function in VipsArgument
VipsArgumentTable, typedef in VipsArgument
vips_argument_class_map, function in VipsArgument
VIPS_ARGUMENT_COLLECT_END, macro in VipsArgument
VIPS_ARGUMENT_COLLECT_GET, macro in VipsArgument
VIPS_ARGUMENT_COLLECT_SET, macro in VipsArgument
VIPS_ARGUMENT_FOR_ALL, macro in VipsArgument
vips_argument_map, function in VipsArgument
VIPS_ARGUMENT_OPTIONAL_INPUT, macro in VipsArgument
VIPS_ARGUMENT_OPTIONAL_OUTPUT, macro in VipsArgument
VIPS_ARGUMENT_REQUIRED_INPUT, macro in VipsArgument
VIPS_ARGUMENT_REQUIRED_OUTPUT, macro in VipsArgument
VIPS_ARG_BOOL, macro in VipsArgument
VIPS_ARG_BOXED, macro in VipsArgument
VIPS_ARG_DOUBLE, macro in VipsArgument
VIPS_ARG_ENUM, macro in VipsArgument
VIPS_ARG_FLAGS, macro in VipsArgument
VIPS_ARG_IMAGE, macro in VipsArgument
VIPS_ARG_INT, macro in VipsArgument
VIPS_ARG_INTERPOLATE, macro in VipsArgument
VIPS_ARG_POINTER, macro in VipsArgument
VIPS_ARG_STRING, macro in VipsArgument
VIPS_ARG_UINT64, macro in VipsArgument
VIPS_ARRAY, macro in memory
VipsArrayDouble, typedef in type
VipsArrayInt, typedef in type
vips_array_double_new, function in type
vips_array_double_newv, function in type
vips_array_int_new, function in type
vips_array_int_newv, function in type
vips_asin, function in arithmetic
vips_atan, function in arithmetic
vips_avg, function in arithmetic
VIPS_A_X0, macro in colour
VIPS_A_Y0, macro in colour
VIPS_A_Z0, macro in colour

B

vips_bandand, function in conversion
vips_bandbool, function in conversion
vips_bandeor, function in conversion
VipsBandFormat, enum in VipsImage
vips_bandjoin, function in conversion
vips_bandjoin2, function in conversion
vips_bandmean, function in conversion
vips_bandor, function in conversion
vips_bandrank, function in conversion
vips_band_format_is8bit, function in VipsImage
vips_band_format_iscomplex, function in VipsImage
vips_band_format_isfloat, function in VipsImage
vips_band_format_isint, function in VipsImage
vips_band_format_isuint, function in VipsImage
vips_black, function in create
vips_boolean, function in arithmetic
vips_boolean_const, function in arithmetic
vips_break_token, function in util
VipsBuf, struct in buf
vips_buf_all, function in buf
vips_buf_appendc, function in buf
vips_buf_appendd, function in buf
vips_buf_appendf, function in buf
vips_buf_appendg, function in buf
vips_buf_appendgv, function in buf
vips_buf_appendns, function in buf
vips_buf_appends, function in buf
vips_buf_appendsc, function in buf
vips_buf_append_size, function in buf
vips_buf_change, function in buf
vips_buf_destroy, function in buf
vips_buf_firstline, function in buf
vips_buf_init, function in buf
vips_buf_init_dynamic, function in buf
vips_buf_init_static, function in buf
vips_buf_is_empty, function in buf
vips_buf_is_full, function in buf
vips_buf_len, function in buf
vips_buf_removec, function in buf
vips_buf_rewind, function in buf
vips_buf_set_dynamic, function in buf
vips_buf_set_static, function in buf
VIPS_BUF_STATIC, macro in buf
vips_buf_vappendf, function in buf
vips_buildlut, function in create
VIPS_B_X0, macro in colour
VIPS_B_Y0, macro in colour
VIPS_B_Z0, macro in colour

C

vips_cache, function in conversion
vips_cache_drop_all, function in VipsOperation
vips_cache_get_max, function in VipsOperation
vips_cache_get_max_files, function in VipsOperation
vips_cache_get_max_mem, function in VipsOperation
vips_cache_get_size, function in VipsOperation
vips_cache_operation_build, function in VipsOperation
vips_cache_operation_buildp, function in VipsOperation
vips_cache_print, function in VipsOperation
vips_cache_set_dump, function in VipsOperation
vips_cache_set_max, function in VipsOperation
vips_cache_set_max_files, function in VipsOperation
vips_cache_set_max_mem, function in VipsOperation
vips_cache_set_trace, function in VipsOperation
vips_call, function in VipsOperation
VipsCallbackFn, user_function in basic
vips_call_argv, function in VipsOperation
vips_call_options, function in VipsOperation
vips_call_split, function in VipsOperation
vips_cast, function in conversion
vips_cast_char, function in conversion
vips_cast_complex, function in conversion
vips_cast_double, function in conversion
vips_cast_dpcomplex, function in conversion
vips_cast_float, function in conversion
vips_cast_int, function in conversion
vips_cast_short, function in conversion
vips_cast_uchar, function in conversion
vips_cast_uint, function in conversion
vips_cast_ushort, function in conversion
vips_ceil, function in arithmetic
vips_check_8or16, function in error
vips_check_bandno, function in error
vips_check_bands, function in error
vips_check_bands_1or3, function in error
vips_check_bands_1orn, function in error
vips_check_bands_1orn_unary, function in error
vips_check_bands_atleast, function in error
vips_check_bands_same, function in error
vips_check_coding, function in error
vips_check_coding_known, function in error
vips_check_coding_noneorlabq, function in error
vips_check_coding_same, function in error
vips_check_complex, function in error
vips_check_dmask, function in error
vips_check_dmask_1d, function in error
vips_check_format, function in error
vips_check_format_same, function in error
vips_check_hist, function in error
vips_check_imask, function in error
vips_check_init, function in vips
vips_check_int, function in error
vips_check_matrix, function in error
vips_check_mono, function in error
vips_check_noncomplex, function in error
vips_check_oddsquare, function in error
vips_check_separable, function in error
vips_check_size_same, function in error
vips_check_u8or16, function in error
vips_check_u8or16orf, function in error
vips_check_uint, function in error
vips_check_uintorf, function in error
vips_check_uncoded, function in error
vips_check_vector, function in error
vips_check_vector_length, function in error
VipsClassMapFn, user_function in VipsArgument
vips_class_find, function in VipsArgument
vips_class_map_all, function in VipsArgument
VIPS_CLIP, macro in util
VIPS_CLIP_CHAR, macro in util
VIPS_CLIP_NONE, macro in util
VIPS_CLIP_SHORT, macro in util
VIPS_CLIP_UCHAR, macro in util
VIPS_CLIP_UINT, macro in util
VIPS_CLIP_USHORT, macro in util
vips_CMC2LCh, function in colour
vips_CMC2XYZ, function in colour
VipsCoding, enum in VipsImage
vips_colourspace, function in colour
vips_colourspace_issupported, function in colour
vips_col_ab2Ch, function in colour
vips_col_ab2h, function in colour
vips_col_C2Ccmc, function in colour
vips_col_Ccmc2C, function in colour
vips_col_Ch2ab, function in colour
vips_col_Ch2hcmc, function in colour
vips_col_Chcmc2h, function in colour
vips_col_dE00, function in colour
vips_col_L2Lcmc, function in colour
vips_col_Lab2XYZ, function in colour
vips_col_Lcmc2L, function in colour
vips_col_make_tables_CMC, function in colour
vips_col_scRGB2sRGB_16, function in colour
vips_col_scRGB2sRGB_8, function in colour
vips_col_scRGB2XYZ, function in colour
vips_col_sRGB2scRGB_16, function in colour
vips_col_sRGB2scRGB_8, function in colour
vips_col_XYZ2Lab, function in colour
vips_col_XYZ2scRGB, function in colour
VipsCombine, enum in convolution
vips_compass, function in convolution
vips_complex, function in arithmetic
vips_complex2, function in arithmetic
vips_complexform, function in arithmetic
vips_complexget, function in arithmetic
vips_concurrency_get, function in VipsThreadState
vips_concurrency_set, function in VipsThreadState
vips_conj, function in arithmetic
vips_conv, function in convolution
VipsConvolution, struct in VipsConvolution
VipsConvolution:in, object property in VipsConvolution
VipsConvolution:mask, object property in VipsConvolution
VipsConvolution:out, object property in VipsConvolution
VipsConvolutionClass, struct in VipsConvolution
vips_convsep, function in convolution
vips_copy, function in conversion
vips_copy_file, function in conversion
VipsCorrelation, struct in VipsCorrelation
VipsCorrelation:in, object property in VipsCorrelation
VipsCorrelation:out, object property in VipsCorrelation
VipsCorrelation:ref, object property in VipsCorrelation
VipsCorrelationClass, struct in VipsCorrelation
vips_cos, function in arithmetic
vips_countlines, function in morphology
vips_crop, function in conversion
vips_cross_phase, function in arithmetic
vips_csvload, function in VipsForeign
vips_csvsave, function in VipsForeign
VIPS_C_X0, macro in colour
VIPS_C_Y0, macro in colour
VIPS_C_Z0, macro in colour

D

VIPS_D3250_X0, macro in colour
VIPS_D3250_Y0, macro in colour
VIPS_D3250_Z0, macro in colour
VIPS_D50_X0, macro in colour
VIPS_D50_Y0, macro in colour
VIPS_D50_Z0, macro in colour
VIPS_D55_X0, macro in colour
VIPS_D55_Y0, macro in colour
VIPS_D55_Z0, macro in colour
VIPS_D65_X0, macro in colour
VIPS_D65_Y0, macro in colour
VIPS_D65_Z0, macro in colour
VIPS_D75_X0, macro in colour
VIPS_D75_Y0, macro in colour
VIPS_D75_Z0, macro in colour
VIPS_D93_X0, macro in colour
VIPS_D93_Y0, macro in colour
VIPS_D93_Z0, macro in colour
vips_dE00, function in colour
vips_dE76, function in colour
VIPS_DEBUG_MSG, macro in debug
VIPS_DEBUG_MSG_AMBER, macro in debug
VIPS_DEBUG_MSG_GREEN, macro in debug
VIPS_DEBUG_MSG_RED, macro in debug
vips_dECMC, function in colour
VIPS_DEG, macro in util
VipsDemandStyle, enum in VipsImage
vips_deviate, function in arithmetic
VipsDirection, enum in conversion
vips_divide, function in arithmetic
vips_dzsave, function in VipsForeign

E

vips_embed, function in conversion
vips_enum_from_nick, function in util
vips_enum_nick, function in util
vips_enum_string, function in util
vips_eorimage, function in arithmetic
vips_eorimage_const, function in arithmetic
vips_eorimage_const1, function in arithmetic
vips_equal, function in arithmetic
vips_equal_const, function in arithmetic
vips_equal_const1, function in arithmetic
vips_error, function in error
vips_error_buffer, function in error
vips_error_clear, function in error
vips_error_exit, function in error
vips_error_freeze, function in error
vips_error_g, function in error
vips_error_system, function in error
vips_error_thaw, function in error
VipsExecutor, struct in vector
vips_executor_run, function in vector
vips_executor_set_array, function in vector
vips_executor_set_destination, function in vector
vips_executor_set_program, function in vector
vips_executor_set_scanline, function in vector
VIPS_EXEEXT, macro in version
vips_existsf, function in util
vips_exp, function in arithmetic
vips_exp10, function in arithmetic
VipsExtend, enum in conversion
vips_extract_area, function in conversion
vips_extract_band, function in conversion
vips_eye, function in create
VIPS_E_X0, macro in colour
VIPS_E_Y0, macro in colour
VIPS_E_Z0, macro in colour

F

vips_falsecolour, function in conversion
VipsFftProcessFn, user_function in VipsFreqfilt
vips_filename_split, function in util
vips_filename_suffix, function in util
vips_filename_suffix_match, function in util
vips_file_length, function in util
vips_fitsload, function in VipsForeign
vips_fitssave, function in VipsForeign
vips_flatten, function in conversion
vips_flip, function in conversion
vips_float2rad, function in colour
vips_floor, function in arithmetic
VipsForeign, struct in VipsForeign
VipsForeignClass, struct in VipsForeign
VipsForeignDzDepth, enum in VipsForeign
VipsForeignDzLayout, enum in VipsForeign
VipsForeignFlags, enum in VipsForeign
VipsForeignLoad, struct in VipsForeign
VipsForeignLoad:access, object property in VipsForeign
VipsForeignLoad:disc, object property in VipsForeign
VipsForeignLoad:flags, object property in VipsForeign
VipsForeignLoad:out, object property in VipsForeign
VipsForeignLoad:sequential, object property in VipsForeign
VipsForeignLoadClass, struct in VipsForeign
VipsForeignSave, struct in VipsForeign
VipsForeignSave:in, object property in VipsForeign
VipsForeignSave:strip, object property in VipsForeign
VipsForeignSaveClass, struct in VipsForeign
VipsForeignTiffCompression, enum in VipsForeign
VipsForeignTiffPredictor, enum in VipsForeign
VipsForeignTiffResunit, enum in VipsForeign
vips_foreign_find_load, function in VipsForeign
vips_foreign_find_load_options, function in VipsForeign
vips_foreign_find_save, function in VipsForeign
vips_foreign_find_save_options, function in VipsForeign
vips_foreign_flags, function in VipsForeign
vips_foreign_is_a, function in VipsForeign
vips_foreign_load, function in VipsForeign
vips_foreign_load_options, function in VipsForeign
vips_foreign_map, function in VipsForeign
vips_foreign_save, function in VipsForeign
vips_foreign_save_options, function in VipsForeign
vips_format_sizeof, function in header
vips_fractsurf, function in create
VIPS_FREE, macro in memory
vips_free, function in memory
VIPS_FREEF, macro in memory
VipsFreqfilt, struct in VipsFreqfilt
VipsFreqfilt:in, object property in VipsFreqfilt
VipsFreqfilt:out, object property in VipsFreqfilt
VipsFreqfiltClass, struct in VipsFreqfilt
vips_freqmult, function in freqfilt
vips_fwfft, function in freqfilt

G

vips_gamma, function in conversion
VIPS_GATE_FREE, macro in gate
VIPS_GATE_MALLOC, macro in gate
VIPS_GATE_START, macro in gate
VIPS_GATE_STOP, macro in gate
vips_gaussblur, function in convolution
vips_gaussmat, function in create
vips_gaussnoise, function in create
VipsGenerateFn, user_function in generate
vips_getnextoption, function in util
vips_getsuboption, function in util
vips_get_argv0, function in vips
vips_get_option_group, function in vips
vips_get_tile_size, function in VipsThreadState
vips_grey, function in create
vips_grid, function in conversion
vips_guess_libdir, function in vips
vips_guess_prefix, function in vips

H

vips_hash_table_map, function in util
VipsHistogram, struct in VipsHistogram
VipsHistogram:out, object property in VipsHistogram
VipsHistogramClass, struct in VipsHistogram
VipsHistogramProcessFn, user_function in VipsHistogram
VipsHistUnary, struct in VipsHistUnary
VipsHistUnary:in, object property in VipsHistUnary
VipsHistUnaryClass, struct in VipsHistUnary
vips_hist_cum, function in histogram
vips_hist_equal, function in histogram
vips_hist_find, function in arithmetic
vips_hist_find_indexed, function in arithmetic
vips_hist_find_ndim, function in arithmetic
vips_hist_ismonotonic, function in histogram
vips_hist_local, function in histogram
vips_hist_match, function in histogram
vips_hist_norm, function in histogram
vips_hist_plot, function in histogram

I

vips_icc_ac2rc, function in colour
vips_icc_export, function in colour
vips_icc_import, function in colour
vips_icc_present, function in colour
vips_icc_transform, function in colour
vips_identity, function in create
vips_ifthenelse, function in conversion
vips_imag, function in arithmetic
VipsImage, struct in VipsImage
VipsImage::eval, object signal in VipsImage
VipsImage::invalidate, object signal in VipsImage
VipsImage::minimise, object signal in VipsImage
VipsImage::posteval, object signal in VipsImage
VipsImage::preeval, object signal in VipsImage
VipsImage::written, object signal in VipsImage
VipsImage:bands, object property in VipsImage
VipsImage:coding, object property in VipsImage
VipsImage:demand, object property in VipsImage
VipsImage:filename, object property in VipsImage
VipsImage:foreign-buffer, object property in VipsImage
VipsImage:format, object property in VipsImage
VipsImage:height, object property in VipsImage
VipsImage:interpretation, object property in VipsImage
VipsImage:kill, object property in VipsImage
VipsImage:mode, object property in VipsImage
VipsImage:sizeof-header, object property in VipsImage
VipsImage:width, object property in VipsImage
VipsImage:xoffset, object property in VipsImage
VipsImage:xres, object property in VipsImage
VipsImage:yoffset, object property in VipsImage
VipsImage:yres, object property in VipsImage
VipsImageClass, struct in VipsImage
VipsImageMapFn, user_function in header
VipsImageType, enum in VipsImage
VIPS_IMAGE_ADDR, macro in VipsImage
vips_image_eval, function in VipsImage
vips_image_generate, function in generate
vips_image_get, function in header
vips_image_get_area, function in header
vips_image_get_as_string, function in header
vips_image_get_bands, function in header
vips_image_get_blob, function in header
vips_image_get_coding, function in header
vips_image_get_data, function in header
vips_image_get_double, function in header
vips_image_get_filename, function in header
vips_image_get_format, function in header
vips_image_get_height, function in header
vips_image_get_history, function in header
vips_image_get_int, function in header
vips_image_get_interpretation, function in header
vips_image_get_mode, function in header
vips_image_get_offset, function in header
vips_image_get_scale, function in header
vips_image_get_string, function in header
vips_image_get_typeof, function in header
vips_image_get_width, function in header
vips_image_get_xoffset, function in header
vips_image_get_xres, function in header
vips_image_get_yoffset, function in header
vips_image_get_yres, function in header
vips_image_guess_interpretation, function in header
vips_image_history_args, function in header
vips_image_history_printf, function in header
vips_image_init_fields, function in header
vips_image_inplace, function in VipsImage
vips_image_invalidate_all, function in VipsImage
vips_image_isfile, function in VipsImage
vips_image_iskilled, function in VipsImage
vips_image_isMSBfirst, function in VipsImage
vips_image_ispartial, function in VipsImage
vips_image_map, function in header
vips_image_minimise_all, function in VipsImage
vips_image_new, function in VipsImage
vips_image_new_buffer, function in VipsImage
vips_image_new_from_file, function in VipsImage
vips_image_new_from_file_raw, function in VipsImage
vips_image_new_from_memory, function in VipsImage
vips_image_new_matrix, function in VipsImage
vips_image_new_matrixv, function in VipsImage
vips_image_new_mode, function in VipsImage
vips_image_new_temp_file, function in VipsImage
VIPS_IMAGE_N_ELEMENTS, macro in VipsImage
VIPS_IMAGE_N_PELS, macro in VipsImage
vips_image_pio_input, function in VipsImage
vips_image_pipelinev, function in generate
vips_image_pipeline_array, function in generate
vips_image_posteval, function in VipsImage
vips_image_preeval, function in VipsImage
vips_image_remove, function in header
vips_image_set, function in header
vips_image_set_area, function in header
vips_image_set_blob, function in header
vips_image_set_delete_on_close, function in VipsImage
vips_image_set_double, function in header
vips_image_set_int, function in header
vips_image_set_kill, function in VipsImage
vips_image_set_progress, function in VipsImage
vips_image_set_string, function in header
VIPS_IMAGE_SIZEOF_ELEMENT, macro in VipsImage
VIPS_IMAGE_SIZEOF_LINE, macro in VipsImage
VIPS_IMAGE_SIZEOF_PEL, macro in VipsImage
vips_image_wio_input, function in VipsImage
vips_image_write, function in VipsImage
vips_image_write_line, function in VipsImage
vips_image_write_prepare, function in VipsImage
vips_image_write_to_file, function in VipsImage
vips_image_written, function in VipsImage
im_align_bands, function in mosaicing
im_benchmark2, function in create
im_benchmarkn, function in create
im_correl, function in mosaicing
im_draw_circle, function in inplace
im_draw_flood, function in inplace
im_draw_flood_blob, function in inplace
im_draw_flood_other, function in inplace
im_draw_image, function in inplace
im_draw_line, function in inplace
im_draw_line_user, function in inplace
im_draw_mask, function in inplace
im_draw_point, function in inplace
im_draw_rect, function in inplace
im_draw_smudge, function in inplace
im_global_balance, function in mosaicing
im_global_balancef, function in mosaicing
im_insertset, function in conversion
im_label_regions, function in morphology
im_lineset, function in inplace
im_lrmerge, function in mosaicing
im_lrmerge1, function in mosaicing
im_lrmosaic, function in mosaicing
im_lrmosaic1, function in mosaicing
im_match_linear, function in mosaicing
im_match_linear_search, function in mosaicing
im_maxpos_subpel, function in mosaicing
im_read_point, function in inplace
im_remosaic, function in mosaicing
im_tbmerge, function in mosaicing
im_tbmerge1, function in mosaicing
im_tbmosaic, function in mosaicing
im_tbmosaic1, function in mosaicing
vips_info, function in error
vips_init, macro in vips
vips_insert, function in conversion
VipsIntent, enum in colour
VipsInterpolate, struct in VipsInterpolate
vips_interpolate, function in VipsInterpolate
VipsInterpolateClass, struct in VipsInterpolate
VipsInterpolateMethod, user_function in VipsInterpolate
vips_interpolate_bilinear_static, function in VipsInterpolate
vips_interpolate_get_method, function in VipsInterpolate
vips_interpolate_get_window_offset, function in VipsInterpolate
vips_interpolate_get_window_size, function in VipsInterpolate
vips_interpolate_nearest_static, function in VipsInterpolate
vips_interpolate_new, function in VipsInterpolate
VIPS_INTERPOLATE_SCALE, macro in VipsInterpolate
VIPS_INTERPOLATE_SHIFT, macro in VipsInterpolate
VipsInterpretation, enum in VipsImage
vips_invert, function in arithmetic
vips_invertlut, function in create
vips_invfft, function in freqfilt
vips_ispostfix, function in util
vips_ispoweroftwo, function in util
vips_isprefix, function in util

J

vips_join, function in conversion
vips_jpegload, function in VipsForeign
vips_jpegload_buffer, function in VipsForeign
vips_jpegsave, function in VipsForeign
vips_jpegsave_buffer, function in VipsForeign
vips_jpegsave_mime, function in VipsForeign

L

vips_Lab2LabQ, function in colour
vips_Lab2LabS, function in colour
vips_Lab2LCh, function in colour
vips_Lab2XYZ, function in colour
vips_LabQ2Lab, function in colour
vips_LabQ2LabS, function in colour
vips_LabQ2sRGB, function in colour
vips_LabS2Lab, function in colour
vips_LabS2LabQ, function in colour
vips_LCh2CMC, function in colour
vips_LCh2Lab, function in colour
vips_less, function in arithmetic
vips_lesseq, function in arithmetic
vips_lesseq_const, function in arithmetic
vips_lesseq_const1, function in arithmetic
vips_less_const, function in arithmetic
vips_less_const1, function in arithmetic
vips_linear, function in arithmetic
vips_linear1, function in arithmetic
vips_linecache, function in conversion
vips_log, function in arithmetic
vips_log10, function in arithmetic
vips_logmat, function in create
vips_lshift, function in arithmetic
vips_lshift_const, function in arithmetic
vips_lshift_const1, function in arithmetic

M

vips_magickload, function in VipsForeign
VIPS_MAGIC_INTEL, macro in VipsImage
VIPS_MAGIC_SPARC, macro in VipsImage
VIPS_MAJOR_VERSION, macro in version
vips_malloc, function in memory
vips_maplut, function in histogram
vips_map_equal, function in util
VipsMask, struct in VipsMask
VipsMask:nodc, object property in VipsMask
VipsMask:optical, object property in VipsMask
VipsMask:reject, object property in VipsMask
VipsMaskButterworth, struct in VipsMask
VipsMaskButterworth:amplitude-cutoff, object property in VipsMask
VipsMaskButterworth:frequency-cutoff, object property in VipsMask
VipsMaskButterworth:order, object property in VipsMask
VipsMaskButterworthClass, typedef in VipsMask
VipsMaskClass, struct in VipsMask
VipsMaskGaussian, struct in VipsMask
VipsMaskGaussian:amplitude-cutoff, object property in VipsMask
VipsMaskGaussian:frequency-cutoff, object property in VipsMask
VipsMaskGaussianClass, typedef in VipsMask
VipsMaskIdeal, struct in VipsMask
VipsMaskIdeal:frequency-cutoff, object property in VipsMask
VipsMaskIdealClass, typedef in VipsMask
vips_mask_butterworth, function in create
vips_mask_butterworth_band, function in create
vips_mask_butterworth_ring, function in create
vips_mask_fractal, function in create
vips_mask_gaussian, function in create
vips_mask_gaussian_band, function in create
vips_mask_gaussian_ring, function in create
vips_mask_ideal, function in create
vips_mask_ideal_band, function in create
vips_mask_ideal_ring, function in create
vips_math, function in arithmetic
vips_math2, function in arithmetic
vips_math2_const, function in arithmetic
vips_math2_const1, function in arithmetic
vips_matload, function in VipsForeign
VIPS_MATRIX, macro in VipsImage
vips_matrixload, function in VipsForeign
vips_matrixprint, function in VipsForeign
vips_matrixsave, function in VipsForeign
vips_max, function in arithmetic
VIPS_MAX, macro in util
vips_measure, function in arithmetic
vips_median, function in morphology
VIPS_META_EXIF_NAME, macro in header
VIPS_META_ICC_NAME, macro in header
VIPS_META_IPCT_NAME, macro in header
VIPS_META_LOADER, macro in header
VIPS_META_RESOLUTION_UNIT, macro in header
VIPS_META_XML, macro in header
VIPS_META_XMP_NAME, macro in header
VIPS_MICRO_VERSION, macro in version
VIPS_MIN, macro in util
vips_min, function in arithmetic
VIPS_MINOR_VERSION, macro in version
vips_mkdirf, function in util
vips_more, function in arithmetic
vips_moreeq, function in arithmetic
vips_moreeq_const, function in arithmetic
vips_moreeq_const1, function in arithmetic
vips_more_const, function in arithmetic
vips_more_const1, function in arithmetic
vips_morph, function in morphology
VipsMorphology, struct in VipsMorphology
VipsMorphology:in, object property in VipsMorphology
VipsMorphologyClass, struct in VipsMorphology
vips_msb, function in conversion
vips_multiply, function in arithmetic

N

VIPS_NEW, macro in memory
vips_notequal, function in arithmetic
vips_notequal_const, function in arithmetic
vips_notequal_const1, function in arithmetic
VIPS_NUMBER, macro in util

O

VipsObject, struct in VipsArgument
VipsObject::close, object signal in VipsArgument
VipsObject::postclose, object signal in VipsArgument
VipsObject::preclose, object signal in VipsArgument
VipsObject:description, object property in VipsArgument
VipsObject:nickname, object property in VipsArgument
VipsObjectClass, struct in VipsArgument
VipsObjectSetArguments, user_function in VipsArgument
vips_object_argument_isset, function in VipsArgument
vips_object_argument_needsstring, function in VipsArgument
vips_object_build, function in VipsArgument
vips_object_class_install_argument, function in VipsArgument
vips_object_dump, function in VipsArgument
vips_object_get_argument, function in VipsArgument
vips_object_get_argument_flags, function in VipsArgument
vips_object_get_argument_priority, function in VipsArgument
vips_object_get_argument_to_string, function in VipsArgument
vips_object_get_property, function in VipsArgument
vips_object_local, macro in VipsArgument
vips_object_local_array, function in VipsArgument
vips_object_local_cb, function in VipsArgument
vips_object_map, function in VipsArgument
vips_object_new, function in VipsArgument
vips_object_new_from_string, function in VipsArgument
vips_object_preclose, function in VipsArgument
vips_object_print_all, function in VipsArgument
vips_object_print_dump, function in VipsArgument
vips_object_print_name, function in VipsArgument
vips_object_print_summary, function in VipsArgument
vips_object_print_summary_class, function in VipsArgument
vips_object_rewind, function in VipsArgument
vips_object_sanity, function in VipsArgument
vips_object_sanity_all, function in VipsArgument
vips_object_set, function in VipsArgument
vips_object_set_argument_from_string, function in VipsArgument
vips_object_set_property, function in VipsArgument
vips_object_set_required, function in VipsArgument
vips_object_set_static, function in VipsArgument
vips_object_set_valist, function in VipsArgument
vips_object_summary, function in VipsArgument
vips_object_summary_class, function in VipsArgument
vips_object_to_string, function in VipsArgument
vips_object_unref_outputs, function in VipsArgument
vips_openexrload, function in VipsForeign
vips_openslideload, function in VipsForeign
VipsOperation, struct in VipsOperation
VipsOperationBoolean, enum in arithmetic
VipsOperationBuildFn, user_function in VipsOperation
VipsOperationClass, struct in VipsOperation
VipsOperationComplex, enum in arithmetic
VipsOperationComplex2, enum in arithmetic
VipsOperationComplexget, enum in arithmetic
VipsOperationFlags, enum in VipsOperation
VipsOperationMath, enum in arithmetic
VipsOperationMath2, enum in arithmetic
VipsOperationMorphology, enum in morphology
VipsOperationRelational, enum in arithmetic
VipsOperationRound, enum in arithmetic
vips_operation_call_valist, function in VipsOperation
vips_operation_class_print_usage, function in VipsOperation
vips_operation_get_flags, function in VipsOperation
vips_operation_new, function in VipsOperation
vips_orimage, function in arithmetic
vips_orimage_const, function in arithmetic
vips_orimage_const1, function in arithmetic

P

VIPS_PATH_MAX, macro in util
VipsPCS, enum in colour
VipsPel, typedef in basic
vips_percent, function in histogram
vips_phasecor, function in freqfilt
VIPS_PI, macro in util
VipsPlotFn, user_function in inplace
vips_pngload, function in VipsForeign
vips_pngload_buffer, function in VipsForeign
vips_pngsave, function in VipsForeign
vips_pngsave_buffer, function in VipsForeign
vips_polar, function in arithmetic
vips_popenf, function in util
vips_pow, function in arithmetic
vips_pow_const, function in arithmetic
vips_pow_const1, function in arithmetic
vips_ppmload, function in VipsForeign
vips_ppmsave, function in VipsForeign
VipsPrecision, enum in convolution
vips_profile, function in arithmetic
VipsProgress, struct in VipsImage
vips_project, function in arithmetic
vips_pythagoras, function in colour

Q

vips_quadratic, function in resample

R

VIPS_RAD, macro in util
vips_rad2float, function in colour
vips_radload, function in VipsForeign
vips_radsave, function in VipsForeign
vips_rank, function in morphology
vips_rawload, function in VipsForeign
vips_rawsave, function in VipsForeign
vips_rawsave_fd, function in VipsForeign
vips_real, function in arithmetic
vips_recomb, function in conversion
VipsRect, struct in rect
vips_rect, function in arithmetic
VIPS_RECT_BOTTOM, macro in rect
vips_rect_dup, function in rect
vips_rect_equalsrect, function in rect
VIPS_RECT_HCENTRE, macro in rect
vips_rect_includespoint, function in rect
vips_rect_includesrect, function in rect
vips_rect_intersectrect, function in rect
vips_rect_isempty, function in rect
vips_rect_marginadjust, function in rect
vips_rect_normalise, function in rect
VIPS_RECT_RIGHT, macro in rect
vips_rect_unionrect, function in rect
VIPS_RECT_VCENTRE, macro in rect
VipsRegion, struct in VipsRegion
VipsRegionClass, struct in VipsRegion
VipsRegionWrite, user_function in generate
VIPS_REGION_ADDR, macro in VipsRegion
VIPS_REGION_ADDR_TOPLEFT, macro in VipsRegion
vips_region_black, function in VipsRegion
vips_region_buffer, function in VipsRegion
vips_region_copy, function in VipsRegion
vips_region_dump_all, function in VipsRegion
vips_region_equalsregion, function in VipsRegion
vips_region_image, function in VipsRegion
VIPS_REGION_LSKIP, macro in VipsRegion
vips_region_new, function in VipsRegion
VIPS_REGION_N_ELEMENTS, macro in VipsRegion
vips_region_paint, function in VipsRegion
vips_region_paint_pel, function in VipsRegion
vips_region_position, function in VipsRegion
vips_region_prepare, function in VipsRegion
vips_region_prepare_many, function in VipsRegion
vips_region_prepare_to, function in VipsRegion
vips_region_region, function in VipsRegion
VIPS_REGION_SIZEOF_LINE, macro in VipsRegion
vips_relational, function in arithmetic
vips_relational_const, function in arithmetic
vips_relational_const1, function in arithmetic
vips_remainder, function in arithmetic
vips_remainder_const, function in arithmetic
vips_remainder_const1, function in arithmetic
vips_replicate, function in conversion
vips_rint, function in arithmetic
VIPS_RINT, macro in util
vips_rot, function in conversion
vips_rot45, function in conversion
vips_round, function in arithmetic
vips_rshift, function in arithmetic
vips_rshift_const, function in arithmetic
vips_rshift_const1, function in arithmetic

S

VipsSaveable, enum in VipsForeign
vips_scale, function in conversion
vips_scRGB2sRGB, function in colour
vips_scRGB2XYZ, function in colour
VipsSemaphore, struct in semaphore
vips_semaphore_destroy, function in semaphore
vips_semaphore_down, function in semaphore
vips_semaphore_downn, function in semaphore
vips_semaphore_init, function in semaphore
vips_semaphore_up, function in semaphore
vips_semaphore_upn, function in semaphore
vips_sequential, function in conversion
VIPS_SETSTR, macro in memory
vips_sharpen, function in convolution
vips_shrink, function in resample
vips_shutdown, function in vips
vips_sign, function in arithmetic
vips_similarity, function in resample
vips_sin, function in arithmetic
vips_sines, function in create
vips_sink, function in generate
VipsSinkNotify, user_function in generate
vips_sink_disc, function in generate
vips_sink_memory, function in generate
vips_sink_memory2, function in generate
vips_sink_screen, function in generate
vips_sink_tile, function in generate
vips_skip_dir, function in util
VipsSListFold2Fn, user_function in basic
VipsSListMap2Fn, user_function in basic
VipsSListMap4Fn, user_function in basic
vips_slist_equal, function in util
vips_slist_filter, function in util
vips_slist_fold2, function in util
vips_slist_free_all, function in util
vips_slist_map2, function in util
vips_slist_map2_rev, function in util
vips_slist_map4, function in util
vips_snprintf, function in util
vips_spectrum, function in freqfilt
vips_sRGB2scRGB, function in colour
VipsStartFn, user_function in generate
vips_start_many, function in generate
vips_start_one, function in generate
vips_stats, function in arithmetic
vips_stdif, function in histogram
VipsStopFn, user_function in generate
vips_stop_many, function in generate
vips_stop_one, function in generate
vips_strdup, function in memory
vips_strncpy, function in util
vips_strrstr, function in util
vips_subsample, function in conversion
vips_subtract, function in arithmetic
VIPS_SWAP, macro in util
vips_system, function in VipsImage

T

vips_tan, function in arithmetic
vips_text, function in create
VipsThing, struct in type
vips_thing_get_i, function in type
vips_thing_new, function in type
VipsThreadpoolAllocateFn, user_function in VipsThreadState
VipsThreadpoolProgressFn, user_function in VipsThreadState
VipsThreadpoolWorkFn, user_function in VipsThreadState
vips_threadpool_run, function in VipsThreadState
VipsThreadStartFn, user_function in VipsThreadState
VipsThreadState, struct in VipsThreadState
VipsThreadStateClass, struct in VipsThreadState
vips_thread_shutdown, function in vips
vips_thread_state_new, function in VipsThreadState
vips_thread_state_set, function in VipsThreadState
vips_tiffload, function in VipsForeign
vips_tiffsave, function in VipsForeign
vips_tilecache, function in conversion
VipsToken, enum in util
vips_tonelut, function in create
vips_tracked_close, function in memory
vips_tracked_free, function in memory
vips_tracked_get_allocs, function in memory
vips_tracked_get_files, function in memory
vips_tracked_get_mem, function in memory
vips_tracked_get_mem_highwater, function in memory
vips_tracked_malloc, function in memory
vips_tracked_open, function in memory
VipsTransformation, struct in transform
VIPS_TRANSFORM_SCALE, macro in VipsInterpolate
VIPS_TRANSFORM_SHIFT, macro in VipsInterpolate
VipsTypeMap2Fn, user_function in VipsArgument
VipsTypeMapFn, user_function in VipsArgument
vips_type_depth, function in VipsArgument
vips_type_find, function in VipsArgument
vips_type_map, function in VipsArgument
vips_type_map_all, function in VipsArgument

U

VIPS_UNREF, macro in VipsArgument
VIPS_UNROLL, macro in util

V

vips_value_get_area, function in type
vips_value_get_array, function in type
vips_value_get_array_double, function in type
vips_value_get_array_int, function in type
vips_value_get_array_object, function in type
vips_value_get_blob, function in type
vips_value_get_ref_string, function in type
vips_value_get_save_string, function in type
vips_value_is_null, function in VipsArgument
vips_value_set_area, function in type
vips_value_set_array, function in type
vips_value_set_array_double, function in type
vips_value_set_array_int, function in type
vips_value_set_array_object, function in type
vips_value_set_blob, function in type
vips_value_set_ref_string, function in type
vips_value_set_save_string, function in type
vips_value_set_save_stringf, function in type
VipsVector, struct in vector
vips_vector_asm2, function in vector
vips_vector_asm3, function in vector
vips_vector_compile, function in vector
vips_vector_constant, function in vector
vips_vector_free, function in vector
vips_vector_full, function in vector
vips_vector_init, function in vector
vips_vector_isenabled, function in vector
vips_vector_new, function in vector
vips_vector_print, function in vector
vips_vector_set_enabled, function in vector
VIPS_VECTOR_SOURCE_MAX, macro in vector
vips_vector_source_name, function in vector
vips_vector_source_scanline, function in vector
vips_vector_temporary, function in vector
vips_verror, function in error
vips_verror_system, function in error
vips_version, function in vips
VIPS_VERSION, macro in version
VIPS_VERSION_STRING, macro in version
vips_version_string, function in vips
vips_vinfo, function in error
vips_vsnprintf, function in util
vips_vwarn, function in error

W

vips_warn, function in error
vips_webpload, function in VipsForeign
vips_webpload_buffer, function in VipsForeign
vips_webpsave, function in VipsForeign
vips_webpsave_buffer, function in VipsForeign
vips_webpsave_mime, function in VipsForeign
vips_wop, function in arithmetic
vips_wop_const, function in arithmetic
vips_wop_const1, function in arithmetic
vips_wrap, function in conversion

X

vips_xyz, function in create
vips_XYZ2Lab, function in colour
vips_XYZ2scRGB, function in colour
vips_XYZ2Yxy, function in colour

Y

vips_Yxy2Lab, function in colour
vips_Yxy2XYZ, function in colour

Z

vips_zone, function in create
vips_zoom, function in conversion

_

vips__affine, function in transform
vips__argument_get_instance, function in VipsArgument
vips__argument_table_lookup, function in VipsArgument
vips__change_suffix, function in util
vips__fftproc, function in VipsFreqfilt
vips__file_open_read, function in util
vips__file_open_write, function in util
vips__file_read, function in util
vips__file_read_name, function in util
vips__file_write, function in util
vips__find_rightmost_brackets, function in util
vips__ftruncate, function in util
vips__get_bytes, function in util
vips__gslist_gvalue_copy, function in util
vips__gslist_gvalue_free, function in util
vips__gslist_gvalue_get, function in util
vips__gslist_gvalue_merge, function in util
vips__gvalue_ref_string_new, function in util
vips__hypot, macro in inlines
vips__isjpeg, function in vipsjpeg
vips__iswebp, function in webp
vips__jpeg_read_buffer, function in vipsjpeg
vips__jpeg_read_file, function in vipsjpeg
vips__jpeg_write_buffer, function in vipsjpeg
vips__jpeg_write_file, function in vipsjpeg
vips__meta_init_types, function in type
vips__object_set_member, function in VipsArgument
vips__print_renders, function in VipsThreadState
vips__seek, function in util
vips__temp_name, function in util
vips__thread_gate_start, function in gate
vips__thread_gate_stop, function in gate
vips__thread_malloc_free, function in gate
vips__thread_profile, variable in gate
vips__thread_profile_attach, function in gate
vips__thread_profile_detach, function in gate
vips__thread_profile_stop, function in gate
vips__token_get, function in util
vips__token_must, function in util
vips__token_need, function in util
vips__transform_add, function in transform
vips__transform_calc_inverse, function in transform
vips__transform_forward_point, function in transform
vips__transform_forward_rect, function in transform
vips__transform_init, function in transform
vips__transform_invert_point, function in transform
vips__transform_invert_rect, function in transform
vips__transform_isidentity, function in transform
vips__transform_print, function in transform
vips__transform_set_area, function in transform
vips__type_leak, function in type
vips__vector_enabled, variable in vector
vips__webp_read_buffer, function in webp
vips__webp_read_buffer_header, function in webp
vips__webp_read_file, function in webp
vips__webp_read_file_header, function in webp
vips__webp_write_buffer, function in webp
vips__webp_write_file, function in webp
vips__write, function in util
vips-7.38.5/doc/reference/html/style.css0000644000175000017500000001210012303146331015027 00000000000000.synopsis, .classsynopsis { /* tango:aluminium 1/2 */ background: #eeeeec; border: solid 1px #d3d7cf; padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ background: #e6f3ff; border: solid 1px #729fcf; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } @media screen { sup a.footnote { position: relative; top: 0em ! important; } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] { display: inline-block; position: relative; top:-5em; } /* this seems to be a bug in the xsl style sheets when generating indexes */ div.index div.index { top: 0em; } /* make space for the fixed navigation bar and add space at the bottom so that * link targets appear somewhat close to top */ body { padding-top: 3.2em; padding-bottom: 20em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; /* tango:scarlet red 0/1 */ background: #ffe6e6; border: solid 1px #ef2929; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; z-index: 10; } .navigation a, .navigation a:visited { /* tango:scarlet red 3 */ color: #a40000; } .navigation a:hover { /* tango:scarlet red 1 */ color: #ef2929; } td.shortcuts { /* tango:scarlet red 1 */ color: #ef2929; font-size: 80%; white-space: nowrap; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; /* tango:scarlet red 0/1 */ background: #ffe6e6; border: solid 1px #ef2929; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; } } .navigation .title { font-size: 200%; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a, a:visited { text-decoration: none; /* tango:sky blue 2 */ color: #3465a4; } a:hover { text-decoration: underline; /* tango:sky blue 1 */ color: #729fcf; } div.table table { border-collapse: collapse; border-spacing: 0px; /* tango:aluminium 3 */ border: solid 1px #babdb6; } div.table table td, div.table table th { /* tango:aluminium 3 */ border: solid 1px #babdb6; padding: 3px; vertical-align: top; } div.table table th { /* tango:aluminium 2 */ background-color: #d3d7cf; } hr { /* tango:aluminium 3 */ color: #babdb6; background: #babdb6; border: none 0px; height: 1px; clear: both; } .footer { padding-top: 3.5em; /* tango:aluminium 3 */ color: #babdb6; text-align: center; font-size: 80%; } .warning { /* tango:orange 0/1 */ background: #ffeed9; border-color: #ffb04f; } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; border-color: #abf562; } .note, .warning { padding: 0.5em; border-width: 1px; border-style: solid; } .note h3, .warning h3 { margin-top: 0.0em } .note p, .warning p { margin-bottom: 0.0em } /* blob links */ h2 .extralinks, h3 .extralinks { float: right; /* tango:aluminium 3 */ color: #babdb6; font-size: 80%; font-weight: normal; } .annotation { /* tango:aluminium 5 */ color: #555753; font-size: 80%; font-weight: normal; } /* code listings */ .listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ .listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ .listing_code .programlisting .function { color: #000000; font-weight: bold; } .listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ .listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ .listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ .listing_code .programlisting .normal { color: #000000; } .listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */ .listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ .listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ .listing_code .programlisting .type { color: #000000; } .listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ .listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; padding: 0px; } .listing_lines, .listing_code { margin-top: 0px; margin-bottom: 0px; padding: 0.5em; } .listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; } .listing_lines pre, .listing_code pre { margin: 0px; } vips-7.38.5/doc/reference/html/libvips-morphology.html0000644000175000017500000006063012303146332017724 00000000000000 morphology

morphology

morphology — morphological operators, rank filters and related image analysis

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

enum                VipsOperationMorphology;
int                 vips_morph                          (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *mask,
                                                         VipsOperationMorphology morph,
                                                         ...);
int                 vips_rank                           (VipsImage *in,
                                                         VipsImage **out,
                                                         int width,
                                                         int height,
                                                         int index,
                                                         ...);
int                 vips_countlines                     (VipsImage *in,
                                                         double *nolines,
                                                         VipsDirection direction,
                                                         ...);
int                 vips_median                         (VipsImage *in,
                                                         VipsImage **out,
                                                         int size,
                                                         ...);
int                 im_label_regions                    (VipsImage *test,
                                                         VipsImage *mask,
                                                         int *segments);

Description

The morphological functions search images for particular patterns of pixels, specified with the mask argument, either adding or removing pixels when they find a match. They are useful for cleaning up images --- for example, you might threshold an image, and then use one of the morphological functions to remove all single isolated pixels from the result.

If you combine the morphological operators with the mask rotators im_rotate_imask45(), for example) and apply them repeatedly, you can achieve very complicated effects: you can thin, prune, fill, open edges, close gaps, and many others. For example, see `Fundamentals of Digital Image Processing' by A. Jain, pp 384-388, Prentice-Hall, 1989 for more ideas.

Beware that VIPS reverses the usual image processing convention, by assuming white objects (non-zero pixels) on a black background (zero pixels).

The mask you give to the morphological functions should contain only the values 0 (for background), 128 (for don't care) and 255 (for object). The mask must have odd length sides --- the origin of the mask is taken to be the centre value. For example, the mask:

3 3 128 255 128 255 0 255 128 255 128

applied to an image with im_erode(), will find all black pixels 4-way connected with white pixels. Essentially, im_dilate() sets pixels in the output if any part of the mask matches, whereas im_erode() sets pixels only if all of the mask matches.

See im_andimage(), im_orimage() and im_eorimage() for analogues of the usual set difference and set union operations.

Details

enum VipsOperationMorphology

typedef enum {
	VIPS_OPERATION_MORPHOLOGY_ERODE,
	VIPS_OPERATION_MORPHOLOGY_DILATE,
	VIPS_OPERATION_MORPHOLOGY_LAST
} VipsOperationMorphology;

More like hit-miss, really.

See also: vips_morph().

VIPS_OPERATION_MORPHOLOGY_ERODE

true if all set

VIPS_OPERATION_MORPHOLOGY_DILATE

true if one set

VIPS_OPERATION_MORPHOLOGY_LAST


vips_morph ()

int                 vips_morph                          (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *mask,
                                                         VipsOperationMorphology morph,
                                                         ...);

Performs a morphological operation on in using mask as a structuring element.

The image should have 0 (black) for no object and 255 (non-zero) for an object. Note that this is the reverse of the usual convention for these operations, but more convenient when combined with the boolean operators. The output image is the same size as the input image: edge pxels are made by expanding the input image as necessary.

Mask coefficients can be either 0 (for object) or 255 (for background) or 128 (for do not care). The origin of the mask is at location (m.xsize / 2, m.ysize / 2), integer division. All algorithms have been based on the book "Fundamentals of Digital Image Processing" by A. Jain, pp 384-388, Prentice-Hall, 1989.

For VIPS_OPERATION_MOPHOLOGY_ERODE, the whole mask must match for the output pixel to be set, that is, the result is the logical AND of the selected input pixels.

For VIPS_OPERATION_MOPHOLOGY_DILATE, the output pixel is set if any part of the mask matches, that is, the result is the logical OR of the selected input pixels.

See the boolean operations vips_andimage(), vips_orimage() and vips_eorimage() for analogues of the usual set difference and set union operations.

Operations are performed using the processor's vector unit, if possible. Disable this with --vips-novector or IM_NOVECTOR.

in :

input image

out :

output image

mask :

morphology with this mask

morph :

operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_rank ()

int                 vips_rank                           (VipsImage *in,
                                                         VipsImage **out,
                                                         int width,
                                                         int height,
                                                         int index,
                                                         ...);

vips_rank() does rank filtering on an image. A window of size width by height is passed over the image. At each position, the pixels inside the window are sorted into ascending order and the pixel at position index is output. index numbers from 0.

It works for any non-complex image type, with any number of bands. The input is expanded by copying edge pixels before performing the operation so that the output image has the same size as the input. Edge pixels in the output image are therefore only approximate.

For a median filter with mask size m (3 for 3x3, 5 for 5x5, etc.) use

vips_rank( in, out, m, m, m * m / 2 );

The special cases n == 0 and n == m * m - 1 are useful dilate and expand operators.

See also: vips_conv(), vips_median(), vips_spcor().

in :

input image

out :

output image

width :

width of region

height :

height of region

index :

select pixel

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_countlines ()

int                 vips_countlines                     (VipsImage *in,
                                                         double *nolines,
                                                         VipsDirection direction,
                                                         ...);

Function which calculates the number of transitions between black and white for the horizontal or the vertical direction of an image. black<128 , white>=128 The function calculates the number of transitions for all Xsize or Ysize and returns the mean of the result Input should be one band, 8-bit.

See also: vips_morph(), vips_zerox(), vips_conv().

in :

input image

nolines :

output average number of lines

direction :

count lines horizontally or vertically

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_median ()

int                 vips_median                         (VipsImage *in,
                                                         VipsImage **out,
                                                         int size,
                                                         ...);

A convenience function equivalent to:

vips_rank( in, out, size, size, (size * size) / 2 );

See also: vips_rank().

in :

input image

out :

output image

size :

size of region

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

im_label_regions ()

int                 im_label_regions                    (VipsImage *test,
                                                         VipsImage *mask,
                                                         int *segments);

im_label_regions() repeatedly scans test for regions of 4-connected pixels with the same pixel value. Every time a region is discovered, those pixels are marked in mask with a unique serial number. Once all pixels have been labelled, the operation returns, setting segments to the number of discrete regions which were detected.

mask is always a 1-band IM_BANDFMT_UINT image of the same dimensions as test.

This operation is useful for, for example, blob counting. You can use the morphological operators to detect and isolate a series of objects, then use im_label_regions() to number them all.

Use im_histindexed() to (for example) find blob coordinates.

See also: im_histindexed()

test :

image to test

mask :

write labelled regions here

segments :

return number of regions here

Returns :

0 on success, -1 on error.

See Also

boolean
vips-7.38.5/doc/reference/html/libvips-inplace.html0000644000175000017500000015043212303146332017140 00000000000000 inplace

inplace

inplace — in-place paintbox operations: flood, paste, line, circle

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

int                 im_draw_rect                        (VipsImage *image,
                                                         int left,
                                                         int top,
                                                         int width,
                                                         int height,
                                                         int fill,
                                                         VipsPel *ink);
int                 im_draw_circle                      (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         int radius,
                                                         gboolean fill,
                                                         VipsPel *ink);
int                 im_draw_image                       (VipsImage *image,
                                                         VipsImage *sub,
                                                         int x,
                                                         int y);
int                 (*VipsPlotFn)                       (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         void *a,
                                                         void *b,
                                                         void *c);
int                 im_draw_line_user                   (VipsImage *image,
                                                         int x1,
                                                         int y1,
                                                         int x2,
                                                         int y2,
                                                         VipsPlotFn plot,
                                                         void *a,
                                                         void *b,
                                                         void *c);
int                 im_draw_line                        (VipsImage *image,
                                                         int x1,
                                                         int y1,
                                                         int x2,
                                                         int y2,
                                                         VipsPel *ink);
int                 im_lineset                          (VipsImage *in,
                                                         VipsImage *out,
                                                         VipsImage *mask,
                                                         VipsImage *ink,
                                                         int n,
                                                         int *x1v,
                                                         int *y1v,
                                                         int *x2v,
                                                         int *y2v);
int                 im_draw_flood                       (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink,
                                                         VipsRect *dout);
int                 im_draw_flood_blob                  (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink,
                                                         VipsRect *dout);
int                 im_draw_flood_other                 (VipsImage *image,
                                                         VipsImage *test,
                                                         int x,
                                                         int y,
                                                         int serial,
                                                         VipsRect *dout);
int                 im_draw_mask                        (VipsImage *image,
                                                         VipsImage *mask_im,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink);
int                 im_draw_point                       (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink);
int                 im_read_point                       (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink);
int                 im_draw_smudge                      (VipsImage *image,
                                                         int left,
                                                         int top,
                                                         int width,
                                                         int height);

Description

These operations directly modify the image. They do not thread, on 32-bit machines they will be limited to 2GB images, and a little care needs to be taken if you use them as part of an image pipeline.

They are mostly supposed to be useful for paintbox-style programs.

Details

im_draw_rect ()

int                 im_draw_rect                        (VipsImage *image,
                                                         int left,
                                                         int top,
                                                         int width,
                                                         int height,
                                                         int fill,
                                                         VipsPel *ink);

Paint pixels within left, top, width, height in image with ink. If fill is zero, just paint a 1-pixel-wide outline.

See also: im_draw_circle().

image :

image to draw on

left :

area to paint

top :

area to paint

width :

area to paint

height :

area to paint

fill :

fill the rect

ink :

paint with this colour

Returns :

0 on success, or -1 on error.

im_draw_circle ()

int                 im_draw_circle                      (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         int radius,
                                                         gboolean fill,
                                                         VipsPel *ink);

Draws a circle on image. If fill is TRUE then the circle is filled, otherwise a 1-pixel-wide perimeter is drawn.

ink is an array of bytes containing a valid pixel for the image's format. It must have at least IM_IMAGE_SIZEOF_PEL( image ) bytes.

See also: im_draw_line().

image :

image to draw on

x :

centre of circle

y :

centre of circle

radius :

circle radius

fill :

fill the circle

ink :

value to draw

Returns :

0 on success, or -1 on error.

im_draw_image ()

int                 im_draw_image                       (VipsImage *image,
                                                         VipsImage *sub,
                                                         int x,
                                                         int y);

Draw sub on top of image at position x, y. The two images must have the same Coding. If sub has 1 band, the bands will be duplicated to match the number of bands in image. sub will be converted to image's format, see im_clip2fmt().

See also: im_insert().

image :

image to draw on

sub :

image to draw

x :

position to insert

y :

position to insert

Returns :

0 on success, or -1 on error.

VipsPlotFn ()

int                 (*VipsPlotFn)                       (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         void *a,
                                                         void *b,
                                                         void *c);

A plot function, as used by im_draw_line_user() to draw on an image.

image :

image to draw on

x :

position to draw at

y :

position to draw at

a :

user data

b :

user data

c :

user data

im_draw_line_user ()

int                 im_draw_line_user                   (VipsImage *image,
                                                         int x1,
                                                         int y1,
                                                         int x2,
                                                         int y2,
                                                         VipsPlotFn plot,
                                                         void *a,
                                                         void *b,
                                                         void *c);

Calls plot for every point on the line connecting x1, y1 and x2, y2. If you pass im_draw_mask() as the plot operation, you can draw wide lines or lines with various brushes.

See also: im_draw_mask(), im_draw_line(), im_draw_circle().

image :

image to draw on

x1 :

start point

y1 :

start point

x2 :

end point

y2 :

end point

plot :

draw operation

a :

draw operation parameter

b :

draw operation parameter

c :

draw operation parameter

Returns :

0 on success, or -1 on error.

im_draw_line ()

int                 im_draw_line                        (VipsImage *image,
                                                         int x1,
                                                         int y1,
                                                         int x2,
                                                         int y2,
                                                         VipsPel *ink);

Draws a 1-pixel-wide line on an image.

ink is an array of bytes containing a valid pixel for the image's format. It must have at least IM_IMAGE_SIZEOF_PEL( image ) bytes.

See also: im_draw_circle().

image :

image to draw on

x1 :

start point

y1 :

start point

x2 :

end point

y2 :

end point

ink :

value to draw

Returns :

0 on success, or -1 on error.

im_lineset ()

int                 im_lineset                          (VipsImage *in,
                                                         VipsImage *out,
                                                         VipsImage *mask,
                                                         VipsImage *ink,
                                                         int n,
                                                         int *x1v,
                                                         int *y1v,
                                                         int *x2v,
                                                         int *y2v);


im_draw_flood ()

int                 im_draw_flood                       (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink,
                                                         VipsRect *dout);

Flood-fill image with ink, starting at position x, y. The filled area is bounded by pixels that are equal to the ink colour, in other words, it searches for pixels enclosed by a line of ink.

The bounding box of the modified pixels is returned in dout. dout may be NULL.

See also: im_draw_flood_blob(), im_draw_flood_other().

image :

image to fill

x :

position to start fill

y :

position to start fill

ink :

colour to fill with

dout :

output the bounding box of the filled area

Returns :

0 on success, or -1 on error.

im_draw_flood_blob ()

int                 im_draw_flood_blob                  (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink,
                                                         VipsRect *dout);

Flood-fill image with ink, starting at position x, y. The filled area is bounded by pixels that are equal to the start pixel, in other words, it searches for a blob of same-coloured pixels.

The bounding box of the modified pixels is returned in dout. dout may be NULL.

See also: im_draw_flood(), im_draw_flood_other(), im_draw_flood_blob().

image :

image to fill

x :

position to start fill

y :

position to start fill

ink :

colour to fill with

dout :

output the bounding box of the filled area

Returns :

0 on success, or -1 on error.

im_draw_flood_other ()

int                 im_draw_flood_other                 (VipsImage *image,
                                                         VipsImage *test,
                                                         int x,
                                                         int y,
                                                         int serial,
                                                         VipsRect *dout);

Flood-fill image with serial, starting at position x, y. The filled area is bounded by pixels in test that are equal to the start pixel, in other words, it searches test for a blob of same-coloured pixels, marking those pixels in image with serial.

The bounding box of the modified pixels is returned in dout. dout may be NULL.

See also: im_draw_flood(), im_label_regions(), im_draw_flood_blob().

image :

image to mark

test :

image to test

x :

position to start fill

y :

position to start fill

serial :

mark pixels with this number

dout :

output the bounding box of the filled area

Returns :

0 on success, or -1 on error.

im_draw_mask ()

int                 im_draw_mask                        (VipsImage *image,
                                                         VipsImage *mask_im,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink);

Draw a mask on the image. mask_im is a monochrome 8-bit image with 0/255 for transparent or ink coloured points. Intermediate values blend the ink with the pixel. Use with im_text() to draw text on an image.

ink is an array of bytes containing a valid pixel for the image's format. It must have at least IM_IMAGE_SIZEOF_PEL( image ) bytes.

See also: im_draw_circle(), im_text(), im_draw_line_user().

image :

image to draw on

mask_im :

mask of 0/255 values showing where to plot

x :

draw mask here

y :

draw mask here

ink :

value to draw

Returns :

0 on success, or -1 on error.

im_draw_point ()

int                 im_draw_point                       (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink);

Draws a single point on an image.

ink is an array of bytes containing a valid pixel for the image's format. It must have at least IM_IMAGE_SIZEOF_PEL( im ) bytes.

See also: im_draw_line().

image :

image to draw on

x :

position to draw

y :

position to draw

ink :

value to draw

Returns :

0 on success, or -1 on error.

im_read_point ()

int                 im_read_point                       (VipsImage *image,
                                                         int x,
                                                         int y,
                                                         VipsPel *ink);

Reads a single point on an image.

ink is an array of bytes to contain a valid pixel for the image's format. It must have at least IM_IMAGE_SIZEOF_PEL( im ) bytes.

See also: im_draw_point().

image :

image to read from

x :

position to read

y :

position to read

ink :

read value here

Returns :

0 on success, or -1 on error.

im_draw_smudge ()

int                 im_draw_smudge                      (VipsImage *image,
                                                         int left,
                                                         int top,
                                                         int width,
                                                         int height);

Smudge a section of image. Each pixel in the area left, top, width, height is replaced by the average of the surrounding 3x3 pixels.

This an inplace operation, so image is changed. It does not thread and will not work well as part of a pipeline. On 32-bit machines it will be limited to 2GB images.

See also: im_draw_line().

image :

image to smudge

left :

area to smudge

top :

area to smudge

width :

area to smudge

height :

area to smudge

Returns :

0 on success, or -1 on error.
vips-7.38.5/doc/reference/html/up.png0000644000175000017500000000044212303146331014315 00000000000000‰PNG  IHDRàw=øéIDATxí•!‚@† Ä ‘H0ˆîÀô(4À6Œ£Á` l$n$ áùpæÍl]åáHðŸùʆï›yà ެ+$þ†ØGö턈)å꺭5E.™LEAUUY" yÿŒX"|¹5•3"n9#ÂÛ"|¹;²0’#7#eYRD!~/_"Ð4 ÉY!@)E‘„Îs‡¥i:( ÃÌi­Ÿ´mKO1(CnÌ€¹Ù¹>Ùóm•ý³ RBžç/)Š‚×1 éà½mÆþtÖÈÖAâýrt¾)_&›IEND®B`‚vips-7.38.5/doc/reference/html/libvips-arithmetic.html0000644000175000017500000120174512303146332017663 00000000000000 arithmetic

arithmetic

arithmetic — operations which perform pixel arithmetic, trig, log, statistics

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

enum                VipsOperationMath;
enum                VipsOperationMath2;
enum                VipsOperationRound;
enum                VipsOperationRelational;
enum                VipsOperationBoolean;
enum                VipsOperationComplex;
enum                VipsOperationComplex2;
enum                VipsOperationComplexget;
int                 vips_add                            (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_subtract                       (VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);
int                 vips_multiply                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_divide                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_linear                         (VipsImage *in,
                                                         VipsImage **out,
                                                         double *a,
                                                         double *b,
                                                         int n,
                                                         ...);
int                 vips_linear1                        (VipsImage *in,
                                                         VipsImage **out,
                                                         double a,
                                                         double b,
                                                         ...);
int                 vips_remainder                      (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_remainder_const                (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_remainder_const1               (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_invert                         (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_abs                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_sign                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_round                          (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationRound round,
                                                         ...);
int                 vips_floor                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_ceil                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_rint                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_math                           (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationMath math,
                                                         ...);
int                 vips_sin                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_cos                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_tan                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_asin                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_acos                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_atan                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_exp                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_exp10                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_log                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_log10                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_complex                        (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationComplex cmplx,
                                                         ...);
int                 vips_polar                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_rect                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_conj                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_complex2                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         VipsOperationComplex2 cmplx,
                                                         ...);
int                 vips_cross_phase                    (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_complexget                     (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationComplexget get,
                                                         ...);
int                 vips_real                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_imag                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_complexform                    (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_relational                     (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         VipsOperationRelational relational,
                                                         ...);
int                 vips_equal                          (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_notequal                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_less                           (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_lesseq                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_more                           (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_moreeq                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_relational_const               (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationRelational relational,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_equal_const                    (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_notequal_const                 (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_less_const                     (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_lesseq_const                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_more_const                     (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_moreeq_const                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_relational_const1              (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationRelational relational,
                                                         double c,
                                                         ...);
int                 vips_equal_const1                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_notequal_const1                (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_less_const1                    (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_lesseq_const1                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_more_const1                    (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_moreeq_const1                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_boolean                        (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         VipsOperationBoolean boolean,
                                                         ...);
int                 vips_andimage                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_orimage                        (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_eorimage                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_lshift                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_rshift                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_boolean_const                  (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationBoolean boolean,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_andimage_const                 (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_orimage_const                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_eorimage_const                 (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_lshift_const                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_rshift_const                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_andimage_const1                (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_orimage_const1                 (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_eorimage_const1                (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_lshift_const1                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_rshift_const1                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_math2                          (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         VipsOperationMath2 math2,
                                                         ...);
int                 vips_pow                            (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_wop                            (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_math2_const                    (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationMath2 math2,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_pow_const                      (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_wop_const                      (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);
int                 vips_math2_const1                   (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationMath2 math2,
                                                         double c,
                                                         ...);
int                 vips_pow_const1                     (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_wop_const1                     (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);
int                 vips_avg                            (VipsImage *in,
                                                         double *out,
                                                         ...);
int                 vips_deviate                        (VipsImage *in,
                                                         double *out,
                                                         ...);
int                 vips_min                            (VipsImage *in,
                                                         double *out,
                                                         ...);
int                 vips_max                            (VipsImage *in,
                                                         double *out,
                                                         ...);
int                 vips_stats                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_measure                        (VipsImage *in,
                                                         VipsImage **out,
                                                         int h,
                                                         int v,
                                                         ...);
int                 vips_hist_find                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_hist_find_ndim                 (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_hist_find_indexed              (VipsImage *in,
                                                         VipsImage *index,
                                                         VipsImage **out,
                                                         ...);
int                 vips_project                        (VipsImage *in,
                                                         VipsImage **columns,
                                                         VipsImage **rows,
                                                         ...);
int                 vips_profile                        (VipsImage *in,
                                                         VipsImage **columns,
                                                         VipsImage **rows,
                                                         ...);

Description

These operations perform pixel arithmetic, that is, they perform an arithmetic operation, such as addition, on every pixel in an image or a pair of images. All (except in a few cases noted below) will work with images of any type or any mixture of types, of any size and of any number of bands.

For binary operations, if the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

In the same way, for operations that take an array constant, such as vips_remainder_const(), you can mix single-element arrays or single-band images freely.

Arithmetic operations try to preserve precision by increasing the number of bits in the output image when necessary. Generally, this follows the ANSI C conventions for type promotion, so multiplying two VIPS_FORMAT_UCHAR images together, for example, produces a VIPS_FORMAT_USHORT image, and taking the im_costra() of a VIPS_FORMAT_USHORT image produces VIPS_FORMAT_FLOAT image.

For binary arithmetic operations, type promotion occurs in two stages. First, the two input images are cast up to the smallest common format, that is, the type with the smallest range that can represent the full range of both inputs. This conversion can be represented as a table:

Table 1. Smallest common format

in2/in1 uchar char ushort short uint int float double complex double complex
uchar ushort short ushort short uint int float double complex double complex
char short short short short int int float double complex double complex
ushort ushort short ushort short uint int float double complex double complex
short short short short short int int float double complex double complex
uint uint int uint int uint int float double complex double complex
int int int int int int int float double complex double complex
float float float float float float float float double complex double complex
double double double double double double double double double double complex double complex
complex complex complex complex complex complex complex complex double complex complex double complex
double complex double complex double complex double complex double complex double complex double complex double complex double complex double complex double complex


In the second stage, the operation is performed between the two identical types to form the output. The details vary between operations, but generally the principle is that the output type should be large enough to represent the whole range of possible values, except that int never becomes float.

Details

enum VipsOperationMath

typedef enum {
	VIPS_OPERATION_MATH_SIN,
	VIPS_OPERATION_MATH_COS,
	VIPS_OPERATION_MATH_TAN,
	VIPS_OPERATION_MATH_ASIN,
	VIPS_OPERATION_MATH_ACOS,
	VIPS_OPERATION_MATH_ATAN,
	VIPS_OPERATION_MATH_LOG,
	VIPS_OPERATION_MATH_LOG10,
	VIPS_OPERATION_MATH_EXP,
	VIPS_OPERATION_MATH_EXP10,
	VIPS_OPERATION_MATH_LAST
} VipsOperationMath;

See also: vips_math().

VIPS_OPERATION_MATH_SIN

sin(), angles in degrees

VIPS_OPERATION_MATH_COS

cos(), angles in degrees

VIPS_OPERATION_MATH_TAN

tan(), angles in degrees

VIPS_OPERATION_MATH_ASIN

asin(), angles in degrees

VIPS_OPERATION_MATH_ACOS

acos(), angles in degrees

VIPS_OPERATION_MATH_ATAN

atan(), angles in degrees

VIPS_OPERATION_MATH_LOG

log base e

VIPS_OPERATION_MATH_LOG10

log base 10

VIPS_OPERATION_MATH_EXP

e to the something

VIPS_OPERATION_MATH_EXP10

10 to the something

VIPS_OPERATION_MATH_LAST


enum VipsOperationMath2

typedef enum {
	VIPS_OPERATION_MATH2_POW,
	VIPS_OPERATION_MATH2_WOP,
	VIPS_OPERATION_MATH2_LAST
} VipsOperationMath2;

See also: vips_math().

VIPS_OPERATION_MATH2_POW

pow( left, right )

VIPS_OPERATION_MATH2_WOP

pow( right, left )

VIPS_OPERATION_MATH2_LAST


enum VipsOperationRound

typedef enum {
	VIPS_OPERATION_ROUND_RINT,
	VIPS_OPERATION_ROUND_CEIL,
	VIPS_OPERATION_ROUND_FLOOR,
	VIPS_OPERATION_ROUND_LAST
} VipsOperationRound;

See also: vips_round().

VIPS_OPERATION_ROUND_RINT

round to nearest

VIPS_OPERATION_ROUND_CEIL

the smallest integral value not less than

VIPS_OPERATION_ROUND_FLOOR

largest integral value not greater than

VIPS_OPERATION_ROUND_LAST


enum VipsOperationRelational

typedef enum {
	VIPS_OPERATION_RELATIONAL_EQUAL,
	VIPS_OPERATION_RELATIONAL_NOTEQUAL,
	VIPS_OPERATION_RELATIONAL_LESS,
	VIPS_OPERATION_RELATIONAL_LESSEQ,
	VIPS_OPERATION_RELATIONAL_MORE,
	VIPS_OPERATION_RELATIONAL_MOREEQ,
	VIPS_OPERATION_RELATIONAL_LAST
} VipsOperationRelational;

See also: vips_relational().

VIPS_OPERATION_RELATIONAL_EQUAL

==

VIPS_OPERATION_RELATIONAL_NOTEQUAL

!=

VIPS_OPERATION_RELATIONAL_LESS

<

VIPS_OPERATION_RELATIONAL_LESSEQ

<=

VIPS_OPERATION_RELATIONAL_MORE

>

VIPS_OPERATION_RELATIONAL_MOREEQ

>=

VIPS_OPERATION_RELATIONAL_LAST


enum VipsOperationBoolean

typedef enum {
	VIPS_OPERATION_BOOLEAN_AND,
	VIPS_OPERATION_BOOLEAN_OR,
	VIPS_OPERATION_BOOLEAN_EOR,
	VIPS_OPERATION_BOOLEAN_LSHIFT,
	VIPS_OPERATION_BOOLEAN_RSHIFT,
	VIPS_OPERATION_BOOLEAN_LAST
} VipsOperationBoolean;

See also: vips_boolean().

VIPS_OPERATION_BOOLEAN_AND

&

VIPS_OPERATION_BOOLEAN_OR

|

VIPS_OPERATION_BOOLEAN_EOR

^

VIPS_OPERATION_BOOLEAN_LSHIFT

VIPS_OPERATION_BOOLEAN_RSHIFT

VIPS_OPERATION_BOOLEAN_LAST


enum VipsOperationComplex

typedef enum {
	VIPS_OPERATION_COMPLEX_POLAR,
	VIPS_OPERATION_COMPLEX_RECT,
	VIPS_OPERATION_COMPLEX_CONJ,
	VIPS_OPERATION_COMPLEX_LAST
} VipsOperationComplex;

See also: vips_complex().

VIPS_OPERATION_COMPLEX_POLAR

convert to polar coordinates

VIPS_OPERATION_COMPLEX_RECT

convert to rectangular coordinates

VIPS_OPERATION_COMPLEX_CONJ

complex conjugate

VIPS_OPERATION_COMPLEX_LAST


enum VipsOperationComplex2

typedef enum {
	VIPS_OPERATION_COMPLEX2_CROSS_PHASE,
	VIPS_OPERATION_COMPLEX2_LAST
} VipsOperationComplex2;

See also: vips_complex2().

VIPS_OPERATION_COMPLEX2_CROSS_PHASE

convert to polar coordinates

VIPS_OPERATION_COMPLEX2_LAST


enum VipsOperationComplexget

typedef enum {
	VIPS_OPERATION_COMPLEXGET_REAL,
	VIPS_OPERATION_COMPLEXGET_IMAG,
	VIPS_OPERATION_COMPLEXGET_LAST
} VipsOperationComplexget;

See also: vips_complexget().

VIPS_OPERATION_COMPLEXGET_REAL

get real component

VIPS_OPERATION_COMPLEXGET_IMAG

get imaginary component

VIPS_OPERATION_COMPLEXGET_LAST


vips_add ()

int                 vips_add                            (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

This operation calculates in1 + in2 and writes the result to out.

If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:

Table 2. VipsAdd type promotion

input type output type
uchar ushort
char short
ushort uint
short int
uint uint
int int
float float
double double
complex complex
double complex double complex


In other words, the output type is just large enough to hold the whole range of possible values.

Operations on integer images are performed using the processor's vector unit, if possible. Disable this with --vips-novector or IM_NOVECTOR.

See also: vips_subtract(), vips_linear().

left :

input image

right :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_subtract ()

int                 vips_subtract                       (VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);

This operation calculates in1 - in2 and writes the result to out.

If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:

Table 3. VipsSubtract type promotion

input type output type
uchar short
char short
ushort int
short int
uint int
int int
float float
double double
complex complex
double complex double complex


In other words, the output type is just large enough to hold the whole range of possible values.

See also: vips_add(), vips_linear().

in1 :

input image

in2 :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_multiply ()

int                 vips_multiply                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

This operation calculates left * right and writes the result to out.

If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:

Table 4. VipsMultiply type promotion

input type output type
uchar ushort
char short
ushort uint
short int
uint uint
int int
float float
double double
complex complex
double complex double complex


In other words, the output type is just large enough to hold the whole range of possible values.

See also: vips_add(), vips_linear().

left :

left-hand image

right :

right-hand image

out :

output image

Returns :

0 on success, -1 on error

vips_divide ()

int                 vips_divide                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

This operation calculates in1 / in2 and writes the result to out. If any pixels in in2 are zero, the corresponding pixel in out is also zero.

If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:

Table 5. im_divide() type promotion

input type output type
uchar float
char float
ushort float
short float
uint float
int float
float float
double double
complex complex
double complex double complex


In other words, the output type is just large enough to hold the whole range of possible values.

See also: vips_multiply(), vips_linear(), vips_power().

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_linear ()

int                 vips_linear                         (VipsImage *in,
                                                         VipsImage **out,
                                                         double *a,
                                                         double *b,
                                                         int n,
                                                         ...);

Optional arguments:

uchar: output uchar pixels

Pass an image through a linear transform, ie. (out = in * a + b). Output is float for integer input, double for double input, complex for complex input and double complex for double complex input. Set uchar to output uchar pixels.

If the arrays of constants have just one element, that constant is used for all image bands. If the arrays have more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.

See also: vips_linear1(), vips_add().

in :

image to transform

out :

output image

a :

array of constants for multiplication. [array length=n]

b :

array of constants for addition. [array length=n]

n :

length of constant arrays

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_linear1 ()

int                 vips_linear1                        (VipsImage *in,
                                                         VipsImage **out,
                                                         double a,
                                                         double b,
                                                         ...);

Optional arguments:

uchar: output uchar pixels

Run vips_linear() with a single constant.

See also: vips_linear().

in :

image to transform

out :

output image

a :

constant for multiplication

b :

constant for addition

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_remainder ()

int                 vips_remainder                      (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

This operation calculates left % right (remainder after integer division) and writes the result to out. The images may have any non-complex format. For float formats, vips_remainder() calculates in1 - in2 * floor (in1 / in2).

If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), and that format is the result type.

See also: vips_remainder_const(), vips_divide(), vips_round().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_remainder_const ()

int                 vips_remainder_const                (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

This operation calculates in % c (remainder after division by an array of constants) and writes the result to out. The image may have any non-complex format. For float formats, vips_remainder_const() calculates in - c * floor (in / c).

If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.

See also: vips_remainder(), vips_divide(), vips_round().

in :

input image

out :

output image

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_remainder_const1 ()

int                 vips_remainder_const1               (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

This operation calculates in % c (remainder after division by a constant) and writes the result to out. The image may have any non-complex format. For float formats, vips_remainder_const() calculates in - c * floor (in / c).

If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.

See also: vips_remainder(), vips_divide(), vips_round().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_invert ()

int                 vips_invert                         (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

For unsigned formats, this operation calculates (max - in), eg. (255 - in) for uchar. For signed and float formats, this operation calculates (-1 in).

For complex images, only the real part is inverted. See also vips_conj().

See also: vips_linear().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_abs ()

int                 vips_abs                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

This operation finds the absolute value of an image. It does a copy for unsigned integer types, negate for negative values in signed integer types, fabs(3) for float types, and calculates modulus for complex types.

See also: vips_sign().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_sign ()

int                 vips_sign                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Finds the unit vector in the direction of the pixel value. For non-complex images, it returns a signed char image with values -1, 0, and 1 for negative, zero and positive pixels. For complex images, it returns a complex normalised to length 1.

See also: vips_abs().

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_round ()

int                 vips_round                          (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationRound round,
                                                         ...);

Round to an integral value.

Copy for integer types, round float and complex types.

The format of out is always the same as in, so you may wish to cast to an integer format afterwards.

See also: vips_cast()

in :

input VipsImage

out :

output VipsImage

round :

VipsOperationRound rounding operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_floor ()

int                 vips_floor                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Round to an integral value with VIPS_OPERATION_ROUND_FLOOR. See vips_round().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_ceil ()

int                 vips_ceil                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Round to an integral value with VIPS_OPERATION_ROUND_CEIL. See vips_round().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_rint ()

int                 vips_rint                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Round to an integral value with VIPS_OPERATION_ROUND_RINT. See vips_round().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_math ()

int                 vips_math                           (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationMath math,
                                                         ...);

Perform various functions in -lm, the maths library, on images.

Angles are expressed in degrees. The output type is float unless the input is double, in which case the output is double.

Non-complex images only.

See also: vips_math2().

in :

input VipsImage

out :

output VipsImage

math :

math operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_sin ()

int                 vips_sin                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_SIN on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cos ()

int                 vips_cos                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_COS on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_tan ()

int                 vips_tan                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_TAN on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_asin ()

int                 vips_asin                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_ASIN on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_acos ()

int                 vips_acos                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_ACOS on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_atan ()

int                 vips_atan                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_ATAN on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_exp ()

int                 vips_exp                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_EXP on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_exp10 ()

int                 vips_exp10                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_EXP10 on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_log ()

int                 vips_log                            (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_LOG on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_log10 ()

int                 vips_log10                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH_LOG10 on an image. See vips_math().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_complex ()

int                 vips_complex                        (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationComplex cmplx,
                                                         ...);

Perform various operations on complex images.

Angles are expressed in degrees. The output type is complex unless the input is double or dpcomplex, in which case the output is dpcomplex.

in :

input VipsImage

out :

output VipsImage

cmplx :

complex operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_polar ()

int                 vips_polar                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_COMPLEX_POLAR on an image. See vips_complex().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_rect ()

int                 vips_rect                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_COMPLEX_RECT on an image. See vips_complex().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_conj ()

int                 vips_conj                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_COMPLEX_CONJ on an image. See vips_complex().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_complex2 ()

int                 vips_complex2                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         VipsOperationComplex2 cmplx,
                                                         ...);

Perform various binary operations on complex images.

Angles are expressed in degrees. The output type is complex unless the input is double or dpcomplex, in which case the output is dpcomplex.

left :

input VipsImage

right :

input VipsImage

out :

output VipsImage

cmplx :

complex2 operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_cross_phase ()

int                 vips_cross_phase                    (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_COMPLEX2_CROSS_PHASE on an image. See vips_complex2().

left :

input VipsImage

right :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_complexget ()

int                 vips_complexget                     (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationComplexget get,
                                                         ...);

Get components of complex images.

The output type is the same as the input type, except VIPS_FORMAT_COMPLEX becomes VIPS_FORMAT_FLOAT and VIPS_FORMAT_DPCOMPLEX becomes VIPS_FORMAT_DOUBLE.

in :

input VipsImage

out :

output VipsImage

get :

complex operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_real ()

int                 vips_real                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_COMPLEXGET_REAL on an image. See vips_complexget().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_imag ()

int                 vips_imag                           (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_COMPLEXGET_IMAG on an image. See vips_complexget().

in :

input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_complexform ()

int                 vips_complexform                    (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Compose two real images to make a complex image. If either left or right are VIPS_FORMAT_DOUBLE, out is VIPS_FORMAT_DPCOMPLEX. Otherwise out is VIPS_FORMAT_COMPLEX. left becomes the real component of out and right the imaginary.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

See also: vips_complexget().

left :

input image

right :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_relational ()

int                 vips_relational                     (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         VipsOperationRelational relational,
                                                         ...);

Perform various relational operations on pairs of images.

The output type is always uchar, with 0 for FALSE and 255 for TRUE.

Less-than and greater-than for complex images compare the modulus.

If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic).

To decide if pixels match exactly, that is have the same value in every band, use vips_bandbool() after this operation to AND or OR image bands together.

See also: vips_boolean(), vips_bandbool(), vips_relational_const().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

relational :

relational operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_equal ()

int                 vips_equal                          (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_EQUAL on a pair of images. See vips_relational().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_notequal ()

int                 vips_notequal                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_NOTEQUAL on a pair of images. See vips_relational().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_less ()

int                 vips_less                           (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_LESS on a pair of images. See vips_relational().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_lesseq ()

int                 vips_lesseq                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_LESSEQ on a pair of images. See vips_relational().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_more ()

int                 vips_more                           (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_MORE on a pair of images. See vips_relational().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_moreeq ()

int                 vips_moreeq                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_MOREEQ on a pair of images. See vips_relational().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_relational_const ()

int                 vips_relational_const               (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationRelational relational,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform various relational operations on an image and an array of constants.

The output type is always uchar, with 0 for FALSE and 255 for TRUE.

If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.

See also: vips_boolean(), vips_relational().

in :

input image

out :

output image

relational :

relational operation to perform

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_equal_const ()

int                 vips_equal_const                    (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_EQUAL on an image and a constant. See vips_relational_const().

in :

input VipsImage

out :

output VipsImage

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_notequal_const ()

int                 vips_notequal_const                 (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_NOTEQUAL on an image and a constant. See vips_relational_const().

in :

input VipsImage

out :

output VipsImage

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_less_const ()

int                 vips_less_const                     (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_LESS on an image and a constant. See vips_relational_const().

in :

input VipsImage

out :

output VipsImage

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_lesseq_const ()

int                 vips_lesseq_const                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_LESSEQ on an image and a constant. See vips_relational_const().

in :

input VipsImage

out :

output VipsImage

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_more_const ()

int                 vips_more_const                     (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_MORE on an image and a constant. See vips_relational_const().

in :

input VipsImage

out :

output VipsImage

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_moreeq_const ()

int                 vips_moreeq_const                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_MOREEQ on an image and a constant. See vips_relational_const().

in :

input VipsImage

out :

output VipsImage

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_relational_const1 ()

int                 vips_relational_const1              (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationRelational relational,
                                                         double c,
                                                         ...);

Perform various relational operations on an image and a constant. See vips_relational_const().

See also: vips_boolean(), vips_relational().

in :

input image

out :

output image

relational :

relational operation to perform

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_equal_const1 ()

int                 vips_equal_const1                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_EQUAL on an image and a constant. See vips_relational_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_notequal_const1 ()

int                 vips_notequal_const1                (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_NOTEQUAL on an image and a constant. See vips_relational_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_less_const1 ()

int                 vips_less_const1                    (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_LESS on an image and a constant. See vips_relational_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_lesseq_const1 ()

int                 vips_lesseq_const1                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_LESSEQ on an image and a constant. See vips_relational_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_more_const1 ()

int                 vips_more_const1                    (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_MORE on an image and a constant. See vips_relational_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_moreeq_const1 ()

int                 vips_moreeq_const1                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_RELATIONAL_MOREEQ on an image and a constant. See vips_relational_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_boolean ()

int                 vips_boolean                        (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         VipsOperationBoolean boolean,
                                                         ...);

Perform various boolean operations on pairs of images.

The output image is the same format as the upcast input images for integer types. Float types are cast to int before processing. Complex types are not supported.

If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic).

See also: vips_boolean_const().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_andimage ()

int                 vips_andimage                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_AND on a pair of images. See vips_boolean().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_orimage ()

int                 vips_orimage                        (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_OR on a pair of images. See vips_boolean().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_eorimage ()

int                 vips_eorimage                       (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_EOR on a pair of images. See vips_boolean().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_lshift ()

int                 vips_lshift                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_LSHIFT on a pair of images. See vips_boolean().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_rshift ()

int                 vips_rshift                         (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_RSHIFT on a pair of images. See vips_boolean().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_boolean_const ()

int                 vips_boolean_const                  (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationBoolean boolean,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform various boolean operations on an image against an array of constants.

The output type is always uchar, with 0 for FALSE and 255 for TRUE.

If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.

See also: vips_boolean(), vips_boolean_const1().

in :

input image

out :

output image

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_andimage_const ()

int                 vips_andimage_const                 (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_AND on an image and an array of constants. See vips_boolean_const().

See also: vips_boolean(), vips_boolean_const1().

in :

input image

out :

output image

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_orimage_const ()

int                 vips_orimage_const                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_OR on an image and an array of constants. See vips_boolean_const().

See also: vips_boolean(), vips_boolean_const1().

in :

input image

out :

output image

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_eorimage_const ()

int                 vips_eorimage_const                 (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_EOR on an image and an array of constants. See vips_boolean_const().

See also: vips_boolean(), vips_boolean_const1().

in :

input image

out :

output image

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_lshift_const ()

int                 vips_lshift_const                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_LSHIFT on an image and an array of constants. See vips_boolean_const().

See also: vips_boolean(), vips_boolean_const1().

in :

input image

out :

output image

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_rshift_const ()

int                 vips_rshift_const                   (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_LSHIFT on an image and an array of constants. See vips_boolean_const().

See also: vips_boolean(), vips_boolean_const1().

in :

input image

out :

output image

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_andimage_const1 ()

int                 vips_andimage_const1                (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_AND on an image and a constant. See vips_boolean_const1().

See also: vips_boolean(), vips_boolean_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_orimage_const1 ()

int                 vips_orimage_const1                 (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_OR on an image and a constant. See vips_boolean_const1().

See also: vips_boolean(), vips_boolean_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_eorimage_const1 ()

int                 vips_eorimage_const1                (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_EOR on an image and a constant. See vips_boolean_const1().

See also: vips_boolean(), vips_boolean_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_lshift_const1 ()

int                 vips_lshift_const1                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_LSHIFT on an image and a constant. See vips_boolean_const1().

See also: vips_boolean(), vips_boolean_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_rshift_const1 ()

int                 vips_rshift_const1                  (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_BOOLEAN_RSHIFT on an image and a constant. See vips_boolean_const1().

See also: vips_boolean(), vips_boolean_const().

in :

input image

out :

output image

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_math2 ()

int                 vips_math2                          (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         VipsOperationMath2 math2,
                                                         ...);

This operation calculates a 2-ary maths operation on a pair of images and writes the result to out. The images may have any non-complex format. out is float except in the case that either of left or right are double, in which case out is also double.

It detects division by zero, setting those pixels to zero in the output. Beware: it does this silently!

If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.

If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.

The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), and that format is the result type.

See also: vips_math2_const().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

math2 :

math operation to perform

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_pow ()

int                 vips_pow                            (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH2_POW on a pair of images. See vips_math2().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_wop ()

int                 vips_wop                            (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Perform VIPS_OPERATION_MATH2_WOP on a pair of images. See vips_math2().

left :

left-hand input VipsImage

right :

right-hand input VipsImage

out :

output VipsImage

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_math2_const ()

int                 vips_math2_const                    (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationMath2 math2,
                                                         double *c,
                                                         int n,
                                                         ...);

This operation calculates various 2-ary maths operations on an image and an array of constants and writes the result to out. The image may have any non-complex format. out is float except in the case that in is double, in which case out is also double.

It detects division by zero, setting those pixels to zero in the output. Beware: it does this silently!

If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.

See also: vips_math2(), vips_math().

in :

input image

out :

output image

math2 :

math operation to perform

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_pow_const ()

int                 vips_pow_const                      (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_MATH2_POW on an image and a constant. See vips_math2_const().

in :

left-hand input VipsImage

out :

output VipsImage

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_wop_const ()

int                 vips_wop_const                      (VipsImage *in,
                                                         VipsImage **out,
                                                         double *c,
                                                         int n,
                                                         ...);

Perform VIPS_OPERATION_MATH2_WOP on an image and a constant. See vips_math2_const().

in :

left-hand input VipsImage

out :

output VipsImage

c :

array of constants

n :

number of constants in c

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_math2_const1 ()

int                 vips_math2_const1                   (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsOperationMath2 math2,
                                                         double c,
                                                         ...);

This operation calculates various 2-ary maths operations on an image and a constant. See vips_math2_const().

in :

input image

out :

output image

math2 :

math operation to perform

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_pow_const1 ()

int                 vips_pow_const1                     (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_MATH2_POW on an image and a constant. See vips_math2_const().

in :

left-hand input VipsImage

out :

output VipsImage

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_wop_const1 ()

int                 vips_wop_const1                     (VipsImage *in,
                                                         VipsImage **out,
                                                         double c,
                                                         ...);

Perform VIPS_OPERATION_MATH2_WOP on an image and a constant. See vips_math2_const().

in :

left-hand input VipsImage

out :

output VipsImage

c :

constant

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_avg ()

int                 vips_avg                            (VipsImage *in,
                                                         double *out,
                                                         ...);

This operation finds the average value in an image. It operates on all bands of the input image: use vips_stats() if you need to calculate an average for each band. For complex images, return the average modulus.

See also: vips_stats(), vips_bandmean(), vips_deviate(), vips_rank()

in :

input VipsImage

out :

output pixel average

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_deviate ()

int                 vips_deviate                        (VipsImage *in,
                                                         double *out,
                                                         ...);


vips_min ()

int                 vips_min                            (VipsImage *in,
                                                         double *out,
                                                         ...);

Optional arguments:

x: horizontal position of minimum y: vertical position of minimum size: number of minima to find out_array: return array of minimum values x_array: corresponding horizontal positions y_array: corresponding vertical positions

This operation finds the minimum value in an image.

If the image contains several minimum values, only the first size found are returned.

It operates on all bands of the input image: use vips_stats() if you need to find an minimum for each band.

For complex images, this operation finds the minimum modulus.

You can read out the position of the minimum with x and y. You can read out arrays of the values and positions of the top size minima with out_array, x_array and y_array.

See also: vips_min(), vips_stats().

in :

input VipsImage

out :

output pixel minimum

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_max ()

int                 vips_max                            (VipsImage *in,
                                                         double *out,
                                                         ...);

Optional arguments:

x: horizontal position of maximum y: vertical position of maximum size: number of maxima to find out_array: return array of maximum values x_array: corresponding horizontal positions y_array: corresponding vertical positions

This operation finds the maximum value in an image.

If the image contains several maximum values, only the first size found are returned.

It operates on all bands of the input image: use vips_stats() if you need to find an maximum for each band.

For complex images, this operation finds the maximum modulus.

You can read out the position of the maximum with x and y. You can read out arrays of the values and positions of the top size maxima with out_array, x_array and y_array.

See also: vips_min(), vips_stats().

in :

input VipsImage

out :

output pixel maximum

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_stats ()

int                 vips_stats                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Find many image statistics in a single pass through the data. out is a one-band VIPS_FORMAT_DOUBLE image of at least 10 columns by n + 1 (where n is number of bands in image in) rows. Columns are statistics, and are, in order: minimum, maximum, sum, sum of squares, mean, standard deviation, x coordinate of minimum, y coordinate of minimum, x coordinate of maximum, y coordinate of maximum. Later versions of vips_stats() may add more columns.

Row 0 has statistics for all bands together, row 1 has stats for band 1, and so on.

See also: vips_avg(), vips_min().

in :

image to scan

out :

image of statistics

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_measure ()

int                 vips_measure                        (VipsImage *in,
                                                         VipsImage **out,
                                                         int h,
                                                         int v,
                                                         ...);

Optional arguments:

left: area of image containing chart top: area of image containing chart width: area of image containing chart height: area of image containing chart

Analyse a grid of colour patches, producing an array of patch averages. The mask has a row for each measured patch and a column for each image band. The operations issues a warning if any patch has a deviation more than 20% of the mean. Only the central 50% of each patch is averaged.

If the chart does not fill the whole image, use the optional left, top, width, height arguments to indicate the position of the chart.

See also: vips_avg(), vips_deviate().

out :

array of measurements

h :

patches across chart

v :

patches down chart

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_find ()

int                 vips_hist_find                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

band: band to equalise

Find the histogram of in. Find the histogram for band band (producing a one-band histogram), or for all bands (producing an n-band histogram) if band is -1.

in is cast to u8 or u16. out is always u32.

See also: vips_hist_find_ndim(), vips_hist_find_indexed().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_find_ndim ()

int                 vips_hist_find_ndim                 (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

bins: number of bins to make on each axis

Make a one, two or three dimensional histogram of a 1, 2 or 3 band image. Divide each axis into bins bins .. ie. output is 1 x bins, bins x bins, or bins x bins x bins bands. bins defaults to 10.

Images are cast to uchar or ushort before histogramming.

See also: vips_hist_find(), vips_hist_find_indexed().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_hist_find_indexed ()

int                 vips_hist_find_indexed              (VipsImage *in,
                                                         VipsImage *index,
                                                         VipsImage **out,
                                                         ...);

Make a histogram of in, but use image index to pick the bins. In other words, element zero in out contains the sum of all the pixels in in whose corresponding pixel in index is zero.

index must have just one band and be u8 or u16. value must be non-complex. out always has the same size and format as value.

This operation is useful in conjunction with im_label_regions(). You can use it to find the centre of gravity of blobs in an image, for example.

See also: vips_hist_find(), im_label_regions().

in :

input image

index :

input index image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_project ()

int                 vips_project                        (VipsImage *in,
                                                         VipsImage **columns,
                                                         VipsImage **rows,
                                                         ...);

Find the horizontal and vertical projections of an image, ie. the sum of every row of pixels, and the sum of every column of pixels. The output format is uint, int or double, depending on the input format.

Non-complex images only.

See also: vips_hist_find(), vips_profile().

in :

input image

columns :

sums of columns

rows :

sums of rows

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_profile ()

int                 vips_profile                        (VipsImage *in,
                                                         VipsImage **columns,
                                                         VipsImage **rows,
                                                         ...);

vips_profile() searches inward from the edge of in and finds the first non-zero pixel. Pixels in columns have the distance from the top edge to the first non-zero pixel in that column, rows has the distance from the left edge to the first non-zero pixel in that row.

See also: vips_project(), vips_hist_find().

in :

input image

columns :

distances from top edge

rows :

distances from left edge

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

See Also

boolean
vips-7.38.5/doc/reference/html/libvips-version.html0000644000175000017500000001012312303146332017202 00000000000000 version

version

version

Synopsis

#define             VIPS_VERSION
#define             VIPS_VERSION_STRING
#define             VIPS_MAJOR_VERSION
#define             VIPS_MINOR_VERSION
#define             VIPS_MICRO_VERSION
#define             VIPS_EXEEXT

Description

Details

VIPS_VERSION

#define VIPS_VERSION		"7.38.5"


VIPS_VERSION_STRING

#define VIPS_VERSION_STRING "7.38.5-Tue Feb 25 16:50:39 GMT 2014"


VIPS_MAJOR_VERSION

#define VIPS_MAJOR_VERSION (7)


VIPS_MINOR_VERSION

#define VIPS_MINOR_VERSION (38)


VIPS_MICRO_VERSION

#define VIPS_MICRO_VERSION (5)


VIPS_EXEEXT

#define VIPS_EXEEXT ""

vips-7.38.5/doc/reference/html/libvips-create.html0000644000175000017500000030322212303146332016765 00000000000000 create

create

create — create VipsImage in various ways

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

int                 vips_black                          (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_xyz                            (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_grey                           (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_gaussmat                       (VipsImage **out,
                                                         double sigma,
                                                         double min_ampl,
                                                         ...);
int                 vips_logmat                         (VipsImage **out,
                                                         double sigma,
                                                         double min_ampl,
                                                         ...);
int                 vips_text                           (VipsImage **out,
                                                         const char *text,
                                                         ...);
int                 vips_gaussnoise                     (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_eye                            (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_sines                          (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_zone                           (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);
int                 vips_identity                       (VipsImage **out,
                                                         ...);
int                 vips_buildlut                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_invertlut                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_tonelut                        (VipsImage **out,
                                                         ...);
int                 vips_mask_ideal                     (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff,
                                                         ...);
int                 vips_mask_ideal_ring                (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff,
                                                         double ringwidth,
                                                         ...);
int                 vips_mask_ideal_band                (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff_x,
                                                         double frequency_cutoff_y,
                                                         double r,
                                                         ...);
int                 vips_mask_butterworth               (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double order,
                                                         double frequency_cutoff,
                                                         double amplitude_cutoff,
                                                         ...);
int                 vips_mask_butterworth_ring          (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double order,
                                                         double frequency_cutoff,
                                                         double amplitude_cutoff,
                                                         double ringwidth,
                                                         ...);
int                 vips_mask_butterworth_band          (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double order,
                                                         double frequency_cutoff_x,
                                                         double frequency_cutoff_y,
                                                         double r,
                                                         double amplitude_cutoff,
                                                         ...);
int                 vips_mask_gaussian                  (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff,
                                                         double amplitude_cutoff,
                                                         ...);
int                 vips_mask_gaussian_ring             (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff,
                                                         double amplitude_cutoff,
                                                         double ringwidth,
                                                         ...);
int                 vips_mask_gaussian_band             (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff_x,
                                                         double frequency_cutoff_y,
                                                         double r,
                                                         double amplitude_cutoff,
                                                         ...);
int                 vips_mask_fractal                   (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double fractal_dimension,
                                                         ...);
int                 vips_fractsurf                      (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double fractal_dimension,
                                                         ...);
int                 im_benchmarkn                       (VipsImage *in,
                                                         VipsImage *out,
                                                         int n);
int                 im_benchmark2                       (VipsImage *in,
                                                         double *out);

Description

These functions generate various test images. You can combine them with the arithmetic and rotate functions to build more complicated images.

The im_benchmark() operations are for testing the VIPS SMP system.

Details

vips_black ()

int                 vips_black                          (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

bands: output bands

Make a black unsigned char image of a specified size.

See also: im_make_xy(), im_text(), im_gaussnoise().

out :

output image

width :

output width

height :

output height

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_xyz ()

int                 vips_xyz                            (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

csize: size for third dimension dsize: size for fourth dimension esize: size for fifth dimension

Create a two-band uint32 image where the elements in the first band have the value of their x coordinate and elements in the second band have their y coordinate.

You can make any image where the value of a pixel is a function of its (x, y) coordinate by combining this operator with the arithmetic operators.

Set csize, dsize, esize to generate higher dimensions and add more bands. The extra dimensions are placed down the vertical axis. Use vips_grid() to change the layout.

See also: vips_grey(), vips_grid(), vips_identity().

out :

output image

width :

horizontal size

height :

vertical size

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_grey ()

int                 vips_grey                           (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

uchar: output a uchar image

Create a one-band float image with the left-most column zero and the right-most 1. Intermediate pixels are a linear ramp.

Set uchar to output a uchar image with the leftmost pixel 0 and the rightmost 255.

See also: vips_xyz(), vips_identity().

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_gaussmat ()

int                 vips_gaussmat                       (VipsImage **out,
                                                         double sigma,
                                                         double min_ampl,
                                                         ...);

Optional arguments:

separable: generate a separable gaussian integer: generate an integer gaussian

Creates a circularly symmetric Gaussian image of radius sigma. The size of the mask is determined by the variable min_ampl; if for instance the value .1 is entered this means that the produced mask is clipped at values less than 10 percent of the maximum amplitude.

The program uses the following equation:

H(r) = exp( -(r * r) / (2 * sigma * sigma) )

The generated image has odd size and its maximum value is normalised to 1.0, unless integer is set.

If separable is set, only the centre horizontal is generated. This is useful for separable convolutions.

If integer is set, an integer gaussian is generated. This is useful for integer convolutions.

"scale" is set to the sum of all the mask elements.

See also: im_log_dmask(), vips_conv().

sigma :

standard deviation of mask

min_ampl :

minimum amplitude

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_logmat ()

int                 vips_logmat                         (VipsImage **out,
                                                         double sigma,
                                                         double min_ampl,
                                                         ...);

Optional arguments:

separable: generate a separable logmatian integer: generate an integer logmatian

Creates a circularly symmetric Laplacian of Gaussian mask of radius sigma. The size of the mask is determined by the variable min_ampl; if for instance the value .1 is entered this means that the produced mask is clipped at values within 10 persent of zero, and where the change between mask elements is less than 10%.

The program uses the following equation: (from Handbook of Pattern Recognition and image processing by Young and Fu, AP 1986 pages 220-221):

H(r) = (1 / (2 * M_PI * s4)) * (2 - (r2 / s2)) * exp(-r2 / (2 * s2))

where s2 = sigma * sigma, s4 = s2 * s2, r2 = r * r.

The generated mask has odd size and its maximum value is normalised to 1.0, unless integer is set.

If separable is set, only the centre horizontal is generated. This is useful for separable convolutions.

If integer is set, an integer logmatian is generated. This is useful for integer convolutions.

"scale" is set to the sum of all the mask elements.

See also: vips_gauss(), vips_conv().

sigma :

standard deviation of mask

min_ampl :

minimum amplitude

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_text ()

int                 vips_text                           (VipsImage **out,
                                                         const char *text,
                                                         ...);

Optional arguments:

font: font to render with width: render within this many pixels across alignment: left/centre/right alignment dpi: render at this resolution

Draw the string text to an image. out is a one-band 8-bit unsigned char image, with 0 for no text and 255 for text. Values inbetween are used for anti-aliasing.

text is the text to render as a UTF-8 string. It can contain Pango markup, for example "<i>The</i>Guardian".

font is the font to render with, as a fontconfig name. Examples might be "sans 12" or perhaps "bitstream charter bold 10".

width is the maximum number of pixels across to draw within. If the generated text is wider than this, it will wrap to a new line. In this case, alignment can be used to set the alignment style for multi-line text. 0 means left-align, 1 centre, 2 right-align.

dpi sets the resolution to render at. "sans 12" at 72 dpi draws characters approximately 12 pixels high.

See also: vips_make_xy(), vips_text(), vips_gaussnoise().

out :

output image

text :

utf-8 text string to render

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_gaussnoise ()

int                 vips_gaussnoise                     (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

mean: mean of generated pixels sigma: standard deviation of generated pixels

Make a one band float image of gaussian noise with the specified distribution. The noise distribution is created by averaging 12 random numbers with the appropriate weights.

See also: vips_black(), im_make_xy(), im_text().

out :

output image

width :

output width

height :

output height

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_eye ()

int                 vips_eye                            (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

factor: maximum spatial frequency uchar: output a uchar image

Create a test pattern with increasing spatial frequence in X and amplitude in Y. factor should be between 0 and 1 and determines the maximum spatial frequency.

Set uchar to output a uchar image.

See also: vips_zone().

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_sines ()

int                 vips_sines                          (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

hfreq: horizontal frequency vreq: vertical frequency uchar: output a uchar image

Creates a float one band image of the a sine waveform in two dimensions.

The number of horizontal and vertical spatial frequencies are determined by the variables hfreq and vfreq respectively. The function is useful for creating displayable sine waves and square waves in two dimensions.

If horfreq and verfreq are integers the resultant image is periodical and therfore the Fourier transform does not present spikes

Pixels are normally in [-1, +1], set uchar to output [0, 255].

See also: vips_grey(), vips_xyz().

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_zone ()

int                 vips_zone                           (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         ...);

Optional arguments:

uchar: output a uchar image

Create a one-band image of a zone plate.

Pixels are normally in [-1, +1], set uchar to output [0, 255].

See also: vips_eye(), vips_xyz().

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_identity ()

int                 vips_identity                       (VipsImage **out,
                                                         ...);

Optional arguments:

bands: number of bands to create ushort: TRUE for an unsigned short identity size: number of LUT elements for a ushort image

Creates an identity lookup table, ie. one which will leave an image unchanged when applied with vips_maplut(). Each entry in the table has a value equal to its position.

Use the arithmetic operations on these tables to make LUTs representing arbitrary functions.

Normally LUTs are 8-bit. Set ushort to create a 16-bit table.

Normally 16-bit tables have 65536 entries. You can set this smaller with size.

See also: vips_xyz(), vips_maplut().

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_buildlut ()

int                 vips_buildlut                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

This operation builds a lookup table from a set of points. Intermediate values are generated by piecewise linear interpolation.

For example, consider this 2 x 2 matrix of (x, y) coordinates:

0 0
255 100

We then generate:

Index Value
0 0
1 0.4
... etc. by linear interpolation
255 100

This is then written as the output image, with the left column giving the index in the image to place the value.

The (x, y) points don't need to be sorted: we do that. You can have several Ys, each becomes a band in the output LUT. You don't need to start at zero, any integer will do, including negatives.

See also: vips_identity(), vips_invertlut().

in :

input matrix

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_invertlut ()

int                 vips_invertlut                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

size: generate this much

Given a mask of target values and real values, generate a LUT which will map reals to targets. Handy for linearising images from measurements of a colour chart. All values in [0,1]. Piecewise linear interpolation, extrapolate head and tail to 0 and 1.

Eg. input like this:

4 3    
0.1 0.2 0.3 0.1
0.2 0.4 0.4 0.2
0.7 0.5 0.6 0.3

Means a patch with 10% reflectance produces an image with 20% in channel 1, 30% in channel 2, and 10% in channel 3, and so on.

Inputs don't need to be sorted (we do that). Generate any precision LUT, default to 256 elements.

It won't work too well for non-monotonic camera responses (we should fix this). Interpolation is simple piecewise linear; we ought to do something better really.

See also: vips_buildlut().

in :

input mask

out :

output LUT

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_tonelut ()

int                 vips_tonelut                        (VipsImage **out,
                                                         ...);

Optional arguments:

in_max: input range out_max: output range Lb: black-point [0-100] Lw: white-point [0-100] Ps: shadow point (eg. 0.2) Pm: mid-tone point (eg. 0.5) Ph: highlight point (eg. 0.8) S: shadow adjustment (+/- 30) M: mid-tone adjustment (+/- 30) H: highlight adjustment (+/- 30)

vips_tonelut() generates a tone curve for the adjustment of image levels. It is mostly designed for adjusting the L* part of a LAB image in a way suitable for print work, but you can use it for other things too.

The curve is an unsigned 16-bit image with (in_max + 1) entries, each in the range [0, out_max].

Lb, Lw are expressed as 0-100, as in LAB colour space. You specify the scaling for the input and output images with the in_max and out_max parameters.

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_ideal ()

int                 vips_mask_ideal                     (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make an ideal high- or low-pass filter, that is, one with a sharp cutoff positioned at frequency_cutoff, where frequency_cutoff is in the range 0 - 1.

This operation creates a one-band float image of the specified size. The image has values in the range [0, 1] and is typically used for multiplying against frequency domain images to filter them. Masks are created with the DC component at (0, 0). The DC pixel always has the value 1.0.

Set nodc to not set the DC pixel.

Set optical to position the DC component in the centre of the image. This makes the mask suitable for multiplying against optical Fourier transforms. See vips_wrap().

Set reject to invert the sense of the filter. For example, low-pass becomes low-reject.

Set uchar to output an 8-bit unsigned char image rather than a float image. In this case, pixels are in the range [0 - 255].

See also: vips_mask_ideal(), vips_mask_ideal_ring(), vips_mask_ideal_band(), vips_mask_butterworth(), vips_mask_butterworth_ring(), vips_mask_butterworth_band(), vips_mask_gaussian(), vips_mask_gaussian_ring(), vips_mask_gaussian_band().

out :

output image

width :

image size

height :

image size

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_ideal_ring ()

int                 vips_mask_ideal_ring                (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff,
                                                         double ringwidth,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make an ideal ring-pass or ring-reject filter, that is, one with a sharp ring positioned at frequency_cutoff of width width, where frequency_cutoff and width are expressed as the range 0 - 1.

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

ringwidth :

ringwidth

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_ideal_band ()

int                 vips_mask_ideal_band                (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff_x,
                                                         double frequency_cutoff_y,
                                                         double r,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make an ideal band-pass or band-reject filter, that is, one with a sharp cutoff around the point frequency_cutoff_x, frequency_cutoff_y, of size r.

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

frequency_cutoff_x :

position of band

frequency_cutoff_y :

position of band

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_butterworth ()

int                 vips_mask_butterworth               (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double order,
                                                         double frequency_cutoff,
                                                         double amplitude_cutoff,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make an butterworth high- or low-pass filter, that is, one with a variable, smooth transition positioned at frequency_cutoff, where frequency_cutoff is in range 0 - 1. The shape of the curve is controlled by order: higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

order :

filter order

frequency_cutoff :

frequency threshold

amplitude_cutoff :

amplitude threshold

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_butterworth_ring ()

int                 vips_mask_butterworth_ring          (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double order,
                                                         double frequency_cutoff,
                                                         double amplitude_cutoff,
                                                         double ringwidth,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make a butterworth ring-pass or ring-reject filter, that is, one with a variable, smooth transition positioned at frequency_cutoff of width width, where frequency_cutoff is in the range 0 - 1. The shape of the curve is controlled by order: higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

order :

filter order

frequency_cutoff :

frequency threshold

amplitude_cutoff :

amplitude threshold

ringwidth :

ringwidth

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_butterworth_band ()

int                 vips_mask_butterworth_band          (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double order,
                                                         double frequency_cutoff_x,
                                                         double frequency_cutoff_y,
                                                         double r,
                                                         double amplitude_cutoff,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make an butterworth band-pass or band-reject filter, that is, one with a variable, smooth transition positioned at frequency_cutoff_x, frequency_cutoff_y, of radius radius. The shape of the curve is controlled by order: higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

order :

filter order

frequency_cutoff_x :

band position

frequency_cutoff_y :

band position

amplitude_cutoff :

amplitude threshold

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_gaussian ()

int                 vips_mask_gaussian                  (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff,
                                                         double amplitude_cutoff,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make a gaussian high- or low-pass filter, that is, one with a variable, smooth transition positioned at frequency_cutoff.

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

frequency_cutoff :

frequency threshold

amplitude_cutoff :

amplitude threshold

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_gaussian_ring ()

int                 vips_mask_gaussian_ring             (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff,
                                                         double amplitude_cutoff,
                                                         double ringwidth,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make a gaussian ring-pass or ring-reject filter, that is, one with a variable, smooth transition positioned at frequency_cutoff of width ringwidth.

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

frequency_cutoff :

frequency threshold

amplitude_cutoff :

amplitude threshold

ringwidth :

ringwidth

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_gaussian_band ()

int                 vips_mask_gaussian_band             (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double frequency_cutoff_x,
                                                         double frequency_cutoff_y,
                                                         double r,
                                                         double amplitude_cutoff,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

Make a gaussian band-pass or band-reject filter, that is, one with a variable, smooth transition positioned at frequency_cutoff_x, frequency_cutoff_y, of radius radius.

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

frequency_cutoff_x :

band position

frequency_cutoff_y :

band position

amplitude_cutoff :

amplitude threshold

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_mask_fractal ()

int                 vips_mask_fractal                   (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double fractal_dimension,
                                                         ...);

Optional arguments:

nodc: don't set the DC pixel reject: invert the filter sense optical: coordinates in optical space uchar: output a uchar image

This operation should be used to create fractal images by filtering the power spectrum of Gaussian white noise. See vips_gaussnoise().

See also: vips_mask_ideal().

out :

output image

width :

image size

height :

image size

fractal_dimension :

fractal dimension

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

vips_fractsurf ()

int                 vips_fractsurf                      (VipsImage **out,
                                                         int width,
                                                         int height,
                                                         double fractal_dimension,
                                                         ...);

Generate an image of size width by height and fractal dimension fractal_dimension. The dimension should be between 2 and 3.

See also: vips_gaussnoise(), vips_mask_fractal().

out :

output image

width :

output width

height :

output height

fractal_dimension :

fractal dimension

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error

im_benchmarkn ()

int                 im_benchmarkn                       (VipsImage *in,
                                                         VipsImage *out,
                                                         int n);

This operation runs a complicated set of other operations on image in, producing image out. Use n to set the number of iterations to run: a larger number will make the operation more CPU-bound, a smaller number will make the operation more IO-bound.

See http://www.vips.ecs.soton.ac.uk/index.php?title=Benchmarks for a detailed discussion of the benchmark and some sample results.

See also: im_benchmark2().

in :

input image

out :

output image

n :

iterations

Returns :

0 on success, -1 on error

im_benchmark2 ()

int                 im_benchmark2                       (VipsImage *in,
                                                         double *out);

This operation runs a single im_benchmarkn() and calculates the average pixel value. It's useful if you just want to test image input.

See also: im_benchmarkn().

in :

input image

out :

average image value

Returns :

0 on success, -1 on error
vips-7.38.5/doc/reference/html/index.html0000644000175000017500000001416412303146332015167 00000000000000 VIPS Reference Manual

For VIPS 7.38.5. The latest version of this documentation can be found on the VIPS website.


Core VIPS API
VipsImage — the VIPS image class
VipsRegion — small, rectangular parts of images
generate — calculate pixels and pixel buffers
header — get, set and walk image headers
VipsOperation — the VIPS operation base object class
rect — the VIPS rectangle class
VipsThreadState — pools of worker threads
VipsArgument — the VIPS base object class
memory — memory utilities
error — error messages and error handling
buf — a string you can append to
VIPS operation API by section
arithmetic — operations which perform pixel arithmetic, trig, log, statistics
colour — colour operators
conversion — convert images in some way: change band format, change header, insert, extract, join
convolution — convolve and correlate images
VipsForeign — load and save images in a variety of formats
freqfilt
histogram — find, manipulate and apply histograms and lookup tables
inplace — in-place paintbox operations: flood, paste, line, circle
VipsInterpolate — various interpolators: nearest, bilinear, and some non-linear
morphology — morphological operators, rank filters and related image analysis
mosaicing — build image mosaics
createcreate VipsImage in various ways
resample — shrink, expand, rotate with a choice of interpolators
Other API (no gtkdoc comments yet)
transform
util
version
semaphore
Object Hierarchy
API Index
Annotation Glossary
vips-7.38.5/doc/reference/html/libvips-resample.html0000644000175000017500000004161712303146332017341 00000000000000 resample

resample

resample — shrink, expand, rotate with a choice of interpolators

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

int                 vips_shrink                         (VipsImage *in,
                                                         VipsImage **out,
                                                         double xshrink,
                                                         double yshrink,
                                                         ...);
int                 vips_similarity                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_affine                         (VipsImage *in,
                                                         VipsImage **out,
                                                         double a,
                                                         double b,
                                                         double c,
                                                         double d,
                                                         ...);
int                 vips_quadratic                      (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *coeff,
                                                         ...);

Description

Resample an image in various ways, using a VipsInterpolator to generate intermediate values.

Details

vips_shrink ()

int                 vips_shrink                         (VipsImage *in,
                                                         VipsImage **out,
                                                         double xshrink,
                                                         double yshrink,
                                                         ...);

Shrink in by a pair of factors with a simple box filter.

You will get aliasing for non-integer shrinks. In this case, shrink with this function to the nearest integer size above the target shrink, then downsample to the exact size with vips_affine() and your choice of interpolator.

See also: vips_affine().

in :

input image

out :

output image

xshrink :

horizontal shrink

yshrink :

vertical shrink

Returns :

0 on success, -1 on error

vips_similarity ()

int                 vips_similarity                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

scale: scale by this factor angle: rotate by this many degrees anticlockwise interpolate: interpolate pixels with this idx: input horizontal offset idy: input vertical offset odx: output horizontal offset ody: output vertical offset

This operator calls vips_affine() for you, calculating the matrix for the affine transform from scale and angle. Other parameters are passed on to vips_affine() unaltered.

See also: vips_affine(), VipsInterpolate.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_affine ()

int                 vips_affine                         (VipsImage *in,
                                                         VipsImage **out,
                                                         double a,
                                                         double b,
                                                         double c,
                                                         double d,
                                                         ...);

Optional arguments:

interpolate: interpolate pixels with this oarea: output rectangle idx: input horizontal offset idy: input vertical offset odx: output horizontal offset ody: output vertical offset

This operator performs an affine transform on an image using interpolate.

The transform is:

X = a * (x + idx) + b * (y + idy) + odx Y = c * (x + idx) + d * (y + idy) + doy

x and y are the coordinates in input image. X and Y are the coordinates in output image. (0,0) is the upper left corner.

The section of the output space defined by oarea is written to out. oarea is a four-element int array of left, top, width, height. By default oarea is just large enough to cover the whole of the transformed input image.

interpolate defaults to bilinear.

idx, idy, odx, ody default to zero.

See also: vips_shrink(), VipsInterpolate.

in :

input image

out :

output image

a :

transformation matrix coefficient

b :

transformation matrix coefficient

c :

transformation matrix coefficient

d :

transformation matrix coefficient

Returns :

0 on success, -1 on error

vips_quadratic ()

int                 vips_quadratic                      (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsImage *coeff,
                                                         ...);

Optional arguments:

interpolate: use this interpolator (default bilinear)

See also: im_affinei().

in :

input image

out :

output image

coeff :

horizontal quadratic

Returns :

0 on success, -1 on error
vips-7.38.5/doc/reference/html/home.png0000644000175000017500000000107512303146331014624 00000000000000‰PNG  IHDRשÍÊðPLTEÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  $$$(((,,,000888<<<@@@OOOPPP[[[___```lll{{{€€€‹‹‹£££¯¯¯¿¿¿ÃÃÃÇÇÇÏÏÏÓÓÓÛÛÛßßßãããëëëïïïóóó÷÷÷ÿÿÿÕ?“*tRNS  $(,4@GKSghkotw‡‹›Ÿ«·»¿ÃËÏÓÛßçïó÷ûa7™ÞÒIDATx­Í[7†@Æñ^EÈù ”b'…qˆ!DŒdÿocD™Y±– ¿ËçñÀŒÌÎÃ&}¢Ðž°,sTÓa}y&èC`+ûÂþ CLn9¿ÁP;«ô˜ aÆsûÚ.Ýà'Aç2t·7غª» o/ð;ÎÉén5iI+Ì4·ºøž–a£Š±¯ô`í-;Å#®`ȲWÌrRäXÐÞÀ`§vGAÚìþ?¤\qÒ†õ*BMôä5aŽD¡y¦%h8[¾f{р߽C‰VF3‹ÔIEND®B`‚vips-7.38.5/doc/reference/html/VipsInterpolate.html0000644000175000017500000006160112303146332017206 00000000000000 VipsInterpolate

VipsInterpolate

VipsInterpolate — various interpolators: nearest, bilinear, and some non-linear

Stability Level

Stable, unless otherwise indicated

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsInterpolate

Description

A number of image interpolators.

Details

VipsInterpolate

typedef struct _VipsInterpolate VipsInterpolate;


VipsInterpolateMethod ()

void                (*VipsInterpolateMethod)            (VipsInterpolate *interpolate,
                                                         void *out,
                                                         VipsRegion *in,
                                                         double x,
                                                         double y);

An interpolation function. It should read source pixels from in with VIPS_REGION_ADDR(), it can look left and up from (x, y) by window_offset pixels and it can access pixels in a window of size window_size.

The interpolated value should be written to the pixel pointed to by out.

See also: VipsInterpolateClass.

interpolate :

the interpolator

out :

write the interpolated pixel here

in :

read source pixels from here

x :

interpolate value at this position

y :

interpolate value at this position

VipsInterpolateClass

typedef struct {
	VipsObjectClass parent_class;

	/* Write to pixel out(x,y), interpolating from in(x,y). The caller has
	 * to set the regions up.
	 */
	VipsInterpolateMethod interpolate;

	/* This interpolator needs a window this many pixels across and down.
	 */
	int (*get_window_size)( VipsInterpolate * );

	/* Or just set this if you want a constant.
	 */
	int window_size;

	/* Stencils are offset by this much. Default to window_size / 2 - 1
	 * (centering) if get_window_offset is NULL and window_offset is -1.
	 */
	int (*get_window_offset)( VipsInterpolate * );
	int window_offset;
} VipsInterpolateClass;

The abstract base class for the various VIPS interpolation functions. Use "vips --list classes" to see all the interpolators available.

An interpolator consists of a function to perform the interpolation, plus some extra data fields which tell vips how to call the function and what data it needs.

window_size is the size of the window that the interpolator needs. For example, a bicubic interpolator needs to see a window of 4x4 pixels to be able to interpolate a value.

You can either have a function in get_window_size which returns the window that a specific interpolator needs, or you can leave get_window_size NULL and set a constant value in window_size.

window_offset is how much to offset the window up and left of (x, y). For example, a bicubic interpolator will want a window_offset of 1.

You can either have a function in get_window_offset which returns the offset that a specific interpolator needs, or you can leave get_window_offset NULL and set a constant value in window_offset.

You also need to set nickname and description in VipsObject.

See also: VipsInterpolateMethod, VipsObject, vips_interpolate_bilinear_static().

VipsObjectClass parent_class;

VipsInterpolateMethod interpolate;

the interpolation method

get_window_size ()

return the size of the window needed by this method

int window_size;

or just set this for a constant window size

get_window_offset ()

return the window offset for this method

int window_offset;

or just set this for a constant window offset

vips_interpolate ()

void                vips_interpolate                    (VipsInterpolate *interpolate,
                                                         void *out,
                                                         VipsRegion *in,
                                                         double x,
                                                         double y);

Look up the interpolate method in the class and call it. Use vips_interpolate_get_method() to get a direct pointer to the function and avoid the lookup overhead.

You need to set in and out up correctly.

interpolate :

interpolator to use

out :

write result here

in :

read source data from here

x :

interpolate value at this position

y :

interpolate value at this position

vips_interpolate_get_method ()

VipsInterpolateMethod vips_interpolate_get_method       (VipsInterpolate *interpolate);

Look up the interpolate method in the class and return it. Use this instead of vips_interpolate() to cache method dispatch.

interpolate :

interpolator to use

Returns :

a pointer to the interpolation function

vips_interpolate_get_window_size ()

int                 vips_interpolate_get_window_size    (VipsInterpolate *interpolate);

Look up an interpolators desired window size.

interpolate :

interpolator to use

Returns :

the interpolators required window size

vips_interpolate_get_window_offset ()

int                 vips_interpolate_get_window_offset  (VipsInterpolate *interpolate);

Look up an interpolators desired window offset.

interpolate :

interpolator to use

Returns :

the interpolators required window offset

VIPS_TRANSFORM_SHIFT

#define VIPS_TRANSFORM_SHIFT (6)

Many of the vips interpolators use fixed-point arithmetic for coordinate calculation. This is how many bits of precision they use.


VIPS_TRANSFORM_SCALE

#define VIPS_TRANSFORM_SCALE (1 << VIPS_TRANSFORM_SHIFT)

VIPS_TRANSFORM_SHIFT as a multiplicative constant.


VIPS_INTERPOLATE_SHIFT

#define VIPS_INTERPOLATE_SHIFT (12)

Many of the vips interpolators use fixed-point arithmetic for value calcualtion. This is how many bits of precision they use.


VIPS_INTERPOLATE_SCALE

#define VIPS_INTERPOLATE_SCALE (1 << VIPS_INTERPOLATE_SHIFT)

VIPS_INTERPOLATE_SHIFT as a multiplicative constant.


vips_interpolate_nearest_static ()

VipsInterpolate *   vips_interpolate_nearest_static     (void);

A convenience function that returns a nearest-neighbour interpolator you don't need to free.

Returns :

a nearest-neighbour interpolator. [transfer none]

vips_interpolate_bilinear_static ()

VipsInterpolate *   vips_interpolate_bilinear_static    (void);

A convenience function that returns a bilinear interpolator you don't need to free.

Returns :

a bilinear interpolator. [transfer none]

vips_interpolate_new ()

VipsInterpolate *   vips_interpolate_new                (const char *nickname);

Look up an interpolator from a nickname and make one. You need to free the result with g_object_unref() when you're done with it.

See also: vips_type_find().

nickname :

nickname for interpolator

Returns :

an interpolator, or NULL on error.
vips-7.38.5/doc/reference/html/libvips-VipsArgument.html0000644000175000017500000032363712303146332020162 00000000000000 VipsArgument

VipsArgument

VipsArgument — the VIPS base object class

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

#define             VIPS_UNREF                          (X)
enum                VipsArgumentFlags;
#define             VIPS_ARGUMENT_REQUIRED_INPUT
#define             VIPS_ARGUMENT_OPTIONAL_INPUT
#define             VIPS_ARGUMENT_REQUIRED_OUTPUT
#define             VIPS_ARGUMENT_OPTIONAL_OUTPUT
#define             VIPS_ARG_IMAGE                      (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET)
#define             VIPS_ARG_INTERPOLATE                (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET)
#define             VIPS_ARG_BOOL                       (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET,
                                                         VALUE)
#define             VIPS_ARG_DOUBLE                     (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET,
                                                         MIN,
                                                         MAX,
                                                         VALUE)
#define             VIPS_ARG_BOXED                      (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET,
                                                         TYPE)
#define             VIPS_ARG_INT                        (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET,
                                                         MIN,
                                                         MAX,
                                                         VALUE)
#define             VIPS_ARG_UINT64                     (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET,
                                                         MIN,
                                                         MAX,
                                                         VALUE)
#define             VIPS_ARG_ENUM                       (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET,
                                                         TYPE,
                                                         VALUE)
#define             VIPS_ARG_FLAGS                      (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET,
                                                         TYPE,
                                                         VALUE)
#define             VIPS_ARG_STRING                     (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET,
                                                         VALUE)
#define             VIPS_ARG_POINTER                    (CLASS,
                                                         NAME,
                                                         PRIORITY,
                                                         LONG,
                                                         DESC,
                                                         FLAGS,
                                                         OFFSET)
                    VipsArgument;
                    VipsArgumentClass;
                    VipsArgumentInstance;
typedef             VipsArgumentTable;
VipsArgumentInstance * vips__argument_get_instance      (VipsArgumentClass *Param1,
                                                         VipsObject *Param2);
VipsArgument *      vips__argument_table_lookup         (VipsArgumentTable *Param1,
                                                         GParamSpec *Param2);
void                vips__object_set_member             (VipsObject *object,
                                                         GParamSpec *pspec,
                                                         GObject **member,
                                                         GObject *argument);
void *              (*VipsArgumentMapFn)                (VipsObject *Param1,
                                                         GParamSpec *Param2,
                                                         VipsArgumentClass *Param3,
                                                         VipsArgumentInstance *Param4,
                                                         void *a,
                                                         void *b);
void *              vips_argument_map                   (VipsObject *object,
                                                         VipsArgumentMapFn fn,
                                                         void *a,
                                                         void *b);
void *              (*VipsArgumentClassMapFn)           (VipsObjectClass *Param1,
                                                         GParamSpec *Param2,
                                                         VipsArgumentClass *Param3,
                                                         void *a,
                                                         void *b);
void *              vips_argument_class_map             (VipsObjectClass *object_class,
                                                         VipsArgumentClassMapFn fn,
                                                         void *a,
                                                         void *b);
int                 vips_object_get_argument            (VipsObject *object,
                                                         const char *name,
                                                         GParamSpec **pspec,
                                                         VipsArgumentClass **argument_class,
                                                         VipsArgumentInstance **argument_instance);
gboolean            vips_object_argument_isset          (VipsObject *object,
                                                         const char *name);
VipsArgumentFlags   vips_object_get_argument_flags      (VipsObject *object,
                                                         const char *name);
int                 vips_object_get_argument_priority   (VipsObject *object,
                                                         const char *name);
#define             VIPS_ARGUMENT_FOR_ALL               (OBJECT,
                                                         PSPEC,
                                                         ARG_CLASS,
                                                         ARG_INSTANCE)
#define             VIPS_ARGUMENT_COLLECT_SET           (PSPEC,
                                                         ARG_CLASS,
                                                         AP)
#define             VIPS_ARGUMENT_COLLECT_GET           (PSPEC,
                                                         ARG_CLASS,
                                                         AP)
#define             VIPS_ARGUMENT_COLLECT_END
struct              VipsObject;
struct              VipsObjectClass;
gboolean            vips_value_is_null                  (GParamSpec *psoec,
                                                         const GValue *value);
void                vips_object_set_property            (GObject *gobject,
                                                         guint property_id,
                                                         const GValue *value,
                                                         GParamSpec *pspec);
void                vips_object_get_property            (GObject *gobject,
                                                         guint property_id,
                                                         GValue *value,
                                                         GParamSpec *pspec);
void                vips_object_preclose                (VipsObject *object);
int                 vips_object_build                   (VipsObject *object);
void                vips_object_summary_class           (VipsObjectClass *klass,
                                                         VipsBuf *buf);
void                vips_object_summary                 (VipsObject *object,
                                                         VipsBuf *buf);
void                vips_object_dump                    (VipsObject *object,
                                                         VipsBuf *buf);
void                vips_object_print_summary_class     (VipsObjectClass *klass);
void                vips_object_print_summary           (VipsObject *object);
void                vips_object_print_dump              (VipsObject *object);
void                vips_object_print_name              (VipsObject *object);
gboolean            vips_object_sanity                  (VipsObject *object);
void                vips_object_class_install_argument  (VipsObjectClass *Param1,
                                                         GParamSpec *pspec,
                                                         VipsArgumentFlags flags,
                                                         int priority,
                                                         guint offset);
int                 vips_object_set_argument_from_string
                                                        (VipsObject *object,
                                                         const char *name,
                                                         const char *value);
gboolean            vips_object_argument_needsstring    (VipsObject *object,
                                                         const char *name);
int                 vips_object_get_argument_to_string  (VipsObject *object,
                                                         const char *name,
                                                         const char *arg);
int                 vips_object_set_required            (VipsObject *object,
                                                         const char *value);
void *              (*VipsObjectSetArguments)           (VipsObject *Param1,
                                                         void *Param2,
                                                         void *Param3);
VipsObject *        vips_object_new                     (GType type,
                                                         VipsObjectSetArguments set,
                                                         void *a,
                                                         void *b);
int                 vips_object_set_valist              (VipsObject *object,
                                                         va_list ap);
int                 vips_object_set                     (VipsObject *object,
                                                         ...);
VipsObject *        vips_object_new_from_string         (VipsObjectClass *object_class,
                                                         const char *p);
void                vips_object_to_string               (VipsObject *object,
                                                         VipsBuf *buf);
void *              vips_object_map                     (VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);
void *              (*VipsTypeMapFn)                    (GType Param1,
                                                         void *Param2);
void *              (*VipsTypeMap2Fn)                   (GType Param1,
                                                         void *Param2,
                                                         void *Param3);
void *              (*VipsClassMapFn)                   (VipsObjectClass *Param1,
                                                         void *Param2);
void *              vips_type_map                       (GType base,
                                                         VipsTypeMap2Fn fn,
                                                         void *a,
                                                         void *b);
void *              vips_type_map_all                   (GType base,
                                                         VipsTypeMapFn fn,
                                                         void *a);
int                 vips_type_depth                     (GType type);
GType               vips_type_find                      (const char *basename,
                                                         const char *nickname);
void *              vips_class_map_all                  (GType base,
                                                         VipsClassMapFn fn,
                                                         void *a);
VipsObjectClass *   vips_class_find                     (const char *basename,
                                                         const char *nickname);
VipsObject **       vips_object_local_array             (VipsObject *parent,
                                                         int n);
void                vips_object_local_cb                (VipsObject *vobject,
                                                         GObject *gobject);
#define             vips_object_local                   (V,
                                                         G)
void                vips_object_set_static              (VipsObject *object,
                                                         gboolean static_object);
void                vips_object_print_all               (void);
void                vips_object_sanity_all              (void);
void                vips_object_rewind                  (VipsObject *object);
void                vips_object_unref_outputs           (VipsObject *object);

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsOperation
         +----VipsImage
         +----VipsInterpolate
         +----VipsRegion
         +----VipsThreadState

Properties

  "description"              gchar*                : Read / Write
  "nickname"                 gchar*                : Read / Write

Signals

  "close"                                          : Run Last
  "postclose"                                      : Run Last
  "preclose"                                       : Run Last

Description

The VipsObject class and associated types and macros.

VipsObject is the base class for all objects in libvips. It has the following major features:

Functional class creation Vips objects have a very regular lifecycle: initialise, build, use, destroy. They behave rather like function calls and are free of side-effects.

Run-time introspection Vips objects can be fully introspected at run-time. There is not need for a separate source-code analysis.

Command-line interface Vips objects have an automatic command-line line interface with a set of virtual methods.

Details

VIPS_UNREF()

#define             VIPS_UNREF( X )


enum VipsArgumentFlags

typedef enum {
	VIPS_ARGUMENT_NONE = 0,
	VIPS_ARGUMENT_REQUIRED = 1,
	VIPS_ARGUMENT_CONSTRUCT = 2,
	VIPS_ARGUMENT_SET_ONCE = 4,
	VIPS_ARGUMENT_SET_ALWAYS = 8,
	VIPS_ARGUMENT_INPUT = 16,
	VIPS_ARGUMENT_OUTPUT = 32,
	VIPS_ARGUMENT_DEPRECATED = 64
} VipsArgumentFlags;

Flags we associate with each object argument.

Have separate input & output flags. Both set is an error; neither set is OK.

Input gobjects are automatically reffed, output gobjects automatically ref us. We also automatically watch for "destroy" and unlink.

VIPS_ARGUMENT_SET_ALWAYS is handy for arguments which are set from C. For example, VipsImage::width is a property that gives access to the Xsize member of struct _VipsImage. We default its 'assigned' to TRUE since the field is always set directly by C.

VIPS_ARGUMENT_DEPRECATED arguments are not shown in help text, are not looked for if required, are not checked for "have-been-set". You can deprecate a required argument, but you must obviously add a new required argument if you do.

VIPS_ARGUMENT_NONE

no flags

VIPS_ARGUMENT_REQUIRED

must be set in the constructor

VIPS_ARGUMENT_CONSTRUCT

can only be set in the constructor

VIPS_ARGUMENT_SET_ONCE

can only be set once

VIPS_ARGUMENT_SET_ALWAYS

don't do use-before-set checks

VIPS_ARGUMENT_INPUT

is an input argument (one we depend on)

VIPS_ARGUMENT_OUTPUT

is an output argument (depends on us)

VIPS_ARGUMENT_DEPRECATED

just there for back-compat, hide

VIPS_ARGUMENT_REQUIRED_INPUT

#define             VIPS_ARGUMENT_REQUIRED_INPUT


VIPS_ARGUMENT_OPTIONAL_INPUT

#define             VIPS_ARGUMENT_OPTIONAL_INPUT


VIPS_ARGUMENT_REQUIRED_OUTPUT

#define             VIPS_ARGUMENT_REQUIRED_OUTPUT


VIPS_ARGUMENT_OPTIONAL_OUTPUT

#define             VIPS_ARGUMENT_OPTIONAL_OUTPUT


VIPS_ARG_IMAGE()

#define             VIPS_ARG_IMAGE( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET )


VIPS_ARG_INTERPOLATE()

#define             VIPS_ARG_INTERPOLATE( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET )


VIPS_ARG_BOOL()

#define             VIPS_ARG_BOOL( CLASS, NAME, PRIORITY, LONG, DESC, \
            	FLAGS, OFFSET, VALUE )


VIPS_ARG_DOUBLE()

#define             VIPS_ARG_DOUBLE( CLASS, NAME, PRIORITY, LONG, DESC, \
            	FLAGS, OFFSET, MIN, MAX, VALUE )


VIPS_ARG_BOXED()

#define             VIPS_ARG_BOXED( CLASS, NAME, PRIORITY, LONG, DESC, \
            	FLAGS, OFFSET, TYPE )


VIPS_ARG_INT()

#define             VIPS_ARG_INT( CLASS, NAME, PRIORITY, LONG, DESC, \
            	FLAGS, OFFSET, MIN, MAX, VALUE )


VIPS_ARG_UINT64()

#define             VIPS_ARG_UINT64( CLASS, NAME, PRIORITY, LONG, DESC, \
            	FLAGS, OFFSET, MIN, MAX, VALUE )


VIPS_ARG_ENUM()

#define             VIPS_ARG_ENUM( CLASS, NAME, PRIORITY, LONG, DESC, \
            	FLAGS, OFFSET, TYPE, VALUE )


VIPS_ARG_FLAGS()

#define             VIPS_ARG_FLAGS( CLASS, NAME, PRIORITY, LONG, DESC, \
            	FLAGS, OFFSET, TYPE, VALUE )


VIPS_ARG_STRING()

#define             VIPS_ARG_STRING( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, \
            	VALUE )


VIPS_ARG_POINTER()

#define             VIPS_ARG_POINTER( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET )


VipsArgument

typedef struct {
	GParamSpec *pspec; /* pspec for this argument */

	/* More stuff, see below */
} VipsArgument;


VipsArgumentClass

typedef struct {
	VipsArgument parent;

	/* The class of the object we are an arg for.
	 */
	VipsObjectClass *object_class;

	VipsArgumentFlags flags;
	int priority;		/* Order args by this */
	guint offset;		/* G_STRUCT_OFFSET of member in object */
} VipsArgumentClass;


VipsArgumentInstance

typedef struct {
	VipsArgument parent;

	/* The class we are part of.
	 */
	VipsArgumentClass *argument_class;

	/* The object we are attached to.
	 */
	VipsObject *object;

	/* Has been set.
	 */
	gboolean assigned;

	/* If this is an output argument, keep the id of our "close" handler
	 * here.
	 */
	gulong close_id;	
} VipsArgumentInstance;


VipsArgumentTable

typedef GHashTable VipsArgumentTable;


vips__argument_get_instance ()

VipsArgumentInstance * vips__argument_get_instance      (VipsArgumentClass *Param1,
                                                         VipsObject *Param2);

Convenience ... given the VipsArgumentClass, get the VipsArgumentInstance.


vips__argument_table_lookup ()

VipsArgument *      vips__argument_table_lookup         (VipsArgumentTable *Param1,
                                                         GParamSpec *Param2);


vips__object_set_member ()

void                vips__object_set_member             (VipsObject *object,
                                                         GParamSpec *pspec,
                                                         GObject **member,
                                                         GObject *argument);


VipsArgumentMapFn ()

void *              (*VipsArgumentMapFn)                (VipsObject *Param1,
                                                         GParamSpec *Param2,
                                                         VipsArgumentClass *Param3,
                                                         VipsArgumentInstance *Param4,
                                                         void *a,
                                                         void *b);


vips_argument_map ()

void *              vips_argument_map                   (VipsObject *object,
                                                         VipsArgumentMapFn fn,
                                                         void *a,
                                                         void *b);

Loop over the vips_arguments to an object. Stop when fn returns non-NULL and return that value.

object :

object whose args should be enumerated

fn :

call this function for every argument

a :

client data

b :

client data

Returns :

NULL if fn returns NULL for all arguments, otherwise the first non-NULL value from fn.

VipsArgumentClassMapFn ()

void *              (*VipsArgumentClassMapFn)           (VipsObjectClass *Param1,
                                                         GParamSpec *Param2,
                                                         VipsArgumentClass *Param3,
                                                         void *a,
                                                         void *b);


vips_argument_class_map ()

void *              vips_argument_class_map             (VipsObjectClass *object_class,
                                                         VipsArgumentClassMapFn fn,
                                                         void *a,
                                                         void *b);

And loop over a class. Same as ^^, but with no VipsArgumentInstance.


vips_object_get_argument ()

int                 vips_object_get_argument            (VipsObject *object,
                                                         const char *name,
                                                         GParamSpec **pspec,
                                                         VipsArgumentClass **argument_class,
                                                         VipsArgumentInstance **argument_instance);

Look up the three things you need to work with a vips argument.

object :

the object to fetch the args from

name :

arg to fetch

pspec :

the pspec for this arg. [transfer none]

argument_class :

the argument_class for this arg. [transfer none]

argument_instance :

the argument_instance for this arg. [transfer none]

Returns :

0 on success, or -1 on error.

vips_object_argument_isset ()

gboolean            vips_object_argument_isset          (VipsObject *object,
                                                         const char *name);

Convenience: has an argument been assigned. Useful for bindings.

object :

the object to fetch the args from

name :

arg to fetch

Returns :

TRUE if the argument has been assigned.

vips_object_get_argument_flags ()

VipsArgumentFlags   vips_object_get_argument_flags      (VipsObject *object,
                                                         const char *name);

Convenience: get the flags for an argument. Useful for bindings.

object :

the object to fetch the args from

name :

arg to fetch

Returns :

The VipsArgmentFlags for this argument.

vips_object_get_argument_priority ()

int                 vips_object_get_argument_priority   (VipsObject *object,
                                                         const char *name);

Convenience: get the priority for an argument. Useful for bindings.

object :

the object to fetch the args from

name :

arg to fetch

Returns :

The priority of this argument.

VIPS_ARGUMENT_FOR_ALL()

#define             VIPS_ARGUMENT_FOR_ALL( OBJECT, PSPEC, ARG_CLASS, ARG_INSTANCE )


VIPS_ARGUMENT_COLLECT_SET()

#define             VIPS_ARGUMENT_COLLECT_SET( PSPEC, ARG_CLASS, AP )


VIPS_ARGUMENT_COLLECT_GET()

#define             VIPS_ARGUMENT_COLLECT_GET( PSPEC, ARG_CLASS, AP )


VIPS_ARGUMENT_COLLECT_END

#define             VIPS_ARGUMENT_COLLECT_END


struct VipsObject

struct VipsObject;


struct VipsObjectClass

struct VipsObjectClass {
	GObjectClass parent_class;

	/* Build the object ... all argument properties have been set,
	 * now build the thing.
	 */
	int (*build)( VipsObject *object );

	/* Try to print something about the class, handy for help displays.
	 * Keep to one line.
	 */
	void (*summary_class)( struct _VipsObjectClass *, VipsBuf * );

	/* Try to print a one-line summary for the object, the user can see
	 * this output via things like "header fred.tif", --vips-cache-trace,
	 * etc. 
	 */
	void (*summary)( VipsObject *, VipsBuf * );

	/* Try to print everything about the object, handy for debugging.
	 */
	void (*dump)( VipsObject *, VipsBuf * );

	/* Sanity-check the object. Print messages and stuff. 
	 * Handy for debugging.
	 */
	void (*sanity)( VipsObject *, VipsBuf * );

	/* Rewind. Save and restore any stuff that needs to survive a
	 * dispose().
	 */
	void (*rewind)( VipsObject * );

	/* Just before close, everything is still alive.
	 */
	void (*preclose)( VipsObject * );

	/* Close, time to free stuff.
	 */
	void (*close)( VipsObject * );

	/* Post-close, everything is dead, except the VipsObject pointer.
	 * Useful for eg. deleting the file associated with a temp image.
	 */
	void (*postclose)( VipsObject * );

	/* The CLI interface. Implement these four to get CLI input and output
	 * for your object.
	 */

	/* Given a command-line arg (eg. a filename), make an instance of the
	 * object. Just do the g_object_new(), don't call _build().
	 *
	 * Don't call this directly, see vips_object_new_from_string().
	 */
	VipsObject *(*new_from_string)( const char *string );

	/* The inverse of ^^. Given an object, output what ->new_from_string()
	 * would have been given to make that object. 
	 */
	void (*to_string)( VipsObject *, VipsBuf * ); 

	/* Does this output arg need an arg from the command line? Image
	 * output, for example, needs a filename to write to.
	 */
	gboolean output_needs_arg;

	/* Write the object to the string. Return 0 for success, or -1 on
	 * error, setting vips_error(). string is NULL if output_needs_arg()
	 * was FALSE.
	 */
	int (*output_to_arg)( VipsObject *object, const char *string );

	/* Class nickname, eg. "VipsInterpolateBicubic" has "bicubic" as a
	 * nickname. Not internationalised. 
	 */
	const char *nickname;

	/* Class description. Used for help messages, so internationalised.
	 */
	const char *description;

	/* Hash from pspec to VipsArgumentClass.
	 *
	 * This records the VipsArgumentClass for every pspec used in 
	 * VipsObject and any subclass (ie. everywhere), so it's huge. Don't
	 * loop over this hash! Fine for lookups though.
	 */
	VipsArgumentTable *argument_table;

	/* A sorted (by priority) list of the VipsArgumentClass for this class 
	 * and any superclasses. This is small and specific to this class.
	 *
	 * Use the stored GType to work out when to restart the list for a
	 * subclass.
	 */
	GSList *argument_table_traverse;
	GType argument_table_traverse_gtype;
};


vips_value_is_null ()

gboolean            vips_value_is_null                  (GParamSpec *psoec,
                                                         const GValue *value);


vips_object_set_property ()

void                vips_object_set_property            (GObject *gobject,
                                                         guint property_id,
                                                         const GValue *value,
                                                         GParamSpec *pspec);


vips_object_get_property ()

void                vips_object_get_property            (GObject *gobject,
                                                         guint property_id,
                                                         GValue *value,
                                                         GParamSpec *pspec);


vips_object_preclose ()

void                vips_object_preclose                (VipsObject *object);


vips_object_build ()

int                 vips_object_build                   (VipsObject *object);


vips_object_summary_class ()

void                vips_object_summary_class           (VipsObjectClass *klass,
                                                         VipsBuf *buf);

vips_object_summary ()

void                vips_object_summary                 (VipsObject *object,
                                                         VipsBuf *buf);

vips_object_dump ()

void                vips_object_dump                    (VipsObject *object,
                                                         VipsBuf *buf);

vips_object_print_summary_class ()

void                vips_object_print_summary_class     (VipsObjectClass *klass);


vips_object_print_summary ()

void                vips_object_print_summary           (VipsObject *object);


vips_object_print_dump ()

void                vips_object_print_dump              (VipsObject *object);


vips_object_print_name ()

void                vips_object_print_name              (VipsObject *object);


vips_object_sanity ()

gboolean            vips_object_sanity                  (VipsObject *object);


vips_object_class_install_argument ()

void                vips_object_class_install_argument  (VipsObjectClass *Param1,
                                                         GParamSpec *pspec,
                                                         VipsArgumentFlags flags,
                                                         int priority,
                                                         guint offset);


vips_object_set_argument_from_string ()

int                 vips_object_set_argument_from_string
                                                        (VipsObject *object,
                                                         const char *name,
                                                         const char *value);


vips_object_argument_needsstring ()

gboolean            vips_object_argument_needsstring    (VipsObject *object,
                                                         const char *name);


vips_object_get_argument_to_string ()

int                 vips_object_get_argument_to_string  (VipsObject *object,
                                                         const char *name,
                                                         const char *arg);


vips_object_set_required ()

int                 vips_object_set_required            (VipsObject *object,
                                                         const char *value);


VipsObjectSetArguments ()

void *              (*VipsObjectSetArguments)           (VipsObject *Param1,
                                                         void *Param2,
                                                         void *Param3);


vips_object_new ()

VipsObject *        vips_object_new                     (GType type,
                                                         VipsObjectSetArguments set,
                                                         void *a,
                                                         void *b);

g_object_new() the object, set any arguments with set, call vips_object_build() and return the complete object.

type :

object to create

set :

set arguments with this

a :

client data

b :

client data

Returns :

the new object

vips_object_set_valist ()

int                 vips_object_set_valist              (VipsObject *object,
                                                         va_list ap);

See vips_object_set().

object :

object to set arguments on

ap :

NULL-terminated list of argument/value pairs

Returns :

0 on success, -1 on error

vips_object_set ()

int                 vips_object_set                     (VipsObject *object,
                                                         ...);

Set a list of vips object arguments. For example:

vips_object_set (operation,
  "input", in,
  "output", &out,
  NULL);

Input arguments are given in-line, output arguments are given as pointers to where the output value should be written.

See also: vips_object_set_valist().

object :

object to set arguments on

... :

NULL-terminated list of argument/value pairs

Returns :

0 on success, -1 on error

vips_object_new_from_string ()

VipsObject *        vips_object_new_from_string         (VipsObjectClass *object_class,
                                                         const char *p);


vips_object_to_string ()

void                vips_object_to_string               (VipsObject *object,
                                                         VipsBuf *buf);

The inverse of vips_object_new_from_string(): turn an object into eg. "VipsInterpolateSnohalo1(blur=.333333)".

object :

object to stringify

buf :

write string here

vips_object_map ()

void *              vips_object_map                     (VipsSListMap2Fn fn,
                                                         void *a,
                                                         void *b);

Call a function for all alive objects. Stop when fn returns non-NULL and return that value.

fn :

function to call for all objects

a :

client data

b :

client data

Returns :

NULL if fn returns NULL for all arguments, otherwise the first non-NULL value from fn.

VipsTypeMapFn ()

void *              (*VipsTypeMapFn)                    (GType Param1,
                                                         void *Param2);


VipsTypeMap2Fn ()

void *              (*VipsTypeMap2Fn)                   (GType Param1,
                                                         void *Param2,
                                                         void *Param3);


VipsClassMapFn ()

void *              (*VipsClassMapFn)                   (VipsObjectClass *Param1,
                                                         void *Param2);


vips_type_map ()

void *              vips_type_map                       (GType base,
                                                         VipsTypeMap2Fn fn,
                                                         void *a,
                                                         void *b);

Map over a type's children. Stop when fn returns non-NULL and return that value.

base :

base type

fn :

call this function for every type

a :

client data

b :

client data

Returns :

NULL if fn returns NULL for all arguments, otherwise the first non-NULL value from fn.

vips_type_map_all ()

void *              vips_type_map_all                   (GType base,
                                                         VipsTypeMapFn fn,
                                                         void *a);

Map over a type's children, direct and indirect. Stop when fn returns non-NULL and return that value.

base :

base type

fn :

call this function for every type

a :

client data

Returns :

NULL if fn returns NULL for all arguments, otherwise the first non-NULL value from fn.

vips_type_depth ()

int                 vips_type_depth                     (GType type);


vips_type_find ()

GType               vips_type_find                      (const char *basename,
                                                         const char *nickname);


vips_class_map_all ()

void *              vips_class_map_all                  (GType base,
                                                         VipsClassMapFn fn,
                                                         void *a);

Loop over all the subclasses of a base type. Non-abstract classes only.


vips_class_find ()

VipsObjectClass *   vips_class_find                     (const char *basename,
                                                         const char *nickname);

Search below basename, return the first class whose name or nickname matches.

basename :

name of base class

nickname :

search for a class with this nickname

Returns :

the found class.

vips_object_local_array ()

VipsObject **       vips_object_local_array             (VipsObject *parent,
                                                         int n);

Make an array of NULL VipsObject pointers. When parent closes, every non-NULL pointer in the array will be unreffed and the array will be freed. Handy for creating a set of temporary images for a function.

The array is NULL-terminated, ie. contains an extra NULL element at the end.

Example:

VipsObject **t;

t = vips_object_local_array( a, 5 );
if( 
  vips_add( a, b, &t[0], NULL ) ||
  vips_invert( t[0], &t[1], NULL ) ||
  vips_add( t[1], t[0], &t[2], NULL ) ||
  vips_costra( t[2], out, NULL ) )
  return( -1 );

See also: vips_object_local().

parent :

objects unref when this object unrefs

n :

array size

Returns :

an array of NULL pointers of length n

vips_object_local_cb ()

void                vips_object_local_cb                (VipsObject *vobject,
                                                         GObject *gobject);


vips_object_local()

#define             vips_object_local( V, G )


vips_object_set_static ()

void                vips_object_set_static              (VipsObject *object,
                                                         gboolean static_object);


vips_object_print_all ()

void                vips_object_print_all               (void);


vips_object_sanity_all ()

void                vips_object_sanity_all              (void);


vips_object_rewind ()

void                vips_object_rewind                  (VipsObject *object);


vips_object_unref_outputs ()

void                vips_object_unref_outputs           (VipsObject *object);

Property Details

The "description" property

  "description"              gchar*                : Read / Write

Class description.

Default value: ""


The "nickname" property

  "nickname"                 gchar*                : Read / Write

Class nickname.

Default value: ""

Signal Details

The "close" signal

void                user_function                      (VipsObject *vipsobject,
                                                        gpointer    user_data)       : Run Last

vipsobject :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "postclose" signal

void                user_function                      (VipsObject *vipsobject,
                                                        gpointer    user_data)       : Run Last

vipsobject :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "preclose" signal

void                user_function                      (VipsObject *vipsobject,
                                                        gpointer    user_data)       : Run Last

vipsobject :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

See Also

operation
vips-7.38.5/doc/reference/html/libvips-colour.html0000644000175000017500000037165712303146332017046 00000000000000 colour

colour

colour — colour operators

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

#define             VIPS_D93_X0
#define             VIPS_D93_Y0
#define             VIPS_D93_Z0
#define             VIPS_D75_X0
#define             VIPS_D75_Y0
#define             VIPS_D75_Z0
#define             VIPS_D65_X0
#define             VIPS_D65_Y0
#define             VIPS_D65_Z0
#define             VIPS_D55_X0
#define             VIPS_D55_Y0
#define             VIPS_D55_Z0
#define             VIPS_D50_X0
#define             VIPS_D50_Y0
#define             VIPS_D50_Z0
#define             VIPS_A_X0
#define             VIPS_A_Y0
#define             VIPS_A_Z0
#define             VIPS_B_X0
#define             VIPS_B_Y0
#define             VIPS_B_Z0
#define             VIPS_C_X0
#define             VIPS_C_Y0
#define             VIPS_C_Z0
#define             VIPS_E_X0
#define             VIPS_E_Y0
#define             VIPS_E_Z0
#define             VIPS_D3250_X0
#define             VIPS_D3250_Y0
#define             VIPS_D3250_Z0
enum                VipsIntent;
enum                VipsPCS;
gboolean            vips_colourspace_issupported        (const VipsImage *image);
int                 vips_colourspace                    (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsInterpretation space,
                                                         ...);
int                 vips_LabQ2sRGB                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_rad2float                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_float2rad                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_LabS2LabQ                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_LabQ2LabS                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_LabQ2Lab                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_Lab2LabQ                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_LCh2Lab                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_Lab2LCh                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_Yxy2Lab                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_CMC2XYZ                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_Lab2XYZ                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_XYZ2Lab                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_XYZ2scRGB                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_scRGB2sRGB                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_sRGB2scRGB                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_scRGB2XYZ                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_LCh2CMC                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_CMC2LCh                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_XYZ2Yxy                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_Yxy2XYZ                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_LabS2Lab                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_Lab2LabS                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_icc_present                    (void);
int                 vips_icc_transform                  (VipsImage *in,
                                                         VipsImage **out,
                                                         const char *output_profile,
                                                         ...);
int                 vips_icc_import                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_icc_export                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_icc_ac2rc                      (VipsImage *in,
                                                         VipsImage **out,
                                                         const char *profile_filename);
int                 vips_dE76                           (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_dE00                           (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
int                 vips_dECMC                          (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);
void                vips_col_Lab2XYZ                    (float L,
                                                         float a,
                                                         float b,
                                                         float *X,
                                                         float *Y,
                                                         float *Z);
void                vips_col_XYZ2Lab                    (float X,
                                                         float Y,
                                                         float Z,
                                                         float *L,
                                                         float *a,
                                                         float *b);
double              vips_col_ab2h                       (double a,
                                                         double b);
void                vips_col_ab2Ch                      (float a,
                                                         float b,
                                                         float *C,
                                                         float *h);
void                vips_col_Ch2ab                      (float C,
                                                         float h,
                                                         float *a,
                                                         float *b);
float               vips_col_L2Lcmc                     (float L);
float               vips_col_C2Ccmc                     (float C);
float               vips_col_Ch2hcmc                    (float C,
                                                         float h);
void                vips_col_make_tables_CMC            (void);
float               vips_col_Lcmc2L                     (float Lcmc);
float               vips_col_Ccmc2C                     (float Ccmc);
float               vips_col_Chcmc2h                    (float C,
                                                         float hcmc);
int                 vips_col_sRGB2scRGB_8               (int r,
                                                         int g,
                                                         int b,
                                                         float *R,
                                                         float *G,
                                                         float *B);
int                 vips_col_sRGB2scRGB_16              (int r,
                                                         int g,
                                                         int b,
                                                         float *R,
                                                         float *G,
                                                         float *B);
int                 vips_col_scRGB2XYZ                  (float R,
                                                         float G,
                                                         float B,
                                                         float *X,
                                                         float *Y,
                                                         float *Z);
int                 vips_col_XYZ2scRGB                  (float X,
                                                         float Y,
                                                         float Z,
                                                         float *R,
                                                         float *G,
                                                         float *B);
int                 vips_col_scRGB2sRGB_8               (float R,
                                                         float G,
                                                         float B,
                                                         int *r,
                                                         int *g,
                                                         int *b,
                                                         int *or_ret);
int                 vips_col_scRGB2sRGB_16              (float R,
                                                         float G,
                                                         float B,
                                                         int *r,
                                                         int *g,
                                                         int *b,
                                                         int *or_ret);
float               vips_pythagoras                     (float L1,
                                                         float a1,
                                                         float b1,
                                                         float L2,
                                                         float a2,
                                                         float b2);
float               vips_col_dE00                       (float L1,
                                                         float a1,
                                                         float b1,
                                                         float L2,
                                                         float a2,
                                                         float b2);

Description

These operators let you transform coordinates and images between colour spaces, calculate colour differences, and move to and from device spaces.

Radiance images have four 8-bits bands and store 8 bits of R, G and B and another 8 bits of exponent, common to all channels. They are widely used in the HDR imaging community.

The colour functions can be divided into three main groups. First, functions to transform images between the different colour spaces supported by VIPS: RGB, sRGB, XYZ, Yxy, Lab, LabQ, LabS, LCh and CMC). Use vips_colourspace() to move an image to a target colourspace using the best sequence of colour transform operations. Secondly, there are a set of operations for calculating colour difference metrics. Finally, VIPS wraps LittleCMS and uses it to provide a set of operations for reading and writing images with ICC profiles.

This figure shows how the VIPS colour spaces interconvert:

The colour spaces supported by VIPS are:

  • LabQ

    This is the principal VIPS colorimetric storage format. LabQ images have four 8-bit bands and store 10 bits of L and 11 bits of a and b.

    You cannot perform calculations on LabQ images (they are tagged with VIPS_CODING_LABQ), though a few operations such as vips_extract_area() will work directly with them.

  • LabS

    This format represents coordinates in CIELAB space as a three-band VIPS_FORMAT_SHORT image, scaled to fit the full range of bits. It is the best format for computation, being relatively compact, quick, and accurate. Colour values expressed in this way are hard to visualise.

  • Lab

    Lab colourspace represents CIELAB colour values with a three-band VIPS_FORMAT_FLOAT image. This is the simplest format for general work: adding the constant 50 to the L channel, for example, has the expected result.

    VIPS uses D65 LAB, but you can use other colour temperatures with a little effort, see vips_XYZ2Lab().

  • XYZ

    CIE XYZ colour space represented as a three-band VIPS_FORMAT_FLOAT image.

  • Yxy

    CIE Yxy colour space represented as a three-band VIPS_FORMAT_FLOAT image.

  • RGB / sRGB

    VIPS converts XYZ to and from sRGB using the usual formula:

    http://en.wikipedia.org/wiki/SRGB

    You can also use vips_icc_transform() and friends to go to and from device space with a generic profile.

  • LCh

    Like Lab, but rectangular ab coordinates are replaced with polar Ch (Chroma and hue) coordinates. Hue angles are expressed in degrees.

  • CMC

    A colour space based on the CMC(1:1) colour difference measurement. This is a highly uniform colour space, much better than CIELAB for expressing small differences.

    You can calculate metrics like CMC(2:1) by scaling the spaces before finding differences.

Details

VIPS_D93_X0

#define VIPS_D93_X0 (89.7400)

Areas under curves for D93, 2 degree observer.


VIPS_D93_Y0

#define VIPS_D93_Y0 (100.0)


VIPS_D93_Z0

#define VIPS_D93_Z0 (130.7700)


VIPS_D75_X0

#define VIPS_D75_X0 (94.9682)

Areas under curves for D75, 2 degree observer.


VIPS_D75_Y0

#define VIPS_D75_Y0 (100.0)


VIPS_D75_Z0

#define VIPS_D75_Z0 (122.5710)


VIPS_D65_X0

#define VIPS_D65_X0 (95.0470)

Areas under curves for D65, 2 degree observer.


VIPS_D65_Y0

#define VIPS_D65_Y0 (100.0)


VIPS_D65_Z0

#define VIPS_D65_Z0 (108.8827)


VIPS_D55_X0

#define VIPS_D55_X0 (95.6831)

Areas under curves for D55, 2 degree observer.


VIPS_D55_Y0

#define VIPS_D55_Y0 (100.0)


VIPS_D55_Z0

#define VIPS_D55_Z0 (92.0871)


VIPS_D50_X0

#define VIPS_D50_X0 (96.4250)

Areas under curves for D50, 2 degree observer.


VIPS_D50_Y0

#define VIPS_D50_Y0 (100.0)


VIPS_D50_Z0

#define VIPS_D50_Z0 (82.4680)


VIPS_A_X0

#define VIPS_A_X0 (109.8503)

Areas under curves for illuminant A (2856K), 2 degree observer.


VIPS_A_Y0

#define VIPS_A_Y0 (100.0)


VIPS_A_Z0

#define VIPS_A_Z0 (35.5849)


VIPS_B_X0

#define VIPS_B_X0 (99.0720)

Areas under curves for illuminant B (4874K), 2 degree observer.


VIPS_B_Y0

#define VIPS_B_Y0 (100.0)


VIPS_B_Z0

#define VIPS_B_Z0 (85.2230)


VIPS_C_X0

#define VIPS_C_X0 (98.0700)

Areas under curves for illuminant C (6774K), 2 degree observer.


VIPS_C_Y0

#define VIPS_C_Y0 (100.0)


VIPS_C_Z0

#define VIPS_C_Z0 (118.2300)


VIPS_E_X0

#define VIPS_E_X0 (100.0)

Areas under curves for equal energy illuminant E.


VIPS_E_Y0

#define VIPS_E_Y0 (100.0)


VIPS_E_Z0

#define VIPS_E_Z0 (100.0)


VIPS_D3250_X0

#define VIPS_D3250_X0 (105.6590)

Areas under curves for black body at 3250K, 2 degree observer.


VIPS_D3250_Y0

#define VIPS_D3250_Y0 (100.0)


VIPS_D3250_Z0

#define VIPS_D3250_Z0 (45.8501)


enum VipsIntent

typedef enum {
	VIPS_INTENT_PERCEPTUAL = 0,
	VIPS_INTENT_RELATIVE,
	VIPS_INTENT_SATURATION,
	VIPS_INTENT_ABSOLUTE
} VipsIntent;

The rendering intent. VIPS_INTENT_ABSOLUTE is best for scientific work, VIPS_INTENT_RELATIVE is usually best for accurate communication with other imaging libraries.

VIPS_INTENT_PERCEPTUAL

perceptual rendering intent

VIPS_INTENT_RELATIVE

relative colorimetric rendering intent

VIPS_INTENT_SATURATION

saturation rendering intent

VIPS_INTENT_ABSOLUTE

absolute colorimetric rendering intent

enum VipsPCS

typedef enum {
	VIPS_PCS_LAB,
	VIPS_PCS_XYZ,
	VIPS_PCS_LAST
} VipsPCS;

Pick a Profile Connection Space for vips_icc_import() and vips_icc_export(). LAB is usually best, XYZ can be more convenient in some cases.

VIPS_PCS_LAB

use CIELAB D65 as the Profile Connection Space

VIPS_PCS_XYZ

use XYZ as the Profile Connection Space

VIPS_PCS_LAST


vips_colourspace_issupported ()

gboolean            vips_colourspace_issupported        (const VipsImage *image);

Test if image is in a colourspace that vips_colourspace() can process. For example, VIPS_INTERPRETATION_RGB images are not in a well-defined colourspace, but VIPS_INTERPRETATION_sRGB ones are.

Returns :

TRUE if image is in a supported colourspace.

vips_colourspace ()

int                 vips_colourspace                    (VipsImage *in,
                                                         VipsImage **out,
                                                         VipsInterpretation space,
                                                         ...);

This operation looks at the interpretation field of in and runs a set of colourspace conversion functions to move it to space.

For example, given an image tagged as VIPS_INTERPRETATION_YXY, running vips_colourspace() with space set to VIPS_INTERPRETATION_LAB will convert with vips_Yxy2XYZ() and vips_XYZ2Lab().

See also: vips_colourspace_issupported(), vips_image_guess_interpretation().

in :

input image

out :

output image

space :

convert to this colour space

Returns :

0 on success, -1 on error.

vips_LabQ2sRGB ()

int                 vips_LabQ2sRGB                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Unpack a LabQ (VIPS_CODING_LABQ) image to a three-band short image.

See also: vips_LabS2LabQ(), vips_LabQ2sRGB(), vips_rad2float().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_rad2float ()

int                 vips_rad2float                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Unpack a RAD (IM_CODING_RAD) image to a three-band float image.

See also: vips_float2rad(), vips_LabQ2LabS().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_float2rad ()

int                 vips_float2rad                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert a three-band float image to Radiance 32-bit packed format.

See also: vips_rad2float(), VipsFormatRad, vips_LabQ2Lab().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_LabS2LabQ ()

int                 vips_LabS2LabQ                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert a LabS three-band signed short image to LabQ

See also: vips_LabQ2LabS().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_LabQ2LabS ()

int                 vips_LabQ2LabS                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Unpack a LabQ (IM_CODING_LABQ) image to a three-band short image.

See also: vips_LabS2LabQ(), vips_LabQ2LabS(), vips_rad2float().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_LabQ2Lab ()

int                 vips_LabQ2Lab                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Unpack a LabQ (IM_CODING_LABQ) image to a three-band float image.

See also: vips_LabQ2Lab(), vips_LabQ2LabS(), vips_rad2float().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_Lab2LabQ ()

int                 vips_Lab2LabQ                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert a Lab three-band float image to LabQ (IM_CODING_LABQ).

See also: vips_LabQ2Lab().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_LCh2Lab ()

int                 vips_LCh2Lab                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn LCh to Lab.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_Lab2LCh ()

int                 vips_Lab2LCh                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn Lab to LCh.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_Yxy2Lab ()

int                 vips_Yxy2Lab                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);


vips_CMC2XYZ ()

int                 vips_CMC2XYZ                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);


vips_Lab2XYZ ()

int                 vips_Lab2XYZ                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

optional arguments:

temp: colour temperature

Turn Lab to XYZ. The colour temperature defaults to D65, but can be specified with temp.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_XYZ2Lab ()

int                 vips_XYZ2Lab                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

optional arguments:

temp: colour temperature

Turn XYZ to Lab, optionally specifying the colour temperature. temp defaults to D65.

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_XYZ2scRGB ()

int                 vips_XYZ2scRGB                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn XYZ to Yxy.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_scRGB2sRGB ()

int                 vips_scRGB2sRGB                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

depth: depth of output image in bits

Convert an scRGB image to sRGB. Set depth to 16 to get 16-bit output.

See also: vips_LabS2LabQ(), vips_scRGB2sRGB(), vips_rad2float().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_sRGB2scRGB ()

int                 vips_sRGB2scRGB                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert an sRGB image to scRGB.

See also: vips_sRGB2XYZ(), vips_rad2float().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_scRGB2XYZ ()

int                 vips_scRGB2XYZ                      (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn XYZ to scRGB.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_LCh2CMC ()

int                 vips_LCh2CMC                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn LCh to CMC.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_CMC2LCh ()

int                 vips_CMC2LCh                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn LCh to CMC.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_XYZ2Yxy ()

int                 vips_XYZ2Yxy                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn XYZ to Yxy.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_Yxy2XYZ ()

int                 vips_Yxy2XYZ                        (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn XYZ to Yxy.

in :

input image

out :

output image

Returns :

0 on success, -1 on error

vips_LabS2Lab ()

int                 vips_LabS2Lab                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Convert a LabS three-band signed short image to a three-band float image.

See also: vips_LabS2Lab().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_Lab2LabS ()

int                 vips_Lab2LabS                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Turn Lab to LabS, signed 16-bit int fixed point.

See also: vips_LabQ2Lab().

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_icc_present ()

int                 vips_icc_present                    (void);

VIPS can optionally be built without the ICC library. Use this function to test for its availability.

Returns :

non-zero if the ICC library is present.

vips_icc_transform ()

int                 vips_icc_transform                  (VipsImage *in,
                                                         VipsImage **out,
                                                         const char *output_profile,
                                                         ...);

Optional arguments:

input_profile: get the input profile from here intent: transform with this intent depth: depth of output image in bits embedded: use profile embedded in input image

Transform an image with a pair of ICC profiles. The input image is moved to profile-connection space with the input profile and then to the output space with the output profile.

If embedded is set, the input profile is taken from the input image metadata, if present. If there is no embedded profile, input_profile is used as a fall-back.

If embedded is not set, the input profile is taken from input_profile. If input_profile is not supplied, the metadata profile, if any, is used as a fall-back.

Use vips_icc_import() and vips_icc_export() to do either the first or second half of this operation in isolation.

in :

input image

out :

output image

output_profile :

get the output profile from here

Returns :

0 on success, -1 on error.

vips_icc_import ()

int                 vips_icc_import                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

input_profile: get the input profile from here intent: transform with this intent embedded: use profile embedded in input image pcs: use XYZ or LAB PCS

Import an image from device space to D65 LAB with an ICC profile. If pcs is set to VIPS_PCS_XYZ, use CIE XYZ PCS instead.

If embedded is set, the input profile is taken from the input image metadata. If there is no embedded profile, input_profile_filename is used as a fall-back.

If embedded is not set, the input profile is taken from input_profile. If input_profile is not supplied, the metadata profile, if any, is used as a fall-back.

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_icc_export ()

int                 vips_icc_export                     (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

intent: transform with this intent depth: depth of output image in bits output_profile: get the output profile from here pcs: use XYZ or LAB PCS

Export an image from D65 LAB to device space with an ICC profile. If pcs is set to VIPS_PCS_XYZ, use CIE XYZ PCS instead. If output_profile is not set, use the embedded profile, if any. If output_profile is set, export with that and attach it to the output image.

in :

input image

out :

output image

Returns :

0 on success, -1 on error.

vips_icc_ac2rc ()

int                 vips_icc_ac2rc                      (VipsImage *in,
                                                         VipsImage **out,
                                                         const char *profile_filename);

Transform an image from absolute to relative colorimetry using the MediaWhitePoint stored in the ICC profile.

See also: vips_icc_transform(), vips_icc_import().

in :

input image

out :

output image

profile_filename :

use this profile

Returns :

0 on success, -1 on error.

vips_dE76 ()

int                 vips_dE76                           (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Calculate dE 76.

left :

first input image

right :

second input image

out :

output image

Returns :

0 on success, -1 on error

vips_dE00 ()

int                 vips_dE00                           (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Calculate dE 00.

left :

first input image

right :

second input image

out :

output image

Returns :

0 on success, -1 on error

vips_dECMC ()

int                 vips_dECMC                          (VipsImage *left,
                                                         VipsImage *right,
                                                         VipsImage **out,
                                                         ...);

Calculate dE CMC. The input images are transformed to CMC colour space and the euclidean distance between corresponding pixels calculated.

To calculate a colour difference with values for (l:c) other than (1:1), transform the two source images to CMC yourself, scale the channels appropriately, and call this function.

See also: vips_colourspace()

left :

first input image

right :

second input image

out :

output image

Returns :

0 on success, -1 on error

vips_col_Lab2XYZ ()

void                vips_col_Lab2XYZ                    (float L,
                                                         float a,
                                                         float b,
                                                         float *X,
                                                         float *Y,
                                                         float *Z);

Calculate XYZ from Lab, D65.

See also: vips_Lab2XYZ().

L :

Input CIE Lab value

a :

Input CIE Lab value

b :

Input CIE Lab value

X :

Return CIE XYZ colour

Y :

Return CIE XYZ colour

Z :

Return CIE XYZ colour

vips_col_XYZ2Lab ()

void                vips_col_XYZ2Lab                    (float X,
                                                         float Y,
                                                         float Z,
                                                         float *L,
                                                         float *a,
                                                         float *b);

Calculate XYZ from Lab, D65.

See also: vips_XYZ2Lab().

X :

Input CIE XYZ colour

Y :

Input CIE XYZ colour

Z :

Input CIE XYZ colour

L :

Return CIE Lab value

a :

Return CIE Lab value

b :

Return CIE Lab value

vips_col_ab2h ()

double              vips_col_ab2h                       (double a,
                                                         double b);

a :

CIE a

b :

CIE b

Returns :

Hue (degrees)

vips_col_ab2Ch ()

void                vips_col_ab2Ch                      (float a,
                                                         float b,
                                                         float *C,
                                                         float *h);


vips_col_Ch2ab ()

void                vips_col_Ch2ab                      (float C,
                                                         float h,
                                                         float *a,
                                                         float *b);

Calculate ab from Ch, h in degrees.

C :

Chroma

h :

Hue angle (degrees)

a :

return CIE a* value

b :

return CIE b* value

vips_col_L2Lcmc ()

float               vips_col_L2Lcmc                     (float L);

Calculate Lcmc from L.

L :

CIE L*

Returns :

Lcmc

vips_col_C2Ccmc ()

float               vips_col_C2Ccmc                     (float C);

Calculate Ccmc from C.

C :

Chroma

Returns :

Ccmc.

vips_col_Ch2hcmc ()

float               vips_col_Ch2hcmc                    (float C,
                                                         float h);

Calculate hcmc from C and h.

C :

Chroma

h :

Hue (degrees)

Returns :

hcmc.

vips_col_make_tables_CMC ()

void                vips_col_make_tables_CMC            (void);

Make the lookup tables for cmc.


vips_col_Lcmc2L ()

float               vips_col_Lcmc2L                     (float Lcmc);

Calculate L from Lcmc using a table. Call vips_col_make_tables_CMC() at least once before using this function.

Lcmc :

L cmc

Returns :

L*

vips_col_Ccmc2C ()

float               vips_col_Ccmc2C                     (float Ccmc);

Calculate C from Ccmc using a table. Call vips_col_make_tables_CMC() at least once before using this function.

Ccmc :

Ccmc

Returns :

C.

vips_col_Chcmc2h ()

float               vips_col_Chcmc2h                    (float C,
                                                         float hcmc);

Calculate h from C and hcmc, using a table. Call vips_col_make_tables_CMC() at least once before using this function.

C :

Chroma

hcmc :

Hue cmc (degrees)

Returns :

h.

vips_col_sRGB2scRGB_8 ()

int                 vips_col_sRGB2scRGB_8               (int r,
                                                         int g,
                                                         int b,
                                                         float *R,
                                                         float *G,
                                                         float *B);


vips_col_sRGB2scRGB_16 ()

int                 vips_col_sRGB2scRGB_16              (int r,
                                                         int g,
                                                         int b,
                                                         float *R,
                                                         float *G,
                                                         float *B);


vips_col_scRGB2XYZ ()

int                 vips_col_scRGB2XYZ                  (float R,
                                                         float G,
                                                         float B,
                                                         float *X,
                                                         float *Y,
                                                         float *Z);


vips_col_XYZ2scRGB ()

int                 vips_col_XYZ2scRGB                  (float X,
                                                         float Y,
                                                         float Z,
                                                         float *R,
                                                         float *G,
                                                         float *B);


vips_col_scRGB2sRGB_8 ()

int                 vips_col_scRGB2sRGB_8               (float R,
                                                         float G,
                                                         float B,
                                                         int *r,
                                                         int *g,
                                                         int *b,
                                                         int *or_ret);


vips_col_scRGB2sRGB_16 ()

int                 vips_col_scRGB2sRGB_16              (float R,
                                                         float G,
                                                         float B,
                                                         int *r,
                                                         int *g,
                                                         int *b,
                                                         int *or_ret);


vips_pythagoras ()

float               vips_pythagoras                     (float L1,
                                                         float a1,
                                                         float b1,
                                                         float L2,
                                                         float a2,
                                                         float b2);

Pythagorean distance between two points in colour space. Lab/XYZ/CMC etc.

L1 :

Input coordinate 1

a1 :

Input coordinate 1

b1 :

Input coordinate 1

L2 :

Input coordinate 2

a2 :

Input coordinate 2

b2 :

Input coordinate 2

vips_col_dE00 ()

float               vips_col_dE00                       (float L1,
                                                         float a1,
                                                         float b1,
                                                         float L2,
                                                         float a2,
                                                         float b2);

CIEDE2000, from:

Luo, Cui, Rigg, "The Development of the CIE 2000 Colour-Difference Formula: CIEDE2000", COLOR research and application, pp 340

L1 :

Input coordinate 1

a1 :

Input coordinate 1

b1 :

Input coordinate 1

L2 :

Input coordinate 2

a2 :

Input coordinate 2

b2 :

Input coordinate 2

Returns :

CIE dE2000 colour difference.

See Also

arithmetic
vips-7.38.5/doc/reference/html/ch03.html0000644000175000017500000000404512303146332014612 00000000000000 Other API (no gtkdoc comments yet)

Other API (no gtkdoc comments yet)

vips-7.38.5/doc/reference/html/libvips-generate.html0000644000175000017500000016253312303146332017324 00000000000000 generate

generate

generate — calculate pixels and pixel buffers

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

int                 (*VipsRegionWrite)                  (VipsRegion *region,
                                                         VipsRect *area,
                                                         void *a);
int                 vips_sink_disc                      (VipsImage *im,
                                                         VipsRegionWrite write_fn,
                                                         void *a);
void *              (*VipsStartFn)                      (VipsImage *out,
                                                         void *a,
                                                         void *b);
int                 (*VipsGenerateFn)                   (VipsRegion *out,
                                                         void *seq,
                                                         void *a,
                                                         void *b,
                                                         gboolean *stop);
int                 (*VipsStopFn)                       (void *seq,
                                                         void *a,
                                                         void *b);
int                 vips_sink                           (VipsImage *im,
                                                         VipsStartFn start_fn,
                                                         VipsGenerateFn generate_fn,
                                                         VipsStopFn stop_fn,
                                                         void *a,
                                                         void *b);
int                 vips_sink_tile                      (VipsImage *im,
                                                         int tile_width,
                                                         int tile_height,
                                                         VipsStartFn start_fn,
                                                         VipsGenerateFn generate_fn,
                                                         VipsStopFn stop_fn,
                                                         void *a,
                                                         void *b);
void                (*VipsSinkNotify)                   (VipsImage *im,
                                                         VipsRect *rect,
                                                         void *a);
int                 vips_sink_screen                    (VipsImage *in,
                                                         VipsImage *out,
                                                         VipsImage *mask,
                                                         int tile_width,
                                                         int tile_height,
                                                         int max_tiles,
                                                         int priority,
                                                         VipsSinkNotify notify,
                                                         void *a);
int                 vips_sink_memory                    (VipsImage *im);
int                 vips_sink_memory2                   (VipsImage *image);
void *              vips_start_one                      (VipsImage *out,
                                                         void *a,
                                                         void *b);
int                 vips_stop_one                       (void *seq,
                                                         void *a,
                                                         void *b);
void *              vips_start_many                     (VipsImage *out,
                                                         void *a,
                                                         void *b);
int                 vips_stop_many                      (void *seq,
                                                         void *a,
                                                         void *b);
VipsImage **        vips_allocate_input_array           (VipsImage *out,
                                                         ...);
int                 vips_image_generate                 (VipsImage *im,
                                                         VipsStartFn start_fn,
                                                         VipsGenerateFn generate_fn,
                                                         VipsStopFn stop_fn,
                                                         void *a,
                                                         void *b);
int                 vips_image_pipeline_array           (VipsImage *image,
                                                         VipsDemandStyle hint,
                                                         VipsImage **in);
int                 vips_image_pipelinev                (VipsImage *image,
                                                         VipsDemandStyle hint,
                                                         ...);

Description

These functions let you generate regions of pixels in an image processing operation, and ask for regions of image to be calculated.

Details

VipsRegionWrite ()

int                 (*VipsRegionWrite)                  (VipsRegion *region,
                                                         VipsRect *area,
                                                         void *a);

The function should write the pixels in area from region. a is the value passed into vips_discsink().

See also: vips_sink_disc().

region :

get pixels from here

area :

area to write

a :

client data

Returns :

0 on success, -1 on error.

vips_sink_disc ()

int                 vips_sink_disc                      (VipsImage *im,
                                                         VipsRegionWrite write_fn,
                                                         void *a);

vips_sink_disc() loops over im, top-to-bottom, generating it in sections. As each section is produced, write_fn is called.

write_fn is always called single-threaded (though not always from the same thread), it's always given image sections in top-to-bottom order, and there are never any gaps.

This operation is handy for making image sinks which output to things like disc files.

See also: vips_concurrency_set().

im :

image to process

write_fn :

called for every batch of pixels

a :

client data

Returns :

0 on success, -1 on error.

VipsStartFn ()

void *              (*VipsStartFn)                      (VipsImage *out,
                                                         void *a,
                                                         void *b);

Start a new processing sequence for this generate function. This allocates per-thread state, such as an input region.

See also: vips_start_one(), vips_start_many().

a :

user data

b :

user data

Returns :

a new sequence value

VipsGenerateFn ()

int                 (*VipsGenerateFn)                   (VipsRegion *out,
                                                         void *seq,
                                                         void *a,
                                                         void *b,
                                                         gboolean *stop);

Fill image->valid with pixels. seq contains per-thread state, such as the input regions.

See also: vips_image_generate(), vips_stop_many().

seq :

sequence value

a :

user data

b :

user data

Returns :

0 on success, -1 on error.

VipsStopFn ()

int                 (*VipsStopFn)                       (void *seq,
                                                         void *a,
                                                         void *b);

Stop a processing sequence. This frees per-thread state, such as an input region.

See also: vips_stop_one(), vips_stop_many().

seq :

sequence value

a :

user data

b :

user data

Returns :

0 on success, -1 on error.

vips_sink ()

int                 vips_sink                           (VipsImage *im,
                                                         VipsStartFn start_fn,
                                                         VipsGenerateFn generate_fn,
                                                         VipsStopFn stop_fn,
                                                         void *a,
                                                         void *b);

Loops over an image. generate is called for every pixel in the image, with the reg argument being a region of pixels for processing. vips_sink() is used to implement operations like VipsAvg which have no image output.

Each set of pixels is sized according to the requirements of the image pipeline that generated im.

See also: vips_image_generate(), vips_image_new().

im :

scan over this image

start_fn :

start sequences with this function

generate_fn :

generate pixels with this function

stop_fn :

stop sequences with this function

a :

user data

b :

user data

Returns :

0 on success, or -1 on error.

vips_sink_tile ()

int                 vips_sink_tile                      (VipsImage *im,
                                                         int tile_width,
                                                         int tile_height,
                                                         VipsStartFn start_fn,
                                                         VipsGenerateFn generate_fn,
                                                         VipsStopFn stop_fn,
                                                         void *a,
                                                         void *b);

Loops over an image. generate is called for every pixel in the image, with the reg argument being a region of pixels for processing.

Each set of pixels is tile_width by tile_height pixels (less at the image edges). This is handy for things like writing a tiled TIFF image, where tiles have to be generated with a certain size.

See also: vips_sink(), vips_get_tile_size().

im :

scan over this image

tile_width :

tile width

tile_height :

tile height

start_fn :

start sequences with this function

generate_fn :

generate pixels with this function

stop_fn :

stop sequences with this function

a :

user data

b :

user data

Returns :

0 on success, or -1 on error.

VipsSinkNotify ()

void                (*VipsSinkNotify)                   (VipsImage *im,
                                                         VipsRect *rect,
                                                         void *a);


vips_sink_screen ()

int                 vips_sink_screen                    (VipsImage *in,
                                                         VipsImage *out,
                                                         VipsImage *mask,
                                                         int tile_width,
                                                         int tile_height,
                                                         int max_tiles,
                                                         int priority,
                                                         VipsSinkNotify notify,
                                                         void *a);

This operation renders in in the background, making pixels available on out as they are calculated. The notify callback is run every time a new set of pixels are available. Calculated pixels are kept in a cache with tiles sized tile_width by tile_height pixels and with at most max_tiles tiles. If max_tiles is -1, the cache is of unlimited size (up to the maximum image size). The mask image is a one-band uchar image and has 255 for pixels which are currently in cache and 0 for uncalculated pixels.

Only a single sink is calculated at any one time, though many may be alive. Use priority to indicate which renders are more important: zero means normal priority, negative numbers are low priority, positive numbers high priority.

Calls to vips_region_prepare() on out return immediately and hold whatever is currently in cache for that VipsRect (check mask to see which parts of the VipsRect are valid). Any pixels in the VipsRect which are not in cache are added to a queue, and the notify callback will trigger when those pixels are ready.

The notify callback is run from one of the background threads. In the callback you need to somehow send a message to the main thread that the pixels are ready. In a glib-based application, this is easily done with g_idle_add().

If notify is NULL then vips_sink_screen() runs synchronously. vips_region_prepare() on out will always block until the pixels have been calculated.

See also: vips_tilecache(), vips_region_prepare(), vips_sink_disc(), vips_sink().

in :

input image

out :

output image

mask :

mask image indicating valid pixels

tile_width :

tile width

tile_height :

tile height

max_tiles :

maximum tiles to cache

priority :

rendering priority

notify :

pixels are ready notification callback

a :

client data for callback

Returns :

0 on sucess, -1 on error.

vips_sink_memory ()

int                 vips_sink_memory                    (VipsImage *im);

Loops over an image, generating it to a memory buffer attached to the image.

See also: vips_sink(), vips_get_tile_size().

im :

generate this image to memory

Returns :

0 on success, or -1 on error.

vips_sink_memory2 ()

int                 vips_sink_memory2                   (VipsImage *image);


vips_start_one ()

void *              vips_start_one                      (VipsImage *out,
                                                         void *a,
                                                         void *b);

Start function for one image in. Input image is a.

See also: vips_image_generate().

out :

image to generate

a :

user data

b :

user data

vips_stop_one ()

int                 vips_stop_one                       (void *seq,
                                                         void *a,
                                                         void *b);

Stop function for one image in. Input image is a.

See also: vips_image_generate().

seq :

sequence value

a :

user data

b :

user data

vips_start_many ()

void *              vips_start_many                     (VipsImage *out,
                                                         void *a,
                                                         void *b);

Start function for many images in. a is a pointer to a NULL-terminated array of input images.

See also: vips_image_generate(), vips_allocate_input_array()

out :

image to generate

a :

user data

b :

user data

vips_stop_many ()

int                 vips_stop_many                      (void *seq,
                                                         void *a,
                                                         void *b);

Stop function for many images in. a is a pointer to a NULL-terminated array of input images.

See also: vips_image_generate().

seq :

sequence value

a :

user data

b :

user data

vips_allocate_input_array ()

VipsImage **        vips_allocate_input_array           (VipsImage *out,
                                                         ...);

Convenience function --- make a NULL-terminated array of input images. Use with vips_start_many().

See also: vips_image_generate(), vips_start_many().

Returns :

NULL-terminated array of images. Do not free the result.

vips_image_generate ()

int                 vips_image_generate                 (VipsImage *im,
                                                         VipsStartFn start_fn,
                                                         VipsGenerateFn generate_fn,
                                                         VipsStopFn stop_fn,
                                                         void *a,
                                                         void *b);

Generates an image. The action depends on the image type.

For images opened with "p", vips_image_generate() just attaches the start/generate/stop callbacks and returns.

For "t" images, memory is allocated for the whole image and it is entirely generated using vips_sink().

For "w" images, memory for a few scanlines is allocated and vips_sink_disc() used to generate the image in small chunks. As each chunk is generated, it is written to disc.

See also: vips_sink(), vips_image_new(), vips_region_prepare().

start_fn :

start sequences with this function

generate_fn :

generate pixels with this function

stop_fn :

stop sequences with this function

a :

user data

b :

user data

Returns :

0 on success, or -1 on error.

vips_image_pipeline_array ()

int                 vips_image_pipeline_array           (VipsImage *image,
                                                         VipsDemandStyle hint,
                                                         VipsImage **in);

Add an image to a pipeline. image depends on all of the images in in, image prefers to supply pixels according to hint.

Operations can set demand hints, that is, hints to the VIPS IO system about the type of region geometry this operation works best with. For example, operations which transform coordinates will usually work best with VIPS_DEMAND_STYLE_SMALLTILE, operations which work on local windows of pixels will like VIPS_DEMAND_STYLE_FATSTRIP.

Header fields in image are set from the fields in in, with lower-numbered images in in taking priority. For example, if in[0] and in[1] both have an item called "icc-profile", it's the profile attached to in[0] that will end up on image. Image history is completely copied from all in. image will have the history of all the input images. The array of input images can be empty, meaning image is at the start of a pipeline.

VIPS uses the list of input images to build the tree of operations it needs for the cache invalidation system.

See also: vips_image_pipelinev(), vips_image_generate().

image :

output image

hint :

demand hint for image

in :

NULL-terminated array of input images

Returns :

0 on success, -1 on error.

vips_image_pipelinev ()

int                 vips_image_pipelinev                (VipsImage *image,
                                                         VipsDemandStyle hint,
                                                         ...);

Build an array and call vips_image_pipeline_array().

See also: vips_image_generate().

image :

output image of pipeline

hint :

hint for this image

... :

NULL-terminated list of input images

See Also

image, region
vips-7.38.5/doc/reference/html/interconvert.png0000644000175000017500000006332212303146331016421 00000000000000‰PNG  IHDRãûY…üzsBIT|dˆtEXtSoftwarewww.inkscape.org›î< IDATxœìwx”ÅÖÀ'½@HB(&UzA) *"boHñú];ö^P±\ÛÅÊ * HA‘*HU:„^B „„’ìùþ˜wÃÓ€l6ÙÌïyæÙ}ÛÌygËyçÌ™sDU)ëˆHuà  %œã¼V{€ÝNYü¤ªk|#­Åb±Xü )«ÊXD>@‹3¨"˜ LPÕß‹R6‹Åb±”-Êœ2‘ÚÀóÀ @ÀÉ#¡YÐâT?UŽC|:T=‡‚aWì ƒ=a°"’CrT;xLUÛX,‹Åo(3ÊXDâ€g€!@°Ù“—î¾{¡ßˆt\S–ÀÔø¡*Ì<v–ó88 xTU×ù X,‹Åo)ÊXDÚãfOùp×x.ÊeyÍ.àíêðz#ØíVÊÇ€»TuìY m±X,–2ƒß+c¹„Bpܶ^Ú•2Š®•¯Ö‚·CR˜³ó-`¸ªf];‹ÅbñGüZ‹ÈàQ³Ué|µº'y¯ÅÍa笉svü ôQÕÞkÓb±X,¥¿UÆ"r7ð¾Ùj™“@õãÞo9=®o?žçìøLUo÷~»‹Åb)­ø¥2‘Þgª@hž‹~…°B8g%7·€/;«êˆâmßb±X,¥¿SÆÎúáE@y¨– K¦Ã9>0»€N]`a @«UubñËa±X,–’Ž?*ã™@7(Ÿ¿N…ÖG}'Í¡ hÝ ¶Æ;€ªšæ;y,‹ÅR (ø”Òƒˆôº™­@ë#˜!ªJì û+º0˪òæý[,‹¥tâ7#c VçCýDXÿ“¯e:ÉU`bc ¨¯ª»}-‘Åb±XJþ42¾8ß¼}iUrÊÛBø xÜ[`±X,–Ò‰?)ãæ¥éN迟š§s–šÇ ß_Žœ×Šˆ?õ»Åb±XοP "Rèn¶.߄ϕonåÖMޏ•ŽEß ‹Åb)­ùZ€"¢7 ¢0hÆ<\Âè¾*†}ÑÀÕÀ\_Kd)]ˆH<ШÃÉœÛç`¦?ör2çön`°HU‹y}}éÁã!þ|NÍc^8€éGw.óUÀ,U=æi-þŽ¿(ã>æ¥á.¨›êy@n¾™ê“'³7)‰BÇ‰Ž‹#xÜ8.îÞ™YYäéåvÞyD\}5ñåÊ<>ûþ™y×Úe|×èÀQ¨á™ÐnôH„û nzÁ5­ ‡qU`fXR ŽGb’Ð ‘77U5Å[÷añJ½2ªš­êÉä˜/1JU${©Q6ÆQëÅ陘HR… DfdyÉ%|—@šs>&pQ½zT©PÈ={8tÑELLN&óî»i¶t)?ý”-îú¶n%åí·™÷ÒK\ίii9•ýÃñ€UÆ–lD¤ðPÞì©r î[ 퀠ÓTœ]’La=,*5‚9Õ@ëŸýDäUõa„:ï""ç?mÂË„›6ÃËgBµa*<`Ê®x¼>|SNTÀ<< ‘«TuCÑÞ…¥¬àÞÔ•`ó¶¶{dœ³¸•ò)û'NdW|<4nÌ×ÕªñɆ ìyí5Úx^·oGë×çË:uø$*ŠðW_¥àªY“¸+Ø™³Î3ØBp§NDÿSŽó³GÖ@uovŠ¥ô ""ò2ð=P*‡'VÀ–ðèVÊâ¬<ù/8¿.‚ŸgA»D§Ù«€Å"Ò°øî´ø‘þ˜õõŒiÿºM°n:|ü·1EŸMVK‡1«`Ítè·Ù‰°×X""}‹ùV-~B©sÊh÷8äa¦ÆCÁºIL$ýÉ'iÔ¡Õ££‰¨\™ II¤.ǬÍË/³p¥¦âš2…¿:w¦.°80€ôt2rÖyô(aaÙmzáùðSææí,ÿDDBžfO“0q!Ô)„éôtévºýOÖ…WZ@VCà¹FU)úö|ƒˆ<¿eKªîÚÅŒ9úï‹.¢YÆ„{ÖùÀ\ð×_lرƒcÿls§G¦UÆ–Àuæí½Ëáû?ͼfq¡¹:æÏ€˜4ÌõgÙO©ED.Þ1[­öÀŸ¿@­\~‡Þ( RaÙL“?€Däb/ß²Åð35e\v—çŸfjxøaÚ Dö‚ýñãÙ°y3»oº‰öG’Þ¸1•Z·¦îvêP€'ž k,®U‹ ]D³þý ¸zˆe;Sgþ|îüî;&%‘~ùå4‰'îâ‹Í9ÿ3ÁqÌ!UU“ÿyÜRV‘;GÌV¯MðŸÕÅ/ÅùGáËßàêËàD `²ˆtRU/˜È½‹ˆ4¾¡Æa˜þ;„sðŸHLmzÁžòÀxi¯ª‹WKiÄ_FÆëÌËÊZä0!ed1~<³&EÄŒx’5p 3,`MïÞÔOJ"uÐ ¾ž<™@Ö¡C¤ÏìÁƒ™Ø®çÔ©Cì-·0zêTöY.™íÛóí{ï1£aC*]y%M5¢Î5×ðÙ_q8§¦,s<еw,% © ¼e¶š$„…ø,‰Iï}0bžóÌÚšÒŒæC *¤ÁO³ RöôRñ–ø4˜ð Dœb€÷½ëÀ_‚~ô& ‹^ƒöG|!Ç´iônÑ‚ó.¼·l!íŸgD‡#ÑÀUµÙ›Ê("2 j2y­µJÀHôÊ0©!ÔSÕ½¾–¨°ˆÈuÀ7fë3à¶¢ôÍZð ÛL}…ªNñ¥4–’¿(ã0`?Pn› ÿ›_Ð5ÅÏ×Õà†ÿs6ÚªêŸ>ÇâD¤1&Îq [ÿ]åk™ [ ñH>UÕA¾–¨08Þèë€ZÐr',›ác‘³¿0S;s\ÓÌÖì¦øÌä—_ãöVÝnq™æE bSàÕUøü{é.µSᦎŒ·‹HïuA‘2¨e’ļZÂò˜¿´Ð‘±!p»—îßâ'ø…2vøÚ¼l¯oÖ¥X<( [–•ƒÙž*§¥¬á„f¼Ül ZåÝëÔKH¹"cþz«Š˜ëÍKÇè~Ÿ÷¡gé¿Úlsä¼Á;·oñüIÿ,6o_ëÿˆ¸å»2¬'d„IÀk^ëKIçr \pw Ì»}:$8²öóV'"R ho¶úoÀçý—[¹f½#ng‰óB7Xü¿QÆNÐûÍVb5¸Ï3¬eQ•30U}y,nçˆù¼MQ¦q\£]PÓË=δôwÇVnæ$­(É\„fÀí[ðyßåV%@p\é½®°”vüF¨ê<`‚ÙúøøêŠöÇušÊ{M8ÜsfÝÈì2‡2‹ˆ„`òX=ŠlT\«!ÍšáD˜s®Úµ >œ3œª¹e;D¸½»ûx©;Š '½d«­Ud&ÿ˜Ú´¡\D’óXPÚ¤ õëæÙçy—¸ãÐÌmª.éýiñ!~¥ŒöCF(  £ð‰yêHô¼ ŽÄÀ`U=ÍL1?¢iÞ^±¾?W\AœËŽy<˜;wrÓúõÜ1{6ýSS:ipµnMùG¡SAmä^Â3¡¶;ŠTI;I..ØA>÷Ô¹3T¹7:šÏý³gÓmòd.ro7kFÄòåôÙ·¡Ó¦quRC–/§o›6”\?ÎyII úí7ú/\ÈÀäd†<ðµókÛ”¦{yKzZ|ˆß)cUÝôÒ 5®¼¶‡P¬Š8C¡ë°ã©_ŸOBC >™6´ 6ò.•Üyy³eϸê>Ã-‡ˆ:õÜ|û3¯¾AÝÙÜ*V$ð—_¸6-5k2ªR%>Šâ½™3ÙÔº5ªT!è¹çèñÄ̈‹ã“Šù¨cG>_¼˜B8Us§©ôøX,§â/á0OAU‰ÈÍÀw°¿:´ÿ{úîó~ë" ÷ Øì^Ê4BUG{¿]K Çù#=Ur s* $+ç±Ç£ý¼y¬yà–¹÷íØAjL0׌Éù·ÞJû€>ø€yO>I!CnVv‡jm."?¡”ïê†"òfí®óÿUë¹ô“›}™å±ß­Œ³œ&ÁÁöìÉÔäd“Qíøq²†g9@Ä4}:»Üu¬\Éa Źî D1"®ª~þ–²‡_*cU/"÷ïÀ¡xèÿ$Ü÷)¼¶Ü{­~Qîù$WvvŒžð^{–RD¼y‰> ÙÊ!OrŒæN¡Aª=ÿ<Óò©G££)W­åj׿“þý‰ÿøcŒͦ„„Ü"ù™V >h‹Ü:˜TŸoW›$S%‚˜õÅOw‚)Û`øßPïX.ç» »O³ûÌsdܾ=ÕW¯f{r2'rkð÷ß9°?‡~ûëfÌ`õO?±õ‡Øë*ð“¨ç0Ø\˜«,e ¿Uƪú_Ù| aä¿`öxg"\XȧÚ°'îêÓûBVæìAU}§èÚ°”rœßZÀ) !/òSÆ!!„îÙCJ^õˆàÊÌ$ó–[˜›™‰Žö×^ãh—.TLH`{î-&ÁÜJ°; Ž{Ä(å’ª/úÔÍäpØXFC½”œ'çb¦ö<¦€+2’à;IÊyÜMZ®óâ‹´îÔ‰º7ÝDçÇ9rçü0i‰¹]s’ ÏQ{pž§YÊ4~­ŒTu¦ˆ´ÁxY·„¥]ᢠ¡ãÏðáOÐ0·'éBr8îº~ê 霉ÀUýý¬…·øN¼äÃåÉǤê&?3uJ © g="¸RSIËÌ$;übf&'¢¢È»í˜,xy¥)×]ãºû€C@àÊ’ÎQDÎf+KÌÞw‚>y*Ä'ȈŠB’’NÞH’œlL×II¤ÄÇE>ŸMB)7ÜÀ`N•*„L™Bß7ßä²I“ø,©×GzlØÔ©–\ñ;®ÜPÕ­À…“ña3zýý hòÔ½nè¿W PÎ-Â`X;8Ty¾¿ÙQÄÀ@‹Ü±ˆô‘–Åq¿–‰ó'œI§xõæVòsàZµŠW]E³œûÃÂÌùy\›= ,¸ìu§úüCUÛa¢Gåú ÁxQ÷ {»1’|îgÙ2»\¸.ºˆXÏýññÄnßÎ!À5k›4á¼ÆOÍOŽG¿z–ÄDÒ§Neu\…øßHpç1?ªªng.‹åü~dìÆ‰_ý²ˆüx¸²"!¡•)_+TØQ¡BÄ$AÅ#p$ÅÀáX8IÕA=ªv_ϪjB>",þ‘¹öN¯Ý¬¥$â‘Ihe9èšoðg>“!C8×sÿÔ©ì½ï>fÿöCæÏçÊ·ÞbÑ–-¤véB•ûïç’zõøØs.4G…2‘÷2Þ  ª>É‚–Îj Dd?P¶ç–Ç<›ôt\‹±ê™g薘ȤmÛH{ðAšV©BÅÿþ—Õ€kÄÖÞpÛ~ù…›GŒ`Ƽyìoܘ¨¡CiýóÏlX¸ý>H›/¿äïùó9ؤ åo½• Ö¯gk~mvžÒŸKn”eìFUOˆÈÛÀ5@oàR ŽÄ›²£ j2ÀT`Ba’‡«ê!Ç ôIàB™ WÕä.µøÛ1Ö“`˜V ºîÏïäC‡HKH`ËðátõÜ¿?S&L`綾2êõ×é:jý Ü¿ŸƒŸ|Âoééd:ı͛هÉ5!ûö‘J&r—ÀÎ*ÎÆ¶|Oõ=›€*°´Ù¡psçšk˜ôÑGtùôS®‰ˆ tçNöÝx#Ÿ®^Í— Ú·ç‹O>¡ó#Ðí…ˆBD‚U5CDª3÷UõC_Ëeñ."Ò™l…|÷×ð~¾ŽGÅÇÞ¨÷¤D?©j©È0$"ÑG®ŠÐf ,ëk™Nrþ°¦ °¨¯ªÿHb±¸±#cáÎà䌖.†:á;-~ŒªÎ%{îð‹Þp ¢•9upGgy¯ŠÇ‘òy³µ´ |}%¢?ß©å(b€'­"¶„—D$ø«ªoúZ‹÷‘z˜¹Î`h¹–ñ­Dï×{ÿ YAÀ;ªz¯oå9=D$ÓŸõ â^øã ¨ëÃd •ƒNCrE`9ÐFUK §·¥$aGÆ%U=t®‘G|-Å{8ëÒ_1[ËÛÂU—á³yÍÙ1ðð`Gožõæ½{ÇÊô/ V…îƒàø¤?“àò»E|ø—UÄ–Â`•q Â1¹uúŠÈ“¾–ÇâUž!Û©gbÞœbWÛCàºaVH.WÕ$/ß·WPÕ™€3¢ßÒº Ä'ʸëõ°£®#Ö]ªºÐ‹·mñ#¬™º""å€)ÀU}Ú×òXŠ1ùC_€Ž¿¯~+ ~Žƒï†50å.WÕŸ‹§mï!"¯š­Vóà—¯ ¦\ì î·Áßm/Øß®åt°Ê¸„""Àd`±ª>æky,Eƒˆ´Â„D}IU—ŠHE`p¾9£Å|˜ùÄexOŠçÃËCáx$Æáh°ªŽö^{Ňˆ_×›=U¶Â7ï üì˜V n¹Twv|¦ª·{¯=‹?b•q Æ Óù#°ZUôµ<–3à ƒz0h|­ªÃ<Ž—ÆýÌž¸pß×ðÄÚ¢•de9¸»,ì®wL¼~ƒcuxãea)Ðo|<"ŠpþöHñBŸxµÇƒÍ£ªúzѵa)+Xe\‘P`< ªÿöµ<–Â#"ñÀ @' .ˆÉÞu‘{i[Žó^$Û—ãÜÕðÈwpwÂÙI²% îê¿÷‚ whÆÀÕNzQ¿DDzc³'j/Ü8Þ] gñÇ—!0´#|׎Æ9;שꬳ“ÚRV±Ê¸ "!À·˜Dw«ýÐJ"r.ÐxhŠqñí¥ª«ó¹¦+03‚v8g=´ZWÀM…L½¹!Þi sZ†–pÂà>xxQU}¸ü§x‘:À«˜ mböFï&K¡÷ ¸„b´œo5€é-auk8êÎÄäÂü6UÕíÞ¸KÙÀ*ãR‚cê‹ñzl—K”|œùào1©ó:ÿSÕ…¼¶fTÝøÔ#åöCÍus*†ÊG â8ì­¢!)öÅÃîàòÌ»ŒF¨j¾éýg®þE ×©GBR¡æjˆ=`ò—W:S`9Ø ‡¢á`%ØÞ2ÂsTû#ð”ªþ] üL‘Ȃηœ9óÃå0óÃV[,–³Â*c?BUŸfÓE¤¼¯åñG<æ‡Ç©ê`U=ák™,KéÇš©ýyèôTÕ#¾–Ç_p懟n²yj-KQäk,Eª¾!"'€™"Ò£´&Œ/)xÌ·:©ê‹d±Xü k¦öSTõ]L¤®_œÉ–3À™ž D[El±X¼UÆ~Œ³Ôæ}`–ˆTòµ<¥ ùá¯Uuˆ¶X,Þš©ýU-"…|™ªîõµL¥¹ x3?¼ÈÇâX,?Ç*ã2€ª~á(ä_…l—âä“a$Ð3?l^,‹×±Ê¸Œ ªßx(䪺Ã×2•4œùáqÀzÌüp†E²X,e;g\†PÕñÀ£/ëZ¾•¦dá$Ÿ_|¥ªÃ¬"¶X,ʼn—1Tu’ˆd3D¤·ªnöµL¾Æ™~3?ü‡¯å±X,e«ŒË ª:Õ1YO‘+Tuƒ¯eòóÃm0óÉ>Éb±”Q¬™ºŒ¢ª3!ÀiäkyŠg©×L ¸Ä*b‹ÅâK¬2.èê¯ÀÀdiâkyŠ g~xð…ªþËÎ[,_ccS[‘À˜T€+}-7‘›§Uu±¯å±X,°#c à$=¸/"­D¤“o¥*ZD$HDþÜ…™¶ŠØb±”¬2¶ ªK€koE¤ð²ˆÔð±XE‚Çüpp©¶X,% k¦¶œ‚ˆ4&€=ªÚÏÇ"ÎH,0BU?ó±8‹Å’+V;8iòÎâsœ×JÀa`°Û)ÛU5ÝWrzi ¼ „µ`Ì<ò¬³¨³PSûU9ÙŸ{€ªzðì¤ÏnOÔùR‹È-À“˜ùá%EQ¿Åb±xƒ2­ŒE¤Ðèôb qÙ1`0˜âoqžåùàR  0袅ü¢ˆHp¦Oûç²é˜> üYØör´Ý cŠ^¼´®UÕ}§[—Åb±'eR‹Hsà9 7fô—ƒ`TLƒØãà -·) ,^TÕ©Þ”¹¸‘ú¥ÜxFUß)àü(àA`Æ¢ó …èã—.1}z84êöïï¨jj!å Öý0Šø/àUÍ,Ìõ‹ÅâKÊ”2vÌóÀ@ÌÞ@4;Ý÷B¯ýP? âsÉ[{06…ìX˜v,© Ç=NX<®ªs¼~#ňˆtÆÄ³›b‘pàÿ€G8ŲŸ]÷BŸ½Ð"ê¤CHŽ/[zl …eåaRU˜s$Fxœ°|PÐÔ€ˆ|†±r$/©ê˜Ó¿[‹Åbñ eB‹ˆ`Ö–>8 ´j*Ü»îØ •Ï èCj|S^oë<ÍÛã€;U5å¬/AˆHpÎà"r!æ~«™=ÁY0`3ü{+´;zf-Í‚·ëÀµ!Ëíí¿ cnÎuÞWDb>ÛD xøîLÌÝ‹ÅRÜø½2væ-‰s IDAT…¿®0{¢ŽÃÝkà™sM+£ªÁËMagygÇà*UÝX4õ—޹ÿkà:³§ín˜´ªæ2Ç^”l…>`UgÇǪ:XD΢Uu­wÛ·X,ïâ—ÊXDÊcL—Í 4>Ÿ ŠqyËòrÐûRØ[8\à&ky³n¸~ |¾‚Šé ”!pM;˜ìX9xHUß(ž¶-‹Å»ø2v‚wüô4s™ïÿ Ãv¿$DÁ¥½!5؈QȇŠ_Ž¢ÁI°ð¹Ùê¶fÎ+~)2:_ ‹j.àjUTürX,KÑâÊøà³õð"x͇&ÌoªÂM=¯àoUu ïd9sD¤&f o4Þ Kf@D9¿.‡ƒ UoØR³Œ©ž êa±XJ;~¥ŒèQ›€(豦ÏõµLðpcx½ƒ³ÑQUøTœ3@DÆ×Cù4X=j÷­Dë" eH>RÕ!¾•Çb±XÎËÚô,¡ðþ@–ïËËCu·yú-Ç ªÔàdprFôC—Bcø¼O…›—;"Þé$·°X,–R‹ß(ci 6[7®€º©˜yE—à,xz¡#f;LÞàÒÄ€@ÕÃðÂ|ÞŸî2rĤb}¼îÕ°X,/ã7Ê£ˆƒ Â1x}9>Wžå®mÐÌíDv×z ˆ‘f@'³õð"ã™îë¾t— 'àž?Q/sæµ-‹¥TâOÊøjórÉzˆ9ŽÏM©9ËM9r^à¬- 8¹ŒË§Á¿7áó>ÌYZ¡î5Îý½Ò‹ÅR ø…2‘–@-³uÝF|>j˭ܹ‚31 *®òJG=ÎN‡M”…Ïû0g‰Ê€¶ ެV[,–R‹_(c²GpRàÚ]ÑŸ}X4oNdÑÔ{Zn9UÞ’‹ˆœ43[×xõ§U+Ê£gvý5ë‘Û‹Huoô…Åb±xQÆíÍKÛøÇv:„®[ǵññç<–_éШ ¸)¯ãQQ|û-îØÁMpçúõ\ûî»´È»ÎN[y›{µ7Іvæ%$nÙF!úkÙ2úöéC\aÎõ,K–pGÆ„Ÿîu¦Ü¾Õ‘WÈ~x°X,–ÒE¯("œ~5’0ó‰§P®4h@õ°04·ãy€Ëy›ë5ŸNçfͨñ¯1uãFRÚµ#¶U+âòn£ÖçMœˆ„¨ª—c:ŸNŸÆ$CX¡RL6h@µ*Uá4úØHö\ðiR! ʃ”²e¶X,–Ò…Ÿ)ãjÉ­@=Q‘ìU6:}ÿý4«]›Š));–ÕÌ6ç° àª«¨|Ï=´@^¥S§² U+jN˜ÀŠI“ذv-Gnjɾ6꺕±E¤;0OU§žÑ]1"<¬'{>ö(¹÷iuü³kÖ$ìÙgiѨU³²Èš5‹„§Ÿfµç9Sîå—iMÄW_ñרQl-¼ä1ÉV[,–ÒL©WÆ" T0[5sUÆŽ‚²ç%³iÓ†èÝ»92i›4 úõ×雚Ê÷cDzK !ø™gèøÞ{,nÕŠJãÇsãEñÉ’%Ù¾ýÐêàAŽM®]ä™j0Ìôô¢žLž‘°³è‚¢D¯€i@%³ëP9˜X ®L,Ìõ"ÿìãFˆt¹p}ø!V¬Hèý÷Ó¥|y‚î¿wà^z‰KÞ~›ùQQ„ŒÉ•À£F±%g¹{vTÅ*c‹ÅRJ)õʈ9ù¶R*¹˜:h®¦Ðwße#@ƒDîÞMJÛ¶¬8úcDz]„¬  ‡ aÚâÅùôSZ´ êcÑ¢_?fß|3ÓGæ’áÃéñ쳄oÙÂÎ^`Ö˜1äHLñŸºðbOH‰Ì!ZK`ÅÙwA‘8‰qpã@h°¾˜Só»0·>ž>½Ó§³·fMÂêÖ%râD–]v €?Ýç|ðóßy‡ uêP~èPÚŒŦ‰[þ˜ó&¶pç[,KÉ”ñþ“o·»€râòx=åø-·Pã7¸*5•´#GH­T‰è-[ظDp8AÆâÅ$¹Ï_·Ž½Í›SpmÙBêÅ3˜|ÙeÄ=ú(|ø!7ÌŸÏÛ›6qìd+÷m4å»s`€%ŒL¢ƒŽ%iîXDºã€#@ ÔÞ~±™…»þŸ#ã¶m©0~<×xð G"" Ív¦`ÁÝÛK—²çŠ+h™³ž¼9ä~È)ÌèÝbÉFD*M€ª%“út¯GY¥ª)¾’Óâÿ”ze¬ªÇEä[Ë“»™:Ï9ãçžã²O>á·Çc%ÀwßqqµjÄ`”±ޤ¥™Ñ^t4¡©©¤å¬ççŸÙ÷Ë/LNO§y·nTÚ´)W«ç5b¼;³Îôþ‹gθp0xÈx§Çúa!·>~í5:­\IBŸ>ü ðä“46Œ®çi¥J'•s¥J„¦¥‘ž³ž¼9TÞy³«°rZÊ.β½+€>˜ß_p!.;."¿“ŸT5ß‹åôñ—¥MΟðÎrä©)3uv %(2’ «aCºu£…£¼³DÈAÞ|“–@VwíJÓ_eõòËœÞy„ºëº÷^j¸js“6–säͶ«êDU-Š@UÓTõU]OvŸ&•§ðQ±Üè§ì'(<œ@ +:¹õV÷R´“×Ý{/­¬°0tà@Zýù§éã•ÃQN}V[òDDúŠÈ2L~ñ·€KÈVÄ Ó¡A´O„ú‡!6Ýì è¼l‘…"Ò£øïÂ⯔ú‘±ÃN 9lq¯q͉ `ýz÷ÜùüóŒýè#f?öý¯¾š¶.®eËXI(ÎÈ8=ôúõ‰Û¶!±±Ä,]ÊšçŸço@;w¦ÎpåÑ£¤¨â 'üí·™°`ssS´ófŸªžÁ2žbÅQl‡£!1ª8:÷ÞãŽ÷Þ;¹ïÇ™ýæ›Ì=šÛ÷î¥vV®Å‹Y×¾= ñø¬RSIÛ¹“»#"ß·÷ÜÃïjd¼5 ÒÃݧq–2‚ˆ\ ¼Dv<€r'àÂDè½z€:Ç!0—|²›Ãà§8˜VUcÁÀÀt™ <©ª¿ËÍXü¿Èg,"#!4 ¾‘§¥è*W&$>žÐ+8š×9U«Jà¶m¤yî # iSÊ?ŽkÍR23ɧCëß ëãUµD‡o‘*åO|/þUÐ5ùEPƒD.]J²Ë•{•+Gà¹ç¾f §17÷@+xkTVÕÃg#§ÅpVZ|Bv P€¦à‰5ÐïŸÁŸ_zŒ«/7†õžƒ_CT5-¯+-–üðe\Øl¶^ùYŸï>as8Ô{4¸QUÇúZ¢‚‘ßÎÐb%,ÿÒ×òäNÃ;a}C`ºªöòµ4–’ˆÔ~Ä8gç&ÃS«`О¢kå¿Õ`DSØéöYXôSÕ­E׆¥¬àsƪšÆ &6ÅK1”Ï®¼ÝØQÄ'0ë‹KÌËê†p(Ÿ÷aβ)Ô±4|ï•°”:œ¹Ü?& ÷¬„ÍÓ`ÐNŠ4kØÝÛ!a*Üõ·ÓtKàO¹¸˜nÕâGø…2vpDzf°! Ÿ+ Ï’¥0¡ƒ#ç,UuGâ*éü`^2Bá©|bnûª<Ý\@&fd)ãˆHÌw!"OÀÿ~ƒwW{/ëXp|´ >˜á@Eà'iU\÷lñüI ¤ÂñpÚï(€3Í»ÛvÕtä|Ók=PÄ8Ë7œ‡œÏ{G®’Ò¯Cá‡îŽ¨ßªjNs–²‚3]5ƒ¸T˜?n-²,nù—!;`Ö4ˆ9D“EÄF„³¿Qƪºi¶æt‚™1}Bû3ø‘ „Oû8bNQÕ_¼ÔÞâ R*Àà.}Ÿža¿éé@ð˜W{ÀRâ‘ÌôO%?ßÿÍàïk¥C|; B3€xŒBÎuÏbÉ¿QÆ#Ýà ‚!×a‚`ÃSq~åš+àh Æ”ú wo¿èQÕMÀÍÖ´î0¾ >ïÓÑ5`NGÄ7T5GøQKä] !ºàƒÙÐå>ùnv?oÍ1sÕ´^óþ­[ü¿ð¦öDDnƘ­vsá¯|'Í ŽðéÍÎÆTõ~ßÉræˆH,°¨Qà÷W¡yžËÀ¼Ë¼èñ(«€Y_ÞPUó—mñoD¤5°ø÷ðöß]ã}nkcZb›©êZ_Kd)Ùø2‘QÀP³uÕ÷ðÃŒâ—âÕ†ðØ} À\ [IŠA}º81«B ~üõFaãU;B¡Õ#p Æìq‘ª.-^,% ùè •“aë8wùZ&H ‚:áp0UU/÷µD–’¿™©ÝÜ89‚¼nìB±šª^jOsñFàêÒ¬ˆTup—ÙÚ}´ ¡[Ÿþïq± ³VÛ*â2Žˆ\t5[ÃAx&>ŸFÁ1'àžÅŽ˜½(`KžøåÈ@DÊaF¤-Ìžæó`æçP)û-_Ù &÷wÖ.PÕÞm³ø‘瀧ÍV…½ðÁ»0ÐËa(?® ü¤Ttv<¨ªo:ުݯTÕËŸ«¥$""“+ n"lïkyN%S öØYø^U¯õµD–’‹¿ŽŒqÒ]L7{Vv‚ÆÃ•ðŠ'åš0h8 & pñzLzD¿QĪú ðo ŽT…›Ÿ‚¡íðJŸf¹à–N0ô GŸ†ªê›Ž,»€¾ÀZù¯ˆœS,`)8ÜÎò¶~k(VÏé” L¸zµ#n/ óF?Xü¿»‘àÌòÉ‚–¿ÂÛ?B§"ˆc¼#õ„_/‡ŒgçDàUM>ûúK&"Òø¨böTÙ÷Œƒ'‹ÈQåñfðñ8PËÙ±¸FUå# ˜´Âä] ¼¯ª?–’Šˆ\|c<—×õŽxQ±³ª4¿ÓÙ¸JU'úT!"H`OQY±D¤* À^õEæ·#c7ªêRÕ'€~@¢™Ç]Ö º¾Ü#σÊiÏ }—õ…úoÁÏ×:Š8 x3Gì7ŠXDÂE$ÊsŸªÎZ³ÍžÄzðÔpî#0¤=¬?ƒ(h«"àŽ !þI1ÜCÏZçTÄŽég½Ý@P&"WeXJ$W›—ú» ^ §ñ]kØð˜WÕªÕ®—üš%C]w<ì«Ïö†E¤…ˆ¨ˆ¼r¶uåQÿ0YËþò"’*"mT”Û<ŽÍ‘ I‘½"2ÆYˆ4pÒV®fE$×ÀG"RÙ¹·tI‘í"ò¢ˆHŽó†ŠÈà/`pDD>tÿG‰Èý"’åQO‚ˆ /ª>ò~?2öDD"0&Öá@ÌÉ#¡ÉPw9´^µ@Ã$h—uÓ 1ÆÀêXØ ËëÃúVRÙ£ê L°à#~ˆWa<—³ò8ï2àE ­ÇÞ,ˆ_Í—CƒÝPï´<m+Þâ °"6ÇÀºj°¢$ÖwLünæcÒÓýVY_Û€yÀpU-fooKq""›€º0èwøxÉé\»n×}þ9+^~™õ|@›óϧrçÎn§Ï¢æºN0®=°TUÛœMM"òÐØ)5Š:«ˆD{€Îªú§Çþ;ûUµ‰ˆôÞU՚αyÀתú¾3U4øKU‹ÈϘ)»{UÕåü7QÕŹ´]HâUu³dm6&Ö7Î9÷cþ¿8·Ì©ê&çœ>ªz‰£ÈÛ¿=KrªKÉg\(TõðгôéAà &‚5]Lñ$ðd…äSåAÌïeËÔ""7÷ €›óûÑ;&áŸEäjL¿^`,»Î7Åó?Nœz40ê21Žw#UuÚiˆü4p9p‡#÷Ï"2@UœF–ÒE¼y©„yÂ+4"h@. kÔ(ÖÄűétë(<ñîXôgSDB‹0‰Qzàü¸D¤ð-ðð,PxMUßsÒ¡NÆ,¯LvίŒ.ö4«êa™Ü†I¶áæ6àÉè(ѱ€Û4ßã`érŽÃL%ˆª.uFÕ ™ƒ€§€ÜŠØ-3FAçV‡‹Ed'yô¿ˆ´ÞÎÒÏUõ i‘ÆÎñ½˜zUÌÏ¿E¤«#{œšSo{Œ…ÌÃR;ÌgUó=Y¦Fƹá|±Wã„­sLUÁtú^à€?8 ä…ˆ\€yÌR1÷~ÚQÃTõFuê Ã8zU%Ûá+»OUõøY oÚu׉ª~ "«€ïEäUý¢(Ú°”âO¾­£ør%*Š ß~ãæ_eõ¸q¬½óNZT«Fœ ¸Ú·§rãÆTyê)þzþyοñFÚ¾þ:¿&&’Ö¹3ñ¡¡šŠ«W/šwìÈyï½ÇÜÌLô©§èAà3Ïð9ÖS©ëVƘßÀÎ3¼ç;÷÷øKài©è‘$E€§?Š•"²h$`BÚ> Œr”ì­’³1Ê«F1ÝLs”z^Ü+"×b>—@Àí³ño`)æAâ+ TDîUÕÑùÔµÒq¼­¼ ªnå…îwŸ("ïœÍ§Uu’ó¾F‘51VÌ0ÌZN²€¦À¹ªºXæqì8ð¼c\,"ã1ƒ†gTu‰ˆ4‘ë ˜ 1&ñÛ0 l~rê9è0ÿ±7ÑN|Uæ•qN“Ça`¯e)nTu‘cb‰yŠ[£ªŠ ÞtÌu[Aç%ªº@D:ãù§‡ì<²ßPáäÛªÇÈÇÄüÐC4JMåXÿþÌøñGvîÙÃýn3u@.G1gÕ¯Otb"‡>ý”M‡‘ñùçlõ¬kÜ8–¼ú*k*U"äÖ[iûÌ3¬Ê_Ô*ž^ÞÑœ2‘êÀeÀyÔÙ}¸3²8–#4ì1Ìè`𮈴Ç(§žsž¨ªŠÈgÀ­"òf:ï߈8“ru°Ñý;s”Øh`´£`‡ˆÈDÍ;ÓZgÌ``p—ˆ¼éü/ïÃ"› YÅß7Tu'p/𭈸0ñ`æ]ã1#S7Qδ[ƉìvàQrADnÃÌC'aF«)œ´´/9£àó»Ûå pµãÕßã@:Ê9ö °TD¦`¬U ªº ã,öŽˆÜŠ™B¨ 4³#c "r3Æ„s©ó…GU×çUéCU?Â˜ÜÆ‰Éîe)¥¨jæÏØRŽ|"aM˜ÀƆ ©}Á”²† áܸ8bEŒ™ÚCguêDTHºr%‡ï¾›…‡søÜs‰pêâöÛi„+ ×àÁ´^¹’ ùµmÊöòŽØg6¶°£Ô<ûàðŒ£ef‚'+ñ° ¨‰X·³ ©0ÊûmŒý4Çþ€çšÿåœòpt ›€‡0ëÁ˜h/v>¿œds0ó´n™W`©PÕ©˜ÈŠ-1¦÷y˜AÄ3˜9i0Ó)ö‹óþݪš—5 5f ô:ŒÉº¯‡oÐv` ÆÁ÷àz=UñŒ^Œ™·lvä܈±, þƘÑÝþ2ÏŸcúuæ!)ªL­3¶üq/ê^€ƒ†ßଅüãXò€G.8JÍ ÷˜’of¶Ñ£é8p —ìÛÇ#G8K…Ï>ã÷§žâ¯1cèÔ°!ñíÛ3nÜ8.éуvr(.ŽŠ l¿è"¾MN&39™ÇæÍcE‹œDð±cëÙ“/Ö­£€ž—ô_;óÕ>ADb0Ê¢«ª0Ïm‘ŽÀU=¯Xڳʸì""C0ž}ÝËÚz\Ç£ôÌr‰kUu_—XJ"òpÄ€ƒ¯t~l,Á+¼q#ù†ÍŒ‹#¸Q#ÊoßNÚ¶m'ç"““ybÐ þ7i{ë×'rÕ* ™Ó;æ8¼¢ªEDÀÌ/RÕBÍ3—uŠ[[3uEDîÁü8/-kŠÌ<²ªÅ,Y "gÉâ&˜—Cq0¡2˜‹"}ãFŽtÞ¤ÏËþmÛ²çÝEEp¥§“±j‡ ªÇ”¯Îq±‡¼>aÆñéÊPÚø‹S×f{«ŒË ÎSòÍg­C¾–Ç—¨êÇÀM§Û|,Žåô˜OöœègMðJlé“eòdæ¬_ÏáÓ»î«&ެ;Tõ´Bv%ªºZU—ùsœ„¢FU“UõâjÏš©Ë"òf~/õ£dg‹˜ 0ßcœQ8SïQKñ""ƒ!* ¶¼ ±%hþk4zÒ#·=×½Z,9±#ã2„ãžßèañ©8Ñ».ÆÄkŸåÄóµ”|þdBr Üq1ÞŸa>ãÁ—:ŠøÆ?ÁbÉ«ŒËNV£®˜±_¬.jT5CU‡aÌ‘v¾–É’;"RÓY7þ0Ùa§^ «Ã9cå™g9þ{˜íN<óŽª&x§',þ‚5S—Ää>m‰In^P¤ à„  ¼T@]K1áDO{³æ4 “4À…Y#Úˆ‚&KaÅhôá[z4¹67Æ„I¬§ª¹ÅD¶X²±#c?GL"輦…ìVÇqãBàvyßI{fñ!ªº¢õ'L2‚,Œ‡òå˜@ Àß­¡g¼ìÌ•éÖÏQÄYElùÿöÎ;Jª"kà¿ ir– ‚¢ Q”5 FQ$ ú)¦]Q ¸ÂºæˆuM(‹iÅ¢¨KÉa%’A$ Ì€00÷û£ª¡&ô ÝÓ3=÷wN~¡^Õ}ït÷}UuC(˜2ŽQÄñ.—f·peF*Lø (ýî¶Ž=D¤¤7>\ˆ Ö¿—¿÷U=¬ª#8’âï».0°-៮¡ôé3ߙѪš>z•adˆ)ãÄDz‹‡zµÍl俎|.±úL?}mä"'"·àB VÂ…~ X½÷ñÉÜ€ [¼Ón:›<÷éãzyY¾%ûLG†q[3Ž1|š²7p «ûZ¨Çðá ºÆO؈'²øïq/`.^ñÃ>¶2"R5³Ð­"R¹¡;Òæ{˜ü>”Í4Å≳³œßtô–íÌcÁÈ ¦Œc)ŠK}¦ÀŸKÔ#~ªúcÜî_Í9üˆÈe¸ü²Ëq ãCÍð¸¾2ðÎ{¨¾ž}®Ë,™Á ðNm¸ l ¤Ëû—L PÓ1rŽ)ãÁçß|—PüÿÒMßaÄsÀY¨÷ð>ÊÆ ""€'€¸t‹N ­b¸Ü´ƒý‘4h: F~¡ »g IDATçî:qi'U‚!=`Y{\Â{p¹À°ßž‘LÇ^9¼Kmv‹…¼Ë|øÌa@oUMu#D¤%ðniåUƶ¯ÅñÆwEBó)pù\¼Êä`öhW1xî4˜p,îi|ð›;T5š±§Ž)ãŽÏ>ô1°NUÍ`$ñ &>žòq®‘F¸|³õq#áIê§Θê^œo²'.ê-‚3~Ú; þ.h¶š$ÂXRVW€`icø­)*Ôôvœßó+ªúg$d7 ¦Œ 0"Rçgù‹ªÞmy +"R÷Bô?Ü:²Y¯gˆÔÎÆùœ³9"Rç§Ü 8åšZŽKdÿ¢E³3Â…)㊈”>æE+Gªq¿F9h‰[GÞe‘òÞ°êàRÜúêÛÑ22‘SpÁBºâÖþ+rtí7Å-ÿü L&¨êoy$¦Qˆ0e\‘ÒÀ—ÀtUmyŒ£ˆH?à8ØYî«$Η¼.•àŽüh/ " Àݸ´/á¦uóUowQ÷<ËãŒÈ¶¿›{ ‘˜2.`ˆH`"ð­ª>myŒãñIϨêë"ÔQÕ'Ðf]Ü(îbœm5 !]µTàwœAÑTÜHnz´”‰¿ïÛ|ŒPÕ½ÑÅ0ò;¦Œ ~„1 øLUŸŽ¶CDêàŒµ°Àó±‹Wt?­Ýúð'“á²?òVŠm;Âê¸)ëË#]ïF7·¶ü+p. ÒÛÃ0ÂO±ì«y…ˆÔÇùQÕ/¢-Q^Z»Í'¦ÃeÛò^„ÀÄ¡UWØTøPDš{qCZãü”gM,‚aDçüZÜD\¢¯£-9D¤àÓÞ°Þˆ²òü²ÐéRHŽÇ)á¸xÍÉ8åü8ðZN‚–†:¦ŒóÞˆç+œïçähËcD™ ´“v¯ŸA±|ð#ÞéàwKy8å¼ÒÖ‡ #²˜2Ž"’¨ª»Eä \ÈÀOÔçÓÈÿˆÈ5¸¸ÕÀ¿&Âù$BUªÀI=ak9œnm Ø0òSÆQ@D.Jââ ôWÕÿFW*#/‘E@Sh²myŽå•:pÛÅ~çbUUq £Q$Ú6|üÞ@}œ"îmЏp " €¦nïŽ@Zþ*·®…»¼¸WE↑1¦Œ³@DÊxåNîN†/¥½‰ûts¥@Ÿõ8w¢|Vþ²ÒËz…çiF`Ê‘¦"2TD>‘Ù"ò›ˆìÇY‘‘M"2OD&ˆÈ"rNnþ¨D¤,0( ”%UuOXoÈȯtw­×¸Ñ gT®(ãʸ†aä…ÖÏØ»—ôÇ%l¯•EÕb8W~¿+p?°KD¾>> ÑØep °ç&òZ.Å7 >-b·wù*œòËR¥(:j­^}•_æÌ!)pü¡‡8mëVö‰ UªÿÏrLØÌ'žàŒ%KØU·.e7d}:–aÃX¸v-YļîüTÙ¿—:SC¿KÃ0rK¡SÆ"Ò—ê­ë±gÊ€–@ý®Ôôùb·‡ñ°)¶–„…`si\žk}Y,"f“ï  ðð˜ùk:Nü’GÇmd¡Œ÷í#­dIŠŽÃ…§Æ‡ªÐ»75﹇óÚ·gŒ2}:ýV­"iÜ86Üz+uo¹…¶Mš0¦^=J‰pÌËaË–Ô®]›ÊÇ3?«¾5Ê8«—TÃ0ÂH¡QÆ>Þós@Žü)ž´.ÚWm… v…>kÿSø¨:LªË*âŒr¾ðþ£wªêœ .ªœnSÒ…–G7OÛƒ[£Í”™¾jý_z‰3‡gÉóÏÓå•W˜²p!»FbÊÈ‘\4iïÄÇSä±Ç¸ðÿà› Hyì1–·uþùTìÖ÷ÝÇ—kÖœ½¨•ßÑYV3 #l ×&9ø·TM{–Áà '¾lþŸÊðà°"0-˜ üMUGŸ`ÃF !"7¡Ì>Øûb(×\uÕÞ{^K–°¶tiJœqÇ$ Y¼˜ž›7³;>Þ½TŸ{.ÇePªU‹øùóé?a‹ `vhÒömc;KTµih׆q"ļ—ˆ Æe@ª %SáÞ…°vܽŠ„Áà¥Ç6øå{5ª¤qÀ+"ò–ˆ”ÈÛ»5ò1ÕÜGB2!~·>ù„Íó糪U+ ÀÄôçûöeB‡4>óLêöîÍäôç‹E'Mâò5kØ2`3CíjFÆÕ#úD Ã8BLOS‹ÈhœÅ2Psüç¿pöÞÈôvëz¸r+\Ñ~® ‰Èùªæ$ñF$Å}ˆ#›)êgE¹-h°k»o¸sçòSðùE‹Ø½x1«ÿøƒäM›Ø—þúO?åüÄDJuìÈG¡ö騸_aJÛ0Œp³#c¹Ÿ#ЏýXø œDDÝBjü ³~„~˼í€w#à«l<6¹¤²„ð]!íÝw¹ìûï™ã|Ô¿?ç¶oO¹ êjF×?ò;wæÌ«®âƒ;9JŸG˦²ÇÊlF¤‰Ie,"Wã²Ìgo„§A¥þ!å¶; cÀ-L<=€Ç"{ÇFÀ+¶CÅ`M ²ù½ü2-)Ó§ßö›'NdöÛosy‘"Ç*_Ô[N9Ö½;U‡ áÒ!CøhÎve××ñe›)cÃÈcbN‹HKà]@àäðõT(vˆIJâp¸~HH Ô¨Q´ ®¤Œ9’ËTI2„N«Ws}p¹ñFjgÕ·+"ÂÉlF$‰Å5ã—€x¨˜_O†ÄƒÑå³éк4,¯þø¨2LN&íÒKy»aCÓÜ<ôSRR8|ìþûù¼\9ŠgÔö´idéã [ŠÃúš~gYæõ Ã'1åÚ$"=p±€7'ÁÀ|0Ͷ¤4´¸žRÕû£-‘Dä ਹ6¾my2fhSxò:œÂ®®ª¿G["Ã( ÄÌ4µˆÄOº½&›``> ÄßdôXâżSDêFäñîcS-˜ž@Ô¿›• M¼¬3LFÞ3Êè‡Ë†<9‹<1Ö µŒœeþJÔ0ò=ß~™â¹Dý{™¾,)ÿ;ÕË:>À0ŒŒ‰%eÜÓ}4_]'êlÁ¥êŸpõb/gw‰Åµz#Tõ ð¾Û›x.,/IÔ¿›ÁåÖ áP°ø BÁ0Œ ˆ e,"‰Àynï’UD}ª/£r$5] SøŸ‚Q@xH†ƒñpË…DF±æfzº"Loëe|VU·Fì †q1¡ŒË€8Þò¦ÕD}„‘Qé¸jìðòvÐs0ò9^É=íö¦·‡ñ• ÿË_.¾Ÿw]‰û?HúˆÈ$yYD.‘R{ †a1bM-"ï×Âë`IHk]:QáÀÒfÏvYpâã)Ò³'56¤ÜÆ$þ9[·lá@ðuíۓع3UBgÌ`û´iì ]ÒëÚÂûg«Uõ”Я3b ¯ÜV5!q;ÌzNM‰žD—v… —úk€ üþ~Ü:÷À+–úÓ0"C¬(ã9ÀYpÍlø`F(×LÊÅ»w³ÿŠ+øà²Ë¨òÖ[\~ð ‡V¬`KÅŠ”©S‡Ê>È7/¿ÌÚ2e(:i5oN½eËØpà‡N=•Ë—³©S'¾MÒÇÁƒ—T5>—·kÄ"Ò˜ÄÁI+aé PöpÞKrWKxþF\ZÑO€«âÀ8…¼<®ª;ó^>Ã(ÄŠ!‘Ï»Z-Û<±‚#U¬HÜ{ïÑmÊ–wïÎ÷“-Hhܘàð¸qt:ùdª´nÍ[Ë—»úqqÈý÷Ó(Ô>¡n’ß(!"UuG–Õ˜EU‘AÀ›°¾!tì ³Æ@|ZÞIñ|xñzœ"þè§îíü€ˆ\| ü læŠÈkÀ‹ªúgÞÉh…ƒ¿f,"E8’ž®öB_';Ó÷®»8EéÓ‡©ªGëÌŸÏî±cY_º4rÑEœ9r$S—/çH©©~ä–‡Þg£€2¨‰Q¨QÕ·8C}a;h8”&Olúv€!wÃá8\t°ËUõHæ'où}°CUŸZ•€Å"Òßÿî ñðƒªÂ‘~½•qp€ý¦M©¼~=ÛRRHͨnÛ¶”+^œ¸‰Ùjû—3‚Caš26žu›N…Ãat"¦„w–ý`l?H+¬.TÕ-éó ùf)¦ª»Tõ^à| 30ODºDàyF¡$”qPìéý¢Åið4u±bHj*3«[¢ œœyÐʾàúc ̉:î®öCJ¸íïм?|_ްYXïW¸¾=Ôyæ\ë&­Uõ—,äKUÕCAûëUµ?p=.¢Ü÷>9‹a'@WÆÞ¨Ä¯a­)C.FÆ7²«fM*gVwÑ"v¥¥¡:Q1Ôö3.‹Ê‰žâfùU}—ÿzhQXx.\ø œÝÛ‡ÎÌåw.EàÖÖPý s#$WÂå@~¸DUw“ Tu‘ªvÁYY¿&"ãD¤^an ¼2öøì6ëBJÜîËeüÚk,«X‘Ä¡Ci\§X1´U+ÊnÜÈþeËX5x0íÒç“mÛ–üQþÈ$³a8Tu!pp° Òâ`ÎEÐá%¨òOèÜ ^¨‡ù_f•…þç@£Û¡üh}$U÷ÝLš«êPUM ƒÌß­}»“Dd¤ˆT<Ñv £°+®MÓ€pñt˜8)”kfÎäª={Øß¥ ^xV·ÞÊ¥?üÀO ²¹JJwîL“/¿dÞí·3·M¿þšvì`÷wß±tÿ~R[¶ä¤:u¨Z·.¯…&é=ÍàÙÀ^UMȶºQhñQåîþ ”>öl‘T(™¥vC™$ˆ;Éå %ö'ÂÁÒ49 x@UCrýË¥Ì%€[;€#Uu¤ú3ŒX"V”ñ«ÀÍP}3l)5ݰa4NI!uÄVŽ]y%Õn¸3+W&a×.R&OfUðùêÕ)ñðôhܘ‡qxåJ¶ ÎüôA2§óå0ål`ª¶ÈÙ]… äœeó%ñÈ–Tà¿8÷¤¯Tuud$<ÿ"q?pn{ŒªFÁ‡Ú0 ±¢Œ»@ ðÆÔ§¡c> NpX ñH. üSUжDFÁBDhÔªãüë«ãFÎ[qK2WU“2i*O‘ÚÀÃ@ àïªúU4å1ŒüL¬(ãâÀï@9èõŒ›m™Žçµz0èV¿ÓLUEUÃÈ#D¤ ðP ¸WUвH†‘\ªzPD&×Á”æÀ”hËt¨}N:URa[üV6Äï¥à»*0« ¤Ä5½x—<#9œ2…˜RÆ"2è ESá¥à–5Ñ“fv9¸à>HN–à‚-˜‹‡a¤CDjâ,¯ÏTÕÏÃÔîõ¸Øß>IÉCÐc-ôÜ ï‚¢9ø<(ðUEø¨|Zõ'¶wªê¸pÈlNbQWæu ~/Œ.Þž÷’l-͆À¶“€}@GU—÷rFÁADÎÀ…ê,‡³¼ž•Ëvâ€pSá@±4豞þÅ€O”Õñpß©ðy=8°½yËÛ0B%æ”1ùAÏ q+ü÷)8#§‘öƒ`EsÜ:sUŸwýFÁFDÎŹCm†ªêÊ\[ø.Ö7Ðj+¼=ΈÀšôÂÒ0 ,¬âLzªêïáïˈebRˆÈÀD $l‡—_†¾#ßó¼¸òØØÐ¸_UŸŠ|¿†[ø 'W㦯ÀËÙ&"̓ªº,ƒkª³Ÿ´¢ïÿà­ÅP,‚t©ýšÁü•@[ŸÄÆ0B"f•1€ˆôÞŠCуðoÃèÙ‘ëqt=¸çH)ïŒPÕ»#ןaÄ>~Êy0¼,.VÕÅAõJâb ´¢iðìL¸s}ÞIúT]x -¤ n„|¡Ï mÙÓÊ@DÎ>Á…̃G>†kØ5inÜ~ü|žOØþ'p³ª¾¾> £pã­¢ïåHîgŠרêB)‚›šîæj?>†FÁxóÁSà±@Lw}îgÃÈ–˜WÆ"R ø8ÇIƒ3§Â ã¡ã®Ü·¼&nê S»Â¡xpÐ]U矘Ԇa#"e¸©ë–@Ü”p/à"àqWsàBx3ŠQî®i‚ƒÜ¦ª¯DO£ P(”1€ˆnÄ×Ç)åj+¡ù|è3z…0ZžR^m?µ€ §ÃáâþÄ>àEà) `áÇg°j\œÔjâ¢g%¥à¼_á‡(Ç8$Ðî/0·6°h ª'ðÒo 2àוnÇH—=~7”Ù ;¡Ü.(Ÿ{ËÀîò°§$W€”Jéš<¼<®ª[óâ ÃpˆH\4¬6Pò ¬ø(<®K'ÊòRЬ'¤Ååum‰ŒüM¡SÆü”×¥@WàbŽSÌY’|³ÖþBU·„_BÃ0²Ã»1.ŠÂ 90:%aéÓþÝ—[útU]•ÝFá¥Ð*ã`¼ñG_ª•J@>{‹/‹U5¼}FáFDÞn€ ɰö}HÈGî~ƒ×ÁÞ’À˪zG´%2ò/¦Œ Ã(ˆHQ` PÎ7óa„»ÞgÁ¸VÀ& ¶Ú®‘ ±”BÑ0ŒÂEÀ§`ì· 8œÿJï@Îæš¸¸Û†‘!¦Œ Ã(¨xŸâê;¡Ó¢ž·<£ÒuTJòòvÄC0bSƆaT:»Ž«ÈF)vëFå—^âÌôÇﺋzƒS/»ëO¬´ 9'2ÁˆL†QP©í>e;*ž6?®½–æ>ÊicçGâ#páüùDxT]7w f¤„Qð1elFCDJãÒ,µ÷ÍÚíŽü9dæÜæÍ)GÚ›oÒå½÷˜9u*Û/¸€ò½{S-P?.Κë×§ø5×Pµ];Ê·×µ+ºt¡BvýºR+0M]Ý'¿0Œã0elFA¤ÆÑÍ{a„:f ë~ü‘¥cÇrñë¯ÓúÐ!Ývs´;ùsôhºõíK mìXÚß|3­7l`ßyçQ}ôhþÜÖ[oqùé§“J¿Pw´8Î]Ò0ŽÃ”±a‘*G7ì%Ä)ãÞ½ù¡rezõ¢Ý€|uø0‡´yóØýÐC|õ \>lºvåÌž=ù,5•Ã?΢F¨Ýº5e´þý©Oñ_dehýÖß$wÕH>£àbÊØ0Œ‚HPü÷Mq„èj´{7¾ÿž%+V°nÆ þ>7b+~ú‰?L·áÃùbÑ"v‡×¯'å§ŸX~ß}4ß|3;ù†©© ­ßÍÅʊŨ62Ä”±a‘MG7)CÎ «4ý±Ò¥‘Æ©µoû›5£rð¹Q£˜{Á4oØø–-9õé§™z_«ÊxAÓpQü ã8L†Qàð™Ñö¹½59RÆ"¨ÈñÊxüxÎOJbo×®¼Þ£íúö¥fà܇²1)‰=_|ÁU+V°fÞ9o‘¡A}M‘ÛƒäüID*ˆÈÉ"2Ũ¼+" E¤wP{׉Èr_7gÔ§a9ÆÏˆm® C›ÑÓ9-m ‚|¼™Û7b…"p$ÎkOà=œ2îP‚žFÀ]ÀõÀ)@uà6n&pg ¢ˆ´Äe'™•¾39 x—J¬Ð¨TåÀÙ@; !PxÖŸ[ +ïŽ^®…¾^Ó søcÍpSà/øþëŸÃUµ&ðð©ˆTÎàÙ¬zùí3€“ý3¢¨ª;x ‰?> XÜèëÖ‘ËgÍý½‘ÚôiFPÕIÀd·÷ú%°G¿bÍÅôö–¢0¶‹ó3U¡G`Ä‘ñÕÀrU]¥ªk€ùÀ5é꾬ªëUuð …?>8SDNõû7ï¨ê ú»ø·ª.UÕTœò-t~0 §¼ªc8’³Ôm½$ôÞSÕ´ ë‘:ÀyÀ-ªº[U«êLº?nÝf½ˆÔÖ+qÓò陜""UpSÏÿêù—¿Áú¿§4à ªþ™Î§p¸ªPÕyÀrŽ}y0 #÷ Ò ©"ô?ð¯çB÷éû€ƒÀ=‘½}#¬’Eä~¿¿7UýFPÝ߃¶÷ã×hýºÍ{ÀM"2 ¸h•IÕ¹UM‘½"R ¨ˆ§]3ODDUW‰È §ˆŒz­3裰SU3²¬¬ƒ{‰ž2JŽ{qPÕý~ê»3p>ð$n$ÞÁïÌä3")ÝËÉ‘çgƉ¡ª‹EämàøìRøû&xlqô$ú[+øá|¿ó’ª®Žž,FA¡˜ˆ4À)µ§pS®àü÷†ˆHCU]B;£ÿk€yªº*“z›pkªˆH ,Qê;q#ÈÌ\ÞÁM•ï–f"Û: ¢ˆ$ú(=Álæªêu!ܸÑoœŸœ \‰{ÙÈÌÀM1ÿmÃÈkîΚÀÓ Ás0`}Þ‹ñj=Õ×ïÌÁ-]F¶Á€'©êCÁø§ø²EUÿ,ž^Ë¢ê{@/ië ÀÇMxxAD‹H¼ˆœæý|„[wŠSÌɲ˜¼."ÕE$ADkâ$Â@IDAT7o]E¤¯ˆ”‘*"rµˆÔȨ-œ2î,ôSÐßãž×rUÝ‘É5«Eät)ŸÅ³0 #Løå³K€Íp¨Ü~+|Q‘¹;e\Þ¯w ‚ÃqÀoÀªº?òwoÄEpS·ùèþ 8ÉoÏ‚•Ïœò f,nÊ÷ÓÌ:SÕ]þ˜†Sú)¾Ê#8%û&ð‹—¡\Ðõ{çíÀ iÜHù¿Aû½q¡ò&{Ù»ùëÃM3w?]që:1˜Š[¸P}ű/)pL€;ò8ÿé¿dp`¿Ã0„ªn.’a_"ôxhBžXNßÙú …ýå€$àUÝ–'7nÄa‹Àå݇V«êßÃÒ aF.‘spF¦U… ¾€O¿€ÒiÙ\š vƒ+¯„©—ø›îª:'ü}±Ì +c9xgÜÔ"‹é[Ã0Œµá€ sç‹ÈÛ"2TDÖúó]²j/ˆpÁ:©j €ªTÕýȳ2.3ÔÍÁƪú³ª>‘‰¬oˆÈÿ‰Kõ¸Q\êÇD®–ˆÌô÷³TD>‘""ò€ˆ¬‘ "òŽˆ”óõ§â¢¼%"Óý±¯DäÌLúîàÓ,n‘ÞåË0 Ã0²%[eŒ‹õ|™ªVÃ%gx$H!%â21íÀ¥<ü.—o(#îÀdU=”Éù³Cd:#NîÃ)ú“8œk¸”Šm|¿piûãÂ[^œ†‹öõ’¯!.JÖu¸HZø:¥Ówêã{ õ©>÷±· Ã0 #K²UÆ>ý`EéSb¶AU~SÕ×U5UU?Â)«Prõ–åØLPß®9_Ô~UU×ú,I×xC,p÷{Ÿªîò>Ñ}€ç}ýd\~ãkE¤˜¿^™¤ƒ fnº}“O͸ —ž1«MÃ0 Ã8J¶#Xygqø°§ ÊUI¯PCM¸ 7 œÕù"R\U3‹ÁVŽëqF_9ûÒ&©åëתàÖ¬C¥.óUpjÆÝ› Ò0 Ã02$Keì§›oNöÙ‘‹ÃÔ÷×Àó"RNU“2èw6°—ôáíô糘ޮ´]—«øÜH;ý({ÎX,}ýœ†³Û¤©j¿^g†aYOS{…—\%"%Eäzàœ0õ=X|+"çŠH i'"ãpÖÓ)À`¤ˆÜ""õEäT¹çf”7‰Ho¸õ$0VU3 ÿð7Ÿ²±2ð 0FUgR?3þ\!"×ùÔŒUE䩚Ãv Ã0ŒBH(\½q†Ns€ÀpŽNínÇ¥ fGS"¦gÎo/ è»àüŠŸfÏ?ã®ãý‘{áR N>Æå3~. y_þéåýø›?ž>Í"ªúï{ .ã `pP•Yéîeîå` °Ú·³ç+Ý—šñ{œ˜MS†aÙ’/"p… ïŽ4Ê’†aF ”‘±a†aäÿ?D{™dy IEND®B`‚vips-7.38.5/doc/reference/html/ch01.html0000644000175000017500000000622112303146332014606 00000000000000 Core VIPS API

Core VIPS API

VipsImage — the VIPS image class
VipsRegion — small, rectangular parts of images
generate — calculate pixels and pixel buffers
header — get, set and walk image headers
VipsOperation — the VIPS operation base object class
rect — the VIPS rectangle class
VipsThreadState — pools of worker threads
VipsArgument — the VIPS base object class
memory — memory utilities
error — error messages and error handling
buf — a string you can append to
vips-7.38.5/doc/reference/libvips-docs.sgml0000644000175000017500000000444312303144753015514 00000000000000 ]> VIPS Reference Manual For VIPS 7.38.5. The latest version of this documentation can be found on the VIPS website. Core VIPS API VIPS operation API by section Other API (no gtkdoc comments yet) Object Hierarchy API Index vips-7.38.5/doc/reference/tmpl/0000755000175000017500000000000012303146331013253 500000000000000vips-7.38.5/doc/reference/tmpl/vips.sgml0000644000175000017500000000214112303146331015036 00000000000000 vips @ARGV0: @void: @Returns: @void: @void: @void: @void: @Returns: @void: @Returns: @flag: @Returns: @argv0: @env_name: @Returns: @argv0: @env_name: @Returns: vips-7.38.5/doc/reference/tmpl/semaphore.sgml0000644000175000017500000000160512303146331016044 00000000000000 semaphore @name: @v: @mutex: @cond: @s: @Returns: @s: @Returns: @s: @n: @Returns: @s: @n: @Returns: @s: @s: @v: @name: vips-7.38.5/doc/reference/tmpl/arithmetic.sgml0000644000175000017500000002671212303146331016220 00000000000000 arithmetic @VIPS_OPERATION_MATH_SIN: @VIPS_OPERATION_MATH_COS: @VIPS_OPERATION_MATH_TAN: @VIPS_OPERATION_MATH_ASIN: @VIPS_OPERATION_MATH_ACOS: @VIPS_OPERATION_MATH_ATAN: @VIPS_OPERATION_MATH_LOG: @VIPS_OPERATION_MATH_LOG10: @VIPS_OPERATION_MATH_EXP: @VIPS_OPERATION_MATH_EXP10: @VIPS_OPERATION_MATH_LAST: @VIPS_OPERATION_MATH2_POW: @VIPS_OPERATION_MATH2_WOP: @VIPS_OPERATION_MATH2_LAST: @VIPS_OPERATION_ROUND_RINT: @VIPS_OPERATION_ROUND_CEIL: @VIPS_OPERATION_ROUND_FLOOR: @VIPS_OPERATION_ROUND_LAST: @VIPS_OPERATION_RELATIONAL_EQUAL: @VIPS_OPERATION_RELATIONAL_NOTEQUAL: @VIPS_OPERATION_RELATIONAL_LESS: @VIPS_OPERATION_RELATIONAL_LESSEQ: @VIPS_OPERATION_RELATIONAL_MORE: @VIPS_OPERATION_RELATIONAL_MOREEQ: @VIPS_OPERATION_RELATIONAL_LAST: @VIPS_OPERATION_BOOLEAN_AND: @VIPS_OPERATION_BOOLEAN_OR: @VIPS_OPERATION_BOOLEAN_EOR: @VIPS_OPERATION_BOOLEAN_LSHIFT: @VIPS_OPERATION_BOOLEAN_RSHIFT: @VIPS_OPERATION_BOOLEAN_LAST: @VIPS_OPERATION_COMPLEX_POLAR: @VIPS_OPERATION_COMPLEX_RECT: @VIPS_OPERATION_COMPLEX_CONJ: @VIPS_OPERATION_COMPLEX_LAST: @VIPS_OPERATION_COMPLEX2_CROSS_PHASE: @VIPS_OPERATION_COMPLEX2_LAST: @VIPS_OPERATION_COMPLEXGET_REAL: @VIPS_OPERATION_COMPLEXGET_IMAG: @VIPS_OPERATION_COMPLEXGET_LAST: @left: @right: @out: @...: @Returns: @in1: @in2: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @in: @out: @a: @b: @n: @...: @Returns: @in: @out: @a: @b: @...: @Returns: @left: @right: @out: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @round: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @math: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @cmplx: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @left: @right: @out: @cmplx: @...: @Returns: @left: @right: @out: @...: @Returns: @in: @out: @get: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @relational: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @in: @out: @relational: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @relational: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @left: @right: @out: @boolean: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @in: @out: @boolean: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @left: @right: @out: @math2: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @in: @out: @math2: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @c: @n: @...: @Returns: @in: @out: @math2: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @c: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @h: @v: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @index: @out: @...: @Returns: @in: @columns: @rows: @...: @Returns: @in: @columns: @rows: @...: @Returns: vips-7.38.5/doc/reference/tmpl/freqfilt.sgml0000644000175000017500000000141312303146331015672 00000000000000 freqfilt @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @mask: @out: @...: @Returns: @in: @out: @...: @Returns: @in1: @in2: @out: @...: @Returns: vips-7.38.5/doc/reference/tmpl/memory.sgml0000644000175000017500000000311312303146331015365 00000000000000 memory @F: @S: @S: @S: @V: @OBJ: @T: @OBJ: @N: @T: @object: @size: @Returns: @object: @str: @Returns: @buf: @Returns: @s: @size: @Returns: @void: @Returns: @void: @Returns: @void: @Returns: @pathname: @flags: @...: @Returns: @fd: @Returns: @void: @Returns: vips-7.38.5/doc/reference/tmpl/inplace.sgml0000644000175000017500000000356612303146331015504 00000000000000 inplace @image: @left: @top: @width: @height: @fill: @ink: @Returns: @image: @x: @y: @radius: @fill: @ink: @Returns: @image: @sub: @x: @y: @Returns: @image: @x: @y: @a: @b: @c: @Returns: @image: @x1: @y1: @x2: @y2: @plot: @a: @b: @c: @Returns: @image: @x1: @y1: @x2: @y2: @ink: @Returns: @in: @out: @mask: @ink: @n: @x1v: @y1v: @x2v: @y2v: @Returns: @image: @x: @y: @ink: @dout: @Returns: @image: @x: @y: @ink: @dout: @Returns: @image: @test: @x: @y: @serial: @dout: @Returns: @image: @mask_im: @x: @y: @ink: @Returns: @image: @x: @y: @ink: @Returns: @image: @x: @y: @ink: @Returns: @image: @left: @top: @width: @height: @Returns: vips-7.38.5/doc/reference/tmpl/pconvolution.sgml0000644000175000017500000000117412303146331016621 00000000000000 VipsConvolution @parent_class: vips-7.38.5/doc/reference/tmpl/libvips-unused.sgml0000644000175000017500000000000012303146331017016 00000000000000vips-7.38.5/doc/reference/tmpl/hist_unary.sgml0000644000175000017500000000076712303146331016256 00000000000000 VipsHistUnary @parent_class: vips-7.38.5/doc/reference/tmpl/webp.sgml0000644000175000017500000000201112303146331015006 00000000000000 webp @filename: @Returns: @name: @out: @Returns: @name: @out: @Returns: @buf: @len: @out: @Returns: @buf: @len: @out: @Returns: @out: @filename: @Q: @lossless: @Returns: @out: @buf: @len: @Q: @lossless: @Returns: vips-7.38.5/doc/reference/tmpl/debug.sgml0000644000175000017500000000110712303146331015144 00000000000000 debug @...: @...: @...: @...: vips-7.38.5/doc/reference/tmpl/morphology.sgml0000644000175000017500000000177112303146331016264 00000000000000 morphology @VIPS_OPERATION_MORPHOLOGY_ERODE: @VIPS_OPERATION_MORPHOLOGY_DILATE: @VIPS_OPERATION_MORPHOLOGY_LAST: @in: @out: @mask: @morph: @...: @Returns: @in: @out: @width: @height: @index: @...: @Returns: @in: @nolines: @direction: @...: @Returns: @in: @out: @size: @...: @Returns: @test: @mask: @segments: @Returns: vips-7.38.5/doc/reference/tmpl/object.sgml0000644000175000017500000002234212303146331015330 00000000000000 VipsArgument @X: @VIPS_ARGUMENT_NONE: @VIPS_ARGUMENT_REQUIRED: @VIPS_ARGUMENT_CONSTRUCT: @VIPS_ARGUMENT_SET_ONCE: @VIPS_ARGUMENT_SET_ALWAYS: @VIPS_ARGUMENT_INPUT: @VIPS_ARGUMENT_OUTPUT: @VIPS_ARGUMENT_DEPRECATED: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @VALUE: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @MIN: @MAX: @VALUE: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @TYPE: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @MIN: @MAX: @VALUE: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @MIN: @MAX: @VALUE: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @TYPE: @VALUE: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @TYPE: @VALUE: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @VALUE: @CLASS: @NAME: @PRIORITY: @LONG: @DESC: @FLAGS: @OFFSET: @pspec: @parent: @object_class: @flags: @priority: @offset: @parent: @argument_class: @object: @assigned: @close_id: @Param1: @Param2: @Returns: @Param1: @Param2: @Returns: @object: @pspec: @member: @argument: @Param1: @Param2: @Param3: @Param4: @a: @b: @Returns: @object: @fn: @a: @b: @Returns: @Param1: @Param2: @Param3: @a: @b: @Returns: @object_class: @fn: @a: @b: @Returns: @object: @name: @pspec: @argument_class: @argument_instance: @Returns: @object: @name: @Returns: @object: @name: @Returns: @object: @name: @Returns: @OBJECT: @PSPEC: @ARG_CLASS: @ARG_INSTANCE: @PSPEC: @ARG_CLASS: @AP: @PSPEC: @ARG_CLASS: @AP: @vipsobject: the object which received the signal. @vipsobject: the object which received the signal. @vipsobject: the object which received the signal. @parent_class: @build: @summary_class: @summary: @dump: @sanity: @rewind: @preclose: @close: @postclose: @new_from_string: @to_string: @output_needs_arg: @output_to_arg: @nickname: @description: @argument_table: @argument_table_traverse: @argument_table_traverse_gtype: @psoec: @value: @Returns: @gobject: @property_id: @value: @pspec: @gobject: @property_id: @value: @pspec: @object: @object: @Returns: @klass: @buf: @object: @buf: @object: @buf: @klass: @object: @object: @object: @object: @Returns: @Param1: @pspec: @flags: @priority: @offset: @object: @name: @value: @Returns: @object: @name: @Returns: @object: @name: @arg: @Returns: @object: @value: @Returns: @Param1: @Param2: @Param3: @Returns: @type: @set: @a: @b: @Returns: @object: @ap: @Returns: @object: @...: @Returns: @object_class: @p: @Returns: @object: @buf: @fn: @a: @b: @Returns: @Param1: @Param2: @Returns: @Param1: @Param2: @Param3: @Returns: @Param1: @Param2: @Returns: @base: @fn: @a: @b: @Returns: @base: @fn: @a: @Returns: @type: @Returns: @basename: @nickname: @Returns: @base: @fn: @a: @Returns: @basename: @nickname: @Returns: @parent: @n: @Returns: @vobject: @gobject: @V: @G: @object: @static_object: @void: @void: @object: @object: vips-7.38.5/doc/reference/tmpl/transform.sgml0000644000175000017500000000271712303146331016101 00000000000000 transform @iarea: @oarea: @a: @b: @c: @d: @idx: @idy: @odx: @ody: @ia: @ib: @ic: @id: @trn: @trn: @Returns: @trn: @Returns: @in1: @in2: @out: @Returns: @trn: @trn: @x: @y: @ox: @oy: @trn: @x: @y: @ox: @oy: @trn: @in: @out: @trn: @in: @out: @Param1: @in: @out: @trn: @Returns: vips-7.38.5/doc/reference/tmpl/foreign.sgml0000644000175000017500000001663712303146331015525 00000000000000 VipsForeign @parent_class: @priority: @suffs: @base: @fn: @a: @b: @Returns: @VIPS_FOREIGN_NONE: @VIPS_FOREIGN_PARTIAL: @VIPS_FOREIGN_BIGENDIAN: @VIPS_FOREIGN_SEQUENTIAL: @VIPS_FOREIGN_ALL: @out: @real: @nocache: @parent_class: @is_a: @get_flags_filename: @get_flags: @header: @load: @filename: @Returns: @filename: @Returns: @loader: @filename: @Returns: @loader: @filename: @Returns: @VIPS_SAVEABLE_MONO: @VIPS_SAVEABLE_RGB: @VIPS_SAVEABLE_RGBA: @VIPS_SAVEABLE_RGB_CMYK: @VIPS_SAVEABLE_ANY: @VIPS_SAVEABLE_LAST: @in: @ready: @parent_class: @saveable: @format_table: @coding: @filename: @Returns: @filename: @Returns: @filename: @out: @...: @Returns: @in: @filename: @...: @Returns: @filename: @out: @...: @Returns: @in: @filename: @...: @Returns: @filename: @out: @...: @Returns: @filename: @out: @...: @Returns: @buf: @len: @out: @...: @Returns: @in: @filename: @...: @Returns: @in: @buf: @len: @...: @Returns: @in: @...: @Returns: @filename: @out: @...: @Returns: @buf: @len: @out: @...: @Returns: @in: @filename: @...: @Returns: @in: @buf: @len: @...: @Returns: @in: @...: @Returns: @VIPS_FOREIGN_TIFF_COMPRESSION_NONE: @VIPS_FOREIGN_TIFF_COMPRESSION_JPEG: @VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE: @VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS: @VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4: @VIPS_FOREIGN_TIFF_COMPRESSION_LZW: @VIPS_FOREIGN_TIFF_COMPRESSION_LAST: @VIPS_FOREIGN_TIFF_PREDICTOR_NONE: @VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL: @VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT: @VIPS_FOREIGN_TIFF_PREDICTOR_LAST: @VIPS_FOREIGN_TIFF_RESUNIT_CM: @VIPS_FOREIGN_TIFF_RESUNIT_INCH: @VIPS_FOREIGN_TIFF_RESUNIT_LAST: @filename: @out: @...: @Returns: @in: @filename: @...: @Returns: @filename: @out: @...: @Returns: @filename: @out: @...: @Returns: @in: @filename: @...: @Returns: @filename: @out: @...: @Returns: @filename: @out: @width: @height: @bands: @...: @Returns: @in: @filename: @...: @Returns: @in: @fd: @...: @Returns: @filename: @out: @...: @Returns: @in: @filename: @...: @Returns: @filename: @out: @...: @Returns: @in: @filename: @...: @Returns: @in: @...: @Returns: @filename: @out: @...: @Returns: @filename: @out: @...: @Returns: @buf: @len: @out: @...: @Returns: @in: @filename: @...: @Returns: @in: @buf: @len: @...: @Returns: @filename: @out: @...: @Returns: @in: @filename: @...: @Returns: @filename: @out: @...: @Returns: @filename: @out: @...: @Returns: @in: @filename: @...: @Returns: @VIPS_FOREIGN_DZ_LAYOUT_DZ: @VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY: @VIPS_FOREIGN_DZ_LAYOUT_GOOGLE: @VIPS_FOREIGN_DZ_LAYOUT_LAST: @VIPS_FOREIGN_DZ_DEPTH_1PIXEL: @VIPS_FOREIGN_DZ_DEPTH_1TILE: @VIPS_FOREIGN_DZ_DEPTH_1: @VIPS_FOREIGN_DZ_DEPTH_LAST: @in: @basename: @...: @Returns: vips-7.38.5/doc/reference/tmpl/error.sgml0000644000175000017500000001120012303146331015202 00000000000000 error @void: @Returns: @void: @void: @void: @domain: @fmt: @...: @domain: @fmt: @ap: @err: @domain: @fmt: @...: @err: @domain: @fmt: @ap: @error: @domain: @fmt: @...: @domain: @fmt: @ap: @domain: @fmt: @...: @domain: @fmt: @ap: @fmt: @...: @domain: @im: @Returns: @domain: @im: @coding: @Returns: @domain: @im: @Returns: @domain: @im: @Returns: @domain: @im1: @im2: @Returns: @domain: @im: @Returns: @domain: @im: @bands: @Returns: @domain: @in: @Returns: @domain: @im: @bands: @Returns: @domain: @im1: @im2: @Returns: @domain: @im: @n: @Returns: @domain: @im1: @im2: @Returns: @domain: @im: @bandno: @Returns: @domain: @im: @Returns: @domain: @im: @Returns: @domain: @im: @Returns: @domain: @im: @Returns: @domain: @im: @Returns: @domain: @im: @fmt: @Returns: @domain: @im: @Returns: @domain: @im: @Returns: @domain: @im: @Returns: @domain: @im1: @im2: @Returns: @domain: @im1: @im2: @Returns: @domain: @im: @Returns: @domain: @n: @len: @Returns: @domain: @n: @im: @Returns: @domain: @im: @Returns: @domain: @im: @out: @Returns: @domain: @im: @Returns: @domain: @mask: @Returns: @domain: @mask: @Returns: @domain: @mask: @Returns: vips-7.38.5/doc/reference/tmpl/phistogram.sgml0000644000175000017500000000122312303146331016232 00000000000000 VipsHistogram @histogram: @out: @in: @width: @parent_class: @format_table: @input_format: @process: vips-7.38.5/doc/reference/tmpl/mosaicing.sgml0000644000175000017500000000514212303146331016032 00000000000000 mosaicing @ref: @sec: @out: @xr1: @yr1: @xs1: @ys1: @xr2: @yr2: @xs2: @ys2: @Returns: @ref: @sec: @out: @xr1: @yr1: @xs1: @ys1: @xr2: @yr2: @xs2: @ys2: @hwindowsize: @hsearchsize: @Returns: @ref: @sec: @out: @dx: @dy: @mwidth: @Returns: @ref: @sec: @out: @dx: @dy: @mwidth: @Returns: @ref: @sec: @out: @xr1: @yr1: @xs1: @ys1: @xr2: @yr2: @xs2: @ys2: @mwidth: @Returns: @ref: @sec: @out: @xr1: @yr1: @xs1: @ys1: @xr2: @yr2: @xs2: @ys2: @mwidth: @Returns: @ref: @sec: @out: @bandno: @xref: @yref: @xsec: @ysec: @hwindowsize: @hsearchsize: @balancetype: @mwidth: @Returns: @ref: @sec: @out: @bandno: @xref: @yref: @xsec: @ysec: @hwindowsize: @hsearchsize: @balancetype: @mwidth: @Returns: @ref: @sec: @out: @bandno: @xr1: @yr1: @xs1: @ys1: @xr2: @yr2: @xs2: @ys2: @hwindowsize: @hsearchsize: @balancetype: @mwidth: @Returns: @ref: @sec: @out: @bandno: @xr1: @yr1: @xs1: @ys1: @xr2: @yr2: @xs2: @ys2: @hwindowsize: @hsearchsize: @balancetype: @mwidth: @Returns: @in: @out: @gamma: @Returns: @in: @out: @gamma: @Returns: @ref: @sec: @xref: @yref: @xsec: @ysec: @hwindowsize: @hsearchsize: @correlation: @x: @y: @Returns: @in: @out: @old_str: @new_str: @Returns: @in: @out: @Returns: @in: @x: @y: @Returns: vips-7.38.5/doc/reference/tmpl/vector.sgml0000644000175000017500000000470012303146331015362 00000000000000 vector @name: @n_temp: @n_scanline: @n_source: @n_destination: @n_constant: @n_parameter: @n_instruction: @sl: @line: @s: @d1: @program: @compiled: @executor: @vector: @void: @void: @Returns: @enabled: @vector: @name: @dsize: @Returns: @vector: @name: @value: @size: @vector: @name: @size: @Returns: @vector: @name: @line: @size: @vector: @name: @size: @vector: @op: @a: @b: @vector: @op: @a: @b: @c: @vector: @Returns: @vector: @Returns: @vector: @executor: @vector: @n: @executor: @ir: @x: @y: @executor: @value: @executor: @var: @value: @executor: vips-7.38.5/doc/reference/tmpl/generate.sgml0000644000175000017500000000442212303146331015653 00000000000000 generate @region: @area: @a: @Returns: @im: @write_fn: @a: @Returns: @out: @a: @b: @Returns: @out: @seq: @a: @b: @stop: @Returns: @seq: @a: @b: @Returns: @im: @start_fn: @generate_fn: @stop_fn: @a: @b: @Returns: @im: @tile_width: @tile_height: @start_fn: @generate_fn: @stop_fn: @a: @b: @Returns: @im: @rect: @a: @in: @out: @mask: @tile_width: @tile_height: @max_tiles: @priority: @notify: @a: @Returns: @im: @Returns: @image: @Returns: @out: @a: @b: @Returns: @seq: @a: @b: @Returns: @out: @a: @b: @Returns: @seq: @a: @b: @Returns: @out: @...: @Returns: @im: @start_fn: @generate_fn: @stop_fn: @a: @b: @Returns: @image: @hint: @in: @Returns: @image: @hint: @...: @Returns: vips-7.38.5/doc/reference/tmpl/pmask.sgml0000644000175000017500000000266212303146331015200 00000000000000 VipsMask @parent_class: @point: vips-7.38.5/doc/reference/tmpl/resample.sgml0000644000175000017500000000132412303146331015667 00000000000000 resample @in: @out: @xshrink: @yshrink: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @a: @b: @c: @d: @...: @Returns: @in: @out: @coeff: @...: @Returns: vips-7.38.5/doc/reference/tmpl/create.sgml0000644000175000017500000000705212303146331015326 00000000000000 create @out: @width: @height: @...: @Returns: @out: @width: @height: @...: @Returns: @out: @width: @height: @...: @Returns: @out: @sigma: @min_ampl: @...: @Returns: @out: @sigma: @min_ampl: @...: @Returns: @out: @text: @...: @Returns: @out: @width: @height: @...: @Returns: @out: @width: @height: @...: @Returns: @out: @width: @height: @...: @Returns: @out: @width: @height: @...: @Returns: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @out: @...: @Returns: @out: @width: @height: @frequency_cutoff: @...: @Returns: @out: @width: @height: @frequency_cutoff: @ringwidth: @...: @Returns: @out: @width: @height: @frequency_cutoff_x: @frequency_cutoff_y: @r: @...: @Returns: @out: @width: @height: @order: @frequency_cutoff: @amplitude_cutoff: @...: @Returns: @out: @width: @height: @order: @frequency_cutoff: @amplitude_cutoff: @ringwidth: @...: @Returns: @out: @width: @height: @order: @frequency_cutoff_x: @frequency_cutoff_y: @r: @amplitude_cutoff: @...: @Returns: @out: @width: @height: @frequency_cutoff: @amplitude_cutoff: @...: @Returns: @out: @width: @height: @frequency_cutoff: @amplitude_cutoff: @ringwidth: @...: @Returns: @out: @width: @height: @frequency_cutoff_x: @frequency_cutoff_y: @r: @amplitude_cutoff: @...: @Returns: @out: @width: @height: @fractal_dimension: @...: @Returns: @out: @width: @height: @fractal_dimension: @...: @Returns: @in: @out: @n: @Returns: @in: @out: @Returns: vips-7.38.5/doc/reference/tmpl/pmorphology.sgml0000644000175000017500000000077312303146331016445 00000000000000 VipsMorphology @parent_class: vips-7.38.5/doc/reference/tmpl/type.sgml0000644000175000017500000000710212303146331015040 00000000000000 type @i: @Returns: @thing: @Returns: @area: @Returns: @area: @void: @free_fn: @data: @Returns: @free_fn: @data: @length: @Returns: @type: @sizeof_type: @n: @Returns: @n: @Returns: @area: @length: @n: @type: @sizeof_type: @Returns: @array: @n: @Returns: @n: @...: @Returns: @array: @n: @Returns: @n: @...: @Returns: @value: @free_fn: @data: @value: @length: @Returns: @value: @Returns: @value: @str: @value: @fmt: @...: @value: @length: @Returns: @value: @str: @Returns: @value: @length: @Returns: @value: @free_fn: @data: @length: @value: @n: @type: @sizeof_type: @value: @n: @type: @sizeof_type: @Returns: @value: @n: @Returns: @value: @array: @n: @Returns: @value: @n: @Returns: @value: @array: @n: @Returns: @value: @n: @Returns: @value: @n: @Returns: @void: vips-7.38.5/doc/reference/tmpl/interpolate.sgml0000644000175000017500000000315212303146331016406 00000000000000 VipsInterpolate @interpolate: @out: @in: @x: @y: @parent_class: @interpolate: @get_window_size: @window_size: @get_window_offset: @window_offset: @interpolate: @out: @in: @x: @y: @interpolate: @Returns: @interpolate: @Returns: @interpolate: @Returns: @void: @Returns: @void: @Returns: @nickname: @Returns: vips-7.38.5/doc/reference/tmpl/rect.sgml0000644000175000017500000000264112303146331015017 00000000000000 rect @left: @top: @width: @height: @R: @R: @R: @R: @r: @Returns: @r: @x: @y: @Returns: @r1: @r2: @Returns: @r1: @r2: @Returns: @r: @n: @r1: @r2: @out: @r1: @r2: @out: @r: @Returns: @r: vips-7.38.5/doc/reference/tmpl/histogram.sgml0000644000175000017500000000245412303146331016061 00000000000000 histogram @in: @out: @lut: @...: @Returns: @in: @percent: @threshold: @...: @Returns: @in: @out: @width: @height: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @ref: @out: @...: @Returns: @in: @out: @width: @height: @...: @Returns: @in: @monotonic: @...: @Returns: vips-7.38.5/doc/reference/tmpl/image.sgml0000644000175000017500000001743512303146331015153 00000000000000 VipsImage @VIPS_DEMAND_STYLE_ERROR: @VIPS_DEMAND_STYLE_SMALLTILE: @VIPS_DEMAND_STYLE_FATSTRIP: @VIPS_DEMAND_STYLE_THINSTRIP: @VIPS_DEMAND_STYLE_ANY: @VIPS_IMAGE_ERROR: @VIPS_IMAGE_NONE: @VIPS_IMAGE_SETBUF: @VIPS_IMAGE_SETBUF_FOREIGN: @VIPS_IMAGE_OPENIN: @VIPS_IMAGE_MMAPIN: @VIPS_IMAGE_MMAPINRW: @VIPS_IMAGE_OPENOUT: @VIPS_IMAGE_PARTIAL: @VIPS_INTERPRETATION_ERROR: @VIPS_INTERPRETATION_MULTIBAND: @VIPS_INTERPRETATION_B_W: @VIPS_INTERPRETATION_HISTOGRAM: @VIPS_INTERPRETATION_XYZ: @VIPS_INTERPRETATION_LAB: @VIPS_INTERPRETATION_CMYK: @VIPS_INTERPRETATION_LABQ: @VIPS_INTERPRETATION_RGB: @VIPS_INTERPRETATION_CMC: @VIPS_INTERPRETATION_LCH: @VIPS_INTERPRETATION_LABS: @VIPS_INTERPRETATION_sRGB: @VIPS_INTERPRETATION_YXY: @VIPS_INTERPRETATION_FOURIER: @VIPS_INTERPRETATION_RGB16: @VIPS_INTERPRETATION_GREY16: @VIPS_INTERPRETATION_MATRIX: @VIPS_INTERPRETATION_scRGB: @VIPS_FORMAT_NOTSET: @VIPS_FORMAT_UCHAR: @VIPS_FORMAT_CHAR: @VIPS_FORMAT_USHORT: @VIPS_FORMAT_SHORT: @VIPS_FORMAT_UINT: @VIPS_FORMAT_INT: @VIPS_FORMAT_FLOAT: @VIPS_FORMAT_COMPLEX: @VIPS_FORMAT_DOUBLE: @VIPS_FORMAT_DPCOMPLEX: @VIPS_FORMAT_LAST: @VIPS_CODING_ERROR: @VIPS_CODING_NONE: @VIPS_CODING_LABQ: @VIPS_CODING_RAD: @VIPS_CODING_LAST: @VIPS_ACCESS_RANDOM: @VIPS_ACCESS_SEQUENTIAL: @VIPS_ACCESS_SEQUENTIAL_UNBUFFERED: @VIPS_ACCESS_LAST: @run: @eta: @tpels: @npels: @percent: @start: @vipsimage: the object which received the signal. @arg1: @vipsimage: the object which received the signal. @vipsimage: the object which received the signal. @vipsimage: the object which received the signal. @arg1: @vipsimage: the object which received the signal. @arg1: @vipsimage: the object which received the signal. @arg1: @parent_class: @preeval: @eval: @posteval: @written: @invalidate: @minimise: @I: @I: @I: @I: @I: @I: @X: @Y: @I: @X: @Y: @image: @Returns: @image: @image: @image: @image: @processed: @image: @image: @progress: @image: @Returns: @image: @kill: @void: @Returns: @filename: @mode: @Returns: @void: @Returns: @filename: @Returns: @filename: @xsize: @ysize: @bands: @offset: @Returns: @buffer: @xsize: @ysize: @bands: @bandfmt: @Returns: @width: @height: @Returns: @width: @height: @...: @Returns: @image: @delete_on_close: @format: @Returns: @image: @out: @Returns: @image: @filename: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @ypos: @linebuffer: @Returns: @format: @Returns: @format: @Returns: @format: @Returns: @format: @Returns: @format: @Returns: @cmd_format: @...: @Returns: vips-7.38.5/doc/reference/tmpl/colour.sgml0000644000175000017500000001633612303146331015373 00000000000000 colour @VIPS_INTENT_PERCEPTUAL: @VIPS_INTENT_RELATIVE: @VIPS_INTENT_SATURATION: @VIPS_INTENT_ABSOLUTE: @VIPS_PCS_LAB: @VIPS_PCS_XYZ: @VIPS_PCS_LAST: @image: @Returns: @in: @out: @space: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @void: @Returns: @in: @out: @output_profile: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @profile_filename: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @left: @right: @out: @...: @Returns: @L: @a: @b: @X: @Y: @Z: @X: @Y: @Z: @L: @a: @b: @a: @b: @Returns: @a: @b: @C: @h: @C: @h: @a: @b: @L: @Returns: @C: @Returns: @C: @h: @Returns: @void: @Lcmc: @Returns: @Ccmc: @Returns: @C: @hcmc: @Returns: @r: @g: @b: @R: @G: @B: @Returns: @r: @g: @b: @R: @G: @B: @Returns: @R: @G: @B: @X: @Y: @Z: @Returns: @X: @Y: @Z: @R: @G: @B: @Returns: @R: @G: @B: @r: @g: @b: @or_ret: @Returns: @R: @G: @B: @r: @g: @b: @or_ret: @Returns: @L1: @a1: @b1: @L2: @a2: @b2: @Returns: @L1: @a1: @b1: @L2: @a2: @b2: @Returns: vips-7.38.5/doc/reference/tmpl/util.sgml0000644000175000017500000001467312303146331015047 00000000000000 util @R: @A: @A: @B: @A: @B: @X: @A: @V: @B: @R: @TYPE: @A: @B: @N: @OPER: @R: @V: @SEQ: @V: @SEQ: @V: @SEQ: @V: @SEQ: @V: @SEQ: @V: @SEQ: @enm: @value: @Returns: @enm: @value: @Returns: @domain: @type: @str: @Returns: @l1: @l2: @Returns: @list: @fn: @a: @b: @Returns: @list: @fn: @a: @b: @Returns: @list: @fn: @a: @b: @c: @d: @Returns: @list: @start: @fn: @a: @b: @Returns: @list: @fn: @a: @b: @Returns: @list: @a: @b: @Returns: @hash: @fn: @a: @b: @Returns: @dest: @src: @n: @Returns: @haystack: @needle: @Returns: @a: @b: @Returns: @a: @b: @Returns: @str: @brk: @Returns: @str: @size: @format: @ap: @Returns: @str: @size: @format: @...: @Returns: @path: @name: @mode: @filename: @Returns: @path: @suffix: @path: @suffixes: @Returns: @in: @Returns: @buf: @Returns: @fd: @Returns: @fd: @buf: @count: @Returns: @filename: @fallback_dir: @text_mode: @Returns: @filename: @text_mode: @Returns: @fp: @name: @length_out: @Returns: @name: @fallback_dir: @length_out: @Returns: @data: @size: @nmemb: @stream: @Returns: @filename: @buf: @len: @Returns: @text: @Returns: @list: @list: @Returns: @a: @b: @Returns: @list: @Returns: @fd: @pos: @Returns: @fd: @pos: @Returns: @name: @...: @Returns: @name: @...: @Returns: @fmt: @mode: @...: @Returns: @VIPS_TOKEN_LEFT: @VIPS_TOKEN_RIGHT: @VIPS_TOKEN_STRING: @VIPS_TOKEN_EQUALS: @VIPS_TOKEN_COMMA: @buffer: @token: @string: @size: @Returns: @buffer: @token: @string: @size: @Returns: @buffer: @need_token: @string: @size: @Returns: @p: @Returns: @p: @Returns: @void: @Returns: @format: @Returns: @name: @out: @mx: @new_suff: @olds: @nolds: vips-7.38.5/doc/reference/tmpl/version.sgml0000644000175000017500000000124312303146331015544 00000000000000 version vips-7.38.5/doc/reference/tmpl/vipsjpeg.sgml0000644000175000017500000000201112303146331015700 00000000000000 vipsjpeg @in: @filename: @Q: @profile: @optimize_coding: @progressive: @strip: @no_subsample: @Returns: @in: @obuf: @olen: @Q: @profile: @optimize_coding: @progressive: @strip: @no_subsample: @Returns: @filename: @Returns: @name: @out: @header_only: @shrink: @fail: @readbehind: @Returns: @buf: @len: @out: @header_only: @shrink: @fail: @readbehind: @Returns: vips-7.38.5/doc/reference/tmpl/convolution.sgml0000644000175000017500000000206512303146331016441 00000000000000 convolution @VIPS_PRECISION_INTEGER: @VIPS_PRECISION_FLOAT: @VIPS_PRECISION_APPROXIMATE: @VIPS_PRECISION_LAST: @VIPS_COMBINE_MAX: @VIPS_COMBINE_SUM: @VIPS_COMBINE_LAST: @in: @out: @mask: @...: @Returns: @in: @out: @mask: @...: @Returns: @in: @out: @mask: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @radius: @...: @Returns: vips-7.38.5/doc/reference/tmpl/region.sgml0000644000175000017500000000411412303146331015342 00000000000000 VipsRegion @im: @valid: @parent_class: @image: @Returns: @reg: @r: @Returns: @reg: @r: @Returns: @reg: @dest: @r: @x: @y: @Returns: @reg1: @reg2: @Returns: @reg: @x: @y: @Returns: @reg: @r: @value: @reg: @r: @ink: @reg: @reg: @dest: @r: @x: @y: @reg: @r: @Returns: @reg: @dest: @r: @x: @y: @Returns: @reg: @r: @Returns: @void: @R: @R: @R: @R: @X: @Y: @R: vips-7.38.5/doc/reference/tmpl/buf.sgml0000644000175000017500000000472712303146331014645 00000000000000 buf @TEXT: @buf: @buf: @buf: @buf: @base: @mx: @buf: @mx: @buf: @base: @mx: @buf: @mx: @buf: @str: @sz: @Returns: @buf: @str: @Returns: @buf: @fmt: @...: @Returns: @buf: @fmt: @ap: @Returns: @buf: @ch: @Returns: @buf: @quote: @str: @Returns: @buf: @value: @Returns: @buf: @n: @Returns: @buf: @ch: @Returns: @buf: @o: @n: @Returns: @buf: @Returns: @buf: @Returns: @buf: @Returns: @buf: @Returns: @buf: @g: @Returns: @buf: @d: @Returns: @buf: @Returns: vips-7.38.5/doc/reference/tmpl/conversion.sgml0000644000175000017500000001340612303146331016250 00000000000000 conversion @VIPS_EXTEND_BLACK: @VIPS_EXTEND_COPY: @VIPS_EXTEND_REPEAT: @VIPS_EXTEND_MIRROR: @VIPS_EXTEND_WHITE: @VIPS_EXTEND_BACKGROUND: @VIPS_EXTEND_LAST: @VIPS_DIRECTION_HORIZONTAL: @VIPS_DIRECTION_VERTICAL: @VIPS_DIRECTION_LAST: @VIPS_ALIGN_LOW: @VIPS_ALIGN_CENTRE: @VIPS_ALIGN_HIGH: @VIPS_ALIGN_LAST: @VIPS_ANGLE_0: @VIPS_ANGLE_90: @VIPS_ANGLE_180: @VIPS_ANGLE_270: @VIPS_ANGLE_LAST: @VIPS_ANGLE45_0: @VIPS_ANGLE45_45: @VIPS_ANGLE45_90: @VIPS_ANGLE45_135: @VIPS_ANGLE45_180: @VIPS_ANGLE45_225: @VIPS_ANGLE45_270: @VIPS_ANGLE45_315: @VIPS_ANGLE45_LAST: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @x: @y: @width: @height: @...: @Returns: @in: @out: @direction: @...: @Returns: @main: @sub: @out: @x: @y: @...: @Returns: @main: @sub: @out: @direction: @...: @Returns: @input: @output: @left: @top: @width: @height: @...: @Returns: @input: @output: @left: @top: @width: @height: @...: @Returns: @input: @output: @band: @...: @Returns: @in: @out: @across: @down: @...: @Returns: @in: @out: @tile_height: @across: @down: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @angle: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @xfac: @yfac: @...: @Returns: @in: @out: @xfac: @yfac: @...: @Returns: @in: @out: @format: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @n: @...: @Returns: @in1: @in2: @out: @...: @Returns: @in: @out: @n: @...: @Returns: @in: @out: @operation: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @m: @...: @Returns: @cond: @in1: @in2: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @in: @out: @...: @Returns: @main: @sub: @out: @n: @x: @y: @Returns: vips-7.38.5/doc/reference/tmpl/inlines.sgml0000644000175000017500000000054312303146331015522 00000000000000 inlines vips-7.38.5/doc/reference/tmpl/correlation.sgml0000644000175000017500000000125212303146331016400 00000000000000 VipsCorrelation @parent_class: @format_table: @pre_generate: @correlation: vips-7.38.5/doc/reference/tmpl/basic.sgml0000644000175000017500000000144412303146331015143 00000000000000 basic @a: @b: @Returns: @Param1: @Param2: @Param3: @Returns: @Param1: @Param2: @Param3: @Param4: @Param5: @Returns: @Param1: @Param2: @Param3: @Param4: @Returns: vips-7.38.5/doc/reference/tmpl/gate.sgml0000644000175000017500000000220312303146331014774 00000000000000 gate @NAME: @NAME: @SIZE: @SIZE: @thread_name: @void: @void: @gate_name: @gate_name: @size: vips-7.38.5/doc/reference/tmpl/pfreqfilt.sgml0000644000175000017500000000140612303146331016054 00000000000000 VipsFreqfilt @parent_class: @Param1: @Param2: @Param3: @Returns: @context: @in: @out: @fn: @Returns: vips-7.38.5/doc/reference/tmpl/threadpool.sgml0000644000175000017500000000306112303146331016220 00000000000000 VipsThreadState @im: @reg: @pos: @x: @y: @stop: @a: @parent_class: @object: @a: @b: @Returns: @im: @a: @Returns: @im: @a: @Returns: @state: @a: @stop: @Returns: @state: @a: @Returns: @a: @Returns: @im: @start: @allocate: @work: @progress: @a: @Returns: @im: @tile_width: @tile_height: @nlines: @void: @concurrency: @void: @Returns: vips-7.38.5/doc/reference/tmpl/header.sgml0000644000175000017500000001070212303146331015307 00000000000000 header @format: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @image: @Returns: @array: @Returns: @array: @Returns: @image: @Returns: @image: @xsize: @ysize: @bands: @format: @coding: @interpretation: @xres: @yres: @image: @field: @value: @image: @field: @value_copy: @Returns: @image: @field: @out: @Returns: @image: @field: @Returns: @image: @field: @Returns: @image: @field: @value: @a: @Returns: @image: @fn: @a: @Returns: @image: @field: @free_fn: @data: @image: @field: @data: @Returns: @image: @field: @free_fn: @data: @length: @image: @field: @data: @length: @Returns: @image: @field: @out: @Returns: @image: @field: @i: @image: @field: @out: @Returns: @image: @field: @d: @image: @field: @out: @Returns: @image: @field: @str: @image: @format: @...: @Returns: @image: @name: @argc: @argv: @Returns: @image: @Returns: vips-7.38.5/doc/reference/tmpl/operation.sgml0000644000175000017500000000514112303146331016060 00000000000000 VipsOperation @VIPS_OPERATION_NONE: @VIPS_OPERATION_SEQUENTIAL: @VIPS_OPERATION_SEQUENTIAL_UNBUFFERED: @VIPS_OPERATION_NOCACHE: @Param1: @Returns: @parent_class: @usage: @get_flags: @flags: @operation: @Returns: @operation_class: @operation: @ap: @Returns: @name: @Returns: @operation_name: @...: @Returns: @operation_name: @optional: @...: @Returns: @group: @operation: @operation: @argc: @argv: @Returns: @void: @operation: @Returns: @operation: @Returns: @void: @max: @max_mem: @void: @Returns: @void: @Returns: @void: @Returns: @void: @Returns: @max_files: @dump: @trace: vips-7.38.5/doc/reference/libvips-overrides.txt0000644000175000017500000000000012303145302016413 00000000000000vips-7.38.5/doc/reference/Makefile.in0000644000175000017500000012346612303144055014301 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/gtk-doc.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(srcdir)/libvips-docs.sgml.in \ $(top_srcdir)/test-driver subdir = doc/reference ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = libvips-docs.sgml CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. # (vips: we put the version in the module name rather than defining # DOC_MODULE_VERSION to avoid some broken links) DOC_MODULE = libvips # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=7 # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. # e.g. DOC_SOURCE_DIR=../../../gtk DOC_SOURCE_DIR = $(top_srcdir)/libvips # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS = # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS = --rebuild-types # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS = --sgml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS = # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS = # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = $(top_srcdir)/libvips/include/vips/*.h CFILE_GLOB = $(top_srcdir)/libvips/*/*.c # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES = # Header files to ignore when scanning. Use base file name, no paths # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h # we only want to document public API, so have all .h files not in # libvips/include in here ... and a few from libvips/include as well IGNORE_VIPS_INCLUDE = \ almostdeprecated.h \ cimg_funcs.h \ deprecated.h \ vips7compat.h \ dispatch.h \ enumtypes.h \ internal.h \ thread.h \ intl.h \ format.h \ mask.h \ private.h \ video.h # ignore all .h files in libvips/*, theese are internal IGNORE_VIPS_C = \ binary.h \ parithmetic.h \ statistic.h \ unaryconst.h \ unary.h \ CImg.h \ pcolour.h \ bandary.h \ pconversion.h \ pcreate.h \ point.h \ analyze2vips.h \ csv.h \ dbh.h \ fits.h \ jpeg.h \ magick.h \ matlab.h \ openexr2vips.h \ openslide2vips.h \ ppm.h \ radiance.h \ tiff.h \ vipspng.h \ draw.h \ base64.h \ sink.h \ global_balance.h \ merge.h \ mosaic.h \ presample.h \ templates.h \ im_video_v4l1.h IGNORE_HFILES = $(IGNORE_VIPS_INCLUDE) $(IGNORE_VIPS_C) # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = \ $(top_srcdir)/doc/reference/images/interconvert.png # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files = # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files # e.g. expand_content_files=running.sgml expand_content_files = # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) # (use VIPS_CFLAGS/VIPS_LIBS/VIPS_LIBS so we pick up the glib-object.h that # the scanner uses) GTKDOC_CFLAGS = @VIPS_CFLAGS@ @VIPS_INCLUDES@ GTKDOC_LIBS = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt # This includes the standard gtk-doc make rules, copied by gtkdocize. # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) images DOC_STAMPS = setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ tmpl.stamp sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp # Files not to distribute # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt DISTCLEANFILES = libvips.types # Comment this out if you want your docs-status tested during 'make check' @ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = cd $(srcsrc) @ENABLE_GTK_DOC_TRUE@TESTS = $(GTKDOC_CHECK) all: all-am .SUFFIXES: .SUFFIXES: .log .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/reference/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/reference/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/gtk-doc.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libvips-docs.sgml: $(top_builddir)/config.status $(srcdir)/libvips-docs.sgml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: check-am install-am install-strip .PHONY: all all-am all-local check check-TESTS check-am clean \ clean-generic clean-libtool clean-local cscopelist-am ctags-am \ dist-hook distclean distclean-generic distclean-libtool \ distclean-local distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags-am uninstall uninstall-am uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @ENABLE_GTK_DOC_FALSE@all-local: docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### setup-build.stamp: -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ echo ' DOC Preparing build'; \ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ test -f $(abs_srcdir)/$$file && \ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ done; \ fi; \ test -d $(abs_srcdir)/tmpl && \ { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ chmod -R u+w $(abs_builddir)/tmpl; } \ fi @touch setup-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo ' DOC Scanning header files' @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ echo " DOC Introspecting gobjects"; \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo ' DOC Rebuilding template files' @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ if test -w $(abs_srcdir) ; then \ cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ fi \ fi @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true $(srcdir)/tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo ' DOC Building XML' @-chmod -R u+w $(srcdir) @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building HTML' @rm -rf html @mkdir html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/html; \ fi; \ done; @echo ' DOC Fixing cross-references' @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building PDF' @rm -f $(DOC_MODULE).pdf @mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ rm -rf tmpl; \ fi maintainer-clean-local: clean @rm -rf xml html install-data-local: @installfiles=`echo $(builddir)/html/*`; \ if test "$$installfiles" = '$(builddir)/html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local @mkdir $(distdir)/tmpl @mkdir $(distdir)/html @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/doc/reference/Makefile.am0000644000175000017500000001107012303140253014247 00000000000000## Process this file with automake to produce Makefile.in # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. # (vips: we put the version in the module name rather than defining # DOC_MODULE_VERSION to avoid some broken links) DOC_MODULE=libvips # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=7 # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. # e.g. DOC_SOURCE_DIR=../../../gtk DOC_SOURCE_DIR=$(top_srcdir)/libvips # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS=--rebuild-types # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS=--sgml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS= # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS= # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB=$(top_srcdir)/libvips/include/vips/*.h CFILE_GLOB=$(top_srcdir)/libvips/*/*.c # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES= # Header files to ignore when scanning. Use base file name, no paths # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h # we only want to document public API, so have all .h files not in # libvips/include in here ... and a few from libvips/include as well IGNORE_VIPS_INCLUDE = \ almostdeprecated.h \ cimg_funcs.h \ deprecated.h \ vips7compat.h \ dispatch.h \ enumtypes.h \ internal.h \ thread.h \ intl.h \ format.h \ mask.h \ private.h \ video.h # ignore all .h files in libvips/*, theese are internal IGNORE_VIPS_C = \ binary.h \ parithmetic.h \ statistic.h \ unaryconst.h \ unary.h \ CImg.h \ pcolour.h \ bandary.h \ pconversion.h \ pcreate.h \ point.h \ analyze2vips.h \ csv.h \ dbh.h \ fits.h \ jpeg.h \ magick.h \ matlab.h \ openexr2vips.h \ openslide2vips.h \ ppm.h \ radiance.h \ tiff.h \ vipspng.h \ draw.h \ base64.h \ sink.h \ global_balance.h \ merge.h \ mosaic.h \ presample.h \ templates.h \ im_video_v4l1.h IGNORE_HFILES = $(IGNORE_VIPS_INCLUDE) $(IGNORE_VIPS_C) # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = \ $(top_srcdir)/doc/reference/images/interconvert.png # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files= # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files # e.g. expand_content_files=running.sgml expand_content_files= # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) # (use VIPS_CFLAGS/VIPS_LIBS/VIPS_LIBS so we pick up the glib-object.h that # the scanner uses) GTKDOC_CFLAGS = @VIPS_CFLAGS@ @VIPS_INCLUDES@ GTKDOC_LIBS = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST += \ images # Files not to distribute # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt DISTCLEANFILES = libvips.types # Comment this out if you want your docs-status tested during 'make check' if ENABLE_GTK_DOC TESTS_ENVIRONMENT = cd $(srcsrc) TESTS = $(GTKDOC_CHECK) endif vips-7.38.5/doc/reference/images/0000755000175000017500000000000012303140253013541 500000000000000vips-7.38.5/doc/reference/images/interconvert.svg0000644000175000017500000005016712303140253016735 00000000000000 image/svg+xml Lab XYZ LCh disp Yxy UCS LabQ LabS ICC Any VIPS RGB space Any device withan ICC profile vips-7.38.5/doc/reference/images/interconvert.png0000644000175000017500000006332212303140253016717 00000000000000‰PNG  IHDRãûY…üzsBIT|dˆtEXtSoftwarewww.inkscape.org›î< IDATxœìwx”ÅÖÀ'½@HB(&UzA) *"boHñú];ö^P±\ÛÅÊ * HA‘*HU:„^B „„’ìùþ˜wÃÓ€l6ÙÌïyæÙ}ÛÌygËyçÌ™sDU)ëˆHuà  %œã¼V{€ÝNYü¤ªk|#­Åb±Xü )«ÊXD>@‹3¨"˜ LPÕß‹R6‹Åb±”-Êœ2‘ÚÀóÀ @ÀÉ#¡YÐâT?UŽC|:T=‡‚aWì ƒ=a°"’CrT;xLUÛX,‹Åo(3ÊXDâ€g€!@°Ù“—î¾{¡ßˆt\S–ÀÔø¡*Ì<v–ó88 xTU×ù X,‹Åo)ÊXDÚãfOùp×x.ÊeyÍ.àíêðz#ØíVÊÇ€»TuìY m±X,–2ƒß+c¹„Bpܶ^Ú•2Š®•¯Ö‚·CR˜³ó-`¸ªf];‹ÅbñGüZ‹ÈàQ³Ué|µº'y¯ÅÍa笉svü ôQÕÞkÓb±X,¥¿UÆ"r7ð¾Ùj™“@õãÞo9=®o?žçìøLUo÷~»‹Åb)­ø¥2‘Þgª@hž‹~…°B8g%7·€/;«êˆâmßb±X,¥¿SÆÎúáE@y¨– K¦Ã9>0»€N]`a @«UubñËa±X,–’Ž?*ã™@7(Ÿ¿N…ÖG}'Í¡ hÝ ¶Æ;€ªšæ;y,‹ÅR (ø”Òƒˆôº™­@ë#˜!ªJì û+º0˪òæý[,‹¥tâ7#c VçCýDXÿ“¯e:ÉU`bc ¨¯ª»}-‘Åb±XJþ42¾8ß¼}iUrÊÛBø xÜ[`±X,–Ò‰?)ãæ¥éN迟š§s–šÇ ß_Žœ×Šˆ?õ»Åb±XοP "Rèn¶.߄ϕonåÖMޏ•ŽEß ‹Åb)­ùZ€"¢7 ¢0hÆ<\Âè¾*†}ÑÀÕÀ\_Kd)]ˆH<ШÃÉœÛç`¦?ör2çön`°HU‹y}}éÁã!þ|NÍc^8€éGw.óUÀ,U=æi-þŽ¿(ã>æ¥á.¨›êy@n¾™ê“'³7)‰BÇ‰Ž‹#xÜ8.îÞ™YYäéåvÞyD\}5ñåÊ<>ûþ™y×Úe|×èÀQ¨á™ÐnôH„û nzÁ5­ ‡qU`fXR ŽGb’Ð ‘77U5Å[÷añJ½2ªš­êÉä˜/1JU${©Q6ÆQëÅ陘HR… DfdyÉ%|—@šs>&pQ½zT©PÈ={8tÑELLN&óî»i¶t)?ý”-îú¶n%åí·™÷ÒK\ίii9•ýÃñ€UÆ–lD¤ðPÞì©r î[ 퀠ÓTœ]’La=,*5‚9Õ@ëŸýDäUõa„:ï""ç?mÂË„›6ÃËgBµa*<`Ê®x¼>|SNTÀ<< ‘«TuCÑÞ…¥¬àÞÔ•`ó¶¶{dœ³¸•ò)û'NdW|<4nÌ×ÕªñɆ ìyí5Úx^·oGë×çË:uø$*ŠðW_¥àªY“¸+Ø™³Î3ØBp§NDÿSŽó³GÖ@uovŠ¥ô ""ò2ð=P*‡'VÀ–ðèVÊâ¬<ù/8¿.‚ŸgA»D§Ù«€Å"Ò°øî´ø‘þ˜õõŒiÿºM°n:|ü·1EŸMVK‡1«`Ítè·Ù‰°×X""}‹ùV-~B©sÊh÷8äa¦ÆCÁºIL$ýÉ'iÔ¡Õ££‰¨\™ II¤.ǬÍË/³p¥¦âš2…¿:w¦.°80€ôt2rÖyô(aaÙmzáùðSææí,ÿDDBžfO“0q!Ô)„éôtévºýOÖ…WZ@VCà¹FU)úö|ƒˆ<¿eKªîÚÅŒ9úï‹.¢YÆ„{ÖùÀ\ð×_lرƒcÿls§G¦UÆ–Àuæí½Ëáû?ͼfq¡¹:æÏ€˜4ÌõgÙO©ED.Þ1[­öÀŸ¿@­\~‡Þ( RaÙL“?€Däb/ß²Åð35e\v—çŸfjxøaÚ Dö‚ýñãÙ°y3»oº‰öG’Þ¸1•Z·¦îvêP€'ž k,®U‹ ]D³þý ¸zˆe;Sgþ|îüî;&%‘~ùå4‰'îâ‹Í9ÿ3ÁqÌ!UU“ÿyÜRV‘;GÌV¯MðŸÕÅ/ÅùGáËßàêËàD `²ˆtRU/˜È½‹ˆ4¾¡Æa˜þ;„sðŸHLmzÁžòÀxi¯ª‹WKiÄ_FÆëÌËÊZä0!ed1~<³&EÄŒx’5p 3,`MïÞÔOJ"uÐ ¾ž<™@Ö¡C¤ÏìÁƒ™Ø®çÔ©Cì-·0zêTöY.™íÛóí{ï1£aC*]y%M5¢Î5×ðÙ_q8§¦,s<еw,% © ¼e¶š$„…ø,‰Iï}0bžóÌÚšÒŒæC *¤ÁO³ RöôRñ–ø4˜ð Dœb€÷½ëÀ_‚~ô& ‹^ƒöG|!Ç´iônÑ‚ó.¼·l!íŸgD‡#ÑÀUµÙ›Ê("2 j2y­µJÀHôÊ0©!ÔSÕ½¾–¨°ˆÈuÀ7fë3à¶¢ôÍZð ÛL}…ªNñ¥4–’¿(ã0`?Pn› ÿ›_Ð5ÅÏ×Õà†ÿs6ÚªêŸ>ÇâD¤1&Îq [ÿ]åk™ [ ñH>UÕA¾–¨08Þèë€ZÐr',›ác‘³¿0S;s\ÓÌÖì¦øÌä—_ãöVÝnq™æE bSàÕUøü{é.µSᦎŒ·‹HïuA‘2¨e’ļZÂò˜¿´Ð‘±!p»—îßâ'ø…2vøÚ¼l¯oÖ¥X<( [–•ƒÙž*§¥¬á„f¼Ül ZåÝëÔKH¹"cþz«Š˜ëÍKÇè~Ÿ÷¡gé¿Úlsä¼Á;·oñüIÿ,6o_ëÿˆ¸å»2¬'d„IÀk^ëKIçr \pw Ì»}:$8²öóV'"R ho¶úoÀçý—[¹f½#ng‰óB7Xü¿QÆNÐûÍVb5¸Ï3¬eQ•30U}y,nçˆù¼MQ¦q\£]PÓË=δôwÇVnæ$­(É\„fÀí[ðyßåV%@p\é½®°”vüF¨ê<`‚ÙúøøêŠöÇušÊ{M8ÜsfÝÈì2‡2‹ˆ„`òX=ŠlT\«!ÍšáD˜s®Úµ >œ3œª¹e;D¸½»ûx©;Š '½d«­Ud&ÿ˜Ú´¡\D’óXPÚ¤ õëæÙçy—¸ãÐÌmª.éýiñ!~¥ŒöCF(  £ð‰yêHô¼ ŽÄÀ`U=ÍL1?¢iÞ^±¾?W\AœËŽy<˜;wrÓúõÜ1{6ýSS:ipµnMùG¡SAmä^Â3¡¶;ŠTI;I..ØA>÷Ô¹3T¹7:šÏý³gÓmòd.ro7kFÄòåôÙ·¡Ó¦quRC–/§o›6”\?ÎyII úí7ú/\ÈÀäd†<ðµókÛ”¦{yKzZ|ˆß)cUÝôÒ 5®¼¶‡P¬Š8C¡ë°ã©_ŸOBC >™6´ 6ò.•Üyy³eϸê>Ã-‡ˆ:õÜ|û3¯¾AÝÙÜ*V$ð—_¸6-5k2ªR%>Šâ½™3ÙÔº5ªT!è¹çèñÄ̈‹ã“Šù¨cG>_¼˜B8Us§©ôøX,§â/á0OAU‰ÈÍÀw°¿:´ÿ{úîó~ë" ÷ Øì^Ê4BUG{¿]K Çù#=Ur s* $+ç±Ç£ý¼y¬yà–¹÷íØAjL0׌Éù·ÞJû€>ø€yO>I!CnVv‡jm."?¡”ïê†"òfí®óÿUë¹ô“›}™å±ß­Œ³œ&ÁÁöìÉÔäd“Qíøq²†g9@Ä4}:»Üu¬\Éa Źî D1"®ª~þ–²‡_*cU/"÷ïÀ¡xèÿ$Ü÷)¼¶Ü{­~Qîù$WvvŒžð^{–RD¼y‰> ÙÊ!OrŒæN¡Aª=ÿ<Óò©G££)W­åj׿“þý‰ÿøcŒͦ„„Ü"ù™V >h‹Ü:˜TŸoW›$S%‚˜õÅOw‚)Û`øßPïX.ç» »O³ûÌsdܾ=ÕW¯f{r2'rkð÷ß9°?‡~ûëfÌ`õO?±õ‡Øë*ð“¨ç0Ø\˜«,e ¿Uƪú_Ù| aä¿`öxg"\XȧÚ°'îêÓûBVæìAU}§èÚ°”rœßZÀ) !/òSÆ!!„îÙCJ^õˆàÊÌ$ó–[˜›™‰Žö×^ãh—.TLH`{î-&ÁÜJ°; Ž{Ä(å’ª/úÔÍäpØXFC½”œ'çb¦ö<¦€+2’à;IÊyÜMZ®óâ‹´îÔ‰º7ÝDçÇ9rçü0i‰¹]s’ ÏQ{pž§YÊ4~­ŒTu¦ˆ´ÁxY·„¥]ᢠ¡ãÏðáOÐ0·'éBr8îº~ê 霉ÀUýý¬…·øN¼äÃåÉǤê&?3uJ © g="¸RSIËÌ$;übf&'¢¢È»í˜,xy¥)×]ãºû€C@àÊ’ÎQDÎf+KÌÞw‚>y*Ä'ȈŠB’’NÞH’œlL×II¤ÄÇE>ŸMB)7ÜÀ`N•*„L™Bß7ßä²I“ø,©×GzlØÔ©–\ñ;®ÜPÕ­À…“ña3zýý hòÔ½nè¿W PÎ-Â`X;8Ty¾¿ÙQÄÀ@‹Ü±ˆô‘–Åq¿–‰ó'œI§xõæVòsàZµŠW]E³œûÃÂÌùy\›= ,¸ìu§úüCUÛa¢Gåú ÁxQ÷ {»1’|îgÙ2»\¸.ºˆXÏýññÄnßÎ!À5k›4á¼ÆOÍOŽG¿z–ÄDÒ§Neu\…øßHpç1?ªªng.‹åü~dìÆ‰_ý²ˆüx¸²"!¡•)_+TØQ¡BÄ$AÅ#p$ÅÀáX8IÕA=ªv_ϪjB>",þ‘¹öN¯Ý¬¥$â‘Ihe9èšoðg>“!C8×sÿÔ©ì½ï>fÿöCæÏçÊ·ÞbÑ–-¤véB•ûïç’zõøØs.4G…2‘÷2Þ  ª>É‚–Îj Dd?P¶ç–Ç<›ôt\‹±ê™g薘ȤmÛH{ðAšV©BÅÿþ—Õ€kÄÖÞpÛ~ù…›GŒ`Ƽyìoܘ¨¡CiýóÏlX¸ý>H›/¿äïùó9ؤ åo½• Ö¯gk~mvžÒŸKn”eìFUOˆÈÛÀ5@oàR ŽÄ›²£ j2ÀT`Ba’‡«ê!Ç ôIàB™ WÕä.µøÛ1Ö“`˜V ºîÏïäC‡HKH`ËðátõÜ¿?S&L`綾2êõ×é:jý Ü¿ŸƒŸ|Âoééd:ı͛هÉ5!ûö‘J&r—ÀÎ*ÎÆ¶|Oõ=›€*°´Ù¡psçšk˜ôÑGtùôS®‰ˆ tçNöÝx#Ÿ®^Í— Ú·ç‹O>¡ó#Ðí…ˆBD‚U5CDª3÷UõC_Ëeñ."Ò™l…|÷×ð~¾ŽGÅÇÞ¨÷¤D?©j©È0$"ÑG®ŠÐf ,ëk™Nrþ°¦ °¨¯ªÿHb±¸±#cáÎà䌖.†:á;-~ŒªÎ%{îð‹Þp ¢•9upGgy¯ŠÇ‘òy³µ´ |}%¢?ß©å(b€'­"¶„—D$ø«ªoúZ‹÷‘z˜¹Î`h¹–ñ­Dï×{ÿ YAÀ;ªz¯oå9=D$ÓŸõ â^øã ¨ëÃd •ƒNCrE`9ÐFUK §·¥$aGÆ%U=t®‘G|-Å{8ëÒ_1[ËÛÂU—á³yÍÙ1ðð`Gožõæ½{ÇÊô/ V…îƒàø¤?“àò»E|ø—UÄ–Â`•q Â1¹uúŠÈ“¾–ÇâUž!Û©gbÞœbWÛCàºaVH.WÕ$/ß·WPÕ™€3¢ßÒº Ä'ʸëõ°£®#Ö]ªºÐ‹·mñ#¬™º""å€)ÀU}Ú×òXŠ1ùC_€Ž¿¯~+ ~Žƒï†50å.WÕŸ‹§mï!"¯š­Vóà—¯ ¦\ì î·Áßm/Øß®åt°Ê¸„""Àd`±ª>æky,Eƒˆ´Â„D}IU—ŠHE`p¾9£Å|˜ùÄexOŠçÃËCáx$Æáh°ªŽö^{Ňˆ_×›=U¶Â7ï üì˜V n¹Twv|¦ª·{¯=‹?b•q Æ Óù#°ZUôµ<–3à ƒz0h|­ªÃ<Ž—ÆýÌž¸pß×ðÄÚ¢•de9¸»,ì®wL¼~ƒcuxãea)Ðo|<"ŠpþöHñBŸxµÇƒÍ£ªúzѵa)+Xe\‘P`< ªÿöµ<–Â#"ñÀ @' .ˆÉÞu‘{i[Žó^$Û—ãÜÕðÈwpwÂÙI²% îê¿÷‚ whÆÀÕNzQ¿DDzc³'j/Ü8Þ] gñÇ—!0´#|׎Æ9;שꬳ“ÚRV±Ê¸ "!À·˜Dw«ýÐJ"r.ÐxhŠqñí¥ª«ó¹¦+03‚v8g=´ZWÀM…L½¹!Þi sZ†–pÂà>xxQU}¸ü§x‘:À«˜ mböFï&K¡÷ ¸„b´œo5€é-auk8êÎÄäÂü6UÕíÞ¸KÙÀ*ãR‚cê‹ñzl—K”|œùào1©ó:ÿSÕ…¼¶fTÝøÔ#åöCÍus*†ÊG â8ì­¢!)öÅÃîàòÌ»ŒF¨j¾éýg®þE ×©GBR¡æjˆ=`ò—W:S`9Ø ‡¢á`%ØÞ2ÂsTû#ð”ªþ] üL‘Ȃηœ9óÃå0óÃV[,–³Â*c?BUŸfÓE¤¼¯åñG<æ‡Ç©ê`U=ák™,KéÇš©ýyèôTÕ#¾–Ç_p懟n²yj-KQäk,Eª¾!"'€™"Ò£´&Œ/)xÌ·:©ê‹d±Xü k¦öSTõ]L¤®_œÉ–3À™ž D[El±X¼UÆ~Œ³Ôæ}`–ˆTòµ<¥ ùá¯Uuˆ¶X,Þš©ýU-"…|™ªîõµL¥¹ x3?¼ÈÇâX,?Ç*ã2€ª~á(ä_…l—âä“a$Ð3?l^,‹×±Ê¸Œ ªßx(䪺Ã×2•4œùáqÀzÌüp†E²X,e;g\†PÕñÀ£/ëZ¾•¦dá$Ÿ_|¥ªÃ¬"¶X,ʼn—1Tu’ˆd3D¤·ªnöµL¾Æ™~3?ü‡¯å±X,e«ŒË ª:Õ1YO‘+Tuƒ¯eòóÃm0óÉ>Éb±”Q¬™ºŒ¢ª3!ÀiäkyŠg©×L ¸Ä*b‹ÅâK¬2.èê¯ÀÀdiâkyŠ g~xð…ªþËÎ[,_ccS[‘À˜T€+}-7‘›§Uu±¯å±X,°#c à$=¸/"­D¤“o¥*ZD$HDþÜ…™¶ŠØb±”¬2¶ ªK€koE¤ð²ˆÔð±XE‚Çüpp©¶X,% k¦¶œ‚ˆ4&€=ªÚÏÇ"ÎH,0BU?ó±8‹Å’+V;8iòÎâsœ×JÀa`°Û)ÛU5ÝWrzi ¼ „µ`Ì<ò¬³¨³PSûU9ÙŸ{€ªzðì¤ÏnOÔùR‹È-À“˜ùá%EQ¿Åb±xƒ2­ŒE¤Ðèôb qÙ1`0˜âoqžåùàR  0袅ü¢ˆHp¦Oûç²é˜> üYØör´Ý cŠ^¼´®UÕ}§[—Åb±'eR‹Hsà9 7fô—ƒ`TLƒØãà -·) ,^TÕ©Þ”¹¸‘ú¥ÜxFUß)àü(àA`Æ¢ó …èã—.1}z84êöïï¨jj!å Öý0Šø/àUÍ,Ìõ‹ÅâKÊ”2vÌóÀ@ÌÞ@4;Ý÷B¯ýP? âsÉ[{06…ìX˜v,© Ç=NX<®ªs¼~#ňˆtÆÄ³›b‘pàÿ€G8ŲŸ]÷BŸ½Ð"ê¤CHŽ/[zl …eåaRU˜s$Fxœ°|PÐÔ€ˆ|†±r$/©ê˜Ó¿[‹Åbñ eB‹ˆ`Ö–>8 ´j*Ü»îØ •Ï èCj|S^oë<ÍÛã€;U5å¬/AˆHpÎà"r!æ~«™=ÁY0`3ü{+´;zf-Í‚·ëÀµ!Ëíí¿ cnÎuÞWDb>ÛD xøîLÌÝ‹ÅRÜø½2væ-‰s IDAT…¿®0{¢ŽÃÝkà™sM+£ªÁËMagygÇà*UÝX4õ—޹ÿkà:³§ín˜´ªæ2Ç^”l…>`UgÇǪ:XD΢Uu­wÛ·X,ïâ—ÊXDÊcL—Í 4>Ÿ ŠqyËòrÐûRØ[8\à&ky³n¸~ |¾‚Šé ”!pM;˜ìX9xHUß(ž¶-‹Å»ø2v‚wüô4s™ïÿ Ãv¿$DÁ¥½!5؈QȇŠ_Ž¢ÁI°ð¹Ùê¶fÎ+~)2:_ ‹j.àjUTürX,KÑâÊøà³õð"x͇&ÌoªÂM=¯àoUu ïd9sD¤&f o4Þ Kf@D9¿.‡ƒ UoØR³Œ©ž êa±XJ;~¥ŒèQ›€(豦ÏõµLðpcx½ƒ³ÑQUøTœ3@DÆ×Cù4X=j÷­Dë" eH>RÕ!¾•Çb±XÎËÚô,¡ðþ@–ïËËCu·yú-Ç ªÔàdprFôC—Bcø¼O…›—;"Þé$·°X,–R‹ß(ci 6[7®€º©˜yE—à,xz¡#f;LÞàÒÄ€@ÕÃðÂ|ÞŸî2rĤb}¼îÕ°X,/ã7Ê£ˆƒ Â1x}9>Wžå®mÐÌíDv×z ˆ‘f@'³õð"ã™îë¾t— 'àž?Q/sæµ-‹¥TâOÊøjórÉzˆ9ŽÏM©9ËM9r^à¬- 8¹ŒË§Á¿7áó>ÌYZ¡î5Îý½Ò‹ÅR ø…2‘–@-³uÝF|>j˭ܹ‚31 *®òJG=ÎN‡M”…Ïû0g‰Ê€¶ ެV[,–R‹_(c²GpRàÚ]ÑŸ}X4oNdÑÔ{Zn9UÞ’‹ˆœ43[×xõ§U+Ê£gvý5ë‘Û‹Huoô…Åb±xQÆíÍKÛøÇv:„®[ǵññç<–_éШ ¸)¯ãQQ|û-îØÁMpçúõ\ûî»´È»ÎN[y›{µ7Іvæ%$nÙF!úkÙ2úöéC\aÎõ,K–pGÆ„Ÿîu¦Ü¾Õ‘WÈ~x°X,–ÒE¯("œ~5’0ó‰§P®4h@õ°04·ãy€Ëy›ë5ŸNçfͨñ¯1uãFRÚµ#¶U+âòn£ÖçMœˆ„¨ª—c:ŸNŸÆ$CX¡RL6h@µ*Uá4úØHö\ðiR! ʃ”²e¶X,–Ò…Ÿ)ãjÉ­@=Q‘ìU6:}ÿý4«]›Š));–ÕÌ6ç° àª«¨|Ï=´@^¥S§² U+jN˜ÀŠI“ذv-Gnjɾ6꺕±E¤;0OU§žÑ]1"<¬'{>ö(¹÷iuü³kÖ$ìÙgiѨU³²Èš5‹„§Ÿfµç9Sîå—iMÄW_ñרQl-¼ä1ÉV[,–ÒL©WÆ" T0[5sUÆŽ‚²ç%³iÓ†èÝ»92i›4 úõ×雚Ê÷cDzK !ø™gèøÞ{,nÕŠJãÇsãEñÉ’%Ù¾ýÐêàAŽM®]ä™j0Ìôô¢žLž‘°³è‚¢D¯€i@%³ëP9˜X ®L,Ìõ"ÿìãFˆt¹p}ø!V¬Hèý÷Ó¥|y‚î¿wà^z‰KÞ~›ùQQ„ŒÉ•À£F±%g¹{vTÅ*c‹ÅRJ)õʈ9ù¶R*¹˜:h®¦Ðwße#@ƒDîÞMJÛ¶¬8úcDz]„¬  ‡ aÚâÅùôSZ´ êcÑ¢_?fß|3ÓGæ’áÃéñ쳄oÙÂÎ^`Ö˜1äHLñŸºðbOH‰Ì!ZK`ÅÙwA‘8‰qpã@h°¾˜Só»0·>ž>½Ó§³·fMÂêÖ%râD–]v €?Ýç|ðóßy‡ uêP~èPÚŒŦ‰[þ˜ó&¶pç[,KÉ”ñþ“o·»€râòx=åø-·Pã7¸*5•´#GH­T‰è-[ظDp8AÆâÅ$¹Ï_·Ž½Í›SpmÙBêÅ3˜|ÙeÄ=ú(|ø!7ÌŸÏÛ›6qìd+÷m4å»s`€%ŒL¢ƒŽ%iîXDºã€#@ ÔÞ~±™…»þŸ#ã¶m©0~<×xð G"" Ív¦`ÁÝÛK—²çŠ+h™³ž¼9ä~È)ÌèÝbÉFD*M€ª%“út¯GY¥ª)¾’Óâÿ”ze¬ªÇEä[Ë“»™:Ï9ãçžã²O>á·Çc%ÀwßqqµjÄ`”±ޤ¥™Ñ^t4¡©©¤å¬ççŸÙ÷Ë/LNO§y·nTÚ´)W«ç5b¼;³Îôþ‹gθp0xÈx§Çúa!·>~í5:­\IBŸ>ü ðä“46Œ®çi¥J'•s¥J„¦¥‘ž³ž¼9TÞy³«°rZÊ.β½+€>˜ß_p!.;."¿“ŸT5ß‹åôñ—¥MΟðÎrä©)3uv %(2’ «aCºu£…£¼³DÈAÞ|“–@VwíJÓ_eõòËœÞy„ºëº÷^j¸js“6–säͶ«êDU-Š@UÓTõU]OvŸ&•§ðQ±Üè§ì'(<œ@ +:¹õV÷R´“×Ý{/­¬°0tà@Zýù§éã•ÃQN}V[òDDúŠÈ2L~ñ·€KÈVÄ Ó¡A´O„ú‡!6Ýì è¼l‘…"Ò£øïÂ⯔ú‘±ÃN 9lq¯q͉ `ýz÷ÜùüóŒýè#f?öý¯¾š¶.®eËXI(ÎÈ8=ôúõ‰Û¶!±±Ä,]ÊšçŸço@;w¦ÎpåÑ£¤¨â 'üí·™°`ssS´ófŸªžÁ2žbÅQl‡£!1ª8:÷ÞãŽ÷Þ;¹ïÇ™ýæ›Ì=šÛ÷î¥vV®Å‹Y×¾= ñø¬RSIÛ¹“»#"ß·÷ÜÃïjd¼5 ÒÃݧq–2‚ˆ\ ¼Dv<€r'àÂDè½z€:Ç!0—|²›Ãà§8˜VUcÁÀÀt™ <©ª¿ËÍXü¿Èg,"#!4 ¾‘§¥è*W&$>žÐ+8š×9U«Jà¶m¤yî # iSÊ?ŽkÍR23ɧCëß ëãUµD‡o‘*åO|/þUÐ5ùEPƒD.]J²Ë•{•+Gà¹ç¾f §17÷@+xkTVÕÃg#§ÅpVZ|Bv P€¦à‰5ÐïŸÁŸ_zŒ«/7†õžƒ_CT5-¯+-–üðe\Øl¶^ùYŸï>as8Ô{4¸QUÇúZ¢‚‘ßÎÐb%,ÿÒ×òäNÃ;a}C`ºªöòµ4–’ˆÔ~Ä8gç&ÃS«`О¢kå¿Õ`DSØéöYXôSÕ­E׆¥¬àsƪšÆ &6ÅK1”Ï®¼ÝØQÄ'0ë‹KÌËê†p(Ÿ÷aβ)Ô±4|ï•°”:œ¹Ü?& ÷¬„ÍÓ`ÐNŠ4kØÝÛ!a*Üõ·ÓtKàO¹¸˜nÕâGø…2vpDzf°! Ÿ+ Ï’¥0¡ƒ#ç,UuGâ*éü`^2Bá©|bnûª<Ý\@&fd)ãˆHÌw!"OÀÿ~ƒwW{/ëXp|´ >˜á@Eà'iU\÷lñüI ¤ÂñpÚï(€3Í»ÛvÕtä|Ók=PÄ8Ë7œ‡œÏ{G®’Ò¯Cá‡îŽ¨ßªjNs–²‚3]5ƒ¸T˜?n-²,nù—!;`Ö4ˆ9D“EÄF„³¿Qƪºi¶æt‚™1}Bû3ø‘ „Oû8bNQÕ_¼ÔÞâ R*Àà.}Ÿža¿éé@ð˜W{ÀRâ‘ÌôO%?ßÿÍàïk¥C|; B3€xŒBÎuÏbÉ¿QÆ#Ýà ‚!×a‚`ÃSq~åš+àh Æ”ú wo¿èQÕMÀÍÖ´î0¾ >ïÓÑ5`NGÄ7T5GøQKä] !ºàƒÙÐå>ùnv?oÍ1sÕ´^óþ­[ü¿ð¦öDDnƘ­vsá¯|'Í ŽðéÍÎÆTõ~ßÉræˆH,°¨Qà÷W¡yžËÀ¼Ë¼èñ(«€Y_ÞPUó—mñoD¤5°ø÷ðöß]ã}nkcZb›©êZ_Kd)Ùø2‘QÀP³uÕ÷ðÃŒâ—âÕ†ðØ} À\ [IŠA}º81«B ~üõFaãU;B¡Õ#p Æìq‘ª.-^,% ùè •“aë8wùZ&H ‚:áp0UU/÷µD–’¿™©ÝÜ89‚¼nìB±šª^jOsñFàêÒ¬ˆTup—ÙÚ}´ ¡[Ÿþïq± ³VÛ*â2Žˆ\t5[ÃAx&>ŸFÁ1'àžÅŽ˜½(`KžøåÈ@DÊaF¤-Ìžæó`æçP)û-_Ù &÷wÖ.PÕÞm³ø‘瀧ÍV…½ðÁ»0ÐËa(?® ü¤Ttv<¨ªo:ުݯTÕËŸ«¥$""“+ n"lïkyN%S öØYø^U¯õµD–’‹¿ŽŒqÒ]L7{Vv‚ÆÃ•ðŠ'åš0h8 & pñzLzD¿QĪú ðo ŽT…›Ÿ‚¡íðJŸf¹à–N0ô GŸ†ªê›Ž,»€¾ÀZù¯ˆœS,`)8ÜÎò¶~k(VÏé” L¸zµ#n/ óF?Xü¿»‘àÌòÉ‚–¿ÂÛ?B§"ˆc¼#õ„_/‡ŒgçDàUM>ûúK&"Òø¨böTÙ÷Œƒ'‹ÈQåñfðñ8PËÙ±¸FUå# ˜´Âä] ¼¯ª?–’Šˆ\|c<—×õŽxQ±³ª4¿ÓÙ¸JU'úT!"H`OQY±D¤* À^õEæ·#c7ªêRÕ'€~@¢™Ç]Ö º¾Ü#σÊiÏ }—õ…úoÁÏ×:Š8 x3Gì7ŠXDÂE$ÊsŸªÎZ³ÍžÄzðÔpî#0¤=¬?ƒ(h«"àŽ !þI1ÜCÏZçTÄŽég½Ý@P&"WeXJ$W›—ú» ^ §ñ]kØð˜WÕªÕ®—üš%C]w<ì«Ïö†E¤…ˆ¨ˆ¼r¶uåQÿ0YËþò"’*"mT”Û<ŽÍ‘ I‘½"2ÆYˆ4pÒV®fE$×ÀG"RÙ¹·tI‘í"ò¢ˆHŽó†ŠÈà/`pDD>tÿG‰Èý"’åQO‚ˆ /ª>ò~?2öDD"0&Öá@ÌÉ#¡ÉPw9´^µ@Ã$h—uÓ 1ÆÀêXØ ËëÃúVRÙ£ê L°à#~ˆWa<—³ò8ï2àE ­ÇÞ,ˆ_Í—CƒÝPï´<m+Þâ °"6ÇÀºj°¢$ÖwLünæcÒÓýVY_Û€yÀpU-fooKq""›€º0èwøxÉé\»n×}þ9+^~™õ|@›óϧrçÎn§Ï¢æºN0®=°TUÛœMM"òÐØ)5Š:«ˆD{€Îªú§Çþ;ûUµ‰ˆôÞU՚αyÀתú¾3U4øKU‹ÈϘ)»{UÕåü7QÕŹ´]HâUu³dm6&Ö7Î9÷cþ¿8·Ì©ê&çœ>ªz‰£ÈÛ¿=KrªKÉg\(TõðгôéAà &‚5]Lñ$ðd…äSåAÌïeËÔ""7÷ €›óûÑ;&áŸEäjL¿^`,»Î7Åó?Nœz40ê21Žw#UuÚiˆü4p9p‡#÷Ï"2@UœF–ÒE¼y©„yÂ+4"h@. kÔ(ÖÄűétë(<ñîXôgSDB‹0‰Qzàü¸D¤ð-ðð,PxMUßsÒ¡NÆ,¯LvίŒ.ö4«êa™Ü†I¶áæ6àÉè(ѱ€Û4ßã`érŽÃL%ˆª.uFÕ ™ƒ€§€ÜŠØ-3FAçV‡‹Ed'yô¿ˆ´ÞÎÒÏUõ i‘ÆÎñ½˜zUÌÏ¿E¤«#{œšSo{Œ…ÌÃR;ÌgUó=Y¦Fƹá|±Wã„­sLUÁtú^à€?8 ä…ˆ\€yÌR1÷~ÚQÃTõFuê Ã8zU%Ûá+»OUõøY oÚu׉ª~ "«€ïEäUý¢(Ú°”âO¾­£ør%*Š ß~ãæ_eõ¸q¬½óNZT«Fœ ¸Ú·§rãÆTyê)þzþyοñFÚ¾þ:¿&&’Ö¹3ñ¡¡šŠ«W/šwìÈyï½ÇÜÌLô©§èAà3Ïð9ÖS©ëVƘßÀÎ3¼ç;÷÷øKài©è‘$E€§?Š•"²h$`BÚ> Œr”ì­’³1Ê«F1ÝLs”z^Ü+"×b>—@Àí³ño`)æAâ+ TDîUÕÑùÔµÒq¼­¼ ªnå…îwŸ("ïœÍ§Uu’ó¾F‘51VÌ0ÌZN²€¦À¹ªºXæqì8ð¼c\,"ã1ƒ†gTu‰ˆ4‘ë ˜ 1&ñÛ0 l~rê9è0ÿ±7ÑN|Uæ•qN“Ça`¯e)nTu‘cb‰yŠ[£ªŠ ÞtÌu[Aç%ªº@D:ãù§‡ì<²ßPáäÛªÇÈÇÄüÐC4JMåXÿþÌøñGvîÙÃýn3u@.G1gÕ¯Otb"‡>ý”M‡‘ñùçlõ¬kÜ8–¼ú*k*U"äÖ[iûÌ3¬Ê_Ô*ž^ÞÑœ2‘êÀeÀyÔÙ}¸3²8–#4ì1Ìè`𮈴Ç(§žsž¨ªŠÈgÀ­"òf:ï߈8“ru°Ñý;s”Øh`´£`‡ˆÈDÍ;ÓZgÌ``p—ˆ¼éü/ïÃ"› YÅß7Tu'p/𭈸0ñ`æ]ã1#S7Qδ[ƉìvàQrADnÃÌC'aF«)œ´´/9£àó»Ûå pµãÕßã@:Ê9ö °TD¦`¬U ªº ã,öŽˆÜŠ™B¨ 4³#c "r3Æ„s©ó…GU×çUéCU?Â˜ÜÆ‰Éîe)¥¨jæÏØRŽ|"aM˜ÀƆ ©}Á”²† áܸ8bEŒ™ÚCguêDTHºr%‡ï¾›…‡søÜs‰pêâöÛi„+ ×àÁ´^¹’ ùµmÊöòŽØg6¶°£Ô<ûàðŒ£ef‚'+ñ° ¨‰X·³ ©0ÊûmŒý4Çþ€çšÿåœòpt ›€‡0ëÁ˜h/v>¿œds0ó´n™W`©PÕ©˜ÈŠ-1¦÷y˜AÄ3˜9i0Ó)ö‹óþݪš—5 5f ô:ŒÉº¯‡oÐv` ÆÁ÷àz=UñŒ^Œ™·lvä܈±, þƘÑÝþ2ÏŸcúuæ!)ªL­3¶üq/ê^€ƒ†ßଅüãXò€G.8JÍ ÷˜’of¶Ñ£é8p —ìÛÇ#G8K…Ï>ã÷§žâ¯1cèÔ°!ñíÛ3nÜ8.éуvr(.ŽŠ l¿è"¾MN&39™ÇæÍcE‹œDð±cëÙ“/Ö­£€ž—ô_;óÕ>ADb0Ê¢«ª0Ïm‘ŽÀU=¯Xڳʸì""C0ž}ÝËÚz\Ç£ôÌr‰kUu_—XJ"òpÄ€ƒ¯t~l,Á+¼q#ù†ÍŒ‹#¸Q#ÊoßNÚ¶m'ç"““ybÐ þ7i{ë×'rÕ* ™Ó;æ8¼¢ªEDÀÌ/RÕBÍ3—uŠ[[3uEDîÁü8/-kŠÌ<²ªÅ,Y "gÉâ&˜—Cq0¡2˜‹"}ãFŽtÞ¤ÏËþmÛ²çÝEEp¥§“±j‡ ªÇ”¯Îq±‡¼>aÆñéÊPÚø‹S×f{«ŒË ÎSòÍg­C¾–Ç—¨êÇÀM§Û|,Žåô˜OöœègMðJlé“eòdæ¬_ÏáÓ»î«&ެ;Tõ´Bv%ªºZU—ùsœ„¢FU“UõâjÏš©Ë"òf~/õ£dg‹˜ 0ßcœQ8SïQKñ""ƒ!* ¶¼ ±%hþk4zÒ#·=×½Z,9±#ã2„ãžßèañ©8Ñ».ÆÄkŸåÄóµ”|þdBr Üq1ÞŸa>ãÁ—:ŠøÆ?ÁbÉ«ŒËNV£®˜±_¬.jT5CU‡aÌ‘v¾–É’;"RÓY7þ0Ùa§^ «Ã9cå™g9þ{˜íN<óŽª&x§',þ‚5S—Ää>m‰In^P¤ à„  ¼T@]K1áDO{³æ4 “4À…Y#Úˆ‚&KaÅhôá[z4¹67Æ„I¬§ª¹ÅD¶X²±#c?GL"輦…ìVÇqãBàvyßI{fñ!ªº¢õ'L2‚,Œ‡òå˜@ Àß­¡g¼ìÌ•éÖÏQÄYElùÿöÎ;Jª"kà¿ ir– ‚¢ Q”5 FQ$ ú)¦]Q ¸ÂºæˆuM(‹iÅ¢¨KÉa%’A$ Ì€00÷û£ª¡&ô ÝÓ3=÷wN~¡^Õ}ït÷}UuC(˜2ŽQÄñ.—f·peF*Lø (ýî¶Ž=D¤¤7>\ˆ Ö¿—¿÷U=¬ª#8’âï».0°-៮¡ôé3ߙѪš>z•adˆ)ãÄDz‹‡zµÍl俎|.±úL?}mä"'"·àB VÂ…~ X½÷ñÉÜ€ [¼Ón:›<÷éãzyY¾%ûLG†q[3Ž1|š²7p «ûZ¨Çðá ºÆO؈'²øïq/`.^ñÃ>¶2"R5³Ð­"R¹¡;Òæ{˜ü>”Í4Å≳³œßtô–íÌcÁÈ ¦Œc)ŠK}¦ÀŸKÔ#~ªúcÜî_Í9üˆÈe¸ü²Ëq ãCÍð¸¾2ðÎ{¨¾ž}®Ë,™Á ðNm¸ l ¤Ëû—L PÓ1rŽ)ãÁçß|—PüÿÒMßaÄsÀY¨÷ð>ÊÆ ""€'€¸t‹N ­b¸Ü´ƒý‘4h: F~¡ »g IDATçî:qi'U‚!=`Y{\Â{p¹À°ßž‘LÇ^9¼Kmv‹…¼Ë|øÌa@oUMu#D¤%ðniåUƶ¯ÅñÆwEBó)pù\¼Êä`öhW1xî4˜p,îi|ð›;T5š±§Ž)ãŽÏ>ô1°NUÍ`$ñ &>žòq®‘F¸|³õq#áIê§Θê^œo²'.ê-‚3~Ú; þ.h¶š$ÂXRVW€`icø­)*Ôôvœßó+ªúg$d7 ¦Œ 0"Rçgù‹ªÞmy +"R÷Bô?Ü:²Y¯gˆÔÎÆùœ³9"Rç§Ü 8åšZŽKdÿ¢E³3Â…)㊈”>æE+Gªq¿F9h‰[GÞe‘òÞ°êàRÜúêÛÑ22‘SpÁBºâÖþ+rtí7Å-ÿü L&¨êoy$¦Qˆ0e\‘ÒÀ—ÀtUmyŒ£ˆH?à8ØYî«$Η¼.•àŽüh/ " Àݸ´/á¦uóUowQ÷<ËãŒÈ¶¿›{ ‘˜2.`ˆH`"ð­ª>myŒãñIϨêë"ÔQÕ'Ðf]Ü(îbœm5 !]µTàwœAÑTÜHnz´”‰¿ïÛ|ŒPÕ½ÑÅ0ò;¦Œ ~„1 øLUŸŽ¶CDêàŒµ°Àó±‹Wt?­Ýúð'“á²?òVŠm;Âê¸)ëË#]ïF7·¶ü+p. ÒÛÃ0ÂO±ì«y…ˆÔÇùQÕ/¢-Q^Z»Í'¦ÃeÛò^„ÀÄ¡UWØTøPDš{qCZãü”gM,‚aDçüZÜD\¢¯£-9D¤àÓÞ°Þˆ²òü²ÐéRHŽÇ)á¸xÍÉ8åü8ðZN‚–†:¦ŒóÞˆç+œïçähËcD™ ´“v¯ŸA±|ð#ÞéàwKy8å¼ÒÖ‡ #²˜2Ž"’¨ª»Eä \ÈÀOÔçÓÈÿˆÈ5¸¸ÕÀ¿&Âù$BUªÀI=ak9œnm Ø0òSÆQ@D.Jââ ôWÕÿFW*#/‘E@Sh²myŽå•:pÛÅ~çbUUq £Q$Ú6|üÞ@}œ"îmЏp " €¦nïŽ@Zþ*·®…»¼¸WE↑1¦Œ³@DÊxåNîN†/¥½‰ûts¥@Ÿõ8w¢|Vþ²ÒËz…çiF`Ê‘¦"2TD>‘Ù"ò›ˆìÇY‘‘M"2OD&ˆÈ"rNnþ¨D¤,0( ”%UuOXoÈȯtw­×¸Ñ gT®(ãʸ†aä…ÖÏØ»—ôÇ%l¯•EÕb8W~¿+p?°KD¾>> ÑØep °ç&òZ.Å7 >-b·wù*œòËR¥(:j­^}•_æÌ!)pü¡‡8mëVö‰ UªÿÏrLØÌ'žàŒ%KØU·.e7d}:–aÃX¸v-YļîüTÙ¿—:SC¿KÃ0rK¡SÆ"Ò—ê­ë±gÊ€–@ý®Ôôùb·‡ñ°)¶–„…`si\žk}Y,"f“ï  ðð˜ùk:Nü’GÇmd¡Œ÷í#­dIŠŽÃ…§Æ‡ªÐ»75﹇óÚ·gŒ2}:ýV­"iÜ86Üz+uo¹…¶Mš0¦^=J‰pÌËaË–Ô®]›ÊÇ3?«¾5Ê8«—TÃ0ÂH¡QÆ>Þós@Žü)ž´.ÚWm… v…>kÿSø¨:LªË*âŒr¾ðþ£wªêœ .ªœnSÒ…–G7OÛƒ[£Í”™¾jý_z‰3‡gÉóÏÓå•W˜²p!»FbÊÈ‘\4iïÄÇSä±Ç¸ðÿà› Hyì1–·uþùTìÖ÷ÝÇ—kÖœ½¨•ßÑYV3 #l ×&9ø·TM{–Áà '¾lþŸÊðà°"0-˜ üMUGŸ`ÃF !"7¡Ì>Øûb(×\uÕÞ{^K–°¶tiJœqÇ$ Y¼˜ž›7³;>Þ½TŸ{.ÇePªU‹øùóé?a‹ `vhÒömc;KTµih׆q"ļ—ˆ Æe@ª %SáÞ…°vܽŠ„Áà¥Ç6øå{5ª¤qÀ+"ò–ˆ”ÈÛ»5ò1ÕÜGB2!~·>ù„Íó糪U+ ÀÄôçûöeB‡4>óLêöîÍäôç‹E'Mâò5kØ2`3CíjFÆÕ#úD Ã8BLOS‹ÈhœÅ2Psüç¿pöÞÈôvëz¸r+\Ñ~® ‰Èùªæ$ñF$Å}ˆ#›)êgE¹-h°k»o¸sçòSðùE‹Ø½x1«ÿøƒäM›Ø—þúO?åüÄDJuìÈG¡ö騸_aJÛ0Œp³#c¹Ÿ#ЏýXø œDDÝBjü ³~„~˼í€w#à«l<6¹¤²„ð]!íÝw¹ìûï™ã|Ô¿?ç¶oO¹ êjF×?ò;wæÌ«®âƒ;9JŸG˦²ÇÊlF¤‰Ie,"Wã²Ìgo„§A¥þ!å¶; cÀ-L<=€Ç"{ÇFÀ+¶CÅ`M ²ù½ü2-)Ó§ßö›'NdöÛosy‘"Ç*_Ô[N9Ö½;U‡ áÒ!CøhÎve××ñe›)cÃÈcbN‹HKà]@àäðõT(vˆIJâp¸~HH Ô¨Q´ ®¤Œ9’ËTI2„N«Ws}p¹ñFjgÕ·+"ÂÉlF$‰Å5ã—€x¨˜_O†ÄƒÑå³éк4,¯þø¨2LN&íÒKy»aCÓÜ<ôSRR8|ìþûù¼\9ŠgÔö´idéã [ŠÃúš~gYæõ Ã'1åÚ$"=p±€7'ÁÀ|0Ͷ¤4´¸žRÕû£-‘Dä ਹ6¾my2fhSxò:œÂ®®ª¿G["Ã( ÄÌ4µˆÄOº½&›``> ÄßdôXâżSDêFäñîcS-˜ž@Ô¿›• M¼¬3LFÞ3Êè‡Ë†<9‹<1Ö µŒœeþJÔ0ò=ß~™â¹Dý{™¾,)ÿ;ÕË:>À0ŒŒ‰%eÜÓ}4_]'êlÁ¥êŸpõb/gw‰Åµz#Tõ ð¾Û›x.,/IÔ¿›ÁåÖ áP°ø BÁ0Œ ˆ e,"‰Àynï’UD}ª/£r$5] SøŸ‚Q@xH†ƒñpË…DF±æfzº"Loëe|VU·Fì †q1¡ŒË€8Þò¦ÕD}„‘Qé¸jìðòvÐs0ò9^É=íö¦·‡ñ• ÿË_.¾Ÿw]‰û?HúˆÈ$yYD.‘R{ †a1bM-"ï×Âë`IHk]:QáÀÒfÏvYpâã)Ò³'56¤ÜÆ$þ9[·lá@ðuíۓع3UBgÌ`û´iì ]ÒëÚÂûg«Uõ”Я3b ¯ÜV5!q;ÌzNM‰žD—v… —úk€ üþ~Ü:÷À+–úÓ0"C¬(ã9ÀYpÍlø`F(×LÊÅ»w³ÿŠ+øà²Ë¨òÖ[\~ð ‡V¬`KÅŠ”©S‡Ê>È7/¿ÌÚ2e(:i5oN½eËØpà‡N=•Ë—³©S'¾MÒÇÁƒ—T5>—·kÄ"Ò˜ÄÁI+aé PöpÞKrWKxþF\ZÑO€«âÀ8…¼<®ª;ó^>Ã(ÄŠ!‘Ï»Z-Û<±‚#U¬HÜ{ïÑmÊ–wïÎ÷“-Hhܘàð¸qt:ùdª´nÍ[Ë—»úqqÈý÷Ó(Ô>¡n’ß(!"UuG–Õ˜EU‘AÀ›°¾!tì ³Æ@|ZÞIñ|xñzœ"þè§îíü€ˆ\| ü læŠÈkÀ‹ªúgÞÉh…ƒ¿f,"E8’ž®öB_';Ó÷®»8EéÓ‡©ªGëÌŸÏî±cY_º4rÑEœ9r$S—/çH©©~ä–‡Þg£€2¨‰Q¨QÕ·8C}a;h8”&Olúv€!wÃá8\t°ËUõHæ'où}°CUŸZ•€Å"Òßÿî ñðƒªÂ‘~½•qp€ý¦M©¼~=ÛRRHͨnÛ¶”+^œ¸‰Ùjû—3‚Caš26žu›N…Ãat"¦„w–ý`l?H+¬.TÕ-éó ùf)¦ª»Tõ^à| 30ODºDàyF¡$”qPìéý¢Åið4u±bHj*3«[¢ œœyÐʾàúc ̉:î®öCJ¸íïм?|_ްYXïW¸¾=Ôyæ\ë&­Uõ—,äKUÕCAûëUµ?p=.¢Ü÷>9‹a'@WÆÞ¨Ä¯a­)C.FÆ7²«fM*gVwÑ"v¥¥¡:Q1Ôö3.‹Ê‰žâfùU}—ÿzhQXx.\ø œÝÛ‡ÎÌåw.EàÖÖPý s#$WÂå@~¸DUw“ Tu‘ªvÁYY¿&"ãD¤^an ¼2öøì6ëBJÜîËeüÚk,«X‘Ä¡Ci\§X1´U+ÊnÜÈþeËX5x0íÒç“mÛ–üQþÈ$³a8Tu!pp° Òâ`ÎEÐá%¨òOèÜ ^¨‡ù_f•…þç@£Û¡üh}$U÷ÝLš«êPUM ƒÌß­}»“Dd¤ˆT<Ñv £°+®MÓ€pñt˜8)”kfÎäª={Øß¥ ^xV·ÞÊ¥?üÀO ²¹JJwîL“/¿dÞí·3·M¿þšvì`÷wß±tÿ~R[¶ä¤:u¨Z·.¯…&é=ÍàÙÀ^UMȶºQhñQåîþ ”>öl‘T(™¥vC™$ˆ;Éå %ö'ÂÁÒ49 x@UCrýË¥Ì%€[;€#Uu¤ú3ŒX"V”ñ«ÀÍP}3l)5ݰa4NI!uÄVŽ]y%Õn¸3+W&a×.R&OfUðùêÕ)ñðôhܘ‡qxåJ¶ ÎüôA2§óå0ål`ª¶ÈÙ]… äœeó%ñÈ–Tà¿8÷¤¯Tuud$<ÿ"q?pn{ŒªFÁ‡Ú0 ±¢Œ»@ ðÆÔ§¡c> NpX ñH. üSUжDFÁBDhÔªãüë«ãFÎ[qK2WU“2i*O‘ÚÀÃ@ àïªúU4å1ŒüL¬(ãâÀï@9èõŒ›m™Žçµz0èV¿ÓLUEUÃÈ#D¤ ðP ¸WUвH†‘\ªzPD&×Á”æÀ”hËt¨}N:URa[üV6Äï¥à»*0« ¤Ä5½x—<#9œ2…˜RÆ"2è ESá¥à–5Ñ“fv9¸à>HN–à‚-˜‹‡a¤CDjâ,¯ÏTÕÏÃÔîõ¸Øß>IÉCÐc-ôÜ ï‚¢9ø<(ðUEø¨|Zõ'¶wªê¸pÈlNbQWæu ~/Œ.Þž÷’l-͆À¶“€}@GU—÷rFÁADÎÀ…ê,‡³¼ž•Ëvâ€pSá@±4豞þÅ€O”Õñpß©ðy=8°½yËÛ0B%æ”1ùAÏ q+ü÷)8#§‘öƒ`EsÜ:sUŸwýFÁFDÎŹCm†ªêÊ\[ø.Ö7Ðj+¼=ΈÀšôÂÒ0 ,¬âLzªêïáïˈebRˆÈÀD $l‡—_†¾#ßó¼¸òØØÐ¸_UŸŠ|¿†[ø 'W㦯ÀËÙ&"̓ªº,ƒkª³Ÿ´¢ïÿà­ÅP,‚t©ýšÁü•@[ŸÄÆ0B"f•1€ˆôÞŠCуðoÃèÙ‘ëqt=¸çH)ïŒPÕ»#ןaÄ>~Êy0¼,.VÕÅAõJâb ´¢iðìL¸s}ÞIúT]x -¤ n„|¡Ï mÙÓÊ@DÎ>Á…̃G>†kØ5inÜ~ü|žOØþ'p³ª¾¾> £pã­¢ïåHîgŠרêB)‚›šîæj?>†FÁxóÁSà±@Lw}îgÃÈ–˜WÆ"R ø8ÇIƒ3§Â ã¡ã®Ü·¼&nê S»Â¡xpÐ]U矘Ԇa#"e¸©ë–@Ü”p/à"àqWsàBx3ŠQî®i‚ƒÜ¦ª¯DO£ P(”1€ˆnÄ×Ç)åj+¡ù|è3z…0ZžR^m?µ€ §ÃáâþÄ>àEà) `áÇg°j\œÔjâ¢g%¥à¼_á‡(Ç8$Ðî/0·6°h ª'ðÒo 2àוnÇH—=~7”Ù ;¡Ü.(Ÿ{ËÀîò°§$W€”Jéš<¼<®ª[óâ ÃpˆH\4¬6Pò ¬ø(<®K'ÊòRЬ'¤Ååum‰ŒüM¡SÆü”×¥@WàbŽSÌY’|³ÖþBU·„_BÃ0²Ã»1.ŠÂ 90:%aéÓþÝ—[útU]•ÝFá¥Ð*ã`¼ñG_ª•J@>{‹/‹U5¼}FáFDÞn€ ɰö}HÈGî~ƒ×ÁÞ’À˪zG´%2ò/¦Œ Ã(ˆHQ` PÎ7óa„»ÞgÁ¸VÀ& ¶Ú®‘ ±”BÑ0ŒÂEÀ§`ì· 8œÿJï@Îæš¸¸Û†‘!¦Œ Ã(¨xŸâê;¡Ó¢ž·<£ÒuTJòòvÄC0bSƆaT:»Ž«ÈF)vëFå—^âÌôÇﺋzƒS/»ëO¬´ 9'2ÁˆL†QP©í>e;*ž6?®½–æ>ÊicçGâ#páüùDxT]7w f¤„Qð1elFCDJãÒ,µ÷ÍÚíŽü9dæÜæÍ)GÚ›oÒå½÷˜9u*Û/¸€ò½{S-P?.Κë×§ø5×Pµ];Ê·×µ+ºt¡BvýºR+0M]Ý'¿0Œã0elFA¤ÆÑÍ{a„:f ë~ü‘¥cÇrñë¯ÓúÐ!Ývs´;ùsôhºõíK mìXÚß|3­7l`ßyçQ}ôhþÜÖ[oqùé§“J¿Pw´8Î]Ò0ŽÃ”±a‘*G7ì%Ä)ãÞ½ù¡rezõ¢Ý€|uø0‡´yóØýÐC|õ \>lºvåÌž=ù,5•Ã?΢F¨Ýº5e´þý©Oñ_dehýÖß$wÕH>£àbÊØ0Œ‚HPü÷Mq„èj´{7¾ÿž%+V°nÆ þ>7b+~ú‰?L·áÃùbÑ"v‡×¯'å§ŸX~ß}4ß|3;ù†©© ­ßÍÅʊŨ62Ä”±a‘MG7)CÎ «4ý±Ò¥‘Æ©µoû›5£rð¹Q£˜{Á4oØø–-9õé§™z_«ÊxAÓpQü ã8L†Qàð™Ñö¹½59RÆ"¨ÈñÊxüxÎOJbo×®¼Þ£íúö¥fà܇²1)‰=_|ÁU+V°fÞ9o‘¡A}M‘ÛƒäüID*ˆÈÉ"2Ũ¼+" E¤wP{׉Èr_7gÔ§a9ÆÏˆm® C›ÑÓ9-m ‚|¼™Û7b…"p$ÎkOà=œ2îP‚žFÀ]ÀõÀ)@uà6n&pg ¢ˆ´Äe'™•¾39 x—J¬Ð¨TåÀÙ@; !PxÖŸ[ +ïŽ^®…¾^Ó søcÍpSà/øþëŸÃUµ&ðð©ˆTÎàÙ¬zùí3€“ý3¢¨ª;x ‰?> XÜèëÖ‘ËgÍý½‘ÚôiFPÕIÀd·÷ú%°G¿bÍÅôö–¢0¶‹ó3U¡G`Ä‘ñÕÀrU]¥ªk€ùÀ5é꾬ªëUuð …?>8SDNõû7ï¨ê ú»ø·ª.UÕTœò-t~0 §¼ªc8’³Ôm½$ôÞSÕ´ ë‘:ÀyÀ-ªº[U«êLº?nÝf½ˆÔÖ+qÓò陜""UpSÏÿêù—¿Áú¿§4à ªþ™Î§p¸ªPÕyÀrŽ}y0 #÷ Ò ©"ô?ð¯çB÷éû€ƒÀ=‘½}#¬’Eä~¿¿7UýFPÝ߃¶÷ã×hýºÍ{ÀM"2 ¸h•IÕ¹UM‘½"R ¨ˆ§]3ODDUW‰È §ˆŒz­3裰SU3²¬¬ƒ{‰ž2JŽ{qPÕý~ê»3p>ð$n$ÞÁïÌä3")ÝËÉ‘çgƉ¡ª‹EämàøìRøû&xlqô$ú[+øá|¿ó’ª®Žž,FA¡˜ˆ4À)µ§pS®àü÷†ˆHCU]B;£ÿk€yªº*“z›pkªˆH ,Qê;q#ÈÌ\ÞÁM•ï–f"Û: ¢ˆ$ú(=Álæªêu!ܸÑoœŸœ \‰{ÙÈÌÀM1ÿmÃÈkîΚÀÓ Ás0`}Þ‹ñj=Õ×ïÌÁ-]F¶Á€'©êCÁø§ø²EUÿ,ž^Ë¢ê{@/ië ÀÇMxxAD‹H¼ˆœæý|„[wŠSÌɲ˜¼."ÕE$ADkâ$Â@IDAT7o]E¤¯ˆ”‘*"rµˆÔȨ-œ2î,ôSÐßãž×rUÝ‘É5«Eät)ŸÅ³0 #Løå³K€Íp¨Ü~+|Q‘¹;e\Þ¯w ‚ÃqÀoÀªº?òwoÄEpS·ùèþ 8ÉoÏ‚•Ïœò f,nÊ÷ÓÌ:SÕ]þ˜†Sú)¾Ê#8%û&ð‹—¡\Ðõ{çíÀ iÜHù¿Aû½q¡ò&{Ù»ùëÃM3w?]që:1˜Š[¸P}ű/)pL€;ò8ÿé¿dp`¿Ã0„ªn.’a_"ôxhBžXNßÙú …ýå€$àUÝ–'7nÄa‹Àå݇V«êßÃÒ aF.‘spF¦U… ¾€O¿€ÒiÙ\š vƒ+¯„©—ø›îª:'ü}±Ì +c9xgÜÔ"‹é[Ã0Œµá€ sç‹ÈÛ"2TDÖúó]²j/ˆpÁ:©j €ªTÕýȳ2.3ÔÍÁƪú³ª>‘‰¬oˆÈÿ‰Kõ¸Q\êÇD®–ˆÌô÷³TD>‘""ò€ˆ¬‘ "òŽˆ”óõ§â¢¼%"Óý±¯DäÌLúîàÓ,n‘ÞåË0 Ã0²%[eŒ‹õ|™ªVÃ%gx$H!%â21íÀ¥<ü.—o(#îÀdU=”Éù³Cd:#NîÃ)ú“8œk¸”Šm|¿piûãÂ[^œ†‹öõ’¯!.JÖu¸HZø:¥Ówêã{ õ©>÷±· Ã0 #K²UÆ>ý`EéSb¶AU~SÕ×U5UU?Â)«Prõ–åØLPß®9_Ô~UU×ú,I×xC,p÷{Ÿªîò>Ñ}€ç}ýd\~ãkE¤˜¿^™¤ƒ fnº}“O͸ —ž1«MÃ0 Ã8J¶#Xygqø°§ ÊUI¯PCM¸ 7 œÕù"R\U3‹ÁVŽëqF_9ûÒ&©åëתàÖ¬C¥.óUpjÆÝ› Ò0 Ã02$Keì§›oNöÙ‘‹ÃÔ÷×Àó"RNU“2èw6°—ôáíô糘ޮ´]—«øÜH;ý({ÎX,}ýœ†³Û¤©j¿^g†aYOS{…—\%"%Eäzàœ0õ=X|+"çŠH i'"ãpÖÓ)À`¤ˆÜ""õEäT¹çf”7‰Ho¸õ$0VU3 ÿð7Ÿ²±2ð 0FUgR?3þ\!"×ùÔŒUE䩚Ãv Ã0ŒBH(\½q†Ns€ÀpŽNínÇ¥ fGS"¦gÎo/ è»àüŠŸfÏ?ã®ãý‘{áR N>Æå3~. y_þéåýø›?ž>Í"ªúï{ .ã `pP•Yéîeîå` °Ú·³ç+Ý—šñ{œ˜MS†aÙ’/"p… ïŽ4Ê’†aF ”‘±a†aäÿ?D{™dy IEND®B`‚vips-7.38.5/install-sh0000755000175000017500000003325512303144055011531 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: vips-7.38.5/config.sub0000755000175000017500000010535412303144054011507 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-08-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: vips-7.38.5/depcomp0000755000175000017500000005601612303144055011102 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: vips-7.38.5/benchmark/0000755000175000017500000000000012303140253011523 500000000000000vips-7.38.5/benchmark/benchmarkn-osx.sh0000755000175000017500000000235512303140253014726 00000000000000#!/bin/bash uname -a gcc --version vips --version # how large an image do you want to process? # sample2.v is 290x442 pixels ... replicate this many times horizontally and # vertically to get a highres image for the benchmark tile=13 # how complex an operation do you want to run? # this sets the number of copies of the benchmark we chain together: # higher values run more slowly and are more likely to be CPU-bound chain=1 echo building test image ... echo "tile=$tile" vips im_replicate sample2.v temp.v $tile $tile if [ $? != 0 ]; then echo "build of test image failed -- out of disc space?" exit 1 fi echo -n "test image is" `header -f width temp.v` echo " by" `header -f height temp.v` "pixels" max_cpus=`vips im_concurrency_get` echo "max cpus = $max_cpus" echo "starting benchmark ..." echo /usr/bin/time vips \ --vips-concurrency=xx \ im_benchmarkn temp.v temp2.v $chain for((cpus = 1; cpus <= max_cpus; cpus++)); do echo cpus = $cpus /usr/bin/time vips \ --vips-concurrency=$cpus \ im_benchmarkn temp.v temp2.v $chain 2>&1 /usr/bin/time vips \ --vips-concurrency=$cpus \ im_benchmarkn temp.v temp2.v $chain 2>&1 /usr/bin/time vips \ --vips-concurrency=$cpus \ im_benchmarkn temp.v temp2.v $chain 2>&1 done vips-7.38.5/benchmark/sample2.v0000644000175000017500000175142012303140253013207 00000000000000¶¦ò"º ôù³³ñ³d®é­¯ ¯Æ®D­q²x¶~· ´íµÇ´Þ´ f¯!¨ ç¢õ¢ O¥}±ï²¥²_³•±­« §ð¢r¥éª`ª±«Ò¬ª&¨þ©ާ˜¦¨ôª[¬̳Æ´|±-¬y®´¯B³D¸ñ³iªü¢£Á­Z®«b®ã¯Û¬­©(¢1Ÿ’§,­¬s´[À­¬îŸ­§´©ĪºªL¥·—Þ˜£(©éD¬Э5¬1®™³µв©é¤)ª©®ª S®÷ÁóÍe½“¬3¨o¨m¦ä¢š2¤t¯±·S»S°Æ¥Àœ7—+œA¨·¯ ­©!ªè®m­”­”¬B« ¨!rª!M¯çµw²Y²(µ³€³ª´µ¹²›­p«¯«B²¬¶ªµ ¢·"d¶!ü±f¯Pµ°±ª±Ò²¬«iªÖ¯âªÌ«;¤Ö£ò¡¸c™êš›ð £’¥ª­­§ˆ¯ñ±Š«"¥Tœ?‹[™è¥h¨±½·¶³€¡™@¡e¨Þ¤„¨š³…·´”¬¦ø£ ¢2§)¨Q¥8§‡©¬¨Ÿ¦„¤D›Ü æ¤»¬ ¨À¡g U§©޲»·§²™£Éšº˜ ”»—4¡A§ÿ±¨µO´ ÷² Ô«À¥w£ ¼œ?œ ¦'¯ ¸G·C´Iª°¡P›Ó’ ¶’ m”¯M§Å´ú² F«%éªÅ©è¡‚—ž’gšþú®ü®Ø >Ø ¿Þ "„Å'¼¬F¯ò³ù³¡­«¬C­T«>ª-¬c­g³³o°B«2¦ª®Z¶5·nµ­¶³mµ0® @¤Ô¡§¬§a¢¤ß­I³ª³N°›³D­«¬ɱqµP®ˆªš¯´ µ´Ø´i²° Ä­!ª! ¨!§b¦S­+´–·ù¶ ©´ª¯ ¬g©’¦ Ô¥•ªî­k®Û«/©©Ô©F¨‡¥å¦Ï©€®{´ µe´ò³ê²1¯¹´¹Ï·û´­þ­c°–¯&­!T®!¯® ´«Ǩ:Ÿœ‘ ¨þ¬ÿ±,¶—«¦œ Ìœ›/¨e¨¥x— ”w˜8œ©¡]ªݬß®5°¸²°_®¤¸šÊŸ`¡{ "0¦P¶7Âg´©¥¦—¦b¢Ç› ¢¶­¼³¼D¸¿¤ê•;‰û’ø¢K©ª«aªrªº¬û¯® ­ A¨8£ £!Ñ«ø³¯¨±p¶¶«±U³.·E²¨  )¡è®KµD² ª´"(²V¯i°´%­ެ!¬ªh© £l§G©¨Ф8ŸÑ•³”8“õ›Pœ‰¢x£/¤Ô§µ¡³›(¨H± ­Ƥ‘’ésŽÚ“©e±„¹¦³2¤Ä›`œª§¤Û¨3¶µ¶³™«š¨ws—ࢰ®C¨ï§û«<«ؤP¨ ©I£A¥û­§¬åªs£¼¢Χh¨^®Áµ¶´‘§œ0šÏœ/œ”¤V§G°µG²ó²îª÷§£ª3¡¹£¸«ͳUµ•³¨® Ö­¥ˤœ ” דžU¨õ°"Ú±$á«"ñ«å©\˜ ;޵‘e¢£´þâÆ €È ß ØÂ«¬ ®]³ѳ;¬Áªø¬¬.®P²g´æµæ¶`­—§„¤á«³Ƶq´×µ›²X¶ `® œ™©­Y¤m¥{±´@²ö°6¯%«~©ª7±O¬þª½­)³ˆµáµ«³"±аM¬ ®©ލ›¨’ª†®¿µ)¶¸µN±û®¬«eªãªÏ«&°K°û³#­ئ ¢œ¦¨Ũ\£B¥©¬¸³ܶµ[´ö³Q¬ѨÕ«W³ñ·6°c«²ªÊ«! ­" ¯#¡­ ΫD¨±£Àž©Ϥç«Ä®.¬@§SŸq˜é—%¥„§5£÷–y’]Š… ʼn£§«Š®#­Ó±^¨ô¢šÆšïŸ™ “!¤˜M .¤ ŠŸiž¡à¥Á¦Ç¢6ž¥ˆª‹¨>¥À®ò¦H–×…×tœ†¥¨‚«­©Õ«ä»Â u®@¡ë u¦õ«.ªå¯åµð±Ŭm±¬¸š¬²Ÿó•xœx¯¶Œ²®!1¯ ¢¬ F¬5­«Ï¥ú§K¥¢¤ œÌŸ·¦¹¦f¡Y–ùˆí‹"“†œO¡£ KŸÜœ˜è“¾¢é²;¬{£Œ|}Z‡²ˆ/›ö¦²”¥½¢ÛêšåŸ! q§m´Ü´ ±a¨ñ¦aša•\ž5¨3£Å & £ž‹™¥û«§«§@¯§Œ¡òš–C•$á¡\¨ü²A²ݧ˜œ3Ÿª¦§T©¨Þ¯…³x¬*­ªÍ¥ŸšŤÞr +©P³ °„ªõ«£®€¥©&§ í ö”Dœè§Û¬!°¯"z©©(¥äþ…¦Ž –¦ŵ︵èÃxƳ—¯®´Í®èu¥ ¨¬²dz²ã³d²Ωgžp™|§{° ³‰µà¶±²è«ç˜w’‘¨±¤©¢b¯­¶+µ<°2¬«¦9¤¸¢ú¥Z§Nª>¯´>µ·´«²b±¯`¬,¨¦í©o¬–³*¶a³l²?¯«¤"¤Ѭi¶…Æ ¾¬µà­@ UŸ*¤ب§"¡$¡ §¬±úµ²³«° ¬ì¥œŸÞšÚ¥y°©®P§ Φ᪠À­"à¯"œ¬#©ܨj¥Π/—†Ø©X®9®åªR¢i›—L§í§aœ€‹`‰À„ | ÊŒµ£î®+ªK¥v¬=£H˜ɦ`ªç¤šr’š—n˜oÒ”¯žx£§=¥ 3¤Ǧ”g“s› ¡¯šÕŽù”àŸ£ §t©fªÖ¦$¤WÈ ©Ñ Ý»Á¦¯¦O§O¥§;­/±Dª¥ ³û¾[¨Þ˜‹”¦·1·sµL°æ­_ª§¥ä¥¦õ±úŒžáœ›¡ ê¢…œ2Œ‰‡ ȇʕ㢧?§ ŸÁš‘u“Y–v¥x±©­E¡­ŠX‚ÛŒ}†G‘š1”@™õšÀ˜äš[›Ò¤Ø«L­¡©ïŸ³ R %š‰•МSn˜ ”펢’#¤î©Õ¤»¢ï©}œy‘·‰ƒ÷‰]™á 7£Á£%¡]›E P¥¥¬A®Uªà¬Ñ«³¦2¨°¨¡£•–%”ÆÕ›¬§Á£û§å§o›Êš·£% ÛT—z£ˆ«جö¥Ç ÖŸ’ †öݤ—²>²†°F½DÂ~·d±°>¨o À¡R¥ͪP¯ ¯ȬÔ¨è+ d˜]𣻩·° ³µ—°Z¬­£Œðˆ³¡«;œ¿˜¨² µ$­©§ƒ›X•³˜—Å›‰¥­êµ€·æ´E²«®@ª§Ü£ ¢¥“«²ºK¶w°þ§¬ŸÖ•W•pt®è½n¸ñ9©¥Ÿ3ž¯¥W§Ú¨T¤ñ£§ªp®ù³²µ­Xª:¤¨ iš‹Ÿ·«ƪ}  Ä¢  ©û­ü¬¶¨¦À¦Ý¢Sœ~”Ö—™¦´à¸é®   ИÊžÞ«*¨µœ‰ªŒ†’qŽ—K¦ð­+ Þ•Ížc ¨ ƒ¬³^´Ь^¤²—”ß™—\˜èœ„ t¥õª_¦”¦§œÑ¥‘)•ߘù•¼› ¡í£Ó¨^§5¦. ‘Ý®g±Ž´xªǪ¾«§ ¨I«¿ª¸¢üšC²t¿¤ñ™U¯DÅ@»µ_¹/²B¨eŸ#•蜫Ÿ¤›%˜·››kš¹˜ušS•0‰»‹T‹¯•¸¢^¦Ħ1É•~ƒzŒço§¥­lªò¢`’(‘ “·|„u÷wí…L…@ŽV™7™â™7U¡¤¦¥¥¬—Œœü¥û›3ȕݖJ’8‡Ž£Y¦… œœˆ“YŒ…¦…‘V—è”3©™t—4j£+©˰°°L¯†©— ¢{¥ê¡<šp–“Jˆí‹«š­àŸ¨¡Í È“å’Ò›õ›!Ž’ÙžÞ¨¨Ÿƒ—šåŸΗ훡̧Ó¨)¤ä­M¬˱®œª¼ ¬¡~¤S¨¨‹©Aª‰©„šÈ•’Ú#¨Þ¨¤X¤Ù£Ü®д<®á” °i™ð¤Иá ™Ë –«ª ¤$œ;‘¡”y•‘—Ý¢¯¬D²¶J¶Z­¾¤QžMœÈžW¡§¦î«v½qÁh­k—“ÊEß‘à˜‹œ. ¼Æü—ʤ£éÚ«l¨²§y¨!שÏ«‰­f­©¨[¦ͨ¨Ü£Р@§é¤@•—P£Ÿ«•©g¤Ï¡‰£‘¢es–C”›šª‰µ¶¬  ™ v”6œD‡Õ â𠣝²åªƒª §e“ ƒÂŽ›È«·p¹ O·®œ¨Šžh—ëšÜˆ°Ÿ0Ÿº¤Ȭ¨ªo«(ªð¡·˜%‘»:’’˜™¤•¨°©¤¹Ô“‡có˜'¦š¬y®±±Ê®óªä« (©ç¡-•^ž«§y›x†q‡ ²ˆÎ ͯ©Õ¶¬µå§¶š£òšv¨a¢bœò °—È’H‘”ˆ­–•w›¢¤¥£¤¯š¹‹yz  Ø›1¨ö¬¶§d£¾œšh›‰#p r ƒø“…›…žCŸfŸÉ פ§’¡ó™Ëžý¨"›Y–ùš3˜Xj¹ƒö”ê¢. µ™]™À˜ìš ™íšÓ—ešÒ˜ï”ªŒÒ’Y˜m–}™©£ä¨c¯E³ Y¬!Tªo£ ¥§¤¤é§žª‘Õ‹’É™_›œ›$›•–I¢F¢ˆ— –fŸ³£‰¤eœÜœV¢ø¨«©©¥°¢Y›³œê¥B¥"<¢Ÿu›y˜£ý«W­ˆ§‡¥î¨¡¿žˆ”–§¤7±r°×§¬™” Т²èª9Ž8{ G…1™¦½—8Š|Ž=‘­™±¤¦ã¨¡&¥æ¥,šú•…ži£ÿ§w«O³g¬8Ÿ!±™·À ”£ ¤°¤x¯G·%§‰–D‘w’𓆖]™ÈšUšÞšf—“Ü•ª¤[®c®¹¬T«UªÁ«<©©„ª¦¤ä¨¸¬{§ÖŸ÷¢òžƒ•’%Ÿ.£ Ê¡è¤£Ä ]ž„›• ‘7—Ó£&£C•,’¡˜:‹˜à£©¬ü¾„̼V«¤ ¡Š£vÛ„ ™4«g¸¡¸F·³¾­ö¦o«ž1¡8¡T¡Ô v¤{ª¶§¦Ø©&¥a¡(›?Œ?–Ó¢é©ç¦X £•=‡~ŠŽ\—´£è«-±œ·@·6«ñ©’«§¤™ª‘ŠŽÜ„cŠ=§V¶´—”)ž ªd¥}šÖ ¡µ¬¥á¡‚¡ûšÖ˜>“î“À›»˜C—™!¥ÿ«£qžr˜îˆW{ —„p›ªÙ°=ª§£Í£äû– }f{9Ž$—@—» C¥ò¥|žü§%¬U¤ž8¥­¬¤P¤ì¤-£·žÜ¡ƒ•d™Ÿ˜X“Ä •¥l¬«†±µ©š¡í›î™“E™óœ6žP¡0¦¢«϶̶ ®«#À© ©\©¨¬¾¨‘¯Ͳ&ª•ž5•Æ•tœè››¸šN™l¡ ¯t¯N¨ú£x¤¬¤æ¤ÁŸº¡ù¥Z®L´α2­;¢”™ýŸ[—1’‰ߊD—¦)±а£©ƒ¨m¨›¢ŒÚ¢á««³Ó³‰©B’ž‘í˜E©{¡«n†”þ£±ª y¤Ž ‘[ŸŒ©Á±¨®ä³·Œ±0¨»©.¤€¢F¤Ѩ³¨R¡¤ô¢)£€¢ ždž þŸ"gžC‚šæ¡P¢¿ª³°›ªž”›p˜2–xš÷¨ °ıµ°Ѳý±¸Ö²£¨±¨q¥ £²¨J«|¦è ¹¢ ›å” –Û ¦žži¤¬}«H¥N¢& s–¢Œ3‹ ¥—ž~™™–S™D‰=‡1›T¦é©ܶyÂð¶øªæŠVy½…Æž#ª²óµt±ÿ²°¿¯ð§i¦å©Q¦¡k S£b¦½¡|Û¡ç¤ߥ,£}•`‰!Q‹ý“ð›W¤/ Ÿ›“?†ÿŒ’òšŠŸ!¦â¯èµ¸—¬D©„©*¨/›ŸŽ²Šu„Ü…f¡ÿ¤.“u„㎠ˢ¼›sžܦ¼«k¨w¤Ο¬•’—ÉŸ ¤­ ¤žmªž¬,¡y›¾šDÚˆ}šä©˜­š©µ«ß®/¬ä®¦¤à™¤ºþÅ•C—S˜‘£©œ¦˜Rš2¤l¬ë§Í£B­^² ª…¬ί@­3¬¢«Ø¡>™±œžq–âˬß±ÿ··ù¬7¢Ôœ—™‹š)œß¡'¤Ö¦Ê©Ž®¶ƒ³¨!©$ª$­³°®"³£¶ö©Ê¡™ œÁ¤h¥²¢¢é¤e©\³z´ ®¾¨Mª¨³¥ž£&Ÿ~¥¶¬ѳa°*¯§>  ‡¢+™’Œ÷Œe Ƭ¢²õ° ¬øª§8žÁ–8˜£¥ÿ«Ö²Úµ©Ž“‡;”ó¢YœH’ò•œ¤‹°Q¶§Ì’E•šI§H²¶»´t´ø·¥²Ò°¬ô§p 4œàŸå£ö¢1Ÿ÷¤?§&¥5¤¢Ç ,¡^ ÿ¡È¢±¨þ¬š¸ZÅ ¸¥Ä\—G˜cŸˬ[³°д»¶LµŠºhµ(¬©‘§ ¤u©)« î©Á§‡¤Ü›)’f™⤠L¤ ”£ § Ô¬ Y­f¨ó¦¦£<“…‹ ã”BŠŠžXŸ«•‰w£œ¦¦³°5¶ ±9¥J•®‹?ƒŠ„¢ûªf«¸­v«¾« ¡ªX¯#ªp¬û­t¦"œ‘Ÿ²¢­£לÔ™\™¤Hªf¨à¢*• Š(Žbšöš¶˜ ‹‡å…×r™›ü é¨Ъί´«]¬O¦ Ô“BˆÞƒÓ‡³‹˜—A¥Õ­å™¿†+‹Òšù›ª›Ö¡‰¢ѧ«­~§À=·¥ža£ýª©¨£°¥Q¬”¬¡'™»–š”Á©¤µ%¤Ô•"#¡·²ŵè²g¨â¡ë•ûšáœ©“O˜¸¤9§æ¢¶™u›- ¢¥×¢ž¨¸¬”¬…¯þ¸ ¹o´²§¤•.•aœšGÛ©̳”ºÀ´‘¨£›–™/›¢‘¤S¨­S©—£ȧ˜¥D§°£Oª¼®j²8´e²L¦nŸˆ”~˜ü u¢¿§ ¬ °3¯ñµÈ´½°Áª»ªs©…§ £{™vŸë§|²T°ë«ئø¢Ñœ›¡ÀŸ%›z›ߟªM¬­Z°œ±*«’§6¥ʦ³¢"Õ¥¨ü¯ûµƨõ–Œù”zMœÙí¡°q¶µ÷¨Úh•­•–˜7¥°³#·е}´X´ó¯>­ªZ¥u˜’Ûâj¦ž§ÕªŽª‡§¼¥ܦƒ¦g§c¥v¥{¤y§|®!ÁÀÉŒº@«•£*›¢ž#¤›±µ‘µÿ´à³±§³g¯³ª‹¨Ô¦Û§=©›« ͬ‡«¥S›¦•?š¿¦_ª ;§ ⨠ª â« †¨ñ¥‡¦b¤»’,— 3Ÿ,œUžŸ¥¦â› ”Ç›ާ³‚¶¤®p˜ëŒ­‹–ªv¨·£·¤þ¦¾§Õ¢#¥™öŸĪÀ«5 ˜Už¡Õ¡°œ´›@¢ަ¶¬n¬6©è¦›æ‹…¼‘]ÔŸˆº„¬‡«ŽKœªš˜Øž¹¡o¤P©«O¢ˆš‰‹É€ï„•¹œÑž­©ý¬ª“ƒS‹Åš šÆ›¢ùžÛ¢¢«#¤G›‘‘—7£á裷ªŽª8¬Z®«« ,‘9Šß„1”Õ²þ­‘”‡"q“ª®î·¬N£PšF‹S•;š;ˆ–ÿŸ„¡+¨©¦®¡Ëž ÿ¤£X™ ’ªƒ°›²г€²u®¤¥÷”sœšx–Ç”a¢n¯ ·°«8¥Ý¢¯œß–]˜õ›98¢"¦Qªw£¬˜žŸŸ| (“­~«¯ ­©¦¿Ÿ“!“m™ü{¤€ª~®à¯0±>±©­ –ªY©8ª ˨ M¢¨™¼š)¤›­¸®x§?¢!ø˜óa—QÿïšÅœ¦§‚­Ÿ¯߯³$¶ «©¢r¦¬g©!ç6¨Œ¯`¶…©š.‘f“Ž˜˜ž¡¤f®Q´¦¯ï¥ÞšÝ™ •¹“0Ÿm«A±Ÿ³ε(± k­8¬ª}¤ ’‘ 3¦÷®,²R¯f®¨ªQ¨™© L« ´« £ª˧›¥¦#ñ¯@¾O½X³3«&¤G°Ÿ÷¥ÿ­ö³É·J²ª«‘ª ã¬!¥¬ ժ⨖¦í§4©„­±®R¨ŸÊМ ¦ª¨ªâªNª¶« gª ¦•¦T§‹ %–€—E™–››«£° >«B¦Ö©_®¶+µ%§y“&A™‘¡ªL¶T¦A——™5œÏž¯#Ï‚ H“¬¦²ªóž€˜ƒã›¤= yŸ¼¨ ªó­ ͬÖ¬ý¬·¨q”›„ˇ~û«†û‹Ä–Úš£R›¢“¶–›ÛŸ¥E¤C¡}™Ÿ‘m†ò«›Ç©³¨Ù¬£÷…•yŒÅž 0žÿ`£°ó¢”ª¥=ž˜˜ô«&¢°œ¡§'­=¬)«O© «‘m‹x€«ˆ§—¡’ÉŠ‘t©>¶Q©©Ÿ‚_ƒ®”bšV“º•¸ž^¡ €­ò÷§ê¡§«ªQ¶Ž0˜F¨R­=ª<¥K©ˆ« ¨3œ§–ô P—ï‘Å—¥¡y®Sž­œÅžÉœž L˜û— ¡Ô¥Õ¥yžÇ’l”Ô’»•4…yŽª¤ ª.¢š¢t õ›~Ž™œëœŸ8£¡©q©+«|ªªx©’« è§ç Ñšœ¯¡£«©¨¥#‚™")ì|®œ™«™T˜ì£ó¬O®g¬!›´!"± c¨˜Ÿ ­›¯Ĭѧ™­Úµ1¥&™¾•½˜Šš¾œO ̨ ³±M¥¬ç˜²šêE™ ê µ¦­ß±ö±ï° …¨Õ§ɧð£O•˜†¦­ ±]­9¯ªצ›¦·« S­!¬¹¦¡9¥#[« ȱ ± ƒ® ;ª½¥6ž k¦¦ªŒ°y·+²g¨ ŧ"¾©"éª è©1¨ݨå©-ª¤­F«/¤Ý›ô[›|›©¤[©%© K©̪Á¬ ª §^¦Ũü£ —^•k™¡¦µ±µ°Û²´‰µ¬±á¯ Ÿ¥!Û››ã£±¬=´;´¼¢Çmˆ <Œju  z +“4£ã«[¢Мå¡ã¤À£¦£º£‰©¬ «¯ @­ W« _¬§eš‹w„Ôy€y–Y ا¨¥Ú§ ¡–O–Ÿ¸¡—¡o¢:žÕ™¼—” ˜âŸuª­A­žê &w’‹£ѧÕ¢›¡u¢(¨Ž­Ú§S ¼p¥(°9¥ƒ›ð§-®j§Ô¤X¥‚¡Á™Y•ڌ嚭·—ëÍ£¬´÷²ÙKŒφ,™ Ÿ«žË K¤‡¢S­ƒ´²ªX¨ ®N±Ì©¨Ÿ ¦C¬gªܤ=Ÿ=Ÿ[ª6¬¥¤„£¨Ò¡y™8—–Ñ5–𔬗”8 Ö£é3—ò¢µ§#¥ œâòŽß‘é“@S’¤œ¦Ižž™3›®”ÍŒmŽãäž·™¡—„Ò¡›¢ ¦§§§á­è¨vž›˜¥™ã™¦¡¨ͤ/–銺{†„é’›“ä“> P§(¨ ­ ‚¨Òž”“7™ ª7±"®¢T– Ä™ü–IS圤º¤ì°o­ƒŸÙ– ñ™°¡w¤O¤¥ï§–«û°=³G¯º¨¦¬§b æ“›’Ǹ¦R«Y® Q« ª5¤áœq L¥à¨Ó¦d¢΢4§Lª¡±! °"®¯ !ü¬ª¦’$Ÿë¨!©X¬ò²®h¨ +§!Mªª¬ª1¨l¨F¨’©t©&© B¢¤›rœc—˜o¥£©\© ?¨%©Å®°d§\¤´ª Ò£‚• “¸š}¤š¨ë±º´³³¡¯¨t§ °¤""¥œ«R­M°ª°P®n£x•»ˆA‚¤àw s} õ•ú¢«Œ¦=¤¨%¤÷Ÿžf¢ª-« Ç® •­ ׬û­j¤5œv‘ˆ“‚‹¤å«÷±!ˆª!˜¨Ù£3šëœ*§‚£9œ³Ÿ¯M›D“Y±ž½¢ä£"«u­У N‡  … ¨ŸI¦ô«3£ì¡£>¬̳­W¡Sœ;¢¼­t¦áš˜§š¯©¦¢ž©¥ü¢š}—𔇙XŸ ¤Ù3‡\„‡ d±\®™˜Ɔø‡·H–¤d«1ªª¤h­#µø­r¬ 4µ6´¬¯'¬0´­ì¬l£8W¡œ±W°{¬Òªº±j©M¢¹šÜ—õ˜Ÿ˜2š…ž±¤ ªü§Ì¥y§C¦ø¨¦£¿”Ì“‹  Õ£K¢"¦½§¾¢ žô ˆ–ƒ—­ž¨ë¥ˆŸ>˜°œ“œXœ<¡>¡œ¢A£r©>¦Ï¡tžŸ›0¢¥À©3¡Б¥ˆÔ÷„µŠG€œ„z’¶ ´£²¥š¡Í™–ê›®¥V¬Ȧ_›5“J•g•L™à¥ƒ¥¤ •çŸʬ£¬™ }˜žz¦G©ª«;ªº«»®‹­%¬q¦l¦§¸žÑ™óœ™¢˧fª¤¬ ʩԧӠA¡ª¤¿¡¶œ¶¡G¨­«®Ú¬÷­ ¬í¤™OœÀ¦°ª¨½§ß©ªðª-ª ªªW©Œ¨ã§§,¨w¦ç›•ã›™ˆ™U£5¦Õ üŸÏ¥Ü»¤Ä¨­ï¦©÷¥X—ÎŽN•T££« ¬­­Q²P±—°ʪÁ¤™¡ œ"Ë¥ °½´”²²F®1¥L6„ ã… ‘… °‰™˜¢¡ª¥C¦ª­¥; ™¥€ªÝ® í ü®+­Ì«ù¡Å™m‘Q‹â‹¡ò®2± ó"®!®«<¢Š˜Ñƒ¨‘¤v›ï)›݉"‚w™|Ÿw“åœG§v¨@ › ·¬?©”¤þ .Ÿ k¨²,¯K£K–<—P¨d¡¥”í¥Ú®Q§Σ㨧ȔŸŽ(žA«›®e ¤»¥¦E« 5‚|ñƒÑݘÿð¤®D«h¥C§]´2¯ݲî¹°³#¯V²Vµá°*«°¦ï Ú¨=²"±&ª.¯¯Ыù¥ Ÿö U¼¡=¡ö û¥ Õ©­¬Š­ ª7¦É©˜¨°Ÿ1 9©Ö©P«i¨¤©«©6ª¦§¢=¥m¨ƨRª+©'¥W¡• 3£,¤$¡¡¢¦ð©A¨b£>¡z¤\«ߪ3ž¸‡ ZŽ ƒ §€Í}*„h–¢¥£× {A¢ʤ䥢˜•?—4}™y–µ¡;¤§¢K—›ª¬x°¨««¤…žT £‹¬Á± ¯o­a°­i«¨¦,¤c¨¡¥º¢E¢Ô£9¡‘¨;¬ ¦ªµ¨~£Ÿ¡ú£ 9šYœ ¢¥Öª³¬…«"¬}°øªΣ¥©àªD¨w§\©ª¨ªrª F© 㪠”© â¨E¨ ¨8¦ ] "F” L•œ8ž™Ÿà¤£,™–?P³ä½i¬I§i®!ªï ’]‘²žS¦ý©±©p° ´_²ªT¤á c™ 0¢ׯ[³ݲıs«Ê£¹•†3‡ÜŠ–@›£ï¦Z§­¡ó£!ª‡§è¡Ã« ÷­“²¯ Z¬E©›¤¸‘ª!‡†ÑÄ¢î¯l®s°9¯|©’œ~Ú•M£"¥©™›˜´˜”'rrŠÁ“d…äјš”£Ì´0¨ž z œ¯›¥ ®'©˜ û“-•&§XŸç’X¦=­l©˜¦G«1§N¨’†Œרf³…´©Û¤§@¸.«ßÚŒ„zvƒ˜þ¡¥_¨©á¦^¢¨«¯³„º~µ»³Á³€µDZÁ«P§"¢§w­®›© ®9±Ù¯w«ºŸ«š ›]œ±¤ã£Ò¥'ªÑ©—­ª®«¨ª¬(§"¢¢Ĭ:­Ú¯¤¬;«)«R§A©¨v¨àªì©4¢ë§‚¬ƒ­†¦£‹¦x¥½¡¢¢¤’¦D©â«Ý©j¥©¨ò©¼©CŸ¼™Ê›!Ÿ‡¾ˆÿ¥ ì§œ¤ý¡*›Üš§Y©°¤NœU—>”›¿£°žl••©§4ª`©t I£ ²é¹ã¹„¯‰žî—=¢„°¯µѳm² ±d®,«ЦŸ¦ë­°¼¨ΤÀŸ(™b¡^«/¬¦¨4£p§d­+ª§¢>¤ª¦ð§Y§¤y£›£ Æ­¯3««“«›¨,§‘¦+¨4©þªÛª °ª ™ª T¨ æ¨=¦ì¥¹£ )–"¬Ž™ã¢á¤g£Ÿ§¤¥Ë 0›Ž™b3 ÿ£mªN¯c¯l§~œ€•iš*¢Ô§¤+°³¹³'©{£*œ˜· ¯‡´‹±r«ç§]¢žŽ!j|  ‚ùŽŸ¥ªÚ®O©™¡Gœ q§ê©Ú¨W¥>¨a­§°4­§«¢h–‚„æ~Ðwªxˆç›Ž 3 ¥ m¨ŸÇ“l‡ ŠÅ•ršìAø‘â‘´ƒ_u:H†É Š Ɔø~¨´·¬«Qœp BžœûŸf£̘™´”M‘C§%¥8žuªY°Y§›£™ž€–6‘•Ü®©±¯+¬«bµ”»2©ÙÛ’öz˜…d¦¤­”¥L£¦<¦¢Y£/©c¯ª¶z¸ö·`² ¯¥®¦¨å Cžs¦aª®­ª®­¬¯P°{±K Ü—ˆ•SšŽߣO¨«¨¦?ªÛ­à¬È«+¬9¥Ÿ<¢]«V¯ Н Û®¤ª!ѧ™¤£D w£n£Œ ‹œ¡§Ò« º¤¢¢°¤‹£/ ¡!¡Ö£-£ºªuª¨‚¦¦|¦žSÀŽ'”ÿØÿ{ކ3’üšQ Û혞“¤—-¢ú¬ܨ¹£Ôž[ðžîžóžâš 7¨G¬æ­¨g§¾²ÄÿdËû%ÞÁ¢Z™¤ À¬Ÿµ³¶D´´?±>ª¬¤š§½°µ*¬i¦r¢iškþ¥{ªߦlš˜žá¨K«ö¬%«i§ü«#«Ï¥… a˜Þžy¦‚§"ªª3«p¤ð¢M¢+¤E§Þ©Å© ÷« « ô«r¨Þ§»¥vœŒM~ŸPª=«P«7©Þ§ʦ£PŸœ4—Xœb£µª.¬^«E¤Û™ª˜y¢&©Ü›x§„¶]°ޤüŸ5Ÿž”£­b´0±§ÕŸh %R‚b„ާºÑ ¯ПY—å››¤…©® ›® y­0®d­¤ªD¥ ¿–"i„&x .z9uîu ƒ‚mŽïŽÃއ[“”Œ ]„ ¼‰—‡ÙƒÖ~…Ë‘u•µ„†ï†þ~ ‚‡èŒ-„Æ“^¤ö¬.©טDŸ¤)£xš±~ ¿O”Š•¿¥Ó«ž­ݲεò§ 1Š"ɛҌ㘢³¶²`¥¥اͰJ¶§ö N“Æ}x…B«–´œ¦q¡?¨À¨¨_¨©^¯ y´œ·²"±s­Q«˧ZœN–†£ùª°¤©\© =¤ q¨¶¯>¢–ë–šA ¥žœÁ ©ã­Y¯Nª ¤M›Bž¦9­\­¯­+« Ƨٜ혗êšÛ™’šö—¸œ_žI¥¾¢žOŸ¡q é Ÿâ¡¯žŠ¢½£!r¥!ï£? Ë f™{'$Šè‚âw ˆ”ÅžÙ™¦‘ˆ‹û‡Àˆ†—¡Ü««ƒ©p¡r£ œ_™îœ™Ÿz¦œ©á«ì®è®ñªþ¯+Çüðçô0ñàø!­µz¢ý§ä­—¯#´µ´•³Aµ&¬G£ë¤Ϋõ°q§£¥8¢í¡ £ § Ÿ_‹“”'¦'®Í­|«t¨«ƒªd¦ºž:˜#šÊ£¤W¥Ò§…©w›ì˜Š™ûœš¢i©e© ìª ø¬ Œ«á¨‡¤ÏŸl–¥ro–ù¥Ÿ«~¬=¬¼©Û©¥¿ K˜Õ’€“ã™N¤T¬1­&¨@Зq¡Ê«Ù‰øÉžœ¥÷¤¥\§µ©>¨î«Ù±ˆ®‹¢½•û˜–˜Üš¿ | î¬YÁâɺ³8—"ÈŽ ¹¡~¨û¯ ± Ÿ® R¬ è©Ù©à£ä‹ Fs žr :})„”„At€…d†»Ã~ ä‚ ?€ n‰ó’NŒ C}˜‚‹ó™~žN“¼‘ê.ˆ,Œ¸ˆ –dš`™¸”ß”#Fšl¢ˆ ŠŽƒ Ü} Žcš–—…¤#¨Õ©=²b·§ ©‘p”ñœü|>”‘ž8®i³û¥a¡¥¬_´?©A¢¦› Œ´‹{§\±i«­«>¬1«XªÕ¬’«t³±‹®+°G®õ­ ªv¦˜“žm¦Ý«ï¦í ^—$;¡‚¥”Ÿ ˜4—ÿšÜ1ž™‘€–b¢M©L¬´© £ïšášì ý¨¦ûª¦ª è§F˜kŒæ £”d”²–'•P— —œTœ;š@œ Ÿf¢ŸÓžìŸ› øžœ­¡ •Ÿé˜ƒ–ï”ÿô… xõq0{ Ž –’.Œ‡Š„® ™-Ÿ\§¬|¢D—Q•’~”ŽœŒ£­©©â© ¯ô±a¦  K²ùÖû"$×ý}¬ ¢ä§!« +ªË·/·Õ«‚¨ Z¦4¤M¦s¤5£œ+”“›\£è§)¥™£¤•Ή)“÷ªZ°®™¨¤0¤Ǧ!£îžQ–—eœz¡¤;¤X¤šÔ„•~–*›¿¥|¨^«)¬¾©ª¨£Çœ[˜B—ÿ”†m˜§ô®k® Õ¬ Ï«;¦3›Üኬš6¥Mªª}§d¬—L ±¨ízt ®€ ¯”Œ¦B®ذÀ²«¯a¯,­¿¦ÍŸ£“™¢¨¯³¹·®ʲ¶¸ú¸DªFŽ$j€ ¹Ö› ¨j¯_±¼« d§! ¨j©`¤ŠÌo ko å~š’ Y”ú‹P|rˆ›“È6‚ƒ‚§™e}’N™› #šOކ”Š•o¡tšè+žŸ­œLÄŒ‘“?˜5”µ“‰‘Ç ß혞=Žôž1¢‰¡ Óª{¯ЍBŸôšÍ•‰ ‰#œœ—ªO¬|¥S¨9® ³0ªš¦B¥1 Ôþ}§ñ­̰’´²²Q¬6ªB¬Ÿ«_°ƒ¬«€®»®©®-ªZ¡nŸrŸ7šv/¡æ¡|”¶Š"ΙF›ðžïœ5›0œ'™l˜=“Ø„ì›T¢°¨~¨™¦¢0žCŸ`ŸŸŸr¤*¬§ m  ’Ú ¤é‘C‘¬ÛÍ“ƒ’—HŸO¢ˆ¢X£ S e› ”n•¹™à–¹™I•˜‘+‹Æc†¿€ú‡¸Šw~a˜\ž6ŸdŸïŸG–¿‰`‚Ñí’LŸQ¢V£Ò¨ü¨á¬£!ÖÌŸ8¢‚§‘œ.—ÙDŸ"Ϥߣš¬ý±™¥õ¡Ÿ”¡ì¡þ—V—Œ¥„yŒœy£¦¢Ž¡È–Þ¤šÅ®?°G© r¦&¡Ò¢Ø ›§›G–å“»– ™¢žØŸyšŘ·•\Žw–“›š¥7©Œ¨Y¦ë ã˜ì™Hœ•Ùˆ¿Š‡ša©9ªÛ©j§Œ¤g•|ˆî€‰6—/£•§k©‚§Ažjž¥É«‘ƒx Mt ¨ª*·µذ@­è¦Ý¢w¡±žk–±>¼¶¸¢µǵН¨õ¡Ž“9†¥†ñšê©‚°¢°¬ ¦"e©E¬8¨û™ó®vÊ „• ¢á–ꉱ˜ Ÿ>›°­Š8„£ŒC˜9§²¤o§õ¨£š’/† M|š¢-ª2­E¨Ê£I¡¶¦"¦ï¡^Ÿ1˜ ˆv…§“€š¤ë¡Ô¢ Oœ¦øªDªC« §ŽªÏ«!©Å Ï“¸U–Úš‹¨1§>¨±¯]°ЫÉ«$«¨û¦ùª~¬ˆ­²ϲ¿­¼¨Á¨ô¦!©ƒ©·¬å°q° '¬̬R¨\«J§´Ÿœ™ú–º• ¶‡)Š ™V›Oš¶¢ ¤`œÝ›f˜¬‘¾Œ w‘ù›9£W¦‹¥Î¥…£ߥ¨ ¦ýæšǤ3©#Ð¥",¡: ë—n‘öŒ€K‚@†‹Š\ ê™w Ë£g¦W§@¤þ¢ÿþfžÿýtœÿ“ž‘I—'˜žÛ Ó™F‡L‡ ‡l~ ­ƒ  M˜ú™,œ r à£M¦ŤΟ™_‰Vƒ²ŠY—k‚ž+›§¤½«U¦Œœ!Ö— Ä£*©D¦†šWŠ\›è tœŸ §’¥š B¢Þ¦DŸ“•d™ê¥)‹˜RžEžH¦)¤ëžÓ¤(¬,ªš¥c¤‘¤’¢‹ øhœö›b•Rš/¥Ö¦[Ÿ5œºžØšÓŒO‹Á蜧•« A¥ž6˜–^–ˆþ…¥€p“-¦£¬5«ë©!“¤"‰žP”|‹<‡?•‰£›©N¬¡¤$šŸén­þ‹ w{ ×s «Žì­N¶S¯€¥¢×—›•!Ùœz µ¹£B¯æºË»¸R±uªz£î¡›“#’<—âŸåª[­5ªt§"ù«.®|­(¤ü‹&mƒ %”¥§¡¡H›ˆ¤s¡u Ÿ—ï”ÅŠ‡»”ô§¼¨E¯°¦s“R—e  Å¡<±« ¡ žR§ü®’­Ù§|—I„^½•·Ÿ,¨Q¥}§B §£€¬&µG®/ªÊ«åµþ°²³³¯E¦)¡a¢<š{§P§ŨƱ°r°i°R­ ¬«z¯Ú­¬¡¯ @¶-²[«©¦$™wž w  ªº´µj«߯0°Á¶“µލ˜Å„ Û~¶… ‘”Ú›Sž8·£±§á†˜ç ‰é†‹ ÷•~›Ý¡{¡œá¡j¤t©øÀK¶ÿ­Ô ö›×¥™«@¦¯ v¨ M¤| ‹{ï L•þwœ °Ÿ®¬ʪΫ_¥ÿ £þýÇ£þü_ þýižÿü&™¨” ×!ò¥‡¦A¡ •=‡¹D†"Žá—ÿñ§kªͯ*«§˜¥˜¥ˆ ˆšŒÿŠÏ”$¢¢¥¤<¨þ¢1ªI¥‰œ ò›|¦Ò¬#­G¥ë“òŽ ™óŸTšÊ–z¤e§5 £ª›¦!žF§¿«áše’Gš÷ ƒ¤í²ʳð«f¥†›G˜þ—ÅŸð¤Õ¢´¡*¡+¢.ŸuœŒ¤2¨¥Ö¦Ý©¡¨¥„šù˜G”G’t—Ž£‚ª4¤á ®ŸY™4“ðM‡ž…P—«¨§¬®¬!ß«!ï©!÷¨y¤ã¢BŸé£Ѝ­;°;¥~š ŸR©Œ­S€ Žpµo Ú‹H¢ߦp¥ )š O—µ;𛣡¢r§×­ë²ß¶w·g«ü¦œœžj™ã“@+‰ÌŽ€›˜¤¤h§-­ˆ°´® ݥ݆¥‡gQŸˆŸ Þ¡ÒŸÒ¡±œ}œp™a‘É—ÿN©§¬ª±<³[¥ï™Õg¤k¡£’N$§a§«–ÉŒ«•Œ¡ý¦¢°š† ƒæš¯«p¯j§‘¥Щ%ª7¯´H¯ü¬E±”¹tµV²߬e¥c¨D£ ž¾««©¶µª´³@²ݬ‚ªܯ¤³¢µ˜¯È­í³U´UªÆž9º VŸ1­¯$ªš¯.³¯¹¶ä±¶•à{ >y=Œ b™ÚŸwœËžù¡¦¤›û“^ŒÚ†lj’ ƒ• ë›É Y¢nœç›õ¥m³Áÿúq¼þüz¸þ¬ý3Ÿ¤­Þ¨|µþѺýдþþ‘ ýœƒÿX |› 6Ÿ§Ì­D´þí´üb®þþu¤þûyžýûå þýŸÿþØ¢ÿýtŸþ=  f£š¤Ó¨ ¨!¢Ú“‡ £ ˜¥œ¡¢ò§w­}¯\²S­ë©k¨K©Q¥Σ¼Ÿ) ›¥Þ®Õ°ú«¤@ŸåŸ÷§ò¥Ä£ƤE§{«,«e¦yœ¡‘ë›/¤§ŸB™r«¼«K¤,¢a©§" ©¥§Õ™Æ×¥?£§ª²ü·w«º™b‹›Š¤“D£M¥Ÿ ¡\¨©)¥žŸ¦¡R¥«ú°­§L£2£¬£áž&ž¹¤ó© £Ÿò¢¤³š`7’–AŸu¨«¬E«X«ʬžª+ªò« «õªÕ° °‰©ŠŸ¨þ§ ­ Tr7f ¬i 1z‹ ’D•ã‰!Fˆ·„½ˆã”µÀœ\¦o«©e­X±D¢ƒ™dŒâ“G’¿Š~ï‚…a›š p¦ ­Ò² Ù³!©~—z‘üŒ–ˆëï–³˜¶’›&¥¢¤½¨þ¥ÒœÍ›þ8­ç°è±²¯x¡ÝŸm¥J¦çüŽ(ˆãœ«¡Ã} z„ìˆ K“S˜+›¢‚!Iƒ5Ÿd´ µΫÎ¥¾§!j­ 䲕¯ §­ õ­þÿ³Çþ°·ªõ¥Tšiœ–ꚉ¤¨â«¿µk±n²̯@¬Ê©RªC«øº%®H§¨›­Ȧµ”üœ 2›*õ‘ ~¤°ªx«²´Y¶9«-¦¹#| X}Ɖ z–Y›šf™ì±¢ß™a©‘€Ž Õ— _–Ê›® è¨[¥ Ú§v  9§~²’Âÿý«½ÿý½ÿþ‚µüвü?³vº[±*»ù ¾þù³½þû”®ÿû|–ý7Š z¡ n¤`¯þ=¸ÿsºý*¶üþ×­þü£þùüýûýý^¡þ¢ÿþt¡¤¡ ­¥g¨ª"©#«¡Š ´‘ ®§d®±E®V±ʲ´ ±ªÌ©Y§»¨àª ©à«°g¶Ø´s©.¡ÄœPž%¡f§Ϫ/¢tD¢Ÿ©ɯ §¸™1¡6« ¤¹žD®Õ³·¯¢«â®Ÿ«¡¦·¦‚Ÿ/§®«}®(°ä¯'¯R¢ö‘¢€dŠÝš¡¥"¤ן¡¨…±o¯l¨;Ÿš£0¢n Z©¸´Ù¯”©¦ǧò¨¦§¢¡Þ¥\Ÿ!$˜å™G£Jžw–êšn=¥R© ª1ª®®ı©­ϪøªZ®®{«%¬y®î®¨ ž¡ g«!ÜwBr Sn ˜m­sU‚-…žy J{ ZƒφXŠŽ¦ ¦w¦§£?’ ö†7‹¿’ê‡@ɈTŽU‘-˜•ž8¥s­O± S²$a¨ž=•gŽ•†o†3Œï‹ˆv–‡¨¬Z¯(ªýžÉœ•¨̪2§^¨„›’›?œŽ›çœ†‘FŒÑšDŸßù€ /‚"†­…Žª‹wy —€ß›šªj«û±—§Ü¢ «!2± „® .« Ö¨ ‚þÉÿæ·9œß—+u޾ŽN—"£D«ó³r¯6¬ô­¶®á¬@¨ššìœ › ‘ ŸF  ü˜ #—ü$rµ÷?8²ÿ'NƒJ‘&«»²`°!±̲2ªy§û™b‡)ü„¡‰–ל1še›F›à˜ª”–Ùœ –¥k¡þù©ÿ^° w· aµ=µŽ­ ë¨F± Ÿ½ÿï¾ÿÿt¼ý¶ú„¸úâ»ý5ºÿµµü•¼ÿú¾ýü·ýý¿±ÿ ¡Y—ÿ ò¡ÿ Ý¡d¢ü\°þQ³ÿþH³þü¬ù—¡þúøœýûSžýþÑ þþ? ý£¡ÿ¦ ¢¦ͨY£´šô’I‹I“  “® ¯º¯¾°>°¹°Ž­¨7¦ £M¦ª–«ƒ«¼±v³ê¯¢£ÀŸžÙ j£ó¨f ý—Œš ܧ›²Dªîœ’žߤæ¢1Ÿ’¦ׯDµ²¯²e¬í¤Û© ¬ƒ¬€±—´(´Zµ[¬A¤%“ ã…¶ƒì‘•œx˜[™`œ&¤ «×°)«šC”¢¡à£é¡ ‡ª »°  ¬ S©½©¨ ½¨Õ¦Ò£`žŽ›’…ŠÑܘ›™æœ¡g§m©(¨•¨Eªq°°±¬š« $«!¡¬ ¬H¬!­«°7ª'œ,›4¨2ƒ Tvp›g ám ‘r ëkzÕŠ¼Š ‰'‡™‰p‘ª—ÛŸ“¡™¨Šý{ƒ|ÍŒg™šŠ ŒÊ’¾•Yš/¡¡ò§ã§¸§. œƒt}‚eˆ–‡‹•î¤`¬™±BªÀ (œ2žsš.!ª” ’ž–E”S—§#¤é›W›Ú ,–ÜŽß‹^’÷’Ý—mƒ,z€R’ÿ”퓾£ø£7ž©W± º® …ª ®› æŸ ›Ÿ 6¢þˆ!ÿƒh~݈7ŒÜ…ù… —裩­l¦ §ýª¾¯Œ°"¦”‹œ|ÿ…ô•B–J”i ˆz“ú,ÀLƒ—Ù²w¸™±5²²¥—œÚŽ®†=xñ`ŒTÿØ‘÷“aš™šÇ™º—¦—Ñ™šY Ë»ÿqµöD½ùD¿ÿ¾ÇKÂÿÿ†Ãý ¸ý z·ÿ w´û !»ÿ]½ÿi¾ý9¸û»ºûÆ»ü ºý¥¹üË»ÿû ¿üýºüh±ÿ©Ò›ÿȱœþKù§ÿûq­ÿû‹¬úÊ«ÿû{ þúÔšýûážýþ³ ÿÿ˜ ü¯Ÿý¦žÿv ¡¡ Ð í˜ s” J– ’=š ¼¥«$¯6¬{ª¶©–®¡¢[¢˜ œù¢ê§çªͰ þ¯ q«C¡œÉŸ¹¥©v£‚™œ”ÆB¢d¤ª¥5Ÿ9›¿ŸÁ©›¥›“žõ¤¬°Õ¯=©’§Ö¦À¥³¬!±Õ±·²b¶Ç­Ÿ²‡r‘’šœ1Ž5˜Ù ©¤à¡›6ˆ —ˆ —…¢.¥Û© A¬xª Ψü©…ªø¦#Ÿ"K ôžЖ%ˆ!È‚ù`ŠÒ•H›¬œéœ°¡b¨¦c¤‡¤û¬õ³]¯%­V¬g««ƒ«ªP¯=«G’—Q¡ØŒO‹Ë~ªy þn jr{r Äq ǃ£•š±” õ–“Õ’±¾B–‘å„÷† 9–ŸØ›‘ ˆ‡“eš#œœ¹Ÿ2¡ÍœþšÙšV–Ý„ŸvÒ}2‡A ’‹›\Ÿ¤‡¬ð± ˆ® b¤_š]˜’"Ò!ŒŠl–òžá¤k¤$¬¦®7¢§¡‡¢UŸ¥î™ÿfœøª¾¯'•󉈔”E“y‰WŽ5™`žvªí³a± Ù« rš ×á¶Œ )u Öƒ(Œ ó– R‹„8‡ЕŸ$˜¯œ¦¤:© ¨ŤtŽ[w Ú}¿ˆUŽB†vz | û²Šð›š±e±Ϫ±¨º˜˜Šû…T‚§ƒ 'Ž"Í•³—Ü•ý–.š1›—ýšš†š ¾¥¡ºú·óä½÷ÒÄþXÇÿ©Äþÿ"Àü¦Àü¾ü­¸ýä¾ÿÓ¾ý¿ý•¹ü߸ýV¶ú±ùó·ú[¸ú¿ÿýÍ»ý<·ý¯ÿý› ÿú4øD–÷Œš÷1£ÿú ­üûm°üüϪüþëŸüü/™ýú¯žþý.Ÿÿ ý9ŸüpœûHžüÙŸÿ-y™Õ˜ÿ˜¬™­˜”š.Ÿ •¢x¨³¨µ¥þ¡˜¢ÖžÞ™¸–““Og£Q¥«yªù¨l¢™§Ÿ¨M¨9¤ ĜޞT ª¢BŸQžþš±—£\ž®š„–:šˆ©˜¦ó¢¡™ŸTœ“¢£º¥+§µ³Ȩ”‘_™| Ù¢èœ  í˜“œ“A•W‰_ ¿‚ f–¹¢½¤¦§ͬ+«…©F¨ §J£Êš#xž ¢Vœ–|üu ÷9±™½š@—¦T¤Ú¢óRž‘¥Ù§Ó­ϱòZ­äª5§B§(¯±ž¤ ›÷¡“»•_‹¯…Ô~Ÿ…Έ´Š{“£c›° ¤¥£´žú–ˆb‰8ŽÅ‘Ç™E¢Ý¢ý¥; ,•1Šî˜ïœK™óšu›—š¸—Ÿ–¶•…‘耓zþ… Ž“èœ¨§²«±³Ö²å­ £ªT§ ¢‡ŸxŸЛ{©"«¯µ¬¤³N°ë¦û¢  ‰¤Ô§©¥4¬ö±»Ùªjž´‘à—_£4™‰]—0¢\«¬´¹²µ¨  ž‚~~o Õ‚;„&|¤š› \§«û•ψ„î‡ìŠ!•p¢§ ª M¥™› ”IˆŠ€o’…Ž˜Ò™ ¡À¦’§à±w¬ ¤÷£*–²Œ L‡Ž  å”U””™›¤pšÍÙ–èèŸ0œtœÁœ ¤ª5»ü¹öÙÀúFÅÿhÇÿ-ÀþÝÀý‚Àü¿ÂýÙÁþ‚ÃÿÿË¿ÿü¼ü^¹þܸÿÿ³ü ¢öϪù¯û[¹ü¹þû¹þý¹·ÿûéýù´¿ýýƤÿõ3˜øÉ¢ÿúI¬üúϵüü§üþ ýýšþúœÿü-›þ;žüæžüížüDžü–ÿþT™ÿý.šû±›ÿû¸›þýZžÿþˆœü¤ýxœãº£J¦Ò¤þžýŸ· c ¦ž”˜—¸Ÿ¼¢b¥)ªy§¤J ®£*¤e¡ë¥é©·¥EžG™þž{ L ´ŸÌžÕ§¼²Õ¦†šE“ö‘©˜ª—êšfž!þ¡¢€¡CŸâž¢ñŸ ‡Úˆ›Ѩ§P¢~›ôž“¡´£Ï›/“ª‰Î…{…¢˜X£ǧت½°N¯'©Q¨<¦—¢ß›$›"¼ (¢ôŸ/„îw { ÙŠ•“Ý•]˜"›½˜k™„ší›:“œ"§̱l²L«û¢[šïŠ©ò«´¤œ£ë—Ä–t”?”x‘y“¥–ÙÍž‰¤ð  ;¨“¦Z¢ƒ™ <Ž b‹Ž‘W—€ ]©7­û©h ª–ƒ“,™_™9—1˜̘²™¿˜•—9˜4•uˆŒ†¥ ’6™+£X¦å§3¯#µʱôªµ©Á­L¯{­« ª¿­¢­¤®S°Z´É´ä§¡…—Wœ¥›«¬º´ ¶Ø´‘§Àšxœ Þ©L£V’ —9¦à¯Qµ®â©  Ö„µr Ÿ}$’™É«uµq³v§<žç‘öÑ™Y¡˜¨@¨íΦ÷ª ¬ ’“ ¶˜þ«l±Xµó³]¸Tº!°Ú¤ø #ÿ˜â‘Õ‘ô•Y™¯›¡Ÿç¨ø›àŽä”«›ç ª›Òž÷¥„¯¼Àÿ¼ûµÁÿÆþ½ÆþæÁþ»þ„¾þÄÃþÇþ_Çÿ½üâ¸þþµþ]±þ‹­üxŸú…žû_¥ú-«ÿûÞ¸þûîºþûºþû1½ýüHäüþ´Éü‰›þýjŸÿû¬ûú¶ûþ §ýÿA¡ýý8›þûüþCœÿ$œý œþ\žÿ(ÿïŸþ|þ`›þûÿþûÜœýýåžþþÉþý­›ÿýœ¢ k£I¥Q¡ó¢-£•£$§N Е"•š96¡à¤Ç£¡å¡×¥Ë¥…¢à¦j« ª'£™œ_šõž 'žI‘©¡±ñ£Í•ç“‘Z1–¡«1«O¬›«ª¯§B¢9¡[›¦‡h‰è—H¥ ¬øª©¤˦£§5¢•Ÿúœ©›h›§¥°"µ²¨²þ°’©j¦À¦à¤ÕŸ»3¡Ê©.§c”„Ê‚ìŠÆŠ’ŽJ•™vš [–!@˜;“ÀŒ š˜z¦£­ĨÕ¡ ¬•"q”´žá¦›¦¦´•ç‘f•‡š2œš¾—˜a›¼™¸˜I™9 Ò›§™ã’O‘€ŽΓŒ–.š¯¦W­¨§¶—옔´[’”³“Ÿ–Õšÿ™šÍœŒ‘`§p–šÄ¡š¡Ú¤“®·¶T¯Шe§¬ΰÍ´P³í°©¬Ï®¬^´¡»§§›yŒ‘œõ ô™ì£ѱ¸ƒ¯Ù¨W®<­W_‰-Œ€¨vµí±V§A¤_› ˆ|.€Ö”Šœޤ ­Wº^¸ˆ³üªŒ¥`¤ª®¬ö²S¸t¹§ª…µ÷¬§£È«¸­γ–¸›»O¼“¾p»ó­^¢þ•¬› •\☙ ´£ /¥‹©Ũþ«c¡z”"“J™¦ž»œN IJi»oÅÞ¿ÿr¿ÿ9Âþ\ÃþK¿þ•ºþb¾ý¡Ãþ©Æÿú¾ÿOºþô©þúK¨ÿ  é¤þCšÿûžþüvžÿüߢÿûá­ýü’»ýü.ºþüŸÀüüUÞüýâÉýrœÿ›þûv§ûûþ°û¥ü þý–¡þþ) žË›ý•–þí›ÿ1š ÿžþËœÿü„œÿúÞžþþˆžýÿûœýÿ¸™ÿÿRšð¡ ¥)£“¡3¢a¦¤ª3ª ЙUâ“ì– Ÿ·¡Z ¸™žšï£‹¨ô§R©+©q¨® –™Å–ޤž%›÷›n¨ð«¹Ÿ“¿‹`‚¬Š2•X¢.±P´´Œ²®«¦ý™3™–™Tõ›á¦S°6´ã³]ªA§…¢nšéœà¤X«`´2°„¶_·f¸+´+³ë¯L¨^§½¦M¥T¥•¦5¨7ª ¥©¨ž«–a“ƒ”͉Õ…Wט¢Ÿì¢ ›™3—Õ–œ•}“ˆž©Щoª6¤ïž¼›- º§J¢“‹ž‰ª•^Ÿ‘œ¼D‰y‹†’ã’õ”<Ò‹EŠí†~‹ñ’Þ˜¢ž¨‘¢ɘK‘r‘õŒüK”‹“y‘µ–2Ÿ›¶œšDq…´‚ŸŒP¨”7˜ë£h¯ÿ¶« Ä£Ò  ¨.¬ã«ù§º§! £©ÿ«‡¨9³Z¿}›QŒH…#žŒŒÆo‰ Þ“¯§®Ù­8´c´k¬%—Y‚Ťè¹ˆ²¦£§žΑÀˆD~T1’NŸç¤«º¶–®¾¬ùªªâ©ö§ü´VÐ tÆ6 ôž¹¦o¡S§£²²¢E®Þ¶H»À»‰·ªû‹ ‘ HÏŽß Ž© a­£¬x§«ª÷«^¥¦˜Ž—˜ðšvœ¢7¹ýàÃÅÿÆÀÿG¿þ ¿þÀþs½þq»ÿ »ÿé¼ýœ¾ ¸¢«ÿþÉ£ÿúŸýöþþŸüÅÿû!žþþh¡þÿ. þþȤÿüŠ·ýЏý½ú8¿üý§¤™±™þünýüo¡ýþžþÿõŸþýÿŸþþ8ŸHŸðœþ­•ÿÛ˜ì›ÿ#þ´žþÿVœÿüàœÿúÞŸþýžþþšþýL—þÛ™¢¦¦¤v 5  ¦¬ªá©*ž–˜êŠ„ÒŽ –Ø™ š–b˜Á¥´«e¨Y§ Τô –ø‘H–c›ˆ›˜šš8¢  í›–,Œ‰S‚%ÈŽ$6˜„¨0´µµŒ²îªD ¼”Ö‘ô“˜™.§vµµí¶0µ´*«·  –٘ᡫ­¶)¶’·’¶Ê´:²d³Û®í©¢§È¡Ÿ½¡t¨»©T©©© =™Wo Ž4ˆ§ˆ™© 8£0£®¥æ¢çŸ—EžQ«Q«„­–«¤„Ÿš£"§Ú ƒ‰¯Šd‡›ÉŸØ “Œ kz "} "Š’(‰ÝÇ–ŠMŒ˜…ú€‹†D”"šV¢§¦šÒ@„Є …Ÿ’ü—Ö—˜ÑŸ™£‚ñ˜ö€* 3z M~·€ă®ˆÅžë²´´í§ Q™v•®¡ !yŸÔ–°”Š›‘Ÿ¶£M¦ž©k†—€ñ‚&Þ’ú#¹xò ˜~ ‰d•Éœæå¶ ¬ÿ§.ŽÖw 8y š1°±°›î’—…‹~bw~{Ù‹I™iŸd©b»r¸s©À§ ã©¥¨!Ÿ*™K¤/½¥yíŽFŒéM¨ñ¢r†˜cª¶ϳi¯ ©,•~ŠLŽ ´‘âŽÏ”ì¥W¨Ö¤wžv¤ì¥r —Õ›9—˜½œd¤ýïÁüHÂý÷Êý:ÅþI¿þŸ¾ÿL¾ÿÉ»ÿè¹ÿ ʺÿÁ·ÿ ·ý)¨¤þý] ýú?žÿüþýØœÿúºšÿú¦šÿT™þWÿþAœýýЫüí¨ÿ»þüıýþÉ þ3˜þšþý¢™ýýìœþý,›þýëŸþýþüYžÿ€ž¡œÿט—ÿF›ÿþ\Ÿýývžþü—œþû.œþûÕŸþýþý-šþý„šÿ+™ë j¥C£‘Ÿ‹-¢½¢zžWšSÁ›z ‘ƒ Õ‘¡”~”g’r•2¤,¬Ü¥ì¦ТЖ3ŒtŽÿ/ ™Ù™È™$Ý¢³¯š÷› ‰“’û$Û€$¡‘<¡j¯Œ³K²-¨L›ø”E”.”™S©¯¸͹‚³ ‰³ ³«Ož“V•ªœ@¥ ±4·e´­³g²I±f°€®I¨×£$Kˆä 9žI ð§8¦Hþ›å Á£M–gK“ßô¤K¢þŸ¯¤¡Ôš¬šÛ.¢n¨©©ª‰¢F󢀨S¥®¤´¥ñšË–ˆv Ž y ²z ½‘,˜L‡´z˜€ï‰¼ˆ=ƒ9…Œ–. ¨§©û‘’„ Ð}ÕŒR›¡,šœ¢¾¦  a”f…ø ߈ÜŠ€°,…ÿ‰—S«¯G£2•{“—Øš•^Ží„:}M‡y˜‰¡ ô”l‚«……!âƒþ"õtþ} C…¯†´‰2 œ©«¢&•í…‰w –}°‹Ó›r¡¿‘ƒ i| !u Tx e€ ‹Æ•Ìœš ­S²Y¢ŠŸ%§>¦DžÌÖŠ‡ |  y ¥sý|j…Q’Ôš‹’$€eˆTŸR±V°ƒ¨¾—šÈ”>šÅ—ˆ‹Ç˜•[—¶•µ•Í›Fš £˜4–ßœ –dŽKž ߦûÊÄÿüÜÊþÈÑþˆÌþ„¿ÿÓ¾Ǽÿ§¹ÿ ̳ÿ s³þɬýħÿŸÿÿa¡ýü üú¶žþý"ÿþ“›ÿú3“û`Žâ‰?‘ü9“þü›ÿl™ÿ‚ ö{£õSžþü&›ûG›þü›œýý†œýü¯œýümýû5œÿùšÿþoœŠ›4–ø–!–ü§šþûsþûžþýžýþ5þþ%œÿý‚›ýþhþÿþ²¡ÿ¦¤"£. ÷œ‚ž¼˜–˜”»ŠR} üy •„ (‘-—™›•‚•¢°©%òž’¡x–ʃ“QžOœ™ô˜©šSž7¥4œÀ™››Ä!r·l –„±Ÿ¯B¨Ë¥µ¤Éš*—•#˜ œ© µä¸¤µ•±´­%¡ˆ“!2‘!N—0¢r¯¡¶(µϲ˰d¯Ö¯ð­ߦ!˜Ñ…L{ ‡¾–#˜à›OšûšÕ›£µ¡NŸšš9—dœ¥¨žþ›ƒ™X“¶“±›t£¾¦G¦%§¦K ýŸ¤«¨c©ZÆÿS•¨âž‚žùž]”W‚dz ù•@† f€:ƒ Œñ>Œˆ””œË¥Пi‰Yƒ™‰t‡d–C§Ë«Ú¡A ¶¢‡©J£¬—#Œ-‘;œÁ¤]”a‡Æ…‚†¶•y£Á¥¡e2–ï™öšá”ƒ„sPwŽ“n¥§¡œ±’Ê/Œ̆~š k‘  ƒ…ÚÓø¤Q—Pt„è‹#ŠŠ)‰½z Îw €x >v ”‰é§’y•љݓ.¡—6•p¢‘¨÷¦T˜«•SŠv »u q v×z>†ö–³’Lš/ªå¡‘•‚~† &”“˜ؘû‘“¡”þ“‹¸ˆŽXŽò‘î–Úœ,œ b  þ k­úìÆù£Ìû\Ðÿý’Êþÿ-Áÿ\¿ÿ³¸b¯ ½ª|¬þJ ýþÖžþý}šþýÓüüÒ›üúçžþþXšÿE•ü‚ü,w}w€ÿz‚ÿOˆ&‚²ûê™ýü¡œþýy›þü˜œþü"šýýóšýýè›ýý/›ùr•ûô™™••íߎÈ‘ûV–û˜þüvþžšþ{šÿýï›ÿüÓ›þü›ýüµœýþS¡ý²  A Àž&š—D’p•“šˆ Sƒ “~ 1‹B“ôžÀ¡“œXœ~ÔŸ»—€œï£››%– œr ¦ ùž.ž(™L–e”™Š} ®y syþœ”¯j¢h›Š£y Òž ™ –˜›m¤W¯ˆ·Í·ó²—¯º«ì£F”둯œ¤M«Ú³1¶*².­<¬{¬3ªq¦Š—ö†y†•K•§¯Žõ”û™•žfž´ŸœP“T‘«šH xše•º•6’–®žŸŽ¡B¤ˆ§¬¦£y£~¥h©¾ªÏ»ò­m¡Ö ŸŠ›Ä‹q†±‡Ôž~z d d‘ W—f›=˜j™F˜Õ™‚–Ÿâ•2•؆ªm²y¬ï¨a§Ÿ©v¤jžŸ@ =§¯¤“‰| |f€ˆ™§†ªõ£Çšãœÿÿ¦K rŒcuv“]£¸©Χ«žm•÷—I›Ö–5 µ› ¶š©– ‰=”Q¢¨¯~¨‡–oŽŒ–j› •ìây ‘} µ€<—¹¨RŸ¾K£J’Ž‚œˆœ˜ì§K«E«£¤/¡˜gˆI~ ¸z^|'ƒéˆkšIœƒŸ0›$™‰¤M›„ç€ø† b’” e¡ÿ :ŸIœ³œ™ &Šuˆ݉ ‘ ]•ÖR¦ ¥…™l«¸¹ùÄöÞÇú²ÈüÓÅþLÂÿÁþ¯¹B§Φ€ªþ Ÿüþ°›þüNœüý} ûý2–ýüà™þ´˜ÿ¡‹“ƒ£ƒ¡R‚m‚Roˆj”þþšÿÿBžý‰œÿþ6—ýƒ™þ°˜_—ÿ—‰NŒ‘ ‘Tþúá‘ù—û˜ÿýé˜ÿ›–ÿ·™þPšÿü¤™ýü1œýüüþ˜ ýW þ÷Ÿ êœ`™Ò—z‘ ”:”%Š B… s… ë÷˜¨¡¢ œÒŸ}¢J§º§à¡ ¡k¥r á‘Ÿ6¡PŸ; "£ÆšÅ™Õœš –.ŒÝ‚Ж©)=—J§Ë©p£³ŸÛ˜"˜fŸǤέ'¶Ù·´\¬ü¦'›ž¢£„§Á¯¶?²C«A©æ¦v¨þ«Y£·”'ˆ ½‘›,˜uÜŠP<“—ðœVŸËœ‹$ŠØ“Œ˜©˜r–F•f˜·›;-™ÙŸ!-¦§c¥ƒ£Þ£Q¤î¨´¨€¡ášWšxªšh—fŸ Ÿ=’ûŒÖÒw s p ó†7¡ ©s¯¨õ¥RžÈšýšèŸ8˜[˜4šÉŸ5¨)¯­£©¢#¡6£m¥'¦Ð¥‚©;¯·¥¡—p“ÏŒþ]ý‘}o?šn¢ ÞœÅ¡B¯)§V‘í|»|1›T¥M¨Ë¥)›T§ùªT¦¢®Ù¦º£œ:ž¤¦æ°®¥““†•]œ ¢²œà“?„LˆU'©Ï´‰«Ñ©‰²j¤?–AŸÙ¥~¥±†±x±Š®x¬ž$•ç“ÿ 3•ÿ >þ ºœÿvªC± ¬øœh’k›¸™#ˆS‡ g‰ {•ùŸþ 0´ÿ Tªk¨Φ/¡ ²–I•B‘i™ Ížò¤±¶ Þ½Ŭ—ÂJÂýùÇþù±ÈÿûùÈûŠÆÿôÄÿÀÿ㺳¨¶¡¢ýíûýö›ýüŒœüü›üûƒþü³ˆ,ÿ ¡…(#‰<Ó‰_‰U† ´…îŠ+ÿõš—©™ÓT•k“ ’=…~… ¶‹’¤šÿU˜þú?™ÿù™œÿú„™ÿüh•þߔŗü­šÿû<˜þú^™ýû ›üývšýÿCœÿÙ —(›Eš•?•‘“íj‘™%œf¥v¢œfš/ëŸë¢ì¤Ê¢Ê¥9¦c§£ Ÿ¡´£½§ܲ ¥B¡r¥ˆ¨¥q£ü™{”P˜‘ –?¥¯®Q¯%§¶Ÿ{“Çu•È–Í¢'¬y´ë­Q¦Q ?¥¸«á£ ~¢7©[¯­F©¥¨ £—°å³ê®-Ÿÿ˜™Û—™“y‡»…þ’—Þ ¦ ’Ê„C‹Ì”Ôj–Ô™¡Ÿ¢pŸΜb¢!Q§¥×£ÚŸŽƒ¡ ¦»¦ ë›©qž¡šQ– —ÜŸ-¤-ž—{~k "sŽ ›¨ ®µe³¯é¨M§]¥¨¤m¥Ý¡rœYŸ?¥~©ü«¸© È¡‰•™Æ¡ý¦¥‚¢ë¥û¨ä¢˜v›u™ʈI€ŠwŽAŒ°“jš&¢-« ¡å•S‚܃â‘”¸œž¢›— —•¥ª“®¬«!g© )§Õ¨¹ª8²r¬n’g…Õ‰‘-˜Üšr#¿†˜«K´õ¬~¬  ´©¨›Užߣˆ§xµ'µ[¶¶ƒ·:¨M¢)¤›c …§ß²·»?³_ž¡î”Õ’`ŽJ‰ ¿Œ ä› '¯þ ¼¸ÿѰñ±«ïœ_D 4œŸš£¸µ Ź—µŠÃ9ÆþýaÆþü[ÇúÆÇúoÉÿ*Ãÿ•¿þô»¯@¥Þ¡ü!œûü5œýüœüüe˜ýûN{ûtr„UÕ„K‹ŽÇŒ$‰l… ĆêŠÿ’Ę‘C’,þœFŽ´‹Ï… AŠç“›þýí¡üûbžüûX þù›ÿûx’þü•ÿјúâœ÷U™þøô˜þø<šþýôšýÿ››}œ Sßn—/–ú”Ê’¾—¢šr£{¦–ªP©¼¡oŸ f›Ÿ é¢î´Ÿ"¤ª¥Ϥ3 Ö ¡ ²¦±gµ!©ƒ¤¦X¦§©ªN ݘà”b•}”fšë©=²q«³ “³‰~Ž‘b”Ø£]¯³«¨#¨sº¦½Ù© ¡¢ã§¯©U§¡mžr¬ä¸«¸l©íœÙN–“«Žˆ¬“•œ#¡"¦¥¤,–ÚŠ!“È•ö›Æ£ñ§4¦f¥¥Ц…¤n¢_žYœÆ¡ ¤!g¦"j¦z£Ѥë£{›%–ÚŒl‹» Oª¦_‘âxltÒ‰Y›ü¢ý¥b«¾¤&¥œ«ªè§¤ö¡o¤)¨õ©ĬݪŸz,’YŸ¥£Þ¡§ËŸ0žé›Ö˜L¡{£•b„%Š#‘ëÖ‘•?ϙ攆†9ƒìž’´—–TŽŠî”˜™`ŸŽ™#W¥"¦¨"€®m±}ª€¯«/šèÊ5NŠMx:u  v úŒÌ¡o­Š«¯¯v²ѧ˜œË›U£ ©@­ı ³‘º¨»ý´}«T¦²§ê™¬™Ù¦Q®çº}µ¡ÃŒM‚R„û‡V[ƒ b›Y²ý{¶ÿ[¬b®*©DfŸ*¤å¨Ê©Ș{¢cµ Í»â·"ïÅÿþ”Åþþ°ÈûŒÆÿý&ÅþÚÃÿ¾ÿ ºÆ·r£þŸžüÿ‚üýAüþ ›ûþj˜üþë‰ú¼þ ¨€w†üŒÎŽ—‹–‡ä… 1€±‡›Žæ’ÑŽ·í‹ þ¹Ž „Ž XŒ|ŒV‹/‰NŽþ™ý9ŸýüO ûþû ýü2™þU“[“ª™ù·žÿõ5žþ÷”œþù"šþûî›þÿ$›ÿš-š ¼œÙ›B—–¡–‹”ºš . K¬·°­–«œ¤‡£u¢¥¡=¨7©ùžú™-œÒ¡o¤g¤¤¦¢£¦l«™¨ò£¦e©õª®«£mž\Ÿé¦j’"œ‡¦ê«\£t–•%šXœ¹˜ ¡ó¤ý¦r¥Ä­MÀÖÁK­Z¢ ŸÏ¢Â¥"¥{¢Ùž\Ÿ‰§r´\Ƹ£>™S”Ý‘·‘'•S r¤B¥‘¥ü X–)‹”•‘™¤ ¨§k©ž¨û¢”¡jלOŸí â£×¥!û§$-ª׫R¯n¥ö–?Ž­€ Ày þ‰; n«± |Œå…>†=ŽkŒ²’d :Ÿû£Ô«¡ª6§ü¥|¤+¦N¨ù©¤®K®Ÿh‘ÿŽ›¤-¡ÔžTw›­˜Çœp¦±¦i¶•Þ¸ŠÇ€JÔ„‡5–&•æŽÆ‹O”Ì•u–#”®’\ˆ<‚ ¥ƒ †¨‰!³˜"3£!ɬܪРƒ¤k§ëšW”º—ÿ–Ò‘<„}w`†_x»‰ Ý—Ó¢¨w²”´n©ì¢ÍŸÌ¥á¤æ§n«»«¶´ã¶}°D¨ФW ¯”ºŽ,šT¤Õ±߬œ›æ‚ Âsz€}èu B{ e“¤Gª«¦/¤á¥–¢z¤¶¤qªs¨¨˜˜ fª!¸Ÿ»&Å:Äþÿ1ÇþÿBÆÿüÒÉûXÅþTÄ¿ÿþiµªš¡þÉžüþTûþ0žü ›ûÿ¸™ÿú@–ûðÿp‡8‡#…?Š3‹ i‡g„î† 1‚ ¨‡¶Œ$‘ ÜŒ =І ÿñ‰›‹ ï‰ïŠÇ‹ΊyŠ1ް™fžýþ“šžŽ—ý,œÿø”žþ÷‰žþúÜþüe›ÿýš\— ›Мgš™–²Ž 7–k '«s°a®q¡q— š¤R¦ªèªW˜k‘S—Ñš¸Ÿº§Áªè§2¡$žÊ¢çŸ h¨â©¦y©­£žU¥}¬ ¦âœc–Ížd§5¨‰ ž0¦G¥ä¢t¦„¢C¡¤9«k¹w¼÷±'¨"¡â¡³¤5¦$¥U ’¡Š¥I³•È`»¡ k—­“È‘a“pša¤¬«׬C§7õ’õ‹2Œ–“ô˜ôÿ¦ÿªª©©ªU¤ÌŸ¹œÀ˜šž¦¦ ©–ª-«Ö©Яu´§M“HŠ«}:n^w o‹ U¢ ¨zŸþŸC•Y‡‘} „¨“(k¥b«‘« T« °¨¨¦‹¦Ÿ§¨9¬©òš©•™L•Ä¥Œ©=¥x ‡¡UŸæ£‹¨`¨¢ŸÜ“š˜zª{£1˜+ˆåƒô„A”’¨žì—yšé™Œ˜o˜„šäž™“1} v jw Á…Û˜!j¥ ~§ }¢ O˜0—¥›\‘ ”ߣ¢[š&‰ a §úv‹ü#}——Ÿä _¦À¯¸³­“©S©É­+¢F¡¦Q¥¹§©Y§ ¤H¡ ,–…žƒB†#e–†—Å‘ ‚ê‚<“É…‚| ‚0ˆlŽX”y˜ˆšȤ·©ô¬ûš"—z’#ÌŒ á™ɪJº‰ÆÈÆþÿÊü9Éþý‘ÆûaÆÿÂÿÀý«¯†¡ÿÛžýLŸûÿ$ûþ¯û;›üÿ>šÿú.ÿý+‘³ŒÖˆÌ„l„ºƒp‡ =‚ S† E o„ è„M†;æ‚™€€ ú‚ ï…©† (‡ († À‡wƒ & e–o«æŸÿŠ -‘O•úñ›þù°œýüwþý ›ÿý#˜œ”S—Åš&Ÿ­šV” uŒ 0Iž'§ö©A¤«™›ƒ òŒ†¥z®«ö¥£•=˜å˜šI¨‚«p¦t¦q¤¤€ŸÍŸr©ô©W¤y¦?¢+¦¡9¦Á¨²¥o: a¦§¦ö ›ǤM©™«V©É£ÅŸ¡‘ž­hµ¯¨Y£ñ¡Ô¦k©£6nœiƒ§¤´¨£˜ “kŽô©•œž¦˜ªѪ¨&¢Œ–Þ“±—’Ÿ¯¡3¦PªIª‹«P«³«»«Ž¥Ÿ›p—Rž ©«ɨ¨«H¨Ű ¸B­¤–$‡€Öx ëz …‰ —Ȧl¦©©»¥q–lˆ1–R ‹§@¬Q­¿­ ¥¬:ªÕ©±§®§ ¦ã ’£”V”#–ƒ¤æª@§{£æ£¦ï©p¬7©óPŽ÷Ž¡̪õ§vŸƒ–6›¥Ò¤™›_œÿØšl£¨6£âŽ ¢€~ò˜þ¹¥u¬x£ Bš˜+–È–”“˜•ªK¨  •ÈŸ¼ª›ÿþ¢ ¨‰§¨!E®)³²² «ر‰±Ѥïšn¡kŸN—J§©°¥»¡ï¤Ÿ‘9…¯‚q~ ‡ú—ð§ ­§\¥V? ”•)ŽŸŠ  ¤ŒÖ•›¢£®!«é•J… ²€ ¥ ÄÙ¢k²ÿå½^Èÿþ¿Éýÿ;ÍüÊýÀÆþÿ=ÄþœÂñ¿ÿ«ªÿZ¢þ¼žü‘Ÿúð›ûýõšüÿ”šýpšúî¡ý…u„É‚¬ƒ‚ °ƒ ´ Ì‚ Æ~ ü äP~{ãb€€ú„)‚ à 4‚³ƒ÷‚®ƒ å‡ ê²° ƒ‰ ƒ‡Š“ýü›þü}œýýõþûšúä–à @‘𗲡™’š [” §™úžœ¢ ŸØ›ûŽS{„ €œr§²¦ë QÏ›êšt“%¡|­4©ñ­³¯Wª”¢3› £:©¨§“¤ × hž—¡½£¯£¤ì§h¢§ž›P•™‰¤Óªݬ*¤š›7–ø”Ô™«ά  ¤Ÿ®£ºª`¬Ê¥¼š|˜f”P–Ÿ› ˜œ”»‘z‰•Š‚–5 í¨<ªª z«ƒ§#œÓšð ʧN§o©/¨m¨A©Ϭr®²¯"©Ýžn–ôŸ«©<§u¢³¥²ªƒ±ÈǾ¢š‡%ƒ"ˆŠ r™, ¨Æ©ª²§Ϥ£¢1£S¦ª²¬ê¬$¬ ‡¬ø¯ã¬‰§ÿ¨t¦cA˜æ™Æ¢„¢)¤(©&©t¥¬£‚ª°@±˜¬1 ?ކ–à¤ú«Û«K¨Ñ8¡fª¦´žêŸŸ?Ÿ?¡Y¬ͰL«tœy‘tšþ °¹µÊ C”·”d™ãa¥1¦>³÷¬$©¢¥Y§—¢p§j§ê³İù®^­>«(©bªò¯ò¨O¢“A—q•Ù—G«­°¥y£V¯=­q§n›e”£ˆÍœ]­ 5Åþ§½ÿ·§Ÿù«°§À œ ¸š _•k™º¡¸¥˜§ šq‹:ƒ ?„ 3—w¬'ºþQ¹ûVÉÿýhÊü°ÊüèÆýïÄþ‰ÂÿÓÀþ̼ÿÒ©þÿ`¢ÿÿ‹œý‰žûsšüýjü šý ˜üó”ùH…ð| ¦‚€€ ùƒ •€ Bÿ •} ž~%}}}#à ‹‚ ’ Ó‚ »‚‘ЀG€2‚‚ã†Wó™ P‰ õ‡Ý•(™ÿþ›ýþ½šýý*™þþô•ãŽn GŽÚ”•’¥Ž ¾˜Ÿ>§¨£ì¹˜«‘‡»s¸yì²·¢T¥éª~¤êŸ“«€Ùº¬±äª¡«P« ¤Ę±–¢á¬—±@ª#¥#‡  •žÒ %¥©¿¨Ê¢›Ò–Û‹>^™ö¦ʬŧd™¢;–užÈ¡Ê¥p¢Iž£#©e¯©¥Ÿï“&Œ¦qŽœ’5™˜þ‰ …@”¥¤©’©£ ¦"ª’£ˆŸ*¢Ÿ¦‘§à©[§í¨€¬(« ô¯ y­¨ô¥ÆœàÖ¢çŸFšŒ”ü­³ÍÊØÅK‘a‹üˆÁ‘ºž¦¦F§Ÿªx¦³ ¤ *¢§¦T¦Å¥Ω¼«ª¾« P«ø¬Óª̧û©g© ¦é¨/©+­N©Ø¥ù¨ç©¦£Ù©W°αø¬Æ£‘Ԍޚ.¢æ¦³«ŬZ£¼¡v¨¿¦h¡Ÿ«¡J¨2¨i¯M²È«j œšΨ'¼ÿ¿¾¹²`§u˜KЦ%¤n®]´ܵÓ­n«®{±®Ø­Ú°â¿æÂþ±Î¥ ŸÓ£„¤ö¥˜Ô—Þ—q”õ– в0®‡ ÷ªEµâ´'­V¦5£Ýž©¬}¹2ÀZº¸õñµ%´©© m£ *¢ªŸã¢Æ¥¥1¦c¡²›l ˜ › 뮾»ÒµúÇÿûêÌüþçÌýTÆþÁþåÀÿ4¾þæ»A¥ýÿùþþwœýÿ²üÿüœþÿœýq—ÿ p3Šý9~ z €¨€ K‚ ]ƒ ‚ƒ /‚ [€#~ÿ }G}»|Ä}ú B 0€ 8Ù€•€+„~º|æ~Ó€3™†  Ї P‹I–‰œÿýVšýýî›ýý‹›þÿ –9Œ &‰ÑŒ’Ÿøª6±#¥ª•å‘S 5‚¢wÖŽÇ¢’­ܲº¬ÏŸv –£ Š@€œ ½§R X¢¤t¢m˜§“¡H±µ³¿® ¯­# ¨"¡ä¤Û§ï§§† ¼™Ø”]„€:“좨®§„ Vš-¢פG¤¢¦¢ù£ò¦C¬®”®<¦I™’Ý’â—f—b—í›Ç’#‹Ê—–¢H¢IžÔ›!Jœ%Ÿkž±£ȧ’¨†§ß§©¨ «Û­!E¬ªªK©&ªߪy¤4››”Š|†…¯ñ«˜³®¨®òŒ]žúb‹ý_”i•ך~¢ƒ¬§Žž>šqœŽ›HšRš‚¥©ªªsª$ª‘«ê¬ÿ©Û¨Ô«3¬%°9°&°«Πš‰™øŸŸ§“¯ ® ¾¤ø›Û’v•œ•  ™+˜–œ›<›!žäŸ„ Ÿ¼¥ö³B²V³ ä´G©ÜŸ?˜¦¥·®¸©Ì«ž›‡…º‚™t¥P®"¨‹¥¦,¯ ²µϯ5°H½ +¿£[—;’Ø¢i¢¾™Å„MŠ=–Ò–•‘Üœ‡¨U¤?˜„§º°p­-°V¯°جɶþ½%¿úµ°9º:ºº²{© ™ª ß«­¨.®&±¯2«¹§ú¡PžR¡ü¥ k¥ °¶þWÆûGËýÿËý§ÅþþÄþýÀÿ|¾þ¹ÿþï£þþÛšþÿ^œýÿ3ýþ¤šÿÿ°–r‡”…“þ‰Qym{Àœ‚ À‚ у r‚ ~€÷}ÇP€Î}­~áÿµ€Y€€¾€r€ž€Ù~"§ß…ØŠnˆ @Šß”ÿ‚œÿü¹Ÿýüažýü€žþý’™E”’ ’XŒé‘ÿ™…¬Ųj±°ŸPŽ#v– • `‘ ‚ƒ ¿7£ê³ϵe§k”ñ]§ (¦… ¶¢Ãþ“6ÏŸ5°ë³=° \® Ø­ ¨êª»°æªr¤Ÿî–bã„}€5’9ž”¨ì&ª™©c©«¥¥˨,¨4¨<©H«º­®l­*¥ŸÁž†¥O F‘‘•!˜ æ£ð™ ƒ†!X†ʼn^‘Ξ¸¥Ǫ/ªD§Ƨ½©®ªª! ª5©U© ®Z±.¬.¢ðŸü™T‘â©¢­–$Kˆ $‚ ¶…kŒ‘˜œ–r•w¢±¯x®‚ž„˜8–T‘ßø‘œ·© ª7©­ªw¬f®÷©£§ C§ ⪠8¬ «®(¬±¨ë˜ŠŽZ–†˜ߣ©¬ ‡¬  œVR,—®š šø“®‘G‘Æ“Iš4ŸIŸÚŸ¢£²«DZ!®­ I ”´(—Ÿß Ü–šÀ”‚¶…L“¹—±˜â™X–ÉŸœ¦ì­#²¡¦ ÁŸl¡ X¡‘ýŠËŒn™Òž®Žg~~€Ã’N TˆQ‹•–Ü–D¢Cªª[­ƒ¬.ªM¬¹±¡ÅãÆɯr¨®´]µKª<¥ ¶¥ ^¦-¨¬²²{´º¨Y¥9¤¸ª© ð F©’´‘ÈÿÉþÃÉþÄÿÒÁÿHÃ辘ºM£üÛšÿÿx™ÿýu›ÿý7–þ¿Q…wŒª 3~ ]~€ÅŽ ©‚ ) ߀€¼€} A~ƒ~Õ]€hµ€Ì€Gz‚v€]´}6jM†½ŠK‹‹ xkšü±þúàžýø}›ÿù~•™‘½ x ù‘·™,«¶®«œ “ ¿ Ž¡ ”™ # Š p”`¢è´·Ê¥ ‹È «œU„©‡q‹7F¢ýª<Ÿe–í’ðŸA¯p­äª Ǭ Q®a­/¶Tº­ªy¢Ašæ–’èÚ–žŸø§¹‹Ãø²¤ª ¦M¤ƒ§ö«­ѯú­ã©Ÿ©†¬˯•¬ ¢ZŸ9¥‹¦‘—8Ú•“š ¡v¢¤•žƒw By Üjˆíœ8©­”¬%¦±¥á¨û©R¨ù§<¦¥©s­¦°”¯2ªñ©â§µ£ɦß›Cˆ!~ òŒG—¤Ž‰”Ÿõ¡úÌ¢1ª ¤©©–P‹†ŒŸŽ*Ž \” œ© ¬L¨"íª!å« ¥¬ €©¹¦®¦l¨ ™¦‡£i¡³¢û™„L‘‘–\™   Ѫ äª ö•œ‡ –™Å”ŠäŒï”L”t™ì¢ù¥ŸF•½˜D›«¥ˆ¢ùŸï–sˆLƒ»‹¿‹ëŠ„‚{à‹„ Œl‰%‰‹6’vœÍŸ.¡•©èŸ#•éŠï’ˆ>‚ñƒ‚Ša‹ …ˆ ؃{‰$™‰³¡„y‹¾?–c£”®2¬ˆ§_¤ ¡—¥u û¸íµ¿¢Ó˜è©8®©ø ÿ h¤ôœû–;“ÏŸ[¦”³¦§D¥« R§ ŠŸ ´ž£¯YÊÿÉþ­ÃÏÄvÃZ–¼§»ÿö¤ýÏœ!š¿™ýLŒü%‡{¡ÿh{m…n€ -‚‚|A€æ‚ ð‚ 0Ö€,Í~„Ê€7~럀 ;ý€@¨ƒ * ~Ê|Ä}M€ ¥€ ªÓ†û$´Œ˜ÿËÿú­žÿöˆ›ö”þÒŒJ…’… ‹Ä‘)•ž «(­ƒ¡ úœI© ö¤ Ö‘º† 0’ D˜ΨFº×¶n–½‰óˆ jˆË~YƒàŽÿ”\£E«ĦQ¦“¤ œmž~›$Í©¼²¼F¼½·Ý¥ߟ«œQŸPœîŸ$¡f©)­U¼Ä•±K¤¬¡~¢¥P©׫ñ±×±©R§Ó¨s¨Õ§è ð›¢j§eƕەƙòœå¡™ã…¶t pv ƒ„ѰŸù¬ ¯©ʦð§w§àªú¨¾¤“£ ¥!£Ù¥ù­{²O¬ã¤ì¢Ø¥ÊŸó‘F¶šf¥§ËŸ‘¤[ª~¥_ ê}”&ˆqƒ ˜ŽŸ'Ÿ 餤𤝧§ ª!*ª!c© §b£ߪz¯ L£–ÿ•šÐÛ¢>¢õ ¼Ÿ³£”¬6ª°!~OÌœs”€•{ÁŠ%釖U¥ £}•à‡‚‡%• B™I“fŒo†a‰Ÿ‰”7Š>†„º‹´Ž•ž‘IÊ›%¢ý P˜±•X’~ <|ƒö}9€‚ † Mˆ Ö‹Ô—Q—ž‰?€Û… ƒ'‘s¤¬¯]£Þ - N¡ƒ£ŽŸ³ 7¡d•ä“Vœø¦—°‰žÿ©ŸE˜î‰k‹ “gŸ›¨ɤ¤ ¦R§ b¥ •¡ A¡þ®£Æþ<Çÿ_àÁÿNÃÁÿx½»ÿô«ʤ¡˜–Š»þ&§ÿv}F€ ê€  f„L€€(v€ C‚ ¦å{©}ßa–€3€I€n€ Я€ S Ë€€ ‘ ! ) €³~ƒ¼ˆÔ‹Œ‚›ýsŸÿ÷žÿù•ÿÿŸ1…WŒ Ü’O•k’ú–D›$8˜\˜ › î• «‰ 7‡ ‘ Á’ ƹ<²µ‹ $|žˆ˜^„mx q}罙Ϡ˜®­¼­&±¸£E•V‘È“ ž¿»"ºʵU¥¢™"›¼­›ï•I— e¦§­`³„º¬-Ÿ£¡ w¡ ¤€¦¨”¬i®K©¨¤ܧ4¦W¦¤¡Ö£K¡¨–3=b”œØœŒjy Lu †J˜2©‰®Ä­0ªi§£]¦§¤Æ¡Á pŸ`ž#£k«˯~¨®¡ š*¥§;¥"¦ ©­êO¬)«]¬9¦õ”JeŒˆ˜ ¥±æ²4¶­¢Ó¢Τ|¦ë¨¨ I¦¥¤ «ð¯>ž4¹‹ªŽv—㪊´õ¯‚¦“¤Ψò¨Qw{·‡P™ÕŒ0v ât 1…Ɔå’Û” ‹Üð„U’•ž“R‡é‰Š„…¹‡ +”ʬ ^˜ÿü›œ•d– —æ‘5…<–Þ ò¦”žŠø‡Б“r“¡’Ï‹ï} ~ ™† Å” ü•ñ—ª=š!’û—¨šSž 4“Õƒ•Žßœxœ{•ø È­ 6¸Ö¸y£Ÿà•ú‰”ˆ“|¡“šÜ– ’Al“û’®”V›T™'Ÿx¤ ›¥ i£Ù¡Ó¯Í´ ØÂþÄÿïÂ|ÃIÂGÁÿ©½z¹­ ¦ƒ¤ ƒ’Ù|iƒ2˜.š0O~Ç ý€ € Ô€7€ ï É€ _~I|{j€>€ À‚wvð€ ~~  ž€ C“€¼ € ¹ Î~€z˜ƒŠ‚¼„X‰”þ™žÿùä ÿùN™ÿ0’SŽ Œ˜±  ŸÊ• Žò’S’K‹ †˜ ˆ "… Ï-Œg ÿ¦õ‚}x“Œñ—ˆš ¯ŠFƒù:—¡©­÷¬Hª µo«y›*•ÿ•ø–úžù ’® ® m’M™²žÛ™²—ˆƒ–¡Þ­á¿ÑÀ¸­¥žwœ Ù£#r¦`¡Ƨí¨®¬ «Xª.§<£Ü¥¨Ò¨ͪb¤h’U†ʃò…ÆŠ—”®™‘Ї ±|‰…ù™Ó©äªk¥M¥ΣÍ סž;œ ,= Ÿ¡±£z¤Ÿ¡\všeªZ«r«­.®a¯ %¯Ç®{«^©³§Åž~—°ž¦ ¨´Ô¯t³·ˆµû®î§%¨Q¨M¦·¦i¨Fª8¨á«ƒªùŸʘ<‘<…Ýî§ĶP¶ج¤=£Q£â•ÌÏ‘˜•Œ‡€í”ƒ“šŽÈœLOŽõƒšŠ‚™b¦MÛ’×—ÇŽª‹Kt™£"®€«¦3œ\šÊ™Óš‚œþ"1 ¦þ¦˜™†ĉXŸ¿¡†ž§3š³Œ©‡÷“¯¢ô ÆX›À˜½˜!¼¥°­`›Iƒæ‚u’З˜óžK« MÏ qÅͬË©) h4|Þƒ ¾˜Éž¾™Ü5˜™ëm¡tŠ Ù“ a ^¤ À¥ó§K±ÿß»ÀþòÃÿôÄ!ÇRÃÿaÁÿk¿]»þP§4¨ †› Šýxšx}}Å})_|} ²€T~—€ a…  ”‚ 8€ "}…~Ö€ Û‚ é‚t€.‰€Z‚€ æYT€£ ]€ ||†‚ ª‚Ѓd‚èþ¬™úžÿúëšþ*–i˜ )œ`œS—†žž’ Œ^•/–Õ•„Iˆ ¾Š‹ È þ… ~çö„y’PžQžj–kŽĘæ¤p­‹©û¤L¤¡lžòŸ„¢¹žl”ò”? <ŽX™£Øž¸“òø‘ïž'­^½”¾â°¢’š¾D¥ŒªÅ»ò¶ Щ1©©P¥Æ¡¡7¤ê©à­;¨æ ´–|‹ …O…¹‡UŠTT’•®’ǔ؞A žk¡W àž ¢ò¥¡‰K—И›˜¸ššœ›Ÿò¢¢‹¡b­u­Ò¯²0°º¯¬–§³£¾¥÷«_§á¤ß°6¸P¿·± V± O±/­i¨ «Rª—§r¨.­\±ù«ç¨í¨ e¤÷¤ŸŒ[Œn£(± +µ ²/© P£Þ  –å…'~:œ §Æ–ã—– Lš]–r¤¸¡¸•‹ÐL’dšO­ú°;¨á«Dž ž&šˆF¥òª­†­k¬a¦ &ª¯ݶ$¯ߢÄ’t†¢˜3´¼´v±)¥À ¿™kœÿŸ÷§‰¦–£ƒžΡgž$³ª ²5®ù ¡‰Ê„’È——žšs™|¯ ø­¸«µJª—ŒŠ ‹ û› ó®õ¨¨V¦-¡üå•’¼‰ ™ Äœ Ò¤ P« ª/¬÷·õº‡Áÿ3ÇÿäÇÿkÃþäÃþtÁý··xžŸ FÓùwZxjy}}P~Û~B~æC€#€ Þ ô ø ~ ’ V~ `ƒ Ý€ ó~ù~²€a~芀µ³ì‚€Å‚ X‚ ·€ {ÿÓ€“‚o~}Œ|wþ!™üœž`œ–Ì’‘Ü \\—ñ™øœS˜ÿ› —y” ®Œ ’ P„áx ¹w -u“v%ŠÆ™ L¦ #¡Šœì˜bšl¡ΧסàšŸœ¹œv¡ú¤~¢Æ–<ʆ ‚„&0 …¥H¤Kª £ž â¤!¨£Öª«Ÿ¦¢¥,°æÂMÊ#…Ἰ¦¦¤YšÌ——Ÿ^¨~²ª½(½<§˜ý…8|Ž€ÛŽGý¦Ù§Øiލ“q›V¢¦¥i¯˜³™±î¨“–x‹WŒ.–/š`œò£&¦S¥¦4¨ô¯ð´!°²¡«º¦ðž£–¹™ä¦'­N¯†ªï®7ÀªÆ½²Ь Q® ©8£>¤'¥ Z¥£ ¬ɱY®ª¨(¦N¦'ª§Iš:–m¥’­ ¯ !å± #!¬ F¢½›è˜#Œk–c­Z§ ½¤Ù”ŒŠÜ—$žÚ˜áŽÍ…÷‡Û,©ù´ä¶¸¶%¬§¨²¥  1›4“s™E§Á³5©{«‰µι¾µà¬h–À…6Š¥§º«¹o°ƒ¦œŸ¿¤« ª¦ ž¨¤ä¥¬¥Öª÷¯”¨Ř憤…Гb™˜C’’‘ˆ •ª²¶t§’mÝ”> b¨Ož÷£ï³â§œ–Ô˜'•´•†ž Ǥ:¨ ÷¬ ¨ È©P² ¸9ÀÿXÊþÊÇýéÈüÿ»ÇýúÁýw°†h˜Їª{VyâyÁyŽ~3~Ò~ 8}$~Þ~E}Ì€C  4 ‹â —‚ ƒ €í€G€V~‡b~ ' Ë„ ©‚ I‚-~8€ÖOŠ€}Ü~ ˆŠô—ÿ휛   ¡à›1”Ã’<•Ž‘3‘ª›ç¢¯¦"¤’¢ KŸ ŸžΚ µ— † D‡ :‰ é‚+ h“…¨¥¯q¤¾£ùüš«R¡As˜Å¡ä¢¢­§Y©A£zœÔ›K•0„ÊÖ ð©° ´­û¦¤' $l¢š© Χ™¦O«¬´½ áÖæ º‹£ó£¼¥á…šø¢§+´¿Ò "Ë­°q¤ œú“»Œ£‘𙤠ª^©"¡Ö”¾•[¢Ц©ã°¶*µ ´¨g—B3–õôžï 1œŸ†•™©ij÷²¨u¡[!®£¶—s¢æ®!¢ñžy¹ŽÉ %«*© ‹¯ M¨kš”•g’g’¶ÄœQ£άu©O¢ðŸ£¦§¥¤ݦª 1¬ ¡° « 6¢Ç›Æ™C“‰iœ#¡<¢¼¤Ç’Þ‚h‚¿—Ö—Ñ…do_t æv Þ“Φ¹´ɳŸ«{£» J‘Õˆsz m‚\“H¤Sœ€¨bµï´¡ŸšÕƒ "Ò{ 'Ǫ¸—« œD å¥h¯ï´^«› –‘Fˆ´˜ì¦3«®İt ìŽKy.~ȧ•î” ‡‹™¨¢k®Á·£•…fƒn‹ðž™™è™ݯZŸ¹˜+–„–O˜»¡ f¨Ϫ   ãž ’ Å´\½ÿþÂýpÉý–ÈýüîÃúÁæ¹ »ª‚bœ І û{î|}{@|${Î|~|³€/€–€¶€qv‚ n€ /~ ô€‚€ € ·æ€‚ Cnb|Á_…ƒ a‚;ƒ £ƒ†ƒY€ÿ€¥ ÉÓ~Â| ;‚ '“äž·¥ O§Èž“ˆ”gŘ•%$¤H®¿¯;« ƒª¨­Y§€ ¼’€œÊŸ —šf‘ L›!©“²—®b©è¡'šª  ÓŸ`šfš8¢÷¦¹«T¬°9©ì¤”ª^ªÛ•G–£¨²©§ŸªÁ¬|«!ÿ§E¤Õ¥þ©¸¥b¨,°³d½'ÀN¯¡Û ¢ø¨s¤ý¦d¨« B¿½Â賩m¦s¨Î¥|¦¦Ç­J«º©`©h¤£ô¥“¡E¥ªj©öª R­Q·5¹;°\ á™˜¬ |¤ñ ߦû“Eš£¨M¯®¬¤¥›\ê“ ™«”9–; ©žF–ùž0£àšµžc°2©‘>ƒ „‰“Ž]Ž~”|w¡2”%ˆzŽ šk¨Àªɨx¨ Ĭ ± 4©dŸ#Ÿøœ:™×—Š”Œ–¼¢¡–„ z©–+ƒ÷n©m  m 1v¬˦¦Å™•k‰d™à«€i†÷‰QŠš”þ¨¦Ò•ä.€ ®{”⪚« ™·‘ž­Ý·º±¼¥d˜êŠ—ƒ ”¦8¨I¨Ѱíž‚)t…~¹hÝï‰%„–ž¥™®B°££†©v zuø•PŠS|• ·B‘›”ø“n— * -  ÷œ “ êŽ N“ z±dÂþÀÆûjÈýÿ¿Æÿ÷ýÂÿû0½þþ« é¥ C™<› ýŒ dzA{D|yæ}²«~#~àxƒœÁ=€ €} ®~ x}þ€ z ]G‘ Õ‚ ¿ S}}êGD%p€°€†ƒª~$~þ„}m ”¦R¶÷®&ᓯ§• ‡— 0“ 0šì¤«M°Ú¯-±’°±ÿ9¤ŒŸ"§ È­ ئ¥› –ž¦‰²o±1£«Ÿ™™ÆÚžÇ›‰™še¤â®£¬qªD«à¬ -«!Y­!M±µ¤šcšhžš •5œ‰§Ƴ1©» ž2£ ¢A©Ÿ¬ ±@¼®žÜ™‘œX£â Ñ¥¨qª ³´ºj±¤«6ª!(«!H¬ˆª{©H®â®Ѩ¹¦†Ÿï ž3•Ô§–¦O¢»¥ª†¬­y`‹‰¢¼«Û«s¯K¥ªT«µ°I¬e£ö™ô‘øœ¬¨¡Òk J¦¤Ÿ&–”š”ú'žœ‹§†±d“’–÷Œ/Š€ >p øy ßͨ®ê© © Þ­ ø¯<¢¨”!yžµžï¨¢É‘$ Ÿ£óœ0‹í|Ê‚?‰ì‡½†Àƒ|Wn ’x‘=”nˆ •ü Œˆå|ë•% øœ•Á€EwîƒøœŒŸß‚ˆ¦€»}!’þzA’ȉш¸Ÿ•´‚ºª3œd”À*’M™ÿ%¡¯¡¿–î¥Y™¨…°tÞ„ ÓÑJކ‚v}P޽›“¦#¬Ö§ˆ’})y ¶V––׈`ƒ ?wHÚ•s’” ˜ • ©‹ S}€„ ª¦‚ÂþQÆûèÃþvÀù ±ÿ)¯ ’¨ ë¢Ë–¼— Ž&€—}§{n}i}}„A€ù~J ‚ €‚~À×Ö~Çz Â} 4  Èz~ J€ , œ~•}¢}3| ;~ 8€ s}vI}LwÜz ˜±„l†_’O³ =Ä*¯:—P‘ø A ý– „™ ±›£žÅ¥ ¯ ¤¬j¨ ½§üª!¥¢ ®© ê­ J« T£@ < ï¢²  ü—¶š„”ºœU£¾œÍŸ›¡Ä« ³ ¡ל¦¨æ°!™³"*¯!¦¯ä­y¡Á”j‹œŽù•¡ùª  ¥tšõ—ŸF¢¢J« Wª·­”¦”Fœš[šÀ™Zª¬L«²ɰΰ-¬S¨’¨#;ª #¨ ̨L­1«š¤è ’ïŒ:ò“¹Q¤¢¾¡U¤¶¢ŒÚŠ…·y€ïšå£צS¬ίt±Ù³w²5«^¥$Ÿq˜Û¡ì®m« ª4®0±¨÷¢Ä D–z’ –^“-œ`¢¦¢š¢ãœ’ÅÚóÕt Ê{ ^’²¨°M©<§h¨˧j›j!{—uŸ‹¢¨|¥Š”Ë‘¦ ó£MŸÚ˜ªŽÚƒ\„ˆa¤´–‹|¬vé´ˆP†#÷žö'G’ø"ˆ~ ž•¬Á­å¢ä‹á€ù„ž ¬˜À†;ƒ 5…z”ÿ’•PŠ_~戼šÿf«ý²Ê¡Ašd˜{œ?£žvžmš<‹–‹s–Œ†È€ê‰ c’ ¯”×—“ŠY„Š4‘æ›Э±¦”A‰ —ˆßÑ£‘E Tx φ ˜b—@—p• µŒ ]Š{R~†† ½ŸèÁý6Âý­Ãÿ_¶ÿö£Ȧ •§ ¢¬—˜4Œ=×Î~A{Õ|6 €ú¶‚ ã ÷‚³¨e€“ ~ {|  € \€ Ã} `¯€_€ q€ ª€s~’€ ß~A}äy U| ={ I ~ ’~ 4z pz Õvƒw†.’Z¢ ‹¬œyŽâJŠ † k™ ÜŸtž.œTœ Ÿ¦ ò ãš z ?¨¥E¤ ¨ ¨ Ê« S¤T¿›®œU•Ž‘ “™ ’–Й£Q¡P£’§\«œ®>˜n§Z°!‘´#í­ í¦c¤€x“ûŽá‘õ’Ñ—r¤^¨(¢v›á¡o¥É { Ý«ªͧé¨_§¼¨<¥žz©]Ç ªÁÍ®ƒ® ­è®;­Rª²§"J¨ K© © «Õª]¤š_‰i„ú”ñ·¡Ô¡UŸš¢@¢ËžS†HxPzŠuîzé#x˜!ɘtž<±г´´K±7«©6¥”¤ý¨*¯¯ȵ6¹·Õ®î­­\¤Ä£s¥'—¢š ˤj§¿±±Ѥy˜ïžl—ïg‚ž+¨F¬œ§¥ͦ[ž…’:‘˜­£Ô¨f§Xž©—,™¡¹©ôªY¡…£0–`—°ž˜µ¼ÿ±µÚ–…—~Cˆ‹•¯žû!º”ÿÒ€ xšà¯H³É­xžA›9—ÿ,¡þ­ÿ¥À˜ˆž šD¥™´ŽȈ@“}—˜™ ˜j¤ƒ®4¬/¨ k¦èð˜9‰› T”„”¶“A– ë§W¨K–ÿ¸•¿±u‘2¨µ©µ@¥û¤ Zœ¤¦“§eŸa¿…›‡ 4šO¢*¢·œþ• ¯„ €{ Ÿ€ö€ 7›l¸ù¾Çþš³U¦µœÏ¥ ­£ GŸ œ “™7Ђ‘€Át~y{[{Ð|l~÷ ‹€¼ìŒ Œ€ ~ 〠ဠo é ð~½€P‚ VÊ~Þ€ û}7~­~ Ay ß| I| €z ‰} V|Hz 3}\€lCˆ^ŽÊ’?†}ˆd•“‘ÿyœqžß›–9“ Œ–‘ŽU‰‰— Ô§ ê *Ÿ‘§ !¦¸¨ á¡pŸ£Ÿ˜ÙŠkˆì•©šÀ˜6ž)Ÿf Y£Þ¢ä£@›Ur¨y²þ´"ª ¹žª™"o‹¦’Ê™Ž›¢œd§ª¥£¤¤¦w©7¥—£"©ñ¤"d¡™¦˜­(¯¯© Ǫv±QȱÄX®b«#©!««!³.¯â©!¥E£õ¨X´n´û©&˜‘ôŒËŸÀ§­¦‹¤Å¢€¢+ ¨™¡ˆ |( “K–0—œ“¨”i—êµu¶6µ7¯̪ˆªI¨o¨K©`«P¯ô´U¸@µã­ « P©q¢p¨Þ¬X¨„¦Ï¢Ÿñ¤X¶Zº+§žR ±£"¥O§ñªͰÏ®W¦¸§û§ÄœìŽÍ“#št¤a¨©£|“V”¢ÅïÁû©ƒ¦{£ƪ°̸œ»¨³b§ok‡…•R¥å¬Å• ޶ŸA±¸;±ü©o¡¹šç¸¨-§Ï©&±¦¯µ¯[ªˆ¤¨¢<£4£‘O… •}«üU³i¥˜¢«Tµj¤™ a¬ K§¦œ! ”(¤?À2²ä¡‰ÌšÍ—q•à¢÷±¹²µ³G®ä¨ý¦  £ D•§ƒš†•×W©û¯¦¤ ={ ߀ W æ“ ÿ¢²÷é½þù£Ú—ÿŸÖ¦®¥%¢ ÍŸ¿™ Ì j~ Æ€2‚[|}Î}µ{.} ~ ì€.~ìâ‚  z 8 È Ü€ k } Ñ~·€€‚~ú}ñ€] ~ }z œ~ w} âz ¦| S} ~{ ‹~ ÌÖ„†G -ˆôм•CŸ? ¤¦¥ŸW—=•m‹áŽNŽ* ¨•—°—)¥Yªf¬u¤ ¡hŸ€œÔ“µ¨’Pœ“¡Á¥6œn—ñšH—k—G˜œ3ª¿²s² ¢© ù›3•‘Ö“ò—ø™0™ϤX¬g«0¦X¤¨Ǫ€§O¦̧“žΚ/¦d«â® E¬ ܰS²ê´"±Š«¥s¡ ñ§¯=°P©õ¤j¤ ¦ý±5³©U£*›q±õ¼x²e¨¡©ž ›ú•÷‹I‡ šâ¥w«ˆ¬Ä¢Éš.˜µÿµ½²º­J©©ª&§ U H¤2§˪Þ±°cª Ì£ ‰š‰’è©z¯Õ°f«¥I¡¬ê³KŸM˜˜ #ª ­¯Õ³ެã¦ñ©,­›ûD• ¢اQ¤!’fŒm’U§pÄÒÂV® §T«´´׳>²¨«Œ§½˜D’›ô¢¤±›â«¬H¹’¼9±¤â™I˜”•rœÞ£ ª˵²¹y½1ºê¹·²a³U¨Ä’ž€ÕF¬¢¹â²)§4£$¨̰õ®¾¬›»¶¦À¤š´€½Ö³¥¬ ­ȨO­‡¢ñ¦C­6¸·.»;¶3±\ª¦¦ \–<‚F‰—ø›X«Ú¹ª’ŽÃ{ € %| ú„ÓŽ ýŸ™Å„n’ ¡æ§\¨r¦ Q  Jœ #• "‚Ô}~$‚³;|mwdz {}l€ ®~ F€  ~ ·~ ±~„~ È~ } J€ €€Gµ€€s&þ~ ™} {} ˜~~ñ}A~ ò€ <‚ñh…•Ž uz˜˜ úšU¢¥á©à¯ê­¤dœÑ“‘û¤ T¢<¬†«‹§§í¬ñ«I°X§_¡¯¢m¦ž¨‹®@¢y¥jª´¬¤# ˜Œ§‘¡œ¦E¦b²A³¨à °™~˜–C–ë”ä’î¥]³°ã¥ïž+¢§–ªå¬¦ª¡pŸ«®¨­~­ ^« 7¯²²þ¯x¤? §œFžø©®Zªu¦†¥á¦¤y¢…¤ù¥À¥öª¿Çﶨ¬D¦ ¿A˜Q—Ô–ÿ夛²Ú¶÷·I°¤if·0µН¸¬»©â¦ÑŸ‡”C™Ÿ££=¥Áª#¬ j© ?›¤‰ÿƒ:Š÷ ª}§ «‡ª{æ˜ –‹¦‡y”Q¤[§ý§«©¤žù£g©!—1I“@˜Μ:¤æ¤•׎ G­µ¸ºµ{§âŸÖ¤­ƲݬÞ«;¤[Ÿ›—›’©™“œÿ𝠝°˜¹q¸¹¼î°{ 5‘•ˆ˜¨œŽ£Œ¥‚©á´(¼*½Z·²ñ¨c§£šI‡k—¯ð·¤®P¡Æž¢R§¶«†°<³ݸ°„²Þ»¶O¬‰²ï«ƒ°Ÿ¼üºÄø$¡³ÿ|¬—°_µE»ž¸r´_¸¬@—¦‰ %˜) —œY˜ :¦ ¡ì H{ | ~ Ï‚  Ê}Ö}i‘ צ C¨÷©¦Y  K ë•Aˆ |#{ ^2‚~åzjvÆx C~ …} ~ –}}â~ ~~Æ~§{ ýy 5} ê~5€u€ü€ §×€»‚ `~¬~ i} Ê€+;€ ~ € r€q€º‚Ù† $‘ ­”ÿ éžÿÔ¥ ™ ~ž§B¬k©ø¬ C˜x q• ¬ ÿ³ö¹ñ·å±H³¥°ͯx±ѦüŸ©f¶ûÀ—½5³¢³M±h«W£ Ÿ{•i•~žÔ˜iŸà¬ä³Õªh¡ì”Œ’ŠÏŽ–Œb’3¥(´³ª£¼™¦šä¢ÿ©ú­¬Y¨äªk° ±!¯ôªz­ÊÇ Ç´°ì¢žª–]˜ƤÙ¨ˆ¨¯¨ñ¨K§6£Šž é£.¤̧#¯“¶¡¸íµ¯Ž«¦¼¢• ažºž­§`³|³)²"®j¤€Ÿ#ºÙ¶ü­ 0¦ ¡¯þ–}”Ÿ²§–¥}¥˜§ ¨»¤Ù›gSŽkˆG’˜š “±9 ¦–²ˆÖ±‰Ã~  {  ޏŸ9¥;¦…¥À›üŽá‘Κ±·Œ,‰²ˆ\† WšÊ¥–¢'µйn±S£—“6“DŸ$­Uª¨ ”œ!A”¾€~—Ù™E“`¡ »-»€ª»µÆ ›“Ñ‚ å—¢•­x§8 †¢¬ç´ð¹¬6¢Ò”Ç¢` þ””±¬O°À¬™œ­”ó™? m¢õ¢°š¨"® ¹Á³a¥/¤Ô–„ž™ÎøÒîô&½û&ø£¦²GÀÿػڱÿ·E£ ä“d Á¹ ›ª€Žˆê…Ï„ ü| | x{“~„~ ‡ )— $¤ (£ Ô¥ ¥ a  I  ™ Š E‚ ¾| û{ *} j}6y ÐyL z|­} x~j~}Ê}D€õ}‚}Ýz Ð} }Q~8H C YÊC}Ê~Û~ ˜} Yf} j} ¹|Õ f€½€>ƒl„ ¯Œ Ä”ž <¤ "– j— u¡ £©æ ¡ –œƒ †“É® Ù»ÿb»I¹ò¹•¸«¶ã³ÿ¬¤¹•ß•[™r¨C²zö׮ä«^¨§¢´ŸGšY™Û™Ñçš ªg¶h°œ¦H‘’| ˜v ™~Ü{•ãš±§*«¤Ü›ˆ”SŸ§Z¬,§¦ ª]«N¯,°ô®¯+½IÔ „Äã¦@žožs—–ù¡ü§¥_©ž¯"¨e¢4¢¿¢’¡Ú¢'ªªH´˜ÅÒÀ¶g«%¤Z¥ ãªç©õ¯ã¶^®_¨¦šó•2³:´“© #› ”Ö„“ð«÷¯]¥µ¡¤Y£4ž¢œÜ CœŽ’)™^”¸—’šÐŽ¥‚ ƒá‹6c‚ ô•|¢ž©E©Ö¤ ˜œˆ͇ÔŒLŽÁ†¼y ê~ ,’”¡ï•±ì£›¸6¹~­"Ÿò‡…†¡š­~¬®£ã’h……‰Û–ĘP‘Êÿ^µâ´!› Í™k’ê‘­|‚Ÿ’­‡§Ÿ£2¡y¤AªG±[¡ÔŽ…™%¢Øš2’˜ãž dŸ ˆ™z‘í–=›lžê™Ý‹<“¡ º’Ë · ùœ “3† ‹wºýÕû-;‘ G "²þ jËÿ RÌþ û±7Ÿ1“…Žš} e@“½“ -|¡~p~ « { Ý}i pe„ ó™ œ ¢› Ÿ *¦   ŸŸ =› ÐŽ Ý‚ ô ¶x ñz ‚à€´yz–{L{|C|A}-}æ€(x{8|ß}p}K}ñ ‚  é~„€—“~Ø § ƒx Vz Œ~­€ëƒGƒs~ 0ˆÐŽº—mœ ¡ 3 t™ <š g™îšk€ ÓÒ‘­ Џÿq¹޹µ¯]µc´V¶€«<ž“ \‹2„¨‰^” ´š‡šü¢Š£6¢6ž0œõ™'—u™í—H ÷¬—µ³&¨ÿ—@å| ‚ ’À¤ì¬R«h¢f›Ö‘ˤ9¤µžfÁ¤ª”«ϲ!k°"_­|¼ìË J²þ›g›Ÿ¢™›š¦ –¤¤¬§ɲuª§¢vŸúšÙ–ö˜(œ¢Ž«q³¡½-À—¯¨¨ ž«$,®#߯ ë±²µº¯V¢sš‘øï¢°ü¥ü‘âë–S˜¤¹ÅÂ`¨Áš—o9•¡Q©v¤‡˜ð¦–°§å§—V‰„p… jŠêš:¥A«K¬9¢­šƒú“<“S–°•û ‚v‘8ž–:–짺·Ú¸¶¢ƒ'€ à˜ ´­™°¢ÕÅf|«ƒÓ“ù•õ‹ H·œ}˜ ª€¼y å«†|™‚—§Ÿôr£è¥†£Ÿ×  “Êù†^‘¿›ºš¯ŠŠˆ {”{–ÿ›œJ›œ&–¿fŒx  [¥ ù,‹€‡‚ F„¼‹«†èˆyÊþo©ÿNÊ[Ü뫬‹¬‰ ‘\ŽµÌ‘,‘¢{C€7Â| z ó|˜€ ¡ƒ «„K“H– :— Ö– Ñ›§ ¥ ž "œ ‘2| | Ôx ©z ~~¢w0wÓw9yåvxwŸwR{Çø„â~¯~%|*~ ~‰£€Ï~÷~ ‘~ÌyÓ~|Õ€›€ 1| {š~A+‚y‚  ¡‹b’X“ &Š I‘– ÛŽ „Õ‰ º~ Áv ‹ I–`ž ä£&¨Ò¡n¨A¨ ˆ³˜¥-“ | ã|×|"u v Ayƒ5šѦþ¥iÉ—6–ã–ï™Óœ‰ªQ²§³ ©æ£МÇ”.°–⛣¥jª¿£WŸ œ˜ö™‰ Ÿ÷š€’™ÔdŸ•£ß°Qª գ垖­¢W™nž¢d ›ÊžS¡›¢N§è²=´D¦›Ý’([Š/g•ßš—P¢¢¢]§ À¯!»³"ç¯#ݳ!ô·T¥¸öˆÝ‘–ç«ÈÃp­QŽ$¡j¥§«$¼ö«™²Þˆ2”Q¦í±–²©®ñ¶¡«R¤”–ÂŒ’h— Bš T™3œŸ£ã©`¬f®º¥¨žïŸ”¢ ¡LŸ( (¡—º˜¢cŸR¢qª*¬4® ¶£ € ×} ùšO®–±rª¦˜+Š´‡Šˆš”@–ጠˆY–EÉ|$l ؃|Œ|aFš?—Ü“—ÄמÜYŠH®“Ò—0ž*šÍ‹ôÚ‚ð€ 5 •|¡ Ѩ ´¨™¡_¡C’ÓƒW-ˆƒƒ›‰ŠpŽ ‰” P‰Çr u Æh .vŽ“¨ œ± ‰™ÏŠŽÒ™ƒŸå”“+–Ò‚P ¦{ s{ Ÿ€ Æ€‰‚ ë‡ ä– æ™ ¡™ Äš /Õ¦ <¢-› ò˜Y _} ^v Ãx —x J{zãx ¦yvxv{t†vuJv©~Š€ý~Ñ€”zûT€5Ý€’|^zŸ€«}€½~†~Ö(ð€ ~{ Ù}e=‚@Ê‚=€ Z‰àŽ”é— ‘e’¾– cˆ ny σ ê‰ ÷ ƒ{ Œ€ >ˆ@’Ý™x-›b—ƒšj¢{™€Ùs™‚ †ï{ u \zš‘ª-¦ãžÅ–ϕڙæN ²¯G¶˰ûŸ&”š=—…•­Ÿ@£;?›­”Z%”›œ'¡…¡M–Dk‘¤•÷”“9 ¢Áœ”»•õ–%”Óšgžÿ䚙ܡM¤`¡MŸy£Ê¥ä …›?—•¦‘ê,’—˜Ršs—÷Œ—‰›«R±<²‘·°9¡¸ˆ ‡ ßæš°½G¨2“R™·±µì¸ª¸à³lª•¡’ÊŒg‘_ž–°"¹ʰü¨•©¡‡•É–AŸX§Ô®ø¬¿°Õ­ů­“¯Ю§n©ðª¢¦ø§÷ª ©>¡Ö—gšâ¥ªªÀ¦™Æ™†£š›cˆDw‘©¦þª®Ÿ¢w—g–f’™¥›°š—¤ž>“F2”m“ÿ¢‘Þœÿ¦P›Ò“€‹„ÐŒÀ†rƒ“‘F›³¾ÀÛ¬{ Èr ¡sî|Å’æ§ ëÄ Ép­ˆ yœ{‘‰½Ž(ŒÁ•Yã‘ ¬™ í” ¨… t ]{ ÿ|$yu¶”5• œE¡¼«5žÒ™Ê—† Ê~¨~€ d€ Y€ Ž /‚ ó‰ È— ‘—¬ŸŽ› pž Î¥ œ $˜ ‘¹ ë| Àt  w `{Ù{vz +w x vÏs?o†t Aqúv=~oWò~)¨~Ä}¥~z}ò{‰}£}~/~3|i}¬~ ?~Ü} Ý~˜‚\‚è…ƒ‰ŸŒÓ¡'¯ ˆ¡””•”Ø‚ Õt |«…³‡ ¡‡ Ö„¶… ‚’[šô›¡Ìšä‘–ŽÀ‡œ…¶˜ÿ t£ r–Ԛђ݉Å–®ŸI¤Vžz•‘œž¡¤¥<­ûµH­ð›nŠ­–—i tª[¦ˆ–ƒ‘Ÿ‚¯} 8~ /‰©„â‘"šÔ˜&™9›½œ^•[‹‡•Kœ§ŸŠž_š®ü®üšx“÷š]¢rŸó™#Ÿ}¢(¡o¡2¢Æ£¢A™ÿ“†üŒ÷U”U’§•ò¢_®´¼_À?¯Ö˜)ƒv‹“Ÿú•¦˦“˜Žò£4´T·´·´k­B©”¡:–C‘uŠtK§R¹­„œ œàî™ü—󚢙¯εpµ¶?²4°ÿ­æ«B¬l¦.«¢« ¥ÿ£ý©`¨̤A•)³žªƪ4Ÿ[Œ‡yž”=…kˆ`™Ú£g¨J¢›…•&‘u¢›¨1¤*©î¸”´4¨’+ˆñ™ÿ  ­0µ­¡}…ò8‘‹Z™ý2£~À‡ÐŸ½à XŒt·t‡d”O¤…¶<Á²í »™¾Ž‘ý™<£ç£°ž.’ˆŒH•(“Њï…  Ôˆ # aŒ ç–ë£K¢M¥@«hª¡™èš Š›‚ Ä  ö‚ %  Q„ ¬‡ ¾ q˜ › ¾¡ p› ó› :•Ï•Œ 1‰ 8€ —| |-}†{æy ¢v uÕt’n»mºlpr\y { €X7x~ Àn~Ém|N|·}7{µ|Ñ}&}Þ~ÿ~Ú~~3}1}²ÚNI’…‡‹ nŒž ïµ ÷¬¢ž°•„ 9x Ú}óŠs‰ ጠ — Ð’ \ž©¥}®h®-¢Y• ’ å‰1¥_´¦M£L£ß–äÍ–Ò‚Ÿæ›"î¤â¯m®Ú©”«-±¹²:¦ï–RŠÍ¢ö°§ç›>’wƒÓu @pJn w Ñ} ˆ™“©ž±¥y­è§™æŠN“mŸѤË¥A¨Ê®m¿3ºŒŸƒ“l•¾œÑ¢¢c§N«ת\©q§I£Fœ™Rj{ *ƒ*—  ªš¼ž¬ý¿€º€¥`>ˆ€”Þ˜§å£”—»¦M±8´¹ÿ¹¬«ê¤ךç—!•›Šˆ¡²—¦X’”é )Ÿ¡8¢¥©Ö¯Å­ÿªá¬t° e±É®ç§X£ Ÿi¤¨¦N›\“°ŸZ¥n¡â€´’§_¥¯—2‚d…œs¥÷¢C“Ʊ—þ”â˜_›¨œS•ª– x¹ÿÌÀÿÍ«;°ʼ¹v²öB•,¤D´¹Qº»µ̯Ž–Ež Ã¥ ƒ›*¤­k¾(¨ÅЬQŸå†D~jŒšÚª6«Ϋê±l¤£¡$—c™iž§©ή«­›û•«œM ¸šÙšý 6” ’ˆ ÂŒ • ™ýü«þ"¯ÿ¨Á°`«öžù˜‡•’8‰Ì~ ó‚ 3ƒ L‚ oƒ¡ˆ /” :—–˜ /œ ˆ£ Ôži• °” êŽrŽQ‰ ¦Š * ~} .{{Í{ty¤r Ör qNmkãkÏpëu=x®~&€~e}Ó}EzúwG{ àyiusì|L,~Ä€ ̃g€‚~7 T#zå}ü{ >…e‘ Š“s˜ ° 3· « ô© “ ‡‚.€Œ Ê”t—¸’Y” ­› Ö©ó«D¬Y¸¹¶©Ï¡ ß‘y”Ï£‚¨¨0¥œþ•ƒbŽ™!¥ˆ£ ªÚ±+®«¡§e§(´u°ë¤ó“Ø¢¦®4¨ͤ| ¹•0€ –~ u¬p »s Éy®ŠÊž3­§´w²[§š›Ÿ.¤D¨ª¨ƧË­ì¯m¯«œÌ’q•Ñ ͦ‚©ý­”±L¦ "žÔà—ì–Å“þ…‚G"¤f©â§Ô M“”²‰a†¯‹)’¨ ’þ£à¬¡§#œ!ž,¨‹®¿¯M·‡º ¨ø›²Žò‘J—唊ü™*Ÿ“ŒÙ˜z¦¥¥>§A¨©&¬̬7 Iœ§%±E«Á£N›L–…ÕŸæ’ )Šד’mŸjŒ¬w Å„¶•ܘ³”v’’…Ò¥¥C nšsšæ’œŽ8—›ï‘¤—·ÿ¢¿ zŸ ¦X±}§ôžˆ™<™ŸªÙ¸Q»D¹µ·=©–R*¢ E¢Ë«çµ“¶Àõ¶š¥X£ÿ¶Œ¡_S”)¦0ªã¡ Š£²¨¼£;™× $ªV³í®Ä¢*˜Ÿ¤¥(Ÿþ¨’ Þ€ B…É8—ÿ°Ÿþ£ÿ¡¨£ªÒœ E’•z—·‹ É{ “} † † d Ž” ì™ =— – ,q¢ ø– “ ±“ Ñ‹ ”Š vˆ º K{ `w §yzyäw‡oñm¬€Yó—©…¿y¨ˆ “z ¶ššƒó‹Ïš Y— –„ Ev jp Pyxxq€‡V”¨¨ªË‘ ˆ‹ªŽ˜–<›iœ¸ õ™µŽ¥ˆʇ§…­ŠÞ”J˜<‹"¸Ë¢í±x§ñ’Ѐ)€rF•‘H•:œÚŸU[užI¡Ǧ¦ –Ÿ”Ú›Šr Ar ²wÇN‡ÿ’@“¦ˆ ž €¹$€œ ¡Y©Ý¥~ Ù£o®r¶£ìš ÿ˜é‚-x Ç‚ ‘‘ `žž²ç²±û¶ ¸!®h¤¬ž0”ÎŒ/•¥±¦³´¤«‹I|j‚†x¡^©£Ô¤õª–©™ªX¦Bž–:˜ø@¢Û ïž½£b«¦°1ª,Ÿ £á«­¨U¦‰¢<¢g›2™¡q Ì /¤~–ê‰-‘ò¢¸µQ¹ߣ޶Œ˜è¤RŸW`†‰p–ÿO-¨.´Ä´`­û¢‘Š׌S” ïƒä„xƒ&…¬‘)“´”€‹Gr ×n jy ™|èŒ ˜‚&vÚ›§˜{•5‘|†Ry’™Z¨^µ!²\£‘–Îy¼{—ˆèƒ QŽ“ ¢ƒ…=‹ Œ‰þ­Œý v‡™…} ^€ ÷… q… ˆ„  } w{ dxþ‹ ›™Ó›X– D– U™؇ J… ׋ Ž -‹ ø‹ ð… †r o eh ñh òoGm »nØpQoñplnÕqÐrs Åux ºx Îv –x›t…u]u‹v¹vsp ƒfeïiÌl¨gÃi0k¨mÿÖq ý.w ýxwþ3zþ)|aƒ~‡b“ᙇ˜ Ñž ™ v– ?ƒî}¤Œ‘Ó‹sr€ X ²‚ø <‚HƒN–––ïÇ}A| ’ ®“ °Ø‘}ˆ¬ŠY•¨–…€z¿‹šA•]q•W’£—/‘H޹ƒÓƒ=‹5‡ …ø†Z{ó|¡ˆœ‰¡ôšÿ†:{[†=‹©x‡Ó•þ›â–þ•úœɨ{«©ò¢®žõ˜‡‡u ÷v 3w®‹+”’ ˆ?~ú{au§u'…ð”{¤{­b¤KžÞ;–9† d€ Fá§l²ãš”Ë„ëŽÆ’;‹`­b±)µGµÚ¯à¦ß C˜q‰3ˆ¢Œæ‘¸µÔ¥-ˆ¾y¥„s¢“Æ Hªª¥±¥W­¢² ¯­©$¤8  £¥X¢š¢ò¥w¥$¥Q¥¤©F H™¦ ­Ÿ¯3¯"­¬ð« ¦;¤§“¥ñŸ¥šnŽT…—ö©°~« `š(‡̈š˜r¤<¢g™¹•ÿ<—ÿ1ÒŸ ¡«Ù©œm‰Üt 2v ‚ ‹Š ì—å9“:“ö—B‰ y :z ›” ¿¤ÿl¢þ °™CÓ’vŸWœ–h”xŒé€¶Œ_’û #³û´Žª<—©€¡„“— ‹˜ù ¥ ¡ •‹LJ ^†þ õ‡þ 4ƒ ê}V} ›† ?Ž ½‰ 3† P~ « Üz mŠ í›J#˜ G— ‰™ X‘ M† ø† 0‹ ºŒ Z‡ { ðx àj Ke c ài £j Ãm¹k\léq¤t¼t¤pÇqt8tÝs¾u¯w¯vÕuÖqÏp ¦qÌuºtÓlg'mZnÿ fý[eäbOv«u]t»p=}ý[‰ü„8„Ò‚‰ógŽ }‘ ëš pž W™ U”ÿ I˜ ~›å–7ƒ>† Qˆp‰A‡ Í‚uƒ¤¡k¬s›¡’¤– ^ t¦2 „ŽËŒqŒuщ ‡ »š-£w—‘*“æŽÞ‡‡á‰`ƒöè•”®„:{!w c}g„ ’?š„Š¼}ˆ€B?~Iý”5_ž/›`Ÿu¥e¯¥¸ë°$¨¥æ¡œ˜ 9銃‡— h™:•ÄÃ…ê|uôwŒ…–A¡¤¥#Ü–˜‰žy 6z A– ±R»ú« Ÿ‹±z™‡³“sޱ¤´¨ȱA¯n¨~¢žšÖŒÀ„ý ‘ö4þ`™Þ® ®¤žØ…€ ‘Ù–Ù§t´­‹°û´R¶–±=¨/¢'¡ §ªL¤(Ÿù¨ö«ë c‘îŽA„$:D¡`°®¨®)­À®Ô¯®©¥© §ž•QŠLýžì©¨ù z‰²š°¦Íž–›J™ÿzž¢fž¥˜F»ž¨±“p‚úˆ” zœ z¥Ó­òžT’Sš\£Ó§‚ 2ˆ  ‰± ¾¨²ž7™ÿc•µŸ˜£¿þ.Ÿdœ‰X} …™„õ˜h«I²¡šÉŽñŽtšûœ  ¡¯u³'©‘ÿn‡å…ÿw‡ Œ~ Oy §‚ .ë—<Ј¤~ ȃ Ã| ìŠ Í™èž e— u’ Š #† † Ì‹ /Š iƒ ôt êh/cåe òl k Ñm ¢ln¨l-ppqOwÛs"s*s£wÛv výuÈv/tanvoßt„u|qÈk)gØs—qÿ/eûùhþYfûþ¯‘›{o Rv­ÿW›3‰«‡Wˆ…ÌE‚ ñŠ Í— º£·¦0¢ §¨ ÷§ü¦™¿ž ß¡i§}š …“Ñ GªÙ¼d®m a <› ÷¦–ªg®T¥·š’ò–ó“üš Û¥ §š”U”^“ƒ xæÞ‰fšT›û›Gž·•½…÷x ¥…  /˜ã—û‡U€ˆˆ½‹¿™<›¯¦ú¤¡Ξñ J¨™°”¶D©‘¤ž¾Ÿ˜v”®˜¿ž±© ¥¡:œ€’憉Îޕ¹™àš™Š$ˆs•.“ŠɆäž‹·Ã'»Û¦ä…{Ö‹#P—4¡¥Ö£`¤HŸeU‚¹Žÿ„ ôȆù­Û£6£@—ÌRŒ½Œ¡Œ\•ÿˆ©™·=·¶3·³²KªØ¥¼›Ã¦“©  ˜³¦¸§Ö—¢×t üw ⇠° …«F­a­?ª¦©#¤¦©¦3§` ›—ñ‡w†šG¨¬:©jîˆêz S‰ :—Ù í’‰š‰™–JŸêœ5’%’4š¡œ™5ˆ› ¤¯§áªžjŠ““o¡þ›ÿN•ÿ9›ÿ)œ›C“Š–þ™ÿ ’í”   ýžÿ#¡CžQ‹3w 5y ™…y”¥§ò±£Ÿ˜º”@’4s‹0–#§ ª³« ÖŒõ„~•x ò{ ì… „”­’Á”…†B~æ™ v  6ž Ç– µ ŒŠ )ˆ ˆ êŒ JÒ‡ ôt )iødý€h žkÅm(m él$m¦noæqWy=xjsÞr ¥w:yHuÎt7u>pÑnëtˆw˜yfn•l¤l dòmÓvÿ7pygêqýi}asÓk pよ݅œ ô“ -ŒÔ† õÌ“ ìœˤÙ¤ܨ+°¡°œ£¨ {©U²Þ±¥¨ ý› – 2¥ɵi®»§ fžÁ›n>¢d¥c¬ì¦¹œÙÓ˜z § HŸÝž4•‘–@a“ƒ·Þ…6”’”•µ›iœå®‡ Ož%¨¢‹"MPˆ+•ü¦îµ§¹Þ´ ¨ä¡$˜§›Aª¡·‰ªJœÛ”“p‹æŒ[—  ü­ú°«®¥“E’˜ÿ›7›ô—§–‹–¦‚Xx ㈓ú•É™h§’·HÂñŤ¹˜Jzüvb‚—Œÿ••ç•Ažv™DŒ cˆW‹ÑŠÜ/›Ù— ì¢›/ˆR=¢z²F´Ù¸·{¬¨¾¤¿„ž¦–¦û šÖž˜¿z*‡p‘e£¼©¨I¨ò§7£ x••嘢n›¼Ëy„æ›o©r¬Å©e¥… ÿo | ‰ “ ®Š4‚ ƒŽŽÁ—¼”œ„0‡—þœ›%š›ö Û¥£ŸJ”~Œez†vŽH™€¡ÿ>£ •°†˜€ã’;Åw!€ îyüŠˆ1¶‚‹~l ?’ëœÿg¬â—O+„P¢‹–ÿ±šÿU¨ Ý’LˆøyÛx k‚ òƒ ‚‹ª² Z– å‘ c’ ¿‰©‡ • ±ž c˜e“– ¥‡ öˆ Œ EŒ I“i[} ko ¡h þ¼h Ij +pun bnTn Mf þÈnis«y¬|Ão ðq Éx#w´s Ct{upÖuÌz |%xawcuJu_iÙnFt@o.g¾hôjÿnmžv!‹ˉd¥•2ž™ø‹U‰Øý•J C ΩF®²­ŸºŸa¥k“ý  ¶™ âx™úœ 2š¯šp˜Y–Z˜4žh¤»¨Ǥƒ¡ ˜”À™?—µ”ï¢vŸ:”.ŒÈ„ч†]œ‚õ’w—6f­r¶Cµ?¥°9ˆ˜f¨÷»l´ „°ì¥‘ŸKŒÌ.Ÿx¶h¥þ”´Œ*Žòö—ò¡v©”±˜³&©œ¦…Ÿ˜à¦D¨WšÁŠMŽø—O‹ž…Þë–6¡í©д þ¼ (¼·ÀN»·¥ö“’z•׈‰d„‡[”é›n—g.‘¨–Ç‹F…:|€Æ–w«°’©åšÛ˜e¥!©جù¶ž²ªRªVªë¦ ¡d¨£¬:¢Ï”q’ˆB…ߑߓ;™… ½©§¢¦¢ü¢Oœl†!—ƒ‘ˆ–0˜‡•ê‘zŒ—¹£2©ðª:™•~ l ¶us‚ t‚Ùˆˆ «…׋ÿ˜þ”Ý€K†@™`•7‘Tžî¦ó§žð1|ös §r y Ç~¢…m“)šÓCˆ€ª€ g‰T‡]ti :gr6Š_”–—à›|”¼‘5  ïÇ€Š[ðˆЇÍR •œ›Q˜Õ‘‰þ0€ÿw \ÿ/ƒŠ K”þ=þЕ˜ÿ$˜! µ†è’š R—B“á † 4Š HŒ ¶ ©“ Ž ¥ †u ^o g ‹m Nm Ýo oq9r ÿƒrAr{EzImÓn uåxÍwèwv|t ‚{ *~ ýÿ~š-}H} w‚³}?jCnmqOo(o[o¹vœƒl‰ €~j 0¡ Œ ‰… ¿ŽC‘z’\’R˜+šL›ˆ–l™+¤e”2‚÷‘ü•|’‘ºˆÙ–’ “/˜ñ—޵‹µ”/S± |®îŸ.›U™î˜[”†–`•ý¶ž ‹Š}.~y {z ¾‚Ç5‡Õ–:ªê¹Rº]¬•7ˆú’<ž©«£ ýŸ“ˆ .‚ ­† µ‘Çž˜Ž!ô‘*ÌO˜‚œ¸¤A²¬Ø›‰™­Ÿ¡©«—D…Š“ÿ¤;m‚C˜ì¤)ª¾±¦¶A¸ A±¦®„¬© ·¦ •€Ê€à} šy €€T.£#§Ù¥¯©°§:É|¬v3Š› ¸±ÿ®“¨  –¨U£ªŸC¨?¦^¡,©ʳݯ9¬­m­›(ú{1zC‹Ÿ¹Ÿ­ªo­×®W¥kšÇ™ù—Œ›x ”w £| ­’›Ž¢Ѧ– N–¤£ªb˜÷z Ôx ˆ[;—‰(ŠW™?XŒ˜’·§œ@—‡¢g¨Á¡µí|œo ”n Ä| Rzav WtFy Œª•Ç“‡¹zí}v~òxprÓtªx¯—–•»’ÿ}Šç‡ î„ÚzÙ{é†}Œÿ= ] §‘ÿ fŠÿ Bÿלÿö—Æ”þzŠþ ÿI}ÿËyúZ‹ÿø$•ýý üù–üû8šýú}—ýûQ“þý߈ê}èC• 7— éˆ ¯‰ ‹Œ Œ ì b‘ ¤‰ Í~ õr ‰m j m ”oÏs ‘wq@yx4~€6x¤qêo ™w èxGyÍv|xqwÆ{  ă}~¹÷€Ѐÿ ‡þ{†·qip’qânûj”srwz xãy Å ”—i–¼ƒ Ó ò‰‹0¬Ý DŽ“xœ_¤’–ç…a„Ñ‘ ‡™ ”z’ ^’ Í”A† ã‹€–Æ™“^Œ……üŒ’•£ º™ÑçŽ->•€Ž÷‚LŽžl‡wŠo Gn ¦‚…ˆ^ŠßŽ A”ƒ¬s²­ŸJŒbzè€a†“‹%V‰9z x >x d…ߊÍ•`”wE… ”ŒMŒä”âšÔš~ŠŠsŒK•µž3Ÿ}ŽdеšÑžì‹úޱ¦x©ûªá±¯½³²®!J¦ •/™‹¯ ã Rˆtxžx:v šy#ÿü¦¢³ ±A´e¬º™y‚m…˜f¬­±Ø©©ŸÏœ]£ƒ«7Ÿ—m¢m¡9—Y£€²±L± 2°´¬;–‹v pýˆ››Ù§ö§y¬J®%Ô®#ô¤t™°‘XŽr‰-¸}Ø~ dˆ íú¨;©iœ>‹̈ñšN§Z ÷•(ˆOƒ´Éœÿ°¤žˆ•f’¬›I¡w™/¬­9£U¢¾¡ï—ŽWˆ¬‡!† X’ Â’€…†…‚ ؇ †”Þ—2ˆÃw¯| ï€ ÍW} íʆv–ýšƒŽ¦ŠíŠõ~SgÐj ’uå€ÂŒÙ’‰”¢ Bÿ Žý ~ÿ ¬›ËœŒ’âƒûƒþpˆüÁ…þ÷ ˜öÇŸÿøK¢ÿ÷ê þøÃ™üú|‘ü÷ßûùë€ v }† – w”³ •… N† Ò‹ «?ù ê‰}x 8p çm j ²n -o qx\K… ‚~Àl}±|£s Ér µtªv Íx Þx  ywy Qz p€M~â}ö‚ ~à&yØxþaz%u¿u6p4cànÒu°y ©{ x ~n úxA†B† \t 1yZ$£~s… œŠU‡ f„j’à£û©`ž’‘l„¢‘ ±– _Œ >… ⎠Ք ŠZ Ÿަ`— ª”D„Év * $‘—4–“—†áŒc—”#†"ʈÔ|Ùl €rbv¹‡¢“וÁ ‚Y€ Õ”½¤à˜÷„ r DqzÞ„| yr r Ðs Xv*~⋼•² N—±‹…€Xn °qyí~i‡ˆ9ƒ6ƒ Ë…E‡‰•‘›‘i›””ø‡»}¤l§çŸ¨Z¥e§'¨¨%––‘¥¥ ,Œ(t—o (v:|s¦®ý­@³!«ؘ‚ |÷’ƒ¤Œ£o ž ¥!­rªìY•O䛎O—#¤å«­β¯òœ‰~Ï}€™Q§•±û¬£­#3°'•°$¨§€ @“űŽΓhµ…n,¢‡§á¦¨™èà Õ‹„£Ъ¦ç ›–Œ“µ’˜”¡ ¾›>Óžš—ù¡ܱ½­ü¥(žšU•à› X¥d¨s e£i¡äžç” ÿ }Œÿ .’ÿ ꕈO~ „ ï‡ ]| ·‚ ­Œ ð /¨ ]± L’ }Šyƒ´w›q¢ƒÿx‹â–¯šÿ¸™‘ÿ ýŽÿ Žÿ ‘ ›7‘ 7ŠþñŽùÕ˜ý{—þøù óª¡ò£òažø¢—þûú“ûú½Œúø$‚üü„vþwzÕ’ ´˜ l ›ˆ §† œ .ü“ !† m Ml ti Ìj …n Ão œxŸÛ–ò€cÍ»~ðu…jTq,v _w ·x 0{f{y{ ˆ^¿~}ÛÎ|•qopvtíq¤hkq—z.} &€ïs ?k §yï‡æ€Ew‡|M‰R–iŠ çt ír ka ¥o ëŽ˧è°£¨•ED”÷’óvepû‚ t• QŸi¤ý§f¦˜ oŠãz`tæ€óŽC”_˜¶¡žœ²–“šš ň2u•‚ËÝ€ŠV”–À–̘¾”¼f}éˆv¤ލà‘ÿ|Fq v|~ß}­v •q ™s Ã}ú…VœŸÙ ±Áy ¨g ðc œk žr¿{ j–  ¿¢è˜“I‰b²“õŒ#òŒú‚  y  ˆ—b™˜œ#Ÿë¡Ÿñ« ¢G‹Wƒ Œ –¹n ^oÚ€!¤žÍ ù©E¤¬”‘€i}™…gŽ“’ˆ•&™ù¥)ªnªÓ¢©”G—™d€–Þ¤ô¨ЮA²²²f£ò‹Þ‰©œ:¬r²Ž­!ü­#S«#ã« ¤ª¢!˜ß•-™§œÓ‘]ƒƒ”¢¦;©b¤e—õ‰ã~惇™›¦‚©-§£p•iˆÒƒ<‘*Ÿ;žÿ·˜•&£ý­¾¬,¡­›˜›škžç¨¨/£ס¢á¡¸šAÍŠ +Š ®„ ~† 4‚ û|@s=ƒ|“ z– ݯ Ò¹ Ly ö} #‚ ž‡þ»‡þ[þ ^•ÿíšš±–¯’þ •‹ :‹ ³™ô›ÿ1”þ<ûüô“üýHžÿüÄŸö}Ÿôl¡ô¡¢ôø™˜ÿú`ýømúøˆøý8vùNlýN‡Œ™ :• õŠ ˆ Ï ˜’ø”‹‡ ™m Öh 4g ÿOi mäs .{ fƒ D‚Hf@}r~¶xDn-rõunw .u exá{Û{ |éƒ*~Û~ } ¬| Ù{‰ur‡r¾s¶ognësà~ «~yz ÷o c @y † †â†‡>‰Ø”˜Œ wqfs³[ ¹e ˆŒð¡¯­ïµ¤©çš«™ ’r}5t g~ ¦“ N ͦ]˜8µƒ ðo ¨‚¾y=‡3” ì“ z™ª«…–?’ ˜6Š PqXƒ–¿šÿx™þ!œÿÙ¡k›”fŽ=Žéˆ7†3Ÿ†°˜¤\ƒêvëzŒ‡Zq|`‚‚‡9‚ Ò ^š3›~’ü‰ ®r Ah Äq ÅcªϹA´º§ÕŸ|œ”õ‹ïƒ¹¸}²x öv ý #Žƒ3‘é“Á‰®‘ä¥ÿŸ^€ Í€ °‰ Áª’ñ}MwL‹ ˆ‘”ŒçŒk’Q™¨”Š͈·‹í‡0LŒ˜™þ¢ô¬?§[•«•|šk”þœ[ª¬(²²ç²ªgšfEž=°MµG® § p ÌšÈ£–¤ãŸWš=žÇÌŽ¦…“Á¨5©סü“Æ uË€>—§¦'¨ã¨M¦BšqM}‚'–埛œõœ¹ æ§ ¨ï¤,ž²˜Ôÿ4˜ÿÁÿª¡”œëœD dÿ “¸„^€z~0ª‚ Q… ]ƒ3v —i ²Ç•Ö” "¦l°¡™z oƒ ‰¦“Ì•ÿˆ–ÿò—ï–å‘ vŒƆ y€"ÿ²ˆ”–ÿ Çšýq–üý]™ûù ›ýú1Ÿøj óÇœô…žöºŸ÷Lœùµ™ø[’þ÷ï‹øø&…öþBjüÀb ÿ|r’¹— } † 2Œ 0Œ ùŽF–Ÿ† Ós k ¼i 0k ˆnHq<{ …ù‚O–s}ç|L‡tuo‰q_uzt¯vîzZ}[{Úf}x}Ê| ÿ~c{Czt^tŸu‡uqArPx *} z Šy îi =f !}º‹ÿ “þ3ŒŠ€‹ã˜µ” z)žúèe—iw‚”à#²¶¤ÀŸ¨—’Qˆ Ÿ“ 2–u•’AŸ|  ‚2m ×sU‚ï‹R‘ Jœçž 8Ÿ¥ âˆ!ˆ‡”{‘ |N|½žÿµ¥F¥ ­Þ¢×’`‰«ŽÕ}œ»¢ú‘b€ž„ÏäàŠ’Œ”)›#Œ|€ †õ•T¤ê­G¡%‹ o h 1ƒ÷«¦¾Ó¬™Ž›Ä¥s™V(㇑ŠA‰¸è‡WP¿’ÿŒ˜| Ax V‰Õ¢¡‡œ{é˜*¾Ô¡¤’½†ÓŽÛšƒµƒ^“–· ޝ‘(“ƒœä¢)˜æ“•£–è  §@*-¡…Ÿ$ Nª¯δ®²U¬¤¬E¢† ½•á«§±{­j¢î“ Žâ›¦ê¢C¥«9¦ š•´ž;¦T¥aœb•C…Q} ˆ›Ϫ`ªY¨`¤w™F’çmvD‹øŸÿ§¡žÿ¡ù§b¨ãã—’“ÿW“ÿb–ªœÿ¼™Ÿšâ™ú˜Ó’‚ˆ%v hutvªt`‡ Ò€ Êu pÄŠ ž&• ‰Œ8rx Œ ¦”ÿ¦™0’å’öŽ Ÿˆûˆ ‚ÿf~ûl~üd÷èŠú ŽþØ”üÿ0–ûûèœüúÈÿø† ôûŸñ9œñלô·÷³œ÷™øÒ•þø÷ú,†ô k'c­~ù‘„— &Œ ‚‡ |Š $‹ 0 ‡“¥… ~s ¥k ©o ÄnÌo–ú˜£–]“V‚v‹ry‚ÿ‘yÿÁŽ¥Ž ´ y‰»Ž›ž²’*vs €v ¿ “ ˜Nš—Ž ʆŽ…ìû‚ù‚ó}€ó@‡óχòЉóÐŒö6þ÷ýø©—þùú÷_ŸóyŸðMŸñµžô2Ÿø÷Gš÷û–÷¸øúˆö aú‚X}xüêŽý‚ Š 5„ 1ˆ ` Ð  † rp 8n Cn 5o²lÚrå|f€â~~º~+}_{ ­sÉioÿs-t )v ùs ¶rAvw2z ¦y Nx Æ{ x w~zhwlDnt£y5~ Åx ŠrÈs vl ¼rÕ‚Q¢ÿ?¹ø‡¯ X¸`›þ´‚B d‰‹(€–2 ðv st ® æ–Ì¥¶ª1¤Ï£žŸZšR¥Z£Ç å“ bî /ƒ ‰åŒN|‘ë  ‘š ׄ ü‚,I‡„ M 9˜µŒŠŠ‹‹l–™¥O°m§™ßšõ™¼“A‚d}¦ƒ“”úŸ˜”„[} ~|ð}耞…¥‡}Ás~s …“z˜«ˆωªŠÄz î… œ y 1q Çz ·Ù™üí–NO…4†ý…O}Y|@‡:‘¬‰ì‚ HŽ9ŸÓ ”™nˆ \‹ô¤?»”«=¥·’Vƒ¾Œ”ö‘êšHªÙ§Ž‚8Š¿¤„³~ª¿›‰•ù™õ¢Y²;³±\« ¨h¨«¨d¡ŸШ¯b¢:•Tš}©«x£”‰V—Ûª@«ë®Ò©dœLžï®ö°µœÓŒŽNœµ¥˜¡å£”§µ«8¨˜£RŸb•†•Y‘>€û˜§ªE¤ëœÄš•œ –¨4 ý–þx ”‹ ƒŠh”ß—e• ’Oƒs }y>†ÿ \ü ••û Jý ܘ ׈ìŒýc–ÿ#œÿ™‘«‰J‰G’ˆ ω ª” w™ —Šÿ2…÷ …÷\‡÷…‡ò †ïr…ðýˆñD‹ñ.‰ñ§‹ò¦‰ó¼ŒõE–ø”÷ ò=¢ð>Ÿò žô õ6÷ª›÷k–øˆùüÃyø—Wú•Uú§vøoˆû¡‘w‰ ¹‡ Úˆ o‹ -P ¬† jq ìl ¢i õmÿo¸t~€ ™€¦¨~| v TmAk þGn ÿesvs Îq nZqÒtÿÁw ÿ‚y Hy¬zÓy©wEy³zòrús˜y¥~ \€HsioEd úPc üqsˆý£¦[³ m½ <žüwNm °‹ž€œë; Qz ïy 0€á…Ù— Ì o£Ý¥¹¡ú© .¬W¨fžΖ“U7ÿK‘ 5”<–K˜ˆ§ {¢ á ¬ˆ ~›õ§ž Œ <‘ v›?U‚‚×ûs£Fœâ›P¢9£ÈœÆŽƒn  ’ݨ½Ÿ•‡jz «s •{Äy£v |,~~sfi ¶q %t ~s ¹} +—Á¦m—1‡Ÿ†t ¢x XtÊŽü“‘‡Ž’š— –³lˆƒ„o‹@Ž´…>í«­¤v‘0™Œ«,¹0£¹œPŠ Šx b‡7—ÿ–Oœ´¬x²¤˜ê ’”—žã« ¦ë“û‹'‰ÇŒµ¢´h¶f°È«ɪ“¨1¥E¢^¡D¥a°Qµó°Lªð§Ä«Ý«ƨå£P£•£›«?­«$¢ЗeŸ'°߬p—¶Š@Ô¢m¬¨èªzªªå¨Ô¢8 ¥šëœ¡ž”›¦š³Ÿß©ý§3œÁ’ª…õ•b“;ŒŠ ¬c ,“ — ˜ Å–˜“‹›ƒ Æ”ÿ þ'™ü±¢ûæ«þ—šÿÖ“‘“Ä ¼ ÿ°¡ÿi™š dœÿ›þ]‰’~ýåG•þÿCŠö*ƒðЀïʆðã†í^†î5…ñÔ…ñJ‰ðÿˆïGŠðÔŒòlö-–ÿúÀŸ÷÷¢ñ¡ð‹ ñüóþ ÷œöXš÷'•þø¤‚ùûlø½QýÉUþÿOtþÿ«†ýÿ‡Šމ èˆ ‡ É î¦… ªt ·i çn}nÏo±u\O1|{Ðw æn ´k Äk Äp¹o€pm!n¬iÜkÉlSr þp )u|xxXyÞ}?}yõ~ âw Úu×i£aû>SòöV õÌ_ý_~§xˆ «­ Ô¶þ%¤ÿk~Ry š„®È¥.˜l…Óÿ)üí– Ç‹——›› £; NŸë£ ì­*¤>œ;”ý—éšó–™ô›6¢ä¦¯å¨ ×›1Žìš€¨›¥w› vš `›ã )ù9–—žzžd—å˜O¨ô°ß°¸Òˆæ’D§Щ1˜B‹zµ’i>ŒG¨…‹w%j øi sv Óv õ’Ñ©€¹š¯³¨K˜QËy:þMý”Q¡V¬b³"¢ú˜ŒŽ½ŽÄ‘±˜ýš$§¹¯ö¶ß¹«î’öž&°ûºö ›’ Ø} ‹Œe7@¡­û¶³N¯;©‹¤[ ª¤ŸŽj…0Ž€œÚ§¹°â²o¬/¨{¨³§b¤õŸ1 k¦s° ­ñ«­e°Í­««†ª«‰©2ªã¬ù«ƒ¤Rž‰¢¨ Ÿ…’œ…Žužg¤ð§†­ç±–­¥•¢ÓŸ•õ•â£A£m§#¦×¢¼œd’ùƒ||m}{z 'ƒ X… ¸ 2š˜ ™ÿ ?— ”A“ÿòšÿ¢þ̘þí¡þ¯¬þ÷¯ÿçŸþΔþ«–›™1ÿÆý}ÿ ¢™ýûšûñ•üÔŠÿÿ‡ùÛþù÷–ýù¿öRðJ€í‰ì%‡튅ﲃð@…í/‚íéŽñŽÿô‘ýú“þûû™÷á ñ/¤ñ$£ñ¾žðžöû›÷¼š÷F’þöõƒûùBiúÔRýZþÿÃtýþA†þÿŠo‹ G‡ ܆ ËŠ ÀŠ E‰ „ ÿs Œk @m Úp Wlÿ$t ý„€ˆ~Æ~ã¸zÆu £k|lîp›r¸k ÿ®kïkiðgk_måp+k #o sñu{hy|£}~~ ~¤r†j8Xÿ+Nò1Nð-OóP ôBTó Uùxneˆœþ"¡ÿéŒf„F¡¡±%¬ç¢ƒ—þ¿šþv¥ÿ|¨é¥Ú :žÈœŒœ%–\• å¢ f¬ð§ -–B•Žž Ïœÿ ú¤Ô¨"«e©O®¢ªŽÞ‘q˜ÿs•&™d›˜¡ð¤¿ ¸œ‰ë¥åªŠ u”¶¢t°œ­¤ 4‰ Ï ÁŽ2§*§ò¤³¥Æ—Çž–¤Ÿž+œZ˜–&x#~÷Š E’ާO´ž¶÷µs³Ū°“9|þz6‡!¸Öš¯L¸”¹²*¦šþu‰%ލœ½©Ó³^±½²¸×®qŸB¤©²q»>¢L•Ó‡¨†€Ež¡Σ=©á°µ3·4¶¤³"¨¤——Š{yô…€~§Y¨ã­«ݤÀ¦Ã¥ÏŸ’q—£Ò©?œçž%ª1±­[«ã«·­Ÿ­©«Yª±«lªù¥Ã¥~£1žå›Ø^~3„”-—Kž•¨ò´±¬ï¢Üæ™óŠÓî~Ù‹â‘ÿ ÿœÿõšíN› “þ¸p m)~ }} x L ¸”ÿ ë˜ÿ {™ J•€™7¦¦ÿøŸÿÁ¨ê±ÿ5¬ÿŸû¸“û þoÖ–ýfšüQ–ý•þý<‘ýû®Žüú‹ÿø‡ˆöÍÿõÑÿöÀöˆò„‚îî…îòŽð†† ìZ„ìƒñRït í´~ï®ó¡ˆýû8zøW…õúòZ öÙ¢öè ô½Ÿøbšö—ÿùý•üø;†ûø¶mýû¸WþüóZýý«rûè†ý\‹s‹ ƒŒ ˆ ¾‰ ' û š† | ¤m hi þço k Üsë'€ ©}}x¢q Èi5nþ[q‘oìm»kFeÄf þœh3j)j bm ·o k Cm ‰l´q^v |OywyZv˜ihXûçNôŒMîiLòÜQõôHò­J íLFíUõ V þþu‡ Œù‚ œÇ©Bª¦Å¢ýl¦þÝ«Q°E­¢©<§¦™º— —Q–ÿ¡ã« ·¨ ø—’Ÿâ©!t«Ü®Ê«Á­ d­ªѯ<«œq›r Ο•¢›%¤E© ¥I­å¬±S²™¬¥ž;¥Q«#¤‹š©‰‚’ƒ“—8L£˜©W™°— ¨¶¥X¨=¯çšÚª³¯µ{µO·„µ.¶›±Þœ(‰–ý N¢¯¤•² ¶šµã´°¡cŽé„À–'¦ç©ž ™œœ¬H²„¬°“·›¾Ü¢‡žߘM“m •Íœõ ºœµ¤Þ°ë¶þ³¯L±›*t¼sùˆcœƒ¢LŸÔ¢K£˜ F¢££›¸ˆ2‰ožÑ£±–ƒ›'ª¹«Í© n« Û¬ t¬!€«!ʧЧ£Æ¢ó¦Q§ü¦fŸ´™O‹xéy¿Ž›”g™|§_°C¤â—´Œ ‡œ¬x}•{0€WŽ(’‡˜¢3£×§ŽÁx lñ}ˆ|ãr{½ˆ‘ '— ¼–CœÿߥÁ¦ÿ%£þf¥ÿ§¦ÿ¡¡ü Vœü)•ùQ“ûüá’þ÷”ý÷”üø¡”ÿöw“þøßŽþöX†ÿó„õ„ö–‡óe…ð<ˆó³…ðo„î†ñ„ð…ïJîut òæh óÙh îLhðküûfüyd î7}ð&•øœû˜÷“›ø¦—ø­–ýýúŽõ«ýö}løÀZõÒaÿ÷pýþÓ‚ý™‰ ÏŠ fŠ À‡ šŠ • oŠ „ U} Šk h ïp!j s|mm€Ñ|œt­n f þèmüñnþ uvmfhPd c þig .gŒi –jÑmll j ãj ]rÍuîv‡w—xTuÿÝ[ù{Nö6Kñ”NòiMóoMõ®LõŒLñdIî¡L ðhQ õYV ý^h "u} T•ê¤ú¢ÑþÀ ü¡üV£ÿy§7¨«œË–‘’ 0šǤ9¦&¦}  Äœ“ Ýši¬¼¯q±e­x«ÿ§î«²°ݧ¢¥›¥ò¥·¢Ÿã¦ªè¨£±·{±e­¯¬‚©h©H§ w í£}–މ¥ŽŒ“(”RŸ'“‹Z™-›Ç¡« £„–ÿzžr³¸Pµ[¶ ¶B°‘³ö®Ü“€œ™µ³ƒ«H²µâ¸½´Z²r§™›Ö‘~™¾¥¾¡Ý’pj ÿ­X°p¸ ¾iÃx¢_¥ަs›ìŽ’&¢‰¦|˜7’t˜1¨:¶š¯‘£L¡ç›8}.†^œÿ  Ê›”J‘!›@¡¾¥f¡bšC‰ª„v™#¤w•Ëœ¦D С”«ï­ͪͧ"à£!´ ”¦ ©>¨ù *šºtÅzʌƕE™×¥ʬ‚¥«“ ƒu0qv~¨† 1~ÇsC|:ƒ)“Ÿe¦¨Ëœ‡ {‚• —ÿ«† «w ã}χ»“ÿ ™ÿœ¢ÿ£ÿÂ¥þZ¢ü Äœý jþo™þÿD™üý—ûúq•üøð”ÿõk”þõ¼“ý÷1“÷ ÷ˆòU}òC}ò|óäƒñQï‡øq…öˆ€ì €ïc€ ï±}ñ»~ì5s ë‹p õ’^ õ´] ìR êºTõdNøŽVðì~òL‘öK•ýùu“þøá—þ÷=–ÿûáŽþû£‡ýõÜhíÇ`ð§XðÜ\îÖfözwH… þŒ ŒÀˆ /„ ó‰ ^ˆ Í… Ä m Ìh [mûmÝqïtæ„§yìpìl ¦m Qoþ›mþÃsWn(f c Øc þag øi åkÚg ÷i þÖh Ðk enœrvoròvCwçsý¢\ù¿O÷‰Hï¿JñûJôùLöL÷èIóVJñ…MñÌK ñÁN ô'Rû‰]ýM_ÿJ‚ב Xš ó”ÿá” ì”þ I™ý o›ür›ýf”ÿu ,• z£Å·©ƒž0˜ç‹UŠ—J¤Q«ú¬ã®»¬#¨kª ³X¯©°©ùª)¬¬­ä©Ý©©¯4·X³C©u§ª÷®¦Ƥs©.¯Ý£”P‡¾‚……,…ª‚ü{ W† ƒ ®‘7£¥áŸ8ª¼µá³Ú±‡³*³X´ñ­ §Í ˆ\—g¯B·Ú³…´«·+µ¦·" · ʳ׫9¡ÈžÆ¥:šù™t¥®¸•ÄOÅ€ºÑ¥‡§¥´—¼ŒØšÒªÙ°Þ£n˜¸’d˜‰§ ¡ Ô©*’ ˜ œ£§í¦¨—›‹`‡ä—¤¯©ú¨#¢•¬‹A•ÌS“2™LžzG˜±ªv¯R«·§ ¤ žË“Š‹}”ô¡Hª!‰¢K˜׊zÄ„ ñü–“¢\² ~¾ ¨nŠû~Š|t~…ˆl€ÁsEm ug‡úšj¦¦þ¡Ê–g–£x§ a‹ÿ {u~ g‰ý ¸’ÿ šýQ¤þ£þ Ÿý›œýù˜ü–˜ýüZ˜þøŒ—ýö¤•üõþ•ôš“ô~’ÿõp’ùüüŽüüàö%xñòqî`qîêq î xí‘rï_yó4wð+yéîêy ï]n ðåc çÙ[ æë\ðTó Rë•PéL ëP ìUî…~òf‘þõ”ýøêýõ;’þóÝ“þùfˆ÷Tvï2[æ³XêšVëWém[ìšk÷Û܈ Š Ђ 7… Ȇ Û… O€ Gt Øf sj ul×r¹r yI€Öy ÿ qk Çn^oâm×m¬m3cáeki½p2m¿mDoÿÇoÃnJm hþúpÿ—rÀu[zÝxNtaþýyPø¥Fï¹MóbKöoKø‚EôÎCóòJõÕPôPïÜMî{Pð XîEXëÇ_îfuö±…¬…*‰þÏ”úšùu•ý +”ÿ Æ–þØšÿšY¥ë¸Ù¤š¬œ¹˜Åˆ¥Ž,™b :¦çªx¬eª?¨)¥U¥.¥6¦"¦Œ¦ ­ˆ²ÿª3¨„©¨¬z²c¶ï²õ­ª Ô©´©g¨®«J®À§¿›!.Œ¾&zuIv ‹x ™ } ƒÈ›t¤!ž7 y®ɲ/¯3±®²Òµe´تÓÇv …œ“«.³:´¬°ù®E¬P±äªÕ§¯©r Ž™±#‘›¤0±û³ÅÁ„Å&¸d¦X««Q¦†—‰’ߥ¯µâ¬©œ8Žþˆk• ±’û‹|ŽÉ™V£dªp®n¨7›)‰U~-Œ a©’°ªcœ¥ŽyŒæ^Žœ© !Žðœ–¯o³á­"ª`«¿§²›phŠ€˜Ï¡÷›Z’¦…D‹™ƒn‰ð‘˜œX­hµ‘¥ ‹§”w–:ˆC‡á}Twºqvÿ…šc¢i¢Z Þyž ¢ ›š… Ävÿ €}þò‹þ'œþŒ þ £þ ˆ þB˜ü˜þûp–üü¤˜ýûX–þøX—þõ¶•þô&“ôr“þûkýûÃyþòouúÿYò{_è"Væ\ ë‡R ëžWéÿNë€ZñæVïÏiëÌbèkóqT ï.Q é¥J èQî%OðÈRð NïTM é`K äóSð©xÿô “ýöý÷‡Œþôþó¸ÿ÷†‚ÿøxhíòSäPT å+Q æúT æmS æbY éÊp ÷Þƒ§… û€ ܃ … ‹… +„ “ Àw te ®j žn  k Io ês hp Ãt j  l Ëk Yq,r\pmlöiÄiLk/ocoNoÐlWk‹oäo¥o×wx6w~%zþ|zÿzfÿþ”TûÙHôÏIôHöÒIöõDó‹BòIó!Nõ“NðKíPðTíðQ ælU ånTæZ^ïôYïÇhò„núûÑø nŠþ é–ü ’þ …Ÿþ Ÿ»¢¹« '¥ ¸• šø¥Ü7˜‡Ž%N’D™ G¢ã¨á¬e©{¦”r–L¢Œ¥·«ï®øªj¥Aª¯F¯޳Ñ·Ͷ² °"³6²ó®a®ܨ5¢Sœâ˜ˆ,zöyðˆP›õu žŠÅœ’›T©u±=°®à­ñ¯A²Öªq”¤| ††5–[Ÿˆª]«6«l¡Πwžºž‹›š@—-Œt€GŒ‰ 8¯æ¡ˤæ›L•t™¬ª Ì©kžÈ›ñ¨|¯±ä§‡”ŠIœ™ ˜Û’Ë—Ú¤…±í½ÿ8´½¥©œenw ¬{Ç—p¦ªï§` Õ”ˆ¥ „Ašã¥Yœ-£ü³³‘¬ «g°~¬Y£Ý–²’²™ šo–V‘¤šg¦òžþw˜ÿ4š¶–,˜•t ‹~›l›ù”´ò„¡ƒjY}…‰-—m™fœò£T¤ žþ «— %ăþêÿûîŒýþ—ýþýõ™ÿn˜ÿÍ™ú'–ö–ö•þøû˜þúg—þû€•ÿö#”õ÷“û¢Œÿâ}ö™Zì£SöœV ôÌT ëAN èOM íÕN ñJð²HòÝL÷âMöÊOìcPëËPò`Rö"Nò½KìNOìëOìoQï/QñJNéAP è^þõ{ÿõ4—ýø%’üùÔ’üö<”ûõ8“þÿÂ}ûÐaîÙTæ VæÁVæÛU åhU ãS æœi öÁ€"… Sƒ =… Ö† Xƒ Å‚ —€ ×s /i ôj n k ÿ²q þ±k `n ×n´k Èj ,j ®m¯onÿoqjf@h”iäkàl§e¥_ nukq³wò|:y|vIstaþ%RüáF÷ºDóxFó’Gô‡Hõ)FóßCðÓJô¹NòÈOîÅPïÄNì S èWçmXçVVêkV ëÙU è‹YìwkûÇu©~D€ÿ“ÿ/£c¥£ Ní“ ‘¥ͨê–'šMšÑ• ™É¥F­-­ ¦¬š  • ¨¡ ¥›¨e¯€«©§C«R±$°®²· ¸͵½­ä¨Ž««°¯ ¢çŸ‚¢¥—±~°~Œ T’‰‚ o î‚ N•¼›¤A¯ð±í±°­Æ«Ì©q° ©·›}µŽ™šæŸé¨©;˜%‡ ”Ž…Ÿþ¬ÝžŸŽè¡`–Íœ»œ (~ j| Ê€ 6€Ò«Šª.©ÿ¨j§c®½®Q¥š9†ñ4…Œœ€¢þ¡–¨¬÷·êËâ"—aˆr üx—V¦H¬6²6¯ÅÍï‚~ ËЛô¢“±³Ÿ¯¥®²ý°Þ¨‡¤ì£ÿ¦Šž—=“¡•·¨³©@Ÿ¡˜†$ƒÀ‚؇ÑxTŒ~¹‰Ú‹~“ˆß»…¹ˆ6ˆ­•¨ `£þ e’ ÿðüý¨‘üýïžýýÏŸüûõžþü”ûØù–ø —÷`—ö’•ÿöã—þú&–ýû(“þú0ð4|ûÁb þUZðGH ì[Mô(Pó Rí“Nê.NîLóÙKð%HíOñ“Lñ]LîIJï¸Mò¸Nô:PñÍLëžL êÁI éMë}RìºSêjWêÇ\ì§qþóþ÷–ýùt™ýöÙ”ûô…ö°gúC]î¶YétXè·XçoWæ1TåûRè@`ô“y=„ ›ˆ A‚ ƒ  Ü€ 4~ —q Àg üh †l•m ™q ÿvm ilÜmÿl½l /m In l ¹oþ©qÿNkîkkhkçjpndpÿs>vdu‚xp|Ðx]{ÿRq=fþîXÿý"PúßEô=@ñ°CòíFô“FôgGó¦Dñ¯DñëIñÂMðÌPðMQî\Pë¹Ué§VçüVè†VéëUçºR çUìõUò5\ô¦V÷Ò|‰”±¡ó– õ—°‘ÊМ÷«¥©3¤ô¢îžŽ t¢¬©1¯°°$®w­5¥Ž« ;§Ä©¹ªT²‚°¤­Ì®.µI±ô±«´+³Ó±°©|£þ¢¤ªd±©À¢}§ £Ž•€† Z‡ ‡gvàh ·~ ‘œ©û¶!¶]­¬¥¢æ¤}­!°B³§è¡ŠžПö£ÿª·²!¦;Žn”¦¯ïÈ๡“¡a¬N¬¦ 9z…µ…‡qˆ±º«Ó©©œ©ô©Ò¬%©§›àò‚auŠ{’uÿ3£4«=¬®¸5¯¯›¡Ž‚Jzë|–Ÿ¨—³¹ÿµ§3šH•ÿ‹¶„#Œ—Q¤º°ñˆ®Á¯Ò±Š®³ªĨ!«[±¬¨w—-‹ä‹¦™«£Ý¢Žñ•y kxê‰íŽG‰òƒ{‰ȇô‰©‘!Ž'ˆg‚Ø~š}RŒ K– 4› M– #’ÿjŽýþT–üúÑüýä¤ýüô§ý÷W¤þ÷˜Ÿÿ÷˜ÿ÷¾—ÿ÷ÿ–öZ–óì”óY‘ÿù»Œ÷/}î?déê] óDN öNK ëÓJéÿMî™Lî)NížPîQñRLñÍMí”MêµOë&Ní€Kð9OòUIï†Mî!Nê(N ç~QèQRédTêíTé¾UémZî‹_ÿò»bþðTqö…ôMþô8‘üõ~ÿõjiù5]ðŒ]ì™ › è Q{ j…˜‰þ|—ûÿ$ùù>¡ûõ¦ûöÒ¯ùø³øü×µøþ#±ûùœþú#–üª“ýý{ö)tðîg ÷Q ø“Mï“MìÌOí(LìNìZOëuOê"Që#PìÕQëÎQê÷QêˆSéURé—QêˆMç^Rë5Tí‰SéGTçÀVå×Vç»XèTXè²XæÜUåiVë:Tò|QóWOöŠLù…LûúXó4níuòübòX]ñÐbÿñI`îÓZê,XêÚVêTí9XísUí´` ÷¦vë|˜x&x Qr gp ¹l Ém 0n Žo ¸pr÷n p[o(n —l ~l rEt?q³l 6o âo Ëtû{øÂwüu·uîÏAï‹BïºHòNOõúKóALóŠOó‰NñÀNðŽMòýQïtSì\VéðZèZéVçwVèQXéUXèVæWèZë~Yð;_ø¡jÿx‘þû®Y¬mžyŽÆ…þ‰Ï“·¥„®ÿ²°½®û¯Ú®ç¶ñµw­Ħ“—‘;š;¨(±áµO¸õ´@°ϲ´F±Y¯f²}® Ø«¥¼£ݦ8§ܬ1²¬ªôœ^› ªð³§­0Ÿ ™"ÑšΖ«Ì ‚€q Ÿƒ©þ¬t¯¿¬t°ñµ]³Ê­ª \'Žæ†Æ–…­ǶuÀ_´„ª± ±yL|ˆƒŒF_®"­ O¬ ͧÚ¤xŸ\Œ#;p €s „ûy \Â¥í°ЩG©Õªj£^‘x| ‚‹p¬ã²8–B ¡‘ a!ò7”}œU™Á¢º¬p¨ 1¯ ^ªË­è©Ø f•÷–H¥«P©c©Õ©ü§˜¡ù’Б–}zÊ ª£ –©@ªþ£*§sœ;Ž5~•uÇyF~â}€è˜'—€—D”G‰ B|é|ý‹þþ­’üþ‚¥ûû¦ùøi§ùø(¨ùøÙ©ùùƒ°ùþà¯ùÿiªþõ ñÏŠüôwÿTnóZPíIL õÆIókMìLéOèšQèMQéŸRéOQèARèUê™Wê UçEUçDTèVèÊUèHTçËTéÐXê¦VègWæÄZç+Vè XérVæOUälS å TìpOñIMïzEñ“Eöþ=öTKôémðï…ø@eó×ZíÇbïbÿð8\ìåWéTèòSêåTìÃTë Z ónk—v rq\l o Ži zg Õl jo no l„p{m em Øm òp #k Ðnçp]sm  l Žl 3p+wý.üa‰üx}ÿåx3yu¶rAk ú Y îÝWé¬Uè6]ìDYíÌ]ïzaû÷ªaùù¶`ü÷PQÿô‹IóXè(VækVä4VåTVçKUçðTä:V ãÅTè‘RíÕMðqKì~Aî¤<ð=ò˜=ïE[ðµ‚ÿú=dò;YëÙaî}cþòÀ]îJZë6TåžTè Vì©SêîWî¤cû:m¬n èn=iÊh Îk Ek þ¤l f cj Zg  l &k –j þk ÿÀm ùqIsDröo  n Zp çrÙtŸ‚ÿDûÆwþ\|OzÇsVnÿQfù»Xì XèmVê¾YëXè÷Zìð]ÿò«aüö]ûø7^ýùO÷EïáFîôLòÓKî³LëçMí5Mï\Oî-KìLí Pð$Rî8Têÿ\ì`^íÂ]í,Xì~WêLVêYêBXé`XçiWçÀYéñYíohû´zÿ3€ü0z«€ Ãÿ [’þ¸‘þr—ÿé©€±ɰ­>¬o¯Ö¹,¼7¯«_©µº ‰£Ž¢à¦Fže‘ñœ,ª#·ù´ªò§§—¨ˆ—ˆ˜–¥Úªñ®@£ì˜s”ä˜F¡v«F¦ýœ:–•”“¤¿¸Ö°N§P¦}£3œgšt¢‘©Ê®H²4­V¤“Ÿú‘Ó‘ýέù. ž Ï—À£Ú °–²›Ž¥Ž܃,x´vHt®‚ß©ƒª;­ د]§°¥¤¤Ÿ™SšöžÕªU¬h¬ª¦d¦¨= –^‰¸‰- ™®¾ÏÈ—½‘¤š›W’ –Ñ”×’ ˆ¡2³'µ²¯š¥€˜_Ž=ˆ‰…êŒЙ ó«´²ó¬D¤Èš—xšø¥£Ù©‘¦Œ­þ°´¯¯¯4°¥©!™ÿmŽHˆ „ | dŠÓ”w’®ÿ ˜Œû.ý[üüMžúûª ûùÌ«û÷~¦þù;•ÿø÷œÿó ‘üõÐüšlôŒh è*Y æÅXòíLõ NíxQê–Ué3SæyUæHVå]UäâXæ5YëXìóWêNXé8VéAVéÂVèÔWé§Wê°Wé|Wç§Vå*VålWæŽVå(UãüVäûVæüVæëUä5Uç„TèùSí LðøHïÝ?ï=ï3:ïÓ<òÆHõÅkÿ÷)^ñûYí!`îFeýñ^îJYêCUæ/Ræ¦TévTê•XëT]õgðn Ôp m ®nRë­Lï~Iñ @ï;îm?ñ>ópDó¢ZñZð“\ïu_î¿cî¶_îÓZë%Uè‰TæVé&VëãUê¯Uð|aþRk ªs$p˜n Vn Lm øq Gn Öo gn æn _g ™gþ’i ðr o šs®p àm p¬nGmÓo¹ljn`p m²iþ^ù Zö*YðïZî1YîÐXïþZïôZïZò6Xþ÷š]úú5^úø¹jüöÇsþø\ñOï:JðCLíªNíÍMïÎQòŸNó›LôøOîðRìÍTè2XèYé|Wè VçUçIUæéXæŽZéb\ìà[ëXêÍXí•]ï/\ðŠ]óaüú×gû6oû‡ƒû ˆýYŠÿ˜œc¯°<³ —± .¬f¨$Ф&0¤«gç³ÛÙÐ2”²(y¯'£;‘t£3³<´©˜¦ɤ]‘¿~äŒ;šz¤:¤ù¤Ϥg§Á­²­{©:¬5§ì¤²¥Ĩ‹¥ö£•ªˆ³H·ޱ©Ë õ™žѨðµ¹ ·½µ¡µ»­ø˜ µ‡ U“ 7› œDŸ Ÿ1ž[¦Gµ›µV¡¸ ׎Æ•·’ÿ,™¥¢Ù©õ¦»™Ü—u£‡ªþ«#§Ç¥Ÿ¨’?œì¤ùªfª/¤ǧ¡©•ª«³§¨ ©«ª–Í”»›cf’¸›«¶\»Z©Zœ ›mƒʉº˜C£Y®c´­ †§ À¦Ÿb•%†¦‹7“Œ¦¬Ÿñ“=˜ò¦ÿ÷¯ÿâ£þyh~{}7pFy îŽ ™þ4—þ%“þI’þÿŠ”ûýj™úûº›úúM úùº¥ýô™þ÷zŠû€øncî¦W è—c îÒuò}sõ˜]ì¢XïZSílRë^SêœVêXëxUéqWçVæéXå?VçfVèHVæVçXXéWè×U æŠWæ5Wè|Xè{U äÇV äVåŠVæUçúVæBUåäWå6Væ©Væ½VæSèðRîYMñÔJîçHïšCñ¬EõòHø»<ïžSðZï~^ïmbï,bî­`îèZìÐUèÓUçwUéÆVêRWëéZð$^û¢lDo (m ¹o Gm bo Wp ßo Yv zúq[k {j ;p +m þÒhþk Lp ‰l k ’o þYkÀnÔmˆkÔkn¨eæ`ÿû3YóWñ?Yñ„`ÿñj[ëKî8JïMò#NñÃNï«OïÈOî˜SëuVç„YçÆXèOVç;Tæ,VçjYædWç™Yé[Zêt^í®^ï¨]ñ¯^ÿóü\ð[ð–_üøaùþ¬jûCsü¦ý µ}ý‘“ÿ §ЭŽ©"3¨þ¤Ǥ_•&Ò›‡¡ï¿ÿøÓ"éÖ#±T«a Ž’“œD¨{±\« §ϨÍ“€aœ¥©ç®ì®±³®¹з5³7³C­aª‹ª‘«-£X—c¢/­ô¸¸x³â©¢œê£|ªH³ý´µã´ݯ¶£ó!” ŸU¡y @¤b®¼·Ò¶í²’¨Ž¡=›û|ㄆ‘Y£«/¦ —v”Ë¢Ö¬Œ«L¦ö¢–šŠŽ>£·«Ø­p¬"ð¨!’©p©¡ ™Ò•û—l‹|¦Ž &E…ƒë¿—î™ ™¤˜ Œx„1ƒóˆe–¢¢ ´¹Cª#9£"¿¥ì¥'˜_‚â~5ᣕ©ŸÅœ‚—£2Ÿ¤Ì|xo ór SŒ ÿ—þ †šý+—þü™üü`›úý>ûüœûú^žûú” ýöV˜ýû(‚ùÝ] ôUì¥Yëkòlhñ¾cížSéDSëpTèßSéøUêÝWë°]íŠ]ëNWç>WçóYç¿VèˆUééVé‹Wè Yç WçVæöVçåWèÜXçæUåêSånXèWèHVçêVæ~UçþXéœVè°Væ&XèVë8Sñ0MóMî%MïáKîLò7IøñHôNQòÚ`ð-`îÎeð&dòÐ_î[ëNUçþSçÁVé‡TèÅUè«VíYø”d6m Go 2j ³o ~n ’o ør — Œ"l¯n 6væu ýþgÿ$k on oo Ño .n Xl¾kˆh‚iÿViýÒdüàYõéUò Sî4Yò”Yñí\îbXé¢Xé¬Wì¾Zí WìxXìêZí0ZðfZÿôXþö'Xþözaþó›Xí¼Pî-Lò€MòÉMíáMíGOê§PêÏWêPUæëV äXåËXæZVç¹Tç#Wç.WèÓXê©[ë^ïã`ÿñì]ïƒ^ñp_ÿóV`ýõ_ûøÈaúø­eùùâmúû!yý°|þ,…#Ÿÿ~¥¼£Á¡N¢ š‹½Ž;™F¤š¨ð¬Çžd™’•µóŠ’ÿùŸ,©ò°а §¡“´ŒÄšk£E¤æª=°ã´g³¸´6³t´”²*°Ù²Pªž€’Ü—}¥:³¦¸ñ· =«l¢R˜í—t í¦ƒ¦š¨î²ë·­¹ž-›·že£€–ÇG­d³в ´´«¡Q“—s…ö™«¦u«R¨,›U–‹£ªˆ©º¥ú¢Oœ¯ŠüŒ¤‹°¯!=­ ã©k¨u¤›8zz$}6}r‡ .‘½‰ízVz-€ÀŒÌ“=Šžˆ©‡øŠI’Vž‘·—Ì•±¤h£‡ —ÔŠ$†«–ÿ¢¢áª¢¡þŽ@‹N‘Œ“ JŽ]Šë€›{x ä†b”ýš û{¢üøP¡ûø­žûü„¡üûFüûЛüú˜ÿô1”ÿ÷ }ø|YñZìá\í‚bôSVóéTì!Né€UéùVçÀVè‚VéoVéºXè3YçbVæþWç{Vç±WèyUê‚Vë]TéðWæWæàS äWç4Uè¨UæˆSäýVæVçUè[Uæ„VæPVççYêñXè"Wç VèàWëÈQîáPîxMë½OîJOïPZïYZòORï2SñºaÿñCbÿïêbîÇbÿð:_îCZê…UåïWèèWé›Vç¢Wç)TëãTòŽaþ³oÑqn o •nho p †}ÿÓ¡¢¢»r þn »–Z™"u xl ûo km þto ÿ¸nªjÆfwk jüfùþ`ö XîTínSð¾VðˆWðj]î[Yë«Yê‹XìšYë‘WêüVìAXí{Xî–UÿñÕTïáRï€WïmWì€Vë:TîKïNìOîXQêRé;XèBW å‘U ãæW ä V åDU æ@Tæ×Wç,Wç®XéXêÏ_î?_ña^íY_ë`þóµ`ýöÏ^þóÞ_ÿòKdúö1føùrýÿvtøx ã‹U›ÿzœQ¡ý©¯¢qš “ªU‘e“ðŸŒï‰.9Þ…·’]™ɤ©i¦óžšÙ”¸˜œÁžà£õ­z´È·eµ€µ:± X°!¯®ê¶#°²^¢ó›]‘ŒŽÍ’š§4µj¸߬“ $šÙœšÌšº’Sœ0®5¸"T²!p¦¢Á£^Ÿ–­Šב½¡‹©þ«ž,“ƒ!n}Ösüœ8§‡¬’ª! ™›@¥5ª7©¦í¥¹¢é”¬=Ÿή:¯`­¾©ñ§Ó¢‘“Ÿ‚1zóŒ d˜q„ O}Š Є @{‰~å|€Θd¯ܘš*—$˜³¦EµΠù“%¹›E–Œô†͆К¥m©Ÿÿ»“ÿ!²“g™d‘!‹aްŒŽˆÁ… àˆýtüÝ¡úÿ¥ùøþ£û÷_ ûú´¢üúæýû ›üûŒ”þ÷ïˆôÖpõ"iôiï¯Yì Rô{PóÝQë RéƒUç?Wæ-TçþWé8Uç½U åT ä—UåëUæ‰Wæ_VèúWë UìóVè4VæGWæÐT ãSU ãU åÂU ä•V ä•VåVæ?SçµVæUäÄVæâWè`XèVæTSåÌUçÞSéšQè­O è˜QêÐTêXêC\î Xð`ýóócüôcýñÞdÿî_îèaî7ZêVTçUèDWéWçEUèxSèWí™[õi6p 7m …n ¢n‘l ÿl Öi ýn}f€ ½p Ok ΃º’Ås òl m Øn ¹n ÿÊm £l lkßj~hûdúï[öxTï¢Të2Sí\VðœTðüZï]ð\[î]ÿïúYëQVê*UëbWëuWìIYí9TëöTìÙXî¡WêvXéÏYíMèÿLêyI è2O é›Sè6Wæ«VänWæYèWçµWç,VçYWåjWæ»WçUYê¨Zíñaÿðtcÿï]ïYñ ZóO[ïÍXîN`ýõ¡eùúgdûÿm5lû‚ÿŸÿ –]£&±v±ªÚ¡UäŽ3„܌兿}Šu'sž ÑŽ£”| O§Ó§r6•3”2™ÿbœ4™!—¥G¯‰³ ®´#I´ Oµ µ"Ù­!û«c¬ ¥´!?­¢–{Œc‰¸Š~‹Óœ!²¶²§Σ/ ¢„Ùh;Žò¦±· —°!¹¤¸ .˜ƒ•€ŽŠÆšÊŸÅ‘ˆ“‚ *þ$,”D„UŒM–« 5©–©-¤6 é¦ç«©¬¦3¢*ž]“§‰~™X©È®A¬ª«§îŸd ‚à’(© €¶<Ÿ–G• †C„¬~ ƒ –“©'Ÿ œÚ¦¯X¤ŸŸÖ™s–à"¶… l‰ê†sŠ „ FޤŸت«¨^¢ñžïŸK¤Öž6”Í“ט®–LŽ ̉fýýû•úÑŸúþΣûøÒ¥ûøa¤ûú ¤ûü œýýû—ýûŽþõ~tîïiòaópeïrWìÊRï¬Tí(QèþUéüWçîVæQUæEVç#Uç¤Tæ—UçùUæRVæÁWæ–VèìTìÎVëwUæWî [ï)ZîYï’XíýXì[Vê6Wé[ê'XëÝWëäTëýXí¿Wì·Wì:ZìœTë(QëÁK ççO ç®RçªVæ8UåŽWçWçVè3XèkVæUåìVæPXçeYëbï¶lþòzfýð³^ÿï³]ñä_ò ^ñx]ñ]_þôÞcþøZeþûlhý–fv 0Ž "šå¥Lµζª²«H D…ž|×{Œ{†tf†kþc•Ë פݪ„ªž£ͤ(¦g£¾ž ¨u®¬#®"ƒ¯W¯"Ì®%§!ò¦“§Ôª!L¦’Š| j} mŠ.ˆÉ‘›õ£3¡Ž¢¡F¤© º—‘éŒ2œE®Ö¦8s£`¡8—;˜ÿ·˜Λàš€’Ÿ‹,­­¦ŸÊ{%‰ “A ’«+«`¦ü¤‚§©ƨÛ¢~ؘû•:Ž –|§­5¬õ­Œ§_£:™„“ë k´¸¹«Þ¡á¡Mœ¾Œý€òŠЛp±¬Z©¯е³ÔµV¬d‡ŽÜ€±{À{ ~Œ œ Pœ'¦k®ݨF£$¤o¥å§K¢—–A—ÿcžÿ–ðŽ Óýë™ûˆžøwžúþ†¡üøK¨ûø§ùúç¢øýý˜þøˆŒøÐzîYeéÏWîOðèWëøXêÜVéUSçwUç7VèÛVè9VèUæþUåÝTæoTèªUèìUç¨VæAVåÿWç?VêõYéøVæ¨Wç$VèeUèU ãïT àU á]U árV å€ZêUëÈUè&UåVå Uå„VæºVçÌVééVéäVèµWé"WèfVæ·UçQU æíV åŠXæPZé‘cþðßeýôÆaüô¶hþö†`ò [í‹Vé|TçUWêÂ]îGYí§SèUêtTîô[ùmc>k Ïn m ÿÀqm wk }k Ïj ðp €i ÿm Óh ohþ±j þkhÿjk ÿum —l l ]n ³m QgÅ^ÖWþ¥RýûQTðpWêSë›TíþVî±WìO\íÇXíYíìWëmTêÊWêKYêjXëjYì0Wë‡Yíi[îÝXì Yé.WêJUëfOè"SçîWçÊXæ|Uå«WägVæðWç|WèPVç„WæWæJWç³XéíZë¤bîÁcÿð^ÿïµ[îv\î{_î8]ï/[òÊ^þóìaöúdúiüxK‘ ¦³µº· %² @ª" C–‘’Mš œÿL…‹2Nœæ¥ޤªÕ¬k«à¯´¶M±Ú¨'§ U«Ŭi«ÿ­¦®̪w£u¥»¥Æž‘•-‚ç2`…¢Š •—™™õœƒœj1¡ý¢d˜‘…›, Mš¦›A©W¬à¨¢C¡‹ 9 óŸ:›W˜ÿ—X–þ!µ–¶Š‹¤–Z¥š®­ ª €§§‡¥t ‚’ŒˆdŠÐ’¡Ö‘1¡‘­è­/©0¥#£££!³º-²߬TªS¨¾s€( •„ S— °†­/ªΰß´áº@»2°êœÒË}›qñlІïƒ¡®¥а¨¢O¥´¨U¦ÿË•ž—ÿðšý2“ÿ¬±–þþË¢ûþŸùœúþžžûûG¨úú ¨úø†žúùÖšûüølìU æ”Qí}NíøUèIUæmU ç˜R çaRæ Tæ¿Wé¾WêlVè¯UçÕUéÐVìVëxUçËVå{Vä}UåYVçñWæ}Uæ-WéVékVçGVåV ãW âVã½Wå\Wê”WëVçîS ãåU âTV ãUæÂUçUéµTéøUæóVæíVè[VèVç‡UèÓVçfWè´\êî`ðgþõŠfüô2hþô añƒ^ïpWê§Wç¶Xê|\îkYìmWë0UëœQìœYö_ÿŒkko  h €l |l n{jún Fo _j n}k en ýn ý·r ý_p üvr³j gk o ªh Þf4TÑRþ#Rûý{Tþò'Uì¿Uî²UîUíáUëòTêÊTêLYìàYê8XéjZè‘VèÉXêŠUëUêòXêÅXìáZìêZéŸWêïZì6UêpUç~VçvVç VælVæ—XèWêAXëw[ê WåfW ã,XåŽXé°YëJ]í#^ï†_ð^ïm`î›[ìJZì ]îa^ï']ò`dþøzoþ rþ.Œþ §ö·x¹"h´#A¶ 1¬Ô¨«¢õ¢Ø¢¤§¸¥½¡"–]—®”£$¦\  ÄšÜšý¥ ³Œµˬ)¨œ¬<®Y­G¬»«¨<¥Ÿ§d¢–’|Љ‹X– |‡A„: ™à¡ ¤ѤÙžМÊ¥w¡äšc™P7 ž´¢P¯†¶Q²ç®6ª)£m¦a§•¨ö¦›ÿ<—À—fŽ\j”¥ý®M®"¯#ª!Ù¦£E—C„ Õ€!‹þ!î…$‹Š5ži°®ö£žŸ¿œ×—ë•ÙŸp¸¼À'·€¯9©|¥’’áƒ)‡ ·† ô™;©ú¨]¦ D©d«e·Þ³¸¢²”˧z i ŒJ“w—½œÛ ÷¥ý©È©Ñ©Яæªâ§Ô¡¦E¥ͦÓ ¡Ÿ(©g³V±>¥†¨S—ÿu‚aŠm—ÑŸÊš$¤‘­à²‘©åšÇ“–ÌœŒÔ¤§zª—²‹® ™«#£¨º•"S˜Ž–í™á‰«Ó´á‰Ù–ÜùŽÀ› d¦h§n¥v ã”]…k}ÈzÇ÷3’*‰Öº¢¼šr‰È}Å€&ëx|ÿš³#ÆÁ £Â’?‰/ˆÇ‘´“V—ïžšÔ˜O˜šŸ¤G¥‹”ªˆè‡Ë‹ç††EŠÚˆ°‹ˆ‚ˆ$•˜ÿ¥–•ÿ7•þY”ý²˜üë™ûÊšú%¢úþœ¨ùü œøý+œùÿÖš÷þsŒüõn^ÿð—O÷öL ïBO ç°Rè¥RéÂSèÐRè]PëtPíšPçæSägVåVæ“WäUåhTåwWæbUäÞUåVæWæ_Zç‚jëkëGXæCSåeVçqUå·U ã-W äŸUå!Vå‡VæÂVåVçÛZì[YîVé©VæVæUæ¹VçVé:VêIUéFTè>Tç©VçVçÏVçèT ãÄVåeXëÓ^ñÐcýôX`þòÕaýóoaþòm_þñ¶\þó¦XîUæ†UåVæÁSä=UæÄVì’UòÍUùEZûdd úÝh üñf úAdùf 7ccVfñhZhÒil .q†l úµo­i ël Ÿj]i »^ Wþ‰J÷CMý÷õUúüþWüûZVðÍUì˜UìØTé”W æ‰R âTåôWè¯VèpXç‹ZèVqðœtþôqZïðRè4RæAbì3lð[ëhXêXéDYç§T ã¥W ãsV ã\V ãYæÄYè»VæÔUåÒTäGUä×VæWé Yì9_ðäaþò~`ÿòµZñR]ðr]î´]ì;\ì1Xë!WêYYë9[ïð`òÒeÿôföÿ ŸV¶³ö©ÿ¿Ë ­Ë™ u‚Y€‰A˜Pœÿº”Œ‡„ä~ê‰ä›¢¸¢G¦ت‰§¬§ШÉ¥zžÜœi¡Ù¤'¢¯˜ú˜s§ò³u¯Ø¡˜œ[š£ŒÜŠT““’(#—°¨'µ³¦Þ‘®h”€˜ ›¾¥ ¨I§£§Y¨*¦%Ÿµ†„U‹ö”Úš¥´¶”¡¦?—ÿ‘Ü›n§_§~¥·žŒÃ~²‚ôޱ—9žž€ì–‘χž„^g–®—²†y„›”ô£§ \Ÿ•2»• þ“‚’ “…˜šv‹P‚²•4•f™#™Ò Ö£÷›Å–Ü“;}’}ÓˆéŽÆ”d‘M„§„Ú“ÿ­‘ÿC‘þˆ•þ+–þî›ü{šûåšûÿžüýA§ùù¨ùú–ùþ΀þþfpôšUñ~Kî"K êåQèPçÀRçIRçßRé)Pë–OìôRç\TäöXå WäCVä-VæDVçìUæõU äET â·VäZVåWå\äî^ä÷Xå¼Så„Uæ=Uæ TåOTænVç=UèœSçvSäÇWæRXêªYìbVèøUä[U ãÍT äATæÓWìáXðÉSëCPäOUå¸WåVæçVç™VæVé‰Wí[ÿñ–`ýó+`þòeûõ­`ýó`bþï4[ïXëTåäWåWæõUæßWê¯TêÝWï(Xô­[÷Î_ùî_ûü`ü„Zÿ‹]ýQVÿJaX`Ecü6lðfvgFg ùæhÿÍk %g˜Xû]ZCH ù¢Fõc?ó¢Mü÷nWûýÁYüý€V÷BTñÞUîVëìXéÜWè¦WèkVçíVæVXè!Yé¶]ë\[ì¨Ví«UìIWê~VêÏ\íxWìIWéßXé&WéYVæ;WåVå‡Uä¯VæÚVçùVæTæàVæwVæ…VæXè,Wë›ZîA^ñB\ð‘^ï\î\ím]ì‰[í‰YîEXëõYéWê£YëGbýóƒlùôgüþ‰NŸÿ§¦ü¬ Ò§´œëÃ} t kz _|õ„÷{uyåŠŽšæš¨s¨n¡§ *žœ+•ç‘”UvŸÔŸ¶›&“6™-©¤}™“ø—j–‘W˜˜‹"”s¡K¦ H— ±Œ¢Œ‡Ñ”ÿzš«¦Q¨à£]ÛÝ£ù–Yƒß{ö€£E’9°A‘ ¼«tœ1”úŸ©¨ª ¥àžRŠDx [~z‘Çžç¤)œô’²ãK‚‚k˜¦8£è™—ôžt¢Ü›p’{f“²š*—S™Êž¾Ÿ›‡ Xw¹ŠC ¡‘¤J©®Ì­±¥‚Ÿë”Þ}F| ㉠ü” ]œ ßœ¯áˆŽÿ•ýû‘þý’þ4•ÿ ˜ÿL›ýþÓžûÿ"žú¡øÿä¤÷÷½“ûú9€ÿØd·Uó1Hè=NìQí:Qé¼P älQ äzRéþQé?OêüOè*SædV å@Vã?V ãNV äÇVæUæÇUæÝW å(U âUä¹VæâVæAV äXã4Wå]UæªUæUæ‡VèsVéVé*Uè­WèXçeVèQVë¼Vì¬VèiVã~U âmRãïUæ}Wë.ZòºUíGQæ°UåRXåïVæ·WçVWè,WêŽWî^üôÜaúøäaýôæ\ÿó`üöj^þòu[ïZë.WçVçŽWé±Wç%UèMTìÝVïè\òÿ\õ[÷Ü\ü³[ÕS—QþþÔMûÿòVý{VÿÿYú„Z÷{`_ó]$_ ÷ød\ìWþûPúBHûDAö|;ð“>ò/Ký÷óVüúiXüüoW÷+RòVîu\í0^î¸\ì6Té¯VçÄWåçWæœWè.YëÛTëlXë WìŽWìSWìCXî²WìVè%VèóYéZXç.VçrWè!VæUæVèVç¶UçÙWèvVçÌWæVç±VèôXëõbÿòm`ÿóÅ\ðb_íYìã[í¼[íéXìDXé.XèÌZéj[êÃaþò fý÷ihÿûPu”Žõ—%‘>’þž©¢Ÿ•Ö‹@€•s Åk ©nÒz~ yLxç…êš £ü¤ ¤  ¼¡5£˜°–¥™ÓœÛžžŸ"¢6›©„‹Ñšà1‘ú‰è—¼™‹œà¡ǘ°•p›Ù—‰¦‡íŠþΔ^¦O©l¥Èž ÄŸ‘}&~ìž”¾ø‹‚éxì£-ª5›T’Ÿ¬©–¬J¨žü"{|Ä”·£¬¡Q•¤“<˜»’P‰¦†Θ<£u§¢¾ž6 á¢|–AŽ_‘í”äž|  a£“¦¤ÿ‹Ñ}4”ã¨vª±«õ³®¶߯o¨ƒ¤¬Ÿb‹ Ë“ »” —™Æž‹šHÿ~þÝ—þÿ ÿ+•ÿ^˜úDšþúCûü) ùþ ÷ÿŽšø÷Ëvüõ8dü¢Oø†Pí±Mê´OíEPï]RìO ç4Q å,QèïPêÏOêPæ³T ãVäSXäUåøW å^W åW äT äTWæ¸Uå«Vå~Vç™VçW æS åÁTåUæDUæÇWç¥WérTê×Vç'TäVä¨XånVé³VëúVéoVçuTã=V ã‰VæØUæýXêÌ^ñ.Rì´Q å‚T ä„Vå'Væ¿VçÅYêZìëWís[üóudùùç]þõ’_ò+[þö Yþô[þõNYòŠVê®WèòWé±VçÁUç%Wë½Ví5WïóWò¿V÷ÏNùÔMý†FýçFúÿ&Iùþ´OûOüÿ„QüüªPþú{TþæNýNü­FõPübIZQýüLý÷îH÷[7òâ=ñ÷<ó°Jü÷YSüù|Tüú÷Tüþ£Tþñ­Yï]ðM`ð>XíTèSæyTåêVæjVè¸SêXëTêÈTëÚXìtXì`Ví>XìÁXè±XåSXåuZè8Xé«YéVæƒVæØWçÆUèØWèˆVçÂXçÛWçfWè‹Xé6WêÞ[ï”\ô†býõ¹^ÿòYï,ZðÜ[î8XêžVç_UçEVèûZêÉ\îÒbýô jùý¾xþ ‡ ‚” =M…Çž•¥k¡žŸ –ÛQƒ °w w »z ¤ ¡‚2~D‹I¢þh¦¯¦:¨y©Û¦œ¦±žУ६¦¢˨4ª ¢<…þŒJ›.¡ä›çŠ‰Ç£i¨%¨ŨZ¨4Ÿs•Ž/I…‚.ŒÆ“<—áŸõ¥n£î äš¸ˆ.x†ˆœ“£’Þot Æ£`ŸM’õŽH›L¨Mªr§ † ’–ƒ·}æ‘×¥£¶—Ü™%›þ»˜þ=t™¢‚¦|Ÿo“Ä’Š•Þ”Û”5š¡W£¦P¤þ™þ†€Ú¦s¢e¤þ±D»ÿž®ÆŸ& –¢ÒŒÀ„d‘“‘ý–éœQ’þþÝ‘þ „þ½’ÿ”÷7’ô”þõ<œüùpŸýü •ýû ‚ýó¬]ìdUð PëOè‘NëÞTð˜QñçPïîPì"QìýOîÿPïPí@Sç=Vå™Wç@Vç­VçQVæVå§Vå¨Wå-XèbXéÓVèÒWçVç¸V æTTæËUå¤UåÑUåUæ§TéæTí WêåUä¥V ázU âDVçUé¾TèÅUçúTäôTãVWæîWè€cì~fï—Tç*Q âÄWåãVèIVçÝWçÌWé$WìØXíJ\ÿðÜ`ýó_ÿòÆ]ò•\þôµ[ûú`÷ÿ«YüøêUìÃSæŒVç¶Zé`VéaTé™Uê‘QéjSîPRò}Fô£Eýù¶AûþBúý#DûûEüüBHüü¦HýùÅGþ÷þHùœDú¢Cÿ÷§Fþ÷T@ýú >üükIüúGòÌHó±Bó{Aõ"GõVHüõÿXýø Xûþ±Vþö;Wÿôíeüðc…þøÅw÷’Zí:QèBSæIRäVç‚WèÚUçfWé®WéæXë@Xë£XêAXê—VëÒWé³VäV âWæ©XèôWçÖUäfUåVçhVæ%Væ÷VçøXèÊYêWêXê´Yë¥XîÎWó•Wò÷Zðc^þóñVÿóÄYïŽZì`VëÒYì9Yì‘^ì=]îÌ_ÿð]eü÷‚rüŽ…þ oŽþ Ïøa™þ‡¥b¥¢¥ߥ0¡³œ•‡|LyóvÁy{ LŒº§þt±ÿü©a©ú¨¨õ¨•§yª2©ɦÖ¦k¯.³}«¾–·˜þ⢦ ¥N“]—~­qµû°“®g®]¤¨Xœ›<Œ „‰בë–a¢æ¤ Õžð³’ž‡Ò…ìŒy† Hšn ­‚-¦+•ž™¢q¨Ψ{¨ Ò§q›ZÖ~¨‡`ž·¡”¥@‡ëŒ“Ïš‚£C¤–,ƒf‡Š Œ’f”…‘ù“š1˜b™«— nswl‹IÔ’ç¢Í·P°—I›™ þƒŽ|R‹!” Ù„b‚ åˆJÿÌ•ÿú½’ôŠòÄÿô)’õ}ü“xûbïMéÍQíÚPì:QìùOíqRîŸSï5Tî=Nì¿MðkOòPïÕSëèVé0Wè´WêƒXê/Vé(UæRåçTåŸVçŠVéäXëmWêwVèxT åÒUå»UæNRåöTäxS ãÈUååVè—Ví›Ví-Vç»T âœT ânUæþSçVéõYé\VåUæXVèÙXê¦gíÄfìRWç;TæìVè¥Xê!WèyVèÀXé4WêŒXëºWëYîÚ^ïZðZÿõ‚a÷ýö`öÿæ[ü÷—WîOVé&Yê1XêUéVçëRæÓUåuRæšTîPñ-KýøèHúû$EúüaEýúNHýütIýühFþ÷»Gÿ÷ E÷õ@öADÿ÷8?þöK@þ÷ @þ÷ãAÿôaEñAHïEÿó>Gÿö¦Kþ÷yOþ÷UcúùG\ùÿRZüü‹Xÿóýfþî½ÿõw|òŽWë2Pè«Så—UåWçºVéòWéÛWéåZê YëµYé­XæfVèÚVç?Vè Wç¿Wæ®WçóZésWèÒUå…S äWç¡WæsUåVVæ0XçYê(XéŽXêôYíŠ[òÉSýúTþùÈXòÝYñMYò‚ZðÀ[îôXðZYñsYï^îd\íî]îŽeöØnýo}þ Žý —üä£þ:»·>¨E¥®žéœ>˜9•nŠkwss5w  { 툟þ{¬ ¦0¦a§§Bª~«|¬ ¼¯ίÍ©а'µ~´#Ù¥"‡ ÿŸ~¡À ã’š"ѱ q·µµ…®j¬€§S¨‡ª zª ŒÔ–qŽ<—쨮§Öš›=“ ‹TŒÓ˜­œÝ„ ¹­­°ž#„)©¦¤.žœS¦8©þ§¿¨V¨mžÂŸ‚—ƒ°‹™‹އ¡‚W!‰µL  r¡“ ”œ†…‚ƃ‘xuš‰‘QŒÙ‘îd‹Ü~vx Ïo Ïó‘5ŽŽ—Œï˜šÚ’²– ¾’X‚ f„÷“ØšÀ“)ô|;v Rv‡þò”ÿúß—÷µôSõÞŽ÷lùR„ÿcþÒSð¢QêQì[PíªPíQìÀPë­PìLRîjPïÚNð©NíTë-VëÙWêúWê­WìÄWì1VêÐVèAUælSåÕUç’VéµXë?Vë/VèŒUä5Vå5WèmVç~Tå¸T ã$TäUUç¨Uè"UèûUæ½W ã_T å‘Uç·WèaXé»VèéVå£Uæ³VéqXêmXé¼XèWèTUéÞXë°XéVçWé–WéVéSUéÒVêëYì XíGZïYò—_üö_ûöl\ýõ-YþöbXÿò>YïXYìíUèLVåìTäêTãïRärTçÔRëÌPÿóºMýøLþúUHÿú FþüøHþúmDôžGõÈEö–Bö¡Aÿõ:Dþ÷q?óÒ>ñ Gò¯Bð€?îÆCò,MÿøwMþöîSüùAaùù§_ùûÏ`úúÒ\ÿôÍ_ï=kîÜcë»^îSê§Såî¥BòIDþöHõkBîPíUê›Xé*Yè?XèkTçtTèH\éÁnîã[æìRå=VéRVéÛXêXìZíÒ[îxZñ"\þó[ïUUêÈVé³Vée[éiWè`Xè®VêZëZê¶XëDWëÙZé WèËWè"VçeVèyUç¦TèÂVëŸSÿôæRýú‚Sûû¹Wüû‚ZûùïZýö·aüödýõÇZí”Wé÷VéJXèŒXèQZéK]ïÙfùðnHyû ¸œÿJ°:¬ý§û§µ¤/¢¸£·ž_žª£¢КÏ•V’á‘Ç£—©k¦0¢ñ§˪€¬° °£¨¥¨¦ޝ{°«}§x¦®8¸…±¤œ¡«¨Ùµ¬ݧn¥¬9´ ´c³à°E©Ÿp?‰jŠ—¾¡ µžÙ— Œ'‡â‰ —–Ÿx–G‘¬–!`¢M¨{¢²¢n¨ÿ­Ûª€¥‹¤ ¤Ÿ/˜¡”#”‰<ƒàœW«6³²´#«D£s¡ Œš™šs£³¦E©ت¡¤6—OØ‹w• ¡U­ ª\§û§f«ý¬§§ó—ŒŒ§ ‘†’ÿ„š4£¨ާ”¡g•Ù‰~ ÿ™Š÷¡Žôî‹óôŠò‰ò"ˆô|ðpZç•Qê/PëNRëMìðPíQë?Ré¶QìÙPï OíÃPé?NêNQêUæTV åSYç Zç3YèòîCòÓCñCòõ@ñ€?ï²Dñ{Fó5Gô Iô SÿúRîLXå¾UåàVæUæáWæUTç3Uçë_ènZêYWì±XíVìÛXìšXî*Xí¦Yï/Yóš[þôqXïòXéWçÆWéÆXêZékXèßYê¬VëÕZëaYë-Xì6Xê·Xë¼VéæVçVèlTèÐUèVë$Uï&Oþ÷ÙSûû7Wúþ¯Yùÿ`]ùüÚcùû$aû÷ô\îVêéVéšUè,Xê²Yê×^ìbóÁlþþÓwÿ„ ²©:±›®^°Eª ¦¢ n¢©ý¨ß©÷ –˜t™d§}«õ§ͧ§B©­±R±>¨¡£¦Ò«¿«5¦©¡_¦j³Ù³v¥•8˜ªø¨Dž¶žB©Óµ(·´ž²?¯˜¥•›é’Ö™>« íÅ®,£Å™Û‡^‚4…ÜŽ’ÙžªY°g›â‘dš~¦ǨG¦X¥ ¤h£>žù–ŸÕ'”ö˜ÿ4§ä²µàµ6²«ö£u¡â£›”Çœ¨©G®‡®Û¬• ½™ƒ™8šK|¦ÿ®¾¯@ª¨Ú°{² ¨Ášpf†°À–ñ˜—¡]©ªQ¡o”~)‹üxŽôïŽñvˆðˆñ‰ö ‡ö=pîAR ãiP åHP êëNíMîþNí|RëVêUì"TïNîµNìkOïxRê T åVå9YæåWäžUåUç/WêìXípZî;VìêVè Tç£Xé¤XéTçùWê(VìºVëÀYë“XêWç&UæúS ä“V äRWç“TélUêØVç_WéÀXëµWëyXéVæ˜T äáXè,VéÿUæTäUæÙVæßXêTYð‰WídWé$WêØYëbWêòXëßZïXîVìÀWíªVì˜WêhWíÊYðo]úùñ`÷á^ù_úýFaüö1[ì[TéúQè²Uè²TçcVç°RçmRê™Vñ'Nþ÷SHþûÄ?ÿûÁ>öú?óBô÷<ð=ï@ï?ïG@ï_<ïØCò3HôHñ[Uþùr[ûûäZÿð‰XæˆVä[Xæ†Væ&WèBWé×Tè5Qè}Vì²[îkXîãYìUYíÊTîüXïz[ðâYð,[ï WìRXéƒXéXé#Uç>XæoWæ:SæõUè¿UèžXêàYêå^ë‘Yë1Wê¢VçTçuUèæUé³VëTRì™QóSüûÜWûþVúý¦UùýüZúþ-eùüßbüõ­Xì„Vè}WéÎXì®YëÓ\éñv>ðR>ï¼;í†@ðãAô†DóKôuOëßSÿö'bþø[ííZç°WæJXç1VçÿWèÿYêQVêÉVéÇWé­[ì§\îŸ[î8[îZïhXïlYîVìzVëUê Xì³^ïòUéýVçÇYç Wç€WçWçUçUèªVè´Zç•YègXé—Tè›VèwUè]TèŽWìòVðâTþ÷ãQûûySûü‰Sûû|OûûùSûý‹aùý[bûø"Vì¼UçuUé0XìªZì!\êšZëYï»hý¹d •©$³=±P°ˆ¯Ô¨=¥5¤ç§‡­¥°¡œ¼—*£•«¨ý¨cª¬°t¯˲ê²û¬x« ®?²å­¥ޤ®¤í¦ã° ´©©i–Q“=že¦i¡N©²¦µÆ´ê³ë³ °n®Ϋ_¨Lª\ªM¬ç® 3³ ¸·5¶è­O§¥¼§(¨â¬d³ç´@•&ŠÍ—¢”¢•§%«é©£œ[ŽÅŠZ᚟䧵]»¹Ķ²¥ B”­Ž;‡=‚$…ꇯóªw¨ ¤Ñž0œ¢†¥ÕŸ©³¢5  Ÿ¤«´¤,ŸSš5–ò•;‘Š‹£˜h› š{–ˆkükŽ÷Œôr‰ó»ˆôr‡ôÿ€ñãtó0Yé¸NêøMìŒOíèNîcOí@LëÑNë¼QízPí­OìúNëRPí]RòIUë½WçºYèYèWæ…WçZëËZðÁ]ð#WéÚTçKTæþTã´Uä÷TæýQä7UèJUèfVéVêÏWê‘Væ½U åTèÚSèíTæôTæ€Tæ‹UæU åUäÍYé©WêüUæÄT äNWæ”Vè©Vé±VçVèVëÑYìYXëóVê´WéâWçT ãX ãWä.WéHWë¢Xê?Vé\Xé¨Wê¤XïSYóQcúöŸbüõküúqlûöÙrûö_jýõÍWÿ÷ TínWê YìaUì›TêßTê¿SîNPðEMþøAþ÷@ôT;ò™AôP@óÊ@òÆ?ñZ?ðÉ>ïýCó>FóÇCïÊ[ðˆeýú©lúBfîbìxSêUSéõUèÍWèWèØWè~Wé›Uè¦ZìT[ðˆYîäWísWì,XëvXêÇSêSSêµWíy[ÿðª^ÿðÎYëYéüZé²]ë XèUXåRälTçáUéÍWéŠZé~WéÔSè/Wé?UèUéßZÿñŒ\û÷ùUûýHSúý²PúûåPüú&Nüú•Vüúª^úûcûöíYì³UèõUé\Yë³[ì\ì¸XëÀ]ï´cýõŽ]üA~þÏ›ý1¯ÿr³Ô¯:²ª¬8¦ë¥Š¥ß«š¥O Cžœ§aªΪ䫾°³9´ γ"Á²w­Í«Ù¬˜® ¬ Ù¨Û©V«¥¬à´ ¶t¬0 –& Ü«•°Ÿ²æµܵݵQ· ¹´°¿­)©â§!ͦУ€¤ Ÿó¥±{´° ¯€°¦«9§ ¨Z®S±–ZŽ™æ¤º£g¥5¨ž¨¶™ Í… € G™›HžÃ¥­;¯à­]ª ÿ¦|˜Û„•…†´€¨|o”óªH«À¥Õ¡p"—*’Ï’‹ˆj&˜™¨•œ“Ÿ“¡¡¬›6š²š_š>”¶Žq’‰”F’Ê‘ ,¾‘üZõÜ‹ó`Šò¯ˆóňòˆócõì^ð«Qê‡IêœNïèNïOðNð3MîlOíOîdPîPêRìñRìKVîÅUêjXæëXå•XæÄWç×WéQYíZðfXíUè Tå¾SåøUã$Tå¤Vè;TèÂWè'VçžVè:XëÜWêTUæS ãcU äTæ·Uç,UægUæÝUç™VæVãvWådWçEVæ®Tä×Wå[Vç¼WèUç¬Rç"UéšUèbVèHVé±Vé†TéêVæêWãWë¬WëUéžTèWé"Yê-Wê¹Vé>WêËUérUèŸUè£Vç TåðVä“WèVêUéÙUèuVéWèVYê2_ÿï3fýñÐ|úúw”÷‘îG‹õò†ˆöö`jï_Tí¾QëtTèŒSç”UéaVì¤WðæQÿñ¼Qñ´Nþó¯Kþõ¼CÿõyAôCõ‚@ôJAôBõ Cô=EóIô@SîÎ|ïHŽÿó#ˆþõЂöu}ý÷ uÿö\èE[æ\æ›^ëL[ì]Zí-Zî˜WîÞVïhVïÜVðœYíªWéÌTçrVç.VêßZìXéÎVèÐVèÎXêÞXë³WêxWé[ìZëúXéXè&UçnWé˜WêøWëXWêWê,Vê7VìwUóàUþøJTýø¾Tþ÷­SþøÐYÿõO\þó ]þòúZï!WèªVäæYèòWëXìZì>Yë?Wê_^î/bô&bûü´bþ;‹ÿ u¬z®¢­®Þ£û`… Š ‡Š*Œ’™š‡¢Þ£É¢Ä¢)X™Žž $¥ Ÿÿ››ï¦p¯G³x³à¯K© ¨ª©‹ª]«¢¦5l¥Õ³‘· m­ è¥!n¡!K í¢£™x™‰§„°!:¬§©x¦ä¡=¥K£#Ÿ=¥q©©§f¢Œ—z“e–ð²Û¹]¶[®A°-µ{²¨¢®Œ×vœ{ h–º©¸§ˆ£ƒ¤¯  œË¥~ª9šÂÁ¡ëµK¬,–éSž¥}¦›¶“Ë–œ¢rªA§á¥§¤J¥ 5žÉŸÕ£1£·¨­¥A¦§V¥œЙ ó–“ûóõïŒôåŒó Šñäˆó—†ö¤{ò²_ç«PîMHï#Kë¾Në;NêüOëZKï‡NðŒNîóPîïTðVìÆWçjUå:UçEXéTYê0XèæXæõUç“Vé6VêàXêZë,\ê&WçäQæUéXXë(VêÃTëïUîïRíúRéãUêwû žþ[®¯@´¯ߦ¨›¤™ÿù”T‹&”¤P­Ùªa£¯4” ¯Œ†„üŠú‹ ˜ú§ޱD¶·O¶ Á±¨«í§‡”Ï’š W£Ýžì§žµºµ—« £Hšß—œ ( ‹©i²é²/® M©€œ®„U…(‘T¡ª«º®a°@¥›e¡¡þx£¡³ݳI©R™ šB©–³Œ§{µ˜£/›Œ© °3¬q¦2 ¢_¯U¬)ž¢œ©©­§c‡=‹•—Ÿ¤¤i“y‹Ž:“ŸÑ©¨V¦ަà§c£ÿ¢^ áŸlŸQŸ¢‘£¬ ôŸ±œ Ò˜'’øã‹òdŒò‰ó­ˆò'†ôÝ…÷vø»]ëÄNì?Nô:Nð;LìÝNíÍNï¬Oó Nó©Oî«PîˆSê³SéHYé>Xè!WæWèE[ë WêÒWé™WéBUè‘SçæRçÊXêòZéÞhîÌ^î\TêQïlVñ UíBUìVUíTì‚TêTìFRëRíQéýTçóVæò¨?ò¨HÿøaGþ÷šDôÆGôSJòHêéuþò€üøËfú÷áYÿ÷æQò£TéUèvYíÑUñoZðàWì0VîKVïŸRêßVêîWñxVó–WñÀZï—Wì'Xì Wë¡WèuWé¥YëVé4WêVéhTéjTë3Xë@Wè¿XægWæâVç°Uæ Sæ¡WêˆZï.YïWíŠXíUñaPý÷"KûøLûú Tüù0_ûöaûö dúøJ^üöÑ]ÿò YíªYé0VéXWëèZì ]ízZêe[ìœ]ï¼`óÝZõ•fþ_ü¨ü÷¬þ³°¡œ#•þŽ7˜á–%“ë— £«P¢ĘÕ™?•©ŒÚxv{«Œ |œs¯|·¤·\·?· Ô±&­!¦ª‹ÈÚÈ££̬ž¶7¶âªk @–™ɤµ¦õ§0°‚¹|³ݯ $« Þ¡:Œ®˜Ò¦®N¯`©Ïê—£¢l¨‰œ|°À¬%›–ŠÈ„¥š>¤™šy•ó–Ö˜!¤¶$´è«1£šš–´™™ž“.“/˜þ—ŒÝ…@•U¡4¡ø‘œ‰ºlÝŸx©¦¤¤‡¦>¥ê¤x£$¡õœ­™J›ÏžžÇŸï› ß™½”ýeôˆðW‰ñr‰ð‡õ…ø]hô°UêKí7KõÀJñ¢LíòNî¨NïMï¤Mï-PïÊRíZXéVçÜWç#Wç-Xé¤Zê¿YëIXêmWé“WéUé•Sç¥Sç†WêÀVèWé¹Uê¨RêRñxRþõ¹TïêTïµTîQíSì§PëBOìÂOîøSêwUèêUæ Uæ(TèbUê‚VëHVê€UèÏVèžVè’SåäTå]Uæ(UåVç¤TèpSèäVé—Ué”Vé}TéæVêbWêWé.WèNVæ¦WèÁYë•Yí¦WëªVéjRçWé VéöTéAZïzZóÕ^þôÈhÿö\ó2Vî[QèÊSåÌUçSçäTæ‡Xæ{WêH]ï•YÿòðWÿóËRðÏPÿórFýöi?ôÜ<ïô@î>Aò§Eó%DñÛHôoKñúPëÃvÿñ pýóËaûö¯XþødQîÃUèÑUèâXëªVï¨XïWUìºWíúUîÿSìÄWî~[ÿòÍWðOSïþTíÌWíÐWëWæÑT àªTâZVçÇSéþTíÓVîŠVíÏZît^ï \í(XèêWåÉYå VåT äCVç»VëšWïF\ñéXï2XÿòËQýö9Jü÷âQùüxVüúƒ^ûøÄ]üöÚ_ü÷\\ý÷[ÿó*WíNWéçUçßTç¬XèuYèVè9VéÂ[íl^ó"cþûù_üýsƒû &ú¡§ýñ¨„}|xÒ‹«•ÚÕw‰¨À Ñ–}˜.— ˆ_„g’ùõ!›ÿw¬1´¦²¸´p³?¯4­L¤¿ŒŠ¿›q¦ïª¸¯•²!µªíK‹Á &£ö›o©‹¶Jµ¯ ž­ ¥ñ˜ö™Ÿ¤¨® Õ¯!«˜a‡4Œ-•Ïj  •.¥‡ü‡N’ê–ÿ‹©F}•„f• ±ݶªq¢mœ:’ —·›v›‰‘¨„ú‚c~°…}––£¯¡‹ó‰É’ù—‚¡Ù¨Ì©!j¦Ù¦¦¥à¢=¡:›×–Ë™‘šº  ¡ ê•ì“’ùóŒ‹òäŒò‹ðˆï²…õÏwø°VòOìqLîWéþYè£XægUéiXíäXîþWëÚUè!VçdVéËWëSXíÇ[ó[þ÷ZòŒZí¬SéïVèKTçüPåâVè6Uè'UçÐVçûVé7WêÔVè+TîàTÿóQþõZGÿöÌ;óŠ;ïF@ïðCðÎCïôEî¯GóžQó]Xð¹jþókþôIZÿô€XõÅSëÎTæWæoVêüWíUWîøVìHVìªYîkRîÑXñ)YÿñýWïkTîžVîVí"Vë]VäÍW à2X á8VãVè~Vî>YñWWñXï`Xî[ívXêíXç|WæÚWæ:Tæ0Vè®VêYWïÕYñ9TíÍWñ8Rþ÷¡Nþ÷‹QýörTüøx[ü÷—]ýöE\þöŽ[ýøZþö\`ñ Yë°Tç‹T åœUç XèXê‰Zê>VëÚ[ñcbþû+_üûquø…”û×§þ¨d—~ s | ÍÌ‹¼‰S–›§­™ˆ™œ”LJÁ…ª¢úÀ†ú •=¨„°^ª«W­Á¬¬ÿ¢¹m‹ã”u¡ر¯b¦¥´‰Šp Ísám™å‘…¡ã²³ˆ³ еï­¸¥¥¤¦{ª´°!ª v¥øŽQt sâ‡ÖŠ7剘…‘ Õ™ \–•Í”±‰N€bƒŽgL©~§à ›ø“#•e |¨ ¨.˜°‰w~Åt✘ܣí•yƒÇ㛆¤ô¨ç©7©!~¨”¨¨s¥âÆ¢à¢ržV˜Á– Jž —¥êŽÓ‹ùPôcŠñôŒñ‰ò¬ˆð}…ì-~ð@gôoPößOò,LòLðûNí$MìúMíñNíMìºPíûTîWìWé4UçqWç5WéÓYê [ìÜ\íÿXë·Wê+TêˆUéUèUé‚WéâXèJVérUé Sì.SóÁNþöPý÷Qüø®Sþ÷æXõäXöPþ÷ÏOþøYNôYRêÆTå_XåTå¡Uæ:Uç¯VéëVé[Vè5Tç×Vè#TçËTæVåSäëUæWæ/UææTçôUèÓTèëUêUYí”[î)UêÆTæ1UåQUèxYë[YíPVëÛTè UèWé,VëÑWïñ\ý÷‘_ûù.[îVéWQæŠTç5UèåVéXWêVë†VèÜWèàVéUæ UäƒWíUò OþõBò˜<ñJ:ïkAðÕBïVBïÊGëïHï}Wÿù˜`üùuhýûÀ^ýõ~ZÿóÓZñNXêTåÓTå[UéUìÛTê÷Ré™WêUì±UîÎ[þôT[ýöpWðîUíSìÐTëVëÛVç—Rä™Vè©VèÀWé—WìQXí–WîWíWìÜXìgXì›Xé‰WçÁWèÀYé'YëWíVï¼Vï°VïXÿò³Tý÷ÑNü÷¬Uýù¢Týø‘Výö}WþöÄ]üøâ[ýö>Yÿô'Xð´Xì½TçTæÚVèXê)Yë1XêYìÖ\ðZcýùºh÷ýûvúÝûy¦þ©àdå€Ç€ÁŽº‘¸û¾‘唎™Eœu–Àˆxwð€·~“@¡_­û«"¥ªK¯:¯¹¦8˜6“k’–ŦôŸy—®›Ɉ’vOyì‹ýå˜ZœT¤¿¬4©¨¸­¦­§«3«O«µª ®!9©)Á‚jh 2s-ŠŒ‘‚v„%†— ?¡ î• ·”ž R“Vˆ•¸˜ Z‘•›-¡ £”#‘¿ß•ˆ¡‰¯Š´ʧØ” ‚`nìy”㜪†|CŽX¡3ªÝ« ¨à¨ ©ʪª¬¨c¤˦Ÿ§¢\x˜ a‹U„ø´‹öÂŒóœ‹òë‰ñÖŠó0†ñŽ~ñ¥mï.Wó×Iõ|NòªMï{OîýOî‘NíµNí™Në~PëwSîÂYîTUébTæ VæVéÃYì)\ìE_í'[í Wê_Sè«Sé*Tê©Tè#Tè8Sæ…UæäVéïTê‹SìjQñJRÿöJQüú:QüúPüú°Qþ÷ÒOÿö+Qÿö(Mÿ÷€Pô£RíYSçÖSåT ä0U ãwUæ™Uç1UçŽVéªXëóYìVVë±Wç!UäyVåºUç€UæLTåYVåTæUè¾Vë|XìWí”Yê5VåÕR ãVæ&Uè–^íþWë‚UéÃUè;Sç¦VëõWí\ýö‹^üö:YíÉXç,TæSSçïWê0XêWêWì1Yê VéÉWéNWêHXêXî|YÿògRòäDñŽ;ðè:ï;?ññ@ðÖCð‘GîNÿõ\üú–]ûûß[üúöXñ.WïWîrVé—SçhUæ†Sè+SémRèVèôVë¯Wë×Yï*\ü÷ìYý÷ñVïÙTê¦UèÚTè¾Uê Vé«Vè³VèXëˆVìçVíiWì\WììYìÔWë%WìYëXçWæNVè¸Xê‘WìÚZídUíÆUð°XóËaúù,Wûù›RûúÐSüùdSý÷íSþö%Uþõ[ýö—YþôºXò$VïLXìSætQæÈVé{XëñXì¥Yì9Zí—]ÿô$býøTfÿú¦dúÞ‚ú½žü;¨W§‰žàšü•¼œ"š£ |šÙœü-¢ªÒ˜ñ‰‹uÒ} *Žœ˜ƒ©‡¯,§— b©ð³ë¯,®çž¤Óš´ ä™´‡2ŒUp…•„  b—Mœÿ3£ºžš‹—Ë‘!¼¢$¯¯¸®U¬¬ªñª{¦¡Ÿ“x|† q›À§ 4„ މ ©‘ Ê™ – f”ûŸœš3‰dŽÓ ˆB,ƒëƒ Œ’“Þž­ß¼ÿÿ³“‹}¾oVz ”£˜ †ùŽ#–¤‚ª û©ª¨!§{¨§©|¨ð§½¦•¨¡ÒžÍ›Y‘ô‡ iƒú܉øšôŒóI‹òúŠò±ˆô¸ˆô>wòQYïÐPô.Ló“Mï²Mí\Oî8Nî¬Oî@Ní‰NìÖPìÇUì¨WéÜUæ¢V åCUç€UéXìñYëºXêÞWëèWêgTêÏTë9UéTçTçTTçËUç:Vé†Wë_SîäQð_NþøMýùSPýùàQýùÕPþø›LófNó.Oô„QðUíÔTè„Tç(U åU ã^V äúT äáR äÖVè]WêUë­WêÀRå¾Vå•VèšUéVè“Uæ•U ä–T ä”WæBTè°Vé‹Xé'VèÙTåæWç@WéHXê¶\ïRUíÄTê+UéVë‘UéIVî»XòÙZîÅYèŒSä†TååWéXëÌ]îIWëÑWé®ZéXè5VèüVêÎWìVîxTð‚Pó½Dò7<òh>óX?ô•Aô†Fó5KóœWý÷äbùûŒ`ùûoaûùcYð±XîôXí.Wé7UêUê—UêÇTê”Vè_UêåVìáVìÍ[ÿñ«aû÷3\ÿò8UéÆVçËWç‰TåtUç¿VëdWìÖWîYîXîWï§Yî½Wë^WèMVètWêWèŒWæTå³Xè{Xé=Xê‡VëZWíRVó[üùibùüVúýWOúüJNü÷NSÿò~OÿóÑTüõWWþõEYþôhWòÀXñXîWê†Tè«UéJWëžZî}ZïYïù[ñªbýözdÿ÷F]ýùïvü b–ý8 D§¬H¨uŸ·ž%¤ª$©¨«s©]©M¡M (¡Ó™„T{@€¥“³«¸¶’¨Í' !®®´εz´µš¯¨§ê›ÿk…‚„¨„#ÿžd©¥­{©“׈6…'„¸™f¬߯.®ß«¯¨…¨|¦d¦žg‡’a­;±;‡…Ÿ† s† <‰ê¯Šì”Y£Ê‹™l‘4!w·zEy%z‚oˆN•Q©ж¹¦…qu¢o¿} • Ò”¨ מë¨ÿ­"‹«!¨’¨T¨§/¨§ç¥z£Y¡T›‘”‡n‡÷ºŽôYóŒòƒ‹ñ<ˆòŸ„òã}ø@hÿòöLñ¼JóçJñxMð™NðîNñÃNðªMî|NíÿPí`TëlUèáVæòTåéVåWUè«Uê-XêÇXéWêpWêÂUéaUêæTêTç TåëTå¼UæUè!VévTëÐRíÜMÿóŸMþù@IýøfLýøêOÿ÷ÍOÿöƒMóOÿô~Oþõ8QñVíIUé1RèÞTèUæ Uå·UæÿTçJUê1Wê*XéxWèÏWç,TæþUé UêoTéÞUç»Væ;UæÝUæšWæ"VèËWèfWæ9VæðVèþWê6[í \òBXïFWíWëâWè³Wé[VìÏWìkZê‰UçXVæ)Vç°XéXì¨WïéWì›Wç¹VæŒWæçWè0Xê4XëŽWìTUífRòBóp;òËAõÃ>õÇCòœIÿõÝTñé\üö `ùûBcøü#aùù5[þôRYñ5XîÜUë‘WìUï¯SíVê*YêVì¨Vì¬Zï8[ýôÇaú÷wYï'UéðVç£XéöXèwWè'YìPXî\ÿò<^þóðYî>YîXìVêšWægUågUæ—Væ#WåTä¢Wç&XêZìºWë­Sí»Rñ¤UýöòaúüÁXûýÚQûý€Pý÷kNïÛJþï¹\ýó¡Züö2WýôüUÿð÷Xð dÿó^ïVê‚Rè€XëN[ï\ó‘`ÿòçZì$^ïõeõsiþýHmé€ÿ >©œ¥¨j©x£7i¥‚®—¬—®J®B° ¨ŸŒ£Ô«‹ÅŒq}àþÕ¨®Õ¥I¤l±2µ̶ ¦· È· {µ¨¸œë•ÿ”ÿ8˜×.¡ù­,´ª³y®œ‹¡‰ ,ˆ –Ü¥B® ±7­s¨–¥æ¢!¥¨ì––›ò«°ÿƒ +~¯€Z„Ÿ)vÛ…é›®§­ãœ—‡ýÉ¢z9vwfz÷Œ¢G©zš|jo‹w¹‡ÿâ–䘽–ؙĠݫ®!ª"Ÿ¨i¦ç¥€©ä¶ ¶Æ£¹ œÇ™Š[{x~÷^ˆñ³‹ðâñ‚‹ð'Šñº‰öƒø=oú—VñJòâNöSOóÎNñNò8Kò„KòyNðOí£RíÜWêøWèØUæêUåhWå7Vè XêAYëÌZë1Xê¾VéFVç4RæÌUçóWæVãTã[TåMVéAWë¼TëKTïSLþõ×KýønMýûSNüûìQþøEQóOó6MÿöMþ÷PòšSîàUê·SêTé,UèHUç˜VçUéWì°Vë‘VèÖXè«Wæ«Væ°Wè Vé=Ué¬TæìWåVç4WèjWæuVåWVè«VçTæ4Uè€Xê…Xí?ZñVï Wí`UìÈVêðZëÙWì]ìTXé0Uæ$VæUXèWWëjXì.UîÚVíÒVéZRæàVæWè/Wê~Vê©Ví’VîäRñ›Bÿó«@òÖCõACüøÆFÿõÂGïIUî×_úö?_ùû]ú÷~aøúS^ú÷œZÿò•YímWêçWíGXò´VïUëùZìjVí´Wí8Wîº\þòÖ^üö‡XðÑTëãSèåVêWëVêÆWê&WëbWðÀXòóXîRYìXëdXé¤UçÓVæqUæqTäwT ã$VåsWé˜[ì{ZìYYìSíIRðÎTýõ¸fü÷FcûúOûû;Mþö^JÿðQþòÜsûúñkùú¬VüøÉTÿðÿXí3[ì[YêŒWè/WéeXëeZî [ó¢^ñß[ìù^íÞaòàiþýrþeƒÿ 8Šþî•sŒežÔœ±¥²¬!§æ¢¤¤«Š©›ž“ž0©q®†™Ž…Žd¡_Ÿ,‘Ƙf§²´@µ~µ A· ›·!j¯‹¢)˜Á•ÿï eœŠœ5¨α³­ܨi Žב L“š˜q©_¯j³÷® §Až"Äš#å£6© ¡¨Ÿ9£E¨ê 4† ][’ ·—X”’|z]ƒØ“?© ”¤«šsšô•÷„£‡â™ Xq•–›™ÆÀ{‹rì~];–ˆ5›T©¬3© ͦ R¤£U¦½¾È¡óœ{™Y‘ƒ}Avõ?‚ñm‹ðµŒðŠð”Šñ¤‰òg†ôÊyú­Uø°Nñ+Jó)Lö"OôMðêMïÑMî'LïNîßQî#Të£WéëUèwUçìVçJWè VçæWèÒYêYYê"UèETçúVåwTåETæÝUæaTäzTäÙTçrUëJWí—TîRðƒPÿô Lþö°Kþ÷MNýú‚LþôòNñ:MñŽLõýLöŸMóØOïìSî8Sì“VëTèeTæ[UæÔUè÷VëÕYê XéºWè^Væ×VåÈUåõUèÖVêWè XçiWéWë¯ZêTæTçVè«WçeVê[ïeYÿñ¤VïøWìVìDWïhWìÚYìuYì]Wê‰Wè£TçñWçXVçeYêçWì VëšWê.Wë9WêlVèƒXçf\êq[ìîXì{Yï²RñøKôD@ï~@ñ*=ólEñHNÿñr]üóL_øûÀ^øüLVúùÔ[üö\`øøïXþñfWíŸVëRXíAYîVéòWéÎYænXæZèOXç(WårVåXS åRUæ>Tç›UéXXéáUæŸRæ¤SèìSëNðâOï¨Pî NîôMíMìÕRì WëüZê Zé˜WéøWèÄWç„WçýYè’XèWè\UèUçTçJUç4SçþRæôTèÁTèÎUè‚TèÏTêcSëCRë”RìÖQðHPýö*Oüù´Nþ÷ªOò.Mñ2MñŸMð„MíVLíÿNîzQí¦Ví·Sé¾Sæ)UæUçèVæ.Uæ²Vç.cïilòÐYéQæÿVèCVë[XìUêïVéšSæWå VåÖVèÞVéÑUèiUæcWæ]WèSé·VècTå®Uå°Sä`ç6oíß]é„WæÅVäbUä¬VæBWçoVçoXçUæÓVçóWèˆVç”RåàTãyXänVæ³VçúYé_[îµRÿöjJýûÑKþùò?ñº?îÅLüöWýõl`øù:]ùø&ZýôÎWñJUírSê€TèãUë×Uì”VëVé WéXê(VéXè^XëõXì®Uí¡VëÝVê–WéÝVéûVêÊVêÇVêiVëŒVí@XìIWê¡Wè×Tæ•Vè…Uë©Vë¡XëËXëyXêÿWê²WéUVèÎSç‡Vë+YîVñÌYþôf^û÷[üóªQýô9KýõMûö|Lû÷MMü÷ïPü÷þSûûbZüú‰^ýöµYïëUé;VæMVç§WìKYíÆYëœZë”ZëXëéZí aþò¥cýõvcýú€eüýªlõ3üÆ—ÿ É¡D›ª  ½­ M³e¶¹±ºö°× ÷—¡‡§*¦¯§+¦cª!ª‡©À¬ž°½®­kª'ª!”¯M«à¦§ž˜ ¡í …‘p†t†¢Œ¹‚~~Œu+s„ <Šq‡x“…¡p£T Ñ©±¸·¬<¢ô›¦fœ´•Ú‘µ‰7·“®9\z #x;„¶›-¡Ç¡ˆ£J¨+£8–~«ˆ Z£A¸–À²å¨ô§/¥¢¢M—cŒÍ‹ÿˆ*…•}¢i£¯¤d¢Š ‚¢D¤‘¥Î¥à¢% 3K•Šf„üô‹ô{‹ð†Œð Šî‰ïR†ð‡€òtõR[íôGïéKô¾MñLMí3Mì’LìñOíjMíçMíœOì,RëÛVë ZéGUè½Tæ_WæXæ2Wæ–WçnWè£UèZUèÂUçíTç,UêùSê•TècTèiTé€UèTéHTë‚UíPSî€PïNðòKþôNþ÷ÆKÿöúKòvLòLñENñLïÜPîWNîõTïUðyTí=Tê|WéUé¸Vé VçìWç¶pðã{òßZè‚R æŽUçÚYéWéVé¦WèTæïVå¶Wå/UçâVçwVèÝVèíTçÈVèªUçÎTæ0VåzWåVçñYçgìÈYæàUâzU â¨UåùTæsVèÉXê.Vé-Uè½UçþVçxTè XæfUä•TèØUèoWèPXêä`ýõ(Uþ÷‘FûúêLþù¨EóÒ=ñøKÿõfWüöU\øù²\øù¬ZüõÆXð˜VìÑSè5Ué VìåWëÖWçbTæ‰UèâWêáWéWèºWê¬WêöTékWéVé&Rç÷WèsXé XêyXéßXêsWêVç{WçrVé—VçJUåŸRçoVëóWë¾Wë¸YëšXêMWèîWçvVêsXì‰XíÓVðáWÿõ[ûõïUýó.Oþñ&JýóÌKüõRNûøvNûù Pûù$SúýàWúþhWþõ¯Wð“VéVæVèÑWë¥ZíÌYìô\îÃ\íWêcWê6\ïR_þô5bý÷+eüüßmû*iüŽ‚ ºw•圬«´»´´à¶p´÷§£7£à¦å¦F¦’§V«¬ ª!« ¯ ‹³%´“­¦2£Ò›™œ[“—[“—-…¯v“vD¹ƒ­€’x\l2z ‡H… ‡Ö0Ÿ|—\‘ŽŒ –¢õŸK ž™—&–⥠ƟXŒŸ€ߊý›_¦·§Ô¦ؤäšÙ‹$…œª±!ª ¦Á¦á¦A¡ˆ—B’¤‘åŽF’G Ä©…§w¥¡Ôš]›®¢M¥ï¤R¢ô¢\Ÿ!‡©t»{ óA‡ðPŠï6‹ð1ŠïˆðÉ…ôý~øïkûWóKðÂNò$Nð¾NìÇMì3NîiMîcNïÈOîNOìSéVè©XèüWé¥UçiS ãÍV ãUWä§WçhVçßVæTæ[VçUèHTè¦SéÐTçÛSæˆUæwSç TéSë0UîÃWò5TþóüNÿòûKþó—Nýö6MôœKñVMñÞJðãKï¶NðZMï—NðÖSñVóKWðœUê—UèCVéUêæTë™Wé[é]étUéòRéƒUçÓVå)Uå7Vç´Vç„TæÔVæoVæÔWç¸Té‰Vë¹VéVç­VçàVæWåkVåTåœVçÒTèìWç9Vä«U àâW âùWç0Xæ>Wå%UçŠUè¦VéêVç‚SåÐWæUæþUçLTçTç_Sç|Tå'RäyTåžTè SéVTë+UïHRóßPóMðÍMþóºMýõ7MòNïŽMð‰LððLïMð@Mï§MïUòã[þõ›XñÐSèÙS äÓVçûUéëVé"Uè|Tè0TéÞTë«UëôVèbTåÓWåhUäHVäTä7Uæ1TæõUç¯WëÈVêŽWç,VæùVç2Vç5XèéXæfXå4Tå©TåVåDV ãGV àïV áWå Vä%U âÑVã¶XæYèVçDWçXæ.WäVå]Vç›WçW\è ]êVdÿðáXÿõNOûü!PûüÔMýùÊBþôWUýøeYû÷!XüõëWýô9VþómWÿòVðÙVíÛWí©Wê´XêÉVëRWêVê·WìƒWì0Wì˜WìíVìWìtXìBVê'Yë(YëXë•[ìXìÀ[í¾WèãVç°Wë¸UíäWélUä]R æZXë“Yì“WêçXé_Xê5[ì1XêSé»Vë¹Uë¿TòKTýùŸUþõ)Rþó>Pþö€Lýó?MþôÛNüø¨NûøþPüøTûúå\ùý]ú÷½]ÿð¤VéKTå@UæFWévWêWìm\î_^ïŠXëNZê7Zíj\òÎYÿõ}bûû²hýýÌmÁn|† ¾˜¢t®<µC³ý³P°÷µu®ªª¬»«¡«€¯2±ï°»¬¨ ³‚»_¹.²Ÿ‘˜T™Hœ©–Ž•dí„;}ƒûˆ‡ˆHv„ÿ‡›ÿ¶¤ˆ¡¼©T§»  !–™:˜™Z˜Š•>’…“šl¢‹ù’Z–ð¥Ë«;¬Q¶)º°¹á±z¡4ûž•Ë“ã¤Ϭ𧍩a°v¨ôxt„8•U—¥—ÿžý—2žS£©™È™£l§ö§¤ œ“ áŠÿŇô˜‰ó!‰ô(‡ó؇òh„ð|ðïfôñVò™Tê?NéNë¥Oí]NïHMðLð×LïKïLOïQíUê±Yê¢Xë¨Vë¸VèOUæ8W åXæÒWæWçÓVæ6Vç+UèÀUèAUèoPçûSç”UèSè„Qè¥OéÇRí¸RðvSÿô|Rÿõ PÿógLþöMþö5Jñ¯Kî‘Iî6LñqKñÌMñêOð6Pï(UòîZýù…Yÿô&UëÄSæ­Uç¶TèõSç SåUSæñVè'RêèSêZRç,Vç»Xè°VåEVä¬VåˆUæÇWè^WèlXé,VèÑT äÖVç˜UéSUéÜUèNXçUålVæðVæÑVäîWåzWä¢VãjVä•YårU ãMWå/Zè#Xç$XèrVé»UåÄVã@WãùXæ¦Xên\êœ`íÆjúõ±\üùpLýúxQýû Hü÷+Füø˜UüúÍ[úøùXüøRWüùYUüøêUÿò¢Vï-VïBVñüXð^XðaVîVVìáVì¼YîtVîŽVîèSìwXí ZîWí—WìÑWêUé‰VéUéVê·UêñVçTèÈXêDVê~VèîVçsVêÀUêïXê9Wê`XêXìY[îiXí³Wì1XëžUìÎSóXOûùºQýö@NþòlOþôdMþó&KþóUNýöÖMþöÀMþõ~Vüú»Zúû[ü÷‘XížVèkUåxVå!Vç+VèÛWégXêZé¯XéhZêYìcXî\óÃeüù&hüüêpý"sý†«Ǥ±«)´£´­µϰë¯Û®pª6«$°o­I­b­:¬0«l­«®n³ö¸Ùº¸ޱV¨/£†£• ¬‘*‰Ù‰ oŽfˆU†߉y€¬‡…–ŸÓ¨ú°€·±­®=¬c¥Bš¾Ž …•‰3å—®ŸP”ƒšOH¥ô²º·¹s¸ж¨ú•›~¥µ¤A£ §œ«¢TŸP¢¦œ‡"pþ… qšÿžœþ+žÿ› GŠÕ‚{ŸP¡Å¡øŸo¤ ¢ ŸI˜XFŽü"Šó‰ñ(ŠòW‰ó†ò(ñ qï=`öËXô;Sê†NéïNì˜Oî¡Nï„OñLï“IìùNí!NîÐQìjUè^ZênXëöYëžVèT å(S ãxVå TæØUæ©Tå÷Vç¯Wé¶TèÏTèHTç¯QèØSê²RêÊSéÃRêRîÐSñîRýøƒUûûlRüú!MýùÕIþ÷œMóêNîSNî÷NòKôoMñÃOïNQò°Wö^úý6Zýù™Uï}XëYêÈYëíTêPTçŠVæ2TæEYé;[ë„SæVç UèýWè¬Væ.Uå¦XçWèwVèWéIVçXæVèÛUéSèoVç}WæiVåòWæyWæ4Vå$WæëVæ§VæçWæ£VäMT ã¯VçIXèÆWæ¯Xç\Vå÷WåöW á…W àWXæ6\𛵑4“™ºŸË›íŽü]Œ/ެЕä¤$±æ»½¹ò·¶·6«!žã’‹Ž—’“–˜.¡:‘>™ZŸM«h¹d¿%¹´¿²Ùª`ङ9ª¬g©#¨ž¥jŸ ½žëžœ•؃ž{E„£# þcþ@— ÿswM‡/ŽÔ4˜®žˆ Ÿœ“ Ô„ü²†öã‰ñå‰ï,ˆð&‡óœ†ó~ñÌeëvYôMXõ SíèOëæPïÚNðÀKïÏMñ;Mñ›MðiLðªOíœRèþXè¢YìrXíVì WéƒUåäU ãrWåIWçfUçÑVæHUç³RéÚTêVã6XäöVçWê—XëWèìXèqWè=Vè`XéìVç¬R äùR ãWæ§VçVæ@VåÍWæâYç3WåXäVä”Wä£Wä Xå±WæsWæœUä›WãºXäXæ7Zîºoûóû…þïgšñØ—ö*výõ)MýøKJýøKûøgUúü9Xùý‚aöÿ†\øüN[ûøÑWï#Uí/WïSíòXï"YïTëMTêºTê×VëÿUíÙWí VìÝWìVìGWì¨Té¹SèðVêRRêjWìYUìfUê£VêíUêWëìXî¦WìUéŸSèUUèWè1XëŠUë¥Wì1YìË[ì3[ïþXì?WîœTþölMýöwLÿòÊOþó¦NýöMü÷5NüøfNûùzOü÷=NýõyQýöÇTüø°Uþõ9Vî8Vç×WçÈVæEWåCWæÍWèBWçiWæ]XéY\êXëÏYïý^ÿô•eûùxfûûðjüþ¨rý W õ᧘¦C®²²É´è¶©ªæ¤I¦ ªJ±1­c®  ¯³ª¥ ¨ò¬z°3¶Þ¹¶¸°ºg¹3®a©]¢[›”£D§Z—d¤ö¡íš’”X‘‘Ù‘Á•“¢m±}¹9·ȵ4´Шñœ™G›Í ^œ‚›O¤¬¿Ž§ —«8²µÇ®9¤ ô¦£~˜KŒŒ˜»ùÊ ·G¦Š£æ¡w›ЗI“û’_•]šð¤!žô–ÿo…|z ¿sÛ~­€’…{’Ž›¢©¡Õ˜UŠ È‚ú”…òº‰ñâˆñÓ‡òà‡óu„òÌzï¸^ìÕVôºQóÈNî›MïôPñ»OðMð¨MïLðÓLóVç@VçyXç5VåwWæ—YèùVå‡Wæ¨YçÊVæUäÆVãžVãÿUäƒVäÃR áWåøVå»T ãFW ã£X äBWæCZës\ïãoüñÅð7òÐýýBŒüýè[ûù;GüûQFüù™Vüü"ZúûBZ÷û;Zùø¾\ýóVíeVíWî%WíVî‘VíóSêcUëîTìŽWìzVìàTë­WìCVì-WìFVëUè¾Uç_Vê„Vê+VêîUí#WìVëÙSèEWë,Xï£VíµTê™Ué“UébWê-WëÝVì`Wí%Xím_ðH[î/XîJVðÛUý÷†Rý÷“Oþó»NþóßLýõ:Kþô!MýöðNüøhOüøxLýõîOü÷sSý÷ TþõåUï@VèûUçúVè±WçYè~Xé0WçÄXèf[ëZë:YìˆZî\ÿóVaüøÊfúûújûÿ?rü ¥| œÍ¢¦¢V¦õ°²´!µiª¡u¤N¨©.©Ĭ ¯y­§ï©Ϭ‘±f¸½»»·t³òªß©bŸ$‘Ę?ª ¬A™!M“ð˜þ›'ž“÷“¦—A›Ϥ °Hº»·¬²t®ì¤F–ßšó¦"¦± ˜Ÿ«¦óy´ˆ;Ÿd©¥§‚¨F¤ƒŸ¬¤q¥V›—“YRÁçÐÔ·w¤˜¡Ë Cžø™S—œœ"Ÿ¡£r§!üš ó„Â|ßx Aw e~ € ,Ú› ¢¤N¨N§u™ÏŠ¿‡2ŠùZ‰ò¹Šò+‹ô ˆô¢†ó¯ñ½uðQ[ï›VôÅNñ~NïMKñŠKñ%Kñ)MñKïçIîÒNðYOî5PíÑTê¾Zì‚^îBXéxVåâUåæVçZUæÆS æTéuTêœVèsUç9TæÆSçóQæUNäpNäÕSè$TéƒSé3RêIPêRïšQófPó¤Oð¨Nï±Oï Lñ¤Mó(MòSLîþLí?Oó5M÷èPÿö´Wþõ`ûø8Wñ°Xñ¥^ÿóU\òWð¢Ví=VêVçhVé@WêIRè¸UépUèTçàVçVæ™V ãÌUäøVæÿVé*SèïTçÌVç£VåVTã}WäWä.Tä5Zè!XçûVänUäfVåÌVèkVåŠUãçWäúVåˆXæ!Vå´WåWå\V ä#T ã‰WäÞXæS[ê~cþï3lüï|‰òÄ›üzŽŒø Ø]úý.Hüÿ>JýúMTüù¹XûøX\ú÷„Yþò YícXê UëuXìªVêOVëãUëæVé?YêÂWêÃVéöVéìUêLVëWë$Wë*Wë(Wè7WèžXì(VìMZì*Yî(YïÉXìVênWì+WîeYìVê-Wê)WëôZíXìnTìæWíÏXíZïÀ^ñ*XîVWÿñUü÷¬TþöEOýõ®OýõýOþõfKÿóÂNþôOýöMüöÿNý÷ÒNýøŒSýøhSþõ1SïöVèNUæVè†Wé²XéˆZêÇXëôYíZí˜]êŽ[é[î‰]ÿõbûùReüúiiüü&pü¹|ÿ%™3žÁœÄ¡î« o² ¯ Y©§¢žý£¿¤JªW¯Q« ½®é­{« ã¬^±ž¸÷¼=¸Ñ´°Ú¥ËžP—C’ô¢Ÿ¯¥ ”ýU”n—6“1 3–×=³¡•­1·µ²S¬O¨0›‘™í£à¤Q¤+¥©ø–c¢ǧŸÈŸ,¦ý©ª{«¥¥e¤[§µWº\«£„ ´ ®¡¿¢ ¡9£È« ¬W¬Æ¢k˜à‹ydy n} ¶t¼ ú– å¨d« ¥K• å‡ÿä‡öî‰òÊ‹ó‰ôˆô°†òñUqð÷YîïRóýLñôMð©Lð"Nð'MóNõWMôHLï—Oð#Qï7SíåXëBZê2YêaXçHV ã/Vå&Wç&UçýSéRëSêœTèTèwTç¬TäBRä¡Qä/Rç˜SéRé‰Sé&Rê PêwNïýPÿõ=KóžOî×OîwNïLð—LòXLòMð,LïúMòsPôOPþö¥Uý÷é[üöVðŸXð#\ÿóÓ]ôRWõÊUô¢Tê‹T äW åvVçŠTçNTê×UèÏTå‚UäžUåHV ã UåùVç|WæÖUåÓVæUVæZVä{VãYVãÓVä U äÛRåÆWèWæYåçVåÕVåWææVåWåXXæ¢VçXæUä9V äÂUä¼Wå)UäžWå.Xé¸]ìïcýï‚týò…ýúA‹ýýòfÿôÓRþü”HþÿBKûú}TûûÉ]ùùx[üô\Y3xåw&‡” f££ýª°â¦k”Ÿ‰ö"‰òMŒóÀ‰òt…ôç€ö`sú…\ðéTíPí&Jí#LðºLñ¥KñMó²OòvNñæOïQíÈUîªYí_Yê1YèjYéqWèþYèJZçnXç>YèUéRé¡SèPTç#TèŒTéªTç$Så³Rä¦QåªRç£Rç»QéOìæOï Lò¦HôlFóºLñ'Sñ]TòÉNðkLíÍJìkJíœLðÊLòßOõüTÿõòYýö¡ZûùxXüûØ\ü÷?dú÷}[þóýWïOSë×UêÖUêvWéx_èØcè?VèóSè†Vç;Xæ6WåKUã.Wå?UçÿUæÃVåTå¹WåVåÖWæ SäjWæ^VçVæ}VæüWåYärWãWæYèiS á¤U àqVãÿVåoXæPVäyVåÐVå«WäïWæ@XæíYè•\íŸbÿñ*`ñÔ]ð'\òÌRýú¸GþúïAý÷ÔQûúVûüÈXüø¾[þôèYï7XîVì…WëWê¶WêXTéYë†Xê®ZìÇYîyXì|VêTéVUíYVê$WçÜYæ6Xç'SèåSêÙWí ZîXê÷VèlUèWéqVè/UçÊUèŒVêÚXëyVëu\þï?Yð«XïbWïVïôVðñUï|Sî$OïÞMð†MòƒNÿòíQðšNÿóLNþô¾Kþó>Jýõ¢NþöUMþöäPþøªQÿ÷ƒTòoXï„Wí¬Wì8VêÄWêµ\íO_ÿñy_ñÊ[îA\í=[íÜ^îA^ÿñÛcüöXfûø5cûù»dýû©kû3kÎyߊ…š„¥ù¦ ¡¤£T£j•’’Ò–ª•Ò™*ŸL£M«£¯ñ³°µg¶Õ³M¯å¦¥•¨ T®ú²#² «J©©ПÙš:•T•û–M•q’Ožf¾Œ¤2£ œ¬ú«ÿ÷¬¡£á¦ ©бAµ¬̨Û«t¢vŸ‹’W• ž ëž(„}¹™˜¯™§ ù ‰‰ô™ ¢ð ´¢ƦD¨_ªG±2¯=§; F–½›šþ ŽV~މ?’­ž«Æ©z£þ›:–„‘ú·ˆò‚ˆð6Šñ“‰ñ²‡ó zòóhõÉWîPîÓLîCKîqKî JíGKïÄMðàMî”NðÚOð™TñšZðl\î¤Vé×Uç~Uè=VêÎXè·YæÄXç3Xë’Wì_Sê½SçŸTæTçzTç_Tç|TæSæNSç\QæjQç»QéXNì"MïšIó¢Bñ,DñGKóÉMò=Mñ3LïLî‰JïŠMð–LïßNïOñüTñÐXðFYþõ`Zýöj^üödûö^þóXîdRë½TëùTéiTçt[ç^é¯[ëUè7Så VäiWãíWä@Uæ=TèìUçRWæ¾VærWæyVåìWåÝUå«XèÉWèZUäÌXâVãtVäáWäVæ|Wæ¯V âdW à3W â»VäãWä"UãvUåWæwVèVéÄXèÍXëÊ\ïZí›Yí Zî™]ðC\ïi]ï¾_ÿò_þô²aþôWaþö bÿ÷©iÿûlmÿ§wþ æ¥Ê©o¤¨ŸK¢ÿ¢ô£DšÈŠG ´ŒžV L¢”«¹µá·Ÿ³ª±B¯Ǭ ™F–©ŸK§¼±H¶ô­«ªý®{§õ§¢õ›½™Fšž™T£e¢*Žû®¤ ¾®‰¥Ϥá £®°æ³…² ¨ʦ©µ¥“²t‰<ÿ‘ ‹|u{‡z„ |Éq,‚qŽ”œ,¤,¥Ó¥Þ¥Ò®ýµT°ý£M—†sˆ‹Œ­„ñ‘¤¡Ý¥ó©¥¡þ/qˆ¼‚ øø‰ó»ˆïBˆïë‰ðɈðê‡ôyóç[ïÄSî¦Mð‹JòøIï›KíJí"IðiIñKNð>Pñ QðWð7\òØ^îxVçÐU å Uç¢UéVéÎVèÂWéýXíPVí®Uë•Ué(Tç)TæŽUæDSæTåwRç“Rè«QærP æPêÌOðŠLð«Bïú?ïâIò,IñŽIñYLòƒOô½NòLôNLô´Lñ9Mï¹OðRQñèUñìXÿôZþôx\þóm`ýô~Yð×XîÞWîvVìRçìTæêVè#Uë#VëÄSæØU äÌWä4V âÖUã~VçBRé`SèóTæåTåÏWæ1Xå’Wä×VåçVçYWæ@XãiW à¿W ãÒZåIVã7VätWänWã¿Vâ¥WäaWåBWäW ãÂVäVæ1UêCVëÆVéçYéO[íQbþòtbÿòe]ðÃ\ñçXò|MñrBð@Müø¿Xüû`YýõÌ^ýóËXítVê+Yì’XíZWí.Yí¥WëWë½ZëZì0[îYíyUëƒVì¦Wì Uê‚Vê‹WêVëVêÖVë¯WìWìðVé1UævUè¾VéÝTèHWê;XîLVîŽSé¡TçÕZîÏYïjXì/YíWîÈVîÆSîfMð@KðŽMï\JïpMñ‘QóLýô±NýõWKùúÞLøþ3MûûñNý÷bPÿô„TðEUêKò(FñôIóÏLÿö!Mÿ÷âKöØNõCNðMðÜMïcPðÅTòÌ[þõM_ýô—\ÿò’[ñ5ZîëDïFIóGôIIô2Nõ6M÷`LóÝLðµLòÅLõÿNðmNí—QîcVòqZýöØ[ýô~Wñ™WðD\ðŒYîUWîÀYë WèÍVéÑTêWë\UéûVæOVçµVç>TånVèùUë.RìøUè}Væ*VæVåîW â«U àuWåVè`WåeVãµWäWä-T âZV â^X â,W ãKWä WäžWå[Wå=Wä-SâsVä»VävW åÒT äW äT á.UçiYí*XðÍ]òÌ_ûõõf÷úÓkþû°K÷QLõôUÿõXýõv_ýó XíSëõTëWì„VìÚWì.XîWðWí VêUê™WëDWëÉVëðWëWë(VêµVësYí•Tí^VìèVëýWëŸYë>Wé{Wè¿Vé\Wé4Vê¦Ví’VìÐVëdWê7UérXé|WìcWíöYï¡VïPòüNñwLñLïOIìLìØKð˜Nÿó)Nýõ#MüøKýø Mþ÷ÛMþôÿOÿóøQð{Të½UæãVåUé¼Vë»VëîZìÛZíÉYîµ[ðLZïWîû\ñX\ÿôT_ü÷­bû÷>bü÷qbü÷ágüùjýþHdþÿOzý•³¤ž©PŸ˜ô›¢£2¦\­y¨™–™+¦ä°õ«Xž,›åÀ˜é”í„×vØsLp8n Òo C‚ȉ +‹!“I¡"§¹©ù¨1¤»©Oª–Ÿ›–óŸAŸ°q„†È—aŸa£¨à o›ÜŸþ e "™x‹RzŠiÿ`lgt±ˆf’Šgˆ4‘ÿ™šÌ™§Á„‚€oŽeš´—ÿ>Kˆ އ0‚ÌŠ›¤X™Þˆ‚5Š J“iŒa‡ ]ŒŠþxzþ?kþÝvðè‡î ‹ðôŠò‰ò†ñ‚ñËwñØYïqOì4OëúNïíKòŒJò;Jî{Gì?JîÅKîiMîÁQîüYí«aífcî`íCYé5Xè%WèØYçKVæÅUå=VåkTè€RèRè2Sê~RìSê Tç4TçUTçgSè‰RêÛRîúOîÐMðÒFï7>ìZAí}GðEòZHôIñKïkMï Hê4J é!NìùLïˆLïzNîÖQïWò\ý÷ÙZýö¶Uþõ¾Vó\[ñÙYïPWî Wì¥_í‹Zî±VïUíUêîXé‰YéÉVèFSçhUçŽRèØQçÑVçÄVæ‹Uä’U âçV âAX â7XæVè@Xç¹Wæ¢XçbVå¹V âX âCW áAW ãpWåóWå‹Vä×VäÏVä{UãvUäµW äÑU àEW álWã°VäŒVç Yì¹]òí]ý÷]ZýöÙZüø¢TþûßGöóMôñTþôËZýóU^ýòlYÿðºVîUìçVë”Té!UêšYëvVëÛVëðVêëWéúWê‚Vê”WésVéêWèTéÚVëÁZí|UëìXëäWë|Wê—Uê¸XëjYë^TêÀVê£Wë™Té¯Vè+VìÃVëãVë2VëYî$WïmWïäVð@Mï›Lî]JñpLñaLíœLì;LðýNòœNñ-Nÿò¶Lþõ{Mþö MÿõROÿó¤RñeUëcTåÜUålVèÄVêwWìZê,Zëq[ïQ`þò-_þò:[ð[ñ¨\þô1\ûùÊaûøUbûøºfûúÄfûû%iýüeüý±mþÊ„z’¨µ£™ZœŒ¡¥ª­ ¦A™Ø™eœ•Ÿ}¨ˆ±!ªrV˜Œœƒ ¤ ¾œU‰y9o m Øl ãy ‘~ °~ œn¦ A©3£´¡"¥ú¤L®˜É¢'¥­œ:‘‹)‘´œ¬¤„®e©Ç£’£’£d‘T…Q“ƒ Ë K„ Zw h‰š š>’i’¹•a“U‘4Š„í—v¤Lÿq‹?~þ<~Ë{Ÿ€F‘ p—lŒ¡‡µŽÖ‹ Ø€ u áŒÿ“þ 䆈ûŠñÆŠï ˆðňñ_†ò3~ñojïVïLíŠNìœNïUMðÝMðKïºIîËMïMïõMîñRï Yíßbì`ë“[éWç¿SåOUæVèàWéØUèTèñXêTé¢RéëSë¾Sì|Ué3TåSã÷Sä»Ræ9Rè®SìOï¹Kõ‘@ñä@îmAîGñ.EòùDñçKîJí@Jì°Ié®Lê`Ké LéÄLíFPð;PðTò˜[þö‰Yüù=VýúÝWÿõô\ÿóx[ñVð Uðb\ï[î¡Wê?VêVéVèQYç»dë_Uê#Sè—QåÒTåkTæeXçUåuVåHVägT ä™Vå„Vå½Vå(Wæ@WçXåVâ»T áÊW à]U â Xæ¥Væ’Wå3XåVäçVåÐWåÕV ã W áŒUã(VäbVåBVè»XìVWÿòý]üö§Xýõ¸Uý÷NÿùDõ}Iÿô)PýôrXþôPVò'Zÿò+VíTìüXê~Vè‘Tç\Xç4VælWæ3Vç·WéRTèWêTUéWèSèòVê›Wë@Wë2Wë3Wë9WêyVç?VèêWìhWí/UíWíWêOTè›TçñVê?Wí1VîÎUð~Xð.Xÿñ}WÿóèTó*IíƒJíôKðÈLðSKîËLí÷Nð&MñNðžNðLòNþõðNþõbOÿóQòëPêûSæÿUé#Vê6VëWë[YéU[ìxZð¦\ñ[ð:`ÿñ$\ñ×_ýøY\ûû‹_ü÷Gaü÷Tdûøeüø$gþøiúûŽfþý©|ÿ—z¥¼§»žÔ›Ÿ¶£5§Ǥ_˜ëžÍ£ª°`´‹ªZ¥ Ÿ ¢¥ ô°ä®\¥ÐÐz øp Öt ñv Þƒ hŠ—œw£"ì¥ Þ¡ ¡T©\£V›ƒ›T¤¡¨0£÷œäœaœa ô§Ù®«¦¨c¨5ªÖ‘þ{tòˆ )|!x EŒ #—Þ˜Á’ôŽ.“w‘ôŒ‡‰îœ.©8ƒ†?€û’úP€”…„•ù›’Ý…ÑŠ5‘‰›Ä„¶Ž Ήqù©’óbŠð@‰ðXˆñˆ‡ò)…ñ,{ðˆZê=SïDNîŸKíâJíÍMîRLîKïpKðOJñLîhNìQíIYìqcíûaëUYèÃWç4Wç€VæÉUæ]VèôVéVì¨Ví"SíÈSí€Rë§SéSè_TçaTã4S ãRæhSéŽVï9Vñ…KômBð?í Cð‰IósGñ • ͘¼”Þ6‰÷’o™Âªˆ³™ª}¡áû‚üâ‚ýþ²¯›R”Šœ’o–ë“6í‘ÿŽ Š¬‹÷|Šòª‰ðDˆð©‡ò™†ó€ï¬ríDSè%OífKï¹Hí‡HíœMïêNð4Kï±KîùJíOLí6Oì|Që Xëòbÿïncÿï£XéVçuSæ{Tä¦VäˆUæÈUèÞVì,Wî%SíRTí‘Që‘Rè Sè3Tç¦TäfSäRçjSêŸWðuSÿòåHóï=îe>í,Dñ Fò0Hð—Kñ†NôÓNòÖMñnLîŠMïxKîˆNíONðaPñìQñ"XòG`ûøBZûø´Wÿõ Wò$_þòw]ÿñ9ZîwVíëUëàVè;Uè¨WéLWènXæ7WæXêHWë×Xë^ìž_ì!Wè¨VæÈU äšVä¼V ãV ãcVåWçVå¶VäáVä5VåVæ@WäSUâÂVã—Uæ‹Vç&VæYVäWT ãµWä÷Vå~WåTãÃVäWåUUæªXê—XîXÿóà]üö \úø|UúþÚRüüƒBñiFínMîoOð_LîñSí RëVëZXëŽWê¶Xë$[îÅWëfWèFVêWë*XìjWìIWêOXé¢Xê*Vë*WîšWífVìôXíXê WæNWêŸYî6VíŠWîWðWî[VëWWì³Ví–Xï0VïòUðÛVÿõWþõPüô»NÿôZLð0LîšKïîMñœSï4Qì5MðëMÿõ{MóOòµPóMþóßNþõŸNýøÀRÿóTì}Tê9TíOUð"WíVëøWçÎT äAVçËXëXí Yî´XñØYÿøYUüûyYýög_ýõ“cüõ{cüöådü÷hgýú¦oý nËž »£ 1r¡F§ǧš¦Ý¢’£˜¤5£˜¥ ®0ª ì I“ì“@­-¹ÿ¯½½»ý¬° ]‘ÿ d¥xƒŠ G› J¨”¯I¯w«ãª¸§¬Ь£8Ÿ¡W£¼§P©“ªŒª›®Z±n¶B´Rª$¥ ª>œÿP‡Ý}b… ‡ ¸—ÿ=”ÿ¶ýŠÑr–P’d“¥ .œ!Š!‡¬¬N¤€•ׂ »l]xj–\ Éš¿“&\”Ë›=™ž–¾¥‹ J‰Á‹þÚ‹ô¤‰ðd‡ð„‡ñR…ñè…ñ<{ðÓaç“OæÑOê—KíÚGíYJîJNò¢OõMòELð5Kñ—KóiMïžPítXîÀaÿñê\îÐVè•UçÑVæUåèWå)WçTçQVé=UëQSêZRéGSêÊTê©Sè,RæâTåSæRçeQêPï¹KÿõûDôž>ñÆ?ïÖEñ£FñHñ#Jð]MólO÷ LôôLïIðEMðÎMðPóYNô‡Põ:Sÿõ¡[þõ`WþõVÿô#VñŽ\ïé[íJYìXì8Vê6RèúUègWé8Vç‚VåïVæßVéXéÕVéXéWèxVç¥WæpV â|V ããVänWä.VæªVèlUçœVåÔVå8Uæ VéâVè¬VærVæ@Vç˜VçWVæÿVæ¡WæsVæaTå“Vå¨VäUäÃXå Væ™YéWêÙZî4Zþò\Vüôjýuoû ä„þ¬œþ5£4 MÚ±Ÿɤu§{©g©ö©1§"ͦ!·«_¨:¡¥’”¢ç¯³a±Û¶}¸*ªXŸÿ ç˜ÿ‡•ýã”a :²d·1³g¦8žä£K§ $ #˜šÄ£¡¦[ª®÷°¼´¸I½Z½§ºƒ¶z´‹¸‚îcAïØEñƒGñGïáJï°Mï”LïTKñÄLôYMó5LòìLðÖKíÃLñLôéMôOOô¬MòIMóØQüö>OüöXóê]ð¹YêµVé¢UëTëîR çÀR åØT åºV æÄUç™WèÅUè^TçmQæXVæVæ³Wç$TåÅVæÏXçWæ¼UåÙYæXæ2XæVåŽVå]Vå©UäGVåWäµWåíUå‹UæâWç"Væ$VçÐWæWæXXçXVåUèAVévWç¼Vä9V âxVá¿YãCWå)Wæ¹Tå±WæÞVçºWç,VçÇVèûVç/VçMðGMò}MòÿNñOî3Pì2Pð¬R÷PñOí|Sì—Xë0XéXè¦Xé„YëSVë9UëcVìAVë!SêÓTëŽSî_Sð-SíÕTèþTæSåˆRèOí­Gñk=ëŽCìLEî~FñâKõNõkNô¥Pö“NôMï=Mí7MñhLó§LôŒMöNöÚLòïKïmLì7Lï‘OôwPøDOþùÂQôNTðÁ\î„^ðGZï%Wë4TçÃVæ¦VçGSè©VèŒWçvcê8ñ5uðƒRéªOæjSäóUäÜVæºWæ~Wç#VççVæÿVä=W âIZ ãáXåWçœWèÒWçaYæVæZXç2WçWYèNYç.UæJVé Vé˜Wæ@V ãÙV âäX â Wã!Vå¹WèHWîâ\û÷tXý÷•WþõrYþö4NòJì LìâOì¯OìXUíXì2Vé©Vé¸UèxVçëYé9Vé–VéÏXé?UêŒVêKVé¯Wê'Zë]XíxZðÃWíVìžXî^Vë¬[évVì XíòUëžVí²Uî×Rë9UçÿVêVï1\ÿñ.Uî Tÿðó[úù1_ùýDRýù KôIó¶Lñ†Lì Kí?NñŽJïqLîÅLñ´JïlJñ´Iÿô¼PüùuMûù2Kýõ{LÿõÕLóµPð~Uê¬Vç„S åUæ²Uæ~UäœW âEV âŽVæ=VêÝYð­WýúTûû¾SûüSUúþûXûû9_ûùèdü÷Ýeûø3bûú·fûû¾bÿ=b# h¥§O¡¹¤8°ªµø¹«¹¶Þ®ùªw²¶³3¬\©^ª xª‘­à­š­m¬"Ù´$ºë»v·—µX³™¬†©•¯7²®z­ Û«£¡Ú¡Žˆ˜ÿƒŸþ$ ÿm¢›†Ÿ¨L²o¸Þ½-½Ý¿æ¹ãžX™ÚYsy ˆ!á“ ¢ ­¤5© ª;²f²«›¤3ž¸ЕðŽÚŽ>—4š}ž ’´ˆë•ýB—ù$Å~ÿ¾ @Ž;Œ÷ÊŠòàˆðj†ï'‰ñÿõÛˆýùšmòÖQ èCP ãÒN ç0Kí°Lï\Nñ±MñxLðõMòzMóAOí‘QèQì±Pò–Nñ{QîDUëIWèWçgWè\XèèZêWê*UëãSëÖTê¯TêìSê®SìqSíMTëµRèTè©Sè Qé˜LìyGípBëÃDí6EðˆDð]JóCMó@Nò-Mó1Lò;LñÁLïïLòîKõÐLóÑKòÞMóMñgLñáKðÚMòËO÷ýSÿúVOþùèSôÎUòŽXï[\îXíFWëlTè“UèPUéeTëîWëGZë‰aêÒ|ðCtñ©Rë/MèSæ±Tå‰UäuUåÝVæU åFW æT å¢U ãRV â”VämWæVç¼VçXWæšVåWåUå«W æIUåðU ã.UæµVçŠWæÄVäçVä©WäWä»Yå+Væ‹XëaXÿòwXýö5Wý÷]Výø Sô Lï€KëQìNë»QìµSêÎVé™Wë‘Wé¼Vè Yê€WéUèVWéŒWë9WíáWìÊVêçWêƒWíVXñËWïÈVíÊXíZìWëðVëÏWì×VíÐUðpWð#Sí£UëÖWíXÿð.Wï Uî7Rýó*Vûû VþùmPÿöcMó)KóTKôÂKïKï Pï-JîbNñäLñþJð”Mó1LÿôÿQüø=Mý÷¶Lÿõ†MÿõNó+QíWê Wé2V åS äUä£V ãV â”Vã$Væ›Wé›WðÈWþ÷dTýúQQüúÆVûý"Xüú`úú»cûøÖgûøÜcûù¶eüû.fýÿ°`V{ž¥N¡¤A³9¸عɻԺá²ú¬<®B¯á®1ª§Ϩe©“¨þ©ë©Œ« ­ºR¸©µ4¶ ´Ü®u°¸¶&²Ü­}©£r‘ÅŽ>™íœâ–!X•ö•w˜?¡|­J¶ ¹³ ô´ž®µ›³—Ì„v G;‹ˆ“Ê!†¨éo§‚«y¯Ê«–«€«!§¥„¢4• ‘`šýœUšÙž-¥6©] *‰sqìi`y'‰ L¤÷Šò‡ðª‰ñ\ŠòçþõU†ýø,fðM èæN ææIìrKócMòNð«Nï¤Nï»Mò4Kô!QïmSëšSëŽPíMìÆPíSì+TèhUæŒWæXçÌZè¤WééSéÊQéSéûSèRé:Sê¯Së TëòSêºTêÈRéØRêeMì/Cí©Bî›EñÞEñHò8Jñ`Oñ=MðMðÍKòrLó4Kó£LòiKñÿMñKðåMî Mï®MñÅMñ’NòaQõ}Vÿ÷TWþøÒWÿöXñM\î“XìEVëUêrVé‘VçUèþUì¸Wì[êtcíqzò¢qò¶RîÄOê]TçŒVçšVåDVå›VåßUæYVçVç*Wæ‘W äGTã÷VäUä[Wä*Vå™Wå)W ãœW â‹W ãfV ã­W ãVå Tå¬WåVäVä“Vä`Vã6UãVä–Xê©Vð©Vý÷ŒVúûyXüø_SýùËQÿø LðˆLì]Pî%QíGRëPUêËVëHWéBVèœYê(XéEWéXê£Zí8Yò`Wñ€UëÜWëGWï"XíæVêœVé¾VêòVë:VêFWìVëVïTÿñÖVðÙUðHXï‹XïJVï¬Vï˜Tî·RýóSü÷1Qô8IðÅMñPìMì­LòPö]QñPîºQðnOòIPóÌRõVò™VíßTìPí`QíRï‰VîWê!WçYç2Xè3Yé&Wé&TëÑSë±Té\TèESêèSênRëRêÏSëêRê·Së½PîëHïÊBï‘AïCòÂFó2Kõ Nö“Nô¹LðšIïyJñ!Mó9Mò*LïNî¤Pð0MïWNíFNð4Nð%NðôRòxXõ’]þõ«[ÿõWô$XóZîg^î_WìÂVëøVéHUæªVçWëäZñ=\ýô`aÿñ\î÷WíßRí‚Ré2TæõVæçUæˆT åâVæ)Væ VçiWç¼Væ†XæÒVåWå*UäÙU ãˆVäsVæWåW áJV áVäòV âåV ãVåºUäÇXå`UäâW äQV ãÚW áîUåýUæVì!VýõzZûù Xýõ/Yý÷¨Uÿô`Oï Pï‡Sð¿PñÃRì¤TìøWêVæ§XæMXêJXé?WëXêŽYì \þóõYðóWêŽWì•WðVìpUç‡SçÀVé‘XìxVëÑVèTVëNSðrSÿð£TÿîûVïÛUîÃWî#VïPUïHTïFQýòéQÿòêLïzLî1LðÍLñDOñ LðpKî„KíìLðÍLöÉLö@LõÇLõsLóMôJIóÕLþõˆOþõxOñÆSéöTæ·Uè=Tè›UçUæ UæåUæœVæ¾VéYVïtXüùVûû©TüúôSüûÝVüûš\úüæ\ûûÖ`ûúÍfùûjdúúËdûú‡hýÿdvd—[¤ú¥/™÷—¬ª¶»dµF²¨{©ʪh¨¼§)§ä¤¤Ô¦k§ §í¨•¨ô­á²}¶ž²F·9¹c¸D²°‚®)©"¦³¨˜Dð˜Wœ —ðxLˆ’Ħ¢²†® D¦£¡¹¦+˜Þ’©ŠAÙŒô¤ ³b¯¶«7©ë¨/§§ £™D›ú¬S·…³CªÉ¢x”ކ¯õ“ég¨—­y¨óŸ3— «”ÿ p‘êûŽôJ‹òˉòô•ö“ÿöÊ~òA[í¢QïcOðLõ¹P÷¹UòTîUTð+SòXQòSPòÀTïTíxQì8Qí PîæQîÜRì²TélXç¤WåcXæÖYê%Uì¨Tí•RëÿSéëSè´Rè×RéïRêœQê•Rë’RëYRë OïúIñ&BðçAïtFò*Hò‡Mÿõ€Qþ÷›OöJMôÈLòÂMòEMóÊIð LïŸNñ6NñaNð3Mð»Nñ\Oñ–QÿòETó YóSZòÂYò’Tð”TñÿZñ8_ð9Xë¥Xê Vé€UåúT ä¾Xé€_íÂeþï¨gÿí=_í%Sì9QèèRåøVä.WæVæ†Væ§UçÀSæiVæSVçRVç Vå>VåŸVæèV ã^T áìVã|VæÅXçÃVäxWã&Yæ|VäUäˆUåºUå¦UåkVå(Uã¦X â6V àõV â«Wç(UéuWÿòVüö2VÿóBWþô%Xýõ·Tò4Nî¢RïûTï›Rë²Tì»VêÓYçVçZè WèXëZì*Xì$WïºXì\VéûWìBXï,XìWëVéÁYêWí9Vë·VêàTì2VïSîçTírTíJTìuVî2Wð!SþðýTÿð!Pýñ/NñNñËKðóMñ¾Kð›LîLî JîKî/Lð¯MöMÿö3Nô&Nó#NóQþõiKþóçNþôaMýóïPìíSæVæ«TèëUèWè®TæÝUæVç:XéVêKUñÖWûü6Túü¼QüùºQþúÃRýû—Züû[üû^ûù¶aûùÈcúù{dûúDfüÿ•iý%vÿk™•¦å¦w—AŒª™¥Jª Ì­d¬‘§g¨-©b¨l¦¥¦£E û¥v§®¦­¦K£—¥«?±دÖµþÓ½þ¦¿m±M°g²@¦Ñ£W¦œ€•VžØ Û¢Œ¡dœ©‚÷¡oª‘®"¢k™¹¢X•Œ‰n…,}í“N´š½¶³®­‘«H¨¸§`¤pž™¤w°}µ§¶e±š¤b¨—•_Ž9ˆ +Ÿo­®Ó©~žГ Ô‹¨÷†Šòü‰ñ ‹ò;Žôð—ö`’ÿõßsñõVîÒMðRLò€Ió KòoPñêWðâWïPQîOñPñƒQîtSìENì×Mì‡OícRìËUéÞWç}WæzWåûUæóUé©UìvSíãSéîTçuTçRè£Pè½PêýQëDRë¥SìÙQëÖMï›Fòù>ðZ?î%HïôPîçRñlQóOõ/M÷ÛOó=LókLò9LñMò}NöúQôçNñÙOñMQöUöPUþõtVÿôâZò%[ñfYò¬XóHYòðZðäZîzWëtXéXçSW äKV ä%[èuñs‰óy‰ñ´cë=QêŒR åJR âËTäfWçVçHWçRVçÌUæ½UæVçœXèWæ UåçTç’T äñV â©Vâ¿UåéXæÇVæóWæWç¸Wæ®XågWæ°UçPVçsWæVäßUãCV âÄVäWçXVéªUîVUýõãTþôEVÿó‹\üö±Tñ~OíRíÁRìéQêëUé.WêWêãYêÏWèßXæWê«WíYí±Uë‚XëdXêúXìXícXëWé|Vé²WêºVí€Vë…UêrUëWîäSí±RìùSí Tî`VïXþñ/Vþñ9RýñQNüõ¨LõFNóDKñ½Mñ\Kï4LîkKïRLï2KïÄLñ)Oô¹Oó6JñHð§OÿôQý÷CMýõ[NþóOÿð6RèSãßTåÙUç?UçUçñUægUæºTæ½WéŠVìSUóõVýú–Sûû¬Rüù¶Pýú§Oüû ]ûù4cúú`úúz^üøÙ`ü÷dgûùYeûý½aüü/süy‰Ÿ¢£ášï„­ˆg“r h¥m¨›§¨©Ÿª£¨¯¥Z¤ú¦$¤í¥l¥!)›!ƒœ;ý¢n¦<©‹§ ª¾°µÿ ¨«­N¬g£Dž¥V¤§ŸÌŸ‹¢z§²¬ ¬ýž:“A„£Ȫ^ž8‹-”kxlu”9ž+¹è¹¬°b«Ü­!à­!£©0©´§ê§‡­¸µ¼¸ï¸U²ʪ  ¢Ò›C’YŠúƒ`†¥˜ɤ¿¬â¨ÿšÙ‹ ÿ„ûA‰óƇð ‡ðŠŠòhõ2™÷VŽôeëýO é?J ë×Kî^JðÐJî`Mî;Qð£Pð¡KïAOñ!PòPïOï°Oð¾OîsQì”RêòVè;Wç»VåOVæÄVécTë-SìzTìfTéâQåÃTçUê„RêÄRìÄQíµRì†QêQèzKí›@ï¶Að¤Fî Kê:Që6Qï}NñþMóñMóÌLñmKðBLðMð¥OñmRõ`VÿözSþóg °` d €oH… 㕚zœÒ¢5ŸÀ–€\’BŸ„¨Nª“¡9 ?¦¯§­·¢s”ï›o¦E£B—\’q¢¤«Þ¯À® ¢o– %S•#\¨Š«†§¥"±¤#|¤"*§ ¡¦n¥ô£·›"Ž\ŠÏ„ Ê…w™ ɪ ®¨  מO–¾ŒøéˆñɉñÇŠôµ‘ùJ“ÿú_‚ñÃmê•Oæ6Jî‘IðýMôÁLô€OíÄQéTéXì Uí0Vì/UíQUîTîeUîœUîSìŸRêíUé¥Xëà\í8Xê´TçoUé'Uì-TìUëŽWì®TëPêkSì QíÃOïßNô.Fõ‹Añ·>ðç@ñ>í_CìIíYLòtIïVEïÁGð*LïRNîLð‘MðKï…NïQð­Yñédýó^ÿò[òc\ÿô_ü÷2`üö§`þóZ\ðß]ÿó¦ZñGYóÙYÿõa[þ÷ñZÿõcZï¦XëUê¢Sê²VéVéaXëS êS çTæUæVæ UåtV äVå]Vå¡YçqVå$WæÅVæVXæ‡Wå¸WäW ä‘V ã)XæYê,Xè®Xç Wç UèVæAVã¬V âúV ã VäÖXçÈVå¸V ãgU ã‡WåDWæeTçÓVèCSè¬VìÝZÿñ/TÿñpWîzTîeRî|RìqSêžTéUé¦UéÈWéZVê6WêÖWêTXêgUèfXèaXé‚WíXï;Xí˜Yîp]ð®ZïMWí‰Wê„Yé1Xë]UíUìñSì€TïbSýðfTüóÏUüô/Rýò1SþóóPý÷Nÿõ~KóøLòýMñ”Lñ¢KïõKðTMòÚKñLïíJìÑJíÔLòJòÖLð¬HñIóÐLòKðOêïUè½RåT ãTåÙTç—TèSUéhVéiVè•WêSèzUì7WòETÿõbRô—Lò£Nñ±MïGLï7KòEPòINò"Uô,_þ÷óbýø»düùneùú¬f÷ýÞfþþˆyC™ÿ §ÿ à–ÿ×i9oì“¶¢©Áª˜¤sf yœPÛƒ½†.ÿ!¸›ò£†¤²§–ouLZÞ^ 6f {žŽâ—\œµ£o¦2šH•ã–xwªj«í¤¥*­.°Û¯Aª3¤†¨QÈx³{Už¨¡ý©Y±ð¯¤X•vŠîŽ&Ÿˆ¬=ª=¦× ͘£˜R Ü¥ü¤¼ž”]|³‹ Ü“þl– Κ©œä ~” ‹òŒð_ŠòŒö“þû·“ÿýCò[å¶Mé„LðiKðNð2PíPéëRèITé»VìËVîYXìjWëëVíÚUíãTí¨Wí˜Wì9Wê WèoYéEZêXê¹Uç§Sç‘SêÐTí Uì¥VêqTé±RëPë/Qí˜QïMñ¸BóÁ@ó^Cô>òP@ðWBï·EðaHñ¸EðåGòrGòeKñýNñ`LñžMñvMðúMð(QñUñ][ÿô+_ýöÚ\ÿóÉZòšYñÿZò‘YòÄWÿóæXþö¹VÿõÆWñµYðžYò’VÿôýWòØVí°UêcUèžVçvTæŒSæìRæ¦Uå­T ãBU ã•Vå VåAV ãbW ägVæÜXå~V ãUå´Wè“Wè…VåVåäWåW äBWæÒVæÍTä³WäFWæÅWç–VåÞV âÍV ãÑV ãEWäaWäNW ã V à,W áŸV ãšWå)WçVèfUéTVì Xÿñ|VÿòÊWðÒUïPPì*NéZSêkSéÔPè VéÚVèöXêWëÁWêÝWéOTæÿWæžVèWìVëXé¾Zíá_ð„[ï YíŠWéåUè7WìˆUï¨Tí•Së>SîˆTýñTûôÆSûö»OüõISþõ¿Oþ÷LòFLñ¤IñLóðMò%Pô Mö†MöÖIñYKî£MòKðJôùJò\HñGô½HÿôôFïKEëOéÃSëEõHõ*FðSHìqSéRëÎSîRîÓTîSéæUæÜVæUç Wé0UéêUëXTî·Tò RôÏNöÁMñöLï9LîÝNîLîüOïŽQð.NîœQðWÿ÷J`üø¦eùûàhùüOcûý@fü û ‹ ûiªþ’¥Ô “þ å‘ý1’ÿ§§U¥Ÿœà›ÿCœÿ ›ÿÅ–›‘1‘‡“!à™»£§§˜ }€l^ [n G~¡™oœ?œ@§ѯĩҙÿ”J‹—‹—d ¤¦âªMª4­¹­°°w³[³¾«è§©œ®£­¾«c­$± ­² !« ý¨½««¼¦Þ¢ç›¢••šš¦ç«†¨£:¢k¥R¨†§øš¶“L›{ž §”üóЋñÇ‹ô=’ú—þÿ4‹ÿ€kó¶V æ„Mê“KôKò¦PîÜUëôU å7T åTë9SîÌUîUYîœ^ï®^ðìZïÉ[î±\í½]î"\îãYëŽXèSUäïR äðS å…Uç„TédTì˜SíÉQìÙRëRíoQðPïHLðgEðæ?ñBòŸAñý>ï?ðÚCñ÷Gó¤Hó²GòqHócJóQè¨R ä‰S å TêþWîfWï5\ÿñ`^ÿñŽ^ÿò2^ðÃ\ñ\ði[ð\ñü`ð@XépTæŸSä$Uä/TçTé!TìITíDSë¶QëÐQí5PòüOñHòÈBðš?ïOGó#Hò­CðÄAðUBï/Eñ½HðàGñ]JôaIó¢JïPLîfMórLôÄMóMóoMöüPö¼Só¢Yÿòº_üô\\ýóÞZðÌ[ð^þò’_þò\þò¿]ýô´]ýó?ZðÿXïóYðÓYñYî4XëJVæNT ã÷VåUçˆVçVæ9Vå(Uä¯Uæ~XêˆUé¨Vä V âQU äÅVæåWå=V äÁVåšXæ4W å“U äŠWå¬VäVãLVäVç°Wç«Vç£Væ÷UåÆWåZæGXå*Y ã«W âåU ãøU ãˆW ä’X åÙV äÉX ãÚUçêVê±UïCUòZþõZZÿñ5Xì&TëÝRê²UìŠTí•WêXê*WëíXìãVì`Wê”Xê>Ué·Xê€WëaXíLYíäUëŒXëBWëUìVëžUêWí2Xÿð&WÿòVþó"Wþò[TþñúRÿñ¸Tÿó¶Nÿô€Oÿô>KôÿLðÔLíÚLìxKïQKó±JòLô Kö8Kô Bî}Bò°?ôAóCñóFóêEóDð,FñüIîXMç;Q å—UèÌSëÝTëGSê²TçÚTèéUè|Tæ¶Qæ‡Uë;VñXVÿô–RÿöÎQõ¸Oò NðüNïOî¾OìËPíOîOðHQóSÿ÷ÇbúûóeúûoeüúDdùÌgûÀvö§•úç©þ“ªLª®ÿ{¦ÿu›ÿåŽážè§í£÷þ±—ÿ–ד]“:”¬—¾˜z—ý¡ê©¼¢‘“„w[^ ¡uBŒ ™ÿl¤‹­»®p³PªN“!—è—á‹:“À›‘§@­,§†¡Ÿ ФÁ¡bš­£j­=±,±r±’´“µmµM³±¶´¦Û¤ ^£¾–‡˜›¥ø©|¢™¾ €¬x«—¥« B™§ ºŒþ“ö¹‰ñû‰óˆŽ÷Дÿúþ[”÷p÷MU é NêŸKðýMî›Mé‘PædS ä¡SåpTêøWî˜ZñZ`üõ!`ýõQZò[ó‘Zóº\òR^þôÈ_þó!^ï8Xé.TèàSå¢Sä¸Sç Sé:TëåTìARëçRí0Pï«MòáMôJEóâAïBïEò¥FògGóöCó[@ð'EðHí_HðøIókIó_Kñ KîÆMñDJóŒLòÏMò*NñŒJñ”Rò"Wñ¢[þô(]üõä[þó+[ÿòE\þñ3]þñ¸]þóÀ\þó)[ÿòŸ[òkZñ=Zò¬[ò%ZïÝXëuVæ€U ã|WæûUç¬Væ—Wæ®Xç¸TäÇVåVçÙWæžWäCV âÝW äFVæìXå_Wä%WåWä$W áVU ãÉWçWçhWägVæWé0Uç"Uå“Xå=UåŒVåòYæVåÏV ã¢U áçV ã>VåºVæ;WæUå!Væ¬Uç}UéêUðÈUÿó¯Zþò¿WîOVë¶Uì`UìØVìrWìYìÉXìƒZíçXìnTë)Xë!Wë†Wê Wë¸Yí]XìRYë‘Uë2Wë®Wê¡WéyVéUê\Vî Vÿñ[TþñôUþò±Uýñ>TþñûRÿòÑSóPô Nô*KòÚNíJèïLêKñ`LôKJó±LôLõKIó…@îª>îÀ:ïÈ>ðíDðŒAîgFñäEñíGñfIíJMèOçÑSçÑTèOUêÃTéeTé‰VéUçUæ'Vê!TîàUð>Tð&Rò*PôâOñ«NîBMëOì"PëbPìvOîÃOïâSòúXóBbü÷„eûøÜeüø}gþúUkýü•sôcú ù¥ÿ ¨p§s®?¯­¡äQ–U¤0¥dŸ˜€ û‰Ž[•$˜I™–L˜e†šN—ÿɇ?kýr+‰ Ašà§é´H±(²³¬:’å‰ó •¡˜²›Z£¹­¥ОÇœI¡4 ’˜°£k¨ ­á«ß°µ´4´Ü´_° ²9°‘§¢ž7”Õi€¶Ž1 U©¨«µ¤ ›«¡÷­£ª››l—Zš/á‡ø]‹òœŠðˆñêŽõè•ÿöF”ø… øj ö•TíÂLîÑMò)Lî,LéÅQè£SåËUäþWé2Zî³\òÔ^ýö5Xþ÷±XöÛY÷‰Xÿ÷jWôÂ[þôŸ^üõ9VîÜVélTæUTæ¡SææTèªTé‡Së­SëyRìÈQí3MñJôìFòû?îF@îÓEòFö»F÷ÛGöžDóÒ;ïÍ@ïWFñDGñIò™Jò®IñÜKðËOñnNô OôûLñ¬LïSOòQòVô‹[ÿõÅ^üö…\üõ=\ýôºZÿñ…[þñî_üô´_üô¾ZòÉYñ›ZòÂZÿóñ_þó ]ðWXìÉVç¾Uæ)Wç´Wç«WæWåkVå³VäUä§UärVãŸVä÷VåSårVåáVäøWãdWäVäÍW ã UäÞWè Vç8VåVæFUè¯VçåVåtVäØVäšU ãU ä“VæIW ãW â@V ãoXåmXç˜Wè Vç•WçVçœUê)TðiUñòVí×YëVêÜUëRìÈVìVìùZí-Yí–XìœWëÊVè¿VçèWè#WêÆXì­XîVWëäVêWí£ZïmXëUè•UæeVç Uë-UííVÿï1TþðåSþðÃTþòcSýöaPþöYMó‹KòMñgJì¡L çãKèsKïÊLôIóŸJóHó¸Dñú<ï9<í†;íÙAðõFò,@îžAî‹EñÐKï¯LëNê'QêUç,Vç_UèVèUéÀWèeUç|UèMWì!Sð¦QñŠRð¶Pï‡PóLðšPìPëØPëSOëçOîÑOðPï€SïPZð hýö cüô¾dýôýjûû’“ ”&š%>§U¬z¬ˆ¯3®Õ­@­Æ®ž¬Ò¦p• ‡[‡G€íŒ„£'ª½¨1¢íŸ@¤-­V«* Ïœ Œ’_…ó¨‰ðÀ‰ðK‰ñ‚‘ôd“óˆò@v÷·\ ôORñ‚KòOôPOïïN;ïŠBñ1FòÙGðbHîqIïJð©KðdKñÚMñ?LñMò¶OóWOõpSõWôÞ_þö[_ýöß_þô[ÿòâ[ÿòk]þô°[ÿò·ZñZòJ\ÿó×\ÿòÏZð°ZíVXì¼Wè^UæÒU å‚V äÂV ãW ã’Y ã#T â²W ãUäðV ãBTäàVå…VåaV ãÙW á/Y âdýó=hýøeýˆhûÿcŽý;¨@¬à¦@©ñ°­#Ÿa—ÿСÿÛ¦ÿê£þ³œÿœ‘<“þB—WŸ=Ÿ¡»Ÿàœdšÿú–y‹Éæ }z ÑvÀ‡N"·Ó¹³\³Ÿw‡‰ šN¨ ŸŽOŸ–Ö™€›Bžÿ<H“€“UŒ%Œ'y ®„®  «A©ت°[«(¬Ù¬d›’‡»„ …N”%©ƒ®©§ŸšУÒ¤£¡ß¡  •؉ó•…ï’‡ðõŽôê•þ÷”ýöóæ_ ïíL ïµKï)Hð=Nï]PíÊRë"SçqT äAVæ¶YëiXîÁYó}WöUô½RôaPöÀOÿøÃLý÷öOýøõPþùÕMþöáTì'TçSèËUêTê}RêéRíxOîÃNíÙDïÁAòô=òúBóåEô™IóMGóÀLýjhpzþ>xúëGô*:ïAñ\GóÉIñ;GîcE íKîeLî®Mï+MñSLôÃNötMô»LóúMõµQóVóa_ÿõL_ýõ»`ýôè[ÿòwZò}WñËWðçYòYñ?Xï«[ñCWïxVëÒSæU ãìV ãoV ãäV ãQTã¾Xä½VæÚWåËVåµVåxUäÛVäÝVäâX â®V áV âW äªVåRWåÝWäYä®WåwWçÉVæõVäVä¢VæÉWæmVæõXçâVåUåõYæ8VädVåWæ Uå±U åHVèpWéXé,UéëVì-WïšXí×XéDTêÛTê_Uê=XêªXë”YíáYíuXíðÛAïnEñŸ>ïØ=ìDïKêMè—NìûQîQéÿRçTèbSç6Uæ¸U ãKTæsUéNSíqRòÑRñXRíâOðNõiMñmOíOOíPîÛNí‘MðÉPð~Pí¦Vë|`î™_þòk`ýôéoüõ{xþúëmûMcýû{Œý Þ­uµÛ¬Ø©(­ðX¨Þ£Ö¦ ªÿq§ÿ ¦ÿnžÿƒ ¦Ǥ¨ž…—ÿ³ ¡»’±€ µ~ 9sÁ”5  ܯ&¦g«¬}žœ Ê£Ÿ°·§E’‡‹BŽ4ŽÏ’9–¢•#•œÿ•ÿmT¡°™­ §-Ÿ8œG¤ש i­ÿ )­ÿ Â¥ _–s‡fƒÈ–¸®®•¡|—áö•¹· Ÿp žšþlŒõ†ð`‰ðô«˜ý÷¤’üõËyð)X ëÕK íAIîøJí•L êèRëiSíðUê9Uæ?VèâWëÛVîûWóWUÿõiTó SÿöDRýûSüüaRüúPýùLýø;MÿõSíiUè Uç|SêÒTê¿RêQð«KõíBðó<î²<ñK>óé@ò2FóÄJõäLøÌ_ž‰.˜ ¾ìJúb7ñ0?ò¼Eô¡HôÒJôGòÉHïéKìÕMîLðŽLóéMõÔOóEMòoLõMõ RñsZñ¿]þô¤_ýôšYÿò=WòŽXñùYï#XìîWëoWîŽUñðUê·TéˆT ä\U ã9R äÜVæïXè´VêWê€XêËYêÀUçèUåºTä¨WäVä¢V ãV â_Vä™WäkU ãÖR ãÈVäuWå:VåzWå%Xæ(WæWæÒVæŠXéÑUìÀVë5VéVè‡Wæ:WåqVælXæ¾VäRVã¶WæEXè"VéÁUìVï[XòËYÿó–WðÜTíNSë:WèWèúXìÚXîöXíÐXì…WëOXìßYï…Vì4Vê¢VëbXìµWì XìXìKWì¿Xî3Vï‘Uï¼VîUëò¬>òJ?ð AðÀAïBï9GñmKêÀOç.Oì«Qð8PîèVëÜUêpTèšUå3UæˆUè­VëSìŽRîæSî'RíVNïNòfNðŒNîOî*OîAOîaOðXPî¦QëbVê…\í-\ÿó˜_ýõ#oüöuýú[püþŠbýûF„þyª(¹?°½«®ð¯Ç«¨x©€¬•¯¯ݬ¨§Ϋø¦ ›–¿™EŸ¥šð'¾…ãxò€€‡ )Š ïš î˜–F®Ò­æ¬°Ž´°®¡ƒ”cmˆ ˆŠŠ­Š9ˆsÿ öŽÿ$|Ž4žIª\°:ª œŽa•9Ÿ 捻ɧ©¢ÿSš•æþÚ¯¬š}Ž‰ë”¤ §£Þ ºž v8”øÄ†ñ<…ïŠñÝ’ôÇšþöæ”þôptë´U êÀMï¦MñÙNïêQéGVéAWì¨Vê@VçÑXè1WëeVî¿SñSô«SõXSÿ÷ Tüü³Uûþ@Rûû­PýúŠKþ÷NñÎSìÖVèpUæ£Ué‹Sì!QîõLóXAöj?ó;ñ=òiEõÊFôûH óOPöÏmÿüP€ Ö ÿ»¤0† kNþÇ7ñ3?ðåFóÞGõâJõNIõ Jð6LëtMìÅNïoIò*Mõ5Mõ^MòžLóKô§Nó Wó”[þõ4ZþôÜXÿóWóXñ{XîXê Wé¦VëÇWì$TêjUçÎUåcTæTçÆUèÙWê¾WíòÚBð«@îpAï:Cï>Eïôò9ó<óˆ?ïa>íéAï3=ëöEí¹QíYQékOêRPìFQë;Sç(Væ5UèÄUé]UíWñ0Yð+UïSï8Rï÷Rñ§Pñ Nï€OîDPí&PíPðPPò PïTì\WêzYèFXëYñÇYüùkcúûŒgùÿ/kû¡qýô{Ÿ[¹[´é®n®U¯Ù¯.¬ç²l¬þª­'²¨¶µ ´ø«öš‘ÌË—m›ì˜c H¦Ç¥ šW»‚ m ¥y(’圮ˆ¶ȸM¹VºZº™· ±¦§œLž«™…–sxñ|ñ~H|F‚æ|¤,´]¶E¥É‘'ˆ‡#LŠx‘¨Ÿe©á£ D–Q—é—1mƒtƒ…OÏšŒ¤w¨/¥a—ЊúFƒñ/‡ðüô_—þù“üø¶„ñ mì³T ëåKì8MëOëþSêÎVç—Væ«Xè²XéZë¬\ð¹dþõPaýöNUöËOöQÿ÷`SþúQOýû§Nýû*Rþú@SýøâWþôñVðŠVí!Të¥SíRï5Lñ^DöÀ;öØB÷;Eõ5GõGøK[?‡ý°‰ø ŽúÔ“þ § _› À} iPø:ïF@ò©Eò6Kõ_HôIIô=KôKòñNñÚOó™NõKLôÛMñ;LïàMïŠMñvNòRóøXÿô\[ýöÁXÿó Xñ–WÿñµWð9XïwYð Wî Wë©SèýUçúVæEVç¦VèsWçaWè€VèVèÓUævVåŸVä=UåøVåVäwU ã°T áëV âœVã²VäQTã^V äÖW äxV ãÕT ãZU ãfVå”VæÊU äØW â V ãWæ_UéWèÓWçWTåÒWäBVå×WæOWå"VåWææVé¡VïVÿôUüõ.Vþð Xÿï$[ðXîXì Vè\T å‡Xç’Uè&XênVêéVëÖ]þð>Xí4XéŠSæðUç“VéåXé¯Wê£Vë WìõTëÏUì‰Ví˜UìVécVê-XÿòBWûù Tûû€Tûû1Mò$LíÇNñ^KóÒIñáNðAQñžNñRLñØLõ‹N÷¸Kõ­KõÀ?ðë9ð«:ô?õe=ï¦@ðP>îá@ìbFé.KêëOíŠQî%SïcRì½Tè¶VçyUêiUêƒWïhXÿó­Wò Sð¦TðWñæSðzPî4OìyOìjOìPíœQîwQî©PêCVê’VçbVåÅXèXïúYþóû`ü÷êgúÿPiúçoø!|ü 盵ñ¶*±"­€­}­˜¬¡­ª#© ª­š¯óµ8¶X³¢’à“¿—‘šÞ˜èžq¦rœЗŒ’†"yqþà–¢«Þ¶·¿·æ·ï¸Æ´Û¶­†¡NŸœ%œM{®x}7xPy¨‡Ú›I³µ½ש>!˜!„÷‹ð’v™#” Õ‹ŒO‹Å„à|z:ƒ·‘I—6™ížÿ-ÿ ª•$‰ú(ñò‰ñõÀ–ýù]–ýûŒƒÿôo^èYJ ëþHì:LéÕOè­TètVå®V åŠXèZëZïÉ^ðÏlólô\YóOÿõîOÿöFNþùäMþûNþú[Sýú!Wüù­Xýö°SñüQï€SìSê¿PîOHðÔ?ò;óD÷”FõÎHó^^Š}_—þ v”û É‘ü k™ ÷¡ Ù u€ ºLöL7í >ð¹Eò¼JôIòFñ\Iñ®KîôJíZMîLð–KðMïäMí~JïxMò¥Nò×SðoXòË\ýõ,Xÿó×WÿóÀXÿóàXñ{Yð:Wï€Wí VêÒTæºU ã/UåªXæ=VæjVæDVæ®VæþWåVäŸWäVäNVäVäUä?X ãS áþXä”TãŽVåüVç©TçÑU äüU â‹V â7V äÓVå½Væ¡VäVäXæˆVäÏWä7VåÌXæWærWãÅVãUWæVç§XçóTæcVéæTî˜SñÑVþñ‡UþïYZþðÔ\ÿðXë$WéoWéiXçÄWæ›Vè²VènXèbWìÁYí÷XésVæUç0XêXëSYìœXìVëßXí™VìáUë‚Wí`VìuUì"UéœVÿðXûø^Uûù×TüúMó¢HîƒMñIóMMóÇMòSñ’OñÂMñ\NôNöOõNKóìFñV9ï<òb?òB?ñX?ðú?ïmAîòDê¬LêQîèOísOð…Që¥Sê1Tæ–Tæ:TéõUï$XÿôŽWþôïTñ€TïkUîSî~Oí×OíÌLë)Oë”QìÒPíòLérQé…ZéWåóVå Wê¨WîÖZñˆbýôiûú­hüû¯qûüo|þ•—ÿ‹µжð±"­«ȪÏ©¬ªLª@©ç¦Þ¦¢¨«³³Á¾¦ •D•÷šè›´˜Ÿ™Všx• xŽP’ ‡µvfzc“ÿo®1ºøº?·ã¹:ºz´q³ç¬¾¡”š˜—™{û‡ZUtûv±„Êu™T¡—ÃŽ©ƒ É‚Q‡ºZ“q¦}ö€üƒú„5y¤xþuŒü7–ÿó—y œ• Çœ @•‰ø€ƒñˆòJõÏ—þùÑ•ÿõW|ê§[æýK êKí Pì™SêTçcW ä1X åhYè\ëŠ`íocírrî·zò*oþö Vÿõ*JóRFòIõÏMÿ÷ðQýø-Wüù[üø UÿôÝRñNQïBQïÑOñÑGðÝ=ñÂ@ôåHöIóUXð%ˆ®˜ = ÿ –ü ”ÿ †œ ž ß™ O€ÿ\OùI7ì7?îNIñ¬Lñ·OórKó°Kî5K ëMëõMìMî0LïjLïJîÅMñzNôOó Rñ«[ÿóØ[üöùZýö˜YþõÀYþô/WóÊXðïXî_Të!TèºTä/T ãTûøTýöýKñæMîŸLò¥Lõ‡KõwMóÐOñåNñÏOðeOñJðOóRñÖMñ»:ïà;ð¸?ñ@ð…Bñá@ï1BïpFîXLíÊPê—OêQíSíøVê,UçÈUå…SéëUïUþ÷~Tþõ7Rï Të°Të†QíFKð´Oò NîúOëæQêtPê£R çS æFWè Wæ3VææUêlXîZð^ÿòreýõºgý÷˜düõ¼pþñŒ ÿ¯"¶þ®¸«f©ÿN©ë¨Ø©A¬B«¥›ÿYœŸ<Ÿ2³ ¡J Õ”P›ÿb›þ˜c–¥—•‹ŒÓt— P||È”¶u¿c¶Õ³>·M¸|³ ± ¦hžv›M–]šÿ‚ŒeŒ•„>{~"‰$D!T’‘ò‘.‹‹…‰Šm£ ‡2}¦|€ƒ©ˆø™~ÿö—ÿ l ÿF˜ Û‘¶“F›ÿí›þ}Œó|€íçˆñ“öi™þú˜üúL†ýð?ZèáJ ìÜJïzOí¤Tê Væ3X äRX åZYè‘]é$dìXkì zõuxýüéXÿö{EðGï GðÊJñÍMô=Tþ÷w[üü›]ýúƒXô=QðîPï£LñÑAñ²=òáAó5IöàSöûuù™;  á™ÿÖ–ý •ÿ – Œ› › {òQúS8ï >ðºJòMòáPõZNõ#LïÕI ê6Mì“MíàKíLîdLïÿMñ‰Lñ’Lñ©PñwVòÆ[þò~\ýôS\üöZXýõ¿Xþô¾WòXï Uî°VëUéÙTæªV äŠVäõVåà[åëZåVä—Vä·VäøU âÅVä©WåGUåpVå¤W åU ã¼T ã¦VäfUä(XæWè\Uç¹V ämV ãßVæWæ0Uå(WæâWävXãbTäþVç«VæÄVåüVåqW äÅXã\XãMWå©Væ`Xè«UæÄVè‡RêáSíôQïRí×TìWìºUê)WçbWæXé´[ìYëRXé.Zë[WíjZëÏZé…YêXëô\îŠZïË[ïŒXíVêóTêßWíWí Ví‘Xî6WÿðÛVþñ¢WýôÑ\ùøæVû÷«TüøøOÿõjJð¿KòÄLógMòŠNðçNñæOò\Nñ,KïkPó.PðKWëRîŒ; í 9ïô;ïk@ï®AîÍBïŠBï²KñéNïÔOê+PèËQêSêêTéáVè¿UéyTêüUòƒVþú³Rþ÷îTïCUêÔSêxQëmLî¬LñþOîœPì¶PëPêÁR åÞT ä_WèVèˆWçVéîXì=Zñ^ÿòçbþò=gÿö hÿ÷’mù†ÿ‡¬˜µ­á§Ö¦ÿ¨E©Lª¬—¬/§*šä˜y“¾êš Ž ˆwŠ h’ÿÀ”þ³•p’®”ð™“gˆ•þiL„d‡“ ±v·s«õ®T±i¯«­o­£”œËšɘì—Ž¡§—‹Òƒí„NŽO”[—=“ é’ c‘'ŽVŠ|‰µŠ…ˆ†„ñ€&€,ƒŠ!Šä‘ÿ" þ¡§T þþ é¢1¤ÿ"¥÷^—ó7‡ïˆð˜’ô§šÿû•ú yíäWê Kî5KïˆPë£T æÍX åAYæ¬X ç…\èŽiîÁqð×wñ›ôyûyYýÌP÷'JñHðdJîËHíîJñzM÷ÀTþûÕaüúbgþø˜XôÚOöåGô·<ñk<ò DõÂGõ‹\üèÿ{® Œ¢ Ò” 3”þ ®™ Èš Ù—w’ Ñ|!Iõò9î~DÿóOÿôTNóÂNöRM÷ÁLò“Ií¿MîÏMïLï½LîÚLðÞMóLñÞLï·Pñ3Tò\\ýôj\ýôÄYþõ Xþö‘Wÿó×UñªVð|Vï-VìwXê€Wæ&Vä VãæWæUåVäVåƒUåÖVå¨U â5V ãSVå×XçøVèPVçöXåºV ä„Vä-TäúUç‚XéUåêV âÖVã}UæáVä¦Vä£YçƒVåvWãôVåVçNVç=VåÅV ä—Z äfW âV âWå1VæWUç£VçjVéìSëŸOìQMí‡NìdOëÍUë¼VêWè2WçÀXé¤WëfWëÔWëeXîUXîIXì YìÀ[ì{[í\î|\ïYí:WëYVègUéÅXí¶VídXî WÿñXüõUú÷ZWüõYûö”ZúøÆ[ûûROþùìJóýJñõMð4MïEMðƒNòuOôfOóiP÷~Uö×Wñqó8^ ñßIô¡7ï <î=íYBï¬Cð"EðîHïKNîóOêaQç5SéSè6UçgUéºTêúUíUÿõcUýúôRýùòTñœTëHRçOé½LíËNì7Qí OìÿRíTé+W ä Wå XéðWèqWæàWèXì^ÿóFdú÷¿cüõ9gþõCkúÊnûVȨ¦³u®œ¥…¢ÿf¥Ûª„¨è¬2ªþ§´žã©™*›ý–·†“† JŠþ =‹ý-‰þ)‹‹¶›Ÿª›¨‚•‡ê‹އÖƒ7…ýšf¥r¤Óª6«À£­£z¦Ó¥í¢r ¾›p—©ùœÿ[”ÿ‰Wµ˜^Ÿw›í– ’ ˆ‘Yñˆ߉r‰†… ‚,€¨4†Œ¥ùþ ÿž­¦Õ¥C¦Y£þŒö¿“ôB‰ð~Šðd“ôΛýú˜‘úù§sÿñRëgKïuKíZQ ç·V äLX äÆZé”Zì†]í_iòñvôFzÿötÿû‚XúµGøuHô‰GòjHñHîØKíuIî·Gî^LðNWóSaý÷\XùúHó?ñý=ò«Cô6HösJöÈeP–ÿs±V · ”ÿ 0 ¾› g“ cŽ …pþoHòÚ?ïHþô¡Oþó|NÿôFMÿöëOÿ÷:OõÙNòMñÕMðMðBMð1Lñ‰Jñ_KóóMñhPñcVñ7\þó™[þô YþölYõCUÿó»TÿórSÿöjSô}VìNXè7VæzXæUVçÛVé—Vé$VçWæËVæùWæ`S ããWäYåTYæšVç;YæeW ãrT âDVäîWåGVèýWéáUåèV ã¤W ãW ãRW âV ãaVèùVè…Vå/VækUèËUé@TåVåéYåW ãIU äHVäVèfUèÞVç·VéPêôLíÅLïßOñOïuQëýUéWXè7YéQXê§WìzXëaVê^VíšWí6Wì×Yî;ZîZïª^ÿòŠbýô`XîMTê­VéLUêKVìôUì}WðxXþó¤YúøôWùú‰Uù÷.YüõWüö)Wþ÷,NöKó!KóLóÜLóMòÔNôŠOøüPô UÿþÇ]rÙŽ,‡ÀWþU9ðÎ7 ëJ>íAòýDñ`Fñ›KïÒMí–QêºPéaRêNTê´Uè(UèÎUë‰Uî×Uþ÷9WþøTÿõ-TñmUëýSé³Oì.Nï¶MíëPìhPëcQêÝTå®W â£VåŸYé WçVçOWéüXî[^ýö+bùûôbûú+eüúShûýVmü„þî© ±š­b¢¥Ÿÿ¦:¨“¨(©£­A¨Æ¡îŸ@¥ͯ¸ŸÕ‡H‡ Ö”ý ¨û´ƒý2ÿ„ ‹ÿ ?™þÖ“¨s3rô€þ‰p€ {˜ U ÷¨›¯&­¡¤k¥‘¨ç©€§Œ£ó Ž›¡ ”a‘‘ `—°¡Iž/‘$YŽ%ÂŽ#ð’0’èŽXŠo…»»{Py«~º…ˆŽÎR“£H¶H´¨­ $›û•–ör‘ôeŠñ!‹ð½•õ˜þù¼…ö¥cíUHéJ íÞMìûSèÖWåöY ä[[è€_îWfô:dômó[oóÔ[ô Lø>DóHñ‹HðHïäJí‚JìQGí‹Hí¥LíhQïRôuNöüAðÄ;î¸?ñ6DÿõxG÷qOÿþàjý@•þ “ªŸþ;þ£“ÿ @œ 숅ÿ~ÿ¿Zû®Iô•FÿòMþôxNþóÿNþößMþöNýövRÿöRRóLPòtLò¼LòMògLò LñtMñ Mð•QñÊWñKYï[ñYþö:VÿõçUóWóVöÊUíWê:Yæ¹Wå WçµWéÿWéUWèVåvWæ‹Tå9VæFWæ“VåìUäãWäÞX åX ã•X à%U áÖXäFVåAVçEVç‡VæCWçùVäßU áÇV á#Vä²WèVêQVç«WæWçáWçÕUæéTäÎXå‡Wä2W ã%UäXéWéDVè`Uè7OîÈKñ€LòêLógKò˜Rì[Tè{XèYêYì·YìÌXëXYë(VêWêÏWëˆXìËWíKWîqZð+^ýô³XñTì{VëLVì`VìîUîãVÿòÍZýôóYüõ\Vûö‡Xûö\ùúzVýö¡Sÿõ„LóØMó¬Mõ±Oö¸Mö2NóhOòŸPõ…Ró?Sÿß~Ûÿ-”þñ‘ÿ 7eþÔ>ôe6 ì;íZAòËDñ@Ið®Pñ`Oí PêŒSìRìðSêŒUéøWì#VìTð¸Uþ÷ÙUþøBQòTïZTì]Rí Nï³Nð$PîÙQë•Që$RèUT äÕV áÇV å WèBWç WèqYëy]ò)aûù1aúüaaüÿ+jüÆnù;yüOþq®Õ±§ß¡Ü¡ÿý¦—¨=¨Y¦ ¨§¤7¥½³¾Ù­S“üŠÑžþ Ìžý†Œþê€ÿ}€w…ÿä‰ÿ†}9iÛiS€šŒ{ˆÏ} X– ¥S®L±#«r°\³ó¯.¬ç£z£°–j‡‡#!W•8—E‘[Š#‰"åŠ"‘Ž!“w“'Šì}–yÜz~/ƒä‰Œ¨‘5 Y²D³Ê¥˜£•ù8”ôŒñ̇ð!™ÿõ5šÿú”}õàYêæF çkJ ê/NêîTêÁYèpY äÉ\ækgðakóDkÿówmóO_ïœQó;Jõ¡Fñ„FíÔHíHíºHêúJê›KíûLï(Lï‰LðnMôSGô“>ð;îÐ>ðDô˜Hö\Qýfüá•ü k¨ýJüü÷—ÿ “žÿ¬•ÿý„ö(tøTû[Jõ^Kþô–NþõšOþö´Nÿ÷Mÿõ|Pþõ|SþõRÿôrRõPõ8Oô'PöLöaLôMð¿Oð`Tñ<\ýôÛ^ýó3^ÿòöYòXóšXòuWò÷Xò Xì9Væ`W ãáWãWæ\VèæTç‚Væ½VæœVæêVæ¨Wç@Xè˜Wç WåX ãV äV ãìW á›Wã»Xå2Vå”UçòVçTçÂVåÃVä­V áÛW á©Yä6VèTê±XèóUåíW äïV ãVäæWåUè\YìbUì]SêøWëyVëUíñYþôb]úû*^úø{XþôBVþôXVýõÙVüöüQü÷óNõÕJôMôÚOò’LòÉMòÄNòÕQòQOÿñÏTôd ¥è³È­àˆ ÙdÿÝ> ó(6 ì‘<íö@ðCïIó1Oñ‡NìNéRé@Rê²RêÑUêaVì²Uì¡XòAVýöîQü÷1RþóºTîQéçNë˜OìQí!TîPì˜PéšWè UãWâvVå„Uè‰VèÍXé:Yëä_ðocüö aûù÷XúA\ýItüßú ¿¡ü°¨ÿ¶¦ÿU¡ü1¢þ‹§}¬Rª£ï ¡2—瘣£§³ã»£¼³¹£¬V« a¨ Q¢ÿÅ”ý Š–Žÿ ó–þEÿ „ý ÷…:p”ÿ¹” 4–þ <šý ažþ–©4«E¤&®€½{µ‰­m£>¡é§ŽŽˆ4}È…Å’$MŒ$û…H‹BŒê„3ƒ0” ‘¦“ÿ‹šÿõ›Ú.~¾{5Š••q£~¬4§uÅ”üæ‘ÿù”ÿùA‘õ.Šòõ—ýüß”þþWoó÷Oë×FîvKïÚTìãXéY ã²\ á´iê›rð {ñyðÙiîÀ[ítWïêTïìNðºMó;JôˆKñjLðíOñINð‚LðÀLð–Lð^Ló‰Gô<ó“>õòCö÷Eõ¹IøQþ3eûõ’ü —¡ü@Ÿý*›ÿ @“úŽŠñÁñúeø^LùIô‘Mô“Nó±Lð¥LðZNó1NÿôPþõ|QþøÓQýùqQþùÌQÿ÷þNóEJðÑJìŽOëžQì¸TóYWýù Xý÷|VñIUî!Xï XðUîÃXï¡XíGVé%U åHW ãWãwVçyVè¡VæäXå \æ(Zæ£V ä…Tä+WæçU äÌU äHWæþWåVV ãHU ã Xæ`Væ¼WçÁUåÎUå¨Vå&WæÙUã÷V ãCVåàXåSVææWå,W ãÆW ä®Vå%VäßW ãVãûWäÁVäHVä]UåÐUçÐTêî·BñCðÝHñàJïÒLêÅOçÚQç­Uë˜UêãUèëTëéVí9Wþô¯WüúcSýúRòRìRèLêFMíQí™QìãPê*Rç¹U å Vå©Vä,TäOUæËWè)VèzYëý`ð?dýõg^þööVöæVúfmû„û^›û±¤ýB¡üZžü†£þ$©‡­+¬y¨ œJ³‹ÀŸ =µ9¼À_Âÿû¸§¯ L­Ü®Ž¥ÿoŸÿ ôœÿ¸žÿF›ý •ü‘Ù“ †— O“ ç™ÿ Q¢þ ¡þ ­¤C«­¢ã§ ¶é³ÿ„¤ ”­”Ûµˆ Ƅᇖþp¨ø­z™Οÿ<›ò‡±|ú„ t•#ŸÌ£ñ©~¦ÊP‹±€W€‰œy˜†žFœ 塦ýû»žýû[™þú —øõŠô7“þúm”ýÿixö®SîDðÔMïoUêUY ç] æ ` äÎqêëwî)|ñCxó bï•Uí^OîHQî6Oï3Mñ@LðÂLï÷MðGNñ”MðŽKï}LîxLíÐJñ•Còí?õû?÷vCùhDõ›IúÖXþv?—ü ¥ý¸¥S¥ š@Š÷ŸˆîLzðQ^øÍKùâJò‡LñLñdMñ=MóNÿö\NýöºQþöÅPýø´MþøNþù›PþøGQÿõõNñ¾LíPîxSñaVÿó"VþõTýö¯RïŸOèöUèUëƒSë×UíÊXíHWéVåUV ä UäþVæâUæhVå×WäwXåð\å4W ãÛV ãNVå‹VåøTä§XèUåôWã1WäWå}Væ–WçXç"WæAVæUç Uæ)Vå€VäYU â”Vä#WälXä¹Wæ‰UçýVåÆTãÿVä¢VãåV âÓTäÃVæbVçySëßPñ·Mí¦KëNLì§Mí—Oò=Tì1TçòVåU ããV ãSU äÝU äÊTäƒVæBVåvTåVæ¾Vå¢Tã§Væ(UçóUéØVê§VìxVíkVðËXþõûZûù9Zû÷ëXþôÉWýö VüùáTýö³KðnLóñLòÛKîÊMïƒMñjNòöO÷1QùÓUúü Yøš„^¸r¸ë¸(¬]† :I þÎ5 î7;í8Dñ4EñLïÞKë_Mè Oå\Rç|UêMTè·Tê[Të²VïcUýö YüûjVýüÀSóÔRìñPé]OíTKðºKí‹Lé–PéCU æUå­WçÇVæ#TäßWä6VæÌVè°Xê™[ìs\ïŽYñ©UôÌRÿû@\üÿ-sü)“ýˆ¢ü³ üEŸý‡£ÿ«”­m«!©š¢Åš• Œg›þ ²è¸µ¼ô¿ÿ¹K°ʰ±^²\³Pª ¥ Ÿþlžüxšþ{”ÿ´‘ ¶” ŠõÿY›þÿœÞž§¦¥£™e¦ –¨3™(ƒý‡#Œ?–Ûšæž >« ,ÉêÈy§Фžæ‡"wŠ~#k“"ࣚ©ÿ2ªþ»¦ÿæŸþb“ÿŽ…Cƒ¨‹ŒŽ~•¢¢ Ѝ·±ýþ¨üúÒ˜þù$“øŠôW‰õ!”ÿù:•û©{ö­Vð}Fð“Oï4VêZé`ëjêåwì2xðuõjõÑYóªLîõHí9JîûKìëKëÝLì-KíÖNï#MðmMò5LñFKï?HïpGñ@ï¾;ñŒ=öóDù5FöALù¡dÍ‹ÿ ïœý ¥ÿ¦ü¤ ;”(ùêyíùkíWõÛJõßHïëLîKñ`Kò^Lõ®Mþ÷IPþôTTþô Sýø‘Pýø?Pþ÷?Rþ÷USþ÷€Qó³Pï÷QòšRÿôjSîËTë[TðuTò#SërTèaVéMUëRVì¡Wê»WçVæ•VåÕWæsYçìVæ!TåUämWä9W ã£U âÃV áoV äqW åŽUæÃUè¾Vç”WåpUäÓVäUåìVæœVçÁVæTUå¬Væ\Væ«WæqVæáVåAVåûWå&WåZXæFXçlXæ WædVåQV ãSW áWä"VçUèŽTì‡PðåMíÔLì)LìNîßPó½Wî¿WèÂVäÑV â¢V ãŒXä·Vä±VåìVè3Vè™WçjXç1UäµWæ{VçUç›VéVìVîhXïvYÿòõ\ü÷ ZúúÑ]ùù•Xü÷€YüøcVüùOPÿóßJîKñ>MòtMïÔOðÑNñÒOò=Qö QûÉUù¾Zûå† G¶ù¹Ͷ÷± #Qš5 ð×:ì{=íþGòƒJñyLìMèbOå­Sæ/Sè¦TèØUéETíµUò×Uþ÷WýúGVüûoUÿô«Tí›QëªLìLïŒMíÃMêQQè]Uç!Wæ”Wç7VçJVæ5WçhVç†VèUèÊVéXëÅVíÄVò§ZÿýŒSýþÄpöùþM£ý=Ÿü ³Ÿþ Ï¥¥ª¬©’¬Â¥œ&•Tâ•þí¥æ¯<°]±®é® ²8³µË·k´Q¯(¤DŸýßžþã›þ®“ÿü &Œí‰l!“ò›Iª¨š Ÿ› žŸn“o‡ÿ wŒÿ >ª­>®Z¶ë¼G¯²ž$X–%]•‡çzJz ™†!®œÿå«ÿ)«þ§ÿ‹¢ÿd”’‹›Œ'‰—‚{щpœ y¥ ‹¢ý´¡ýý—þú$÷?…õü‰ö “ÿùç•ûh|ö½Yï§GîtOîTVì[í*gïˆrìÞ|îñwîolðr^ôMö¶IïzGëŒKíHNë MéøMê½MìIMëÇOîSMò4KôbKô{IôGóìBòQ<ñšAö{CøóFõFRü¹{ÿ \—ý Óšü¦¢þ¥Bšÿ £emö†^è—TëFPõIôkJò©KñÒIðÊLñmMó0NòRþñ|Uýó÷Tý÷USþ÷²QÿõEVý÷hWý÷Vó[RñWQô’Pÿó~RëÚUåTéOTòŸTñ‰TëæTë!UëóYë>Wè VæËXæÈVåôUæVçÂVæUæÛVå9S ãÀT â_Wä:W ã U ãeW æØVç¸VéþWé$WåT ãÞVåÊVåúVä²VåäUæUåUåVåEVåVè¼Wç¾WæÊWåëWãçYåÑVåÓVåÏWæ«UäçV ã‡UãýXåVæuUémTë7NîKíMîOMí¹Pî+PíÞTë•XçÛVä Wä‚VåôXåî2Fò›Oò]KítMé¢P æSåRæ×UèVêUîUóêUþ÷1Uüû,Xüú_Yþõ©Wî¯TëyMêÜIì§KîXNéÜR å§Tæ¢Wæ¤UæŽVçeWéWé]WéVé=VêVêVéŠVêFXðÊZö¢^÷ jú Œÿ˜§Ö£ý«¡þw¤ÿ÷¨¤©©­ê©š•Í’•ÿšþóŸþõ þ°œÿM¤‡¨s³ú²¿¸¶î³@´ÿÕ¯ÿ‚¥ÿÿ¢ÿS¦ÿ)žÿ— D`ŠŠ™ÿ¿²7´½¤µš)›¾“Œ Ê–þ «¡þ ­¢«?«”°߬ž=‘&#=C‡!{!†x Ø…  ®!®]¬Ò¤ÿb“ÿk†‡Mˆjhoøyz »œ \Ÿáœþþ—ýû´ùÌ‚÷Ȇ÷¾‘ÿúà’ûîy÷SîÛC íÁMíåWíº^îølï÷zì}ì’qëÙiïnUõýFô"Hí…JéoLê_MëQLê%LëõMëHN éªNë`LïqKñMKó0Jô~FõŒ?ó<ò×Aõ²E÷KùrUþ´ƒþnšüG›û6ŸþÅ¡ÿ k’ |üs` ðAQé•Kí}LõÃHô–Kõ2Ló¦LïöLñêLôÖLÿô·PýôóYü÷Vüø£Sÿõ›PóÐSþô³Tþõ Tÿô±UõÐUõOSòaPì Sè·Uê|VñïVóíRìþSèçVé/YêˆUå×U ä€W å˜Væ²WçVæìVåÞTåVå;UäÜVäWVæéWæWå|WåöWæQXçXæ›Wä8VåÒVç¶VæTV ãV ãZVä~WæVæTWäþV ä­VçØWçVåVãîW â³W ã²V äyU ä¤WåVå½VåìWæ‰XæWç}VéSìôOî}IïPJðGKë{NëUPëKSèÏVé€Xé:WéyWèÅWæNXåWåXæYç«WåUVäXäOVæÔW ç„VçÉWêÚVí>Wð9[ÿô¥YþöRWý÷ÎWüù¨Yüø’XüùWúý1RüùgMï¾Hê·LíNñMôLôïLòˆOò”Qô%U÷BW÷dsü ‘M¶ê·ˆ±ÓœÜЬ^ï6 ò$:ìÛ@ð/HóMÿõ$IïkNìéOèÚTçSæVè1Uç=TêÇUð/TÿôbUþ÷ VüúôXÿôKZðVêðPéÖQìNï©QéÉTæXçWçªVå'VçéXé[ëP[êjWévUêWé7U ç VèÁZîh[òfýûoý²—þÔ¯‹ªÿU¢þ‘¥ÿ™§Ѧn¨æ­÷ªr¡Ž™p•ÿùšÿšþî™ý{˜ýÖ”þ*•¼œr§ ±à¸7¸r´?´þ±¶þ*²«0«Þ¨ž©–˜Ô› Þ—™ ѶM»¦¯P¡…›¨™ÿº–ÿ Í£þ 2®þÙ©M¦|§ ­&®ÙŸДÒœï¬A£ˆ ¼‚<‰/žÿS­U­x©I­‘ÿ»|Z|z„(zŸd ¡b ²v £I—žüþ)¢üüà þûƒ‘ÿùbŠÿø4ùʈøÔrõ¥RîÚHî?Pï:[ðAeñÆuòð̃ï¸r ê~eî¾Wõ&GòGé”Kè_LëòMìrLíhLíNëÏN è×N éNî6Lñ›Kñ•IóCDó‚?ò>ôÀC÷°FöªNÿù»ep‘ÿѤý#ü^›ÿ ‹’«‚ýòo ôU î1Kë1Fì«KñLLõLõõMñ_MïÂOñEPöˆN÷äPýøRVü÷Wü÷VVþõdRóÐQñ¶TòQUóÛVôÖTóhTð-SïÂTí´Vì XðëZñgSêQåÑTåãWæ5WåÊU åŠWç’Uç¶Wç2VåÉVãâUå¨Uæ[WåVåDTæêWçMUçÒWæHWæÁWåSW ã•V ãØUåìVèQVæÌWã4V áwU â“UåzYè¬Wå3V ãîVæ‘Xç¿Wæ$VäìV âüV ãìW å™U ä†VåüWæÒVæ¿Xè€TænVæOUèSì…NðLð'LñFNìWOêQêlUéÒYê÷Zë/Wì_Xê Xç5WæWåWælXè(XæSWäBYäEW åCT æšVçcWé•Wí>Wþôò[ûú8Xûû(WûúýWüùXýöWý÷ÎVüùOþõÁLîLëàMì£Mð0KôÚMõ>Lñ·OóQõ1Sô[[ö‹Šý K¤¡¸ʲ‹±™Ÿ@BnÎA ø÷9íU;ñ±Gÿö×Mþ÷ãKóÀMíîPé\SéRSèlUçéUã7Tå^UíIîgMðtOì»Pé>Rç¶WçXçWèÆXêäWèTXæ Xæ7Xæ Wç…WêÊXé"Uå™V â6V ã+UæˆWçeVè.UïÑWüø!\ùþHYùþàWùý7WúýDWü÷¸SýõWVÿõüRò&Ií«Ié¯Ké[Mí†MôOôLòÀNóûQó¤Tõ…Zô “þ ñ²šº|°÷°ò¡V“…p²A úT9î]@ñ]FôdNÿ÷…LóNî{PéRéHSçSå¯VäAVä8UêWòŠYþø"VüüöXýûFWñ2UçÕTåk[é>ZëyUéXëÉWé"WæðVåtWçWç­YçJXç¨XçñZèCXçOUæfVéZì^ð³eüoÿX™ÿÓ®±r±Æ«ʨש¬²x°´¦I£ÿv£ý2¡ý¦šýô‘ý ’”üKœü„—ý õŒ Ç Y—þÕýž¤þµ©ÿ묋±–·ª¹ÿ.°þ¦~Ÿ}¢ ª<«¦¦B¢%ªp³½¶°®óž– Xœ@¢ ­š¨ä¥–2ön˜Už…¥Ÿ@‘Öw~~|ˆ$&†&trür‰y_ˆÿ÷ ì†}uÔj4l%„ûk‰ÿùL“üý?˜ýþˆšþüñšÿù–žþøZ˜ûû©ûý=uöÁQîÕHïÒQëÜ\ è3nìëðú€ñ+yñþkìbYìÒRöêIõ´KîUMé|O èMéÕLëOKëOLìÛMëÉOêuMîpMò1JôœJô-Eôé>óÍ<ò? ñÃFô‹UýúÐ~þ  ýr¨ ÿì’ lƒý‡oòø` ïÎMómJñ}JóíLôòKïËMí!Lì÷LíÍLïLðûOðžSðSXýô;Zü÷[üöåVþö%Sþ÷tRòŸUñhWñVï—Uí´Ví/Uî­XíÅ\î [îÿVëvTêòQæ&SäUã¤UäëVæUä]W äØX ã[WãÜWä/UåPVå¡UäDVäFVåÕWåSYäYåiWäýWå0WæÌWçRXç©WåºVäãWåUåUåžVçƒVæEWå/WæQWæ1UåÏVå TäWæÕWè(WçÍVåôVäÑUäŸT ãuU ãOVæ VçUèNéÙJìŠPí:OêR çˆT åEWæÐZæWåkXçrWæêXäWæJWæÇWç·WéVéäVæûT ãÖVå?VçñUæeUégUÿñûWýø XûüTXúýVùý¼Xúü\Vü÷^QüöèUÿöœNòIKïŠLëÇJ ç;LìÞMô[ð•aüø‡_û€I¥¹«­S­2¬º­=­k§ÿ\ ý>Ÿþ„¤ýò§þ¡ý7ýÈýœ¨ý!³û½«ý*¡þr›ÿ×–ý<”ýŠ™þ Äœþ T ÿV§,¬ø¬O§!š‹¡©ج1©už¡ñ«=¶´§Ú£|§Æ®ݵ&}tˆ½”‚G€?ˆ” “–"ƒ"r)q rbrewšvýxú„½—i¥¡£~ì ¥w¢üU ÿû ™þû§›þû›ÿù„–ÿøÜ’ÿøKŽÿ÷Ÿ‰ø—vú,QóƒJð+Têªg éÞ~îQŠñ†‚òÃpðô[ììLï˜Hò'GñHï˜JíÀLíŠNðXç_YçÓVäWWæ©Yè‚WæŒXåiWåáWåÕWæ€WåœVå|Wç2VçgWæOUçâUèÚVç¿Vç’Wè”Vè§VèuUæŽUè÷VèåVéŠVèUæÁW äT âWVäWè2WçŠVå¤WåLVæ±Wç¿Væ“WåœXçYèXçlWç{WéŽVð{Wþ÷EXúý¯Qúý¤PûùàUü÷¹UüùUüø™Sû÷_QüõPðòNî‚NòCMó1LótNõ'MóJMð´JðOñ$Qô¦SôXþõeýCŽÿ\°p´£³3²ÔŒ ^\ Þ< ú¢8íîBïºMñ•LôOÿøÕSþ÷§Tÿó9TÿóòQÿó¨RÿòwRÿóSò˜UÿòTüõ¨VýôÐ]ýôx[ð¼WêUçŸUå­UärVäZWçXì1bÿð_hñYéúU æÅT äXU äVåUæÄT á W áÉ[ ã¬\ç‰\éAbïSkýùfüÿ _ÿÚ‚ÿhŸÿ À¯9µ¯µòª{–ÿo’–šþL¡ý¥ÿÞ¨¾§Û¦ÿ¦þu¦þ£ý¢þH£þó¤T¥Ÿ˜[žÿЧÿOªÿDªã­°—±7±¿®‚¬5¦˜¨ ®P´È».¹ó´9²%¬9¦ vŸÿ%Žÿ©þ·’ÿ„Csˆe/o©t‰zIxIxYwï{xém ¾gbw” ~¡á¦P¤ù¢ œ <›ò”ZŽÿþ°þú×™ùb‘÷LŠóƒ…ï5ˆòù‘öÏø ~õDqð&{ñh“õà÷2•ù-uöàUîšEð^FóLñáOíÿMîQMïKîELîLïDLðÌNïNîùPðËPòNòMóMò.MòÊMõk^•‘ !­þ6°˜œ F|(c úÕR óÅKí7IòdKöLõÇMóqLòáMñcNðUMñEMñnMñÂQó˜UñÐ[ðòYì\Wé·VèMVçSç„Té|WíiYî,ZñZ[ýõ¼XÿôñXñùTðÙSî5Wî7Xï*WïÉVî TíWñýXó™VñWï6Vï¬Uï6SîùVëêVè´WämU ãëWæZWçÚWæ;VåÀWäLYç€YçXånXå?Y äÈX â„XåjYæZæ=YåˆXå/XèËWèñXæmXåLWäiWäÆXåzVæÙWèPVçìVçëUéèUé‚UçtUç TéÙUéGSêUêTé”Uè_UèšWæ€U ã±V âÝT ãñWådYç;WæXægVåÏVä„Uå€Vå«Wå-Xæ|Wæ¥WçrVçÈVé XïWýø'UúþPúû—Oü÷†Uý÷PUü÷uRüölSüö«RþóNOð›Oð5MôäMôKô!MôÆKò³MïÁJñÎNóîPó.PòÔUò©oüјþ.¸ý²ö«{¨ÿ¿ c éWÿ4:ñ>îwJô‘JóM÷WQþùÕTþõ1Qÿô‰MþôjRÿó4TóMUðUïUÿòÑUþòdYðñVíºUêyTç½Så‹UäõVåVèDWêéfî¡€õ#jïU åÖT âNT âËU ä™TåžU äWå¹Yç©[é§[ìX^ïëdõfÿüb\ýÌyý ö“þ `¥µºƬÖ¥̤ÿ¡™ÿç’ÿðšÿݤB¨1§â¦7¦ÿ~¨ÿä¥ÿ]¢þÿ£þã¤ÿ'¡™ýލ‘þ¢þ¯¡ÿª§»¯2°1®t®@­"«x¡·œÿ?¡б—º ¾¹±3¦˜¹• ‹Ž×ÿÆÿMqÐftbÃgqÙ{D„†}]u—mžk™r?uÕsús )€Ÿ™ ޤ‚§ìªš§˜ž~‘Óüùë•ÿúª“÷4ó:‰ñ‚‰ò€Œô™öÒö¯†õx~ñ×ð†ðä“ó>š÷áŠûýaúûJôhBïZEñëKîŽKìóKîAMñ¿JðŸIížLï¨LðÀMîžNî›OñåQògPòõOõ8Oö»PòÑN ñ2` ù” %¯ÿC©ÿ¸ÿßpûi] ùvN÷ JòÉJòÉMódIóÚLó´Jò¯KñÚKðKð+Lð³OñPðWñM[ò©YîÜWê[WçFUåtS ãíSæ™Uê}Zí»^ðŠYð©Xï×Wñ^Uñ UïGVï,WîGVí†Vì$Uë„Wî¹UïTðZWñ%WóVÿö1Uô/VðVì5Uè?Tç:Vé‚VèüWåÃVã»WãOXæ|Yç‚VåiVäÿX ãºW átX â§Y ã ZävXåëZæìXçCXçlXçyXå¾X ã­XäxVåéWæ?VèÀUç÷Vè+Té²TèFUçNUè¼TéÖRêtMëñNî&Sî€Ré¢S å†V ãBV âBW âîV ãáVäÎWå)Vå@WåUåxU ãÌV ãÓWå[Wæ0WäUãrWæ WæWæ¢Wí‰Wÿõ@Wüù`Tüö6Sþô™Tþô–TýõmQýõ„SýõRþò§QïMðLö M÷zKóàNñtMñ$Mï-Nñ€NôÏPø3Pøt[ø~zû0œþÚ¸г¦«K£y×v ’l0FõÈ7î¼Dñ³Dï%LõÎOÿ÷~RÿõPÿõÊOþô7Qÿó7TÿôÿVògTðQSñ£TñUïASëTTé©SèUçVåSåáVééWé“]çwðŒcê}T å0U ãPV áV â0V â~V äyWåuXæÄYçÍZëë^ñ añdö÷YÿþÇiý»…ÿ%œ–±ü¼вݵKÂþ­•ÿ”¼¡ª¡¨ʦ§n¬§o£Ťþ»¤H iš% ^‡ÿ šŒÿj”•Ÿ%®u²ù®«I¬Á¬¥«š%š)§1¯,¸þ­1¥¿”q‹ .ƒ |þwzþwxÿ o *gHrFxÿ7sµt\ø€ÿÇs÷fJf ìn [sæp—qׇ [žÿ[§—¦­¤ݧ«Ê›ɉøÜ•ÿø–ÿøt‘öøŽòéŒðÞŠòêŽôŽô{Œóÿ‡ò-‚ñüƒòÁŠói•ôõø¯…ýõPü›;ð>ìJîKìÑNì¤MïÙNòèLñ5IîLî2LîkNîZOîPñGQó'PòlPóSPó9QðS ð‰k û™ z¬Ÿ€ëc ö“] úRM÷Kñ›JñZJòPLò·Nó?LóQMóNóLòîMðÕOïªTð Yð\ñ4Xí£YéfVç?Væ®Vç€Ué UêæXìH[í…[ï”XñpUó¤Tò±Vï-VîVíEUì³Uì’WìxUìLSíUï™VñxUòµTó÷Uó·VóýWóÀWð+UîOUîÅUêÒVä»Vâ¸T ámU äPYæWæÝXæ¥Xå£YävYäâW á[ äZæ¦]è[Yç$YçÅWçñXæÛV äÄWåXXåNVåáUåõUç¨UçPSèÄUèÌUèTéäSìPëÆMì×Mó‚NóŽNìßO æR ã@W ãöV ãU ãÆV ã‡W äÂVä×VäÛUã/VäëXä8VäÞVäõW â¶Vã¶VçBVçÀUæáTêøWï“Wÿñ£UÿðmUÿñŸWþôTýô·SýõSüö²RýôUPÿñuKðÂNôŽMöLð£NîNñ6NñOðªOósRúðTýé[øi}ûÅœýh²ß³™°"©”˜ˆƒÿå|"[ù];ðƒ= ëÓLî~NóeM÷ PÿõŸRþöhNýö0MþõQSÿõTÿõáRòÉTòRï§SëfTéáTéøUéTéÔVå>U åWè½WçjVåúX ä‘Y æ“S æÈUå­W äV âeU áÞU â„V ãöV äÄYæ_\ëã\îÆ`ítcñedþÿglþ¾€è• ᪠³Q« ª—»ÿ޳T¡Åží¤üªV¬æ§f¦ÿ¾¬ÿN«I§H§ä¨N Ë”É‹p„Õ„ †S’ÿµŸÿ¸°ݶV¯¸°S­¢ªL£‰šØŸ=£+¤ÿÏ¥ˆ¯€ŸX[… gÿxlýüý _Žþý„ %}Ì€wËrâxƒ| y¡qÝmÊpBs‹oÚr%†ÿ +œÿñª*«Ú¤¡§ªþ@£þo•ÿÿT™ÿùÕöÁôù‘ôø“ôæ•ö”öõ‹óă ï² ìäƒ î¢ñ·žôò÷*x øYHù&:î÷@ë/JëANìOïzOðXêéWè†SçƒUèËWèòWçÏWëÙXí/Uï€WîVîVVíÆSê·UéæVçBUæUé¿WêžUé±Vê¯Yì|VìVíVí—Wì}Wê»VëQVìUêKUèçUç¯Uç˜VæVè™Xê"Vé˜UèêYê:Wê XèˆZæ¤Xä¬W äjX ä V ãÝW ã‚V ãöUäÔWååTã5XåWæ’TåžU äçV ã1W ã TçPèmNèîPê(PêNìeMñ¨MòŽNìÉRèïXéªYè}VçñWçVèüUæÁVåŸVçàUæ`Væ+VèŸVéOVèdUè*UèVèMSæTèWìÝVÿñªUþôñUýöYVü÷rTúû¥TûûISýöÈRÿò’PÿóyOõPò³Nî/Ní!LíILðºMóoNö’OóÖPòWWõ6VòÙ{ûÕ’ûj¥q´B°«°¬©^¤þ&’þô‡ÿ ÛuhOù4Jö£JôMõ¤OöÉTôžOðÉOðAPñ¤RñÕRôrWñuWì@Væ´Vè«XêYXé|Tç™Sæ{SæØUääVå‘WæVçXèYê©Yè^Xæ WæWæ>Væ'VåKXæ,Yé;XêàYçê]è `ìçgþ÷žjú|ÿÿ|—ŸÈ«Ê¢å‘ÿŒÿŒ”þÿ¨£æ¨P§§Ê•߈Ê–ÿj¤ÿl¥°¦q¬n°²ʬÄ£<ÿzšþ Uþ(Œÿ¢•þ¢O´N·î¶° K²¤¦o”„z ]n Ûc ˜ny„¬ŸwzØz¿wʧv‹l|roÆgñko~ ‹† ׉‹Ô‹ eŠ ……Ý{¨ty‹‚ V‘ ;† øwûPqüprüK‹û³’÷±Žò(òC“õY—öžšö·•õÈñ ðŒ“ò^šóP¡ókœö;z÷;LùZ<ñŒHï”NîkKë’Më_NîGNî±OírQíóRé#TæÒTéBTð0UôAUô¿Pó¨Kò˜OòÓUï$\ ðÐ{? î°y™9j ÏL ðuDíèJò„Lõ‘KõíLó›Kñ Jó2Lõ1Mô;NóßMõÑN÷ÒSôŠXòt[ÿóÒ_þób]îÝZê>Zë&Zë XêXêUé:VéWè_WçZWè+VêœWëWìÆWìMXì–UêµVéVç¼Vç8UèëUçÿVæhVæ•WèFWéIVéŽUêíVéWæWæ†Xå–VåäWå¬VæØWèYèWåÜW ãäW ã/Wå±WåTWæ]XèbVç—VçJUå”Wå9WåeWæâWæEVçÉVçüVçÛUç«VæYVäZT ãçU äÍW äTæðVæ¶W æâU åTå¦VçUçÅVå­WäVå)TåYUæVè&SìýPð°MñØNñÇLð‹Nî3NîðOíÐL æƒS ææVê©UìXí¢UìVêµUé×VéaUéUèÃUèiWé XësVì©Xì3VìÐUìèUíªTí÷Qþô¶TþõæRþô‹Sþô Sýô«SþóÃRþô˜SþöºQþ÷PôLóžO÷0Lõ+LòÒMòxMïNîFOóùPù€S÷Nõ¯gÿú ‰þ@Ÿþý«°}­Ѧý¢ÿŠŸþèŸüÄþ?~Fýö> ï»Pò¸VöïMó·MñQþøñVþùhRÿöUÿöõTñ°UíÚXíˆhì#péVZ áÎW âYèÈSê)Tæ‚VæŒVå%U ä³U ä¬Xå-YåYåXå¿WäuV ä2VæGXè·Zê:YëmWìSZì(Yê—`ï%hùü~þ,‡ÈŽÿ “Ÿþç¨>¬'¦³Œ³‹ ÿ” Ôšÿ‹Ÿý:›ÿn•ÿ*Šþ |þ ž|å~£‰ ÜŒþ S”þ½—Ë á‘ Œ Aþ† €‘ý d¡ÿq£Ò´ú£þ÷›[™º— `Œ{Ãj€_ ´\ _ãd4pûsXb zY À` #nBsóq”iÏf‚n"pr‚ §¦ 'ÁËÿ)²Îÿ%ÒÉͱ-Ž yÉØ‘ÿÆþU”2…N‰ÿ'Œy™þÿ£•ù ôXò|”ôð™ó³™òÓ“ñMñö˜õæ¡÷¤ürŸýZ€ð'K ìÑ@ òÈGòYJî>Mí&LëìMíÀMð¶NñZOìÏRèÒUæ–VèëVìéSñcQõqNô®MñåOñSõaWôa õÇ}M˜ ‚ 8Y ÿÅU ï³V ë˜JíËKïºKï_JïØIí¤Lï'Mò+MòLó°Mò;MñÚQòZñ ^ï‹_í*\ën[ëæ[ìxZëXëSåxVæmWæšU åyUæ™VèYUéæUçƒSäÿVå6Væ TåçUçATêòTî•Pò¢NõLõKï²Ní OíOìòP æCUæ9Uè]Tê&SìÑTìÆUíkVì{UëàVé6Vé VéTVêXì1Vì–Wí@UïxVñáUñÎTòÊQþöUSý÷–Týô?Rýó³Sþò#Qþò€Só‚Oô„RÿöJPÿô²Lð´MómMô]KòêKñÙLðŒMðÙOóóPùíSúŸN ï/füü#‚µ¡ÿw¯ä«¡©0§.¡B›ÿÉ›ÿÜû³…¨Fý™8 ëÔQððV÷ïGõ‹EòmKÿ÷ZQÿùMRÿ÷­TÿõßVôÔTïÌXîWk åâUÑUL Ò¼MÐŽ_ÞðTèGSæ›UèÈVçU ååU åèS ãWä?Wæ1Vå(V ãAT ãoWèYê¹Zé¾XêÁXìêXë¬ZêÒZìûföCsýšwê† ÿh£@¡¦Ÿì³†¡‚©ŠŠ— ªœ#”–Žþ ¯{ÿêoìni|”… /Œ 6 P…  ù} þÿ‚þ ý†.‹"žžuX|€ ¬z Ñw^u:lï] }[¯Zý\ <[ YlÜh b J] ¨] f bj #k8oÉrт՜2¯¸R¾u»êµ ¨v› ’v:ªÒ±ÿН˜¡žÿQÿEÿþg”÷VóÀ‘òb–ôðœôWšó’òm”ò7œòï¡ô€Ÿõ­•õrwðGñDôŽIòLï{Lí¹Lê1Më\NðüMñÛOìŒQéýUçàUçUé?TðHRõ Põ.Nò±Qð†SóúWó`õÛˆb— °q SüHUòêTñ JðKò1Jñ¥LðÞKï¬LðœLóFLõÎLõ–LôÑNò0Rñç]ÿó™_ÿñ^ìö\êÈ\ë!\ì½]ìêYéúWè©UêVíÙXíîWíYêBWçUæÝVçÀVæUæòVæ£WæVæ†WçÈWæU å¨XæúYç–VèÌXç3Wä‡WåXçNWçQWåhW â#X â)WäWåîWå"UæÑWçÀVåÞUåVæ¢UåEVå#TäwUäW äBV åžUç½VêZWë•TéåUç®Væ,TæÈUçVétVî VñYTðfQó’OõÄNîOêŒQìhUí@Sé4Uè0TéôTéTé@TéòUêUénVêXë)WìQVìNWíWïbWÿðõVð‡VÿòxUþô½Uÿó¦Uÿó­RþöÉRýõ·Oýó Sÿð§Rÿñ©Rÿò`SòùQñ¶TÿözPþö NðNò¯Nô8Kñ!KðMLðýMïqOòPøNøÀP ñCcü‚yÜŸÿö°Þ§ã§T©¸¦Øž þ]¥ü¨‹Rÿö9 ì1I íºPöšDõ*?òÆ?ó1GöˆOö§TÿõdVó–SíìXìú_ âÕ_ Û ŠýðÄpæU`á®VæŠTå³Vç`Wç+Vç“Sæ[U äYU ãíVåpVä0T â[Vå*WçŸXéâ[êžYê‹Xë¬YëXéC\ì&dó¬dô jû7yÞ”ÿœœ1Š|‹ˆŸ}û{ƒ ÒŽ¾…v† Œ~ÿ péh¦sõ\‰v ¶Œ %‚ Ý }ÿ Ýþ Á|ÿ ÷r–{{}{sVs2nØt Å{¡|-z|=o2]5Y *XCX ãu©r±oh)_ ða If Ÿrþó~§‡ ¢”ÿ ¸žê¦Ä®3¯Ó¯/¬ªy£Vœâ­³ù±r²‹­%¾©Ц WþŒ“ôD‘ð/”òð—õÊœ÷6šøF•÷–ô%žðl£ð&¡ónóid ë±DðaGôêJîOKìáMíªMí[LíêNîPïOíúRê^Xè;Yç Vé«RïkRö8O÷MôHOñTóCWñ+h÷!‘ý– m¡Sö9UñÀQòHò¦JôLõzLôÿLòBLñ§MôMö Mö3Mô’Oò†Uó^þõÜ]þóÚ]ïø\ëÎ\íi]í7^ídYê÷Wé–SêÃVìuVíñVî’WìgWèeWæWç Væ9Vå§UæGXèBVè°Wè'WéeWéVèâXèZXéœWéáXè@XèWèæWéCWèNWå.WåWæsXçHWæ¢W ã'W ãÀWåXåvW äÈW ãoWäžWæWç•Vè¨Wç°Wæ UåaVã>V ãÈVåƒUæ×Wè%Ué4VéíVèÞUæeSägSæ´Qé¨RíîUï=SîyRïøRñQî‚SêÕTëtWîßVìmSè?Té„Tè¶Tæ3Uå UæVçêVçWêXî¦WïVïlUþðÿXþóKXþôFUÿóNRÿòæTòÁUñUTÿò¸TñRÿòYRÿñÆTñSñTñuPïuRóšOýõMþóùMÿôÊLòøIïDLñ“Mð]MîÃOñ>Pô PôõTò½Sïêqý ÿ³ÿ «¦µ®7¨Û¦’©ÿã©þ˘]g d> ó*?ì¾L ôBôÃ@óV>ñ[@ïKôHRó@UðASíèVë³U åÑXåiiùò£[ízW ædUä Tä¼VåùWæÏXèuUç{Vå+X åW åCV äU ä‰VåÖWçáYé^í{[î¡XìnVêXêÓ[ë·`ï*bïiþ÷Ýrl‹Xž“ Mv¾sr}n}~ç|P‚ Åz®w }ÿ Tw  k èq ‚'” šÆ“K„ ,} £{ÿ E}þ Ów|l Ôn(wwÿÅpsp Vv´~¸V}ã{gj‹b øe z_ Âèz(vrÿþmëkÀký Ïvü<T©ÿ<½þ Û±£8¦ï¦å¦4¡ëž&—ç•ܪȶ·µMº'¸ü³‡®gŸ›’óä”ð_˜ó™öqœù›œûù–øM–ôœ›íñ®ý—€õLV ê@íCHó„KíNêNíÒOñ(NðxNíoOí–PìIRéHVç#YéÙWì—SîßPóSQôRô†T÷ºYü[eù[œÿ õd÷1U ïpTð NñÏJñWKñLô‚Mõ^Kò¸KðŒMñWMòWNó¾OñŸSïGXó‰^þö˜^ÿó ]ï”]í\]î^ï)\îä]î´[í¦Vê+VëHXì9VíÓSìÆTèÍVèRUç­VåUåçUçöWèŽWé/Wë^XëqXéXè¥Xé˜VèWWèHWç\YéWê¤Vé„Wç¼WåEWå Wæ:Wæ3Væ¨Vå”VæÐWçiVæâWä­W âNV ãâWæ WçŽXèhWæ&VæïUæŒVåŽUåXçrVæGVçìYè¥Xé–VèUçûUæ”UçTè{Sé5QêqSìâTíì¯AîÞEô=>òŽ>ïóAïDð½Oô VïŠUëêTéíS äoO âÏUçþRè¨Wç´VçÅTçtV åW å Uç%TçÃTåaVå9Vå´V åŠT äùVå§XèyZê6]îˆ\ïXí–Wê¬YéÎ[é8]ìÀdñrlÿù{tþ+ÿñ– %x(b `k w»‡ÿiŒÿ „ &{ ¸s ›y }ryÂv¾l ©2›Õ€ ly x Èy ;s öqŸpÓvåv_rnysðz Ã~Á| ƒ¯Êueq,rad û‹ €½usÿïtnæmýÏrý-~+›ÿ ·ÿ¨¸^®¦£u#û•ÓŠÌŒ^“̨~ºb¿} = Ûà ¬$›~’ô›–ðšòlšö:œù&œûZ—ùj—õ—í • ìÃŽ ÷lûîHò!@íçHñ½Mî OëæNì©MîÝNîNí[Pì´Sé&Sæ”TåÏWéšXïMSôàQõ OôÓSóøUñ®cùÈE•Üþ ׃øXñ"U í¤RïâKïdLñ!LñåKòóLô¡Lò¼Mñ¨MñÖNð/Nð6OîûVì÷^òF`þõ \ñw[ï]î~]î]ï]ï)[íàYê}VêRUêëWêuVë¢Vë]WêYë‰XêeVçvUæCVç¡WæWçtXè.WçÃWåôWæ×Xè¯YéXèÐWçêYê1Xí WêÿWæãXä,Wæ£VèøWèaXçGWçßWèpWç?Vç½Wæ^WæÀXænXèWèÁWçiUå¿Uæ°XçÙWæVçóWè'XérWéLZê¼WëšXêjTçVèyUèÑTèÔTêÛQçTéÚTëMUêÇUèrUèéUëƒWìÎWèGVå×WåœVæ†VæVæ~Xè Wè”Wé®Yí·ZïWðÑXï^TërVìMSëzýîª +½ü»µo¶ô¶ÿ¬ ¢¥  ˜ ¿† ‰ }Uÿp4 îý=ïŽ@ð#AðÍIôÓSôWîXWêUêWTèÀUætVçhV ã]T â,Vè`[íŽ_ïúXé1TåúUägVåXVä®WæSVæjVç°Wé’Zêp[ëu[íˆZë`YêÅXêiYê|^ï€aò}fôLsb’ýµ¨û>«ûážþ–‡§‹ `p#7‘pˆ5‚ ï“ @‡él Áa égýmsuÈvågU`µkÔw!sEmÇ\†X $T V fX )Z½\½\@V¿[ æ^ —c ¯g’n0oõu±|·† iàc5e+i`wІG‘˜M°›®‘ £‰ G‘ ŽŠŒÚ ©~ ök Å^UÖZ×hqyÿù«ˆõ3“öœõΚöa’ô1”ó'›óÆ›óŒ•ô6…õñløøIú®:óÊBñHò4HðŠJí÷MíˆNì‘NìýOìLRì(UênUìtWðUñòRñ>Oò›Kï®Nî5Vò‹müMþ ¯¦ÿ“®ÿ¨§ÿ ˆýÏWüAî Ií¸NíûKðâMóþLô7KóKñLð«LïßMñ]PóˆXò\ñq]ði_þò°^ýó1_ýò¼\ÿð¸^ÿï']ðYî“Xì Yë_îgÿò^ñGVí+Vé§VéOWê¿UëºVëUéïVêñVëÑUìýUéVVè0Wé@WíaYíUYêYWèAWèAWèÀWæ£Vä¶Vå=Wæ‚Væ»XçUXæ7Uå°VåªYæVå‘VåVåÆWå.WåTWæùWäV äÁWå WåyUæVèaUçöVåUVåðUä°U ã©VåKWæNVçRWèÕVé+WëXVë­WêWèHWækWåIWäNXæ²Wç~Yè"XæsU äZYç2Xç‚WæVå÷WæÞXéWãvU à³V á½VãïVäFVåÏXèKVéøWèbVèùTçÅPìÀNòELþõÉOþõÚOþô¨Oÿó¡Pó PÿóaNÿòNï‰MîŸNñTLñIOóÌQôSõ:S óFR ó¨t ü¡§ ޶׫9«œ¹¹Ä®ϧlž™ÿy¦h N ûê7 îŒEôHÿõuJôVQõÓVðîWí?VíÂUéWé»VçËV á UãôVç…Yè9ZéˆXèûVæÒWå5Vå¶WåVåWå'TäUWæHWæFYéh\ë"[ê [é ZèõW ç•]íübó8eôYpýR†ý ¨›úð¤ù7¢úߥü:¡þ ˜—’þp˜ýˆ›üÕýÉ”ÿã€åh Y›W þ] h |uÛ†é„epRd8c“l—lZ ªR÷R PY [ }Z ¡[ $] ¨a GlÈpï%@î{Ið JîLï¹Oñ†OðFMë'N è9TèùWæ—UæóUê]Sð¶QôMòâMîþQðüTóˆ\ ö»ƒx¡þK­ÿî©k† QVúBï®Kò0NòtMôåM÷jKõKôÿNó#Nñ’MðMóÝQõ"Vñ¾]ïœ_î]í[XíÚXîÚZïq\îBZëûZê©Xê„XëRVìUî2TíTë¸Vé¹VçCVæÃXçûYéWéVè…VçfVç©UæcTä¶WæjVêGWìRWédWèjUæYVæ„VçSWæVæëWèèWêYíÛYìXêÐWç³Vä U âžWäWå·WçXVç£Væ¼Væ¯Wç_WçJUäÎWäWç€Yè9Xè'Vè¨UäYV â‡VäšVåkWåRUåsVæ'TæHVçÖWè_VæQVä+WäkUã¥UääVæÐWæWç~Wè"VæñWå-VæôVåTäÃVçùUçVæ6UçÐUé«UéºVçèWåWäãVäÃV ãÑU á‚X âßWåÈS äàWæ|Yê5Yë¢VéTë)UìJRðXMýõóMýö Pþô|OþôzOò…MðLOïÇQÿñ¥NïsMðXNòcIïúMððPñŽSóôUójQ ïƒgõƒš° … )š #û­ /ºl²“§¥¡M›¨²7¥ìg,6òÜ:ïAï&Jô,Uÿ÷UðÕVì±Uë¿Tê€VéMVç‡W ãVãßVå}WåkVæõWé VçöTåWç°XçºVåVVåTäzWåVåŸWçáZçu[æOZçÉZæ÷ZéB]îebó“fôqÿý¢…ü›™ù nùÌŸúÕ§üq­þЬþΘý‰”ûwœü Ÿþ†”psC`—Yd\S\ kký{ìzÒr7nqfZj•kýgN` š] ÀY PX]] ^ `Vj®p.vˆr‚mRi#e…l<|$ŽâzQ_\T ¦S hdô{oŠÕ“Ë}~]xös¸€ h#n Sh Ki ©e\a#[ùdÿ%€þš’ýë™úrŸõšó×’ób“óÕžó¡÷Õœù­~ïäUêþJò¸? îÔBíúKíÙMì‹MìNï-NïMìåOé\SèWç?Wè³VìûTñ“PõÐMó¼Qñ²SòuTó_ÿü°‚¥¡ý!°þ0§… UúJCïEJô¸Lõ³Lõ©MöXLõáMô@NôYOôéNô Lö™NþùñSþøYñ\î YêÉYëñYî¦[ï¾\îJ[ëgZëCYìXì…Wí)VíÛVìWìXìNVì¸Vê¹Wé(Wè}WèVç’VçòXè VçCVæVæ^WèfWèwXè VçêVå!VæMVèyUæQVæ0Wç•WèWêhUê’Yé=Xç5Wä9T âËVå±Væ%Wç&Wç2VæÿWç6TèËVè¨Uå¦VåæWç³ZéYëaVèVVä[WãkVã¹V ã€VäÂUåÏVç*UæÕUæ5VçÆVå&TäþVæ VåtWåjVæYTåuVç1VçßSæVæ™VæzVæPUæÈWçòTåµUäžUçÀVêýUéáWæÑZæ„YåFWä¼WäãWäÝWå°Yæ½V åUUæfXë VííUíÎTï.UðÆSÿôâPý÷ÂNýõ¢Pÿò­QÿòiOÿñ­OîMínOîÊMîKð°MómMð¦NîæPòØUó©Wóã[ ôÎh÷B˜3¬ n• +‘˜ +Y  ý·–¹™°±¡a•zŸðª¡| é^ 6ïi<ì»Jô•SÿøˆTóVUî›Ví1Tê´Ué“Vç§U ãV âUäËYäMVä´UæÌVèðVævWç—YéÅYç}Wä{T ãŠV ä’UåëXæeYæÿ]ç7[ç'[ç?\ê^]îUbòÃföÝoþÿ|…üÞ—ù ·›ùeœúߤû}±ý¼´ÿ(§ÿzžü¿”üˆ‘ý‹™þÛœÿ‡ŽÒy Íf ež`>jŸwyÞuµz"tín%mGpJt qb š[ od‘gõjGuvH{­|2zq‹oM{̓T‰Q$…woþ]©a˜obvÇ~ÔˆÔ€}f mñzå~•‰ ˆˆÀsÞh?h ‹b—Z TZÕhý™ùp”úµŸöÀóü—ó4–ó‰ó ù@˜úåxï˜UíNôÖFò˜EïxNð+Pñ°NïèOðkOðgPìRé”Tè…WçÃWæWéoSï¹PõHLöÙRô1Só(Vôó^ýúŽ|þ KŸü#­þ1¢”wOKöþBì­Jñ”MôgMöOöLõ¹LñKñÁOóLõõMöOÿù¸QùIWó XíÇXêºWí|XðÊXò8Xî³YíYí;XïØXíWWì'WídXí6YîÍXî-UïŒUí·Tê‡TèrUæ\Sä¼TæÌVéËWé´VçÍUæUæÿVæ´WæðUå\Uå}SèÑUéVæ“VåqVæhVåÆVåÂVå/Wè€Wç¿VåÍVäŠVå°VæzVçRVæýVçUèÑVç-WçCVæˆVæÑVçŸXëXíøWéWå8VãzW â0U â0WåVæsVæ‘UåZUæ•VçeUæVTæ\UèêVçoWçzWèýTçTåXçûUæ*VæjVæVæ¾Wç WçhUäžT â–W åBVééTé*VèÐZé0WèùVåVäYæVæWæ_Væ¾VèVììUð¢ù8—ú®sðDUñÃQø)GôHó¹Oò OðMïØLí¨KìJOë‘TçUåÔUäsVæRVêTîxQõOùUÿù=XögVõëXø[tû Ÿ•ý^ªÿ–¡^q HõqCìYHîÒLòëNõ;NöXMó£KïåKîLñôLókNôzOõaPôóRð–TíSìùTï˜TóëRô´Sï©VíêVíLVí"VíƒVíVî‚WîÃZïtYîDVí1Uë\TéÏUèµVæ>Uæ³Wé1Vë™Xê.VçlUæ˜Vå+UäŽU äT äUçÌUêÍTéàTå6VæŒWè`UçòVå¤TägVç#UèãVæ¨Vä›V ãVã§VæºWçJVèUèpVæRWåWåXWæ9Wç Wé>WêíWèzWæ|Uä¶VäIUä¶Vç@Uæ•TåÛTåcTæ«TçóTèêTè¯Tè~TçWçWèÇUèÀSå±VåITåZVæ1UåwVæVç#VçðUågX å‘W åÙVè’Vê=YêVêpWè"VæÚWä6Wæ®UéÇUé&SéýSêWSìiTîóVïpSîðUïBTóhQýø\PüøñPÿò PíßOðõPÿó OÿòPð¶PòCOó²Mó"LólMòfPôÿRõ˜R ñYU óhúl‹Ä´Ôµõ” *[‚)"Ž õŸ K­ o«–ìƒ:• §ÿ þ YAø}FôOÿócRñÌUï¯WíàUêSTèGó×NóMðÑNî‚OîfOîŒPê×TçiVåUVåSUçAUê`Uí?QöOÿúUTþû÷eùSiùÀXøß_ÿ-†ÿ ô¢ÿEœ nÒIõaCíÖJíœLñˆMóMòêMð”LîÎLî©KðÀLð¡KïtJñOóiNðòMí¦Oï0LñÔMó'Kò NîOëLPëìQëÕTìœRíùSî®Pî´UíçTìÕSêûTçÌUæUçkUèÁVéýWìªXëWWé¸UåïTãõVãþUäUå UæUç'Vê½UéxUæ>Uè’VêUé”VçlWç„VçaWæ6W äMV ãÚV á}U âpWænWèvWè—Vç|Uä(T âÀUâ Wå˜WælWçWæUåXWçVèbUçâWç¥UçÄVçYWç¿TçîRçòTç©TçßUè'Vè(UæYVåýVæ¯VçòTåEUæUçyVæUåTåiUæ×VçºUæŽWæBVæÓWèeVëPXëpVè•Wç3VåÿTäWç$VéuTêëUë‚TêÂUè8Uç‰VæoUç˜Ué‰ Ü _"äž å˜…Ѓ…¢þ Ø þ Îu tJýEöMñPîÎUííWêWé³SçÞTæÁTå«UåãVåUVå VæxUçÖVëÀVêòVæ-UæPVæOVçÆVèXéäZë‹YëAXêUYë²ZëZê¦\ë__îbñAiþô¾pù“†ý—žü D¦û©ŸúÙŒú¥…þï‘•ý¸—ü Z¦þj¡ÿp£†£xÊ¥Œ£_šŸ~£gág Ht\}6nú_$Wˆ Iym¡q Œ ü{w\|Í„š^©@¦zˆ—–Óžÿ‡žý(ýƒwþ †vˆzá„û>•ø/¡õ6Ÿõ£˜öÉ—õ‡ù_ ÿü¦’ÿ÷,sòVîàOñ¬Fò5GóÔNñ^Mð‘MïxNîkOí¥Që=Ué8WéWébWéUé|Sì’NóLHö¯M÷:ZóIcõ…XøÏ[ün€›ÿ•/gŸGòáEìNLðœMó¢Nó¸NñkMñKKð¶Iî^KîNìKì Lñ§Mô9KïJKïNóRLõ˜Kò¬Kð©LîiMìLLì®QîŠQí‹Ní¶Oð‹Mï/NíNë¸Qè½Uå­UåÂUçÁVèUVê»WìÕWêµVç\Wå{T ã¨U ã™UåîUè¨UéUê`UéÝVé)VéVêÍVê•Vé×UèîWèBUç¬VæˆV ãÆV â¦V â†VäžZêhWë WêZUéõWæ}VäyWãWäÒWåWæ¥UäæW äpVç«WéUè;Uæ¯SåkUæ§Uè±TèöTè Sæ–Uç]Tè±TçúU åÝV åÚVæ$UçUæ_Vé–Xê$UæÓUä-UäeVæŒWæ7Uå­Uä–UåÁUçÒUéúVèûVçiTåÅUäÛVãVæØUæÞVçLUç‡VæìWä²VãZV ã@S ãUçÎSïåPþö„Oüø6Pþõ…MþòûPþôoQý÷eRüùUTûú¤UüúQÿùÍK÷rMóMòONöÈPófRóƒR õºT ûýoò§Œ¾p³’w"¼·û%†… é‡ ¾Š !‚z§ÿ œþ 4}ØTüÇCôéKðQïûVïèYë+WèTæTæ@WæTåUæ€Uå†Uæ¨Vè*UëWëûUæ‡TäÉWä VædWé¼Wë‰Zìw[í~Xì}YëÃYêZêß\éÔ^í€bð;iþô1oüÿ ƒþúŸû s¨ûà ûÛ‘ûX„ýRŒÿɉü ˆü Œ‹ýÒšÿ¬©Ô­¦¨ª5¥Ú¢H“þw†otr™d?^ a ‘b¦j øqØ~Îuƒ` QR£PgS]d JsßxœuûtérOm ½†¹{…Ëðn Sd ¥g_m%m¾máxÿõx‡quA€Æ) ¯¦¡£ ™ý—n–܈ˆqGd}d–pàƒû –øÝ¡õºŸöh—ö1”ô}ö_¢øÅ–öguï§ZíLUðëLñðKñyNï­OïVNî?OîPíTRê´WèXè'WêÊVêÀUéSë\OñjLö`Jô+Mð¨Qð¾QôVüÝvÿ ÒŽÿ ç“ ÆiŒC ïüBê¿Jð«MôÄMõMôªLõLôIð‹IïéMîºNíÜNñNô‰LñÀJðíLóbLò‰LïMî×LïÈMîÅLîïNï­MîïKïJñ}Kð}Kí®LìŽPé…TæWçVè%Uè@Vè|WéXèŽYçíWç:Væ TåµUçOUêUêhUê`VécVé>VìNVîITëyUç'VçiWç`Wè™Xè=UäöVã{Vä‰WæYêBWêQVèåVçRWèYíñWíÀWéaT åAVæ*UçSVç©UçåVç¦TæéVåaU äÛVåVçCWéXëDXëÖYë­ZìH]ì³^í:]ð|cþöMaþøeÿ÷rkúLwÿþý›ü £«ûu¤ûžûËšûäü€”’KŽ ª”ÿ¨þ†©“¦Ü®O­¨¢þx›þ9ÿT†fßh{~yz}]vÐbû_3e e wi e©d©YŠW ?^±jËrøu[v†x‘‚¯†’‡ q÷fÔe ×p~òwÝlsl3q#psL{†‚æ—©¢+—l­| Tgç\fšpÿ²wÿû/…÷š•öß óŸó–õP’ópšò!¡öúšû~ôÍ_ñ½YñôTí€MéÜK ç_Lê|Nì"NëöPè T ãbW ã¸X æzWè²Uæ¥Tæ³QêiMîÕLñÃMñ_Mò}Rò:Sò²Yø·s M”þK›ÿâyGô¶CíbKîîMï8LñwPôMô™Mó MòMNòsRðê\îœVïêLóLõäLóMï¿MïpNïNñ(MòŠMò`LðŠLïpLï0Kð‰Lñ•MïLìÆLìINëlPëESéŒUæçUåžUæeSæžVæ?UæÝVéûWìUëÝTêíUéiTæäS äŠTåõVç{VéHVéJUæSä(VãWWãVWä>WæTVæzUåÂVã»VâmWäÕUäÔUäËWä V ã WäóVäÏVä”W äU ãnXæVêUéÊTçTêRUêTçmUç2Uç5SçÞUêTë+PëÂNìªLêqMèÇPéæRéÛWè¬Væ(VåSWæ*VæoUç—Uè¡Væ)VåÔTå·TåUæ¸Uæ[Vè‰Xê WçŠU ã¡Vä$YæZäŠaåg\ç¹SèÒWèVç“VêmUëOSî¹UíåVÿï5Tÿð´QïfOÿñ¤Oÿò—NñNÿóžQý÷)Pþ÷AOÿõÞMôÕKóÓNð¾LïNïÚM ëXR êSî[Xøµe ´~ 4Ž%WŸ  µ½µ£S©Ô°¾  GŽ˜©R­Œœƒ D]ÿü™Qÿ÷ÌNþ÷URôÉVñóWï{VîBXð`YïàWé—TåÍWçiWç/WæêSäžWæUæ¿Uç¨VçŽUèðXæWæ¦WçrYèºYêZí$]îÑ\îô`ÿõö_ûüò`ûû|cþøtf÷[tú”û ˜¤üÝ£ü û™ ûïŸü¬Žþóˆ æ\‡ýIŸý À¦£ú¤ü¢›’u8‰"”†…Lƒψ‡$eˆ#Hz”uo¡{ br „s€΄&s 3h &V UY ’a k v¸yY‘ÿþ‡Ë¥t§m xnŠ“ÿ‡þuÿ@nÿþo°o2oóon| D»m¬#Ã| 2h9^Ž^×iHp‰xüZ‡ø¼—øò¡ó•Ÿòó—ò“òšó½žõ}öRsòlYðô\óWîèOé\LèlK éWLëcOêoQé TæŠV äÇV æÃVç²UçèTç¥QêrMîÊNð÷PñMQñGTò Vò b÷E€ œþ ä› ®r JõÆAí¦KîWLï”MòlMó×Lô2MòHNñ?Nñ3Oï£Sî‡Qò›KõõHôâKòLï‡Mï3Nñ‹LóÃLóPLðkMî…NíhLì·Lî¬KðcKíÿKêuOëPísOìQéÎSçÝTæ¿Sç2TçæUçpVçôTéõUë`VêUêVèoWç1Uæ)TæÃUæ&UçºUælUæaVæUä•Vã¼Væ8UæêVçGVæU â—V á,U â÷V äÑVå6VæŽVä‡VäÉVä›Vä—VåÐU ä Væ¢VéQUè}UçÝUèÿVé¦VêÀUêÉUé†TèESê°RìPí{Nì4Më‚NëÔNìPOê¬TèMVçWæ Vå[UæVè&VêTVéUæUè*Uè&UçFVçÞUçVè¾VçzU åÈR æèXè;] ãÔf ñ©WítQì›Vé­Uì‰SïWðEWïTÿîòUíbSðzPþôúPþö‘OÿóÝOÿôJOþöÙOþ÷âNõ[Nô:MóHOóLð—Oð J ëûR ê?S íðZ òv ©ŽøŽ(¯Ž &§ 4¸;±¯µ&®¡¦ß´зy¨êšþCˆ àdüü5Oý÷ÙNþ÷SôÈXñSWïWîãWïÀYíWWéOVçËVçäTæùWå´UäUå¯TæxTæsWè~VéæXç Yæ¢SäÅXèXêrXíÜ]îÝ\îÏ]ÿ÷W^ûü¾_ûûTbýù°_ôìgýýÉŠú 9¢û /¡üæ¡ü¥ý/¥ÿÊžýr•ü(ƒù 5„ø šü.¥ΪqªV›©„¨‚=ƒJƒtˆk†GŒ<ÿ%³Ž…ý‰­ (œÕ–¶œÇ™íšX c|G[ÛS R ë_ žo^r”¡H–ÿhŽ „sÞw¬‰’™ÿŒ•þÕþ @qþ°sct#r`osG„ Ñ™ ážé‹w eÊdb iepyþýªŒùZù£ôì¢óŠœó*–óiœ÷oûÏŠõ¶nñ,\ò¯`öAZðÓRízÿ†@…o ©_{ae¨ms%}ýð’ÿú~¢ú”¥õ­£ô2ôÓ˜ôlœùJýŒ÷uô bô]ó`ZîKRìeKì}L ëM éŸQëTèUåÕVåªVæÌWæWæ£Té‚Rí±Tð Wð+Xõ§Vøá[ðÊyÿûc‘Œè„ÿ^€ÿÚlúñWó6KñöJïWLð?Mó²Nô’Mò™Mï’Lð@NñNïZOïOòÚMòüKð"LñÛMñlMðEMð@Mð]Mð®MïŸOðÕSóQóMñUJîçKî¿LïNNï MñlMòÖMïQëvTëVê•TæwSäuTåþTèØTçÌVæ-Wê˜Xë8UèWTç¾Wæ+WåVå¯Væ‰UåßVçéVæ…UåbVèëWí@Vê$VçYWçbWèýVç{WåVå·WæKVåìVæ¡VçQVå¿Væ¹Væ‰Væ¥UçÂUç¯TèÏTèÖUé Uê½TêOTéíSè•RéGQîKOòŠLðçLï±NðbOëPéZTègVéUVçUå¿VèIUéèUè±Wé9Ué°XésXêUëÔVéŸSè²Ué]TêîUëSQî”SÿõTÿöÁiþóÎeþðjTò½RõÀSóNVòXVðEXþòòVûö&Uû÷hXÿókUòQþöãNþö¼OþöNþ÷NÿõNÿô.OõdLòëNï6OïMNï#Oñ NñèSñsUïmpøJ™¯¼~´⢠¢Œ #í–o¡$£ø¥§ë±'±à³é±s°›¤ý±ˆý 5WþÿOÿú¼VölTñÇWòàXðwYîXêÁVæUåuV å\UæúVèrUèáVèIVç´WæèZæ‡[çZæÀZç§WêîWëXç»WæýUèŒWë×^þó"cùùraûúŠYþú¸Zÿ÷¼\ÿödzûÎú f¢û£ýp¦ÿo¯߯ا:ˆþfgü xý ü ¥óªœgLƒuÁ…\Œ¡‹ó†Aˆú’[ ÿ ² <´ôºI¶¸j¹T¸ ±–± N¦ ½›Ë}(Z m\Âoñ 7š;…èl‰ ˆ ˆÉšDž1… pHl;n³q’t;n™g´joœqBh ­ZÇZýîbþ mrizþú£û’¥ö¢ó9œòn˜ó•™õÏ–ø_ø—„öŠsÿö?]ðžXêRèòL êÛL ê³Oê)Rê†VèŠW äKU ãôVålWæ WçîUë€QîTYïLiÿòöhô [ñwj÷Y‰üé {ŽþÅx õi÷P\óJXñNð—JðKòœLô®NõDOòçMïùNïOòOñ²QðQòPñ„KîÏNïlLðûNð…Oð¸MïLð~MóENó³Rò RòãQñçNïCMð(MóNóŽMó¾OðUPî~Qì»RëúTé:Så{S äPUåDSçÂUç2Uè Ué»Vé8VèfUç=Vç`XæWç4VèUçjUèùVé#Rè•Vê"UíâVêqUåVåÖXè VèïVèùVè4VçÅUå2Tå–Uç°UæèWæUæ‘VçhTçšTç Uè¶Ué¸TèGUênTëôTêTé]QêŠOîÍMóùMñUMðõMò¤Oë+QéUTé³Vé&Uè VçèVè@Vè Vç®XètVæ¬Xæ#VêúTí«Uì¨SéÍTêTîØWðQò³TÿöOþö±Sð.TïdSð¨Tñ.TóÙVðÖYïXÿò(Wüö7Vü÷ÏWÿô@UÿóuQý÷7OþøBOýø0Oþ÷‡Nþ÷™OÿõiNôKñMîsMïLOòêOôµPñ›RñKYò†m÷s”!¶ |¼d¯ ¯Ÿ  /[™É w¥Þª`¤§–©į¬ÿ<Ÿþ Lmÿ”PùuWöàUòŒVñ Zñ ZîËXéBUæðS äßVæ»Vè©Vè«UçüVèØWçX åi]èù[èÄWæ¨UçVí•TìÕVä•UãÚUç UélYî[þôdYônOørLöíPþùQvûé–û œ¤üÔ¤ý¥þ¹® ³-°“:aKYÿÕrÿ›,Ú’%‰H„σ¯’ ˜ÿÕ„áŒ+  ® Ò³ú¶¨¶V¶û"¹‘·a··ºµµ™Tt7^€q¤™Wœícˆ ˆh·s”$}#g™_ ¥h ˜v{Šxpws¬júj àf™Zû;Zócgÿ÷=iÿÂg püÈ‹ú  ûo¤ö< ò]œóè™ôp–ô:÷؉÷Љ÷­|üú¦_òúUê'QèWé6Vè[TåUçÙUèeUæ×Uæ†VçëWèŒUèmUèJTçÍTçæTèÎWëTVíTìêTêQëÀNîLñVNïLîzNðÙOìþQë,UìBVë1Uè?UçVèÜVçdWæjWåkUãÛW äCVè—Sê¤SêŠSé³SêrTîÝVñtr‚h˜ÿ'žÿ ‰q^`)[ÿ~vù6“ÿüJŽþstÿ±sû~’ÿú!¤þü,¥ù óŽžòZœôÉ™÷‘÷´‰øÈ‰÷V{ùFgüû%WðtTèQ æ²SèüXêXêäVèzVèhVçÏVæ„Væ¹U çQQêáPñ‰NóÍNöøT÷õW÷gûÏþÑ£ý '– ²}þ]d òpR êÅSëñQíÆMïXêÝWíýVðÕSðòRíÝQì[MíSKíåLî&LîÉMë«OìàTî Ví*TëÑTéÞVèTð‹Rñ.QòPòxNñÄLó9OóPñ[Ró¶Wñ7X ó)týþŸ _¡C  ¨ ´´²Ú†$ù…'¢•Éžs1Žkš˜¦(£ÿ –“ÿ Âü qý õX÷ÝSð]TïéYïÿWé«VåíU äWT ä¸U ãüWæüXè)Wç9VçÚWè*Vç¤WéYëëWèâVæµSéÂTêFTìèTìxPê‡Rë•Që‘IïEöèCõRAñÛBñ>>òÝOüNwüå‘ú y¢ûC®ýõ±ÿ)²ÿ¤›Öe„TûXXmmxVjihxzWyJs‚‚wd>v-mƃ  ª ð°W¬#® F© F©>¦ɪÝ©c¥òžï™%–˜%¢Î¥ºàŽU‚!`„‘„”„Âús–a l_Wi Í~ýø”þxžþÉ–ÿF…Ÿq ˆ_¤^0uÿyˆª„ÿÞþ˜–ÿüÔ§ýûý¤úU ù5 ÷½¢õµŸö’øé‰ú#ˆüá|ÿÿêjþþ—ZðÓWæV ãMV äîYç¶Yê WéÜUèíVèÙVæÕWæ$VèSìdPõqMöÅLöÀLöCRúVmÿ Šü\Ÿý ž— ê€ÿSk ôWìÂTêBRí‘Oí/NðKòªMòqMñ?MñLïÎNïáQî¢Uî>Tñ8PñÄRî™Ví%WîYð@XîðWíŽVð Vð³UîVíUí‚SíRíÕSí¿UíTíÚSëBTê VìLVïSñºRðjOïÍMðTLîGKí×Nî—MîMï3PðSî¶Tì#Tì3UëUè4Vç7Yé VèWèŠWçWVååVã)UãKUä¯UåAUåÿUèCWë0VéXWåUäÏUåÄUäUä¬Uæ4UçFTê’Uì\UéTåUæŠUéôWë³XìÔUí€SîóSí[RícPíáPìñSì9Uì@VïUîGUíUë@VèþVæÛVäöUã–UãµVäÜUæÀVèVé¨Ué‰WësTìÌUí¾UîWñhTðÙRï+QðÇRïRî`Tî–SïõTðWVÿófXþôøXþóXÿñ÷ZñS]ÿñZYÿñ­XÿôRþö,PðtVïVîaRð¸Rñ0Qî~OñŸMòWOïCPïÉSò·SñÍ^ ôiýÿuœÿ½¬ø¦¼­·´|·p±q¬Êšþfš“’€ #Š!÷|« ºü ý ¦–ý|ÿ Ä[ý·QòåTò¥]ÿò?Wê1WäüV ãUäÓVå›Wæ4Yé WèhWæ V åÝXç¶]ë›`íh[é±Y æ.VèÁUë‰TíSìPëRì£QíHî`AñÎAòi@ïhAïÎ=î3CóØWÿýjøcú”£ü´²þ4 þ؉¥`É]4_Þmziq oy"{½{Ãyšwpk` k Ø` †vߊ —’ù— H |™£˜=Ÿ²¡mŸ÷œèšœa¡<§“¤Qœƒšþ)”ÿÔ”þ—þŸ‘£Šˆ€áx vw qáwþÝ‘ÿ œÿΕ\ŒZ| ÐaúYìg~̈´ˆÿI•þ ÿü§û žüÙ£úŽ¥öžöò“úc‡þ*~ÿtˆhüšYîAU ä>V â,X ã´X å^Xè_WêÊXê)Yè9YæWèXWé&Tí®Qô4Nö`NõmPó•Só?kþÿ®Žú ¢ü ›™Š…þ¹sù3YíÃTé2OëÙLí(KïNLó´Môî5>ðJøÂUþþnúº™üc­þÔ”þ4wÄbndk£pH{°z‡uoz®†χq2{rÚmÂl§‚ ûƒ†zã‚ ƒõ„6}%ˆúΗ}˜ˆŸš‘šÿa ´"¬ ¡˜Ô–ÿ™ ¡ÿ`¡ÿ“á…V…e‹‰&†7zQr}f„Š…;„úúf|Yc_Gne{IQ‡ŠûlŒö…•øpŸøë¡öB™úªþ|ƒ"xµrný\_ñwW éûY åpV ä¶X è,X êHY ë”Yë¤Yé‹Yè‹XéeVêéUíüSóBQ÷:SøçVöÞ\÷qÿÿŸú -¢ü $˜؃‘p ø´X ì“Tè=Oê|MìÌLïyMóVê(UéÝTèáUç/VéyVçVå²VäÙU ãRW ã_VèTç_Uê7SîXVïÒTîõSì UíUñìUÿôPSÿóõSòÎTòNTñÒVðUï>VîTðWþò7Xýó¥\þòûYð×[ÿò¸\þòK_þòYYï_Vï[ï¦XîTð0RðÚSíêOð÷Oó8QòÈRðêRøxmú”t÷h‡ûΞ Ȱƒ²›³^¸x¹¸ó¸5­šÍ… #*z !_ 퇣£I±n™ K• !–ÿ hÿ‡Pù PòöXðµYïø[ìÊZèšYçòÌE÷‹NùLYý;„úÏœü B‚ý õs ]r "pÝuºs{µz²q¥xüˆRZ‘ŒÁ‡ê}·wÿüP• Aˆ¼}ž { %y°x]}ýó‹+Õã”/›h™=Í*N¬*è—#ˆ ˆ*šÄ¢™f!‹ˆ …ƒ²‚Pt¦` 6_ ækHx{yÁe 0XàZëe1mp€tü|õrƒòÏ’ôÀ¡ñ”ñT‘øA…]y’v 5zn~‘vý½hô½c ïH_ í×_ ð˜^ ðü[ î1[ íö] í&] í Yë VéõVëžUñMR÷RQùVüœ\ûrvþ9û –¡ü ­–ÿ þ€÷l ÷—W íJSéfPëqLíLïZNñMòãKóJô¹MôLñ÷OñëTð¿XðƒXîŽVî3VïØWîïXïHVîÜVí¶UëvVëJUêSTêmVí{Ví³RêêUê•UëVëVìÓWî@VïŠUïSîSïPòÞP÷‰MöwLô¬MñVLð§MîdNí PîéSí2Sê6TëSìðUèÆVäVä*VåYXå)VåHV ä W ã6V ã@S ä¤VêVð£UíÒUè:WçtWæšVäVäc ñ·_ í·_ ë}c ó]gÿñYÿ4Wÿÿ3RÿüýMöÿGòÎ?ï¦?ðf=ñÐBôcAöGùžPþúZWüþhp÷~ø`sù˜pü zÿ&PxÅwÝtnnÅv¶ˆ;“° ‰»{lzÿžÿ3—»}g‚ æˆüoHlnr ŸvtÅ{ÌÉŠà‹Ý“y’ j¸ V¦ hÃ~|zÌ÷^œï£‚œØ“^†é~»€5s¿[ ˆS´` Ðzþꆟ€ñq Naø[ŒX‘UüW“bø5xôëõ©£ð¼±ñ¨œðÆ{ õÉq ý/n Âu ŃŒ:ˆØxý pûõpü$s ÿAmü¡fö8e ôëh õëf ôY_ îŠX èBXéBWï:TòQôXöžký(üôú müm’ HzüÞg õYVïzQëwOí8Nð¢Oñ¦PñMðCLð[KóìLõtJóNñ‚Qð×Wñ;Xð«WïhUízWì3Xì6WìVìèWí3Wí•VìåQêøRéòSèòTçîVéŒVè×TæòTçÑTéRè|SéYSë®Rî±Rí½OìÜJìÂKñ³Lñ‡MôžNôðTíUéVèVèYUçøVç»VéÈVè,UæMTå±S ä²Tæ¼Wè>Vé1Vë‹VëÜUè TæÏTæ±Uæ_Tç„Uê5Uì›Rë¸Tê2Tê`Tè·TèTêªRëÎTë:Së¯Rì«RëzSë©UêìTê¶TêÇSêXWëŸWê>WérXèôWæ˜Wå¸WæãVæ“XèXî×ZÿóäVóRÿõ OýökQÿò­QïúRïÉRî÷QïéPò±Oó‰TÿòSÿò»Tñ@TîúRì¯Uñ*VôRòŠWÿóYýöÜZÿóTXñ“Yó˜Xñ×_ÿó[ZÿôkZÿõÁXþó¿Yÿóy]ýöµRþ÷PþøyKÿ÷Rÿû¥Xÿô²]ðÒd öDŒü ,­ 8°¸~·,µܹ^½u³.© 0— h„ %ǃ 'ÿ€ *i ©ÿãåó0WàùEœÈ’ ž’ýoyÿÒ^ÿýÈZõXôZðVé&U äžU åVè,XéXéÓYæ—Yèþ\ëM^ ëÑoôøw ù¨~ üƒ{ ûÈv úòy þM€ '{{máXýJôÎIñNFòÊ<ïÿ?òÍ@òôDõÀDôcLùÀMüüÅTøÑcò£tó ¡s÷ ezüØ âŠÏxŸjÔf Ëq}z‰­‹x†‰|yö 4ø yŠü •‰ÿ ‡•Úw¦b ` \ °^)ePmjkía Ómèxô†Áp^W \ÖeYW S 7O R ¬_ !e !bvS^Q ‘QSq q-yA‚|‘ÿ]‘»„Ö‰ñœþ«¤{-Ÿ iœS†¶kiÿ #|þó‡ÿ¾„oˆΊÿ½uŠaîg ~ÿ tŒ Hˆ/~×~ÿj… þ… þùˆ ÿ– =¤ =¦"ž§• ë ø Æ… | „y º}‚ … Yƒ ˆ Ì€ ƒ‚ ô‚ ƒ “| ’s]múÿïv÷wŽú «œú‚™úÒ”û|þTYð“SíåXï›UïPïlPïOñ£Mñ¦Mð±LíýLìLððNòŸNñKMî¼QìíUéÇVéÈVè%TèáUèGUé¾TéèTçLVçUè@TèŽRèùSèDWêJWétUç„Wæ Vä¨VäñVçÇUéÁVçVæ¹Vå VålUæ³Tè#Sê„PìùMî‹LñOí·OëYQå§UæâUéUëVèMVæZVæVèƒTéÜRè½SèRTçÿSåÊS äÈUçUéÄYëTéºRèÜRé"RëQëpTìeVï¨Tð\PòñOñºMñlPÿõjQý÷?MÿöÀNÿôãOþôpNÿòQïýSëäTèëWè˜UçLVæ¤VåVåŽVä«V âñW áXâ1Wå©VçåWìpUîBUî UïðUî¥WïTîËSïgTòTòRñóQò’SóßQÿõXQÿónRþõQRÿõ€RïSWêÂVéœTî,TñÊVñTÿòóVòÔYÿóTXò6Wó'XôØ\òÚ\ñUSýöæNýøFOÿ÷¼TýüBYøƒuú‰–ý Z“L…r…!*ˆ #Q¢ªU¾½²¢Á¢"œ § [­pž„ž\£™¢/Ÿd ÿ n’ý ®‘ý ù“þ µ¡ÿ =™ Î~ÿ 8nþï\ò VëqU è#[ê] îòk õÑkö°xú=y þM€ » … M‚ у –€ ­ Ü€ #~ ë~ óx ‘  ú‰ ž \y AyÔ‚  … e„ ”„ §… »‡ ㌠ƒ  ¿pÓlþþA{ù/•ùžù›ù“û ÔyÿÿŸXï–WíY`î?Zì†OëNíTPñNò~Mò6NðVMîKðcKò³Nñ›NïõQîàVêVVèéVèrVèTç'Vé4VéTçÑVæ*Uæ”UçôVèéTèIUèÆVç5Væ!WæVåLVæHVèzWè§XéVçUåXUã®UåUèSé÷Rë>OîÔLðˆOícOê´Rç‰VèxUêæUêoVéHWç}VæiVçs2t0hu&u ˆ'¡&…·ñ¡šœö•i’4”™ÍŸ<¤àÿ-šÙMü ~ˆûôþ«‹þáþ .›ÿ  ‰ÃwQuÿÚnû¾^ ökøit–X|l| | Ñ À ˆ€ 1 ‡€ i€ ä –} ¹| y ø{ W|0okb Tÿ“RýÑSüûXüþ€VûüD\ûÿ^úâYýÿZùhcô±lõzü2צ‰¨=ƒ5] §^ öf ëo$sJu!lìhZceiæm¡u».ŠT€ÿo†þ ƒ›Û ÿ O°þû‡ÎX‘T ÔX \ óa °` µq@wŠƒ \+yêq°aYnfu»{|„ C‡ zn,b¡[ +Z ´Z ê^ 8i eôcg›i¢wñŽæ£ J¦ëŸ ?š¿  ¾¥S¦Ò§2¨P§Ú£ 2— G ÏŠ ƒ } a{ ¦€ Ó† ¦‰ F‡ ê‹ (“ù¢ j® ª¢ üÊ~ûá‡ö]•÷ Ðù £ûNžýÁÁbó‡bïÒeî YìFOì¨MïæNð6MðôLðGLð@MðiLðŽLðtMñùNð^PïFTíVëlWë‰VèWWçåWè]SæWS åFUæpVæjUåóVäêVå"VæMUåÃTäêS ãÇVãVä¬Vå¯Wæ“XçäWè°UæTWæ%Yç%Wé UíÙTðnQñ×NñjKïPMíQìsRëîTë‹Vé”VçFVæãV âV â`UäeSè%SîSðüSíNRéÌQèÈPèîQéèRéQékPéøPé¯NêpOëÂQî°QîåQíöRí8QêUèYSæUæçUå~TåêTæ Sê½Tí-UìƒUêÖUèîXæ€cæ<^å*V äWæ¹Wç±VçjTçlQêïPðÕSÿõ±Vþö¨VÿómUñ¶TñêUï(RíSðÈSñPïÏPì¦Ní¡Oï—NñSQñÚRòRó1QñÑNîOîOîœOï&NñQMñ4Oð!MìèRìeQî®QòêP÷dL÷yJóRó0X÷ósû÷¤ü 4¡²—"O} 0êp/¹o)l#óu )àˆ*²ž8š!—×ÑŽ•x—š¦ÿü—þü’ÿ¹ƒÿ †û ò…ú=üx–ý ˜ý= ÅŽ݃àcxûf ÿœrúxÌ}æ{Ÿq~?€é BP€ e ü ¼ D &€ ›z ÎvÁy ÿS}³}šl Ï\uRÿSüý…YúþZúýþZýÿë[ýlbüd÷Æeóuióþ‹uù#‹HŸÿù§ïˆÄbec mìuÃt@rjlÐj·hCk`lõu鳆ï„ÿÉ—c ò¦»YŽõ_£] Ó] (Y &[  _ ]lsB}À„ÿö}Éo_R] ²o³yÅs«u¦{rtãmÜh 6f dcrZ ÷V 5Y Z]®itHtDv‹ƒr˜§ j£ Í¡ )¢ “¤ õ§æ§–©Kª'£û™ Î €‰ 6‚ ] N| | †‚ ㇠Ý… 7‰ 5ž X³ÿ‚©ɦ 8ˆ “qùqoû{üÀ‹ø ôžúIœý®‚ŒiõgðýfíŒXè×N è[Ní$Nï•Mð»MòéMñçKñòKñîMñÇMò2LòäOñãSïWí…WëMVè&Wç\XèÜUçT åUæ»Uæ–UæyUäÄVä Uå×UåìUä£Uä¼Vå UäÖUåˆWæWçYWçWç)Vç8WèCYëbWîTUïKQî®Oï›NòUMô¯NñøQíSê¶WéVæ¢WåWã9V á9U ã‚Sç|QíqQò2RñiRíaQêèPèëRç¢TépRéQéËRìÂPîkQíÜQìHPëÒQìãSí‘TëzSåWTåUåKTäUäéUäUé2VìæUìTë Ué#XçÞlìôcêPXæŒWæXéÒUë¨Uë.UítUñ¼SþõöTÿõÅRÿòÞTñMTòSò™RñPñ:OñêPðªOîêNíiNí|Oð‘Pð¤QðXOðWQñ¥PðxNîMí¥NïxMð¥JîóMì½M éOéLOëaRñÇQöžLø¢Kõ“Rõ¸\Ýÿ H—ú ÿ±üò±;¯¥‘f #æp )q $ép $)x $x>„…ŒÇŽÉ‘K›d™ÿfŽô8“þ ®”ý ì„ü (‚û ˆù ¯Žü €™ý Ê¢þ+ ÿ +”ΙþPŽ:„„oÿîu ý2tÈv Ì|dƒ —€  ¡ C€ } {~ n  !| y y üy{ ý ~ o ‹^eNþûPþüVüý[YþûôWýÕTÿXXg÷?kóÛlð/sùlƒ “ žþò‰¬r¢z¤€ÿéþè€pmºm/kÄhbj pqxベ‰C’)— ’ ©¡¤! b±k ýi ‚X 6T á] ˜ .‡ Ï Í{3uºm«b?a ÿl ôn,kwpmuRpYo ÌqZl ¹j~aØX U ÀZgEzÔ{°on ö ,“ u D¥ ê§ Í­ -®w¨§Ô¦¢Èš ¬Ž ¯† X‚ ÿ€ Ö} –} ]|àG ®ƒ ‹ Ø–Õ™ è®{þ )lü=dSjÊ}û H–ù ˜ü ªnù\ióNî‡NðëNóMõéMó-Ló˜MôPMô Mò¬OñðRïVVî8VìˆUé’Vç"VçrUç˜Uç!UèrUçŸWçYægUäüUå±VåòUã´Vã7VåmWåUäÏUå³WçÈWç UæáVæzWç!XèGVëØVì Qì MìzMñäMõÁMñ\Pî©SìñVèÜWå0Vå´Tã”VâoVå Tç™SëAQï–Qï.QíºPëŸPëâQêLRêGRê­RêNSíÔRïQíÉQêeQé9PèCRéÍSècSä&Wä+U ãaT â¿U ã•Uå5Vé|UëÏTíQì¡TêMUêê]êK[êeVèLVæ-VéÔUí£VïUðgUñÆUóYTòRð$Tð/TóVôùRôMOó¿OñOð‚Nï¨Oí>OëPí%OîyPí¨PîPð³RñNðÀMî­Oï,Nð Mî OìOìÙPìòQîŠSò0Sõ"V÷T÷¢Yúg ±Œüôœú÷³þĵ±¸|©¯—‡"H€"Šv !Ãs ÎmÇs °‡lŽ“ë›Q›ÿÛˆqs‰äþá„û €ú ú dŽü˜ÿ×lš ™þÿ^²þó£›ó\§û$ƒ ù_yòëxûLs ‹| â‚ é p€ Ñ€ è„ ƒ í = ›‚ ]„ û‚ ’ Ì} Ú} û9{ úT~ .rcWSRÿüEVüý(XüžYþRÿ“P€cùUqô.oó ðpûˆvH‚õ’‹†Ý}†—ý¾¤þ“–ÿïu„huiÁkíbÄaøj@n¹}ˆ‹qˆ4zx Éiœ` —h Íg ¾U  Q¨]Ä« x¢ ½‘F{pÜp~n7m àe p^ ;e¡q€x†z«~ ê€ÿ{vÿ Po†héa ìa G_áagn›p6eft ‹‰ F•  ߨ}¶ z³[©§¨¤§΢c› 3  ‰ L‡ óƒ Ö É} P| Â}ð|o| ÷} ö q A| ¹v¡rü(rÿnuûˆù A“ü ̈þ6zÿýløð`îóVèORê QíïOï^NñiMò½Lô‚LóSLñ÷LòöNóYNñOðÖSïYWì[VëVêiTç#Tæ¢Uå6UæUUèUéBUè1WæTVäWUåÂVåûUähUä VåðUäÄUäÞVåÍVåVæÀWå„WäLVä»W äßVæâUç¿RêªOë³NîñNðVMðPígTì/UçYWäÕVå»Vå“Vä§WæUæ7TèRêŸRëÂRéMPêâQí£QîéRìqRë.RìRî‚Rî­Rì9OêQêÙQçÄRçKRçÖQåõV ä`T â”V ã°T ã&Uæ[UèþUê.SíìQí&TëWUéwTéÚVë6Uê*Sæ—Sç§UëåVïaTð¯TðýTïQïÐRïwTñWó«VòOSôQôWMò‘MðKNñOðÅQìOOíDPíDPì…PîÜQðŽQñœRñ‡OïíPîPïQï˜Rí#QîKRï¤Sñ™RòTó|[ò©Uõ|[ÿúÐzþ G˜üŸüÀ­(²pµÒ·…± !¥ëšÃ"`s hhûp ý…ÿ"LŽá‘_™ÓœŠ` h2ÿ2úkƒù ûŽûPþÞ’‰ 1‡ô—þøß÷µñŠÅýˆž÷Ó³óŸšú’z.~-„ 2‚ p€ ˆ ܆ µ„ ƒ e Û… k„ ™‚ ‹€ 4€ : ú| úŽ| ©q h Ö^ú]^ýýgZý4^¯Y¥Yÿ¯bû öpù Alø -_þ ]c ªoE…œ‡p‚«„‘“ŸþÒœÿë}qe —` faõ]<`Rb ¬n3€n€°t{bÑf¹ne ò_ .` [Y .R W\ȳ視žÇwNsr.g ‹\ V_ Goi{¬ƒ‚ {^o Ui åk j .g „e‰f¤h¨b+h(}¬Œ ¹“ ¤— ~ Á¤ ÿ-¦ÿL¥G¥£§’¥S› à“¼b‹ ц r‚ ;}­}M{2z ªz Ry êz ­{Ô}‚û£‰ùê}ûênú¦~ú©šü u—ÿ Ì„“tþ¢bò{UëPë“PîöLñ°LòKOñNNñ=LñÐMïÕMï¿Nð*Lï‚Oï«UíMYêYëVëÊUè]UçTTæÕTæITçªUèTéðUåäU â¯VäiVæ`UæVæ VåVå¹VæUæ†UæëWæVäæV ã¢W âW ãïX åÀUä¬TçðPêçLì±MíoLðˆPíRëíWç{Wå Uå&UæêUå™Uå‘UæDTèTèSçQæyRçÄRìQíyQìhQíQðÛQí¿RíRRìZPê–RêþRènSèfSêDTé”VçVåmUåwTæ€Uç*Tè^TêÈSì«SïãTí‡UêTéâUê3UéTè@SèrTê]Tì÷TíŽTî)TíSì4SïQUñJVï)UîäSò PôÎMóLNó|Pó¿PñãPîçPï Qï8PíÏQïµQòPóÆTó”NîoPìcPîýQî¤Sï UðMTñRòŸQöìRõÈVôRþù–`ùR‰ü@Ÿû?¢ý¦ õ« ±ë¸à¹n³9¡&Œ¡xcj×~1Œ!K˜*•—ÿ{Ï:c NV³pþ3~ùûŒø Žú ­þ~ ˆá}û´œò!ÎòÔøªûܦø,Íù•¨øu} E P‡ • pƒƒ † ¼† [ƒŽ… )… ½‚ ñ ç é} € ýÔ| Vx n Pd [c ƒjéj¶[Õcxipl chÿ˜pDhÿWU †Y ,c Ù}ð ‡Öq z•W”Ã*i UZ }_ Ä[ ‡X ¿Z W_pšq@d ‹W ndÆtºqÅ^ ¸` ¤f B\ ÿ[Ï«1£Ø£6 “š'‰Û{ÅwÑmºa «^ ¼g hryFwxs .tÄn±n tþ¼sÿ,j Úb…fiiïk'qö€ Ì• • Ж \– E˜,œŸŤú¤ Ÿ 3™d•È  ‰ Ô… È v|Â| Q} <| P| N{ Qz Ð|Î}‡ˆû*”ú¯ú ü|ú ƒún¡ü *¥þ 9•ÿ }Íiô;Vê…Rê‰RìºOîÝNð†Pñ3OñKñÝMð'LïñNîeNïVOï«RíæVëVWëžUê’TèÀTçVUç TåƒTåTæÏUæOVå„U âéV âUæðUç„Uç¹VæWç`Wè»Uç¯UæöVæ(V älV ã¹U ã¤Xå+VåçVæ”Tæ¤RêbNìíLíyMí‹Oë–RéêVçJVæcUç¸UæNVåUåÏUç¨TèSíURìÃRìêRëMRêÇRé¥SêëTì:Vì=Uê_UéŠTé›UéXTèTèÆTéôSëÚSí­Tì¨Uê:UéSôrRñ6Sð&QïŽPîÏPí½QîNòÒOõuQõ¶Kð¯Pì QìzSíµUñTðEQð©OôºOøˆM÷ýVþú§RùüújøÎŽû ¥žû²ŸþGš_¢¨¿¹X¸Z© q”*“¡E…z ›˜¤[œ>–Zžÿ0’þÍs/^ èný¾€úÄ‹ø  ‹ù ¯Š $‡ Œˆíýúo«ø Ÿ ò̦øNùžˆýŸšþéýÒ} ¸… ôŠ ”ƒ •‚ q„ ƒˆ °ˆ à x… ;… „‚ A€ y~ m| f} rw ýv ³q ¾f ‡f +q udi_xux zk1v+nE]·] ~l¶~ì-q½n ‚’/ˆot'TZX 3g ­\ ‰ÿ ps¯zâwþ,ký 9m<|†ŽDŽEwÁgm† Ç“ /•ÿ ÿàg Sd ¦~ çr¾\ ÙW âW ÜV ØU sZUSO®Y Ÿeka Va Ii4dH¦î¤C¥ú¨ªõ©Š´Š¸{zµl¶h b °\ Z !] f ¿qý}ƒý”û ¼‘ü ¾~þäj ÕdÏcbkxyð†î‘ ;— ÿ—’ ž äo‘“ß™ g› Õ› Ò› — ª‘ †ˆ á‚ ƒ € w} á| r| { é{ ‡| (}Å}þìúš’ü8›üè˜ûRšù ù©ü…©þ÷œÿ ‚þoîˆbè=XëªQë@Rê.Nì(LîQMð±Mó MôìMïtMítNïhNî`Nì]Së»UèUè™Té£TéMUç?VåU ä‚UäzT ä€S ä‘T åÂT ä7T åS æCTè»Uç¸Vå5UçUê Uë%UéÙVærU äAT âæS ã\UæÞVèVéZUëÙRì{MðúNôPñ:RéœVå!Vä³VåUå£Tå‹Uç–SëÈOî–RòûSòÒRï¬QìPìçRð¾Tò‡Sï®Tí(Sì”QìÕRì•SìŠSëOSîZUð?UðÁUîûSìÒSêASèþUéµTèÒTægUéSê¤TéóVè$UçfUçðTè"TèiRé OéßPëôRìRíRð+Rð·PïJÿòüHóÔMòºUòaVñsTñ€SòWò“QðOï·Tñ­TîúUë$Sí{QðoOñ9Pñ SôPÿ÷ðQð:SíVï¯RòBNñÂOðÜNôNÿ÷"QýùN]úûm÷ü>€øµŽû 7”þ Nœ#&k… 'G‹ $ã¥ä­¤J–/˜CŸÿ`›þÞš÷—ù˜!â€b…¼Šÿxþ¿jNtý8‚ùÁ|û «vý On 0ubüjg¥hÃfl°[þmf ûýt z~ rƒ Ó† ƒ ƒ .… òˆ z‰ x… !ƒ Šƒ „ ð~ ƒ} Úy •x ùu?v?z jr Ÿi °iSuimücýÝŒõ“ÿ &ÿô€#yý¤sû ùxÿXƒÉŒŒ$‰â~`¸q cžþ X”þ×tÓk Š B‡$lQ\ µV JR ºP [Y ˜] `X }\ PbgvÁrJh òhg–£-¥ì¨#©{«ª¬˜¨$¡Sšìnƒ|ßq”a$[[Õ^‚m …ü ¹˜û ý›ü’ý"Dh Í_Ím ñ~œ • @– d”@”@’ ; $à ì“ T— ×™ 7— à” † щ‚ ›ƒ §€ Ó Œ| i{| î{ Øz ~H0ŠýÝ—ý †ŸýÚ¢üû¤û=¬ý$©ž Œø}ôÎtòÖcó[Tð8PìÕPîºLïƒMï"Lò¹Mó~MðhMîUMï´MîÊOí¶RëÖVçqWåSTèàTèïTçUçTæÁS åÉS ä]TåVTçðTè¸TççSèCTêÑUé@Vè[UéSëjVí‘YìVèÇTæYSäÇSæ°Vê*VìÑWìËVìÄRë*NëŽOî¸Oí€Rê”UæòVå€Wæ}UçUçëUé¯SîOñÜOò°Sð#QîèQì¼Qî©SñQSñSíÇSë“SìSíRë(RéÉSéJSíùVòlVÿôóUòšSí"NèÑRèþUê¿Vê_Té†TêRê“SèŸUéèUè¿TèqRè©SéƒQìEQïûPðèQï`RîOï^PðNñâKþô6HóHHîRï^UðRð…Qñ6SñòPîNî¢SïuUî÷VîÆXð.RóãQò2RñlSóCOôžOïPì¥QîOLð9Mð~LñÀOô,OþøPüùÞZüù'føú%zút‚ýÃŒÿÍš,Œ%} $?| 0†#â•9¡ >¤ŠŸÌ¢d©¥¦Ë”ʇ¾€Erž|-Š ŽÿB|‘g ^a ‚uü ¸výuú [mý qÿ¦]ÿ…_8jþZˆþþ]ŽþMiü­d÷ws ÿ]€ ?… ¸… ƒ œ‚—‡ aŠ q‰ ÷… ʃ ¸ƒ J€ | îz ½x -x ºt uz Ís k pa|aB^ÿô[ú‡w0‚ x~ÿ“zþ vû wyÿo‚åŠΉ]‰wh ƒdb‚Ú˜ý ò›ýåYmU‡9‹ïnÂ^XS \OžOÇT ¶` aÙeùn?€´au|nél¦¯¨•¨+ª;« ¬ü­œ¬…¬6¥æšæ‘Ï…Æwk ÞgE^Æd gvÿ ‹þ ¡—ý ç’ýšƒÿÔpDb Ãp ª¦ M™)ž '™ •"’ “ ¸“ K‘ ‡|”I—È• }’ { +Œ †  ƒ T ˜~ õ| r{k| X{ ö| !| ë~“…ˆ’ÿ ¡ þOªþ_¬ýð¬ÿ£¦ðÿ ´•ÿ¶‘þü‹ûú wýùUZôiRðíPïíMñTMò KôÉLô8LðïMïÆMð¤MðÞNð®Rï`WèìXåjWè„UèÆSçˆTè³UèdTç¥TçlTæçTçÌUénVëXVêVê>VêgVìPVíðWìAWì™ZíWëEWé VèvWêÖXí$Yî2Zð!WðUPìœM èFM èÒNéçQìáTéWè…WèRUçàVç;UéÌTíbPñ‰Oñ±Qï{QìQë¹Qî3RðRîmSë¯SëRì¦Rë¢QçWRçúRçõSé¾Uî>TóØTóJQî(NéèRê“Tì˜UíFVîSë~Té}SèdTè¿Té TêRë Qì!Rï RóšPóKOð×QñYNñ”MðÄLÿó Kÿõ‹Hò¦IïhNð‰Pñ¸Oñ«Oó€Rò`SðïRðRð£SòÁWò_Zò”UñÆOðdUð RñzRñQîEMìyMí°LìŽNïŠOñ>NóßOýøÕPüúWÿ÷G_üúYmúþèyü]…ü R—ÿ’– ö~Œ~ =¢ »’\Œ £w¦Šš‹Ÿ2£ÿ%•F‚2z Þp ‡xi‹ƒ’ÿº‹’p ²Xµ^/jüërù ymügjý[a¤fù5ÿù’þû¬nü$dùrÿi} Â… b„ ã„ `ƒ é‡ ˆ 5‡ φ Å„ ¼ K{ {wÏw  y [{ Iv u ¡z(q¡i z\¼R|Xÿùfþsfðg ^sÿ¦~þ n|þ¡týs½~å„`‡·Œ~Š]|@tñyÄ„ÿÞþµ‚¹uŒ]“ÿ0sŠY RŒRÕVÙR ²\äiIlMzYÏzr·váq»ªñ© Ш Ùª«W«Á¬?­z¯í®è§¬Ÿ—Šƒ{o Ïf ˜` —j{ˆ ÿ ‹þ x}ÿ ¡r ‰u¶ ý‹ m›ŨѦœ— — X–ã’ ¯z’¡•8‘*ŒUŒ ‰ Ï… ó í~ È| Î| È| | ½| Ì} Ö|{8‰ [žÿ¯þt¯ÿŸª’¤ c—‡’ýÿ¯‘úüÞƒúû]bþ÷îRòYPïêOñ¯Ló¢Kó½Lò¥Lñ×Mð{LïMð¹NðQð6VëðZè¯ZìVëŒSçåTè*TèUSèßTêvUéVçºVéLXì‚Wì¦Vì¸Wì–XîYîsYíˆYìYíóXíAXëåWëùXì;XívYï Zò’Vñ­PìM èÎM ç NêâPí¯Sì_WëÒWéñUæsVæ Uæ-UçfSìñQðOñfQï$Qí PïùQñ Qí?PìÑSî@SîœRê OæžQè QèÜPçèRé SîHSï÷RímPê QêíQêbTíUîõSêTé VèUTè4SéQì{RîPïöQïŸRòÊRóUPòNÿôôLþõûLÿó«Iÿó¸Gó£IóJñLñ¹JñyNòRPôQTôÚVócSòKSò9PôòXôÊXñ«Wí¦QìJRíˆQíGSî'RíîJëLì@Oê-LîØOòþNöØPþù0PýûÙVÿ÷W[ÿ÷ûfüû)uùqþ]šþ Õ¤‰ ´Š Ù ú,«ùSŠp”¯œq”"¸“ç‘ }Çÿ¼{ÿ ¤n Ñu‡ä’Í“Ï{Æ[Þb»gü³jú Œkýˆcü6TS^¹aÿhqÿø:tþùîeü`ùnnþÞ| $€  ‚ í„ %… ׇ † ’ˆ @† ¼„ { Ôuíu óz +}qxðy f{‘o Œf pW úN¢Y¤rÜm‘e Kh ¸zý þ€ü´zÿÄt]yò{¥„ÉxƈY„—€ù{©~£{1{)–àžþ©}o^]W \X ]íX É]•nysO‚‚m3búqSt”¯ɬ!,ª lªsªó«ð¬U­¯X¯Ü«å©&¦xœ*ˆÀz2pOl7lÓmªtl‡ Ö”ÿ ÿ R†ž~¨u By ·” S§‡¯õ¦rœ ˜6– U“ ¸  Š£Ž ËŠ ÍŠ Š Ì ¥ Õˆ Ó„ µ u}mz ‘y k| ¤} ó傎ƒCŒ Ÿš@® ±Ö­Ú¥ƒŸ ™þë‘þÓüü׉ùýžfþø”Rñ‘RïŽQò?Nò9Lð½Nñ"NñLðìKïÖLïWNðœPð’Uì[Zê>ZíÙZí-VêãUéJTè+RçTêuUêVèWé5WìàXîØXííYíUYîµ[î/ZîZí%[îYîtZí XìËXì¯Xí¿YðD[ó*XñPPë{L çÕOè0Nê™OíÁQíùUé VçUæ²VæóVåÕTäøUæ¿RíÖOÿóõPówPñZNïåPïHPíHPìªRîJSïcRëÉRé¡SëjQê9OèãQécRì@SìRëMPé¦Qé¶Rè÷Rê¹TëŠUéRèøUç}RéÂQéîOí,PïgPð†PðÅRòJRô NôŒKÿõn‚a Ö\ ;b :^ þ`„nyxðˆÿù‚…hÕYfpW²P¬Šªg¬¬ܬ ¬‘¬E¬©¬«Pª}¨Ê¥~˜†¶xðs|q–h ?c ‘s †ăÁƒ•v¦dÜbí€ Ñžþ “°Á®=¢D™ Ò– î” >‹ Uƒ l… Æ… ½‡ ¼Š â “ ÎŒ è || ‡s·oÂsøy ©| Ƀ÷‘þ Úš#¬ô´u°M§ þ’šý î’ÿבþûÑŒúûÏlÿ÷½TðnTðRô©QñOílNíäMï~Nð1Nñ=MóNónOò’TîaYìèZëšYëÔVëûSëRéQTçDTèùUè7Uè­Vê8Wì£YíòYìËZë…ZìíZîbYî`YífYî‹Yî–YíZíNZî}Zï»Yð`XñÊWñ˜RínLéLè…Né¦Pë;PëÀSçVWåVäVå}VåœUãUäRêŸQñ?Nô†PñIPíOëÚPêØQêQíÙRížSëRSêîUí1RìµQì·RîSïTîþUë½Uè&RçŸRæ¯RçÏSéêTé¢Té|Tè»RêÄRê?Pï@Pï5NðÅNñORòRó·PôžJÿõ´Nþø.OþøIþô¿JÿóåKñ§Kð¦LòsJó Lÿõ¥NþöòRó…SòtRñ›RðýRðRñˆTñûRðßQòSôÑRò¿QîþRíSîcPîNïMRñ'OóbMþöyOÿùVKùôW÷ _ýõ*hüüè{k— (¢ gªå¥Ñ…•“} %W† %)• SŠ &ä{ 'Fo¶jns Ósÿ4pÿ̃ÿ hˆâ|ý€wˆ•‚Cucÿ†výçaÏ`ý cûþPófJÿô4Jÿõ÷LÿöŸJÿõ[Hÿó•Lÿó&Lò–LòÎKóªMÿô¥OÿôÌNðòPîŠOï¼NïÿQðäRðÏRñŠQñ*Sò*Rÿô:QóÓQïRí{SírPî`Oð!Pò–PófNüø`QÿûVRýÿjZúMaûø€üE§O¨0©4ª¿©›¢­ )~&´"$…#ón'1g Äb ½dÿ ²^¸kÿÚ”ýù›þÚÒ€ W}ròw ^s ]ÅUþÿ³`ûûþfûÁh •f Ûh Š‚‚ÿÒmŸnþÿuü4{ üÄ A‚~Ž|Ÿ‚ ®†s„ Fƒ $‚ O} Az Öz ~} \ àu ñi rPþmKûZKúÿtOüÿÛTýlYþgþuþ –y½y]pßt±xyž„ÿ# þF—艡‡Ó‹†R~®xuÙrérBs ²wµv[u)nbkÔk(càZ ‹ZÄ^ Ar%p»bSPøUŒfø± ᨠۦ˩«u­«¯6®Ò­P«‹©Ó¨#¨!«-¬v¥­’s|éw1tAi^ °_ Åi !quoãh(j L|kŽÉ•#” 7 v‡ ~„ {ˆ”‚ [z 5} â… W‰ [‘¨¦Œ®j’çOsCeKi–}dŒO“ ¾ S¢ÿ '¡Z½¡ñ¨é®P¨œÿ%“ÿÉ‹þÓ‹ýþJˆüû\sýûöVó&QòANó·Mò^Nî MíÓMï[LñÐMòwMôLö°NøQQôuUê×YçjWæ•Vé>UìeRëéSè"Uæ%UåàVæBSéôUìáXìXëjXêNVëåUîÛXó XôßWðdWîŒUîÄWïæYðmXï]WïÏXòê_ü÷Xÿó›QïÅMíŠOëkPê˜PêzPè¡Uæ¨VåùXæ8Væ£Vç1UèeQë÷Oÿö;Mÿ÷QNðÃOíðNîLïãNðŽPðRïcTï”VðYXð9XñgUòRþ÷YQþ÷ TôXVí1UèPVçqUå%SåµTèýQê’Rí«Rì+Që‘Qî8Oñ«NóNñfMîeMí MîwNðçIòbIó³KôeLõ–JÿõZKþöñNÿõJMõLóLþô>Nÿó”Nð¹Oí Nì_MîSð}Vï RîßQðºRñøPðNð´Qï‚Sî„Rí¼Më]Nî³PòkPý÷}NúûÙQþüaRÿûó_þÿÜrøÿ¥—ûé¥ò±¿®jª7¡ ›ÿþ¢ X %†!rƒ%¡~ %7k%mi ÃcYÿ¬Xþwý…¤ýª¡þ…~½w uilqÖtîz sy ¨\ ãPþŸWüþ¬dù~rÿ s )h „sÉt™c€kSvÿByþ¾|Ó½~I|»€ °ƒ g€ˆ €{ Þ{ Þ} H} { lm ]~Jý®FûþHúýßQü$PýÌQýìYÿjÿ sppPlöp^oRnµ€ZšÿUj¥‚X…*„~#|©yAsuqËp wpGn§n…j kƒfd_ UîUS“] ˆc e ·V WSØf1« ¨ Ö¨©ï« €¬ý® ®!(¬ª®©רA§­©¬¥«ÏŸ‡Hsùl%g Ï` _3f •o Uy{~.v’s[x !wú€žŒ !‰ ø} þ| ¾‰ d‰ ‡z ªy x4† %Œ .– À™™‰ 5†  »rÆoÎ~/‰ ’ #ž ˜¤Ë¢ÿ½ Ÿÿ3Ÿܤ!ÿú’þ}†ü ç‰ú ‡ùIƒùÿòwüý©XóÈLïKJðéNñ”OðKNðÐMðæMðVLðËLð§Lñ_KòÇNñ8Tì>Xé·VèäTé›Uë£Të Té8TåÕU ã¶U åšSèTêæYì+ZíIXìVì@Rî%QõVÿ÷cUóúWð]WðIWðWñWðUð×UóãXÿõjVò]RðOð]MîñLêÆMé§N ç…Tæ“VåÉWäUåòTæÊSçúRêNòçOÿ÷ Oÿô3OðNðLð“NñaRñ©TðUñáVñjUï^UðIRñÉQõNÿöáRòTíEVéVçOTæªSærSèÆSë–Rï=PîæPìÚNîQOñ=LóÁMñâMíÃNëVNìtOîëJñœIóKôcLÿöqKþ÷½Kÿö†MôÒLó6KÿõrNý÷uNþõVOòàOîFOî'NÿñåRòÆTð«UîrSï RñÀQðBOï4Rï¯TðÀRîqL écPìAQòŒOüù•Nøü·OþøûTøŽtÿû‰ùv«ü¡´¾´®²†¡Ú– S‘ ²‡EŸÿ Õš¥† Ét (Ën $5k !òiàY GUý_wü ýÛžþ6}Lp ûkñl ðqކ E‡ÿ™` ÒMþ2QýÿÚWýhÿÎn [f _\Ha;`ÐkG|}z,z/}4|y}‹|È|¦r ìz ¯yS{ v ôx_v¬t ún _çMþSHüý(Jûý¢PûfNû³KýÆSþodÈd ò_ +d vn $o‘l¸|VŽZ 'ƒËŒäƒú"5~u­lxhµe mEmœkOc Öbù\`W ¨RRO iR ØU Ðg ³j ™bÀ`­©eª?© 0¨ŪQ««¬›® M¬!᪠˜©Ú©§Œ§(©1ª‰¡F‹ns•c¾e ×i gl KnþnÿÂw f~‘{ry½z›rq|øŽ_„_‡]” Ù ›{ ßv ø~ S… EŠ Š ç† Ù} ȃ Õ… |wil³u· ƈÏžS¬.§Ú¤±¤Ÿÿ曎ÿ ¢‚ü –€ù ‰ø …÷Y~øÿµuýùÎYïaIë¨I ìKïãNð+Nï´LîŸLî*MíLíuLï˜Lð¸NðzRïfVíÂVêêTègUé#SêxRèƒTåKT ãS ã_SçäUêWìZYí{YìvWëSîyOôÑQÿöÙRóUUÿó|UþôçVþõoUÿõÐUòÅTñRÿózTóGTó`QôÛPõÌMóÇLðFNí$Oé>QçÒWå“WãÛVäœTæ«TçkRéÓOî–OöÍLõ§LòÿLôÚNôJOñãPðÒRð´SñrRñöSðÀSïˆQï^PóàPô+QðÄUî\WëíUêàUêÐSéúSêzTìRïçPðæLîÈMï¼MòjLñFJîÿLìÃLê^Oë¡OíÊMòpKÿõyJÿõhLÿö¡Kÿ÷SLÿö#KôÄJôƒKþ÷PMýøÎMý÷ëMþõrLòõMÿôåOþöVQÿõÒTñSTïXSð:RòiNðÖOï±RïTïQîäOëTë×Tÿó÷Püú OøýÌPÿöA^úV„ Üü <¶þ¦·xµå®ø“7z p}Z{ u•ýê£ÿ â‘{ss ’n!ônl[ æRÿeü”ˆý õŽÿín>i ƒvðºn ‚iõŒþ—’þ¦kPLÿBOþ‡Pý¼WÿK_ÿaÿjT\Vàbþ)kñ}Œ}ÿ`{ÿyey {ê{+pEeÿ!lgq ×wárkoqqÈoÅcOþqIýýÊKýüÅNüÿþLüÿ%IüOüxaÿYc  \\Çi “o _pBxôÿ„þ õžÿsŸÿ3‹L¡ÊxŒibe»` Y ‰eÊnƒm|b 5\ OS ÿPÌOP jM þK ôO 'a t (n\ {©¢­$ª–©‡©üª_«K«Ô¬:« ©ö¨§S¦^¥»£û +•o}¡gpe Np )yÿ•zýjuÿwËzøv (ošmWmˆu¯… ŒŽ“þ› þd¨ E› su„x Ý ̆ Ì { FvJ Ê ‡ ’ ‡Ž ]…«”ü¬Ò¬€©Ä©à¥ÈþÐŒÿ {û¸ƒ÷ ¶Žö †÷¥{úüuýô>eí8OéGJ ì&IðVLñWLîvMíãLî¼MîLîNïnMï_NñjPòkTíXêBUèrUèuTéURèÏSæ7S äT ä\TèTêWVì2Yë>[ërYêŒVí´Rò‹OóPò×Sþ÷ÚTûûòVüûJSþ÷#UòRñžPò¨QòùSò|Qô¨Oô§Mó¾Lò:LïÄNìXQê²WèºWå~UçÈUènTééTêrRîšPõFLö8KóMôÜOõCOñµPðPðÃQðfQñËRðyRíæNíQðóRóêOï™RíÀUêîVêTTìÍQí¼TìSìSîQïMï—LòEMóoLò£LïLí LìÃNì^Oí–PòµLó‡Kõ‚Lõ KõIôÖJÿõØIþõQJý÷ÙLý÷oMý÷5Lþö×Mÿö NÿöOýøšQóUñxTïTð#Sò’PòMðÊNîRîRî]TíWXîÊUóEQýù¤Jùú’Yýü#r—˜.ª°šµ2±ˤ›Žþxn`ltz –’ý™ÿ ” v„%{sv r;\Oý¼XþNoý§tÿ¹bÎ_ rÿlùítýòŒýOšÿK|€VþôOý-RþÿßSÿÿB\ý8auUÿ]Rþ5aþÿÆgÿÊlÿ•rÿ¹vzz zÎyŸkÿl`ügjv wnq8e[h¨nvkýódÉQÿPHýý™Jþû-OþýßMÿüCJü|LûŠWü °\XÿlZýÃcþ›o qq¢z±”þ¥ÿ±ÿš¬}”8~§t+c5f¡c [ æ_ynt lê` ËW ÛOáO˜P O ]PFZ j_ l h ’V K¨¿°=°!¬Y¨ó©*©]©ôªJª¨x¦å¦2¤E¢ø œk•f X‚C† Ÿçª7¨^«¶­l¥ý –ü Ž‚ú ú„÷ #÷ˆ‰øhûø>|þñ«xî°aëÛOî2Hñ;IòOøEMþüuRþÿÍXÿøzú\“ü ï¦ç§/š&5Š )߈ &k $ÔŠ ppÜbÿôýöžþ Ÿÿ™‰Ik¸k Qs 1i “_ )] ‚j 7i ýwN‹_¡úè£þ‹¢ kž þ……ÿ×zÿt]œVÿ_ÿ¨q¢uí~ s ígBn¨xÿÿ{|ÿ±yÍp Hy-~Q|ÿtïivqé† ˜“El %_¶gý!jÿÓe„bþ»aÿÂd^YRTÿ”VþPûWLû+K^lÿ hÿ sÿw‰ÿx”Ä“u‹Öƒx†dƒž„»‡•}©oirp tw,zÈtorsho;f ŸZÖX þY ùj "s™póiÊZü­“à–/’dåS“™˜!¡ô© Xˆšy`‘5™£žÿö™þ@éghf ªk oog å]s]Šf 4j žm kbe £a ea }rÿ9‘î ß•Š 0ˆ X… ÏÌz ²z 5x ax ¯}»„'‡”…W^‰Q“ ƒ‹ Žz ÃxßvÁx8‡ ÿ §þÝ—ü˃û´€ùïŠúÿŒþ÷nÿó¿œýøx¢ýü]Žÿý]\ú}HöIòhLñàPñ,Oõ¢Oú·Oû¦NøïOóŽMñØMðîTî„XíÚWì¼Té—SçúTæªTçqSê™SëzTæjT â„T ãyUæ1WésWë–Yíô]ÿñž[ÿóüZñŽZð—YñDVóíRòÿPòhSðOTðlSí,TìþXðTñ»MíþMì»LíRNíEPîÈRíSêYA[ˆ€  ý®ÿj©¯žä|ã` ‡g ¥dÖhõdÙg Xk Wt íŒZ£ü °ük¦ ¼§àŽþþ‰‡s[ØSÿÿ£Yÿ#iâw Ø‹ ㇠Tt>hepþæy\~z y/{X|u–o­{™Œ ŠŸžyzªf^H`bóoÿsXsßj’-…S~L|}•‚‰”mš"‘ß}"fÔg^~µŒ”W”€‹g&_†d ÿl Žm ×f a^–gÿ¥s Ls Áq pm7jm if _dÖx¬†H‡è‹(’Ë‘ „Qx ]s ‡x “€ T~ýé…´ƒ¸4ŒQš “ û‚ “~Nc{¢| ÿ ›þ]‘þ.ƒý Lƒû­‹û}ŽýúÕ•ýör üùi¦ûý –ýýjú4HôFïjJîßMðhMõØNúìOúƒPö*PõtNõMò[TîZî [îWì¦Té¬Tç@Tæ SèRçÅS äƒT âÒT âMU äÀWçDWë,Yí|\ÿñlZÿó¹]òZî'YîYð4Uñ´RðÍRð9SñfSïDUîÅVòáSòÊOí~LìêNî9Lî¥OïlOï*NíÈPê¨Sæ‘VâµVâ7XéØRïÙMôHKõTLô4Lð]Lð¤KðËLíLê}LìªOð Mó¦KÿöŽGÿõöJôCJðöPòØWïØWéƒVæTç+UçgTçåTç¼VéƒWêFTê!QëˆNîÅPíæQê~QêNíÎNðŒMñùLð¶Ló LôòHðKñXLÿö"Lýù(IõÌMõPÿõµSóºOðÎRìöRìÚUî¡SîKSííSî¯PïøQíÖQëßUë0TïèOñLøÅOþçSüáaúûM•üŠœý sœÿB¥Ÿy$"| %Mz!šœ R u\~r ýý®©‡¥ø‰ÑkDmà_ fãiÚc ½k 6t Êz´’»¯þ=²ÿq þ ^Œÿz} c ©Tþ7PÿýtSñ\Zb Àƒ ;“ ‚ i¬hynþ(uô}o{ vôy sm…~«“þ þ™¤' ÛnÇ]\ë_ÚqÈw† F•« D³þ©¤›  Ÿ û” þ pŽ ø”‹·…S‹…{ Çw ¾{Ë‚þüþ@ýƒý NŒý‡ŽüR‡ýÌŠÿ W‘ÿ c“þz—þùýùÑ¢ýúœýýü~ýþS÷øIðîJñHMñfNòRPôsUïp] å˜j è!tôQUï[PínYìT]íYíPTëÏRéýTèKSçÎTçTèSéÃTè×WçNWèaWè÷XêVYí¯YñÍYóYYñ.Xñ,XððZï‘XïõSðQðJTï£SðBRòÿQòvOðŒMðñKðYKðÚLîVKì/LíòLî Oì²RèETçUYëqXîQïâKñyKðÏKí‰MìVLî¼Lí(Jê]LìüMðQGò»Eó~JõLJôMÿöPôMîæSë©WéŒVç6UæjSç Rè¨Uç¤Vå{U ãÚV äbVèÔUé‰TçàSè9Pë¹RìQé{Qå¶Næ®Qê¬Oé½OçÕPìLò¡Jÿò=IÿöÐMýûòQþøRñ¦SñêUñ5UñUðUîVíéSîQñ‘OðüNíÉMíËOðYOö%QÿüŠVûÂpûC¡ü '¦þ!¥ÿ_°æ¬s–`zîm—b4isµt#É|!މ>–›K¥9•ÿ5e vN £[ UX u\ârYmVgË€!Œ*žJ”ÿÞna^ RUŽP”Uüt¸høvþr ÕŒ Œxï•þ m™ Š“aŽï|vogUhý2s•þv§ÿ2¦ÿ8§Œ–ÿK€Á”z† [y}uxszpèno Pr sxý E——–×…ïg…d P^ åhÜ‚hŠiŠN†¤†È‹%œŠ†ï~³t´d œZ ½W /[ [ >XéY Ôb KsšqR` aUžPn[ lq áx4Lœ ù• ç“´›®rmaye 'fÏr ¨|ÿ ¹ÿ Ö†þ y…þ ¢|@‚x‰f€˜vÑnðb ¥_æh eq"z~„ß…¶yÇ„)“ ¯† µt Öx ‰~ƒ†{” -¦ À®ÿ ¨ b¤ À {œ ”£ —çŽ D˜Ú”¡#‘O º… >v »yš†þ6‡ýØ~üÏ~ý=‹þ Sý i‹ý Òþø–ÿû–ÿÆ”þúÞ—þ÷ ˜ö…–øJ€ûOVø2Kõ!KôëLòôNñ4PñÞYìæm éeäÚuîâtôÔVìUYë\ì$Xì>TìTê Ué—SèÄRçRçâTê UëzVêùWç¦Wæ¶Wé€XësXîšXñûYñXðE[ð,[ïZï-TðRð´Sï˜QîPðÂPðNñ€NñãMò·Mò‹KïEKîjMîLîÈNîNìRí¾Xî±YîeSïùMðzKðŒJíÆKíäKîþKíÞKìÅNì&Ní¾Iñ¼FóÏHþõºJÿõJþö5Kõ™Jï¤Qî=Uì©UçvTæìSè¸RçæRåþUäûV ãÝWåWéèUè‚Uå®Tç¨Qé§Që+Ré Sæ'Rç Qè}RèSQæQæ§QèôNè¥Kð‹LüûëOýû×SÿõDSþ÷ÃUþõzUÿówUôÈWòRUîÜSí/OïnOðdNîMîƒOò”RøŒUþý5ZýýbyýUÿßÿ›¡ý ¯ÿŸÿD‘þ }ý0y Ü€„w">u&øs $†y‡†Õ”9“ý¼Žÿ옌êc1Q ¤U±`^lÈ}ÿ€wÿ©i d ¼w9ŒU¤ÿ°”ýl‡üyvýbf Kg‹þ´…ÿ lvÿx„ a ­s º£ÿתþ†©ý/¨z”\yàd hü jŸˆ €¢ÿ .§M­ÿ7§Úžþ¬¨HšÄ…'t4r¦rk/n os ÿxþ|“¯¦ƒ© C– p„žjà^ }d '|!…®‹ÍŒù9‹sŽˆÕ…ð€¶rbA\ {^ Õh Õb j` ´U }R‰b ¶hehÆ\ ñQWïc 9g ò£øÊ›!£C¤ P£ɨùœ}IjÉo Îoÿ qÿ hzÿ 5…ÿT•ý,—ý؈ÿ ‚ £„n€z/rwf ÐaXh zr Æ} y†ÞІ‚ítô„ yšŽ y5w|pƒ‰ŒÜ™ÿž–œ  ϡ࣠ᡠË$… ‘6µÿü•þ˜–ý«“ý õ‰ÿ̃ÿsŠÿ^‰ÿzþXuÿF‚ÿ éþ Œþ †“ÿ›ÿñšþ ¼–þý™—þö®•ÿõ öó}øXóJKó–JôMó¸PñlRðW\íþiç±RÜë] å4wôñYìXíœZí VìÜSë‡Së*UêïTé€Tå&S ãWRæÊTéLUèæVåÆVäÔWæ=VèñWêáWîÚYïZïlYï¹XíŸVïéSð>Rñ°SðÒRïWRï1Pï“OðNðMñ«Mñ;Lð“LðHMïŒNïpPïOî%Rï>XîXíVî¯Oï|Lï Kï;LïÜLîMìÅLíYMí;LíÉJðŸJþõ3Ký÷6Jþ÷¡IÿöHô{Jó,Lô›Qð“TèÅTæUé‹TéþRæ„Vå5WäWåìWèWUéYUæuSæ[Qè±RêQêßRèQèœRéhSèâRæHSädSä±Rä;RêSNþ÷Pýú·Uÿö Uþ÷ñUþõèUþõˆTþöÔUÿôøUð'RïžNï½OïÿNïŠLð€Oÿö(PþøÇWýÿ"aþú‚ýí~‚ “þ1›ÿð…þJ~ýšˆýË•üB‡ü!×y% q!zzì…>’†™ýô‰¡€z~ïm -YW¤rb‡ÿÁ‹ÿî|ynC[J^ r¾ ÿ.¬žý0ˆÿ} { ì’ÿ†’ Ãvw‡q a „~ JœͰ÷2µò¹ÿ¯ƒŠcdlhüKlßz ©‘ ¤¡R¯9³9°ÿ-°ÿ§¨û ƒxEoþ§o–l…m dr üvP†ÿ¯© c­  ¡Œ¡ÿÍ…ÿ„m©j õt €€ˆ¶‘ °’ŸŒß¯ŠÕ‡S€~l’^†_ >f olVn2o] iMLR a[2iŠ` T^ßi­n:­ò<œj¢ © 5¬ë´;¬ c‘ y\z¸uÿ Un q ~”þ¢¦ý þ-ˆ E}V€Š€…t¶h /i :q v ブ ‘h‹Ÿz’x í ¥}‰uZuT}Šÿ‡çŽÿå’ +# §— ›G’ :ƒº| x„š…aŽ©™þ)šü“™û6–þ ŒF„ ‚ÿ)€ý˜ý(‰þ öÿ … §Œ‰žùžÿ ˜šþÿv™þ÷­’þõ$’þø8Š÷.dðLïçJó^Nò_Pð¶RðpVí+^ é^^ èÀ` ì~YíYTë¯VìWìÌUìØTëKUë VëÝUé¾TæVTåSæÆTèëVçVå:U äŠUæãUèaSéWìXì/YíkXíþVî"QïþSò*SÿóÑWÿópWò2SðzRïWPñÉLï—KïILðåMð{Kï¡LïfKðMî?OîóQíuVíˆZîÝYïßTïîKíMKîüLïïLîeLíˆKì¤Mî Mð¡Kò×Ný÷0Mýø"Jþö{Gô HôJIÿôóHõŠMõlQëžSçUé¥VêTæìWåWå¾WåÚVçßVèTæ?SçàQèÝRëkQë“QéQPèÜRèôRçõRæXSäSãWRã†TæuQïjTôdTóÚUòûTñÊTýó:Sýõ÷Tò†Sñ¤QñNMðíOð-NñNòOÿöOüø~Süÿ oü‹ý„þãuþvzÿ g ·xÖx¾kþ©Šü j£þ ,œ ª†s¾q‹{îÔ‘þE‘ºyauBzéppiâ‘ÿ¤žþâ”sz°k å_]¸_ ñ{É™š€ƒ@‰Ç‘ ™’ ‹ (v DpélSOdêŠZª÷3¹÷Žº¼‰•'iKgýˆr"w{| Hˆ¦¢æ­*´ÿM¯þ^¬o”JySh üuj!k „n ¹o qäuÿ·˜ Úª±üv¨ü ›þ (‚ü{ Œ| W|&…ß’ š‘ ·ŽÚ™6—gŽ¢sâe:g }hhk»oElÌb =R§N ÎT ”_ >^F[oh ìo´uÞŸü˜-¤ x««ë®ä¯“£o“-ˆb{½k¯e t ³‡ÿ«—þ,šþ3‚So zM‡  nÜo®z —Ž• Õ’ ‹Œ ý„ i}Zt®om•o7xÄ“ˆ Í’ h“ &Š Åü‘… G€ z-{I„ ª„ YŠÅ‘ÿ€þßþRþ (Œÿ ›ƒ Sz|ƒþX”ý—þ SŽ € „ꚇŸÝœÿÙþø·•þ÷!”þùyøÜmó¶Oñ²HóLôzPîQìñQì#SðDTòäSð‰NëVPèÛUèWVë|Uì TêxSé\VëóVêMVéVéCVèNVç:Væ#Vå\U åIUç¸Vé»Uê XëZìj[ì Yî¸VðPòWQóTþô­ ²±t­€®r®Ê«k£•ÿ÷€€e´eowu Å{tjÆw"ŠŒjƒ¹ƒr‹“ Ç–– L ¾ŠCŠ ´}RrŠl Îi En |ùŠ Ø– m—  Ž~uv²t²v†‚L† g†ÿ ‹þ Ù†ÿ›yøwgƒ‡—ÿ ý˜ ܇Šþ*¡þޤ ˜ £ ’Š™:žÂÿØ ÿû‹›ÿù’˜ÿùr–þû3ýû'Zó’LöÖMö^MïìOê¸Pë"OîKÿõWJÿõKõAJÿô½IÿóIôÑFópGõJþöÀOñESìÒTé¤Wæ†Vå~VèJUå$V âU âÊU ãSæ Sç=QçQçLQèµQèÔQçRçVRæyQ ãSäyTåBSåCSæ?SæôT äTåSçTêMSî¸Sÿñ¶QñÈMí LêçNíÇNñaOòAOþóøVôç[üÿªwùˆú’™þ”g‹ý¹zÿ[ìYí(XîèWðRðÂPîïRÿñ³Wþôµ[þöÝVÿõ(SñgRïx«™ ½¡ߢý f¥ýv¨«°¯¼« …ÄJGJ^jj Xë^ÿIˆ òœÿd«ȰTœÿuN¶FýAGüF[¾p)€¦„ ™ 1’”®Å­Ñžÿ {Þdþo…vøvHo¬r8‡ -œÿ‰ª5¥ɇ Þf ×]‚^v_Rc)p Ôq:b øc ›wŽÒ¥áŸÿcou”£ÿðšÿŽŒx‡þ•)˜‹€xýs c çe‹y‡{VkŒb :[ qQáGœLÒZÍ_ Àk ?oôk (·a·Z´åµ1¹”»ß·4³=´µܵÕ±Zªœÿ@‡ÿ%y PõWó cýûœtüŒýšÿþ$‘üøÊ™þ…oSD3@ý…Skhý‹„—˜ ­ €û ` ¥R‹PÙyÞv«¦§ÿ¢ÿƒ§l­ݧŒ¢þh€ _MËHBX†d ë`iöˆÿ ~”#šu¤ ŒEyÎb mQûjúþqßr¤~‚ Ol | #“¤˜™¢ÿ±” p–p ¢q£tVq–rù} ÒŠ (£]–_þF{þgùX TÑh m šf µb e,€.¥ ˜¸¦p7‘ÿ,¨ʪ>Á‹ù‡ ݇‚ªƒ‘¬u ,f t_ ûqôoB` à] ZzR¦N "Y è_ 4e ¨j Ìi ½¼•¶²‘·ï½ž»š·p´´ܹN½ƒ½C´¾žÅ…ožc ¼f qnøwÿ÷‰TœQ¨ üª D¨§ ¶¦ ̦t ç”´Žª‘’—Sšÿ áŸÿ¡þ pžþ Q—ÿΖµ”|Ž •‡ Ö‹ aÀŒ8Žy–F‘ ª†2Žöÿª¡þ ¦þ ç¥þ5 þ m˜þòš ì© é¯ }¯ÿ d±ýè±þ]¯±«X«ͺÕÃþïµþ Ìžÿ•øª’÷ß{øøYô"OøUKõ1Mð%OîÂQí³QìNQì«SëdVê§Zëœ\ì—WêKUç.TæüUèÁUéµVéWéSXéãVçÜTåKWæúXèéVè“VçÉVç¡Xè ZêpZêZê Zì”Ví&QîSPðåTÿó¶UÿôRÿô\PÿôQó†Qñ9NîRKîêMñøNòLñÇMðLîÉMëvOêZRé UçQUåëTæ[Ré]NíEJô÷LöMKô?LódKô‡Iõ GóÌGñmJí-MëyOëºQì¡Pï*Kó'Hô5IÿöHþõ¶KÿõMöJó LñOò!NòqMîÍKîãLðîKñ=PîºPê}QêPìæQê¢Sæ÷TæQåÒSæ¨Tæ‰SæOTè(SèjUçÓUæ1VåµWåƒTåýQèMëXNìMì@Lë[Ní°Lï¢MóROþöWõpaþùevü}‹û 0œüP™üüu¤þÍ„cQâDÿ-Xÿybü ”jg}ÍŽýX¡ý@‹ÿÍi d Keÿ Éx ›ÿg°ÿ1ª‡¤ù¦E¥µ¨6™- ±\üI™Uÿrmgpðx–ÿ ÉŠò“ —‰0L{ý¹{ü˜ü½Œÿ ŠpxD~ý ¼m \h ªc Ëv` %£ÿè‹ÿ`… ¯v øqt‚uyw|N q›þ½œÿ¦© û£ÿ  ÎU¥N³_ Àf Ëf :b ¥_ÑcƒŒzðm»u×™ÿ®‹±ɰö“ t€ {j„TÿÞ“ÿŠú|‘kzmÞ~”q÷a u] _ód @XÞ\¶_òb ˜f f m¬ ¹»¹­£¯þ·>»ϸF´”´A¹R½™ÀáÁ*¶O™Ë|f $_ Eg ÇmÀ€ÿ ›—â ͤ ¡¦=ª˜­¼¬ý¥ä*˜èžd¡î£ð¦¤ÿ m ÿ ÿ ì› ñ˜ ±“ ?Ë‹÷€y Í€›ˆŠÊ•bŸ ³§ ±­ ˳þ ö¯ÿÁ£þ±¢ÿP£Ú™ ³—Y¥ÿ ã¯*¥»¢8¢•°ͺ¹þÿ£ÿüÍ–÷ÿ”øü‚÷Ž^ñæLö¥Lö!OóQñŒRïROëPéVê/Yéß[ëþ[ìªWéVèZVçUèUé¤Vé WèXè˜VæƒUåVæzWèrUéVèHTçºUèZWéÚYéXêÜXìðUí„SïHPïÅSðËVò‘Rõ±Pþ÷'QÿöGQóÙOï|LðbLóNóDNòLñéMïÃMîˆOë Pè³SåXå Uå1SéNîúKõuMøRLõKðDIñÆHô#Fô…HôÄKî/Nè­Qè÷PêsOíGNò Jô¶Jÿõ5IÿôtIôÑJõFÿôôGÿõIþö3Gÿô4Gñ_Hñ³Kó_KõTOÿõüNñ;Lð¤Kð LìßQëðRêùRéÁTé9TæATæýUè`SåËT äT ãMU ã¸Wä2TçRéÖMëûLëÉLê[MéMë³Mî§LòÂOüöÆVýöô]ÿ÷Ì{ü‘ú N¡ý›ˆŸõ“€U =SËsþ /bü?YÙ] Òhü u‡þ ‰ òuþ þqþë{þ%yü:_¦ÿ¢®ÿ4¬¹§˜ÿA¢µŒT…hs‰R ŽSÿ jzÿLJåˆCþjŽÿʃ‰ H» UŠþ v‘ýå§ÿ¢ÿ ³k -rvþ jq ˜eŽQ÷Z  Ô§ÿ[© ýŽ ü'&xQtxIxöy5 v‹þöž §€³ °¡þ i @OhY=b /d Z ßZ ·R ÁU “X ZpÈ› /ª4³­p›™s ú‰I þQ©›¥r’ÿvt©bûs*p f Yb e GpÀnjh©dae b ^ )‘fŸ ¥©¦¨׬8±€±ü°î²„¹^¾ËÀ<Áºú¥ ‰ j ÷Z I] Éh wý>‹ÿ»™ «ž ] A¡ ï§ ý¬e¯+¬B§  ÿmšÕ˜ÆŸÂ¥ô¡õž ¡ o¡ ?š ‚Š~ñq #¿r Òy »~ Ì„%‘Œ"'“Cœî¹þ´þ¬ÿ¤Ž˜ C‘ ɘé¦ ™—“¶šï¬L°‰µý?³þù¢ÿô—™ÿ÷[ÿ÷]rÿ÷ºPõ¬JõÀOóQòðRïOìŒOêÀUéŠYçºZèFXéUèdUèËTè’VéŽVêŠUè¼VçnVç­VæuUåsTæüVéSUêÝVêxUè¯Uè:VècXé Yë"WëUìçTï;Qð¨SïÞWòÛUõOÿõnOÿô=PòžPð5MñíMôqMôMó MîLì¥MíNë+Pé6Rè‘WçïUè®Uë5NîìJó|M÷ZLõ,Kï Jð’IôHÿö´IþõžLïðQç¾RçBPéwPîMò‘Iÿô0IÿõÚKõIôšIÿõþGõÉFô“GþõFþõêFòGñùKóÁLôÔNÿö¡LÿöƒHôGódKñXMîOïQïRìSæ¿Vè:UéŒTåŒT ä@T ã‡U áU á©U ä$Qé¶NíøMë»Ké”Lè%MìÙNñOõPýô‹Vþõw^ÿ÷wýÇ”ú ¼¤ý =Œ ~ ¡(ORgÿ -ý Œvü òV TöT³` ¶v  v¾oÿ š|þ|yüã—ÿ ÷¨Œ±G¡‹”‡ {XþˆÚ` {Sÿ0yÿ ˆŽ ™‹ÿj€ÿisVuc‘ y… }„“Þ’9a_Rn ¦j °i ¨d €R tõ–þý³ä ÿ°©xƒþÈo †u …x\t`s Z}ÿÑ–ÿƒ“ ÷õ¹ ª±ýЃþàTÿGS&]çb¬S´QP5M ñRVsfiˆš“+š;›ÿ W| An ~ˆ ¥ÿ:®§‡“ÿårPXÊ_•g h nf iwsÐ{täkâfŸb X dƒ ™ûî¢ýŸÙ¤˜¨ô¨2¨©¦ Ȭ ·¯½6ÀÕÁ¤¾@® š™Ù€ ™f ïb¥f *mÿs•€ù’ ˜œ ¢ÿ 8§ ® 2´ °a®ÿ9¬¡²“•6š¬‘/Œ 2“õ• ø !…û-s _nYn^r $ð}.š„+Dw %÷ƒ 2œm³²ÿ‹¤d T— ÆŒ ‡ƒ”ÜŒ$ÿ„%.Œ$»œw›«£ÿ$ªþõã¥ÿó ÿö©žýøˆýúWöÔHóNðQïRíçQë•SêµUæ‡W äbWæØVç·VçœWèrUèeVéUê±UèƒUçSVèWè¹TäUåUéWVê&VêPVé2TçäUçqVéXëVëÔUëNTï¼Rò0TñOWóŒTóNó(Pò¦Qò=Pñ¬Nð–Mñ2MòNñMî0I ê+L ê^K éíNë¹RìSêÉUëRSí3NïˆJñ±Mö3KöPKñWKðÆIôñIÿöPIýõºLî¯QéÀQçPéëQëžNïjJÿó–JþöxJÿõdIôjIôHôŒEó`Eþô)Gýõ­IóTJñìLóÞOõÈOÿõeMþ÷²Jÿö'Hõ‚Kô]Kò LôÓMöêLð×OëSí TíRï©Vñ°TñIQñóRð/Qñ¥PðÞOïuLïéLðZMòNðqLìNé¾L çÂN êÃQíSë,Të†RíñNì×LîMòLõLôžKófIó‚IõÑJþö Lÿñ¨QîRëQê;QêpNí…Kþô1IþõeKÿõsJôºGòKõHÿó^HþôfHþôÞJÿôƒMÿô+PÿöiPÿö`OÿöEMÿöÜIôÌJô$KõñLósLôÎJõžGóéJñïOò>Qñ²QìRëÊSêíRé¢Ré Qé³Nì´NîïLî¼KìéMíáMð®NõHRòžYñÝbûöe]ÿúÅUþvq„Ž AneP.CÔM|kù•ûå¥ýŠ‚R ³KyM·UooÉxÂj Dnpÿ=tp‡ Ošþ¥ÿà 2nÑ_Ì` Šu Oi¨P\O¢PLX„U(O CLQN1P ÛtÿÌÿ ‡ná`õX‘GûhGûÉKý]Pþ U™jŽ^îR•]ƒs òœþ¿²ü Äšü ”oTY XéYµg "e¢l²ƒ [¤ÿ‘§p_L\.g|zNnOD]cìd­dgk¦i Qr #¾‡ôovd«k~ÿ ‡ç”þð–%ƒ Ìp0` S 7Y #Q 5\ ng‘qïyþ*tÿ}dc e4‘=Œqƒÿix#…º– Û–Š7Œÿø’šŸ ´Š¿,¿(¼¸Ô®¦¡þ ,’ý ?{ý|nþ¯kÿ k |—ÿ¢«á±e®«†§ ¦ˆ¯Vµ^³6¬z§%£ŸÆ™ä‘›‰(Œ ¡ Ê®þ«ç˜´…û|š€NR€ç…%OŽ& :®¢±ÇšV‰vŒ Ø’;ˆ ¡q f Òm Bp %™s %v ‚~“HœþüŸý÷ÿªüöþ™ÿúdjøÍLö1Lð|SësWè¯Xç¼VæîVåTVæøWètXéWçcVæÈVäVäVæ Vç)VçaVè\VèÍVæ/VæEWè€UçÄUæÖVæ[UåuVæVçÌYé2XëÛTêµSé‡Té7TêXìqVíÍUïRîRðMRð"PïOð`NòRLõNókMíÛNèçL æÂN è½Pë-Rë†Tì\SíàNëµJë¯KïÌKñ}Kó¤Kô¯Jó¯JõAJÿøBLþöäQñSì'Rë¥Sì‘Nî´Lÿó6Ió…JòãKó*Hò+JÿôaKýô.Iüó¯MþôKþõ™Mþô¾OÿõÒOÿôxNÿõæMôWJòËLó¤Nó¥Nñ“Nò!KôHó6JÿõîOÿöŸPóPîgOìcOëENêîOë^Nì×MíMïÊMðßMî_NïÈNñéOójTñF[ï^cüô;dþú%eÿ7nxã_ÿÎYý:Kþ…Vþkgýˆƒü üø‹ÿ:\ ïPO«S‘j N~ÿnnÿ ÖcÈfK^ êk …~&•ý†qLZ …T~i xÿFsý ñmÿ NGèH¢HßPÅPLZÿ zyýßm\ qPGûõD ÷Hø]Iû¦TÿÄ`rdëU2Z¶a 9}ÿ 5šþ°ÿ‰líW ŽWXÖd ”i Kk Moc‚9rñ\ c íjæj•m®lêNœLQ^ f³døgçqYpr{úyúb Èf €iÁrÿ¶„þ =šýT–ÿ‹‚ëy?iÉ_^W .K œRºc Øfëg¢k¸[ ’\ Sf q¨\šAŽ¿ˆ;Œü‘a[ŒÏŠ®…ÿ»:¤¼¶Q¸­µ€³ÿÙ²ÿ¨¯ B¢þ Ãý ætþ _i j îu‡‰œÿ ©ïªΩÁ§¦*¨Ì®š´“°ѦÌ£‰ª“¬Óªb£ež õ¬Úºÿ³¹k¡ˆø„à”™ 1’÷’¨œÿ¥ª¯»Á¾ð§) Ž °“ N“ ;y„h .g ¥h !k $Ìp &ÿx#Oƒê“þÖŸüüj©üö/šÿùšo÷$MöÒLñâSëŸVéŠXéhVç³Uå*Væ2VèpWè2WçSUæÈT ã[V ãJVå'UçÛVèqVé7UéõVçVæ?VæKUåóVägUä§TäžUåäUæùWæWèsUéšTè»UçžTçÍXè·Xê¶Vì{Sî½Rò QñÆQïSïOóƒKõŸLóDKíÓLêMéâNê˜Pê~Rê¤SìæUî$PíSLî/Kñ`Kð¤Kñ"Ló(KóUKõJ÷]Mþ÷wOñÍQêìRè5Rê¼Oì#Lî’Jî1IîSIðSIñnHÿòÇMýôXLüóÆPýõOýöOýõºPÿò#PðvOÿó=Nÿô¶Nÿõ¸Nõ OòUêO¡FöAGöÜJ ý,YÿcÜkÿôj µi e[˜` ¨xZwÓi ý^ *ZŒ\]øaÌn#mKiø_ •U Bk ‚{Sr-f RR_Kw\yg{eciIqÖt v!wýs¼] _ vchyþ *‰ÿs‚«v rn\j&SOºUåe ‰b x\Î[[P ZRÑfJ¼þ#°ÿ5Ÿÿ"—\—B™ÿ¡œCœÇšÿ’þr…ÿ%„^’Á¢8¥°¥'§ Æ®a³|­ ךþ }þ “tÿ yy!z||釠™‚¥ª<«¬ª.£,Ÿˆ î™M”:‘Ó›Ö¤\®|«¸©¡°¼¸µɦ†’±Žÿ úžþ ªý ò©ÿ d©¯ÿòÿ#ºÿ1¼ «›LŸé¯)µ>œ¦‡§ulxVl *j #&k (—s!2ƒ ·˜ýh¦üúKýûïvú~QõRMïNQì¬VêXë`Wè TåùUåÏVçQUæïUç±VçüUä¿W ãVå4UçåUé¤UëjUê UçÂUå»Vä=Vã-T ãóU ädT äXUä¡VåVVçÜVèGUéíUè!SærTæÀXçZê¡XìóVîŸSñ RðÛRìgTíÙSñæMô£Kò2Lî½Lí¨Nì-NíQìiQéKRëgTïVPï“LðÞLò£LñÃKñ¸MðŽKñäJówJöŠNÿö¦RÿòwSêIQå­QæíOçlOèyMêlLì’KîªKñ JþóµNþôŠPüõýPýõPýö`RýõôQþó¬PñNÿñ5Qÿõ“Oþ÷lNô–MðÔNðMòôMòîMö²Mÿø OÿørRõ,Uô:Uñ,Oï5LîvMî[LíµMíúNîÏMð×NðÝPñKNòAKñæTôÆXò§cýöótöC‡ýK”q¥SèQÿVŽm Dqqÿ=xþ-tx`ARÆU`eÿ6hÿÿþ”þ †ÿ\]NmK ßW’e` ÿg ¼qÛj _ Å|ÿ™ü J¢û)Ÿü‹{þ ÂSàMe ørâd -Y (_.h Õl¤n`fêRûwLöÜL bøv›„ãŠÿ T Í] ËZ Ca]gÄi Ck ÿÏbOa]>b§lBs€otg …Z ‘q 9Šÿžþü–ÿÖŒÅm“cb ljskÃnÐs(ySynp¢^ {\ ¨\Ø^(d DozmèrŠjèg _h ¤Y Öj\zý ë‚þgnþÁ] šQVH `O¾fU¹ÿö¸@¤Ý“d“ÿ¥™þÙžÿ¢7¢œþ®’þ½Œÿv˜–ôšžò¤5ªެy¥ À• I} ž~܆ ƒ‚?ˆ”¯ Ϭ+¯,¨‡™m™†"Û}$éyõ{΄‘õ¢›§Φ¶¥È«ªã Ô”  Qœÿ ¬þ ­·ý5·ýO®þ)ŸŒÄ¥ ¦ ʦq³ÃåÆ[¶—¢ B”ô†p !àh(l $yQ’ýz¤üü® ýýzýhPö‚Kï˜Pì&UëûXêVéUæ½Væ|Væ6VæVæZVçqUæºUå Uå¦Uç¼Tè*SçÎTçTTåŒSãòUäêVåUåÝVæ%UåUäŽUæ±Wè–WéVéUèKUæeTåÑWç°Zë`YíÝVîóTïhSíúTë;VëÜVï[Oñ­KñKðeLí‡KìÈMíîPí>Pë RêÖTï.Oî}LîcLð®KòIKòXLñëLòKógMõgMôòPñfSê~QåÜRä^QäSåãQæmPèOëLðòLÿôSNþõ;OýöìPýõºSþôVþõÓTþõÂSÿòQÿñ¦Qÿô¬NÿöãMó Lï[LñöNô"NóüMõÿJÿ÷¹N÷$NóÅWò8XòOòLñøMî’NîùOð©Nð½Nï™MîïOò'Nÿö*NöSüùÒXòÿkýùöþ{ õ鑾m‘UÅ]Š]Ñk CnÛqÿy{þ wÿ5e `Y\_›u¼s±zÿH’þ —þ Úuü óUÌL`O šX ž\ Se \uÿ ív f ag ‡•ý!±ü2¸ûoœýkù\ b r\j] ~Zí]q€ z mþa\ûR ‡qœœ‰þ œ ½ýðk ]]j^çdml´wctïg Cb ƒkoµssäp“h·vþ•þê¯ÿ š°Ø«Z•J %~Îx«kzdIm~q·z?xÂlñb Ìa ÔY ªY )[ veŒgiqäl of ´j ^pT‘L‰ÿU’ÿÝr X±M&FåQÅk Ÿ¢‘§Ùœ‡ˆÿê‘!–l›Mžÿp›ÿ­—ÿ ˜þõ›ÿ*œ7¡Û¥¦Û¤@— Spº}/ƒ˜{¢}5ˆ6$š$¨Ư÷¨­™{ŠY+ž|"rÂ{‡¶”œ £¡¢Ì£ûš‚ƒ NŒ : @®ÿ®¯ý yœÿ Žn‰ ¬‹ ÿ ­ ;»"Ã:Á+Äÿ Ãþ ¿ªøŸ´š Mm %wr%rv B‰‚ŸþüB þü)|û4Sö]Lð6Pí­UëòWêêXéVWèVç²WæU äÍVå9VåVVæäUæäUæøUæuTæATä&TåTåiUä©ýþ‹þ»l_ Ée /c å\ ÀYM]äm €€ŸŠÿy‡ p(bꆟ^’¦ ûŽÿÖx ´k ezhÿnÓsÞw Êj %iMp ysIm?m0p†x”þ {£¨³Q³ÿ¸«ï¢ÿƒ›þǯrãb«m·r•uøsImfYiN[ ¸TLU_ >g$l ¬k ®m¬n{†’ [ƒ Šh kM¾HÉF¸Pêd ã“xV–Mƒ¼yfyð‰~²– f™î›ÿ¨ÿ©¡„¢¶¤Ŧ¤¿ž[ŽŒz“r§|E|ÊmƒhãvÔ‡N—e¥Ç®¬ž¡°•™CŠÃà~ïY„]‰1”äç .¢ú¥s ,‘­„ σ›=˜Á›ÿ s ({ t l€ Uš ® ¸Kºÿ¹È *Øþ 8ÁC¥ ßBx€[„„ŒþÜþú>ÿûR|ûTö½NòQïVë;Wè‰WçäVçòVç³WæV ãV ãVä¹WåwWæUå”UåjTåÜTåóUæ´Vç¾WèiUç&Uç½UçbUæßUæãVå2VäVæÛWèVë˜Vë]UéVæ—XåUXæVç"VèSUèÉTç@TæVèWëàQíÍMïŸJïÖJïJñJò\IïSMë¯OíÈPïêNí~KìJïðLóKôtKó€Mñ>MðåMð:Kð:MïQîÓRèQå•QåóRåSå”SälRæJNîHNþ÷"OþøOÿôYQðaTîVïíWñYVïEUð†UôtPÿö,Jô›JóŒOþö¬PþøÄOÿ÷ÌMÿö»Lÿö"Jÿö†PóUì.TêGMíÃJí¥LíwNð,QòçOð/Nï¿NñsOòÍOöMQüýQVüü:^ÿó·j÷äkú|düVg0_ T_ Ekfl kðsþrÿèhÓeÿëmý þw)}Ñyw­~ÿ|qÿ¾Sÿ‘O´RF[ {\Ë` +tl ¡ F… Gv"‚Ë”þåŸüžžü‡ý nù^ ž] Ç] ¥V%\‡g ï E— ! Sogpå˜þß«xžΜÿ®ƒa} r Çkyh4kyio Qk Lk»oK{msobhd ®r%ua‚M¢צ ]¨¾¢ÿ‹¤þC›ÿ ÙiönÌqðp´o¿mg>h÷] >O¯OVå Uå”Uç³UèVë WêƒVèÌUçÔVçKUæ}UæÑWåaVä;VågVéHUììVíËVë‚WçYå¼Xå¬VæºUæÜVæ™Uå”UæUéªVëÕQíƒMðKKñÞHò[Cñ,@ðgBïFíKîOðûKí»Kí¸JïºLô LõpKòaMñYOðKðÑJñþKòÊOîdRé÷Rç_Rç|RæŽTçèSå¡SåDPìzPÿõ)PþùˆPþöTRïSí_UïyVïUî|UîsSòRPókJôaJÿóNÿô•OÿõPÿöóMówLòuMÿõ–QòéRì‘Rë`MîÔJî7LíNîsOï[NíwKîNðPïÇQôeRýýãYýûv]ÿö4`ô\]ô=Yù™Z‚aO_f[‡bqr {yþüwþÕj­c Ÿeÿ Roÿ F|-„Y{pr=kÂdÿ £RþzV7aç_`ìbJqI‹û¡ Ë› Üli³nH€þq™û> û ¥üÅmÿ«Z !XGQwU X Ã|$…µ| ÖhØký™û¨ùQCˆñn£s ao _j åh gf Êdügl p ts;qÜn´^ ^ ¢k ¶r©s‡v„± žŒ¾ŒÊŽþ …æzöjCmúk ÅkfégòaÛd Ì^SKMÒS‡[ Yi`oÙmîbÓs /n„ ŽoX ¡AþAMJ qNŠV e”<•S”×”µ•M’$Œňôzöy®zE€:Ž•ž¯¨ ª6§´¥í¥{ æ›i˜Š™̘1ƈŒ«•¡žߢñ¢Ê¡§¡Z£o§¾­?®|¥ ½¢ ·Ÿ ™ÿ¤šÿ9¡T¤¥’¢wŸ…£ã¡L”ƒ |º‚#‰þªþ ¶–Š™™™¤¢ˆ¦«e´§¸Ä·§´ ‹­ÿ z¦ÿ|žù­›ö œýù°ýü‚ýTùÙLõéPï‹Vé®VçÕWæFWæfXé'Xì$Vê]Vè2VçÌXè¡WçUå…UåXUå›TçÙUêÄWì¾WêúWç4Uæ Tç½UègUè§VçŽVæ VæVçsUèÒVé(XéžWç Zçü^èZé£WèVçÒUæœUèòUêËUëíRíÖMñ¬Kò&Dñ?ðˆ=îN?îFCï¯IðNï%Mî LïKKðIóæJôÊKñŒü¤h XU{NwRiNí]k\¢T'Q»]jüó–ú | o öb Jb Çe Þi cn Ìl&iJgÍn ˜ví~ †r¨j õb OZP_ ™npÑc õ` =Y °e d ÖfGe j -jje 8` ù^Ê^ß\ z` Ö^‹N¾NWV3f ¯y óe€T³] êa?^ ñPþLVA8@ŒK‹N;PϪޥߛ„š€ gŸ˜ü–4ׇô€}y}0‹ žƒ­ÿ±]¯ù±)±E«O¦§?§¥Å è›N˜!ˆ¡˜¢C¢¾¤jª²w¶^µÓ®(© £¨ ܪÿ °®þ ©°ÿ#©ö¨Š¥Š¥’©K¨Ö¢~–[† ì…Œþ ]”þ§š‚šN’&©!ˆŠŽŒ˜/žP­Yºç»¶/°ÿw©ûø¡õîšÿ÷c˜ýùÈüüòÿþ(]õ­NòÉPë¨Uæ¼XçWçYè˜]ê+[ë¯SêÌSèÁUèóXé£WçôUåÝTå²UåTçàUê¤VìcUéžVç€Tå§SçºTêXVìAXë8UçÂUæøXæRVåñVå×YèÑ[èfaê4cëZê;VéÕVçþWç@VèYVé¾UêÞSìŽOð±Iï´AîÁAî=íÈ?îmCñÛGòùLñ+Nð—KñéIñHòßJò–KñhLð3Kï,KîšJë"LëTLë²Lé·Që±Rê+OçRècSæ¸TäûSåŒSë_TÿôÍQüù PþôSïZVîWîWî;Uí€Sí·QòEMýöñMþõ OðNïÑPò¨Pò)Nî'OíÍPî—Uñ»UðªQîdNðMîOKì^MïOOóNóXOñPò2Sõcþ‰ÿôÿÄ\NNéKÿQš`šg Å` „pÿÞyÿyl ïbô`†eý íhÿy¢ŽpmhO wL˜N¸Y Bov éo Ú` Â[ a l Ïn(yr] W7R~M YU‚ü â›úË—û|x˜h×WXONwONÿ¾D û@ û!Po zºl ýc Pa ` _ 0e Jq>o]l k ”g ªtò‚ȺyHp+`‘X +jñn4a ¾W PP ¤M êV X_zf Æy Ëwvn¡^ ãb „] -Yo]t]-X )RZTÍO0`tC\ ·L µU.R-J ÚC·CJFÍFK ‰K~Kn·F®x Û¢C­C«áŸÿµ™”¸s‡¹†4ƒ~¨‚Е$©ƒµ/µÄ´ª¶`·´°x¬#¬¿©?¡ƒtŸM¢£ó¤Ц§­U´Ù¶M¶ˆ²B­³© ¸«ÿ ²ý,²þó°"®ä«F«E¬Ó¬*¦²›‰ ~ (ˆÿ —‘ÿ™’ò‘!&† (ÿz '¥u þ€;‰—ŽvŸ¦²6¹«¶ „¯Hªùn¡ö°™þøp—ýùTœýü°’ÿû eòéNíðPè·VåNWæØWç¶\èêiënî6WéQæTæßYè;Xç­Vç UæuUå7Tæ›Uè\Uè#TçGVç[UæwTçäUé¹VêSWéÇVç½Væ^WæWå¥XæÒ]è¹_éà^è¸[çÏXèFVèÞWç+Vå Wå=VçÒVêƒWî Pî¿Ií`CìrBí=ë]?îûCñ§EóáIó‡NñwKñóJòJòßJñòKðãKòÙKò²Lî×Kê/Lëî´AñKAñ¿DñÇKò’LòÕIóÏJõ$Mÿö4MõLõ±Jò÷Kï’Lð LòIôàIÿõøLòØOìªQíìZ>íf?îçAðAï³IðeKò‘JôTMÿ÷Mÿ÷ÇLöœKô¬JòiLîÝLñœLõKÿ÷ÐKþøíMöNñRïºPïbKí¤JîˆOîsRí•Sî{RïÁRòjQò+SðpRîMRîÈUîLWï$Xñ”UñúRï,Oï NòÎMôßMò_MñALñìOð|OîïQðÒTòÿRñsOíLìqMì^NïéMð÷OðÅRò§Wø1eû þyú}’׌ yR‰þ£IŠt ¥b¿]ÿœcþÌiþ 8qÿtèuøo@rŒuHc Í]¿b ˆpü¡‰ ‘Û…èt•c ½b *g øc fLcjc ÑcZfw u”þ `”þ { c^7Rÿdÿ Mm d] []C_ …X] g ìb U,L þ6]~ Š&uk ¾j §mž_ ƒS í[ Ò^ ¾^  Z W‘c ´‰ l б ±p®ýÖ™þî{!rÿÅ‚þ Á}þ 6e °Y ET T .Yðe 3† Ê—ùsöŽ’þ¯ˆF‚ c‡ÿxÊ}ã„È|wÙ{UwÚiwUÎIÌM3SSMNÈZ a WÖEX¹Þ·0 «~ ýÆnö} ë”´¨‡¶¬Nšÿá’ÿsŽôŒÈ—g¤¾¢l•qг‹€Ë’•ךƒ  b¦ i¯â³L¶a¸˸.³¬ß«_¬^¯_­r¨±¢.™Ôš@Ñ¢µ§X© _«$®ö±­´³Õ°g«’¦Σx ÿ ˜þ,ŒSƒ e„ 芉 )wy Ó‰$`™³»z¶¼©   œþüŒ˜üùö™üúKŸûýÑ–üüŽiýónJîNìÁTèPUäUã÷VåÞVè°UèŸUçoUæ¯WçMVæºVätVä~Uå(Uä'T ä…U å‚Vå½Wå%Uå›Uå*VçVéíWé(VçµVç›VæsUæ°Uæ°Tæ™UçåWç£Wå®Vä±WãVWä3WäfWæEWè¡Ué¼Tì~PíÌLêŽHêDí‘>ìß>íþ@ïHAðŽBðDGïìJïçLòõJÿô—LþøÁLþønKõ&Iñ«Lí³KïCKóÍLõ$Lõ_LôÛLðšOíÉNíüLîNKïfNïFPïãTï'RîÊQî’Sï|VïFSîæSîôTî~Uð@Vò°Uò2Sï’Qï€NñVKòÝLñ~NòCMñÚOî~Pï:SñÏSò­Qñ:NîÿLí´Mí½Nî‰NðQð$Sò‹UõøbþVuûmtÕi²a ‰j šzølör “n Qdþa^üã`ýmþdpÑnXce Qe Y¡a †s(‡ö™‘  óór;_ [ ®d q ®}My ¨l :^ œa ¹m O~ ñ{"d XJTÿ–gþ _lÿ ã]W?U R 1XÁb }m ¶e‹O `K‰ÿx“ …~ °} Ez !z³i Ü[ GU kS sT RS.S§i !¬u«ý»©ü`¡þ7‡þís$zÿ„s i_ @S &Q Q1Q´Uºf¦r”€2‚ƒŽˆ…•ÖžüF‰þ‘€¿Š5têvçwLm<\9Q+Q£UISzK7MßW Ž[L:¿¾hªy… ål ¶p:€›]¯T²o­(¥•šÿ-‹±˜T±²·®û¤^™‰º¡‚!ÉŠz‚— ¥ t®:³‚¶¹¸€´D­5ªª«%ªÛª$§º¢›З¬–J™1ât¡:¨­?°K® Ö±A« ¤§׬įÿ;¦ ü™ „Š ^† )³™ÿ3˜ÿWŽŒA’#Æ I²º¨µͦ ’š_—ÿú‹˜ýùÙ™üûˆŸûý¼™ýûäsÿô£Pî#Ní}Té!Væ#Vå»WæXçîÁBïƒBï…@ï¢BðGòDKò‹Jñ½JòGó Gô IñLLî2KïàLï¯KðLðLñèKð]HòÑLñNíŒOë+QìŸNð”QôRó;QîçRìŽTìVï@Wò¹XññWî>SïÁRð@Rÿò£SóSñôQð£Pó)LöÈNôOñ¸SðöVÿòð[ò‰WðÊOð»MðMïNîÝTïWRðbRðUò«XòJƒoªÿ`“þýl >i…Mz«xU‰ Ø~'e µWÿ™XýyZÿ“_Fk …nc… “Šþ iƒý ãlÂtˆ–ÿ‡ýU£ý }Šb Wñf vC‚¦„¾ƒ;qUt *p àj•X 2f jo \ “]ßoÿýbYJTQ"VcR—_Yc ¼Y hY ¬nóz Î`nþµ¢f ÿ ³— p)^ eZç^ ÛX:R€MIY¯„ þ&‚ :qÆoNbº``ýcéf ×] ff ém ]•V ¯S ¤UŒ~ç•þ®šþ Œ¦ÿf²¤þ]o®izijf §djg G_ °V2Wua e ÓSêE+J»R úR R»«#µ@µ£é” ‡€ GƒŠƒå‡UŠ³Í“ ”’ÿ¨¡Y²á·´¶×¶ ¶ô±¸¡h‘ À…!ÒtŒoHv…7š§££W¡g¥c¨‡ª§̨¯ªþªiª/©S¥‰£_¢ƒžD—o‘ø’@—ÊžЧ#­-³½²°³?³6¨™€ØŽŽ¢ÿ:«ì®¨´Z±ð®ñ­!¯¾®1¡ ˜Ò•ý›þúcœüû}Ÿûýø üû}†þöæYïJðQìXVçÝVåÚVåEXåWäKWä†Wå,Wæ#VèíWêªVé²VçUç‰UèiUèäUè¢WèåWèõVæ^UåUæÍUåãWå9WæüXçøVåÃV äKWæêXè WéøXé{WébYéSXèþWè²WéþVìCSðXSóPóÌLòøFóAò1?î7BîDð˜Bï CðcHòµKòÙJñ¿KñÜIðIñÞKï~KîÏKó KôøIñ¶Ló MõÎNöDJö¸Lõ8NîZPêíTë¬RîƒRòAQó°QïúRíDSî+TðÝVòòXð3Yí[WìSìjSïØRñPñÉQñ Qô¸NõcLðOð¹Sð:WïøZîëTîÖLðÚOñgLñèPï4SðâTñàSð“VòÄ[ò&‰ÿ÷¬ÿj›ÿÀ~ á„8Ü™ U’ÿ ’·f 4[‚Xþú`YOoƒxLŽšŸü mŸü‹ÿêzCzÀ|Šÿ9“þ Õ’uâc fIs¶‹è”“‡þ ú†ý Š}ÿqË[ •n2v bÈZ »s ÀqÿåW·TýT½YkYO__ ÑZ V n[ àe € ’‘¢ M¡3œÉ|QvLp {l X:V™OP]b Kj Þj aa æga¿^ÒcOh9„ÿ ø‰ QŽˆÿ¼r  Y ¯T=XðuüGýù‘ÿÿq’R—Ê€þªaÆc gf 6kýøs,r i Û`n^ Çb Ôk Ù[²E†EýS!Y‚Y „¡ЦÊ«ש Ÿ¡•ƒŠ¡#vpxúy2y‚ )ŠRœÓ°*µi´œ³ßµ µâ²~¥ß‘ÿr:[![ Lg 5}‹!•%œ"U£"©§Û¤Ǧ)§·« \­è­©ç§¹§ ¥`Ÿ^”šŒ°Ê”š0¡D© ä° ²µ®L¥~–̈ËŠ‘™Ì©Oµf¼µÆ«÷§˧>ŸN»Š $”e–ÿý²žýü¤üú¦‘üø½_ñÙLò„Qì¿UæVäGVå[WåWåþXæbWæ`VæúVè™Wé¬Xé#Vè¶VéÐVéFVêÞUêÖWêWê¬VçEUå\UåÝVåÛXåBXæØZç4XæÖVåÎWçåWé$WêÙWêæVê™Xè|Xç8VçáVè¾UêrRìÇSñWRògLñµAðA@ñ®AðÍAîèCîAîÜCðªHò‰Mò@Lò#MñeNð¦Nñ‘KïèKïKLõîLõKò MñçNõnM÷èIö‰KõNîRéüTèªSêöSîSRðtRï·Rð‡SÿòTòªUð¼WïÛYíXêZWéVìºTïOñ£PòkOòiMñ«Kî NîFRîñWìâVë­Qî‡ a O[„Y$O S`WÖZ Z[ ÏgxiÉbueÖoÿÍš® *ž šÿ{ÿ ÷[ ¼QJSuZ|iüöeþa^/\½R¢VdKk’tùU|Ewk †h Sd 3d °p §k ŒRD\No_ …^·—ažÂ¥+§ߥö¡¿™ÇŒôBzÁq½kânyþÀŽÿ¤²I³­® ¨ G¨Z®ì²\žÿ©{L]AX \3_Äi Y|'6Š%˜–¤¢0¤¨ŸéŸž £d¨ö­~¬J«'ªq«d©ÏŸ~‘¿ˆì”’?–ãš¼ i¥  —cšÀ“…ƒ–H¢ §òªÄ©¾¥4¢2™)ô€P|»‚úwí—þü² üúÝ–üú‹mýö%PóËPë¨SåëU ä Wå/VæÅWæ^Wæ]VæiVæVçmWè WægTæšWçEVçfTèêUé•UéVUéñUæŸUå!Uå‹Wæ@Xå–XäçYæ°YæXæ XçªXèWéãXëÊWêæWç›Wå_VæOVèÏVêëÕ?ìÄCïïHñýLñ8Lï/NîJQíÔNïyKïJJð™Nö’LõLñPLïÕLò‚LómJôNMÿö5MðVOèvRåTèjSì:Rí×Uï]UóTþöWTÿôùUð)Vï,YîiYê¯Xé1WêÝVîÁPïˆNðZOðÞLð7Oð}Pï5UíŸWìSíKNïçLíJí˜Mí–Mí¢PíçSïÐTî WïCaó.”€ Lnøx™Žÿð²6¾È·ð±›«€ck æf Rr¸ 4†f ƒz—þ±ü´¥ý ?“þhz­e@n }w~Ô€–þû‹ ê‰T‚†ýÿ™ü 7¡ý T•ÿ Îzsfy q\o‡iQ^ „Y `SŸS­W°_ 0d ` b Ý`~[ €Yü] 'c ¿f  ˆvq _8zĨþ ¢þ }[oû=_ ÿêPÔR™W |X ÔX ¡_g;nn~rŒ¼” Ô‡¦‘œrºWN)MAQÆQ{NAM ›KfI$S ÷a˜n Twþ'}uz„tÒlµa lbÁstwÿ÷jøOÿL½\ `] Kˆâ™ñ¤4©8¨P§î¥ŠœÏ–xö~åu€ýþùðÅAñã@ïŸAï–Dð†Iñ¨JïÇKîûOì RêµMíIó`KònMô`JóîJð“LïíLñLðeKò#Kÿ÷óKÿöhKì Pæ»SèkSìÔSìVTíTð1UòVñUï#Vï1Xî¤ZìQXê4VëZWí•UíSï1Tñ(OòªQôSð}XíŸTì¸QïGMð>LíŠIëáMëgNíNíåQî‹QìpXí<_ó¨iü€Z5Qu_þ÷´ÿÄý¾ý.»ýߘs˜u n ¹z¶§ŒŒvVo°„ÿ y¨ý þ«þ e”ÿ q€-a³_MrS|“€…“ÿߤþË þÑ— $ˆ°Šý ”–ü ?Ÿý ª™ÿ@‰Â~½ (y0jpjöd [ÐXãSÅVd] ¥b ´] Ý`çl§j 7f¶a Ë`÷bMg Åi/` Æ]’wߟÿ}°ý³ýKœÿ ú‹Äj?N’þâ‚ÿ—lc Æ^ Î^ ¢l0|£~Üu €w¨ˆ’½ò’šŒªZ¯°A®í­¿©P¡¶˜ÿ•‡˜q—³—:–©”Mü•(•W•D–ŠŽd…Ô• ¡ÿä£þö›þß’ÿì“–ÿÿ;•ÿ ”ÿùšÿþÝýûfúûz”ùùórÿõ·Sï>O éÁTç¤Wé VèãVçmUçUè¨Uê«Tè·S ãiV âwV äÍVæùVèüUé’VèÍVècUæ'TæÑTä³Vå¼VæãWæüYæZçXæÑXæÄXædWåýXå Xå¾Wæ]Xæ7VæýVçzWèWé'Wë=Uí%Rñ¥Rò2Kò >ïæ<ðK@òxCó6Bô@BôôHô%JòLðÙLïéOî(QìKKï*GóŸKôFNòCKòõKñ±Mð©Mñ×NñîIñâJö±Iþ÷öKóOìQìµQíéSêgýöãsþý&eÿGýÆCÿb ²• ¯Û°®‰‰íkÄ^ [ñkšˆ‡êrŠsý7}ýhþŽªÿ P“ÿ ÖpKh½pv>u Ãz ìt­…ÿx™r{tþ l—ý Уý £ÿ¢¬—–}‰6xhEg0a Ä\¼VÙY,` Ïa -Z ©X Ãi ÿ^:c {h ä`šaµbÝa"^Ö\ pm°Š™ ™›ÿ Þªÿ2´ýó”£[ øK ü²Q ûkU ÿUY¹\ŒWéT¼Y D` ` å^ )W´T ‚^ !n àz DvþïŒûr’úë‹ü©`®M FJÿqVÝc Èk¦pÙ‚¥‰L{YjIktn€q9rvË|ÿ${%{ðŠÀ“Řî—r“!ç—¢š¡¢«+«ѧU˜̉Œüº˜þ’ ¤ ^¤ ôœ;‹ÿy9t}¶‹l„ÈsOg ^‰^â`@_ *[>VVY¡eL~ÿï’ÿ ËŽŒ#“S¤°æ²·°ö±+°Ý­O¦ø¤¦¥/ Þž\“Ç…%~|%pt &Ðw "Œ²…7…3Žÿæÿƒ ÿ¬¥o¥®¡ÿ «œÿs—ÿýë–þû,™ýüÄ›üü~–ýûÓ‹ýø9põrUñPë›Sç‚Uæ®Wç2VçpUèâVéÞVêáWéTXèÑXçvXç.XçfWèVê£VêWè Uå'Uå(UäZVåŸWèÓXç\WæbXæIXæ˜XçtXç´Xå­Wä¥Wå†Xæ:Yç‘ZévXêqWèÐYæ¦ZçVè&VíÊUñŠLòýBðAðJBñêCñtBñÜEôŠJöïKõ£LóHLòNò#RñMñýIóKò»MñKó KòFLñvLòèMñ·LòmKôHó?IõˆLþõ?Oÿô†PñÎSìRè0Tæ™RåQRæsUê(Wí-Zð‘Yï`Xî$ZðRZðhXí1Xê]XëãWî•Wñ3Vñ SñHOò´JòªKð‰NðOðBMíeNíµOïOòÜSñGXðÍgþöB}þÿˆþÈa…HX1s ˜{’©}ÅhªV ÅU-g J}D}£l¯xþ –ý „“þ G¥ÿ ²Ÿÿ ‚„ '~‹‰›þ(”ÿ‰ n1j#mÎjó[æ[މŸŸþ §©ÿ6©!¡:’yŒ‚òfé[é] vXŒTP\g unS^ X Ê[ ¦[ =ajXa‡cg>`ž^\Y•e ý} iz œ‹ ̘ ȵý}«þ Ns‹J þ‡M útV ] W\ýXÀTZ ª^2__%_ oZ Zd m x %xÿ‹Šû1šûÅ ýf‚ÿ í_PJjOÖN`÷k 8n ¥vñz p5eúlÊnlÃp¨rÿì|ÿõƒm†ì¨©¢m£o¥V™ƒ!Å{dˆ:›ÿ T©ÿ þ²ÿ[µþá®ÿE þΠþ««+²l°¯C­¥•ì‡ò†‹ˆòwÌa `^ e5sÿMzÿ ©uScsX\Ík¿€ 2Ž’þ½þ òë’ œŒ¬C´©´ý´Ü´<³1¯ȬÕ­’ªk£Ýžs—øŒ©‚F€!›„&ä‰!E ‘d›þ¦ÿî§rªüªŧ4Ÿ[šv—ÿþ—ýüû˜þüD”ÿúD‰þö®qþøµVõCNìoRæ¦Væ:VæMUçpVèVê1VêÔWêèYécXèuYé¹Yè&UçÙVç&Vç%V ä*U áV ã6VåEWæWWçQWæ„WçÐXçÓYæ'Xæ~WæšYæ”XæWçŒWèµWç¿XçlWæuUåQXåXåWUçhXìhWð*Lñ°Bð ?î CðYCðŽCðFò[JôÍJôÜLôMô–NóœQñrOð®KÿôKÿó3LñmKóIòVJðÄMïêMïeMóâKóËIó3Mö!LÿõŒOþöïPýùÖRþø„SñTéƒSå QåüTèUìÉYîaYí–ZíjYîÄYðZWïÐWí XíÚXîàWï—VðýPñòLò¸Jð¯MïoMïÄOï{OíX „d ozu o‰\ Ypš“a†*| pþŠp l_à` =Y f^ \Ç\ùk ‘€à‘´yL^ X GW …[¿]³`_þ^ b`Wc×kÇwk ›s pÂsÿ£wýTˆüË¢ ÿª ]Œ ÿo›‰”ûñy u …b Na …a RbA` ti op€¯{ÿz…wÑxs?ˆÕ§¯G¨­žߎ‘€{u Öi  lטþ(¥ç¯#³̵ĶZ¹ß½»§¹(·عѾ½¼ ³Û«~ '‘ ò{“ÿ gžýB¡ü °þ Ô™ÿÞ“þìÿu†DÒxbx ß| t}}!” #’‚ ’Ñ¢έ£¯ã­°è´&²'­~§2 WœÓ¨  L¤ ~£³¢¦¢š þÞ£ÿ¤c¦uª‚±·²F°Ö« ¥¤ÿ“ÿü‡™þûË—ýúŒÿ÷ˆvÿö9UõLõªTïaVêMWéßYêWé¼Vè UçaUçiVè‹Wé¾Zë<[ë+Wè§VçVèüWæ^U âKU âõVåùWåÊX äVå•Wè}Vé'VéÿXêXéVçUæhVèôWéÖXèXçÑWæcXç*XèÙZé_XéxWëéSïÀIñ.=îpAð÷Cð1DðqEñÍGñ½Jð}Jò$KóËNÿò8OñUOñ·MïãJïyJï‹NíŸMîÁGñ?DózIÿöéIþöóKÿöMô LñNñ¤OðPÿóbRüúºQûüüQýúRïÔSéßTåLTå§Uç7SéVêûXê·Zí‚XðYXñXð*VíƒYëXZìÒUïôPðpLñ[JïºKìVNì*NëéPê•PíÀQðTôŸXôæZ÷_gþËrí ³º` ßX KýTõä|þˆÿ £“þ‰þ:nþƒfJ|å€w„_ˆ ZŒ}tŒWä_¿‚¡ÿ/¹Æ¿qÂ*½»@°“ŸjŒ †ÿ »u à^Rk\¬ˆ ( þ +ªK£H€€W RZ ÎY dY˜a‹^ ^ êb ógQv Õƒ‚b ÿˆsÖ“Ì›ø˜,‹ÿIˆýZn Ïf ;^ O\ 6\Îa˜`[ än Znúj «`µ]ÄXàVÉZ8fFe ‘_ „]ÔkÛ¨z »ƒÿr~ 0rrF‚þc—E¦^šRžý»¢û¤ªÿ: ýt›üP~þ·nhk Wh1` ¸jÖrtˆ ‰‹)‚ª{Mx{yYªŸ®¯§~–µzd 7j •pìoÂv¬„!¿‘î™@¦ 5´Ç·ÿ7·ö¸g¹¸º.º`¼æ¾ļ’¹¼·µ´ö¬ }¨!¨o¥ D¡ÿ „™ÿ㘠Ҡþ«¡þº–À‡§z$pàfêi Ýp /s $Ut &<{(½'%šV˜y™c£Ò§ä¨°¨bªE¢®°ž4¡̤›6–ç›HþjŸÿ†œZœ±·œ› ã¢ñ¢»¡þõœÿûFœýûÖ˜ýù¬Žÿõ·}ÿø¯XóoKôuPîÄTëóWë‘YêâYè/UçÉT ä~S ä‘UçÇXëeYë#WéÓVè!Vç5Vè¸XèJVå­VäWå"Wå5Xæ WæWèèWéVé^WëwWì©Vé@Uæ¹VæWçŸWçÓWç¸Wç“Xç_WçíXè¿WéÂWêRíãHò{;íž?ðSCñ³Dï#Dï.Hò{Kñ¦KóKòwNñÄPñNð—LïCJï/LðÝPîNíúFñþGÿõŽIüø-Gý÷ïIþ÷HLÿôƒMñ˜OñNò…Nþõ„Püù0RýûCRþù™SòÂSímSçVæ Uæ^Rç{VècUè×YëYî|Yî·[îAZë/Yêü\íâTð|Oò"LðyJìõKìNìNìÈPêŸQìžSï{Wòt[óEYúÕ\cl ^j Y ¢V]Reûcýü¸ÿ,”ü 5 ý ‹–þ +rj¤ˆˆKƒò€ DŠ ¦dc íc.wI¥ºÚÀš¾µmº!°<›þJŽ “Œ}ÿ –iü’nþ~´”ÿ N¥ÿ M©þ a šY yZ ‹XCZÆc î >ðæBòÒCï¬CíîGïµKñ³Lô"KÿóíOÿñOÿñ±MñªMò‰Nó OñYQî×PîØJòàJþõ”Iý÷‰Iþö-Jþ÷ MþõºMð­NñðMÿó¦MýöîNüø*Pþ÷pSó9Vò½UïUVë!XèUç‹SçóUç‰Uæ2VçWêDYìô[í^î:\ì¢Yí¾Rñ¼MòyKí¿Kë@Mì\Nî‰OíOì=PíUñXóYó›[ùc]pƒi ha@eÿþ‚êˆÿ sÿE²™ü Ö£ý -˜ÿ n{S€‹”þ·þB”Ÿ‚†„ 1‚Cq˜b1q$| ΋XªS¾‚¿.®(®o¬ Ùœÿ œ ~–þmšýWŽúä„ýzÿýˆþ»þ Ê­ÿ,šþ Nnm\ UX ‚NCS¥c èràm|g d ïk Æs sa [ G|˜b ÿ+žÿÕ ÿ0™ÿí”ÿ ô† ¸h }V r] a o` xZ k[ tpMŒWŠ—o ;SþYßi wjY-Q ›X ¾‡Γþˆ”ýlþG‚ÇrjPkXjÌw»tfxÿ¯m˜ÿR”ÿ‹‹ ƒqÒ€3œÿÉ“ ƒ:…–þ °•ÿþwmBdej E¬®7ª!ꡜ’Ò9rïwzØx|sÿpnþx Έ pœ ´n½¾–¾]¼.·ª³9°r°³ï·÷º¼mºç¹N¶>±œ¯®8°ÿÓ°¡¢ŒV|¥v4yqz6x q &xn %Ëp &{p %Ðo dq u öx ‘~‰x–éœ3¢ÿ =¦ Ú«ͧô™‰1‰YˆNÎä} %)t #p  zçËÖ…aùõ“þø˜üù=šûûmüþ7pýþ¯PùÜOî TéxUæcVæ¤V æYT ä»Uå°Uæ×Wé?Xë?VëyUê¹Uè»Uæ•VåVæAWçVè«VèªVç>Væ WçWè8Vç¦VèVéGVéKUæ™T ä­UæVæ{Wæ¡WçZWèUè§VèÎVè Tè¥TêÒQì8Gï¤?î>ðEAñÎCðËCïRFð7JóLõ³Ló]NòÈPñFOÿôOþö+PþõcOñÉPíÎPí NñHKýõ±KþöÒKÿõ…KÿöÓNÿõáNð‡MðÔLñ®Nÿó¯Nþô?PïRí½XîoXíœWë#WêxUéXUè¼Uç¥TæéTæñUèþWê·Yí$\î\í:WîkRðGKïuKì&Mì]Ní;Oî¤NîÑMîTMîuTò‘YÿônYô]õoþ(„y‰òx o…üÏý 6ÿ ?q { ú•ýÛ¡þ(› ‹ g†ÿ<œþѳý–«Ê–¶€2yØx7aÃ[†g*y <› ߸þ9ªt¢ ž D˜ 4… eŒÿ ý°¡ü«“ü ~ýkyýöŠÿÒ–>’ Mv8r q ÝO ÷MY]+nÆmrd a F\ …a ?g ]f »ƒ+–Ÿÿ#žÿ]£ÿF£þ ‹ÿ Ž‹ ±p¹X  ^ _ Ïe (_ Ò^ :h î|††|e ²VFa¨e !wvf û] ÕY ,}H‰ÏŒþn“þˆÿo{Is sn3h{excÁmœykÆf |^èzÿt˜ÿQ” Ú$Šÿƒ ý -¡þ ö…£qg¡gàn»§!â« µªã¥¡—¦‡ª|dyìyVpðfCce l+ò£ V»þÂÁ’»L´Ž®­¥Ì¢ §g°ò·Ü»n¼s½ù½ñ»ܺ»µ¶²³K­ ƒ›«‡ ¯}+~®‚8‚Àz!âp $n $…o "8n šp µq !Mp Bp 4t #²€$ZŽ[œÿ¹¢ÿ N£ ß ÿ ù œ S– ? ©”æ‘} ‘x5xÔx$z 8~”ƒ ߎÿüú+’üú»–ûýúÿ¦tüÿûSÿúrOîSèíUçHVçuVçUæËVç±Vç?Wé³VéÇVê0Ué›UçyTæöUæ÷UæÈWçSWéÍVêïVêûWç½VçìVé÷UéïVè”Vè„VçîVåhU äJUæÚUæ¥UæàWæ;WçCVèŒVècUè«Ué1Tê!PìÐGî@>í.>ï÷Að]BðÂ@ïöEóâJõ¥Lõ£KòµNñ0PñwPÿõPýø1Oþö›Oñ!Pì­Oë½NïlMþô(LþöáKóÇJò:MòNñLðßJð`MñËMòµPîÐRêuVêUXê+Vê VëQVë€Ué¶UèKTç±SæuVé6VìªWîÅXîÂYí¤VîíPð¾Kï1KîÁLï¨NïžOðXNîÿLî§Mï·RòHXõ­\ÿõ^þôùxÿ™έ{– X•þ ç›þ ¼€ªd åw ê“ÿP¥ž ƒ“ %Øþ]¶ý]¸ÿÁ¦ Ï} 5kXvšiPVo\Íq’N°ø½°®8 þ °šþ z— Ç~ _yÿïŒÿŸý c›ü ÚŠüvý m¡mtO®™þ(–ý‘dþ $M ˜Z ÌoømDi-d ïZ Z þn Jz)<”þ ´£þç¥þ)¦ÿ Ø©ÿ ™¥þ’2~}c …j Æ_ Úb b ¨a S^ ] ¥k Å\ qYðmálžŠ õˆÿ Z{þ Ôcÿ çrw•‚ÿ-Œþé…þ³v=u”{ y%jwh ¶fúb`a£T¿^;b0þQ•þªÿ tz †˜þ”£ÿ Sˆnc’o:zÌ£!¨Õªݧ”¦a¤µ–¿þzzÔseáb +dÔcelö‹ˆ¬E½ˆ¿`µ©5£ä™ò¹Ž^ W¯5·º»Ý¿À7½÷¹Ú¹¯¶ï´Ç´l«zœ i<”p™ y’€† .w!Qp àq#±r#âs !!s !¬q $Zp &"q (à}"#Œʘ Bÿ‰Ÿþ Ú£þ ¼¥ Ê  „ £b ±× Ò” ±’Å‹û¨Ñ ì”þbýúMýúË“üýÓ’ûÿìwþý–T÷8OíêRèíTçRUç´UçôVçQVçIVçsWç^Vç©Vç0UæãTåØTåÞUçéUæçWçVWé¤WêWéVæÆWæ6Wê¡WêÞVçÞWç"Wç–Væ¢VåeVæÝUæžUæ…Wæ^Wç‰WèlUèfUé’Uê\Së¾PíÚIïAî@ï¥BðBBï§@ï3BñGóÿKóÔLð1Mï¨Pð½PóNRþöùQÿõYOð#Oì‘Pí˜Pñ×NòNÿô3OòQKðYLñLòbKòsJñ½JóÄLõËOîÿRé{ Ft —u -v (Œ{"N}è‰ÿíšý c ý ¥ÿ E¬ ¯:®×´²ýª§«ƪÔ¥ÿ ®£ý ½ŸþP•ÿûö‘÷Z“þøf›ýüOýÿÿ„ÿÿåYÿùùKò»Oí"SéjTæëVå¶VæùWç/XéÂWçbV ä&V ärU äŒUå¬VæVænVèùWêHXéŸXç&Wæ(VånWæcVæÄVå·WåõXætVæ%UçâUèbUè¢UèÊVèœVè”WèÎWê“VëŠVé/UêwSíÀSî%Nð\Dò˜@ñ BñÈCðvAïl?îjGòÓKóKôMð‹OíÛQî§QñìOóÉLñOðQñNñCLð²Mí~OìPï4Mÿô4KôÕKôÓKÿö¥KÿöµKðÞMîdNìùQêÿUêTëÆUíµXìcXéƒXéCXëÂZì›ZíX]ï_ÿðc\ít\îÑVîGOðÐKñãKñ°Ní“Në¬OîNNòLPòtQñ²Tõ.Vþýðfù¬m÷û‹ ¶ùR»ñÑÁüŸ*y nÅ‘ã«þ»ÿض­7çšpžì£[—ýð{s ˆþ Õ–þ¯|ÿh%a üiêU˜z—s”zžý˜°ü©þ õÿ*ý ç„þKhøy°ü ¼hÿéhóƒÿÅ“þ G˜ý£žÿ؆ òlýmpyëkÏvrukmbµnÈrôrns¿‚ÿ›šÿ ’šÿ œýÚ ý ±žÿ yŸÿ ÿ&žþYšþÛ–N–"†/b ZZ FZ `c nïìžþB›ýú” 4|ÖtƒköiÐ^ ¹sþœ–ÿ V¡þ\¬þ $®÷¯¦­«¨yœ e‡Û~{·}ÿ'€þÛ’ý'šüú•þ þ´tÜqXt?u¢nc d`vŸ–¨î®U©Ÿ*’«eq\yâƒ_Qomovv Ër 3w2R 2˜—ºv‘[¥<¡ëŸ{¡gž/~øô†1ƒȈ_š5®ê½²½j»”¹àµý¬ ë  é› žJ¢¼ž Õ˜¼‘6ˆü€%w ³{ ^‰!“A”ç„Î…ÿÛ•üý µ¤ ­:¯ ¨«­í©–¨­â¯‘©£þ œÿ ”ùG“ÿö°™þøŸýûŸþþ †þ£\ÿüJÿõåNð¸Rê›TçòVæÚXænYèoZêRXçïVåèWåkWæ:Uæ¨Uå'UæˆVæ&Wè—YéXçXæ‚VåWVåVæÇVçjWç•XçMVæýUæTUèUèÈUç@Væ%UædWçÜVéýVê[Vé/Uë–Sì‡Sí˜QícEðä>ï†Að¿CñŒAïž>í¨EðöIôYLÿ÷òOòÐQìSí+PðNóKôÇLòRð_QîmOíPOì‡PìÙPí[MñLó Kõ Mÿ÷©KóKïžNîøMíÃPìýTì²TéíUé.Vê†Wé$Vé„XëµYìM\î6^ÿñµ]ñÀ\í [ìÍVîvOï[LðßLòóNîaMê—Ní#OñðSð»Sí/VðF[ø@rý ~ÿüF–þФ D¶‹Ãþ–Ë—¥݇ ‡äþG­þ 'µÒ²’³Φó£<¤÷ ÿxŽÿãr r `z *‹½uÿNl iÙgÓt"ˆ *…6…x“ ¯ýy¯þ‰þQ{þ{þ0a)k ÙtÂ\ –_ ˆÿ L¡þÌý©¢þr” Ž‚ ð}þ.„þþ?6~ ‚q sh ©c ‡nhqc®fèi i† Ûœþ @¢ý G¤þ ¤ÿ\£þžþ !žýóžþ ë‘ Þ‡#dd o\ ´i \r Çs Æ…ÿ p›ÿȘþ ˜ƒïla@X ·X1T kBþ‘¯ü †¿þ]¼ƾvµ—¡‡NhÄm÷|Ý‚ DˆŒÿZ–þ×þ Ù~þ.t#s qsDpÀnægWtx–­¨œ­U¨e—å‡Þ‚è~*€fˆ¾ˆE€A‚"ŒQ’ Ž‹‡{©ƒ£•ÎÍvÙs™Ϧ¥¤p¦Àœmƒ—p¼uvû‚ªÒª!¾¾R¼£»Ĺz±¦ cŸ f¢ ƒ«˜¬ ­¦ ¤ £›9” ‹ ;‡&—J—äŒ(‡üˆÿmq”’› £¢›(”6™Q¡ ô§,°9³û¬n¡ÿ Í›ÿý™ÿûKœþ÷- þö.¡üùuœûüûƒÿý•WýHõÁLð·Sì%TêàUèñWçÝXé‘XéWçˆVåÈWå¯XçmVçáTåöUåvVæWWèXè0WæçXæêWå VåÐWç€WèºWèæWçWæVæ+UçËUç,UæOVæFVæ‹VæòVè¤Vê¡Vé/TêŠRêTê_TêEIíÆ@ïÃBðFCñŠBð’@îxDï/Iô1LöOò)RíRìáPî¹Oó2JöàJôdQïSQìÂQëvRì‹SìPí–Mï×LòÆKÿõ·MÿöQLðûMîÒPìTNë:MêSë=VèoUèËVê!VêÀVé Yë]Zí \ïŠ[ðFZðgYî¹Yì¥UîANîžJíeMðINï€NíœPïùRð®UñóTîfYñòjùƒþ>ˆü ”ü¾¤n¤ {®@°{›þ ëþ •šþ„¥üö¬þ;­—¯%µó°8¯®¯ªœÿÿn~>spba 6ašljNm§yËz!±zh ԛݣþwÿOj ª` äZ Cd ­pÚZ H\ <~8 ÿ¥þ¸§ÿʤþ u™þ PŠútŽþþ=þ€þù„þ;}ÿ©s $s×i¿_æa^ ­wh“ÿA˜ ’ Šæšýû˜þ ;“ÿð˜ è‹ ‚ ¶{^s±yú„ ö— Œ îÿ—… 3€­snd ` ”^’Z ¯` ¶w½¦ÿ¶ù «¿ ‚¼l¾ïµ¨—Kpú[Lg *…ÿ‘7Œ 9Kšÿe—ý ýˆýö{ýr{ÿfwXv°nQopg Énž ª(«à¨>”ʉ$“—–  .÷Ž+÷’s–¾—”’ …-‰‹™$w©vþÜ¥t¨…¨0¥C—¸Ípíw€¯…õ‡fŽz¢·¥¿¤¼ð¹«ºþF·þ4±Í­ ¬#³K¶m³ Ž®Ω_¥ ¢ v›(™Žš±5š’¥ˆñ‚䆸Œºƒ "‰zg„ÕšS©"³ÿe¶­w¢ßÿœýý5¡ýú>£þø‹¢ûøaøüé‚ûÿüRûvFórKðÂRíbUì€UêTWé^XéVè±VæÿWæMWçÐXçWçkVæVæ[VçùVè˜Wç‰XæBXå XäYå0WæŠXèKWèWWèñWç•VçVçmUèµUèÇVèœXç~WæwWèYWé,Ué€Tè5TéTé)Tç/LìõAî>í~Aï¯CðCï.EðNIóýKõ LòäPîÅRì)Qí´NóBIöGô£OïQê?Rê&Të6RíáPïüOðMò¥KÿôwKòjNð PïPíÁOêMê¤SëRTèÒUçTè´TèUè^XêQ\ìsZîºYðYðwWïsXí‡VîcPïcIìNí;OîWOñdQòRñ)TñðUïV[óÊrÿýC’ý!ü …þÍ‹à„Jˆ ¢Ž úŒý Õ’ý Wžý/¦þ D© –«X®µŶû·›¶ª·v±&¬Ï—G‰ 6qA]WcÙk}k nnj¶f ƒ€LŠs†YeVEW8jqÏi ub:uG— W¨þ;®þ N¯ýw¨þƒ˜û :˜þ”˜ýþšþ„•ýå–þÛŒ ß‚-rè`À^˜\ {h°yhy Jy 2ŽÒ„ׇ ì‡h r “´‘ú“œ ®ठüŒÿþyÊa‡b3b”jKksi²hÏ{ªÿ h»û ¹Iºæ´ «‘Š/c ¡_ s ›’ÿ Zœ ŠˆÕƒ ~˜ÿ ã¡þ •ü9†üµƒýp~ÿºx±kFrhoJgû®!±îªL¥I˜d”Ò¤“ª_¡ǘ±•¾š¹ŸΘ‹¸„¼‡y–†¦ éþ†•†É𒍕©©”§X˜ykd{3‚!9…fŒn—d«»–·À°˵ÿ1¶ýß´ÿõ$·T¹mº ¹W·í³š¯]­Ϩé¤Ë£ D¦:¥Ê ¥˜¿ŠwXxY|×v %m Bu‰ñ™ÿ(¥ÿÚ¬‰«^žØþö–ýþžýýŸýúašþôj–üú‚}ÿ Pü\HôLïQì]Të.TëhVéUVè¨UæÛVç[Xé\Yé}XçÎVæâUæøVåVåVæWætXå¤WäïXäÛXå¨Wæ„XçfWèºWçWçVXèYéWêpUêÁVé€WèóWç^WçgWèKUè„TéÌUëUéÝWç,Qê/BîB>í„AðèBñ€Aî¾BîHòºø¹U¹»ç¼_±ê§‰rÉ[çdðqšx.q7qa hW {fnjÙb ±WÿRkZú‚ü“öŒ ý‚øv I…iþ 0§ÿ ³ý3±ýê¥þžý & þ Ÿþ` ü5 ü žý¿—U€¦p¥a„b{^ –` ƒ` þm €2rúr F€˜ˆÿÝš G¦ƒµ¯*¶þ¯v¶:µg¤†ÿæaº[h$tyt"k[súŸþ µþ!¨@ª ˜ÿ ·zslÁw‚þ4žþ §ÿ:Z€m¡þ ýýþý¼‰þ„ÿçwósȃ H|›pT¶¹;¬S¤«˜s˜έ¶h«³žŒ›ÿ1¥0§å˜Ú…T~ iŠtœ V® ë¨ Æ”<—W© ®©i¨§›ÿÚ{WdtÀ³€Dˆ{”¥u¯6¥U£'©©ß­͵¦¹uºî»ê¼;¹¸Œµè±Ì­y©é§ 2¦ ö§/¦s¢,•‚Ê{ü{ ¹t fk sk jr¦|‡’éš Ö{‘þ±”üÿŸûížýõW€õcký¸OücIõÁLðÒQíýSì3Tê|Vè UæYUå²Væ_XébYéÅYè‘VåþV äJW ã,V äUæáU åÉWä~Xå>XåWåÜWçqWèŽWèÊVæ‹UæÚXéª[ëÿYêfTéJVèµYè>XèTWèWèVèUêTìJWê=Zè™TéçFï[@ïlAïöAïÆ?íÔ@îÀFòÜKôÓLòêQðQîÓQïÅNôLJÿ÷âIöJNñhRì)RíÁTñSRóbPòÁPïFNîæLîßJîšPðòOï»PíaQëKSênRè™TæQUåSå­TèPVéXêU[îè[ð“YñYYðXïtYìYë4RíLîuMî¤Sï¬Rî‡Sî,RíÇVì?Tî»Wÿù*_þpƒý }žþ*ˆ _[U\ÿ¥yüˆšüÀ¡ü € ý ¦™ÿ˜‹œ˜ `« Ͱþ’µþ¯ºž½"¼‡¹Ù½cÁ~¾¼¸ñŸȇÕr‡xþ(~ü†:|½|kbY LX„Yÿ¶[þ ¶Vþ TPÿ­_ÿŒ R´ {°ÿ ¡þ~…5{j‡ï˜ÿ©ÿ¥±þ»ªœœýuþ y¡þv¨û 0£ú-¢ü¦ÿ´–ÿ„äpÜmzd j` T` Œg ›s1lØk7y ó… Øž €¶NÇ{»^Àþ0»M¿½A·Æ“ÿYl`akw{¶…Å}£wžkï‚L“ãŠ"GŽBx¡qFwЇ~˜ˆ–ÿF«þY³ý³›ÿÔˆ÷†ržÿ ®¥ ¢˜ÿ€É} R‡þ°˜þÒŒÿ ~?·Ÿ³J¨›Б-—ª§·Œ­_j›ÿk£P ˜“„Œ ˜ ”Ÿ ã§ `¦ þ™ /žB±l±µªè©i©œ£ÍŒóoçj9v~ ~FƒÀ“u¤ e§4›p“2‡rŒhšÿ觉±~³ĺ¶½ê»}¹¶³Û²^°/« e¨ …¨j©§8Ÿ©•ªÍŒ±ƒ •v´p 6h ýe Êh Rtçˆ:‡þ»ü4›ü—ÿ }ö{\ í„SøhHøÂJõÊMòÊQïRî¦TëMUèŽUç»UæÃVæ«WçXçþXçVæ»U ãV â>Uå»VçÎVå;Vä³WæEXç›VåÞVçúWêÓYé-Xæ\Vå­XèwZëÛXê{Uè³VèñYèfXéùXèWVèàUè¸Té0SëhTê—XéýVêuFðä?ï¾AîŽAízfhžn1~Ë‘' Ö­L·<»c»mºv¹–·ø¸¶«±„¯i¯²®J«I§ÿ¡|ž®œ$•R‡w{ƒsj /g Ru4þÖ‹ýdŽþ‹þ<Š£~¼`ñ…JïÞHõzGõLþõ{Lÿô¤PòìRðÝTíÉVédUçêUæéUå|VåeWæÇWç¦Vç±UåVåUVç³Vè[VæˆVä^VæwWç¬VæjWçWê‹XéWWçðVå^VæwVçOUçNVæ¶WækWè©WééXè8VæùUæPSæ¿TéTëÀXìtUîæHó§?ðÏ@í¾@ êAì/DðdGòqJó Lñ“Qï!RíäPîeNòúLöˆIöùMÿôóRð‰RîSí^SívQì•QìGRî4Pï0Rï*QïPíBPéµRçTæ{SåTTåTå?TéÞVîUYðjXðqZð±]ðV\ð)XíöYêïXé]VínRîIîFJí.PîlRîVïFhþõ­“üýÓ†ùþf^÷ƒ^ÿœYl] †a hY¿Zšzÿ ’ý ñ˜þ P“ÿ k‘ Q išÿ :› ÿ™§ÊŽÿð›ý uµý¸‘½¡¿ØÀá¹ɬ•¤}™Z™q†¡×–‹•}ÄrÈ`|\Q]þò\ÿ VSS o_ … É® ݺý¿­ؘd‡I‚êþ>‘ÿ w–ކ®€£ߦý=£ý ¤¤þ  ¨þ«þ稘9ˆ>mápFtÒvrùqPg ^ío«‚8ž^¶&À¡ÁËÁ“ÀQþ«q›#Q_„‚¯!zBi5^þf´c èfðeýmŸŒ M¡þ a¦ÿP¨O¡žØ¡ …æ[“‚šÿ|™ÿ©”ç—Ÿÿnšÿ Ešÿ —‚Š• 䜸]±œË™žN T™Kšòžçnƒ Ñ™¬ Ñ®e«ú¬‰¦ М °Žц(‘džó§,§Þ£Á™´†›mš_øg·q%süƒk¡ÿ °þ þ‚jµiBl4u ‡€žÿ]¯Ì·¹»V»‰¼\º¥»ïºï·$µá·Q¶дì²Ä­ú«–§ b ÿ f“gŒ)‹ ‡ —ƒ ”&—ýþaŸþÿŸþ¡”–{e\ ø×NñCñTCô0FôRLþó¿NóPò‹Rð¢TíÂWè&Wå·VåðUäÜT äŒVæ WæUæÍUçeVé¡VéðVçîUåÆUå×Wè@WçWç WèOWê,XéFWçäVå$Tå§Tæ“TæÙUåôUå²UçKUè¬Wæ]Vä^UåºTå6TçTê…Wî/Wó;Kö¿@òÐ@îœAîŠ@îïEòIô8Lõ"Kò»PîURìVPîñOòaKóðGóÃOò*Tð+Tï$QëçSé$RèQê5SïZSð²Rî«Rí±£ÁŸ0¦© ଠª Ý®þ ¶­ý­ýL«ü Ažý ylJ ôÔD ðfHókFõ`EõãLÿöëOó‰Oñ˜RñPTïñUê¤WèØZè&Xè·UçùUæWç:WèŽVéŽVé¼WéËXè/Wè²UèéVè„VçqVæ7VèÉVèÂWè§XètXçfWè[VçNUçÈVèVè†VçUçíWçtVæ”UçËUècTéõUì*UîlWòMóÌ@ð´@ðýFóDóñCò›Gó–KôEKó•Nï_OîòQï#QñLóÌHôOJõ„PõDQþö SòxRìŠRê`Rê­RípQíÑPìºQêýQçRç¬Sç"TæEUç¤Vé1Vé{XéÓWïðXóãYò[ðYíåTë|UìoVí´ZîƒWðLQð-Lñ6KõäRò¾WîV_ñO\ôUZõ¥]ôGrþ•’ÿ €´þN¥ü :–ýU‰ü Q†ÿ\þƒƒÿˆ [;„¢y k Ad &` Ù\_Z aW‚[gf ph Ìvç›3·M»d¯F•œh‚YzÇd Š[ õYZZ´b yfDgÿÑ]ûúWþ n_“WÿÁ[ÿ–‹J®йþ¹±ÿ¨ÿ1¢þ •ýºþ»~ÿ´d:ZwY_ Ya §w£–ÿ æºýJÀ´`¦rÃi3W ?pÌwa õZ&a saºlmuÎŽ‰¤ªæ³²¾/½ûºKª ë¤n–û‹ìxÿãf;ZU•açdJkþoú{\w¢uq¨‡ Þ·Œü· Žÿ¸›ý•¡ “¼—x+Š ×— Ç¡ R–)‡Ï”^£‹ þEŽÝ‹—¨p¦’’ ‚‰ ᕘ’ÌŽ“€±{£•X¬ 2²C³ µø±u› \‘ÿ›ú#S”ú-+”Õ¦®„´^¶µo¥ φøb1X”e}ýœÿ ¶ÿ ³ÿ¯¢ ‹Wx¬x”‚ ‰ÿS–ÿ Dþß™ÿ´™<¤ ßµY»P¹Ì·-¶¹ ¾E¿h¿–¾T¹µ|¬\¡–¥V´ ¶f¶Ü´º³¾° Ú­ÿ g¤ÿ \šÿ '{ÕP ïuK ïLïžEòîDõhJÿ÷ôPöROõ°Q÷ÀTôpUíWêòZêÅYê‚Wè{Vç(Wç`Wç’UæÍUæ²Wè®XëàWêìVè§VèTUçíUçðVèVéiWé…YèWçVWèöVèæUèÄUèUèVçmVçÇVçÒVæfUè‘Té¨TêhSëÃTë¶Vî Oñ:Dò©@ðöEòLEð]BîGòÓLô^LóžOð PíéQìRPíûMòJHôpGóšJó,KþõïRÿôåRðºRí:Rë[RëÓQëTPê×Ré[RçsSé@TëÛUêUéMVêVXì4ZìYîÂYðåZð YîUë»PèåQêêVíZïYïPRì_Lí·Mó'Pð¨Víf]ñÌ]ô¢^ôFcõÈrÿý@“ Jºÿe¾ýk²ÿŠœþâþP†þðÿi„‰ B‡…€ºp |À}¨²0³µ¶¸µô£ ¶ŽMˆþ¦ü ×­©¯Y¶}º»|¸¬¡ý¨{þû\Qeÿ¼‚üxŸÿ ,·ÿª·ÿʱÿr›†{Df”og…ÿ(Ÿý ¥¥þ ”ÿ½á¡ ±M·©·™³ëªè§,³×¾`¿ؽ ·>²c© îªwº¹Ô¸à·¶¦µ–¯,¢ ý˜ ZyHSômUíªTíÈGò¨BóªGõ›PõÅPöÔQÿùRöÕUî?Wì4Yê7YèXçXç?Xç$VåÔUä¨Uä¼VéðXíAVë”VèºVè†VéyVç.UèOVì VëÏVèâUæMVèÑVé›Vé9UçUæzVçõXè>VæÇVåžUç÷TéƒSê±TêwSêSíãPñ$IóCððDðÁDïŸAîÛFñóLô¢Nÿõ`OñRíPêOëØNðJôÛGóÁEñÉJôéPÿõ\Qÿô9Rî'SëTêMQê:Ré|SéISéëSë·TïºUïˆUìdVëŸYî¢Zî4ZíDXíÛZíVXìÐUé¯SèþTéÎXí’[ïûYíµUëÞZìÄUñ@NïWîP^ð1^òÇ`óÕiöjsøíˆI¨ ý¾ÿr¶ò¨ šþbŠÿn}|±wÂuü†.Wˆ9trWdui:fþzjÿ9~þ ,{lŽý Óý«×®ÿ: ýð—ü>’þH†ÿ wr!dhvx{ £| `oqÜkaW\Ô^™` rnýä‘ÿ̲ÿUºÿ³±ɨÆþ3’ÿ/þ¦|d •`Bwox Êœÿ$±þ -¾þ®ÿu£t†#-iÎROQQQU*\ ðax_ cÉiýosvT~ìˆo "­“·«E£l›æ—ÀŽszÀ_ @[8olìmÿ‰zÿ9žÿ,œý[¦þÒ­ §Q õ¥Ø©h±µþi¿ÿ@µ±¯¤²3¬Žœí“~ˆl… —,ªb‰•‘ÿìŸþØ«ä­~¡LŽDœ(ž›Šš•Œ*| SŒò§ y³ñ³¿¶$µù£ Œ‰ƒ™c¦ß­а¨µô¹ü¼™¼ίÿ_Šÿ÷bcs~Ÿ º6¼Í»ÿ»©؇ˆe`Æ&¢ý ¸ þpŽOžÿ »°¼¶@µ_®Á¦åž¯¥E¹™¼¯ºcµY°Y§aŸÛª:ºH»íºW¹Á¹Ϲز\  sŒ!j àU÷ß\îCZíÜJò„Að•Gð´RðHRðŽQó…Sò.UîWíXê9XåfXäXæIWæUåUåˆUå¬Vé²Xí—VëUçÝWèWéõVçgVèGVì„VìÈVèÊVæbVæGVçUæTä¦T ä!VæÕXèvVçôWå-Væ,TèíSêèTë'Sí´Sñ OôíKôCî'Cï CñÁ?îãBïøKô‚Oþö–Nò*Pí£OëOì˜Nî”Lô¸Jõ$GòMLó›Oÿö¦Oþ÷RïRêÑRé¿QéQè´SèTéìTìãTî_UïVíWì’YíÇYî­Zî|YîÜ[î|Zë~Wé‹Wè/Yé¸YêV^ïX]ðƒ\ïÙpòaïªNí–Xî ]îÿ]ñôcó¾qÿök}ùF€”˜ÿ Þ´,´N¥ðžÿ ’ÿ !„ YyFm‰kŸ ˜ b¢ 9“ 9„Ÿs™vCvû ×uþ̆þ©¡þ ë™ýL™ü©›û¢«±ÿÄ«ýØ¥ü ¡ý c‘þ RueoWˆÿõ•þÿ©nÍipåoþènÿ›kÏlve2x†ÿjµC±2£œÿu–_™ÿ…ÿ!zSg þl|r]“³¡ÿ |°ÿ Ÿþ{‘$¬(šq1XÆTUTX BY !X ðbìdf;j‰t¥vy‰›§dž œÀž”ÿ‰MjðoŒÊ{ÉuS|½¥;®þ´þ'µβ(© ó© ©î®f±§Î NÌö·Nµl¶!¨÷›N‰ g“Q§^–t£o¨Ÿ­,«O¡#“)•@ ®¡¶¤c¥+“Ñ| v‰ª¨ ô·á¶]¶ô±Áž ãŠËá£ô®ë²…´Ô·þºн»¤°8’q'm€lŸ¡»«À`¾`µšBu‚c噞ÿ }– ž‡7?›ÿ -®´Ä´}°Õ© Т ¶¥=µa·šµN²æ¯œ¦øL¡ ±/º}½»Ô»|¼µú  ̃f` ÿaVõƒ\î·Zï8LôwBòøHïËRìTêSìUîWíÝXì#WêrWæFWäqVãîUäµTåiUå&TæTé%VîRUìÒVèWè3WçÆWç VèþWê®XëÙXéWç`Wæ«Wç¼Uæ¹T ãS ãþVæ;WèÌWèÔVæ•Væ¾UèóUégSìpRí×Sð½Põ0Iô¹BïŠBðrDòAïRDïIóˆMÿõ™Nò{OížOëÇPì°PíLòÞKö Hó©LòòNÿö½Nþ÷ePÿñtRì$PêuQéWQçÇRææUç7TêYSìhTírVìUWíqXî´Yï ZðÓ[ñŽ]ÿñ1[ì×ZéZé¶]ê©ZéŽ\î`^ÿòu`ÿóÄhò`ïíSïYïÊ^ñÃ`ôAgõýwþø9…þý¡„ý•þ "¯ l´  7˜ÿ œ˜þ j—‡ °|Ek ×zô•¢¯ÿ &§ÿ¡œ L”ÿ Œü¼Œý6“ý ¨ü d¦û5£ýÖþ Í © ­þ§¬ý‚£þ á‘ÿ ¸uZþ¨ ý õªýÇ ÿ*} ‡h¦mxqþzs)jƒl g©iqƒs¤§­£›Æ—š››ÿÝ”ÿ¿{=k}fþ}¦‡I’—Ï‹o$jt&wo¥[æYðW·XQW S Qçcufÿî^eWhØlõÒ”°Ý›ÁšR%¡0œþŸ‹1yÝ€Œù‹ÿµ…ÿê‚çši­¿±„²¶³g²y°õ«±¨ ¦¨ ÜÆçÑž»;·±·±a«~ž p–¤’ßþ£®¬¶¨Ò¥¬¥1¡–—–× Ó¥I«a¬ š Ö‰3ª ¹Ÿ·L´o® ²ž x‰+Œ™¤y°/µT¸^ºO»ô¼»#¯þ—ãPîüPëåQëÜQîmLò IóNIñ|Mñ!MõjNÿö[PÿòVQïïPìDQêœRèYSæ¿UçTè>SêwTìçUìgVíWïoYñ9ZñgZò¨]ñ\íÀ[é^ìH\ëmZêYí¨Zï]òz\òº[ònXó\ñ”^òªbö£gõ=rÿ÷<‚ýþïüz›ü |¯þ Ͳ g¡ 3” ”ý §¨þ¡ Q“j‚z„ª’ Æ«ÿº«þ ó¬X§ C«ÿt¡ý[ŸýdŸý Õ­ü½¬ý Ѝÿ »• MŽ 8Š ]œÿß«ÿ]¨ ˜ IŠ Ç—ý•®þ~°ÿ A§ø“ r+fHjkh°b[kkjÏbÙj’Ž[¦¦†žM™›ñ£z¤ª”‚Åt {ç}ú|j{œvÙt Ïjëe­X ëXÏWïZYX ÛQ$Wulõqºa”`àh3l¶ÿ’‹œŸ4—¦ £V˜p‘­Œ‘‚§Ž!”·¡V¨|®A³¤¶`¸š°$¨¦(µu輡¹F¹´µ̯#©1ž_)©j®¦žŸ T£Ž›z—mœ±£]«8«ûœcƒ £ˆ¤ ë´ô³«¯Ó« \œ cˆqŠ˜ Ç­^´]¸ÔºÚ¼¼‘»ȶC£é‰Bxˆ~——9·ÃWÁP¹È© 2–rƒ> G§ÿ  ý üþ~¥–««rªî¢³ÿ³ظÁ¸¨³ã° ⯠® ¦™ Ú {•H§ Ó³l¶´œ·š° ±† ûY]ø—JòoFñ\EõÚBò>Fï)Pì¾SéSè{Uê²Vê¿XêWêÄWëïWê6Xê"XêgVçgUæpUçSé–TìUê;TçíVä÷W ä„Wæ^Xé/YëzYêCXè´VçiVè„Wë”XêWèWèVè¯Wé’Vè‰VèUè¿UêjUì±SìkRëõRí†QñcKñiCïZCðEñDðçEñÊHñ LïËNîýPî)QëÙRëÍQð¶Nó5KòoKð Mñ"LôüOó2QðùQîÞPíÒQêoRè9SçTèSéSêõTìUîUï Wð%Yò¦ZòäYðüYîÉYëáYéF[ìÚZìWëíYí:Yîƒ[ï›\ñf[ôËZô«\ñ•]ð®`ô`ò¤bóçnýü‰üú‹¬ûd©þó¥¢—Ó’ý бü ì¹ÿ›©ß *Ÿ å™ ¢ÿ?¥ÿ ¥« 5±–² ªÿ ž¦þ £þ ¦ªÿ«³þö±” §ÆtÝ‚ ¢0±ü¥ Hžÿ ³Ÿþ‡¨ÿ¦ è¥ Ÿÿ ý“l»kÞb¶^efñn§f~avÒ˜ ¨Ý£›’œˆ¥î3§¸þ; ‰à{ÜrŽn9o 'ohm]µZ ÑW ŠVˆX¬X6Sÿ½b #uÏx¼g6\þm1v¸}߇ò“ꜩžcž¸¡ ¤š¢Í ¦›u˜„>Šy€•"b–&Bš#˜¥ȯ«¹Fºü·¦®èª-¯Aºý»íº ºü¹#ºH¶|³Ü­’§â§ ¬¦¡f¥¨R¢j›œA¡Ü©ªüž}ˆ e‡eŸ ˱N±,­«© ±› Sˆº ¢…®g´Źä»ï»O»Û¼L¹_¬•C~@xÕŽÓ¯œÀ1À€¶à£â‘!{…õ¡ÿ ¡²ý Q®ý )¤ÿ '¦)©£;¤–¯C²"¸°»Wµx® õ­ ­d¥— Š‹ÜÑŸЦ ©&« g³…· l¦¸Ês ÿ–SýCô˜AòCõÉBñWEïàMî°RêBTè•VèVèTWèâWéLXë~XìôYìOZíYXêóVèUè#Sê9Uë,TéÒUçYWäXæcYéyXêzYê(Xç¾XåWæ´Wé XëÇXëœWéfWé[Vé¼Wé~VèäUçÜTèUë`TìíRëSRìÂQïhPòÍLòVEðjCî>FðpFðäFñƒHðfLî^OîPîRìQî`Pñ%Mô‚LòÚKñªLònLõ!Oñ‰RìRë Që7Qê’SçNSç¬SéRéSêŒSìJTïßSñàWñ1XòÀZðgXïâWì‹VêqWêæZí@ZìWìÜZï6\ï^]î<]ï^ÿóf\ôU]ñ{_ðañ,`ñ[ñå^þùòwýB’û_üÙœý<Ÿ—Úþ ··ý½ÿxµé¯L²¤­›¶šÿú£ _¬_²ÿ}¯ÿ©þ» ÿ g¡ Á´"·A  Á~4{ဠœ<¸Q°º¥ 0¡þ ˜£þ e ÿÀ¤þæ¥ V h~@zþ0q—h bIo“k©a€gk…¹¤<¦gŸ—œø£?²ï´ °f¥wŸ‰¥~guSrŽoælcb#[ ÊT¥SxUœW>e ëxûtÐe[V½h‡{Vzòv à‡½—šš ÷  Å¢ £«¦Ö§£á” „‰{”! ”&ú‘%ò™#¦oµ4»º¼ß¶U°9°η-»Rº o½¾ä¾d¸Á¶ζ,¶d¥â«¨À§zªl¬>§„ ¢ ¤¥׬O¬>¢rŽy‡ |œ ‡°²­ì©§œ¯Š‰*¥˜®©´$º¼ï»¯»„¼üºÞ¶§™“ ŒI–¡¨·®·ï¬• |+vHˆM¢ÿ 0¶þ _³ÿ‹¬ ¬–§N˜"Ž‹"ë“L¦ «ˆ³“ºKµ’­ '¬ H¬{¢Ò• õ‘(‘A‚‘ œ >£ U© I± µŸ˜{ÁZ ŠC ÷o?ñ@òRCô Bò·EñöJïæPë¢TçfVæTVæ1Væ9Vè|WìøYíYíYì:XêkVêéVë+Uë/Vë|Vé§UçWç8Xè6Xë(WëªWéWæüYå+XçRXéLYëSYëUWê‚VéêVéhUè¥Vç¯Uæ[SælTéSSêJRêHSí8QñeOôÇKô×EðsBíEïNGñ¸Gñ6Iò Lð’Nï®PðxQîuQïNñÛLòŽLòóJô²Kõ×KöÉOñLRìÂSê Qê¨RèSç|Sè¶RéRéÝTêTí™Tñ;SòÇVòVWñZXïÛXîáXìÐYë;XíÂ\î'ZíeYîºZñÕ^ñ¦]ï]ï…aýó}_þõÙ_òqcñþbòdô¬eÿöeüû%m<€ $ŠŽPÓ“¡þy·ý©º~´/°+¯§¬¤x𢠦 ›ª ͯÿ6©ý þ ÿ š ô¨ þ©’£IÿZŒÿ Ö— ž¡+¹§µ¦¦ø¡ÿ Ö¢ÿ Ÿ ¶¡ýXƒm‚E…ÿ—‚ÿî}ÿ½mæwÿÂp(n5cÍv?•«¢£¼œ‰—ݦq¶¹¶º²ö­ÝŸm”9…V}pt9r,onKe=W PN*S³W¦^ ˆohi3`sQê_¨váxgn aƒš—™˜œEœ´žDŸ¦£1§!¨A¡ šˆË•·– ä’!”" 0§$¯±·¨¸é´ ²,´r¹½· й æ¾O½œ»ˆ¹c¸Bº¢´««¨Ñ©¶¬}§l¢Ǧ–¬f°ø®˧"—W  A³x¶»³-­OžPŽ)•,¦œ®{³Ĺ¢»ü»¼b½ö½t¼I·1§ï—ô˜§‘¶صa¥`‹ }nþªn .Šƒ£ ŒµÿP´‰¯+¬|¥M(`} $Ú… v i§ O¯ÿ§¶ÿï³çª í« 3ªâ  Ó— ƒšÿu–È톥“k›» ðž i’Ãt Pþ÷; ô™<ïåBòªDôCóDóŒHòŸNìSæûW ãVW äˆVäåVçEWìQZî2[í>XêoWéVëVí¥VìVê[VèïUçáVçÉVè¬VéGVëŒVë3WèÂXç¬XéÅXêßYëÇYìæXë!WèVç UçâVç½Uç»UçuUè—Tè6SéRîYPÿô¢Oÿ÷IJÿõºCð‘AîQFñ›Hò Eñ2HòKñìMðOð Oî®PîäPðMò‡Kõ‚Kÿ÷PKÿ÷"JõENòÖSï2RìÚQêSRèSç*SéiRêÑRéÛTêUìTñHUôTõPSò¯Uî…VìlYë¬\íâ]ï]ïO[ïÔYðì[ò}]ô˜]ÿó‘_þñ'`þñ÷aþò¿cÿóSjÿöòf÷`gøŒiÿølûÿ¨oþu D… [’J”T—à¤þ`·ý=¹Ô¶ˆ¯”°©³³‚« ©Ѥ @ž )¦ „«þ _¡ÿÛ›þ åž Ä— ÜŽEÿ ³žþ `¦­­Õ»€µš©£ ž 㙎[„âk²sg„ç‹ZŒ4ÿ†Ê}Ó}ãiTklA˜\¤%ŸŽ2–/¯ÚµX´1µ:­û§ —q‰¿zcwGtrSlåbéU3RU6Z "\ó[ŒYWRÿiXÐlXvªo…Ü›,Ÿr¢מÓŸÆ¿ž)£Y¨M©e¤—±›à—¯!†‘"¨–š9 +­\¸¦·ì´Kµ·T· ǹ #»»T½«½Q¹Ö»ù¢À«©„¦r¥X£Ÿ›Nœª¨±/´3´-²Û¨¢dªž·µºc¸´£Æ“ʘ.¥¬ú´²º-¼¹½<½¯¾½„»ŠºÙ®P›jž°ù¼G¼²¬} –mÿ4mõˆª æ³ÿ ݲ Ÿ®ˆ®‘ª;‘&)v %=x ì’ ¡ Y©ÿ—²þJ²̬ >¯ ­ ᤾Ÿ3žÿš L»„n…´Œ„“» òŽc~aˆC÷Ø;ð¡Cò°Fó8AòëCòfFòºKíbQçT ãÒW â'WãúVå·Wë#Zî¨[í9Yê+WèîVéVë¶VëòVérUç£T åUåœUèTè*UëjUì³UéÇWéÝXëúXìPYíŠYîúXëßUçÃVåZVåŸWç=VéˆUèUçTçUSéŒSíWPÿó±OÿõoKôHDð˜AîÊHòIó)EñIHñŽLñ3MðýNï•Pí QìPîÜOòGNÿ÷Lÿ÷ÇKÿöJÿô.NójQñœRï0RìƒRèSç SèSê(Sé*SébUëVïÏWòTóSò¢SíœUêÆXëøZíP\ïÉ\ïÜ\ðRZñ\ôi^þõ=^ýö‡^ýõ_ð`ðbdÿóãnÿùYiûŽiû‚k÷{ü1wúó|y‹þ 8žþ ¤¤•§߯ÿp¸ÿÔ¸Ú¸§´e·ã¸ê¸E³ð­ͤ –T ­§- ™œý«˜ ŠˆÿJÿ ï —«W¶h¼¶°¬Ö¦z (ŽáxwfU¼\¹t싚`”þŒšýÛ4®~[}éuóˆ„c£·‘|?¥*ªq­å³K³Œ°=¦A›~Š\ŒtZv#rEhß[ kR ÊS ¼ZÿYQZ­Wÿ [ ][c ~h xy ŒV©}®4¯²¨1¦ëª› Ÿ¥1­¬´©¾¥›œ"áŠ$•‘ј)¡«Ķç¹î¹ ·Q¹ü»4»Ø»pºa»K»y¼Dºv¤û¬©©¤úžà’µŠ£–r§˯þ²£µ µO®qªÙ±™¹u»uºs¸i«Ýž*Ÿ ¦‰¬_´…¹ؽ9¿¿ ¾)½Eº_µ ¨~š&¥e»Àÿ­¿$±â”tQsü”þÒ® d³ÿ n° $¬ë¯ì…“ ów %3p öˆBœ ¤þ-¬þs°ÿ÷°…³p² ö°P­×£ÿ#™ 芾{,vez v‚“‚™ÿ =’­€lSù>î¥BðBñ€@ðïAò™Dñ;IîŒOëR å¡ÿ±¢«™ÿqÿŽZÁRWrVþ í_B`»`™` "l ìi”wýÁu ý›°“¿^¾R»ªµS«Ò¢˜{›U¡ª¬W«ã©¤pž¡”F ºšâ®L»†¹¹¸ƒ½:½¢½»¢·@±R¦g¨¦‹­ò¨P°/¬g¦eŸu’f“4 n¬s±γŸ´²±t±¯·»¼;»€»d¸­È©i¬O²2µá·Ûº¼Í¿K¿ž½Ÿ¹õ²§ž¾Š"—™¶F¿Yº¯Ošq€{‘b§ {¶ ϸεy°¨³“ ï} #™u #Ð{ ½€úˆ·’ÿ ?ÿ Œ«þ¸D¶Õ¯ô¨ 6Ÿ ±š H#y(i÷d Ñd €fLnÂ{ëyR_ô“Sð-Jõ@ñ?îAî5@íüBî‹KïuNë•QéäTèAVéXíXñ¬SòƒK÷°Bó°@îçCïCïrFñ;JómLò”Pñ RïFVïÁYð]Xò'WóÅWñ¢VðJVîVë“Zé ]èXå7TçLUì8Ví¨Vê>VêVìTTîÃTì§Wé;Vç¯WéÁXêÛYêWêáWèUæåUèKVè\[é$aì”dî)^íãWíDQïPOó[KôEGñ/BïóEð¥Hð|Fí/Gë(Nê¦Rê¶RëaRéåQæDQèwRîNPñ4Oó+MóLMñ1Nï×Oí:Qì©Rê$RçgTèpUé…Të-TîÛTñ3RóËTðUî0RïûQð™QíäWë:Wê.Vì‚VîiXïXïÖYð‡[ó]ÿõx\ô›_þö‡cþü&kýXoýùU~ûÿwŠüDšû þ¦û u®þİ㪪£ÿ£¢a§·¯8®M¤V™•—× Ȩµd½½ª°Ȭ/¤(¢ÝŽôx Ýq ?‹ØžÌÿ¾Ÿþ wªÿ @«ÿ–¯þ+­þ 3³û²ÿT¸ë»t¼j½»· «sÿµ˜k¢Ьâ¯u³L³)´]´:®ª ›ŠN„a€~”–£#®·"[®Œ© E¢V—6Ža¾~$wðl\m9Ž[ˆý/€þv÷xÿ ýÅ’ÿ#;žX ³µ O½½k½\¼xºù­ÕœÁ•(™TŸ¤¦X£@—ߘÉ›3™–µ“Í8¬T·â¹ ²î´ µWµÀ±ϱU±ƤÄ {ž\¢ܪ÷¹£¹™§x™%—Yž6©ò¼¿Â%¼>¹Ä»$µR­ø­ °ó¶’·#µC²G«ü© 5« {¯ å´^·غ%¼ ½•¾Ë¿ûä´:¥o”+—€¯9À´ºP§;Œ¸{ ¹‰ £µظƒ¹›·°¤_Žw"”n&™s & w!V~Þë… æžƒ´ѹ%³B¨ØŸn• Ñ’¬Ÿÿ¶ÿX¡3d &G œI÷6OöSóõTñ0RóúNöìHóÓCîèDíFEðÊGòöJõ¡MöúPõßRõBYòo[ò£Xó3Wÿõ-UõÁUònVïÙWë¼YèÐ[ç“Xç TéÑVîRXïƒYì®VéUé­Uì¼UícWëGWé½XèdXè—XéWéÂWé›Wé=TéTé„Yê¹_ìÛlñkòRbñÉWðêPò\IóÛFñ§Dñ±FñIñ HïöJíNëðTêLSê>RéQåoQçbQí!Pð¨PònNóÿNòqOðéOíòPë?QëôSé¸SçÙUèîUê´Vë¾VîRñ›Uî,WëWì­Wí5SêdTèUUê)VìÙVíCXï†[ñ [ñ \ò‹\óû^ÿô4_þõçgÿûÞý¦†ú{‡úhŽüOšü ¡û ¿¨ý p®ÿ±­ (¢ ®¢ 9©³ö±¢.e8œJ¥šª¸±·m±¨‘–Sš‡bjDmÖ“ "«þ ø¤ –˜ ÷¡ ¤î¤ÿ vž™¢þè¤0¯‘¹‚¿ÀŠ¿½lµ½©Ú {G£¥!«7²Oµ¡¶αÿ ƒ® J¥ Ý“…‰ŠŽŽ­ž® Ý£3¯ §ñ¥©Œýz íp ]r…uÙ‚’´®±AžþŒþj™ F•ý ÁŸý ‚ž÷¬O¨>¶4»x»w»»…ºl¯§™‡šFŸ8Ÿ- a y˜R—CœšášT˜©š³Ÿ°«´U±é±°²¶´>¯¦¯×¶y²*´ɲ ´'£´¸‹¢Œ‹’›žªÝĨÒËúÌÃØ4Ì®j¢"ॠ°1¶i³—¬„¨ ¢§ Ũ ¿¬ ;±.µ:¸ż*¾¾x½9ºW³ö§y”ž¬§-¿½­«©ç J‘ŬÚº¸S¹¹³³K§Ï—<…&x%ûo &p #vhv²~èšþµ³ÿ¹º‚³<§Ÿî–†•M«þ0¹ý7”y` ¡A üFò¸PóÛMïõMíQð¿RñOíåIébFìsIòáKôGMö NöìOö“RÿöYô\ó‰Wõ Tÿ÷ÛRõÎRòñVîäXêZço[èäWèÐTé¼Wï•]ò¡`ï%WèUæWéFWì¿Wí¹WêüXéóXéÍXè¾XèWéµVëöSíTí’UìþWëó]í(`ï6cñ©aÿòpXòMñSGñFDòµDòËHòÖGðÊGì‹Nê“TêXUê QêÆQéQê”QíOïÅPñœOò.Nò@Oð:OíïPëQëTénTæÅUæ5Wè9WèOVêîTíãVìÆXëÌZìÏZì½VèRåkSèXUëÝWí"Xï[Zñï]ÿò<]ñ]òñ_ÿó–^õXmÿþû}šúÔ”ú¬“ü Çšü ™ý S¤ü ¬¯ýJ°ÿ ¥ µ¥ ªÀµE¸À«y“]FšO¥•§VªC®{«÷ŸK mƒ xq Qt ñ•ÿ è®þ Ù¢ <„ù…³ƒ Q‡$ •þ¥Öºÿ¾NÀξR·Ô°ºªPŸÀ˜T™š—¡÷±¥²þ®²þ c¬ÿ _« ®™˜†tšs£E³ ªù¦©£V¦ÿ'“Ip¼` ×U †ZU‚ÿh†° $¨8¼g´ >žžšÿ )£þ §ü «þ k§&«‹¨¦²n·ж"¹θ!·ʳܧü§w¤w£1žd ¢ŸZàJŸR››‡šå—Ÿî¥å®)²a²³2°~±+´ζ¯¶¸ñ·­‘¸£øªn™…e‡—#¦fÂ+Ó ¸ËeÑ7ã±Ô®4"× ¦­~µN±È©Ô¥ ‚§ Á«ç¯³²²9³¡º¾¼½Ùºù¸P´©²•l‹1›~µ>½C¯c•‡Øš È´»¹§ºØ»8·í¯<¢L—‚‹$^w *ñl %¦m šnÎ|˜ÿ¼³¼û²å¥æž »–è”ôšë‘jlþRðC ö†Oð[ô›OïèHëAPí~SíœRéßOé›NïïSõ QøPNÿ÷'Nþ÷¶Nÿ÷ˆPþ÷åUô˜XòGUõšSÿ÷1QôƒRð„WîHXé¾[éK]ëûXèEUéBYï*_ÿò±`ï5Xé›ñ˜ £ #§ ߬Ü®_°ú¬K®ø²ɵ¬¸Ǻû¼€¼_¹¦»þµP¥!œ c›(¥ §ü¤w¦u£©¢h©”<– è› И ¶£­©v°W¯¦°×®K°àµ=²õ² ´¨ņᜬºª«—![–°™q-¢J¥¹¨š©¨B§¦Í«²]±Ȭ¨#§Š®q¸¼ÎÜÚñÃŽ®Þµ6¼\ºó¸.¶5±I©ß•‰|J;š#©ù§+š^™ ª»Ü¿A»I¼u½K¼ç»µ´Y²žö„Òo l vöS­›¸ž¨ ýŸ Û–ØŽ `… u\ ³K ÷uLî‡÷Û´þøÑÿñÐNïÊPð@VêGUééWë3aòÕlú™]ùLNÿù8LÿöÄOôNôUOÿõìSÿõüSôƒSÿóôUòÍ[ðàjï$féQ]ç£\é]ë„bïÙgþòƒ]ï4VìHUè¦UæÓVçÚWèÚWèVWëUXîsWí½Xë'Wê»Wé¼Uê–Uî/Uñ]Uî Uê‡UëKTìÛTëESíNñ€LóbJñÉEðzBïCFñÌHñ¶IïöNíëRë‰SîSò»Pó÷OñÉOìuNë¿NïÕMòÐOòNðtNî}NìCQêRæ}Tå…UåËUå–VçUéñTêVí}Zñ6]þô¸]þóyZñäXðÏVñ2Wò­WójWñ_WðîZðUZò ]ÿôf_ÿõefÿøÿqÿü¬Œþ)¡ü g¬ý«ÿ@«ÿX¥ý«¨þ­ÿ^®ë°Öµ ¸¶5®‹©ײ¹ÔºÛº¯§{°–½àÀ¹Ú¡ÿ½‹ ѵ~Q¦þ `½üT®þ¼lù|ç’ÿ>‡^ €_ ¤o ö‹ É¢ §œ³Y« à§q§ί£©•-} ²jöu°m€¦–ÿ šžü ì›ÿt…°˜ºyÀ[¾Ó»Ŷ¢°¹¢ N“ ƒªu\~ÿ’}¹Œþ»a¹¹‡²¨ gŸÿë¥{¦”¨ Ϋ9±®:±³¦¸ݹȽd½ؽ‘»JºG¼§§zŠ!FšƦâ§U¦ð£fš? ”• ¡ {¡ £ЦÁªb«©ö§¥l©íÇ© ÜŸ+‘¢ ®q¯$¢ú›Ÿ ¡Y¡™¢7£â§ª ª`ª_¬<°œµ®°¥Í¥µªn­Ô¶!ÌÅÙÂU®B´C»½»7·Š´´±ª P”"û|ízô‡|–J¢СØ¢®°†¼H¾†»Ù¼M¾¾S»¶I¶8¹Õ¯`“@y`n ôq x R—|§ ݬ Ä« °¥S˜»‹ÿ`‚þ ÷}r9_ òTé_kïK‚òžcï‚GôÐOóWì+WêYXëx`ïfõ¨Wö÷J÷öLÿöÓOÿô)NÿôÂQý÷¼#¶nµ·¹âµÿšš}on Kp nx à†iœã´»D® ›EŠþdýãþæˆÒ€øøeñ‘SñO ñ´F ôÁBóMò½Vì@[êádíÒeï¹`ð TôKøMÿùˆPþø‚Pýö-PüøRüûSýúžTþ÷8Vóg[ñNcñ»fîCcíì[é/Zé¯[ð\ÿ÷ìZÿö¶Tó-TìVçãWè²XêãWê¿VêÎVéVèfVèsVéÙWéÌXé•WëpUíZVì VéëUç¶VçTçôSê¥Mð×JóˆKð|Ið›Fñ¬Ió(JðgJïôMìFQé¤SéTë QíøQí¸Sí,Qï%PòOÿöNõGNñ}KñÆOóQíSê‡TêÙSêÔTêzTíÌUðãWñYò¶[ñE\ï‡[îBZíXï‚UñCUÿõVXýù1WÿöÃYñã^ÿñb\ñ^óaõ­e÷Qmÿúôwÿp}ÿ ÔŒüÍšý »¨ V³Á¹”µ'±¤­Hµ-º–¼È»2¼é¾G¾“¸̬2— Õt1|ü_ª¬,ºFºÒ§A›–ÿq•l‘·r'u%~É•ÿ •ÿuXnaf -a ~r+~ñ}:y-‰yaºý"Îù.!ËþÅ \–ÁrÇb ¢\b d‰mOjC‚› _¸Ýà Àã½ðº²E¦Êžþ8Ÿÿ ô¤p¤ñºé¾½¿•»ø¶t²³®î­ ̧ À¢ ®¢ ¼ª ¥´[¼6¼‚½ºë¾HÀÿ¹ÁÓ¹ʤP€—u¥C¨Ц‚›¿‘* „’ žFª 6ª Mª $ª '© ǰ×¶n²7¯©¦d¥ £‚˜H—¨»°é²»­)¨Œ¦˜¨­(¬­«5¬Ë®ý¯<°o´_·m¶©˜ù—¸¦Û¯…¯´t¸J´¥±2³Ѻºi·´O®£š” ŒÊ#€¨‡ ¬¤µ‰¶ž¹²» »8½‚¿‰ÀíÁð½ä·d´Ǹ'³—VzSp Gw ‚CŽÀ£«¹hÀ×´ýž ^þ ؈ý€‰þÅ“ÿÿ’ÿþ&ý]÷QG óÝ< ð EòlOðVWë ^éôjígît]î)Yñ Rö—OúÃQþúrNþøPüù›PüúêQÿùËRöãVÿõÿbùnsùjyÿ÷{xþùôcómY ëFUîËSõPNÿ÷ÙOõÓSîYWè:XèaYésYêKWê¦Wé6Vè“VçúWèXêpXê_WëVìvVëÿVé·UçËVåjUäkTè¸OïKòåKïJî™HïœJðJðÓKïMí\OêÌQçUSè²Sê1Që»SîRñ½Pó_Pÿö·NõNñ—Lñ,OòÎRïLTíeTí Sî©TíTïYUòÚYòZð:[ïÒ]ï…YíÈXìüWî¶TïÁSôˆWýüXXýù[þóû`ÿñ]î0^ñfaõ`eö~mùµxþþmûûú ¿züç“þ ¦ ”·,¹˜·CµY¸¶Ü´æµÓ·›¹æ¶·°®£F‡ 'k 1t<…›‘ ˜s«æ¶ø»à²&œ‚Sr-bák®w¶”‰¨6—|Kp'feFc®fQk3t ª¶ýÌ÷..ÄþçÇ p¯ òƒÝe<\Á\Šapi)dÍl5O¥”»HÁ»¿¬½”²ާ[†›zž2¡á£m¥0¶¿ë¿ ¼"·»¸¸¾·ë·ê±`¤ X ª¤ æ²¼ºA¼ã¼µ»UºZ½¸K¶à¶ή[¯3©°«y§ç£”˜®‘#Ž B‘ Vž ݬ m°ÿ®­ [ª y¨ ܰµL¶̵ð¬¨Xª–¬P’I£õ­A®Ì©¬¦Ʀ2§ܬӬ̫x® °4®ñ±²ù°]®§*š—ê¨w´Ÿ±°Tµ0»½Úºj¸ö¹µ·w³h¬æ¤æšƒ—ë“[†ÁŽË©þº™»¼»Á¼V½U¾}¿À㾓·ȵ´µ®>–¹|gzo‚žjš¡­¥»h¾ú³†  ²–ÿ Z“þVþ£ÿÿþxÿÿtQ÷¿@ ïDî£OìrWêÉYçÄ\è¥_ì¯[íH^íQ`ñÑ\øNTÿü(KþøiPýø7RþùKRÿø­U÷[Zÿ÷Cnþ ŒRšüÿô•üÖ}ÿþ_có^VïTò;MÿöãMÿö“Sð8VéÏWçTWçœXè¢Wè¦Wé:Vé©Wè½WètXêúYìVì}VíWìWêqWç¼VæyUæÛTéqNïõJó-KðlLïIðØIï+JðÛLðéNî«Oí›RëDRè·TèsQèGPìÆRðnPò‚QõQÿö¨MôÐLðQð RïSí/Sí}Sð“SðŽTðUó¥YòYî Zí‚Zï{WîYWí:Wî¨VîñWñêXþùWZýû]ýö¨^ðË^ì_ñqaõeö“nù¯~ÿçtûBpùÓsû µƒý ­œþ ˆ¯ĵj¸¹óºå·Þ¬ê©Ç©e­ ‚¬ ¥[swhrÄ… Å ¼‡Ô‡Õ˜¤ö±’¶è¨¬‚cc ^ZLbïw ™ M­ ›*|Ëuãj$`J_>kÆq_q|o U´ÿüºN¼¶YŽ ­r9dÿ\å] füféf:h4ÿ^²NÀHÀœ½Ô±1¦ÑV›2š¶·žé¥´±½î¾®¿ºe»«¼O¼ô½¹¶©» “ ¯g¸b¼j¾˜¾?¸¹ ¸`·³›²á´Ú²}²Õ­ú¨ ôŸA—[Gô˜ã ²ª~§ž¨ x§è¯ Ö·xº£»dµ`®¾­¸ŠŒ±”rŸ¦¾£ ¢m§2ªY¬†«mª¬5¬ Ьe­R¬t¤jŸ} O›ÿºš¥ÿ° ¬U§o¬˜ÍöáWÌ–´²´Ž´û± ¬7£(›œ—–>„Ջ먌ºÛ½v½.»ÿ¼»à»Yº†»Ô¼·³³ó±W«¹™Ƀ ûœ #£w°øºL¼•® × {— t–Bÿ´‡ÿ¶… ‡ÿÞ†þwþüç\òKNíæK êÜT èÍUç€VèGZí%]ï-nñ׈ÿùp‡ÿÿ~jÿþ^NÿùNþø;Rþù(Tÿ÷[Uõë\õßuý•U¯ýá°ü9™þ)|ÿ^ÿ÷`VñÏRó6OþöíTñ«WêmVç¬Vè¨VèòWèZWéêWéWêXê¸Xê“XëŒWì$VíyVìWéWç½VèVéMTêPïÕLôLòmMò†KóHJò™LòNMñúMî|NïøRîWSëTè¼SèPê¼QíQîPñxSóOÿôMñžRïRïqRíúTëUUîTó¨Uÿö“VþøaXÿõjYïÚYí»WîÏSíëTìdWíWîÝZð#YôâZþ÷²]þõŽ_ÿñ-_íÃ_ò¸`þ÷Øeÿ÷oÿý’†Iý ýðÿÉŒþ œý S§Ϋ›´!¼’¼ê»°±[¨Ò¤¦ü¦üœ°}Kbªq ‰ R’å‰b}Œ-Ÿÿ)£5§*¤<ƒ…` ‚W Ûa8v膊‰†æ€º† wwl__Áq^x¡p½v‚S’-¥ó± ©Q„šr:iŒaM_Cclki¦„üV«¬¿½½ï½ê°Ǥ[›#ší˜T™š“¤ªܹ›·N¿ºÒ¹o¹=¾ä¿Ô¾£°¡ÈžC¬l¶Ú»¿½@¹A¸Ú¸q´ö²>²Sµû¶ݶX·Q±‹«¨âœÿ=–Ý•‚•™˜ô›Ì¡ÿ ]§ K³Š»®½¸l­™¥ð´ C…È‚‹œ k ð¦í¬ ¬Kªj©üªýªV©›©ާq›Ã’™“N’4”0Ÿ¡¥à¡oœ¥ÁÐ ýçÌËš¯¯ βe°S«Kž+OŠÉ}·ˆ¦¡ºä¾W½\»¯ºݺ•¹Ó¶²µæ·ç¶ª³l°ø¬`¡¾Ž³†%— u¨ Ÿ¨\­•·ë¼D¯ — "Ž ì“ €¡Š ч Y†“ÿW•þÿߌÿþKsúWòQ éçT ç1TéWï•bôu{ÿøìþÿfœÿÓvÿ@Pú¨KövQö@VõDYñ_`÷žpŠ‘f² ½ÿ mª Ÿ‘ÿ ¦qÿñYò(SïYRò'TðTVê%VèýWé+UèÞUèäWé­WêHWê•Zë!Yë XêîWëÀUëžVë]WéNWè—Vé·VêiSëáQð‹KõøLóMò~Kó¬Kô‚LôcLñõKï‹NðOðÕQíÂTëPUë)RéÇRéKRêÍQì^RïQñiPðSïõSïSì²TéƒTêTñGVýú‡VüýÈVþø‘YðnWíÖWî5TìnSëeUíXXïXî…Zî#Zð#\òz^ñ†`ð˜_ó@aþöôgþøvqÿþ–ŽÿŸžý‰—þ熕ÿ ÓŸü¸¢ý{£¬¥º»C»X¹³”ªu¦ê£†™ÓvÔ[Kg ¢‚ 4† g| Ös Þ s© ©Í¥Û›õ…$ipòt‘…ùŽ£þ ó»ÿÁ¼š½Ö±Ù¢–ˆ›ÿ$—V–Мÿ?ŸÌž¶¤Ú¦ V¸8¹×¶õ¶N½ĽRÀ“³ò¨ù¡àªD²÷¶ƒ¹Ê»ë¸Ù·µ«³°c²i·~¸]ºظ"µ^²Bµ†ªw¥‰šüŽnˆVC’z‹ ï’_¢ʲÔÀn½;¬ –[¢§y‹tþ哌RŸ) ð¦Z©àª:ª6ªÛªk© M¥ Ÿñ–ÇŽ‰3‚ˆ¬›Ž£ª›‰” ãžضÏų¹õ«Ý­°‰¯§j–Ê„^}Ý}n}8‹]§€¼¸¾I½%¼=»6º¸¹´â³1µ޵û³è±¢¯^©™m9šݯ ®«2©¥­ô· ­²§“q„ Ï 1‹ …‡ k EŠ.Žÿ>œþ¼—Vyü7[ìZS æ U éfYò.fþû¸ ³ö²,µ«µæ´ù³Ÿ²²­V¡t™ £y³ X°Ï©b¤«© ª{’-„ pŽ /‹ w‰E”ÿ ˜…x|E–Ú¤[“‡wöV[ çôU æ7Tò¸bý^|ý¤ýÙŠÿV[÷îKö‹KöàP÷ ^ó¬}ùbŠš8©¶ï»Œ¸l° œ™qúÎ[îiYï7QðgPíuSëâVé«Xè*WèçWéÏYé¾_ë*bì7]ëVXëXëVWëWëÛWê3UéþVê6TëåSîPò!KôzLôEKñ–KðžMòLñìLñ@Ló¿MöÆMößOô Oó€RïÔTéÊTææTè²SêèSìhTíRì¡Të:SééUç{TçOUë9TðTõÉTõÃUñÀWìžUëóVìUí VîëYî7XïºXïBXî£Yï ZðY\ï]ñ¼_ÿóodÿõ1oþú×….‘ÿ“þ »–þ ªþ ¹ýü¨ýÿ¤þ&¢)¨°³µa¹Œ»¹Úº¯¦¦˜Ÿì—þä­v[i g^Ï] Zs«›þ ¦ÿ z¢þzœþ• ÿe§ ⤠͟ Øþ ý £† ‘‡ UX¼†jJ^)` œb>t‡v„wbsXn@b Úa Õnâl\÷]Îe åk¿kßi`k„z‰÷‘ÿ²¢ÿÂ¥þP­K–à†$‚ n±ŠoP•þ1’çw Ã`Ä‚ •þŠ—…›@œÿ¦ UÕ¡–›”ž"‚¦ m©!X® ‡´L²á¯€° ƪ¼  š U« ³a·s¹À¹M¶%µÔ¸vµθY²¡¡:ЦzZuÿ¥‹ ¨’³¼ íÕþÎ>¥Ù‘„™xFnwM‡N¨–¯ŸZ©J­Ÿ« ²ª © Á©Q§oŸÏ”*‹Ä — Ë•Q™%§ί5©  Û#µŸ&@¦"x«a²´v°pª´ˆ‡~q“m%{‡T‘¤©¸ì½Q»õ¼ò½×½*ºe´p±ö´ôµS´Y´-´Ö²P¨é¤~« 7µ þ¸»³¹§ Ÿ èœ-Œ ´‡ Û‘ *Œ ’Œÿ%šþ ~ ÿ ã_{¨Šÿ¡ ¥š¾…öóq ðjb ÷4vÉÿ`˜ý”‹ÿXYøõHóæLòS÷ bÿú ~ÿüÛ•Ê£ȸ_º7¹’´ ݬ 'šÿèwúÜbï‹[ñ‹Qó/LðcPí”SìˆWëÈXê9Wé5[éeìKkî‚bìAXê VéÌXéjWéDUéâVéVê7TìÊRî¿Oñ}Iò½LôôLóõKñ}LñMð2Lï•KñgMô$Mô÷MóHNò*OïÈSë)Vè"UçˆUè\SêÎUë Sê¹Uè'TçzTæ”Tç3TëSïÂSñèTï6Vï­WìúWê8Wë:UîzXïæZîWYïQXðrXï´YðÓ[òX]ñh]ð\_ÿó2cþöKqþÿšŒÿ %ŽI‰¢“s«ÿ é°ÿªÿ#£‡§Í­˹z¸²¸§º€½3º °½©º§§c¡dþ|ˆÿqÞ_ ¾s$“ÿ ‹ Á‘…†Ï‘Ó¦ ~±ÿ _¯þ v¡ü ùý ‰þû˜ýU˜ý_ˆ"l%tgj éxÄuh…${lƒ ~áyVlQc Ôi_s\jÜikúsZqôkg7qu}*„nŠÿ¨ˆ¶ŽrƒupY{ ‘ƒ+vÿz;vª{˜` ÁPÇ^¶xõƒa†ÉŒ¸‘› • Þ‹ã”a¢ ¨æ­ ’² _¯9¨«%¢!Ù“‰äœÜ«j¯ª«­³p²®¶>¹¹¹±¸=ª#˜5‚wÚ˜ù냖¿Òµ í¬º£0–5šv}–e½j|¿‰qûšm§­ã­ —« \ª © ¦àŽ;‡ÁŽ Vš žœ¤Ë®Ò°¥©?£^¡j¤¨`¬é´ʶ °®¬C¦Á—‹5ooy…£m›B¯l»ü¼¼¡½g¼ò¹û³é±g²Þ´Ñ´É´ì·޶N¬v§H®¹®¾¿¾í´a¡ Ε ^† |Š Œ–ÿ O’þ£ÿ © _• kuˆN° 5° ¹¦Ù ‹‘ Eœþ þV‹ÿõZú%Ió.OñCWÿùÔcýÿ§}ÿý!¡‰¶9¾Áº•¶Bªl¡ÿ>–Î~ùîeðÁUóµN÷ýKôKNñèRï%Wí|XêîXèz\è2hëþqí4gìYêåWéã]ézYéÀVéRVé=VêUëGRíìNï…JñaMôyLôEMñ£MïKîúLíÜKí¬Mð`NôqMôMðÁOíÆRìaUçßUälUæˆTé@Té£TèúUèÄUéØTè«Sç SèÃTë¸TíáTíºWîVZî:XìÅVíqWï?Yðy[ïàYî½YïXïDYðFZÿó¾\óˆ^ð?_ÿò~aýö÷iüÚ„ÿ‹Œ8„!ˆÛ‘Ö’Ó› ™eŸÕ§4¹Ÿ³ܳþ/µþ±º²«M¨Ôªò°*³S¶­ÿìKn |þ -þ.›ÿ· §‚?Œ§¡ ó® ɱÿa¥þK”þ 6ÿ * ý -¨ü–¡ÿI‰G‡Ú‰rŸÿáœÏ£•è› +ŒD~Lxp5jðvíw *|±}ey"uIp k¥jüq•ntdíh ñjlŽyrtMb’c£X4Y;M9N v[ #h s+yÊš 2­ ¸¦ ¥2•C–ý¢© !¨ jª »©ù ¥$Ý¢%=˜€Š›“>ž  –¦j©¯à¶/ºͺ5µü±+¢U”o‹V„ÌsÄ&›D™ $¥ ¬´ªc­íƒ»²¹2­¯®¬X­ ó£ʤ p£gœ!@¢(Þ¤#¤_šT•f–G– Žÿ9œÿ<¢À¦j®\º³»²ªÔ£ã›—ô‘q}Vo.p† ˆ¡.´Ÿ·tµ§ƒÊg åm ²€:ˆñŠæžšæ¤õ©©ªx¨§ Ã¥ œ5‰²w´x ã Ô¬]®ù£Œ’딥t±'³‘¯+« ˫모©›© ž؇šw yïƒB ˜¦e´i¼4½ñ½ º9·R´ʱ4±,´¶ñ¸C·ñµî± ®ï±†¶ß½&¿%¸ï¨ו ˆ w“ ͇ÿ ÷ˆÿ°žÿW£ – Žfšÿà© ͵¸¸ ¸·#±вû® µ¦ÿX‘ýqcýPù—Vÿùå^ýÿdý³pü™†Ùž ˲yº.³ X›êzÿähúÝgôVYï[Hó&L÷ÓPô&OïþOíÙQêVè9YèQYéÁ\êÕdífî2ZêdVé¼ZçnZæ³UåVèETêtTêRëtPîiMðMïLïaMï MïMMî2MìëOë9Ní÷NôïNþ÷OÿòwPïÚUë›Vç’T ä“Uæ˜Uè;TèÁTçâTç·SèœSé;Tê^TèÉSå¥Vé·Xî¹Yï“YïBUðZRñ_Sð UïbXð–Yò"XòçXñvXòÿZþö]ý÷`^ÿô`þõ1cþûEbÿYn |~yþp !£q !ìm % q &[q 2n Sn "š~!K„ø‡ü™’þ²ˆF–¼¤ª¸°b¶µ¦ù•ÿŸ…ÿ‰™ÿ +¥ýù§ý ¤šÿ˜œ§ÿ ÷¶ÿ¶µ±O ÿnŽü‡i”¥ÿ0¸ž±¾w»HÀþ2Àÿþ¿[»ƯK ÿlŒ}.‚O^z}Š“‚¨w9yXxÜy:||{1qømþ_õj ð€ÿùŠÿƒü6€þ Ñm-jÿRÿé] õj |œÿÇÿÛyþã€Ũã¿þÄÿôÀ;Áºñ¿‚¶Ë´ X© =§ Ú› F™& ¡*A¤ ¦§ž¹–Öˆà‡À†&’ÿ}™jžt§¸º­Ü«Û¥ nœG˜Ï™`~Ylâš³±U¸¥·jwé‚ íʘIœà›|ý¢ĨÀ¬[¨è¦¦¦?žVŒ)|t|³‹‹žX«å¯5§~˜õ˜Q¥¬­.¯«w¨7©†©7¥²¡@—‡¡z†¯Žÿɕު9³ª»Z¼–ºÁ¹¶Ä´² ²³.¶·Ä´²¯ ªqª"¯Ķ?»¾ùº±ª›hX‘ v™žŠ6†ÿÓýâ§ÀÿB—ÿ *£ÿ ûµV³·°q°³þ²õ±•­ ‰¨ý¦™üsþ³VÿýNXýü£\úàeûqÿý!}ÿ ⥠Ƹ˶sž¿{þ\ö‡`ñ7\ïQóTN÷±PóûPðpQï«Rì'Uë%YìYìrYël]ì¶fðu^ìUéÖVçWå`W ãVæLTêSêöRëOî¿LòNMóÉMñ¢Nï>Mï¤Lî¦Ní'OíœNï$MôÖNþöVQî-RëûUéˆVçûUæÉVæGUçTçžTç TèÂTéœRê>TìcTéËSçÓVëôZï¹]ñ€YîÇVï;SðŸTð¡Vï¾Wð7Xò»XólXò×YófXþöê]þõ,]ÿór_ÿó«aÿö_^ùÖn ̈f€er ´n !Žp !1o "¿n !l `m p %·r&ÞpCrN~Ñ}WŠbžO§®^´Ý´†¯„š çˆ #‹ UŸ m¦ÿ¯¡ÿ k :¬Ë»»¤·̨Ë•á‰a‘Áš‘«»¾¾ܾ;¼N³”®¢&˜Yü…-‚‹·-„û«•±š{ƒ èlHoKx{î~ |¨|Ovýnm ¡•ýr•ü ΚýôŽŽûkÿfvþ my¥ÿd¦Š€JŽ%Ÿÿì¿ÿ%Æ’ÁÖÀG½š¾Aº1»£½ÊÄÿ2  ¡¡#ò¡)Ô£ žh”½‹è}úvöxÎ|\ˆ‘iŸx²l²¼©I¥ Ù¤› ¢›6žµ›â—@ƒ_ÖŒL¥K¸X¼/ÈŒX”L˜¢s«x«Œ¦‰¤=©¹«Ó§¥b¨e£’â…Òƒž…¹y î¬®‘« ­°¬¯Ò¬¯¨»§i©k©¡ǘä’ÐŒ¼&–jžÿ-£«§k¬ù²¸ܺÞ¹ ¸™¶¸±ÿ®á®”¯Ÿ³„µ”±!«b¥”¥)¬y³j·§¼Áº ¬,¤]¡x¡ 1¢ K’s‹þúžüò¯ÿ•©½¢ÿ?¬Y¹î±̧Ó¨вö¶þµ¹²аþ £ ý™}þYþðYüþ<^ørbùþ®kÿø`}ÿ’ÿ£ À·…¹¦¡²{þr]õ$_ñöfò)Vò¤Oõ_QóoPò=OólOòhRñPVðjWííWëRZë#fðgbï·VëÛTèVçVædUèþSëÒSì\QícNïoLó™Mó|LñˆMîVLï±Lñ`Nð>NïÅNð¦OófOòåQì~SèÞUèÚUçóUæžWæUå%Tæ‡SçºTè§TëÿRíbSíTëzTê‡VítYï\\ï¿Yí"Wí¥UïéVïˆWî\Vï#Vð¹Wñ^XòíYôäYþ÷ø[ÿõÎ]óD^ÿóâbüõ¬oýýHƒý ˜þ¥Š t©«­̯°]š“í‚|‘˜™˜D˜ ð§ 뵸¹ý¹»¶m§ —电¦ µº ½Ǿ¹S­ü¦x¡ðšé”ýŠY‹ŸŒ"‚‘¦’ýŽ¢á¤~Ž ÝjÂfÄu–€O |uyìtTnhc “‚¤ÿ Q«ü š¶ü ¹« °Å”°û œ‹¾Ÿ(­geeŠ&´ÕÄÁvÀA½ξTºÛÁÀàû[èõ£ÍIJ‰¢% ¢$’nƒ¶~ýwxm{O…狦”ž¿š§œª˜ }œ·¥1¯ r¨¨l¤¹—r‡ç™CµÃÀ³† –œÿõ›¡¬s°CªO¦ݪv¬9©·©m«5¦™~oˆ³ ¡‚À’„¢ «Qµø½,ºí´L­~©ˆ¨¯©¨¨› §•3È‘`˜ô¢Ê«î³)³Y±Dzž¶)·ɸk·•´ü®£ªñ«h­z¯â±!¯9¬/§ ¦-¬±A´ä¼»˜°ܬG®ó¯³¨±—†ŽÊÿG®å²ÿ¬Ö±1¹³¨z§Õ¶¼©¼k¸жǦÿ ?‚ ™^Xý`÷‘dõóiúøF|ýŸ•§¬ ·º(·“™qsû)]ò(YðrYïŽTñ´PôRRõRöSöQö4P÷)TôØUîöVìDXëþ_í^^îÅWížSë½Sê¸Së¨RîÉPï¤Oï»NïþLñLñMð¥Mï$MíM¿C¼ÛÁíìÜé bã &µ„£õ§6§]øŒÙ‘‰¨ú—*¢˜ÎŽP•ƒo‰,… þ £kÅM¦þ w“–›@ŸüŒ”  G·SÀR• ÿ<¢Ÿ¡£ªÛ©§§†ª9«&«ëÍ®̱d©ÁÈ”¾ˆ ‘… ÈŽ ^˜ o¡1®èº­¹ˆ²È«ȨȨk©ï©d£?—ùº’~›ø§o°á¶à¸}µ’´:·*¸˸ç·D³Ä­ ©³ªe«ªâ«l¬\­¹ªé©F¯´±r±O¹å¾]µc­dz†µÜ©µ–ÈŽ1š¨βɳ¬¶=º]·£±³± º±¿¿¬º)²¸¤ ´‡ ,e5Yýbö{jó!nöûê|ÿý]› a¶Ž‡µd”­sû(gòƒ[ï!Oï*Mï‘OòRö’Zö=a÷xY÷7RÿúdTöÜVñ8WïÚYíý[ì¼Zí€UîÞPîiOì™NìjOðˆNôMóùMòPLô=LòçNð;Nð²MîÂNí'NðMOñ‹Oð÷Pñ´SñITìeTè­Uç Wè|WèCTæÍS äÆTä¾Tæ¯SçÏSéÍRíÀQïõRðSðVUò¬Wó›Zóe\ð¿XílVïœVò€VòaWñÉXð)XïçYò•ZôZô°\ÿô\ÿôŽ^þõwcþø`jùî„ý}¥þ l¯ÿÊ–ÿ«ˆ U‰J}ëo "Ûn Ts ,s"@rëruÞwÿ®yï„+Ž _¤ްÿ³þå¦ÿ žÿ œ¨þL¯þǢܚÿVû!žŽ  ‰†šúˆy“c§E¼ÀÃn·7¢ П‘¬S¯h®ø­ ªp®F±<³²»ƒ»ô¸Ô¨¥¬Æ´š¼*²±±«è©=™§Œç‡ s‘×Á“ ú‡r—` ^ ¿v™¢y°ÿ Õ°ÿ4´)¸E»}Àÿ3·ü´2¨€’¥qÝo9‚”îª ° D¾üÀX¿ ¼Î«ÉÈø´$¬M°ø±¦Œ–[›3™˜¤\¦ű™ŸЋ…yéS‹ þ‚D|… %a…„.”¢‰¤o™ O¯ Ú»8¿'¢:§P©§9©¬ï¥2žç£:§­ · ½{¶Û¨¸c–¥“² Œ )Œ Ï‘ H—:¦`¶|½!ºº­Ÿ¤ý¤¨¹¬ªÊ¢‡–»’Ù—A¡|¨”¯È·r¶Ü´äµܸùº·³k­ª\«¨˨ ©À¬ú­|¨+§l®‡¯{ª³«¾½·l­u²„²â¦]— ]ÿ6›ÿZª0±Ô³ã¹l½K¼Þ¸ü·¹×»\»¸¶‹¬w O~ ¬h hü³mújoúþLvûúø‡þþ­¡ ¹û¾N·ž Ò„¼xù¦hõoLï÷Ií[ô‹[ÿõÑ\ÿõS^ÿõ†bþ÷Ñlûû„€þ¤ÿ °W˜ A “œÿê˜e{´m Ñl "q ÷o rRwÿî L‡ÿJ”J›ÿ Òªÿ|°þË´ýסÿ Ò ¦œÿg©ÿ´ϨM¢ÿ è–°­Ȥ•†çœQ²7¿L½r®Ϋé±²±a­§a£8§­«µ ºÄ»Ø»Ÿ¶f´ó¸ª» ¶ñ³ç´w²á¨ ž e$¨Ô¦ ƨ «¡ #pAg Ypô “§-²ÿ ²¨ D­ Ç·^½ÿš½ç¹̱­“Öwgi¬mK~ ‚ï• ‘¬a´œ¼w´f¸-¹ íºÔ¸ž¶®¹}¶{±&Ÿ—›¢l¨!‡ªT±A¤G—ŒV ” ÇŒÅu|meHapx›•°¢Q©¯È»’¼#º’§®¶¯¬>¬̰¥Ï•Ê–E¢n¶mÔú&±Úù*ó½ 8¡—” ’€‘àŒ „Š &>–;Ÿü¯‡Ã |Ų°Æ¢®Ÿœ¦£®c±­Ë¢D—Ç”ý–[™"²£!ñ³·C³Ô²·µ¼¹F·¯þ©Ô¨v¥ø¢¤§ª¥°æ­Ÿ¦ž¥´ª­©]¢ô©¿¸¦¶q®e®ª=¡ }” _Œÿ|ÿ;­[°±ú¯¾w¾-»Ñ·¡¶͵Ƹ·ø¬ ™ Vu j yþxý›uþÿý~ÿüé“ý­§ $·Yº“¹«•?„]oýOPóåI íÏK îÓSðqYðIUðÊPðgOñµTñÏ[ò1rþ÷Zzö¢oñ bíóVî KîšKìZMí¡Lî¬Lñ‹JòàIóLötNö;Mð4NîÄNïPMî«OíOðâNô1Mò(RíëTçrUä[UæúTènUèˆUæjUäwTämUæåTçNSç™Tè–TëlRîFSòUô¶Zñ¦bþóq]î†WèaTçŸVëwWðŽXÿôeXó3Xð!Yð+Zòr[ÿõø\þ÷”\þö~^ôbÿöpùý\‡üq¤ÿÓ­fœÿ÷šþ§ʱÉ™a‚_t"®ytw Ñ€ÿ‡ÿ x’þʤþÏ¥þ ã§ÿ F©þ¦ÿ l˜˜yW Zšÿ u²ÿ V»Y± C° õ¬Jµþ;¬ÿõ—•…L‰’ŸP±f·Ý´f±@´µ]® ¤ŽÛ¡v¦ư¯·a¸Z¸n¶þº‰»±¹%º¸`¹¢¹é´(² ÷ªж-µÿ7¿¸¯½ƒ:{ò ì§übŸ¡™u¨ï®˜¶ÿÖµÿw¶q™w|Äm‰g Šq„|ê|ÏŒý”"°¨G©C·³¼f¼Nºd½¿¾·¿Å©<Ÿ_§Ö«!<¨Ô²é±¢Z“Ò’‚“ HŠ z^hwb` ÙsÇŽ˜ÿ/ž­“¼ó»¸õ§s¯ѯx­!­ë±À©¨–%”¢£²!Óû#¹Úú#1¸›w’ùð‘©”ÁBÿ9“ÿ™WœÝ£O´…¸c«+£0žˆ¥½°Tµ7µF­Ÿõ•!!Ë#S˜ À®;·c²¦®˱ ·µã¬m¡®™w”Í“†nªa²ò­é§>¦†¤‹›€•Œ«m¬¨y§£8—œŒ À‹sœï««ï®иü¼}¹Á¶½µ±³{¶˜¸ªK˜ ±zÂr X‚ýö{þ=vÿýG†üÿ%›ý`«(´ß·©º³|¡ R ÐuÌTõ\K ïºK ï@NïXPí7OíNí$NíîSñ.Zô’qþùé|ùŽqõõ_îÇTîWMîiKì MíœMí4Kì¹Iî¥HñÅKô?MôYMðŒNï¢MïÿOïçSï³VòÆP÷”OóÜSì3TæÌUãvUæ«UêITéúUèTæÞT ãjT ãdTåñTåÚUæETéTSííTõTýùÞZô^ÿò{ZìçUæBSäÚUçÁXìYñoXò¹Wî—XígXð YóÖ[þ÷ó\ÿöX^ôubôtüý­”ü •«ÿV°"¥Ç¥ÿ¬7¶@®œÿæ Žž‰þîþ ]ˆÿ žƒ|’þ ¤þ ̨þ ò þ fþP’  Š Kv   C”_ ÿ¯å½^¼·¬ÿb¤<’~ Ót’‘’¡¦ª¨>«ú«â´g± ¦Ÿ<¡ë«›°L·ì³+®ò²„¸º¸˜»»V»h¹Y·V·˜³Z³"¶ɾŒ¾a»¨ª¡¡ΔÿU… Bͤ¿Œ á}¶p|žþ c¢ý{²ÿ4£ˆSjªd¸q¡xozPv |+‹Ç–Ұ뺻˜·½¿_À*ÂÍ»x§‰ž «C¬A§#°¿¿ª›¸ˆUŒ6‹ ¡[„þ}†ÿ7'v?qŒvˆÿK“Ÿœ“ª*³ ³ Ü©r²M¯Ô­¯7³h­z%œ˦„§o´6¸Ç©w™H‘D”5—sšV–Ó‘ÿ “þ°™ÿ8›¯œ9¡O¥š¤ø£¡£©[²Å·«·Ô²Ц—«JŒ[“‰«>¶‘³ ­ñ­Ó²z±ó«Lœ‰…<Œ ‚š~§û±E¯)§A¥‚ž¥šŒÌ—Ï¢*¢Õž!šÈ–tŒÿ"Šÿ Ž ®_©\«°®,¶¼#¼·U´¹µ3´'´ñ³­¨ðš 9„zÿ µ‡ÿ }gqÿüê‡üÿh¢ý¢±þèµ\¶̹"¶´«ö›ÿ ¨€ÿë\òžSðTLñçNñ:Oï#Oï)Pï{Pð,SôÃYôÛgþô{ø@|ökô‹Vñ×NñqJîÔLîóMíBK êBIï¨FñïGó“Jó¶Mñ³OðëPñ9QðªVñ!Zõ’RøOô•SìrTææVä,VærVé)UêYSê›Té|UäŸT âST â\UäèVçUêŠSí÷Tÿõ|SüúïWþö YòØXì¾SåžUäUåaVèVí+WîwWì'WëWWî’Yò¦\ÿõ\ôÀ^ôÙ`ó’vüý9œý A²ÿ`¶¸°'®€¯s³·®Ó©ÿ Z¢þ þašü|˜ü \ŠÿÒ~ò‰ÿ 4žÿŒ¨ÿ 8ÿ Pÿ"‡m¶„ À}ŽS àœ’³ë¶¼®Õœˆ‹av½jJl&‰D”©—£œ. ž¢À±ÿcµ«Ϧ¸£¤"§æ©°Ù¦b£¥¾¯·d¾¼½¹ ¸“¹)¹È·Sµ¶÷¼&¼ÕÁ—ºµm¤pЍ‚"z¢r ùa Øqu‹8“ÿÓ©þ޲ý¨šþáwòhtrŸxe:‰ ‚óƒŸâ© q³ð¸Ý´ »j»»Å Òªt¢F›q¤žª´¨ ¬À´·’†~ø,~‹m'’šþášþ¸j{Ì‚éD’ÚŽY•˜©v£ ߥݰS®C±œµ*²ª©©¿¬¶©i¨¨˜¦9ž˜™™áœ–ÿ#”þª˜ÿšÿ½›ÿ®Ÿÿv¥<¤r¥¾«ƒ²Kµ¹¶t·t´;ªYžb”(ŠAg©=µb²å® Ù­ F®­Œªô Û’]ù˜ ߥM®p±ÚªZ¦1¡—A•¯šÕ™@”½’mˆU~ÿò„ÿ ¬ ܘ¢|©Ž®’·K¿¾#¸m³óÔ´±´ ±Wªf¢ÿ 5•þ ׆ ˆsoý÷‚ÿþÔ¥ý (·ý½·ãµÿ¸x·O°2£ÿ‰’ÿšzøådõÁMö’KóÙOðºOðpQñ¢Ró•VöŽ]ókó„õ†ôl{ õRgú;OøÂLó5MñÌMïzKî€HòÑDòQDòÕIõ OöûTðþRï¸QïOóyRùúPÿù}NöÙTîHUç_Wå3Vå(Væ UéíTë1Uê†UçÍUå`T äUå$Uè0Uê‚SíRò[Tþ÷!Wÿô[YñµXíTæ§Vå§Uç¬Té!SìóTì{UêdWêÞXîêZò„\ÿô‘]ÿó1`þõhdÿ÷Â|üžý ±ÿ²µ—µÿ¬µÿ™µÿ:²@©œ§ €¤ý 8¤ý U¡û èü „”þ[‰ÿ ¬ƒ{›ÿ±§ f¥ H—ÿ o æ…¦’ˈÿòÿ [„l•’§ ª9¤ë“p³` ”Z :gb~Ï‘ ˜Ò— ~•!)œÿ¸¦Ù°²¯¯± ­ ‘§²žÓšy”ß‘)˜¢ƒ©¢¹hº² ´ ¶ •·¤¹´]¹¿»½¹ÀX¿·l¯|’s¼m “k—dŒa”f'‹ï¡ý?°þ‹«ÿðˆnq4v÷†ýžþɹÿÿ&µóÞ ÛƒÓ£½ªÀ¯i¯D±²‘Æ ”¨þ ›¨þ ã©=އŸ9¦Þ§ ° Z‰ \!!ˆ~Ð\Oo—þ6¡þ•ÿ4²’ÿ¥žþ^›ÿ7‰±Šp  S Eœ ¬§ è®6¯õ³ú¶·µг8²0¯¬À«ª"¥û¡¥› •=™zšÿÛ™þñšÿ’™E™ÿ#ÿǦ§ ©i²é¸K¶P³€³Q³v°=§Oši1•—ª&´j³F°§® H­Ò­(­ªl¢g¡‡¨†§V¦7®F´®°ª<¨è¨ £cœ!½†”ÿÈŠÿGu­y #‡N ­–뤻®«¹1À$¾8¸ð³Á²]´ü´“²+®R¬’§ÿ»›ÿ“ N‡ «qÿ}ÿ! þ”·ÿº·¹Œ¹ä´…­ÿZ¤ÿ{”èsþÖNúHôRMðŠNïzPð’SòôYôdöÿoö†‰÷ª÷L€øhÿàRýhMøÍMö§MógKò#GóÁDò'EôÉIÿ÷OSûV^õì\ðö[ómPùLùMù“Oö§SïñUèGVæU åÉVæ4VêøWí:Xî¦VíaUëTêUé€TègTê Sì/RïUñXðŸ[ðÛYî…Vê‰TèÚUë8RíËRînQìÊTéµXêZî&[òz[ÿòæ]ÿóõaü÷îiþùï€ûjžü á©þø«ÿ0°X¶غÿr¹T°¬£¥ý ª£ý ¡ý ƒ£ý  ¢þõÿ„“ÿ5 ÿ Œ¦ N© ¯§ ÷ –ÿrŸÿÂûÕ–ýºŒ*•(Ÿ/ ø è h ÚS ;_ ‹mªtxŽ›ùŒø‚æ†!ËŠ]—ÿ[¥ °¸KµÁªg“®‚¿{[W†º•h˜¨„«‹§Ï«­ î® ³K¬ çµ¹a¼¿À¼œµ“£”xvŠpQb¸Z±kÁ}S‘6ÿ ¨|Šünv(š?½üâ÷”â ¨ 6ž¥?¢±§ ¿®ʪÙ¬ ë§ú°³ñ ǧ؃{‘&›t˜ •Õˆ…n‚¹xa\9d…ÿi’ÿ †ªý“ÿsšþ’ÿ »†q‚ƒ“ß~ ¦¤ Ó­ £²0´·}¹ͺ·)³³²}²бg¬²¨œ¢—y•šÿœÿQ ÿ[¢ÿ¸›ÿRþø”þ䣹¨^ª´¤¹Óµp°±¯°M²²±œ§¤Ÿ+£ï®“´Z´F±¢¯a­ݬɰŰ²§Ϥ§ª©Aª®ž±l²ì±L¯¯Dz1¤(}£‡‡šþ„‘þ\tsn ýƒ g’¬¡Á°Á¸€¾»€µ'²·³7¶%·8µDz©²¨´¯%¤O“ø}A}ÿ°—^²ì¼°¼gºnºޏijÿª¯ý¾¢ÿÕ‚ñVþ›KõMðOï#Oï£TñÒ\ópiøYiþù¹wþü |ûpiüìWþ¯RÿþMþûâHø°JõvIótGóqCó•GþöÚKøWþÁyýÒú‰„ý¸iý³Pý8Lù\PøSðTTêÕUèèVç”Wé§XëŸ]ðÆiþ÷ \ôBSñàSí¾WëJUëHTíTTïrTï›Vï'Xîu\í\î±Uë\SêñUì6RðŠPñ QîUë·Yì[ï×\ò³^þó_ÿô büørlÿùMˆüŸü ô¡ý " þ [£ ‚°=»0½—¹_±š§ÿ sœý œþ ó¥ÿ »­¬¡þ ð¦ÿ ¯¤ý¦®d´ÿ`¶¶ˆ±þÖ¢ÿR•ð—9› ¢S zŽìmAd Çw†€§zc‰ oŒ/u ga&c  p R‡{ž¶Kµÿ…¥Ï  Zjs_u«|c ˜×"—´žšíž:ž r¥¼¨°¯è¸ ¾x¿¼+©â“àŒ`€ërb~Zùb~Ö„ðŽ‘”&` 6j !š ºþ$mØù:¾Æ%6· É—¬˜©•Y™¢ ©•£¤•Ãu¢ø ÿvj˜íšE’ÚŒŒÍ‹UvŸa U\hfxzH}r»sîu¯yÕw ei…—f  ™¤ ð j´uµ-¹‰»“»¹C¶„´˜´í¶q±ù¬£«t§#{— ·—”œÿj¥Á¨Ïžþ6ÿþ=¡Ÿ§q§‹°ˆ·F´2­"ª m«ð´´©®ý¨ë­&³ ´5³ù³I²$®Ê­G±t°¨¤‰˜ʘ‚¢µ¬´¬G¨{ª»±èµ%¸þ®Ãþä°^“®Œ’“ ˜ Ž ­x ·r … ÕŽÿò”Ö¥"´ê¸˼Ô¸h°`®U±À¶ѹn¸úµ¥µ µý¶p°9ž†Ë~þŽy­ ¨¾‘¿Ò¼vº°ºµ>°þQªý ¡• lýGQó|Nð‰OïgPï(Vñ!^ó‹oúXpüûgùýûVÿüZPÿþ Sÿþ§Qþý…MýüRGÿùjGöGó„Eò‰CóeGÿöaKöaa÷ú1–øª ÿÔ‚üâUþøKÿûºOÿúRõ™Tî¦UêWè¤Yê\í.pþø~ýý,eýøPQòáRí÷WêNVëqTî’UïÛVðˆWñXî¡]íü_í}TêSêTíƒSñûQó˜SðµWî<[î.[ð^òl`þó:aÿô eý÷Mpþú‹ý—žý þœþ Œþ ;ÿ U¥œ´=ºÑ»¯ ¢ &ý M—þ L¤ ‚±ö²­­ÿ¢©@¥´©5µ¯¿ÿ{ÀѺÿݬÿ<ž¬š•œT¤g¥À—iy x JŒ¼…ȇ  È^ ”T¢T)TŒUg–‡*« §¨ÿM•£€#uÈe ÏnïlMbfǕ󊲊ƒá9“z—²’M›@®¼L¿¾´Pžs“‚mo`g A^ýBsl†ý‰¯ŒG€>tíd 'g ÃŒI®„¿+!¿'\®  ˜“»–žIŸ$žlœ•ž‹¡Š h ”ÿ§P¢ ?– ˆ 0‹Ä…™d ½Z ¦j¿s~mvˆi(c–](] £X ÅhRt ˜©“ Ïœ U­ ñµ€·¹ɺò»ºã¸¹µí´l²Š«s©X­P«s¢ ž ´™òœa¨%©Øžÿ¦â ‡¥J¥¬®´ã³w«  ¦ ÷¦´©ΪÔ¤Ÿ šªµ³Û³е>³³¯¬þ¬r«´¢¨‘ŽŠÆ” ¤ËŸ5™Ö¢ ¶þ™Âü ½ý à  ’¯—Èš ! k… Dyèuúƒ k‰À“œªQ¸ðº!¼R¶l®Ï­N¯©´‡¸4¸˜µ*²á°ʱͰZ¤ÙŒÄ}5…Ÿí¶Ž¿9¿×¾Ü»iµ’±ÿh°û“£ü ë†ÿa÷¨Tò4RñÉSî7YñÅeõÓ{ÿüÂ…ûý*}ýý„`ÿüVÿÿWþÿJUüý9NûüßJüû¶F÷£EòwBð–BòŽGõ°Kõföv õ\˜ ó¤¤øÜŒYý¶IüÂLÿútOø…TòVí(ZèV`í"lö¤|þý?þJ^óINîµSìrWé¤W醢ˆÁ„ V€ f4¤ã±}¶ãªŽ”;“l—«{˜’AbœŸ¯ –ÿ -˜g¥ÿ § >¤ ”;ƒ“‡ý‚Fc ²` §…ZŒýÈ /t7iäbwaÑa ¹a$Yùbý}d—¬„l‘ ¥¥ ó³L¹kºW¹¡¹b¸ˆ¸¶l²Ë®\¨©޳(´ʬy¦ ,Ÿ dœt¤ب¤žØŽµŠš+¢N£Ê«Ùµ¬´á­ |§ Š£Ý£‘Ÿ ˜–—Ôœ¥ç°{µu·|²ï­!‘ª!æu¤¡ø‹‚óŽ]–3‘f‡ å‹ K ÿ ªþ 5—þò ׇN—™” ȇ Õ„ N~®všx  #”ͬ»¼¼&»í´®p­‹­ã° ´·³,±‹® «¬ ٮƩz‘ zîwa‰< Ͳ®¼óÁF¼¶·$³¹²ýa«üΓþ x[bús]ö<[ó_õkú“†þÿn•ü“üfzþ eþd]ü£Wûý¼RúüNûûîHÿ÷!Añ¡?ï·Bò^JõfOùneÿœú|¡ øL¦þ^\ýÈIüJúJMøŸTôXî€iðrwúP}ÿýƒÿöyÿåUñ8MìˆUìMXê›WêìWìXí]Yî±_ñÕtúf~þûʃþûãeóuQïÙTîETîÛUï@Vî>Xî^\ïG^ñWbÿó¶bÿñfýôœhýúéiú´sÿ«ˆý ‘“ý ‘ý ~‘þ BŸýú§š¨k¨-©•ÿ }ý v–ý «ý ÿµþf¯þϯþe­œ¯þ ›ÿ©‹¢“Ÿ°þ5ºý¬½ÿµ´³ 6±ªªÔ¨¨§Õ™‘–ýµÿ=£ÿ–œÿ ÄBj T bW FY^a ÿlšyþp›pì`Ù` šmÿ½q„f|]¹p w“þ`§ý &¡ý…•þ h‹Ùˆ¡›ÿ Ú¤ÿ RŸ†Ÿÿ }žI®z¹‡¼Lº¿ºá®^¨Ñ¥ä§{˜ý ìœÿ0— ]¤ç ¶¤ö¤:œþ fœ gŸœÕ­·ù©ç$"6!Es……í¢ß¿ý¥þœÿ À¦0¡þ Zžÿ ¤Œ›~@ŠÝ _‡s„ Ÿþ<¢ý "ŸÏzic,fÃoréjÁjZrž ŒˆµŒ ­— é¥ ú³ÛºÞ¹"¶µö&µ ²J®=§Q¥®ô¸¶ç±ò¦’œ›z¡ùžD6‚Ól 8¤ʪ÷±ó±Æ­ D¨ 2£Z¡ÿ :› J” Ï=¤r¥G¨ ~­t¶&²Ë«"L¨#xŸ”– ‘´zôpÎ{†©‚\z äxÕ v} ‚p Íg Msöƒ“ Â~ šþ 7“ÿƒ_x .‚¦°æ½j»¥µįN¬m¬r«Û¬¯ñ³(°g®Ы¹§d¥ §”E~Ã{9~¬‘å  óôÀ{Şú4®å£ÿ1¹z Fsmdÿ½^þÄrSý_œûóšü †þ>nMcü}YúÿXTùüµPüú†Jÿöð„@õ’Jú‘N÷ TùnZVU «W Mkôtxp¬oaƒ8ˆz &\ êUÿßm 7s}Ž iŸþ ž§ÿ 8®A³Ý»ê½‚»:¹=¸€¹·&¶Ѹîµd¹ÿµµô¸„¸¹ǹ¶<® ²ذC±°²¶¶ì²ÈVˆ{tœr4nqíp :c‚vŒ!“y™ @‡„þÑüŒw]uþ!“ ¶¢تœµc´ÿì´ÿó ÊŠPz µwÃp‹t‡sÿx{"‚<’9‰”‚ˆøœ@«±´™¶t·¶±/¤b‘!‰Çlž’±i·v¬’™›“€Ÿ²¨ìŸ šå¡:£ ¨¤©ý§`© ™ª ‘§ j¤6Ÿ •û˜ÿÚ¥þ)'™ÿ… ˆ,— ¦K¬3«V§{¤(£€—ü~bj×fbiNrÓ{“‚ 7€]z L|Ò„ÿ5€*y6u†„ÿ)þ g¯ÿ WŸ /’ Ü ǶÇÀÔ·pª°¡2œ ¥«³ö°‹®¯Þ¬F¤<” ‡G…„™,ª†¬D©˨³«جò²‡¼<ÊÎÉ»¿¨ ¯˜ ² òw ¯‡ÿ cþ ™iÿúd~ `˜ý ß ý Ç£ÿ÷˜|‡ÿ4oýOWüþbRúüSûüºPÿö”Gñ*Dò^Où_RøUøfg_ÿ ó ÿ Û’ ~ôsÿéWûÍIøÁOùaú²}þý\Œÿ}yûƒ u’S÷±LÿóRÿô,Vó‘WïWï¡Zï1fô\"Žnÿÿ·˜ÿÿˆÿÕfø.SõÇPñ«SïÝUð˜ZñA\òà_óbýõYpúúp‹ú|ûÄlý|ý¥œý Κý a“û ý ¸³þý¯ë«Ô ÿ 2• "…úw"ï‚ /e„-<Êt–q!Wj fg_e|tÿ4‰þ *›þ eŸÿ|—þŠt&‰°œ§ƒ±è¹E´3­´™·´¦‚qq ¸xÎmóx yšˆâ“ÿ ö£ÿ®ŸÿCy¤Th[Öcspÿcqýer¤s¶Žˆ”v;b —Y Ém ˆwc A—ÿ Ó¤ÿ Tª Ó²¹a¼‰¹ºÀ¸=»f¹¹ÿ$¹ÿñº7¹å¸°´âµv¶m¶Ü´è±ǰ´+³Ò·_·V©û¢³”nv]iÿj d àoùxQy!Kw"€ŽÜ–j‚á“ý÷¥ö ·.v ü@† I”U°¯ v·1® ¤®ŒЈ$¡„!C~Ð|ttw"y—x™4•ÿ(&ŠH–¥–¬ʲx¶E¹T¹ì²`£±“Æ‹Fƒ©‰· V¯§§–¬”Ȥç³l¯Ÿ¨Ô¥dŸÕ¢–£x ŧ =® u­h«§âœ–ÙþY–Г g—-¡Š®Š´Ý´#®)¨«§Æž³‹P€=wox Þˆ–ªœ šŸ ,¡y ÿk—ÿXŠ÷„Ž·¡ÿ ú±®¥>—*˜ÿ¿¯N¸Æ£m”1žÿ¥ù6—ý-Ÿÿ³s±Õ¬Þ® ªr¡É‘ÿƒé€i•¤¬ä´ǵ¦³²ذ·³·8¹¶¹î±œ«g¢ 'Ž ‡ Ň ‚‚ÿ •w‰us„ T—ÿ ‡ þ €© û© <œþ zýYýùTûþpTüüÄXþö|WòCPô¯Wü_Xøƒ_úw t žž ŠK6ŽBwvTüSOùª[øîwÿýö‰"â…N‡Yr¼QùõIþö°Ný÷÷UÿöØWòTWðí\ðîpøQ“ÿó¡ÿ-š†žp–áyîUüOõTñöWñO[ó²^ÿôF`þöMaüù4døü5rú×oü±cþÈlÿþI†þb‘ý¦—ýF¨ ¬¹Þ¶l¸}®7žJôz &Çw /v -¨r %Ûl "7l %éh $ïigl³z‰—‘¥0Ž…~jhÏnÒ{T‰¨6³º¦AŸj­©±ï¢SŠ݈D’#~… d‘œA›ߣ©Ÿ®}(V â`™q|{ÿ÷zú”„ É…ü„ <ð“dq ök3k yý Ip § ¶ÿ£ )ª œ²$¸BµŹG¶C¹µ¶1·ÿlµÇ·õµ-¶µ®Ø®p¯š¶õ¸i´¯°í ¯º õÆM³ Òš9‘†mrßp^k<} YŒ‘‹¬pé‡þ·’’›¥ÿŸü Ù“ýšzü} å„DŒÍ¥ b¶k¤••‰„*‰%°Š#†Ä„”}]xŠ}Îw¥ :¨õ«D¨i¤U¦>©žªâ¯=²Ù´*´U®b¥šÓ”ÃŒV†&– º¨&£z–ÁšN¨£³'³¸±E«÷£?Y™E˜dŸþ`ªÚ­BªPª%¤¨ž%žÿ¨£S¤«¥ a¬,µ"º3¹Õ´¬½¨õ¡g—sÿü€\ýHÿøÒKý÷»Rþö\Tô†Wñ2Zï¹p÷A”¡¤Ž›…žH‹]HOøËUóYñN\ò?_þö@`ýøZeýùqùþ~üÇvþ7eö uýôí€þ÷‘þ œ V¯ ûæ»»¨²¢£,—U#=s ) t &ét%q%Fr%r)ût*9s&Qt wýwÿz‰€!Nzo÷_ Ëe ¨z3™ €§[œF™$§ª?§¬¦©ç©¦‘Û‘à¥Ì¡nœý•coÜTD]såŒÿé”û -£ü ›™ÿ Œ “ ¡þ‘‘n‚Åu´‚üìx /‰ Ë—ŒŸ¤ ®J³†³&³³ã´©´)³°«ëª¤‰« ⤠ѧ8¡n¯ µÿÿ±¦›¦ œ¢u·âÊD´Þˆ 6‰n‹|…š|þb“ÿU¡ÿs›b€ßüàœѬC¿ü¼úž1€“} ½ý î‹þ Ù™ÿÀ± gž¦…öyJƒ!Ö†!pŒ2‹„Ò¼|[pý£´²n¸ÿÿ·î¶l²Ú¯$¬B­'®Ñ­²«}ªJ¦·¥–:…™`²l§Õ–’𫦵®½²ÿ²À° ¦±›Ÿ’õ‘6•þnžÿ„¡˜Ÿ¢q¡`Ÿ£Ƭ}¬…©ø¯n¶;ºTº‘·õ±£ªo¢¢šŸ“€mx gˆû›C¬®±Q­Þ¨}¡1•Œ›­¯x´¸¤ZQƒn‘õ›¢Ž„v‡žˆ ìƒ ÄŒÿ£p¨<§¥ª/©ô£‡˜°‡û‡¤²¹:·?´ ´a¶p´εz¶‹¶´ë²Á¯Ž­-¥“‰at €þ¼œÿ ¤ © Õ«ÿ ×°ÿ¯þ³£þ^xmý¨WüþÕVûøÿn÷ø~‰üýáŒô€ù|ýþg‘ýÌ¡þµ¯¦ z— €”[œ·’ IhZLùUõÅxûhÿF…W’bž͘ÿJmþzJÿøäKÿöOþöîRþø­UôWïþlÿ÷«‰þˆžæ›ȘØŸ„“ÃgfPø»Wò1\ñ.]ÿóß_þöaýùtjýúp~üÿûô‰ý÷~ük÷xøÿ š 2¤*´нF½¡¹´°®¦ÞŸƈ=t "ºq "Æt& w(ou'`x)-y0 w/qq $wp"òm $+l &¢q)×p%7p¸i ¨g „pùŠ.™-˜œ§é§N¯ÿ»þX»Bº¤§ó£(¥G¬/¤™È¥oÂ^Æatê˜þ‚¨ú ­ºú§¬þ ý’‚ ’¦þ &§ÿê¢?–ÿ (˜ü‘ —•þ ü˜ÿ ®ÿ K£ÿë²Jº—¼ß¶û¶)³¾±° ŸÆš”à  ^Ç‹Iš K¥ ×¢–”͘7 dšT—’AwI…u‘€•/Ì‘U™þñ¢Ù¤×—C—ÿÕ§P´;º7½®n‘ ƒ —ý —ý‘ÿa¢ ç‘Ýy=pˆyG{I‰v‹ ÛvJž=§—¯õ²Ȭ!«j®ŰU­3¤¢ž0žg¡Zžö’΂H|•âµ9¨Î’&—¹£î«‡²вŸ®¥éšA‘ÊŽ½‹ÿ¹¯Ô‘*’ ’·š¤ ,®h¯Ô­¶±ú·%¹k¹t¹h³«¡¤–^„c‡ x—ˢʭ§°è¶s®ߥ` ?•ßË›X­Y³ ¥ <UW’ù¤G V˜˜˜ãùŒk“xž¢Ť%§Œ¨]£`šˆ†ƒX@³v·iµ–³Õ³‰µ1·,¸o·<´̳m²o³«>—E„®zÿÂþ ™þ;¢ÿ à§ «ܨÈ þ°Œƒ¯mþ[üÿYü÷kzùûa•ûþ½”ÿvƒþ.ˆýýÌ£ý°ÿ °†¦ úžoÒŸò“ kdIú³Wõ;€üà—çŒ* ¬Ž§oÿÿ¸Mö£Mô0RÿöTýûmVÿú‰WõšbõÄ}ü™—„ž›Οÿ ––lQö^Wñ“[òÇ]õ^ÿ÷‹^ø]iüà€ýùý•þ “ÿA”ö Ÿõ Y› ®x¸ÿ`º­·«´.«Ä© #©ý 0–ÿ¹€Ts ˆp &{,w*Ëx&áy28x1Ïq (Iq Åq #_r)èr)Pr$Õq r!oýr '~ušÿ |  ¾¥§¦Ö´í½ÿé¼Gº ·ù²²'±ÿ£Θÿ n‘ù{ “xœyéƒ r˜ý ‡«ûQµüέ J“ ë‚»šþ$°þѱþb²û ;±û j¨ ü ÿ ßšý¯–ýT ýq© Ľ.¿ŠÀPºõ¹¯§ “ŽÝŽZ o0e l{ „}“Q˜Y&‚ÊsRv‘tqfùvÙ…*ª–&”ø˜¡‘-”‰–$š¯˜Ú¢˜¯½´*¸º¶9¤„‘“þ !™þe‘Ë’ÿ ¡}:n:xwx / ‘…'ˆ Š шÄ‚1{`N‰„–²ž;œ?£­Ѱ¥«]ž‚‘‡÷˜ES%z €Æ”Ý£œŽ‘1¹«¼¯ì²÷±«Τša–=’Ú‰,€–ƒ¦†¿ˆ,”¢Ù­º¯¥¯|³c·¥¹j¹9¸ã³Vª¬ŒâŽh— ̦F«V®h²Ÿ½´Ç£9œ_•¤’<š§æ°Z¨ ’(†šþ5°g®v§ö«L¦æŸG˜o™ý¡]¤›¦_¥Ø£EŒþ€î–—«¯¶޶Ƶ ³Ó´½¸¹Í·Ôµæ´c³ž´®h¡J˜é”ÿ‘þ l™ÿÑšÿ` „  ™ ü‡¢cQ` 8]ÿæZþü\þô[úü¥œüÁ”ÿ6„=•ý¦°þ ³{­Ц ‰¤ p¡°Ÿä’ ¦`'KûmW÷Kþƒ™a™ò–²‹†ÛtÿßR÷%Nö8Rÿö®Týú4Vþù‚Wÿö›^ö2yÿ”4¢š  ¡ ™ XsÙS÷¦WòºYÿô²Xõ¢VöHVõ2]õïsüœ…þü˜ÿ lŸÿŒ–ûB™ü ¢ ɶH·³n¯ z­ ¨ ä§ ©¦ #›þ 7‰È{Wv#&€+à~%»|"²|1È|2Up &Ùp ‡u Äx+ƒr %u/v"u!u qu $z%·?Ÿÿ ™¢ æ› žF±î¼ˆ¹жž¼Ö¹¹°Fªƒœ.…%˜6rä~M—ÿ´›þ c›þ  ý ô¦ £’ wÇzFšÿ ,©þ ½üJÈ0¹”© mþ£†þ‰ÿqŒ ž£âª<´ä² ´¶+¦ ˜ƒ…Š%ŒW‚E\ °W Íf #wc…·“c•2x¯Q ¬^ óc ÿjf‹òŽ>#k‘ –WŒ"†ô‚ä†ÚŠ_”3©ݰ)³Ù·µP£{’ŠÒŠý\†ÿ ®hÙwÿ(ýˆþ%~)x ‡s )z rƒ p‰‰¢t¹x Q;†7Œé“½ Ó®¯â«f¢_—ë— œ(œ˜•’+• ¼§e§ ‡•Бף6²µ„³ ÿ¯ G«:£Œša™F—ŠÏzxsä}¯ˆ¯‹z‘xžå©ê«õ¬u²C¶N¸L¸£µܰö¨–­‡û‘Ä›·¢Þ®€°º­s¬…¯h§ ¢¤˜i“T‘`™é¥×®`©ô–ÿÍŽþxžþt¯š¯‰®ü´¯Þ ø‘¨”,¢k§g§ §^¦L¡4“1†r” ªôµ¤µ«µ´õ´¶H¸b·¶"´سM²Ÿ¯Ñ©Ì¥Àÿ k—ÿ ª–ÿ}™ÿb™ÿl— ÞŽÃpý¨Où‡MüºSÿý¤Vþûe]þôYúüŸü˜ÿüZÿO³ V´e­ Y¨ ¨¦ 4Ÿã›i ã`‰OüYùyÿÿ“f¥ %£/— “ͳ[úºRú$TøS÷IVô9Xò¹aùØtýµ’Å¢ÿ𢥢 ˆ›{UûUòjWÿôêUöŠNö›MöÀWñ¼põ †þù” ¤¤²¤ ²§ …®`³ °ª©%¨ ˆ¢þ Ç¥ ‡¥ ©¢ÿ»˜ÿ X oŠü‹ÿÛ‹ŒOˆ&¦‡)t@v§|Ì{'ªr $zv šu &u$ýv 0z$û#}‘d¢ÿ ¤—u” Ý£å¥Ü­z¨ýz°Ñ£±™OŽ î‹”e #\ a nq –‘ hžÿ Þ—ÿ a–•þ‘ j¢c-x›šý }¬þ WÃJÁ ³ _‹ÿŠ‚ÿÜtÿYz¥„F‰É”„™ ˜5‘Ø‚~å„ Œê‚Ýi ûc x{¤y„§“~”CrfFbKmmø~.Œñ“E•ó’&f’"á‘d‹"t„Š|$t·je…Ô¨°Y®Ùµ¸«Y“j} Íwþszþ2nÿʉý lü Í–ü‚ûÆ~Ëo~…%‡äw'v ä )¨ˆ{”Ñ¥U°ø¯ð¬Á©£ ú¤ ¤ ®Ÿ e f¬ÇÁ OÐþhÄÿ u)®š\¨ ³eµ!s¯"Ы¥%v𬗋uõkfy«‡ÝŒB‘!œk¨;«7«û±ȵç¸â¸³D¬s£ø’ðŠšš b§ Vª›°¯©%Ÿs•b–aš„˜”F—|¦4¯Æ©Ô—[ìœ.¤ê©!»±!ð¶¯ÉœóŒ’v¡™¨)©3¨ ͨÔ¤\›p”&™†­ý´³³+³ô´޶4¸¸x·µg´'³é°ܦ—œŠ a‚h Ÿÿ¡ÿ žÿ ‘ÿ÷qüUõ1Põ×Sÿø­Wþûzcüøhûý—œü³œÿ×—Æ¡F² ì´Q°¹© í£ ÌžAš{Œåg}Xÿú§dÿûÃsÿþ÷‘è¨ © 5 PžYægýèSüÊSûÈRø¡Sõ€Wòg`ÿú‰rü.’̤ÿû¤¢ ¿ž =€ìWüRSðWòxVõZNöJöüWòþõ•šþþ•˜¥ ­  ª ªC¬º¨–¢{¡þ ášþ žÿÙ¡þ ^£ýÄ›ÿù•ÿðšÿ þ  þ œÿÖ ÿ „œþЛÿ‡6‰‹‹ˆ`{ :y Šv %x~):xÞz鈘ÿ£þ ;¡ ›—óŠ rŒÿ‡»• úŒÿÜ’DƒÏsjÌl¡V .S È` ¦p ³† ç“›#˜‰áu†b XiÏ‹þýþ ù¯pÇ 8µ ÐŽÿ õþ0‡ýÌ… ñ€Õ…†$É… o}ž†ȃrЦ‡5ƒ|î†>… £#Ä“íÝoðL ‰Uu ‡ íŸJœË¡ܘ!å–"íŽ$ëŒ!¸‰Ü}èxk À~¼¢è®‰­V¸¾©ª &$Èp^antqˆ„Õ–þ²’ý i‡ûá”þOÿ q Õ|Ê€ „?} Õo 7x ½}ÿÛ‡–.§¼²ž°M¯}®†© ò¨ Ѩ ¡¤ {¤ tº^Òÿ Ÿ×ÿ&Ç`«mœ—ŸšȧܳC³ „¬ï§7¢ož˜@Œ¼v]j³wŠƒ4…‡nš‚¦E¬®ϲ‡¶®ºýºq³æ«Œ¢W“©N¡g­ã®ñ°{¬Z¡—‘!ç‡ †’W›šš˜ð–™ ¤µ¯!¨Æ–“§‘ú•$n¢"C±!¶‹¯9žÁ”=˜žÎ¥N¨ 㨠g¨¥ð£'¡l¥­ú°¦±K²Ô´iµ(¶€¸Ó¹p·wµ ´X³p¬Tš!p„±f ã^ Õ~ d›þ è¢ÿ¥ šŸþ6…þ‹cýøTÿ÷‰Uþù>Yþýhûüœ|üý™üwžþ #žÿy£Ø® T´&²2ª S¡ Ü™—ÜwþmýûosýýTtüÿÛ•R¥É£þ/¢ý—¤?—Žqþÿ´VÿüŠPÿùõMÿøjNøÔS÷Ó]ø”pý™•ª`§î¡ ¢£ !‰»[ü±SðCXñŽWôçOõuK÷Ñb÷ýü:Ÿýÿ”$™ !¥ °¥ ª_«[¤+šB˜ÿ Y LŒáÿ/šþ T™ÿ™ ÿQ¡ý ±ŸýÀ¤ýªü ¬üÀªý Ë ý h ÿ£ ’¥”©Š*ƒ !YŒ'¼†ý„ ŒAœþý·˜ÿ¯’ ä Ý{{ ‚lz} Å‘k¨a¦¦m£Þž´$ÅŽŸŠ„„|}Hk ÁrðŠqšë¤±ºFÂL¨ ˆŠ%½jLcXbb l»v° ÂŽý»¦þ N±þ W¡þ ³€ÿæzx†è„pDxþ ÿ䌬˜ç¨m²û²„² ±É®À« ›©ì¨æ¬µ©À×Äk¾0´$¬ü ^•kžî³r®O¦%¡ÅžY–މ­uCjÖyÔ„â…Ä‹ó–¢Ь÷±´¥¹8¼º©µÿ®Z¥Š˜«”ô¤â±޲2³¬+šùŒî‹á—!›‚ž3žù›ŽŸЪc¦t–ü—„šÿÇ$›™­1¶¹±s¦°Ÿ:›×™è |§e¨—¨»§9§¨§d§ðªƒ¬f¯ô³Kµ1µµɸ¸ä·µZ´ °8¥B@p UßO¡hþ íý šþî¡ÿ 3¥C‘þƒhü RýüiSþü»WþX`ýú#{üü¼ü¸¦ÿ T¦ æ§ « Ƴ°³2¬ w  _޲Ž(•ÿ¨‡ÿqyþ0{þþ|‚ü–ÿÈ¢Ù ýb¤ü7©!˜-xþ!býúCWÿ÷8MÿöoMÿøíRþú=[û½müý—iª§ ¡ ³¦ E—:k(TôôWó¹Vö¦NøÙMùPiûƒþèŽü ³Œþ²D™ÿ (› Ϋ ®é¤ÓŽQ‚u©x¹y‡I ð™! ÿôœþµ—ý³ ýݪý îû ø¨ü œ¤ý h©ý 2´ý å¹ýk°ˆ§ ´œŸ›)ž z• ¬—þ ˆþ€„3† &{ {v|«ŒÖ†ûjáh¹d=`Â] 9h n}c“œ•ÿ Tÿ Re€çä§Þ­b¨í˜g†R|ßc y ƒ ™K~ inœ_r &~£–6¤¿§ ¥€™¤œè¤«‡¦™§#¢Pª¢ˤ ‹œµ¤>¤ªÈžŸ˜ŽÕ”¶›ëª¬óª‚«Wœ [Ž%ð‰„ y$h  k Ud ¿už‡! ©"º¨ Ñ!ñcPdòn¶g cg h_ ˆl ˆ‹ ” þ ã¡þø¨ ©‡Œ}…Ž”—L†‘„ÿŠÿô•ï k©İö²‹³²{°á®ô­¬€¯®´?ºŸÀ» ³ù±ž<Œ<—.¨‰¯Ø®¦ › ’ý‡öwEm {÷…߈c•0žM«ƒ´¶ýº¼ ¼·ºÝ´r«^¡s™£¡³j´Ø´œ­7˜úˆƒŒÉšsžUý£0¤•ÄŸ^ª'¢N—|›2ý™ž-©´u³¾­n¥™o’‘›Ó¥´¦H¦¦>¦ó§¸¨Õª«+¯Ùµ/µ!ë´ ™µr¶‘·¸Š·´ï°,¤ö‹yp`\“Sý?jþ†Žü ™ý Tšþ £ÿ"”þ]fý×PþüoSütWÿ¨aþüµ}ýýç¢ýJ¯þ ¯¯Œ¯Q²Oµ9µ´±8¢ Ž qŽ 7˜ÿ ó‘þ Ç€ÿF€þ.‡ÿØ•þb¡ÿ4¤K¤Jœ<†ÿ†qÿý3pýüjüùÄWôPÿö÷Rþú.]þ!qý è—¬¦§ X¤%©¡¯{ Wù¸SõRùgLú2OýÈlý„ýü‹ü¤–ýHÿï™þ Éš ¨Õ°¸¨¶‰gh êl xE{*=Š TœH¤Ô”†ÿ ržÿ.£ý“ý AŒÿ“þ ­¬ý ù¶ü¸þf­Õ«ü«.¬Ú¬Aœþ šþ |~ÿ\p'x‘‚1{»†ä º¤ Ší†ÿ ézýcoÿqg Ç|Ø‹«¤¥È—º „öt³ ¤ªF¨i‹œrEntˆq þ] ŠU“PyUÍq  T¤ ¨ŸÇ•Ü—?§£²®¨Q 8©}°®²œ¯‘§¬¦€¨ê¯­%­0¥Û¥ç¦ü«}²>µj°/°'§ Ž'D…•8vpoHt0o_ic‰•¥ÿ|¯[›Õx!Zk:~jˆ ~vh Òu ¶zÐx™Š Â{ð‡d–ÿë¨þ›ÿØŽÿ_Œ¶—¯¤}«¾®¾°°®Ç®7¯v¯É®ð°{³ »ÄÈqÁQ±ŧ¦ª~…¤د_°¨©ó +–—ÙŠ…‚Ì}ä‚…‡J‡g-™a¡5­¤µµò·­»Ͼ{½s¸·²|ª²¡`£ °³¶!±–§–Õ†Š7šΠi¡¥Ù¨³¦Ë© ®Ñ£ó™¼– ý™ÿý¦¨q©ç¯X²À²©3™da™7£¤£—¢c£ý§U¨š©˜«±µ â´ dz&µ/µð¸iº0¸D´ë¯ú¥û‘H{¸naügzý•ý™ý¡•ý #£þØšýémýšSÿü VücþlpüP~ýj ý?®þ ô³¶¸µô´³n¨¤™˜›n¤›þ‰ÿ¬‹ÿTŒJŒÿë™n5˜#ˆyûnýÿ:uüÿtûý†`ýö…Tÿô1QþùSZývøàšÿ © 8­ 6«¬¦㈠ŸYú®L÷ÊMúAHù6MýÓts•ü>žý ܦñ¯Ó¡þ £¥ –¨ Ï«ñ§ Œ g ®pÿ 8~ÿ»‚ƒ È‹ Qžÿ ¨« `‘Œr#|¦Ž Åÿ#vÿ o3€ ¢þh¬ý j¨ÿnž-¥ ¯-³Y±ÿd ý B‹ÿ Ñ|þ èsþ tÿ1‘ QŒþÒ“‹©м@¨ Ižþ L‡ýÁ}ý€{ÿxÿ €Ÿ5µsŸ+Ž Ù€fp>~j•o§#ª©\„‘e ª^ ` UµR S ÙfvŒ >þ9°þ ¯¢õœ/›„–´ªÛ¯m™»Œ‡Ÿõ´€»ã·;¯å«T©6­,­@¶ ±è¯`«—°¶N¸¨±ï­U©_'~„^}Øxiy ƒ 3obXYk¶ŠþºªY¹ÿåþ‰F¡þ j’þô{Me ?\õT ‹` Šg ؇ œÿ ¬¨ê _ „†ç¢þ­S­߬x¬©¿©P« P­ ô®Н2®¶ÿuÈþ‹Ãþ§éš ƒ‰Š€“;¤ç¯$³ä±¥†•o‹j…Û…‰Ž”€͇¡ŒÆœc©m±i³<³µQºÔ½Ò½¤ºWµÛ²€ª P *£%О#Ç—aŽŸ…ï‰@™¡¡z£è§‘¬ϲ±öª ¥&¦9­ª²°±b¬Ôªά­¦÷˜›“òšå£8¥m¤š¡Ž¡§¥Õ¨¡©ª«8±ð¶Á´H±¹³ý´߸*¹l¶|´°¦Í–L†s{Õs¦…ü—þ““þ²‹þ Ý¡ýw ý…vý•XÿüÍ\þþ‘uû *„ý …ýšþo¥W­ Tµâ¶³]¯8®8ª‰¡ <œ œžé¸†K‰ÿ`Ѝ€Ø‹I…"|º|ª‚üùƒûzûÇsü–aüø-SÿôŽNýø1TýÿŒvù›þ.«ÿ Ö²h±e®ЫÕ‘ ˜^ûH÷pHø.Cö.JúÃtC›ý Ê­ý¾±“·­öª -© Ö¦š A‹l ïr ´~ ¤ y… ˜‰ ½ž‹­ `– p¯ubƒ‚ â| oé{j”ÿ³•ÿ wƒ‹×”«¨W±š¨ãŸÿ T’MŒýŠü^’ü Áý7›þL¡þz°5¼ë·jžÝ„ÿ?€‘þ ¾›þ z®{½¢¤’¾•Á€0~Š¢uª«¡fs"<^ ] Y…T E^¹}¬ž ²þ ›³ÿ‚›µ˜ƒ™ò¤ÿsµþº¥Xˆ#Ú„ œ’›§D²9®¢ª›¨K¬ ­ ‘¯µÝ·¹²¾­ç³¸2¶ <­C¨‡¢ ð‹)Ÿ„oztH}<{¢ÿ …ÿ[Z_*z;ÿ µÿ¶ÿ§“¬ÿY¯ÿ¥šþ õŽ €Mi¦dÌiƒX jÿ S† ž¡ÿ›Ž–—Žÿ†è­¡ò¬ެëªøª¢ž–¦ u¬ k° ³Ű=«s±T© Ù—1‹ ŒˆÖ🠪±|µ²1¨‡”sVy¤z .¡™²‰¸‡w–«¨ë±á±/±n´F¸ú¾+ÀZ¼¾·`µq¯Òê$‰$Iƒ$cˆ¶‹‹dšÉ¢¼Ÿ{ >¥ªî² ±ð°!±Ù´Ì·1¶˵ô®â¦´¥f¤¬›G’f’¡›X¢Ô£f£2¡Ÿä¢©ͪä§x®´·‚´u°#³ѵå·ˆ·Ö´“³Z¯̧ö™_" %utƒþT–ÿÑÿ K‡þ .’þß™þ—{þ»fþIkþ„ÿÓšÿ“þ 5“ØΣÖ³ DµŒ±Ôªô§¦¤›š6ŠÜŠÿ ´zÿûwÿÙ„Q†ÿ{~a‚v‚xÿf‚ý®–ûsšû `ŒüÍxþó_þùáSþ÷:NýøzRýýçtú ˜þ,¬þ ³ÿû® ñ­ I²ý _qþÂJöwFö€BõyJøæjþ•—ý â±þí´™¶´¯]¦€¥ÿ å¡þµ™ 1€ Ôi êo * ¿÷‡ Š¡%­ Ò˜ 1€`t˜x$ˆ û˜ý 5…þjpÎw üt kvTyŽ‚í \ª+”™’ •@šýÌû8 û /£ü Œ¡ü¼¯þ !µÿ·ºÿ·½˜å|<|’‘6˜þÿ¬R·J ¦‡Õ*¡þ ½¡ÿ ÿ픣q®.¯5¢™„"te ·_ Q` a^ Ýmø‚Nž §©@¨î›–§“ù¿ÿü¸Ôý®®ýzŽÿ%Žá’?›Nœœ˜|›Y¬ ©j«°®¸çµ½°и]Äÿ ÒÏ· Œ§ÁŸ$­‰)€ K}t”€P‘`«Ó—ý7mT`¾n̉wÿ§®O¯ÿœ¹ÿ[¶ž›þÞƒÿ >vhq ÿrþ‘tü |ûÂŽþ /¢þuŒdˆ¢W•Cš­¥X¬¬‡ªü§ß–‹Y• Ý¡ÿ ¬8·ÿ«³ÿ ¢T–aé‹ 6… åŽ Ùž?©X¯¾²@±±¬Œ¥V“e}‘q¾qqФ¢× Òj„óŽËŸÍ«ª±»²k³Þ·Û¼è¿ò¿9»ð¶Õ°¥¤«“~7t`ƒf‘™ËžÇ£¥ŸšŸ ¤Z¨¸®Ó±²´ž¶з«µ‡³b­²¢Æ›m•A7‰K˜‚ #ŸQŸHŸzŸt¡+©)©ÜŸ¦¿³†±æ­]±Kµ0´δ÷³z²<®¯¨«šÔŽÞ€}râ“ÿ´’ƒÿ ñ~ÿ sƒ - .ÿÑþ 1*¤mœ Tˆ\™¦™± Í´/°{¤> (Ð~û¡‡üü‚÷ ¨{ú ¤‘þÞ“ý‘ýæ ·…ÎŒûÄ”üŒžüÙ¡ü:™þÅ‚cÿù Tÿö>OÿöqQÿúçküŽþޤý ë® ¨;§Cµ C« ‚×O÷PFóEõ5MüYhüý ®Y³´q­è¦ =£ÿ »žÿ ÎŒ ¡l U`6qµ BŒ ꓚ§ v±ÿ Jÿn”%} q ý'„AŸý À’þ ×i§] ì]å` þ[‹k#ÿ Œ—…‚­{ ¡eþE¡üý£û {ü A›ý î§ײD±®Í”jv÷pĄܖÿ€¥Ø«–w„(yHŒþòžÿ»žþ²¸߸¡¨=ž\Á|¶f éq  sÕw-·¬b©—¨ §Ù  —»ÿ¶Øÿúª @–ÿ±—ÿ1“f "©’³Ž“>žÿ˜½Ÿý­¦·Ñ®ѯ V¿û 'ÝüÖãÑÇ©ž8  Ž%”„"„!©€„Ÿ…¢ûªþtýNuÿZp¢y¶~-Š‚ ÿÉ©¨§Ž˜þÞxþùaÿch~_ýðü$…ÿ2‘þŸþ HŠ݃èk"£Чÿ«6¬ªªÕ¦Wé{@‚ ?’Ï¡ÿ¹°Ú« <˜ÁŠf‰f‘æ– ž©Ñ­r­d­¤¬©Ì¥I™«ˆQx*qä…íží¥s›Ž‹Ž™“©µ6¶n¶¸©»•¾ÿ¿¶½†·h°s¬*Ÿ£…Bv¸‚ë”’¢©õ«§ò nŸ¦¤Ÿ¨P®±³г¹´7µ͸_µv°‹««žÝ€X}‹€”‡‘rœ  žš žŠ£O©Ûª| T£Û³¥· ®™­±g®È­¡²´¾¯¨ßñ‘؉Ó‡z‹ÿˆÿä 7}p4tÑœÿ U“ –•¹§r¢ Ï“ äƒ(Œ6˜f© » sÅ Û« â–  Šƒþ܆úüš‰÷‹‰ù œ›ýOŸûI¤û û£ÿ ›C•ü<›ýâ ý#¡þœþ¤‰þhþø¸VóPñhQöf`„þËý § ¢ã¥c¯ ò U‚þßTÿ÷0Jö±H÷ÕN ÿƒd n†ÿ ‰«6²аu­Šª E¥ › ~† :\½Yt … ª›&£Iªø¯ɵþn¦ÿx™Mˆ#k öÏ~nžü p˜þ mj S @V Z ëU6Véd úxÈrl …ü”ÿQŸþ  ý °þá‹«œO¬Úª9§ó“Œx8pÁˆÿX¦þp¯ÿ5žr‰îpmk¶l!~OL¡a¼@ĪÆ@µ’¢+œÀ—'}焆 !… Ÿ•ßµ¯v®€³ê§= › À«•ö–zš–`“L’&™´•Y•¨™Š¢“0ªàµ‹¡›š ¡¥þÄÿùµ—©n‚ë–â—–!¿ˆ!{ “f«i«þ$œý¯…/züf yg ˜Š"šŽÿ#8‘þ5ÿ™h@YC`aqbwÔƒÿM‹þ‘þW—þÍ–ÉŠ—’²£©/§ç©.¬ ªõ¦(”|àUÓ”ÿþšZ“ t† Š }— ¤ª ¶¯ •´A±ߪƨU© ª¤« ¦4™܈ÿv`€˜}£ò§¢$™G ¿°a¸¹5¸ø»C¼ß¿‚¿¼<·§±±­´¥S‘0€8Šyœò§^®¦¯_©5¡ù ²¦ªm°¸¶aµð´Ñ·¹$¶7°Û© —³‰,„+}é|bî„Á‘4š½–nŽšL¦­H¯-ªN¬»oÃ;·”¯®ƒ©;¤m¬©¶è²e¬´£Z˜~–§œÿ Ÿý ø–þ %† ê}ÈovÞ¬ ¹£ ø m©‘¨ ­Ÿ ” !’ ËšЍÚ¶ €Å j´ Á™ ׌ ƒÿ ø|ûÔ‡ýþD‘üe›üûB¥ü /® Í© Qÿ…žþ÷ þ  þÞœþk‰þ‡oþù\Yò‚ƤÑžþ]šþº$u€"ćn–Ÿã¬ÿ·¢‡iy Èt ê~"À%"ƒ!EzXeƒcøu| rÖr÷„ýÒÿ_–ÿ6™TŒX”þ¨)­„ª’©œ­«§›gˆÓˆÔþpÿh„!y w ª§ ˆ³µY¶¸o´1«¯§–¨ƒ¬h¯»®$§z˜ ÚztŠ.™Ç©‚¯„ª̯²·ù且¹q½!¾p¿¾d¼]¹g±Ù¨:\Žé‡8–©¨)®¯°®°«„¦Z£Ó¨/­ý³d¶´µµ^·“¹µ¤°Y¥—ªŽÉ¡þ:™ÿ€ ì|Ç{à~ ‡9‚'zÚ“ï©ñ°c±W¯ß²d»ŒÃ»0²¿¯S¦š£H´²,­¬§`¡ÏÛØ¢ t– ‚Xx§kgx ¢§µö´Ô°{°À­ª <¦ /¦ p¦ Ï« Ū ® ±u© ‰ÿ „þÆ‘ü»šü}™üâ–ût ý |¯ ß±¤ ë¡ÿø¡ÿÅ¢þ QŸþ éþptþý^ýöÕ\ÿóÙcõï|ÿdšÿlŸÿ ÓŸ ˆ•ܘÿ åŒ Êmû~UúþòSþüÑK÷ÃL ÷V öu}S¬ÿb³–¯V®dz'³ò®– Uzzw;„ '‹ ‡œ?£¦̬é³´± þ tˆÿ i{þ “üî²ü¤¬þ “Ìm Nc Giÿòlþ~Yÿ^PóQ ™W h2p Äy ^œÿ ¼€N šì²F´­¢ƈ•jÌ|ìœÿ¨¬“Nz<{?têmôq¢p’w€˜Ÿ  «˜£͸›Å-© O’¸}ª}yûnqxm’k§&‘ 7«p _œ1’¬‡W‰¦˜õÿkÿn›X‹!½±É£"§ƒ#È™Vª ¢Ž r bdW[ Ôh{háV¡S ŒjÿÛ›þJ˜þ>•Žˆƒœ #É(xžÿh©‹¡ñ‘g‡ #÷• ú‹Oƒ *{ Àx ¶vD…L„Öˆ7ƒ ݈ýëˆØ„”•ˆö“F¨Q²M¯e¬¡®]«D¨ ¢”•z“þwþK—ÿ `yr1~$œÿ³P·“¶Ôµü·O³ù¬U¨ž¨†­±=°U¬²£|{zex‹¢à®‰²*¶¹¸š·v¸¼–¾µ¾ǽõ¾±¼C°.œá‰˜j†´›¬ž±ª¯˜¯Ÿ®~ª¦©°"´E¶/µz´|·o¸4´´°þ¤>‹6‹þ¨þö¢þø€‘„j‰ ß…€¾r rÒ’ ³¬S± ±ä±+²b¶¾ºÞ¸„µ°Ú¤Ä“šL¯é®P©U¨¶¨²£€˜4 -„ «wòh„{¥'ºìºθͶ0±ß°«¨ —« ®Æ­€¬h³Q¶ì´¦ý ”û¶Ÿý™ýû–üø ý 篑³£ª¦ ª¦ ‹¦ÿ ï£þ ¯ýÍqýÿW`ûûÀeüûHoþ¨‚ašÿôÿ®› k˜ Y” #• ‹ÿÒlýßWüý²´úµ—·?»3¿y¿Y½ ¼À¹¡®J™wzºm €4’½›ß J¤h¤ù¦\§2¢h¤›¬p³Uµ Tµ;¶‡µØ´*²® " ˆ$Ó|phi²n~‹«5²n¥…•÷‘už©¹¬Ó° A±Ú´Bº0¼¹tµ§²"©E˜Í–ªº®“©‰§{£%›p’ÏtÝc ix A‚ º|`…õ¦C¼u½x¸&µZ²|«ó§£.ªž³•³± f´6·›­ ¡7¡þŸžü <•þ¿Ž#šû¤ÿ ¬¨ å° W¯ª¨ Æ«ÿ«Öÿ¡ký0]ýÿbþ‘by”—:¢¢ÿ ·«j³©« ”–òp—Vÿj_^^UùZê€þ«ÿì¶È´I²S²*®y®v­©œà‘ÿ ‹ý –ü V§ ©&¨½¤¸¤n°*³ÿ+±þ»µþÖ¸ÿ¸µÿñ´þ®¤þ¢ƒ…i çj $d  cjùéuD‘O¨Œ¢ÿ ˜¦ÿ¯ÿ¯ÿ¤ÿÏ«i¸\·pººÚ­û OŽÿ ã€Ój'`sDÿ ‘ü Ätq… ý• ógÀmaqb}È ±©l²¦±¨¤‘†kÙM ³LªRsc fMªF¨ˆªÞ²«žŽe‰ ý¢ ®ÿ X¨ ¢ 7¢¹¨&º¶H£yÊø”êòûàô гþe“4{´r|ÿ.…ÿ¯Œ°|Bh~‘!䘣–$•à’‘$„•ðž&”"À$oŠ %G 'f %{Œ Ì‹ AŠ !ƒŒ !6–æ¡RáŠ;{Ìr 0ŠMzsÄ”ˆ¤#¬^­„«™«ªr¨š£Už:™‰¦}òŠ’  p±Ú·з~¶E³¯5©F¥¤ê§!‹¬¢²m³´®ò§Ö¦´žþ)ˆ {Ì„a’=ž…«³´@´ȶë¹Ö½J¾q¾íÁ)¼.®ã0uî…} Ž­Œ$™‘!ƒ˜}¢:¦*ŸŽ G¨%­ ϳ S·ì¸½µ¢³^°Í©“˜#ý…$j|+oviËv‘'¬§¸A³0£â™SŸ¨8«°v´|¶kº,»ï¹Ç´[²ª’œ§™Œ­³«%¡Ä“Õ‡ý†gqLb Çm ×z å{¤…¤Z»ï½]¶²„¯Æ«•¦Y ¯¥Z«a« <ª %¬ ‰®R  ç˜ 5 þ ,þ #‘‰¶”µ¤˦ >¬ ®Z© ›¨ ]¦£?…M\CNýâV Vm ûŠñž6© ¯ï±² >© ,Š Ee T‚PIX @oýJŠü õ­ÿJµÕµ²g°®ª¤Ò› ’'Œý ä˜û ¨ÿ á­c¨¥’¨¶³þh³þs²·Þ¹iº7µ~²¸¡ Õƒ k{n`v}ó|ü †Œþ 4›ÿ®¦À¥ÿ M¯ý *´þð´ÿÔ«¤¨S°i®iµ´5©ýX†ÿ —yÿ«f:\Ä] »v þFwÿ¾fþ }wÿè Ò ‹e Æsÿ{uý5~'Ÿ £¨ >«‡ºÊÿµ©=zÜQïHôQ[i  ’Í®J§ަ”¯>°Á¥J“ —ÿH©q° «¶¤ › Œ£ß¶9¸¬ò¿ Òð$“¾ù¹þΗ°v|ý|Å|ÿ¨ƒŒz0V¬‘‹"kŽ"³‡ ëx9] …TÉb§p¶{ü?g…‘vŽ þ î–ŽŸ•¨Bª–¬Q±X¶¥±(¨ª©®,ÿã–”¡ÿ°7¹ɼm¼Ì·̯ †«¸¢Åœ:¡®§š¦¯£ã£ð£˜W‹Š…€Ž€C†ì‰7—Å´ëÂj¾Ĺxµì·ܺgººî»–µÆ­`«N°^¨±—ŽŽ`‡&€äfŽPŸ“©Ÿªûª ó® K°v²‹·X¹?¸p¶.±ªsœkšŒ ûˆ n‡ š’Þ¥c¸»»tºͳ“«¨š¨ͬ!±޹Ÿ»j·è¶Òµ €³¯²"°­H°–´'§C–9†œ€¿†gƒ {Ê€〠î 2«f½k»µb²W²±´¯p¬ž©“¥ÁŸuŸ…0Ší¤š§ µßµغÒ¹e·A±®­ªL¨M£"¢k¢ œ¤„£ï–Aôxþb†þÄ™˜¤ {®æ²ý³,²{®U¢Á•¼†™zI~ÿ ¯’§ÿi­ͯO«£¦Õ¦®¥ß¡Ù”† ă²°üóÒüé»ÿ Á¢·§›ª ³¸´¹\µ2¶q»u½¾z½ƒºι“®I¬m«X¥ èš$”þÅþ”¢ Ç´Ò¹_ºqµ¨”š“`¦Ž—1v¼^€kû¹½o¾ê¿P¿â»Õ¹E¯_¬® ¦² ȘpþúþФ ô´E¹d¼V·n® y—+ ø“ÿwt-bjþoûiý vnwrëm§kq®kÂpÓŠÿb¡¦““Ž1¢ª¾q¹W¹ ·/§4‹šVVvqþ,‘þÞ±j¶ž³ÿ¶³« "‘ŸÕ©f§Ø«m³é³_±z²–°~ª ©þ \ûg‚q‡'› ^·ü#±Àµ%¸,¯-œ‡Ѓ!¦ˆF‹é£¤V›€Ñ{¨^ ^ùb j n°loT{ b…!¤3ƒ†‹‰ð}!kY[Òd;yWv|vÿ…H‹Ø•á §öª ©¿«Í®v¬§ç¢ž› 0ð‰ ¾™ N­ ”µŒ¹‘Ã!Á!²wª¾¤kŸB¤©ýª¥º¥r¥ž4•EƒrŽtƒzÿV|%…'›ö´=¼žº µ ®«¬â­‡­­t®Š«$ª+®¸°ü¥Z’X…å„ó‚!Ô‰!å™J§‰¬¼« b¬¬ÿ­W´3¹Þ¹ ¶u±v¨ç™(mL‹ÿSŽÿØŸ ´B½»Ý»º ·±6«¸¬G¯˰Gµœ¹Ò¸¶´*³<²βʯÚ® ­ލ¤ƒ©N§mŸV›ÿ1žƒ«¯¢Ž›ˆaœ c³á»Z·,°”±,³±į«i¨$¡$Ñ‚>Œâ˜v ‡«ˆ¶À´ä´@µݹ§»+µª°n°Н&¬Y¬Dªª˜­¨¤š—™6¦\®h³d²á±R°ì±ªð žž— èy `} »¾œÆ‚³è–¨«Ä¥Ì•íŠq.–e¡˜­iµɹ$¶”´ µƒ¸¾0À–¿ï¾ç»5¶ž¯­®q­§% 2•'ˆÿÿ˜ý µ©þ ³ÿ:¹ã¾|¹ɵö§C™í—}ˆ!³lha jFpþ^jþ 6w1xSp~nlyŽqpb€šçšS‰§"ÀÒ»‹¹*·´­ G‘MWýPÉkƒk‹Z—”›þªŽ‘'£˜5©Æ«ó° µܹR³ß°¨ ì¤ Xªü߆ Œ6²ÿ ¹Îûľý#͸ݶ>¢M›²‰Ö‚ÿŠå“­³²:¡¿‹"h  e5a rm þr4sws›zåzìp Tus{€k}4oìod{+‡³Q€#ywZ‚Üš›« ­R«‡¬Ú®S«»¥О¯™ê”…ˆJ v’ ©  ¶¹ºÅ·õ°X«ã朡µª¤¬ ©¨L¨ t¡y|ifmSu x} ˆ=˜m¥[ª3©•§º¨-©à« «Á­I¬h¬7¯ž²©f–DŒÅ‹!p„!ƒ È‘œ£ú«áªº¨ ̨"©¾²…ºu¹´¶4±©œmý‰È„A‹ ó¡ ¯¶Õ¼¨»âºè·Ÿµ±Õ¯ª±´²²̶#¸·Õ´•²!±n°#° ®i©Q¡T]žs¦å«©»¥ñ§ §Ç›´Š<…½• ž«=·L´°š²Y³£±ž°‰«ž§¾¡ŽH}ߊK‘vž ­ ª‹Ÿ™ K¬–¶N·°Q¯&°²n°>¯ñ®Ó«ɦg™S˜›¬¦I¯дZ±’¯£¯u«™¥ ΞU£Ï©¹¢ hzØo—–v¾üÈ[µ´¨öªâ¬§ÏŸÏ“ÿ¶€‚}ú‡¥ŽA©¥²¶·³~¯ E¯ 0² ‘·bº¼æ»Á½y¹T²¯¬2§Ÿ‘á„ÿîœü ú­üQ´þ|¹Û½´»¸ªØŒ’!/{"Ûd©d›g tEzþ q‹þ ¸0p~nÊncjÓm q2|~€“ˆ?¨ ÀV»+¸ó´¥C’U‡M=kÄ}bzñn}FŽ f€%„ ´žñ«Û³Ù¸—¼q³§­§X”ì•%¢‡¹‡°›Èü&þºþ &²z»¸Šª„Œ…UŒ"X‘"€¢ñ°(µ©™‰.|Sm ­p &óu#øvcv*s:n%c =cRwÿp€ÿs{#q¡x*…p‚oz†w¥lÛw”«®Lª¬6®«¤¦{ŸH›‰—Hˆ¢€(+§Ò¸ž»8·$´|¯Ý« NŸ ù–žUªõ­]©¹§¨]£1’P{Ãn»qKuguxÉ{ €Š!m“F𡡦ò©Áª•«|¬5¬®f®«ø§–cŽ´Œ"Õ„ g€D‡¹™¸¥ѤÅŸêœ!Т›¯çº;»ð·¢±’ªBŸ4`‚ }ˆ ±¢ ,¶u»}»ž¹Öµ+´&´%³¤³¿³ µF¶î·…·èµF²¯6®ã¯ª£ ù”™’I›V¥‰ªâ«,¨[¥,Ÿ“ƹƒD ¦ o´²¯ y±C³â´w³ˆ«¤¦8 Ø’ö…é‘i‘n–­¤¯œ´RŒiŸ ®X¯©«%«/¬±â²v²¯¯à« cšp‚ †«›®¦¯´´å²¯í ©vÅÏ’¢C¡ ž{ ½h ^{ޤ b¬§¯M«T¬­±¬<¬ô¢i’Ý„!ŽªT±´¸n±ò¬/® ¬  ­ ° g¶ß»!¿%¾f´ްÚ¬0¦}žBš‰þežü n¯ü¶þºj¼,»·ºð±¥¦*s(jjtmoÕ{ÿ‡@—ÿ gˆâw p éj wc ˜päq "÷p $ywpƒþc¤O¼•¹ϸ·³z¨ «˜ì^ AM Fj ‰ RŠ Bf i ™vüs Œz·Œ ¥¹¼³¹˜¯‰¨ñž½~~?€ gYsm’p¦"€¤žD½ ÁŸ΂3}S†]‹Œ'¢•&€¥_µŰ×­·¤r¥ wˆ &Êw $Ïs ÷pÅrµnV`S]quÿù}OzŽw%} |—våußjʉ|Ž€ó•«©©y¢§h¬ߪñ§u¢²­—€Š©Š¥™çª·š»·´®M¥ t” 0‹=š<ªg®Jªk§­¨(¤Õ™ÂŽV‡=…Ì€”yº|¤}z}Oƒ¬‹ðšÿ;¦Ž«f«è¬”«”©æ« o¤—šþ—~Œ@ˆZŠ"Q„ù|f…¸“Ÿ—L••ížö®ºÆ»øµœ°ø«@…¶uŸsjˆa¤ µº8¹ð·a³’³G³â³Ù´ºµ@·½·Ë·\¶ãµh²ǯ•­ܬT§-¤Ÿ”‡Ÿ6¦Œª¨ï¤âŸ1˜,‘KŒDŠß’ b£ Ò±£°¼­ Я ô²È´Z²ú«Ÿ¥÷¢Œš±˜ n¢ h`™Ÿ1™!”“¨Z­_­ U«²¬¯¯â¯x§u›ŽÓh¯~™ë¦5²pµU³A¯G«¦C—,ƒ†H–®™-~Wy ³~ Ž*—ë§Ò¬3¬;­2¯¡´/­˜£= 8¤è© ª÷²ñ¹L³¤­ä±ñ¯Ò« Þ¬ زo»¤Áy¾´—¯•«÷£q™·ŒQþ¢ý Ù­þ€´ÿW»)½h½@º³´Ž©Þ•sbkÍ}~ ‚5”SšôŽì‚Ì|Oy 5r€¥'cƒ " üw–úr§ÿZ¼ÿ·ÿ¹»#²ž©¢¯¬:²zŸ1¢y¨D© ˜¦ç¡÷œZ–ê—3šÿ¯šþvÿd¦ °{± ° ‰± H´7³[®¤«¥æ¤£O­ îÁÿ ø°i¡»Ÿí»žòžœ˜ë§ï±ζ»²“°/®g­<«x¡ò‰ ÀZãT MqŒ˜e«Ÿ¶U³”¯Ûª=©!¥'™í‹›‘žžz¡‡ÜŒ &™ !ލ˜¦±«¶¬l¬]¬~²f°Ѩ¬§†«”ª«­Õ¶¶Ž·÷Á¿ nà º‹­ñ°—º!Àjº¸±ÿ­–¨{œ!•=Œ •þ Tªÿ­þú³Nºö¾J½\¸4² ´« ?zåg|p›y…ôÿ°¥Ý—ž‹&2ˆ%IŒ܆•!HŸœë­ÿ÷²þíºÿ·@¹l¾<¾§ŒÓemBn¾^ÜZ\…£lŽ"ã“ "­ޏx‡´ ¨½©x$†ü#Ýl"õu0zÏwÔ}J…t¼u^w yx t "„ !à“¶œ n¡ k Ê¥A¥§;ª­C®r¨¦‹tu ©r y#ŒxÿZ’ÿX™ÿ~‡IkÌqÍvl—Á| utqyÝšW”Y“qœ÷¦Ý T™E£¬À¯ª½¥¢.™ŠxŠÝ"­e·¹¾µʱC­Ô§9–5‰’”¯¦q¬Ì©Á¥¥t¨ø©E¤f ÿø£ÿþ¬‘ÿqŒê‹µ‰ù‹‹žŽ–˜¡¹§Ó¨/¨ʧ3¡Ž’òy¶m~wn\ Óƒ´…¦†Ç~‚| Qœa¤T££«&¶µ¹ñ´­‡¢ŠŠÞn&f¡y ­™þ ¯þ I²é·h·×µŒ²вÙµó¶4³àµ ¹r¹‡´Ƴ”³_°i®ž­„¤|—®©£}  ¦Cª©ª~¦Ç¢Iž¦Ü¡Ë¥ ¤-¦É«½°ú³)µSµYµ²±Gªþ©œ¦ý¦ܧ.¬À¹"µs¨ç¢ð¡§©c£n¬ä¸ɽ•¸£³ƒ¯ ¬Þª9–Ws–KzIçiì—гy¶ ±ªª¦k¥í¥ë ߘ£—‹«Dzn§¤Gªâª|¨ü¨’«n¬ª!§ì¯±6¨S©ˬ®ñ²/¶ž´‘»öË MÆ ÆËªÃ쯷²ñ¹•½7¸¶³ò¯¡§Z˜j‘¹‹ «šý ö­ÿ´°ÿÜ´2º–½ܽäºà¶¯“§Z“ b{ ¨gÚf¾}ÿ¡ÿ ­©Ÿ¼&‰"Ž “@Ÿ8®3³ÿª´ÿ@³ÿs·¹á¼°¿A¾bµ˜˜K×|eaM;PÁ[…̤¨›¨– žy¯TÈ;Ô н¯©-“_@{ÿ8s´|~|ö…@Ú‰ªv ïo"í%@ )oŽ !‡ {¬ «€ªߪm¤µ£D¤8§$¹«—¬T ;Š e€§~#y}›ÿ xªª•³wB€ )‡ñ“»3“ 7Žw“ÿ«™¿‘V ¶™ ¡z ¾ .¦U¬­ç«l©¸¨K‰Ï‚¾–Y­ó¸÷¹aµo°š¬ƒ¨—݇gð¤í¬¨F£ݤ𨗪_¦É 2 ,ÿ“—ÿe”ú‘8“õ–j™x ¶§-§þ§6§¹¥Ñ i‘/yªqöº‡}… ß„…=Š<‹‡Ž ƒœÿ)«$±ª§Œ«‹´à¶p°q­7¢ìˆNjjlæˆÝ¡þ@°ý /²ÿi·"¸D´j¯ϱ¯´ð³Q±¬³…¸l¸y² ë®k­–¬« ¨ª›wŽB —¡¢Æ©„«ïª;¦;£á£ð¦íª1®*«®*°‹³´®·ä·è´#¬"¦¥§9©¢ª”©§w©d¯C­_§-¦Œ«®˜«ŵ¡»l¿R¹éµ K®iªþ¥ïŽ‹g¥FuEØl÷Ÿ¶¿´®¤©æ¥¥Ùª½ªE¦Ú§(´‹¸·²Ë­û´Oµ2±ƒ©°¯ç³7« …ª©«Y©è¥¦- ÷¥º­ ³‡µ£½øÂ”»z»jºi¯Þ³h¸·¼«·³ü±c§ •ŒëŠÿ —þ ¨ Û± h¶kº•½€¾žº“·H·y²Ò° œ Ñ eom›þÖ¢ÿ(“"!*€‹† (‰ ÒŠÇ› e© ©UŸ®!¼¾Ô¿p¸Œ±©Ÿ ’q…Óg¬IqNë\ ñ“™Í—6™  =«8ÄžÌ J½m«¡¨­ O—Gz*yɆk›&œå›ûŒ#§„ $8)ó–-’'Ÿ Y¬ §!­˜©!’¤ã—隘™*v¥f«vªþ¥ 4š†˜®ˆúœ½«§©•Wœ¤û¦^ ¤±žê¡,š˜‘ í x’/›gŸÐ¥ª¦­¦­ù«6©W¦ †š 8†j€x–Ó°˹ä·õ³ÿ°]«ï¥^z9‰`¢>«t¨¥¦J©,©i¥  zŸTšO“ë”Ýš­¡ ££¥Ü«ž¯C¬oª ©p¦§¢ê˜÷†¿|†Lf…®ƒR‡qŒr“O£²´Ô¯¦ªˬS´¼·w°s¬(¤ØŸt¹|Í• —¥þ™¬þ€®ÿƵ"¸Ͷ! ±±µ³º±U°î²û·W¶É® ÷¦ A¥3©Š¢Иâ§M™`¨ªmª«òª¹¦æ¦ µ¨!"¬®Þ±¯®¥°±»³·X¸+²ª\¢N¤ï©è«ùªO¦¦}«J­£©¨À¯+°¯·¢¾«Å¿¾¾À¶¬ ¡½ŒÛsŽXžL‰j ( M·À´³®b©M¨8«+²Ú°`«“­&µ1· µ ²U³´q¯ ‡ª ç»ZÆ·´¶ Q³ uœž<‘ªŒ¤™ΪЭ[³¹X»x± “¬ á®s±³Õ¶ß¹ ¶Ȳ“«*Ÿ…Ž /ˆÿª…ÿ Ï,¦ ´ lº6»9»b½H¸à¸a¸p´·o³ ŒRd e Ÿ‚ÿóƒ ^uçeSq³z’{pt èŠØŸÿ– Ö…¡ЧÀ½~¾»ç°|©ç¡-š:нl­UŒ[éd|Ê›aœ¢œ$Q ¢ªD³²ºŒ¶(®o©o³q¬‘3~µ‡‹c–öŽÐ’ø‘'XŠ (’,@“1C”/Ö+Ôž ža¥ Ïš’†ãeŽ"Ä–ºžü1£+ܨ2¨m• ª«)¨|§¨Чõ¦ϧ6¦¸ ›à” Œ£ˆ,“R£&¬Z¯d¯`®4ªœ¥… RŽh}1}Œ˜Ͳ›¹¥¶³T±ª¤å$k‚tŸxª’©´§ð¨¨ §„¥ê£. ˜;‘–±¦H¬i«³­…®°²-±z­m«Í©!¥p  “Ê„؇ð”哇‡ó€šƒJ`™È« µ;´Á°z«§«ϳ¸²û­ § ”΀‰›žþ ¨ý ¾©þ`«ÿS³¶¹-¸œ´ý²²ö±y¯t°”µ¸µjª ¾ Ò›†¡þ”ùˆ{†r´¢&¬©Ѝ—ªxª¨v¨à¬(°º°;°®.¬Ä­õ¬·®X²\µ¯w£b˜õ¡‹©;¬ ʪ–¤¦¤¨Ĩ(¤¦ž¯ä²—°C¸§Ê)ÚÒÓŸÝ˜Ï ¥¶a «Ž È€@_Ðj h’¢±«´w±«€¯„³‰¶²ׯ°³õ· ·!º´"± û²³„³†ÀS;śÉPÊî/§ ý˜‘ pÓ{› _­¦« °×¹œ»“³†® +­á°Ì´c·s·´”®å¢!”ÿ† í ùD‹ù¤ÿ :µÜ»–»Šºü¸E¶H´²¢°/±u–“wëa ›c Z[ Š`p\Ïc Žjp3c ™xt’ÿ¢‡ …y˜þªªB»¾ ¼z¯”¦Ò¢eš¬‰]x"vvÿm [€l¢¶£!Ÿ%#¢G«ó³µo³i±o«[®N¬ΣȘ'Ž7—r– zl{µƒ$©ƒ (µŒ )E .‰’/Ž1þ’ 'Ž 'š“ *h~ 'à{÷m®€Ÿ†ƒŠºÿ ¤ˆ!½ƒ$7›á­ܤÊ¥]©}­N®~¬…©›§l§©¨ðª^¦Z›o“zˆÝ|…ˆ>¢b²j²–­˜¬5©C¤Bš+Šy ›{R—m°F¸·$³ دª¨M•2w$hlÍžΪ©]§u¦G¥.¥‚¥Õ£ý j›™F¡ ®V³b¯/®¯K±²Ù³°Ý®gª©§s¦öžÕŒö‡Ï•#—Š˜~¥}Kˆœÿ ¯¦¶3´ °ªT©%«°ʱD°0­ýžÿcˆŽÿñ¥þ ¸¬þ Ä«þ,«ÿþ±'·%¹ü¶À³² ¯—­°¾¶P¶´¬ !_þ¬¦øà–úøˆ¨Š€™L¥ªï¦þ¥õ¨©*©“¬¨±ø³U¯߬ᩱªQ­¡«ƪî¬è°b©c˜"užŽ©«à© ¦3¨a©’œ•ä¡„®´³…°X·’Ð è PäÏåþ Øÿ 5·¢£ªš=£ÿ œþ  ‚¿Žû§A±³®à± ɳD´x³)®¯f²•¶´t²!²_³œ¼›Æ ÄPÆÁÈ ÒÓØóÓú¾Šþ l*oÊϦf« ]±²¼¾l·e³!±G´`´q¹̸˜³W¬°Ÿ [† R€eƒRŽþ sŸÿ Þ°†¸Sº¢¼¼W·³_²H±²¯¹¯  +“9 Ž}èouhd[\Ë_gmi¡p [€U}„ 1œÿ´N¼½œ¼x°ȦÝ¢y–G~} ‘þ dŽÿ?þ-Ší¦ —±Z£#Ø¥-¬·´Š·[µ®´|¯ˬ¦ʦ r£ fšˆ£<˜÷{Špìr!ñ{ #Eƒ%¥‡ &lj)F† -©‰ (“„ &+ *§m&Äc £_*m×wôv,i=k#v$œ“_©«ž¦3¤ÔªË­Õ¬`©¬¨¨¤¨ï©>ªJ›Øù}ªp}Ó›u°£±3ªÈ©>¦õ¢¸›ª‘ 6 ~ !˜º®M´æ´ U² £­ ¦¶”|#u©‹Ø¡«¨N¦»£G¢©¢k£?£¤¡ŸžM£m«J±Ù´/°‡®j°´²®²¡³‘´?°׫*©ó¬%§­”gˆ m’ã—oõ…k~%~5‘¦s²´c°.¨•¦§´ªª®&°”¯j£õ”]–Ȧ Q®ÿ G­ÿª®¯µ~¹ظu´-±^¯®¡±r·º¸‚¯÷¥O¦ÿ®öˤúM”-œSª«̬+¨¥!§I©&©à­ ±¹°g­Û©R¦ö©Ê­ß«#§ O§?¬¿¥›–c”4¡ ¨Þ©y¨!§®ò±D˜/‚Ÿ.±¿·D°ò°O¼çÐ?Ø“Äýº3­\ªë¨0±•´ÿ–Ÿýž—ÿ…™µŸi¯±µ\±ï²?°Ù²õ°è«Ç­n®¨­ÿ«¯¯ÿ²~³¼‚Ê’Æ À„Á 4ÏJØÿFß>’ÿys«pdŠ¡¯ö¸޼½hº¸´È·L¹0¼§¸&µ:¬‚ Ó”y‰ _ƒ ±Œþ &•ý Œžÿ |ª %³ÛºO½8»e¶¥±α‘¯o¨Ö¡¥¨ÿ®ÿ«® 6§ Ù”ÿuÿ±V†U‰X¯dªppCj OvŒ «£ì»½»5»r±W§%ž`‘ÃqKw ›þ©š–…s‹r° ï¾D©K¥»¯#¸ ¾F»º¬¶µ¯µê´ iŸ ´–ÿxœð˜Ü…hz¸o"no!åz R}!Ù€ "ã| 'Û| Œo Wr pb  \•]rdŠb•e1_jbûuÆ“…¨ñ­Œ§!¦-§ó«­«Ò©$©¨‘©«C˜›‚ãoAfßy9•ô¨†©̧>¦´£Π˜Ÿ ¿– ›€ c} ¾— ¬d³³ ²õ®‹¨.œçZ‹˜Ž¥4¤Å ¹žìž   ~›àšJž‚§ú°{´mµ×±u­ƒ°‹³#±”±±²¿¯ݬ’­ú±Æ®I ’‘ø•JŽhÉ„þ—Q©;² ¯¨_¦‹¨J¨û¬3²s®Ù£´—„•ÿ½ ÿ ä¬ Ô¯ ^« ¹¬ «³ï¹9·;²è±µ±7²´s··[°¤ª™²šD§¦ëL²î°«Ô§Â¥[§4¨¸¨§Ū¨«¥«Ç©k¨1ªC¬q© Ù¦ °¥á©«¦=¡"¢Ñ©©e©]©,¦Zªì­ ê— wYž›³¼å´hª5¦ ¨Œ¯i­‹§Œªv®n­v²=¶Z°”¨Žœmœ©¾±³æ³í¯¼®ÿª§§f©¡§h ¥¡˜«·°³°ý±  ¸ ¼ã¸Z¸cÏ ÂÚÄ t—‹ŽX‹Û¬¦{³Ǽƒ¼)»£»»æº·¶¼b¿~»q¶ð®ϧ5›çŽň ´’ü ù›þ„¦ܪ ª¶Œ¼ø½‡º˜¶…²:±¬ Ÿh“嚺ýpÇ 6¼2¨ áz ÒUMT ‹\ÏeeúhÿuÒ‡ý ’þ§n¿Q¾>¸j¸†°¥O™Љ„n‡pÀ™[Œ#J†¯ ÎÀÿ¨£:®µ¹¿¿¾s»£¸ŸÉgÆœÆ^—Ÿì”<‹"çr$5g îr…{}z ¹tÚkDkžbbs_Íd‹b‘d‚_Õd0q¨‰Ú¢‚­€­ ¥g á©X¬i­ ©V«@©Ê©c¬x•®}ûk üh `y…‘ÿB ¶£ÿ¤m¦÷¤i¡ž Òy ‡xQ”‚«´j´õV¯p§¢£œ{˜ûŸw¥à¡ö›˜—à™9[žd™˜ZŸ׫‹³µ’´Ü«s§«űy±_¯m® ­>­M°[µ²µ1¥è•`’a”zšüŸ–‰ü‚Ì"¥õ°¼¯Þ«¨ƒ§ð¦¨©R±e¯³¥¥›g•𠕍u°Ú® Ù­ ÷³È·³8±X²¬²¥´+¶¶¸¶űb¥ ê˜ À ƯÒ³Q±âµŠ­š§Ó§®§ç©¬©ާu¥"¦*©¬V¬m«n¬Ÿ® ®z« ©ȨN¥P¨ý­P®À«ç©Å©t¥$ŸÜ›¾’ nx v´+¿θý«?¤ Í¥j©%ª¦­ž¯í¯Œ°X³Ô·µ2¦-žy¤$©ñ±Rµl°ò¬%¤š¢ ¨¤2›l›ö§!­”±âµ ¶y·ê²z©V²×¶ö¦ØÊžÿŒ¡ÿí¡ °Á·P¼è»š¹ »“Â@Ãú¶سWºÚÁ"¼”±ö¯ ªBœÂÿ ¿”ýæ þÒ²Á®…º ¿<½»}¸ø³²Ú­l¢)šÿÓ‡þ²þbɰ· û¹ ÿŸƒÿ ìVU idùeð` ed—‘ãœÿ f•þÿ¦~¾ʽ!²)°Å­B¥›ŒÖr²p:„¿”2’˦÷ºú¨Þ¡’¬¶4¾yÀ¿X»®¹|ÄË»°—n‰÷Á¡¨¢ƒ¢ƒ€ol(r{4zusªs„laR]ã_›b¤bBeŸ`!` gb e€yšÿŸ®ÿg®– ÿ¸Žÿ½œv¢|¬#©Ú­ª\©Ì©–ü†ã{ Mr x‹cœ™¢¿¥[©e¦U¡——£„êv } þ™œ¯:´Wº¥Ç2»B§y£eŸ€šñ4¤ ¥Ÿiš —Y—ˆ­Ÿ~™o˜9¡­׳ಽ­þ¤àžü¡Ó©Ê­å¬ªg©ý«ì±à¸|¹<¬Aœ •¹—M ˜žâ‰vE˜¦©K³±è­|©/¦0£b§e²²Ö¨'”*’ ¯œ©§@ªvª¯–³ ²6°/²´ã¶¾·8¹·¶³A­‰¤±¥«ª²¤¶+«z£ ¦›©g«ùª¿©?§ ƒ¨ª¨¬­a«H«t®ð°÷¯%¬ §_¡í¦”® °¢­@©}¦Ì –±“¨‘ a”H¢U³%¿º­¬q¥¤õ§^«“¬ì®¯_®¯2³A¸š¶ª°é¨âg£j­à·m´1©L ž¤ˆ­§©c¤:¦lªJ®ð´‘¾o¼ƒµ½°îª¯«w«Ñ¡7ÿ¦¥‘«ß±_¶@¸Ù¹½»\¹â½ÞÏ uÛ ºá§R´eÉÖÈî·t´Ë·ú« —þÜ’ÿ£ŸÔ²ƒ²L¹Ú¾·غ4ºR´È´D´&£u™ú?™õ"§ý ¾+«úÕ² œ„RFT’hn1miž”å¡1•á gµ'µU¬R®¯ܧ^žß•ÿúyÿ°|c”•x–“—ø£ã·j©ë¡¬~µE½À¢Ào»Y¶ɲ¾¦ä…ûb²}—– ¨w¾ Y ñu t©| —xµr¯pðt¶rßeù\@_Daä`_am]é\ æe C{ÿ#©E±d°b  ö|å†!c—üŸí›…¥ ´© "§n¥ú—ÝÿýŠ ä| åvy‡ ):¥ĨVª‘¦¼¡*–Z…™| Љ ­¢ÿ Ŷz´XÅ Æáþ’Ðÿ ƒ¬¤!¢Y™i•£ ¤©ð¨<£¬žšhžî¡ò˜J’w›%¨¬»©ô¥¤™Eq‘­3§r¨…§¦ùª#²й¶¹x³̧˜c’—H”…xˆ‡˜b ¶©.°V®7ª!q©§f¢`¥Û±m¶"­:žY’™ÿœŸGn¢«°ì¯þ²ªµ=·ž¸Yº·¨±í®=¥JžÈ 9 M«ü´¬£G¢h¥©bª’ª Ùªë«ç¬…¬ˆª§§C¥,¦üªb­«­ì©> M¢«g²§°¨g£û˜É’ Ë—  ´¬l·µ¶V¬†§£§Å«ê®©®¬R«z©A«§´qº·ì²º¬{¢ƒß«i¶á³@¤oœ:¦ܳ¾²°å³ݱh³3²÷À¹Ž´þºî³ºª°ª¤¨Ì©©³±´÷¶±Ò±J¸ï»g¾óÑ ¸áÿe¼ ¢ ¯“͕Ѽµ­¸A³gŸþ;–Ô¡3­ ¿©W­`¹4²ë·w¹§´”µ·æ¤˜ö*´õ«û 1± ¿º ¡ÿÚzIW±S¾uÿ5~qË_ 'y g‰žŽ€šX¨qª¤ é¬ µ-­¥–­|E‰fžÿ§žvšæ—¨¡o±*«ÿ¤š«ê±þ¸Á¼P¾e¹[¶ã´»žBv×S¢f l€Р q­ Øws~"M€#•y"r ìsôuâxo³búebÕdu`q\Ì[+l¥w­–I¨ §3¡þ Äzíz}ƒ&Ú ˆ œ²¢è§¡¥p˜‹’ÿkŽ  äx ³… Ïœ§„¨%©Ϧî T•§…| ~ˆ|›þ¿«ø®· ÕÉþ¢Âþ s¬¥2£˜ yœàª¬ª@¦; ' Ô¤Ÿ˜Š('— ™Ô˜ ù–`ˆÀ|Ž…:”V¢”¨›§„¨%ª±¥¸T¹(¸}®ò›RŒ!¹‡"~ v‚=•(š'ž-¤¤¼£!ȧð¨h¥Ÿ¨©°`µ°²²¤Z’ùmŽIÿ±•ÿ]‘¢ •«¯=±ž²ð¶@¸Õº>·B³:®¶ Ó‘˜7£ §j²[­Ê£N›“™¼£Ü«i«ö« ¬V®/¯R©á¡­ž2¢¨³ªâ®B©Àœ¯™þ§r³^³©é¡…•W‹“ÿõ—þµžǪÚµ^±}­t©Œ©*®°¯«6¥¶œ­£ÿ´¼ã²š© ¥°¢`¢²©a¯÷«Ÿš™•“§²÷³öÖ·϶´±p°£±šµ)¼ȳ_¬6°-²…±ή{±IJP³‹­ó«­µ$º“¹ݳá³Ĩ¿¡|¯i¾„ÄJ¸¹²ç³¯@¦e¡Ц_¦ uœðŸÔª´¬· ¹ò¶¥¸›¹ѧ·žó§ÿ  žþ ¢ý ñ þ þŠ ¯pƒoÿÛeZˆ§ŽPlìR q\ -b ±u6™¥å£·¢Ñ©5¸4·ç£e½u(‹}¤Ø£¹ž—A ƒ©«W¦á«ѱ´²¸¯¸¹¾³ë³ºžnÑO[W1j9ƒÓ“#„Á€"7‹%vŒ%+€$Ø{#Iz"T|#ìw3ri=d÷c³bû`ƒ\ßYZiþ½sŠŽ Þ¡Μ šþxƒ¶f!·yˆ†’N§¤šd“!Žÿ>†ÿ ²} Çö—¥Š¥d¦6¤òŸЖ|„\væyù€ VŒ`‘d’*• ¾ T©e¨˜¦ž›Ó’"›Ũ÷¬a¬Oª.¥¢Z¦VhŠª†…^„‚Õ‚H€| w‚ ð’c£©Ü© ©‚¬ ±£¸†ºí¹ÿœ±t{‹#"ºpöi –wó‹qÂ’™rП«¤§m©¬±˵µµ¬«˜âŠÚ‡¢ˆO‰ð£í§X®R¯±…´¶ ¸Ž·î´‹°Ë¢†Ò”ͦǨ­±D¯¼¤@•úŽY?©x«©Щɬ>®¥©: ³ Ʀý¬½ªÖ©®¥ê–¼B <®e¯«¨¤ˆ—ñ‘è”Ç—ÿý˜ý|ŸÿF¬v´°œ¯’«]§4«F¯Õ¯í¨Eœ M©˜ЫD³¤gžW¡8£i¨µ¨G \Ÿ$šR°å­~«…³ µà´T°Ä®Ô¬¡¬¥­‹­ì«z®¿³´Þµh³U²ݰµ±ä¯ß°0¶_¹†³C¡Uš¤´$¶:¸¶ð³T°q¨ê¦»®»°(¢ ”—ŽX˜=¡ÿ-²Eµ ¹L¼º[§tŒŽ–þ —þ Ÿü 3Ž öt©r~zÿ ¨‚ÿL–'†˜]|L 9O ìS`tR™œ§¢þ£ò©¶ƒº4Ÿ«;r?Šf£“¦ˆ¢›³¢é§ì©ݧ¡ªV®I³L·u·˺ZµÁ³³¢yjSS¬Z ºz†Ôzw‹:š™Ÿ“‹#©€#U!E†#Ä"x~er[h‚`r]q[\pY?f¯hÙ‰ÿ ­ þ›þ ¾–ÿEþpWo€z}|I}Ž*¡…˜Ð’ Oÿ zŒþ w…ÿi>’£³£¨¢£@¢Ì[+~ lr 5m uq÷ryψ¢A®ë±Ê®D¡k—(ž£©²­­yª¤¦/¢ا^¢‘ž‰¼„ˆ}°zõ|Z¤~«€ ®¼£תó©©¡¬³ºr»ÿ·þ¬®К?ˆ!dnøhFtÍ…,’.›ÿ\¡ÿo¡¹¡£`¦ª«ð²ĵ)²4«Ÿ™ÿ„éK…U‚BuÅt¡Š}¤n®a®-¯]­e­ó´M¸¶űŒ¡õ‹+‹™`¦b²¸´p©Ä™z^œ¦¨hªJªe¨«¨d§ Ã¥ Ö¥¤«˜±y±˰«ù¥—щ.£½¤¿ª£«"¢/¡ $Ÿ Ô™O—þ<žÿ«Œ±ܱ±¨­ˆ§¨!ý®ܱ8§ð›J”˜ðž¢vš@”O™œ¢©ê¤—Øšš£°ÿ}ÂD±%¨L­à±ù±’®´­8«¬}ªŒª¿¬‰³mµF³–²ë³O´U°â²²ã¶ ¸‘¶ž±î¡CˆÅ§‘·þ¸Ù¸ˆ·³¯­•£¸¤°ã´V  »•'…cŠNšÿ°§²~¹)¼Õ¹ ©¶œfþ Š£ü žü ½ÿ ô„I‡I — ¸’înQ rN Ò[ ']ÿè€ûX˜ ¨£I¥ôªRµ=·®œ ´vì0Šÿw£Z¥°¡ÍŸ?¤åªH« §§\¬¼´|·d¸Ô¹й>¹ý]¤ëŒÿÎj9] !mʆz‰K€ó¬¢:žâŠ#€|"k­…!z„!u}"oT`ÆYÞW VÛc1Z±^ „mVˆÿ¡ýb¡þ •ÿñ“ÿ…}Žn!«uìréinµwž•\• ù Šÿ ã‘þ ýŠÿ ;€Û΢{¢^ŸU¢\¤ã¢›ÿ ‰ ßt ¤k dkÜmu`‰ï¢ 9´ø·³þ¤ÿ¼›—¢tªø­Ö¬ º©”¥¹¢Ù¨£K’kŒ­‹Ƈòƒë€|‚ÿüƒsƒV½¢óª̨Q¨(ª޲k¹û¸L±ð¢Z‰Ò}Àyæj°iw­„¼‹ñ“ÿrŸÿž§¤4É›ŒŸ¨¼³µ"®Ô¦‹–j„€?ƒ ”zåmw¿“ݨq¯­O¬ʨÒ§À²n¹‡·(­¢š¬~¦oû žXµ‰¹F°g¡ÕšÖ¢‹¨ÿ«’­Œ«‹ª&§ ¦™©e±ð¸'·¯µЯv£Ƙ*”ÄžA õ¡'«J°¯w· ¨)”b’ÿ&—ÿø©4³²Û²¯®ø¨²¨"O«p¯4ªÒ¡ç›ÿ2š›”iQžʨº£C™œÿç¤ö³òÄ{¹'¯Õ°¤³ú²®Á®„­<¬ö©‰©¾±à·r¶C³$±³²h²Ù³´†µ®¸œ¹¸<³¥‰m”c©#¹S¹è¹õ¸nµ ¬ÊžÏ /ª’«†™ºÖ‚ú†ÿ¸™ÿ¥¨¯<·TºO·®V¨ ªÿ G¦ý ¹Ÿý <˜ÿ §—ÿÑÿ “ÿ³¤ 7‘æhW ~^ðzË€ýþ é7¨+¥ΧÅ«_¬­}Ÿˆ?y‘‹¥œ¥¶ éœž¦¹§ã¤¢–«ã²€¸>¹¯ºS¶¹¶„© ™þc„þ |ý2“ÿ }•#•FŽ0” ›ü–"Pˆ$õz"%||ƒ˜wn!Ódo\—W Çhý ùküw9hÙa2c Ôyý‰üM†ý¸tmÏjz8Œþ‘ý¡…*šòŒºr#0s }wÒx u5xZ_ ƒ‹ Ïÿ ˜‘ÿ ~‰ Aˆ ,” -› õ˜ :— õž¢ŠŸ ûš(ƒöj Èg ³l?gRf}f˜T¤Ö Ö›ÿyšÑÝ¥gª^ª!K¨ P¦¢¥m  ›—‹ $„ ý ʘ¦›õ”ïm’ª @¦x§+§&¡œ¡¡ê­¶ª¶v©¢ŽkÏhÄng Vm¡|Ùÿ{—ÿª›˜¥ã§¦£¡šã•œ™ ¤¥ γC¶’­ÿ,ÿÞ‡4rcxõƒ „  '‹£U³N´Ú°ø­¥ɤ"¬¿·ÿE²ÿ (™è‡.Ëv|­Ÿµ¸T¸ù¯Ñ¥À¡S¥•ª‹®î²²»°f«ú©!¥ƪ(µ#´ð²ªC›c„v…y—‹¨-«“¦¢ú§Ū<𠹇 ŸˆŠŽ¡âµ¸¨´ ‰±ö¯À®Rª‹«U°G³b´é­‘"”oˆ¤}x–“­®ªͧ{ªºª3¬L³½··½ÈƵ¼Ò³÷®ªë¨ ¥[ª·»ï¹W°ò¯¸©!ø§"D³B¼R¼»ý»V»3¶{³¨£ ­h¹;·E¸´»œº¬V›ÆŽ,’ì™ÿñ–þ¤’þ&Šþ—ý €¥ÿ lª©«¶´e´¸¶s±À©È¥ í¡ ©˜FƒÓoi}oálo… ùžþ ®ÿ s¤ÿ†¬ÿ +­¤l¥åžÿ-“ÕŒ †Þžø¬_”IŒ5›#¢ÂÈ• “瘛CžOž½¨T´·$ºz¸š¹‚´)²ÔžÿÓ}Ôˆg–"Ÿz¡ÈŸ`—”’(k¡/¥½˜ÿ«€†–þ šþÚ„þŒn¯fl@{ý“üæþx2j¾rÿ|ÿžƒû `ÿ ‹ÿ¤ •)|">z#‹| zd|{ßt9ƒ ¯†É † §‹ é— i `š l— Ÿ£a£x›½† ïwàx¤zvylÊ{¸6‘¤dñ—ï¡M§¨‰¨Q§¦™¥ ,˜åz… ”€ ³‡ -–0œ<”Ì/’M¡š©Ò«©Œ¢›œ ¨°j®ë§bÚwür ld he Xtð$¥Ÿö¦!¨u¥ˆŸF¡¥ `®ý´µÿ­þ$œÿ‚Jmåvƒÿ Ýÿ !~I‰,Ÿ̲ö…±÷­Š©Y¤ɨòÿž«ÿ ¨~уá|á€] ÿ¿¸˸Q°e¦µ  £]©įH³à´ѳ)­Ú§U ¢Í­­µª ^£˜“­~}Õd¡-ª ¤ ž~¥?§”–çÀ‚ ‡†˜ɬˆ¸±·!Õ±аð³G©×§ø¬³„¶é¯Û÷Ž’¤ŠVyÙÇ­x®¾¨b¨©q¬Ê´¸Ú¶h¸ÆÀÆS¸:¯«ª-¦j©xµv¹L·ص.¬ã#;›&j¦Ñ»6¿#¼mºÒ¸Ê´¯°è¦¤á­R¹Y·¸ú鸔¯š¢1–eœA£Ù¢J£ÿÿ ¾‘=¢ž¬ r«÷¯в‘¸ÿV¸©³u¯›¨Ó¤´™Ï€üa #_ûgšq «ŒÍ¥ÿ ѱþ m©ÿ ¦­«C’‘"Ý$xše Wx<˜ŒªFŒ´‚œj£ÞŸì– ”ÿ•„–T™«žÿú©áµ¯·“¹¶¶µ ´¬ îœr$qî‡"– ¡§¦5 “%Æ  ¥œ,‡ “þÿ›ÿ „úeY`dp)€þ×xÿ¬mjgt}ÿ‘ýÏ–þ˜þ¾¥ÿ ™»|"oy$b| z mzþw mC|ðy:~ ýƒ ¬† Š ²˜  ½› §˜¦¤`¥U¡“ ˆŒþ‘$“û †b‹³•VŽƒƒ؈–0£©2§Þ¦)¦¦x¤С£›í‘È… ½ … 6‚”¼‘Œ‚‘µŸÕ«ϵ:²8©x£*ò£<©ª §G›>߉êw;a Ð\ Üi ¡Œ²¢I¤ó¨ ©`¦o¥!¦Ý­ ¶´dµpµÿ«þ}™³lÄr¯wq VpzE” ­Xµ”²J®[«}¥é¤5¦ð ÿ )‰ |ú€y|c„¡£¸½·=²ЩdžŠ¢Jª²®в‡³˜³a¯—¨-žãŸ¬¨ }© ¦ rŸ _‘°ÿ|¡ƒ\”ô¢é¤M¡,¥Œ¡ ž ø~ ‚$㣻²ú·O²S¯«ñœÈëªÿµv¶Ù±7¢'•F—2‘I}9ƒƒ w¬–¬#ª ¶«+¬¯®Ü´#´ç±ðµ¾ ½â·`­øªH¨7©¦°(³G°P±´£ ’  ’á«#¼H½Û½šº'³ײÿ«=¦«ƒ·±¸˺@ºµ¸´Ü©.¡ÿ/§Pªç©2®3« — /¢~° µ¯j®¥±Ü·{³/¯J²g«C§Þ„! Z FY¶f˜vü²‘þ'¨ †±‰­¤°†£ÿïvm#¹g "Fdpz|’–¡ $¸‰‰¡Ƨ€§x›“”¿‘ì¹²œÿ©˜·ù¸<·Œµé´2³ƒ® oš rq’išœ¬1©ã¢¸•#¯™#3Ÿ3› ¨ŒÿÄ‘ÿ Þ<\,Q™\JgjÓ_Á_0aßv¹ƒ-•ýà£ý} þ ¦ÿ ”žO!Æu %Ly :|ãz@oÒ\}|ôv | |‚ ʇ ÞŽ K– ïš %–|– Å£Á¥C¦o¡ ðœÿý£¨š¤œÖ¥¶]© 6Ž ‡´”—¢‘ª¨o¤¤ɦ6¥¡©k•~‰ ~† à‡ʉCÜ“ê‘â’œήÀ»Ϲ¶Ù³µ¨f¢ú¤"§c©’§Ä£ žÿ T qK] Œk ~n¤C¨ˆ©Ȫ?¦Ù§«£³Æ·ÞµܳÚ¨n–Œ€Ymhmçn›h ?g—lºÓ›¢¬O°”«&§î¤5¡'œ+b‚ôyÑv#vgˆ&§N¹|· 6³ÿ«\ U¡ 骂­v¯y±©³±j©÷Ÿ\ © 9¨ ¤ ÿŸ ƒ‘ ý‚–|ÓyqŠx¡ª¥æ¢T¡¿— Þ -‹¦‹î‹ tŽ%΢Ÿ¬¯±¯ÿͦ왆+ŒU¨¶޶ý±8¤vœê©™ƒ/zvþ£ï­ „¯›­|«%ª½°xµ|³)®±+»'º¿®ˆª¾¬Û´ °S®§æœì‘k€uý윣µµ¼ê¾ºtµ¶G°ìª²°ܶºܼ›¹»¸³·«æ¨ªÀ­k¯“´p°ãœG Ù£ U´’°0¬…®Š´J° I«³°n±®'¡ƒŠ#äZûS¤c £q•—þ [­¢²Ô±±Gÿ õhPÝR§VWqV€r‘Z¢œœ#8šï§ް¯T¦|›ÿf“v‘Šù +ª¬¸0·‹¶­´S³r²9«f› €wGz « [­ ׬¤Ô!Œœ" ‚ F– ÖŒþ 3ÿ …‡ü\éV³Yö_ƒg‹g9`/aNpÌ‚ •þg©ý5¦ÿ N¤ÿÝ¢ÿrŠƒu&Ðx!ù}txgh´U ƒ xz]~ÿ|…ÿ 7ˆ Œ Õ• æ˜ Ë’ ‰“3›ó¡ž¢‘¤ 0§ OªÀ³X¶T°v¤Ì®wÅ»™ÙŠ“:¡´©ç¨Ÿ¤t¥L¦9¤œ¢›À‘øˆ´ˆ ý‰$ˆ4Ž”“·‘ü›û­U¶³‹º(¿̵j¨,£ƒ§Æ®÷¯7«¨ ËŸÿ ‹„ ¢gésü’§Ÿ¬½«IªÞ¨O¨š¯ ¸¹E³¯V£g’¨ƒ roq²o~kmî}ª‰›˜À¤³£p£¡ž•”ô„gp{ÄoÑoχ/¦²¸˜·б¹ªÊ£&¢ªª­1®­±[±€²2®¥Q¥„¬ f« ŧ C¡ p‘"z¿u Œv/Œ£¦J ­5”Þ‘©™OžÈš~š ¥Q¥ ¤¢¥Á™ˆé6†¦¦ϵ^¶D²¿§Ž¡âŸ÷šCŠ/|…d ¯°¡­a© £&¦Ù±î³űc­0±²Ñ®w­L±Ó¸)³­¤{’¸ÅyÎsîn£‚¤¬·ž ¼n¸º7µe³u³é¶¹f½ º[¶ì´Œ­¼©Ы¬´©µ¬™Ü’ $§ ·Ú²|«'­-±²°®¯´5ºü¸¢¢ÒŽ!½_ïP}_v…Ÿþ ò² 6³ z±«ñ– å^ ƒTÐY«UÉa.~x’œ¨=¬ ýª± ³Ø·¶±k¥Û› ”Ûÿ ô¢ ™¬¢¸1¶%´³w³l±±±þÛŸˆˆMŒëªZ¯ ƒ® _ª À¨>¢ï¤¤+¡™ „’þ P•ü ì—ý {oW`j]€]\fÁo•h fùj y‹«žý'°þ …­ݦ¦—m€vx|Yußf‘Rÿ‰ Á‚ Ä‚þ à†ÿ Oˆ XŠ Ò‘ ò— ?’ ?޳—úŸŒžX› Ôœ æ§´º¸q³B«X°£»¥°à˜l‰´’¤ªà¦Á¤b§u¦Ƥ$¡Œ˜1‰‹Õ…?ˆm‰ÄŒA˜_š¨¹ª?£R¦%´i¸ð°®ª«ͳú´%¬ ¦§ Ý  ‡Š `pèvv’Uª!¯g«½ªZªO¬ø´@¸ò·¥³+¯™¢c—†5z2vA|{tïzdˆ\…†j‘ç›-Ÿ;Ÿ€h“{€Â~Á€Àqñl€ÙŸøµ”·$¯G©&¤¥™ª ­ ¯ (®ö® ¯¢­{©^«¯¯ˆ¯¶¬ ½£ ò òqAj ÖxÄ“ÿ'¥Ö¥Úž–›”•x”ÿ¾žÿ–ª;ª¿§$¡ÔšÚ¡™Á‘ƒ ¶z÷‹£ð¬I¯±¾¨–¡!œ¡–}‰Þ{ß„?Ÿg° ±©®"¨ÚŸá$°µ7´°±®Œ®!š°k²b²¼³œ³ë±8ªXšTôƒ^wÙj Lq*‘(¯‹¼c»¹ ¸ùµ‘µ(¶(¶¢¹»*¸зR´Q¬­Ь*¯Ó¶t¶ g¤F’Ñ” „«ÿ ¼¸}´t¬<ª#°ì³ê´‘¸5¼º ¨d”ãd ÅSîe Ÿ€¾¢ý m± Ú­ ›¬ Æ¡ ~Œ¸`?belÖfVi¬€ð›ì«~²!g´£²ù³…µ0µŠ­£§J¢ÿ˜þ ±¥ «¬¶2¼·MµE³ ²$³ÿ·¥’’!«©6¯ *­ ¡ª©ø§§§ù¦ÿ£Pž B˜ý ªšüžžþ †ƒp!fù`¯cOi}fWl°vT™ ¦©ü Ÿ³ýq±/ªÿ¤«ÿ Ÿþ ‘Žÿýwêy\l'bI[­ŠƉþˆý?ˆÿ ߊÿ 7Œ  t“  […Ý<2À˜ù•­­œ³ð³Ÿ±ç·#¼«é’)욢í§hŸ§ŸO¥í§‘¤j •‚„è}j‚X…e…¬„ƒ…®‡¸ ˜K¢›q‘Ö’­ >³¡¹ÕµѱѶv¶Q¬ ¥ £h‡‚mËuO“û«á²S¬™©êj¯J·S¹θÁ¶ܱ™£š”%‰—Cº‡ƒÿ6}ÿ…ŸˆR‚„þ’ΜÕ¢Ÿ’ä~óxt€6x¢n[{Ñ™C°í´î­!¦ ¡ Æ¥ ƪ!¬!¿¬!$«(ª{­Ю'¬±ä³Ò³?²ò©=” v‰g Ñvw’/£º¥Ä™\’] ¬šÿ î°¼l®ý˜ &´$ÌÁ‹ —‰ fz ‘ŽšR™T˜S ÿH „šg—H•Š ‚~½† :£®R±·®ªÈ£ö¢x¯ѵ_´)®ú® ¯!~²Ú·λ´u´‡¹·©!žL‘÷‚/k —m ÊŽ í¬-¹Aºݹø¸µþµc´½µW·w¹j¹£¶t²¬}®ʯdz\µ³}Ÿ³Œó˜ ଠƷ´½«‡¦Ы•°Þ´¤¶@·'¶;©4—ñl 1V ýh ¬„ ï¥ý Ÿ¯þ ÿ© 4¥þz™Á}œgPp©€ –xxbŽ’¤ø¬M®³b´f³%²4´g´&°3¯&¥ ê¦ v¤ m³Q¿¿.¸”²±¡²Чé˜òŽ%”¤d¯0­ ™««ϪÛª£¨ö¦«¤ Gžþ KšþΣÿ+’ÿ è~möi k·kmÃkÀyõ¡ *³ý ºý5²`²ÿP­þ0 CÿŸr×qa^`,ŒÿëŒýðŒýñþ7Žÿ ÿ Y’ÿm’˜‡ ×~Š™šÍ P›ú•#•ì¡ …ªU°³í·û½5¯™–}‚£„Å”°™*•ë˜ç¢¦z¤ô ‡—ò‰€ÕƒˆƒÔ€y~&↥Œð– ™’î“B ¡®·å¸j·@½¡ºj­Ц™j}fc  o+‘ª³t­ϪFªÿ¯U·¹”¹ʺkµˆ§÷šŒ€®…x#…¹|Ä~]†­‘¨Ë“Nœ£¢û—L‚#t}m~ r†{¬•å®à¸-®¥¡u™ߢ!ò« «ý«·©v¨“¬Y®Æ®ü²ã²Ó²Öµs®P›ÿþ‚0l 8v ˜‘£™¤ìø—R¬‰ A” Š©K¶îª:‚%;‚ Ž{ÁräzÉŽö¢=y‰Tz¯„ è‘ 2“Ÿ•Z’ö‹ 2Œj˜«|®A«ЩÑ£q¢ µ±Iµá±ã­d®Y°ý³ûʽᵇ´Úºè»Õ¶©¨Œœc]v¢xd”W° ȹ(ººP¹&µä´±ë±fµp¸ɹȳt¬xª4­.¬ÿ²²C¬mŸD] }® µµ/­—©…«f­´±î®X«%¬ò¥8•{m “Z ÿm³ÿ¯«ý g®þ¦ÿ ¡ þ enkxV„ÇzkxfŽÿ¶¥]« ±ï´ñ²K²$²M³ò² °r­mŸ Œ J® ôÉ̸C¯¼¯ΰOª ²”!¬¤ ̰­®  «„¬ªž©±§&§…¨ÛŸþ ÷”£ÿ!˜ü7{þÿmêhÂk~kenìo 6¤ ]²ÿ 9¸ÿŸµ·¬ œªýÃÿÍ–ü1rþµj`%[Â](’‘þ Wý¥þÿ Íÿ »’ "’+‚«y‡ˆBšÿ£R Ç—R¤¸­ž±²³ ¶N¯¡(;…i‡ Œó’–!¥¥ ¨¢ÀI“êŠP‡J…€×{4}^†tŽ–š¥›O–ªœjª¬=¬D­§¶mÚÀK±m¤ý˜ ú€ ºi±m#‡ë¥b°]­Ä««ç¯·µ³¸¸l¹(¸(¬•›ÑŽƒ ˆ ’ Ú„ávXoê?˜Vžù—Ë”Е|™Ó ›¬…ötç}à‚wù}Ví©þ¹ö± ¥˜_¥0¯h¬¬A©§y©G¬K°=´û³*±´£²¦¤þ‹o ¨yÕ•*§À§ÀŸP•)Š"† Ž G›ñ¡û‚‰H€ƒ‚ÿ€hˆU¢-°ªÉuVz ‰‰ÿ ¿” “› ˜pŽ ä… ‘ÿ“žç©j«ª©±¥m¤“±f¶b°«­ Ÿ¯;²вû²ï®¦¯ô±~· º[¹­¦£-‰­Œ ?” æ² »`¹Z¸5¶Z²è°ª¯³¯1·w¹Sµ!®,©d§#z§%n§"-«¨ªÕª2¡¬•¢ ϰ O¶@µ®í«h­YªÈ©¦¨B¦¨¤”Ìs Úf ‚Ôžþ[±þ œ®GŸÿâ•×€fÿjxu| s~ný|Fˆ À”†¤U²»µ¹´"°´!ù³k³‚´¸°_°(œRš š­ xÎ 1ÓšºGªÒ¯˳ܱ‘£˜v¤!Õ®³°µ¬Ó«†ª¨-§ß©‹© ¿šþ 𜯣þµ™ý²{ÿ gî]¦a©gòmÏt|ƒÜŸ<¤ ˆ¬å²ÿ<¤ÿ T¤ÿ ¤ŸþUšü_wÿ_iUfWRÿŽÿ $˜þ ª“þ ÿ Sÿ £ Ñ 8–…·{pˆÿ騈§ b•G™§c®_°|±±S°²¬¤Ñ™u‹€ŠÖŽC˜¨¤¡¨!c§(¢™Ë‘N‹î‡Ä€®wçz’ˆß‘G—È£¨d¤š¥‘¬H®FªʨM­š¹ï½s¶¬?§íœÛ‹A~õ„š¦§#ªÝ« ¬4°µÉ·L·Z¸3·ªÍ—ÉŽ+ŒØ’ ј ŽX{¦p“„¢œ¢h›û•±‘û“L•Ù“†å|B€›„(~ÕƒH¥?¶A³è§‘¢ü®¨µÒ²|­p¨Ϧ³§x¬ ±ý¶Š´}°,°‘²4©ÿ”›r ñz ߘ'©ZªK¢Ì–4 Š Š ›‹^Œ†’Óˆj‚‹“áš{¡q° ¶!±ÕŸ ‡è‰~˜ý£ þé¦.£@š[  úŸu©$ª±©©p©C©?²œµ(²ª° в´¸±F«"̧ ª¬¯u²Ô²å©Ťºž«“ Žó˜þ˜³ »ݺW¸^µϯZ¬«s°&ºEº®³·®?ª $§$ø¦!À§º¦¥±§­žÓ“ ¤~²­¹K¸г¬„­ШN¨Ĩi§Ú¥Ë£œ•å{T™‘ C«þ ä²ÿ ·°ÿ¡ÿ X‡ˆd …h;jókmÏnÕr­láz ˆÁ¤ ²'³r´%€´!ý³x´R¶¨°°©¬•[½ª ˆÂ¢Çÿ?²÷ª¹¯P²´ ¨MŸj¦²« ° ‘¬«0ª§ë§Àª`¡ ““þ ­–ÿ Jžþ—’’wÿ íc=Z]Z”c Lo%zfŸ³Ä   „¢ ¬ý ¢ý ø¡ÿ ÖŸþ ™i~]sPe¿W(YL§ü¡ÿ ²—ÿ 2ÿ ¶ ‘‘„’ÿ r“Ê’ý‹¢”¥¯P®ã­F¦Z¦`­x¯®¯Ʊ ³E¶q¶Þ¸5°-¢¯•EŽÈ‘…™y£ð©b¨% Ÿ˜d“R3‹€avúgð•_˜l¤–¬#©¦­«T°ݯ}ª…ªc±"º<»G·ؼ|ºÈ¥y3ƒŠ!_™Ú¦Dªù¬ ³ª·µ¯¶a¶>´%«7™”û£¤§® ;Œ}vМÒ Ÿ"K¼š5‡~„M‚¾\߇dz¢üµ˜¸²¢±˶Ϲ«·¯õ©§4¨ó­‡´î¹}¶8®®j²T¯–‰z z|g˜=©Ϊ1¢æ™†– 5“ |Œ 6}Zz`ŽýTˆ“”V¡¤®Õ¯ T¸¹#³À¨±“²Ö¥¯ÿv³°{©šœþ«—Р<©̪—«sª¢¬%¯Ѷ¶n¶p¶ ¶—³©®ì©!Í¢ p¡Ò¤Uª¬ˆ«y§Û Ê› –Œà›ÿ“´K¼5ºo¸ûµ‡°wªõ©W­·®¹4¶³É®®e®Ь³ž…›}£{–|¦º±ë¹.¸gµ|®±¹¯â³9²=®©©û¤4šM„Λ¯² «µ;°† ƒƒ'_ ÜeâjÈlžcl?»p h':š׬IJ{µ"¡´³‹µ ¶_µ’§Ï$Œ¦l³Qµůs­ ô®²š³° §Û¦+ª H¯ v«ͪo¨Ũl§[§(¢”ÿY’ ›ÿ 𖇀ÑeZYv\ ßb5o žx >Æóàþû¢þ¢™ÿ,¥ý ¡ý ¿¡þ ­¡ýƒšý¨‰ÿ£|"hö\b‚«§.šÿ ¥ÿ P ’ƒ–ÿМ[¡¾ ¦ï°Á¶$¶´ä±°°²±ƒ±ú³K¶Ù¹ô»»b·ÿ«Oœ‡“a“^š/£¨œ¦U”µŽ÷ÞŽ©…<m‡®“—`£†«`ª¡© _¬ë³†³­®¦¬Û´c¼—»™¹¼¹¾¯NšÔˆ"Y€"ö‘"‘¦±Í·»aº@³³—¶œ·k°‚£:žœ¦%¬b±â®‹›»ŒU“£›&›ÅX *£ž¢‘Ɔ „’†|¨z=‡p”´—¦£´J» ·_µî¹uº¹¶j®b¨÷¨/© ¬Þ¶"ºÚ¶ñ­­&³"¯ݘå.}M˜ŽªÅ«¤úŸÝ¡F› ˜Œ ×zÜrÜpœš—K›R«'´Œµeº·ç±¥¥‘%‘ب[³‰µ¶N² «¥×£©ª*«w«Ø­…´I¹}¹¢º”¹ µ¶®Þ«3¦íží˜z¡x¨Æ©ö¨³¥J›^—"™Z•‡¡ ·d»Lºm·_´y® ª¡©«Š´4¸š¹¹¸˶a¸pÅX¼Á¥Řü¥ ¥ºû„²9©°Æ´µü´¸°p³Ÿ··¼·¨°»¯~¦«Ÿ"‹# †™Ÿ ·µ L¶ý° ‡Ÿÿ =}ú[ Iasn²s“kÄhÓ~ÆuÛk4w!ˆšmª^²³²²Þ´жŸ¸~¹¼­)𔦍²CµÒ³ª²È´÷µ(´ͳŬI§ ǧ Æ­´¬»ªN§ ö¦ “¨MªS§e¢!𠏢þ —¢ý ©ƒ5hŸa&gshh àu <šôþ þ•ÿáþ Jþè¨ý’¨™ÿ $ˆs|#«f`\÷f‹vips-7.38.5/benchmark/benchmarkn.sh0000755000175000017500000000302412303140253014111 00000000000000#!/bin/bash uname -a gcc --version vips --version # how large an image do you want to process? # sample2.v is 290x442 pixels ... replicate this many times horizontally and # vertically to get a highres image for the benchmark tile=13 # how complex an operation do you want to run? # this sets the number of copies of the benchmark we chain together: # higher values run more slowly and are more likely to be CPU-bound chain=1 echo building test image ... echo "tile=$tile" vips im_replicate sample2.v temp.v $tile $tile if [ $? != 0 ]; then echo "build of test image failed -- out of disc space?" exit 1 fi echo -n "test image is" `header -f width temp.v` echo " by" `header -f height temp.v` "pixels" max_cpus=`vips im_concurrency_get` echo "max cpus = $max_cpus" echo "starting benchmark ..." echo /usr/bin/time -f %e vips \ --vips-concurrency=xx \ im_benchmarkn temp.v temp2.v $chain echo reported real-time is best of three runs echo cpus real-time for((cpus = 1; cpus <= max_cpus; cpus++)); do t1=`/usr/bin/time -f %e vips \ --vips-concurrency=$cpus \ im_benchmarkn temp.v temp2.v $chain 2>&1` if [ $? != 0 ]; then echo "benchmark failed -- install problem?" exit 1 fi t2=`/usr/bin/time -f %e vips \ --vips-concurrency=$cpus \ im_benchmarkn temp.v temp2.v $chain 2>&1` t3=`/usr/bin/time -f %e vips \ --vips-concurrency=$cpus \ im_benchmarkn temp.v temp2.v $chain 2>&1` # echo $t1 $t2 $t3 if [[ $t2 < $t1 ]]; then t1=$t2 fi if [[ $t3 < $t1 ]]; then t1=$t3 fi echo $cpus $t1 done vips-7.38.5/benchmark/README0000644000175000017500000000101212303140253012315 00000000000000VIPS SMP benchmark ------------------ This is adapted from the system used to generate images for POD: http://cima.ng-london.org.uk/~john/POD Images from a 10k by 10k studio digital camera are colour processed, resized, cropped and sharpened. This thing was originally processing images off a remote server over a 100mbit network. No attempt was made to make it quick (there was no point): you could make it a lot faster very easily. See http://www.vips.ecs.soton.ac.uk/index.php?title=Benchmarks for results. vips-7.38.5/configure0000755000175000017500000310757612303144053011445 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for vips 7.38.5. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: vipsip@jiscmail.ac.uk about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='vips' PACKAGE_TARNAME='vips' PACKAGE_VERSION='7.38.5' PACKAGE_STRING='vips 7.38.5' PACKAGE_BUGREPORT='vipsip@jiscmail.ac.uk' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS PACKAGES_USED VIPS_CXX_LIBS VIPS_LIBS VIPS_INCLUDES VIPS_CFLAGS VIPS_LIBDIR top_srcdir HAVE_PYTHON_FALSE HAVE_PYTHON_TRUE PYTHON_INCLUDES pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON EXIF_LIBS EXIF_CFLAGS JPEG_INCLUDES JPEG_LIBS PNG_INCLUDES PNG_LIBS PNG_CFLAGS TIFF_INCLUDES TIFF_LIBS TIFF_CFLAGS ZIP_INCLUDES ZIP_LIBS X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF PANGOFT2_LIBS PANGOFT2_CFLAGS LIBWEBP_LIBS LIBWEBP_CFLAGS CFITSIO_LIBS CFITSIO_CFLAGS MATIO_LIBS MATIO_CFLAGS OPENSLIDE_LIBS OPENSLIDE_CFLAGS OPENEXR_LIBS OPENEXR_CFLAGS LCMS_LIBS LCMS_CFLAGS ORC_LIBS ORC_CFLAGS MAGICK_LIBS MAGICK_CFLAGS IMAGE_MAGICK_LIBS IMAGE_MAGICK_CFLAGS MAGICK_WAND_LIBS MAGICK_WAND_CFLAGS FFTW_LIBS FFTW_CFLAGS GTK_DOC_USE_REBASE_FALSE GTK_DOC_USE_REBASE_TRUE GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_BUILD_PDF_FALSE GTK_DOC_BUILD_PDF_TRUE GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC_DEPS_LIBS GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK TYPE_INIT_LIBS TYPE_INIT_CFLAGS GTHREAD_LIBS GTHREAD_CFLAGS THREADS_LIBS THREADS_CFLAGS MONOTONIC_LIBS MONOTONIC_CFLAGS REQUIRED_LIBS REQUIRED_CFLAGS LIBOBJS CXXCPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL ac_ct_AR NM ac_ct_DUMPBIN DUMPBIN FGREP SED LIBTOOL LD AR DLLWRAP OBJDUMP DLLTOOL AS MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES DATADIRNAME CATOBJEXT CATALOGS XGETTEXT GMSGFMT MSGFMT_OPTS MSGFMT USE_NLS EGREP GREP CPP GETTEXT_PACKAGE VIPS_EXEEXT ENABLE_CXX_FALSE ENABLE_CXX_TRUE LN_S RANLIB am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC OS_WIN32_FALSE OS_WIN32_TRUE host_os host_vendor host_cpu host build_os build_vendor build_cpu build vips_introspection_sources HAVE_INTROSPECTION_FALSE HAVE_INTROSPECTION_TRUE INTROSPECTION_MAKEFILE INTROSPECTION_LIBS INTROSPECTION_CFLAGS INTROSPECTION_TYPELIBDIR INTROSPECTION_GIRDIR INTROSPECTION_GENERATE INTROSPECTION_COMPILER INTROSPECTION_SCANNER PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG LIBRARY_AGE LIBRARY_REVISION LIBRARY_CURRENT VIPS_MICRO_VERSION VIPS_MINOR_VERSION VIPS_MAJOR_VERSION VIPS_VERSION_STRING VIPS_VERSION AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_introspection enable_debug enable_largefile enable_dependency_tracking with_dmalloc enable_cxx enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock with_html_dir enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf with_fftw with_magick with_magickpackage with_orc with_lcms with_OpenEXR with_openslide with_matio with_cfitsio with_libwebp with_pangoft2 with_x with_zip with_zip_includes with_zip_libraries with_tiff with_tiff_includes with_tiff_libraries with_png with_png_includes with_png_libraries with_jpeg with_jpeg_includes with_jpeg_libraries with_libexif with_python ' ac_precious_vars='build_alias host_alias target_alias PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP CXXCPP REQUIRED_CFLAGS REQUIRED_LIBS MONOTONIC_CFLAGS MONOTONIC_LIBS THREADS_CFLAGS THREADS_LIBS GTHREAD_CFLAGS GTHREAD_LIBS TYPE_INIT_CFLAGS TYPE_INIT_LIBS GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS FFTW_CFLAGS FFTW_LIBS MAGICK_WAND_CFLAGS MAGICK_WAND_LIBS IMAGE_MAGICK_CFLAGS IMAGE_MAGICK_LIBS MAGICK_CFLAGS MAGICK_LIBS ORC_CFLAGS ORC_LIBS LCMS_CFLAGS LCMS_LIBS OPENEXR_CFLAGS OPENEXR_LIBS OPENSLIDE_CFLAGS OPENSLIDE_LIBS MATIO_CFLAGS MATIO_LIBS CFITSIO_CFLAGS CFITSIO_LIBS LIBWEBP_CFLAGS LIBWEBP_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS XMKMF TIFF_CFLAGS TIFF_LIBS PNG_CFLAGS PNG_LIBS EXIF_CFLAGS EXIF_LIBS PYTHON' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures vips 7.38.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/vips] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of vips 7.38.5:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-introspection=[no/auto/yes] Enable introspection for this build --enable-debug=[no/minimum/yes] turn on debugging [default=no] --disable-largefile omit support for large files --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-cxx build C++ components (default: test) --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-dmalloc use dmalloc, as in http://www.dmalloc.com --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-html-dir=PATH path to installed docs --without-fftw build without fftw (default: test) --without-magick build without libMagic (default: test) --with-magickpackage magickpackage to use (default: MagickWand, ImageMagick; try GraphicsMagick to build against gm instead) --without-orc build without orc (default: test) --without-lcms build without lcms (default: test) --without-OpenEXR build without OpenEXR (default: test) --without-openslide build without OpenSlide (default: test) --without-matio build without matio (default: test) --without-cfitsio build without cfitsio (default: test) --without-libwebp build without libwebp (default: test) --without-pangoft2 build without pangoft2 (default: test) --with-x use the X Window System --without-zip build without libx (default: test) --with-zip-includes=DIR libz includes are in DIR --with-zip-libraries=DIR libz libraries are in DIR --without-tiff build without libtiff (default: test) --with-tiff-includes=DIR libtiff includes are in DIR --with-tiff-libraries=DIR libtiff libraries are in DIR --without-png build without libpng (default: test) --with-png-includes=DIR libpng includes are in DIR --with-png-libraries=DIR libpng libraries are in DIR --without-jpeg build without libjpeg (default: test) --with-jpeg-includes=DIR libjpeg includes are in DIR --with-jpeg-libraries=DIR libjpeg libraries are in DIR --without-libexif build without libexif (default: test) --without-python build without Python bindings (default: test) Some influential environment variables: PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor REQUIRED_CFLAGS C compiler flags for REQUIRED, overriding pkg-config REQUIRED_LIBS linker flags for REQUIRED, overriding pkg-config MONOTONIC_CFLAGS C compiler flags for MONOTONIC, overriding pkg-config MONOTONIC_LIBS linker flags for MONOTONIC, overriding pkg-config THREADS_CFLAGS C compiler flags for THREADS, overriding pkg-config THREADS_LIBS linker flags for THREADS, overriding pkg-config GTHREAD_CFLAGS C compiler flags for GTHREAD, overriding pkg-config GTHREAD_LIBS linker flags for GTHREAD, overriding pkg-config TYPE_INIT_CFLAGS C compiler flags for TYPE_INIT, overriding pkg-config TYPE_INIT_LIBS linker flags for TYPE_INIT, overriding pkg-config GTKDOC_DEPS_CFLAGS C compiler flags for GTKDOC_DEPS, overriding pkg-config GTKDOC_DEPS_LIBS linker flags for GTKDOC_DEPS, overriding pkg-config FFTW_CFLAGS C compiler flags for FFTW, overriding pkg-config FFTW_LIBS linker flags for FFTW, overriding pkg-config MAGICK_WAND_CFLAGS C compiler flags for MAGICK_WAND, overriding pkg-config MAGICK_WAND_LIBS linker flags for MAGICK_WAND, overriding pkg-config IMAGE_MAGICK_CFLAGS C compiler flags for IMAGE_MAGICK, overriding pkg-config IMAGE_MAGICK_LIBS linker flags for IMAGE_MAGICK, overriding pkg-config MAGICK_CFLAGS C compiler flags for MAGICK, overriding pkg-config MAGICK_LIBS linker flags for MAGICK, overriding pkg-config ORC_CFLAGS C compiler flags for ORC, overriding pkg-config ORC_LIBS linker flags for ORC, overriding pkg-config LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config LCMS_LIBS linker flags for LCMS, overriding pkg-config OPENEXR_CFLAGS C compiler flags for OPENEXR, overriding pkg-config OPENEXR_LIBS linker flags for OPENEXR, overriding pkg-config OPENSLIDE_CFLAGS C compiler flags for OPENSLIDE, overriding pkg-config OPENSLIDE_LIBS linker flags for OPENSLIDE, overriding pkg-config MATIO_CFLAGS C compiler flags for MATIO, overriding pkg-config MATIO_LIBS linker flags for MATIO, overriding pkg-config CFITSIO_CFLAGS C compiler flags for CFITSIO, overriding pkg-config CFITSIO_LIBS linker flags for CFITSIO, overriding pkg-config LIBWEBP_CFLAGS C compiler flags for LIBWEBP, overriding pkg-config LIBWEBP_LIBS linker flags for LIBWEBP, overriding pkg-config PANGOFT2_CFLAGS C compiler flags for PANGOFT2, overriding pkg-config PANGOFT2_LIBS linker flags for PANGOFT2, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System TIFF_CFLAGS C compiler flags for TIFF, overriding pkg-config TIFF_LIBS linker flags for TIFF, overriding pkg-config PNG_CFLAGS C compiler flags for PNG, overriding pkg-config PNG_LIBS linker flags for PNG, overriding pkg-config EXIF_CFLAGS C compiler flags for EXIF, overriding pkg-config EXIF_LIBS linker flags for EXIF, overriding pkg-config PYTHON the Python interpreter Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF vips configure 7.38.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------ ## ## Report this to vipsip@jiscmail.ac.uk ## ## ------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by vips $as_me 7.38.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # required for gobject-introspection # gobject-introspection recommends -Wno-portability # foreign stops complaints about a missing README (we use README.md instead) # and missing INSTALL (the standard Gnu INSTALL is not very useful) am__api_version='1.13' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='vips' VERSION='7.38.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' ac_config_headers="$ac_config_headers config.h" # user-visible library versioning VIPS_MAJOR_VERSION=7 VIPS_MINOR_VERSION=38 VIPS_MICRO_VERSION=5 VIPS_VERSION=7.38.5 VIPS_VERSION_STRING=$VIPS_VERSION-`date` # libtool library versioning ... not user-visible (except as part of the # library file name) and does not correspond to major/minor/micro above # rules: # sources changed: increment revision # binary interface changed: increment current, reset revision to 0 # binary interface changes backwards compatible?: increment age # binary interface changes not backwards compatible?: reset age to 0 LIBRARY_CURRENT=37 LIBRARY_REVISION=4 LIBRARY_AGE=0 # patched into include/vips/version.h # put into library name by libsrc/Makefile.am and libsrcCC/Makefile.am # init introspection support if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check whether --enable-introspection was given. if test "${enable_introspection+set}" = set; then : enableval=$enable_introspection; else enable_introspection=auto fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-introspection" >&5 $as_echo_n "checking for gobject-introspection... " >&6; } case $enable_introspection in #( no) : found_introspection="no (disabled, use --enable-introspection to enable)" ;; #( yes) : if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error $? "gobject-introspection-1.0 is not installed" "$LINENO" 5 fi if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 1.30.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 1.30.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then found_introspection=yes else as_fn_error $? "You need to have gobject-introspection >= 1.30.0 installed to build vips" "$LINENO" 5 fi ;; #( auto) : if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 1.30.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 1.30.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then found_introspection=yes else found_introspection=no fi enable_introspection=$found_introspection ;; #( *) : as_fn_error $? "invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5 $as_echo "$found_introspection" >&6; } INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi if test "x$found_introspection" = "xyes"; then HAVE_INTROSPECTION_TRUE= HAVE_INTROSPECTION_FALSE='#' else HAVE_INTROSPECTION_TRUE='#' HAVE_INTROSPECTION_FALSE= fi # gir needs a list of source files to scan for introspection # # build with a glob and a list of files to exclude from scanning # see also IGNORE_HFILES in doc/reference/Makefile.am introspection_sources=$(cd libvips ; find . -name "*.c") filter_list="deprecated " introspection_sources2= for name in $introspection_sources; do found=0 for filter in $filter_list; do # FIXME .. argh a bash-ism :( not sure of a nice, portable way to do # regexp matching if [[ $name == *${filter}* ]]; then found=1 fi done if [ $found -eq 0 ]; then introspection_sources2="$introspection_sources2 $name" fi done vips_introspection_sources="$introspection_sources2" # add headers that form the public vips8 API .. don't do a find and exclude, # we end up excluding almost everything argh headers="basic.h vips.h object.h image.h error.h foreign.h interpolate.h header.h operation.h enumtypes.h arithmetic.h conversion.h type.h" for name in $headers; do vips_introspection_sources="$vips_introspection_sources include/vips/$name" done # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac cat >>confdefs.h <<_ACEOF #define G_LOG_DOMAIN "VIPS" _ACEOF # disable debugging by default for production releases # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; else enable_debug=no fi if test "x$enable_debug" = "xyes"; then VIPS_DEBUG_FLAGS="-DDEBUG_FATAL -DDEBUG_LEAK" else VIPS_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS" if test "x$enable_debug" = "xno"; then VIPS_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native Win32" >&5 $as_echo_n "checking for native Win32... " >&6; } case "$host" in *-*-mingw*) vips_os_win32=yes ;; *) vips_os_win32=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vips_os_win32" >&5 $as_echo "$vips_os_win32" >&6; } if test x"$vips_os_win32" = "xyes"; then $as_echo "#define OS_WIN32 1" >>confdefs.h # makes gcc use win native alignment VIPS_CFLAGS="-mms-bitfields $VIPS_CFLAGS" fi # CImg needs flags changed on win32 if test x"$vips_os_win32" = "xyes"; then if true; then OS_WIN32_TRUE= OS_WIN32_FALSE='#' else OS_WIN32_TRUE='#' OS_WIN32_FALSE= fi else if false; then OS_WIN32_TRUE= OS_WIN32_FALSE='#' else OS_WIN32_TRUE='#' OS_WIN32_FALSE= fi fi # Cygwin/mingw need binary open to avoid CR/LF madness # ... should be a better way to test for this { $as_echo "$as_me:${as_lineno-$LINENO}: checking for binary open needed" >&5 $as_echo_n "checking for binary open needed... " >&6; } case "$host_os" in cygwin* | mingw*) vips_binary_open=yes ;; *) vips_binary_open=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vips_binary_open" >&5 $as_echo "$vips_binary_open" >&6; } if test x"$vips_binary_open" = "xyes"; then $as_echo "#define BINARY_OPEN 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X" >&5 $as_echo_n "checking for Mac OS X... " >&6; } case "$host" in *-*-darwin*) vips_os_darwin=yes ;; *) vips_os_darwin=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vips_os_darwin" >&5 $as_echo "$vips_os_darwin" >&6; } if test x"$vips_os_darwin" = x"yes"; then $as_echo "#define VIPS_OS_DARWIN 1" >>confdefs.h fi # set the default directory for ICC profiles if test x"$vips_os_darwin" = x"yes"; then profile_dir="/Library/ColorSync/Profiles" elif test x"$vips_os_win32" = x"yes"; then profile_dir="C:\\Windows\\System32\\spool\\drivers\\color" else profile_dir="/usr/share/color/icc" fi cat >>confdefs.h <<_ACEOF #define VIPS_ICC_DIR "$profile_dir" _ACEOF # we want largefile support, if possible DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi # Checks for programs. for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case $ac_cv_prog_cc_stdc in #( no) : ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in #( no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; #( '') : { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5 $as_echo_n "checking if malloc debugging is wanted... " >&6; } # Check whether --with-dmalloc was given. if test "${with_dmalloc+set}" = set; then : withval=$with_dmalloc; if test "$withval" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define WITH_DMALLOC 1" >>confdefs.h LIBS="$LIBS -ldmalloc" LDFLAGS="$LDFLAGS -g" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # vips_PROG_CXX_WORKS # Check whether the C++ compiler works. # option to build without C++ # handy for some embedded applications # also, including C++ source causes link problems on some # platforms, so have an option to disable it # Check whether --enable-cxx was given. if test "${enable_cxx+set}" = set; then : enableval=$enable_cxx; fi if test x"$enable_cxx" != x"no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } if ${vips_cv_prog_cxx_works+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : vips_cv_prog_cxx_works=yes else vips_cv_prog_cxx_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vips_cv_prog_cxx_works" >&5 $as_echo "$vips_cv_prog_cxx_works" >&6; } if test x"$vips_cv_prog_cxx_works" = x"yes"; then $as_echo "#define ENABLE_CXX 1" >>confdefs.h if true; then ENABLE_CXX_TRUE= ENABLE_CXX_FALSE='#' else ENABLE_CXX_TRUE='#' ENABLE_CXX_FALSE= fi # need -lstdc++ for (eg.) the C++ format loaders # this gets added to vips.pc to help mingw and friends link programs # using libvips VIPS_CXX_LIBS="-lstdc++" enable_cxx=yes fi fi if test x"$enable_cxx" != x"yes"; then if false; then ENABLE_CXX_TRUE= ENABLE_CXX_FALSE='#' else ENABLE_CXX_TRUE='#' ENABLE_CXX_FALSE= fi VIPS_CXX_LIBS="" enable_cxx=no fi # we need a fully expanded version of $libdir # without this we get something like # define VIPS_LIBDIR ${exec_prefix}/lib # argh test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # set $expanded_value to the fully-expanded value of the argument expand () { eval expanded_value=$1 if test x"$expanded_value" != x"$1"; then expand "$expanded_value" fi } expand $libdir VIPS_LIBDIR=$expanded_value # this gets pasted into version.h as a #define VIPS_EXEEXT=$EXEEXT # vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback) # the configure-time install prefix cat >>confdefs.h <<_ACEOF #define VIPS_PREFIX "$prefix" _ACEOF cat >>confdefs.h <<_ACEOF #define VIPS_LIBDIR "$VIPS_LIBDIR" _ACEOF # i18n # we need to name our .mo with major.minor so we can have multiple versions # installed in parallel on Debian expand vips$VIPS_MAJOR_VERSION.$VIPS_MINOR_VERSION GETTEXT_PACKAGE=$expanded_value cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF # the 'malkovich' one is there for testing only, remove for release #ALL_LINGUAS="en_GB de malkovich" ALL_LINGUAS="en_GB de" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if ${am_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if ${gt_cv_func_ngettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if ${gt_cv_func_dgettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if ${ac_cv_lib_intl_bindtextdomain+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if ${ac_cv_lib_intl_ngettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if ${ac_cv_lib_intl_dgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = xyes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if ${ac_cv_lib_intl_ngettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if ${ac_cv_lib_intl_dcgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = xyes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *-*-openbsd*) CATOBJEXT=.mo DATADIRNAME=share ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES # Checks for libraries. # build list of pkg-config packages we used here PACKAGES_USED="" # Checks for header files. ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in errno.h math.h fcntl.h limits.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h sys/mman.h sys/types.h sys/stat.h unistd.h io.h direct.h windows.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # uncomment to change which libs we build # AC_DISABLE_SHARED # AC_DISABLE_STATIC enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args. set dummy ${ac_tool_prefix}dllwrap; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLWRAP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLWRAP"; then ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLWRAP=$ac_cv_prog_DLLWRAP if test -n "$DLLWRAP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5 $as_echo "$DLLWRAP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLWRAP"; then ac_ct_DLLWRAP=$DLLWRAP # Extract the first word of "dllwrap", so it can be a program name with args. set dummy dllwrap; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLWRAP"; then ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLWRAP="dllwrap" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP if test -n "$ac_ct_DLLWRAP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5 $as_echo "$ac_ct_DLLWRAP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLWRAP" = x; then DLLWRAP="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLWRAP=$ac_ct_DLLWRAP fi else DLLWRAP="$ac_cv_prog_DLLWRAP" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LD="${ac_tool_prefix}ld" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LD"; then ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LD="ld" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5 $as_echo "$ac_ct_LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LD" = x; then LD="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LD=$ac_ct_LD fi else LD="$ac_cv_prog_LD" fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if ${ac_cv_func_memcmp_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_memcmp_working=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_memcmp_working=yes else ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done for ac_func in getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand sysconf atexit do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cbrt in -lm" >&5 $as_echo_n "checking for cbrt in -lm... " >&6; } if ${ac_cv_lib_m_cbrt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cbrt (); int main () { return cbrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cbrt=yes else ac_cv_lib_m_cbrt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cbrt" >&5 $as_echo "$ac_cv_lib_m_cbrt" >&6; } if test "x$ac_cv_lib_m_cbrt" = xyes; then : $as_echo "#define HAVE_CBRT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypot in -lm" >&5 $as_echo_n "checking for hypot in -lm... " >&6; } if ${ac_cv_lib_m_hypot+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char hypot (); int main () { return hypot (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_hypot=yes else ac_cv_lib_m_hypot=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_hypot" >&5 $as_echo "$ac_cv_lib_m_hypot" >&6; } if test "x$ac_cv_lib_m_hypot" = xyes; then : $as_echo "#define HAVE_HYPOT 1" >>confdefs.h fi # have to have these # need glib 2.6 for GOption pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for REQUIRED" >&5 $as_echo_n "checking for REQUIRED... " >&6; } if test -n "$REQUIRED_CFLAGS"; then pkg_cv_REQUIRED_CFLAGS="$REQUIRED_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_REQUIRED_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$REQUIRED_LIBS"; then pkg_cv_REQUIRED_LIBS="$REQUIRED_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_REQUIRED_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then REQUIRED_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0" 2>&1` else REQUIRED_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$REQUIRED_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0) were not met: $REQUIRED_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables REQUIRED_CFLAGS and REQUIRED_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables REQUIRED_CFLAGS and REQUIRED_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else REQUIRED_CFLAGS=$pkg_cv_REQUIRED_CFLAGS REQUIRED_LIBS=$pkg_cv_REQUIRED_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi PACKAGES_USED="$PACKAGES_USED glib-2.0 libxml-2.0 gmodule-2.0 gobject-2.0" # after 2.28 we have a monotonic timer pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MONOTONIC" >&5 $as_echo_n "checking for MONOTONIC... " >&6; } if test -n "$MONOTONIC_CFLAGS"; then pkg_cv_MONOTONIC_CFLAGS="$MONOTONIC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MONOTONIC_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.28" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MONOTONIC_LIBS"; then pkg_cv_MONOTONIC_LIBS="$MONOTONIC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MONOTONIC_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.28" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MONOTONIC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.28" 2>&1` else MONOTONIC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.28" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MONOTONIC_PKG_ERRORS" >&5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else MONOTONIC_CFLAGS=$pkg_cv_MONOTONIC_CFLAGS MONOTONIC_LIBS=$pkg_cv_MONOTONIC_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_MONOTONIC_TIME 1" >>confdefs.h fi # after 2.32 there are a new set of thread functions, annoyingly pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for THREADS" >&5 $as_echo_n "checking for THREADS... " >&6; } if test -n "$THREADS_CFLAGS"; then pkg_cv_THREADS_CFLAGS="$THREADS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.32\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.32") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_THREADS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.32" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$THREADS_LIBS"; then pkg_cv_THREADS_LIBS="$THREADS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.32\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.32") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_THREADS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.32" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then THREADS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.32" 2>&1` else THREADS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.32" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$THREADS_PKG_ERRORS" >&5 # the old threading system ... we need to link against gthread pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5 $as_echo_n "checking for GTHREAD... " >&6; } if test -n "$GTHREAD_CFLAGS"; then pkg_cv_GTHREAD_CFLAGS="$GTHREAD_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gthread-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTHREAD_LIBS"; then pkg_cv_GTHREAD_LIBS="$GTHREAD_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gthread-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTHREAD_LIBS=`$PKG_CONFIG --libs "gthread-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTHREAD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gthread-2.0" 2>&1` else GTHREAD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gthread-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTHREAD_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gthread-2.0) were not met: $GTHREAD_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTHREAD_CFLAGS and GTHREAD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTHREAD_CFLAGS and GTHREAD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTHREAD_CFLAGS=$pkg_cv_GTHREAD_CFLAGS GTHREAD_LIBS=$pkg_cv_GTHREAD_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi PACKAGES_USED="$PACKAGES_USED gthread-2.0" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # the old threading system ... we need to link against gthread pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5 $as_echo_n "checking for GTHREAD... " >&6; } if test -n "$GTHREAD_CFLAGS"; then pkg_cv_GTHREAD_CFLAGS="$GTHREAD_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gthread-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTHREAD_LIBS"; then pkg_cv_GTHREAD_LIBS="$GTHREAD_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gthread-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTHREAD_LIBS=`$PKG_CONFIG --libs "gthread-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTHREAD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gthread-2.0" 2>&1` else GTHREAD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gthread-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTHREAD_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gthread-2.0) were not met: $GTHREAD_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTHREAD_CFLAGS and GTHREAD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTHREAD_CFLAGS and GTHREAD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTHREAD_CFLAGS=$pkg_cv_GTHREAD_CFLAGS GTHREAD_LIBS=$pkg_cv_GTHREAD_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi PACKAGES_USED="$PACKAGES_USED gthread-2.0" else THREADS_CFLAGS=$pkg_cv_THREADS_CFLAGS THREADS_LIBS=$pkg_cv_THREADS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_MUTEX_INIT 1" >>confdefs.h $as_echo "#define HAVE_COND_INIT 1" >>confdefs.h $as_echo "#define HAVE_THREAD_NEW 1" >>confdefs.h $as_echo "#define HAVE_PRIVATE_INIT 1" >>confdefs.h $as_echo "#define HAVE_VALUE_GET_SCHAR 1" >>confdefs.h fi # after 2.36 the type system inits itself pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TYPE_INIT" >&5 $as_echo_n "checking for TYPE_INIT... " >&6; } if test -n "$TYPE_INIT_CFLAGS"; then pkg_cv_TYPE_INIT_CFLAGS="$TYPE_INIT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 < 2.36\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 < 2.36") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TYPE_INIT_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 < 2.36" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$TYPE_INIT_LIBS"; then pkg_cv_TYPE_INIT_LIBS="$TYPE_INIT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 < 2.36\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 < 2.36") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TYPE_INIT_LIBS=`$PKG_CONFIG --libs "glib-2.0 < 2.36" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then TYPE_INIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 < 2.36" 2>&1` else TYPE_INIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 < 2.36" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TYPE_INIT_PKG_ERRORS" >&5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else TYPE_INIT_CFLAGS=$pkg_cv_TYPE_INIT_CFLAGS TYPE_INIT_LIBS=$pkg_cv_TYPE_INIT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define NEED_TYPE_INIT 1" >>confdefs.h fi # check for gtk-doc # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_CHECK+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in gtkdoc-rebase do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_REBASE+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_REBASE in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE if test -n "$GTKDOC_REBASE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 $as_echo "$GTKDOC_REBASE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_REBASE" && break done test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. set dummy gtkdoc-mkpdf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_MKPDF+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_MKPDF in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF if test -n "$GTKDOC_MKPDF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 $as_echo "$GTKDOC_MKPDF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then : withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then : enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.9\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.9") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error $? "You need to have gtk-doc >= 1.9 installed to build $PACKAGE_NAME" "$LINENO" 5 fi if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 $as_echo_n "checking for GTKDOC_DEPS... " >&6; } if test -n "$GTKDOC_DEPS_CFLAGS"; then pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTKDOC_DEPS_LIBS"; then pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` else GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : else GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; else enable_gtk_doc_html=yes fi # Check whether --enable-gtk-doc-pdf was given. if test "${enable_gtk_doc_pdf+set}" = set; then : enableval=$enable_gtk_doc_pdf; else enable_gtk_doc_pdf=no fi if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test -z "$AM_DEFAULT_VERBOSITY"; then AM_DEFAULT_VERBOSITY=1 fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test x$enable_gtk_doc_html = xyes; then GTK_DOC_BUILD_HTML_TRUE= GTK_DOC_BUILD_HTML_FALSE='#' else GTK_DOC_BUILD_HTML_TRUE='#' GTK_DOC_BUILD_HTML_FALSE= fi if test x$enable_gtk_doc_pdf = xyes; then GTK_DOC_BUILD_PDF_TRUE= GTK_DOC_BUILD_PDF_FALSE='#' else GTK_DOC_BUILD_PDF_TRUE='#' GTK_DOC_BUILD_PDF_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi if test -n "$GTKDOC_REBASE"; then GTK_DOC_USE_REBASE_TRUE= GTK_DOC_USE_REBASE_FALSE='#' else GTK_DOC_USE_REBASE_TRUE='#' GTK_DOC_USE_REBASE_FALSE= fi # optional supporting libraries # Check whether --with-fftw was given. if test "${with_fftw+set}" = set; then : withval=$with_fftw; fi if test x"$with_fftw" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFTW" >&5 $as_echo_n "checking for FFTW... " >&6; } if test -n "$FFTW_CFLAGS"; then pkg_cv_FFTW_CFLAGS="$FFTW_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fftw3\""; } >&5 ($PKG_CONFIG --exists --print-errors "fftw3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FFTW_CFLAGS=`$PKG_CONFIG --cflags "fftw3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FFTW_LIBS"; then pkg_cv_FFTW_LIBS="$FFTW_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fftw3\""; } >&5 ($PKG_CONFIG --exists --print-errors "fftw3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FFTW_LIBS=`$PKG_CONFIG --libs "fftw3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FFTW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fftw3" 2>&1` else FFTW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fftw3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FFTW_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fftw not found; disabling fftw support" >&5 $as_echo "$as_me: WARNING: fftw not found; disabling fftw support" >&2;} with_fftw=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fftw not found; disabling fftw support" >&5 $as_echo "$as_me: WARNING: fftw not found; disabling fftw support" >&2;} with_fftw=no else FFTW_CFLAGS=$pkg_cv_FFTW_CFLAGS FFTW_LIBS=$pkg_cv_FFTW_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_FFTW 1" >>confdefs.h with_fftw=yes PACKAGES_USED="$PACKAGES_USED fftw3" fi fi # ImageMagick ... detect attribute iteration too # Optionally look for GraphicsMagick instead ... use # --with-magickpackage=GraphicsMagick # Check whether --with-magick was given. if test "${with_magick+set}" = set; then : withval=$with_magick; fi # Check whether --with-magickpackage was given. if test "${with_magickpackage+set}" = set; then : withval=$with_magickpackage; fi # recent versions of ImageMagick have split parts of the library off to # MagickWand, so by default we test for that first if test x"$with_magickpackage" = "x"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAGICK_WAND" >&5 $as_echo_n "checking for MAGICK_WAND... " >&6; } if test -n "$MAGICK_WAND_CFLAGS"; then pkg_cv_MAGICK_WAND_CFLAGS="$MAGICK_WAND_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickWand\""; } >&5 ($PKG_CONFIG --exists --print-errors "MagickWand") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_WAND_CFLAGS=`$PKG_CONFIG --cflags "MagickWand" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MAGICK_WAND_LIBS"; then pkg_cv_MAGICK_WAND_LIBS="$MAGICK_WAND_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickWand\""; } >&5 ($PKG_CONFIG --exists --print-errors "MagickWand") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_WAND_LIBS=`$PKG_CONFIG --libs "MagickWand" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MAGICK_WAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "MagickWand" 2>&1` else MAGICK_WAND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "MagickWand" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MAGICK_WAND_PKG_ERRORS" >&5 pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IMAGE_MAGICK" >&5 $as_echo_n "checking for IMAGE_MAGICK... " >&6; } if test -n "$IMAGE_MAGICK_CFLAGS"; then pkg_cv_IMAGE_MAGICK_CFLAGS="$IMAGE_MAGICK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ImageMagick\""; } >&5 ($PKG_CONFIG --exists --print-errors "ImageMagick") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_IMAGE_MAGICK_CFLAGS=`$PKG_CONFIG --cflags "ImageMagick" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$IMAGE_MAGICK_LIBS"; then pkg_cv_IMAGE_MAGICK_LIBS="$IMAGE_MAGICK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ImageMagick\""; } >&5 ($PKG_CONFIG --exists --print-errors "ImageMagick") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_IMAGE_MAGICK_LIBS=`$PKG_CONFIG --libs "ImageMagick" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then IMAGE_MAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ImageMagick" 2>&1` else IMAGE_MAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ImageMagick" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$IMAGE_MAGICK_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: neither MagickWand nor ImageMagick found; disabling Magick support" >&5 $as_echo "$as_me: WARNING: neither MagickWand nor ImageMagick found; disabling Magick support" >&2;} with_magick=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: neither MagickWand nor ImageMagick found; disabling Magick support" >&5 $as_echo "$as_me: WARNING: neither MagickWand nor ImageMagick found; disabling Magick support" >&2;} with_magick=no else IMAGE_MAGICK_CFLAGS=$pkg_cv_IMAGE_MAGICK_CFLAGS IMAGE_MAGICK_LIBS=$pkg_cv_IMAGE_MAGICK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } with_magickpackage=ImageMagick fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IMAGE_MAGICK" >&5 $as_echo_n "checking for IMAGE_MAGICK... " >&6; } if test -n "$IMAGE_MAGICK_CFLAGS"; then pkg_cv_IMAGE_MAGICK_CFLAGS="$IMAGE_MAGICK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ImageMagick\""; } >&5 ($PKG_CONFIG --exists --print-errors "ImageMagick") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_IMAGE_MAGICK_CFLAGS=`$PKG_CONFIG --cflags "ImageMagick" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$IMAGE_MAGICK_LIBS"; then pkg_cv_IMAGE_MAGICK_LIBS="$IMAGE_MAGICK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ImageMagick\""; } >&5 ($PKG_CONFIG --exists --print-errors "ImageMagick") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_IMAGE_MAGICK_LIBS=`$PKG_CONFIG --libs "ImageMagick" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then IMAGE_MAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ImageMagick" 2>&1` else IMAGE_MAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ImageMagick" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$IMAGE_MAGICK_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: neither MagickWand nor ImageMagick found; disabling Magick support" >&5 $as_echo "$as_me: WARNING: neither MagickWand nor ImageMagick found; disabling Magick support" >&2;} with_magick=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: neither MagickWand nor ImageMagick found; disabling Magick support" >&5 $as_echo "$as_me: WARNING: neither MagickWand nor ImageMagick found; disabling Magick support" >&2;} with_magick=no else IMAGE_MAGICK_CFLAGS=$pkg_cv_IMAGE_MAGICK_CFLAGS IMAGE_MAGICK_LIBS=$pkg_cv_IMAGE_MAGICK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } with_magickpackage=ImageMagick fi else MAGICK_WAND_CFLAGS=$pkg_cv_MAGICK_WAND_CFLAGS MAGICK_WAND_LIBS=$pkg_cv_MAGICK_WAND_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } with_magickpackage=MagickWand fi fi if test x"$with_magick" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAGICK" >&5 $as_echo_n "checking for MAGICK... " >&6; } if test -n "$MAGICK_CFLAGS"; then pkg_cv_MAGICK_CFLAGS="$MAGICK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$with_magickpackage\""; } >&5 ($PKG_CONFIG --exists --print-errors "$with_magickpackage") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_CFLAGS=`$PKG_CONFIG --cflags "$with_magickpackage" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MAGICK_LIBS"; then pkg_cv_MAGICK_LIBS="$MAGICK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$with_magickpackage\""; } >&5 ($PKG_CONFIG --exists --print-errors "$with_magickpackage") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_LIBS=`$PKG_CONFIG --libs "$with_magickpackage" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$with_magickpackage" 2>&1` else MAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$with_magickpackage" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MAGICK_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $with_magickpackage not found; disabling Magick support" >&5 $as_echo "$as_me: WARNING: $with_magickpackage not found; disabling Magick support" >&2;} with_magick=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $with_magickpackage not found; disabling Magick support" >&5 $as_echo "$as_me: WARNING: $with_magickpackage not found; disabling Magick support" >&2;} with_magick=no else MAGICK_CFLAGS=$pkg_cv_MAGICK_CFLAGS MAGICK_LIBS=$pkg_cv_MAGICK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_MAGICK 1" >>confdefs.h with_magick=yes PACKAGES_USED="$PACKAGES_USED $with_magickpackage" fi fi if test x"$with_magick" != "xno"; then # we SetImageOption to disable some DICOM read processing, but that's only # in more recent imagemagicks and not in graphicsmagick save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" for ac_func in SetImageOption do : ac_fn_c_check_func "$LINENO" "SetImageOption" "ac_cv_func_SetImageOption" if test "x$ac_cv_func_SetImageOption" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETIMAGEOPTION 1 _ACEOF $as_echo "#define HAVE_SETIMAGEOPTION 1" >>confdefs.h fi done LIBS=$save_LIBS fi if test x"$with_magick" != "xno"; then # newer ImageMagicks use MagickCoreGenesis instead of InitializeMagick argh save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" for ac_func in MagickCoreGenesis do : ac_fn_c_check_func "$LINENO" "MagickCoreGenesis" "ac_cv_func_MagickCoreGenesis" if test "x$ac_cv_func_MagickCoreGenesis" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MAGICKCOREGENESIS 1 _ACEOF $as_echo "#define HAVE_MAGICKCOREGENESIS 1" >>confdefs.h fi done LIBS=$save_LIBS fi if test x"$with_magick" != "xno"; then # newer ImageMagicks use ResetImagePropertyIterator instead of # ResetImageAttributeIterator argh save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" for ac_func in ResetImagePropertyIterator do : ac_fn_c_check_func "$LINENO" "ResetImagePropertyIterator" "ac_cv_func_ResetImagePropertyIterator" if test "x$ac_cv_func_ResetImagePropertyIterator" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_RESETIMAGEPROPERTYITERATOR 1 _ACEOF $as_echo "#define HAVE_RESETIMAGEPROPERTYITERATOR 1" >>confdefs.h fi done LIBS=$save_LIBS fi if test x"$with_magick" != "xno"; then # so ... do we have ResetImageAttributeIterator()? GM does not save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" for ac_func in ResetImageAttributeIterator do : ac_fn_c_check_func "$LINENO" "ResetImageAttributeIterator" "ac_cv_func_ResetImageAttributeIterator" if test "x$ac_cv_func_ResetImageAttributeIterator" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_RESETIMAGEATTRIBUTEITERATOR 1 _ACEOF $as_echo "#define HAVE_RESETIMAGEATTRIBUTEITERATOR 1" >>confdefs.h fi done LIBS=$save_LIBS fi if test x"$with_magick" != "xno"; then # more recent magicks have GetVirtualPixels rather than GetImagePixels save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" for ac_func in GetVirtualPixels do : ac_fn_c_check_func "$LINENO" "GetVirtualPixels" "ac_cv_func_GetVirtualPixels" if test "x$ac_cv_func_GetVirtualPixels" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETVIRTUALPIXELS 1 _ACEOF $as_echo "#define HAVE_GETVIRTUALPIXELS 1" >>confdefs.h fi done LIBS=$save_LIBS fi # orc # Check whether --with-orc was given. if test "${with_orc+set}" = set; then : withval=$with_orc; fi if test x"$with_orc" != "xno"; then # we use loadpw etc. pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ORC" >&5 $as_echo_n "checking for ORC... " >&6; } if test -n "$ORC_CFLAGS"; then pkg_cv_ORC_CFLAGS="$ORC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"orc-0.4 >= 0.4.11\""; } >&5 ($PKG_CONFIG --exists --print-errors "orc-0.4 >= 0.4.11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ORC_CFLAGS=`$PKG_CONFIG --cflags "orc-0.4 >= 0.4.11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$ORC_LIBS"; then pkg_cv_ORC_LIBS="$ORC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"orc-0.4 >= 0.4.11\""; } >&5 ($PKG_CONFIG --exists --print-errors "orc-0.4 >= 0.4.11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ORC_LIBS=`$PKG_CONFIG --libs "orc-0.4 >= 0.4.11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then ORC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "orc-0.4 >= 0.4.11" 2>&1` else ORC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "orc-0.4 >= 0.4.11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ORC_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: orc-0.4.11 or later not found; disabling orc support" >&5 $as_echo "$as_me: WARNING: orc-0.4.11 or later not found; disabling orc support" >&2;} with_orc=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: orc-0.4.11 or later not found; disabling orc support" >&5 $as_echo "$as_me: WARNING: orc-0.4.11 or later not found; disabling orc support" >&2;} with_orc=no else ORC_CFLAGS=$pkg_cv_ORC_CFLAGS ORC_LIBS=$pkg_cv_ORC_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_ORC 1" >>confdefs.h with_orc=yes PACKAGES_USED="$PACKAGES_USED orc-0.4" fi fi # lcms ... look for lcms2 first, it has better threading support # Check whether --with-lcms was given. if test "${with_lcms+set}" = set; then : withval=$with_lcms; fi if test x"$with_lcms" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 $as_echo_n "checking for LCMS... " >&6; } if test -n "$LCMS_CFLAGS"; then pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LCMS_LIBS"; then pkg_cv_LCMS_LIBS="$LCMS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2" 2>&1` else LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LCMS_PKG_ERRORS" >&5 pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 $as_echo_n "checking for LCMS... " >&6; } if test -n "$LCMS_CFLAGS"; then pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5 ($PKG_CONFIG --exists --print-errors "lcms") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LCMS_LIBS"; then pkg_cv_LCMS_LIBS="$LCMS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5 ($PKG_CONFIG --exists --print-errors "lcms") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms" 2>&1` else LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LCMS_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lcms2/lcms not found; disabling lcms support" >&5 $as_echo "$as_me: WARNING: lcms2/lcms not found; disabling lcms support" >&2;} with_lcms=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lcms2/lcms not found; disabling lcms support" >&5 $as_echo "$as_me: WARNING: lcms2/lcms not found; disabling lcms support" >&2;} with_lcms=no else LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS LCMS_LIBS=$pkg_cv_LCMS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_LCMS 1" >>confdefs.h with_lcms="yes (lcms1)" PACKAGES_USED="$PACKAGES_USED lcms" fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 $as_echo_n "checking for LCMS... " >&6; } if test -n "$LCMS_CFLAGS"; then pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5 ($PKG_CONFIG --exists --print-errors "lcms") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LCMS_LIBS"; then pkg_cv_LCMS_LIBS="$LCMS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5 ($PKG_CONFIG --exists --print-errors "lcms") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms" 2>&1` else LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LCMS_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lcms2/lcms not found; disabling lcms support" >&5 $as_echo "$as_me: WARNING: lcms2/lcms not found; disabling lcms support" >&2;} with_lcms=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lcms2/lcms not found; disabling lcms support" >&5 $as_echo "$as_me: WARNING: lcms2/lcms not found; disabling lcms support" >&2;} with_lcms=no else LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS LCMS_LIBS=$pkg_cv_LCMS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_LCMS 1" >>confdefs.h with_lcms="yes (lcms1)" PACKAGES_USED="$PACKAGES_USED lcms" fi else LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS LCMS_LIBS=$pkg_cv_LCMS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_LCMS2 1" >>confdefs.h with_lcms="yes (lcms2)" PACKAGES_USED="$PACKAGES_USED lcms2" fi fi # OpenEXR # Check whether --with-OpenEXR was given. if test "${with_OpenEXR+set}" = set; then : withval=$with_OpenEXR; fi # require 1.2.2 since 1.2.1 has a broken ImfCloseTiledInputFile() if test x"$with_OpenEXR" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENEXR" >&5 $as_echo_n "checking for OPENEXR... " >&6; } if test -n "$OPENEXR_CFLAGS"; then pkg_cv_OPENEXR_CFLAGS="$OPENEXR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"OpenEXR >= 1.2.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "OpenEXR >= 1.2.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OPENEXR_CFLAGS=`$PKG_CONFIG --cflags "OpenEXR >= 1.2.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$OPENEXR_LIBS"; then pkg_cv_OPENEXR_LIBS="$OPENEXR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"OpenEXR >= 1.2.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "OpenEXR >= 1.2.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OPENEXR_LIBS=`$PKG_CONFIG --libs "OpenEXR >= 1.2.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OPENEXR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "OpenEXR >= 1.2.2" 2>&1` else OPENEXR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "OpenEXR >= 1.2.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OPENEXR_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenEXR not found; disabling OpenEXR support" >&5 $as_echo "$as_me: WARNING: OpenEXR not found; disabling OpenEXR support" >&2;} with_OpenEXR=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenEXR not found; disabling OpenEXR support" >&5 $as_echo "$as_me: WARNING: OpenEXR not found; disabling OpenEXR support" >&2;} with_OpenEXR=no else OPENEXR_CFLAGS=$pkg_cv_OPENEXR_CFLAGS OPENEXR_LIBS=$pkg_cv_OPENEXR_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_OPENEXR 1" >>confdefs.h with_OpenEXR=yes PACKAGES_USED="$PACKAGES_USED OpenEXR" fi fi # OpenSlide # Check whether --with-openslide was given. if test "${with_openslide+set}" = set; then : withval=$with_openslide; fi if test x"$with_openslide" != x"no"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSLIDE" >&5 $as_echo_n "checking for OPENSLIDE... " >&6; } if test -n "$OPENSLIDE_CFLAGS"; then pkg_cv_OPENSLIDE_CFLAGS="$OPENSLIDE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openslide >= 3.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "openslide >= 3.3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OPENSLIDE_CFLAGS=`$PKG_CONFIG --cflags "openslide >= 3.3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$OPENSLIDE_LIBS"; then pkg_cv_OPENSLIDE_LIBS="$OPENSLIDE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openslide >= 3.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "openslide >= 3.3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OPENSLIDE_LIBS=`$PKG_CONFIG --libs "openslide >= 3.3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OPENSLIDE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openslide >= 3.3.0" 2>&1` else OPENSLIDE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openslide >= 3.3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OPENSLIDE_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSlide >= 3.3.0 not found; disabling virtual slide support" >&5 $as_echo "$as_me: WARNING: OpenSlide >= 3.3.0 not found; disabling virtual slide support" >&2;} with_openslide=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSlide >= 3.3.0 not found; disabling virtual slide support" >&5 $as_echo "$as_me: WARNING: OpenSlide >= 3.3.0 not found; disabling virtual slide support" >&2;} with_openslide=no else OPENSLIDE_CFLAGS=$pkg_cv_OPENSLIDE_CFLAGS OPENSLIDE_LIBS=$pkg_cv_OPENSLIDE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_OPENSLIDE 1" >>confdefs.h with_openslide=yes PACKAGES_USED="$PACKAGES_USED openslide" fi fi # matio # Check whether --with-matio was given. if test "${with_matio+set}" = set; then : withval=$with_matio; fi if test x"$with_matio" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MATIO" >&5 $as_echo_n "checking for MATIO... " >&6; } if test -n "$MATIO_CFLAGS"; then pkg_cv_MATIO_CFLAGS="$MATIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"matio\""; } >&5 ($PKG_CONFIG --exists --print-errors "matio") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MATIO_CFLAGS=`$PKG_CONFIG --cflags "matio" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MATIO_LIBS"; then pkg_cv_MATIO_LIBS="$MATIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"matio\""; } >&5 ($PKG_CONFIG --exists --print-errors "matio") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MATIO_LIBS=`$PKG_CONFIG --libs "matio" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MATIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "matio" 2>&1` else MATIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "matio" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MATIO_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: matio not found; disabling matio support" >&5 $as_echo "$as_me: WARNING: matio not found; disabling matio support" >&2;} with_matio=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: matio not found; disabling matio support" >&5 $as_echo "$as_me: WARNING: matio not found; disabling matio support" >&2;} with_matio=no else MATIO_CFLAGS=$pkg_cv_MATIO_CFLAGS MATIO_LIBS=$pkg_cv_MATIO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_MATIO 1" >>confdefs.h with_matio=yes PACKAGES_USED="$PACKAGES_USED matio" fi fi # cfitsio # Check whether --with-cfitsio was given. if test "${with_cfitsio+set}" = set; then : withval=$with_cfitsio; fi if test x"$with_cfitsio" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFITSIO" >&5 $as_echo_n "checking for CFITSIO... " >&6; } if test -n "$CFITSIO_CFLAGS"; then pkg_cv_CFITSIO_CFLAGS="$CFITSIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cfitsio\""; } >&5 ($PKG_CONFIG --exists --print-errors "cfitsio") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CFITSIO_CFLAGS=`$PKG_CONFIG --cflags "cfitsio" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CFITSIO_LIBS"; then pkg_cv_CFITSIO_LIBS="$CFITSIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cfitsio\""; } >&5 ($PKG_CONFIG --exists --print-errors "cfitsio") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CFITSIO_LIBS=`$PKG_CONFIG --libs "cfitsio" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CFITSIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cfitsio" 2>&1` else CFITSIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cfitsio" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CFITSIO_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cfitsio not found; disabling cfitsio support" >&5 $as_echo "$as_me: WARNING: cfitsio not found; disabling cfitsio support" >&2;} with_cfitsio=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cfitsio not found; disabling cfitsio support" >&5 $as_echo "$as_me: WARNING: cfitsio not found; disabling cfitsio support" >&2;} with_cfitsio=no else CFITSIO_CFLAGS=$pkg_cv_CFITSIO_CFLAGS CFITSIO_LIBS=$pkg_cv_CFITSIO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_CFITSIO 1" >>confdefs.h with_cfitsio=yes PACKAGES_USED="$PACKAGES_USED cfitsio" fi fi # libwebp # Check whether --with-libwebp was given. if test "${with_libwebp+set}" = set; then : withval=$with_libwebp; fi if test x"$with_libwebp" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBWEBP" >&5 $as_echo_n "checking for LIBWEBP... " >&6; } if test -n "$LIBWEBP_CFLAGS"; then pkg_cv_LIBWEBP_CFLAGS="$LIBWEBP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp\""; } >&5 ($PKG_CONFIG --exists --print-errors "libwebp") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBWEBP_CFLAGS=`$PKG_CONFIG --cflags "libwebp" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBWEBP_LIBS"; then pkg_cv_LIBWEBP_LIBS="$LIBWEBP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp\""; } >&5 ($PKG_CONFIG --exists --print-errors "libwebp") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBWEBP_LIBS=`$PKG_CONFIG --libs "libwebp" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBWEBP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libwebp" 2>&1` else LIBWEBP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libwebp" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBWEBP_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libwebp not found; disabling libwebp support" >&5 $as_echo "$as_me: WARNING: libwebp not found; disabling libwebp support" >&2;} with_libwebp=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libwebp not found; disabling libwebp support" >&5 $as_echo "$as_me: WARNING: libwebp not found; disabling libwebp support" >&2;} with_libwebp=no else LIBWEBP_CFLAGS=$pkg_cv_LIBWEBP_CFLAGS LIBWEBP_LIBS=$pkg_cv_LIBWEBP_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_LIBWEBP 1" >>confdefs.h with_libwebp=yes PACKAGES_USED="$PACKAGES_USED libwebp" fi fi # pangoft2 # Check whether --with-pangoft2 was given. if test "${with_pangoft2+set}" = set; then : withval=$with_pangoft2; fi if test x"$with_pangoft2" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANGOFT2" >&5 $as_echo_n "checking for PANGOFT2... " >&6; } if test -n "$PANGOFT2_CFLAGS"; then pkg_cv_PANGOFT2_CFLAGS="$PANGOFT2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pangoft2\""; } >&5 ($PKG_CONFIG --exists --print-errors "pangoft2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PANGOFT2_CFLAGS=`$PKG_CONFIG --cflags "pangoft2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PANGOFT2_LIBS"; then pkg_cv_PANGOFT2_LIBS="$PANGOFT2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pangoft2\""; } >&5 ($PKG_CONFIG --exists --print-errors "pangoft2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PANGOFT2_LIBS=`$PKG_CONFIG --libs "pangoft2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PANGOFT2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pangoft2" 2>&1` else PANGOFT2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pangoft2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PANGOFT2_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pangoft2 not found; disabling pangoft2 support" >&5 $as_echo "$as_me: WARNING: pangoft2 not found; disabling pangoft2 support" >&2;} with_pangoft2=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pangoft2 not found; disabling pangoft2 support" >&5 $as_echo "$as_me: WARNING: pangoft2 not found; disabling pangoft2 support" >&2;} with_pangoft2=no else PANGOFT2_CFLAGS=$pkg_cv_PANGOFT2_CFLAGS PANGOFT2_LIBS=$pkg_cv_PANGOFT2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_PANGOFT2 1" >>confdefs.h with_pangoft2=yes PACKAGES_USED="$PACKAGES_USED pangoft2" fi fi # hmm, these don't have .pc files on ubuntu 5.10, how odd { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi ZIP_INCLUDES="" ZIP_LIBS="" # Check whether --with-zip was given. if test "${with_zip+set}" = set; then : withval=$with_zip; fi # Treat --without-zip like --without-zip-includes --without-zip-libraries. if test "$with_zip" = "no"; then ZIP_INCLUDES=no ZIP_LIBS=no fi # Check whether --with-zip-includes was given. if test "${with_zip_includes+set}" = set; then : withval=$with_zip_includes; ZIP_INCLUDES="-I$withval" fi # Check whether --with-zip-libraries was given. if test "${with_zip_libraries+set}" = set; then : withval=$with_zip_libraries; ZIP_LIBS="-L$withval -lz" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5 $as_echo_n "checking for ZIP... " >&6; } # Look for zlib.h if test "$ZIP_INCLUDES" = ""; then # Check the standard search path cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ZIP_INCLUDES="" else # zlib.h is not in the standard search path, try # $prefix zip_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ZIP_INCLUDES="-I${prefix}/include" else ZIP_INCLUDES="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext INCLUDES=$zip_save_INCLUDES fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Now for the libraries if test "$ZIP_LIBS" = ""; then zip_save_LIBS="$LIBS" zip_save_INCLUDES="$INCLUDES" LIBS="-lz $LIBS" INCLUDES="$ZIP_INCLUDES $INCLUDES" # Try the standard search path first cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { zlibVersion() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ZIP_LIBS="-lz" else # libz is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { zlibVersion() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ZIP_LIBS="-L${prefix}/lib -lz" else ZIP_LIBS=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$zip_save_LIBS" INCLUDES="$zip_save_INCLUDES" fi # Print a helpful message zip_libraries_result="$ZIP_LIBS" zip_includes_result="$ZIP_INCLUDES" if test x"$zip_libraries_result" = x""; then zip_libraries_result="in default path" fi if test x"$zip_includes_result" = x""; then zip_includes_result="in default path" fi if test "$zip_libraries_result" = "no"; then zip_libraries_result="(none)" fi if test "$zip_includes_result" = "no"; then zip_includes_result="(none)" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $zip_libraries_result, headers $zip_includes_result" >&5 $as_echo "libraries $zip_libraries_result, headers $zip_includes_result" >&6; } # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$ZIP_INCLUDES" != "no" && test "$ZIP_LIBS" != "no"; then $as_echo "#define HAVE_ZIP 1" >>confdefs.h with_zip=yes else ZIP_LIBS="" ZIP_INCLUDES="" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libz not found; disabling ZIP support" >&5 $as_echo "$as_me: WARNING: libz not found; disabling ZIP support" >&2;} with_zip=no fi # look for TIFF with pkg-config ... fall back to our tester # pkgconfig support for libtiff starts with libtiff-4 # Check whether --with-tiff was given. if test "${with_tiff+set}" = set; then : withval=$with_tiff; fi if test x"$with_tiff" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFF" >&5 $as_echo_n "checking for TIFF... " >&6; } if test -n "$TIFF_CFLAGS"; then pkg_cv_TIFF_CFLAGS="$TIFF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtiff-4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TIFF_CFLAGS=`$PKG_CONFIG --cflags "libtiff-4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$TIFF_LIBS"; then pkg_cv_TIFF_LIBS="$TIFF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtiff-4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TIFF_LIBS=`$PKG_CONFIG --libs "libtiff-4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then TIFF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtiff-4" 2>&1` else TIFF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtiff-4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TIFF_PKG_ERRORS" >&5 TIFF_INCLUDES="" TIFF_LIBS="" # Check whether --with-tiff was given. if test "${with_tiff+set}" = set; then : withval=$with_tiff; fi # Treat --without-tiff like --without-tiff-includes --without-tiff-libraries. if test "$with_tiff" = "no"; then TIFF_INCLUDES=no TIFF_LIBS=no fi # Check whether --with-tiff-includes was given. if test "${with_tiff_includes+set}" = set; then : withval=$with_tiff_includes; TIFF_INCLUDES="-I$withval" fi # Check whether --with-tiff-libraries was given. if test "${with_tiff_libraries+set}" = set; then : withval=$with_tiff_libraries; TIFF_LIBS="-L$withval -ltiff" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFF" >&5 $as_echo_n "checking for TIFF... " >&6; } # Look for tiff.h if test "$TIFF_INCLUDES" = ""; then # Check the standard search path cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : TIFF_INCLUDES="" else # tiff.h is not in the standard search path, try # $prefix tiff_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : TIFF_INCLUDES="-I${prefix}/include" else TIFF_INCLUDES="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext INCLUDES=$tiff_save_INCLUDES fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Now for the libraries if test "$TIFF_LIBS" = ""; then tiff_save_LIBS="$LIBS" tiff_save_INCLUDES="$INCLUDES" LIBS="-ltiff -lm $LIBS" INCLUDES="$TIFF_INCLUDES $INCLUDES" # Try the standard search path first cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { TIFFGetVersion() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : TIFF_LIBS="-ltiff" else # libtiff is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { TIFFGetVersion() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : TIFF_LIBS="-L${prefix}/lib -ltiff" else TIFF_LIBS=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$tiff_save_LIBS" INCLUDES="$tiff_save_INCLUDES" fi # Print a helpful message tiff_libraries_result="$TIFF_LIBS" tiff_includes_result="$TIFF_INCLUDES" if test x"$tiff_libraries_result" = x""; then tiff_libraries_result="in default path" fi if test x"$tiff_includes_result" = x""; then tiff_includes_result="in default path" fi if test "$tiff_libraries_result" = "no"; then tiff_libraries_result="(none)" fi if test "$tiff_includes_result" = "no"; then tiff_includes_result="(none)" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $tiff_libraries_result, headers $tiff_includes_result" >&5 $as_echo "libraries $tiff_libraries_result, headers $tiff_includes_result" >&6; } # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$TIFF_INCLUDES" != "no" && test "$TIFF_LIBS" != "no"; then $as_echo "#define HAVE_TIFF 1" >>confdefs.h with_tiff="yes (found by search)" else TIFF_INCLUDES="" TIFF_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libtiff not found; disabling TIFF support" >&5 $as_echo "$as_me: WARNING: libtiff not found; disabling TIFF support" >&2;} with_tiff=no fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } TIFF_INCLUDES="" TIFF_LIBS="" # Check whether --with-tiff was given. if test "${with_tiff+set}" = set; then : withval=$with_tiff; fi # Treat --without-tiff like --without-tiff-includes --without-tiff-libraries. if test "$with_tiff" = "no"; then TIFF_INCLUDES=no TIFF_LIBS=no fi # Check whether --with-tiff-includes was given. if test "${with_tiff_includes+set}" = set; then : withval=$with_tiff_includes; TIFF_INCLUDES="-I$withval" fi # Check whether --with-tiff-libraries was given. if test "${with_tiff_libraries+set}" = set; then : withval=$with_tiff_libraries; TIFF_LIBS="-L$withval -ltiff" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFF" >&5 $as_echo_n "checking for TIFF... " >&6; } # Look for tiff.h if test "$TIFF_INCLUDES" = ""; then # Check the standard search path cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : TIFF_INCLUDES="" else # tiff.h is not in the standard search path, try # $prefix tiff_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : TIFF_INCLUDES="-I${prefix}/include" else TIFF_INCLUDES="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext INCLUDES=$tiff_save_INCLUDES fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Now for the libraries if test "$TIFF_LIBS" = ""; then tiff_save_LIBS="$LIBS" tiff_save_INCLUDES="$INCLUDES" LIBS="-ltiff -lm $LIBS" INCLUDES="$TIFF_INCLUDES $INCLUDES" # Try the standard search path first cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { TIFFGetVersion() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : TIFF_LIBS="-ltiff" else # libtiff is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { TIFFGetVersion() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : TIFF_LIBS="-L${prefix}/lib -ltiff" else TIFF_LIBS=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$tiff_save_LIBS" INCLUDES="$tiff_save_INCLUDES" fi # Print a helpful message tiff_libraries_result="$TIFF_LIBS" tiff_includes_result="$TIFF_INCLUDES" if test x"$tiff_libraries_result" = x""; then tiff_libraries_result="in default path" fi if test x"$tiff_includes_result" = x""; then tiff_includes_result="in default path" fi if test "$tiff_libraries_result" = "no"; then tiff_libraries_result="(none)" fi if test "$tiff_includes_result" = "no"; then tiff_includes_result="(none)" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $tiff_libraries_result, headers $tiff_includes_result" >&5 $as_echo "libraries $tiff_libraries_result, headers $tiff_includes_result" >&6; } # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$TIFF_INCLUDES" != "no" && test "$TIFF_LIBS" != "no"; then $as_echo "#define HAVE_TIFF 1" >>confdefs.h with_tiff="yes (found by search)" else TIFF_INCLUDES="" TIFF_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libtiff not found; disabling TIFF support" >&5 $as_echo "$as_me: WARNING: libtiff not found; disabling TIFF support" >&2;} with_tiff=no fi else TIFF_CFLAGS=$pkg_cv_TIFF_CFLAGS TIFF_LIBS=$pkg_cv_TIFF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_TIFF 1" >>confdefs.h with_tiff="yes (pkg-config libtiff-4)" PACKAGES_USED="$PACKAGES_USED libtiff-4" fi fi # look for PNG with pkg-config ... fall back to our tester # Check whether --with-png was given. if test "${with_png+set}" = set; then : withval=$with_png; fi if test x"$with_png" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } if test -n "$PNG_CFLAGS"; then pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.2.9\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng >= 1.2.9") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng >= 1.2.9" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PNG_LIBS"; then pkg_cv_PNG_LIBS="$PNG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.2.9\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng >= 1.2.9") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng >= 1.2.9" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpng >= 1.2.9" 2>&1` else PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpng >= 1.2.9" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 PNG_INCLUDES="" PNG_LIBS="" # Check whether --with-png was given. if test "${with_png+set}" = set; then : withval=$with_png; fi # Treat --without-png like --without-png-includes --without-png-libraries. if test "$with_png" = "no"; then PNG_INCLUDES=no PNG_LIBS=no fi # Check whether --with-png-includes was given. if test "${with_png_includes+set}" = set; then : withval=$with_png_includes; PNG_INCLUDES="-I$withval" fi # Check whether --with-png-libraries was given. if test "${with_png_libraries+set}" = set; then : withval=$with_png_libraries; PNG_LIBS="-L$withval -lpng" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng" >&5 $as_echo_n "checking for libpng... " >&6; } # Look for png.h if test "$PNG_INCLUDES" = ""; then # Check the standard search path cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : PNG_INCLUDES="" else # png.h is not in the standard search path, try # $prefix png_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : PNG_INCLUDES="-I${prefix}/include" else PNG_INCLUDES="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext INCLUDES=$png_save_INCLUDES fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Now for the libraries if test "$PNG_LIBS" = ""; then png_save_LIBS="$LIBS" png_save_INCLUDES="$INCLUDES" LIBS="-lpng $LIBS" INCLUDES="$PNG_INCLUDES $INCLUDES" # Try the standard search path first cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { png_access_version_number() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : PNG_LIBS="-lpng" else # libpng is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { png_access_version_number() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : PNG_LIBS="-L${prefix}/lib -lpng" else PNG_LIBS=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$png_save_LIBS" INCLUDES="$png_save_INCLUDES" fi # Print a helpful message png_libraries_result="$PNG_LIBS" png_includes_result="$PNG_INCLUDES" if test x"$png_libraries_result" = x""; then png_libraries_result="in default path" fi if test x"$png_includes_result" = x""; then png_includes_result="in default path" fi if test "$png_libraries_result" = "no"; then png_libraries_result="(none)" fi if test "$png_includes_result" = "no"; then png_includes_result="(none)" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $png_libraries_result, headers $png_includes_result" >&5 $as_echo "libraries $png_libraries_result, headers $png_includes_result" >&6; } # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$PNG_INCLUDES" != "no" && test "$PNG_LIBS" != "no"; then $as_echo "#define HAVE_PNG 1" >>confdefs.h with_png="yes (found by search)" else PNG_INCLUDES="" PNG_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libpng not found; disabling PNG support" >&5 $as_echo "$as_me: WARNING: libpng not found; disabling PNG support" >&2;} with_png=no fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PNG_INCLUDES="" PNG_LIBS="" # Check whether --with-png was given. if test "${with_png+set}" = set; then : withval=$with_png; fi # Treat --without-png like --without-png-includes --without-png-libraries. if test "$with_png" = "no"; then PNG_INCLUDES=no PNG_LIBS=no fi # Check whether --with-png-includes was given. if test "${with_png_includes+set}" = set; then : withval=$with_png_includes; PNG_INCLUDES="-I$withval" fi # Check whether --with-png-libraries was given. if test "${with_png_libraries+set}" = set; then : withval=$with_png_libraries; PNG_LIBS="-L$withval -lpng" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng" >&5 $as_echo_n "checking for libpng... " >&6; } # Look for png.h if test "$PNG_INCLUDES" = ""; then # Check the standard search path cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : PNG_INCLUDES="" else # png.h is not in the standard search path, try # $prefix png_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : PNG_INCLUDES="-I${prefix}/include" else PNG_INCLUDES="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext INCLUDES=$png_save_INCLUDES fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Now for the libraries if test "$PNG_LIBS" = ""; then png_save_LIBS="$LIBS" png_save_INCLUDES="$INCLUDES" LIBS="-lpng $LIBS" INCLUDES="$PNG_INCLUDES $INCLUDES" # Try the standard search path first cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { png_access_version_number() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : PNG_LIBS="-lpng" else # libpng is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { png_access_version_number() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : PNG_LIBS="-L${prefix}/lib -lpng" else PNG_LIBS=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$png_save_LIBS" INCLUDES="$png_save_INCLUDES" fi # Print a helpful message png_libraries_result="$PNG_LIBS" png_includes_result="$PNG_INCLUDES" if test x"$png_libraries_result" = x""; then png_libraries_result="in default path" fi if test x"$png_includes_result" = x""; then png_includes_result="in default path" fi if test "$png_libraries_result" = "no"; then png_libraries_result="(none)" fi if test "$png_includes_result" = "no"; then png_includes_result="(none)" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $png_libraries_result, headers $png_includes_result" >&5 $as_echo "libraries $png_libraries_result, headers $png_includes_result" >&6; } # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$PNG_INCLUDES" != "no" && test "$PNG_LIBS" != "no"; then $as_echo "#define HAVE_PNG 1" >>confdefs.h with_png="yes (found by search)" else PNG_INCLUDES="" PNG_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libpng not found; disabling PNG support" >&5 $as_echo "$as_me: WARNING: libpng not found; disabling PNG support" >&2;} with_png=no fi else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS PNG_LIBS=$pkg_cv_PNG_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_PNG 1" >>confdefs.h with_png="yes (pkg-config libpng >= 1.2.9)" PACKAGES_USED="$PACKAGES_USED libpng" fi fi JPEG_INCLUDES="" JPEG_LIBS="" # Check whether --with-jpeg was given. if test "${with_jpeg+set}" = set; then : withval=$with_jpeg; fi # Treat --without-jpeg like --without-jpeg-includes --without-jpeg-libraries. if test "$with_jpeg" = "no"; then JPEG_INCLUDES=no JPEG_LIBS=no fi # Check whether --with-jpeg-includes was given. if test "${with_jpeg_includes+set}" = set; then : withval=$with_jpeg_includes; JPEG_INCLUDES="-I$withval" fi # Check whether --with-jpeg-libraries was given. if test "${with_jpeg_libraries+set}" = set; then : withval=$with_jpeg_libraries; JPEG_LIBS="-L$withval -ljpeg" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG" >&5 $as_echo_n "checking for JPEG... " >&6; } # Look for jpeglib.h if test "$JPEG_INCLUDES" = ""; then # Check the standard search path cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : JPEG_INCLUDES="" else # jpeglib.h is not in the standard search path, try # $prefix jpeg_save_INCLUDES="$INCLUDES" INCLUDES="-I${prefix}/include $INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : JPEG_INCLUDES="-I${prefix}/include" else JPEG_INCLUDES="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext INCLUDES=$jpeg_save_INCLUDES fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Now for the libraries if test "$JPEG_LIBS" = ""; then jpeg_save_LIBS="$LIBS" jpeg_save_INCLUDES="$INCLUDES" LIBS="-ljpeg $LIBS" INCLUDES="$JPEG_INCLUDES $INCLUDES" # Try the standard search path first cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { jpeg_abort((void*)0) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : JPEG_LIBS="-ljpeg" else # libjpeg is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { jpeg_abort((void*)0) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : JPEG_LIBS="-L${prefix}/lib -ljpeg" else JPEG_LIBS=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$jpeg_save_LIBS" INCLUDES="$jpeg_save_INCLUDES" fi # Print a helpful message jpeg_libraries_result="$JPEG_LIBS" jpeg_includes_result="$JPEG_INCLUDES" if test x"$jpeg_libraries_result" = x""; then jpeg_libraries_result="in default path" fi if test x"$jpeg_includes_result" = x""; then jpeg_includes_result="in default path" fi if test "$jpeg_libraries_result" = "no"; then jpeg_libraries_result="(none)" fi if test "$jpeg_includes_result" = "no"; then jpeg_includes_result="(none)" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $jpeg_libraries_result, headers $jpeg_includes_result" >&5 $as_echo "libraries $jpeg_libraries_result, headers $jpeg_includes_result" >&6; } # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$JPEG_INCLUDES" != "no" && test "$JPEG_LIBS" != "no"; then $as_echo "#define HAVE_JPEG 1" >>confdefs.h with_jpeg=yes else JPEG_INCLUDES="" JPEG_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg not found; disabling JPEG support" >&5 $as_echo "$as_me: WARNING: libjpeg not found; disabling JPEG support" >&2;} with_jpeg=no fi # libexif # Check whether --with-libexif was given. if test "${with_libexif+set}" = set; then : withval=$with_libexif; fi if test x"$with_libexif" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXIF" >&5 $as_echo_n "checking for EXIF... " >&6; } if test -n "$EXIF_CFLAGS"; then pkg_cv_EXIF_CFLAGS="$EXIF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libexif >= 0.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "libexif >= 0.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_EXIF_CFLAGS=`$PKG_CONFIG --cflags "libexif >= 0.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$EXIF_LIBS"; then pkg_cv_EXIF_LIBS="$EXIF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libexif >= 0.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "libexif >= 0.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_EXIF_LIBS=`$PKG_CONFIG --libs "libexif >= 0.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then EXIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libexif >= 0.6" 2>&1` else EXIF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libexif >= 0.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$EXIF_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libexif >= 0.6 not found; disabling exif support" >&5 $as_echo "$as_me: WARNING: libexif >= 0.6 not found; disabling exif support" >&2;} with_libexif=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libexif >= 0.6 not found; disabling exif support" >&5 $as_echo "$as_me: WARNING: libexif >= 0.6 not found; disabling exif support" >&2;} with_libexif=no else EXIF_CFLAGS=$pkg_cv_EXIF_CFLAGS EXIF_LIBS=$pkg_cv_EXIF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_EXIF 1" >>confdefs.h with_libexif=yes PACKAGES_USED="$PACKAGES_USED libexif" fi fi # some libexif packages need include , some just # how annoying if test x"$with_libexif" != "xno"; then # cppflags not cflags because we want the preproc to see the -I as well save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$EXIF_CFLAGS $CPPFLAGS" ac_fn_c_check_header_mongrel "$LINENO" "exif-data.h" "ac_cv_header_exif_data_h" "$ac_includes_default" if test "x$ac_cv_header_exif_data_h" = xyes; then : $as_echo "#define UNTAGGED_EXIF 1" >>confdefs.h fi CPPFLAGS=$save_CPPFLAGS fi # make python binding? # Check whether --with-python was given. if test "${with_python+set}" = set; then : withval=$with_python; fi if test x"$with_python" != "xno"; then if test x"$enable_cxx" = "xno"; then # if C++ if off, we can't do Python with_python=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C++ is off, disabling Python binding" >&5 $as_echo "$as_me: WARNING: C++ is off, disabling Python binding" >&2;} else if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.2" >&5 $as_echo_n "checking whether $PYTHON version is >= 2.2... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.2'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "Python interpreter is too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.2" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.2... " >&6; } if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.2'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then with_python=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Python not found; disabling Python binding" >&5 $as_echo "$as_me: WARNING: Python not found; disabling Python binding" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility # with python 3.x. See automake bug#10227. try: import sysconfig except ImportError: can_use_sysconfig = 0 else: can_use_sysconfig = 1 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: # try: from platform import python_implementation if python_implementation() == 'CPython' and sys.version[:3] == '2.7': can_use_sysconfig = 0 except ImportError: pass" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi fi fi if test x"$with_python" != "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for headers required to compile python extensions" >&5 $as_echo_n "checking for headers required to compile python extensions... " >&6; } py_prefix=`$PYTHON -c "import sys; print sys.prefix"` py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" if test "$py_prefix" != "$py_exec_prefix"; then PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" fi save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } with_python=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Python headers not found" >&5 $as_echo "$as_me: WARNING: Python headers not found" >&2;} fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$save_CPPFLAGS" fi # we don't check for swig: we include the generated bindings in the # distribution if test x"$with_python" != x"no"; then if true; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi with_python=yes else if false; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi fi # Gather all up for VIPS_CFLAGS, VIPS_INCLUDES, VIPS_LIBS and VIPS_CXX_LIBS # sort includes to get longer, more specific dirs first # helps, for example, selecting graphicsmagick over imagemagick VIPS_CFLAGS=`for i in $VIPS_CFLAGS $GTHREAD_CFLAGS $REQUIRED_CFLAGS $PANGOFT2_CFLAGS $FFTW_CFLAGS $MAGICK_CFLAGS $PNG_CFLAGS $EXIF_CFLAGS $MATIO_CFLAGS $CFITSIO_CFLAGS $LIBWEBP_CFLAGS $OPENEXR_CFLAGS $OPENSLIDE_CFLAGS $ORC_CFLAGS $TIFF_CFLAGS $LCMS_CFLAGS do echo $i done | sort -ru` VIPS_CFLAGS=`echo $VIPS_CFLAGS` VIPS_CFLAGS="$VIPS_DEBUG_FLAGS $VIPS_CFLAGS" VIPS_INCLUDES="$PNG_INCLUDES $TIFF_INCLUDES $ZIP_INCLUDES $JPEG_INCLUDES" VIPS_LIBS="$MAGICK_LIBS $PNG_LIBS $TIFF_LIBS $ZIP_LIBS $JPEG_LIBS $GTHREAD_LIBS $REQUIRED_LIBS $PANGOFT2_LIBS $FFTW_LIBS $ORC_LIBS $LCMS_LIBS $OPENEXR_LIBS $OPENSLIDE_LIBS $CFITSIO_LIBS $LIBWEBP_LIBS $MATIO_LIBS $EXIF_LIBS -lm" # we need this to generate paths in swig/python/setup.py.in ac_config_files="$ac_config_files vips.pc vipsCC.pc Makefile libvips/include/vips/version.h libvips/include/Makefile libvips/include/vips/Makefile libvips/Makefile libvips/arithmetic/Makefile libvips/cimg/Makefile libvips/colour/Makefile libvips/conversion/Makefile libvips/convolution/Makefile libvips/deprecated/Makefile libvips/foreign/Makefile libvips/freqfilt/Makefile libvips/histogram/Makefile libvips/inplace/Makefile libvips/iofuncs/Makefile libvips/morphology/Makefile libvips/mosaicing/Makefile libvips/create/Makefile libvips/resample/Makefile libvips/video/Makefile libvipsCC/include/Makefile libvipsCC/include/vips/Makefile libvipsCC/Makefile tools/Makefile tools/batch_crop tools/batch_image_convert tools/batch_rubber_sheet tools/light_correct tools/shrink_width swig/Makefile swig/vipsCC/Makefile swig/python/setup.py man/Makefile doc/Makefile doc/reference/Makefile doc/reference/libvips-docs.sgml po/Makefile.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then as_fn_error $? "conditional \"OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then as_fn_error $? "conditional \"OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CXX_TRUE}" && test -z "${ENABLE_CXX_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CXX_TRUE}" && test -z "${ENABLE_CXX_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by vips $as_me 7.38.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ vips config.status 7.38.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "vips.pc") CONFIG_FILES="$CONFIG_FILES vips.pc" ;; "vipsCC.pc") CONFIG_FILES="$CONFIG_FILES vipsCC.pc" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "libvips/include/vips/version.h") CONFIG_FILES="$CONFIG_FILES libvips/include/vips/version.h" ;; "libvips/include/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/include/Makefile" ;; "libvips/include/vips/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/include/vips/Makefile" ;; "libvips/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/Makefile" ;; "libvips/arithmetic/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/arithmetic/Makefile" ;; "libvips/cimg/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/cimg/Makefile" ;; "libvips/colour/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/colour/Makefile" ;; "libvips/conversion/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/conversion/Makefile" ;; "libvips/convolution/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/convolution/Makefile" ;; "libvips/deprecated/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/deprecated/Makefile" ;; "libvips/foreign/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/foreign/Makefile" ;; "libvips/freqfilt/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/freqfilt/Makefile" ;; "libvips/histogram/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/histogram/Makefile" ;; "libvips/inplace/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/inplace/Makefile" ;; "libvips/iofuncs/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/iofuncs/Makefile" ;; "libvips/morphology/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/morphology/Makefile" ;; "libvips/mosaicing/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/mosaicing/Makefile" ;; "libvips/create/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/create/Makefile" ;; "libvips/resample/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/resample/Makefile" ;; "libvips/video/Makefile") CONFIG_FILES="$CONFIG_FILES libvips/video/Makefile" ;; "libvipsCC/include/Makefile") CONFIG_FILES="$CONFIG_FILES libvipsCC/include/Makefile" ;; "libvipsCC/include/vips/Makefile") CONFIG_FILES="$CONFIG_FILES libvipsCC/include/vips/Makefile" ;; "libvipsCC/Makefile") CONFIG_FILES="$CONFIG_FILES libvipsCC/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "tools/batch_crop") CONFIG_FILES="$CONFIG_FILES tools/batch_crop" ;; "tools/batch_image_convert") CONFIG_FILES="$CONFIG_FILES tools/batch_image_convert" ;; "tools/batch_rubber_sheet") CONFIG_FILES="$CONFIG_FILES tools/batch_rubber_sheet" ;; "tools/light_correct") CONFIG_FILES="$CONFIG_FILES tools/light_correct" ;; "tools/shrink_width") CONFIG_FILES="$CONFIG_FILES tools/shrink_width" ;; "swig/Makefile") CONFIG_FILES="$CONFIG_FILES swig/Makefile" ;; "swig/vipsCC/Makefile") CONFIG_FILES="$CONFIG_FILES swig/vipsCC/Makefile" ;; "swig/python/setup.py") CONFIG_FILES="$CONFIG_FILES swig/python/setup.py" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/reference/Makefile") CONFIG_FILES="$CONFIG_FILES doc/reference/Makefile" ;; "doc/reference/libvips-docs.sgml") CONFIG_FILES="$CONFIG_FILES doc/reference/libvips-docs.sgml" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: * general build options native win32: $vips_os_win32 native OS X: $vips_os_darwin open files in binary mode: $vips_binary_open enable debug: $enable_debug build C++ components: $enable_cxx build docs with gtkdoc: $enable_gtk_doc gobject introspection: $found_introspection * optional packages and modules use fftw3 for FFT: $with_fftw Magick package: $with_magickpackage file import with libMagick: $with_magick accelerate loops with orc: $with_orc (requires orc-0.4.11 or later) ICC profile support with lcms: $with_lcms file import with OpenEXR: $with_OpenEXR file import with OpenSlide: $with_openslide (requires openslide-3.3.0 or later) file import with matio: $with_matio file import with cfitsio: $with_cfitsio file import/export with libwebp: $with_libwebp text rendering with pangoft2: $with_pangoft2 file import/export with libpng: $with_png (requires libpng-1.2.9 or later) file import/export with libtiff: $with_tiff file import/export with libjpeg: $with_jpeg use libexif to load/save JPEG metadata: $with_libexif build Python binding: $with_python" >&5 $as_echo " * general build options native win32: $vips_os_win32 native OS X: $vips_os_darwin open files in binary mode: $vips_binary_open enable debug: $enable_debug build C++ components: $enable_cxx build docs with gtkdoc: $enable_gtk_doc gobject introspection: $found_introspection * optional packages and modules use fftw3 for FFT: $with_fftw Magick package: $with_magickpackage file import with libMagick: $with_magick accelerate loops with orc: $with_orc (requires orc-0.4.11 or later) ICC profile support with lcms: $with_lcms file import with OpenEXR: $with_OpenEXR file import with OpenSlide: $with_openslide (requires openslide-3.3.0 or later) file import with matio: $with_matio file import with cfitsio: $with_cfitsio file import/export with libwebp: $with_libwebp text rendering with pangoft2: $with_pangoft2 file import/export with libpng: $with_png (requires libpng-1.2.9 or later) file import/export with libtiff: $with_tiff file import/export with libjpeg: $with_jpeg use libexif to load/save JPEG metadata: $with_libexif build Python binding: $with_python" >&6; } vips-7.38.5/swig/0000755000175000017500000000000012303146332010546 500000000000000vips-7.38.5/swig/vipsCC/0000755000175000017500000000000012303146332011735 500000000000000vips-7.38.5/swig/vipsCC/verrormodule.cxx0000644000175000017500000041071512303145400015131 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb) { int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) #define PyString_Check(name) PyBytes_Check(name) #define PyString_FromString(x) PyUnicode_FromString(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #define PyString_AsString(str) PyBytes_AsString(str) #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN typedef inquiry lenfunc; typedef intargfunc ssizeargfunc; typedef intintargfunc ssizessizeargfunc; typedef intobjargproc ssizeobjargproc; typedef intintobjargproc ssizessizeobjargproc; typedef getreadbufferproc readbufferproc; typedef getwritebufferproc writebufferproc; typedef getsegcountproc segcountproc; typedef getcharbufferproc charbufferproc; static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) { long result = 0; PyObject *i = PyNumber_Int(x); if (i) { result = PyInt_AsLong(i); Py_DECREF(i); } return result; } #endif #if PY_VERSION_HEX < 0x02050000 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x) #endif #if PY_VERSION_HEX < 0x02040000 #define Py_VISIT(op) \ do { \ if (op) { \ int vret = visit((op), arg); \ if (vret) \ return vret; \ } \ } while (0) #endif #if PY_VERSION_HEX < 0x02030000 typedef struct { PyTypeObject type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; PyBufferProcs as_buffer; PyObject *name, *slots; } PyHeapTypeObject; #endif #if PY_VERSION_HEX < 0x02030000 typedef destructor freefunc; #endif #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION > 3)) # define SWIGPY_USE_CAPSULE # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) #endif #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ #if PY_VERSION_HEX >= 0x03000000 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { return PyInstanceMethod_New(func); } #else SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) { return NULL; } #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #ifdef SWIGPYTHON_BUILTIN #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) #else #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #endif #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ #if defined(SWIGPYTHON_BUILTIN) SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } #else SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); } #endif /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { register int i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; } return 2; } PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) #ifdef __cplusplus extern "C" { #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; PyTypeObject *pytype; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; data->pytype = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; #ifdef SWIGPYTHON_BUILTIN PyObject *dict; #endif } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { # ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); # else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); # endif # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); return res; } SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); #ifdef SWIGPYTHON_BUILTIN static swig_type_info *SwigPyObject_stype = 0; SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { SwigPyClientData *cd; assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; assert(cd); assert(cd->pytype); return cd->pytype; } #else SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); return type; } #endif SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { #ifdef SWIGPYTHON_BUILTIN PyTypeObject *target_tp = SwigPyObject_type(); if (PyType_IsSubtype(op->ob_type, target_tp)) return 1; return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); #else return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); #endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #elif (PY_VERSION_HEX < 0x02050000) if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #else if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpyobject_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpyobject_type) < 0) return NULL; #endif } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == SwigPyPacked_TypeOnce()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpypacked_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpypacked_type) < 0) return NULL; #endif } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } static PyObject *swig_this = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { if (swig_this == NULL) swig_this = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { PyObject *obj; if (SwigPyObject_Check(pyobj)) return (SwigPyObject *) pyobj; #ifdef SWIGPYTHON_BUILTIN (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { pyobj = PyWeakref_GET_OBJECT(pyobj); if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } # endif return NULL; #else obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; #endif } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { int res; SwigPyObject *sobj; if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } res = SWIG_ERROR; sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } res = SWIG_OK; } else { if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } } return res; } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); if (inst) { PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst = 0; PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { SwigPyClientData *clientdata; PyObject * robj; int own; if (!ptr) return SWIG_Py_Void(); clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; if (clientdata && clientdata->pytype) { SwigPyObject *newobj; if (flags & SWIG_BUILTIN_TP_INIT) { newobj = (SwigPyObject*) self; if (newobj->ptr) { PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); while (newobj->next) newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; newobj = (SwigPyObject *)next_self; } } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); } if (newobj) { newobj->ptr = ptr; newobj->ty = type; newobj->own = own; newobj->next = 0; #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif return (PyObject*) newobj; } return SWIG_Py_Void(); } assert(!(flags & SWIG_BUILTIN_TP_INIT)); robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); Py_DECREF(robj); robj = inst; } return robj; } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else # ifdef SWIGPY_USE_CAPSULE type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); # else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); # endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void #ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) #else SWIG_Python_DestroyModule(void *vptr) #endif { #ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); #else swig_module_info *swig_module = (swig_module_info *) vptr; #endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); swig_this = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif #ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #else PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #endif } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { #ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); #else descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); #endif } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { #ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); #else obj = PyCObject_FromVoidPtr(descriptor, NULL); #endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : ""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef SWIGPYTHON_BUILTIN SWIGRUNTIME int SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyTypeObject *tp = obj->ob_type; PyObject *descr; PyObject *encoded_name; descrsetfunc f; int res; # ifdef Py_USING_UNICODE if (PyString_Check(name)) { name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); if (!name) return -1; } else if (!PyUnicode_Check(name)) # else if (!PyString_Check(name)) # endif { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { Py_INCREF(name); } if (!tp->tp_dict) { if (PyType_Ready(tp) < 0) goto done; } res = -1; descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL) f = descr->ob_type->tp_descr_set; if (!f) { if (PyString_Check(name)) { encoded_name = name; Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: Py_DECREF(name); return res; } #endif #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_char swig_types[0] #define SWIGTYPE_p_std__exception swig_types[1] #define SWIGTYPE_p_std__ostream swig_types[2] #define SWIGTYPE_p_vips__VError swig_types[3] static swig_type_info *swig_types[5]; static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif /*----------------------------------------------- @(target):= verrormodule.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit_verrormodule #else # define SWIG_init initverrormodule #endif #define SWIG_name "verrormodule" #define SWIGVERSION 0x020010 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include namespace swig { class SwigPtr_PyObject { protected: PyObject *_obj; public: SwigPtr_PyObject() :_obj(0) { } SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { Py_XINCREF(_obj); } SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { Py_XINCREF(_obj); } } SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { Py_XINCREF(item._obj); Py_XDECREF(_obj); _obj = item._obj; return *this; } ~SwigPtr_PyObject() { Py_XDECREF(_obj); } operator PyObject *() const { return _obj; } PyObject *operator->() const { return _obj; } }; } namespace swig { struct SwigVar_PyObject : SwigPtr_PyObject { SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; return *this; } }; } #include #include #include SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsPtr_std_string (PyObject * obj, std::string **val) { char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { if (buf) { if (val) *val = new std::string(buf, size - 1); if (alloc == SWIG_NEWOBJ) delete[] buf; return SWIG_NEWOBJ; } else { if (val) *val = 0; return SWIG_OLDOBJ; } } else { static int init = 0; static swig_type_info* descriptor = 0; if (!init) { descriptor = SWIG_TypeQuery("std::string" " *"); init = 1; } if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); if (SWIG_IsOK(res) && val) *val = vptr; return res; } } return SWIG_ERROR; } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int (PyObject * obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< int >(v); } } return res; } SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromStringAndSize(carray, static_cast< int >(size)); #else return PyString_FromStringAndSize(carray, static_cast< int >(size)); #endif } } else { return SWIG_Py_Void(); } } SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERN char const *vips_VError___str__(vips::VError *self){ return self->what (); } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_new_VError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string arg1 ; PyObject * obj0 = 0 ; vips::VError *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VError",&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VError" "', argument " "1"" of type '" "std::string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (vips::VError *)new vips::VError(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_VError")) SWIG_fail; result = (vips::VError *)new vips::VError(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VError(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 1) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_VError__SWIG_1(self, args); } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VError__SWIG_0(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VError'.\n" " Possible C/C++ prototypes are:\n" " vips::VError::VError(std::string)\n" " vips::VError::VError()\n"); return 0; } SWIGINTERN PyObject *_wrap_delete_VError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *arg1 = (vips::VError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_VError",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VError" "', argument " "1"" of type '" "vips::VError *""'"); } arg1 = reinterpret_cast< vips::VError * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VError_perror__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *arg1 = (vips::VError *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VError_perror",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_perror" "', argument " "1"" of type '" "vips::VError *""'"); } arg1 = reinterpret_cast< vips::VError * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VError_perror" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); (arg1)->perror((char const *)arg2); resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VError_perror__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *arg1 = (vips::VError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VError_perror",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_perror" "', argument " "1"" of type '" "vips::VError *""'"); } arg1 = reinterpret_cast< vips::VError * >(argp1); (arg1)->perror(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VError_perror(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VError_perror__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VError_perror__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VError_perror'.\n" " Possible C/C++ prototypes are:\n" " vips::VError::perror(char const *)\n" " vips::VError::perror()\n"); return 0; } SWIGINTERN PyObject *_wrap_VError_app__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *arg1 = (vips::VError *) 0 ; std::string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VError *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VError_app",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_app" "', argument " "1"" of type '" "vips::VError *""'"); } arg1 = reinterpret_cast< vips::VError * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VError_app" "', argument " "2"" of type '" "std::string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (vips::VError *) &(arg1)->app(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VError_app__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *arg1 = (vips::VError *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VError *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VError_app",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_app" "', argument " "1"" of type '" "vips::VError *""'"); } arg1 = reinterpret_cast< vips::VError * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VError_app" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); result = (vips::VError *) &(arg1)->app(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VError, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VError_app(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VError_app__SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VError, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VError_app__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VError_app'.\n" " Possible C/C++ prototypes are:\n" " vips::VError::app(std::string)\n" " vips::VError::app(int const)\n"); return 0; } SWIGINTERN PyObject *_wrap_VError_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *arg1 = (vips::VError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VError_what",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_what" "', argument " "1"" of type '" "vips::VError const *""'"); } arg1 = reinterpret_cast< vips::VError * >(argp1); result = (char *)((vips::VError const *)arg1)->what(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VError_ostream_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *arg1 = (vips::VError *) 0 ; std::ostream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VError_ostream_print",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError_ostream_print" "', argument " "1"" of type '" "vips::VError const *""'"); } arg1 = reinterpret_cast< vips::VError * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VError_ostream_print" "', argument " "2"" of type '" "std::ostream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VError_ostream_print" "', argument " "2"" of type '" "std::ostream &""'"); } arg2 = reinterpret_cast< std::ostream * >(argp2); ((vips::VError const *)arg1)->ostream_print(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VError___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VError *arg1 = (vips::VError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VError___str__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VError___str__" "', argument " "1"" of type '" "vips::VError *""'"); } arg1 = reinterpret_cast< vips::VError * >(argp1); result = (char *)vips_VError___str__(arg1); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *VError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_vips__VError, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap___lshift__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::ostream *arg1 = 0 ; vips::VError *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::ostream *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:__lshift__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ostream, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'"); } arg1 = reinterpret_cast< std::ostream * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VError, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VError const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VError const &""'"); } arg2 = reinterpret_cast< vips::VError * >(argp2); result = (std::ostream *) &vips::operator <<(*arg1,(vips::VError const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_verror__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string arg1 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:verror",&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "verror" "', argument " "1"" of type '" "std::string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { vips::verror(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_verror__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":verror")) SWIG_fail; try { vips::verror(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_verror(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 1) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_verror__SWIG_1(self, args); } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_verror__SWIG_0(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'verror'.\n" " Possible C/C++ prototypes are:\n" " vips::verror(std::string)\n" " vips::verror()\n"); return 0; } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"new_VError", _wrap_new_VError, METH_VARARGS, NULL}, { (char *)"delete_VError", _wrap_delete_VError, METH_VARARGS, NULL}, { (char *)"VError_perror", _wrap_VError_perror, METH_VARARGS, NULL}, { (char *)"VError_app", _wrap_VError_app, METH_VARARGS, NULL}, { (char *)"VError_what", _wrap_VError_what, METH_VARARGS, NULL}, { (char *)"VError_ostream_print", _wrap_VError_ostream_print, METH_VARARGS, NULL}, { (char *)"VError___str__", _wrap_VError___str__, METH_VARARGS, NULL}, { (char *)"VError_swigregister", VError_swigregister, METH_VARARGS, NULL}, { (char *)"__lshift__", _wrap___lshift__, METH_VARARGS, NULL}, { (char *)"verror", _wrap_verror, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static void *_p_vips__VErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((std::exception *) ((vips::VError *) x)); } static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_char, &_swigt__p_std__exception, &_swigt__p_std__ostream, &_swigt__p_vips__VError, }; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__exception[] = { {&_swigt__p_std__exception, 0, 0, 0}, {&_swigt__p_vips__VError, _p_vips__VErrorTo_p_std__exception, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_char, _swigc__p_std__exception, _swigc__p_std__ostream, _swigc__p_vips__VError, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString(""); #else return PyString_FromString(""); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ (printfunc) swig_varlink_print, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 varlink_type.ob_type = &PyType_Type; #else if (PyType_Ready(&varlink_type) < 0) return NULL; #endif } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d, *md; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { # if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, # else { PyObject_HEAD_INIT(NULL) NULL, /* m_init */ 0, /* m_index */ NULL, /* m_copy */ }, # endif (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif #if defined(SWIGPYTHON_BUILTIN) static SwigPyClientData SwigPyObject_clientdata = { 0, 0, 0, 0, 0, 0, 0 }; static PyGetSetDef this_getset_def = { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { (PyCFunction) SwigPyObject_own, (PyCFunction) SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; PyObject *thisown_descr; int i; (void)builtin_pytype; (void)builtin_base_count; (void)builtin_basetype; (void)tuple; (void)static_getset; /* metatype is used to implement static member variables. */ metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); assert(metatype_args); metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); assert(metatype); Py_DECREF(metatype_args); metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; assert(PyType_Ready(metatype) >= 0); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); (void)md; SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; # else return; # endif } /* All objects have a 'this' attribute */ this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); (void)this_descr; /* All objects have a 'thisown' attribute */ thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); (void)thisown_descr; public_interface = PyList_New(0); public_symbol = 0; (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); #endif SWIG_InstallConstants(d,swig_const_table); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif } vips-7.38.5/swig/vipsCC/vdisplaymodule.cxx0000644000175000017500000036047412303145376015467 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb) { int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) #define PyString_Check(name) PyBytes_Check(name) #define PyString_FromString(x) PyUnicode_FromString(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #define PyString_AsString(str) PyBytes_AsString(str) #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN typedef inquiry lenfunc; typedef intargfunc ssizeargfunc; typedef intintargfunc ssizessizeargfunc; typedef intobjargproc ssizeobjargproc; typedef intintobjargproc ssizessizeobjargproc; typedef getreadbufferproc readbufferproc; typedef getwritebufferproc writebufferproc; typedef getsegcountproc segcountproc; typedef getcharbufferproc charbufferproc; static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) { long result = 0; PyObject *i = PyNumber_Int(x); if (i) { result = PyInt_AsLong(i); Py_DECREF(i); } return result; } #endif #if PY_VERSION_HEX < 0x02050000 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x) #endif #if PY_VERSION_HEX < 0x02040000 #define Py_VISIT(op) \ do { \ if (op) { \ int vret = visit((op), arg); \ if (vret) \ return vret; \ } \ } while (0) #endif #if PY_VERSION_HEX < 0x02030000 typedef struct { PyTypeObject type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; PyBufferProcs as_buffer; PyObject *name, *slots; } PyHeapTypeObject; #endif #if PY_VERSION_HEX < 0x02030000 typedef destructor freefunc; #endif #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION > 3)) # define SWIGPY_USE_CAPSULE # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) #endif #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ #if PY_VERSION_HEX >= 0x03000000 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { return PyInstanceMethod_New(func); } #else SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) { return NULL; } #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #ifdef SWIGPYTHON_BUILTIN #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) #else #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #endif #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ #if defined(SWIGPYTHON_BUILTIN) SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } #else SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); } #endif /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { register int i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; } return 2; } PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) #ifdef __cplusplus extern "C" { #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; PyTypeObject *pytype; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; data->pytype = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; #ifdef SWIGPYTHON_BUILTIN PyObject *dict; #endif } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { # ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); # else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); # endif # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); return res; } SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); #ifdef SWIGPYTHON_BUILTIN static swig_type_info *SwigPyObject_stype = 0; SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { SwigPyClientData *cd; assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; assert(cd); assert(cd->pytype); return cd->pytype; } #else SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); return type; } #endif SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { #ifdef SWIGPYTHON_BUILTIN PyTypeObject *target_tp = SwigPyObject_type(); if (PyType_IsSubtype(op->ob_type, target_tp)) return 1; return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); #else return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); #endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #elif (PY_VERSION_HEX < 0x02050000) if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #else if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpyobject_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpyobject_type) < 0) return NULL; #endif } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == SwigPyPacked_TypeOnce()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpypacked_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpypacked_type) < 0) return NULL; #endif } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } static PyObject *swig_this = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { if (swig_this == NULL) swig_this = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { PyObject *obj; if (SwigPyObject_Check(pyobj)) return (SwigPyObject *) pyobj; #ifdef SWIGPYTHON_BUILTIN (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { pyobj = PyWeakref_GET_OBJECT(pyobj); if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } # endif return NULL; #else obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; #endif } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { int res; SwigPyObject *sobj; if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } res = SWIG_ERROR; sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } res = SWIG_OK; } else { if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } } return res; } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); if (inst) { PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst = 0; PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { SwigPyClientData *clientdata; PyObject * robj; int own; if (!ptr) return SWIG_Py_Void(); clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; if (clientdata && clientdata->pytype) { SwigPyObject *newobj; if (flags & SWIG_BUILTIN_TP_INIT) { newobj = (SwigPyObject*) self; if (newobj->ptr) { PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); while (newobj->next) newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; newobj = (SwigPyObject *)next_self; } } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); } if (newobj) { newobj->ptr = ptr; newobj->ty = type; newobj->own = own; newobj->next = 0; #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif return (PyObject*) newobj; } return SWIG_Py_Void(); } assert(!(flags & SWIG_BUILTIN_TP_INIT)); robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); Py_DECREF(robj); robj = inst; } return robj; } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else # ifdef SWIGPY_USE_CAPSULE type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); # else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); # endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void #ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) #else SWIG_Python_DestroyModule(void *vptr) #endif { #ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); #else swig_module_info *swig_module = (swig_module_info *) vptr; #endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); swig_this = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif #ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #else PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #endif } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { #ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); #else descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); #endif } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { #ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); #else obj = PyCObject_FromVoidPtr(descriptor, NULL); #endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : ""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef SWIGPYTHON_BUILTIN SWIGRUNTIME int SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyTypeObject *tp = obj->ob_type; PyObject *descr; PyObject *encoded_name; descrsetfunc f; int res; # ifdef Py_USING_UNICODE if (PyString_Check(name)) { name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); if (!name) return -1; } else if (!PyUnicode_Check(name)) # else if (!PyString_Check(name)) # endif { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { Py_INCREF(name); } if (!tp->tp_dict) { if (PyType_Ready(tp) < 0) goto done; } res = -1; descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL) f = descr->ob_type->tp_descr_set; if (!f) { if (PyString_Check(name)) { encoded_name = name; Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: Py_DECREF(name); return res; } #endif #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_char swig_types[0] #define SWIGTYPE_p_im_col_tab_disp swig_types[1] #define SWIGTYPE_p_matrix swig_types[2] #define SWIGTYPE_p_vips__VDisplay swig_types[3] #define SWIGTYPE_p_vips__VError swig_types[4] #define SWIGTYPE_p_void swig_types[5] static swig_type_info *swig_types[7]; static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif /*----------------------------------------------- @(target):= vdisplaymodule.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit_vdisplaymodule #else # define SWIG_init initvdisplaymodule #endif #define SWIG_name "vdisplaymodule" #define SWIGVERSION 0x020010 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include namespace swig { class SwigPtr_PyObject { protected: PyObject *_obj; public: SwigPtr_PyObject() :_obj(0) { } SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { Py_XINCREF(_obj); } SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { Py_XINCREF(_obj); } } SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { Py_XINCREF(item._obj); Py_XDECREF(_obj); _obj = item._obj; return *this; } ~SwigPtr_PyObject() { Py_XDECREF(_obj); } operator PyObject *() const { return _obj; } PyObject *operator->() const { return _obj; } }; } namespace swig { struct SwigVar_PyObject : SwigPtr_PyObject { SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; return *this; } }; } #include SWIGINTERNINLINE PyObject* SWIG_From_int (int value) { return PyInt_FromLong((long) value); } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VDisplay *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VDisplay",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDisplay" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (vips::VDisplay *)new vips::VDisplay((char const *)arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDisplay *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_VDisplay")) SWIG_fail; result = (vips::VDisplay *)new vips::VDisplay(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VDisplay__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDisplay *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDisplay *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VDisplay",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDisplay" "', argument " "1"" of type '" "vips::VDisplay const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VDisplay" "', argument " "1"" of type '" "vips::VDisplay const &""'"); } arg1 = reinterpret_cast< vips::VDisplay * >(argp1); result = (vips::VDisplay *)new vips::VDisplay((vips::VDisplay const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VDisplay(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 1) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_VDisplay__SWIG_1(self, args); } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VDisplay, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VDisplay__SWIG_2(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VDisplay__SWIG_0(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VDisplay'.\n" " Possible C/C++ prototypes are:\n" " vips::VDisplay::VDisplay(char const *)\n" " vips::VDisplay::VDisplay()\n" " vips::VDisplay::VDisplay(vips::VDisplay const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_VDisplay___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDisplay *arg1 = (vips::VDisplay *) 0 ; vips::VDisplay *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VDisplay *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VDisplay___assign__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay___assign__" "', argument " "1"" of type '" "vips::VDisplay *""'"); } arg1 = reinterpret_cast< vips::VDisplay * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDisplay___assign__" "', argument " "2"" of type '" "vips::VDisplay const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDisplay___assign__" "', argument " "2"" of type '" "vips::VDisplay const &""'"); } arg2 = reinterpret_cast< vips::VDisplay * >(argp2); result = (vips::VDisplay *) &(arg1)->operator =((vips::VDisplay const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDisplay, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_VDisplay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDisplay *arg1 = (vips::VDisplay *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_VDisplay",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VDisplay" "', argument " "1"" of type '" "vips::VDisplay *""'"); } arg1 = reinterpret_cast< vips::VDisplay * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDisplay_disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDisplay *arg1 = (vips::VDisplay *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VDisplay_disp",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay_disp" "', argument " "1"" of type '" "vips::VDisplay const *""'"); } arg1 = reinterpret_cast< vips::VDisplay * >(argp1); result = (void *)((vips::VDisplay const *)arg1)->disp(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDisplay_luts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDisplay *arg1 = (vips::VDisplay *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; im_col_tab_disp *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VDisplay_luts",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDisplay, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDisplay_luts" "', argument " "1"" of type '" "vips::VDisplay const *""'"); } arg1 = reinterpret_cast< vips::VDisplay * >(argp1); try { result = (im_col_tab_disp *)((vips::VDisplay const *)arg1)->luts(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_im_col_tab_disp, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *VDisplay_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_vips__VDisplay, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"new_VDisplay", _wrap_new_VDisplay, METH_VARARGS, NULL}, { (char *)"VDisplay___assign__", _wrap_VDisplay___assign__, METH_VARARGS, NULL}, { (char *)"delete_VDisplay", _wrap_delete_VDisplay, METH_VARARGS, NULL}, { (char *)"VDisplay_disp", _wrap_VDisplay_disp, METH_VARARGS, NULL}, { (char *)"VDisplay_luts", _wrap_VDisplay_luts, METH_VARARGS, NULL}, { (char *)"VDisplay_swigregister", VDisplay_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_im_col_tab_disp = {"_p_im_col_tab_disp", "im_col_tab_disp *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VDisplay = {"_p_vips__VDisplay", "vips::VDisplay *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_char, &_swigt__p_im_col_tab_disp, &_swigt__p_matrix, &_swigt__p_vips__VDisplay, &_swigt__p_vips__VError, &_swigt__p_void, }; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_im_col_tab_disp[] = { {&_swigt__p_im_col_tab_disp, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VDisplay[] = { {&_swigt__p_vips__VDisplay, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_char, _swigc__p_im_col_tab_disp, _swigc__p_matrix, _swigc__p_vips__VDisplay, _swigc__p_vips__VError, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString(""); #else return PyString_FromString(""); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ (printfunc) swig_varlink_print, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 varlink_type.ob_type = &PyType_Type; #else if (PyType_Ready(&varlink_type) < 0) return NULL; #endif } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d, *md; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { # if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, # else { PyObject_HEAD_INIT(NULL) NULL, /* m_init */ 0, /* m_index */ NULL, /* m_copy */ }, # endif (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif #if defined(SWIGPYTHON_BUILTIN) static SwigPyClientData SwigPyObject_clientdata = { 0, 0, 0, 0, 0, 0, 0 }; static PyGetSetDef this_getset_def = { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { (PyCFunction) SwigPyObject_own, (PyCFunction) SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; PyObject *thisown_descr; int i; (void)builtin_pytype; (void)builtin_base_count; (void)builtin_basetype; (void)tuple; (void)static_getset; /* metatype is used to implement static member variables. */ metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); assert(metatype_args); metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); assert(metatype); Py_DECREF(metatype_args); metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; assert(PyType_Ready(metatype) >= 0); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); (void)md; SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; # else return; # endif } /* All objects have a 'this' attribute */ this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); (void)this_descr; /* All objects have a 'thisown' attribute */ thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); (void)thisown_descr; public_interface = PyList_New(0); public_symbol = 0; (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); #endif SWIG_InstallConstants(d,swig_const_table); SWIG_Python_SetConstant(d, "VDisplay_BARCO",SWIG_From_int(static_cast< int >(vips::VDisplay::BARCO))); SWIG_Python_SetConstant(d, "VDisplay_DUMB",SWIG_From_int(static_cast< int >(vips::VDisplay::DUMB))); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif } vips-7.38.5/swig/vipsCC/VDisplay.py0000644000175000017500000000603712303145376013777 00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('vdisplaymodule', [dirname(__file__)]) except ImportError: import vdisplaymodule return vdisplaymodule if fp is not None: try: _mod = imp.load_module('vdisplaymodule', fp, pathname, description) finally: fp.close() return _mod vdisplaymodule = swig_import_helper() del swig_import_helper else: import vdisplaymodule del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 import VError class VDisplay(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, VDisplay, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, VDisplay, name) __repr__ = _swig_repr BARCO = vdisplaymodule.VDisplay_BARCO DUMB = vdisplaymodule.VDisplay_DUMB def __init__(self, *args): this = vdisplaymodule.new_VDisplay(*args) try: self.this.append(this) except: self.this = this def __assign__(self, *args): return vdisplaymodule.VDisplay___assign__(self, *args) __swig_destroy__ = vdisplaymodule.delete_VDisplay __del__ = lambda self : None; def disp(self): return vdisplaymodule.VDisplay_disp(self) def luts(self): return vdisplaymodule.VDisplay_luts(self) VDisplay_swigregister = vdisplaymodule.VDisplay_swigregister VDisplay_swigregister(VDisplay) # This file is compatible with both classic and new-style classes. vips-7.38.5/swig/vipsCC/VError.py0000644000175000017500000000635012303145400013445 00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('verrormodule', [dirname(__file__)]) except ImportError: import verrormodule return verrormodule if fp is not None: try: _mod = imp.load_module('verrormodule', fp, pathname, description) finally: fp.close() return _mod verrormodule = swig_import_helper() del swig_import_helper else: import verrormodule del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 class VError(Exception): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, VError, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, VError, name) __repr__ = _swig_repr def __init__(self, *args): this = verrormodule.new_VError(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = verrormodule.delete_VError __del__ = lambda self : None; def perror(self, *args): return verrormodule.VError_perror(self, *args) def app(self, *args): return verrormodule.VError_app(self, *args) def what(self): return verrormodule.VError_what(self) def ostream_print(self, *args): return verrormodule.VError_ostream_print(self, *args) def __str__(self): return verrormodule.VError___str__(self) VError_swigregister = verrormodule.VError_swigregister VError_swigregister(VError) def __lshift__(*args): return verrormodule.__lshift__(*args) __lshift__ = verrormodule.__lshift__ def verror(str=""): return verrormodule.verror(str) verror = verrormodule.verror # This file is compatible with both classic and new-style classes. vips-7.38.5/swig/vipsCC/vimagemodule.cxx0000644000175000017500000454230212303145341015070 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb) { int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) #define PyString_Check(name) PyBytes_Check(name) #define PyString_FromString(x) PyUnicode_FromString(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #define PyString_AsString(str) PyBytes_AsString(str) #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN typedef inquiry lenfunc; typedef intargfunc ssizeargfunc; typedef intintargfunc ssizessizeargfunc; typedef intobjargproc ssizeobjargproc; typedef intintobjargproc ssizessizeobjargproc; typedef getreadbufferproc readbufferproc; typedef getwritebufferproc writebufferproc; typedef getsegcountproc segcountproc; typedef getcharbufferproc charbufferproc; static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) { long result = 0; PyObject *i = PyNumber_Int(x); if (i) { result = PyInt_AsLong(i); Py_DECREF(i); } return result; } #endif #if PY_VERSION_HEX < 0x02050000 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x) #endif #if PY_VERSION_HEX < 0x02040000 #define Py_VISIT(op) \ do { \ if (op) { \ int vret = visit((op), arg); \ if (vret) \ return vret; \ } \ } while (0) #endif #if PY_VERSION_HEX < 0x02030000 typedef struct { PyTypeObject type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; PyBufferProcs as_buffer; PyObject *name, *slots; } PyHeapTypeObject; #endif #if PY_VERSION_HEX < 0x02030000 typedef destructor freefunc; #endif #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION > 3)) # define SWIGPY_USE_CAPSULE # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) #endif #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ #if PY_VERSION_HEX >= 0x03000000 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { return PyInstanceMethod_New(func); } #else SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) { return NULL; } #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #ifdef SWIGPYTHON_BUILTIN #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) #else #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #endif #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ #if defined(SWIGPYTHON_BUILTIN) SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } #else SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); } #endif /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { register int i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; } return 2; } PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) #ifdef __cplusplus extern "C" { #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; PyTypeObject *pytype; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; data->pytype = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; #ifdef SWIGPYTHON_BUILTIN PyObject *dict; #endif } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { # ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); # else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); # endif # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); return res; } SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); #ifdef SWIGPYTHON_BUILTIN static swig_type_info *SwigPyObject_stype = 0; SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { SwigPyClientData *cd; assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; assert(cd); assert(cd->pytype); return cd->pytype; } #else SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); return type; } #endif SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { #ifdef SWIGPYTHON_BUILTIN PyTypeObject *target_tp = SwigPyObject_type(); if (PyType_IsSubtype(op->ob_type, target_tp)) return 1; return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); #else return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); #endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #elif (PY_VERSION_HEX < 0x02050000) if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #else if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpyobject_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpyobject_type) < 0) return NULL; #endif } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == SwigPyPacked_TypeOnce()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpypacked_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpypacked_type) < 0) return NULL; #endif } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } static PyObject *swig_this = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { if (swig_this == NULL) swig_this = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { PyObject *obj; if (SwigPyObject_Check(pyobj)) return (SwigPyObject *) pyobj; #ifdef SWIGPYTHON_BUILTIN (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { pyobj = PyWeakref_GET_OBJECT(pyobj); if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } # endif return NULL; #else obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; #endif } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { int res; SwigPyObject *sobj; if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } res = SWIG_ERROR; sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } res = SWIG_OK; } else { if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } } return res; } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); if (inst) { PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst = 0; PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { SwigPyClientData *clientdata; PyObject * robj; int own; if (!ptr) return SWIG_Py_Void(); clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; if (clientdata && clientdata->pytype) { SwigPyObject *newobj; if (flags & SWIG_BUILTIN_TP_INIT) { newobj = (SwigPyObject*) self; if (newobj->ptr) { PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); while (newobj->next) newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; newobj = (SwigPyObject *)next_self; } } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); } if (newobj) { newobj->ptr = ptr; newobj->ty = type; newobj->own = own; newobj->next = 0; #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif return (PyObject*) newobj; } return SWIG_Py_Void(); } assert(!(flags & SWIG_BUILTIN_TP_INIT)); robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); Py_DECREF(robj); robj = inst; } return robj; } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else # ifdef SWIGPY_USE_CAPSULE type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); # else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); # endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void #ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) #else SWIG_Python_DestroyModule(void *vptr) #endif { #ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); #else swig_module_info *swig_module = (swig_module_info *) vptr; #endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); swig_this = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif #ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #else PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #endif } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { #ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); #else descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); #endif } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { #ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); #else obj = PyCObject_FromVoidPtr(descriptor, NULL); #endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : ""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef SWIGPYTHON_BUILTIN SWIGRUNTIME int SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyTypeObject *tp = obj->ob_type; PyObject *descr; PyObject *encoded_name; descrsetfunc f; int res; # ifdef Py_USING_UNICODE if (PyString_Check(name)) { name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); if (!name) return -1; } else if (!PyUnicode_Check(name)) # else if (!PyString_Check(name)) # endif { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { Py_INCREF(name); } if (!tp->tp_dict) { if (PyType_Ready(tp) < 0) goto done; } res = -1; descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL) f = descr->ob_type->tp_descr_set; if (!f) { if (PyString_Check(name)) { encoded_name = name; Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: Py_DECREF(name); return res; } #endif #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_GType swig_types[0] #define SWIGTYPE_p_VBuffer swig_types[1] #define SWIGTYPE_p__VipsImage swig_types[2] #define SWIGTYPE_p_allocator_type swig_types[3] #define SWIGTYPE_p_char swig_types[4] #define SWIGTYPE_p_difference_type swig_types[5] #define SWIGTYPE_p_double swig_types[6] #define SWIGTYPE_p_float swig_types[7] #define SWIGTYPE_p_gboolean swig_types[8] #define SWIGTYPE_p_int swig_types[9] #define SWIGTYPE_p_matrix swig_types[10] #define SWIGTYPE_p_p_PyObject swig_types[11] #define SWIGTYPE_p_p_char swig_types[12] #define SWIGTYPE_p_size_t swig_types[13] #define SWIGTYPE_p_size_type swig_types[14] #define SWIGTYPE_p_std__allocatorT_double_t swig_types[15] #define SWIGTYPE_p_std__allocatorT_int_t swig_types[16] #define SWIGTYPE_p_std__allocatorT_vips__VImage_t swig_types[17] #define SWIGTYPE_p_std__invalid_argument swig_types[18] #define SWIGTYPE_p_std__vectorT__Tp__Alloc_t swig_types[19] #define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[20] #define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[21] #define SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t swig_types[22] #define SWIGTYPE_p_swig__SwigPyIterator swig_types[23] #define SWIGTYPE_p_value_type swig_types[24] #define SWIGTYPE_p_vips__VDMask swig_types[25] #define SWIGTYPE_p_vips__VDisplay swig_types[26] #define SWIGTYPE_p_vips__VError swig_types[27] #define SWIGTYPE_p_vips__VIMask swig_types[28] #define SWIGTYPE_p_vips__VImage swig_types[29] #define SWIGTYPE_p_void swig_types[30] static swig_type_info *swig_types[32]; static swig_module_info swig_module = {swig_types, 31, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif /*----------------------------------------------- @(target):= vimagemodule.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit_vimagemodule #else # define SWIG_init initvimagemodule #endif #define SWIG_name "vimagemodule" #define SWIGVERSION 0x020010 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include namespace swig { class SwigPtr_PyObject { protected: PyObject *_obj; public: SwigPtr_PyObject() :_obj(0) { } SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { Py_XINCREF(_obj); } SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { Py_XINCREF(_obj); } } SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { Py_XINCREF(item._obj); Py_XDECREF(_obj); _obj = item._obj; return *this; } ~SwigPtr_PyObject() { Py_XDECREF(_obj); } operator PyObject *() const { return _obj; } PyObject *operator->() const { return _obj; } }; } namespace swig { struct SwigVar_PyObject : SwigPtr_PyObject { SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; return *this; } }; } #include /* We need the C API too for the args init and some of the * frombuffer/tobuffer stuff. */ #include #include #if PY_VERSION_HEX >= 0x03020000 # define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) #else # define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) #endif #include #if defined(__GNUC__) # if __GNUC__ == 2 && __GNUC_MINOR <= 96 # define SWIG_STD_NOMODERN_STL # endif #endif #include #include #include #include namespace swig { struct stop_iteration { }; struct SwigPyIterator { private: SwigPtr_PyObject _seq; protected: SwigPyIterator(PyObject *seq) : _seq(seq) { } public: virtual ~SwigPyIterator() {} // Access iterator method, required by Python virtual PyObject *value() const = 0; // Forward iterator method, required by Python virtual SwigPyIterator *incr(size_t n = 1) = 0; // Backward iterator method, very common in C++, but not required in Python virtual SwigPyIterator *decr(size_t /*n*/ = 1) { throw stop_iteration(); } // Random access iterator methods, but not required in Python virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } virtual bool equal (const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } // C++ common/needed methods virtual SwigPyIterator *copy() const = 0; PyObject *next() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads PyObject *obj = value(); incr(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } /* Make an alias for Python 3.x */ PyObject *__next__() { return next(); } PyObject *previous() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads decr(); PyObject *obj = value(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } SwigPyIterator *advance(ptrdiff_t n) { return (n > 0) ? incr(n) : decr(-n); } bool operator == (const SwigPyIterator& x) const { return equal(x); } bool operator != (const SwigPyIterator& x) const { return ! operator==(x); } SwigPyIterator& operator += (ptrdiff_t n) { return *advance(n); } SwigPyIterator& operator -= (ptrdiff_t n) { return *advance(-n); } SwigPyIterator* operator + (ptrdiff_t n) const { return copy()->advance(n); } SwigPyIterator* operator - (ptrdiff_t n) const { return copy()->advance(-n); } ptrdiff_t operator - (const SwigPyIterator& x) const { return x.distance(*this); } static swig_type_info* descriptor() { static int init = 0; static swig_type_info* desc = 0; if (!init) { desc = SWIG_TypeQuery("swig::SwigPyIterator *"); init = 1; } return desc; } }; #if defined(SWIGPYTHON_BUILTIN) inline PyObject* make_output_iterator_builtin (PyObject *pyself) { Py_INCREF(pyself); return pyself; } #endif } SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { #if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(obj)) { long v = PyInt_AsLong(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else #endif if (PyLong_Check(obj)) { unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); #if PY_VERSION_HEX >= 0x03000000 { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (v < 0) { return SWIG_OverflowError; } } else { PyErr_Clear(); } } #endif } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_size_t (PyObject * obj, size_t *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); return res; } #define SWIG_From_long PyLong_FromLong SWIGINTERNINLINE PyObject * SWIG_From_ptrdiff_t (ptrdiff_t value) { return SWIG_From_long (static_cast< long >(value)); } SWIGINTERNINLINE PyObject* SWIG_From_bool (bool value) { return PyBool_FromLong(value ? 1 : 0); } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) { long v; int res = SWIG_AsVal_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); return res; } #include #include #include #include #include #include namespace swig { template struct noconst_traits { typedef Type noconst_type; }; template struct noconst_traits { typedef Type noconst_type; }; /* type categories */ struct pointer_category { }; struct value_category { }; /* General traits that provides type_name and type_info */ template struct traits { }; template inline const char* type_name() { return traits::noconst_type >::type_name(); } template struct traits_info { static swig_type_info *type_query(std::string name) { name += " *"; return SWIG_TypeQuery(name.c_str()); } static swig_type_info *type_info() { static swig_type_info *info = type_query(type_name()); return info; } }; template inline swig_type_info *type_info() { return traits_info::type_info(); } /* Partial specialization for pointers */ template struct traits { typedef pointer_category category; static std::string make_ptr_name(const char* name) { std::string ptrname = name; ptrname += " *"; return ptrname; } static const char* type_name() { static std::string name = make_ptr_name(swig::type_name()); return name.c_str(); } }; template struct traits_as { }; template struct traits_check { }; } namespace swig { /* Traits that provides the from method */ template struct traits_from_ptr { static PyObject *from(Type *val, int owner = 0) { return SWIG_InternalNewPointerObj(val, type_info(), owner); } }; template struct traits_from { static PyObject *from(const Type& val) { return traits_from_ptr::from(new Type(val), 1); } }; template struct traits_from { static PyObject *from(Type* val) { return traits_from_ptr::from(val, 0); } }; template struct traits_from { static PyObject *from(const Type* val) { return traits_from_ptr::from(const_cast(val), 0); } }; template inline PyObject *from(const Type& val) { return traits_from::from(val); } template inline PyObject *from_ptr(Type* val, int owner) { return traits_from_ptr::from(val, owner); } /* Traits that provides the asval/as/check method */ template struct traits_asptr { static int asptr(PyObject *obj, Type **val) { Type *p; int res = SWIG_ConvertPtr(obj, (void**)&p, type_info(), 0); if (SWIG_IsOK(res)) { if (val) *val = p; } return res; } }; template inline int asptr(PyObject *obj, Type **vptr) { return traits_asptr::asptr(obj, vptr); } template struct traits_asval { static int asval(PyObject *obj, Type *val) { if (val) { Type *p = 0; int res = traits_asptr::asptr(obj, &p); if (!SWIG_IsOK(res)) return res; if (p) { typedef typename noconst_traits::noconst_type noconst_type; *(const_cast(val)) = *p; if (SWIG_IsNewObj(res)){ delete p; res = SWIG_DelNewMask(res); } return res; } else { return SWIG_ERROR; } } else { return traits_asptr::asptr(obj, (Type **)(0)); } } }; template struct traits_asval { static int asval(PyObject *obj, Type **val) { if (val) { typedef typename noconst_traits::noconst_type noconst_type; noconst_type *p = 0; int res = traits_asptr::asptr(obj, &p); if (SWIG_IsOK(res)) { *(const_cast(val)) = p; } return res; } else { return traits_asptr::asptr(obj, (Type **)(0)); } } }; template inline int asval(PyObject *obj, Type *val) { return traits_asval::asval(obj, val); } template struct traits_as { static Type as(PyObject *obj, bool throw_error) { Type v; int res = asval(obj, &v); if (!obj || !SWIG_IsOK(res)) { if (!PyErr_Occurred()) { ::SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); } return v; } }; template struct traits_as { static Type as(PyObject *obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res) && v) { if (SWIG_IsNewObj(res)) { Type r(*v); delete v; return r; } else { return *v; } } else { // Uninitialized return value, no Type() constructor required. static Type *v_def = (Type*) malloc(sizeof(Type)); if (!PyErr_Occurred()) { SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); memset(v_def,0,sizeof(Type)); return *v_def; } } }; template struct traits_as { static Type* as(PyObject *obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res)) { return v; } else { if (!PyErr_Occurred()) { SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); return 0; } } }; template inline Type as(PyObject *obj, bool te = false) { return traits_as::category>::as(obj, te); } template struct traits_check { static bool check(PyObject *obj) { int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template struct traits_check { static bool check(PyObject *obj) { int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template inline bool check(PyObject *obj) { return traits_check::category>::check(obj); } } #include namespace std { template <> struct less : public binary_function { bool operator()(PyObject * v, PyObject *w) const { bool res; SWIG_PYTHON_THREAD_BEGIN_BLOCK; res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; /* This may fall into a case of inconsistent eg. ObjA > ObjX > ObjB but ObjA < ObjB */ if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) { /* Objects can't be compared, this mostly occurred in Python 3.0 */ /* Compare their ptr directly for a workaround */ res = (v < w); PyErr_Clear(); } SWIG_PYTHON_THREAD_END_BLOCK; return res; } }; template <> struct less : public binary_function { bool operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const { return std::less()(v, w); } }; template <> struct less : public binary_function { bool operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const { return std::less()(v, w); } }; } namespace swig { template <> struct traits { typedef value_category category; static const char* type_name() { return "PyObject *"; } }; template <> struct traits_asval { typedef PyObject * value_type; static int asval(PyObject *obj, value_type *val) { if (val) *val = obj; return SWIG_OK; } }; template <> struct traits_check { static bool check(PyObject *) { return true; } }; template <> struct traits_from { typedef PyObject * value_type; static PyObject *from(const value_type& val) { Py_XINCREF(val); return val; } }; } namespace swig { template inline size_t check_index(Difference i, size_t size, bool insert = false) { if ( i < 0 ) { if ((size_t) (-i) <= size) return (size_t) (i + size); } else if ( (size_t) i < size ) { return (size_t) i; } else if (insert && ((size_t) i == size)) { return size; } throw std::out_of_range("index out of range"); } template void slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) { if (step == 0) { throw std::invalid_argument("slice step cannot be zero"); } else if (step > 0) { // Required range: 0 <= i < size, 0 <= j < size if (i < 0) { ii = 0; } else if (i < (Difference)size) { ii = i; } else if (insert && (i >= (Difference)size)) { ii = (Difference)size; } if ( j < 0 ) { jj = 0; } else { jj = (j < (Difference)size) ? j : (Difference)size; } } else { // Required range: -1 <= i < size-1, -1 <= j < size-1 if (i < -1) { ii = -1; } else if (i < (Difference) size) { ii = i; } else if (i >= (Difference)(size-1)) { ii = (Difference)(size-1); } if (j < -1) { jj = -1; } else { jj = (j < (Difference)size ) ? j : (Difference)(size-1); } } } template inline typename Sequence::iterator getpos(Sequence* self, Difference i) { typename Sequence::iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template inline typename Sequence::const_iterator cgetpos(const Sequence* self, Difference i) { typename Sequence::const_iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template inline Sequence* getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) { typename Sequence::size_type size = self->size(); Difference ii = 0; Difference jj = 0; swig::slice_adjust(i, j, step, size, ii, jj); if (step > 0) { typename Sequence::const_iterator sb = self->begin(); typename Sequence::const_iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); if (step == 1) { return new Sequence(sb, se); } else { Sequence *sequence = new Sequence(); typename Sequence::const_iterator it = sb; while (it!=se) { sequence->push_back(*it); for (Py_ssize_t c=0; c jj) { typename Sequence::const_reverse_iterator sb = self->rbegin(); typename Sequence::const_reverse_iterator se = self->rbegin(); std::advance(sb,size-ii-1); std::advance(se,size-jj-1); typename Sequence::const_reverse_iterator it = sb; while (it!=se) { sequence->push_back(*it); for (Py_ssize_t c=0; c<-step && it!=se; ++c) it++; } } return sequence; } } template inline void setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) { typename Sequence::size_type size = self->size(); Difference ii = 0; Difference jj = 0; swig::slice_adjust(i, j, step, size, ii, jj, true); if (step > 0) { if (jj < ii) jj = ii; if (step == 1) { size_t ssize = jj - ii; if (ssize <= is.size()) { // expanding/staying the same size typename Sequence::iterator sb = self->begin(); typename InputSeq::const_iterator isit = is.begin(); std::advance(sb,ii); std::advance(isit, jj - ii); self->insert(std::copy(is.begin(), isit, sb), isit, is.end()); } else { // shrinking typename Sequence::iterator sb = self->begin(); typename Sequence::iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); self->erase(sb,se); sb = self->begin(); std::advance(sb,ii); self->insert(sb, is.begin(), is.end()); } } else { size_t replacecount = (jj - ii + step - 1) / step; if (is.size() != replacecount) { char msg[1024]; sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); throw std::invalid_argument(msg); } typename Sequence::const_iterator isit = is.begin(); typename Sequence::iterator it = self->begin(); std::advance(it,ii); for (size_t rc=0; rcend(); ++c) it++; } } } else { if (jj > ii) jj = ii; size_t replacecount = (ii - jj - step - 1) / -step; if (is.size() != replacecount) { char msg[1024]; sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); throw std::invalid_argument(msg); } typename Sequence::const_iterator isit = is.begin(); typename Sequence::reverse_iterator it = self->rbegin(); std::advance(it,size-ii-1); for (size_t rc=0; rcrend(); ++c) it++; } } } template inline void delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) { typename Sequence::size_type size = self->size(); Difference ii = 0; Difference jj = 0; swig::slice_adjust(i, j, step, size, ii, jj, true); if (step > 0) { if (jj > ii) { typename Sequence::iterator sb = self->begin(); std::advance(sb,ii); if (step == 1) { typename Sequence::iterator se = self->begin(); std::advance(se,jj); self->erase(sb,se); } else { typename Sequence::iterator it = sb; size_t delcount = (jj - ii + step - 1) / step; while (delcount) { it = self->erase(it); for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) it++; delcount--; } } } } else { if (ii > jj) { typename Sequence::reverse_iterator sb = self->rbegin(); std::advance(sb,size-ii-1); typename Sequence::reverse_iterator it = sb; size_t delcount = (ii - jj - step - 1) / -step; while (delcount) { it = typename Sequence::reverse_iterator(self->erase((++it).base())); for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) it++; delcount--; } } } } } #if defined(__SUNPRO_CC) && defined(_RWSTD_VER) # if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) # define SWIG_STD_NOITERATOR_TRAITS_STL # endif #endif #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) #include #else namespace std { template struct iterator_traits { typedef ptrdiff_t difference_type; typedef typename Iterator::value_type value_type; }; template struct iterator_traits<__reverse_bi_iterator > { typedef Distance difference_type; typedef T value_type; }; template struct iterator_traits { typedef T value_type; typedef ptrdiff_t difference_type; }; template inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } } #endif namespace swig { template class SwigPyIterator_T : public SwigPyIterator { public: typedef OutIterator out_iterator; typedef typename std::iterator_traits::value_type value_type; typedef SwigPyIterator_T self_type; SwigPyIterator_T(out_iterator curr, PyObject *seq) : SwigPyIterator(seq), current(curr) { } const out_iterator& get_current() const { return current; } bool equal (const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return (current == iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } ptrdiff_t distance(const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return std::distance(current, iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } protected: out_iterator current; }; template struct from_oper { typedef const ValueType& argument_type; typedef PyObject *result_type; result_type operator()(argument_type v) const { return swig::from(v); } }; template::value_type, typename FromOper = from_oper > class SwigPyIteratorOpen_T : public SwigPyIterator_T { public: FromOper from; typedef OutIterator out_iterator; typedef ValueType value_type; typedef SwigPyIterator_T base; typedef SwigPyIteratorOpen_T self_type; SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq) : SwigPyIterator_T(curr, seq) { } PyObject *value() const { return from(static_cast(*(base::current))); } SwigPyIterator *copy() const { return new self_type(*this); } SwigPyIterator *incr(size_t n = 1) { while (n--) { ++base::current; } return this; } SwigPyIterator *decr(size_t n = 1) { while (n--) { --base::current; } return this; } }; template::value_type, typename FromOper = from_oper > class SwigPyIteratorClosed_T : public SwigPyIterator_T { public: FromOper from; typedef OutIterator out_iterator; typedef ValueType value_type; typedef SwigPyIterator_T base; typedef SwigPyIteratorClosed_T self_type; SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) : SwigPyIterator_T(curr, seq), begin(first), end(last) { } PyObject *value() const { if (base::current == end) { throw stop_iteration(); } else { return from(static_cast(*(base::current))); } } SwigPyIterator *copy() const { return new self_type(*this); } SwigPyIterator *incr(size_t n = 1) { while (n--) { if (base::current == end) { throw stop_iteration(); } else { ++base::current; } } return this; } SwigPyIterator *decr(size_t n = 1) { while (n--) { if (base::current == begin) { throw stop_iteration(); } else { --base::current; } } return this; } private: out_iterator begin; out_iterator end; }; template inline SwigPyIterator* make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) { return new SwigPyIteratorClosed_T(current, begin, end, seq); } template inline SwigPyIterator* make_output_iterator(const OutIter& current, PyObject *seq = 0) { return new SwigPyIteratorOpen_T(current, seq); } } namespace swig { template struct SwigPySequence_Ref { SwigPySequence_Ref(PyObject* seq, int index) : _seq(seq), _index(index) { } operator T () const { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index); try { return swig::as(item, true); } catch (std::exception& e) { char msg[1024]; sprintf(msg, "in sequence element %d ", _index); if (!PyErr_Occurred()) { ::SWIG_Error(SWIG_TypeError, swig::type_name()); } SWIG_Python_AddErrorMsg(msg); SWIG_Python_AddErrorMsg(e.what()); throw; } } SwigPySequence_Ref& operator=(const T& v) { PySequence_SetItem(_seq, _index, swig::from(v)); return *this; } private: PyObject* _seq; int _index; }; template struct SwigPySequence_ArrowProxy { SwigPySequence_ArrowProxy(const T& x): m_value(x) {} const T* operator->() const { return &m_value; } operator const T*() const { return &m_value; } T m_value; }; template struct SwigPySequence_InputIterator { typedef SwigPySequence_InputIterator self; typedef std::random_access_iterator_tag iterator_category; typedef Reference reference; typedef T value_type; typedef T* pointer; typedef int difference_type; SwigPySequence_InputIterator() { } SwigPySequence_InputIterator(PyObject* seq, int index) : _seq(seq), _index(index) { } reference operator*() const { return reference(_seq, _index); } SwigPySequence_ArrowProxy operator->() const { return SwigPySequence_ArrowProxy(operator*()); } bool operator==(const self& ri) const { return (_index == ri._index) && (_seq == ri._seq); } bool operator!=(const self& ri) const { return !(operator==(ri)); } self& operator ++ () { ++_index; return *this; } self& operator -- () { --_index; return *this; } self& operator += (difference_type n) { _index += n; return *this; } self operator +(difference_type n) const { return self(_seq, _index + n); } self& operator -= (difference_type n) { _index -= n; return *this; } self operator -(difference_type n) const { return self(_seq, _index - n); } difference_type operator - (const self& ri) const { return _index - ri._index; } bool operator < (const self& ri) const { return _index < ri._index; } reference operator[](difference_type n) const { return reference(_seq, _index + n); } private: PyObject* _seq; difference_type _index; }; template struct SwigPySequence_Cont { typedef SwigPySequence_Ref reference; typedef const SwigPySequence_Ref const_reference; typedef T value_type; typedef T* pointer; typedef int difference_type; typedef int size_type; typedef const pointer const_pointer; typedef SwigPySequence_InputIterator iterator; typedef SwigPySequence_InputIterator const_iterator; SwigPySequence_Cont(PyObject* seq) : _seq(0) { if (!PySequence_Check(seq)) { throw std::invalid_argument("a sequence is expected"); } _seq = seq; Py_INCREF(_seq); } ~SwigPySequence_Cont() { Py_XDECREF(_seq); } size_type size() const { return static_cast(PySequence_Size(_seq)); } bool empty() const { return size() == 0; } iterator begin() { return iterator(_seq, 0); } const_iterator begin() const { return const_iterator(_seq, 0); } iterator end() { return iterator(_seq, size()); } const_iterator end() const { return const_iterator(_seq, size()); } reference operator[](difference_type n) { return reference(_seq, n); } const_reference operator[](difference_type n) const { return const_reference(_seq, n); } bool check(bool set_err = true) const { int s = size(); for (int i = 0; i < s; ++i) { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i); if (!swig::check(item)) { if (set_err) { char msg[1024]; sprintf(msg, "in sequence element %d", i); SWIG_Error(SWIG_RuntimeError, msg); } return false; } } return true; } private: PyObject* _seq; }; } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_int (PyObject * obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< int >(v); } } return res; } SWIGINTERNINLINE PyObject* SWIG_From_int (int value) { return PyInt_FromLong((long) value); } namespace swig { template <> struct traits { typedef value_category category; static const char* type_name() { return"int"; } }; template <> struct traits_asval { typedef int value_type; static int asval(PyObject *obj, value_type *val) { return SWIG_AsVal_int (obj, val); } }; template <> struct traits_from { typedef int value_type; static PyObject *from(const value_type& val) { return SWIG_From_int (val); } }; } namespace swig { template inline void assign(const SwigPySeq& swigpyseq, Seq* seq) { // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented typedef typename SwigPySeq::value_type value_type; typename SwigPySeq::const_iterator it = swigpyseq.begin(); for (;it != swigpyseq.end(); ++it) { seq->insert(seq->end(),(value_type)(*it)); } } template struct traits_asptr_stdseq { typedef Seq sequence; typedef T value_type; static int asptr(PyObject *obj, sequence **seq) { if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { sequence *p; if (::SWIG_ConvertPtr(obj,(void**)&p, swig::type_info(),0) == SWIG_OK) { if (seq) *seq = p; return SWIG_OLDOBJ; } } else if (PySequence_Check(obj)) { try { SwigPySequence_Cont swigpyseq(obj); if (seq) { sequence *pseq = new sequence(); assign(swigpyseq, pseq); *seq = pseq; return SWIG_NEWOBJ; } else { return swigpyseq.check() ? SWIG_OK : SWIG_ERROR; } } catch (std::exception& e) { if (seq) { if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, e.what()); } } return SWIG_ERROR; } } return SWIG_ERROR; } }; template struct traits_from_stdseq { typedef Seq sequence; typedef T value_type; typedef typename Seq::size_type size_type; typedef typename sequence::const_iterator const_iterator; static PyObject *from(const sequence& seq) { #ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS swig_type_info *desc = swig::type_info(); if (desc && desc->clientdata) { return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); } #endif size_type size = seq.size(); if (size <= (size_type)INT_MAX) { PyObject *obj = PyTuple_New((int)size); int i = 0; for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) { PyTuple_SetItem(obj,i,swig::from(*it)); } return obj; } else { PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); return NULL; } } }; } namespace swig { template struct traits_asptr > { static int asptr(PyObject *obj, std::vector **vec) { return traits_asptr_stdseq >::asptr(obj, vec); } }; template struct traits_from > { static PyObject *from(const std::vector& vec) { return traits_from_stdseq >::from(vec); } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "int" "," "std::allocator< int >" " >"; } }; } SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){ return !(self->empty()); } SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){ return !(self->empty()); } SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){ return self->size(); } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { return (value > LONG_MAX) ? PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value)); } SWIGINTERNINLINE PyObject * SWIG_From_size_t (size_t value) { return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); } SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); std::vector >::value_type x = self->back(); self->pop_back(); return x; } SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ return swig::getslice(self, i, j, 1); } SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v=std::vector< int,std::allocator< int > >()){ swig::setslice(self, i, j, 1, v); } SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ swig::delslice(self, i, j, 1); } SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){ self->erase(swig::getpos(self,i)); } SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; return swig::getslice(self, id, jd, step); } SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::delslice(self, id, jd, step); } SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::delslice(self, id, jd, step); } SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){ return *(swig::cgetpos(self, i)); } SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){ *(swig::getpos(self,i)) = x; } SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){ self->push_back(x); } #define SWIG_From_double PyFloat_FromDouble namespace swig { template <> struct traits { typedef value_category category; static const char* type_name() { return"double"; } }; template <> struct traits_asval { typedef double value_type; static int asval(PyObject *obj, value_type *val) { return SWIG_AsVal_double (obj, val); } }; template <> struct traits_from { typedef double value_type; static PyObject *from(const value_type& val) { return SWIG_From_double (val); } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "double" "," "std::allocator< double >" " >"; } }; } SWIGINTERN swig::SwigPyIterator *std_vector_Sl_double_Sg__iterator(std::vector< double > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } SWIGINTERN bool std_vector_Sl_double_Sg____nonzero__(std::vector< double > const *self){ return !(self->empty()); } SWIGINTERN bool std_vector_Sl_double_Sg____bool__(std::vector< double > const *self){ return !(self->empty()); } SWIGINTERN std::vector< double >::size_type std_vector_Sl_double_Sg____len__(std::vector< double > const *self){ return self->size(); } SWIGINTERN std::vector< double >::value_type std_vector_Sl_double_Sg__pop(std::vector< double > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); std::vector >::value_type x = self->back(); self->pop_back(); return x; } SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){ return swig::getslice(self, i, j, 1); } SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j,std::vector< double,std::allocator< double > > const &v=std::vector< double,std::allocator< double > >()){ swig::setslice(self, i, j, 1, v); } SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){ swig::delslice(self, i, j, 1); } SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){ self->erase(swig::getpos(self,i)); } SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; return swig::getslice(self, id, jd, step); } SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::delslice(self, id, jd, step); } SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::delslice(self, id, jd, step); } SWIGINTERN std::vector< double >::value_type const &std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){ return *(swig::cgetpos(self, i)); } SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){ *(swig::getpos(self,i)) = x; } SWIGINTERN void std_vector_Sl_double_Sg__append(std::vector< double > *self,std::vector< double >::value_type const &x){ self->push_back(x); } namespace swig { template <> struct traits { typedef pointer_category category; static const char* type_name() { return"vips::VImage"; } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "vips::VImage" "," "std::allocator< vips::VImage >" " >"; } }; } SWIGINTERN swig::SwigPyIterator *std_vector_Sl_vips_VImage_Sg__iterator(std::vector< vips::VImage > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } SWIGINTERN bool std_vector_Sl_vips_VImage_Sg____nonzero__(std::vector< vips::VImage > const *self){ return !(self->empty()); } SWIGINTERN bool std_vector_Sl_vips_VImage_Sg____bool__(std::vector< vips::VImage > const *self){ return !(self->empty()); } SWIGINTERN std::vector< vips::VImage >::size_type std_vector_Sl_vips_VImage_Sg____len__(std::vector< vips::VImage > const *self){ return self->size(); } SWIGINTERN std::vector< vips::VImage >::value_type std_vector_Sl_vips_VImage_Sg__pop(std::vector< vips::VImage > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); std::vector >::value_type x = self->back(); self->pop_back(); return x; } SWIGINTERN std::vector< vips::VImage,std::allocator< vips::VImage > > *std_vector_Sl_vips_VImage_Sg____getslice__(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j){ return swig::getslice(self, i, j, 1); } SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j,std::vector< vips::VImage,std::allocator< vips::VImage > > const &v=std::vector< vips::VImage,std::allocator< vips::VImage > >()){ swig::setslice(self, i, j, 1, v); } SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delslice__(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::difference_type j){ swig::delslice(self, i, j, 1); } SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delitem____SWIG_0(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i){ self->erase(swig::getpos(self,i)); } SWIGINTERN std::vector< vips::VImage,std::allocator< vips::VImage > > *std_vector_Sl_vips_VImage_Sg____getitem____SWIG_0(std::vector< vips::VImage > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; return swig::getslice(self, id, jd, step); } SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_0(std::vector< vips::VImage > *self,PySliceObject *slice,std::vector< vips::VImage,std::allocator< vips::VImage > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_1(std::vector< vips::VImage > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::delslice(self, id, jd, step); } SWIGINTERN void std_vector_Sl_vips_VImage_Sg____delitem____SWIG_1(std::vector< vips::VImage > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector >::difference_type id = i; std::vector >::difference_type jd = j; swig::delslice(self, id, jd, step); } SWIGINTERN std::vector< vips::VImage >::value_type const &std_vector_Sl_vips_VImage_Sg____getitem____SWIG_1(std::vector< vips::VImage > const *self,std::vector< vips::VImage >::difference_type i){ return *(swig::cgetpos(self, i)); } SWIGINTERN void std_vector_Sl_vips_VImage_Sg____setitem____SWIG_2(std::vector< vips::VImage > *self,std::vector< vips::VImage >::difference_type i,std::vector< vips::VImage >::value_type const &x){ *(swig::getpos(self,i)) = x; } SWIGINTERN void std_vector_Sl_vips_VImage_Sg__append(std::vector< vips::VImage > *self,std::vector< vips::VImage >::value_type const &x){ self->push_back(x); } struct VBuffer { void *data; size_t size; }; SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERNINLINE PyObject * SWIG_From_float (float value) { return SWIG_From_double (value); } SWIGINTERNINLINE PyObject * SWIG_From_short (short value) { return SWIG_From_long (value); } SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromStringAndSize(carray, static_cast< int >(size)); #else return PyString_FromStringAndSize(carray, static_cast< int >(size)); #endif } } else { return SWIG_Py_Void(); } } SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERN int SWIG_AsVal_float (PyObject * obj, float *val) { double v; int res = SWIG_AsVal_double (obj, &v); if (SWIG_IsOK(res)) { if ((v < -FLT_MAX || v > FLT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< float >(v); } } return res; } SWIGINTERNINLINE PyObject* SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/usr/share/swig2.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/ const std::complex& /*@SWIG@*/ c) { return PyComplex_FromDoubles(std::real(c), std::imag(c)); } SWIGINTERN VBuffer vips_VImage_tobuffer(vips::VImage *self){ VBuffer buffer; buffer.data = self->data (); buffer.size = (size_t) self->Xsize () * self->Ysize () * IM_IMAGE_SIZEOF_PEL (self->image ()); return buffer; } SWIGINTERN vips::VImage vips_VImage_frombuffer(VBuffer buffer,int width,int height,int bands,vips::VImage::TBandFmt format){ return VImage (buffer.data, width, height, bands, format); } SWIGINTERN void vips_VImage_tostring(vips::VImage *self,char **buffer,int *buffer_len){ void *vips_memory; /* Eval the vips image first. This may throw an exception and we want to * make sure we do this before we try to malloc() space for the copy. */ vips_memory = self->data (); /* We have to copy the image data to make a string that Python can * manage. Use frombuffer() / tobuffer () if you want to avoid the copy * and manage memory lifetime yourself. */ *buffer_len = (size_t) self->Xsize () * self->Ysize () * IM_IMAGE_SIZEOF_PEL (self->image ()); if (!(*buffer = (char *) im_malloc (NULL, *buffer_len))) verror ("Unable to allocate memory for image copy."); memcpy (*buffer, vips_memory, *buffer_len); } SWIGINTERN int SWIG_AsPtr_std_string (PyObject * obj, std::string **val) { char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { if (buf) { if (val) *val = new std::string(buf, size - 1); if (alloc == SWIG_NEWOBJ) delete[] buf; return SWIG_NEWOBJ; } else { if (val) *val = 0; return SWIG_OLDOBJ; } } else { static int init = 0; static swig_type_info* descriptor = 0; if (!init) { descriptor = SWIG_TypeQuery("std::string" " *"); init = 1; } if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); if (SWIG_IsOK(res) && val) *val = vptr; return res; } } return SWIG_ERROR; } SWIGINTERN vips::VImage vips_VImage_fromstring(std::string buffer,int width,int height,int bands,vips::VImage::TBandFmt format){ void *vips_memory; VImage result; /* We have to copy the string, then add a callback to the VImage to free * it when we free the VImage. Use frombuffer() / tobuffer () if you want * to avoid the copy and manage memory lifetime yourself. */ if (!(vips_memory = im_malloc (NULL, buffer.length ()))) verror ("Unable to allocate memory for image copy."); /* We have to use .c_str () since the string may not be contiguous. */ memcpy (vips_memory, buffer.c_str (), buffer.length ()); result = VImage (vips_memory, width, height, bands, format); if (im_add_close_callback (result.image (), (im_callback_fn) im_free, vips_memory, NULL)) verror (); return result; } /* Turn on to print args. #define DEBUG */ /* Command-line args during parse. */ typedef struct _Args { /* The n strings we alloc when we get from Python. */ int n; char **str; /* argc/argv as processed by us. */ int argc; char **argv; } Args; #ifdef DEBUG static void args_print (Args *args) { int i; printf ("args_print: argc = %d\n", args->argc); // +1 so we print the trailing NULL too for (i = 0; i < args->argc + 1; i++) printf ("\t%2d)\t%s\n", i, args->argv[i]); } #endif /*DEBUG*/ static void args_free (Args *args) { int i; for (i = 0; i < args->n; i++) IM_FREE (args->str[i]); args->n = 0; args->argc = 0; IM_FREE (args->str); IM_FREE (args->argv); IM_FREE (args); } /* Get argv/argc from python. */ static Args * args_new (void) { Args *args; PyObject *av; int i; int n; args = g_new (Args, 1); args->n = 0; args->str = NULL; args->argc = 0; args->argv = NULL; if (!(av = PySys_GetObject ((char *) "argv"))) return (args); if (!PyList_Check (av)) { PyErr_Warn (PyExc_Warning, "ignoring sys.argv: " "it must be a list of strings"); return args; } n = PyList_Size (av); args->str = g_new (char *, n); for (i = 0; i < n; i++) args->str[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i))); args->n = n; /* +1 for NULL termination. */ args->argc = n; args->argv = g_new (char *, n + 1); for (i = 0; i < n; i++) args->argv[i] = args->str[i]; args->argv[i] = NULL; return args; } static void vips_fatal (const char *msg) { char buf[256]; im_snprintf (buf, 256, "%s\n%s", msg, im_error_buffer()); im_error_clear (); Py_FatalError (buf); } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->incr(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (swig::SwigPyIterator *)(arg1)->incr(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator_incr__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator_incr__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n" " Possible C/C++ prototypes are:\n" " swig::SwigPyIterator::incr(size_t)\n" " swig::SwigPyIterator::incr()\n"); return 0; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->decr(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (swig::SwigPyIterator *)(arg1)->decr(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator_decr__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator_decr__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n" " Possible C/C++ prototypes are:\n" " swig::SwigPyIterator::decr(size_t)\n" " swig::SwigPyIterator::decr()\n"); return 0; } SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ptrdiff_t result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); try { result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); } catch(std::invalid_argument &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; } resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); try { result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); } catch(std::invalid_argument &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->next(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->__next__(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->previous(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->advance(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ptrdiff_t result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator___sub____SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator___sub____SWIG_0(self, args); } } } fail: Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_IntVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_iterator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_iterator" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (swig::SwigPyIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector___nonzero__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector___bool__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___bool__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (bool)std_vector_Sl_int_Sg____bool__((std::vector< int > const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector___len__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___len__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::value_type result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_pop",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); try { result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::difference_type arg2 ; std::vector< int >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< int,std::allocator< int > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } arg3 = static_cast< std::vector< int >::difference_type >(val3); try { result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::difference_type arg2 ; std::vector< int >::difference_type arg3 ; std::vector< int,std::allocator< int > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; int res4 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:IntVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } arg3 = static_cast< std::vector< int >::difference_type >(val3); { std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); } arg4 = ptr; } try { std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; return resultobj; fail: if (SWIG_IsNewObj(res4)) delete arg4; return NULL; } SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::difference_type arg2 ; std::vector< int >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } arg3 = static_cast< std::vector< int >::difference_type >(val3); try { std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___setslice__(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IntVector___setslice____SWIG_1(self, args); } } } } if (argc == 4) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = swig::asptr(argv[3], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IntVector___setslice____SWIG_0(self, args); } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___setslice__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type,std::vector< int,std::allocator< int > > const &)\n" " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type)\n"); return 0; } SWIGINTERN PyObject *_wrap_IntVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::difference_type arg2 ; std::vector< int >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } arg3 = static_cast< std::vector< int >::difference_type >(val3); try { std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___delitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } arg2 = static_cast< std::vector< int >::difference_type >(val2); try { std_vector_Sl_int_Sg____delitem____SWIG_0(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< int,std::allocator< int > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___getitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< int,std::allocator< int > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res3 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } { std::vector > *ptr = (std::vector > *)0; res3 = swig::asptr(obj2, &ptr); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); } arg3 = ptr; } try { std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< int,std::allocator< int > > const &)*arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; fail: if (SWIG_IsNewObj(res3)) delete arg3; return NULL; } SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___setitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___delitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___delitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_IntVector___delitem____SWIG_1(self, args); } } } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IntVector___delitem____SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n" " std::vector< int >::__delitem__(PySliceObject *)\n"); return 0; } SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< int >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector___getitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } arg2 = static_cast< std::vector< int >::difference_type >(val2); try { result = (std::vector< int >::value_type *) &std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___getitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_IntVector___getitem____SWIG_0(self, args); } } } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IntVector___getitem____SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___getitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::__getitem__(PySliceObject *)\n" " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n"); return 0; } SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::difference_type arg2 ; std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; try { std_vector_Sl_int_Sg____setitem____SWIG_2(arg1,arg2,(int const &)*arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector___setitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_IntVector___setitem____SWIG_1(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IntVector___setitem____SWIG_0(self, args); } } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IntVector___setitem____SWIG_2(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector___setitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n" " std::vector< int >::__setitem__(PySliceObject *)\n" " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_IntVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_append",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_append" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_IntVector")) SWIG_fail; result = (std::vector< int > *)new std::vector< int >(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; std::vector< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IntVector",&obj0)) SWIG_fail; { std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'"); } arg1 = ptr; } result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_IntVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_empty",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_empty" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (bool)((std::vector< int > const *)arg1)->empty(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_size",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_size" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = ((std::vector< int > const *)arg1)->size(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_clear",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_swap",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); } arg2 = reinterpret_cast< std::vector< int > * >(argp2); (arg1)->swap(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; SwigValueWrapper< std::allocator< int > > result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_get_allocator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = ((std::vector< int > const *)arg1)->get_allocator(); resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::iterator result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_begin",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_begin" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (arg1)->begin(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::iterator result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_end",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_end" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (arg1)->end(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::reverse_iterator result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_rbegin",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rbegin" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (arg1)->rbegin(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::reverse_iterator result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_rend",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rend" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (arg1)->rend(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int >::size_type arg1 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; std::vector< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IntVector",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); } arg1 = static_cast< std::vector< int >::size_type >(val1); result = (std::vector< int > *)new std::vector< int >(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_pop_back",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); (arg1)->pop_back(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_resize",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } arg2 = static_cast< std::vector< int >::size_type >(val2); (arg1)->resize(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::iterator arg2 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< int >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_erase",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } result = (arg1)->erase(arg2); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::iterator arg2 ; std::vector< int >::iterator arg3 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; swig::SwigPyIterator *iter3 = 0 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< int >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_erase",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); } } result = (arg1)->erase(arg2,arg3); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_erase(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_IntVector_erase__SWIG_0(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_IntVector_erase__SWIG_1(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_erase'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::erase(std::vector< int >::iterator)\n" " std::vector< int >::erase(std::vector< int >::iterator,std::vector< int >::iterator)\n"); return 0; } SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int >::size_type arg1 ; std::vector< int >::value_type *arg2 = 0 ; size_t val1 ; int ecode1 = 0 ; std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_IntVector",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); } arg1 = static_cast< std::vector< int >::size_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVector" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IntVector(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_IntVector__SWIG_0(self, args); } if (argc == 1) { int _v; { int res = SWIG_AsVal_size_t(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IntVector__SWIG_2(self, args); } } if (argc == 1) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IntVector__SWIG_1(self, args); } } if (argc == 2) { int _v; { int res = SWIG_AsVal_size_t(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IntVector__SWIG_3(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IntVector'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::vector()\n" " std::vector< int >::vector(std::vector< int > const &)\n" " std::vector< int >::vector(std::vector< int >::size_type)\n" " std::vector< int >::vector(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_IntVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_push_back",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; (arg1)->push_back((std::vector< int >::value_type const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_front",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_front" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front(); resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_back",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_back" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back(); resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::size_type arg2 ; std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_assign",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_assign" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } arg2 = static_cast< std::vector< int >::size_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::size_type arg2 ; std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_resize",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } arg2 = static_cast< std::vector< int >::size_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_resize(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IntVector_resize__SWIG_0(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IntVector_resize__SWIG_1(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_resize'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::resize(std::vector< int >::size_type)\n" " std::vector< int >::resize(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::iterator arg2 ; std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< int >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OOO:IntVector_insert",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; result = (arg1)->insert(arg2,(std::vector< int >::value_type const &)*arg3); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::iterator arg2 ; std::vector< int >::size_type arg3 ; std::vector< int >::value_type *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; size_t val3 ; int ecode3 = 0 ; std::vector< int >::value_type temp4 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:IntVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'"); } arg3 = static_cast< std::vector< int >::size_type >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IntVector_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'"); } temp4 = static_cast< std::vector< int >::value_type >(val4); arg4 = &temp4; (arg1)->insert(arg2,arg3,(std::vector< int >::value_type const &)*arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_insert(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IntVector_insert__SWIG_0(self, args); } } } } if (argc == 4) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IntVector_insert__SWIG_1(self, args); } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IntVector_insert'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::value_type const &)\n" " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_IntVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; std::vector< int >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_reserve",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_reserve" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } arg2 = static_cast< std::vector< int >::size_type >(val2); (arg1)->reserve(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IntVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< int >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:IntVector_capacity",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = ((std::vector< int > const *)arg1)->capacity(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_IntVector",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IntVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_DoubleVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_iterator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_iterator" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (swig::SwigPyIterator *)std_vector_Sl_double_Sg__iterator(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___nonzero__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___nonzero__" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (bool)std_vector_Sl_double_Sg____nonzero__((std::vector< double > const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___bool__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___bool__" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (bool)std_vector_Sl_double_Sg____bool__((std::vector< double > const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector___len__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___len__" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = std_vector_Sl_double_Sg____len__((std::vector< double > const *)arg1); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::value_type result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_pop",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); try { result = (std::vector< double >::value_type)std_vector_Sl_double_Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::difference_type arg2 ; std::vector< double >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< double,std::allocator< double > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); } arg2 = static_cast< std::vector< double >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___getslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); } arg3 = static_cast< std::vector< double >::difference_type >(val3); try { result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::difference_type arg2 ; std::vector< double >::difference_type arg3 ; std::vector< double,std::allocator< double > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; int res4 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:DoubleVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); } arg2 = static_cast< std::vector< double >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); } arg3 = static_cast< std::vector< double >::difference_type >(val3); { std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); } arg4 = ptr; } try { std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; return resultobj; fail: if (SWIG_IsNewObj(res4)) delete arg4; return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::difference_type arg2 ; std::vector< double >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); } arg2 = static_cast< std::vector< double >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); } arg3 = static_cast< std::vector< double >::difference_type >(val3); try { std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___setslice__(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_DoubleVector___setslice____SWIG_1(self, args); } } } } if (argc == 4) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = swig::asptr(argv[3], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_DoubleVector___setslice____SWIG_0(self, args); } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___setslice__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type,std::vector< double,std::allocator< double > > const &)\n" " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type)\n"); return 0; } SWIGINTERN PyObject *_wrap_DoubleVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::difference_type arg2 ; std::vector< double >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); } arg2 = static_cast< std::vector< double >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___delslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); } arg3 = static_cast< std::vector< double >::difference_type >(val3); try { std_vector_Sl_double_Sg____delslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___delitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); } arg2 = static_cast< std::vector< double >::difference_type >(val2); try { std_vector_Sl_double_Sg____delitem____SWIG_0(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< double,std::allocator< double > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___getitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< double,std::allocator< double > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res3 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } { std::vector > *ptr = (std::vector > *)0; res3 = swig::asptr(obj2, &ptr); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); } arg3 = ptr; } try { std_vector_Sl_double_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; fail: if (SWIG_IsNewObj(res3)) delete arg3; return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___setitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___delitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___delitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_DoubleVector___delitem____SWIG_1(self, args); } } } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_DoubleVector___delitem____SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::__delitem__(std::vector< double >::difference_type)\n" " std::vector< double >::__delitem__(PySliceObject *)\n"); return 0; } SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< double >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector___getitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); } arg2 = static_cast< std::vector< double >::difference_type >(val2); try { result = (std::vector< double >::value_type *) &std_vector_Sl_double_Sg____getitem____SWIG_1((std::vector< double > const *)arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_From_double(static_cast< double >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___getitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_DoubleVector___getitem____SWIG_0(self, args); } } } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_DoubleVector___getitem____SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___getitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::__getitem__(PySliceObject *)\n" " std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n"); return 0; } SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::difference_type arg2 ; std::vector< double >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; std::vector< double >::value_type temp3 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); } arg2 = static_cast< std::vector< double >::difference_type >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); } temp3 = static_cast< std::vector< double >::value_type >(val3); arg3 = &temp3; try { std_vector_Sl_double_Sg____setitem____SWIG_2(arg1,arg2,(double const &)*arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector___setitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_DoubleVector___setitem____SWIG_1(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_DoubleVector___setitem____SWIG_0(self, args); } } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_DoubleVector___setitem____SWIG_2(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector___setitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n" " std::vector< double >::__setitem__(PySliceObject *)\n" " std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_DoubleVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< double >::value_type temp2 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_append",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_append" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_append" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); } temp2 = static_cast< std::vector< double >::value_type >(val2); arg2 = &temp2; std_vector_Sl_double_Sg__append(arg1,(double const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_DoubleVector")) SWIG_fail; result = (std::vector< double > *)new std::vector< double >(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; std::vector< double > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_DoubleVector",&obj0)) SWIG_fail; { std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'"); } arg1 = ptr; } result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_empty",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_empty" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (bool)((std::vector< double > const *)arg1)->empty(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_size",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_size" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = ((std::vector< double > const *)arg1)->size(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_clear",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_swap",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_swap" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); } arg2 = reinterpret_cast< std::vector< double > * >(argp2); (arg1)->swap(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; SwigValueWrapper< std::allocator< double > > result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_get_allocator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_get_allocator" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = ((std::vector< double > const *)arg1)->get_allocator(); resultobj = SWIG_NewPointerObj((new std::vector< double >::allocator_type(static_cast< const std::vector< double >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::iterator result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_begin",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_begin" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (arg1)->begin(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::iterator result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_end",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_end" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (arg1)->end(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::reverse_iterator result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_rbegin",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rbegin" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (arg1)->rbegin(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::reverse_iterator result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_rend",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rend" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (arg1)->rend(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double >::size_type arg1 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; std::vector< double > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_DoubleVector",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'"); } arg1 = static_cast< std::vector< double >::size_type >(val1); result = (std::vector< double > *)new std::vector< double >(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_pop_back",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop_back" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); (arg1)->pop_back(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_resize",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); } arg2 = static_cast< std::vector< double >::size_type >(val2); (arg1)->resize(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::iterator arg2 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< double >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_erase",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); } } result = (arg1)->erase(arg2); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::iterator arg2 ; std::vector< double >::iterator arg3 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; swig::SwigPyIterator *iter3 = 0 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< double >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_erase",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'"); } } result = (arg1)->erase(arg2,arg3); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_erase(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_DoubleVector_erase__SWIG_0(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_DoubleVector_erase__SWIG_1(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_erase'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::erase(std::vector< double >::iterator)\n" " std::vector< double >::erase(std::vector< double >::iterator,std::vector< double >::iterator)\n"); return 0; } SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double >::size_type arg1 ; std::vector< double >::value_type *arg2 = 0 ; size_t val1 ; int ecode1 = 0 ; std::vector< double >::value_type temp2 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< double > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_DoubleVector",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'"); } arg1 = static_cast< std::vector< double >::size_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DoubleVector" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); } temp2 = static_cast< std::vector< double >::value_type >(val2); arg2 = &temp2; result = (std::vector< double > *)new std::vector< double >(arg1,(std::vector< double >::value_type const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_DoubleVector(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_DoubleVector__SWIG_0(self, args); } if (argc == 1) { int _v; { int res = SWIG_AsVal_size_t(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_DoubleVector__SWIG_2(self, args); } } if (argc == 1) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_DoubleVector__SWIG_1(self, args); } } if (argc == 2) { int _v; { int res = SWIG_AsVal_size_t(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_DoubleVector__SWIG_3(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DoubleVector'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::vector()\n" " std::vector< double >::vector(std::vector< double > const &)\n" " std::vector< double >::vector(std::vector< double >::size_type)\n" " std::vector< double >::vector(std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_DoubleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< double >::value_type temp2 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_push_back",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_push_back" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); } temp2 = static_cast< std::vector< double >::value_type >(val2); arg2 = &temp2; (arg1)->push_back((std::vector< double >::value_type const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_front",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_front" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->front(); resultobj = SWIG_From_double(static_cast< double >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_back",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_back" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->back(); resultobj = SWIG_From_double(static_cast< double >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::size_type arg2 ; std::vector< double >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; std::vector< double >::value_type temp3 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_assign",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_assign" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_assign" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); } arg2 = static_cast< std::vector< double >::size_type >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_assign" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); } temp3 = static_cast< std::vector< double >::value_type >(val3); arg3 = &temp3; (arg1)->assign(arg2,(std::vector< double >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::size_type arg2 ; std::vector< double >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; std::vector< double >::value_type temp3 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_resize",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); } arg2 = static_cast< std::vector< double >::size_type >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_resize" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); } temp3 = static_cast< std::vector< double >::value_type >(val3); arg3 = &temp3; (arg1)->resize(arg2,(std::vector< double >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_resize(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_DoubleVector_resize__SWIG_0(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_DoubleVector_resize__SWIG_1(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_resize'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::resize(std::vector< double >::size_type)\n" " std::vector< double >::resize(std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::iterator arg2 ; std::vector< double >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; std::vector< double >::value_type temp3 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< double >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OOO:DoubleVector_insert",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); } } ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); } temp3 = static_cast< std::vector< double >::value_type >(val3); arg3 = &temp3; result = (arg1)->insert(arg2,(std::vector< double >::value_type const &)*arg3); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::iterator arg2 ; std::vector< double >::size_type arg3 ; std::vector< double >::value_type *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; size_t val3 ; int ecode3 = 0 ; std::vector< double >::value_type temp4 ; double val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:DoubleVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::size_type""'"); } arg3 = static_cast< std::vector< double >::size_type >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DoubleVector_insert" "', argument " "4"" of type '" "std::vector< double >::value_type""'"); } temp4 = static_cast< std::vector< double >::value_type >(val4); arg4 = &temp4; (arg1)->insert(arg2,arg3,(std::vector< double >::value_type const &)*arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_insert(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_DoubleVector_insert__SWIG_0(self, args); } } } } if (argc == 4) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_DoubleVector_insert__SWIG_1(self, args); } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'DoubleVector_insert'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::value_type const &)\n" " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_DoubleVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; std::vector< double >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_reserve",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_reserve" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_reserve" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); } arg2 = static_cast< std::vector< double >::size_type >(val2); (arg1)->reserve(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_DoubleVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< double >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_capacity",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_capacity" "', argument " "1"" of type '" "std::vector< double > const *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); result = ((std::vector< double > const *)arg1)->capacity(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_DoubleVector",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *DoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ImageVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_iterator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_iterator" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (swig::SwigPyIterator *)std_vector_Sl_vips_VImage_Sg__iterator(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___nonzero__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___nonzero__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (bool)std_vector_Sl_vips_VImage_Sg____nonzero__((std::vector< vips::VImage > const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___bool__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___bool__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (bool)std_vector_Sl_vips_VImage_Sg____bool__((std::vector< vips::VImage > const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector___len__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___len__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = std_vector_Sl_vips_VImage_Sg____len__((std::vector< vips::VImage > const *)arg1); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::value_type result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_pop",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_pop" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); try { result = std_vector_Sl_vips_VImage_Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_NewPointerObj((new std::vector< vips::VImage >::value_type(static_cast< const std::vector< vips::VImage >::value_type& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::difference_type arg2 ; std::vector< vips::VImage >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< vips::VImage,std::allocator< vips::VImage > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___getslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___getslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3); try { result = (std::vector< vips::VImage,std::allocator< vips::VImage > > *)std_vector_Sl_vips_VImage_Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::difference_type arg2 ; std::vector< vips::VImage >::difference_type arg3 ; std::vector< vips::VImage,std::allocator< vips::VImage > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; int res4 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ImageVector___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___setslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3); { std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ImageVector___setslice__" "', argument " "4"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setslice__" "', argument " "4"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'"); } arg4 = ptr; } try { std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(arg1,arg2,arg3,(std::vector< vips::VImage,std::allocator< vips::VImage > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; return resultobj; fail: if (SWIG_IsNewObj(res4)) delete arg4; return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::difference_type arg2 ; std::vector< vips::VImage >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___setslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3); try { std_vector_Sl_vips_VImage_Sg____setslice____SWIG_0(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___setslice__(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ImageVector___setslice____SWIG_1(self, args); } } } } if (argc == 4) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = swig::asptr(argv[3], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_ImageVector___setslice____SWIG_0(self, args); } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___setslice__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< vips::VImage >::__setslice__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::difference_type,std::vector< vips::VImage,std::allocator< vips::VImage > > const &)\n" " std::vector< vips::VImage >::__setslice__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::difference_type)\n"); return 0; } SWIGINTERN PyObject *_wrap_ImageVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::difference_type arg2 ; std::vector< vips::VImage >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; ptrdiff_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delslice__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___delslice__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector___delslice__" "', argument " "3"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg3 = static_cast< std::vector< vips::VImage >::difference_type >(val3); try { std_vector_Sl_vips_VImage_Sg____delslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___delitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___delitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2); try { std_vector_Sl_vips_VImage_Sg____delitem____SWIG_0(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< vips::VImage,std::allocator< vips::VImage > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___getitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { result = (std::vector< vips::VImage,std::allocator< vips::VImage > > *)std_vector_Sl_vips_VImage_Sg____getitem____SWIG_0(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< vips::VImage,std::allocator< vips::VImage > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res3 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } { std::vector > *ptr = (std::vector > *)0; res3 = swig::asptr(obj2, &ptr); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > > const &""'"); } arg3 = ptr; } try { std_vector_Sl_vips_VImage_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< vips::VImage,std::allocator< vips::VImage > > const &)*arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; fail: if (SWIG_IsNewObj(res3)) delete arg3; return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___setitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { std_vector_Sl_vips_VImage_Sg____setitem____SWIG_1(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___delitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___delitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); { if (!PySlice_Check(obj1)) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } arg2 = (PySliceObject *) obj1; } try { std_vector_Sl_vips_VImage_Sg____delitem____SWIG_1(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } catch(std::invalid_argument &_e) { SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___delitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_ImageVector___delitem____SWIG_1(self, args); } } } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ImageVector___delitem____SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< vips::VImage >::__delitem__(std::vector< vips::VImage >::difference_type)\n" " std::vector< vips::VImage >::__delitem__(PySliceObject *)\n"); return 0; } SWIGINTERN PyObject *_wrap_ImageVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< vips::VImage >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector___getitem__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___getitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___getitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2); try { result = (std::vector< vips::VImage >::value_type *) &std_vector_Sl_vips_VImage_Sg____getitem____SWIG_1((std::vector< vips::VImage > const *)arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___getitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_ImageVector___getitem____SWIG_0(self, args); } } } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ImageVector___getitem____SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___getitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< vips::VImage >::__getitem__(PySliceObject *)\n" " std::vector< vips::VImage >::__getitem__(std::vector< vips::VImage >::difference_type) const\n"); return 0; } SWIGINTERN PyObject *_wrap_ImageVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::difference_type arg2 ; std::vector< vips::VImage >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector___setitem__" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector___setitem__" "', argument " "2"" of type '" "std::vector< vips::VImage >::difference_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::difference_type >(val2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector___setitem__" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3); try { std_vector_Sl_vips_VImage_Sg____setitem____SWIG_2(arg1,arg2,(vips::VImage const &)*arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector___setitem__(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { return _wrap_ImageVector___setitem____SWIG_1(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = PySlice_Check(argv[1]); } if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_ImageVector___setitem____SWIG_0(self, args); } } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ImageVector___setitem____SWIG_2(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector___setitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< vips::VImage >::__setitem__(PySliceObject *,std::vector< vips::VImage,std::allocator< vips::VImage > > const &)\n" " std::vector< vips::VImage >::__setitem__(PySliceObject *)\n" " std::vector< vips::VImage >::__setitem__(std::vector< vips::VImage >::difference_type,std::vector< vips::VImage >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_ImageVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_append",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_append" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_append" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_append" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2); std_vector_Sl_vips_VImage_Sg__append(arg1,(vips::VImage const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ImageVector")) SWIG_fail; result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; std::vector< vips::VImage > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ImageVector",&obj0)) SWIG_fail; { std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > const &""'"); } arg1 = ptr; } result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >((std::vector< vips::VImage > const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_empty",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_empty" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (bool)((std::vector< vips::VImage > const *)arg1)->empty(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_size",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_size" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = ((std::vector< vips::VImage > const *)arg1)->size(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_clear",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_clear" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_swap",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_swap" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_swap" "', argument " "2"" of type '" "std::vector< vips::VImage > &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_swap" "', argument " "2"" of type '" "std::vector< vips::VImage > &""'"); } arg2 = reinterpret_cast< std::vector< vips::VImage > * >(argp2); (arg1)->swap(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; SwigValueWrapper< std::allocator< vips::VImage > > result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_get_allocator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_get_allocator" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = ((std::vector< vips::VImage > const *)arg1)->get_allocator(); resultobj = SWIG_NewPointerObj((new std::vector< vips::VImage >::allocator_type(static_cast< const std::vector< vips::VImage >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_vips__VImage_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::iterator result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_begin",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_begin" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (arg1)->begin(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::iterator result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_end",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_end" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (arg1)->end(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::reverse_iterator result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_rbegin",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_rbegin" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (arg1)->rbegin(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::reverse_iterator result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_rend",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_rend" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (arg1)->rend(); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage >::size_type arg1 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ImageVector",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage >::size_type""'"); } arg1 = static_cast< std::vector< vips::VImage >::size_type >(val1); result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_pop_back",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_pop_back" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); (arg1)->pop_back(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_resize",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_resize" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_resize" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2); (arg1)->resize(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::iterator arg2 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< vips::VImage >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_erase",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_erase" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'"); } } result = (arg1)->erase(arg2); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::iterator arg2 ; std::vector< vips::VImage >::iterator arg3 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; swig::SwigPyIterator *iter3 = 0 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< vips::VImage >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_erase",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_erase" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "3"" of type '" "std::vector< vips::VImage >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_erase" "', argument " "3"" of type '" "std::vector< vips::VImage >::iterator""'"); } } result = (arg1)->erase(arg2,arg3); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_erase(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ImageVector_erase__SWIG_0(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ImageVector_erase__SWIG_1(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_erase'.\n" " Possible C/C++ prototypes are:\n" " std::vector< vips::VImage >::erase(std::vector< vips::VImage >::iterator)\n" " std::vector< vips::VImage >::erase(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::iterator)\n"); return 0; } SWIGINTERN PyObject *_wrap_new_ImageVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage >::size_type arg1 ; std::vector< vips::VImage >::value_type *arg2 = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::vector< vips::VImage > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_ImageVector",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage >::size_type""'"); } arg1 = static_cast< std::vector< vips::VImage >::size_type >(val1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ImageVector" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImageVector" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2); result = (std::vector< vips::VImage > *)new std::vector< vips::VImage >(arg1,(std::vector< vips::VImage >::value_type const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ImageVector(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_ImageVector__SWIG_0(self, args); } if (argc == 1) { int _v; { int res = SWIG_AsVal_size_t(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_ImageVector__SWIG_2(self, args); } } if (argc == 1) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ImageVector__SWIG_1(self, args); } } if (argc == 2) { int _v; { int res = SWIG_AsVal_size_t(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ImageVector__SWIG_3(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ImageVector'.\n" " Possible C/C++ prototypes are:\n" " std::vector< vips::VImage >::vector()\n" " std::vector< vips::VImage >::vector(std::vector< vips::VImage > const &)\n" " std::vector< vips::VImage >::vector(std::vector< vips::VImage >::size_type)\n" " std::vector< vips::VImage >::vector(std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_ImageVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_push_back",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_push_back" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageVector_push_back" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_push_back" "', argument " "2"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp2); (arg1)->push_back((std::vector< vips::VImage >::value_type const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_front",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_front" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (std::vector< vips::VImage >::value_type *) &((std::vector< vips::VImage > const *)arg1)->front(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::value_type *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_back",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_back" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = (std::vector< vips::VImage >::value_type *) &((std::vector< vips::VImage > const *)arg1)->back(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::size_type arg2 ; std::vector< vips::VImage >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_assign",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_assign" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_assign" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_assign" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_assign" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3); (arg1)->assign(arg2,(std::vector< vips::VImage >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::size_type arg2 ; std::vector< vips::VImage >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_resize",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_resize" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_resize" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_resize" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_resize" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3); (arg1)->resize(arg2,(std::vector< vips::VImage >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_resize(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ImageVector_resize__SWIG_0(self, args); } } } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ImageVector_resize__SWIG_1(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_resize'.\n" " Possible C/C++ prototypes are:\n" " std::vector< vips::VImage >::resize(std::vector< vips::VImage >::size_type)\n" " std::vector< vips::VImage >::resize(std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_ImageVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::iterator arg2 ; std::vector< vips::VImage >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; std::vector< vips::VImage >::iterator result; if (!PyArg_ParseTuple(args,(char *)"OOO:ImageVector_insert",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_insert" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp3); result = (arg1)->insert(arg2,(std::vector< vips::VImage >::value_type const &)*arg3); resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< vips::VImage >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::iterator arg2 ; std::vector< vips::VImage >::size_type arg3 ; std::vector< vips::VImage >::value_type *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *iter2 = 0 ; int res2 ; size_t val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ImageVector_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_insert" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'"); } else { swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageVector_insert" "', argument " "2"" of type '" "std::vector< vips::VImage >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ImageVector_insert" "', argument " "3"" of type '" "std::vector< vips::VImage >::size_type""'"); } arg3 = static_cast< std::vector< vips::VImage >::size_type >(val3); res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ImageVector_insert" "', argument " "4"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } if (!argp4) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageVector_insert" "', argument " "4"" of type '" "std::vector< vips::VImage >::value_type const &""'"); } arg4 = reinterpret_cast< std::vector< vips::VImage >::value_type * >(argp4); (arg1)->insert(arg2,arg3,(std::vector< vips::VImage >::value_type const &)*arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_insert(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ImageVector_insert__SWIG_0(self, args); } } } } if (argc == 4) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ImageVector_insert__SWIG_1(self, args); } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ImageVector_insert'.\n" " Possible C/C++ prototypes are:\n" " std::vector< vips::VImage >::insert(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::value_type const &)\n" " std::vector< vips::VImage >::insert(std::vector< vips::VImage >::iterator,std::vector< vips::VImage >::size_type,std::vector< vips::VImage >::value_type const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_ImageVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; std::vector< vips::VImage >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ImageVector_reserve",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_reserve" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ImageVector_reserve" "', argument " "2"" of type '" "std::vector< vips::VImage >::size_type""'"); } arg2 = static_cast< std::vector< vips::VImage >::size_type >(val2); (arg1)->reserve(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ImageVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< vips::VImage >::size_type result; if (!PyArg_ParseTuple(args,(char *)"O:ImageVector_capacity",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageVector_capacity" "', argument " "1"" of type '" "std::vector< vips::VImage > const *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); result = ((std::vector< vips::VImage > const *)arg1)->capacity(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_ImageVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage > *arg1 = (std::vector< vips::VImage > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ImageVector",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ImageVector" "', argument " "1"" of type '" "std::vector< vips::VImage > *""'"); } arg1 = reinterpret_cast< std::vector< vips::VImage > * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *ImageVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_init__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:init",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "init" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); result = (bool)vips::init((char const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_init__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; if (!PyArg_ParseTuple(args,(char *)":init")) SWIG_fail; result = (bool)vips::init(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_init(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 1) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_init__SWIG_1(self, args); } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_init__SWIG_0(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'init'.\n" " Possible C/C++ prototypes are:\n" " vips::init(char const *)\n" " vips::init()\n"); return 0; } SWIGINTERN PyObject *_wrap_shutdown(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":shutdown")) SWIG_fail; vips::shutdown(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_print_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":VImage_print_all")) SWIG_fail; vips::VImage::print_all(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VImage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_VImage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VImage" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (vips::VImage *)new vips::VImage((char const *)arg1,(char const *)arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_new_VImage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (vips::VImage *)new vips::VImage((char const *)arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_VImage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; int arg2 ; int arg3 ; int arg4 ; vips::VImage::TBandFmt arg5 ; int res1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VImage",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "void *""'"); } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VImage" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VImage" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VImage" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_VImage" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'"); } arg5 = static_cast< vips::VImage::TBandFmt >(val5); try { result = (vips::VImage *)new vips::VImage(arg1,arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VImage__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; _VipsImage *arg1 = (_VipsImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__VipsImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "_VipsImage *""'"); } arg1 = reinterpret_cast< _VipsImage * >(argp1); result = (vips::VImage *)new vips::VImage(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VImage__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_VImage")) SWIG_fail; try { result = (vips::VImage *)new vips::VImage(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convert2disc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_convert2disc",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convert2disc" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convert2disc" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_convert2disc" "', argument " "3"" of type '" "char const *""'"); } arg3 = reinterpret_cast< char * >(buf3); try { result = vips::VImage::convert2disc((char const *)arg1,(char const *)arg2,(char const *)arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_new_VImage__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VImage",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VImage" "', argument " "1"" of type '" "vips::VImage const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VImage" "', argument " "1"" of type '" "vips::VImage const &""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (vips::VImage *)new vips::VImage((vips::VImage const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VImage(PyObject *self, PyObject *args) { int argc; PyObject *argv[6]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 5) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_VImage__SWIG_4(self, args); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p__VipsImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VImage__SWIG_3(self, args); } } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VImage__SWIG_5(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VImage__SWIG_1(self, args); } } if (argc == 2) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VImage__SWIG_0(self, args); } } } if (argc == 5) { int _v; void *ptr = 0; int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_VImage__SWIG_2(self, args); } } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VImage'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::VImage(char const *,char const *)\n" " vips::VImage::VImage(char const *)\n" " vips::VImage::VImage(void *,int,int,int,vips::VImage::TBandFmt)\n" " vips::VImage::VImage(_VipsImage *)\n" " vips::VImage::VImage()\n" " vips::VImage::VImage(vips::VImage const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage___assign__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage___assign__" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage___assign__" "', argument " "2"" of type '" "vips::VImage const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage___assign__" "', argument " "2"" of type '" "vips::VImage const &""'"); } arg2 = reinterpret_cast< vips::VImage * >(argp2); try { result = (vips::VImage *) &(arg1)->operator =((vips::VImage const &)*arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VImage, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_VImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_VImage",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VImage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; _VipsImage *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VImage_image",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_image" "', argument " "1"" of type '" "vips::VImage const *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (_VipsImage *)((vips::VImage const *)arg1)->image(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__VipsImage, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VImage_data",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_data" "', argument " "1"" of type '" "vips::VImage const *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (void *)((vips::VImage const *)arg1)->data(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_write__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_write",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_write" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_write" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->write(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_write__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_write",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_write" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (arg1)->write((char const *)arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_write__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_write",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_write" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->write(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_write(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_write__SWIG_2(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_write__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_write__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_write'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::write(vips::VImage)\n" " vips::VImage::write(char const *)\n" " vips::VImage::write()\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_debug_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VImage_debug_print",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_debug_print" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); (arg1)->debug_print(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Xsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xsize",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xsize" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (int)(arg1)->Xsize(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Ysize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Ysize",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Ysize" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (int)(arg1)->Ysize(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Bands",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Bands" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (int)(arg1)->Bands(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_BandFmt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage::TBandFmt result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_BandFmt",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_BandFmt" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (vips::VImage::TBandFmt)(arg1)->BandFmt(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Coding(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage::TCoding result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Coding",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Coding" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (vips::VImage::TCoding)(arg1)->Coding(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage::TType result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Type",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Type" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (vips::VImage::TType)(arg1)->Type(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Xres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; float result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xres",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xres" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (float)(arg1)->Xres(); resultobj = SWIG_From_float(static_cast< float >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Yres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; float result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yres",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yres" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (float)(arg1)->Yres(); resultobj = SWIG_From_float(static_cast< float >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Length",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Length" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (int)(arg1)->Length(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Compression(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage::TCompression result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Compression",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Compression" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (vips::VImage::TCompression)(arg1)->Compression(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Level",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Level" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (short)(arg1)->Level(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Xoffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Xoffset",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Xoffset" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (int)(arg1)->Xoffset(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Yoffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yoffset",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yoffset" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (int)(arg1)->Yoffset(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VImage_filename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_filename" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (char *)(arg1)->filename(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Hist",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Hist" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); result = (char *)(arg1)->Hist(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; gboolean result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_remove",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_remove" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_remove" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); result = (arg1)->meta_remove((char const *)arg2); resultobj = SWIG_NewPointerObj((new gboolean(static_cast< const gboolean& >(result))), SWIGTYPE_p_gboolean, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_get_typeof(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; GType result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_typeof",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_typeof" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_typeof" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); result = (arg1)->meta_get_typeof((char const *)arg2); resultobj = SWIG_NewPointerObj((new GType(static_cast< const GType& >(result))), SWIGTYPE_p_GType, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_get_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_int",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_int" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_int" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (int)(arg1)->meta_get_int((char const *)arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_get_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_double",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_double" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_double" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (double)(arg1)->meta_get_double((char const *)arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_get_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_string",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_string" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (char *)(arg1)->meta_get_string((char const *)arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_get_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_meta_get_area",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_area" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_area" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (void *)(arg1)->meta_get_area((char const *)arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_get_blob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; size_t *arg3 = (size_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_get_blob",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_get_blob" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_get_blob" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_meta_get_blob" "', argument " "3"" of type '" "size_t *""'"); } arg3 = reinterpret_cast< size_t * >(argp3); try { result = (void *)(arg1)->meta_get_blob((char const *)arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { (arg1)->meta_set((char const *)arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { (arg1)->meta_set((char const *)arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_set__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_meta_set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_meta_set" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_meta_set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_meta_set" "', argument " "3"" of type '" "char const *""'"); } arg3 = reinterpret_cast< char * >(buf3); try { (arg1)->meta_set((char const *)arg2,(char const *)arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_VImage_meta_set(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_meta_set__SWIG_0(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_meta_set__SWIG_1(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_meta_set__SWIG_2(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_meta_set'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::meta_set(char const *,int)\n" " vips::VImage::meta_set(char const *,double)\n" " vips::VImage::meta_set(char const *,char const *)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; vips::VImage::TBandFmt arg5 ; vips::VImage::TCoding arg6 ; vips::VImage::TType arg7 ; float arg8 ; float arg9 ; int arg10 ; int arg11 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; float val8 ; int ecode8 = 0 ; float val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'"); } arg5 = static_cast< vips::VImage::TBandFmt >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'"); } arg6 = static_cast< vips::VImage::TCoding >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'"); } arg7 = static_cast< vips::VImage::TType >(val7); ecode8 = SWIG_AsVal_float(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); ecode9 = SWIG_AsVal_float(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'"); } arg9 = static_cast< float >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_initdesc" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_initdesc" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; vips::VImage::TBandFmt arg5 ; vips::VImage::TCoding arg6 ; vips::VImage::TType arg7 ; float arg8 ; float arg9 ; int arg10 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; float val8 ; int ecode8 = 0 ; float val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'"); } arg5 = static_cast< vips::VImage::TBandFmt >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'"); } arg6 = static_cast< vips::VImage::TCoding >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'"); } arg7 = static_cast< vips::VImage::TType >(val7); ecode8 = SWIG_AsVal_float(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); ecode9 = SWIG_AsVal_float(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'"); } arg9 = static_cast< float >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_initdesc" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); try { (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; vips::VImage::TBandFmt arg5 ; vips::VImage::TCoding arg6 ; vips::VImage::TType arg7 ; float arg8 ; float arg9 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; float val8 ; int ecode8 = 0 ; float val9 ; int ecode9 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'"); } arg5 = static_cast< vips::VImage::TBandFmt >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'"); } arg6 = static_cast< vips::VImage::TCoding >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'"); } arg7 = static_cast< vips::VImage::TType >(val7); ecode8 = SWIG_AsVal_float(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); ecode9 = SWIG_AsVal_float(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_initdesc" "', argument " "9"" of type '" "float""'"); } arg9 = static_cast< float >(val9); try { (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; vips::VImage::TBandFmt arg5 ; vips::VImage::TCoding arg6 ; vips::VImage::TType arg7 ; float arg8 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; float val8 ; int ecode8 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'"); } arg5 = static_cast< vips::VImage::TBandFmt >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'"); } arg6 = static_cast< vips::VImage::TCoding >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'"); } arg7 = static_cast< vips::VImage::TType >(val7); ecode8 = SWIG_AsVal_float(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_initdesc" "', argument " "8"" of type '" "float""'"); } arg8 = static_cast< float >(val8); try { (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7,arg8); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_initdesc__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; vips::VImage::TBandFmt arg5 ; vips::VImage::TCoding arg6 ; vips::VImage::TType arg7 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_initdesc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_initdesc" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_initdesc" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_initdesc" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_initdesc" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_initdesc" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'"); } arg5 = static_cast< vips::VImage::TBandFmt >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_initdesc" "', argument " "6"" of type '" "vips::VImage::TCoding""'"); } arg6 = static_cast< vips::VImage::TCoding >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_initdesc" "', argument " "7"" of type '" "vips::VImage::TType""'"); } arg7 = static_cast< vips::VImage::TType >(val7); try { (arg1)->initdesc(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_initdesc(PyObject *self, PyObject *args) { int argc; PyObject *argv[12]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 11) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 7) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[5], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[6], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_initdesc__SWIG_4(self, args); } } } } } } } } if (argc == 8) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[5], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[6], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_float(argv[7], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_initdesc__SWIG_3(self, args); } } } } } } } } } if (argc == 9) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[5], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[6], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_float(argv[7], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_float(argv[8], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_initdesc__SWIG_2(self, args); } } } } } } } } } } if (argc == 10) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[5], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[6], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_float(argv[7], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_float(argv[8], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[9], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_initdesc__SWIG_1(self, args); } } } } } } } } } } } if (argc == 11) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[5], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[6], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_float(argv[7], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_float(argv[8], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[9], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[10], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_initdesc__SWIG_0(self, args); } } } } } } } } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_initdesc'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float,int,int)\n" " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float,int)\n" " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float,float)\n" " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType,float)\n" " vips::VImage::initdesc(int,int,int,vips::VImage::TBandFmt,vips::VImage::TCoding,vips::VImage::TType)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_abs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_abs",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_abs" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->abs(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_acos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_acos",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_acos" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->acos(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_add",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_add" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_add" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_add" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->add(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_asin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_asin",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_asin" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->asin(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_atan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_atan",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_atan" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->atan(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_avg",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_avg" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (double)(arg1)->avg(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; double arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_point",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_point" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_point" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_point" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_point" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_point" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { result = (double)(arg1)->point(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_point_bilinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_point_bilinear",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_point_bilinear" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_point_bilinear" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_point_bilinear" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_point_bilinear" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (double)(arg1)->point_bilinear(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_bandmean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_bandmean",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_bandmean" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->bandmean(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_ceil(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_ceil",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ceil" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->ceil(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_cos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_cos",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cos" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->cos(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_cross_phase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cross_phase",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cross_phase" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_cross_phase" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_cross_phase" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->cross_phase(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_deviate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_deviate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_deviate" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (double)(arg1)->deviate(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_divide(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_divide",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_divide" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_divide" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_divide" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->divide(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_exp10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_exp10",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exp10" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->exp10(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_expn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_expn",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_expn" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_expn" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->expn(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_expn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_expn",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_expn" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_expn" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->expn(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_expn(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_expn__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_expn__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_expn'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::expn(double)\n" " vips::VImage::expn(std::vector< double,std::allocator< double > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_exp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_exp",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->exp(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_floor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_floor",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_floor" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->floor(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_invert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_invert",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invert" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->invert(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lin",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lin" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lin" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lin" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { result = (arg1)->lin(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_linreg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ; std::vector< double,std::allocator< double > > arg2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_linreg",&obj0,&obj1)) SWIG_fail; { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_linreg" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_linreg" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = vips::VImage::linreg(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; std::vector< double,std::allocator< double > > arg3 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lin",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lin" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lin" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lin" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->lin(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lin(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 3) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_lin__SWIG_0(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_lin__SWIG_1(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_lin'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::lin(double,double)\n" " vips::VImage::lin(std::vector< double,std::allocator< double > >,std::vector< double,std::allocator< double > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_log10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_log10",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_log10" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->log10(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_log",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_log" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->log(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_max",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_max" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (double)(arg1)->max(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_maxpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::complex< double > result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->maxpos(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_maxpos_avg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double *arg2 = 0 ; double *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; double temp2 ; int res2 = SWIG_TMPOBJ ; double temp3 ; int res3 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; double result; arg2 = &temp2; arg3 = &temp3; if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos_avg",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos_avg" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (double)(arg1)->maxpos_avg(*arg2,*arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); if (SWIG_IsTmpObj(res2)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); } else { int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_measure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_measure",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_measure" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_measure" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_measure" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_measure" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_measure" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_measure" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_measure" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); try { result = (arg1)->measure(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_min",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_min" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (double)(arg1)->min(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_minpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::complex< double > result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_minpos",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_minpos" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->minpos(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_multiply(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_multiply",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_multiply" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_multiply" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_multiply" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->multiply(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_pow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_pow",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_pow" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_pow" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->pow(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_pow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_pow",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_pow" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_pow" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->pow(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_pow(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_pow__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_pow__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_pow'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::pow(double)\n" " vips::VImage::pow(std::vector< double,std::allocator< double > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_recomb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_recomb",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_recomb" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_recomb" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_recomb" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->recomb(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_remainder" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_remainder" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->remainder(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_remainder" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->remainder(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_remainder__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_remainder",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remainder" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_remainder" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->remainder(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_remainder(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_remainder__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_remainder__SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_remainder__SWIG_2(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_remainder'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::remainder(vips::VImage)\n" " vips::VImage::remainder(double)\n" " vips::VImage::remainder(std::vector< double,std::allocator< double > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_rint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_rint",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rint" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->rint(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_sign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_sign",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sign" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->sign(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_sin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_sin",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sin" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->sin(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_stats",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stats" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->stats(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_subtract(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_subtract",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_subtract" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_subtract" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_subtract" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->subtract(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_tan",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tan" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->tan(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_greyc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; double arg8 ; double arg9 ; double arg10 ; int arg11 ; int arg12 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val9 ; int ecode9 = 0 ; double val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; int val12 ; int ecode12 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_greyc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_greyc" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_greyc" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_greyc" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_greyc" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_greyc" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_greyc" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_greyc" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_greyc" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); ecode9 = SWIG_AsVal_double(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_greyc" "', argument " "9"" of type '" "double""'"); } arg9 = static_cast< double >(val9); ecode10 = SWIG_AsVal_double(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_greyc" "', argument " "10"" of type '" "double""'"); } arg10 = static_cast< double >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_greyc" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); ecode12 = SWIG_AsVal_int(obj11, &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_greyc" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); try { result = (arg1)->greyc(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_greyc_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; double arg8 ; double arg9 ; double arg10 ; double arg11 ; int arg12 ; int arg13 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val9 ; int ecode9 = 0 ; double val10 ; int ecode10 = 0 ; double val11 ; int ecode11 = 0 ; int val12 ; int ecode12 = 0 ; int val13 ; int ecode13 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; PyObject * obj12 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOO:VImage_greyc_mask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_greyc_mask" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_greyc_mask" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_greyc_mask" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_greyc_mask" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_greyc_mask" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_greyc_mask" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_greyc_mask" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_greyc_mask" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_greyc_mask" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); ecode9 = SWIG_AsVal_double(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_greyc_mask" "', argument " "9"" of type '" "double""'"); } arg9 = static_cast< double >(val9); ecode10 = SWIG_AsVal_double(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_greyc_mask" "', argument " "10"" of type '" "double""'"); } arg10 = static_cast< double >(val10); ecode11 = SWIG_AsVal_double(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_greyc_mask" "', argument " "11"" of type '" "double""'"); } arg11 = static_cast< double >(val11); ecode12 = SWIG_AsVal_int(obj11, &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_greyc_mask" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); ecode13 = SWIG_AsVal_int(obj12, &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_greyc_mask" "', argument " "13"" of type '" "int""'"); } arg13 = static_cast< int >(val13); try { result = (arg1)->greyc_mask(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_LCh2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_LCh2Lab",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LCh2Lab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->LCh2Lab(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_LCh2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_LCh2UCS",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LCh2UCS" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->LCh2UCS(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Lab2LCh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LCh",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LCh" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->Lab2LCh(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Lab2LabQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LabQ",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LabQ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->Lab2LabQ(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Lab2LabS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2LabS",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2LabS" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->Lab2LabS(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Lab2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2UCS",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2UCS" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->Lab2UCS(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Lab2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Lab2XYZ",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2XYZ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->Lab2XYZ(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Lab2XYZ_temp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; double arg4 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_Lab2XYZ_temp",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2XYZ_temp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_Lab2XYZ_temp" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_Lab2XYZ_temp" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_Lab2XYZ_temp" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); try { result = (arg1)->Lab2XYZ_temp(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Lab2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDisplay arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_Lab2disp",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Lab2disp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_Lab2disp" "', argument " "2"" of type '" "vips::VDisplay""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_Lab2disp" "', argument " "2"" of type '" "vips::VDisplay""'"); } else { vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->Lab2disp(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_LabQ2LabS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2LabS",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2LabS" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->LabQ2LabS(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_LabQ2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2Lab",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2Lab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->LabQ2Lab(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_LabQ2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabQ2XYZ",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2XYZ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->LabQ2XYZ(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_LabQ2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDisplay arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_LabQ2disp",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabQ2disp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_LabQ2disp" "', argument " "2"" of type '" "vips::VDisplay""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_LabQ2disp" "', argument " "2"" of type '" "vips::VDisplay""'"); } else { vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->LabQ2disp(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_LabS2LabQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabS2LabQ",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabS2LabQ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->LabS2LabQ(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_LabS2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_LabS2Lab",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_LabS2Lab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->LabS2Lab(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_UCS2LCh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2LCh",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2LCh" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->UCS2LCh(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_UCS2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2Lab",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2Lab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->UCS2Lab(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_UCS2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_UCS2XYZ",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_UCS2XYZ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->UCS2XYZ(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_XYZ2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2Lab",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Lab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->XYZ2Lab(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_XYZ2Lab_temp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; double arg4 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_XYZ2Lab_temp",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Lab_temp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_XYZ2Lab_temp" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_XYZ2Lab_temp" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_XYZ2Lab_temp" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); try { result = (arg1)->XYZ2Lab_temp(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_XYZ2UCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2UCS",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2UCS" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->XYZ2UCS(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_XYZ2Yxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2Yxy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2Yxy" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->XYZ2Yxy(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_XYZ2disp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDisplay arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_XYZ2disp",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2disp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_XYZ2disp" "', argument " "2"" of type '" "vips::VDisplay""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_XYZ2disp" "', argument " "2"" of type '" "vips::VDisplay""'"); } else { vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->XYZ2disp(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_XYZ2sRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_XYZ2sRGB",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_XYZ2sRGB" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->XYZ2sRGB(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_Yxy2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_Yxy2XYZ",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_Yxy2XYZ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->Yxy2XYZ(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_dE00_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE00_fromLab",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE00_fromLab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE00_fromLab" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE00_fromLab" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->dE00_fromLab(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_dECMC_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dECMC_fromLab",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dECMC_fromLab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dECMC_fromLab" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromLab" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->dECMC_fromLab(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_dECMC_fromdisp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; vips::VDisplay arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; void *argp3 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_dECMC_fromdisp",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dECMC_fromdisp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dECMC_fromdisp" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromdisp" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } { res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_dECMC_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dECMC_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'"); } else { vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp3); arg3 = *temp; if (SWIG_IsNewObj(res3)) delete temp; } } try { result = (arg1)->dECMC_fromdisp(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_dE_fromLab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE_fromLab",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromLab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromLab" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromLab" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->dE_fromLab(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_dE_fromXYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dE_fromXYZ",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromXYZ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromXYZ" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromXYZ" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->dE_fromXYZ(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_dE_fromdisp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; vips::VDisplay arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; void *argp3 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_dE_fromdisp",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dE_fromdisp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dE_fromdisp" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromdisp" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } { res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_dE_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dE_fromdisp" "', argument " "3"" of type '" "vips::VDisplay""'"); } else { vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp3); arg3 = *temp; if (SWIG_IsNewObj(res3)) delete temp; } } try { result = (arg1)->dE_fromdisp(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_disp2Lab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDisplay arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_disp2Lab",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp2Lab" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_disp2Lab" "', argument " "2"" of type '" "vips::VDisplay""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_disp2Lab" "', argument " "2"" of type '" "vips::VDisplay""'"); } else { vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->disp2Lab(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_disp2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDisplay arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_disp2XYZ",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp2XYZ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDisplay, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_disp2XYZ" "', argument " "2"" of type '" "vips::VDisplay""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_disp2XYZ" "', argument " "2"" of type '" "vips::VDisplay""'"); } else { vips::VDisplay * temp = reinterpret_cast< vips::VDisplay * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->disp2XYZ(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_float2rad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_float2rad",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_float2rad" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->float2rad(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_icc_ac2rc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_icc_ac2rc",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_ac2rc" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_ac2rc" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (arg1)->icc_ac2rc(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_icc_export_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_icc_export_depth",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_export_depth" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_icc_export_depth" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_icc_export_depth" "', argument " "3"" of type '" "char *""'"); } arg3 = reinterpret_cast< char * >(buf3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_icc_export_depth" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->icc_export_depth(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_VImage_icc_import(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_icc_import",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_import" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_import" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_icc_import" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->icc_import(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_icc_import_embedded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_icc_import_embedded",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_import_embedded" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_icc_import_embedded" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->icc_import_embedded(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_icc_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_icc_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_transform" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_transform" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_icc_transform" "', argument " "3"" of type '" "char *""'"); } arg3 = reinterpret_cast< char * >(buf3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_icc_transform" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->icc_transform(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_VImage_lab_morph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_lab_morph",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lab_morph" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lab_morph" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lab_morph" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lab_morph" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lab_morph" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lab_morph" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lab_morph" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); try { result = (arg1)->lab_morph(arg2,arg3,arg4,arg5,arg6); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rad2float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_rad2float",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rad2float" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->rad2float(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_sRGB2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_sRGB2XYZ",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sRGB2XYZ" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->sRGB2XYZ(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_gaussnoise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; double arg3 ; double arg4 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_gaussnoise",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_gaussnoise" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gaussnoise" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_gaussnoise" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_gaussnoise" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); try { result = vips::VImage::gaussnoise(arg1,arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_bandjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_bandjoin",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_bandjoin" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_bandjoin" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_bandjoin" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->bandjoin(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_black(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int arg3 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_black",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_black" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_black" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_black" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = vips::VImage::black(arg1,arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_c2amph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2amph",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2amph" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->c2amph(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_c2imag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2imag",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2imag" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->c2imag(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_c2real(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2real",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2real" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->c2real(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_c2rect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2rect",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2rect" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->c2rect(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2fmt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_clip2fmt",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2fmt" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_clip2fmt" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->clip2fmt(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->copy(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_copy_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy_file",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_file" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->copy_file(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_copy_morph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_copy_morph",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_morph" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_copy_morph" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_copy_morph" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_copy_morph" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->copy_morph(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_copy_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_copy_swap",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_swap" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->copy_swap(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_copy_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; double arg3 ; double arg4 ; int arg5 ; int arg6 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_copy_set",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_copy_set" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_copy_set" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_copy_set" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_copy_set" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_copy_set" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_copy_set" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); try { result = (arg1)->copy_set(arg2,arg3,arg4,arg5,arg6); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_extract_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_extract_area",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_area" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_area" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_area" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract_area" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract_area" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { result = (arg1)->extract_area(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_extract_areabands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_extract_areabands",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_areabands" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_areabands" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_areabands" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract_areabands" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract_areabands" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_extract_areabands" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_extract_areabands" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); try { result = (arg1)->extract_areabands(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_extract_band(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_extract_band",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_band" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_band" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->extract_band(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_extract_bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_extract_bands",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract_bands" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract_bands" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract_bands" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->extract_bands(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_extract(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_extract",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_extract" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_extract" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_extract" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_extract" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_extract" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_extract" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); try { result = (arg1)->extract(arg2,arg3,arg4,arg5,arg6); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_falsecolour(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_falsecolour",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_falsecolour" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->falsecolour(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_fliphor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_fliphor",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fliphor" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->fliphor(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_flipver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_flipver",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flipver" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->flipver(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_gbandjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_gbandjoin",&obj0)) SWIG_fail; { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_gbandjoin" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = vips::VImage::gbandjoin(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_grid",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grid" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_grid" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_grid" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_grid" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->grid(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insert" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insert" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->insert(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; std::vector< int,std::allocator< int > > arg3 ; std::vector< int,std::allocator< int > > arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insert" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insert" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->insert(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_insert(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 4) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_insert__SWIG_0(self, args); } } } } } if (argc == 4) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[3], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_insert__SWIG_1(self, args); } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_insert'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::insert(vips::VImage,int,int)\n" " vips::VImage::insert(vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_insert_noexpand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insert_noexpand",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insert_noexpand" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insert_noexpand" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insert_noexpand" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insert_noexpand" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insert_noexpand" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->insert_noexpand(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_embed",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_embed" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_embed" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_embed" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_embed" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_embed" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_embed" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); try { result = (arg1)->embed(arg2,arg3,arg4,arg5,arg6); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lrjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lrjoin",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrjoin" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrjoin" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrjoin" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->lrjoin(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_msb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_msb",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_msb" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->msb(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_msb_band(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_msb_band",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_msb_band" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_msb_band" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->msb_band(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_replicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_replicate",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_replicate" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_replicate" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_replicate" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->replicate(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_ri2c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_ri2c",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ri2c" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_ri2c" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ri2c" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->ri2c(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rot180(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot180",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot180" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->rot180(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rot270(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot270",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot270" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->rot270(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rot90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_rot90",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rot90" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->rot90(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_scale",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_scale" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->scale(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_scaleps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_scaleps",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_scaleps" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->scaleps(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_subsample(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_subsample",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_subsample" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_subsample" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_subsample" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->subsample(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_system(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_system",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_system" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_system" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (char *)(arg1)->system(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_system_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char **arg5 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_system_image",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_system_image" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_system_image" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_system_image" "', argument " "3"" of type '" "char *""'"); } arg3 = reinterpret_cast< char * >(buf3); res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_system_image" "', argument " "4"" of type '" "char *""'"); } arg4 = reinterpret_cast< char * >(buf4); res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_p_char, 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VImage_system_image" "', argument " "5"" of type '" "char *&""'"); } if (!argp5) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_system_image" "', argument " "5"" of type '" "char *&""'"); } arg5 = reinterpret_cast< char ** >(argp5); try { result = (arg1)->system_image(arg2,arg3,arg4,*arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; return NULL; } SWIGINTERN PyObject *_wrap_VImage_tbjoin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_tbjoin",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbjoin" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbjoin" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbjoin" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->tbjoin(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_text(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int arg4 ; int arg5 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_text",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_text" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_text" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_text" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_text" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_text" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { result = vips::VImage::text(arg1,arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_wrap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_wrap",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_wrap" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_wrap" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_wrap" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->wrap(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_zoom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_zoom",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_zoom" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_zoom" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_zoom" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->zoom(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_aconvsep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_aconvsep",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_aconvsep" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_aconvsep" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_aconvsep" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_aconvsep" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->aconvsep(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_aconv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_aconv",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_aconv" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_aconv" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_aconv" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_aconv" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_aconv" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->aconv(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_addgnoise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_addgnoise",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_addgnoise" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_addgnoise" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->addgnoise(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_compass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_compass",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_compass" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_compass" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_compass" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->compass(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_contrast_surface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_contrast_surface",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_contrast_surface" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_contrast_surface" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_contrast_surface" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->contrast_surface(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_conv__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->conv(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_conv__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->conv(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_conv(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VIMask, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_conv__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VDMask, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_conv__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_conv'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::conv(vips::VIMask)\n" " vips::VImage::conv(vips::VDMask)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_convsep__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->convsep(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convsep__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->convsep(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convsep(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VIMask, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_convsep__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VDMask, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_convsep__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_convsep'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::convsep(vips::VIMask)\n" " vips::VImage::convsep(vips::VDMask)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_fastcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fastcor",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fastcor" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fastcor" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fastcor" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->fastcor(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_gradcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradcor",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradcor" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradcor" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradcor" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->gradcor(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_gradient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradient",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradient" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradient" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradient" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->gradient(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_grad_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_grad_x",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grad_x" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->grad_x(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_grad_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_grad_y",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_grad_y" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->grad_y(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lindetect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lindetect",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lindetect" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lindetect" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lindetect" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->lindetect(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_sharpen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_sharpen",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_sharpen" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_sharpen" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_sharpen" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_sharpen" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_sharpen" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_sharpen" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_sharpen" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); try { result = (arg1)->sharpen(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_spcor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_spcor",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_spcor" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_spcor" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_spcor" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->spcor(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_argb2rgba(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_argb2rgba",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_argb2rgba" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->argb2rgba(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_flood_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; std::vector< double,std::allocator< double > > arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_flood_copy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_copy" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flood_copy" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_copy" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_flood_copy" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->flood_copy(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_flood_blob_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; std::vector< double,std::allocator< double > > arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_flood_blob_copy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_blob_copy" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flood_blob_copy" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_blob_copy" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_flood_blob_copy" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->flood_blob_copy(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_flood_other_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_flood_other_copy",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flood_other_copy" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_flood_other_copy" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_flood_other_copy" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flood_other_copy" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_flood_other_copy" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_flood_other_copy" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { result = (arg1)->flood_other_copy(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_c2ps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_c2ps",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_c2ps" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->c2ps(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_resize_linear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_resize_linear",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_resize_linear" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_resize_linear" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_resize_linear" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->resize_linear(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_cmulnorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cmulnorm",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cmulnorm" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_cmulnorm" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_cmulnorm" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->cmulnorm(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_fav4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; vips::VImage arg3 ; vips::VImage arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; void *argp3 ; int res3 = 0 ; void *argp4 ; int res4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_fav4",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fav4" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fav4" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } { res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_fav4" "', argument " "3"" of type '" "vips::VImage""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "3"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3); arg3 = *temp; if (SWIG_IsNewObj(res3)) delete temp; } } { res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_fav4" "', argument " "4"" of type '" "vips::VImage""'"); } if (!argp4) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fav4" "', argument " "4"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp4); arg4 = *temp; if (SWIG_IsNewObj(res4)) delete temp; } } try { result = (arg1)->fav4(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_gadd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; vips::VImage arg4 ; double arg5 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; void *argp4 ; int res4 = 0 ; double val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_gadd",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gadd" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gadd" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_gadd" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); { res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VImage_gadd" "', argument " "4"" of type '" "vips::VImage""'"); } if (!argp4) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gadd" "', argument " "4"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp4); arg4 = *temp; if (SWIG_IsNewObj(res4)) delete temp; } } ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_gadd" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); try { result = (arg1)->gadd(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_icc_export(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_icc_export",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_icc_export" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_icc_export" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_icc_export" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->icc_export(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_litecor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; double arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_litecor",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_litecor" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_litecor" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_litecor" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_litecor" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_litecor" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); try { result = (arg1)->litecor(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_affine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; int arg8 ; int arg9 ; int arg10 ; int arg11 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_affine",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affine" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_affine" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affine" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affine" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affine" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affine" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affine" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affine" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_affine" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_affine" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_affine" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (arg1)->affine(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2c",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2c" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2c(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2cm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2cm",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2cm" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2cm(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2d",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2d" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2d(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2dcm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2dcm",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2dcm" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2dcm(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2f",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2f" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2f(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2i",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2i" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2i(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convsub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_convsub",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsub" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsub" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsub" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_convsub" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_convsub" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->convsub(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convf",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convf" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convf" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convf" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->convf(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convsepf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsepf",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsepf" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsepf" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsepf" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->convsepf(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2s",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2s" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2s(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2ui(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2ui",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2ui" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2ui(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_insertplace__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; std::vector< int,std::allocator< int > > arg3 ; std::vector< int,std::allocator< int > > arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insertplace",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insertplace" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insertplace" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_insertplace" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->insertplace(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_clip2us(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_clip2us",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_clip2us" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->clip2us(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_slice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_slice",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_slice" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_slice" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_slice" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { result = (arg1)->slice(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_segment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int temp2 ; int res2 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; vips::VImage result; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"O:VImage_segment",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_segment" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->segment(*arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (SWIG_IsTmpObj(res2)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); } else { int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_line__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_line" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_line" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_line" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_line" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_line" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_line" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); try { (arg1)->line(arg2,arg3,arg4,arg5,arg6); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_thresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_thresh",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_thresh" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_thresh" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->thresh(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convf_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convf_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convf_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convf_raw" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convf_raw" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->convf_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_conv_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_conv_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_conv_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_conv_raw" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_conv_raw" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->conv_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_contrast_surface_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_contrast_surface_raw",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_contrast_surface_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_contrast_surface_raw" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_contrast_surface_raw" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->contrast_surface_raw(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convsepf_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsepf_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsepf_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsepf_raw" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsepf_raw" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->convsepf_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_convsep_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_convsep_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_convsep_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_convsep_raw" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_convsep_raw" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->convsep_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_fastcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fastcor_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fastcor_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_fastcor_raw" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_fastcor_raw" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->fastcor_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_gradcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gradcor_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gradcor_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_gradcor_raw" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_gradcor_raw" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->gradcor_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_spcor_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_spcor_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_spcor_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_spcor_raw" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_spcor_raw" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->spcor_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lhisteq_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lhisteq_raw",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lhisteq_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lhisteq_raw" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lhisteq_raw" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->lhisteq_raw(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_stdif_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; int arg7 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_stdif_raw",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stdif_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stdif_raw" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stdif_raw" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_stdif_raw" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_stdif_raw" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_stdif_raw" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_stdif_raw" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); try { result = (arg1)->stdif_raw(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rank_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rank_raw",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rank_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank_raw" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rank_raw" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rank_raw" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->rank_raw(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_dilate_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dilate_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dilate_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dilate_raw" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dilate_raw" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->dilate_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_erode_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_erode_raw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_erode_raw" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_erode_raw" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_erode_raw" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->erode_raw(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_similarity_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage_similarity_area",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_similarity_area" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_similarity_area" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_similarity_area" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_similarity_area" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_similarity_area" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_similarity_area" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_similarity_area" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_similarity_area" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_similarity_area" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); try { result = (arg1)->similarity_area(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_similarity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_similarity",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_similarity" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_similarity" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_similarity" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_similarity" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_similarity" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); try { result = (arg1)->similarity(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_mask2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask arg1 ; void *argp1 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_mask2vips",&obj0)) SWIG_fail; { res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_mask2vips" "', argument " "1"" of type '" "vips::VDMask""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_mask2vips" "', argument " "1"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1); arg1 = *temp; if (SWIG_IsNewObj(res1)) delete temp; } } try { result = vips::VImage::mask2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_vips2mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_vips2mask",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2mask" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->vips2mask(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_insertplace__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_insertplace",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_insertplace" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_insertplace" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_insertplace" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_insertplace" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { (arg1)->insertplace(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_insertplace(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 4) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_insertplace__SWIG_1(self, args); } } } } } if (argc == 4) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[3], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_insertplace__SWIG_0(self, args); } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_insertplace'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::insertplace(vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n" " vips::VImage::insertplace(vips::VImage,int,int)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_circle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_circle",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_circle" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_circle" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_circle" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_circle" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_circle" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { (arg1)->circle(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_andimage" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_andimage" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->andimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_andimage" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->andimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_andimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_andimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_andimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_andimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->andimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_andimage(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_andimage__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_andimage__SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_andimage__SWIG_2(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_andimage'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::andimage(vips::VImage)\n" " vips::VImage::andimage(int)\n" " vips::VImage::andimage(std::vector< double,std::allocator< double > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_orimage" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_orimage" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->orimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_orimage" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->orimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_orimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_orimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_orimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_orimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->orimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_orimage(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_orimage__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_orimage__SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_orimage__SWIG_2(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_orimage'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::orimage(vips::VImage)\n" " vips::VImage::orimage(int)\n" " vips::VImage::orimage(std::vector< double,std::allocator< double > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_eorimage" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->eorimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->eorimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_eorimage__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_eorimage",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_eorimage" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_eorimage" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->eorimage(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_eorimage(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_eorimage__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_eorimage__SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_eorimage__SWIG_2(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_eorimage'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::eorimage(vips::VImage)\n" " vips::VImage::eorimage(int)\n" " vips::VImage::eorimage(std::vector< double,std::allocator< double > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_shiftleft__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftleft",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftleft" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_shiftleft" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->shiftleft(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_shiftleft__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftleft",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftleft" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shiftleft" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->shiftleft(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_shiftleft(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_shiftleft__SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_shiftleft__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_shiftleft'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::shiftleft(std::vector< double,std::allocator< double > >)\n" " vips::VImage::shiftleft(int)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_shiftright__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftright",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftright" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_shiftright" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->shiftright(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_shiftright__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_shiftright",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shiftright" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shiftright" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->shiftright(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_shiftright(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_shiftright__SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_shiftright__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_shiftright'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::shiftright(std::vector< double,std::allocator< double > >)\n" " vips::VImage::shiftright(int)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_blend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; vips::VImage arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; void *argp3 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_blend",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_blend" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_blend" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_blend" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } { res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_blend" "', argument " "3"" of type '" "vips::VImage""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_blend" "', argument " "3"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3); arg3 = *temp; if (SWIG_IsNewObj(res3)) delete temp; } } try { result = (arg1)->blend(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_equal" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_equal" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->equal(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_equal" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->equal(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_equal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_equal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_equal" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_equal" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->equal(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_equal(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_equal__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_equal__SWIG_2(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_equal__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_equal'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::equal(vips::VImage)\n" " vips::VImage::equal(std::vector< double,std::allocator< double > >)\n" " vips::VImage::equal(double)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_ifthenelse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; vips::VImage arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; void *argp3 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_ifthenelse",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ifthenelse" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_ifthenelse" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ifthenelse" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } { res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_ifthenelse" "', argument " "3"" of type '" "vips::VImage""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_ifthenelse" "', argument " "3"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3); arg3 = *temp; if (SWIG_IsNewObj(res3)) delete temp; } } try { result = (arg1)->ifthenelse(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_less__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_less" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_less" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->less(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_less__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_less" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->less(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_less__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_less",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_less" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_less" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->less(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_less(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_less__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_less__SWIG_2(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_less__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_less'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::less(vips::VImage)\n" " vips::VImage::less(std::vector< double,std::allocator< double > >)\n" " vips::VImage::less(double)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lesseq" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->lesseq(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->lesseq(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lesseq__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_lesseq",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lesseq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lesseq" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->lesseq(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lesseq(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_lesseq__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_lesseq__SWIG_2(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_lesseq__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_lesseq'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::lesseq(vips::VImage)\n" " vips::VImage::lesseq(std::vector< double,std::allocator< double > >)\n" " vips::VImage::lesseq(double)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_more__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_more" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_more" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->more(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_more__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_more" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->more(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_more__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_more",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_more" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_more" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->more(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_more(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_more__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_more__SWIG_2(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_more__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_more'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::more(vips::VImage)\n" " vips::VImage::more(std::vector< double,std::allocator< double > >)\n" " vips::VImage::more(double)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_moreeq" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->moreeq(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->moreeq(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_moreeq__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_moreeq",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_moreeq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_moreeq" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->moreeq(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_moreeq(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_moreeq__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_moreeq__SWIG_2(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_moreeq__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_moreeq'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::moreeq(vips::VImage)\n" " vips::VImage::moreeq(std::vector< double,std::allocator< double > >)\n" " vips::VImage::moreeq(double)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_notequal" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_notequal" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->notequal(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; std::vector< double,std::allocator< double > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_notequal" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->notequal(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_notequal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_notequal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_notequal" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_notequal" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->notequal(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_notequal(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_notequal__SWIG_0(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_notequal__SWIG_2(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[1], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_notequal__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_notequal'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::notequal(vips::VImage)\n" " vips::VImage::notequal(std::vector< double,std::allocator< double > >)\n" " vips::VImage::notequal(double)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_quadratic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_quadratic",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_quadratic" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_quadratic" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_quadratic" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->quadratic(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_csv2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_csv2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_csv2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::csv2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_fits2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_fits2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fits2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::fits2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_jpeg2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_jpeg2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_jpeg2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::jpeg2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_magick2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_magick2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_magick2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::magick2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_png2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_png2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_png2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::png2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_exr2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_exr2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_exr2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::exr2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_ppm2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_ppm2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ppm2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::ppm2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_analyze2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_analyze2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_analyze2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::analyze2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_tiff2vips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_tiff2vips",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tiff2vips" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = vips::VImage::tiff2vips(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_vips2csv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2csv",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2csv" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2csv" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->vips2csv(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_vips2dz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2dz",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2dz" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2dz" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->vips2dz(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_vips2jpeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2jpeg",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2jpeg" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2jpeg" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->vips2jpeg(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_vips2mimejpeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2mimejpeg",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2mimejpeg" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_vips2mimejpeg" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { (arg1)->vips2mimejpeg(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_vips2png(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2png",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2png" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2png" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->vips2png(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_vips2ppm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2ppm",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2ppm" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2ppm" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->vips2ppm(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_vips2tiff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_vips2tiff",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_vips2tiff" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_vips2tiff" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->vips2tiff(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_create_fmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; double arg8 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_create_fmask",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_create_fmask" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_create_fmask" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_create_fmask" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_create_fmask" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_create_fmask" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_create_fmask" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_create_fmask" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_create_fmask" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); try { result = vips::VImage::create_fmask(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_disp_ps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_disp_ps",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_disp_ps" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->disp_ps(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_flt_image_freq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_flt_image_freq",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_flt_image_freq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_flt_image_freq" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_flt_image_freq" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_flt_image_freq" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_flt_image_freq" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_flt_image_freq" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_flt_image_freq" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); try { result = (arg1)->flt_image_freq(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_fractsurf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; double arg2 ; int val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fractsurf",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fractsurf" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fractsurf" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = vips::VImage::fractsurf(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_freqflt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_freqflt",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_freqflt" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_freqflt" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_freqflt" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->freqflt(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_fwfft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_fwfft",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_fwfft" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->fwfft(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rotquad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_rotquad",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rotquad" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->rotquad(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_invfft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_invfft",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invfft" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->invfft(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_phasecor_fft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_phasecor_fft",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_phasecor_fft" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_phasecor_fft" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_phasecor_fft" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->phasecor_fft(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_invfftr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_invfftr",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invfftr" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->invfftr(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_gammacorrect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_gammacorrect",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_gammacorrect" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_gammacorrect" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->gammacorrect(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_heq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_heq",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_heq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_heq" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->heq(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hist",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hist" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_hist" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->hist(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_histcum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_histcum",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histcum" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->histcum(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_histeq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_histeq",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histeq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->histeq(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_hist_indexed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hist_indexed",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hist_indexed" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_hist_indexed" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_hist_indexed" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->hist_indexed(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_histgr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histgr",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histgr" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_histgr" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->histgr(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_histnD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histnD",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histnD" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_histnD" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->histnD(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_histnorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_histnorm",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histnorm" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->histnorm(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_histplot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_histplot",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histplot" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->histplot(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_histspec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_histspec",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_histspec" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_histspec" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_histspec" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->histspec(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_hsp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_hsp",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_hsp" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_hsp" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_hsp" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->hsp(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_identity",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_identity" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); try { result = vips::VImage::identity(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_identity_ushort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_identity_ushort",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_identity_ushort" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_identity_ushort" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = vips::VImage::identity_ushort(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_ismonotonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_ismonotonic",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_ismonotonic" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (int)(arg1)->ismonotonic(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lhisteq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_lhisteq",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lhisteq" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_lhisteq" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lhisteq" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (arg1)->lhisteq(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_mpercent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_mpercent",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_mpercent" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_mpercent" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (int)(arg1)->mpercent(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_invertlut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask arg1 ; int arg2 ; void *argp1 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_invertlut",&obj0,&obj1)) SWIG_fail; { res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_invertlut" "', argument " "1"" of type '" "vips::VDMask""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_invertlut" "', argument " "1"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1); arg1 = *temp; if (SWIG_IsNewObj(res1)) delete temp; } } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_invertlut" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = vips::VImage::invertlut(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_buildlut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask arg1 ; void *argp1 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_buildlut",&obj0)) SWIG_fail; { res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_buildlut" "', argument " "1"" of type '" "vips::VDMask""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_buildlut" "', argument " "1"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp1); arg1 = *temp; if (SWIG_IsNewObj(res1)) delete temp; } } try { result = vips::VImage::buildlut(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_maplut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_maplut",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maplut" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_maplut" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_maplut" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->maplut(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_project(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_project",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_project" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_project" "', argument " "2"" of type '" "vips::VImage &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_project" "', argument " "2"" of type '" "vips::VImage &""'"); } arg2 = reinterpret_cast< vips::VImage * >(argp2); try { result = (arg1)->project(*arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_stdif(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; int arg7 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_stdif",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stdif" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stdif" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stdif" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_stdif" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_stdif" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_stdif" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_stdif" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); try { result = (arg1)->stdif(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tone_analyse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_tone_analyse",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tone_analyse" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_analyse" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_analyse" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_analyse" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_analyse" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_analyse" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_analyse" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); try { result = (arg1)->tone_analyse(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tone_build(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; double arg1 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; double arg8 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_tone_build",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_tone_build" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_build" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_build" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_build" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_build" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_build" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_build" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tone_build" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); try { result = vips::VImage::tone_build(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tone_build_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; double arg8 ; double arg9 ; double arg10 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val9 ; int ecode9 = 0 ; double val10 ; int ecode10 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_tone_build_range",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_tone_build_range" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_tone_build_range" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tone_build_range" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tone_build_range" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tone_build_range" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tone_build_range" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tone_build_range" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tone_build_range" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); ecode9 = SWIG_AsVal_double(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tone_build_range" "', argument " "9"" of type '" "double""'"); } arg9 = static_cast< double >(val9); ecode10 = SWIG_AsVal_double(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tone_build_range" "', argument " "10"" of type '" "double""'"); } arg10 = static_cast< double >(val10); try { result = vips::VImage::tone_build_range(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tone_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_tone_map",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tone_map" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tone_map" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tone_map" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->tone_map(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_circle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; std::vector< double,std::allocator< double > > arg6 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_draw_circle",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_circle" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_circle" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_circle" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_circle" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_circle" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj5, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_circle" "', argument " "6"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg6 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->draw_circle(arg2,arg3,arg4,arg5,arg6); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_rect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; std::vector< double,std::allocator< double > > arg7 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_draw_rect",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_rect" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_rect" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_rect" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_rect" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_rect" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_draw_rect" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj6, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_rect" "', argument " "7"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg7 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->draw_rect(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; std::vector< double,std::allocator< double > > arg6 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:VImage_draw_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_line" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_line" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_line" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_line" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_line" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj5, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_line" "', argument " "6"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg6 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->draw_line(arg2,arg3,arg4,arg5,arg6); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; std::vector< double,std::allocator< double > > arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_point",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_point" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_point" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_point" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_point" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->draw_point(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_smudge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_smudge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_smudge" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_smudge" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_smudge" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_smudge" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_smudge" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { (arg1)->draw_smudge(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_flood(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; std::vector< double,std::allocator< double > > arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_flood",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_flood" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_flood" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->draw_flood(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_flood_blob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; std::vector< double,std::allocator< double > > arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_flood_blob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood_blob" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_draw_flood_blob" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood_blob" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_flood_blob" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->draw_flood_blob(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_flood_other(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_flood_other",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_flood_other" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_flood_other" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_flood_other" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_flood_other" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_flood_other" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_draw_flood_other" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { (arg1)->draw_flood_other(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_draw_image",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_image" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_image" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_image" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_image" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_image" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { (arg1)->draw_image(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_draw_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; std::vector< double,std::allocator< double > > arg5 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_draw_mask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_draw_mask" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_draw_mask" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_draw_mask" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_draw_mask" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_draw_mask" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj4, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_draw_mask" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg5 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->draw_mask(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_line__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; vips::VImage arg3 ; std::vector< int,std::allocator< int > > arg4 ; std::vector< int,std::allocator< int > > arg5 ; std::vector< int,std::allocator< int > > arg6 ; std::vector< int,std::allocator< int > > arg7 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; void *argp3 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_line",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_line" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_line" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_line" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } { res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_line" "', argument " "3"" of type '" "vips::VImage""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_line" "', argument " "3"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp3); arg3 = *temp; if (SWIG_IsNewObj(res3)) delete temp; } } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj4, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "5"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg5 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj5, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "6"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg6 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj6, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_line" "', argument " "7"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg7 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (arg1)->line(arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_line(PyObject *self, PyObject *args) { int argc; PyObject *argv[8]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 7) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 6) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[5], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_VImage_line__SWIG_0(self, args); } } } } } } } if (argc == 7) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_vips__VImage, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[3], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[4], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[5], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[6], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_VImage_line__SWIG_1(self, args); } } } } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VImage_line'.\n" " Possible C/C++ prototypes are:\n" " vips::VImage::line(int,int,int,int,int)\n" " vips::VImage::line(vips::VImage,vips::VImage,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >,std::vector< int,std::allocator< int > >)\n"); return 0; } SWIGINTERN PyObject *_wrap_VImage_binfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_binfile",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_binfile" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_binfile" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_binfile" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_binfile" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_binfile" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { result = vips::VImage::binfile(arg1,arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_cache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_cache",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cache" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_cache" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_cache" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_cache" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->cache(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_getext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VImage_getext",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_getext" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (char *)(arg1)->getext(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_header_get_typeof(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_get_typeof",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_get_typeof" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_get_typeof" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (int)(arg1)->header_get_typeof(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_header_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_int",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_int" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_int" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (int)(arg1)->header_int(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_header_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_double",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_double" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_double" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (double)(arg1)->header_double(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_header_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_header_string",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_header_string" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_header_string" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (char *)(arg1)->header_string(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_history_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VImage_history_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_history_get" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (char *)(arg1)->history_get(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_printdesc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VImage_printdesc",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_printdesc" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { (arg1)->printdesc(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_cntlines(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_cntlines",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_cntlines" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_cntlines" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (double)(arg1)->cntlines(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_dilate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_dilate",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_dilate" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_dilate" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_dilate" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->dilate(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rank",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rank" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rank" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rank" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->rank(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rank_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ; int arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_rank_image",&obj0,&obj1)) SWIG_fail; { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_rank_image" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rank_image" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = vips::VImage::rank_image(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_maxvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< vips::VImage,std::allocator< vips::VImage > > arg1 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxvalue",&obj0)) SWIG_fail; { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_maxvalue" "', argument " "1"" of type '" "std::vector< vips::VImage,std::allocator< vips::VImage > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = vips::VImage::maxvalue(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_label_regions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int temp2 ; int res2 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; vips::VImage result; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"O:VImage_label_regions",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_label_regions" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->label_regions(*arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (SWIG_IsTmpObj(res2)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); } else { int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_zerox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_zerox",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_zerox" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_zerox" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->zerox(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_erode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VIMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_erode",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_erode" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VIMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_erode" "', argument " "2"" of type '" "vips::VIMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_erode" "', argument " "2"" of type '" "vips::VIMask""'"); } else { vips::VIMask * temp = reinterpret_cast< vips::VIMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->erode(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_profile",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_profile" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_profile" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->profile(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_align_bands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_align_bands",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_align_bands" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->align_bands(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_correl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int *arg9 = 0 ; int *arg10 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int temp9 ; int res9 = SWIG_TMPOBJ ; int temp10 ; int res10 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; double result; arg9 = &temp9; arg10 = &temp10; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_correl",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_correl" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_correl" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_correl" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_correl" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_correl" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_correl" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_correl" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_correl" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_correl" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); try { result = (double)(arg1)->correl(arg2,arg3,arg4,arg5,arg6,arg7,arg8,*arg9,*arg10); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); if (SWIG_IsTmpObj(res9)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); } else { int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); } if (SWIG_IsTmpObj(res10)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); } else { int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage__find_lroverlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int *arg10 = 0 ; double *arg11 = 0 ; double *arg12 = 0 ; double *arg13 = 0 ; double *arg14 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int temp10 ; int res10 = SWIG_TMPOBJ ; double temp11 ; int res11 = SWIG_TMPOBJ ; double temp12 ; int res12 = SWIG_TMPOBJ ; double temp13 ; int res13 = SWIG_TMPOBJ ; double temp14 ; int res14 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; int result; arg10 = &temp10; arg11 = &temp11; arg12 = &temp12; arg13 = &temp13; arg14 = &temp14; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage__find_lroverlap",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage__find_lroverlap" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage__find_lroverlap" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage__find_lroverlap" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage__find_lroverlap" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage__find_lroverlap" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage__find_lroverlap" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage__find_lroverlap" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage__find_lroverlap" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage__find_lroverlap" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage__find_lroverlap" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); try { result = (int)(arg1)->_find_lroverlap(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,*arg10,*arg11,*arg12,*arg13,*arg14); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); if (SWIG_IsTmpObj(res10)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); } else { int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); } if (SWIG_IsTmpObj(res11)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg11))); } else { int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res12)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg12))); } else { int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res13)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg13))); } else { int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res14)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg14))); } else { int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage__find_tboverlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int *arg10 = 0 ; double *arg11 = 0 ; double *arg12 = 0 ; double *arg13 = 0 ; double *arg14 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int temp10 ; int res10 = SWIG_TMPOBJ ; double temp11 ; int res11 = SWIG_TMPOBJ ; double temp12 ; int res12 = SWIG_TMPOBJ ; double temp13 ; int res13 = SWIG_TMPOBJ ; double temp14 ; int res14 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; int result; arg10 = &temp10; arg11 = &temp11; arg12 = &temp12; arg13 = &temp13; arg14 = &temp14; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:VImage__find_tboverlap",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage__find_tboverlap" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage__find_tboverlap" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage__find_tboverlap" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage__find_tboverlap" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage__find_tboverlap" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage__find_tboverlap" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage__find_tboverlap" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage__find_tboverlap" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage__find_tboverlap" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage__find_tboverlap" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); try { result = (int)(arg1)->_find_tboverlap(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,*arg10,*arg11,*arg12,*arg13,*arg14); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); if (SWIG_IsTmpObj(res10)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); } else { int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); } if (SWIG_IsTmpObj(res11)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg11))); } else { int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res12)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg12))); } else { int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res13)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg13))); } else { int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res14)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg14))); } else { int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_global_balance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_global_balance",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_global_balance" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_global_balance" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->global_balance(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_global_balancef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_global_balancef",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_global_balancef" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_global_balancef" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = (arg1)->global_balancef(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lrmerge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_lrmerge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmerge" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmerge" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmerge" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmerge" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmerge" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmerge" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { result = (arg1)->lrmerge(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lrmerge1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int arg10 ; int arg11 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_lrmerge1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmerge1" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmerge1" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmerge1" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmerge1" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmerge1" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmerge1" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmerge1" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmerge1" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmerge1" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmerge1" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmerge1" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmerge1" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (arg1)->lrmerge1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lrmosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int arg10 ; int arg11 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_lrmosaic",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmosaic" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmosaic" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmosaic" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmosaic" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmosaic" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmosaic" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmosaic" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmosaic" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmosaic" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmosaic" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmosaic" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmosaic" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (arg1)->lrmosaic(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_lrmosaic1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int arg10 ; int arg11 ; int arg12 ; int arg13 ; int arg14 ; int arg15 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; int val12 ; int ecode12 = 0 ; int val13 ; int ecode13 = 0 ; int val14 ; int ecode14 = 0 ; int val15 ; int ecode15 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; PyObject * obj12 = 0 ; PyObject * obj13 = 0 ; PyObject * obj14 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOO:VImage_lrmosaic1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_lrmosaic1" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_lrmosaic1" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_lrmosaic1" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_lrmosaic1" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_lrmosaic1" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_lrmosaic1" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_lrmosaic1" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_lrmosaic1" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_lrmosaic1" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_lrmosaic1" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_lrmosaic1" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_lrmosaic1" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); ecode12 = SWIG_AsVal_int(obj11, &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_lrmosaic1" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); ecode13 = SWIG_AsVal_int(obj12, &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_lrmosaic1" "', argument " "13"" of type '" "int""'"); } arg13 = static_cast< int >(val13); ecode14 = SWIG_AsVal_int(obj13, &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "VImage_lrmosaic1" "', argument " "14"" of type '" "int""'"); } arg14 = static_cast< int >(val14); ecode15 = SWIG_AsVal_int(obj14, &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "VImage_lrmosaic1" "', argument " "15"" of type '" "int""'"); } arg15 = static_cast< int >(val15); try { result = (arg1)->lrmosaic1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_match_linear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int arg10 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:VImage_match_linear",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_match_linear" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_match_linear" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_match_linear" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_match_linear" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_match_linear" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_match_linear" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_match_linear" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_match_linear" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_match_linear" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_match_linear" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_match_linear" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); try { result = (arg1)->match_linear(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_match_linear_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int arg10 ; int arg11 ; int arg12 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; int val12 ; int ecode12 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_match_linear_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_match_linear_search" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_match_linear_search" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_match_linear_search" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_match_linear_search" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_match_linear_search" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_match_linear_search" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_match_linear_search" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_match_linear_search" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_match_linear_search" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_match_linear_search" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_match_linear_search" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_match_linear_search" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); ecode12 = SWIG_AsVal_int(obj11, &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_match_linear_search" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); try { result = (arg1)->match_linear_search(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_maxpos_subpel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; double temp2 ; int res2 = SWIG_TMPOBJ ; PyObject * obj0 = 0 ; double result; arg2 = &temp2; if (!PyArg_ParseTuple(args,(char *)"O:VImage_maxpos_subpel",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_maxpos_subpel" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (double)(arg1)->maxpos_subpel(*arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); if (SWIG_IsTmpObj(res2)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); } else { int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_remosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_remosaic",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_remosaic" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_remosaic" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VImage_remosaic" "', argument " "3"" of type '" "char *""'"); } arg3 = reinterpret_cast< char * >(buf3); try { result = (arg1)->remosaic(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_VImage_tbmerge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_tbmerge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmerge" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmerge" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmerge" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmerge" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmerge" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmerge" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); try { result = (arg1)->tbmerge(arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tbmerge1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int arg10 ; int arg11 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_tbmerge1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmerge1" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmerge1" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmerge1" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmerge1" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmerge1" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmerge1" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmerge1" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmerge1" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmerge1" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmerge1" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmerge1" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmerge1" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (arg1)->tbmerge1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tbmosaic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int arg10 ; int arg11 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:VImage_tbmosaic",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmosaic" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmosaic" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmosaic" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmosaic" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmosaic" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmosaic" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmosaic" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmosaic" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmosaic" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmosaic" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmosaic" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmosaic" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); try { result = (arg1)->tbmosaic(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tbmosaic1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; vips::VImage arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; int arg9 ; int arg10 ; int arg11 ; int arg12 ; int arg13 ; int arg14 ; int arg15 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; int val12 ; int ecode12 = 0 ; int val13 ; int ecode13 = 0 ; int val14 ; int ecode14 = 0 ; int val15 ; int ecode15 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; PyObject * obj12 = 0 ; PyObject * obj13 = 0 ; PyObject * obj14 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOO:VImage_tbmosaic1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tbmosaic1" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VImage, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_tbmosaic1" "', argument " "2"" of type '" "vips::VImage""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VImage_tbmosaic1" "', argument " "2"" of type '" "vips::VImage""'"); } else { vips::VImage * temp = reinterpret_cast< vips::VImage * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_tbmosaic1" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_tbmosaic1" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_tbmosaic1" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_tbmosaic1" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_tbmosaic1" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); ecode8 = SWIG_AsVal_int(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_tbmosaic1" "', argument " "8"" of type '" "int""'"); } arg8 = static_cast< int >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_tbmosaic1" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_tbmosaic1" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_tbmosaic1" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); ecode12 = SWIG_AsVal_int(obj11, &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_tbmosaic1" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); ecode13 = SWIG_AsVal_int(obj12, &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "VImage_tbmosaic1" "', argument " "13"" of type '" "int""'"); } arg13 = static_cast< int >(val13); ecode14 = SWIG_AsVal_int(obj13, &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "VImage_tbmosaic1" "', argument " "14"" of type '" "int""'"); } arg14 = static_cast< int >(val14); ecode15 = SWIG_AsVal_int(obj14, &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "VImage_tbmosaic1" "', argument " "15"" of type '" "int""'"); } arg15 = static_cast< int >(val15); try { result = (arg1)->tbmosaic1(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_benchmark(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_benchmark",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmark" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (arg1)->benchmark(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_benchmark2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_benchmark2",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmark2" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = (double)(arg1)->benchmark2(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_benchmarkn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_benchmarkn",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_benchmarkn" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_benchmarkn" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->benchmarkn(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_eye(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; double arg3 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_eye",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_eye" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_eye" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_eye" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { result = vips::VImage::eye(arg1,arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_grey(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_grey",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_grey" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_grey" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = vips::VImage::grey(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_feye(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; double arg3 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_feye",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_feye" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_feye" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_feye" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { result = vips::VImage::feye(arg1,arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_fgrey(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_fgrey",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fgrey" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fgrey" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = vips::VImage::fgrey(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_fzone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_fzone",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_fzone" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); try { result = vips::VImage::fzone(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_make_xy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_make_xy",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_make_xy" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_make_xy" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = vips::VImage::make_xy(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_sines(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; double arg3 ; double arg4 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_sines",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_sines" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_sines" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_sines" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_sines" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); try { result = vips::VImage::sines(arg1,arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_zone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_zone",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_zone" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); try { result = vips::VImage::zone(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_rightshift_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; int arg2 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOO:VImage_rightshift_size",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_rightshift_size" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_rightshift_size" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_rightshift_size" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_rightshift_size" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); try { result = (arg1)->rightshift_size(arg2,arg3,arg4); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_shrink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_shrink",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_shrink" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_shrink" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_shrink" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { result = (arg1)->shrink(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_stretch3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; double arg2 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOO:VImage_stretch3",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_stretch3" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_stretch3" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_stretch3" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { result = (arg1)->stretch3(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_affinei(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; double arg8 ; int arg9 ; int arg10 ; int arg11 ; int arg12 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; int val10 ; int ecode10 = 0 ; int val11 ; int ecode11 = 0 ; int val12 ; int ecode12 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; PyObject * obj9 = 0 ; PyObject * obj10 = 0 ; PyObject * obj11 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:VImage_affinei",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affinei" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_affinei" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affinei" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affinei" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affinei" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affinei" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affinei" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affinei" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); ecode9 = SWIG_AsVal_int(obj8, &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "VImage_affinei" "', argument " "9"" of type '" "int""'"); } arg9 = static_cast< int >(val9); ecode10 = SWIG_AsVal_int(obj9, &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "VImage_affinei" "', argument " "10"" of type '" "int""'"); } arg10 = static_cast< int >(val10); ecode11 = SWIG_AsVal_int(obj10, &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "VImage_affinei" "', argument " "11"" of type '" "int""'"); } arg11 = static_cast< int >(val11); ecode12 = SWIG_AsVal_int(obj11, &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "VImage_affinei" "', argument " "12"" of type '" "int""'"); } arg12 = static_cast< int >(val12); try { result = (arg1)->affinei(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_affinei_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; double arg8 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:VImage_affinei_all",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_affinei_all" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VImage_affinei_all" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_affinei_all" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_affinei_all" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_affinei_all" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_affinei_all" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_affinei_all" "', argument " "7"" of type '" "double""'"); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "VImage_affinei_all" "', argument " "8"" of type '" "double""'"); } arg8 = static_cast< double >(val8); try { result = (arg1)->affinei_all(arg2,arg3,arg4,arg5,arg6,arg7,arg8); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_VImage_video_test(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OO:VImage_video_test",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VImage_video_test" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_video_test" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = vips::VImage::video_test(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_video_v4l1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; int arg6 ; int arg7 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:VImage_video_v4l1",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_video_v4l1" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_video_v4l1" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_video_v4l1" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_video_v4l1" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_video_v4l1" "', argument " "5"" of type '" "int""'"); } arg5 = static_cast< int >(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VImage_video_v4l1" "', argument " "6"" of type '" "int""'"); } arg6 = static_cast< int >(val6); ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VImage_video_v4l1" "', argument " "7"" of type '" "int""'"); } arg7 = static_cast< int >(val7); try { result = vips::VImage::video_v4l1(arg1,arg2,arg3,arg4,arg5,arg6,arg7); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_VImage_tobuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; VBuffer result; if (!PyArg_ParseTuple(args,(char *)"O:VImage_tobuffer",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tobuffer" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { result = vips_VImage_tobuffer(arg1); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } { resultobj = PyBuffer_FromMemory ((&result)->data, (&result)->size); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_frombuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; VBuffer arg1 ; int arg2 ; int arg3 ; int arg4 ; vips::VImage::TBandFmt arg5 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_frombuffer",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { const char *buffer; Py_ssize_t buffer_len; if (PyObject_AsCharBuffer (obj0, &buffer, &buffer_len) == -1) { PyErr_SetString (PyExc_TypeError,"Type error. Unable to get char pointer from buffer"); return NULL; } (&arg1)->data = (void *) buffer; (&arg1)->size = buffer_len; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_frombuffer" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_frombuffer" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_frombuffer" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_frombuffer" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'"); } arg5 = static_cast< vips::VImage::TBandFmt >(val5); try { result = vips_VImage_frombuffer(arg1,arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_tostring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VImage *arg1 = (vips::VImage *) 0 ; char **arg2 = (char **) 0 ; int *arg3 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *temp2 = 0 ; int tempn2 ; PyObject * obj0 = 0 ; arg2 = &temp2; arg3 = &tempn2; if (!PyArg_ParseTuple(args,(char *)"O:VImage_tostring",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VImage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VImage_tostring" "', argument " "1"" of type '" "vips::VImage *""'"); } arg1 = reinterpret_cast< vips::VImage * >(argp1); try { vips_VImage_tostring(arg1,arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (*arg2) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3)); im_free (*arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VImage_fromstring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string arg1 ; int arg2 ; int arg3 ; int arg4 ; vips::VImage::TBandFmt arg5 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VImage result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:VImage_fromstring",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "VImage_fromstring" "', argument " "1"" of type '" "std::string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VImage_fromstring" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VImage_fromstring" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VImage_fromstring" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VImage_fromstring" "', argument " "5"" of type '" "vips::VImage::TBandFmt""'"); } arg5 = static_cast< vips::VImage::TBandFmt >(val5); try { result = vips_VImage_fromstring(arg1,arg2,arg3,arg4,arg5); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VImage(static_cast< const vips::VImage& >(result))), SWIGTYPE_p_vips__VImage, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *VImage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_vips__VImage, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_im_init_world(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:im_init_world",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "im_init_world" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); result = (int)im_init_world((char const *)arg1); resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_im__print_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":im__print_all")) SWIG_fail; im__print_all(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_im_col_Lab2XYZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; float arg1 ; float arg2 ; float arg3 ; float *arg4 = (float *) 0 ; float *arg5 = (float *) 0 ; float *arg6 = (float *) 0 ; float val1 ; int ecode1 = 0 ; float val2 ; int ecode2 = 0 ; float val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; void *argp6 = 0 ; int res6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:im_col_Lab2XYZ",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "im_col_Lab2XYZ" "', argument " "1"" of type '" "float""'"); } arg1 = static_cast< float >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "im_col_Lab2XYZ" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "im_col_Lab2XYZ" "', argument " "3"" of type '" "float""'"); } arg3 = static_cast< float >(val3); res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "im_col_Lab2XYZ" "', argument " "4"" of type '" "float *""'"); } arg4 = reinterpret_cast< float * >(argp4); res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "im_col_Lab2XYZ" "', argument " "5"" of type '" "float *""'"); } arg5 = reinterpret_cast< float * >(argp5); res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 ); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "im_col_Lab2XYZ" "', argument " "6"" of type '" "float *""'"); } arg6 = reinterpret_cast< float * >(argp6); im_col_Lab2XYZ(arg1,arg2,arg3,arg4,arg5,arg6); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL}, { (char *)"IntVector_iterator", _wrap_IntVector_iterator, METH_VARARGS, NULL}, { (char *)"IntVector___nonzero__", _wrap_IntVector___nonzero__, METH_VARARGS, NULL}, { (char *)"IntVector___bool__", _wrap_IntVector___bool__, METH_VARARGS, NULL}, { (char *)"IntVector___len__", _wrap_IntVector___len__, METH_VARARGS, NULL}, { (char *)"IntVector_pop", _wrap_IntVector_pop, METH_VARARGS, NULL}, { (char *)"IntVector___getslice__", _wrap_IntVector___getslice__, METH_VARARGS, NULL}, { (char *)"IntVector___setslice__", _wrap_IntVector___setslice__, METH_VARARGS, NULL}, { (char *)"IntVector___delslice__", _wrap_IntVector___delslice__, METH_VARARGS, NULL}, { (char *)"IntVector___delitem__", _wrap_IntVector___delitem__, METH_VARARGS, NULL}, { (char *)"IntVector___getitem__", _wrap_IntVector___getitem__, METH_VARARGS, NULL}, { (char *)"IntVector___setitem__", _wrap_IntVector___setitem__, METH_VARARGS, NULL}, { (char *)"IntVector_append", _wrap_IntVector_append, METH_VARARGS, NULL}, { (char *)"IntVector_empty", _wrap_IntVector_empty, METH_VARARGS, NULL}, { (char *)"IntVector_size", _wrap_IntVector_size, METH_VARARGS, NULL}, { (char *)"IntVector_clear", _wrap_IntVector_clear, METH_VARARGS, NULL}, { (char *)"IntVector_swap", _wrap_IntVector_swap, METH_VARARGS, NULL}, { (char *)"IntVector_get_allocator", _wrap_IntVector_get_allocator, METH_VARARGS, NULL}, { (char *)"IntVector_begin", _wrap_IntVector_begin, METH_VARARGS, NULL}, { (char *)"IntVector_end", _wrap_IntVector_end, METH_VARARGS, NULL}, { (char *)"IntVector_rbegin", _wrap_IntVector_rbegin, METH_VARARGS, NULL}, { (char *)"IntVector_rend", _wrap_IntVector_rend, METH_VARARGS, NULL}, { (char *)"IntVector_pop_back", _wrap_IntVector_pop_back, METH_VARARGS, NULL}, { (char *)"IntVector_erase", _wrap_IntVector_erase, METH_VARARGS, NULL}, { (char *)"new_IntVector", _wrap_new_IntVector, METH_VARARGS, NULL}, { (char *)"IntVector_push_back", _wrap_IntVector_push_back, METH_VARARGS, NULL}, { (char *)"IntVector_front", _wrap_IntVector_front, METH_VARARGS, NULL}, { (char *)"IntVector_back", _wrap_IntVector_back, METH_VARARGS, NULL}, { (char *)"IntVector_assign", _wrap_IntVector_assign, METH_VARARGS, NULL}, { (char *)"IntVector_resize", _wrap_IntVector_resize, METH_VARARGS, NULL}, { (char *)"IntVector_insert", _wrap_IntVector_insert, METH_VARARGS, NULL}, { (char *)"IntVector_reserve", _wrap_IntVector_reserve, METH_VARARGS, NULL}, { (char *)"IntVector_capacity", _wrap_IntVector_capacity, METH_VARARGS, NULL}, { (char *)"delete_IntVector", _wrap_delete_IntVector, METH_VARARGS, NULL}, { (char *)"IntVector_swigregister", IntVector_swigregister, METH_VARARGS, NULL}, { (char *)"DoubleVector_iterator", _wrap_DoubleVector_iterator, METH_VARARGS, NULL}, { (char *)"DoubleVector___nonzero__", _wrap_DoubleVector___nonzero__, METH_VARARGS, NULL}, { (char *)"DoubleVector___bool__", _wrap_DoubleVector___bool__, METH_VARARGS, NULL}, { (char *)"DoubleVector___len__", _wrap_DoubleVector___len__, METH_VARARGS, NULL}, { (char *)"DoubleVector_pop", _wrap_DoubleVector_pop, METH_VARARGS, NULL}, { (char *)"DoubleVector___getslice__", _wrap_DoubleVector___getslice__, METH_VARARGS, NULL}, { (char *)"DoubleVector___setslice__", _wrap_DoubleVector___setslice__, METH_VARARGS, NULL}, { (char *)"DoubleVector___delslice__", _wrap_DoubleVector___delslice__, METH_VARARGS, NULL}, { (char *)"DoubleVector___delitem__", _wrap_DoubleVector___delitem__, METH_VARARGS, NULL}, { (char *)"DoubleVector___getitem__", _wrap_DoubleVector___getitem__, METH_VARARGS, NULL}, { (char *)"DoubleVector___setitem__", _wrap_DoubleVector___setitem__, METH_VARARGS, NULL}, { (char *)"DoubleVector_append", _wrap_DoubleVector_append, METH_VARARGS, NULL}, { (char *)"DoubleVector_empty", _wrap_DoubleVector_empty, METH_VARARGS, NULL}, { (char *)"DoubleVector_size", _wrap_DoubleVector_size, METH_VARARGS, NULL}, { (char *)"DoubleVector_clear", _wrap_DoubleVector_clear, METH_VARARGS, NULL}, { (char *)"DoubleVector_swap", _wrap_DoubleVector_swap, METH_VARARGS, NULL}, { (char *)"DoubleVector_get_allocator", _wrap_DoubleVector_get_allocator, METH_VARARGS, NULL}, { (char *)"DoubleVector_begin", _wrap_DoubleVector_begin, METH_VARARGS, NULL}, { (char *)"DoubleVector_end", _wrap_DoubleVector_end, METH_VARARGS, NULL}, { (char *)"DoubleVector_rbegin", _wrap_DoubleVector_rbegin, METH_VARARGS, NULL}, { (char *)"DoubleVector_rend", _wrap_DoubleVector_rend, METH_VARARGS, NULL}, { (char *)"DoubleVector_pop_back", _wrap_DoubleVector_pop_back, METH_VARARGS, NULL}, { (char *)"DoubleVector_erase", _wrap_DoubleVector_erase, METH_VARARGS, NULL}, { (char *)"new_DoubleVector", _wrap_new_DoubleVector, METH_VARARGS, NULL}, { (char *)"DoubleVector_push_back", _wrap_DoubleVector_push_back, METH_VARARGS, NULL}, { (char *)"DoubleVector_front", _wrap_DoubleVector_front, METH_VARARGS, NULL}, { (char *)"DoubleVector_back", _wrap_DoubleVector_back, METH_VARARGS, NULL}, { (char *)"DoubleVector_assign", _wrap_DoubleVector_assign, METH_VARARGS, NULL}, { (char *)"DoubleVector_resize", _wrap_DoubleVector_resize, METH_VARARGS, NULL}, { (char *)"DoubleVector_insert", _wrap_DoubleVector_insert, METH_VARARGS, NULL}, { (char *)"DoubleVector_reserve", _wrap_DoubleVector_reserve, METH_VARARGS, NULL}, { (char *)"DoubleVector_capacity", _wrap_DoubleVector_capacity, METH_VARARGS, NULL}, { (char *)"delete_DoubleVector", _wrap_delete_DoubleVector, METH_VARARGS, NULL}, { (char *)"DoubleVector_swigregister", DoubleVector_swigregister, METH_VARARGS, NULL}, { (char *)"ImageVector_iterator", _wrap_ImageVector_iterator, METH_VARARGS, NULL}, { (char *)"ImageVector___nonzero__", _wrap_ImageVector___nonzero__, METH_VARARGS, NULL}, { (char *)"ImageVector___bool__", _wrap_ImageVector___bool__, METH_VARARGS, NULL}, { (char *)"ImageVector___len__", _wrap_ImageVector___len__, METH_VARARGS, NULL}, { (char *)"ImageVector_pop", _wrap_ImageVector_pop, METH_VARARGS, NULL}, { (char *)"ImageVector___getslice__", _wrap_ImageVector___getslice__, METH_VARARGS, NULL}, { (char *)"ImageVector___setslice__", _wrap_ImageVector___setslice__, METH_VARARGS, NULL}, { (char *)"ImageVector___delslice__", _wrap_ImageVector___delslice__, METH_VARARGS, NULL}, { (char *)"ImageVector___delitem__", _wrap_ImageVector___delitem__, METH_VARARGS, NULL}, { (char *)"ImageVector___getitem__", _wrap_ImageVector___getitem__, METH_VARARGS, NULL}, { (char *)"ImageVector___setitem__", _wrap_ImageVector___setitem__, METH_VARARGS, NULL}, { (char *)"ImageVector_append", _wrap_ImageVector_append, METH_VARARGS, NULL}, { (char *)"ImageVector_empty", _wrap_ImageVector_empty, METH_VARARGS, NULL}, { (char *)"ImageVector_size", _wrap_ImageVector_size, METH_VARARGS, NULL}, { (char *)"ImageVector_clear", _wrap_ImageVector_clear, METH_VARARGS, NULL}, { (char *)"ImageVector_swap", _wrap_ImageVector_swap, METH_VARARGS, NULL}, { (char *)"ImageVector_get_allocator", _wrap_ImageVector_get_allocator, METH_VARARGS, NULL}, { (char *)"ImageVector_begin", _wrap_ImageVector_begin, METH_VARARGS, NULL}, { (char *)"ImageVector_end", _wrap_ImageVector_end, METH_VARARGS, NULL}, { (char *)"ImageVector_rbegin", _wrap_ImageVector_rbegin, METH_VARARGS, NULL}, { (char *)"ImageVector_rend", _wrap_ImageVector_rend, METH_VARARGS, NULL}, { (char *)"ImageVector_pop_back", _wrap_ImageVector_pop_back, METH_VARARGS, NULL}, { (char *)"ImageVector_erase", _wrap_ImageVector_erase, METH_VARARGS, NULL}, { (char *)"new_ImageVector", _wrap_new_ImageVector, METH_VARARGS, NULL}, { (char *)"ImageVector_push_back", _wrap_ImageVector_push_back, METH_VARARGS, NULL}, { (char *)"ImageVector_front", _wrap_ImageVector_front, METH_VARARGS, NULL}, { (char *)"ImageVector_back", _wrap_ImageVector_back, METH_VARARGS, NULL}, { (char *)"ImageVector_assign", _wrap_ImageVector_assign, METH_VARARGS, NULL}, { (char *)"ImageVector_resize", _wrap_ImageVector_resize, METH_VARARGS, NULL}, { (char *)"ImageVector_insert", _wrap_ImageVector_insert, METH_VARARGS, NULL}, { (char *)"ImageVector_reserve", _wrap_ImageVector_reserve, METH_VARARGS, NULL}, { (char *)"ImageVector_capacity", _wrap_ImageVector_capacity, METH_VARARGS, NULL}, { (char *)"delete_ImageVector", _wrap_delete_ImageVector, METH_VARARGS, NULL}, { (char *)"ImageVector_swigregister", ImageVector_swigregister, METH_VARARGS, NULL}, { (char *)"init", _wrap_init, METH_VARARGS, NULL}, { (char *)"shutdown", _wrap_shutdown, METH_VARARGS, NULL}, { (char *)"VImage_print_all", _wrap_VImage_print_all, METH_VARARGS, NULL}, { (char *)"VImage_convert2disc", _wrap_VImage_convert2disc, METH_VARARGS, NULL}, { (char *)"new_VImage", _wrap_new_VImage, METH_VARARGS, NULL}, { (char *)"VImage___assign__", _wrap_VImage___assign__, METH_VARARGS, NULL}, { (char *)"delete_VImage", _wrap_delete_VImage, METH_VARARGS, NULL}, { (char *)"VImage_image", _wrap_VImage_image, METH_VARARGS, NULL}, { (char *)"VImage_data", _wrap_VImage_data, METH_VARARGS, NULL}, { (char *)"VImage_write", _wrap_VImage_write, METH_VARARGS, NULL}, { (char *)"VImage_debug_print", _wrap_VImage_debug_print, METH_VARARGS, NULL}, { (char *)"VImage_Xsize", _wrap_VImage_Xsize, METH_VARARGS, NULL}, { (char *)"VImage_Ysize", _wrap_VImage_Ysize, METH_VARARGS, NULL}, { (char *)"VImage_Bands", _wrap_VImage_Bands, METH_VARARGS, NULL}, { (char *)"VImage_BandFmt", _wrap_VImage_BandFmt, METH_VARARGS, NULL}, { (char *)"VImage_Coding", _wrap_VImage_Coding, METH_VARARGS, NULL}, { (char *)"VImage_Type", _wrap_VImage_Type, METH_VARARGS, NULL}, { (char *)"VImage_Xres", _wrap_VImage_Xres, METH_VARARGS, NULL}, { (char *)"VImage_Yres", _wrap_VImage_Yres, METH_VARARGS, NULL}, { (char *)"VImage_Length", _wrap_VImage_Length, METH_VARARGS, NULL}, { (char *)"VImage_Compression", _wrap_VImage_Compression, METH_VARARGS, NULL}, { (char *)"VImage_Level", _wrap_VImage_Level, METH_VARARGS, NULL}, { (char *)"VImage_Xoffset", _wrap_VImage_Xoffset, METH_VARARGS, NULL}, { (char *)"VImage_Yoffset", _wrap_VImage_Yoffset, METH_VARARGS, NULL}, { (char *)"VImage_filename", _wrap_VImage_filename, METH_VARARGS, NULL}, { (char *)"VImage_Hist", _wrap_VImage_Hist, METH_VARARGS, NULL}, { (char *)"VImage_meta_remove", _wrap_VImage_meta_remove, METH_VARARGS, NULL}, { (char *)"VImage_meta_get_typeof", _wrap_VImage_meta_get_typeof, METH_VARARGS, NULL}, { (char *)"VImage_meta_get_int", _wrap_VImage_meta_get_int, METH_VARARGS, NULL}, { (char *)"VImage_meta_get_double", _wrap_VImage_meta_get_double, METH_VARARGS, NULL}, { (char *)"VImage_meta_get_string", _wrap_VImage_meta_get_string, METH_VARARGS, NULL}, { (char *)"VImage_meta_get_area", _wrap_VImage_meta_get_area, METH_VARARGS, NULL}, { (char *)"VImage_meta_get_blob", _wrap_VImage_meta_get_blob, METH_VARARGS, NULL}, { (char *)"VImage_meta_set", _wrap_VImage_meta_set, METH_VARARGS, NULL}, { (char *)"VImage_initdesc", _wrap_VImage_initdesc, METH_VARARGS, NULL}, { (char *)"VImage_abs", _wrap_VImage_abs, METH_VARARGS, NULL}, { (char *)"VImage_acos", _wrap_VImage_acos, METH_VARARGS, NULL}, { (char *)"VImage_add", _wrap_VImage_add, METH_VARARGS, NULL}, { (char *)"VImage_asin", _wrap_VImage_asin, METH_VARARGS, NULL}, { (char *)"VImage_atan", _wrap_VImage_atan, METH_VARARGS, NULL}, { (char *)"VImage_avg", _wrap_VImage_avg, METH_VARARGS, NULL}, { (char *)"VImage_point", _wrap_VImage_point, METH_VARARGS, NULL}, { (char *)"VImage_point_bilinear", _wrap_VImage_point_bilinear, METH_VARARGS, NULL}, { (char *)"VImage_bandmean", _wrap_VImage_bandmean, METH_VARARGS, NULL}, { (char *)"VImage_ceil", _wrap_VImage_ceil, METH_VARARGS, NULL}, { (char *)"VImage_cos", _wrap_VImage_cos, METH_VARARGS, NULL}, { (char *)"VImage_cross_phase", _wrap_VImage_cross_phase, METH_VARARGS, NULL}, { (char *)"VImage_deviate", _wrap_VImage_deviate, METH_VARARGS, NULL}, { (char *)"VImage_divide", _wrap_VImage_divide, METH_VARARGS, NULL}, { (char *)"VImage_exp10", _wrap_VImage_exp10, METH_VARARGS, NULL}, { (char *)"VImage_expn", _wrap_VImage_expn, METH_VARARGS, NULL}, { (char *)"VImage_exp", _wrap_VImage_exp, METH_VARARGS, NULL}, { (char *)"VImage_floor", _wrap_VImage_floor, METH_VARARGS, NULL}, { (char *)"VImage_invert", _wrap_VImage_invert, METH_VARARGS, NULL}, { (char *)"VImage_linreg", _wrap_VImage_linreg, METH_VARARGS, NULL}, { (char *)"VImage_lin", _wrap_VImage_lin, METH_VARARGS, NULL}, { (char *)"VImage_log10", _wrap_VImage_log10, METH_VARARGS, NULL}, { (char *)"VImage_log", _wrap_VImage_log, METH_VARARGS, NULL}, { (char *)"VImage_max", _wrap_VImage_max, METH_VARARGS, NULL}, { (char *)"VImage_maxpos", _wrap_VImage_maxpos, METH_VARARGS, NULL}, { (char *)"VImage_maxpos_avg", _wrap_VImage_maxpos_avg, METH_VARARGS, NULL}, { (char *)"VImage_measure", _wrap_VImage_measure, METH_VARARGS, NULL}, { (char *)"VImage_min", _wrap_VImage_min, METH_VARARGS, NULL}, { (char *)"VImage_minpos", _wrap_VImage_minpos, METH_VARARGS, NULL}, { (char *)"VImage_multiply", _wrap_VImage_multiply, METH_VARARGS, NULL}, { (char *)"VImage_pow", _wrap_VImage_pow, METH_VARARGS, NULL}, { (char *)"VImage_recomb", _wrap_VImage_recomb, METH_VARARGS, NULL}, { (char *)"VImage_remainder", _wrap_VImage_remainder, METH_VARARGS, NULL}, { (char *)"VImage_rint", _wrap_VImage_rint, METH_VARARGS, NULL}, { (char *)"VImage_sign", _wrap_VImage_sign, METH_VARARGS, NULL}, { (char *)"VImage_sin", _wrap_VImage_sin, METH_VARARGS, NULL}, { (char *)"VImage_stats", _wrap_VImage_stats, METH_VARARGS, NULL}, { (char *)"VImage_subtract", _wrap_VImage_subtract, METH_VARARGS, NULL}, { (char *)"VImage_tan", _wrap_VImage_tan, METH_VARARGS, NULL}, { (char *)"VImage_greyc", _wrap_VImage_greyc, METH_VARARGS, NULL}, { (char *)"VImage_greyc_mask", _wrap_VImage_greyc_mask, METH_VARARGS, NULL}, { (char *)"VImage_LCh2Lab", _wrap_VImage_LCh2Lab, METH_VARARGS, NULL}, { (char *)"VImage_LCh2UCS", _wrap_VImage_LCh2UCS, METH_VARARGS, NULL}, { (char *)"VImage_Lab2LCh", _wrap_VImage_Lab2LCh, METH_VARARGS, NULL}, { (char *)"VImage_Lab2LabQ", _wrap_VImage_Lab2LabQ, METH_VARARGS, NULL}, { (char *)"VImage_Lab2LabS", _wrap_VImage_Lab2LabS, METH_VARARGS, NULL}, { (char *)"VImage_Lab2UCS", _wrap_VImage_Lab2UCS, METH_VARARGS, NULL}, { (char *)"VImage_Lab2XYZ", _wrap_VImage_Lab2XYZ, METH_VARARGS, NULL}, { (char *)"VImage_Lab2XYZ_temp", _wrap_VImage_Lab2XYZ_temp, METH_VARARGS, NULL}, { (char *)"VImage_Lab2disp", _wrap_VImage_Lab2disp, METH_VARARGS, NULL}, { (char *)"VImage_LabQ2LabS", _wrap_VImage_LabQ2LabS, METH_VARARGS, NULL}, { (char *)"VImage_LabQ2Lab", _wrap_VImage_LabQ2Lab, METH_VARARGS, NULL}, { (char *)"VImage_LabQ2XYZ", _wrap_VImage_LabQ2XYZ, METH_VARARGS, NULL}, { (char *)"VImage_LabQ2disp", _wrap_VImage_LabQ2disp, METH_VARARGS, NULL}, { (char *)"VImage_LabS2LabQ", _wrap_VImage_LabS2LabQ, METH_VARARGS, NULL}, { (char *)"VImage_LabS2Lab", _wrap_VImage_LabS2Lab, METH_VARARGS, NULL}, { (char *)"VImage_UCS2LCh", _wrap_VImage_UCS2LCh, METH_VARARGS, NULL}, { (char *)"VImage_UCS2Lab", _wrap_VImage_UCS2Lab, METH_VARARGS, NULL}, { (char *)"VImage_UCS2XYZ", _wrap_VImage_UCS2XYZ, METH_VARARGS, NULL}, { (char *)"VImage_XYZ2Lab", _wrap_VImage_XYZ2Lab, METH_VARARGS, NULL}, { (char *)"VImage_XYZ2Lab_temp", _wrap_VImage_XYZ2Lab_temp, METH_VARARGS, NULL}, { (char *)"VImage_XYZ2UCS", _wrap_VImage_XYZ2UCS, METH_VARARGS, NULL}, { (char *)"VImage_XYZ2Yxy", _wrap_VImage_XYZ2Yxy, METH_VARARGS, NULL}, { (char *)"VImage_XYZ2disp", _wrap_VImage_XYZ2disp, METH_VARARGS, NULL}, { (char *)"VImage_XYZ2sRGB", _wrap_VImage_XYZ2sRGB, METH_VARARGS, NULL}, { (char *)"VImage_Yxy2XYZ", _wrap_VImage_Yxy2XYZ, METH_VARARGS, NULL}, { (char *)"VImage_dE00_fromLab", _wrap_VImage_dE00_fromLab, METH_VARARGS, NULL}, { (char *)"VImage_dECMC_fromLab", _wrap_VImage_dECMC_fromLab, METH_VARARGS, NULL}, { (char *)"VImage_dECMC_fromdisp", _wrap_VImage_dECMC_fromdisp, METH_VARARGS, NULL}, { (char *)"VImage_dE_fromLab", _wrap_VImage_dE_fromLab, METH_VARARGS, NULL}, { (char *)"VImage_dE_fromXYZ", _wrap_VImage_dE_fromXYZ, METH_VARARGS, NULL}, { (char *)"VImage_dE_fromdisp", _wrap_VImage_dE_fromdisp, METH_VARARGS, NULL}, { (char *)"VImage_disp2Lab", _wrap_VImage_disp2Lab, METH_VARARGS, NULL}, { (char *)"VImage_disp2XYZ", _wrap_VImage_disp2XYZ, METH_VARARGS, NULL}, { (char *)"VImage_float2rad", _wrap_VImage_float2rad, METH_VARARGS, NULL}, { (char *)"VImage_icc_ac2rc", _wrap_VImage_icc_ac2rc, METH_VARARGS, NULL}, { (char *)"VImage_icc_export_depth", _wrap_VImage_icc_export_depth, METH_VARARGS, NULL}, { (char *)"VImage_icc_import", _wrap_VImage_icc_import, METH_VARARGS, NULL}, { (char *)"VImage_icc_import_embedded", _wrap_VImage_icc_import_embedded, METH_VARARGS, NULL}, { (char *)"VImage_icc_transform", _wrap_VImage_icc_transform, METH_VARARGS, NULL}, { (char *)"VImage_lab_morph", _wrap_VImage_lab_morph, METH_VARARGS, NULL}, { (char *)"VImage_rad2float", _wrap_VImage_rad2float, METH_VARARGS, NULL}, { (char *)"VImage_sRGB2XYZ", _wrap_VImage_sRGB2XYZ, METH_VARARGS, NULL}, { (char *)"VImage_gaussnoise", _wrap_VImage_gaussnoise, METH_VARARGS, NULL}, { (char *)"VImage_bandjoin", _wrap_VImage_bandjoin, METH_VARARGS, NULL}, { (char *)"VImage_black", _wrap_VImage_black, METH_VARARGS, NULL}, { (char *)"VImage_c2amph", _wrap_VImage_c2amph, METH_VARARGS, NULL}, { (char *)"VImage_c2imag", _wrap_VImage_c2imag, METH_VARARGS, NULL}, { (char *)"VImage_c2real", _wrap_VImage_c2real, METH_VARARGS, NULL}, { (char *)"VImage_c2rect", _wrap_VImage_c2rect, METH_VARARGS, NULL}, { (char *)"VImage_clip2fmt", _wrap_VImage_clip2fmt, METH_VARARGS, NULL}, { (char *)"VImage_copy", _wrap_VImage_copy, METH_VARARGS, NULL}, { (char *)"VImage_copy_file", _wrap_VImage_copy_file, METH_VARARGS, NULL}, { (char *)"VImage_copy_morph", _wrap_VImage_copy_morph, METH_VARARGS, NULL}, { (char *)"VImage_copy_swap", _wrap_VImage_copy_swap, METH_VARARGS, NULL}, { (char *)"VImage_copy_set", _wrap_VImage_copy_set, METH_VARARGS, NULL}, { (char *)"VImage_extract_area", _wrap_VImage_extract_area, METH_VARARGS, NULL}, { (char *)"VImage_extract_areabands", _wrap_VImage_extract_areabands, METH_VARARGS, NULL}, { (char *)"VImage_extract_band", _wrap_VImage_extract_band, METH_VARARGS, NULL}, { (char *)"VImage_extract_bands", _wrap_VImage_extract_bands, METH_VARARGS, NULL}, { (char *)"VImage_extract", _wrap_VImage_extract, METH_VARARGS, NULL}, { (char *)"VImage_falsecolour", _wrap_VImage_falsecolour, METH_VARARGS, NULL}, { (char *)"VImage_fliphor", _wrap_VImage_fliphor, METH_VARARGS, NULL}, { (char *)"VImage_flipver", _wrap_VImage_flipver, METH_VARARGS, NULL}, { (char *)"VImage_gbandjoin", _wrap_VImage_gbandjoin, METH_VARARGS, NULL}, { (char *)"VImage_grid", _wrap_VImage_grid, METH_VARARGS, NULL}, { (char *)"VImage_insert", _wrap_VImage_insert, METH_VARARGS, NULL}, { (char *)"VImage_insert_noexpand", _wrap_VImage_insert_noexpand, METH_VARARGS, NULL}, { (char *)"VImage_embed", _wrap_VImage_embed, METH_VARARGS, NULL}, { (char *)"VImage_lrjoin", _wrap_VImage_lrjoin, METH_VARARGS, NULL}, { (char *)"VImage_msb", _wrap_VImage_msb, METH_VARARGS, NULL}, { (char *)"VImage_msb_band", _wrap_VImage_msb_band, METH_VARARGS, NULL}, { (char *)"VImage_replicate", _wrap_VImage_replicate, METH_VARARGS, NULL}, { (char *)"VImage_ri2c", _wrap_VImage_ri2c, METH_VARARGS, NULL}, { (char *)"VImage_rot180", _wrap_VImage_rot180, METH_VARARGS, NULL}, { (char *)"VImage_rot270", _wrap_VImage_rot270, METH_VARARGS, NULL}, { (char *)"VImage_rot90", _wrap_VImage_rot90, METH_VARARGS, NULL}, { (char *)"VImage_scale", _wrap_VImage_scale, METH_VARARGS, NULL}, { (char *)"VImage_scaleps", _wrap_VImage_scaleps, METH_VARARGS, NULL}, { (char *)"VImage_subsample", _wrap_VImage_subsample, METH_VARARGS, NULL}, { (char *)"VImage_system", _wrap_VImage_system, METH_VARARGS, NULL}, { (char *)"VImage_system_image", _wrap_VImage_system_image, METH_VARARGS, NULL}, { (char *)"VImage_tbjoin", _wrap_VImage_tbjoin, METH_VARARGS, NULL}, { (char *)"VImage_text", _wrap_VImage_text, METH_VARARGS, NULL}, { (char *)"VImage_wrap", _wrap_VImage_wrap, METH_VARARGS, NULL}, { (char *)"VImage_zoom", _wrap_VImage_zoom, METH_VARARGS, NULL}, { (char *)"VImage_aconvsep", _wrap_VImage_aconvsep, METH_VARARGS, NULL}, { (char *)"VImage_aconv", _wrap_VImage_aconv, METH_VARARGS, NULL}, { (char *)"VImage_addgnoise", _wrap_VImage_addgnoise, METH_VARARGS, NULL}, { (char *)"VImage_compass", _wrap_VImage_compass, METH_VARARGS, NULL}, { (char *)"VImage_contrast_surface", _wrap_VImage_contrast_surface, METH_VARARGS, NULL}, { (char *)"VImage_conv", _wrap_VImage_conv, METH_VARARGS, NULL}, { (char *)"VImage_convsep", _wrap_VImage_convsep, METH_VARARGS, NULL}, { (char *)"VImage_fastcor", _wrap_VImage_fastcor, METH_VARARGS, NULL}, { (char *)"VImage_gradcor", _wrap_VImage_gradcor, METH_VARARGS, NULL}, { (char *)"VImage_gradient", _wrap_VImage_gradient, METH_VARARGS, NULL}, { (char *)"VImage_grad_x", _wrap_VImage_grad_x, METH_VARARGS, NULL}, { (char *)"VImage_grad_y", _wrap_VImage_grad_y, METH_VARARGS, NULL}, { (char *)"VImage_lindetect", _wrap_VImage_lindetect, METH_VARARGS, NULL}, { (char *)"VImage_sharpen", _wrap_VImage_sharpen, METH_VARARGS, NULL}, { (char *)"VImage_spcor", _wrap_VImage_spcor, METH_VARARGS, NULL}, { (char *)"VImage_argb2rgba", _wrap_VImage_argb2rgba, METH_VARARGS, NULL}, { (char *)"VImage_flood_copy", _wrap_VImage_flood_copy, METH_VARARGS, NULL}, { (char *)"VImage_flood_blob_copy", _wrap_VImage_flood_blob_copy, METH_VARARGS, NULL}, { (char *)"VImage_flood_other_copy", _wrap_VImage_flood_other_copy, METH_VARARGS, NULL}, { (char *)"VImage_clip", _wrap_VImage_clip, METH_VARARGS, NULL}, { (char *)"VImage_c2ps", _wrap_VImage_c2ps, METH_VARARGS, NULL}, { (char *)"VImage_resize_linear", _wrap_VImage_resize_linear, METH_VARARGS, NULL}, { (char *)"VImage_cmulnorm", _wrap_VImage_cmulnorm, METH_VARARGS, NULL}, { (char *)"VImage_fav4", _wrap_VImage_fav4, METH_VARARGS, NULL}, { (char *)"VImage_gadd", _wrap_VImage_gadd, METH_VARARGS, NULL}, { (char *)"VImage_icc_export", _wrap_VImage_icc_export, METH_VARARGS, NULL}, { (char *)"VImage_litecor", _wrap_VImage_litecor, METH_VARARGS, NULL}, { (char *)"VImage_affine", _wrap_VImage_affine, METH_VARARGS, NULL}, { (char *)"VImage_clip2c", _wrap_VImage_clip2c, METH_VARARGS, NULL}, { (char *)"VImage_clip2cm", _wrap_VImage_clip2cm, METH_VARARGS, NULL}, { (char *)"VImage_clip2d", _wrap_VImage_clip2d, METH_VARARGS, NULL}, { (char *)"VImage_clip2dcm", _wrap_VImage_clip2dcm, METH_VARARGS, NULL}, { (char *)"VImage_clip2f", _wrap_VImage_clip2f, METH_VARARGS, NULL}, { (char *)"VImage_clip2i", _wrap_VImage_clip2i, METH_VARARGS, NULL}, { (char *)"VImage_convsub", _wrap_VImage_convsub, METH_VARARGS, NULL}, { (char *)"VImage_convf", _wrap_VImage_convf, METH_VARARGS, NULL}, { (char *)"VImage_convsepf", _wrap_VImage_convsepf, METH_VARARGS, NULL}, { (char *)"VImage_clip2s", _wrap_VImage_clip2s, METH_VARARGS, NULL}, { (char *)"VImage_clip2ui", _wrap_VImage_clip2ui, METH_VARARGS, NULL}, { (char *)"VImage_clip2us", _wrap_VImage_clip2us, METH_VARARGS, NULL}, { (char *)"VImage_slice", _wrap_VImage_slice, METH_VARARGS, NULL}, { (char *)"VImage_segment", _wrap_VImage_segment, METH_VARARGS, NULL}, { (char *)"VImage_thresh", _wrap_VImage_thresh, METH_VARARGS, NULL}, { (char *)"VImage_convf_raw", _wrap_VImage_convf_raw, METH_VARARGS, NULL}, { (char *)"VImage_conv_raw", _wrap_VImage_conv_raw, METH_VARARGS, NULL}, { (char *)"VImage_contrast_surface_raw", _wrap_VImage_contrast_surface_raw, METH_VARARGS, NULL}, { (char *)"VImage_convsepf_raw", _wrap_VImage_convsepf_raw, METH_VARARGS, NULL}, { (char *)"VImage_convsep_raw", _wrap_VImage_convsep_raw, METH_VARARGS, NULL}, { (char *)"VImage_fastcor_raw", _wrap_VImage_fastcor_raw, METH_VARARGS, NULL}, { (char *)"VImage_gradcor_raw", _wrap_VImage_gradcor_raw, METH_VARARGS, NULL}, { (char *)"VImage_spcor_raw", _wrap_VImage_spcor_raw, METH_VARARGS, NULL}, { (char *)"VImage_lhisteq_raw", _wrap_VImage_lhisteq_raw, METH_VARARGS, NULL}, { (char *)"VImage_stdif_raw", _wrap_VImage_stdif_raw, METH_VARARGS, NULL}, { (char *)"VImage_rank_raw", _wrap_VImage_rank_raw, METH_VARARGS, NULL}, { (char *)"VImage_dilate_raw", _wrap_VImage_dilate_raw, METH_VARARGS, NULL}, { (char *)"VImage_erode_raw", _wrap_VImage_erode_raw, METH_VARARGS, NULL}, { (char *)"VImage_similarity_area", _wrap_VImage_similarity_area, METH_VARARGS, NULL}, { (char *)"VImage_similarity", _wrap_VImage_similarity, METH_VARARGS, NULL}, { (char *)"VImage_mask2vips", _wrap_VImage_mask2vips, METH_VARARGS, NULL}, { (char *)"VImage_vips2mask", _wrap_VImage_vips2mask, METH_VARARGS, NULL}, { (char *)"VImage_insertplace", _wrap_VImage_insertplace, METH_VARARGS, NULL}, { (char *)"VImage_circle", _wrap_VImage_circle, METH_VARARGS, NULL}, { (char *)"VImage_andimage", _wrap_VImage_andimage, METH_VARARGS, NULL}, { (char *)"VImage_orimage", _wrap_VImage_orimage, METH_VARARGS, NULL}, { (char *)"VImage_eorimage", _wrap_VImage_eorimage, METH_VARARGS, NULL}, { (char *)"VImage_shiftleft", _wrap_VImage_shiftleft, METH_VARARGS, NULL}, { (char *)"VImage_shiftright", _wrap_VImage_shiftright, METH_VARARGS, NULL}, { (char *)"VImage_blend", _wrap_VImage_blend, METH_VARARGS, NULL}, { (char *)"VImage_equal", _wrap_VImage_equal, METH_VARARGS, NULL}, { (char *)"VImage_ifthenelse", _wrap_VImage_ifthenelse, METH_VARARGS, NULL}, { (char *)"VImage_less", _wrap_VImage_less, METH_VARARGS, NULL}, { (char *)"VImage_lesseq", _wrap_VImage_lesseq, METH_VARARGS, NULL}, { (char *)"VImage_more", _wrap_VImage_more, METH_VARARGS, NULL}, { (char *)"VImage_moreeq", _wrap_VImage_moreeq, METH_VARARGS, NULL}, { (char *)"VImage_notequal", _wrap_VImage_notequal, METH_VARARGS, NULL}, { (char *)"VImage_quadratic", _wrap_VImage_quadratic, METH_VARARGS, NULL}, { (char *)"VImage_csv2vips", _wrap_VImage_csv2vips, METH_VARARGS, NULL}, { (char *)"VImage_fits2vips", _wrap_VImage_fits2vips, METH_VARARGS, NULL}, { (char *)"VImage_jpeg2vips", _wrap_VImage_jpeg2vips, METH_VARARGS, NULL}, { (char *)"VImage_magick2vips", _wrap_VImage_magick2vips, METH_VARARGS, NULL}, { (char *)"VImage_png2vips", _wrap_VImage_png2vips, METH_VARARGS, NULL}, { (char *)"VImage_exr2vips", _wrap_VImage_exr2vips, METH_VARARGS, NULL}, { (char *)"VImage_ppm2vips", _wrap_VImage_ppm2vips, METH_VARARGS, NULL}, { (char *)"VImage_analyze2vips", _wrap_VImage_analyze2vips, METH_VARARGS, NULL}, { (char *)"VImage_tiff2vips", _wrap_VImage_tiff2vips, METH_VARARGS, NULL}, { (char *)"VImage_vips2csv", _wrap_VImage_vips2csv, METH_VARARGS, NULL}, { (char *)"VImage_vips2dz", _wrap_VImage_vips2dz, METH_VARARGS, NULL}, { (char *)"VImage_vips2jpeg", _wrap_VImage_vips2jpeg, METH_VARARGS, NULL}, { (char *)"VImage_vips2mimejpeg", _wrap_VImage_vips2mimejpeg, METH_VARARGS, NULL}, { (char *)"VImage_vips2png", _wrap_VImage_vips2png, METH_VARARGS, NULL}, { (char *)"VImage_vips2ppm", _wrap_VImage_vips2ppm, METH_VARARGS, NULL}, { (char *)"VImage_vips2tiff", _wrap_VImage_vips2tiff, METH_VARARGS, NULL}, { (char *)"VImage_create_fmask", _wrap_VImage_create_fmask, METH_VARARGS, NULL}, { (char *)"VImage_disp_ps", _wrap_VImage_disp_ps, METH_VARARGS, NULL}, { (char *)"VImage_flt_image_freq", _wrap_VImage_flt_image_freq, METH_VARARGS, NULL}, { (char *)"VImage_fractsurf", _wrap_VImage_fractsurf, METH_VARARGS, NULL}, { (char *)"VImage_freqflt", _wrap_VImage_freqflt, METH_VARARGS, NULL}, { (char *)"VImage_fwfft", _wrap_VImage_fwfft, METH_VARARGS, NULL}, { (char *)"VImage_rotquad", _wrap_VImage_rotquad, METH_VARARGS, NULL}, { (char *)"VImage_invfft", _wrap_VImage_invfft, METH_VARARGS, NULL}, { (char *)"VImage_phasecor_fft", _wrap_VImage_phasecor_fft, METH_VARARGS, NULL}, { (char *)"VImage_invfftr", _wrap_VImage_invfftr, METH_VARARGS, NULL}, { (char *)"VImage_gammacorrect", _wrap_VImage_gammacorrect, METH_VARARGS, NULL}, { (char *)"VImage_heq", _wrap_VImage_heq, METH_VARARGS, NULL}, { (char *)"VImage_hist", _wrap_VImage_hist, METH_VARARGS, NULL}, { (char *)"VImage_histcum", _wrap_VImage_histcum, METH_VARARGS, NULL}, { (char *)"VImage_histeq", _wrap_VImage_histeq, METH_VARARGS, NULL}, { (char *)"VImage_hist_indexed", _wrap_VImage_hist_indexed, METH_VARARGS, NULL}, { (char *)"VImage_histgr", _wrap_VImage_histgr, METH_VARARGS, NULL}, { (char *)"VImage_histnD", _wrap_VImage_histnD, METH_VARARGS, NULL}, { (char *)"VImage_histnorm", _wrap_VImage_histnorm, METH_VARARGS, NULL}, { (char *)"VImage_histplot", _wrap_VImage_histplot, METH_VARARGS, NULL}, { (char *)"VImage_histspec", _wrap_VImage_histspec, METH_VARARGS, NULL}, { (char *)"VImage_hsp", _wrap_VImage_hsp, METH_VARARGS, NULL}, { (char *)"VImage_identity", _wrap_VImage_identity, METH_VARARGS, NULL}, { (char *)"VImage_identity_ushort", _wrap_VImage_identity_ushort, METH_VARARGS, NULL}, { (char *)"VImage_ismonotonic", _wrap_VImage_ismonotonic, METH_VARARGS, NULL}, { (char *)"VImage_lhisteq", _wrap_VImage_lhisteq, METH_VARARGS, NULL}, { (char *)"VImage_mpercent", _wrap_VImage_mpercent, METH_VARARGS, NULL}, { (char *)"VImage_invertlut", _wrap_VImage_invertlut, METH_VARARGS, NULL}, { (char *)"VImage_buildlut", _wrap_VImage_buildlut, METH_VARARGS, NULL}, { (char *)"VImage_maplut", _wrap_VImage_maplut, METH_VARARGS, NULL}, { (char *)"VImage_project", _wrap_VImage_project, METH_VARARGS, NULL}, { (char *)"VImage_stdif", _wrap_VImage_stdif, METH_VARARGS, NULL}, { (char *)"VImage_tone_analyse", _wrap_VImage_tone_analyse, METH_VARARGS, NULL}, { (char *)"VImage_tone_build", _wrap_VImage_tone_build, METH_VARARGS, NULL}, { (char *)"VImage_tone_build_range", _wrap_VImage_tone_build_range, METH_VARARGS, NULL}, { (char *)"VImage_tone_map", _wrap_VImage_tone_map, METH_VARARGS, NULL}, { (char *)"VImage_draw_circle", _wrap_VImage_draw_circle, METH_VARARGS, NULL}, { (char *)"VImage_draw_rect", _wrap_VImage_draw_rect, METH_VARARGS, NULL}, { (char *)"VImage_draw_line", _wrap_VImage_draw_line, METH_VARARGS, NULL}, { (char *)"VImage_draw_point", _wrap_VImage_draw_point, METH_VARARGS, NULL}, { (char *)"VImage_draw_smudge", _wrap_VImage_draw_smudge, METH_VARARGS, NULL}, { (char *)"VImage_draw_flood", _wrap_VImage_draw_flood, METH_VARARGS, NULL}, { (char *)"VImage_draw_flood_blob", _wrap_VImage_draw_flood_blob, METH_VARARGS, NULL}, { (char *)"VImage_draw_flood_other", _wrap_VImage_draw_flood_other, METH_VARARGS, NULL}, { (char *)"VImage_draw_image", _wrap_VImage_draw_image, METH_VARARGS, NULL}, { (char *)"VImage_draw_mask", _wrap_VImage_draw_mask, METH_VARARGS, NULL}, { (char *)"VImage_line", _wrap_VImage_line, METH_VARARGS, NULL}, { (char *)"VImage_binfile", _wrap_VImage_binfile, METH_VARARGS, NULL}, { (char *)"VImage_cache", _wrap_VImage_cache, METH_VARARGS, NULL}, { (char *)"VImage_getext", _wrap_VImage_getext, METH_VARARGS, NULL}, { (char *)"VImage_header_get_typeof", _wrap_VImage_header_get_typeof, METH_VARARGS, NULL}, { (char *)"VImage_header_int", _wrap_VImage_header_int, METH_VARARGS, NULL}, { (char *)"VImage_header_double", _wrap_VImage_header_double, METH_VARARGS, NULL}, { (char *)"VImage_header_string", _wrap_VImage_header_string, METH_VARARGS, NULL}, { (char *)"VImage_history_get", _wrap_VImage_history_get, METH_VARARGS, NULL}, { (char *)"VImage_printdesc", _wrap_VImage_printdesc, METH_VARARGS, NULL}, { (char *)"VImage_cntlines", _wrap_VImage_cntlines, METH_VARARGS, NULL}, { (char *)"VImage_dilate", _wrap_VImage_dilate, METH_VARARGS, NULL}, { (char *)"VImage_rank", _wrap_VImage_rank, METH_VARARGS, NULL}, { (char *)"VImage_rank_image", _wrap_VImage_rank_image, METH_VARARGS, NULL}, { (char *)"VImage_maxvalue", _wrap_VImage_maxvalue, METH_VARARGS, NULL}, { (char *)"VImage_label_regions", _wrap_VImage_label_regions, METH_VARARGS, NULL}, { (char *)"VImage_zerox", _wrap_VImage_zerox, METH_VARARGS, NULL}, { (char *)"VImage_erode", _wrap_VImage_erode, METH_VARARGS, NULL}, { (char *)"VImage_profile", _wrap_VImage_profile, METH_VARARGS, NULL}, { (char *)"VImage_align_bands", _wrap_VImage_align_bands, METH_VARARGS, NULL}, { (char *)"VImage_correl", _wrap_VImage_correl, METH_VARARGS, NULL}, { (char *)"VImage__find_lroverlap", _wrap_VImage__find_lroverlap, METH_VARARGS, NULL}, { (char *)"VImage__find_tboverlap", _wrap_VImage__find_tboverlap, METH_VARARGS, NULL}, { (char *)"VImage_global_balance", _wrap_VImage_global_balance, METH_VARARGS, NULL}, { (char *)"VImage_global_balancef", _wrap_VImage_global_balancef, METH_VARARGS, NULL}, { (char *)"VImage_lrmerge", _wrap_VImage_lrmerge, METH_VARARGS, NULL}, { (char *)"VImage_lrmerge1", _wrap_VImage_lrmerge1, METH_VARARGS, NULL}, { (char *)"VImage_lrmosaic", _wrap_VImage_lrmosaic, METH_VARARGS, NULL}, { (char *)"VImage_lrmosaic1", _wrap_VImage_lrmosaic1, METH_VARARGS, NULL}, { (char *)"VImage_match_linear", _wrap_VImage_match_linear, METH_VARARGS, NULL}, { (char *)"VImage_match_linear_search", _wrap_VImage_match_linear_search, METH_VARARGS, NULL}, { (char *)"VImage_maxpos_subpel", _wrap_VImage_maxpos_subpel, METH_VARARGS, NULL}, { (char *)"VImage_remosaic", _wrap_VImage_remosaic, METH_VARARGS, NULL}, { (char *)"VImage_tbmerge", _wrap_VImage_tbmerge, METH_VARARGS, NULL}, { (char *)"VImage_tbmerge1", _wrap_VImage_tbmerge1, METH_VARARGS, NULL}, { (char *)"VImage_tbmosaic", _wrap_VImage_tbmosaic, METH_VARARGS, NULL}, { (char *)"VImage_tbmosaic1", _wrap_VImage_tbmosaic1, METH_VARARGS, NULL}, { (char *)"VImage_benchmark", _wrap_VImage_benchmark, METH_VARARGS, NULL}, { (char *)"VImage_benchmark2", _wrap_VImage_benchmark2, METH_VARARGS, NULL}, { (char *)"VImage_benchmarkn", _wrap_VImage_benchmarkn, METH_VARARGS, NULL}, { (char *)"VImage_eye", _wrap_VImage_eye, METH_VARARGS, NULL}, { (char *)"VImage_grey", _wrap_VImage_grey, METH_VARARGS, NULL}, { (char *)"VImage_feye", _wrap_VImage_feye, METH_VARARGS, NULL}, { (char *)"VImage_fgrey", _wrap_VImage_fgrey, METH_VARARGS, NULL}, { (char *)"VImage_fzone", _wrap_VImage_fzone, METH_VARARGS, NULL}, { (char *)"VImage_make_xy", _wrap_VImage_make_xy, METH_VARARGS, NULL}, { (char *)"VImage_sines", _wrap_VImage_sines, METH_VARARGS, NULL}, { (char *)"VImage_zone", _wrap_VImage_zone, METH_VARARGS, NULL}, { (char *)"VImage_rightshift_size", _wrap_VImage_rightshift_size, METH_VARARGS, NULL}, { (char *)"VImage_shrink", _wrap_VImage_shrink, METH_VARARGS, NULL}, { (char *)"VImage_stretch3", _wrap_VImage_stretch3, METH_VARARGS, NULL}, { (char *)"VImage_affinei", _wrap_VImage_affinei, METH_VARARGS, NULL}, { (char *)"VImage_affinei_all", _wrap_VImage_affinei_all, METH_VARARGS, NULL}, { (char *)"VImage_video_test", _wrap_VImage_video_test, METH_VARARGS, NULL}, { (char *)"VImage_video_v4l1", _wrap_VImage_video_v4l1, METH_VARARGS, NULL}, { (char *)"VImage_tobuffer", _wrap_VImage_tobuffer, METH_VARARGS, NULL}, { (char *)"VImage_frombuffer", _wrap_VImage_frombuffer, METH_VARARGS, NULL}, { (char *)"VImage_tostring", _wrap_VImage_tostring, METH_VARARGS, NULL}, { (char *)"VImage_fromstring", _wrap_VImage_fromstring, METH_VARARGS, NULL}, { (char *)"VImage_swigregister", VImage_swigregister, METH_VARARGS, NULL}, { (char *)"im_init_world", _wrap_im_init_world, METH_VARARGS, NULL}, { (char *)"im__print_all", _wrap_im__print_all, METH_VARARGS, NULL}, { (char *)"im_col_Lab2XYZ", _wrap_im_col_Lab2XYZ, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_GType = {"_p_GType", "GType *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_VBuffer = {"_p_VBuffer", "VBuffer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p__VipsImage = {"_p__VipsImage", "_VipsImage *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_gboolean = {"_p_gboolean", "gboolean *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__allocatorT_double_t = {"_p_std__allocatorT_double_t", "std::vector< double >::allocator_type *|std::allocator< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__allocatorT_int_t = {"_p_std__allocatorT_int_t", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__allocatorT_vips__VImage_t = {"_p_std__allocatorT_vips__VImage_t", "std::vector< vips::VImage >::allocator_type *|std::allocator< vips::VImage > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT__Tp__Alloc_t = {"_p_std__vectorT__Tp__Alloc_t", "std::vector< _Tp,_Alloc > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_double_std__allocatorT_double_t_t = {"_p_std__vectorT_double_std__allocatorT_double_t_t", "std::vector< double,std::allocator< double > > *|std::vector< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t = {"_p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t", "std::vector< vips::VImage > *|std::vector< vips::VImage,std::allocator< vips::VImage > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VDMask = {"_p_vips__VDMask", "vips::VDMask *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VDisplay = {"_p_vips__VDisplay", "vips::VDisplay *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VIMask = {"_p_vips__VIMask", "vips::VIMask *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VImage = {"_p_vips__VImage", "vips::VImage *|std::vector< vips::VImage >::value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_GType, &_swigt__p_VBuffer, &_swigt__p__VipsImage, &_swigt__p_allocator_type, &_swigt__p_char, &_swigt__p_difference_type, &_swigt__p_double, &_swigt__p_float, &_swigt__p_gboolean, &_swigt__p_int, &_swigt__p_matrix, &_swigt__p_p_PyObject, &_swigt__p_p_char, &_swigt__p_size_t, &_swigt__p_size_type, &_swigt__p_std__allocatorT_double_t, &_swigt__p_std__allocatorT_int_t, &_swigt__p_std__allocatorT_vips__VImage_t, &_swigt__p_std__invalid_argument, &_swigt__p_std__vectorT__Tp__Alloc_t, &_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, &_swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, &_swigt__p_swig__SwigPyIterator, &_swigt__p_value_type, &_swigt__p_vips__VDMask, &_swigt__p_vips__VDisplay, &_swigt__p_vips__VError, &_swigt__p_vips__VIMask, &_swigt__p_vips__VImage, &_swigt__p_void, }; static swig_cast_info _swigc__p_GType[] = { {&_swigt__p_GType, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_VBuffer[] = { {&_swigt__p_VBuffer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p__VipsImage[] = { {&_swigt__p__VipsImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_gboolean[] = { {&_swigt__p_gboolean, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__allocatorT_double_t[] = { {&_swigt__p_std__allocatorT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__allocatorT_int_t[] = { {&_swigt__p_std__allocatorT_int_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__allocatorT_vips__VImage_t[] = { {&_swigt__p_std__allocatorT_vips__VImage_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT__Tp__Alloc_t[] = { {&_swigt__p_std__vectorT__Tp__Alloc_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_double_std__allocatorT_double_t_t[] = { {&_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t[] = { {&_swigt__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VDMask[] = { {&_swigt__p_vips__VDMask, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VDisplay[] = { {&_swigt__p_vips__VDisplay, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VIMask[] = { {&_swigt__p_vips__VIMask, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VImage[] = { {&_swigt__p_vips__VImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_GType, _swigc__p_VBuffer, _swigc__p__VipsImage, _swigc__p_allocator_type, _swigc__p_char, _swigc__p_difference_type, _swigc__p_double, _swigc__p_float, _swigc__p_gboolean, _swigc__p_int, _swigc__p_matrix, _swigc__p_p_PyObject, _swigc__p_p_char, _swigc__p_size_t, _swigc__p_size_type, _swigc__p_std__allocatorT_double_t, _swigc__p_std__allocatorT_int_t, _swigc__p_std__allocatorT_vips__VImage_t, _swigc__p_std__invalid_argument, _swigc__p_std__vectorT__Tp__Alloc_t, _swigc__p_std__vectorT_double_std__allocatorT_double_t_t, _swigc__p_std__vectorT_int_std__allocatorT_int_t_t, _swigc__p_std__vectorT_vips__VImage_std__allocatorT_vips__VImage_t_t, _swigc__p_swig__SwigPyIterator, _swigc__p_value_type, _swigc__p_vips__VDMask, _swigc__p_vips__VDisplay, _swigc__p_vips__VError, _swigc__p_vips__VIMask, _swigc__p_vips__VImage, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString(""); #else return PyString_FromString(""); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ (printfunc) swig_varlink_print, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 varlink_type.ob_type = &PyType_Type; #else if (PyType_Ready(&varlink_type) < 0) return NULL; #endif } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d, *md; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { # if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, # else { PyObject_HEAD_INIT(NULL) NULL, /* m_init */ 0, /* m_index */ NULL, /* m_copy */ }, # endif (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif #if defined(SWIGPYTHON_BUILTIN) static SwigPyClientData SwigPyObject_clientdata = { 0, 0, 0, 0, 0, 0, 0 }; static PyGetSetDef this_getset_def = { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { (PyCFunction) SwigPyObject_own, (PyCFunction) SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; PyObject *thisown_descr; int i; (void)builtin_pytype; (void)builtin_base_count; (void)builtin_basetype; (void)tuple; (void)static_getset; /* metatype is used to implement static member variables. */ metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); assert(metatype_args); metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); assert(metatype); Py_DECREF(metatype_args); metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; assert(PyType_Ready(metatype) >= 0); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); (void)md; SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; # else return; # endif } /* All objects have a 'this' attribute */ this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); (void)this_descr; /* All objects have a 'thisown' attribute */ thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); (void)thisown_descr; public_interface = PyList_New(0); public_symbol = 0; (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); #endif SWIG_InstallConstants(d,swig_const_table); SWIG_Python_SetConstant(d, "VImage_MULTIBAND",SWIG_From_int(static_cast< int >(vips::VImage::MULTIBAND))); SWIG_Python_SetConstant(d, "VImage_B_W",SWIG_From_int(static_cast< int >(vips::VImage::B_W))); SWIG_Python_SetConstant(d, "VImage_LUMINACE",SWIG_From_int(static_cast< int >(vips::VImage::LUMINACE))); SWIG_Python_SetConstant(d, "VImage_XRAY",SWIG_From_int(static_cast< int >(vips::VImage::XRAY))); SWIG_Python_SetConstant(d, "VImage_IR",SWIG_From_int(static_cast< int >(vips::VImage::IR))); SWIG_Python_SetConstant(d, "VImage_YUV",SWIG_From_int(static_cast< int >(vips::VImage::YUV))); SWIG_Python_SetConstant(d, "VImage_RED_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::RED_ONLY))); SWIG_Python_SetConstant(d, "VImage_GREEN_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::GREEN_ONLY))); SWIG_Python_SetConstant(d, "VImage_BLUE_ONLY",SWIG_From_int(static_cast< int >(vips::VImage::BLUE_ONLY))); SWIG_Python_SetConstant(d, "VImage_POWER_SPECTRUM",SWIG_From_int(static_cast< int >(vips::VImage::POWER_SPECTRUM))); SWIG_Python_SetConstant(d, "VImage_HISTOGRAM",SWIG_From_int(static_cast< int >(vips::VImage::HISTOGRAM))); SWIG_Python_SetConstant(d, "VImage_LUT",SWIG_From_int(static_cast< int >(vips::VImage::LUT))); SWIG_Python_SetConstant(d, "VImage_XYZ",SWIG_From_int(static_cast< int >(vips::VImage::XYZ))); SWIG_Python_SetConstant(d, "VImage_LAB",SWIG_From_int(static_cast< int >(vips::VImage::LAB))); SWIG_Python_SetConstant(d, "VImage_CMC",SWIG_From_int(static_cast< int >(vips::VImage::CMC))); SWIG_Python_SetConstant(d, "VImage_CMYK",SWIG_From_int(static_cast< int >(vips::VImage::CMYK))); SWIG_Python_SetConstant(d, "VImage_LABQ",SWIG_From_int(static_cast< int >(vips::VImage::LABQ))); SWIG_Python_SetConstant(d, "VImage_RGB",SWIG_From_int(static_cast< int >(vips::VImage::RGB))); SWIG_Python_SetConstant(d, "VImage_UCS",SWIG_From_int(static_cast< int >(vips::VImage::UCS))); SWIG_Python_SetConstant(d, "VImage_LCH",SWIG_From_int(static_cast< int >(vips::VImage::LCH))); SWIG_Python_SetConstant(d, "VImage_LABS",SWIG_From_int(static_cast< int >(vips::VImage::LABS))); SWIG_Python_SetConstant(d, "VImage_sRGB",SWIG_From_int(static_cast< int >(vips::VImage::sRGB))); SWIG_Python_SetConstant(d, "VImage_YXY",SWIG_From_int(static_cast< int >(vips::VImage::YXY))); SWIG_Python_SetConstant(d, "VImage_FOURIER",SWIG_From_int(static_cast< int >(vips::VImage::FOURIER))); SWIG_Python_SetConstant(d, "VImage_RGB16",SWIG_From_int(static_cast< int >(vips::VImage::RGB16))); SWIG_Python_SetConstant(d, "VImage_GREY16",SWIG_From_int(static_cast< int >(vips::VImage::GREY16))); SWIG_Python_SetConstant(d, "VImage_FMTNOTSET",SWIG_From_int(static_cast< int >(vips::VImage::FMTNOTSET))); SWIG_Python_SetConstant(d, "VImage_FMTUCHAR",SWIG_From_int(static_cast< int >(vips::VImage::FMTUCHAR))); SWIG_Python_SetConstant(d, "VImage_FMTCHAR",SWIG_From_int(static_cast< int >(vips::VImage::FMTCHAR))); SWIG_Python_SetConstant(d, "VImage_FMTUSHORT",SWIG_From_int(static_cast< int >(vips::VImage::FMTUSHORT))); SWIG_Python_SetConstant(d, "VImage_FMTSHORT",SWIG_From_int(static_cast< int >(vips::VImage::FMTSHORT))); SWIG_Python_SetConstant(d, "VImage_FMTUINT",SWIG_From_int(static_cast< int >(vips::VImage::FMTUINT))); SWIG_Python_SetConstant(d, "VImage_FMTINT",SWIG_From_int(static_cast< int >(vips::VImage::FMTINT))); SWIG_Python_SetConstant(d, "VImage_FMTFLOAT",SWIG_From_int(static_cast< int >(vips::VImage::FMTFLOAT))); SWIG_Python_SetConstant(d, "VImage_FMTCOMPLEX",SWIG_From_int(static_cast< int >(vips::VImage::FMTCOMPLEX))); SWIG_Python_SetConstant(d, "VImage_FMTDOUBLE",SWIG_From_int(static_cast< int >(vips::VImage::FMTDOUBLE))); SWIG_Python_SetConstant(d, "VImage_FMTDPCOMPLEX",SWIG_From_int(static_cast< int >(vips::VImage::FMTDPCOMPLEX))); SWIG_Python_SetConstant(d, "VImage_NOCODING",SWIG_From_int(static_cast< int >(vips::VImage::NOCODING))); SWIG_Python_SetConstant(d, "VImage_COLQUANT",SWIG_From_int(static_cast< int >(vips::VImage::COLQUANT))); SWIG_Python_SetConstant(d, "VImage_LABPACK",SWIG_From_int(static_cast< int >(vips::VImage::LABPACK))); SWIG_Python_SetConstant(d, "VImage_LABPACK_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::LABPACK_COMPRESSED))); SWIG_Python_SetConstant(d, "VImage_RGB_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::RGB_COMPRESSED))); SWIG_Python_SetConstant(d, "VImage_LUM_COMPRESSED",SWIG_From_int(static_cast< int >(vips::VImage::LUM_COMPRESSED))); SWIG_Python_SetConstant(d, "VImage_RAD",SWIG_From_int(static_cast< int >(vips::VImage::RAD))); SWIG_Python_SetConstant(d, "VImage_NO_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::NO_COMPRESSION))); SWIG_Python_SetConstant(d, "VImage_TCSF_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::TCSF_COMPRESSION))); SWIG_Python_SetConstant(d, "VImage_JPEG_COMPRESSION",SWIG_From_int(static_cast< int >(vips::VImage::JPEG_COMPRESSION))); { Args *args; args = args_new (); #ifdef DEBUG printf ("on startup:\n"); args_print (args); #endif /*DEBUG*/ if (im_init_world (args->argv[0])) { args_free (args); vips_fatal ("can't initialise module vips"); } /* Now parse any GOptions. */ GError *error = NULL; GOptionContext *context; context = g_option_context_new ("- vips"); g_option_context_add_group (context, im_get_option_group()); g_option_context_set_ignore_unknown_options (context, TRUE); if (!g_option_context_parse (context, &args->argc, &args->argv, &error)) { g_option_context_free (context); args_free (args); im_error ("vipsmodule", "%s", error->message); g_error_free (error); vips_fatal ("can't initialise module vips"); } g_option_context_free (context); #ifdef DEBUG printf ("after parse:\n"); args_print (args); #endif /*DEBUG*/ // Write (possibly) modified argc/argv back again. if (args->argv) PySys_SetArgv (args->argc, args->argv); args_free (args); } #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif } vips-7.38.5/swig/vipsCC/VError.i0000644000175000017500000000041512303140253013242 00000000000000/* SWIG interface file for VError. */ %module VError %{ #include %} %include "std_except.i" %include "std_string.i" %include vips/VError.h %extend vips::VError { const char *__str__ () { return $self->what (); } } vips-7.38.5/swig/vipsCC/VDisplay.i0000644000175000017500000000035312303140253013557 00000000000000/* SWIG interface file for VDisplay. */ %module VDisplay %{ #include %} %import "VError.i" /* Need to override assignment to get refcounting working. */ %rename(__assign__) *::operator=; %include vips/VDisplay.h vips-7.38.5/swig/vipsCC/__init__.py0000644000175000017500000000005712303140253013764 00000000000000__all__=["VImage","VMask","VError","VDisplay"] vips-7.38.5/swig/vipsCC/VImage.py0000644000175000017500000014545112303145340013407 00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('vimagemodule', [dirname(__file__)]) except ImportError: import vimagemodule return vimagemodule if fp is not None: try: _mod = imp.load_module('vimagemodule', fp, pathname, description) finally: fp.close() return _mod vimagemodule = swig_import_helper() del swig_import_helper else: import vimagemodule del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 class SwigPyIterator(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = vimagemodule.delete_SwigPyIterator __del__ = lambda self : None; def value(self): return vimagemodule.SwigPyIterator_value(self) def incr(self, n=1): return vimagemodule.SwigPyIterator_incr(self, n) def decr(self, n=1): return vimagemodule.SwigPyIterator_decr(self, n) def distance(self, *args): return vimagemodule.SwigPyIterator_distance(self, *args) def equal(self, *args): return vimagemodule.SwigPyIterator_equal(self, *args) def copy(self): return vimagemodule.SwigPyIterator_copy(self) def next(self): return vimagemodule.SwigPyIterator_next(self) def __next__(self): return vimagemodule.SwigPyIterator___next__(self) def previous(self): return vimagemodule.SwigPyIterator_previous(self) def advance(self, *args): return vimagemodule.SwigPyIterator_advance(self, *args) def __eq__(self, *args): return vimagemodule.SwigPyIterator___eq__(self, *args) def __ne__(self, *args): return vimagemodule.SwigPyIterator___ne__(self, *args) def __iadd__(self, *args): return vimagemodule.SwigPyIterator___iadd__(self, *args) def __isub__(self, *args): return vimagemodule.SwigPyIterator___isub__(self, *args) def __add__(self, *args): return vimagemodule.SwigPyIterator___add__(self, *args) def __sub__(self, *args): return vimagemodule.SwigPyIterator___sub__(self, *args) def __iter__(self): return self SwigPyIterator_swigregister = vimagemodule.SwigPyIterator_swigregister SwigPyIterator_swigregister(SwigPyIterator) import VError import VMask import VDisplay class IntVector(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, IntVector, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, IntVector, name) __repr__ = _swig_repr def iterator(self): return vimagemodule.IntVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): return vimagemodule.IntVector___nonzero__(self) def __bool__(self): return vimagemodule.IntVector___bool__(self) def __len__(self): return vimagemodule.IntVector___len__(self) def pop(self): return vimagemodule.IntVector_pop(self) def __getslice__(self, *args): return vimagemodule.IntVector___getslice__(self, *args) def __setslice__(self, *args): return vimagemodule.IntVector___setslice__(self, *args) def __delslice__(self, *args): return vimagemodule.IntVector___delslice__(self, *args) def __delitem__(self, *args): return vimagemodule.IntVector___delitem__(self, *args) def __getitem__(self, *args): return vimagemodule.IntVector___getitem__(self, *args) def __setitem__(self, *args): return vimagemodule.IntVector___setitem__(self, *args) def append(self, *args): return vimagemodule.IntVector_append(self, *args) def empty(self): return vimagemodule.IntVector_empty(self) def size(self): return vimagemodule.IntVector_size(self) def clear(self): return vimagemodule.IntVector_clear(self) def swap(self, *args): return vimagemodule.IntVector_swap(self, *args) def get_allocator(self): return vimagemodule.IntVector_get_allocator(self) def begin(self): return vimagemodule.IntVector_begin(self) def end(self): return vimagemodule.IntVector_end(self) def rbegin(self): return vimagemodule.IntVector_rbegin(self) def rend(self): return vimagemodule.IntVector_rend(self) def pop_back(self): return vimagemodule.IntVector_pop_back(self) def erase(self, *args): return vimagemodule.IntVector_erase(self, *args) def __init__(self, *args): this = vimagemodule.new_IntVector(*args) try: self.this.append(this) except: self.this = this def push_back(self, *args): return vimagemodule.IntVector_push_back(self, *args) def front(self): return vimagemodule.IntVector_front(self) def back(self): return vimagemodule.IntVector_back(self) def assign(self, *args): return vimagemodule.IntVector_assign(self, *args) def resize(self, *args): return vimagemodule.IntVector_resize(self, *args) def insert(self, *args): return vimagemodule.IntVector_insert(self, *args) def reserve(self, *args): return vimagemodule.IntVector_reserve(self, *args) def capacity(self): return vimagemodule.IntVector_capacity(self) __swig_destroy__ = vimagemodule.delete_IntVector __del__ = lambda self : None; IntVector_swigregister = vimagemodule.IntVector_swigregister IntVector_swigregister(IntVector) class DoubleVector(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, DoubleVector, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, DoubleVector, name) __repr__ = _swig_repr def iterator(self): return vimagemodule.DoubleVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): return vimagemodule.DoubleVector___nonzero__(self) def __bool__(self): return vimagemodule.DoubleVector___bool__(self) def __len__(self): return vimagemodule.DoubleVector___len__(self) def pop(self): return vimagemodule.DoubleVector_pop(self) def __getslice__(self, *args): return vimagemodule.DoubleVector___getslice__(self, *args) def __setslice__(self, *args): return vimagemodule.DoubleVector___setslice__(self, *args) def __delslice__(self, *args): return vimagemodule.DoubleVector___delslice__(self, *args) def __delitem__(self, *args): return vimagemodule.DoubleVector___delitem__(self, *args) def __getitem__(self, *args): return vimagemodule.DoubleVector___getitem__(self, *args) def __setitem__(self, *args): return vimagemodule.DoubleVector___setitem__(self, *args) def append(self, *args): return vimagemodule.DoubleVector_append(self, *args) def empty(self): return vimagemodule.DoubleVector_empty(self) def size(self): return vimagemodule.DoubleVector_size(self) def clear(self): return vimagemodule.DoubleVector_clear(self) def swap(self, *args): return vimagemodule.DoubleVector_swap(self, *args) def get_allocator(self): return vimagemodule.DoubleVector_get_allocator(self) def begin(self): return vimagemodule.DoubleVector_begin(self) def end(self): return vimagemodule.DoubleVector_end(self) def rbegin(self): return vimagemodule.DoubleVector_rbegin(self) def rend(self): return vimagemodule.DoubleVector_rend(self) def pop_back(self): return vimagemodule.DoubleVector_pop_back(self) def erase(self, *args): return vimagemodule.DoubleVector_erase(self, *args) def __init__(self, *args): this = vimagemodule.new_DoubleVector(*args) try: self.this.append(this) except: self.this = this def push_back(self, *args): return vimagemodule.DoubleVector_push_back(self, *args) def front(self): return vimagemodule.DoubleVector_front(self) def back(self): return vimagemodule.DoubleVector_back(self) def assign(self, *args): return vimagemodule.DoubleVector_assign(self, *args) def resize(self, *args): return vimagemodule.DoubleVector_resize(self, *args) def insert(self, *args): return vimagemodule.DoubleVector_insert(self, *args) def reserve(self, *args): return vimagemodule.DoubleVector_reserve(self, *args) def capacity(self): return vimagemodule.DoubleVector_capacity(self) __swig_destroy__ = vimagemodule.delete_DoubleVector __del__ = lambda self : None; DoubleVector_swigregister = vimagemodule.DoubleVector_swigregister DoubleVector_swigregister(DoubleVector) class ImageVector(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ImageVector, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ImageVector, name) __repr__ = _swig_repr def iterator(self): return vimagemodule.ImageVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): return vimagemodule.ImageVector___nonzero__(self) def __bool__(self): return vimagemodule.ImageVector___bool__(self) def __len__(self): return vimagemodule.ImageVector___len__(self) def pop(self): return vimagemodule.ImageVector_pop(self) def __getslice__(self, *args): return vimagemodule.ImageVector___getslice__(self, *args) def __setslice__(self, *args): return vimagemodule.ImageVector___setslice__(self, *args) def __delslice__(self, *args): return vimagemodule.ImageVector___delslice__(self, *args) def __delitem__(self, *args): return vimagemodule.ImageVector___delitem__(self, *args) def __getitem__(self, *args): return vimagemodule.ImageVector___getitem__(self, *args) def __setitem__(self, *args): return vimagemodule.ImageVector___setitem__(self, *args) def append(self, *args): return vimagemodule.ImageVector_append(self, *args) def empty(self): return vimagemodule.ImageVector_empty(self) def size(self): return vimagemodule.ImageVector_size(self) def clear(self): return vimagemodule.ImageVector_clear(self) def swap(self, *args): return vimagemodule.ImageVector_swap(self, *args) def get_allocator(self): return vimagemodule.ImageVector_get_allocator(self) def begin(self): return vimagemodule.ImageVector_begin(self) def end(self): return vimagemodule.ImageVector_end(self) def rbegin(self): return vimagemodule.ImageVector_rbegin(self) def rend(self): return vimagemodule.ImageVector_rend(self) def pop_back(self): return vimagemodule.ImageVector_pop_back(self) def erase(self, *args): return vimagemodule.ImageVector_erase(self, *args) def __init__(self, *args): this = vimagemodule.new_ImageVector(*args) try: self.this.append(this) except: self.this = this def push_back(self, *args): return vimagemodule.ImageVector_push_back(self, *args) def front(self): return vimagemodule.ImageVector_front(self) def back(self): return vimagemodule.ImageVector_back(self) def assign(self, *args): return vimagemodule.ImageVector_assign(self, *args) def resize(self, *args): return vimagemodule.ImageVector_resize(self, *args) def insert(self, *args): return vimagemodule.ImageVector_insert(self, *args) def reserve(self, *args): return vimagemodule.ImageVector_reserve(self, *args) def capacity(self): return vimagemodule.ImageVector_capacity(self) __swig_destroy__ = vimagemodule.delete_ImageVector __del__ = lambda self : None; ImageVector_swigregister = vimagemodule.ImageVector_swigregister ImageVector_swigregister(ImageVector) def init(argv0="nothing"): return vimagemodule.init(argv0) init = vimagemodule.init def shutdown(): return vimagemodule.shutdown() shutdown = vimagemodule.shutdown class VImage(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, VImage, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, VImage, name) __repr__ = _swig_repr __swig_getmethods__["print_all"] = lambda x: vimagemodule.VImage_print_all if _newclass:print_all = staticmethod(vimagemodule.VImage_print_all) MULTIBAND = vimagemodule.VImage_MULTIBAND B_W = vimagemodule.VImage_B_W LUMINACE = vimagemodule.VImage_LUMINACE XRAY = vimagemodule.VImage_XRAY IR = vimagemodule.VImage_IR YUV = vimagemodule.VImage_YUV RED_ONLY = vimagemodule.VImage_RED_ONLY GREEN_ONLY = vimagemodule.VImage_GREEN_ONLY BLUE_ONLY = vimagemodule.VImage_BLUE_ONLY POWER_SPECTRUM = vimagemodule.VImage_POWER_SPECTRUM HISTOGRAM = vimagemodule.VImage_HISTOGRAM LUT = vimagemodule.VImage_LUT XYZ = vimagemodule.VImage_XYZ LAB = vimagemodule.VImage_LAB CMC = vimagemodule.VImage_CMC CMYK = vimagemodule.VImage_CMYK LABQ = vimagemodule.VImage_LABQ RGB = vimagemodule.VImage_RGB UCS = vimagemodule.VImage_UCS LCH = vimagemodule.VImage_LCH LABS = vimagemodule.VImage_LABS sRGB = vimagemodule.VImage_sRGB YXY = vimagemodule.VImage_YXY FOURIER = vimagemodule.VImage_FOURIER RGB16 = vimagemodule.VImage_RGB16 GREY16 = vimagemodule.VImage_GREY16 FMTNOTSET = vimagemodule.VImage_FMTNOTSET FMTUCHAR = vimagemodule.VImage_FMTUCHAR FMTCHAR = vimagemodule.VImage_FMTCHAR FMTUSHORT = vimagemodule.VImage_FMTUSHORT FMTSHORT = vimagemodule.VImage_FMTSHORT FMTUINT = vimagemodule.VImage_FMTUINT FMTINT = vimagemodule.VImage_FMTINT FMTFLOAT = vimagemodule.VImage_FMTFLOAT FMTCOMPLEX = vimagemodule.VImage_FMTCOMPLEX FMTDOUBLE = vimagemodule.VImage_FMTDOUBLE FMTDPCOMPLEX = vimagemodule.VImage_FMTDPCOMPLEX NOCODING = vimagemodule.VImage_NOCODING COLQUANT = vimagemodule.VImage_COLQUANT LABPACK = vimagemodule.VImage_LABPACK LABPACK_COMPRESSED = vimagemodule.VImage_LABPACK_COMPRESSED RGB_COMPRESSED = vimagemodule.VImage_RGB_COMPRESSED LUM_COMPRESSED = vimagemodule.VImage_LUM_COMPRESSED RAD = vimagemodule.VImage_RAD NO_COMPRESSION = vimagemodule.VImage_NO_COMPRESSION TCSF_COMPRESSION = vimagemodule.VImage_TCSF_COMPRESSION JPEG_COMPRESSION = vimagemodule.VImage_JPEG_COMPRESSION __swig_getmethods__["convert2disc"] = lambda x: vimagemodule.VImage_convert2disc if _newclass:convert2disc = staticmethod(vimagemodule.VImage_convert2disc) def __init__(self, *args): this = vimagemodule.new_VImage(*args) try: self.this.append(this) except: self.this = this def __assign__(self, *args): return vimagemodule.VImage___assign__(self, *args) __swig_destroy__ = vimagemodule.delete_VImage __del__ = lambda self : None; def image(self): return vimagemodule.VImage_image(self) def data(self): return vimagemodule.VImage_data(self) def write(self, *args): return vimagemodule.VImage_write(self, *args) def debug_print(self): return vimagemodule.VImage_debug_print(self) def Xsize(self): return vimagemodule.VImage_Xsize(self) def Ysize(self): return vimagemodule.VImage_Ysize(self) def Bands(self): return vimagemodule.VImage_Bands(self) def BandFmt(self): return vimagemodule.VImage_BandFmt(self) def Coding(self): return vimagemodule.VImage_Coding(self) def Type(self): return vimagemodule.VImage_Type(self) def Xres(self): return vimagemodule.VImage_Xres(self) def Yres(self): return vimagemodule.VImage_Yres(self) def Length(self): return vimagemodule.VImage_Length(self) def Compression(self): return vimagemodule.VImage_Compression(self) def Level(self): return vimagemodule.VImage_Level(self) def Xoffset(self): return vimagemodule.VImage_Xoffset(self) def Yoffset(self): return vimagemodule.VImage_Yoffset(self) def filename(self): return vimagemodule.VImage_filename(self) def Hist(self): return vimagemodule.VImage_Hist(self) def meta_remove(self, *args): return vimagemodule.VImage_meta_remove(self, *args) def meta_get_typeof(self, *args): return vimagemodule.VImage_meta_get_typeof(self, *args) def meta_get_int(self, *args): return vimagemodule.VImage_meta_get_int(self, *args) def meta_get_double(self, *args): return vimagemodule.VImage_meta_get_double(self, *args) def meta_get_string(self, *args): return vimagemodule.VImage_meta_get_string(self, *args) def meta_get_area(self, *args): return vimagemodule.VImage_meta_get_area(self, *args) def meta_get_blob(self, *args): return vimagemodule.VImage_meta_get_blob(self, *args) def meta_set(self, *args): return vimagemodule.VImage_meta_set(self, *args) def initdesc(self, *args): return vimagemodule.VImage_initdesc(self, *args) def abs(self): return vimagemodule.VImage_abs(self) def acos(self): return vimagemodule.VImage_acos(self) def add(self, *args): return vimagemodule.VImage_add(self, *args) def asin(self): return vimagemodule.VImage_asin(self) def atan(self): return vimagemodule.VImage_atan(self) def avg(self): return vimagemodule.VImage_avg(self) def point(self, *args): return vimagemodule.VImage_point(self, *args) def point_bilinear(self, *args): return vimagemodule.VImage_point_bilinear(self, *args) def bandmean(self): return vimagemodule.VImage_bandmean(self) def ceil(self): return vimagemodule.VImage_ceil(self) def cos(self): return vimagemodule.VImage_cos(self) def cross_phase(self, *args): return vimagemodule.VImage_cross_phase(self, *args) def deviate(self): return vimagemodule.VImage_deviate(self) def divide(self, *args): return vimagemodule.VImage_divide(self, *args) def exp10(self): return vimagemodule.VImage_exp10(self) def expn(self, *args): return vimagemodule.VImage_expn(self, *args) def exp(self): return vimagemodule.VImage_exp(self) def floor(self): return vimagemodule.VImage_floor(self) def invert(self): return vimagemodule.VImage_invert(self) __swig_getmethods__["linreg"] = lambda x: vimagemodule.VImage_linreg if _newclass:linreg = staticmethod(vimagemodule.VImage_linreg) def lin(self, *args): return vimagemodule.VImage_lin(self, *args) def log10(self): return vimagemodule.VImage_log10(self) def log(self): return vimagemodule.VImage_log(self) def max(self): return vimagemodule.VImage_max(self) def maxpos(self): return vimagemodule.VImage_maxpos(self) def maxpos_avg(self): return vimagemodule.VImage_maxpos_avg(self) def measure(self, *args): return vimagemodule.VImage_measure(self, *args) def min(self): return vimagemodule.VImage_min(self) def minpos(self): return vimagemodule.VImage_minpos(self) def multiply(self, *args): return vimagemodule.VImage_multiply(self, *args) def pow(self, *args): return vimagemodule.VImage_pow(self, *args) def recomb(self, *args): return vimagemodule.VImage_recomb(self, *args) def remainder(self, *args): return vimagemodule.VImage_remainder(self, *args) def rint(self): return vimagemodule.VImage_rint(self) def sign(self): return vimagemodule.VImage_sign(self) def sin(self): return vimagemodule.VImage_sin(self) def stats(self): return vimagemodule.VImage_stats(self) def subtract(self, *args): return vimagemodule.VImage_subtract(self, *args) def tan(self): return vimagemodule.VImage_tan(self) def greyc(self, *args): return vimagemodule.VImage_greyc(self, *args) def greyc_mask(self, *args): return vimagemodule.VImage_greyc_mask(self, *args) def LCh2Lab(self): return vimagemodule.VImage_LCh2Lab(self) def LCh2UCS(self): return vimagemodule.VImage_LCh2UCS(self) def Lab2LCh(self): return vimagemodule.VImage_Lab2LCh(self) def Lab2LabQ(self): return vimagemodule.VImage_Lab2LabQ(self) def Lab2LabS(self): return vimagemodule.VImage_Lab2LabS(self) def Lab2UCS(self): return vimagemodule.VImage_Lab2UCS(self) def Lab2XYZ(self): return vimagemodule.VImage_Lab2XYZ(self) def Lab2XYZ_temp(self, *args): return vimagemodule.VImage_Lab2XYZ_temp(self, *args) def Lab2disp(self, *args): return vimagemodule.VImage_Lab2disp(self, *args) def LabQ2LabS(self): return vimagemodule.VImage_LabQ2LabS(self) def LabQ2Lab(self): return vimagemodule.VImage_LabQ2Lab(self) def LabQ2XYZ(self): return vimagemodule.VImage_LabQ2XYZ(self) def LabQ2disp(self, *args): return vimagemodule.VImage_LabQ2disp(self, *args) def LabS2LabQ(self): return vimagemodule.VImage_LabS2LabQ(self) def LabS2Lab(self): return vimagemodule.VImage_LabS2Lab(self) def UCS2LCh(self): return vimagemodule.VImage_UCS2LCh(self) def UCS2Lab(self): return vimagemodule.VImage_UCS2Lab(self) def UCS2XYZ(self): return vimagemodule.VImage_UCS2XYZ(self) def XYZ2Lab(self): return vimagemodule.VImage_XYZ2Lab(self) def XYZ2Lab_temp(self, *args): return vimagemodule.VImage_XYZ2Lab_temp(self, *args) def XYZ2UCS(self): return vimagemodule.VImage_XYZ2UCS(self) def XYZ2Yxy(self): return vimagemodule.VImage_XYZ2Yxy(self) def XYZ2disp(self, *args): return vimagemodule.VImage_XYZ2disp(self, *args) def XYZ2sRGB(self): return vimagemodule.VImage_XYZ2sRGB(self) def Yxy2XYZ(self): return vimagemodule.VImage_Yxy2XYZ(self) def dE00_fromLab(self, *args): return vimagemodule.VImage_dE00_fromLab(self, *args) def dECMC_fromLab(self, *args): return vimagemodule.VImage_dECMC_fromLab(self, *args) def dECMC_fromdisp(self, *args): return vimagemodule.VImage_dECMC_fromdisp(self, *args) def dE_fromLab(self, *args): return vimagemodule.VImage_dE_fromLab(self, *args) def dE_fromXYZ(self, *args): return vimagemodule.VImage_dE_fromXYZ(self, *args) def dE_fromdisp(self, *args): return vimagemodule.VImage_dE_fromdisp(self, *args) def disp2Lab(self, *args): return vimagemodule.VImage_disp2Lab(self, *args) def disp2XYZ(self, *args): return vimagemodule.VImage_disp2XYZ(self, *args) def float2rad(self): return vimagemodule.VImage_float2rad(self) def icc_ac2rc(self, *args): return vimagemodule.VImage_icc_ac2rc(self, *args) def icc_export_depth(self, *args): return vimagemodule.VImage_icc_export_depth(self, *args) def icc_import(self, *args): return vimagemodule.VImage_icc_import(self, *args) def icc_import_embedded(self, *args): return vimagemodule.VImage_icc_import_embedded(self, *args) def icc_transform(self, *args): return vimagemodule.VImage_icc_transform(self, *args) def lab_morph(self, *args): return vimagemodule.VImage_lab_morph(self, *args) def rad2float(self): return vimagemodule.VImage_rad2float(self) def sRGB2XYZ(self): return vimagemodule.VImage_sRGB2XYZ(self) __swig_getmethods__["gaussnoise"] = lambda x: vimagemodule.VImage_gaussnoise if _newclass:gaussnoise = staticmethod(vimagemodule.VImage_gaussnoise) def bandjoin(self, *args): return vimagemodule.VImage_bandjoin(self, *args) __swig_getmethods__["black"] = lambda x: vimagemodule.VImage_black if _newclass:black = staticmethod(vimagemodule.VImage_black) def c2amph(self): return vimagemodule.VImage_c2amph(self) def c2imag(self): return vimagemodule.VImage_c2imag(self) def c2real(self): return vimagemodule.VImage_c2real(self) def c2rect(self): return vimagemodule.VImage_c2rect(self) def clip2fmt(self, *args): return vimagemodule.VImage_clip2fmt(self, *args) def copy(self): return vimagemodule.VImage_copy(self) def copy_file(self): return vimagemodule.VImage_copy_file(self) def copy_morph(self, *args): return vimagemodule.VImage_copy_morph(self, *args) def copy_swap(self): return vimagemodule.VImage_copy_swap(self) def copy_set(self, *args): return vimagemodule.VImage_copy_set(self, *args) def extract_area(self, *args): return vimagemodule.VImage_extract_area(self, *args) def extract_areabands(self, *args): return vimagemodule.VImage_extract_areabands(self, *args) def extract_band(self, *args): return vimagemodule.VImage_extract_band(self, *args) def extract_bands(self, *args): return vimagemodule.VImage_extract_bands(self, *args) def extract(self, *args): return vimagemodule.VImage_extract(self, *args) def falsecolour(self): return vimagemodule.VImage_falsecolour(self) def fliphor(self): return vimagemodule.VImage_fliphor(self) def flipver(self): return vimagemodule.VImage_flipver(self) __swig_getmethods__["gbandjoin"] = lambda x: vimagemodule.VImage_gbandjoin if _newclass:gbandjoin = staticmethod(vimagemodule.VImage_gbandjoin) def grid(self, *args): return vimagemodule.VImage_grid(self, *args) def insert(self, *args): return vimagemodule.VImage_insert(self, *args) def insert_noexpand(self, *args): return vimagemodule.VImage_insert_noexpand(self, *args) def embed(self, *args): return vimagemodule.VImage_embed(self, *args) def lrjoin(self, *args): return vimagemodule.VImage_lrjoin(self, *args) def msb(self): return vimagemodule.VImage_msb(self) def msb_band(self, *args): return vimagemodule.VImage_msb_band(self, *args) def replicate(self, *args): return vimagemodule.VImage_replicate(self, *args) def ri2c(self, *args): return vimagemodule.VImage_ri2c(self, *args) def rot180(self): return vimagemodule.VImage_rot180(self) def rot270(self): return vimagemodule.VImage_rot270(self) def rot90(self): return vimagemodule.VImage_rot90(self) def scale(self): return vimagemodule.VImage_scale(self) def scaleps(self): return vimagemodule.VImage_scaleps(self) def subsample(self, *args): return vimagemodule.VImage_subsample(self, *args) def system(self, *args): return vimagemodule.VImage_system(self, *args) def system_image(self, *args): return vimagemodule.VImage_system_image(self, *args) def tbjoin(self, *args): return vimagemodule.VImage_tbjoin(self, *args) __swig_getmethods__["text"] = lambda x: vimagemodule.VImage_text if _newclass:text = staticmethod(vimagemodule.VImage_text) def wrap(self, *args): return vimagemodule.VImage_wrap(self, *args) def zoom(self, *args): return vimagemodule.VImage_zoom(self, *args) def aconvsep(self, *args): return vimagemodule.VImage_aconvsep(self, *args) def aconv(self, *args): return vimagemodule.VImage_aconv(self, *args) def addgnoise(self, *args): return vimagemodule.VImage_addgnoise(self, *args) def compass(self, *args): return vimagemodule.VImage_compass(self, *args) def contrast_surface(self, *args): return vimagemodule.VImage_contrast_surface(self, *args) def conv(self, *args): return vimagemodule.VImage_conv(self, *args) def convsep(self, *args): return vimagemodule.VImage_convsep(self, *args) def fastcor(self, *args): return vimagemodule.VImage_fastcor(self, *args) def gradcor(self, *args): return vimagemodule.VImage_gradcor(self, *args) def gradient(self, *args): return vimagemodule.VImage_gradient(self, *args) def grad_x(self): return vimagemodule.VImage_grad_x(self) def grad_y(self): return vimagemodule.VImage_grad_y(self) def lindetect(self, *args): return vimagemodule.VImage_lindetect(self, *args) def sharpen(self, *args): return vimagemodule.VImage_sharpen(self, *args) def spcor(self, *args): return vimagemodule.VImage_spcor(self, *args) def argb2rgba(self): return vimagemodule.VImage_argb2rgba(self) def flood_copy(self, *args): return vimagemodule.VImage_flood_copy(self, *args) def flood_blob_copy(self, *args): return vimagemodule.VImage_flood_blob_copy(self, *args) def flood_other_copy(self, *args): return vimagemodule.VImage_flood_other_copy(self, *args) def clip(self): return vimagemodule.VImage_clip(self) def c2ps(self): return vimagemodule.VImage_c2ps(self) def resize_linear(self, *args): return vimagemodule.VImage_resize_linear(self, *args) def cmulnorm(self, *args): return vimagemodule.VImage_cmulnorm(self, *args) def fav4(self, *args): return vimagemodule.VImage_fav4(self, *args) def gadd(self, *args): return vimagemodule.VImage_gadd(self, *args) def icc_export(self, *args): return vimagemodule.VImage_icc_export(self, *args) def litecor(self, *args): return vimagemodule.VImage_litecor(self, *args) def affine(self, *args): return vimagemodule.VImage_affine(self, *args) def clip2c(self): return vimagemodule.VImage_clip2c(self) def clip2cm(self): return vimagemodule.VImage_clip2cm(self) def clip2d(self): return vimagemodule.VImage_clip2d(self) def clip2dcm(self): return vimagemodule.VImage_clip2dcm(self) def clip2f(self): return vimagemodule.VImage_clip2f(self) def clip2i(self): return vimagemodule.VImage_clip2i(self) def convsub(self, *args): return vimagemodule.VImage_convsub(self, *args) def convf(self, *args): return vimagemodule.VImage_convf(self, *args) def convsepf(self, *args): return vimagemodule.VImage_convsepf(self, *args) def clip2s(self): return vimagemodule.VImage_clip2s(self) def clip2ui(self): return vimagemodule.VImage_clip2ui(self) def clip2us(self): return vimagemodule.VImage_clip2us(self) def slice(self, *args): return vimagemodule.VImage_slice(self, *args) def segment(self): return vimagemodule.VImage_segment(self) def thresh(self, *args): return vimagemodule.VImage_thresh(self, *args) def convf_raw(self, *args): return vimagemodule.VImage_convf_raw(self, *args) def conv_raw(self, *args): return vimagemodule.VImage_conv_raw(self, *args) def contrast_surface_raw(self, *args): return vimagemodule.VImage_contrast_surface_raw(self, *args) def convsepf_raw(self, *args): return vimagemodule.VImage_convsepf_raw(self, *args) def convsep_raw(self, *args): return vimagemodule.VImage_convsep_raw(self, *args) def fastcor_raw(self, *args): return vimagemodule.VImage_fastcor_raw(self, *args) def gradcor_raw(self, *args): return vimagemodule.VImage_gradcor_raw(self, *args) def spcor_raw(self, *args): return vimagemodule.VImage_spcor_raw(self, *args) def lhisteq_raw(self, *args): return vimagemodule.VImage_lhisteq_raw(self, *args) def stdif_raw(self, *args): return vimagemodule.VImage_stdif_raw(self, *args) def rank_raw(self, *args): return vimagemodule.VImage_rank_raw(self, *args) def dilate_raw(self, *args): return vimagemodule.VImage_dilate_raw(self, *args) def erode_raw(self, *args): return vimagemodule.VImage_erode_raw(self, *args) def similarity_area(self, *args): return vimagemodule.VImage_similarity_area(self, *args) def similarity(self, *args): return vimagemodule.VImage_similarity(self, *args) __swig_getmethods__["mask2vips"] = lambda x: vimagemodule.VImage_mask2vips if _newclass:mask2vips = staticmethod(vimagemodule.VImage_mask2vips) def vips2mask(self): return vimagemodule.VImage_vips2mask(self) def insertplace(self, *args): return vimagemodule.VImage_insertplace(self, *args) def circle(self, *args): return vimagemodule.VImage_circle(self, *args) def andimage(self, *args): return vimagemodule.VImage_andimage(self, *args) def orimage(self, *args): return vimagemodule.VImage_orimage(self, *args) def eorimage(self, *args): return vimagemodule.VImage_eorimage(self, *args) def shiftleft(self, *args): return vimagemodule.VImage_shiftleft(self, *args) def shiftright(self, *args): return vimagemodule.VImage_shiftright(self, *args) def blend(self, *args): return vimagemodule.VImage_blend(self, *args) def equal(self, *args): return vimagemodule.VImage_equal(self, *args) def ifthenelse(self, *args): return vimagemodule.VImage_ifthenelse(self, *args) def less(self, *args): return vimagemodule.VImage_less(self, *args) def lesseq(self, *args): return vimagemodule.VImage_lesseq(self, *args) def more(self, *args): return vimagemodule.VImage_more(self, *args) def moreeq(self, *args): return vimagemodule.VImage_moreeq(self, *args) def notequal(self, *args): return vimagemodule.VImage_notequal(self, *args) def quadratic(self, *args): return vimagemodule.VImage_quadratic(self, *args) __swig_getmethods__["csv2vips"] = lambda x: vimagemodule.VImage_csv2vips if _newclass:csv2vips = staticmethod(vimagemodule.VImage_csv2vips) __swig_getmethods__["fits2vips"] = lambda x: vimagemodule.VImage_fits2vips if _newclass:fits2vips = staticmethod(vimagemodule.VImage_fits2vips) __swig_getmethods__["jpeg2vips"] = lambda x: vimagemodule.VImage_jpeg2vips if _newclass:jpeg2vips = staticmethod(vimagemodule.VImage_jpeg2vips) __swig_getmethods__["magick2vips"] = lambda x: vimagemodule.VImage_magick2vips if _newclass:magick2vips = staticmethod(vimagemodule.VImage_magick2vips) __swig_getmethods__["png2vips"] = lambda x: vimagemodule.VImage_png2vips if _newclass:png2vips = staticmethod(vimagemodule.VImage_png2vips) __swig_getmethods__["exr2vips"] = lambda x: vimagemodule.VImage_exr2vips if _newclass:exr2vips = staticmethod(vimagemodule.VImage_exr2vips) __swig_getmethods__["ppm2vips"] = lambda x: vimagemodule.VImage_ppm2vips if _newclass:ppm2vips = staticmethod(vimagemodule.VImage_ppm2vips) __swig_getmethods__["analyze2vips"] = lambda x: vimagemodule.VImage_analyze2vips if _newclass:analyze2vips = staticmethod(vimagemodule.VImage_analyze2vips) __swig_getmethods__["tiff2vips"] = lambda x: vimagemodule.VImage_tiff2vips if _newclass:tiff2vips = staticmethod(vimagemodule.VImage_tiff2vips) def vips2csv(self, *args): return vimagemodule.VImage_vips2csv(self, *args) def vips2dz(self, *args): return vimagemodule.VImage_vips2dz(self, *args) def vips2jpeg(self, *args): return vimagemodule.VImage_vips2jpeg(self, *args) def vips2mimejpeg(self, *args): return vimagemodule.VImage_vips2mimejpeg(self, *args) def vips2png(self, *args): return vimagemodule.VImage_vips2png(self, *args) def vips2ppm(self, *args): return vimagemodule.VImage_vips2ppm(self, *args) def vips2tiff(self, *args): return vimagemodule.VImage_vips2tiff(self, *args) __swig_getmethods__["create_fmask"] = lambda x: vimagemodule.VImage_create_fmask if _newclass:create_fmask = staticmethod(vimagemodule.VImage_create_fmask) def disp_ps(self): return vimagemodule.VImage_disp_ps(self) def flt_image_freq(self, *args): return vimagemodule.VImage_flt_image_freq(self, *args) __swig_getmethods__["fractsurf"] = lambda x: vimagemodule.VImage_fractsurf if _newclass:fractsurf = staticmethod(vimagemodule.VImage_fractsurf) def freqflt(self, *args): return vimagemodule.VImage_freqflt(self, *args) def fwfft(self): return vimagemodule.VImage_fwfft(self) def rotquad(self): return vimagemodule.VImage_rotquad(self) def invfft(self): return vimagemodule.VImage_invfft(self) def phasecor_fft(self, *args): return vimagemodule.VImage_phasecor_fft(self, *args) def invfftr(self): return vimagemodule.VImage_invfftr(self) def gammacorrect(self, *args): return vimagemodule.VImage_gammacorrect(self, *args) def heq(self, *args): return vimagemodule.VImage_heq(self, *args) def hist(self, *args): return vimagemodule.VImage_hist(self, *args) def histcum(self): return vimagemodule.VImage_histcum(self) def histeq(self): return vimagemodule.VImage_histeq(self) def hist_indexed(self, *args): return vimagemodule.VImage_hist_indexed(self, *args) def histgr(self, *args): return vimagemodule.VImage_histgr(self, *args) def histnD(self, *args): return vimagemodule.VImage_histnD(self, *args) def histnorm(self): return vimagemodule.VImage_histnorm(self) def histplot(self): return vimagemodule.VImage_histplot(self) def histspec(self, *args): return vimagemodule.VImage_histspec(self, *args) def hsp(self, *args): return vimagemodule.VImage_hsp(self, *args) __swig_getmethods__["identity"] = lambda x: vimagemodule.VImage_identity if _newclass:identity = staticmethod(vimagemodule.VImage_identity) __swig_getmethods__["identity_ushort"] = lambda x: vimagemodule.VImage_identity_ushort if _newclass:identity_ushort = staticmethod(vimagemodule.VImage_identity_ushort) def ismonotonic(self): return vimagemodule.VImage_ismonotonic(self) def lhisteq(self, *args): return vimagemodule.VImage_lhisteq(self, *args) def mpercent(self, *args): return vimagemodule.VImage_mpercent(self, *args) __swig_getmethods__["invertlut"] = lambda x: vimagemodule.VImage_invertlut if _newclass:invertlut = staticmethod(vimagemodule.VImage_invertlut) __swig_getmethods__["buildlut"] = lambda x: vimagemodule.VImage_buildlut if _newclass:buildlut = staticmethod(vimagemodule.VImage_buildlut) def maplut(self, *args): return vimagemodule.VImage_maplut(self, *args) def project(self, *args): return vimagemodule.VImage_project(self, *args) def stdif(self, *args): return vimagemodule.VImage_stdif(self, *args) def tone_analyse(self, *args): return vimagemodule.VImage_tone_analyse(self, *args) __swig_getmethods__["tone_build"] = lambda x: vimagemodule.VImage_tone_build if _newclass:tone_build = staticmethod(vimagemodule.VImage_tone_build) __swig_getmethods__["tone_build_range"] = lambda x: vimagemodule.VImage_tone_build_range if _newclass:tone_build_range = staticmethod(vimagemodule.VImage_tone_build_range) def tone_map(self, *args): return vimagemodule.VImage_tone_map(self, *args) def draw_circle(self, *args): return vimagemodule.VImage_draw_circle(self, *args) def draw_rect(self, *args): return vimagemodule.VImage_draw_rect(self, *args) def draw_line(self, *args): return vimagemodule.VImage_draw_line(self, *args) def draw_point(self, *args): return vimagemodule.VImage_draw_point(self, *args) def draw_smudge(self, *args): return vimagemodule.VImage_draw_smudge(self, *args) def draw_flood(self, *args): return vimagemodule.VImage_draw_flood(self, *args) def draw_flood_blob(self, *args): return vimagemodule.VImage_draw_flood_blob(self, *args) def draw_flood_other(self, *args): return vimagemodule.VImage_draw_flood_other(self, *args) def draw_image(self, *args): return vimagemodule.VImage_draw_image(self, *args) def draw_mask(self, *args): return vimagemodule.VImage_draw_mask(self, *args) def line(self, *args): return vimagemodule.VImage_line(self, *args) __swig_getmethods__["binfile"] = lambda x: vimagemodule.VImage_binfile if _newclass:binfile = staticmethod(vimagemodule.VImage_binfile) def cache(self, *args): return vimagemodule.VImage_cache(self, *args) def getext(self): return vimagemodule.VImage_getext(self) def header_get_typeof(self, *args): return vimagemodule.VImage_header_get_typeof(self, *args) def header_int(self, *args): return vimagemodule.VImage_header_int(self, *args) def header_double(self, *args): return vimagemodule.VImage_header_double(self, *args) def header_string(self, *args): return vimagemodule.VImage_header_string(self, *args) def history_get(self): return vimagemodule.VImage_history_get(self) def printdesc(self): return vimagemodule.VImage_printdesc(self) def cntlines(self, *args): return vimagemodule.VImage_cntlines(self, *args) def dilate(self, *args): return vimagemodule.VImage_dilate(self, *args) def rank(self, *args): return vimagemodule.VImage_rank(self, *args) __swig_getmethods__["rank_image"] = lambda x: vimagemodule.VImage_rank_image if _newclass:rank_image = staticmethod(vimagemodule.VImage_rank_image) __swig_getmethods__["maxvalue"] = lambda x: vimagemodule.VImage_maxvalue if _newclass:maxvalue = staticmethod(vimagemodule.VImage_maxvalue) def label_regions(self): return vimagemodule.VImage_label_regions(self) def zerox(self, *args): return vimagemodule.VImage_zerox(self, *args) def erode(self, *args): return vimagemodule.VImage_erode(self, *args) def profile(self, *args): return vimagemodule.VImage_profile(self, *args) def align_bands(self): return vimagemodule.VImage_align_bands(self) def correl(self, *args): return vimagemodule.VImage_correl(self, *args) def _find_lroverlap(self, *args): return vimagemodule.VImage__find_lroverlap(self, *args) def _find_tboverlap(self, *args): return vimagemodule.VImage__find_tboverlap(self, *args) def global_balance(self, *args): return vimagemodule.VImage_global_balance(self, *args) def global_balancef(self, *args): return vimagemodule.VImage_global_balancef(self, *args) def lrmerge(self, *args): return vimagemodule.VImage_lrmerge(self, *args) def lrmerge1(self, *args): return vimagemodule.VImage_lrmerge1(self, *args) def lrmosaic(self, *args): return vimagemodule.VImage_lrmosaic(self, *args) def lrmosaic1(self, *args): return vimagemodule.VImage_lrmosaic1(self, *args) def match_linear(self, *args): return vimagemodule.VImage_match_linear(self, *args) def match_linear_search(self, *args): return vimagemodule.VImage_match_linear_search(self, *args) def maxpos_subpel(self): return vimagemodule.VImage_maxpos_subpel(self) def remosaic(self, *args): return vimagemodule.VImage_remosaic(self, *args) def tbmerge(self, *args): return vimagemodule.VImage_tbmerge(self, *args) def tbmerge1(self, *args): return vimagemodule.VImage_tbmerge1(self, *args) def tbmosaic(self, *args): return vimagemodule.VImage_tbmosaic(self, *args) def tbmosaic1(self, *args): return vimagemodule.VImage_tbmosaic1(self, *args) def benchmark(self): return vimagemodule.VImage_benchmark(self) def benchmark2(self): return vimagemodule.VImage_benchmark2(self) def benchmarkn(self, *args): return vimagemodule.VImage_benchmarkn(self, *args) __swig_getmethods__["eye"] = lambda x: vimagemodule.VImage_eye if _newclass:eye = staticmethod(vimagemodule.VImage_eye) __swig_getmethods__["grey"] = lambda x: vimagemodule.VImage_grey if _newclass:grey = staticmethod(vimagemodule.VImage_grey) __swig_getmethods__["feye"] = lambda x: vimagemodule.VImage_feye if _newclass:feye = staticmethod(vimagemodule.VImage_feye) __swig_getmethods__["fgrey"] = lambda x: vimagemodule.VImage_fgrey if _newclass:fgrey = staticmethod(vimagemodule.VImage_fgrey) __swig_getmethods__["fzone"] = lambda x: vimagemodule.VImage_fzone if _newclass:fzone = staticmethod(vimagemodule.VImage_fzone) __swig_getmethods__["make_xy"] = lambda x: vimagemodule.VImage_make_xy if _newclass:make_xy = staticmethod(vimagemodule.VImage_make_xy) __swig_getmethods__["sines"] = lambda x: vimagemodule.VImage_sines if _newclass:sines = staticmethod(vimagemodule.VImage_sines) __swig_getmethods__["zone"] = lambda x: vimagemodule.VImage_zone if _newclass:zone = staticmethod(vimagemodule.VImage_zone) def rightshift_size(self, *args): return vimagemodule.VImage_rightshift_size(self, *args) def shrink(self, *args): return vimagemodule.VImage_shrink(self, *args) def stretch3(self, *args): return vimagemodule.VImage_stretch3(self, *args) def affinei(self, *args): return vimagemodule.VImage_affinei(self, *args) def affinei_all(self, *args): return vimagemodule.VImage_affinei_all(self, *args) __swig_getmethods__["video_test"] = lambda x: vimagemodule.VImage_video_test if _newclass:video_test = staticmethod(vimagemodule.VImage_video_test) __swig_getmethods__["video_v4l1"] = lambda x: vimagemodule.VImage_video_v4l1 if _newclass:video_v4l1 = staticmethod(vimagemodule.VImage_video_v4l1) def tobuffer(self): return vimagemodule.VImage_tobuffer(self) __swig_getmethods__["frombuffer"] = lambda x: vimagemodule.VImage_frombuffer if _newclass:frombuffer = staticmethod(vimagemodule.VImage_frombuffer) def tostring(self): return vimagemodule.VImage_tostring(self) __swig_getmethods__["fromstring"] = lambda x: vimagemodule.VImage_fromstring if _newclass:fromstring = staticmethod(vimagemodule.VImage_fromstring) VImage_swigregister = vimagemodule.VImage_swigregister VImage_swigregister(VImage) def VImage_print_all(): return vimagemodule.VImage_print_all() VImage_print_all = vimagemodule.VImage_print_all def VImage_convert2disc(*args): return vimagemodule.VImage_convert2disc(*args) VImage_convert2disc = vimagemodule.VImage_convert2disc def VImage_linreg(*args): return vimagemodule.VImage_linreg(*args) VImage_linreg = vimagemodule.VImage_linreg def VImage_gaussnoise(*args): return vimagemodule.VImage_gaussnoise(*args) VImage_gaussnoise = vimagemodule.VImage_gaussnoise def VImage_black(*args): return vimagemodule.VImage_black(*args) VImage_black = vimagemodule.VImage_black def VImage_gbandjoin(*args): return vimagemodule.VImage_gbandjoin(*args) VImage_gbandjoin = vimagemodule.VImage_gbandjoin def VImage_text(*args): return vimagemodule.VImage_text(*args) VImage_text = vimagemodule.VImage_text def VImage_mask2vips(*args): return vimagemodule.VImage_mask2vips(*args) VImage_mask2vips = vimagemodule.VImage_mask2vips def VImage_csv2vips(*args): return vimagemodule.VImage_csv2vips(*args) VImage_csv2vips = vimagemodule.VImage_csv2vips def VImage_fits2vips(*args): return vimagemodule.VImage_fits2vips(*args) VImage_fits2vips = vimagemodule.VImage_fits2vips def VImage_jpeg2vips(*args): return vimagemodule.VImage_jpeg2vips(*args) VImage_jpeg2vips = vimagemodule.VImage_jpeg2vips def VImage_magick2vips(*args): return vimagemodule.VImage_magick2vips(*args) VImage_magick2vips = vimagemodule.VImage_magick2vips def VImage_png2vips(*args): return vimagemodule.VImage_png2vips(*args) VImage_png2vips = vimagemodule.VImage_png2vips def VImage_exr2vips(*args): return vimagemodule.VImage_exr2vips(*args) VImage_exr2vips = vimagemodule.VImage_exr2vips def VImage_ppm2vips(*args): return vimagemodule.VImage_ppm2vips(*args) VImage_ppm2vips = vimagemodule.VImage_ppm2vips def VImage_analyze2vips(*args): return vimagemodule.VImage_analyze2vips(*args) VImage_analyze2vips = vimagemodule.VImage_analyze2vips def VImage_tiff2vips(*args): return vimagemodule.VImage_tiff2vips(*args) VImage_tiff2vips = vimagemodule.VImage_tiff2vips def VImage_create_fmask(*args): return vimagemodule.VImage_create_fmask(*args) VImage_create_fmask = vimagemodule.VImage_create_fmask def VImage_fractsurf(*args): return vimagemodule.VImage_fractsurf(*args) VImage_fractsurf = vimagemodule.VImage_fractsurf def VImage_identity(*args): return vimagemodule.VImage_identity(*args) VImage_identity = vimagemodule.VImage_identity def VImage_identity_ushort(*args): return vimagemodule.VImage_identity_ushort(*args) VImage_identity_ushort = vimagemodule.VImage_identity_ushort def VImage_invertlut(*args): return vimagemodule.VImage_invertlut(*args) VImage_invertlut = vimagemodule.VImage_invertlut def VImage_buildlut(*args): return vimagemodule.VImage_buildlut(*args) VImage_buildlut = vimagemodule.VImage_buildlut def VImage_tone_build(*args): return vimagemodule.VImage_tone_build(*args) VImage_tone_build = vimagemodule.VImage_tone_build def VImage_tone_build_range(*args): return vimagemodule.VImage_tone_build_range(*args) VImage_tone_build_range = vimagemodule.VImage_tone_build_range def VImage_binfile(*args): return vimagemodule.VImage_binfile(*args) VImage_binfile = vimagemodule.VImage_binfile def VImage_rank_image(*args): return vimagemodule.VImage_rank_image(*args) VImage_rank_image = vimagemodule.VImage_rank_image def VImage_maxvalue(*args): return vimagemodule.VImage_maxvalue(*args) VImage_maxvalue = vimagemodule.VImage_maxvalue def VImage_eye(*args): return vimagemodule.VImage_eye(*args) VImage_eye = vimagemodule.VImage_eye def VImage_grey(*args): return vimagemodule.VImage_grey(*args) VImage_grey = vimagemodule.VImage_grey def VImage_feye(*args): return vimagemodule.VImage_feye(*args) VImage_feye = vimagemodule.VImage_feye def VImage_fgrey(*args): return vimagemodule.VImage_fgrey(*args) VImage_fgrey = vimagemodule.VImage_fgrey def VImage_fzone(*args): return vimagemodule.VImage_fzone(*args) VImage_fzone = vimagemodule.VImage_fzone def VImage_make_xy(*args): return vimagemodule.VImage_make_xy(*args) VImage_make_xy = vimagemodule.VImage_make_xy def VImage_sines(*args): return vimagemodule.VImage_sines(*args) VImage_sines = vimagemodule.VImage_sines def VImage_zone(*args): return vimagemodule.VImage_zone(*args) VImage_zone = vimagemodule.VImage_zone def VImage_video_test(*args): return vimagemodule.VImage_video_test(*args) VImage_video_test = vimagemodule.VImage_video_test def VImage_video_v4l1(*args): return vimagemodule.VImage_video_v4l1(*args) VImage_video_v4l1 = vimagemodule.VImage_video_v4l1 def VImage_frombuffer(*args): return vimagemodule.VImage_frombuffer(*args) VImage_frombuffer = vimagemodule.VImage_frombuffer def VImage_fromstring(*args): return vimagemodule.VImage_fromstring(*args) VImage_fromstring = vimagemodule.VImage_fromstring def im_init_world(*args): return vimagemodule.im_init_world(*args) im_init_world = vimagemodule.im_init_world def im__print_all(): return vimagemodule.im__print_all() im__print_all = vimagemodule.im__print_all def im_col_Lab2XYZ(*args): return vimagemodule.im_col_Lab2XYZ(*args) im_col_Lab2XYZ = vimagemodule.im_col_Lab2XYZ # try to guess a PIL mode string from a VIPS image def PIL_mode_from_vips (vim): if vim.Bands () == 3 and vim.BandFmt () == VImage.FMTUCHAR: return 'RGB' elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.RGB: return 'RGBA' elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.CMYK: return 'CMYK' elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTUCHAR: return 'L' elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTINT: return 'I' elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTFLOAT: return 'F' elif vim.Bands () == 2 and vim.BandFmt () == VImage.FMTUCHAR: return 'LA' else: raise ValueError ('unsupported vips -> pil image') # return vips (bands, format, type) for a PIL mode def vips_from_PIL_mode (mode): if mode == 'RGB': return (3, VImage.FMTUCHAR, VImage.RGB) elif mode == 'RGBA': return (4, VImage.FMTUCHAR, VImage.RGB) elif mode == 'CMYK': return (4, VImage.FMTUCHAR, VImage.CMYK) elif mode == 'L': return (1, VImage.FMTUCHAR, VImage.B_W) elif mode == 'I': return (1, VImage.FMTINT, VImage.B_W) elif mode == 'F': return (1, VImage.FMTFLOAT, VImage.B_W) elif mode == 'LA': return (2, VImage.FMTUCHAR, VImage.B_W) else: raise ValueError ('unsupported pil -> vips image') # This file is compatible with both classic and new-style classes. vips-7.38.5/swig/vipsCC/VMask.py0000644000175000017500000001712612303145403013255 00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('vmaskmodule', [dirname(__file__)]) except ImportError: import vmaskmodule return vmaskmodule if fp is not None: try: _mod = imp.load_module('vmaskmodule', fp, pathname, description) finally: fp.close() return _mod vmaskmodule = swig_import_helper() del swig_import_helper else: import vmaskmodule del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 import VError import VImage import VDisplay class VMask(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, VMask, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, VMask, name) __repr__ = _swig_repr def __init__(self, *args): this = vmaskmodule.new_VMask(*args) try: self.this.append(this) except: self.this = this def __assign__(self, *args): return vmaskmodule.VMask___assign__(self, *args) __swig_destroy__ = vmaskmodule.delete_VMask __del__ = lambda self : None; def xsize(self): return vmaskmodule.VMask_xsize(self) def ysize(self): return vmaskmodule.VMask_ysize(self) def size(self): return vmaskmodule.VMask_size(self) def filename(self): return vmaskmodule.VMask_filename(self) def type(self): return vmaskmodule.VMask_type(self) def mask(self): return vmaskmodule.VMask_mask(self) def ostream_print(self, *args): return vmaskmodule.VMask_ostream_print(self, *args) VMask_swigregister = vmaskmodule.VMask_swigregister VMask_swigregister(VMask) def __lshift__(*args): return vmaskmodule.__lshift__(*args) __lshift__ = vmaskmodule.__lshift__ class VIMask(VMask): __swig_setmethods__ = {} for _s in [VMask]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, VIMask, name, value) __swig_getmethods__ = {} for _s in [VMask]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, VIMask, name) __repr__ = _swig_repr def __init__(self, *args): this = vmaskmodule.new_VIMask(*args) try: self.this.append(this) except: self.this = this def scale(self): return vmaskmodule.VIMask_scale(self) def offset(self): return vmaskmodule.VIMask_offset(self) def embed(self, *args): return vmaskmodule.VIMask_embed(self, *args) def __index__(self, *args): return vmaskmodule.VIMask___index__(self, *args) def __call__(self, *args): return vmaskmodule.VIMask___call__(self, *args) def get(self, *args): return vmaskmodule.VIMask_get(self, *args) __swig_getmethods__["gauss"] = lambda x: vmaskmodule.VIMask_gauss if _newclass:gauss = staticmethod(vmaskmodule.VIMask_gauss) __swig_getmethods__["gauss_sep"] = lambda x: vmaskmodule.VIMask_gauss_sep if _newclass:gauss_sep = staticmethod(vmaskmodule.VIMask_gauss_sep) __swig_getmethods__["log"] = lambda x: vmaskmodule.VIMask_log if _newclass:log = staticmethod(vmaskmodule.VIMask_log) def rotate45(self): return vmaskmodule.VIMask_rotate45(self) def rotate90(self): return vmaskmodule.VIMask_rotate90(self) def trn(self): return vmaskmodule.VIMask_trn(self) def inv(self): return vmaskmodule.VIMask_inv(self) def cat(self, *args): return vmaskmodule.VIMask_cat(self, *args) def mul(self, *args): return vmaskmodule.VIMask_mul(self, *args) __swig_destroy__ = vmaskmodule.delete_VIMask __del__ = lambda self : None; VIMask_swigregister = vmaskmodule.VIMask_swigregister VIMask_swigregister(VIMask) def VIMask_gauss(*args): return vmaskmodule.VIMask_gauss(*args) VIMask_gauss = vmaskmodule.VIMask_gauss def VIMask_gauss_sep(*args): return vmaskmodule.VIMask_gauss_sep(*args) VIMask_gauss_sep = vmaskmodule.VIMask_gauss_sep def VIMask_log(*args): return vmaskmodule.VIMask_log(*args) VIMask_log = vmaskmodule.VIMask_log class VDMask(VMask): __swig_setmethods__ = {} for _s in [VMask]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, VDMask, name, value) __swig_getmethods__ = {} for _s in [VMask]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, VDMask, name) __repr__ = _swig_repr def __init__(self, *args): this = vmaskmodule.new_VDMask(*args) try: self.this.append(this) except: self.this = this def embed(self, *args): return vmaskmodule.VDMask_embed(self, *args) def scale(self): return vmaskmodule.VDMask_scale(self) def offset(self): return vmaskmodule.VDMask_offset(self) def __index__(self, *args): return vmaskmodule.VDMask___index__(self, *args) def __call__(self, *args): return vmaskmodule.VDMask___call__(self, *args) def get(self, *args): return vmaskmodule.VDMask_get(self, *args) __swig_getmethods__["gauss"] = lambda x: vmaskmodule.VDMask_gauss if _newclass:gauss = staticmethod(vmaskmodule.VDMask_gauss) __swig_getmethods__["log"] = lambda x: vmaskmodule.VDMask_log if _newclass:log = staticmethod(vmaskmodule.VDMask_log) def rotate45(self): return vmaskmodule.VDMask_rotate45(self) def rotate90(self): return vmaskmodule.VDMask_rotate90(self) def scalei(self): return vmaskmodule.VDMask_scalei(self) def trn(self): return vmaskmodule.VDMask_trn(self) def inv(self): return vmaskmodule.VDMask_inv(self) def cat(self, *args): return vmaskmodule.VDMask_cat(self, *args) def mul(self, *args): return vmaskmodule.VDMask_mul(self, *args) __swig_destroy__ = vmaskmodule.delete_VDMask __del__ = lambda self : None; VDMask_swigregister = vmaskmodule.VDMask_swigregister VDMask_swigregister(VDMask) def VDMask_gauss(*args): return vmaskmodule.VDMask_gauss(*args) VDMask_gauss = vmaskmodule.VDMask_gauss def VDMask_log(*args): return vmaskmodule.VDMask_log(*args) VDMask_log = vmaskmodule.VDMask_log # This file is compatible with both classic and new-style classes. vips-7.38.5/swig/vipsCC/Makefile.in0000644000175000017500000007307312303144056013735 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = swig/vipsCC DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(vipscc_PYTHON) \ $(top_srcdir)/py-compile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(vipsccdir)" "$(DESTDIR)$(vipsccdir)" LTLIBRARIES = $(vipscc_LTLIBRARIES) am__DEPENDENCIES_1 = vdisplaymodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \ $(am__DEPENDENCIES_1) nodist_vdisplaymodule_la_OBJECTS = vdisplaymodule.lo vdisplaymodule_la_OBJECTS = $(nodist_vdisplaymodule_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = vdisplaymodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(vdisplaymodule_la_LDFLAGS) \ $(LDFLAGS) -o $@ verrormodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \ $(am__DEPENDENCIES_1) nodist_verrormodule_la_OBJECTS = verrormodule.lo verrormodule_la_OBJECTS = $(nodist_verrormodule_la_OBJECTS) verrormodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(verrormodule_la_LDFLAGS) \ $(LDFLAGS) -o $@ vimagemodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \ ../../libvips/libvips.la $(am__DEPENDENCIES_1) nodist_vimagemodule_la_OBJECTS = vimagemodule.lo vimagemodule_la_OBJECTS = $(nodist_vimagemodule_la_OBJECTS) vimagemodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(vimagemodule_la_LDFLAGS) \ $(LDFLAGS) -o $@ vmaskmodule_la_DEPENDENCIES = ../../libvipsCC/libvipsCC.la \ $(am__DEPENDENCIES_1) nodist_vmaskmodule_la_OBJECTS = vmaskmodule.lo vmaskmodule_la_OBJECTS = $(nodist_vmaskmodule_la_OBJECTS) vmaskmodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(vmaskmodule_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(nodist_vdisplaymodule_la_SOURCES) \ $(nodist_verrormodule_la_SOURCES) \ $(nodist_vimagemodule_la_SOURCES) \ $(nodist_vmaskmodule_la_SOURCES) DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) am__pep3147_tweak = \ sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|' py_compile = $(top_srcdir)/py-compile am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ # Let make substitute the value of PYTHON_INCLUDES rather than auto* # this makes it easier to support multiple python installs AM_CPPFLAGS = \ -I${top_srcdir}/libvips/include \ -I${top_srcdir}/libvipsCC/include \ @VIPS_CFLAGS@ \ @VIPS_INCLUDES@ \ $(PYTHON_INCLUDES) # we install to a directory inside the python area, since we are a module vipsccdir = $(pyexecdir)/vipsCC vipscc_PYTHON = VImage.py VDisplay.py VError.py VMask.py __init__.py vipscc_LTLIBRARIES = vimagemodule.la vdisplaymodule.la verrormodule.la vmaskmodule.la # maybe there's a clever way to avoid repeating the link stuff 4 times # vimagemodule uses the C API as well, so it needs libvips too vimagemodule_la_LDFLAGS = -module -avoid-version vimagemodule_la_LIBADD = ../../libvipsCC/libvipsCC.la ../../libvips/libvips.la $(VIPS_LIBS) nodist_vimagemodule_la_SOURCES = vimagemodule.cxx vdisplaymodule_la_LDFLAGS = -module -avoid-version vdisplaymodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS) nodist_vdisplaymodule_la_SOURCES = vdisplaymodule.cxx verrormodule_la_LDFLAGS = -module -avoid-version verrormodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS) nodist_verrormodule_la_SOURCES = verrormodule.cxx vmaskmodule_la_LDFLAGS = -module -avoid-version vmaskmodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS) nodist_vmaskmodule_la_SOURCES = vmaskmodule.cxx CLEANFILES = VImage.h EXTRA_DIST = \ VImage.i VDisplay.i VError.i VMask.i __init__.py \ vimagemodule.cxx \ verrormodule.cxx vdisplaymodule.cxx vmaskmodule.cxx \ VImage.py VDisplay.py VError.py VMask.py all: all-am .SUFFIXES: .SUFFIXES: .cxx .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign swig/vipsCC/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign swig/vipsCC/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-vipsccLTLIBRARIES: $(vipscc_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(vipscc_LTLIBRARIES)'; test -n "$(vipsccdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(vipsccdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(vipsccdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(vipsccdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(vipsccdir)"; \ } uninstall-vipsccLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(vipscc_LTLIBRARIES)'; test -n "$(vipsccdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(vipsccdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(vipsccdir)/$$f"; \ done clean-vipsccLTLIBRARIES: -test -z "$(vipscc_LTLIBRARIES)" || rm -f $(vipscc_LTLIBRARIES) @list='$(vipscc_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } vdisplaymodule.la: $(vdisplaymodule_la_OBJECTS) $(vdisplaymodule_la_DEPENDENCIES) $(EXTRA_vdisplaymodule_la_DEPENDENCIES) $(AM_V_CXXLD)$(vdisplaymodule_la_LINK) -rpath $(vipsccdir) $(vdisplaymodule_la_OBJECTS) $(vdisplaymodule_la_LIBADD) $(LIBS) verrormodule.la: $(verrormodule_la_OBJECTS) $(verrormodule_la_DEPENDENCIES) $(EXTRA_verrormodule_la_DEPENDENCIES) $(AM_V_CXXLD)$(verrormodule_la_LINK) -rpath $(vipsccdir) $(verrormodule_la_OBJECTS) $(verrormodule_la_LIBADD) $(LIBS) vimagemodule.la: $(vimagemodule_la_OBJECTS) $(vimagemodule_la_DEPENDENCIES) $(EXTRA_vimagemodule_la_DEPENDENCIES) $(AM_V_CXXLD)$(vimagemodule_la_LINK) -rpath $(vipsccdir) $(vimagemodule_la_OBJECTS) $(vimagemodule_la_LIBADD) $(LIBS) vmaskmodule.la: $(vmaskmodule_la_OBJECTS) $(vmaskmodule_la_DEPENDENCIES) $(EXTRA_vmaskmodule_la_DEPENDENCIES) $(AM_V_CXXLD)$(vmaskmodule_la_LINK) -rpath $(vipsccdir) $(vmaskmodule_la_OBJECTS) $(vmaskmodule_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdisplaymodule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verrormodule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vimagemodule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmaskmodule.Plo@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-vipsccPYTHON: $(vipscc_PYTHON) @$(NORMAL_INSTALL) @list='$(vipscc_PYTHON)'; dlist=; list2=; test -n "$(vipsccdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(vipsccdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(vipsccdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vipsccdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(vipsccdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ $(am__py_compile) --destdir "$(DESTDIR)" \ --basedir "$(vipsccdir)" $$dlist; \ else :; fi uninstall-vipsccPYTHON: @$(NORMAL_UNINSTALL) @list='$(vipscc_PYTHON)'; test -n "$(vipsccdir)" || list=; \ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(vipsccdir)'; \ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ echo "$$py_files_pep3147";\ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ for files in \ "$$py_files" \ "$$pyc_files" \ "$$pyo_files" \ "$$pyc_files_pep3147" \ "$$pyo_files_pep3147" \ ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(vipsccdir)" "$(DESTDIR)$(vipsccdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-vipsccLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-vipsccLTLIBRARIES install-vipsccPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-vipsccLTLIBRARIES uninstall-vipsccPYTHON .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-vipsccLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip \ install-vipsccLTLIBRARIES install-vipsccPYTHON installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-vipsccLTLIBRARIES uninstall-vipsccPYTHON # I tried making a suffix rule for this (and defining SUFFIXES) but I couldn't # get it to work, how annoying # FIXME at some point # # need an expanded VImage.h ... SWIG's preprocessor b0rks on includes inside # class definitions vimagemodule.cxx: VImage.i cpp -DSWIG -E $(top_srcdir)/libvipsCC/include/vips/VImage.h > VImage.h swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $< vdisplaymodule.cxx: VDisplay.i swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $< verrormodule.cxx: VError.i swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $< vmaskmodule.cxx: VMask.i swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/swig/vipsCC/Makefile.am0000644000175000017500000000444012303140253013707 00000000000000# Let make substitute the value of PYTHON_INCLUDES rather than auto* # this makes it easier to support multiple python installs AM_CPPFLAGS = \ -I${top_srcdir}/libvips/include \ -I${top_srcdir}/libvipsCC/include \ @VIPS_CFLAGS@ \ @VIPS_INCLUDES@ \ $(PYTHON_INCLUDES) # we install to a directory inside the python area, since we are a module vipsccdir = $(pyexecdir)/vipsCC vipscc_PYTHON = VImage.py VDisplay.py VError.py VMask.py __init__.py # I tried making a suffix rule for this (and defining SUFFIXES) but I couldn't # get it to work, how annoying # FIXME at some point # # need an expanded VImage.h ... SWIG's preprocessor b0rks on includes inside # class definitions vimagemodule.cxx: VImage.i cpp -DSWIG -E $(top_srcdir)/libvipsCC/include/vips/VImage.h > VImage.h swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $< vdisplaymodule.cxx: VDisplay.i swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $< verrormodule.cxx: VError.i swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $< vmaskmodule.cxx: VMask.i swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/libvipsCC/include -o $@ $< vipscc_LTLIBRARIES = vimagemodule.la vdisplaymodule.la verrormodule.la vmaskmodule.la # maybe there's a clever way to avoid repeating the link stuff 4 times # vimagemodule uses the C API as well, so it needs libvips too vimagemodule_la_LDFLAGS = -module -avoid-version vimagemodule_la_LIBADD = ../../libvipsCC/libvipsCC.la ../../libvips/libvips.la $(VIPS_LIBS) nodist_vimagemodule_la_SOURCES = vimagemodule.cxx vdisplaymodule_la_LDFLAGS = -module -avoid-version vdisplaymodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS) nodist_vdisplaymodule_la_SOURCES = vdisplaymodule.cxx verrormodule_la_LDFLAGS = -module -avoid-version verrormodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS) nodist_verrormodule_la_SOURCES = verrormodule.cxx vmaskmodule_la_LDFLAGS = -module -avoid-version vmaskmodule_la_LIBADD = ../../libvipsCC/libvipsCC.la $(VIPS_LIBS) nodist_vmaskmodule_la_SOURCES = vmaskmodule.cxx CLEANFILES = VImage.h EXTRA_DIST = \ VImage.i VDisplay.i VError.i VMask.i __init__.py \ vimagemodule.cxx \ verrormodule.cxx vdisplaymodule.cxx vmaskmodule.cxx \ VImage.py VDisplay.py VError.py VMask.py vips-7.38.5/swig/vipsCC/vmaskmodule.cxx0000644000175000017500000066761312303145403014751 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb) { int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) #define PyString_Check(name) PyBytes_Check(name) #define PyString_FromString(x) PyUnicode_FromString(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #define PyString_AsString(str) PyBytes_AsString(str) #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN typedef inquiry lenfunc; typedef intargfunc ssizeargfunc; typedef intintargfunc ssizessizeargfunc; typedef intobjargproc ssizeobjargproc; typedef intintobjargproc ssizessizeobjargproc; typedef getreadbufferproc readbufferproc; typedef getwritebufferproc writebufferproc; typedef getsegcountproc segcountproc; typedef getcharbufferproc charbufferproc; static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) { long result = 0; PyObject *i = PyNumber_Int(x); if (i) { result = PyInt_AsLong(i); Py_DECREF(i); } return result; } #endif #if PY_VERSION_HEX < 0x02050000 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x) #endif #if PY_VERSION_HEX < 0x02040000 #define Py_VISIT(op) \ do { \ if (op) { \ int vret = visit((op), arg); \ if (vret) \ return vret; \ } \ } while (0) #endif #if PY_VERSION_HEX < 0x02030000 typedef struct { PyTypeObject type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; PyBufferProcs as_buffer; PyObject *name, *slots; } PyHeapTypeObject; #endif #if PY_VERSION_HEX < 0x02030000 typedef destructor freefunc; #endif #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION > 3)) # define SWIGPY_USE_CAPSULE # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) #endif #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ #if PY_VERSION_HEX >= 0x03000000 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { return PyInstanceMethod_New(func); } #else SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) { return NULL; } #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #ifdef SWIGPYTHON_BUILTIN #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) #else #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #endif #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ #if defined(SWIGPYTHON_BUILTIN) SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } #else SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); } #endif /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { register int i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; } return 2; } PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) #ifdef __cplusplus extern "C" { #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; PyTypeObject *pytype; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; data->pytype = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; #ifdef SWIGPYTHON_BUILTIN PyObject *dict; #endif } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { # ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); # else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); # endif # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); return res; } SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); #ifdef SWIGPYTHON_BUILTIN static swig_type_info *SwigPyObject_stype = 0; SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { SwigPyClientData *cd; assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; assert(cd); assert(cd->pytype); return cd->pytype; } #else SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); return type; } #endif SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { #ifdef SWIGPYTHON_BUILTIN PyTypeObject *target_tp = SwigPyObject_type(); if (PyType_IsSubtype(op->ob_type, target_tp)) return 1; return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); #else return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); #endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #elif (PY_VERSION_HEX < 0x02050000) if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #else if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpyobject_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpyobject_type) < 0) return NULL; #endif } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == SwigPyPacked_TypeOnce()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpypacked_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpypacked_type) < 0) return NULL; #endif } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } static PyObject *swig_this = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { if (swig_this == NULL) swig_this = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { PyObject *obj; if (SwigPyObject_Check(pyobj)) return (SwigPyObject *) pyobj; #ifdef SWIGPYTHON_BUILTIN (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { pyobj = PyWeakref_GET_OBJECT(pyobj); if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } # endif return NULL; #else obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; #endif } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { int res; SwigPyObject *sobj; if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } res = SWIG_ERROR; sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } res = SWIG_OK; } else { if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } } return res; } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); if (inst) { PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst = 0; PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { SwigPyClientData *clientdata; PyObject * robj; int own; if (!ptr) return SWIG_Py_Void(); clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; if (clientdata && clientdata->pytype) { SwigPyObject *newobj; if (flags & SWIG_BUILTIN_TP_INIT) { newobj = (SwigPyObject*) self; if (newobj->ptr) { PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); while (newobj->next) newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; newobj = (SwigPyObject *)next_self; } } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); } if (newobj) { newobj->ptr = ptr; newobj->ty = type; newobj->own = own; newobj->next = 0; #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif return (PyObject*) newobj; } return SWIG_Py_Void(); } assert(!(flags & SWIG_BUILTIN_TP_INIT)); robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); Py_DECREF(robj); robj = inst; } return robj; } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else # ifdef SWIGPY_USE_CAPSULE type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); # else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); # endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void #ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) #else SWIG_Python_DestroyModule(void *vptr) #endif { #ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); #else swig_module_info *swig_module = (swig_module_info *) vptr; #endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); swig_this = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif #ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #else PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #endif } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { #ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); #else descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); #endif } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { #ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); #else obj = PyCObject_FromVoidPtr(descriptor, NULL); #endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : ""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef SWIGPYTHON_BUILTIN SWIGRUNTIME int SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyTypeObject *tp = obj->ob_type; PyObject *descr; PyObject *encoded_name; descrsetfunc f; int res; # ifdef Py_USING_UNICODE if (PyString_Check(name)) { name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); if (!name) return -1; } else if (!PyUnicode_Check(name)) # else if (!PyString_Check(name)) # endif { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { Py_INCREF(name); } if (!tp->tp_dict) { if (PyType_Ready(tp) < 0) goto done; } res = -1; descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL) f = descr->ob_type->tp_descr_set; if (!f) { if (PyString_Check(name)) { encoded_name = name; Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: Py_DECREF(name); return res; } #endif #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p__private_detail__MASKUNION swig_types[0] #define SWIGTYPE_p__private_detail__VPMask__VMaskType swig_types[1] #define SWIGTYPE_p_allocator_type swig_types[2] #define SWIGTYPE_p_char swig_types[3] #define SWIGTYPE_p_difference_type swig_types[4] #define SWIGTYPE_p_double swig_types[5] #define SWIGTYPE_p_im__DOUBLEMASK swig_types[6] #define SWIGTYPE_p_im__INTMASK swig_types[7] #define SWIGTYPE_p_int swig_types[8] #define SWIGTYPE_p_matrix swig_types[9] #define SWIGTYPE_p_size_type swig_types[10] #define SWIGTYPE_p_std__ostream swig_types[11] #define SWIGTYPE_p_value_type swig_types[12] #define SWIGTYPE_p_vips__VDMask swig_types[13] #define SWIGTYPE_p_vips__VError swig_types[14] #define SWIGTYPE_p_vips__VIMask swig_types[15] #define SWIGTYPE_p_vips__VMask swig_types[16] static swig_type_info *swig_types[18]; static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif /*----------------------------------------------- @(target):= vmaskmodule.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit_vmaskmodule #else # define SWIG_init initvmaskmodule #endif #define SWIG_name "vmaskmodule" #define SWIGVERSION 0x020010 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include namespace swig { class SwigPtr_PyObject { protected: PyObject *_obj; public: SwigPtr_PyObject() :_obj(0) { } SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { Py_XINCREF(_obj); } SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { Py_XINCREF(_obj); } } SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { Py_XINCREF(item._obj); Py_XDECREF(_obj); _obj = item._obj; return *this; } ~SwigPtr_PyObject() { Py_XDECREF(_obj); } operator PyObject *() const { return _obj; } PyObject *operator->() const { return _obj; } }; } namespace swig { struct SwigVar_PyObject : SwigPtr_PyObject { SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; return *this; } }; } #include #include #include namespace swig { struct stop_iteration { }; struct SwigPyIterator { private: SwigPtr_PyObject _seq; protected: SwigPyIterator(PyObject *seq) : _seq(seq) { } public: virtual ~SwigPyIterator() {} // Access iterator method, required by Python virtual PyObject *value() const = 0; // Forward iterator method, required by Python virtual SwigPyIterator *incr(size_t n = 1) = 0; // Backward iterator method, very common in C++, but not required in Python virtual SwigPyIterator *decr(size_t /*n*/ = 1) { throw stop_iteration(); } // Random access iterator methods, but not required in Python virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } virtual bool equal (const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } // C++ common/needed methods virtual SwigPyIterator *copy() const = 0; PyObject *next() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads PyObject *obj = value(); incr(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } /* Make an alias for Python 3.x */ PyObject *__next__() { return next(); } PyObject *previous() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads decr(); PyObject *obj = value(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } SwigPyIterator *advance(ptrdiff_t n) { return (n > 0) ? incr(n) : decr(-n); } bool operator == (const SwigPyIterator& x) const { return equal(x); } bool operator != (const SwigPyIterator& x) const { return ! operator==(x); } SwigPyIterator& operator += (ptrdiff_t n) { return *advance(n); } SwigPyIterator& operator -= (ptrdiff_t n) { return *advance(-n); } SwigPyIterator* operator + (ptrdiff_t n) const { return copy()->advance(n); } SwigPyIterator* operator - (ptrdiff_t n) const { return copy()->advance(-n); } ptrdiff_t operator - (const SwigPyIterator& x) const { return x.distance(*this); } static swig_type_info* descriptor() { static int init = 0; static swig_type_info* desc = 0; if (!init) { desc = SWIG_TypeQuery("swig::SwigPyIterator *"); init = 1; } return desc; } }; #if defined(SWIGPYTHON_BUILTIN) inline PyObject* make_output_iterator_builtin (PyObject *pyself) { Py_INCREF(pyself); return pyself; } #endif } namespace swig { template struct noconst_traits { typedef Type noconst_type; }; template struct noconst_traits { typedef Type noconst_type; }; /* type categories */ struct pointer_category { }; struct value_category { }; /* General traits that provides type_name and type_info */ template struct traits { }; template inline const char* type_name() { return traits::noconst_type >::type_name(); } template struct traits_info { static swig_type_info *type_query(std::string name) { name += " *"; return SWIG_TypeQuery(name.c_str()); } static swig_type_info *type_info() { static swig_type_info *info = type_query(type_name()); return info; } }; template inline swig_type_info *type_info() { return traits_info::type_info(); } /* Partial specialization for pointers */ template struct traits { typedef pointer_category category; static std::string make_ptr_name(const char* name) { std::string ptrname = name; ptrname += " *"; return ptrname; } static const char* type_name() { static std::string name = make_ptr_name(swig::type_name()); return name.c_str(); } }; template struct traits_as { }; template struct traits_check { }; } namespace swig { /* Traits that provides the from method */ template struct traits_from_ptr { static PyObject *from(Type *val, int owner = 0) { return SWIG_InternalNewPointerObj(val, type_info(), owner); } }; template struct traits_from { static PyObject *from(const Type& val) { return traits_from_ptr::from(new Type(val), 1); } }; template struct traits_from { static PyObject *from(Type* val) { return traits_from_ptr::from(val, 0); } }; template struct traits_from { static PyObject *from(const Type* val) { return traits_from_ptr::from(const_cast(val), 0); } }; template inline PyObject *from(const Type& val) { return traits_from::from(val); } template inline PyObject *from_ptr(Type* val, int owner) { return traits_from_ptr::from(val, owner); } /* Traits that provides the asval/as/check method */ template struct traits_asptr { static int asptr(PyObject *obj, Type **val) { Type *p; int res = SWIG_ConvertPtr(obj, (void**)&p, type_info(), 0); if (SWIG_IsOK(res)) { if (val) *val = p; } return res; } }; template inline int asptr(PyObject *obj, Type **vptr) { return traits_asptr::asptr(obj, vptr); } template struct traits_asval { static int asval(PyObject *obj, Type *val) { if (val) { Type *p = 0; int res = traits_asptr::asptr(obj, &p); if (!SWIG_IsOK(res)) return res; if (p) { typedef typename noconst_traits::noconst_type noconst_type; *(const_cast(val)) = *p; if (SWIG_IsNewObj(res)){ delete p; res = SWIG_DelNewMask(res); } return res; } else { return SWIG_ERROR; } } else { return traits_asptr::asptr(obj, (Type **)(0)); } } }; template struct traits_asval { static int asval(PyObject *obj, Type **val) { if (val) { typedef typename noconst_traits::noconst_type noconst_type; noconst_type *p = 0; int res = traits_asptr::asptr(obj, &p); if (SWIG_IsOK(res)) { *(const_cast(val)) = p; } return res; } else { return traits_asptr::asptr(obj, (Type **)(0)); } } }; template inline int asval(PyObject *obj, Type *val) { return traits_asval::asval(obj, val); } template struct traits_as { static Type as(PyObject *obj, bool throw_error) { Type v; int res = asval(obj, &v); if (!obj || !SWIG_IsOK(res)) { if (!PyErr_Occurred()) { ::SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); } return v; } }; template struct traits_as { static Type as(PyObject *obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res) && v) { if (SWIG_IsNewObj(res)) { Type r(*v); delete v; return r; } else { return *v; } } else { // Uninitialized return value, no Type() constructor required. static Type *v_def = (Type*) malloc(sizeof(Type)); if (!PyErr_Occurred()) { SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); memset(v_def,0,sizeof(Type)); return *v_def; } } }; template struct traits_as { static Type* as(PyObject *obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res)) { return v; } else { if (!PyErr_Occurred()) { SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); return 0; } } }; template inline Type as(PyObject *obj, bool te = false) { return traits_as::category>::as(obj, te); } template struct traits_check { static bool check(PyObject *obj) { int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template struct traits_check { static bool check(PyObject *obj) { int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template inline bool check(PyObject *obj) { return traits_check::category>::check(obj); } } #include namespace std { template <> struct less : public binary_function { bool operator()(PyObject * v, PyObject *w) const { bool res; SWIG_PYTHON_THREAD_BEGIN_BLOCK; res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; /* This may fall into a case of inconsistent eg. ObjA > ObjX > ObjB but ObjA < ObjB */ if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) { /* Objects can't be compared, this mostly occurred in Python 3.0 */ /* Compare their ptr directly for a workaround */ res = (v < w); PyErr_Clear(); } SWIG_PYTHON_THREAD_END_BLOCK; return res; } }; template <> struct less : public binary_function { bool operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const { return std::less()(v, w); } }; template <> struct less : public binary_function { bool operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const { return std::less()(v, w); } }; } namespace swig { template <> struct traits { typedef value_category category; static const char* type_name() { return "PyObject *"; } }; template <> struct traits_asval { typedef PyObject * value_type; static int asval(PyObject *obj, value_type *val) { if (val) *val = obj; return SWIG_OK; } }; template <> struct traits_check { static bool check(PyObject *) { return true; } }; template <> struct traits_from { typedef PyObject * value_type; static PyObject *from(const value_type& val) { Py_XINCREF(val); return val; } }; } namespace swig { template inline size_t check_index(Difference i, size_t size, bool insert = false) { if ( i < 0 ) { if ((size_t) (-i) <= size) return (size_t) (i + size); } else if ( (size_t) i < size ) { return (size_t) i; } else if (insert && ((size_t) i == size)) { return size; } throw std::out_of_range("index out of range"); } template void slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) { if (step == 0) { throw std::invalid_argument("slice step cannot be zero"); } else if (step > 0) { // Required range: 0 <= i < size, 0 <= j < size if (i < 0) { ii = 0; } else if (i < (Difference)size) { ii = i; } else if (insert && (i >= (Difference)size)) { ii = (Difference)size; } if ( j < 0 ) { jj = 0; } else { jj = (j < (Difference)size) ? j : (Difference)size; } } else { // Required range: -1 <= i < size-1, -1 <= j < size-1 if (i < -1) { ii = -1; } else if (i < (Difference) size) { ii = i; } else if (i >= (Difference)(size-1)) { ii = (Difference)(size-1); } if (j < -1) { jj = -1; } else { jj = (j < (Difference)size ) ? j : (Difference)(size-1); } } } template inline typename Sequence::iterator getpos(Sequence* self, Difference i) { typename Sequence::iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template inline typename Sequence::const_iterator cgetpos(const Sequence* self, Difference i) { typename Sequence::const_iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template inline Sequence* getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) { typename Sequence::size_type size = self->size(); Difference ii = 0; Difference jj = 0; swig::slice_adjust(i, j, step, size, ii, jj); if (step > 0) { typename Sequence::const_iterator sb = self->begin(); typename Sequence::const_iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); if (step == 1) { return new Sequence(sb, se); } else { Sequence *sequence = new Sequence(); typename Sequence::const_iterator it = sb; while (it!=se) { sequence->push_back(*it); for (Py_ssize_t c=0; c jj) { typename Sequence::const_reverse_iterator sb = self->rbegin(); typename Sequence::const_reverse_iterator se = self->rbegin(); std::advance(sb,size-ii-1); std::advance(se,size-jj-1); typename Sequence::const_reverse_iterator it = sb; while (it!=se) { sequence->push_back(*it); for (Py_ssize_t c=0; c<-step && it!=se; ++c) it++; } } return sequence; } } template inline void setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) { typename Sequence::size_type size = self->size(); Difference ii = 0; Difference jj = 0; swig::slice_adjust(i, j, step, size, ii, jj, true); if (step > 0) { if (jj < ii) jj = ii; if (step == 1) { size_t ssize = jj - ii; if (ssize <= is.size()) { // expanding/staying the same size typename Sequence::iterator sb = self->begin(); typename InputSeq::const_iterator isit = is.begin(); std::advance(sb,ii); std::advance(isit, jj - ii); self->insert(std::copy(is.begin(), isit, sb), isit, is.end()); } else { // shrinking typename Sequence::iterator sb = self->begin(); typename Sequence::iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); self->erase(sb,se); sb = self->begin(); std::advance(sb,ii); self->insert(sb, is.begin(), is.end()); } } else { size_t replacecount = (jj - ii + step - 1) / step; if (is.size() != replacecount) { char msg[1024]; sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); throw std::invalid_argument(msg); } typename Sequence::const_iterator isit = is.begin(); typename Sequence::iterator it = self->begin(); std::advance(it,ii); for (size_t rc=0; rcend(); ++c) it++; } } } else { if (jj > ii) jj = ii; size_t replacecount = (ii - jj - step - 1) / -step; if (is.size() != replacecount) { char msg[1024]; sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); throw std::invalid_argument(msg); } typename Sequence::const_iterator isit = is.begin(); typename Sequence::reverse_iterator it = self->rbegin(); std::advance(it,size-ii-1); for (size_t rc=0; rcrend(); ++c) it++; } } } template inline void delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) { typename Sequence::size_type size = self->size(); Difference ii = 0; Difference jj = 0; swig::slice_adjust(i, j, step, size, ii, jj, true); if (step > 0) { if (jj > ii) { typename Sequence::iterator sb = self->begin(); std::advance(sb,ii); if (step == 1) { typename Sequence::iterator se = self->begin(); std::advance(se,jj); self->erase(sb,se); } else { typename Sequence::iterator it = sb; size_t delcount = (jj - ii + step - 1) / step; while (delcount) { it = self->erase(it); for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) it++; delcount--; } } } } else { if (ii > jj) { typename Sequence::reverse_iterator sb = self->rbegin(); std::advance(sb,size-ii-1); typename Sequence::reverse_iterator it = sb; size_t delcount = (ii - jj - step - 1) / -step; while (delcount) { it = typename Sequence::reverse_iterator(self->erase((++it).base())); for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) it++; delcount--; } } } } } #if defined(__SUNPRO_CC) && defined(_RWSTD_VER) # if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) # define SWIG_STD_NOITERATOR_TRAITS_STL # endif #endif #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) #include #else namespace std { template struct iterator_traits { typedef ptrdiff_t difference_type; typedef typename Iterator::value_type value_type; }; template struct iterator_traits<__reverse_bi_iterator > { typedef Distance difference_type; typedef T value_type; }; template struct iterator_traits { typedef T value_type; typedef ptrdiff_t difference_type; }; template inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } } #endif namespace swig { template class SwigPyIterator_T : public SwigPyIterator { public: typedef OutIterator out_iterator; typedef typename std::iterator_traits::value_type value_type; typedef SwigPyIterator_T self_type; SwigPyIterator_T(out_iterator curr, PyObject *seq) : SwigPyIterator(seq), current(curr) { } const out_iterator& get_current() const { return current; } bool equal (const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return (current == iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } ptrdiff_t distance(const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return std::distance(current, iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } protected: out_iterator current; }; template struct from_oper { typedef const ValueType& argument_type; typedef PyObject *result_type; result_type operator()(argument_type v) const { return swig::from(v); } }; template::value_type, typename FromOper = from_oper > class SwigPyIteratorOpen_T : public SwigPyIterator_T { public: FromOper from; typedef OutIterator out_iterator; typedef ValueType value_type; typedef SwigPyIterator_T base; typedef SwigPyIteratorOpen_T self_type; SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq) : SwigPyIterator_T(curr, seq) { } PyObject *value() const { return from(static_cast(*(base::current))); } SwigPyIterator *copy() const { return new self_type(*this); } SwigPyIterator *incr(size_t n = 1) { while (n--) { ++base::current; } return this; } SwigPyIterator *decr(size_t n = 1) { while (n--) { --base::current; } return this; } }; template::value_type, typename FromOper = from_oper > class SwigPyIteratorClosed_T : public SwigPyIterator_T { public: FromOper from; typedef OutIterator out_iterator; typedef ValueType value_type; typedef SwigPyIterator_T base; typedef SwigPyIteratorClosed_T self_type; SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) : SwigPyIterator_T(curr, seq), begin(first), end(last) { } PyObject *value() const { if (base::current == end) { throw stop_iteration(); } else { return from(static_cast(*(base::current))); } } SwigPyIterator *copy() const { return new self_type(*this); } SwigPyIterator *incr(size_t n = 1) { while (n--) { if (base::current == end) { throw stop_iteration(); } else { ++base::current; } } return this; } SwigPyIterator *decr(size_t n = 1) { while (n--) { if (base::current == begin) { throw stop_iteration(); } else { --base::current; } } return this; } private: out_iterator begin; out_iterator end; }; template inline SwigPyIterator* make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) { return new SwigPyIteratorClosed_T(current, begin, end, seq); } template inline SwigPyIterator* make_output_iterator(const OutIter& current, PyObject *seq = 0) { return new SwigPyIteratorOpen_T(current, seq); } } namespace swig { template struct SwigPySequence_Ref { SwigPySequence_Ref(PyObject* seq, int index) : _seq(seq), _index(index) { } operator T () const { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index); try { return swig::as(item, true); } catch (std::exception& e) { char msg[1024]; sprintf(msg, "in sequence element %d ", _index); if (!PyErr_Occurred()) { ::SWIG_Error(SWIG_TypeError, swig::type_name()); } SWIG_Python_AddErrorMsg(msg); SWIG_Python_AddErrorMsg(e.what()); throw; } } SwigPySequence_Ref& operator=(const T& v) { PySequence_SetItem(_seq, _index, swig::from(v)); return *this; } private: PyObject* _seq; int _index; }; template struct SwigPySequence_ArrowProxy { SwigPySequence_ArrowProxy(const T& x): m_value(x) {} const T* operator->() const { return &m_value; } operator const T*() const { return &m_value; } T m_value; }; template struct SwigPySequence_InputIterator { typedef SwigPySequence_InputIterator self; typedef std::random_access_iterator_tag iterator_category; typedef Reference reference; typedef T value_type; typedef T* pointer; typedef int difference_type; SwigPySequence_InputIterator() { } SwigPySequence_InputIterator(PyObject* seq, int index) : _seq(seq), _index(index) { } reference operator*() const { return reference(_seq, _index); } SwigPySequence_ArrowProxy operator->() const { return SwigPySequence_ArrowProxy(operator*()); } bool operator==(const self& ri) const { return (_index == ri._index) && (_seq == ri._seq); } bool operator!=(const self& ri) const { return !(operator==(ri)); } self& operator ++ () { ++_index; return *this; } self& operator -- () { --_index; return *this; } self& operator += (difference_type n) { _index += n; return *this; } self operator +(difference_type n) const { return self(_seq, _index + n); } self& operator -= (difference_type n) { _index -= n; return *this; } self operator -(difference_type n) const { return self(_seq, _index - n); } difference_type operator - (const self& ri) const { return _index - ri._index; } bool operator < (const self& ri) const { return _index < ri._index; } reference operator[](difference_type n) const { return reference(_seq, _index + n); } private: PyObject* _seq; difference_type _index; }; template struct SwigPySequence_Cont { typedef SwigPySequence_Ref reference; typedef const SwigPySequence_Ref const_reference; typedef T value_type; typedef T* pointer; typedef int difference_type; typedef int size_type; typedef const pointer const_pointer; typedef SwigPySequence_InputIterator iterator; typedef SwigPySequence_InputIterator const_iterator; SwigPySequence_Cont(PyObject* seq) : _seq(0) { if (!PySequence_Check(seq)) { throw std::invalid_argument("a sequence is expected"); } _seq = seq; Py_INCREF(_seq); } ~SwigPySequence_Cont() { Py_XDECREF(_seq); } size_type size() const { return static_cast(PySequence_Size(_seq)); } bool empty() const { return size() == 0; } iterator begin() { return iterator(_seq, 0); } const_iterator begin() const { return const_iterator(_seq, 0); } iterator end() { return iterator(_seq, size()); } const_iterator end() const { return const_iterator(_seq, size()); } reference operator[](difference_type n) { return reference(_seq, n); } const_reference operator[](difference_type n) const { return const_reference(_seq, n); } bool check(bool set_err = true) const { int s = size(); for (int i = 0; i < s; ++i) { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i); if (!swig::check(item)) { if (set_err) { char msg[1024]; sprintf(msg, "in sequence element %d", i); SWIG_Error(SWIG_RuntimeError, msg); } return false; } } return true; } private: PyObject* _seq; }; } SWIGINTERNINLINE PyObject* SWIG_From_int (int value) { return PyInt_FromLong((long) value); } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromStringAndSize(carray, static_cast< int >(size)); #else return PyString_FromStringAndSize(carray, static_cast< int >(size)); #endif } } else { return SWIG_Py_Void(); } } SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int (PyObject * obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< int >(v); } } return res; } namespace swig { template <> struct traits { typedef value_category category; static const char* type_name() { return"int"; } }; template <> struct traits_asval { typedef int value_type; static int asval(PyObject *obj, value_type *val) { return SWIG_AsVal_int (obj, val); } }; template <> struct traits_from { typedef int value_type; static PyObject *from(const value_type& val) { return SWIG_From_int (val); } }; } namespace swig { template inline void assign(const SwigPySeq& swigpyseq, Seq* seq) { // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented typedef typename SwigPySeq::value_type value_type; typename SwigPySeq::const_iterator it = swigpyseq.begin(); for (;it != swigpyseq.end(); ++it) { seq->insert(seq->end(),(value_type)(*it)); } } template struct traits_asptr_stdseq { typedef Seq sequence; typedef T value_type; static int asptr(PyObject *obj, sequence **seq) { if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { sequence *p; if (::SWIG_ConvertPtr(obj,(void**)&p, swig::type_info(),0) == SWIG_OK) { if (seq) *seq = p; return SWIG_OLDOBJ; } } else if (PySequence_Check(obj)) { try { SwigPySequence_Cont swigpyseq(obj); if (seq) { sequence *pseq = new sequence(); assign(swigpyseq, pseq); *seq = pseq; return SWIG_NEWOBJ; } else { return swigpyseq.check() ? SWIG_OK : SWIG_ERROR; } } catch (std::exception& e) { if (seq) { if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, e.what()); } } return SWIG_ERROR; } } return SWIG_ERROR; } }; template struct traits_from_stdseq { typedef Seq sequence; typedef T value_type; typedef typename Seq::size_type size_type; typedef typename sequence::const_iterator const_iterator; static PyObject *from(const sequence& seq) { #ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS swig_type_info *desc = swig::type_info(); if (desc && desc->clientdata) { return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); } #endif size_type size = seq.size(); if (size <= (size_type)INT_MAX) { PyObject *obj = PyTuple_New((int)size); int i = 0; for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) { PyTuple_SetItem(obj,i,swig::from(*it)); } return obj; } else { PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); return NULL; } } }; } namespace swig { template struct traits_asptr > { static int asptr(PyObject *obj, std::vector **vec) { return traits_asptr_stdseq >::asptr(obj, vec); } }; template struct traits_from > { static PyObject *from(const std::vector& vec) { return traits_from_stdseq >::from(vec); } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "int" "," "std::allocator< int >" " >"; } }; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } #define SWIG_From_double PyFloat_FromDouble namespace swig { template <> struct traits { typedef value_category category; static const char* type_name() { return"double"; } }; template <> struct traits_asval { typedef double value_type; static int asval(PyObject *obj, value_type *val) { return SWIG_AsVal_double (obj, val); } }; template <> struct traits_from { typedef double value_type; static PyObject *from(const value_type& val) { return SWIG_From_double (val); } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "double" "," "std::allocator< double >" " >"; } }; } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_new_VMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_VMask")) SWIG_fail; result = (vips::VMask *)new vips::VMask(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VMask",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_vips__VMask, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VMask" "', argument " "1"" of type '" "vips::VMask const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VMask" "', argument " "1"" of type '" "vips::VMask const &""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); result = (vips::VMask *)new vips::VMask((vips::VMask const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VMask(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 1) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_VMask__SWIG_0(self, args); } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_vips__VMask, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VMask__SWIG_1(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VMask'.\n" " Possible C/C++ prototypes are:\n" " vips::VMask::VMask()\n" " vips::VMask::VMask(vips::VMask const &)\n"); return 0; } SWIGINTERN PyObject *_wrap_VMask___assign__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; vips::VMask *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VMask___assign__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask___assign__" "', argument " "1"" of type '" "vips::VMask *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VMask___assign__" "', argument " "2"" of type '" "vips::VMask const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VMask___assign__" "', argument " "2"" of type '" "vips::VMask const &""'"); } arg2 = reinterpret_cast< vips::VMask * >(argp2); result = (vips::VMask *) &(arg1)->operator =((vips::VMask const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VMask, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_VMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_VMask",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VMask" "', argument " "1"" of type '" "vips::VMask *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VMask_xsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VMask_xsize",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_xsize" "', argument " "1"" of type '" "vips::VMask const *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); try { result = (int)((vips::VMask const *)arg1)->xsize(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VMask_ysize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VMask_ysize",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_ysize" "', argument " "1"" of type '" "vips::VMask const *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); try { result = (int)((vips::VMask const *)arg1)->ysize(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VMask_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VMask_size",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_size" "', argument " "1"" of type '" "vips::VMask const *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); try { result = (int)((vips::VMask const *)arg1)->size(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VMask_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:VMask_filename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_filename" "', argument " "1"" of type '" "vips::VMask const *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); try { result = (char *)((vips::VMask const *)arg1)->filename(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VMask_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; _private_detail::VPMask::VMaskType result; if (!PyArg_ParseTuple(args,(char *)"O:VMask_type",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_type" "', argument " "1"" of type '" "vips::VMask const *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); result = ((vips::VMask const *)arg1)->type(); resultobj = SWIG_NewPointerObj((new _private_detail::VPMask::VMaskType(static_cast< const _private_detail::VPMask::VMaskType& >(result))), SWIGTYPE_p__private_detail__VPMask__VMaskType, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VMask_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; _private_detail::MASKUNION result; if (!PyArg_ParseTuple(args,(char *)"O:VMask_mask",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_mask" "', argument " "1"" of type '" "vips::VMask const *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); result = ((vips::VMask const *)arg1)->mask(); resultobj = SWIG_NewPointerObj((new _private_detail::MASKUNION(static_cast< const _private_detail::MASKUNION& >(result))), SWIGTYPE_p__private_detail__MASKUNION, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VMask_ostream_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VMask *arg1 = (vips::VMask *) 0 ; std::ostream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VMask_ostream_print",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VMask_ostream_print" "', argument " "1"" of type '" "vips::VMask const *""'"); } arg1 = reinterpret_cast< vips::VMask * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VMask_ostream_print" "', argument " "2"" of type '" "std::ostream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VMask_ostream_print" "', argument " "2"" of type '" "std::ostream &""'"); } arg2 = reinterpret_cast< std::ostream * >(argp2); ((vips::VMask const *)arg1)->ostream_print(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *VMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_vips__VMask, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap___lshift____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::ostream *arg1 = 0 ; vips::VMask *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; std::ostream *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:__lshift__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ostream, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'"); } arg1 = reinterpret_cast< std::ostream * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VMask const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "2"" of type '" "vips::VMask const &""'"); } arg2 = reinterpret_cast< vips::VMask * >(argp2); result = (std::ostream *) &vips::operator <<(*arg1,(vips::VMask const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap___lshift__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__ostream, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_vips__VMask, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap___lshift____SWIG_1(self, args); } } } fail: Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VIMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_VIMask",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VIMask" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VIMask" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); result = (vips::VIMask *)new vips::VIMask(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int arg3 ; int arg4 ; std::vector< int,std::allocator< int > > arg5 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VIMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VIMask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VIMask" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VIMask" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VIMask" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VIMask" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj4, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VIMask" "', argument " "5"" of type '" "std::vector< int,std::allocator< int > >""'"); } arg5 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (vips::VIMask *)new vips::VIMask(arg1,arg2,arg3,arg4,arg5); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VIMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VIMask",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VIMask" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); result = (vips::VIMask *)new vips::VIMask((char const *)arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_VIMask__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_VIMask")) SWIG_fail; result = (vips::VIMask *)new vips::VIMask(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VIMask(PyObject *self, PyObject *args) { int argc; PyObject *argv[6]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 5) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_VIMask__SWIG_3(self, args); } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VIMask__SWIG_2(self, args); } } if (argc == 2) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_VIMask__SWIG_0(self, args); } } } if (argc == 5) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = swig::asptr(argv[4], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VIMask__SWIG_1(self, args); } } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VIMask'.\n" " Possible C/C++ prototypes are:\n" " vips::VIMask::VIMask(int,int)\n" " vips::VIMask::VIMask(int,int,int,int,std::vector< int,std::allocator< int > >)\n" " vips::VIMask::VIMask(char const *)\n" " vips::VIMask::VIMask()\n"); return 0; } SWIGINTERN PyObject *_wrap_VIMask_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VIMask_scale",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_scale" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); result = (int)(arg1)->scale(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:VIMask_offset",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_offset" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); result = (int)(arg1)->offset(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; im__INTMASK *arg2 = (im__INTMASK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_embed",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_embed" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_im__INTMASK, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_embed" "', argument " "2"" of type '" "im__INTMASK *""'"); } arg2 = reinterpret_cast< im__INTMASK * >(argp2); try { (arg1)->embed(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask___index__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VIMask___index__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask___index__" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask___index__" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (int *) &(arg1)->operator [](arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:VIMask___call__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask___call__" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask___call__" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VIMask___call__" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (int *) &(arg1)->operator ()(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_get",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_get" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_get" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (int)(arg1)->get(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_gauss(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VIMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_gauss",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_gauss" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_gauss" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = vips::VIMask::gauss(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_gauss_sep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VIMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_gauss_sep",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_gauss_sep" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_gauss_sep" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = vips::VIMask::gauss_sep(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VIMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_log",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VIMask_log" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VIMask_log" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = vips::VIMask::log(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_rotate45(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VIMask result; if (!PyArg_ParseTuple(args,(char *)"O:VIMask_rotate45",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_rotate45" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); try { result = (arg1)->rotate45(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_rotate90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VIMask result; if (!PyArg_ParseTuple(args,(char *)"O:VIMask_rotate90",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_rotate90" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); try { result = (arg1)->rotate90(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_trn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"O:VIMask_trn",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_trn" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); try { result = (arg1)->trn(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"O:VIMask_inv",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_inv" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); try { result = (arg1)->inv(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_cat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_cat",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_cat" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_cat" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VIMask_cat" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->cat(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VIMask_mul(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VIMask_mul",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VIMask_mul" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VIMask_mul" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VIMask_mul" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->mul(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_VIMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VIMask *arg1 = (vips::VIMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_VIMask",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VIMask, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VIMask" "', argument " "1"" of type '" "vips::VIMask *""'"); } arg1 = reinterpret_cast< vips::VIMask * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *VIMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_vips__VIMask, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VDMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_VDMask",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VDMask" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VDMask" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); result = (vips::VDMask *)new vips::VDMask(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; double arg3 ; double arg4 ; std::vector< double,std::allocator< double > > arg5 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; vips::VDMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_VDMask",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VDMask" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VDMask" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_VDMask" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VDMask" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj4, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_VDMask" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg5 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (vips::VDMask *)new vips::VDMask(arg1,arg2,arg3,arg4,arg5); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_VDMask",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VDMask" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); result = (vips::VDMask *)new vips::VDMask((char const *)arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_VDMask__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_VDMask")) SWIG_fail; result = (vips::VDMask *)new vips::VDMask(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_VDMask(PyObject *self, PyObject *args) { int argc; PyObject *argv[6]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 5) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_VDMask__SWIG_3(self, args); } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VDMask__SWIG_2(self, args); } } if (argc == 2) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_VDMask__SWIG_0(self, args); } } } if (argc == 5) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = swig::asptr(argv[4], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_VDMask__SWIG_1(self, args); } } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VDMask'.\n" " Possible C/C++ prototypes are:\n" " vips::VDMask::VDMask(int,int)\n" " vips::VDMask::VDMask(int,int,double,double,std::vector< double,std::allocator< double > >)\n" " vips::VDMask::VDMask(char const *)\n" " vips::VDMask::VDMask()\n"); return 0; } SWIGINTERN PyObject *_wrap_VDMask_embed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; im__DOUBLEMASK *arg2 = (im__DOUBLEMASK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_embed",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_embed" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_im__DOUBLEMASK, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_embed" "', argument " "2"" of type '" "im__DOUBLEMASK *""'"); } arg2 = reinterpret_cast< im__DOUBLEMASK * >(argp2); try { (arg1)->embed(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:VDMask_scale",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_scale" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); try { result = (double)(arg1)->scale(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:VDMask_offset",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_offset" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); try { result = (double)(arg1)->offset(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask___index__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; double *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:VDMask___index__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask___index__" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask___index__" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (double *) &(arg1)->operator [](arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; double *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:VDMask___call__",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask___call__" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask___call__" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VDMask___call__" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (double *) &(arg1)->operator ()(arg2,arg3); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_get",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_get" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_get" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (double)(arg1)->get(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_gauss(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_gauss",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VDMask_gauss" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_gauss" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = vips::VDMask::gauss(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_log",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "VDMask_log" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VDMask_log" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); try { result = vips::VDMask::log(arg1,arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_rotate45(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"O:VDMask_rotate45",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_rotate45" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); try { result = (arg1)->rotate45(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_rotate90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"O:VDMask_rotate90",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_rotate90" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); try { result = (arg1)->rotate90(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_scalei(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VIMask result; if (!PyArg_ParseTuple(args,(char *)"O:VDMask_scalei",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_scalei" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); try { result = (arg1)->scalei(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VIMask(static_cast< const vips::VIMask& >(result))), SWIGTYPE_p_vips__VIMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_trn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"O:VDMask_trn",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_trn" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); try { result = (arg1)->trn(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"O:VDMask_inv",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_inv" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); try { result = (arg1)->inv(); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_cat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_cat",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_cat" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_cat" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDMask_cat" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->cat(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_VDMask_mul(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; vips::VDMask arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; vips::VDMask result; if (!PyArg_ParseTuple(args,(char *)"OO:VDMask_mul",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VDMask_mul" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_vips__VDMask, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VDMask_mul" "', argument " "2"" of type '" "vips::VDMask""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VDMask_mul" "', argument " "2"" of type '" "vips::VDMask""'"); } else { vips::VDMask * temp = reinterpret_cast< vips::VDMask * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (arg1)->mul(arg2); } catch(vips::VError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new vips::VError(static_cast< const vips::VError& >(_e))),SWIGTYPE_p_vips__VError,SWIG_POINTER_OWN), "vips::VError", SWIGTYPE_p_vips__VError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new vips::VDMask(static_cast< const vips::VDMask& >(result))), SWIGTYPE_p_vips__VDMask, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_VDMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; vips::VDMask *arg1 = (vips::VDMask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_VDMask",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vips__VDMask, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VDMask" "', argument " "1"" of type '" "vips::VDMask *""'"); } arg1 = reinterpret_cast< vips::VDMask * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *VDMask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_vips__VDMask, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"new_VMask", _wrap_new_VMask, METH_VARARGS, NULL}, { (char *)"VMask___assign__", _wrap_VMask___assign__, METH_VARARGS, NULL}, { (char *)"delete_VMask", _wrap_delete_VMask, METH_VARARGS, NULL}, { (char *)"VMask_xsize", _wrap_VMask_xsize, METH_VARARGS, NULL}, { (char *)"VMask_ysize", _wrap_VMask_ysize, METH_VARARGS, NULL}, { (char *)"VMask_size", _wrap_VMask_size, METH_VARARGS, NULL}, { (char *)"VMask_filename", _wrap_VMask_filename, METH_VARARGS, NULL}, { (char *)"VMask_type", _wrap_VMask_type, METH_VARARGS, NULL}, { (char *)"VMask_mask", _wrap_VMask_mask, METH_VARARGS, NULL}, { (char *)"VMask_ostream_print", _wrap_VMask_ostream_print, METH_VARARGS, NULL}, { (char *)"VMask_swigregister", VMask_swigregister, METH_VARARGS, NULL}, { (char *)"__lshift__", _wrap___lshift__, METH_VARARGS, NULL}, { (char *)"new_VIMask", _wrap_new_VIMask, METH_VARARGS, NULL}, { (char *)"VIMask_scale", _wrap_VIMask_scale, METH_VARARGS, NULL}, { (char *)"VIMask_offset", _wrap_VIMask_offset, METH_VARARGS, NULL}, { (char *)"VIMask_embed", _wrap_VIMask_embed, METH_VARARGS, NULL}, { (char *)"VIMask___index__", _wrap_VIMask___index__, METH_VARARGS, NULL}, { (char *)"VIMask___call__", _wrap_VIMask___call__, METH_VARARGS, NULL}, { (char *)"VIMask_get", _wrap_VIMask_get, METH_VARARGS, NULL}, { (char *)"VIMask_gauss", _wrap_VIMask_gauss, METH_VARARGS, NULL}, { (char *)"VIMask_gauss_sep", _wrap_VIMask_gauss_sep, METH_VARARGS, NULL}, { (char *)"VIMask_log", _wrap_VIMask_log, METH_VARARGS, NULL}, { (char *)"VIMask_rotate45", _wrap_VIMask_rotate45, METH_VARARGS, NULL}, { (char *)"VIMask_rotate90", _wrap_VIMask_rotate90, METH_VARARGS, NULL}, { (char *)"VIMask_trn", _wrap_VIMask_trn, METH_VARARGS, NULL}, { (char *)"VIMask_inv", _wrap_VIMask_inv, METH_VARARGS, NULL}, { (char *)"VIMask_cat", _wrap_VIMask_cat, METH_VARARGS, NULL}, { (char *)"VIMask_mul", _wrap_VIMask_mul, METH_VARARGS, NULL}, { (char *)"delete_VIMask", _wrap_delete_VIMask, METH_VARARGS, NULL}, { (char *)"VIMask_swigregister", VIMask_swigregister, METH_VARARGS, NULL}, { (char *)"new_VDMask", _wrap_new_VDMask, METH_VARARGS, NULL}, { (char *)"VDMask_embed", _wrap_VDMask_embed, METH_VARARGS, NULL}, { (char *)"VDMask_scale", _wrap_VDMask_scale, METH_VARARGS, NULL}, { (char *)"VDMask_offset", _wrap_VDMask_offset, METH_VARARGS, NULL}, { (char *)"VDMask___index__", _wrap_VDMask___index__, METH_VARARGS, NULL}, { (char *)"VDMask___call__", _wrap_VDMask___call__, METH_VARARGS, NULL}, { (char *)"VDMask_get", _wrap_VDMask_get, METH_VARARGS, NULL}, { (char *)"VDMask_gauss", _wrap_VDMask_gauss, METH_VARARGS, NULL}, { (char *)"VDMask_log", _wrap_VDMask_log, METH_VARARGS, NULL}, { (char *)"VDMask_rotate45", _wrap_VDMask_rotate45, METH_VARARGS, NULL}, { (char *)"VDMask_rotate90", _wrap_VDMask_rotate90, METH_VARARGS, NULL}, { (char *)"VDMask_scalei", _wrap_VDMask_scalei, METH_VARARGS, NULL}, { (char *)"VDMask_trn", _wrap_VDMask_trn, METH_VARARGS, NULL}, { (char *)"VDMask_inv", _wrap_VDMask_inv, METH_VARARGS, NULL}, { (char *)"VDMask_cat", _wrap_VDMask_cat, METH_VARARGS, NULL}, { (char *)"VDMask_mul", _wrap_VDMask_mul, METH_VARARGS, NULL}, { (char *)"delete_VDMask", _wrap_delete_VDMask, METH_VARARGS, NULL}, { (char *)"VDMask_swigregister", VDMask_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static void *_p_vips__VIMaskTo_p_vips__VMask(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((vips::VMask *) ((vips::VIMask *) x)); } static void *_p_vips__VDMaskTo_p_vips__VMask(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((vips::VMask *) ((vips::VDMask *) x)); } static swig_type_info _swigt__p__private_detail__MASKUNION = {"_p__private_detail__MASKUNION", "_private_detail::MASKUNION *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p__private_detail__VPMask__VMaskType = {"_p__private_detail__VPMask__VMaskType", "_private_detail::VPMask::VMaskType *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_im__DOUBLEMASK = {"_p_im__DOUBLEMASK", "im__DOUBLEMASK *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_im__INTMASK = {"_p_im__INTMASK", "im__INTMASK *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_matrix = {"_p_matrix", "matrix *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VDMask = {"_p_vips__VDMask", "vips::VDMask *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VError = {"_p_vips__VError", "vips::VError *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VIMask = {"_p_vips__VIMask", "vips::VIMask *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vips__VMask = {"_p_vips__VMask", "vips::VMask *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p__private_detail__MASKUNION, &_swigt__p__private_detail__VPMask__VMaskType, &_swigt__p_allocator_type, &_swigt__p_char, &_swigt__p_difference_type, &_swigt__p_double, &_swigt__p_im__DOUBLEMASK, &_swigt__p_im__INTMASK, &_swigt__p_int, &_swigt__p_matrix, &_swigt__p_size_type, &_swigt__p_std__ostream, &_swigt__p_value_type, &_swigt__p_vips__VDMask, &_swigt__p_vips__VError, &_swigt__p_vips__VIMask, &_swigt__p_vips__VMask, }; static swig_cast_info _swigc__p__private_detail__MASKUNION[] = { {&_swigt__p__private_detail__MASKUNION, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p__private_detail__VPMask__VMaskType[] = { {&_swigt__p__private_detail__VPMask__VMaskType, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_im__DOUBLEMASK[] = { {&_swigt__p_im__DOUBLEMASK, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_im__INTMASK[] = { {&_swigt__p_im__INTMASK, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_matrix[] = { {&_swigt__p_matrix, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VDMask[] = { {&_swigt__p_vips__VDMask, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VError[] = { {&_swigt__p_vips__VError, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VIMask[] = { {&_swigt__p_vips__VIMask, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_vips__VMask[] = { {&_swigt__p_vips__VDMask, _p_vips__VDMaskTo_p_vips__VMask, 0, 0}, {&_swigt__p_vips__VMask, 0, 0, 0}, {&_swigt__p_vips__VIMask, _p_vips__VIMaskTo_p_vips__VMask, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p__private_detail__MASKUNION, _swigc__p__private_detail__VPMask__VMaskType, _swigc__p_allocator_type, _swigc__p_char, _swigc__p_difference_type, _swigc__p_double, _swigc__p_im__DOUBLEMASK, _swigc__p_im__INTMASK, _swigc__p_int, _swigc__p_matrix, _swigc__p_size_type, _swigc__p_std__ostream, _swigc__p_value_type, _swigc__p_vips__VDMask, _swigc__p_vips__VError, _swigc__p_vips__VIMask, _swigc__p_vips__VMask, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString(""); #else return PyString_FromString(""); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ (printfunc) swig_varlink_print, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 varlink_type.ob_type = &PyType_Type; #else if (PyType_Ready(&varlink_type) < 0) return NULL; #endif } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d, *md; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { # if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, # else { PyObject_HEAD_INIT(NULL) NULL, /* m_init */ 0, /* m_index */ NULL, /* m_copy */ }, # endif (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif #if defined(SWIGPYTHON_BUILTIN) static SwigPyClientData SwigPyObject_clientdata = { 0, 0, 0, 0, 0, 0, 0 }; static PyGetSetDef this_getset_def = { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { (PyCFunction) SwigPyObject_own, (PyCFunction) SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; PyObject *thisown_descr; int i; (void)builtin_pytype; (void)builtin_base_count; (void)builtin_basetype; (void)tuple; (void)static_getset; /* metatype is used to implement static member variables. */ metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); assert(metatype_args); metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); assert(metatype); Py_DECREF(metatype_args); metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; assert(PyType_Ready(metatype) >= 0); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); (void)md; SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; # else return; # endif } /* All objects have a 'this' attribute */ this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); (void)this_descr; /* All objects have a 'thisown' attribute */ thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); (void)thisown_descr; public_interface = PyList_New(0); public_symbol = 0; (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); #endif SWIG_InstallConstants(d,swig_const_table); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif } vips-7.38.5/swig/vipsCC/VImage.i0000644000175000017500000002513512303140253013201 00000000000000/* SWIG interface file for vipsCC7 * * 5/9/07 * - use g_option_context_set_ignore_unknown_options() so we don't fail * on unrecognied -args (thanks Simon) * 3/8/08 * - add .tobuffer() / .frombuffer (), .tostring (), .fromstring () * methods * - add PIL_mode_from_vips () and vips_from_PIL_mode () utility * functions * 6/11/09 * - arg, std::vector was missing the "vips::" */ %module VImage %{ #include /* We need the C API too for the args init and some of the * frombuffer/tobuffer stuff. */ #include %} /* Need to override assignment to get refcounting working. */ %rename(__assign__) vips::VImage::operator=; %include "std_list.i" %include "std_complex.i" %include "std_vector.i" %include "std_except.i" %include "std_string.i" %include "cstring.i" %include "typemaps.i" %import "VError.i" %import "VMask.i" %import "VDisplay.i" namespace std { %template(IntVector) vector; %template(DoubleVector) vector; %template(ImageVector) vector; } /* To get image data to and from VImage (eg. when interfacing with PIL) we * need to be able to import and export Python buffer() objects. Add new * methods to construct from and return pointer/length pairs, then wrap them * ourselves with a couple of typemaps. */ %{ struct VBuffer { void *data; size_t size; }; %} %typemap (out) VBuffer { $result = PyBuffer_FromMemory ($1.data, $1.size); } %typemap (in) VBuffer { const char *buffer; Py_ssize_t buffer_len; if (PyObject_AsCharBuffer ($input, &buffer, &buffer_len) == -1) { PyErr_SetString (PyExc_TypeError,"Type error. Unable to get char pointer from buffer"); return NULL; } $1.data = (void *) buffer; $1.size = buffer_len; } /* Functions which return extra values though their parameters need special * typemaps. */ // double maxpos_avg( double& maxpos_avg_y, double& maxpos_avg_out ) %apply double *OUTPUT { double & maxpos_avg_y }; %apply double *OUTPUT { double & maxpos_avg_out }; // VImage system_image( char* system_image_in_format, char* system_image_out_format, char* system_image_command, char*& system_image_log ) %cstring_output_allocate(char **system_image_log, g_free(*$1)); // VImage segment( int& segment_segments ) %apply int *OUTPUT { int & segment_segments }; // VImage project( VImage& project_vout ) throw( VError ); // nope ... not sure how to handle this one //%apply VImage *OUTPUT { VImage & project_vout }; // VImage label_regions( int& label_regions_segments ) %apply int *OUTPUT { int & label_regions_segments }; // double correl( VImage correl_sec, int correl_xref, int correl_yref, int correl_xsec, int correl_ysec, int correl_hwindowsize, int correl_hsearchsize, int& correl_x, int& correl_y ) %apply int *OUTPUT { int & correl_x }; %apply int *OUTPUT { int & correl_y }; // int _find_lroverlap( VImage _find_lroverlap_sec, int _find_lroverlap_bandno, int _find_lroverlap_xr, int _find_lroverlap_yr, int _find_lroverlap_xs, int _find_lroverlap_ys, int _find_lroverlap_halfcorrelation, int _find_lroverlap_halfarea, int& _find_lroverlap_dy0, double& _find_lroverlap_scale1, double& _find_lroverlap_angle1, double& _find_lroverlap_dx1, double& _find_lroverlap_dy1 ) %apply int *OUTPUT { int & _find_lroverlap_dy0 }; %apply double *OUTPUT { double & _find_lroverlap_scale1 }; %apply double *OUTPUT { double & _find_lroverlap_angle1 }; %apply double *OUTPUT { double & _find_lroverlap_dx1 }; %apply double *OUTPUT { double & _find_lroverlap_dy1 }; // int _find_tboverlap( VImage _find_tboverlap_sec, int _find_tboverlap_bandno, int _find_tboverlap_xr, int _find_tboverlap_yr, int _find_tboverlap_xs, int _find_tboverlap_ys, int _find_tboverlap_halfcorrelation, int _find_tboverlap_halfarea, int& _find_tboverlap_dy0, double& _find_tboverlap_scale1, double& _find_tboverlap_angle1, double& _find_tboverlap_dx1, double& _find_tboverlap_dy1 ) %apply int *OUTPUT { int & _find_tboverlap_dy0 }; %apply double *OUTPUT { double & _find_tboverlap_scale1 }; %apply double *OUTPUT { double & _find_tboverlap_angle1 }; %apply double *OUTPUT { double & _find_tboverlap_dx1 }; %apply double *OUTPUT { double & _find_tboverlap_dy1 }; // double maxpos_subpel( double& maxpos_subpel_y ) %apply double *OUTPUT { double & maxpos_subpel_y }; /* Need the expanded VImage.h in this directory, rather than the usual * vips/VImage.h. SWIG b0rks on #include inside class definitions. */ %include VImage.h %extend vips::VImage { public: VBuffer tobuffer () throw (VError) { VBuffer buffer; buffer.data = $self->data (); buffer.size = (size_t) $self->Xsize () * $self->Ysize () * IM_IMAGE_SIZEOF_PEL ($self->image ()); return buffer; } static VImage frombuffer (VBuffer buffer, int width, int height, int bands, TBandFmt format) throw (VError) { return VImage (buffer.data, width, height, bands, format); } %cstring_output_allocate_size (char **buffer, int *buffer_len, im_free (*$1)) void tostring (char **buffer, int *buffer_len) throw (VError) { void *vips_memory; /* Eval the vips image first. This may throw an exception and we want to * make sure we do this before we try to malloc() space for the copy. */ vips_memory = $self->data (); /* We have to copy the image data to make a string that Python can * manage. Use frombuffer() / tobuffer () if you want to avoid the copy * and manage memory lifetime yourself. */ *buffer_len = (size_t) $self->Xsize () * $self->Ysize () * IM_IMAGE_SIZEOF_PEL ($self->image ()); if (!(*buffer = (char *) im_malloc (NULL, *buffer_len))) verror ("Unable to allocate memory for image copy."); memcpy (*buffer, vips_memory, *buffer_len); } static VImage fromstring (std::string buffer, int width, int height, int bands, TBandFmt format) throw (VError) { void *vips_memory; VImage result; /* We have to copy the string, then add a callback to the VImage to free * it when we free the VImage. Use frombuffer() / tobuffer () if you want * to avoid the copy and manage memory lifetime yourself. */ if (!(vips_memory = im_malloc (NULL, buffer.length ()))) verror ("Unable to allocate memory for image copy."); /* We have to use .c_str () since the string may not be contiguous. */ memcpy (vips_memory, buffer.c_str (), buffer.length ()); result = VImage (vips_memory, width, height, bands, format); if (im_add_close_callback (result.image (), (im_callback_fn) im_free, vips_memory, NULL)) verror (); return result; } } %pythoncode %{ # try to guess a PIL mode string from a VIPS image def PIL_mode_from_vips (vim): if vim.Bands () == 3 and vim.BandFmt () == VImage.FMTUCHAR: return 'RGB' elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.RGB: return 'RGBA' elif vim.Bands () == 4 and vim.BandFmt () == VImage.FMTUCHAR and vim.Type () == VImage.CMYK: return 'CMYK' elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTUCHAR: return 'L' elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTINT: return 'I' elif vim.Bands () == 1 and vim.BandFmt () == VImage.FMTFLOAT: return 'F' elif vim.Bands () == 2 and vim.BandFmt () == VImage.FMTUCHAR: return 'LA' else: raise ValueError ('unsupported vips -> pil image') # return vips (bands, format, type) for a PIL mode def vips_from_PIL_mode (mode): if mode == 'RGB': return (3, VImage.FMTUCHAR, VImage.RGB) elif mode == 'RGBA': return (4, VImage.FMTUCHAR, VImage.RGB) elif mode == 'CMYK': return (4, VImage.FMTUCHAR, VImage.CMYK) elif mode == 'L': return (1, VImage.FMTUCHAR, VImage.B_W) elif mode == 'I': return (1, VImage.FMTINT, VImage.B_W) elif mode == 'F': return (1, VImage.FMTFLOAT, VImage.B_W) elif mode == 'LA': return (2, VImage.FMTUCHAR, VImage.B_W) else: raise ValueError ('unsupported pil -> vips image') %} /* Helper code for vips_init(). */ %{ /* Turn on to print args. #define DEBUG */ /* Command-line args during parse. */ typedef struct _Args { /* The n strings we alloc when we get from Python. */ int n; char **str; /* argc/argv as processed by us. */ int argc; char **argv; } Args; #ifdef DEBUG static void args_print (Args *args) { int i; printf ("args_print: argc = %d\n", args->argc); // +1 so we print the trailing NULL too for (i = 0; i < args->argc + 1; i++) printf ("\t%2d)\t%s\n", i, args->argv[i]); } #endif /*DEBUG*/ static void args_free (Args *args) { int i; for (i = 0; i < args->n; i++) IM_FREE (args->str[i]); args->n = 0; args->argc = 0; IM_FREE (args->str); IM_FREE (args->argv); IM_FREE (args); } /* Get argv/argc from python. */ static Args * args_new (void) { Args *args; PyObject *av; int i; int n; args = g_new (Args, 1); args->n = 0; args->str = NULL; args->argc = 0; args->argv = NULL; if (!(av = PySys_GetObject ((char *) "argv"))) return (args); if (!PyList_Check (av)) { PyErr_Warn (PyExc_Warning, "ignoring sys.argv: " "it must be a list of strings"); return args; } n = PyList_Size (av); args->str = g_new (char *, n); for (i = 0; i < n; i++) args->str[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i))); args->n = n; /* +1 for NULL termination. */ args->argc = n; args->argv = g_new (char *, n + 1); for (i = 0; i < n; i++) args->argv[i] = args->str[i]; args->argv[i] = NULL; return args; } static void vips_fatal (const char *msg) { char buf[256]; im_snprintf (buf, 256, "%s\n%s", msg, im_error_buffer()); im_error_clear (); Py_FatalError (buf); } %} %init %{ { Args *args; args = args_new (); #ifdef DEBUG printf ("on startup:\n"); args_print (args); #endif /*DEBUG*/ if (im_init_world (args->argv[0])) { args_free (args); vips_fatal ("can't initialise module vips"); } /* Now parse any GOptions. */ GError *error = NULL; GOptionContext *context; context = g_option_context_new ("- vips"); g_option_context_add_group (context, im_get_option_group()); g_option_context_set_ignore_unknown_options (context, TRUE); if (!g_option_context_parse (context, &args->argc, &args->argv, &error)) { g_option_context_free (context); args_free (args); im_error ("vipsmodule", "%s", error->message); g_error_free (error); vips_fatal ("can't initialise module vips"); } g_option_context_free (context); #ifdef DEBUG printf ("after parse:\n"); args_print (args); #endif /*DEBUG*/ // Write (possibly) modified argc/argv back again. if (args->argv) PySys_SetArgv (args->argc, args->argv); args_free (args); } %} vips-7.38.5/swig/vipsCC/VMask.i0000644000175000017500000000150412303140253013044 00000000000000/* SWIG interface file for VMask. */ %module VMask %{ #include #include %} %import "VError.i" %import "VImage.i" /* Need to override assignment to get refcounting working. */ %rename(__assign__) *::operator=; /* [] is array subscript, as you'd expect. */ %rename(__index__) vips::VIMask::operator[]; %rename(__index__) vips::VDMask::operator[]; /* () is 2d array subscript, how odd! */ %rename(__call__) vips::VIMask::operator(); %rename(__call__) vips::VDMask::operator(); /* Type conversion operators renamed as functions. */ %rename(convert_VImage) vips::VIMask::operator vips::VImage; %rename(convert_VImage) vips::VDMask::operator vips::VImage; %rename(convert_VIMask) vips::VDMask::operator vips::VIMask; %rename(convert_VDMask) vips::VIMask::operator vips::VDMask; %include vips/VMask.h vips-7.38.5/swig/test/0000755000175000017500000000000012303140253011521 500000000000000vips-7.38.5/swig/test/bench_pil.py0000755000175000017500000000072412303140253013744 00000000000000#!/usr/bin/python import Image, sys import ImageFilter im = Image.open (sys.argv[1]) # Crop 100 pixels off all edges. im = im.crop ((100, 100, im.size[0] - 100, im.size[1] - 100)) # Shrink by 10% im = im.resize ((int (im.size[0] * 0.9), int (im.size[1] * 0.9)), Image.BILINEAR) # sharpen filter = ImageFilter.Kernel ((3, 3), (-1, -1, -1, -1, 16, -1, -1, -1, -1)) im = im.filter (filter) # write back again im.save (sys.argv[2]) vips-7.38.5/swig/test/pilvips.py0000755000175000017500000000223612303140253013507 00000000000000#!/usr/bin/python import sys from vipsCC import * import Image # try this 1,000 times and check for leaks for i in range (0,1000): vim = VImage.VImage (sys.argv[1]) # do some processing in vips ... cut out a small piece of image vim = vim.extract_area (500, 500, 100, 100) # make a PIL image # we use Image.frombuffer (), so PIL is using vim's memory # you need to be very careful not to destroy vim until you're done with pim # ideally you should make a proxy class that wraps this lifetime problem up mode = VImage.PIL_mode_from_vips (vim) size = (vim.Xsize (), vim.Ysize ()) data = vim.tobuffer () pim = Image.frombuffer (mode, size, data, 'raw', mode, 0, 1) # rotate 12 degrees with PIL pim = pim.rotate (12, Image.BILINEAR, 1) # back to vips again # PIL doesn't have a tobuffer method, so we have to use tostring to copy the # data out of PIL and then fromstring to copy back into VIPS str = pim.tostring () bands, format, type = VImage.vips_from_PIL_mode (pim.mode) width, height = pim.size vim2 = VImage.VImage.fromstring (str, width, height, bands, format) # finally write from vips vim2.write (sys.argv[2]) vips-7.38.5/swig/test/testvipsCC.py0000755000175000017500000000155112303140253014107 00000000000000#!/usr/bin/python import sys # just need this for leaktesting import gc from vipsCC import * if len (sys.argv) != 3: print 'usage:', sys.argv[0], 'inputimage outputimage' print '\tcalculate photographic negative of inputimage' sys.exit (1) try: a = VImage.VImage (sys.argv[1]) b = a.invert () c = b.lin ([1,2,3],[4,5,6]) m = VMask.VIMask (3, 3, 1, 0, [-1, -1, -1, -1, 8, -1, -1, -1, -1]) d = a.conv (m) d.write (sys.argv[2]) except VError.VError, e: e.perror (sys.argv[0]) # we can get properties of VImage too print 'inputimage is', a.Xsize (), 'pixels across' print 'starting shutdown ...' del b del a del c del d del m # sometimes have to do several GCs to get them all, not sure why for i in range(10): gc.collect () print 'shutdown!' print 'leaked IMAGEs:' VImage.im__print_all () print 'done ... hopefully you saw no leaks' vips-7.38.5/swig/test/bench_vips.py0000755000175000017500000000072412303140253014141 00000000000000#!/usr/bin/python import sys from vipsCC import * im = VImage.VImage (sys.argv[1]) # Crop 100 pixels off all edges. im = im.extract_area (100, 100, im.Xsize() - 200, im.Ysize() - 200) # Shrink by 10% im = im.affine (0.9, 0, 0, 0.9, 0, 0, 0, 0, int (im.Xsize() * 0.9), int (im.Ysize() * 0.9)) # sharpen mask = VMask.VIMask (3, 3, 8, 0, [-1, -1, -1, -1, 16, -1, -1, -1, -1]) im = im.conv (mask) # write back again im.write (sys.argv[2]) vips-7.38.5/swig/python/0000755000175000017500000000000012303146327012073 500000000000000vips-7.38.5/swig/python/setup.py.in0000644000175000017500000000422512303140253014125 00000000000000#!/usr/bin/python # vim: set fileencoding=latin-1: import re import sys from distutils.core import setup, Extension # We pick up configure's stuff here. Sadly distutils needs this broken out # into separate includes, libs and defines, argh configure_flags = '@VIPS_CFLAGS@ @VIPS_INCLUDES@ @VIPS_LIBS@ -I@top_srcdir@/libvips/include -I@top_srcdir@/libvipsCC/include' # Parse compiler flags into these categories, yuk! configure_macros = [] configure_include_dirs = [] configure_library_dirs = [] configure_libs = [] configure_options = [] for flag in configure_flags.split(): match = re.match ('-D(.*)(=(.*))?', flag) if match: key = match.group (1) if match.group (2): value = match.group (2) else: value = 1 configure_macros += [(key, value)] continue match = re.match ('-I(.*)', flag) if match: configure_include_dirs += [match.group (1)] continue match = re.match ('-L(.*)', flag) if match: configure_library_dirs += [match.group (1)] continue match = re.match ('-l(.*)', flag) if match: configure_libs += [match.group (1)] continue match = re.match ('-(.*)', flag) if match: configure_options += [flag] continue print '%s: unknown configure option!' % flag sys.exit (1) def make_extension (name, source): return Extension (name, sources = [source], define_macros = configure_macros, include_dirs = configure_include_dirs, libraries = configure_libs, library_dirs = configure_library_dirs, extra_compile_args = configure_options, extra_link_args = configure_options, runtime_library_dirs= ['@IM_LIBDIR@']) module1 = make_extension ('vimagemodule', 'vimagemodule.cpp') module2 = make_extension ('vmaskmodule', 'vmaskmodule.cpp') module3 = make_extension ('verrormodule', 'verrormodule.cpp') module4 = make_extension ('vdisplaymodule', 'vdisplaymodule.cpp') setup (name = 'vipsCC', version = '7.20.7', description = 'vips-7.x image processing library', author = 'José María García Pérez, John Cupitt', author_email = 'jcupitt@gmail.com', url = 'http://www.vips.ecs.soton.ac.uk', packages = ['vipsCC'], ext_package = 'vipsCC', ext_modules = [module1, module2, module3, module4]) vips-7.38.5/swig/Makefile.in0000644000175000017500000005225512303144056012545 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = swig DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ SUBDIRS = \ vipsCC EXTRA_DIST = \ test all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign swig/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign swig/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/swig/Makefile.am0000644000175000017500000000005612303140253012517 00000000000000SUBDIRS = \ vipsCC EXTRA_DIST = \ test vips-7.38.5/Makefile.in0000644000175000017500000010002012303144055011553 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(srcdir)/vips.pc.in \ $(srcdir)/vipsCC.pc.in $(top_srcdir)/swig/python/setup.py.in \ AUTHORS COPYING ChangeLog INSTALL NEWS THANKS TODO \ config.guess config.sub install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = vips.pc vipsCC.pc swig/python/setup.py CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = libvips tools po man doc libvipsCC swig DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ @ENABLE_CXX_FALSE@C_COMPILE_DIR = # turn off libvipsCC if C++ is disabled @ENABLE_CXX_TRUE@C_COMPILE_DIR = libvipsCC @ENABLE_CXX_FALSE@C_DIST_DIR = libvipsCC @ENABLE_CXX_TRUE@C_DIST_DIR = @ENABLE_CXX_FALSE@C_PKGCONFIG = @ENABLE_CXX_TRUE@C_PKGCONFIG = vipsCC.pc @ENABLE_CXX_FALSE@P_COMPILE_DIR = # turn on Python if we can (requires C++) @ENABLE_CXX_TRUE@@HAVE_PYTHON_TRUE@P_COMPILE_DIR = swig @ENABLE_CXX_FALSE@P_DIST_DIR = swig @ENABLE_CXX_TRUE@@HAVE_PYTHON_TRUE@P_DIST_DIR = SUBDIRS = \ libvips \ tools \ po \ man \ doc \ $(C_COMPILE_DIR) \ $(P_COMPILE_DIR) EXTRA_DIST = \ m4 \ benchmark \ bootstrap.sh \ vips.pc.in \ vipsCC.pc.in \ libvips.supp \ acinclude.m4 \ depcomp \ $(C_DIST_DIR) \ $(P_DIST_DIR) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = vips.pc $(C_PKGCONFIG) ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 vips.pc: $(top_builddir)/config.status $(srcdir)/vips.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ vipsCC.pc: $(top_builddir)/config.status $(srcdir)/vipsCC.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ swig/python/setup.py: $(top_builddir)/config.status $(top_srcdir)/swig/python/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(am__recursive_targets) all install-am install-exec-am \ install-strip uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-exec-hook install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-hook uninstall-pkgconfigDATA install-exec-hook: -rm -rf ${DESTDIR}$(datadir)/doc/vips $(mkinstalldirs) ${DESTDIR}$(datadir)/doc/vips -cp -r ${top_srcdir}/doc/html ${top_srcdir}/doc/pdf ${DESTDIR}$(datadir)/doc/vips dist-hook: # make sure we don't get any .svn dirs from EXTRA_DIST # also "fred" gets left around occasionally -find $(distdir) -name .svn -exec rm -rf {} \; -find $(distdir) -name fred -exec rm {} \; uninstall-hook: # make sure we have write permission for 'rm' -chmod -R u+w ${DESTDIR}$(datadir)/doc/vips -rm -rf ${DESTDIR}$(datadir)/doc/vips # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/Makefile.am0000644000175000017500000000237112303140253011550 00000000000000 # turn off libvipsCC if C++ is disabled if ENABLE_CXX C_COMPILE_DIR = libvipsCC C_DIST_DIR = C_PKGCONFIG = vipsCC.pc # turn on Python if we can (requires C++) if HAVE_PYTHON P_COMPILE_DIR = swig P_DIST_DIR = endif else C_COMPILE_DIR = C_DIST_DIR = libvipsCC C_PKGCONFIG = P_COMPILE_DIR = P_DIST_DIR = swig endif SUBDIRS = \ libvips \ tools \ po \ man \ doc \ $(C_COMPILE_DIR) \ $(P_COMPILE_DIR) EXTRA_DIST = \ m4 \ benchmark \ bootstrap.sh \ vips.pc.in \ vipsCC.pc.in \ libvips.supp \ acinclude.m4 \ depcomp \ $(C_DIST_DIR) \ $(P_DIST_DIR) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = vips.pc $(C_PKGCONFIG) install-exec-hook: -rm -rf ${DESTDIR}$(datadir)/doc/vips $(mkinstalldirs) ${DESTDIR}$(datadir)/doc/vips -cp -r ${top_srcdir}/doc/html ${top_srcdir}/doc/pdf ${DESTDIR}$(datadir)/doc/vips dist-hook: # make sure we don't get any .svn dirs from EXTRA_DIST # also "fred" gets left around occasionally -find $(distdir) -name .svn -exec rm -rf {} \; -find $(distdir) -name fred -exec rm {} \; uninstall-hook: # make sure we have write permission for 'rm' -chmod -R u+w ${DESTDIR}$(datadir)/doc/vips -rm -rf ${DESTDIR}$(datadir)/doc/vips ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-introspection vips-7.38.5/libvips.supp0000644000175000017500000000764412303141142012103 00000000000000# hide GObject type init allocs, they can only happen once and are not really # leaks { type_init Memcheck:Leak fun:*alloc ... fun:g_type_register_* } { type_init2 Memcheck:Leak fun:*alloc ... fun:g_type_init_* } { type_init3 Memcheck:Leak fun:*alloc ... fun:g_type_create_* } { type_init4 Memcheck:Leak fun:*alloc ... fun:g_type_class_ref } { type_init5 Memcheck:Leak fun:*alloc ... fun:g_type_add_interface_static } # module init does this { init7 Memcheck:Leak ... fun:g_malloc0 ... fun:_dl_init } # g_get_home_dir has a private buffer { gwd Memcheck:Leak fun:*alloc ... fun:g_get_home_dir } # selinux on ubuntu generates a leak report we ignore { selinux Memcheck:Leak fun:*alloc ... obj:/lib/libselinux.so.1 } # gdk and x init { gdk_init Memcheck:Leak fun:*alloc ... fun:gdk_display_open } { x_init_ext Memcheck:Leak fun:*alloc ... fun:XInitExtension } # hide all dbus reports, not the app's problem { dbus Memcheck:Leak fun:*alloc ... obj:/lib/libdbus-1.so.* } # hide all orbit leaks, not our problem { orbit Memcheck:Leak fun:*alloc ... fun:ORBit_* } # other lib init { fontconfig_init Memcheck:Leak fun:*alloc ... fun:FcConfigParseAndLoad } { freetype_init Memcheck:Leak fun:*alloc ... fun:FT_Open_Face } { goffice_init Memcheck:Leak fun:*alloc ... fun:libgoffice_init } { g_module_init Memcheck:Leak fun:*alloc ... fun:g_module_open } { gtk_module_init Memcheck:Leak fun:*alloc ... fun:gtk_module_init } # gdk-x11 makes a toplevel object { gdk_x11_init Memcheck:Leak fun:*alloc ... fun:_gdk_x11_window_get_toplevel } # the icon theme allocates stuff on lazy load { gtk_icon_theme_has_icon Memcheck:Leak fun:*alloc ... fun:gtk_icon_theme_has_icon } # tooltip labels are not really owned by anyone and will not be freed on exit { gtk_tooltip_set_markup Memcheck:Leak fun:*alloc ... fun:gtk_tooltip_set_markup } # pango makes a PangoLanguage for every script you use { pango_language Memcheck:Leak fun:*alloc ... fun:pango_language_from_string } # pango makes a PangoOTRuleset for every font you use { pango_ot_ruleset_get_for_description Memcheck:Leak fun:*alloc ... fun:pango_ot_ruleset_get_for_description } # pango makes a PangoOTInfo for every font you use { pango_ot_info_get Memcheck:Leak fun:*alloc ... fun:pango_ot_info_get } # fonts pango has loaded { pango_fc_fontset_get_font_at Memcheck:Leak fun:*alloc ... fun:pango_fc_fontset_get_font_at } # font maps pango has loaded { pango_fc_font_map_load_fontset Memcheck:Leak fun:*alloc ... fun:pango_fc_font_map_load_fontset } # ... and font descriptions from every "sans 12" type string { pango_font_description_from_string Memcheck:Leak fun:*alloc ... fun:pango_font_description_from_string } # gettext has annoying uninit warnings { gettext Memcheck:Cond fun:__GI___strcasecmp_l ... fun:__dcigettext } { gettext Memcheck:Value8 fun:__GI___strcasecmp_l ... fun:__dcigettext } # libz has a warning too ... see this from libpng / libxml2 etc. { libz Memcheck:Cond fun:inflateReset2 } # libvips can generate this one spuriously { libvipswrite Memcheck:Param write(buf) ... fun:write_vips } # ubuntu 13.04 suppressions { pixman1 Memcheck:Cond ... fun:pixman_image_composite32 } { cairo1 Memcheck:Cond fun:rsvg_cairo_surface_to_pixbuf } # ruby has some annoying ones too { ruby1 Memcheck:Cond ... fun:rb_parser_compile_file } { ruby2 Memcheck:Value8 ... fun:rb_parser_compile_file } { ruby3 Memcheck:Cond ... fun:rb_file_expand_path } { ruby4 Memcheck:Value8 ... fun:rb_file_expand_path } vips-7.38.5/AUTHORS0000644000175000017500000000172212303140253010563 00000000000000Authors of VIPS See also the files THANKS and ChangeLog Nicos Dessipris and Kirk Martinez started VIPS in 1990. John Cupitt started ip in late 1990, and took over maintenance of the VIPS library in 1995. Ruven Pillay, Steve Perry, Lars Raffelt, David Saunders, Jean-Philippe Laurant, Ahmed Abood, Helene Chahine, Joe Padfield, Andrey Kiselev, Lev Serebryakov, Simon Goodall, Konrad Lang, Markus Wollgarten, Jesper Friis, Tom Vajzovic, Chris Leick and others contributed patches for the library and ip. Hans Breuer contributed many win32 compatibility fixes and a win32 build system. Dennis Lubert cleaned up the C++ API. Jose Manuel Menendez Garcia, Javier Alejandre Arenas, and Juan Torres Arjona contributed the tmake VIPS.DLL build system and the MSVC project files. Nicolas Robidoux contributed optimized bilinear and bicubic code to the VipsInterpolate class and, with Chantal Racette and Adam Turcotte, contributed the novel LBB, Nohalo and VSQBS interpolators. vips-7.38.5/INSTALL0000644000175000017500000003660512303140253010554 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. vips-7.38.5/ltmain.sh0000644000175000017500000105204412303144053011341 00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.3ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.3ubuntu1" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 vips-7.38.5/configure.ac0000644000175000017500000005623712303141142012012 00000000000000# Process this file with autoconf to produce a configure script. # also update the version number in the m4 macros below AC_INIT([vips], [7.38.5], [vipsip@jiscmail.ac.uk]) # required for gobject-introspection AC_PREREQ(2.62) # gobject-introspection recommends -Wno-portability # foreign stops complaints about a missing README (we use README.md instead) # and missing INSTALL (the standard Gnu INSTALL is not very useful) AM_INIT_AUTOMAKE([-Wno-portability foreign]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_MACRO_DIR([m4]) # user-visible library versioning m4_define([vips_major_version], [7]) m4_define([vips_minor_version], [38]) m4_define([vips_micro_version], [5]) m4_define([vips_version], [vips_major_version.vips_minor_version.vips_micro_version]) VIPS_MAJOR_VERSION=vips_major_version() VIPS_MINOR_VERSION=vips_minor_version() VIPS_MICRO_VERSION=vips_micro_version() VIPS_VERSION=vips_version() VIPS_VERSION_STRING=$VIPS_VERSION-`date` # libtool library versioning ... not user-visible (except as part of the # library file name) and does not correspond to major/minor/micro above # rules: # sources changed: increment revision # binary interface changed: increment current, reset revision to 0 # binary interface changes backwards compatible?: increment age # binary interface changes not backwards compatible?: reset age to 0 LIBRARY_CURRENT=37 LIBRARY_REVISION=4 LIBRARY_AGE=0 # patched into include/vips/version.h AC_SUBST(VIPS_VERSION) AC_SUBST(VIPS_VERSION_STRING) AC_SUBST(VIPS_MAJOR_VERSION) AC_SUBST(VIPS_MINOR_VERSION) AC_SUBST(VIPS_MICRO_VERSION) # put into library name by libsrc/Makefile.am and libsrcCC/Makefile.am AC_SUBST(LIBRARY_CURRENT) AC_SUBST(LIBRARY_REVISION) AC_SUBST(LIBRARY_AGE) # init introspection support GOBJECT_INTROSPECTION_CHECK([1.30.0]) # gir needs a list of source files to scan for introspection # # build with a glob and a list of files to exclude from scanning # see also IGNORE_HFILES in doc/reference/Makefile.am introspection_sources=$(cd libvips ; find . -name "*.c") filter_list="deprecated " introspection_sources2= for name in $introspection_sources; do found=0 for filter in $filter_list; do # FIXME .. argh a bash-ism :( not sure of a nice, portable way to do # regexp matching if [[[ $name == *${filter}* ]]]; then found=1 fi done if [[ $found -eq 0 ]]; then introspection_sources2="$introspection_sources2 $name" fi done vips_introspection_sources="$introspection_sources2" # add headers that form the public vips8 API .. don't do a find and exclude, # we end up excluding almost everything argh headers="basic.h vips.h object.h image.h error.h foreign.h interpolate.h header.h operation.h enumtypes.h arithmetic.h conversion.h type.h" for name in $headers; do vips_introspection_sources="$vips_introspection_sources include/vips/$name" done AC_SUBST(vips_introspection_sources) AC_CANONICAL_HOST AC_DEFINE_UNQUOTED(G_LOG_DOMAIN, "VIPS", [Domain for glib logging messages.]) # disable debugging by default for production releases m4_define([debug_default], m4_if(m4_eval(vips_minor_version() % 2), [1], [yes], [no])) AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@], [turn on debugging @<:@default=debug_default()@:>@]),, enable_debug=debug_default()) if test "x$enable_debug" = "xyes"; then VIPS_DEBUG_FLAGS="-DDEBUG_FATAL -DDEBUG_LEAK" else VIPS_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS" if test "x$enable_debug" = "xno"; then VIPS_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS" fi fi AC_MSG_CHECKING([for native Win32]) case "$host" in *-*-mingw*) vips_os_win32=yes ;; *) vips_os_win32=no ;; esac AC_MSG_RESULT([$vips_os_win32]) if test x"$vips_os_win32" = "xyes"; then AC_DEFINE(OS_WIN32,1,[native win32]) # makes gcc use win native alignment VIPS_CFLAGS="-mms-bitfields $VIPS_CFLAGS" fi # CImg needs flags changed on win32 if test x"$vips_os_win32" = "xyes"; then AM_CONDITIONAL(OS_WIN32, true) else AM_CONDITIONAL(OS_WIN32, false) fi # Cygwin/mingw need binary open to avoid CR/LF madness # ... should be a better way to test for this AC_MSG_CHECKING([for binary open needed]) case "$host_os" in cygwin* | mingw*) vips_binary_open=yes ;; *) vips_binary_open=no ;; esac AC_MSG_RESULT([$vips_binary_open]) if test x"$vips_binary_open" = "xyes"; then AC_DEFINE(BINARY_OPEN,1,[define to open non-text files in binary mode]) fi AC_MSG_CHECKING([for Mac OS X]) case "$host" in *-*-darwin*) vips_os_darwin=yes ;; *) vips_os_darwin=no ;; esac AC_MSG_RESULT([$vips_os_darwin]) if test x"$vips_os_darwin" = x"yes"; then AC_DEFINE(VIPS_OS_DARWIN,1,[native Mac OS X]) fi # set the default directory for ICC profiles if test x"$vips_os_darwin" = x"yes"; then profile_dir="/Library/ColorSync/Profiles" elif test x"$vips_os_win32" = x"yes"; then profile_dir="C:\\Windows\\System32\\spool\\drivers\\color" else profile_dir="/usr/share/color/icc" fi AC_DEFINE_UNQUOTED(VIPS_ICC_DIR,"$profile_dir",[default directory for ICC profiles]) # we want largefile support, if possible AC_SYS_LARGEFILE # Checks for programs. AC_PROG_AWK AC_PROG_CC AC_PROG_CC_STDC AC_PROG_CXX AC_C_CONST AC_C_RESTRICT AC_PROG_RANLIB AC_PROG_INSTALL AC_PROG_LN_S AM_WITH_DMALLOC # vips_PROG_CXX_WORKS # Check whether the C++ compiler works. AC_DEFUN([vips_PROG_CXX_WORKS], [AC_REQUIRE([AC_PROG_CXX])dnl AC_CACHE_CHECK([whether the C++ compiler works], [vips_cv_prog_cxx_works], [AC_LANG_PUSH([C++]) AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [vips_cv_prog_cxx_works=yes], [vips_cv_prog_cxx_works=no]) AC_LANG_POP([C++])]) ]) # option to build without C++ # handy for some embedded applications # also, including C++ source causes link problems on some # platforms, so have an option to disable it AC_ARG_ENABLE(cxx, AS_HELP_STRING([--enable-cxx], [build C++ components (default: test)])) if test x"$enable_cxx" != x"no"; then vips_PROG_CXX_WORKS if test x"$vips_cv_prog_cxx_works" = x"yes"; then AC_DEFINE(ENABLE_CXX,1,[build C++ components]) AM_CONDITIONAL(ENABLE_CXX, true) # need -lstdc++ for (eg.) the C++ format loaders # this gets added to vips.pc to help mingw and friends link programs # using libvips VIPS_CXX_LIBS="-lstdc++" enable_cxx=yes fi fi if test x"$enable_cxx" != x"yes"; then AM_CONDITIONAL(ENABLE_CXX, false) VIPS_CXX_LIBS="" enable_cxx=no fi # we need a fully expanded version of $libdir # without this we get something like # define VIPS_LIBDIR ${exec_prefix}/lib # argh test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # set $expanded_value to the fully-expanded value of the argument expand () { eval expanded_value=$1 if test x"$expanded_value" != x"$1"; then expand "$expanded_value" fi } expand $libdir VIPS_LIBDIR=$expanded_value # this gets pasted into version.h as a #define VIPS_EXEEXT=$EXEEXT AC_SUBST(VIPS_EXEEXT) # vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback) # the configure-time install prefix AC_DEFINE_UNQUOTED(VIPS_PREFIX,"$prefix",[configure-time install prefix]) AC_DEFINE_UNQUOTED(VIPS_LIBDIR,"$VIPS_LIBDIR",[configure-time library directory]) # i18n # we need to name our .mo with major.minor so we can have multiple versions # installed in parallel on Debian expand vips$VIPS_MAJOR_VERSION.$VIPS_MINOR_VERSION GETTEXT_PACKAGE=$expanded_value AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The prefix for our gettext translation domains.]) # the 'malkovich' one is there for testing only, remove for release #ALL_LINGUAS="en_GB de malkovich" ALL_LINGUAS="en_GB de" AM_GLIB_GNU_GETTEXT # Checks for libraries. # build list of pkg-config packages we used here PACKAGES_USED="" # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([errno.h math.h fcntl.h limits.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h sys/mman.h sys/types.h sys/stat.h unistd.h io.h direct.h windows.h]) # uncomment to change which libs we build # AC_DISABLE_SHARED # AC_DISABLE_STATIC AC_LIBTOOL_WIN32_DLL AC_CHECK_TOOL(DLLWRAP, dllwrap) AC_CHECK_TOOL(DLLTOOL, dlltool) AC_CHECK_TOOL(OBJDUMP, objdump) AC_CHECK_TOOL(RANLIB, ranlib) AC_CHECK_TOOL(STRIP, strip) AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(AS, as) AC_CHECK_TOOL(LD, ld) AC_PROVIDE([AC_LIBTOOL_WIN32_DLL]) AC_PROG_LIBTOOL # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_MEMCMP AC_FUNC_MMAP AC_FUNC_VPRINTF AC_CHECK_FUNCS([getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand sysconf atexit]) AC_CHECK_LIB(m,cbrt,[AC_DEFINE(HAVE_CBRT,1,[have cbrt() in libm.])]) AC_CHECK_LIB(m,hypot,[AC_DEFINE(HAVE_HYPOT,1,[have hypot() in libm.])]) # have to have these # need glib 2.6 for GOption PKG_CHECK_MODULES(REQUIRED, glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0) PACKAGES_USED="$PACKAGES_USED glib-2.0 libxml-2.0 gmodule-2.0 gobject-2.0" # after 2.28 we have a monotonic timer PKG_CHECK_MODULES(MONOTONIC, glib-2.0 >= 2.28,[ AC_DEFINE(HAVE_MONOTONIC_TIME,1,[define if your glib has g_get_monotonic_time().]) ],[ ] ) # after 2.32 there are a new set of thread functions, annoyingly PKG_CHECK_MODULES(THREADS, glib-2.0 >= 2.32,[ AC_DEFINE(HAVE_MUTEX_INIT,1,[define if your glib has g_mutex_init().]) AC_DEFINE(HAVE_COND_INIT,1,[define if your glib has g_cond_init().]) AC_DEFINE(HAVE_THREAD_NEW,1,[define if your glib has g_thread_new().]) AC_DEFINE(HAVE_PRIVATE_INIT,1,[define if your glib has G_PRIVATE_INIT().]) AC_DEFINE(HAVE_VALUE_GET_SCHAR,1,[define if your glib has g_value_get_schar().]) ],[ # the old threading system ... we need to link against gthread PKG_CHECK_MODULES(GTHREAD, gthread-2.0) PACKAGES_USED="$PACKAGES_USED gthread-2.0" ] ) # after 2.36 the type system inits itself PKG_CHECK_MODULES(TYPE_INIT, glib-2.0 < 2.36,[ AC_DEFINE(NEED_TYPE_INIT,1,[define if your glib needs g_type_init().]) ],[ ] ) # check for gtk-doc GTK_DOC_CHECK(1.9) # optional supporting libraries AC_ARG_WITH([fftw], AS_HELP_STRING([--without-fftw], [build without fftw (default: test)])) if test x"$with_fftw" != "xno"; then PKG_CHECK_MODULES(FFTW, fftw3, [AC_DEFINE(HAVE_FFTW,1,[define if you have fftw3 installed.]) with_fftw=yes PACKAGES_USED="$PACKAGES_USED fftw3"], [AC_MSG_WARN([fftw not found; disabling fftw support]) with_fftw=no]) fi # ImageMagick ... detect attribute iteration too # Optionally look for GraphicsMagick instead ... use # --with-magickpackage=GraphicsMagick AC_ARG_WITH([magick], AS_HELP_STRING([--without-magick], [build without libMagic (default: test)])) AC_ARG_WITH([magickpackage], AS_HELP_STRING([--with-magickpackage], [magickpackage to use (default: MagickWand, ImageMagick; try GraphicsMagick to build against gm instead)])) # recent versions of ImageMagick have split parts of the library off to # MagickWand, so by default we test for that first if test x"$with_magickpackage" = "x"; then PKG_CHECK_MODULES(MAGICK_WAND, MagickWand, [with_magickpackage=MagickWand], [PKG_CHECK_MODULES(IMAGE_MAGICK, ImageMagick, [with_magickpackage=ImageMagick], [AC_MSG_WARN([neither MagickWand nor ImageMagick found; disabling Magick support]) with_magick=no ])]) fi if test x"$with_magick" != "xno"; then PKG_CHECK_MODULES(MAGICK, $with_magickpackage, [AC_DEFINE(HAVE_MAGICK,1,[define if you have libMagick installed.]) with_magick=yes PACKAGES_USED="$PACKAGES_USED $with_magickpackage"], [AC_MSG_WARN([$with_magickpackage not found; disabling Magick support]) with_magick=no ]) fi if test x"$with_magick" != "xno"; then # we SetImageOption to disable some DICOM read processing, but that's only # in more recent imagemagicks and not in graphicsmagick save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" AC_CHECK_FUNCS(SetImageOption, AC_DEFINE(HAVE_SETIMAGEOPTION,1, [define if your magick has SetImageOption.])) LIBS=$save_LIBS fi if test x"$with_magick" != "xno"; then # newer ImageMagicks use MagickCoreGenesis instead of InitializeMagick argh save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" AC_CHECK_FUNCS(MagickCoreGenesis, AC_DEFINE(HAVE_MAGICKCOREGENESIS,1, [define if your magick has MagickCoreGenesis.])) LIBS=$save_LIBS fi if test x"$with_magick" != "xno"; then # newer ImageMagicks use ResetImagePropertyIterator instead of # ResetImageAttributeIterator argh save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" AC_CHECK_FUNCS(ResetImagePropertyIterator, AC_DEFINE(HAVE_RESETIMAGEPROPERTYITERATOR,1, [define if your magick has ResetImagePropertyIterator.])) LIBS=$save_LIBS fi if test x"$with_magick" != "xno"; then # so ... do we have ResetImageAttributeIterator()? GM does not save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" AC_CHECK_FUNCS(ResetImageAttributeIterator, AC_DEFINE(HAVE_RESETIMAGEATTRIBUTEITERATOR,1, [define if your magick has ResetImageAttributeIterator.])) LIBS=$save_LIBS fi if test x"$with_magick" != "xno"; then # more recent magicks have GetVirtualPixels rather than GetImagePixels save_LIBS=$LIBS LIBS="$LIBS $MAGICK_LIBS" AC_CHECK_FUNCS(GetVirtualPixels, AC_DEFINE(HAVE_GETVIRTUALPIXELS,1, [define if your magick has GetVirtualPixels.])) LIBS=$save_LIBS fi # orc AC_ARG_WITH([orc], AS_HELP_STRING([--without-orc], [build without orc (default: test)])) if test x"$with_orc" != "xno"; then # we use loadpw etc. PKG_CHECK_MODULES(ORC, orc-0.4 >= 0.4.11, [AC_DEFINE(HAVE_ORC,1,[define if you have orc-0.4.11 or later installed.]) with_orc=yes PACKAGES_USED="$PACKAGES_USED orc-0.4"], [AC_MSG_WARN([orc-0.4.11 or later not found; disabling orc support]) with_orc=no ]) fi # lcms ... look for lcms2 first, it has better threading support AC_ARG_WITH([lcms], AS_HELP_STRING([--without-lcms], [build without lcms (default: test)])) if test x"$with_lcms" != "xno"; then PKG_CHECK_MODULES(LCMS, lcms2, [AC_DEFINE(HAVE_LCMS2,1,[define if you have lcms2 installed.]) with_lcms="yes (lcms2)" PACKAGES_USED="$PACKAGES_USED lcms2"], [PKG_CHECK_MODULES(LCMS, lcms, [AC_DEFINE(HAVE_LCMS,1,[define if you have lcms installed.]) with_lcms="yes (lcms1)" PACKAGES_USED="$PACKAGES_USED lcms"], [AC_MSG_WARN([lcms2/lcms not found; disabling lcms support]) with_lcms=no]) ]) fi # OpenEXR AC_ARG_WITH([OpenEXR], AS_HELP_STRING([--without-OpenEXR], [build without OpenEXR (default: test)])) # require 1.2.2 since 1.2.1 has a broken ImfCloseTiledInputFile() if test x"$with_OpenEXR" != "xno"; then PKG_CHECK_MODULES(OPENEXR, OpenEXR >= 1.2.2, [AC_DEFINE(HAVE_OPENEXR,1,[define if you have OpenEXR >=1.2.2 installed.]) with_OpenEXR=yes PACKAGES_USED="$PACKAGES_USED OpenEXR"], [AC_MSG_WARN([OpenEXR not found; disabling OpenEXR support]) with_OpenEXR=no ]) fi # OpenSlide AC_ARG_WITH([openslide], AS_HELP_STRING([--without-openslide], [build without OpenSlide (default: test)])) if test x"$with_openslide" != x"no"; then PKG_CHECK_MODULES(OPENSLIDE, openslide >= 3.3.0, [AC_DEFINE(HAVE_OPENSLIDE,1,[define if you have OpenSlide >= 3.3.0 installed.]) with_openslide=yes PACKAGES_USED="$PACKAGES_USED openslide"], [AC_MSG_WARN([OpenSlide >= 3.3.0 not found; disabling virtual slide support]) with_openslide=no ]) fi # matio AC_ARG_WITH([matio], AS_HELP_STRING([--without-matio], [build without matio (default: test)])) if test x"$with_matio" != "xno"; then PKG_CHECK_MODULES(MATIO, matio, [AC_DEFINE(HAVE_MATIO,1,[define if you have matio installed.]) with_matio=yes PACKAGES_USED="$PACKAGES_USED matio"], [AC_MSG_WARN([matio not found; disabling matio support]) with_matio=no ]) fi # cfitsio AC_ARG_WITH([cfitsio], AS_HELP_STRING([--without-cfitsio], [build without cfitsio (default: test)])) if test x"$with_cfitsio" != "xno"; then PKG_CHECK_MODULES(CFITSIO, cfitsio, [AC_DEFINE(HAVE_CFITSIO,1,[define if you have cfitsio installed.]) with_cfitsio=yes PACKAGES_USED="$PACKAGES_USED cfitsio"], [AC_MSG_WARN([cfitsio not found; disabling cfitsio support]) with_cfitsio=no ]) fi # libwebp AC_ARG_WITH([libwebp], AS_HELP_STRING([--without-libwebp], [build without libwebp (default: test)])) if test x"$with_libwebp" != "xno"; then PKG_CHECK_MODULES(LIBWEBP, libwebp, [AC_DEFINE(HAVE_LIBWEBP,1,[define if you have libwebp installed.]) with_libwebp=yes PACKAGES_USED="$PACKAGES_USED libwebp"], [AC_MSG_WARN([libwebp not found; disabling libwebp support]) with_libwebp=no ]) fi # pangoft2 AC_ARG_WITH([pangoft2], AS_HELP_STRING([--without-pangoft2], [build without pangoft2 (default: test)])) if test x"$with_pangoft2" != "xno"; then PKG_CHECK_MODULES(PANGOFT2, pangoft2, [AC_DEFINE(HAVE_PANGOFT2,1,[define if you have pangoft2 installed.]) with_pangoft2=yes PACKAGES_USED="$PACKAGES_USED pangoft2"], [AC_MSG_WARN([pangoft2 not found; disabling pangoft2 support]) with_pangoft2=no ]) fi # hmm, these don't have .pc files on ubuntu 5.10, how odd FIND_ZIP( [with_zip=yes], [AC_MSG_WARN([libz not found; disabling ZIP support]) with_zip=no ]) # look for TIFF with pkg-config ... fall back to our tester # pkgconfig support for libtiff starts with libtiff-4 AC_ARG_WITH([tiff], AS_HELP_STRING([--without-tiff], [build without libtiff (default: test)])) if test x"$with_tiff" != "xno"; then PKG_CHECK_MODULES(TIFF, libtiff-4, [AC_DEFINE(HAVE_TIFF,1,[define if you have libtiff installed.]) with_tiff="yes (pkg-config libtiff-4)" PACKAGES_USED="$PACKAGES_USED libtiff-4"], [FIND_TIFF( with_tiff="yes (found by search)", [AC_MSG_WARN([libtiff not found; disabling TIFF support]) with_tiff=no ]) ]) fi # look for PNG with pkg-config ... fall back to our tester AC_ARG_WITH([png], AS_HELP_STRING([--without-png], [build without libpng (default: test)])) if test x"$with_png" != "xno"; then PKG_CHECK_MODULES(PNG, libpng >= 1.2.9, [AC_DEFINE(HAVE_PNG,1,[define if you have libpng installed.]) with_png="yes (pkg-config libpng >= 1.2.9)" PACKAGES_USED="$PACKAGES_USED libpng"], [FIND_PNG( with_png="yes (found by search)", [AC_MSG_WARN([libpng not found; disabling PNG support]) with_png=no ]) ]) fi FIND_JPEG( [with_jpeg=yes], [AC_MSG_WARN([libjpeg not found; disabling JPEG support]) with_jpeg=no ]) # libexif AC_ARG_WITH([libexif], AS_HELP_STRING([--without-libexif], [build without libexif (default: test)])) if test x"$with_libexif" != "xno"; then PKG_CHECK_MODULES(EXIF, libexif >= 0.6, [AC_DEFINE(HAVE_EXIF,1,[define if you have libexif >= 0.6 installed.]) with_libexif=yes PACKAGES_USED="$PACKAGES_USED libexif"], [AC_MSG_WARN([libexif >= 0.6 not found; disabling exif support]) with_libexif=no ]) fi # some libexif packages need include , some just # how annoying if test x"$with_libexif" != "xno"; then # cppflags not cflags because we want the preproc to see the -I as well save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$EXIF_CFLAGS $CPPFLAGS" AC_CHECK_HEADER(exif-data.h, AC_DEFINE(UNTAGGED_EXIF,1,[libexif includes don't need libexif prefix])) CPPFLAGS=$save_CPPFLAGS fi # make python binding? AC_ARG_WITH([python], AS_HELP_STRING([--without-python], [build without Python bindings (default: test)])) if test x"$with_python" != "xno"; then if test x"$enable_cxx" = "xno"; then # if C++ if off, we can't do Python with_python=no AC_MSG_WARN([C++ is off, disabling Python binding]) else AM_PATH_PYTHON(2.2,, [with_python=no AC_MSG_WARN([Python not found; disabling Python binding])]) fi fi if test x"$with_python" != "xno"; then AM_CHECK_PYTHON_HEADERS(, [with_python=no AC_MSG_WARN([Python headers not found])]) fi # we don't check for swig: we include the generated bindings in the # distribution if test x"$with_python" != x"no"; then AM_CONDITIONAL(HAVE_PYTHON, true) with_python=yes else AM_CONDITIONAL(HAVE_PYTHON, false) fi # Gather all up for VIPS_CFLAGS, VIPS_INCLUDES, VIPS_LIBS and VIPS_CXX_LIBS # sort includes to get longer, more specific dirs first # helps, for example, selecting graphicsmagick over imagemagick VIPS_CFLAGS=`for i in $VIPS_CFLAGS $GTHREAD_CFLAGS $REQUIRED_CFLAGS $PANGOFT2_CFLAGS $FFTW_CFLAGS $MAGICK_CFLAGS $PNG_CFLAGS $EXIF_CFLAGS $MATIO_CFLAGS $CFITSIO_CFLAGS $LIBWEBP_CFLAGS $OPENEXR_CFLAGS $OPENSLIDE_CFLAGS $ORC_CFLAGS $TIFF_CFLAGS $LCMS_CFLAGS do echo $i done | sort -ru` VIPS_CFLAGS=`echo $VIPS_CFLAGS` VIPS_CFLAGS="$VIPS_DEBUG_FLAGS $VIPS_CFLAGS" VIPS_INCLUDES="$PNG_INCLUDES $TIFF_INCLUDES $ZIP_INCLUDES $JPEG_INCLUDES" VIPS_LIBS="$MAGICK_LIBS $PNG_LIBS $TIFF_LIBS $ZIP_LIBS $JPEG_LIBS $GTHREAD_LIBS $REQUIRED_LIBS $PANGOFT2_LIBS $FFTW_LIBS $ORC_LIBS $LCMS_LIBS $OPENEXR_LIBS $OPENSLIDE_LIBS $CFITSIO_LIBS $LIBWEBP_LIBS $MATIO_LIBS $EXIF_LIBS -lm" # we need this to generate paths in swig/python/setup.py.in AC_SUBST(top_srcdir) AC_SUBST(VIPS_LIBDIR) AC_SUBST(VIPS_CFLAGS) AC_SUBST(VIPS_INCLUDES) AC_SUBST(VIPS_LIBS) AC_SUBST(VIPS_CXX_LIBS) AC_SUBST(PACKAGES_USED) AC_OUTPUT([ vips.pc vipsCC.pc Makefile libvips/include/vips/version.h libvips/include/Makefile libvips/include/vips/Makefile libvips/Makefile libvips/arithmetic/Makefile libvips/cimg/Makefile libvips/colour/Makefile libvips/conversion/Makefile libvips/convolution/Makefile libvips/deprecated/Makefile libvips/foreign/Makefile libvips/freqfilt/Makefile libvips/histogram/Makefile libvips/inplace/Makefile libvips/iofuncs/Makefile libvips/morphology/Makefile libvips/mosaicing/Makefile libvips/create/Makefile libvips/resample/Makefile libvips/video/Makefile libvipsCC/include/Makefile libvipsCC/include/vips/Makefile libvipsCC/Makefile tools/Makefile tools/batch_crop tools/batch_image_convert tools/batch_rubber_sheet tools/light_correct tools/shrink_width swig/Makefile swig/vipsCC/Makefile swig/python/setup.py man/Makefile doc/Makefile doc/reference/Makefile doc/reference/libvips-docs.sgml po/Makefile.in ]) AC_MSG_RESULT([ * general build options native win32: $vips_os_win32 native OS X: $vips_os_darwin open files in binary mode: $vips_binary_open enable debug: $enable_debug build C++ components: $enable_cxx build docs with gtkdoc: $enable_gtk_doc gobject introspection: $found_introspection * optional packages and modules use fftw3 for FFT: $with_fftw Magick package: $with_magickpackage file import with libMagick: $with_magick accelerate loops with orc: $with_orc (requires orc-0.4.11 or later) ICC profile support with lcms: $with_lcms file import with OpenEXR: $with_OpenEXR file import with OpenSlide: $with_openslide (requires openslide-3.3.0 or later) file import with matio: $with_matio file import with cfitsio: $with_cfitsio file import/export with libwebp: $with_libwebp text rendering with pangoft2: $with_pangoft2 file import/export with libpng: $with_png (requires libpng-1.2.9 or later) file import/export with libtiff: $with_tiff file import/export with libjpeg: $with_jpeg use libexif to load/save JPEG metadata: $with_libexif build Python binding: $with_python]) vips-7.38.5/bootstrap.sh0000755000175000017500000000356212303140253012073 00000000000000#!/bin/sh # set -x # a bunch of cleaning up ... make certain everything will be regenerated rm -f Makefile Makefile.in aclocal.m4 rm -rf autom4te.cache rm -f m4/* rm -f config.* configure depcomp rm -f install-sh intltool-* libtool ltmain.sh missing mkinstalldirs rm -f stamp-* vipsCC-7.19.pc vips-7.19.spec vips-7.19.pc rm -f swig/vipsCC/*.cxx rm -f swig/vipsCC/VImage.h rm -f swig/vipsCC/VImage.py python/vipsCC/VError.py python/vipsCC/VMask.py python/vipsCC/Display.py rm -f benchmark/temp* ( cd doc ; mkdir poop ; mv reference/libvips-docs.sgml.in poop ; mv reference/Makefile.am poop ; mv reference/images poop ; rm -rf reference/* ; mv poop/* reference ; rmdir poop ) # glib-gettextize asks us to copy these files to m4 if they aren't there # I don't have $ACDIR/isc-posix.m4, how mysterious ACDIR=`aclocal --print-ac-dir` # OS X with brew sets ACDIR to # /usr/local/Cellar/automake/1.13.1/share/aclocal, the staging area, which is # totally wrong argh if [ ! -d $ACDIR ]; then ACDIR=/usr/local/share/aclocal fi mkdir -p m4 cp $ACDIR/codeset.m4 m4 cp $ACDIR/gettext.m4 m4 cp $ACDIR/glibc21.m4 m4 cp $ACDIR/iconv.m4 m4 cp $ACDIR/isc-posix.m4 m4 cp $ACDIR/lcmessage.m4 m4 cp $ACDIR/progtest.m4 m4 cp $ACDIR/introspection.m4 m4 gtkdocize --copy --docdir doc/reference --flavour no-tmpl || exit 1 # some systems need libtoolize, some glibtoolize ... how annoying echo testing for glibtoolize ... if glibtoolize --version >/dev/null 2>&1; then LIBTOOLIZE=glibtoolize echo using glibtoolize else LIBTOOLIZE=libtoolize echo using libtoolize fi test -r aclocal.m4 || touch aclocal.m4 glib-gettextize --force --copy test -r aclocal.m4 && chmod u+w aclocal.m4 # intltoolize --copy --force --automake aclocal autoconf autoheader $LIBTOOLIZE --copy --force --automake automake --add-missing --copy swig -version > /dev/null if [ $? -ne 0 ]; then echo you need swig to build from SVN fi vips-7.38.5/tools/0000755000175000017500000000000012303146331010734 500000000000000vips-7.38.5/tools/vipsthumbnail.c0000644000175000017500000004302112303140253013702 00000000000000/* VIPS thumbnailer * * 11/1/09 * * 13/1/09 * - decode labq and rad images * - colour management * - better handling of tiny images * 25/1/10 * - added "--delete" * 6/2/10 * - added "--interpolator" * - added "--nosharpen" * - better 'open' logic, test lazy flag now * 13/5/10 * - oops hehe residual sharpen test was reversed * - and the mask coefficients were messed up * 26/5/10 * - delete failed if there was a profile * 4/7/10 * - oops sharpening was turning off for integer shrinks, thanks Nicolas * 30/7/10 * - use new "rd" mode rather than our own open via disc * 8/2/12 * - use :seq mode for png images * - shrink to a scanline cache to ensure we request pixels sequentially * from the input * 13/6/12 * - update the sequential stuff to the general method * 21/6/12 * - remove "--nodelete" option, have a --delete option instead, off by * default * - much more gentle extra sharpening * 13/11/12 * - allow absolute paths in -o (thanks fuho) * 3/5/13 * - add optional sharpening mask from file * 10/7/13 * - rewrite for vips8 * - handle embedded jpeg thumbnails * 12/11/13 * - add --linear option * 18/12/13 * - add --crop option */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include static char *thumbnail_size = "128"; static int thumbnail_width = 128; static int thumbnail_height = 128; static char *output_format = "tn_%s.jpg"; static char *interpolator = "bilinear"; static char *export_profile = NULL; static char *import_profile = NULL; static char *convolution_mask = "mild"; static gboolean delete_profile = FALSE; static gboolean linear_processing = FALSE; static gboolean crop_image = FALSE; /* Deprecated and unused. */ static gboolean nosharpen = FALSE; static gboolean nodelete_profile = FALSE; static gboolean verbose = FALSE; static GOptionEntry options[] = { { "size", 's', 0, G_OPTION_ARG_STRING, &thumbnail_size, N_( "shrink to SIZE or to WIDTHxHEIGHT" ), N_( "SIZE" ) }, { "output", 'o', 0, G_OPTION_ARG_STRING, &output_format, N_( "set output to FORMAT" ), N_( "FORMAT" ) }, { "interpolator", 'p', 0, G_OPTION_ARG_STRING, &interpolator, N_( "resample with INTERPOLATOR" ), N_( "INTERPOLATOR" ) }, { "sharpen", 'r', 0, G_OPTION_ARG_STRING, &convolution_mask, N_( "sharpen with none|mild|MASKFILE" ), N_( "none|mild|MASKFILE" ) }, { "eprofile", 'e', 0, G_OPTION_ARG_STRING, &export_profile, N_( "export with PROFILE" ), N_( "PROFILE" ) }, { "iprofile", 'i', 0, G_OPTION_ARG_STRING, &import_profile, N_( "import untagged images with PROFILE" ), N_( "PROFILE" ) }, { "linear", 'a', 0, G_OPTION_ARG_NONE, &linear_processing, N_( "process in linear space" ), NULL }, { "crop", 'c', 0, G_OPTION_ARG_NONE, &crop_image, N_( "crop exactly to SIZE" ), NULL }, { "delete", 'd', 0, G_OPTION_ARG_NONE, &delete_profile, N_( "delete profile from exported image" ), NULL }, { "verbose", 'v', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &verbose, N_( "(deprecated, does nothing)" ), NULL }, { "nodelete", 'l', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &nodelete_profile, N_( "(deprecated, does nothing)" ), NULL }, { "nosharpen", 'n', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &nosharpen, N_( "(deprecated, does nothing)" ), NULL }, { NULL } }; /* Calculate the shrink factors. * * We shrink in two stages: first, a shrink with a block average. This can * only accurately shrink by integer factors. We then do a second shrink with * a supplied interpolator to get the exact size we want. */ static int calculate_shrink( int width, int height, double *residual ) { /* Calculate the horizontal and vertical shrink we'd need to fit the * image to the bounding box, and pick the biggest. * * In crop mode we aim to fill the bounding box, so we must use the * smaller axis. */ double horizontal = (double) width / thumbnail_width; double vertical = (double) height / thumbnail_height; double factor = crop_image ? VIPS_MIN( horizontal, vertical ) : VIPS_MAX( horizontal, vertical ); /* If the shrink factor is <= 1.0, we need to zoom rather than shrink. * Just set the factor to 1 in this case. */ double factor2 = factor < 1.0 ? 1.0 : factor; /* Int component of shrink. */ int shrink = floor( factor2 ); if( residual ) { /* Width after int shrink. */ int iwidth = width / shrink; /* Therefore residual scale factor is. */ *residual = (width / factor) / iwidth; } return( shrink ); } /* Find the best jpeg preload shrink. */ static int thumbnail_find_jpegshrink( VipsImage *im ) { int shrink = calculate_shrink( im->Xsize, im->Ysize, NULL ); /* We can't use pre-shrunk images in linear mode. libjpeg shrinks in Y * (of YCbCR), not linear space. */ if( linear_processing ) return( 1 ); else if( shrink >= 8 ) return( 8 ); else if( shrink >= 4 ) return( 4 ); else if( shrink >= 2 ) return( 2 ); else return( 1 ); } #define THUMBNAIL "jpeg-thumbnail-data" /* Try to read an embedded thumbnail. */ static VipsImage * thumbnail_get_thumbnail( VipsImage *im ) { void *ptr; size_t size; VipsImage *thumb; double residual; int jpegshrink; if( !vips_image_get_typeof( im, THUMBNAIL ) || vips_image_get_blob( im, THUMBNAIL, &ptr, &size ) || vips_jpegload_buffer( ptr, size, &thumb, NULL ) ) { vips_info( "vipsthumbnail", "no jpeg thumbnail" ); return( NULL ); } calculate_shrink( thumb->Xsize, thumb->Ysize, &residual ); if( residual > 1.0 ) { vips_info( "vipsthumbnail", "jpeg thumbnail too small" ); g_object_unref( thumb ); return( NULL ); } /* Reload with the correct downshrink. */ jpegshrink = thumbnail_find_jpegshrink( thumb ); vips_info( "vipsthumbnail", "loading jpeg thumbnail with factor %d pre-shrink", jpegshrink ); g_object_unref( thumb ); if( vips_jpegload_buffer( ptr, size, &thumb, "shrink", jpegshrink, NULL ) ) { vips_info( "vipsthumbnail", "jpeg thumbnail reload failed" ); return( NULL ); } vips_info( "vipsthumbnail", "using %dx%d jpeg thumbnail", thumb->Xsize, thumb->Ysize ); return( thumb ); } /* Open an image, returning the best version of that image for thumbnailing. * * jpegs can have embedded thumbnails ... use that if it's large enough. * * libjpeg supports fast shrink-on-read, so if we have a JPEG, we can ask * VIPS to load a lower resolution version. */ static VipsImage * thumbnail_open( VipsObject *process, const char *filename ) { const char *loader; VipsImage *im; vips_info( "vipsthumbnail", "thumbnailing %s", filename ); if( linear_processing ) vips_info( "vipsthumbnail", "linear mode" ); if( !(loader = vips_foreign_find_load( filename )) ) return( NULL ); vips_info( "vipsthumbnail", "selected loader is %s", loader ); if( strcmp( loader, "VipsForeignLoadJpegFile" ) == 0 ) { VipsImage *thumb; /* This will just read in the header and is quick. */ if( !(im = vips_image_new_from_file( filename )) ) return( NULL ); /* Try to read an embedded thumbnail. If we find one, use that * instead. */ if( (thumb = thumbnail_get_thumbnail( im )) ) { /* @thumb has not been fully decoded yet ... * we must not close @im * until we're done with @thumb. */ vips_object_local( VIPS_OBJECT( thumb ), im ); im = thumb; } else { int jpegshrink; vips_info( "vipsthumbnail", "processing main jpeg image" ); jpegshrink = thumbnail_find_jpegshrink( im ); g_object_unref( im ); vips_info( "vipsthumbnail", "loading jpeg with factor %d pre-shrink", jpegshrink ); if( vips_foreign_load( filename, &im, "access", VIPS_ACCESS_SEQUENTIAL, "shrink", jpegshrink, NULL ) ) return( NULL ); } } else { /* All other formats. */ if( vips_foreign_load( filename, &im, "access", VIPS_ACCESS_SEQUENTIAL, NULL ) ) return( NULL ); } vips_object_local( process, im ); return( im ); } static VipsInterpolate * thumbnail_interpolator( VipsObject *process, VipsImage *in ) { double residual; VipsInterpolate *interp; calculate_shrink( in->Xsize, in->Ysize, &residual ); /* For images smaller than the thumbnail, we upscale with nearest * neighbor. Otherwise we makes thumbnails that look fuzzy and awful. */ if( !(interp = VIPS_INTERPOLATE( vips_object_new_from_string( g_type_class_ref( VIPS_TYPE_INTERPOLATE ), residual > 1.0 ? "nearest" : interpolator ) )) ) return( NULL ); vips_object_local( process, interp ); return( interp ); } /* Some interpolators look a little soft, so we have an optional sharpening * stage. */ static VipsImage * thumbnail_sharpen( VipsObject *process ) { VipsImage *mask; if( strcmp( convolution_mask, "none" ) == 0 ) mask = NULL; else if( strcmp( convolution_mask, "mild" ) == 0 ) { mask = vips_image_new_matrixv( 3, 3, -1.0, -1.0, -1.0, -1.0, 32.0, -1.0, -1.0, -1.0, -1.0 ); vips_image_set_double( mask, "scale", 24 ); } else if( !(mask = vips_image_new_from_file( convolution_mask )) ) vips_error_exit( "unable to load sharpen mask" ); if( mask ) vips_object_local( process, mask ); return( mask ); } static VipsImage * thumbnail_shrink( VipsObject *process, VipsImage *in, VipsInterpolate *interp, VipsImage *sharpen ) { VipsImage **t = (VipsImage **) vips_object_local_array( process, 10 ); VipsInterpretation interpretation = linear_processing ? VIPS_INTERPRETATION_XYZ : VIPS_INTERPRETATION_sRGB; int shrink; double residual; int tile_width; int tile_height; int nlines; /* RAD needs special unpacking. */ if( in->Coding == VIPS_CODING_RAD ) { vips_info( "vipsthumbnail", "unpacking Rad to float" ); /* rad is scrgb. */ if( vips_rad2float( in, &t[0], NULL ) ) return( NULL ); in = t[0]; } /* In linear mode, we import right at the start. * * This is only going to work for images in device space. If you have * an image in PCS which also has an attached profile, strange things * will happen. */ if( linear_processing && in->Coding == VIPS_CODING_NONE && (in->BandFmt == VIPS_FORMAT_UCHAR || in->BandFmt == VIPS_FORMAT_USHORT) && (vips_image_get_typeof( in, VIPS_META_ICC_NAME ) || import_profile) ) { if( vips_image_get_typeof( in, VIPS_META_ICC_NAME ) ) vips_info( "vipsthumbnail", "importing with embedded profile" ); else vips_info( "vipsthumbnail", "importing with profile %s", import_profile ); if( vips_icc_import( in, &t[1], "input_profile", import_profile, "embedded", TRUE, "pcs", VIPS_PCS_XYZ, NULL ) ) return( NULL ); in = t[1]; } /* To the processing colourspace. This will unpack LABQ as well. */ vips_info( "vipsthumbnail", "converting to processing space %s", vips_enum_nick( VIPS_TYPE_INTERPRETATION, interpretation ) ); if( vips_colourspace( in, &t[2], interpretation, NULL ) ) return( NULL ); in = t[2]; shrink = calculate_shrink( in->Xsize, in->Ysize, &residual ); vips_info( "vipsthumbnail", "integer shrink by %d", shrink ); if( vips_shrink( in, &t[3], shrink, shrink, NULL ) ) return( NULL ); in = t[3]; /* We want to make sure we read the image sequentially. * However, the convolution we may be doing later will force us * into SMALLTILE or maybe FATSTRIP mode and that will break * sequentiality. * * So ... read into a cache where tiles are scanlines, and make sure * we keep enough scanlines to be able to serve a line of tiles. * * We use a threaded tilecache to avoid a deadlock: suppose thread1, * evaluating the top block of the output, is delayed, and thread2, * evaluating the second block, gets here first (this can happen on * a heavily-loaded system). * * With an unthreaded tilecache (as we had before), thread2 will get * the cache lock and start evaling the second block of the shrink. * When it reaches the png reader it will stall until the first block * has been used ... but it never will, since thread1 will block on * this cache lock. */ vips_get_tile_size( in, &tile_width, &tile_height, &nlines ); if( vips_tilecache( in, &t[4], "tile_width", in->Xsize, "tile_height", 10, "max_tiles", (nlines * 2) / 10, "access", VIPS_ACCESS_SEQUENTIAL, "threaded", TRUE, NULL ) || vips_affine( t[4], &t[5], residual, 0, 0, residual, "interpolate", interp, NULL ) ) return( NULL ); in = t[5]; vips_info( "vipsthumbnail", "residual scale by %g", residual ); vips_info( "vipsthumbnail", "%s interpolation", VIPS_OBJECT_GET_CLASS( interp )->nickname ); /* Colour management. * * In linear mode, just export. In device space mode, do a combined * import/export to transform to the target space. */ if( linear_processing ) { if( export_profile || vips_image_get_typeof( in, VIPS_META_ICC_NAME ) ) { vips_info( "vipsthumbnail", "exporting to device space with a profile" ); if( vips_icc_export( in, &t[7], "output_profile", export_profile, NULL ) ) return( NULL ); in = t[7]; } else { vips_info( "vipsthumbnail", "converting to sRGB" ); if( vips_colourspace( in, &t[6], VIPS_INTERPRETATION_sRGB, NULL ) ) return( NULL ); in = t[6]; } } else if( export_profile && (vips_image_get_typeof( in, VIPS_META_ICC_NAME ) || import_profile) ) { if( vips_image_get_typeof( in, VIPS_META_ICC_NAME ) ) vips_info( "vipsthumbnail", "importing with embedded profile" ); else vips_info( "vipsthumbnail", "importing with profile %s", import_profile ); vips_info( "vipsthumbnail", "exporting with profile %s", export_profile ); if( vips_icc_transform( in, &t[6], export_profile, "input_profile", import_profile, "embedded", TRUE, NULL ) ) return( NULL ); in = t[6]; } /* If we are upsampling, don't sharpen, since nearest looks dumb * sharpened. */ if( shrink >= 1 && residual <= 1.0 && sharpen ) { vips_info( "vipsthumbnail", "sharpening thumbnail" ); if( vips_conv( in, &t[8], sharpen, NULL ) ) return( NULL ); in = t[8]; } if( delete_profile && vips_image_get_typeof( in, VIPS_META_ICC_NAME ) ) { vips_info( "vipsthumbnail", "deleting profile from output image" ); if( !vips_image_remove( in, VIPS_META_ICC_NAME ) ) return( NULL ); } return( in ); } /* Crop down to the final size, if crop_image is set. */ static VipsImage * thumbnail_crop( VipsObject *process, VipsImage *im ) { VipsImage **t = (VipsImage **) vips_object_local_array( process, 2 ); if( crop_image ) { int left = (im->Xsize - thumbnail_width) / 2; int top = (im->Ysize - thumbnail_height) / 2; if( vips_extract_area( im, &t[0], left, top, thumbnail_width, thumbnail_height, NULL ) ) return( NULL ); im = t[0]; } return( im ); } /* Given (eg.) "/poop/somefile.png", write @im to the thumbnail name, * (eg.) "/poop/tn_somefile.jpg". */ static int thumbnail_write( VipsImage *im, const char *filename ) { char *file; char *p; char buf[FILENAME_MAX]; char *output_name; file = g_path_get_basename( filename ); /* Remove the suffix from the file portion. */ if( (p = strrchr( file, '.' )) ) *p = '\0'; /* output_format can be an absolute path, in which case we discard the * path from the incoming file. */ vips_snprintf( buf, FILENAME_MAX, output_format, file ); if( g_path_is_absolute( output_format ) ) output_name = g_strdup( buf ); else { char *dir; dir = g_path_get_dirname( filename ); output_name = g_build_filename( dir, buf, NULL ); g_free( dir ); } vips_info( "vipsthumbnail", "thumbnailing %s as %s", filename, output_name ); g_free( file ); if( vips_image_write_to_file( im, output_name ) ) { g_free( output_name ); return( -1 ); } g_free( output_name ); return( 0 ); } static int thumbnail_process( VipsObject *process, const char *filename ) { VipsImage *sharpen = thumbnail_sharpen( process ); VipsImage *in; VipsInterpolate *interp; VipsImage *thumbnail; VipsImage *crop; if( !(in = thumbnail_open( process, filename )) || !(interp = thumbnail_interpolator( process, in )) || !(thumbnail = thumbnail_shrink( process, in, interp, sharpen )) || !(crop = thumbnail_crop( process, thumbnail )) || thumbnail_write( crop, filename ) ) return( -1 ); return( 0 ); } int main( int argc, char **argv ) { GOptionContext *context; GError *error = NULL; int i; if( vips_init( argv[0] ) ) vips_error_exit( "unable to start VIPS" ); textdomain( GETTEXT_PACKAGE ); setlocale( LC_ALL, "" ); context = g_option_context_new( _( "- thumbnail generator" ) ); g_option_context_add_main_entries( context, options, GETTEXT_PACKAGE ); g_option_context_add_group( context, vips_get_option_group() ); if( !g_option_context_parse( context, &argc, &argv, &error ) ) { if( error ) { fprintf( stderr, "%s\n", error->message ); g_error_free( error ); } vips_error_exit( "try \"%s --help\"", g_get_prgname() ); } g_option_context_free( context ); if( sscanf( thumbnail_size, "%d x %d", &thumbnail_width, &thumbnail_height ) != 2 ) { if( sscanf( thumbnail_size, "%d", &thumbnail_width ) != 1 ) vips_error_exit( "unable to parse size \"%s\" -- " "use eg. 128 or 200x300", thumbnail_size ); thumbnail_height = thumbnail_width; } for( i = 1; i < argc; i++ ) { /* Hang resources for processing this thumbnail off @process. */ VipsObject *process = VIPS_OBJECT( vips_image_new() ); if( thumbnail_process( process, argv[i] ) ) { fprintf( stderr, "%s: unable to thumbnail %s\n", argv[0], argv[i] ); fprintf( stderr, "%s", vips_error_buffer() ); vips_error_clear(); } g_object_unref( process ); } vips_shutdown(); return( 0 ); } vips-7.38.5/tools/vips.c0000644000175000017500000006533512303140253012012 00000000000000/* VIPS universal main program. * * J. Cupitt, 8/4/93. * 12/5/06 * - use GOption. g_*_prgname() * 16/7/06 * - hmm, was broken for function name as argv1 case * 11/7/06 * - add "all" option to -l * 14/7/06 * - ignore "--" arguments. * 2/9/06 * - do less init ... im_init_world() does more now * 18/8/06 * - use IM_EXEEXT * 16/10/06 * - add --version * 17/10/06 * - add --swig * - cleanups * - remove --swig again, sigh * - add throw() decls to C++ to help SWIG * 14/1/07 * - add --list packages * 26/2/07 * - add input *VEC arg types to C++ binding * 17/8/08 * - add --list formats * 29/11/08 * - add --list interpolators * 9/2/09 * - and now we just have --list packages/classes/package-name * 13/11/09 * - drop _f postfixes, drop many postfixes * 24/6/10 * - less chatty error messages * - oops, don't rename "copy_set" as "copy_" * 6/2/12 * - long arg names in decls to help SWIG * - don't wrap im_remainderconst_vec() * 31/12/12 * - parse options in two passes (thanks Haida) */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG #define DEBUG_FATAL */ /* Need to disable these sometimes. #undef DEBUG_FATAL */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #ifdef OS_WIN32 #define strcasecmp(a,b) _stricmp(a,b) #endif static char *main_option_plugin = NULL; static gboolean *main_option_version; static GOptionEntry main_option[] = { { "plugin", 'p', 0, G_OPTION_ARG_FILENAME, &main_option_plugin, N_( "load PLUGIN" ), N_( "PLUGIN" ) }, { "version", 'v', 0, G_OPTION_ARG_NONE, &main_option_version, N_( "print version" ), NULL }, { NULL } }; typedef void *(*map_name_fn)( im_function * ); /* Loop over a package. */ static void * map_package( im_package *pack, map_name_fn fn ) { int i; void *result; for( i = 0; i < pack->nfuncs; i++ ) if( (result = fn( pack->table[i] )) ) return( result ); return( NULL ); } /* Apply a function to a vips operation, or map over a package of operations. */ static void * map_name( const char *name, map_name_fn fn ) { im_package *pack; im_function *func; if( !name || strcmp( name, "all" ) == 0 ) /* Do all packages. */ im_map_packages( (VSListMap2Fn) map_package, fn ); else if( (pack = im_find_package( name )) ) /* Do one package. */ map_package( pack, fn ); else if( (func = im_find_function( name )) ) /* Do a single function. */ fn( func ); else { im_error( "map_name", _( "no package or function \"%s\"" ), name ); return( fn ); } return( NULL ); } static void * list_package( im_package *pack ) { printf( "%-20s - %d operations\n", pack->name, pack->nfuncs ); return( NULL ); } static void * list_function( im_function *func ) { printf( "%-20s - %s\n", func->name, _( func->desc ) ); return( NULL ); } static void * list_class( GType type ) { int depth = vips_type_depth( type ); int i; for( i = 0; i < depth * 2; i++ ) printf( " " ); vips_object_print_summary_class( VIPS_OBJECT_CLASS( g_type_class_ref( type ) ) ); return( NULL ); } static int print_list( int argc, char **argv ) { if( !argv[0] || strcmp( argv[0], "packages" ) == 0 ) im_map_packages( (VSListMap2Fn) list_package, NULL ); else if( strcmp( argv[0], "classes" ) == 0 ) vips_type_map_all( g_type_from_name( "VipsObject" ), (VipsTypeMapFn) list_class, NULL ); else if( g_type_from_name( argv[0] ) && g_type_is_a( g_type_from_name( argv[0] ), VIPS_TYPE_OBJECT ) ) { vips_type_map_all( g_type_from_name( argv[0] ), (VipsTypeMapFn) list_class, NULL ); } else { if( map_name( argv[0], list_function ) ) error_exit( "unknown package \"%s\"", argv[0] ); } return( 0 ); } /* Print "ln -s" lines for this package. */ static void * print_links_package( im_package *pack ) { int i; for( i = 0; i < pack->nfuncs; i++ ) printf( "rm -f %s" IM_EXEEXT "; " "ln -s vips" IM_EXEEXT " %s" IM_EXEEXT "\n", pack->table[i]->name, pack->table[i]->name ); return( NULL ); } /* Print "ln -s" lines for this package. */ static int print_links( int argc, char **argv ) { im_map_packages( (VSListMap2Fn) print_links_package, NULL ); return( 0 ); } /* Does a function have any printing output? */ static int has_print( im_function *fn ) { int i; for( i = 0; i < fn->argc; i++ ) if( fn->argv[i].print ) return( -1 ); return( 0 ); } /* Print a usage string from an im_function descriptor. */ static void usage( im_function *fn ) { int i; im_package *pack = im_package_of_function( fn->name ); /* Don't print the prgname if we're being run as a symlink. */ fprintf( stderr, "usage: " ); if( im_isprefix( "vips", g_get_prgname() ) ) fprintf( stderr, "%s ", g_get_prgname() ); fprintf( stderr, "%s ", fn->name ); /* Print args requiring command-line input. */ for( i = 0; i < fn->argc; i++ ) if( fn->argv[i].desc->flags & IM_TYPE_ARG ) fprintf( stderr, "%s ", fn->argv[i].name ); /* Print types of command line args. */ fprintf( stderr, "\nwhere:\n" ); for( i = 0; i < fn->argc; i++ ) if( fn->argv[i].desc->flags & IM_TYPE_ARG ) fprintf( stderr, "\t%s is of type \"%s\"\n", fn->argv[i].name, fn->argv[i].desc->type ); /* Print output print args. */ if( has_print( fn ) ) { fprintf( stderr, "prints:\n" ); for( i = 0; i < fn->argc; i++ ) if( fn->argv[i].print ) fprintf( stderr, "\t%s of type \"%s\"\n", fn->argv[i].name, fn->argv[i].desc->type ); } /* Print description of this function, and package it comes from. */ fprintf( stderr, "%s", _( fn->desc ) ); if( pack ) fprintf( stderr, ", from package \"%s\"", pack->name ); fprintf( stderr, "\n" ); /* Print any flags this function has. */ fprintf( stderr, "flags: " ); if( fn->flags & IM_FN_PIO ) fprintf( stderr, "(PIO function) " ); else fprintf( stderr, "(WIO function) " ); if( fn->flags & IM_FN_TRANSFORM ) fprintf( stderr, "(coordinate transformer) " ); else fprintf( stderr, "(no coordinate transformation) " ); if( fn->flags & IM_FN_PTOP ) fprintf( stderr, "(point-to-point operation) " ); else fprintf( stderr, "(area operation) " ); if( fn->flags & IM_FN_NOCACHE ) fprintf( stderr, "(nocache operation) " ); else fprintf( stderr, "(result can be cached) " ); fprintf( stderr, "\n" ); } /* Convert VIPS type name to C++ type name. NULL for type unsupported by C++ * layer. */ static char * vips2cpp( im_type_desc *ty ) { int k; /* VIPS types. */ static char *vtypes[] = { IM_TYPE_DOUBLE, IM_TYPE_INT, IM_TYPE_COMPLEX, IM_TYPE_STRING, IM_TYPE_IMAGE, IM_TYPE_IMASK, IM_TYPE_DMASK, IM_TYPE_DISPLAY, IM_TYPE_IMAGEVEC, IM_TYPE_DOUBLEVEC, IM_TYPE_INTVEC, IM_TYPE_INTERPOLATE }; /* Corresponding C++ types. */ static char *ctypes[] = { "double", "int", "std::complex", "char*", "VImage", "VIMask", "VDMask", "VDisplay", "std::vector", "std::vector", "std::vector", "char*" }; for( k = 0; k < IM_NUMBER( vtypes ); k++ ) if( strcmp( ty->type, vtypes[k] ) == 0 ) return( ctypes[k] ); return( NULL ); } /* Test a function definition for C++ suitability. */ static int is_cppable( im_function *fn ) { int j; /* Don't wrap im_remainderconst_vec(). * * This has been replaced by the saner name im_remainder_vec(). If we * generate wrappers for both names we get a overloading clash. */ if( strcmp( fn->name, "im_remainderconst_vec" ) == 0 ) return( 0 ); /* Check we know all the types. */ for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty = fn->argv[j].desc; if( !vips2cpp( ty ) ) return( 0 ); } /* We dont wrap output IMAGEVEC/DOUBLEVEC/INTVEC. */ for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty = fn->argv[j].desc; if( ty->flags & IM_TYPE_OUTPUT ) if( strcmp( ty->type, IM_TYPE_IMAGEVEC ) == 0 || strcmp( ty->type, IM_TYPE_DOUBLEVEC ) == 0 || strcmp( ty->type, IM_TYPE_INTVEC ) == 0 ) return( 0 ); } /* Must be at least one image argument (input or output) ... since we * get inserted in the VImage class. Other funcs get wrapped by hand. */ for( j = 0; j < fn->argc; j++ ) if( strcmp( fn->argv[j].desc->type, IM_TYPE_IMAGE ) == 0 ) break; if( j == fn->argc ) return( 0 ); return( -1 ); } /* Search for the first output arg, and the first IMAGE input arg. */ static void find_ioargs( im_function *fn, int *ia, int *oa ) { int j; /* Look for first output arg - this will be the result of the * function. */ *oa = -1; for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty = fn->argv[j].desc; if( ty->flags & IM_TYPE_OUTPUT ) { *oa = j; break; } } /* Look for first input IMAGE arg. This will become the implicit * "this" arg. */ *ia = -1; for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty = fn->argv[j].desc; if( !(ty->flags & IM_TYPE_OUTPUT) && strcmp( ty->type, IM_TYPE_IMAGE ) == 0 ) { *ia = j; break; } } } static gboolean drop_postfix( char *str, const char *postfix ) { if( vips_ispostfix( str, postfix ) ) { str[strlen( str ) - strlen( postfix )] = '\0'; return( TRUE ); } return( FALSE ); } /* Turn a VIPS name into a C++ name. Eg. im_lintra_vec becomes lin. */ static void c2cpp_name( const char *in, char *out ) { static const char *dont_drop[] = { "_set", }; static const char *drop[] = { "_vec", "const", "tra", "set", "_f" }; int i; gboolean changed; /* Copy, chopping off "im_" prefix. */ if( vips_isprefix( "im_", in ) ) strcpy( out, in + 3 ); else strcpy( out, in ); /* Repeatedly drop postfixes while we can. Stop if we see a dont_drop * postfix. */ do { gboolean found; found = FALSE; for( i = 0; i < IM_NUMBER( dont_drop ); i++ ) if( vips_ispostfix( out, dont_drop[i] ) ) { found = TRUE; break; } if( found ) break; changed = FALSE; for( i = 0; i < IM_NUMBER( drop ); i++ ) changed |= drop_postfix( out, drop[i] ); } while( changed ); } /* Print prototype for a function (ie. will be followed by code). * * Eg.: * VImage VImage::lin( double a, double b ) throw( VError ) */ static void * print_cppproto( im_function *fn ) { int j; char name[4096]; int oa, ia; int flg; /* If it's not cppable, do nothing. */ if( !is_cppable( fn ) ) return( NULL ); /* Make C++ name. */ c2cpp_name( fn->name, name ); /* Find input and output args. */ find_ioargs( fn, &ia, &oa ); /* Print output type. */ if( oa == -1 ) printf( "void " ); else printf( "%s ", vips2cpp( fn->argv[oa].desc ) ); printf( "VImage::%s(", name ); /* Print arg list. */ flg = 0; for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty = fn->argv[j].desc; /* Skip ia and oa. */ if( j == ia || j == oa ) continue; /* Print arg type. */ if( flg ) printf( ", %s", vips2cpp( ty ) ); else { printf( " %s", vips2cpp( ty ) ); flg = 1; } /* If it's an putput arg, print a "&" to make a reference * argument. */ if( ty->flags & IM_TYPE_OUTPUT ) printf( "&" ); /* Print arg name. */ printf( " %s", fn->argv[j].name ); } /* End of arg list! */ if( flg ) printf( " " ); printf( ") throw( VError )\n" ); return( NULL ); } /* Print cpp decl for a function. * * Eg. * VImage lin( double, double ) throw( VError ); */ static void * print_cppdecl( im_function *fn ) { int j; char name[4096]; int oa, ia; int flg; /* If it's not cppable, do nothing. */ if( !is_cppable( fn ) ) return( NULL ); /* Make C++ name. */ c2cpp_name( fn->name, name ); /* Find input and output args. */ find_ioargs( fn, &ia, &oa ); if( ia == -1 ) /* No input image, so make it a static in the class * declaration. */ printf( "static " ); /* Print output type. */ if( oa == -1 ) printf( "void " ); else printf( "%s ", vips2cpp( fn->argv[oa].desc ) ); /* Print function name and start arg list. */ printf( "%s(", name ); /* Print arg list. */ flg = 0; for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty = fn->argv[j].desc; /* Skip ia and oa. */ if( j == ia || j == oa ) continue; /* Print arg type. */ if( flg ) printf( ", %s", vips2cpp( ty ) ); else { printf( " %s", vips2cpp( ty ) ); flg = 1; } /* If it's an putput arg, print a "&" to make a reference * argument. */ if( ty->flags & IM_TYPE_OUTPUT ) printf( "&" ); /* Print arg name. * * Prepend the member name to make the arg * unique. This is important for SWIG since it needs to have * unique names for %apply. */ printf( " %s_%s", name, fn->argv[j].name ); } /* End of arg list! */ if( flg ) printf( " " ); printf( ") throw( VError );\n" ); return( NULL ); } static void print_invec( int j, const char *arg, const char *vips_name, const char *c_name, const char *extract ) { printf( "\t((%s*) _vec.data(%d))->n = %s.size();\n", vips_name, j, arg ); printf( "\t((%s*) _vec.data(%d))->vec = new %s[%s.size()];\n", vips_name, j, c_name, arg ); printf( "\tfor( unsigned int i = 0; i < %s.size(); i++ )\n", arg ); printf( "\t\t((%s*) _vec.data(%d))->vec[i] = %s[i]%s;\n", vips_name, j, arg, extract ); } /* Print the definition for a function. */ static void * print_cppdef( im_function *fn ) { int j; int ia, oa; /* If it's not cppable, do nothing. */ if( !is_cppable( fn ) ) return( NULL ); find_ioargs( fn, &ia, &oa ); printf( "// %s: %s\n", fn->name, _( fn->desc ) ); print_cppproto( fn ); printf( "{\n" ); /* Declare the implicit input image. */ if( ia != -1 ) printf( "\tVImage %s = *this;\n", fn->argv[ia].name ); /* Declare return value, if any. */ if( oa != -1 ) printf( "\t%s %s;\n\n", vips2cpp( fn->argv[oa].desc ), fn->argv[oa].name ); /* Declare the arg vector. */ printf( "\tVargv _vec( \"%s\" );\n\n", fn->name ); /* Create the input args. */ for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty = fn->argv[j].desc; /* Images are special - have to init the vector, even * for output args. Have to translate VImage. */ if( strcmp( ty->type, IM_TYPE_IMAGE ) == 0 ) { printf( "\t_vec.data(%d) = %s.image();\n", j, fn->argv[j].name ); continue; } /* For output masks, we have to set an input filename. Not * freed, so constant string is OK. */ if( (ty->flags & IM_TYPE_OUTPUT) && (strcmp( ty->type, IM_TYPE_IMASK ) == 0 || strcmp( ty->type, IM_TYPE_DMASK ) == 0) ) { printf( "\t((im_mask_object*) _vec.data(%d))->name = " "(char*)\"noname\";\n", j ); continue; } /* Skip other output args. */ if( ty->flags & IM_TYPE_OUTPUT ) continue; if( strcmp( ty->type, IM_TYPE_IMASK ) == 0 ) /* Mask types are different - have to use * im_mask_object. */ printf( "\t((im_mask_object*) " "_vec.data(%d))->mask = %s.mask().iptr;\n", j, fn->argv[j].name ); else if( strcmp( ty->type, IM_TYPE_DMASK ) == 0 ) printf( "\t((im_mask_object*) " "_vec.data(%d))->mask = %s.mask().dptr;\n", j, fn->argv[j].name ); else if( strcmp( ty->type, IM_TYPE_DISPLAY ) == 0 ) /* Display have to use VDisplay. */ printf( "\t_vec.data(%d) = %s.disp();\n", j, fn->argv[j].name ); else if( strcmp( ty->type, IM_TYPE_STRING ) == 0 ) /* Zap input strings directly into _vec. */ printf( "\t_vec.data(%d) = (im_object) %s;\n", j, fn->argv[j].name ); else if( strcmp( ty->type, IM_TYPE_IMAGEVEC ) == 0 ) print_invec( j, fn->argv[j].name, "im_imagevec_object", "IMAGE *", ".image()" ); else if( strcmp( ty->type, IM_TYPE_DOUBLEVEC ) == 0 ) print_invec( j, fn->argv[j].name, "im_doublevec_object", "double", "" ); else if( strcmp( ty->type, IM_TYPE_INTVEC ) == 0 ) print_invec( j, fn->argv[j].name, "im_intvec_object", "int", "" ); else if( strcmp( ty->type, IM_TYPE_INTERPOLATE ) == 0 ) { printf( "\tif( vips__input_interpolate_init( " "&_vec.data(%d), %s ) )\n", j, fn->argv[j].name ); printf( "\t\tverror();\n" ); } else /* Just use vips2cpp(). */ printf( "\t*((%s*) _vec.data(%d)) = %s;\n", vips2cpp( ty ), j, fn->argv[j].name ); } /* Call function. */ printf( "\t_vec.call();\n" ); /* Extract output args. */ for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty = fn->argv[j].desc; /* Skip input args. */ if( !(ty->flags & IM_TYPE_OUTPUT) ) continue; /* Skip images (done on input side, really). */ if( strcmp( ty->type, IM_TYPE_IMAGE ) == 0 ) continue; if( strcmp( ty->type, IM_TYPE_IMASK ) == 0 || strcmp( ty->type, IM_TYPE_DMASK ) == 0 ) /* Mask types are different - have to use * im_mask_object. */ printf( "\t%s.embed( (DOUBLEMASK *)((im_mask_object*)" "_vec.data(%d))->mask );\n", fn->argv[j].name, j ); else if( strcmp( ty->type, IM_TYPE_STRING ) == 0 ) /* Strings are grabbed out of the vec. */ printf( "\t%s = (char*) _vec.data(%d);\n", fn->argv[j].name, j ); else /* Just use vips2cpp(). */ printf( "\t%s = *((%s*)_vec.data(%d));\n", fn->argv[j].name, vips2cpp( ty ), j ); } /* Note dependancies if out is an image and this function uses * PIO. */ if( oa != -1 ) { im_type_desc *ty = fn->argv[oa].desc; if( strcmp( ty->type, IM_TYPE_IMAGE ) == 0 && (fn->flags & IM_FN_PIO) ) { /* Loop for all input args again .. */ for( j = 0; j < fn->argc; j++ ) { im_type_desc *ty2 = fn->argv[j].desc; /* Skip output args. */ if( ty2->flags & IM_TYPE_OUTPUT ) continue; /* Input image. */ if( strcmp( ty2->type, IM_TYPE_IMAGE ) == 0 ) printf( "\t%s._ref->addref( " "%s._ref );\n", fn->argv[oa].name, fn->argv[j].name ); else if( strcmp( ty2->type, IM_TYPE_IMAGEVEC ) == 0 ) { /* The out depends on every image in * the input vector. */ printf( "\tfor( unsigned int i = 0; " "i < %s.size(); i++ )\n", fn->argv[j].name ); printf( "\t\t%s._ref->addref( " "%s[i]._ref );\n", fn->argv[oa].name, fn->argv[j].name ); } } } } /* Return result. */ if( oa != -1 ) printf( "\n\treturn( %s );\n", fn->argv[oa].name ); printf( "}\n\n" ); return( NULL ); } /* Print C++ decls for function, package or all. */ static int print_cppdecls( int argc, char **argv ) { printf( "// this file automatically generated from\n" "// VIPS library %s\n", im_version_string() ); if( map_name( argv[0], print_cppdecl ) ) error_exit( NULL ); return( 0 ); } /* Print C++ bindings for function, package or all. */ static int print_cppdefs( int argc, char **argv ) { printf( "// this file automatically generated from\n" "// VIPS library %s\n", im_version_string() ); if( map_name( argv[0], print_cppdef ) ) error_exit( NULL ); return( 0 ); } static void action_list( VipsBuf *buf ); static int print_help( int argc, char **argv ) { char txt[1024]; VipsBuf buf = VIPS_BUF_STATIC( txt ); action_list( &buf ); printf( "%s", vips_buf_all( &buf ) ); return( 0 ); } /* All our built-in actions. */ typedef int (*Action)( int argc, char **argv ); typedef struct _ActionEntry { char *name; char *description; GOptionEntry *group; Action action; } ActionEntry; static GOptionEntry empty_options[] = { { NULL } }; static ActionEntry actions[] = { { "list", N_( "list classes|packages|all|package-name|operation-name" ), &empty_options[0], print_list }, { "cpph", N_( "generate headers for C++ binding" ), &empty_options[0], print_cppdecls }, { "cppc", N_( "generate bodies for C++ binding" ), &empty_options[0], print_cppdefs }, { "links", N_( "generate links for vips/bin" ), &empty_options[0], print_links }, { "help", N_( "list possible actions" ), &empty_options[0], print_help }, }; static void action_list( VipsBuf *buf ) { int i; vips_buf_appends( buf, _( "possible actions:\n" ) ); vips_buf_appendf( buf, "%7s - %s\n", "OPER", _( "execute vips operation OPER" ) ); for( i = 0; i < VIPS_NUMBER( actions ); i++ ) vips_buf_appendf( buf, "%7s - %s\n", actions[i].name, _( actions[i].description ) ); } static void parse_options( GOptionContext *context, int *argc, char **argv ) { char txt[1024]; VipsBuf buf = VIPS_BUF_STATIC( txt ); GError *error = NULL; int i, j; #ifdef DEBUG printf( "parse_options:\n" ); for( i = 0; i < *argc; i++ ) printf( "%d) %s\n", i, argv[i] ); #endif /*DEBUG*/ action_list( &buf ); g_option_context_set_summary( context, vips_buf_all( &buf ) ); if( !g_option_context_parse( context, argc, &argv, &error ) ) { if( error ) { fprintf( stderr, "%s\n", error->message ); g_error_free( error ); } error_exit( NULL ); } /* Remove any "--" argument. If one of our arguments is a negative * number, the user will need to have added the "--" flag to stop * GOption parsing. But "--" is still passed down to us and we need to * ignore it. */ for( i = 1; i < *argc - 1; i++ ) if( strcmp( argv[i], "--" ) == 0 ) { for( j = i; j < *argc; j++ ) argv[j] = argv[j + 1]; *argc -= 1; } } static GOptionGroup * add_operation_group( GOptionContext *context, VipsOperation *user_data ) { GOptionGroup *group; group = g_option_group_new( "operation", _( "Operation" ), _( "Operation help" ), user_data, NULL ); g_option_group_set_translation_domain( group, GETTEXT_PACKAGE ); g_option_context_add_group( context, group ); return( group ); } /* VIPS universal main program. */ int main( int argc, char **argv ) { char *action; GOptionContext *context; GOptionGroup *main_group; GOptionGroup *group; VipsOperation *operation; im_function *fn; int i, j; gboolean handled; GError *error = NULL; if( im_init_world( argv[0] ) ) error_exit( NULL ); textdomain( GETTEXT_PACKAGE ); setlocale( LC_ALL, "" ); #ifdef DEBUG_FATAL /* Set masks for debugging ... stop on any problem. */ g_log_set_always_fatal( G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL | G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING ); #endif /*!DEBUG_FATAL*/ context = g_option_context_new( _( "[ACTION] [OPTIONS] [PARAMETERS] - " "VIPS driver program" ) ); /* Add and parse the outermost options: the ones this program uses. * For example, we need * to be able to spot that in the case of "--plugin ./poop.plg" we * must remove two args. */ main_group = g_option_group_new( NULL, NULL, NULL, NULL, NULL ); g_option_group_add_entries( main_group, main_option ); g_option_group_set_translation_domain( main_group, GETTEXT_PACKAGE ); g_option_context_set_main_group( context, main_group ); /* Add the libvips options too. */ g_option_context_add_group( context, im_get_option_group() ); /* We add more options later, for example as options to vips8 * operations. Ignore any unknown options in this first parse. */ g_option_context_set_ignore_unknown_options( context, TRUE ); /* Also disable help output: we want to be able to display full help * in a second pass after all options have been created. */ g_option_context_set_help_enabled( context, FALSE ); if( !g_option_context_parse( context, &argc, &argv, &error ) ) { if( error ) { fprintf( stderr, "%s\n", error->message ); g_error_free( error ); } error_exit( NULL ); } if( main_option_plugin ) { if( !im_load_plugin( main_option_plugin ) ) error_exit( NULL ); } if( main_option_version ) printf( "vips-%s\n", im_version_string() ); /* Reenable help and unknown option detection ready for the second * option parse. */ g_option_context_set_ignore_unknown_options( context, FALSE ); g_option_context_set_help_enabled( context, TRUE ); /* Try to find our action. */ handled = FALSE; action = NULL; /* Should we try to run the thing we are named as? */ if( !im_isprefix( "vips", g_get_prgname() ) ) action = argv[0]; if( !action ) { /* Look for the first non-option argument, if any, and make * that our action. The parse above will have removed most of * them, but --help (for example) could still remain. */ for( i = 1; i < argc; i++ ) if( argv[i][0] != '-' ) { action = argv[i]; /* Remove the action from argv. */ for( j = i; j < argc; j++ ) argv[j] = argv[j + 1]; argc -= 1; break; } } /* Could be one of our built-in actions. */ if( action ) for( i = 0; i < VIPS_NUMBER( actions ); i++ ) if( strcmp( action, actions[i].name ) == 0 ) { group = add_operation_group( context, NULL ); g_option_group_add_entries( group, actions[i].group ); parse_options( context, &argc, argv ); if( actions[i].action( argc - 1, argv + 1 ) ) error_exit( "%s", action ); handled = TRUE; break; } /* Could be a vips7 im_function. We need to test for vips7 first, * since we don't want to use the vips7 compat wrappers in vips8 * unless we have to. They don't support all args types. */ if( action && !handled && (fn = im_find_function( action )) ) { if( im_run_command( action, argc - 1, argv + 1 ) ) { if( argc == 1 ) usage( fn ); else error_exit( NULL ); } handled = TRUE; } /* im_find_function() set an error msg. */ if( action && !handled ) im_error_clear(); /* Could be a vips8 VipsOperation. */ if( action && !handled && (operation = vips_operation_new( action )) ) { group = add_operation_group( context, operation ); vips_call_options( group, operation ); parse_options( context, &argc, argv ); if( vips_call_argv( operation, argc - 1, argv + 1 ) ) { if( argc == 1 ) vips_operation_class_print_usage( VIPS_OPERATION_GET_CLASS( operation ) ); vips_object_unref_outputs( VIPS_OBJECT( operation ) ); g_object_unref( operation ); error_exit( NULL ); } vips_object_unref_outputs( VIPS_OBJECT( operation ) ); g_object_unref( operation ); handled = TRUE; } /* vips_operation_new() sets an error msg for unknown operation. */ if( action && !handled ) im_error_clear(); if( action && !handled ) { print_help( argc, argv ); error_exit( _( "unknown action \"%s\"" ), action ); } /* Still not handled? We may not have called parse_options(), so * --help args may not have been processed. */ if( !handled ) parse_options( context, &argc, argv ); g_option_context_free( context ); vips_shutdown(); return( 0 ); } vips-7.38.5/tools/light_correct.in0000644000175000017500000000242712303140253014036 00000000000000#!/bin/sh # correct a set of files for illumination errors # usage: # # example% light_correct grey.v im1.v im2.v # # writes output images ic_im1.v and ic_im2.v # default prefix VIPSHOME=${VIPSHOME-@prefix@} # get name we were run as name=$0 bname=`basename $name` # names of our temp files t1=light_correct_temp1 t2=light_correct_temp2 # check args if [ $# -lt 2 ]; then echo "${bname}: usage: $bname ..." exit 1 fi echo "Preparing grey ..." grey=$1 shift # find image size width=`$VIPSHOME/bin/vips im_header_int Xsize $grey` height=`$VIPSHOME/bin/vips im_header_int Ysize $grey` # smooth the grey out $VIPSHOME/bin/vips im_shrink $grey $t1.v 20 20 $VIPSHOME/bin/vips im_resize_linear $t1.v $t2.v $width $height # and make the correction image mean=`$VIPSHOME/bin/vips im_avg $t2.v` $VIPSHOME/bin/vips im_powtra $t2.v $t1.v -1 $VIPSHOME/bin/vips im_lintra $mean $t1.v 0 $t2.v # grey correct images in order for i in "$@"; do echo "Correcting $i as ic_$i ..." $VIPSHOME/bin/vips im_multiply $t2.v "$i" $t1.v $VIPSHOME/bin/vips im_clip $t1.v "ic_$i" # remove the .desc as well name=`echo $name | sed -e 's/\.[^\.]*//'` /bin/rm -f "ic_$name.desc" done # more cleanup echo "Cleaning up ..." /bin/rm -f $t1.v $t1.desc /bin/rm -f $t2.v $t2.desc vips-7.38.5/tools/find_mosaic.c0000644000175000017500000002511112303140253013270 00000000000000/* Join together images. * * find_mosaic x y file_name .0x0.v .0x1.v ... * * Where the image has been take with patches named as * * . . * . . * .0x1.v .1x1.v .. * .0x0.v .1x0.v .. * * Uses im__find_lroverlap and im__find_tboverlap routines to make .v. * * It stores the tie points between patches in a data_file. * * It uses partials on all IO by including tbmerge / lrmerge programs. * * * Copyright (C) Feb./1995, Ahmed. Abbood * National Gallery. London * */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include #include #define NUM_FILES 1000 #define MAXPOINTS 60 int xoverlap; int yoverlap; extern int im_lrmerge(); extern int im_merge_analysis(); extern int im__find_lroverlap(); extern int im__find_tboverlap(); static int file_ptr = 0; static IMAGE *in[ NUM_FILES ]; /* Strategy: build a tree describing the sequence of joins we want. Walk the * tree assigning temporary file names, compile the tree into a linear * sequence of join commands. */ /* Decoded file name info. */ static char *file_root = NULL; static char *output_file = NULL; static int width = 0; /* Number of frames across */ static int height = 0; /* Number of frames down */ static int file_list[ NUM_FILES ]; /* Find the root name of a file name. Return new, shorter, string. */ static char * find_root( name ) char *name; { char *out = strdup( name ); char *p; /* Chop off '.v'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( NULL ); } *p = '\0'; /* Chop off nxn. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( NULL ); } *p = '\0'; return( out ); } /* Find the x position of a file name (extract n from .nxm.v). */ static int find_x( char *name ) { int n; char *p; char *out; out = strdup( name ); /* Chop off '.v'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } *p = '\0'; /* Find '.nxm'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } /* Read out x posn. */ if( sscanf( p, ".%dx%*d", &n ) != 1 ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } free( out ); return( n ); } /* Find the y position of a file name (extract m from .nxm.v). */ static int find_y( char *name ) { int m; char *p; char *out; out = strdup( name ); /* Chop off '.v'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } *p = '\0'; /* Find '.nxm'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } /* Read out y posn. */ if( sscanf( p, ".%*dx%d", &m ) != 1 ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } free( out ); return( m ); } static int mosaic_analysis(int width, int height,IMAGE **inp, IMAGE *out, int xoff, int yoff, int *vxdisp, int *vydisp,int *hxdisp, int *hydisp) { int i, j, dx, dy, curr_im, fx, fy; int halfcorsize, halfareasize; int mincorsize, minareasize; int prev_row, curr_row, curr_disp_x, curr_disp_y; double scale1, angle1, dx1, dy1; curr_im = -1; curr_disp_x = -1; curr_disp_y = -1; dy = -1; for(i=0; i<=height; i++){ for(j=0; j<=width; j++){ ++curr_im; halfcorsize = 5; halfareasize = 14; dx = xoff - inp[curr_im]->Xsize; dy = yoff - inp[curr_im]->Ysize; if( ( j < width ) && ( width > 0 ) ){ if( dx < 0 ){ mincorsize = (int)(inp[curr_im]->Xsize + dx - 1)/6; minareasize = (int)(inp[curr_im]->Xsize + dx - 3*halfcorsize -1)/2 - mincorsize; if(mincorsize > halfcorsize) mincorsize = halfcorsize; if( minareasize > 0 ){ if( minareasize < halfareasize ){ if( minareasize > (int)(halfcorsize +(int)(halfcorsize/2 + 1))){ halfareasize = minareasize; } else if(mincorsize > 2){ halfcorsize=mincorsize; halfareasize=(int)(mincorsize+mincorsize/2 +1); } } } } if( ( inp[curr_im]->Xsize < xoff ) || ( inp[curr_im+1]->Xsize < xoff ) || ( inp[curr_im]->Ysize < yoff ) || ( inp[curr_im+1]->Ysize < yoff) ){ ++curr_disp_x; hxdisp[curr_disp_x] = 0; hydisp[curr_disp_x] = 0; } else{ if ( im__find_lroverlap(inp[curr_im], inp[curr_im+1], out, 0, (int)(inp[curr_im]->Xsize -xoff/2), (int)(inp[curr_im]->Ysize /2), (int)(xoff/2), (int)(inp[curr_im+1]->Ysize /2), halfcorsize, halfareasize , &fx, &fy, &scale1, &angle1, &dx1, &dy1 ) == -1 ) error_exit("Unable to im__find_lroverlap"); ++curr_disp_x; hxdisp[curr_disp_x] = inp[curr_im]->Xsize - xoff + fx; hydisp[curr_disp_x] = fy; } } } if( ( i < height ) && ( height > 0 ) ){ curr_row = curr_im+1+(int)(width/2); prev_row = curr_im - width+(int)(width/2); halfcorsize = 5; halfareasize = 14; if( dy < 0){ mincorsize = (int)(inp[prev_row]->Ysize + dy - 1)/6; minareasize = (int)(inp[prev_row]->Ysize + dy - 3*halfcorsize -1)/2 - mincorsize; if(mincorsize > halfcorsize) mincorsize = halfcorsize; if( minareasize > 0 ){ if( minareasize < halfareasize ){ if( minareasize > (int)(halfcorsize +(int)(halfcorsize/2 + 1))){ halfareasize = minareasize; } else if(mincorsize > 2){ halfcorsize=mincorsize; halfareasize=(int)(mincorsize+mincorsize/2 +1); } } } } if( ( inp[curr_row]->Xsize < xoff ) || ( inp[prev_row]->Xsize < xoff ) || ( inp[curr_row]->Ysize < yoff ) || ( inp[prev_row]->Ysize < yoff ) ){ ++curr_disp_y; vxdisp[curr_disp_y] = 0; vydisp[curr_disp_y] = 0; } else{ if ( im__find_tboverlap(inp[prev_row], inp[curr_row], out, 0, (int)(inp[prev_row]->Xsize/2 ), (int)(inp[prev_row]->Ysize - yoff/2 ), (int)(inp[curr_row]->Xsize/2 ), (int)(yoff/2), halfcorsize, halfareasize, &fx, &fy, &scale1, &angle1, &dx1, &dy1 ) == -1 ) error_exit("Unable to im__find_tboverlap"); ++curr_disp_y; vxdisp[curr_disp_y] = fx; vydisp[curr_disp_y] = inp[prev_row]->Ysize - yoff + fy; } } } return ( 0 ); } int main( argc, argv ) int argc; char **argv; { int i, n, j, k; char name[ 1000 ]; FILE *fp; char *r; IMAGE *out; int vxdisp[NUM_FILES + 1] ; int vydisp[NUM_FILES + 1] ; int hxdisp[NUM_FILES + 1] ; int hydisp[NUM_FILES + 1] ; if( im_init_world( argv[0] ) ) error_exit( "unable to start VIPS" ); textdomain( GETTEXT_PACKAGE ); setlocale( LC_ALL, "" ); /* Too many? */ if( argc > NUM_FILES + 1 ) error_exit( "Too many files to merge" ); for(i=0; i< NUM_FILES; i++) file_list[i] = 0; /* Too few? */ if( argc == 1 ) error_exit( "usage: xoverlap yoverlap file_name " ".0x0.v .0x1.v ..." ); xoverlap = atoi(argv[1]); yoverlap = atoi(argv[2]); fp = fopen( argv[3] , "w" ); for( i = 4; i < argc; i++ ){ /* Find/check root. */ if( !file_root ) { file_root = find_root( argv[i] ); if( !file_root ) error_exit( "error at file_root" ); } else { if( !(r = find_root( argv[i] )) ) error_exit( "Error in reading parameters" ); if( strcmp( r, file_root ) != 0 ) error_exit( "Not all roots identical!" ); } /* Read out position. */ if( (n = find_x( argv[i] )) < 0 ) error_exit( "Error in reading file name" ); if( n > width - 1 ) width = n; if( (n = find_y( argv[i] )) < 0 ) error_exit( "Error in reading file name" ); if( n > height - 1 ) height = n; file_list[n] +=1; } /* Make output name. and store them in an array. */ if( !(out = im_open( "tmp.v", "t" )) ) error_exit("unable to open file for output"); file_ptr =0; for(i=height; i>=0; i--) for(j=0; j #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include static char *main_option_field = NULL; static gboolean main_option_all = FALSE; static GOptionEntry main_option[] = { { "all", 'a', 0, G_OPTION_ARG_NONE, &main_option_all, N_( "show all fields" ), NULL }, { "field", 'f', 0, G_OPTION_ARG_STRING, &main_option_field, N_( "print value of FIELD (\"getext\" reads extension block, " "\"Hist\" reads image history)" ), "FIELD" }, { NULL } }; /* A non-fatal error. Print the vips error buffer and continue. */ static void print_error( void ) { fprintf( stderr, "%s: %s", g_get_prgname(), vips_error_buffer() ); vips_error_clear(); } static void * print_field_fn( VipsImage *image, const char *field, GValue *value, void *a ) { gboolean *many = (gboolean *) a; const char *extra; char *str_value; /* Look for known enums and decode them. */ extra = NULL; if( strcmp( field, "coding" ) == 0 ) extra = vips_enum_nick( VIPS_TYPE_CODING, g_value_get_int( value ) ); else if( strcmp( field, "format" ) == 0 ) extra = vips_enum_nick( VIPS_TYPE_BAND_FORMAT, g_value_get_int( value ) ); else if( strcmp( field, "interpretation" ) == 0 ) extra = vips_enum_nick( VIPS_TYPE_INTERPRETATION, g_value_get_int( value ) ); if( *many ) printf( "%s: ", image->filename ); str_value = g_strdup_value_contents( value ); printf( "%s: %s", field, str_value ); g_free( str_value ); if( extra ) printf( " - %s", extra ); printf( "\n" ); return( NULL ); } /* Print header, or parts of header. */ static int print_header( VipsImage *im, gboolean many ) { if( !main_option_field ) { printf( "%s: ", im->filename ); vips_object_print_summary( VIPS_OBJECT( im ) ); if( main_option_all ) (void) vips_image_map( im, print_field_fn, &many ); } else if( strcmp( main_option_field, "getext" ) == 0 ) { if( vips__has_extension_block( im ) ) { void *buf; int size; if( !(buf = vips__read_extension_block( im, &size )) ) return( -1 ); printf( "%s", (char *) buf ); g_free( buf ); } } else if( strcmp( main_option_field, "Hist" ) == 0 ) printf( "%s", vips_image_get_history( im ) ); else { char *str; if( vips_image_get_as_string( im, main_option_field, &str ) ) return( -1 ); printf( "%s\n", str ); g_free( str ); } return( 0 ); } int main( int argc, char *argv[] ) { GOptionContext *context; GError *error = NULL; int i; int result; if( vips_init( argv[0] ) ) vips_error_exit( "unable to start VIPS" ); textdomain( GETTEXT_PACKAGE ); setlocale( LC_ALL, "" ); context = g_option_context_new( _( "- print image header" ) ); g_option_context_add_main_entries( context, main_option, GETTEXT_PACKAGE ); g_option_context_add_group( context, vips_get_option_group() ); if( !g_option_context_parse( context, &argc, &argv, &error ) ) { if( error ) { fprintf( stderr, "%s\n", error->message ); g_error_free( error ); } vips_error_exit( "try \"%s --help\"", g_get_prgname() ); } g_option_context_free( context ); result = 0; for( i = 1; i < argc; i++ ) { VipsImage *im; if( !(im = vips_image_new_from_file( argv[i] )) ) { print_error(); result = 1; } if( im && print_header( im, argc > 2 ) ) { print_error(); result = 1; } if( im ) g_object_unref( im ); } vips_shutdown(); return( result ); } vips-7.38.5/tools/batch_rubber_sheet.in0000644000175000017500000000145012303140253015013 00000000000000#!/bin/sh # Corrects a set of image files for lens distortion using a preprepared # recombination matrix # usage: # # example% batch_rubber_sheet matrix_file image1 image2 .. # # writes output images rsc_image1.v, rsc_image2.v .. # default prefix VIPSHOME=${VIPSHOME-@prefix@} # get name we were run as name=`basename $0` # check args if [ $# -lt 2 ]; then echo "usage: $name matrix image1 image2 ..." echo "writes rsc_image1, rsc_image2, ..." echo echo "$name uses VIPS to correct a set of images for lens distortion" echo "using a matrix calculated by the 'resample' function." exit 1 fi rec=$1 shift # transform each argument for i in $*; do echo "Transforming $i to rsc_$i ..." # bilinear interp., don't wrap edges $VIPSHOME/bin/vips im_transform $i rsc_$i $rec 1 0 done vips-7.38.5/tools/Makefile.in0000644000175000017500000007243112303144056012732 00000000000000# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = find_mosaic$(EXEEXT) mergeup$(EXEEXT) vips$(EXEEXT) \ edvips$(EXEEXT) vipsthumbnail$(EXEEXT) header$(EXEEXT) @ENABLE_CXX_TRUE@am__append_1 = @VIPS_CXX_LIBS@ subdir = tools DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/batch_crop.in $(srcdir)/batch_image_convert.in \ $(srcdir)/batch_rubber_sheet.in $(srcdir)/light_correct.in \ $(srcdir)/shrink_width.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = batch_crop batch_image_convert batch_rubber_sheet \ light_correct shrink_width CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_edvips_OBJECTS = edvips.$(OBJEXT) edvips_OBJECTS = $(am_edvips_OBJECTS) edvips_LDADD = $(LDADD) am__DEPENDENCIES_1 = edvips_DEPENDENCIES = ${top_builddir}/libvips/libvips.la \ $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_find_mosaic_OBJECTS = find_mosaic.$(OBJEXT) find_mosaic_OBJECTS = $(am_find_mosaic_OBJECTS) find_mosaic_LDADD = $(LDADD) find_mosaic_DEPENDENCIES = ${top_builddir}/libvips/libvips.la \ $(am__DEPENDENCIES_1) am_header_OBJECTS = header.$(OBJEXT) header_OBJECTS = $(am_header_OBJECTS) header_LDADD = $(LDADD) header_DEPENDENCIES = ${top_builddir}/libvips/libvips.la \ $(am__DEPENDENCIES_1) am_mergeup_OBJECTS = mergeup.$(OBJEXT) mergeup_OBJECTS = $(am_mergeup_OBJECTS) mergeup_LDADD = $(LDADD) mergeup_DEPENDENCIES = ${top_builddir}/libvips/libvips.la \ $(am__DEPENDENCIES_1) am_vips_OBJECTS = vips.$(OBJEXT) vips_OBJECTS = $(am_vips_OBJECTS) vips_LDADD = $(LDADD) vips_DEPENDENCIES = ${top_builddir}/libvips/libvips.la \ $(am__DEPENDENCIES_1) am_vipsthumbnail_OBJECTS = vipsthumbnail.$(OBJEXT) vipsthumbnail_OBJECTS = $(am_vipsthumbnail_OBJECTS) vipsthumbnail_LDADD = $(LDADD) vipsthumbnail_DEPENDENCIES = ${top_builddir}/libvips/libvips.la \ $(am__DEPENDENCIES_1) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(edvips_SOURCES) $(find_mosaic_SOURCES) $(header_SOURCES) \ $(mergeup_SOURCES) $(vips_SOURCES) $(vipsthumbnail_SOURCES) DIST_SOURCES = $(edvips_SOURCES) $(find_mosaic_SOURCES) \ $(header_SOURCES) $(mergeup_SOURCES) $(vips_SOURCES) \ $(vipsthumbnail_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFITSIO_CFLAGS = @CFITSIO_CFLAGS@ CFITSIO_LIBS = @CFITSIO_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLLWRAP = @DLLWRAP@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXIF_CFLAGS = @EXIF_CFLAGS@ EXIF_LIBS = @EXIF_LIBS@ FFTW_CFLAGS = @FFTW_CFLAGS@ FFTW_LIBS = @FFTW_LIBS@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ IMAGE_MAGICK_CFLAGS = @IMAGE_MAGICK_CFLAGS@ IMAGE_MAGICK_LIBS = @IMAGE_MAGICK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JPEG_INCLUDES = @JPEG_INCLUDES@ JPEG_LIBS = @JPEG_LIBS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBRARY_AGE = @LIBRARY_AGE@ LIBRARY_CURRENT = @LIBRARY_CURRENT@ LIBRARY_REVISION = @LIBRARY_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAGICK_WAND_CFLAGS = @MAGICK_WAND_CFLAGS@ MAGICK_WAND_LIBS = @MAGICK_WAND_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATIO_CFLAGS = @MATIO_CFLAGS@ MATIO_LIBS = @MATIO_LIBS@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MONOTONIC_CFLAGS = @MONOTONIC_CFLAGS@ MONOTONIC_LIBS = @MONOTONIC_LIBS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ OPENEXR_LIBS = @OPENEXR_LIBS@ OPENSLIDE_CFLAGS = @OPENSLIDE_CFLAGS@ OPENSLIDE_LIBS = @OPENSLIDE_LIBS@ ORC_CFLAGS = @ORC_CFLAGS@ ORC_LIBS = @ORC_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGES_USED = @PACKAGES_USED@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ PANGOFT2_LIBS = @PANGOFT2_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_INCLUDES = @PNG_INCLUDES@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REQUIRED_CFLAGS = @REQUIRED_CFLAGS@ REQUIRED_LIBS = @REQUIRED_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADS_CFLAGS = @THREADS_CFLAGS@ THREADS_LIBS = @THREADS_LIBS@ TIFF_CFLAGS = @TIFF_CFLAGS@ TIFF_INCLUDES = @TIFF_INCLUDES@ TIFF_LIBS = @TIFF_LIBS@ TYPE_INIT_CFLAGS = @TYPE_INIT_CFLAGS@ TYPE_INIT_LIBS = @TYPE_INIT_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VIPS_CFLAGS = @VIPS_CFLAGS@ VIPS_CXX_LIBS = @VIPS_CXX_LIBS@ VIPS_EXEEXT = @VIPS_EXEEXT@ VIPS_INCLUDES = @VIPS_INCLUDES@ VIPS_LIBDIR = @VIPS_LIBDIR@ VIPS_LIBS = @VIPS_LIBS@ VIPS_MAJOR_VERSION = @VIPS_MAJOR_VERSION@ VIPS_MICRO_VERSION = @VIPS_MICRO_VERSION@ VIPS_MINOR_VERSION = @VIPS_MINOR_VERSION@ VIPS_VERSION = @VIPS_VERSION@ VIPS_VERSION_STRING = @VIPS_VERSION_STRING@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP_INCLUDES = @ZIP_INCLUDES@ ZIP_LIBS = @ZIP_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vips_introspection_sources = @vips_introspection_sources@ vips_SOURCES = vips.c edvips_SOURCES = edvips.c header_SOURCES = header.c vipsthumbnail_SOURCES = vipsthumbnail.c find_mosaic_SOURCES = find_mosaic.c mergeup_SOURCES = mergeup.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ AM_LDFLAGS = @LDFLAGS@ LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ \ $(am__append_1) bin_SCRIPTS = \ light_correct \ shrink_width \ batch_image_convert \ batch_rubber_sheet \ batch_crop \ vipsprofile \ vips-7.38 EXTRA_DIST = \ vipsprofile \ vips-7.38 \ light_correct.in \ shrink_width.in \ batch_image_convert.in \ batch_rubber_sheet.in \ batch_crop.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): batch_crop: $(top_builddir)/config.status $(srcdir)/batch_crop.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ batch_image_convert: $(top_builddir)/config.status $(srcdir)/batch_image_convert.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ batch_rubber_sheet: $(top_builddir)/config.status $(srcdir)/batch_rubber_sheet.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ light_correct: $(top_builddir)/config.status $(srcdir)/light_correct.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ shrink_width: $(top_builddir)/config.status $(srcdir)/shrink_width.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list edvips$(EXEEXT): $(edvips_OBJECTS) $(edvips_DEPENDENCIES) $(EXTRA_edvips_DEPENDENCIES) @rm -f edvips$(EXEEXT) $(AM_V_CCLD)$(LINK) $(edvips_OBJECTS) $(edvips_LDADD) $(LIBS) find_mosaic$(EXEEXT): $(find_mosaic_OBJECTS) $(find_mosaic_DEPENDENCIES) $(EXTRA_find_mosaic_DEPENDENCIES) @rm -f find_mosaic$(EXEEXT) $(AM_V_CCLD)$(LINK) $(find_mosaic_OBJECTS) $(find_mosaic_LDADD) $(LIBS) header$(EXEEXT): $(header_OBJECTS) $(header_DEPENDENCIES) $(EXTRA_header_DEPENDENCIES) @rm -f header$(EXEEXT) $(AM_V_CCLD)$(LINK) $(header_OBJECTS) $(header_LDADD) $(LIBS) mergeup$(EXEEXT): $(mergeup_OBJECTS) $(mergeup_DEPENDENCIES) $(EXTRA_mergeup_DEPENDENCIES) @rm -f mergeup$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mergeup_OBJECTS) $(mergeup_LDADD) $(LIBS) vips$(EXEEXT): $(vips_OBJECTS) $(vips_DEPENDENCIES) $(EXTRA_vips_DEPENDENCIES) @rm -f vips$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vips_OBJECTS) $(vips_LDADD) $(LIBS) vipsthumbnail$(EXEEXT): $(vipsthumbnail_OBJECTS) $(vipsthumbnail_DEPENDENCIES) $(EXTRA_vipsthumbnail_DEPENDENCIES) @rm -f vipsthumbnail$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vipsthumbnail_OBJECTS) $(vipsthumbnail_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edvips.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_mosaic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/header.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mergeup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vips.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vipsthumbnail.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: install-am install-exec-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-binSCRIPTS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS install-exec-hook: chmod ugo+x ${DESTDIR}${bindir}/light_correct chmod ugo+x ${DESTDIR}${bindir}/shrink_width chmod ugo+x ${DESTDIR}${bindir}/batch_image_convert chmod ugo+x ${DESTDIR}${bindir}/batch_rubber_sheet chmod ugo+x ${DESTDIR}${bindir}/batch_crop chmod ugo+x ${DESTDIR}${bindir}/vipsprofile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: vips-7.38.5/tools/Makefile.am0000644000175000017500000000206312303141142012704 00000000000000bin_PROGRAMS = \ find_mosaic \ mergeup \ vips \ edvips \ vipsthumbnail \ header vips_SOURCES = vips.c edvips_SOURCES = edvips.c header_SOURCES = header.c vipsthumbnail_SOURCES = vipsthumbnail.c find_mosaic_SOURCES = find_mosaic.c mergeup_SOURCES = mergeup.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ AM_LDFLAGS = @LDFLAGS@ LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ if ENABLE_CXX LDADD += @VIPS_CXX_LIBS@ endif bin_SCRIPTS = \ light_correct \ shrink_width \ batch_image_convert \ batch_rubber_sheet \ batch_crop \ vipsprofile \ vips-7.38 EXTRA_DIST = \ vipsprofile \ vips-7.38 \ light_correct.in \ shrink_width.in \ batch_image_convert.in \ batch_rubber_sheet.in \ batch_crop.in install-exec-hook: chmod ugo+x ${DESTDIR}${bindir}/light_correct chmod ugo+x ${DESTDIR}${bindir}/shrink_width chmod ugo+x ${DESTDIR}${bindir}/batch_image_convert chmod ugo+x ${DESTDIR}${bindir}/batch_rubber_sheet chmod ugo+x ${DESTDIR}${bindir}/batch_crop chmod ugo+x ${DESTDIR}${bindir}/vipsprofile vips-7.38.5/tools/shrink_width.in0000644000175000017500000000055012303140253013676 00000000000000#!/bin/sh # shrink to a target width # default prefix VIPSHOME=${VIPSHOME-@prefix@} name=$0 bname=`basename $0` if [ $# != 3 ]; then echo "${bname}: usage: $bname " exit 1 fi inwidth=`$VIPSHOME/bin/vips im_header_int Xsize $1` factor=`(echo scale=10; echo $inwidth / $3) | bc` $VIPSHOME/bin/vips im_shrink $1 $2 $factor $factor vips-7.38.5/tools/mergeup.c0000644000175000017500000003071012303140253012462 00000000000000/* Join together images * * mergeup x y file_name output_dir .0x0.v .0x1.v ... * * Where the image has been take with patches named as * * . . * . . * .0x1.v .1x1.v .. * .0x0.v .1x0.v .. * * * Tries to generate optimal join sequence. Does not require any intermidiate * files for temporary storage. * It uses partials on all IO by including tbmerge / lrmerge programs. * * * Copyright (C) Feb./1995, Ahmed. Abbood * National Gallery. London * */ /* This file is part of VIPS. VIPS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include #include #define NUM_FILES 1000 #define MAXPOINTS 60 static int xoverlap; static int yoverlap; static int file_ptr = 0; static IMAGE *in[ NUM_FILES ]; /* Strategy: build a tree describing the sequence of joins we want. Walk the * tree assigning temporary file names, compile the tree into a linear * sequence of join commands. */ /* Decoded file name info. */ static char *file_root = NULL; static char *output_file = NULL; static int width = 0; /* Number of frames across */ static int height = 0; /* Number of frames down */ static int file_list[ NUM_FILES ]; static int im_phmerge( Rect *larea, Rect *rarea, Rect *outarea ) { Rect overlap; /* Compute overlap. */ im_rect_intersectrect( larea, rarea, &overlap ); outarea->width = rarea->left + rarea->width; outarea->height = overlap.height; outarea->top = overlap.top; outarea->left = larea->left; return( 0 ); } static int im_pvmerge( Rect *tarea, Rect *barea, Rect *outarea ) { Rect overlap; /* Compute overlap. */ im_rect_intersectrect( tarea, barea, &overlap ); outarea->width = overlap.width; outarea->height = barea->top + barea->height ; outarea->left = overlap.left; outarea->top = tarea->top; return( 0 ); } static int merge_analysis(int width,int height,IMAGE **in,int xoff, int yoff,int *vxdisp,int *vydisp,int *hxdisp, int *hydisp,Rect *hrect,Rect *vrect) { int i,j; int curr_im,offset; int curr_x, curr_y; Rect larea, rarea, barea; curr_im = -1; curr_x = -1; curr_y = -1; for(i=0; i<=height; i++){ for(j=0; j<=width; j++){ ++curr_im; if( width == 0 ){ ++curr_x; hrect[curr_x].width = in[curr_im]->Xsize; hrect[curr_x].height= in[curr_im]->Ysize; hrect[curr_x].top = 0; hrect[curr_x].left = 0; } else{ if( j == 0){ ++curr_x; /* Area occupied by left image. */ larea.left = 0; larea.top = 0; larea.height = in[curr_im]->Ysize; larea.width = in[curr_im]->Xsize; /* Area occupied by right image. */ if( in[curr_im]->Xsize < xoff ) offset = 0; else offset =xoff; rarea.left = in[curr_im]->Xsize - (offset + hxdisp[curr_x]) ; rarea.top = hydisp[curr_x]; rarea.width = in[curr_im+1]->Xsize; rarea.height = in[curr_im+1]->Ysize; im_phmerge( &larea, &rarea, &hrect[curr_x] ); } else if( j < width ){ ++curr_x; /* Area occupied by right image. */ if( in[curr_im+1]->Xsize < xoff ) offset = 0; else offset =xoff; rarea.left = hrect[curr_x -1].width - (offset + hxdisp[curr_x]) ; rarea.top = hydisp[curr_x]; rarea.width = in[curr_im+1]->Xsize; rarea.height = in[curr_im+1]->Ysize; im_phmerge( &hrect[curr_x -1], &rarea, &hrect[curr_x] ); } } } if( i > 0 ){ ++curr_y; /* Area occupied by bottom image in output. */ barea.left = vxdisp[curr_y]; barea.width = hrect[curr_x].width; barea.height = hrect[curr_x].height; if( in[curr_x - width]->Ysize < yoff ) offset = 0; else offset = yoff; if( i == 1){ barea.top = hrect[curr_x - width].height - offset - vydisp[curr_y] ; im_pvmerge( &hrect[curr_x - width], &barea, &vrect[curr_y] ); } else{ barea.top = vrect[curr_y - 1].height - yoff - vydisp[curr_y] ; im_pvmerge( &vrect[curr_y -1], &barea, &vrect[curr_y] ); } } } return( 0 ); } /* Find the root name of a file name. Return new, shorter, string. */ static char * find_root( name ) char *name; { char *out = strdup( name ); char *p; /* Chop off '.v'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( NULL ); } *p = '\0'; /* Chop off nxn. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( NULL ); } *p = '\0'; return( out ); } /* Find the x position of a file name (extract n from .nxm.v). */ static int find_x( char *name ) { int n; char *p; char *out; out = strdup( name ); /* Chop off '.v'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } *p = '\0'; /* Find '.nxm'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } /* Read out x posn. */ if( sscanf( p, ".%dx%*d", &n ) != 1 ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } free( out ); return( n ); } /* Find the y position of a file name (extract m from .nxm.v). */ static int find_y( char *name ) { int m; char *p; char *out; out = strdup( name ); /* Chop off '.v'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } *p = '\0'; /* Find '.nxm'. */ if( !(p = strrchr( out, '.' )) ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } /* Read out y posn. */ if( sscanf( p, ".%*dx%d", &m ) != 1 ) { im_error( "find_mosaic", _( "bad file name format '%s'" ), name ); free( out ); return( -1 ); } free( out ); return( m ); } /* Join two frames left-right. Have to open them and find their sizes. */ static int join_leftright(IMAGE *left, IMAGE *right, IMAGE *out, int dx, int dy ) { if (im_lrmerge(left, right, out, dx, dy, 20) == -1) return( -1 ); return( 0 ); } /* Join two frames up-down. Have to open them and find their sizes. */ static int join_updown( IMAGE *top, IMAGE *bottom, IMAGE *out, int dx, int dy ) { if (im_tbmerge(top, bottom, out, dx, dy, 20) == -1) return( -1 ); return( 0 ); } static int merge_up( int width, int height, IMAGE **inp, IMAGE *outp, int xoff, int yoff, int *hxdisp, int *hydisp, Rect *vrect ) { int dx,dy,first_row; int i, j, partial_no, in_no; IMAGE **p_img; char name[29]; int v_no, h_no; p_img = (IMAGE **) malloc(1 + 3 * width * height * sizeof(IMAGE *)); if( p_img == NULL ){ im_error( "mergeup", "%s", _( "allocation failure in mergeup") ); return( -1 ); } partial_no = 0; v_no = 0; h_no = 0; in_no = 0; first_row = 0; if( (width == 0 ) && (height == 0 ) ){ im_error( "mergeup", "%s", _( "Need more than one image") ); return( -1 ); } for(i=0; i<=height; i++){ for(j=0; j<=width; j++){ p_img[partial_no] = inp[in_no]; ++partial_no; if( j != 0 ){ im_snprintf( name, 29, "partial_img.%d.v",partial_no ); if( !( p_img[partial_no] = im_open( name, "p" )) ){ free(p_img); return( -1 ); } ++partial_no; dy = hydisp[h_no ] ; dx = -p_img[partial_no-3]->Xsize + hxdisp[h_no] + xoff ; if( (height == 0) && ( j == width) ) join_leftright( p_img[partial_no-3], p_img[partial_no-2],outp,dx,dy ); else join_leftright( p_img[partial_no-3], p_img[partial_no-2],p_img[partial_no-1],dx,dy ); ++h_no; } ++in_no; } if( first_row == 0) first_row = partial_no - 1; if( ( i > 0 ) || ( height == 0) ){ if( i < height ){ im_snprintf( name, 29, "partial_img.%d.v", partial_no ); if( !( p_img[partial_no] = im_open( name, "p" )) ){ free(p_img); return( -1 ); } ++partial_no; dy = -( vrect[v_no].height - p_img[partial_no-2]->Ysize ); dx = vrect[v_no].left ; ++v_no; join_updown( p_img[first_row], p_img[partial_no-2], p_img[partial_no-1],dx,dy ); first_row = partial_no-1; } else{ dy = -( vrect[v_no].height - p_img[partial_no-1]->Ysize ); dx = vrect[v_no].left ; join_updown( p_img[first_row], p_img[partial_no-1],outp,dx,dy ); } } } return( 0 ); } int main( argc, argv ) int argc; char **argv; { int i, n, j, k; char name[ 1000 ]; FILE *fp; char *r; IMAGE *out; int vxdisp[NUM_FILES + 1] ; int vydisp[NUM_FILES + 1] ; int hxdisp[NUM_FILES + 1] ; int hydisp[NUM_FILES + 1] ; Rect hrect[NUM_FILES]; Rect vrect[NUM_FILES]; if( im_init_world( argv[0] ) ) error_exit( "unable to start VIPS" ); textdomain( GETTEXT_PACKAGE ); setlocale( LC_ALL, "" ); /* Too many? */ if( argc > NUM_FILES + 1 ) error_exit( "Too many files to merge" ); for(i=0; i< NUM_FILES; i++) file_list[i] = 0; /* Too few? */ if( argc == 1 ) error_exit( "usage: xoverlap yoverlap file_name output_dir " ".0x0.v .0x1.v ..." ); xoverlap = atoi(argv[1]); yoverlap = atoi(argv[2]); fp = fopen( argv[3] , "r" ); for( i = 5; i < argc; i++ ){ /* Find/check root. */ if( !file_root ) { file_root = find_root( argv[i] ); if( !file_root ) error_exit( "error at file_root" ); } else { if( !(r = find_root( argv[i] )) ) error_exit( "Error in reading parameters" ); if( strcmp( r, file_root ) != 0 ) error_exit( "Not all roots identical!" ); } /* Read out position. */ if( (n = find_x( argv[i] )) < 0 ) error_exit( "Error in reading file name" ); if( n > width - 1 ) width = n; if( (n = find_y( argv[i] )) < 0 ) error_exit( "Error in reading file name" ); if( n > height - 1 ) height = n; file_list[n] +=1; } /* Make output name. and store them in an array. */ im_snprintf( name, 1000, "%s/paint.hr.v", argv[4] ); if( !(out = im_open( name, "w" )) ) error_exit("unable to open file for output"); file_ptr =0; for(i=height; i>=0; i--) for(j=0; j #endif /*HAVE_CONFIG_H*/ #include #include #include #include #include #include #include #include #include #include #include /* We have to represent all header fields as char* so we can spot unset args * safely. */ static char *xsize = NULL; static char *ysize = NULL; static char *bands = NULL; static char *format = NULL; static char *interpretation = NULL; static char *coding = NULL; static char *xres = NULL; static char *yres = NULL; static char *xoffset = NULL; static char *yoffset = NULL; static char *endian = NULL; static gboolean setext = FALSE; static GOptionEntry entries[] = { { "endian", 'n', 0, G_OPTION_ARG_STRING, &endian, N_( "tag file as big or little-endian" ), NULL }, { "width", 'w', 0, G_OPTION_ARG_STRING, &xsize, N_( "set width to N pixels" ), "N" }, { "height", 'h', 0, G_OPTION_ARG_STRING, &ysize, N_( "set height to N pixels" ), "N" }, { "bands", 'b', 0, G_OPTION_ARG_STRING, &bands, N_( "set Bands to N" ), "N" }, { "format", 'f', 0, G_OPTION_ARG_STRING, &format, N_( "set BandFmt to F (eg. uchar, float)" ), "F" }, { "interpretation", 'i', 0, G_OPTION_ARG_STRING, &interpretation, N_( "set interpretation to I (eg. xyz)" ), "I" }, { "coding", 'c', 0, G_OPTION_ARG_STRING, &coding, N_( "set Coding to C (eg. labq)" ), "C" }, { "xres", 'X', 0, G_OPTION_ARG_STRING, &xres, N_( "set Xres to R pixels/mm" ), "R" }, { "yres", 'Y', 0, G_OPTION_ARG_STRING, &yres, N_( "set Yres to R pixels/mm" ), "R" }, { "xoffset", 'u', 0, G_OPTION_ARG_STRING, &xoffset, N_( "set Xoffset to N pixels" ), "N" }, { "yoffset", 'v', 0, G_OPTION_ARG_STRING, &yoffset, N_( "set Yoffset to N pixels" ), "N" }, { "setext", 'e', 0, G_OPTION_ARG_NONE, &setext, N_( "replace extension block with stdin" ), NULL }, { "xsize", 'x', 0, G_OPTION_ARG_STRING, &xsize, N_( "set Xsize to N (deprecated, use width)" ), "N" }, { "ysize", 'y', 0, G_OPTION_ARG_STRING, &ysize, N_( "set Ysize to N (deprecated, use height)" ), "N" }, { "type", 't', 0, G_OPTION_ARG_STRING, &interpretation, N_( "set Type to T (deprecated, use interpretation)" ), "T" }, { NULL } }; static void parse_pint( char *arg, int *out ) { /* Might as well set an upper limit. */ *out = atoi( arg ); if( *out <= 0 || *out > 1000000 ) error_exit( _( "'%s' is not a positive integer" ), arg ); } int main( int argc, char **argv ) { GOptionContext *context; GError *error = NULL; IMAGE *im; unsigned char header[IM_SIZEOF_HEADER]; if( im_init_world( argv[0] ) ) error_exit( "%s", _( "unable to start VIPS" ) ); textdomain( GETTEXT_PACKAGE ); setlocale( LC_ALL, "" ); context = g_option_context_new( _( "vipsfile - edit vipsfile header" ) ); g_option_context_add_main_entries( context, entries, GETTEXT_PACKAGE ); g_option_context_add_group( context, im_get_option_group() ); if( !g_option_context_parse( context, &argc, &argv, &error ) ) { if( error ) { fprintf( stderr, "%s\n", error->message ); g_error_free( error ); } exit( -1 ); } if( argc != 2 ) { fprintf( stderr, _( "usage: %s [OPTION...] vipsfile\n" ), g_get_prgname() ); exit( -1 ); } if( !(im = im_init( argv[1] )) || (im->fd = im__open_image_file( im->filename )) == -1 ) error_exit( _( "could not open image %s" ), argv[1] ); if( read( im->fd, header, IM_SIZEOF_HEADER ) != IM_SIZEOF_HEADER || im__read_header_bytes( im, header ) ) error_exit( _( "could not read VIPS header for %s" ), im->filename ); if( endian ) { if( strcmp( endian, "little" ) == 0 ) im->magic = VIPS_MAGIC_INTEL; else if( strcmp( endian, "big" ) == 0 ) im->magic = VIPS_MAGIC_SPARC; else error_exit( _( "bad endian-ness %s, " "should be 'big' or 'little'" ), endian ); } if( xsize ) parse_pint( xsize, &im->Xsize ); if( ysize ) parse_pint( ysize, &im->Ysize ); if( bands ) parse_pint( bands, &im->Bands ); if( format ) { VipsBandFormat f; if( (f = im_char2BandFmt( format )) < 0 ) error_exit( _( "bad format %s" ), format ); im->BandFmt = f; im->Bbits = im_bits_of_fmt( f ); } if( interpretation ) { VipsInterpretation i; if( (i = im_char2Type( interpretation )) < 0 ) error_exit( _( "bad interpretation %s" ), interpretation ); im->Type = i; } if( coding ) { VipsCoding c; if( (c = im_char2Coding( coding )) < 0 ) error_exit( _( "bad coding %s" ), coding ); im->Coding = c; } if( xres ) im->Xres = atof( xres ); if( yres ) im->Yres = atof( yres ); if( xoffset ) im->Xoffset = atoi( xoffset ); if( yoffset ) im->Yoffset = atoi( yoffset ); if( lseek( im->fd, 0, SEEK_SET ) == (off_t) -1 ) error_exit( _( "could not seek on %s" ), im->filename ); if( im__write_header_bytes( im, header ) || im__write( im->fd, header, IM_SIZEOF_HEADER ) ) error_exit( _( "could not write to %s" ), im->filename ); if( setext ) { char *xml; unsigned int size; if( !(xml = im__file_read( stdin, "stdin", &size )) ) error_exit( "%s", _( "could not get ext data" ) ); /* Strip trailing whitespace ... we can get stray \n at the * end, eg. "echo | edvips --setext fred.v". */ while( size > 0 && isspace( xml[size - 1] ) ) size -= 1; if( im__write_extension_block( im, xml, size ) ) error_exit( "%s", _( "could not set extension" ) ); im_free( xml ); } im_close( im ); vips_shutdown(); return( 0 ); } vips-7.38.5/tools/vipsprofile0000644000175000017500000003142712303140253013145 00000000000000#!/usr/bin/python import re import math import cairo class ReadFile: def __init__(self, filename): self.filename = filename def __enter__(self): self.f = open(self.filename, 'r') self.lineno = 0 self.getnext(); return self def __exit__(self, type, value, traceback): self.f.close() def __nonzero__(self): return self.line != "" def getnext(self): self.lineno += 1 self.line = self.f.readline() def read_times(rf): times = [] while True: match = re.match('[+-]?[0-9]+ ', rf.line) if not match: break times += [int(x) for x in re.split(' ', rf.line.rstrip())] rf.getnext() return times[::-1] class Thread: thread_number = 0 def __init__(self, thread_name): # no one cares about the thread address match = re.match('(.*) \(0x.*?\) (.*)', thread_name) if match: thread_name = match.group(1) + " " + match.group(2) self.thread_name = thread_name self.thread_number = Thread.thread_number self.all_events = [] self.workwait_events = [] self.memory_events = [] self.other_events = [] Thread.thread_number += 1 all_events = [] class Event: def __init__(self, thread, gate_location, gate_name, start, stop): self.thread = thread self.gate_location = gate_location self.gate_name = gate_name self.work = False self.wait = False self.memory = False if gate_location == "memory": self.memory = True elif re.match('.*work.*', gate_name): self.work = True elif re.match('.*wait.*', gate_name): self.wait = True if self.memory: self.start = start self.stop = start self.size = stop else: self.start = start self.stop = stop thread.all_events.append(self) all_events.append(self) if self.wait or self.work: thread.workwait_events.append(self) elif self.memory: thread.memory_events.append(self) else: thread.other_events.append(self) input_filename = 'vips-profile.txt' thread_id = 0 threads = [] n_events = 0 print 'reading from', input_filename with ReadFile(input_filename) as rf: while rf: if rf.line.rstrip() == "": rf.getnext() continue if rf.line[0] == "#": rf.getnext() continue match = re.match('thread: (.*)', rf.line) if not match: print 'parse error line %d, expected "thread"' % rf.lineno thread_name = match.group(1) + " " + str(thread_id) thread_id += 1 thread = Thread(thread_name) threads.append(thread) rf.getnext() while True: match = re.match('^gate: (.*?)(: (.*))?$', rf.line) if not match: break gate_location = match.group(1) gate_name = match.group(3) rf.getnext() match = re.match('start:', rf.line) if not match: continue rf.getnext() start = read_times(rf) match = re.match('stop:', rf.line) if not match: continue rf.getnext() stop = read_times(rf) if len(start) != len(stop): print 'start and stop length mismatch' for a, b in zip(start, stop): Event(thread, gate_location, gate_name, a, b) n_events += 1 for thread in threads: thread.all_events.sort(lambda x, y: cmp(x.start, y.start)) thread.workwait_events.sort(lambda x, y: cmp(x.start, y.start)) thread.memory_events.sort(lambda x, y: cmp(x.start, y.start)) thread.other_events.sort(lambda x, y: cmp(x.start, y.start)) all_events.sort(lambda x, y: cmp(x.start, y.start)) print 'loaded %d events' % n_events # move time axis to secs of computation ticks_per_sec = 1000000.0 first_time = all_events[0].start last_time = 0 for event in all_events: if event.start < first_time: first_time = event.start if event.stop > last_time: last_time = event.stop for event in all_events: event.start = (event.start - first_time) / ticks_per_sec event.stop = (event.stop - first_time) / ticks_per_sec last_time = (last_time - first_time) / ticks_per_sec first_time = 0 print 'total time =', last_time # calculate some simple stats for thread in threads: thread.start = last_time thread.stop = 0 thread.wait = 0 thread.work = 0 thread.mem = 0 thread.peak_mem = 0 for event in thread.all_events: if event.start < thread.start: thread.start = event.start if event.stop > thread.stop: thread.stop = event.stop if event.wait: thread.wait += event.stop - event.start if event.work: thread.work += event.stop - event.start if event.memory: thread.mem += event.size if thread.mem > thread.peak_mem: thread.peak_mem = thread.mem thread.alive = thread.stop - thread.start # hide very short-lived threads thread.hide = thread.alive < 0.01 print 'name\t\talive\twait%\twork%\tunkn%\tmemory\tpeakm' for thread in threads: if thread.hide: continue wait_percent = 100 * thread.wait / thread.alive work_percent = 100 * thread.work / thread.alive unkn_percent = 100 - 100 * (thread.work + thread.wait) / thread.alive print '%13s\t%6.2g\t' % (thread.thread_name, thread.alive), print '%.3g\t%.3g\t%.3g\t' % (wait_percent, work_percent, unkn_percent), print '%.3g\t' % (float(thread.mem) / (1024 * 1024)), print '%.3g\t' % (float(thread.peak_mem) / (1024 * 1024)) mem = 0 peak_mem = 0 for event in all_events: if event.memory: mem += event.size if mem > peak_mem: peak_mem = mem print 'peak memory = %.3g MB' % (float(peak_mem) / (1024 * 1024)) if mem != 0: print 'leak! final memory = %.3g MB' % (float(mem) / (1024 * 1024)) # does a list of events contain an overlap? # assume the list of events has been sorted by start time def events_overlap(events): for i in range(0, len(events) - 1): # we can't just test for stop1 > start2 since one (or both) events # might have duration zero event1 = events[i] event2 = events[i + 1] overlap_start = max(event1.start, event2.start) overlap_stop = min(event1.stop, event2.stop) if overlap_stop - overlap_start > 0: return True return False # do the events on two gates overlap? def gates_overlap(events, gate_name1, gate_name2): merged = [] for event in events: if event.gate_name == gate_name1 or event.gate_name == gate_name2: merged.append(event) merged.sort(lambda x, y: cmp(x.start, y.start)) return events_overlap(merged) # allocate a y position for each gate total_y = 0 for thread in threads: if thread.hide: continue thread.total_y = total_y gate_positions = {} # first pass .. move work and wait events to y == 0 if events_overlap(thread.workwait_events): print 'gate overlap on thread', thread.thread_name for i in range(0, len(thread.workwait_events) - 1): event1 = thread.workwait_events[i] event2 = thread.workwait_events[i + 1] overlap_start = max(event1.start, event2.start) overlap_stop = min(event1.stop, event2.stop) if overlap_stop - overlap_start > 0: print 'overlap:' print 'event', event1.gate_location, event1.gate_name, print 'starts at', event1.start, 'stops at', event1.stop print 'event', event2.gate_location, event2.gate_name, print 'starts at', event2.start, 'stops at', event2.stop for event in thread.workwait_events: gate_positions[event.gate_name] = 0 event.y = 0 event.total_y = total_y for event in thread.memory_events: gate_positions[event.gate_name] = 0 event.y = 0 event.total_y = total_y # second pass: move all other events to non-overlapping ys y = 1 for event in thread.other_events: if not event.gate_name in gate_positions: # look at all the ys we've allocated previously and see if we can # add this gate to one of them for gate_y in range(1, y): found_overlap = False for gate_name in gate_positions: if gate_positions[gate_name] != gate_y: continue if gates_overlap(thread.other_events, event.gate_name, gate_name): found_overlap = True break if not found_overlap: gate_positions[event.gate_name] = gate_y break # failure? add a new y if not event.gate_name in gate_positions: gate_positions[event.gate_name] = y y += 1 event.y = gate_positions[event.gate_name] # third pass: flip the order of the ys to get the lowest-level ones at the # top, next to the wait/work line for event in thread.other_events: event.y = y - event.y event.total_y = total_y + event.y total_y += y PIXELS_PER_SECOND = 1000 PIXELS_PER_GATE = 20 LEFT_BORDER = 130 BAR_HEIGHT = 5 MEM_HEIGHT = 100 WIDTH = int(LEFT_BORDER + last_time * PIXELS_PER_SECOND) + 20 HEIGHT = int(total_y * PIXELS_PER_GATE) + MEM_HEIGHT + 30 output_filename = "vips-profile.svg" print 'writing to', output_filename surface = cairo.SVGSurface(output_filename, WIDTH, HEIGHT) ctx = cairo.Context(surface) ctx.select_font_face('Sans') ctx.set_font_size(15) ctx.rectangle(0, 0, WIDTH, HEIGHT) ctx.set_source_rgba(0.0, 0.0, 0.3, 1.0) ctx.fill() def draw_event(ctx, event): left = event.start * PIXELS_PER_SECOND + LEFT_BORDER top = event.total_y * PIXELS_PER_GATE + BAR_HEIGHT / 2 width = (event.stop - event.start) * PIXELS_PER_SECOND height = BAR_HEIGHT if event.memory: width = 1 height /= 2 top += BAR_HEIGHT ctx.rectangle(left, top, width, height) if event.wait: ctx.set_source_rgb(0.9, 0.1, 0.1) elif event.work: ctx.set_source_rgb(0.1, 0.9, 0.1) elif event.memory: ctx.set_source_rgb(1.0, 1.0, 1.0) else: ctx.set_source_rgb(0.1, 0.1, 0.9) ctx.fill() if not event.wait and not event.work and not event.memory: xbearing, ybearing, twidth, theight, xadvance, yadvance = \ ctx.text_extents(event.gate_name) ctx.move_to(left + width / 2 - twidth / 2, top + 3 * BAR_HEIGHT) ctx.set_source_rgb(1.00, 0.83, 0.00) ctx.show_text(event.gate_name) for thread in threads: if thread.hide: continue ctx.rectangle(0, thread.total_y * PIXELS_PER_GATE, WIDTH, 1) ctx.set_source_rgb(1.00, 1.00, 1.00) ctx.fill() xbearing, ybearing, twidth, theight, xadvance, yadvance = \ ctx.text_extents(thread.thread_name) ctx.move_to(0, theight + thread.total_y * PIXELS_PER_GATE + BAR_HEIGHT / 2) ctx.set_source_rgb(1.00, 1.00, 1.00) ctx.show_text(thread.thread_name) for event in thread.all_events: draw_event(ctx, event) memory_y = total_y * PIXELS_PER_GATE label = "memory" xbearing, ybearing, twidth, theight, xadvance, yadvance = \ ctx.text_extents(label) ctx.move_to(0, memory_y + theight + 8) ctx.set_source_rgb(1.00, 1.00, 1.00) ctx.show_text(label) mem = 0 ctx.move_to(LEFT_BORDER, memory_y + MEM_HEIGHT) for event in all_events: if event.memory: mem += event.size left = LEFT_BORDER + event.start * PIXELS_PER_SECOND top = memory_y + MEM_HEIGHT - (MEM_HEIGHT * mem / peak_mem) ctx.line_to(left, top) ctx.set_line_width(1) ctx.set_source_rgb(1.00, 1.00, 1.00) ctx.stroke() axis_y = total_y * PIXELS_PER_GATE + MEM_HEIGHT ctx.rectangle(LEFT_BORDER, axis_y, last_time * PIXELS_PER_SECOND, 1) ctx.set_source_rgb(1.00, 1.00, 1.00) ctx.fill() label = "time" xbearing, ybearing, twidth, theight, xadvance, yadvance = \ ctx.text_extents(label) ctx.move_to(0, axis_y + theight + 8) ctx.set_source_rgb(1.00, 1.00, 1.00) ctx.show_text(label) for t in range(0, int(last_time * PIXELS_PER_SECOND), PIXELS_PER_SECOND / 10): left = t + LEFT_BORDER top = axis_y ctx.rectangle(left, top, 1, 5) ctx.set_source_rgb(1.00, 1.00, 1.00) ctx.fill() label = str(float(t) / PIXELS_PER_SECOND) xbearing, ybearing, twidth, theight, xadvance, yadvance = \ ctx.text_extents(label) ctx.move_to(left - twidth / 2, top + theight + 8) ctx.set_source_rgb(1.00, 1.00, 1.00) ctx.show_text(label) surface.finish() vips-7.38.5/tools/vips-7.380000755000175000017500000000474212303141142012162 00000000000000#!/bin/bash # # Start script for VIPS # need extended regexps, hence we insist on bash above shopt -s extglob # set -x # name we were invoked as bname=`basename $0` # check args if [[ $# < 1 ]]; then echo "usage: $bname [command ...]" echo "examples:" echo " $bname man im_invert" echo " $bname vips im_invert /pics/tmp/fred.jpg /pics/tmp/fred2.tif" exit 1 fi # prepend a path component to an environment variable # be careful to avoid trailing : characters if the var is not defined, they # can cause security problems function prepend_var () { # we have to use eval to do double indirection, I think eval value="\$$1" if [ "x$value" = x ]; then export $1=$2 else export $1=$2:$value fi } # try to extract the prefix from a path to an executable # eg. "/home/john/vips/bin/fred" -> "/home/john/vips" function find_prefix () { # try to canonicalise the path ep_canon=$1 # relative path? prefix with pwd if [ ${ep_canon:0:1} != "/" ]; then ep_canon=`pwd`/$ep_canon fi # replace any "/./" with "/" ep_canon=${ep_canon//\/.\//\/} # any "xxx/../" can go ep_canon=${ep_canon//+([^\/])\/..\//} # trailing "xxx/.." can go ep_canon=${ep_canon/%+([^\/])\/../} # remove trailing "/bin/xxx" to get the prefix ep_prefix=${ep_canon/%\/bin\/+([^\/])/} # was there anything to remove in that final step? if not, the path # must be wrong if [ x$ep_prefix == x$ep_canon ]; then return 1 fi echo $ep_prefix; return 0 } # try to guess the install prefix from $0 function guess_prefix () { # $0 is a file? must be us if [ -f $0 ]; then find_prefix $0 return fi # nope, extract program name from $0 and try looking along the # searchpath for it name=`basename $0` fred=$PATH while [ x$fred != x"" ]; do path=${fred/:*/}/$name fred=${fred/*([^:])?(:)/} if [ -f $path ]; then find_prefix $path return fi done # not found on path either ... give up! return 1 } prefix=`guess_prefix`; if [ $? != 0 ]; then echo "unable to find $0 from the file name, or from your PATH" echo "either run directly, or add the install bin area to " echo "your PATH" exit 1 fi export VIPSHOME=$prefix # add VIPSHOME to man pages prepend_var MANPATH $VIPSHOME/man # add the VIPS lib area to the library path case `uname` in HPUX) libvar=SHLIB_PATH ;; Darwin) libvar=DYLD_LIBRARY_PATH ;; *) libvar=LD_LIBRARY_PATH ;; esac prepend_var $libvar $VIPSHOME/lib # add VIPS bin area to path prepend_var PATH $VIPSHOME/bin # run, passing in args we were passed exec $* vips-7.38.5/tools/batch_image_convert.in0000644000175000017500000000175312303140253015172 00000000000000#!/bin/sh # Convert a set of image files to new file format # # usage: # # example% batch_image_convert image1 image2 etc # # writes output images image1.* and image2.* where * is the new file type. # default prefix VIPSHOME=${VIPSHOME-@prefix@} name=`basename $0` # check args if [ $# -lt 2 ]; then echo "usage: $name image1 image2 ..." echo echo "$name uses VIPS to convert a group of image files of" echo "any image format into a new group of images all of the same" echo "image format. VIPS can read almost any standard image format" echo "but it can only write VIPS, JPEG, TIFF, PPM/PBM/PGM or PNG." exit 1 fi type=$1 shift # convert each argument for i in $*; do # drop the suffix on the filename base=${i%*.*} echo "Converting $i to $base.$type ..." if [ -f $base.$type ]; then echo "$base.$type already exists skiping $i" else $VIPSHOME/bin/vips im_copy $i $base.$type fi done vips-7.38.5/config.guess0000755000175000017500000013036112303144054012040 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: vips-7.38.5/config.h.in0000644000175000017500000002257412303144053011550 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* define to open non-text files in binary mode */ #undef BINARY_OPEN /* build C++ components */ #undef ENABLE_CXX /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* The prefix for our gettext translation domains. */ #undef GETTEXT_PACKAGE /* Domain for glib logging messages. */ #undef G_LOG_DOMAIN /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* have cbrt() in libm. */ #undef HAVE_CBRT /* define if you have cfitsio installed. */ #undef HAVE_CFITSIO /* define if your glib has g_cond_init(). */ #undef HAVE_COND_INIT /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_DIRECT_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* define if you have libexif >= 0.6 installed. */ #undef HAVE_EXIF /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* define if you have fftw3 installed. */ #undef HAVE_FFTW /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `GetVirtualPixels' function. */ #undef HAVE_GETVIRTUALPIXELS /* Define to 1 if you have the `getwd' function. */ #undef HAVE_GETWD /* have hypot() in libm. */ #undef HAVE_HYPOT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IO_H /* Define if you have jpeg libraries and header files. */ #undef HAVE_JPEG /* define if you have lcms installed. */ #undef HAVE_LCMS /* define if you have lcms2 installed. */ #undef HAVE_LCMS2 /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* define if you have libwebp installed. */ #undef HAVE_LIBWEBP /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* define if you have libMagick installed. */ #undef HAVE_MAGICK /* Define to 1 if you have the `MagickCoreGenesis' function. */ #undef HAVE_MAGICKCOREGENESIS /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* define if you have matio installed. */ #undef HAVE_MATIO /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* Define to 1 if you have the `mktemp' function. */ #undef HAVE_MKTEMP /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* define if your glib has g_get_monotonic_time(). */ #undef HAVE_MONOTONIC_TIME /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP /* define if your glib has g_mutex_init(). */ #undef HAVE_MUTEX_INIT /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* define if you have OpenEXR >=1.2.2 installed. */ #undef HAVE_OPENEXR /* define if you have OpenSlide >= 3.3.0 installed. */ #undef HAVE_OPENSLIDE /* define if you have orc-0.4.11 or later installed. */ #undef HAVE_ORC /* define if you have pangoft2 installed. */ #undef HAVE_PANGOFT2 /* define if you have libpng installed. */ #undef HAVE_PNG /* define if your glib has G_PRIVATE_INIT(). */ #undef HAVE_PRIVATE_INIT /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `rand' function. */ #undef HAVE_RAND /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM /* Define to 1 if you have the `realpath' function. */ #undef HAVE_REALPATH /* Define to 1 if you have the `ResetImageAttributeIterator' function. */ #undef HAVE_RESETIMAGEATTRIBUTEITERATOR /* Define to 1 if you have the `ResetImagePropertyIterator' function. */ #undef HAVE_RESETIMAGEPROPERTYITERATOR /* Define to 1 if you have the `SetImageOption' function. */ #undef HAVE_SETIMAGEOPTION /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcspn' function. */ #undef HAVE_STRCSPN /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strspn' function. */ #undef HAVE_STRSPN /* Define to 1 if you have the `sysconf' function. */ #undef HAVE_SYSCONF /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* define if your glib has g_thread_new(). */ #undef HAVE_THREAD_NEW /* define if you have libtiff installed. */ #undef HAVE_TIFF /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* define if your glib has g_value_get_schar(). */ #undef HAVE_VALUE_GET_SCHAR /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* Define if you have libz libraries and header files. */ #undef HAVE_ZIP /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* define if your glib needs g_type_init(). */ #undef NEED_TYPE_INIT /* native win32 */ #undef OS_WIN32 /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* libexif includes don't need libexif prefix */ #undef UNTAGGED_EXIF /* Version number of package */ #undef VERSION /* default directory for ICC profiles */ #undef VIPS_ICC_DIR /* configure-time library directory */ #undef VIPS_LIBDIR /* native Mac OS X */ #undef VIPS_OS_DARWIN /* configure-time install prefix */ #undef VIPS_PREFIX /* Define if using the dmalloc debugging malloc package */ #undef WITH_DMALLOC /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `long int' if does not define. */ #undef off_t /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif /* Define to `unsigned int' if does not define. */ #undef size_t vips-7.38.5/aclocal.m40000644000175000017500000133731312303144052011365 00000000000000# generated automatically by aclocal 1.13.3 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *-*-openbsd*) CATOBJEXT=.mo DATADIRNAME=share ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.ac. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_ac,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.13.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([AM_WITH_DMALLOC], [AC_MSG_CHECKING([if malloc debugging is wanted]) AC_ARG_WITH([dmalloc], [AS_HELP_STRING([--with-dmalloc], [use dmalloc, as in http://www.dmalloc.com])], [if test "$withval" = yes; then AC_MSG_RESULT([yes]) AC_DEFINE([WITH_DMALLOC], [1], [Define if using the dmalloc debugging malloc package]) LIBS="$LIBS -ldmalloc" LDFLAGS="$LDFLAGS -g" else AC_MSG_RESULT([no]) fi], [AC_MSG_RESULT([no])]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version is >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_MSG_ERROR([Python interpreter is too old])]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility # with python 3.x. See automake bug#10227. try: import sysconfig except ImportError: can_use_sysconfig = 0 else: can_use_sysconfig = 1 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: # try: from platform import python_implementation if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': can_use_sysconfig = 0 except ImportError: pass" dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gtk-doc.m4]) m4_include([m4/introspection.m4]) m4_include([acinclude.m4]) vips-7.38.5/COPYING0000644000175000017500000006364212303140253010557 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it!